commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c097561e5952f7163290a00d9f2834f20f975faf | pytest.ini | pytest.ini | [pytest]
testpaths = tests
addopts = --log-format '%(filename)-25s %(lineno)4d %(levelname)-8s %(name)-13s %(task)-15s %(message)s'
| [pytest]
testpaths = tests
addopts = --log-format '%(filename)-25s %(lineno)4d %(levelname)-8s %(name)-13s %(message)s'
| Remove task from test logs, to avoid logging crashes from other modules logging | Remove task from test logs, to avoid logging crashes from other modules logging
| INI | mit | Danfocus/Flexget,qk4l/Flexget,oxc/Flexget,JorisDeRieck/Flexget,ianstalk/Flexget,qk4l/Flexget,LynxyssCZ/Flexget,drwyrm/Flexget,gazpachoking/Flexget,malkavi/Flexget,Danfocus/Flexget,poulpito/Flexget,tarzasai/Flexget,qvazzler/Flexget,drwyrm/Flexget,jawilson/Flexget,Flexget/Flexget,Danfocus/Flexget,tobinjt/Flexget,LynxyssCZ/Flexget,Flexget/Flexget,gazpachoking/Flexget,dsemi/Flexget,qvazzler/Flexget,crawln45/Flexget,qvazzler/Flexget,poulpito/Flexget,oxc/Flexget,sean797/Flexget,jacobmetrick/Flexget,tobinjt/Flexget,jawilson/Flexget,sean797/Flexget,jawilson/Flexget,Flexget/Flexget,qk4l/Flexget,LynxyssCZ/Flexget,malkavi/Flexget,drwyrm/Flexget,JorisDeRieck/Flexget,JorisDeRieck/Flexget,Flexget/Flexget,tobinjt/Flexget,malkavi/Flexget,tarzasai/Flexget,jacobmetrick/Flexget,Danfocus/Flexget,jacobmetrick/Flexget,crawln45/Flexget,crawln45/Flexget,dsemi/Flexget,oxc/Flexget,malkavi/Flexget,poulpito/Flexget,OmgOhnoes/Flexget,crawln45/Flexget,OmgOhnoes/Flexget,ianstalk/Flexget,tobinjt/Flexget,OmgOhnoes/Flexget,JorisDeRieck/Flexget,LynxyssCZ/Flexget,tarzasai/Flexget,sean797/Flexget,ianstalk/Flexget,jawilson/Flexget,dsemi/Flexget | ini | ## Code Before:
[pytest]
testpaths = tests
addopts = --log-format '%(filename)-25s %(lineno)4d %(levelname)-8s %(name)-13s %(task)-15s %(message)s'
## Instruction:
Remove task from test logs, to avoid logging crashes from other modules logging
## Code After:
[pytest]
testpaths = tests
addopts = --log-format '%(filename)-25s %(lineno)4d %(levelname)-8s %(name)-13s %(message)s'
| [pytest]
testpaths = tests
- addopts = --log-format '%(filename)-25s %(lineno)4d %(levelname)-8s %(name)-13s %(task)-15s %(message)s'
? ------------
+ addopts = --log-format '%(filename)-25s %(lineno)4d %(levelname)-8s %(name)-13s %(message)s' | 2 | 0.666667 | 1 | 1 |
9b8e5c7cce27616a4aa767d74d82823c94a96dc7 | buddybuild_postclone.sh | buddybuild_postclone.sh |
brew install openssl
brew install ctls
swift package generate-xcodeproj
|
brew tap vapor/homebrew-tap
brew update
brew install vapor
swift package generate-xcodeproj
| Install Vapor on Buddybuild post clone action | Install Vapor on Buddybuild post clone action
More experiments!
| Shell | mit | Sherlouk/monzo-vapor,Sherlouk/monzo-vapor | shell | ## Code Before:
brew install openssl
brew install ctls
swift package generate-xcodeproj
## Instruction:
Install Vapor on Buddybuild post clone action
More experiments!
## Code After:
brew tap vapor/homebrew-tap
brew update
brew install vapor
swift package generate-xcodeproj
|
- brew install openssl
- brew install ctls
+ brew tap vapor/homebrew-tap
+ brew update
+ brew install vapor
swift package generate-xcodeproj | 5 | 1 | 3 | 2 |
5a66aaa7b7640ef616bf1817a9e2999e10d97404 | tests/test_wsgi_graphql.py | tests/test_wsgi_graphql.py | from webtest import TestApp as Client
from wsgi_graphql import wsgi_graphql
from graphql.core.type import (
GraphQLEnumType,
GraphQLEnumValue,
GraphQLInterfaceType,
GraphQLObjectType,
GraphQLField,
GraphQLArgument,
GraphQLList,
GraphQLNonNull,
GraphQLSchema,
GraphQLString,
)
def raises(*_):
raise Exception("Raises!")
TestSchema = GraphQLSchema(
query=GraphQLObjectType(
'Root',
fields=lambda: {
'test': GraphQLField(
GraphQLString,
args={
'who': GraphQLArgument(
type=GraphQLString
)
},
resolver=lambda root, args, *_: 'Hello ' + (args['who'] or 'World')
),
'thrower': GraphQLField(
GraphQLNonNull(GraphQLString),
resolver=raises
)
}
)
)
def test_basic():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
response = c.get('/?query={test}')
assert response.json == {
'data': {
'test': 'Hello World'
}
}
| import json
from webtest import TestApp as Client
from wsgi_graphql import wsgi_graphql
from graphql.core.type import (
GraphQLObjectType,
GraphQLField,
GraphQLArgument,
GraphQLNonNull,
GraphQLSchema,
GraphQLString,
)
def raises(*_):
raise Exception("Raises!")
TestSchema = GraphQLSchema(
query=GraphQLObjectType(
'Root',
fields=lambda: {
'test': GraphQLField(
GraphQLString,
args={
'who': GraphQLArgument(
type=GraphQLString
)
},
resolver=lambda root, args, *_: 'Hello ' + (args['who'] or 'World')
),
'thrower': GraphQLField(
GraphQLNonNull(GraphQLString),
resolver=raises
)
}
)
)
def test_allows_GET_with_query_param():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
response = c.get('/', {'query': '{test}'})
assert response.json == {
'data': {
'test': 'Hello World'
}
}
def test_allows_GET_with_variable_values():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
response = c.get('/', {
'query': 'query helloWho($who: String){ test(who: $who) }',
'variables': json.dumps({'who': 'Dolly'})
})
assert response.json == {
'data': {
'test': 'Hello Dolly'
}
}
| Expand test to cover variables. | Expand test to cover variables.
| Python | mit | ecreall/graphql-wsgi,faassen/graphql-wsgi,faassen/wsgi_graphql | python | ## Code Before:
from webtest import TestApp as Client
from wsgi_graphql import wsgi_graphql
from graphql.core.type import (
GraphQLEnumType,
GraphQLEnumValue,
GraphQLInterfaceType,
GraphQLObjectType,
GraphQLField,
GraphQLArgument,
GraphQLList,
GraphQLNonNull,
GraphQLSchema,
GraphQLString,
)
def raises(*_):
raise Exception("Raises!")
TestSchema = GraphQLSchema(
query=GraphQLObjectType(
'Root',
fields=lambda: {
'test': GraphQLField(
GraphQLString,
args={
'who': GraphQLArgument(
type=GraphQLString
)
},
resolver=lambda root, args, *_: 'Hello ' + (args['who'] or 'World')
),
'thrower': GraphQLField(
GraphQLNonNull(GraphQLString),
resolver=raises
)
}
)
)
def test_basic():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
response = c.get('/?query={test}')
assert response.json == {
'data': {
'test': 'Hello World'
}
}
## Instruction:
Expand test to cover variables.
## Code After:
import json
from webtest import TestApp as Client
from wsgi_graphql import wsgi_graphql
from graphql.core.type import (
GraphQLObjectType,
GraphQLField,
GraphQLArgument,
GraphQLNonNull,
GraphQLSchema,
GraphQLString,
)
def raises(*_):
raise Exception("Raises!")
TestSchema = GraphQLSchema(
query=GraphQLObjectType(
'Root',
fields=lambda: {
'test': GraphQLField(
GraphQLString,
args={
'who': GraphQLArgument(
type=GraphQLString
)
},
resolver=lambda root, args, *_: 'Hello ' + (args['who'] or 'World')
),
'thrower': GraphQLField(
GraphQLNonNull(GraphQLString),
resolver=raises
)
}
)
)
def test_allows_GET_with_query_param():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
response = c.get('/', {'query': '{test}'})
assert response.json == {
'data': {
'test': 'Hello World'
}
}
def test_allows_GET_with_variable_values():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
response = c.get('/', {
'query': 'query helloWho($who: String){ test(who: $who) }',
'variables': json.dumps({'who': 'Dolly'})
})
assert response.json == {
'data': {
'test': 'Hello Dolly'
}
}
| + import json
from webtest import TestApp as Client
from wsgi_graphql import wsgi_graphql
from graphql.core.type import (
- GraphQLEnumType,
- GraphQLEnumValue,
- GraphQLInterfaceType,
GraphQLObjectType,
GraphQLField,
GraphQLArgument,
- GraphQLList,
GraphQLNonNull,
GraphQLSchema,
GraphQLString,
)
def raises(*_):
raise Exception("Raises!")
TestSchema = GraphQLSchema(
query=GraphQLObjectType(
'Root',
fields=lambda: {
'test': GraphQLField(
GraphQLString,
args={
'who': GraphQLArgument(
type=GraphQLString
)
},
resolver=lambda root, args, *_: 'Hello ' + (args['who'] or 'World')
),
'thrower': GraphQLField(
GraphQLNonNull(GraphQLString),
resolver=raises
)
}
)
)
- def test_basic():
+ def test_allows_GET_with_query_param():
wsgi = wsgi_graphql(TestSchema)
c = Client(wsgi)
- response = c.get('/?query={test}')
? ^ ^
+ response = c.get('/', {'query': '{test}'})
? ^^^^^ ^^^^ +
assert response.json == {
'data': {
'test': 'Hello World'
}
}
+
+
+ def test_allows_GET_with_variable_values():
+ wsgi = wsgi_graphql(TestSchema)
+
+ c = Client(wsgi)
+ response = c.get('/', {
+ 'query': 'query helloWho($who: String){ test(who: $who) }',
+ 'variables': json.dumps({'who': 'Dolly'})
+ })
+
+ assert response.json == {
+ 'data': {
+ 'test': 'Hello Dolly'
+ }
+ } | 25 | 0.471698 | 19 | 6 |
b478453176c7aed108bb199b331a0419e297ecb8 | README.md | README.md |
[](https://travis-ci.org/percy/percy-cli)
[](http://badge.fury.io/rb/percy-cli)
Command-line interface for [Percy](https://percy.io).
#### Docs here: [https://percy.io/docs/clients/ruby/cli](https://percy.io/docs/clients/ruby/cli)
| **Deprecation Notice:** New projects should the [Percy Agent snapshot command](https://docs.percy.io/docs/command-line-client)
# Percy CLI
[](https://travis-ci.org/percy/percy-cli)
[](http://badge.fury.io/rb/percy-cli)
Command-line interface for [Percy](https://percy.io).
#### Docs here: [https://docs.percy.io/docs/command-line-client-legacy](https://docs.percy.io/docs/command-line-client-legacy)
| Update readme to reflect deprecation. | Update readme to reflect deprecation.
Future projects should use Percy Agent's snapshot command. | Markdown | mit | percy/percy-cli | markdown | ## Code Before:
[](https://travis-ci.org/percy/percy-cli)
[](http://badge.fury.io/rb/percy-cli)
Command-line interface for [Percy](https://percy.io).
#### Docs here: [https://percy.io/docs/clients/ruby/cli](https://percy.io/docs/clients/ruby/cli)
## Instruction:
Update readme to reflect deprecation.
Future projects should use Percy Agent's snapshot command.
## Code After:
**Deprecation Notice:** New projects should the [Percy Agent snapshot command](https://docs.percy.io/docs/command-line-client)
# Percy CLI
[](https://travis-ci.org/percy/percy-cli)
[](http://badge.fury.io/rb/percy-cli)
Command-line interface for [Percy](https://percy.io).
#### Docs here: [https://docs.percy.io/docs/command-line-client-legacy](https://docs.percy.io/docs/command-line-client-legacy)
| + **Deprecation Notice:** New projects should the [Percy Agent snapshot command](https://docs.percy.io/docs/command-line-client)
+
+ # Percy CLI
[](https://travis-ci.org/percy/percy-cli)
[](http://badge.fury.io/rb/percy-cli)
Command-line interface for [Percy](https://percy.io).
- #### Docs here: [https://percy.io/docs/clients/ruby/cli](https://percy.io/docs/clients/ruby/cli)
+ #### Docs here: [https://docs.percy.io/docs/command-line-client-legacy](https://docs.percy.io/docs/command-line-client-legacy) | 5 | 0.714286 | 4 | 1 |
7bf85cd3c1d8c695c9254f084d60a7512ece2a42 | app/views/articles/_meta.html.erb | app/views/articles/_meta.html.erb | <div class="article-info">
<%= display_user_avatar(article.user, 'thumb', 'article-info__image') %>
<p class="article-info__content">
Published by
<a class="article-info__link" href="#"><%= link_to(article.user.nickname, author_path(article.user.login), rel: :author) %></a>
</p>
<p class="article-info__content">
Category
<a class="article-info__link" href="#">Money saving tips</a>
</p>
<p class="article-info__content">
<time datetime="<%= article.published_at %>"><%= display_date_and_time(article.published_at) %></time>
</p>
<% if article.published_comments.size > 0 %>
<a class="article-info__comments" href="#comments"><%= article.published_comments.size %> Comment<%= article.published_comments.size > 1 ? 's' : '' %></a>
<% end %>
</div>
| <div class="article-info">
<%= display_user_avatar(article.user, 'thumb', 'article-info__image') %>
<p class="article-info__content">
Published by
<a class="article-info__link" href="#"><%= link_to(article.user.nickname, author_path(article.user.login), rel: :author) %></a>
</p>
<p class="article-info__content">
<time datetime="<%= article.published_at %>"><%= display_date_and_time(article.published_at) %></time>
</p>
<% if article.published_comments.size > 0 %>
<a class="article-info__comments" href="#comments"><%= article.published_comments.size %> Comment<%= article.published_comments.size > 1 ? 's' : '' %></a>
<% end %>
</div>
| Remove category link on article pages | Remove category link on article pages
| HTML+ERB | mit | moneyadviceservice/publify,moneyadviceservice/publify,moneyadviceservice/publify,moneyadviceservice/publify | html+erb | ## Code Before:
<div class="article-info">
<%= display_user_avatar(article.user, 'thumb', 'article-info__image') %>
<p class="article-info__content">
Published by
<a class="article-info__link" href="#"><%= link_to(article.user.nickname, author_path(article.user.login), rel: :author) %></a>
</p>
<p class="article-info__content">
Category
<a class="article-info__link" href="#">Money saving tips</a>
</p>
<p class="article-info__content">
<time datetime="<%= article.published_at %>"><%= display_date_and_time(article.published_at) %></time>
</p>
<% if article.published_comments.size > 0 %>
<a class="article-info__comments" href="#comments"><%= article.published_comments.size %> Comment<%= article.published_comments.size > 1 ? 's' : '' %></a>
<% end %>
</div>
## Instruction:
Remove category link on article pages
## Code After:
<div class="article-info">
<%= display_user_avatar(article.user, 'thumb', 'article-info__image') %>
<p class="article-info__content">
Published by
<a class="article-info__link" href="#"><%= link_to(article.user.nickname, author_path(article.user.login), rel: :author) %></a>
</p>
<p class="article-info__content">
<time datetime="<%= article.published_at %>"><%= display_date_and_time(article.published_at) %></time>
</p>
<% if article.published_comments.size > 0 %>
<a class="article-info__comments" href="#comments"><%= article.published_comments.size %> Comment<%= article.published_comments.size > 1 ? 's' : '' %></a>
<% end %>
</div>
| <div class="article-info">
<%= display_user_avatar(article.user, 'thumb', 'article-info__image') %>
<p class="article-info__content">
Published by
<a class="article-info__link" href="#"><%= link_to(article.user.nickname, author_path(article.user.login), rel: :author) %></a>
- </p>
-
- <p class="article-info__content">
- Category
- <a class="article-info__link" href="#">Money saving tips</a>
</p>
<p class="article-info__content">
<time datetime="<%= article.published_at %>"><%= display_date_and_time(article.published_at) %></time>
</p>
<% if article.published_comments.size > 0 %>
<a class="article-info__comments" href="#comments"><%= article.published_comments.size %> Comment<%= article.published_comments.size > 1 ? 's' : '' %></a>
<% end %>
</div> | 5 | 0.238095 | 0 | 5 |
27ec71458c377b99dad427244b094462ff657bae | scripts/roles/cikit-pantheon-terminus/tasks/main.yml | scripts/roles/cikit-pantheon-terminus/tasks/main.yml | ---
- name: Ensure directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/terminus"
state: directory
register: terminus_dir
- name: Set path to executable
set_fact:
terminus_bin: "{{ terminus_dir.path }}/vendor/bin/terminus"
- name: Download
get_url:
url: https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar
dest: "{{ terminus_dir.path }}/terminus-installer.phar"
register: terminus_installer
- name: Install
become_user: "{{ ansible_user }}"
shell: "php {{ terminus_installer.dest }} install --install-dir={{ terminus_dir.path }}"
args:
creates: "{{ terminus_bin }}"
- name: Ensure executable
file:
src: "{{ terminus_bin }}"
dest: "{{ cikit_pantheon_terminus.bin }}/{{ terminus_bin | basename }}"
state: link
mode: a+x
- name: Ensure system directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/.terminus"
state: directory
recurse: yes
| ---
- name: Ensure directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/terminus"
state: directory
register: terminus_dir
- name: Set path to executable
set_fact:
terminus_bin: "{{ terminus_dir.path }}/vendor/bin/terminus"
- name: Download
get_url:
url: https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar
dest: "{{ terminus_dir.path }}/terminus-installer.phar"
register: terminus_installer
- name: Install
shell: "php {{ terminus_installer.dest }} install --install-dir={{ terminus_dir.path }}"
args:
creates: "{{ terminus_bin }}"
- name: Ensure executable
file:
src: "{{ terminus_bin }}"
dest: "{{ cikit_pantheon_terminus.bin }}/{{ terminus_bin | basename }}"
state: link
mode: a+x
- name: Ensure system directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/.terminus"
state: directory
recurse: yes
| Fix Terminus installation in VM | [CIKit] Fix Terminus installation in VM
| YAML | apache-2.0 | BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit | yaml | ## Code Before:
---
- name: Ensure directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/terminus"
state: directory
register: terminus_dir
- name: Set path to executable
set_fact:
terminus_bin: "{{ terminus_dir.path }}/vendor/bin/terminus"
- name: Download
get_url:
url: https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar
dest: "{{ terminus_dir.path }}/terminus-installer.phar"
register: terminus_installer
- name: Install
become_user: "{{ ansible_user }}"
shell: "php {{ terminus_installer.dest }} install --install-dir={{ terminus_dir.path }}"
args:
creates: "{{ terminus_bin }}"
- name: Ensure executable
file:
src: "{{ terminus_bin }}"
dest: "{{ cikit_pantheon_terminus.bin }}/{{ terminus_bin | basename }}"
state: link
mode: a+x
- name: Ensure system directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/.terminus"
state: directory
recurse: yes
## Instruction:
[CIKit] Fix Terminus installation in VM
## Code After:
---
- name: Ensure directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/terminus"
state: directory
register: terminus_dir
- name: Set path to executable
set_fact:
terminus_bin: "{{ terminus_dir.path }}/vendor/bin/terminus"
- name: Download
get_url:
url: https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar
dest: "{{ terminus_dir.path }}/terminus-installer.phar"
register: terminus_installer
- name: Install
shell: "php {{ terminus_installer.dest }} install --install-dir={{ terminus_dir.path }}"
args:
creates: "{{ terminus_bin }}"
- name: Ensure executable
file:
src: "{{ terminus_bin }}"
dest: "{{ cikit_pantheon_terminus.bin }}/{{ terminus_bin | basename }}"
state: link
mode: a+x
- name: Ensure system directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/.terminus"
state: directory
recurse: yes
| ---
- name: Ensure directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/terminus"
state: directory
register: terminus_dir
- name: Set path to executable
set_fact:
terminus_bin: "{{ terminus_dir.path }}/vendor/bin/terminus"
- name: Download
get_url:
url: https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar
dest: "{{ terminus_dir.path }}/terminus-installer.phar"
register: terminus_installer
- name: Install
- become_user: "{{ ansible_user }}"
shell: "php {{ terminus_installer.dest }} install --install-dir={{ terminus_dir.path }}"
args:
creates: "{{ terminus_bin }}"
- name: Ensure executable
file:
src: "{{ terminus_bin }}"
dest: "{{ cikit_pantheon_terminus.bin }}/{{ terminus_bin | basename }}"
state: link
mode: a+x
- name: Ensure system directory
file:
path: "{{ cikit_pantheon_terminus.dir }}/.terminus"
state: directory
recurse: yes | 1 | 0.028571 | 0 | 1 |
a7559260a86d4607c9aee6c76fc527ef082375c7 | README.md | README.md | XV Proxy
========
Extensible proxy class.
Roadmap
-------
* Throttling
* SSL
* OS X integration
* Firefox integration
* Allow read hooks
* Allow stub hooks
* Access control (remote proxying)
| XV Proxy
========
Extensible proxy class.
[](http://travis-ci.org/seppo0010/xv-proxy)
Roadmap
-------
* Throttling
* SSL
* OS X integration
* Firefox integration
* Allow read hooks
* Allow stub hooks
* Access control (remote proxying)
| Add travis test link to readme | Add travis test link to readme
| Markdown | bsd-2-clause | seppo0010/xv-proxy,seppo0010/xv-proxy,seppo0010/xv-proxy | markdown | ## Code Before:
XV Proxy
========
Extensible proxy class.
Roadmap
-------
* Throttling
* SSL
* OS X integration
* Firefox integration
* Allow read hooks
* Allow stub hooks
* Access control (remote proxying)
## Instruction:
Add travis test link to readme
## Code After:
XV Proxy
========
Extensible proxy class.
[](http://travis-ci.org/seppo0010/xv-proxy)
Roadmap
-------
* Throttling
* SSL
* OS X integration
* Firefox integration
* Allow read hooks
* Allow stub hooks
* Access control (remote proxying)
| XV Proxy
========
Extensible proxy class.
+
+ [](http://travis-ci.org/seppo0010/xv-proxy)
Roadmap
-------
* Throttling
* SSL
* OS X integration
* Firefox integration
* Allow read hooks
* Allow stub hooks
* Access control (remote proxying) | 2 | 0.133333 | 2 | 0 |
fe88f534341eabeff89313ae046a2be48043833f | client/src/components/NavBar.js | client/src/components/NavBar.js | import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
<li className="navbar__link"><Link to="/">Home</Link></li>
{ isAuthenticated &&
[
<li className="navbar__link"><Link to="/history">History</Link></li>,
<li className="navbar__link"><Link to="/history/april">April</Link></li>,
<li className="navbar__link"><Link to="/stopwatch">Stopwatch</Link></li>
]
}
{ !isAuthenticated &&
[
<li className="navbar__link"><Link to="/signup">Signup</Link></li>,
<li className="navbar__link">
<Link to="/login">Login</Link>
</li>
]
}
{ isAuthenticated &&
<li className="navbar__link">
<button onClick={ logoutUser }>Logout</button>
</li>
}
</ul>
);
export default connect(
({ root }) => ({ isAuthenticated: root.isAuthenticated }),
{ logoutUser }
)(NavBar);
| import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
<li key={0} className="navbar__link"><Link to="/">Home</Link></li>
{ isAuthenticated &&
[
<li key={1} className="navbar__link"><Link to="/history">History</Link></li>,
<li key={2} className="navbar__link"><Link to="/history/april">April</Link></li>,
<li key={3} className="navbar__link"><Link to="/stopwatch">Stopwatch</Link></li>
]
}
{ !isAuthenticated &&
[
<li key={4} className="navbar__link"><Link to="/signup">Signup</Link></li>,
<li key={5} className="navbar__link">
<Link to="/login">Login</Link>
</li>
]
}
{ isAuthenticated &&
<li key={6} className="navbar__link">
<button onClick={ logoutUser }>Logout</button>
</li>
}
</ul>
);
export default connect(
({ root }) => ({ isAuthenticated: root.isAuthenticated }),
{ logoutUser }
)(NavBar);
| Fix React missing key iterator warning | Fix React missing key iterator warning
| JavaScript | mit | mbchoa/presence,mbchoa/presence | javascript | ## Code Before:
import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
<li className="navbar__link"><Link to="/">Home</Link></li>
{ isAuthenticated &&
[
<li className="navbar__link"><Link to="/history">History</Link></li>,
<li className="navbar__link"><Link to="/history/april">April</Link></li>,
<li className="navbar__link"><Link to="/stopwatch">Stopwatch</Link></li>
]
}
{ !isAuthenticated &&
[
<li className="navbar__link"><Link to="/signup">Signup</Link></li>,
<li className="navbar__link">
<Link to="/login">Login</Link>
</li>
]
}
{ isAuthenticated &&
<li className="navbar__link">
<button onClick={ logoutUser }>Logout</button>
</li>
}
</ul>
);
export default connect(
({ root }) => ({ isAuthenticated: root.isAuthenticated }),
{ logoutUser }
)(NavBar);
## Instruction:
Fix React missing key iterator warning
## Code After:
import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
<li key={0} className="navbar__link"><Link to="/">Home</Link></li>
{ isAuthenticated &&
[
<li key={1} className="navbar__link"><Link to="/history">History</Link></li>,
<li key={2} className="navbar__link"><Link to="/history/april">April</Link></li>,
<li key={3} className="navbar__link"><Link to="/stopwatch">Stopwatch</Link></li>
]
}
{ !isAuthenticated &&
[
<li key={4} className="navbar__link"><Link to="/signup">Signup</Link></li>,
<li key={5} className="navbar__link">
<Link to="/login">Login</Link>
</li>
]
}
{ isAuthenticated &&
<li key={6} className="navbar__link">
<button onClick={ logoutUser }>Logout</button>
</li>
}
</ul>
);
export default connect(
({ root }) => ({ isAuthenticated: root.isAuthenticated }),
{ logoutUser }
)(NavBar);
| import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { logoutUser } from '../../redux/actions';
const NavBar = ({ isAuthenticated, logoutUser }) => (
<ul className="navbar">
- <li className="navbar__link"><Link to="/">Home</Link></li>
+ <li key={0} className="navbar__link"><Link to="/">Home</Link></li>
? ++++++++
{ isAuthenticated &&
[
- <li className="navbar__link"><Link to="/history">History</Link></li>,
+ <li key={1} className="navbar__link"><Link to="/history">History</Link></li>,
? ++++++++
- <li className="navbar__link"><Link to="/history/april">April</Link></li>,
+ <li key={2} className="navbar__link"><Link to="/history/april">April</Link></li>,
? ++++++++
- <li className="navbar__link"><Link to="/stopwatch">Stopwatch</Link></li>
+ <li key={3} className="navbar__link"><Link to="/stopwatch">Stopwatch</Link></li>
? ++++++++
]
}
{ !isAuthenticated &&
[
- <li className="navbar__link"><Link to="/signup">Signup</Link></li>,
+ <li key={4} className="navbar__link"><Link to="/signup">Signup</Link></li>,
? ++++++++
- <li className="navbar__link">
+ <li key={5} className="navbar__link">
? ++++++++
<Link to="/login">Login</Link>
</li>
]
}
{ isAuthenticated &&
- <li className="navbar__link">
+ <li key={6} className="navbar__link">
? ++++++++
<button onClick={ logoutUser }>Logout</button>
</li>
}
</ul>
);
export default connect(
({ root }) => ({ isAuthenticated: root.isAuthenticated }),
{ logoutUser }
)(NavBar); | 14 | 0.388889 | 7 | 7 |
2f6d88bc1a46af50ae2c68f732f31747a70df19c | app/models/news.rb | app/models/news.rb | class News < ActiveRecord::Base
end
| class News < ActiveRecord::Base
validates :title, :sub_title, :body, :image_url, presence: true
validates_length_of :title, :minimum => 5
validates_length_of :title, :maximum => 60
validates_length_of :sub_title, :minimum => 5
validates_length_of :sub_title, :maximum => 60
validates :image_url, allow_blank: true, format: {
with: %r{\.(gif|jpg|png)\Z}i,
message: 'must be a URL for GIF, JPG or PNG image.'
}
end
| Add title, subtitle, body, image_url validation for News | Add title, subtitle, body, image_url validation for News
| Ruby | mit | bdisney/eShop,bdisney/eShop,bdisney/eShop | ruby | ## Code Before:
class News < ActiveRecord::Base
end
## Instruction:
Add title, subtitle, body, image_url validation for News
## Code After:
class News < ActiveRecord::Base
validates :title, :sub_title, :body, :image_url, presence: true
validates_length_of :title, :minimum => 5
validates_length_of :title, :maximum => 60
validates_length_of :sub_title, :minimum => 5
validates_length_of :sub_title, :maximum => 60
validates :image_url, allow_blank: true, format: {
with: %r{\.(gif|jpg|png)\Z}i,
message: 'must be a URL for GIF, JPG or PNG image.'
}
end
| class News < ActiveRecord::Base
+ validates :title, :sub_title, :body, :image_url, presence: true
+ validates_length_of :title, :minimum => 5
+ validates_length_of :title, :maximum => 60
+
+ validates_length_of :sub_title, :minimum => 5
+ validates_length_of :sub_title, :maximum => 60
+
+ validates :image_url, allow_blank: true, format: {
+ with: %r{\.(gif|jpg|png)\Z}i,
+ message: 'must be a URL for GIF, JPG or PNG image.'
+ }
end | 11 | 5.5 | 11 | 0 |
e81f76c5bf99d261448fd2744f8fbd2319b4fbac | web/app/scripts/services/userservice.js | web/app/scripts/services/userservice.js | 'use strict';
/**
* @ngdoc service
* @name dormManagementToolApp.userService
* @description
* # userService
* Service in the dormManagementToolApp.
*/
angular.module('dormManagementToolApp')
.service('UserService', function () {
this.getName = function () {
return JSON.parse(localStorage.getItem('user')).name;
}
});
| 'use strict';
/**
* @ngdoc service
* @name dormManagementToolApp.userService
* @description
* # userService
* Service in the dormManagementToolApp.
*/
angular.module('dormManagementToolApp')
.service('UserService', function () {
this.getName = function () {
return JSON.parse(localStorage.getItem('user')).name;
};
this.getId = function() {
return JSON.parse(localStorage.getItem(('user')).id);
}
});
| Add service getter for user id | Add service getter for user id
| JavaScript | mit | TomGijselinck/dorm-management-tool,TomGijselinck/dorm-management-tool,TomGijselinck/dorm-management-tool | javascript | ## Code Before:
'use strict';
/**
* @ngdoc service
* @name dormManagementToolApp.userService
* @description
* # userService
* Service in the dormManagementToolApp.
*/
angular.module('dormManagementToolApp')
.service('UserService', function () {
this.getName = function () {
return JSON.parse(localStorage.getItem('user')).name;
}
});
## Instruction:
Add service getter for user id
## Code After:
'use strict';
/**
* @ngdoc service
* @name dormManagementToolApp.userService
* @description
* # userService
* Service in the dormManagementToolApp.
*/
angular.module('dormManagementToolApp')
.service('UserService', function () {
this.getName = function () {
return JSON.parse(localStorage.getItem('user')).name;
};
this.getId = function() {
return JSON.parse(localStorage.getItem(('user')).id);
}
});
| 'use strict';
/**
* @ngdoc service
* @name dormManagementToolApp.userService
* @description
* # userService
* Service in the dormManagementToolApp.
*/
angular.module('dormManagementToolApp')
.service('UserService', function () {
this.getName = function () {
return JSON.parse(localStorage.getItem('user')).name;
+ };
+ this.getId = function() {
+ return JSON.parse(localStorage.getItem(('user')).id);
}
}); | 3 | 0.2 | 3 | 0 |
68eb2bcbd8e7e7912c9f788ab4d1c25c94650538 | lib/main.dart | lib/main.dart | import 'package:flutter/material.dart';
void main() {
runApp(new FriendlychatApp());
}
class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "FriendlyChat",
home: new ChatScreen(),
);
}
}
class ChatScreen extends StatefulWidget {
@override
State createState() => new ChatScreenState();
}
class ChatScreenState extends State<ChatScreen> {
final TextEditingController _textController = new TextEditingController();
Widget _buildTextComposer() {
return new Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: new TextField(
controller: _textController,
onSubmitted: _handleSubmitted,
decoration: new InputDecoration.collapsed(
hintText: "Send a message"),
),
);
}
void _handleSubmitted(String text) {
_textController.clear();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("FriendlyChat")
),
body: _buildTextComposer(),
);
}
}
| import 'package:flutter/material.dart';
void main() {
runApp(new FriendlychatApp());
}
class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "FriendlyChat",
home: new ChatScreen(),
);
}
}
class ChatScreen extends StatefulWidget {
@override
State createState() => new ChatScreenState();
}
class ChatScreenState extends State<ChatScreen> {
final TextEditingController _textController = new TextEditingController();
Widget _buildTextComposer() {
return new Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: new Row( //new
children: <Widget>[ //new
new Flexible(
child: new TextField(
controller: _textController,
onSubmitted: _handleSubmitted,
decoration: new InputDecoration.collapsed(hintText: "Send a message"),
),
)
]
)
);
}
void _handleSubmitted(String text) {
_textController.clear();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("FriendlyChat")
),
body: _buildTextComposer(),
);
}
}
| Prepare for adding the button to the right to enable sending the message | Prepare for adding the button to the right to enable sending the message
| Dart | apache-2.0 | grahammkelly/new_flutter_app,grahammkelly/new_flutter_app | dart | ## Code Before:
import 'package:flutter/material.dart';
void main() {
runApp(new FriendlychatApp());
}
class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "FriendlyChat",
home: new ChatScreen(),
);
}
}
class ChatScreen extends StatefulWidget {
@override
State createState() => new ChatScreenState();
}
class ChatScreenState extends State<ChatScreen> {
final TextEditingController _textController = new TextEditingController();
Widget _buildTextComposer() {
return new Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: new TextField(
controller: _textController,
onSubmitted: _handleSubmitted,
decoration: new InputDecoration.collapsed(
hintText: "Send a message"),
),
);
}
void _handleSubmitted(String text) {
_textController.clear();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("FriendlyChat")
),
body: _buildTextComposer(),
);
}
}
## Instruction:
Prepare for adding the button to the right to enable sending the message
## Code After:
import 'package:flutter/material.dart';
void main() {
runApp(new FriendlychatApp());
}
class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "FriendlyChat",
home: new ChatScreen(),
);
}
}
class ChatScreen extends StatefulWidget {
@override
State createState() => new ChatScreenState();
}
class ChatScreenState extends State<ChatScreen> {
final TextEditingController _textController = new TextEditingController();
Widget _buildTextComposer() {
return new Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: new Row( //new
children: <Widget>[ //new
new Flexible(
child: new TextField(
controller: _textController,
onSubmitted: _handleSubmitted,
decoration: new InputDecoration.collapsed(hintText: "Send a message"),
),
)
]
)
);
}
void _handleSubmitted(String text) {
_textController.clear();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("FriendlyChat")
),
body: _buildTextComposer(),
);
}
}
| import 'package:flutter/material.dart';
void main() {
runApp(new FriendlychatApp());
}
class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "FriendlyChat",
home: new ChatScreen(),
);
}
}
class ChatScreen extends StatefulWidget {
@override
State createState() => new ChatScreenState();
}
class ChatScreenState extends State<ChatScreen> {
final TextEditingController _textController = new TextEditingController();
Widget _buildTextComposer() {
return new Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
+ child: new Row( //new
+ children: <Widget>[ //new
+ new Flexible(
- child: new TextField(
+ child: new TextField(
? ++++++
- controller: _textController,
+ controller: _textController,
? ++++++
- onSubmitted: _handleSubmitted,
+ onSubmitted: _handleSubmitted,
? ++++++
- decoration: new InputDecoration.collapsed(
- hintText: "Send a message"),
+ decoration: new InputDecoration.collapsed(hintText: "Send a message"),
+ ),
+ )
+ ]
- ),
? -
+ )
);
}
void _handleSubmitted(String text) {
_textController.clear();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("FriendlyChat")
),
body: _buildTextComposer(),
);
}
} | 17 | 0.34 | 11 | 6 |
f37048cc92b44be393728e7be9e1ead1a13795ec | run-tests.sh | run-tests.sh |
ANTLR_JAR="antlr4.jar"
GRAMMAR="Solidity"
START_RULE="sourceUnit"
TEST_FILE="test.sol"
ERROR_PATTERN="(mismatched|extraneous)"
if [ ! -e "$ANTLR_JAR" ]; then
curl http://www.antlr.org/download/antlr-4.7-complete.jar -o "$ANTLR_JAR"
fi
java -jar $ANTLR_JAR Solidity.g4
javac -classpath $ANTLR_JAR $GRAMMAR*.java
java -classpath $ANTLR_JAR:. org.antlr.v4.gui.TestRig "$GRAMMAR" "$START_RULE" < "$TEST_FILE"
|
ANTLR_JAR="antlr4.jar"
GRAMMAR="Solidity"
START_RULE="sourceUnit"
TEST_FILE="test.sol"
ERROR_PATTERN="mismatched|extraneous"
if [ ! -e "$ANTLR_JAR" ]; then
curl http://www.antlr.org/download/antlr-4.7-complete.jar -o "$ANTLR_JAR"
fi
mkdir -p target/
java -jar $ANTLR_JAR $GRAMMAR.g4 -o src/
javac -classpath $ANTLR_JAR src/*.java -d target/
java -classpath $ANTLR_JAR:target/ org.antlr.v4.gui.TestRig "$GRAMMAR" "$START_RULE" < "$TEST_FILE" 2>&1 |
grep -qE "$ERROR_PATTERN" && echo "TESTS FAIL!" || echo "TESTS PASS!"
| Update test script to actually check for wrong tests | Update test script to actually check for wrong tests
| Shell | mit | solidityj/solidity-antlr4,federicobond/solidity-antlr4 | shell | ## Code Before:
ANTLR_JAR="antlr4.jar"
GRAMMAR="Solidity"
START_RULE="sourceUnit"
TEST_FILE="test.sol"
ERROR_PATTERN="(mismatched|extraneous)"
if [ ! -e "$ANTLR_JAR" ]; then
curl http://www.antlr.org/download/antlr-4.7-complete.jar -o "$ANTLR_JAR"
fi
java -jar $ANTLR_JAR Solidity.g4
javac -classpath $ANTLR_JAR $GRAMMAR*.java
java -classpath $ANTLR_JAR:. org.antlr.v4.gui.TestRig "$GRAMMAR" "$START_RULE" < "$TEST_FILE"
## Instruction:
Update test script to actually check for wrong tests
## Code After:
ANTLR_JAR="antlr4.jar"
GRAMMAR="Solidity"
START_RULE="sourceUnit"
TEST_FILE="test.sol"
ERROR_PATTERN="mismatched|extraneous"
if [ ! -e "$ANTLR_JAR" ]; then
curl http://www.antlr.org/download/antlr-4.7-complete.jar -o "$ANTLR_JAR"
fi
mkdir -p target/
java -jar $ANTLR_JAR $GRAMMAR.g4 -o src/
javac -classpath $ANTLR_JAR src/*.java -d target/
java -classpath $ANTLR_JAR:target/ org.antlr.v4.gui.TestRig "$GRAMMAR" "$START_RULE" < "$TEST_FILE" 2>&1 |
grep -qE "$ERROR_PATTERN" && echo "TESTS FAIL!" || echo "TESTS PASS!"
|
ANTLR_JAR="antlr4.jar"
GRAMMAR="Solidity"
START_RULE="sourceUnit"
TEST_FILE="test.sol"
- ERROR_PATTERN="(mismatched|extraneous)"
? - -
+ ERROR_PATTERN="mismatched|extraneous"
if [ ! -e "$ANTLR_JAR" ]; then
curl http://www.antlr.org/download/antlr-4.7-complete.jar -o "$ANTLR_JAR"
fi
+ mkdir -p target/
- java -jar $ANTLR_JAR Solidity.g4
- javac -classpath $ANTLR_JAR $GRAMMAR*.java
+ java -jar $ANTLR_JAR $GRAMMAR.g4 -o src/
+ javac -classpath $ANTLR_JAR src/*.java -d target/
+
- java -classpath $ANTLR_JAR:. org.antlr.v4.gui.TestRig "$GRAMMAR" "$START_RULE" < "$TEST_FILE"
? ^
+ java -classpath $ANTLR_JAR:target/ org.antlr.v4.gui.TestRig "$GRAMMAR" "$START_RULE" < "$TEST_FILE" 2>&1 |
? ^^^^^^^ +++++++
+ grep -qE "$ERROR_PATTERN" && echo "TESTS FAIL!" || echo "TESTS PASS!" | 11 | 0.6875 | 7 | 4 |
830e1a23559b82af37f52657484edd20641318c5 | teamsupport/__init__.py | teamsupport/__init__.py | from __future__ import absolute_import
from teamsupport.services import TeamSupportService
__author__ = 'Yola Engineers'
__email__ = 'engineers@yola.com'
__version__ = '0.1.0'
__all__ = (TeamSupportService,)
| from __future__ import absolute_import
from teamsupport.models import Action, Ticket
from teamsupport.services import TeamSupportService
__author__ = 'Yola Engineers'
__email__ = 'engineers@yola.com'
__version__ = '0.1.0'
__all__ = (Action, TeamSupportService, Ticket,)
| Add convenience imports for models | Add convenience imports for models
| Python | mit | zoidbergwill/teamsupport-python,yola/teamsupport-python | python | ## Code Before:
from __future__ import absolute_import
from teamsupport.services import TeamSupportService
__author__ = 'Yola Engineers'
__email__ = 'engineers@yola.com'
__version__ = '0.1.0'
__all__ = (TeamSupportService,)
## Instruction:
Add convenience imports for models
## Code After:
from __future__ import absolute_import
from teamsupport.models import Action, Ticket
from teamsupport.services import TeamSupportService
__author__ = 'Yola Engineers'
__email__ = 'engineers@yola.com'
__version__ = '0.1.0'
__all__ = (Action, TeamSupportService, Ticket,)
| from __future__ import absolute_import
+ from teamsupport.models import Action, Ticket
from teamsupport.services import TeamSupportService
__author__ = 'Yola Engineers'
__email__ = 'engineers@yola.com'
__version__ = '0.1.0'
- __all__ = (TeamSupportService,)
+ __all__ = (Action, TeamSupportService, Ticket,)
? ++++++++ ++++++++
| 3 | 0.333333 | 2 | 1 |
7ac793f16454594c0b753a112047da4f1ec315d2 | vendor/cookbooks/devbox/attributes/mysql_server.rb | vendor/cookbooks/devbox/attributes/mysql_server.rb | include_attribute "mysql::server"
| include_attribute "mysql::server"
override["mysql"]["server_debian_password"] = 'mysql'
override["mysql"]["server_root_password"] = 'mysql'
override["mysql"]["server_repl_password"] = 'mysql'
override["mysql"]["bind_address"] = '0.0.0.0'
| Fix mysql cookbook settings to include default passwords | Fix mysql cookbook settings to include default passwords
| Ruby | mpl-2.0 | dotless-de/devbox-bookshelf,dotless-de/devbox-bookshelf | ruby | ## Code Before:
include_attribute "mysql::server"
## Instruction:
Fix mysql cookbook settings to include default passwords
## Code After:
include_attribute "mysql::server"
override["mysql"]["server_debian_password"] = 'mysql'
override["mysql"]["server_root_password"] = 'mysql'
override["mysql"]["server_repl_password"] = 'mysql'
override["mysql"]["bind_address"] = '0.0.0.0'
| include_attribute "mysql::server"
+
+ override["mysql"]["server_debian_password"] = 'mysql'
+ override["mysql"]["server_root_password"] = 'mysql'
+ override["mysql"]["server_repl_password"] = 'mysql'
+ override["mysql"]["bind_address"] = '0.0.0.0' | 5 | 5 | 5 | 0 |
e0d2ce09475e3ae07e2740cbf0e342f68c1564a8 | gn/standalone/toolchain/linux_find_llvm.py | gn/standalone/toolchain/linux_find_llvm.py |
import os
import subprocess
import sys
def main():
devnull = open(os.devnull, 'w')
for clang in ('clang', 'clang-3.8', 'clang-3.5'):
if subprocess.call(['which', clang], stdout=devnull, stderr=devnull) != 0:
continue
res = subprocess.check_output([clang, '-print-search-dirs'])
for line in res.splitlines():
if not line.startswith('libraries:'):
continue
libs = line.split('=', 1)[1].split(':')
for lib in libs:
if '/clang/' not in lib or not os.path.isdir(lib + '/lib'):
continue
print os.path.abspath(lib)
print clang
print clang.replace('clang', 'clang++')
return 0
print 'Could not find the LLVM lib dir'
return 1
if __name__ == '__main__':
sys.exit(main())
|
import os
import subprocess
import sys
def main():
devnull = open(os.devnull, 'w')
for clang in ('clang', 'clang-3.8', 'clang-3.5'):
if subprocess.call(['which', clang], stdout=devnull, stderr=devnull) != 0:
continue
res = subprocess.check_output([clang, '-print-search-dirs']).decode("utf-8")
for line in res.splitlines():
if not line.startswith('libraries:'):
continue
libs = line.split('=', 1)[1].split(':')
for lib in libs:
if '/clang/' not in lib or not os.path.isdir(lib + '/lib'):
continue
print(os.path.abspath(lib))
print(clang)
print(clang.replace('clang', 'clang++'))
return 0
print('Could not find the LLVM lib dir')
return 1
if __name__ == '__main__':
sys.exit(main())
| Fix issue with finding llvm when using python3 | gn: Fix issue with finding llvm when using python3
With python3, subprocess output is a byte sequence. This needs to be
decoded to string so that the string functions work. Fix it so we can
find LLVM when building perfetto.
Also fix 'print' operator which is a function in python3.
Bug: 147789115
Signed-off-by: Joel Fernandes <89f39a38232ac523c7644e47b6ca6563177e40b4@google.com>
Change-Id: I4ab9b3c248d471e7ab5a27559152a1954ca43108
| Python | apache-2.0 | google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto | python | ## Code Before:
import os
import subprocess
import sys
def main():
devnull = open(os.devnull, 'w')
for clang in ('clang', 'clang-3.8', 'clang-3.5'):
if subprocess.call(['which', clang], stdout=devnull, stderr=devnull) != 0:
continue
res = subprocess.check_output([clang, '-print-search-dirs'])
for line in res.splitlines():
if not line.startswith('libraries:'):
continue
libs = line.split('=', 1)[1].split(':')
for lib in libs:
if '/clang/' not in lib or not os.path.isdir(lib + '/lib'):
continue
print os.path.abspath(lib)
print clang
print clang.replace('clang', 'clang++')
return 0
print 'Could not find the LLVM lib dir'
return 1
if __name__ == '__main__':
sys.exit(main())
## Instruction:
gn: Fix issue with finding llvm when using python3
With python3, subprocess output is a byte sequence. This needs to be
decoded to string so that the string functions work. Fix it so we can
find LLVM when building perfetto.
Also fix 'print' operator which is a function in python3.
Bug: 147789115
Signed-off-by: Joel Fernandes <89f39a38232ac523c7644e47b6ca6563177e40b4@google.com>
Change-Id: I4ab9b3c248d471e7ab5a27559152a1954ca43108
## Code After:
import os
import subprocess
import sys
def main():
devnull = open(os.devnull, 'w')
for clang in ('clang', 'clang-3.8', 'clang-3.5'):
if subprocess.call(['which', clang], stdout=devnull, stderr=devnull) != 0:
continue
res = subprocess.check_output([clang, '-print-search-dirs']).decode("utf-8")
for line in res.splitlines():
if not line.startswith('libraries:'):
continue
libs = line.split('=', 1)[1].split(':')
for lib in libs:
if '/clang/' not in lib or not os.path.isdir(lib + '/lib'):
continue
print(os.path.abspath(lib))
print(clang)
print(clang.replace('clang', 'clang++'))
return 0
print('Could not find the LLVM lib dir')
return 1
if __name__ == '__main__':
sys.exit(main())
|
import os
import subprocess
import sys
def main():
devnull = open(os.devnull, 'w')
for clang in ('clang', 'clang-3.8', 'clang-3.5'):
if subprocess.call(['which', clang], stdout=devnull, stderr=devnull) != 0:
continue
- res = subprocess.check_output([clang, '-print-search-dirs'])
+ res = subprocess.check_output([clang, '-print-search-dirs']).decode("utf-8")
? ++++++++++++++++
for line in res.splitlines():
if not line.startswith('libraries:'):
continue
libs = line.split('=', 1)[1].split(':')
for lib in libs:
if '/clang/' not in lib or not os.path.isdir(lib + '/lib'):
continue
- print os.path.abspath(lib)
? ^
+ print(os.path.abspath(lib))
? ^ +
- print clang
? ^
+ print(clang)
? ^ +
- print clang.replace('clang', 'clang++')
? ^
+ print(clang.replace('clang', 'clang++'))
? ^ +
return 0
- print 'Could not find the LLVM lib dir'
? ^
+ print('Could not find the LLVM lib dir')
? ^ +
return 1
if __name__ == '__main__':
sys.exit(main()) | 10 | 0.344828 | 5 | 5 |
35ff337b8c6d97f8386ab020a28ae906688f2c40 | lib/tumblr/theme.js | lib/tumblr/theme.js | var Request = require('./request')
, Browser = require('./browser');
var Theme = function (session, blog, html) {
this.session = session;
this.blog = blog;
this.html = html;
}
Theme.prototype = {
save: function () {
return this.session.create()
.with(this)
.then(this.get_customize_form)
.then(this.get_form_key)
.then(this.send_html)
.then(this.handle_response);
},
get_customize_form: function () {
var request = new Request('customize/' + this.blog, { method: 'GET' });
return request.send();
},
get_form_key: function (response) {
var browser = new Browser(response.body);
return browser.value_of_element_with_id('form_key');
},
send_html: function (form_key) {
var params = {
'user_form_key': form_key,
'custom_theme': this.html
};
var request = new Request('customize_api/blog/' + this.blog, { method: 'POST', body: JSON.stringify(params) });
return request.send();
},
handle_response: function (response) {
if (response.code !== 200) {
throw new Error('There was an error deploying your theme. '
+ 'Please try again later.');
}
return response;
}
}
module.exports = Theme;
| var Request = require('./request')
, Browser = require('./browser');
var Theme = function (session, blog, html) {
this.session = session;
this.blog = blog;
this.html = html;
}
Theme.prototype = {
save: function () {
return this.session.create()
.with(this)
.then(this.get_customize_form)
.then(this.get_form_key)
.then(this.send_html)
.then(this.handle_response);
},
get_customize_form: function () {
var request = new Request('customize/' + this.blog, { method: 'GET' });
return request.send();
},
get_form_key: function (response) {
var browser = new Browser(response.body);
return browser.value_of_element_with_id('form_key');
},
send_html: function (form_key) {
var params = {
'user_form_key': form_key,
'custom_theme': this.html
};
var request = new Request('customize_api/blog/' + this.blog, { method: 'POST', body: JSON.stringify(params) });
return request.send();
},
handle_response: function (response) {
if (response.statusCode !== 200) {
throw new Error('There was an error deploying your theme. '
+ 'Please try again later.');
}
return response;
}
}
module.exports = Theme;
| Repair check for correct status code on deploy. | Repair check for correct status code on deploy.
| JavaScript | mit | nporteschaikin/peak | javascript | ## Code Before:
var Request = require('./request')
, Browser = require('./browser');
var Theme = function (session, blog, html) {
this.session = session;
this.blog = blog;
this.html = html;
}
Theme.prototype = {
save: function () {
return this.session.create()
.with(this)
.then(this.get_customize_form)
.then(this.get_form_key)
.then(this.send_html)
.then(this.handle_response);
},
get_customize_form: function () {
var request = new Request('customize/' + this.blog, { method: 'GET' });
return request.send();
},
get_form_key: function (response) {
var browser = new Browser(response.body);
return browser.value_of_element_with_id('form_key');
},
send_html: function (form_key) {
var params = {
'user_form_key': form_key,
'custom_theme': this.html
};
var request = new Request('customize_api/blog/' + this.blog, { method: 'POST', body: JSON.stringify(params) });
return request.send();
},
handle_response: function (response) {
if (response.code !== 200) {
throw new Error('There was an error deploying your theme. '
+ 'Please try again later.');
}
return response;
}
}
module.exports = Theme;
## Instruction:
Repair check for correct status code on deploy.
## Code After:
var Request = require('./request')
, Browser = require('./browser');
var Theme = function (session, blog, html) {
this.session = session;
this.blog = blog;
this.html = html;
}
Theme.prototype = {
save: function () {
return this.session.create()
.with(this)
.then(this.get_customize_form)
.then(this.get_form_key)
.then(this.send_html)
.then(this.handle_response);
},
get_customize_form: function () {
var request = new Request('customize/' + this.blog, { method: 'GET' });
return request.send();
},
get_form_key: function (response) {
var browser = new Browser(response.body);
return browser.value_of_element_with_id('form_key');
},
send_html: function (form_key) {
var params = {
'user_form_key': form_key,
'custom_theme': this.html
};
var request = new Request('customize_api/blog/' + this.blog, { method: 'POST', body: JSON.stringify(params) });
return request.send();
},
handle_response: function (response) {
if (response.statusCode !== 200) {
throw new Error('There was an error deploying your theme. '
+ 'Please try again later.');
}
return response;
}
}
module.exports = Theme;
| var Request = require('./request')
, Browser = require('./browser');
var Theme = function (session, blog, html) {
this.session = session;
this.blog = blog;
this.html = html;
}
Theme.prototype = {
save: function () {
return this.session.create()
.with(this)
.then(this.get_customize_form)
.then(this.get_form_key)
.then(this.send_html)
.then(this.handle_response);
},
get_customize_form: function () {
var request = new Request('customize/' + this.blog, { method: 'GET' });
return request.send();
},
get_form_key: function (response) {
var browser = new Browser(response.body);
return browser.value_of_element_with_id('form_key');
},
send_html: function (form_key) {
var params = {
'user_form_key': form_key,
'custom_theme': this.html
};
var request = new Request('customize_api/blog/' + this.blog, { method: 'POST', body: JSON.stringify(params) });
return request.send();
},
handle_response: function (response) {
- if (response.code !== 200) {
? ^
+ if (response.statusCode !== 200) {
? ^^^^^^^
throw new Error('There was an error deploying your theme. '
+ 'Please try again later.');
}
-
+
return response;
}
}
module.exports = Theme; | 4 | 0.076923 | 2 | 2 |
13324f5832d39c01d61488ba2a34d9304400f4f1 | src/main/java/org/jboss/arquillian/moco/client/MocoArchiveAppender.java | src/main/java/org/jboss/arquillian/moco/client/MocoArchiveAppender.java | package org.jboss.arquillian.moco.client;
import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
import org.jboss.arquillian.moco.ReflectionHelper;
import org.jboss.arquillian.moco.container.MocoRemoteExtension;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
public class MocoArchiveAppender implements AuxiliaryArchiveAppender {
@Override
public Archive<?> createAuxiliaryArchive() {
return ShrinkWrap.create(JavaArchive.class, "arquillian-moco.jar")
.addClass(ReflectionHelper.class)
.addPackage(MocoRemoteExtension.class.getPackage())
.addAsServiceProvider(RemoteLoadableExtension.class, MocoRemoteExtension.class);
}
}
| package org.jboss.arquillian.moco.client;
import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
import org.jboss.arquillian.moco.ReflectionHelper;
import org.jboss.arquillian.moco.api.Moco;
import org.jboss.arquillian.moco.container.MocoRemoteExtension;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
public class MocoArchiveAppender implements AuxiliaryArchiveAppender {
@Override
public Archive<?> createAuxiliaryArchive() {
return ShrinkWrap.create(JavaArchive.class, "arquillian-moco.jar")
.addClass(ReflectionHelper.class)
.addPackage(Moco.class.getPackage())
.addPackage(MocoRemoteExtension.class.getPackage())
.addAsServiceProvider(RemoteLoadableExtension.class, MocoRemoteExtension.class);
}
}
| Add Arquillian Moco API to remote deployment | Add Arquillian Moco API to remote deployment
| Java | apache-2.0 | lordofthejars/arquillian-multiple-war,arquillian/arquillian-extension-moco | java | ## Code Before:
package org.jboss.arquillian.moco.client;
import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
import org.jboss.arquillian.moco.ReflectionHelper;
import org.jboss.arquillian.moco.container.MocoRemoteExtension;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
public class MocoArchiveAppender implements AuxiliaryArchiveAppender {
@Override
public Archive<?> createAuxiliaryArchive() {
return ShrinkWrap.create(JavaArchive.class, "arquillian-moco.jar")
.addClass(ReflectionHelper.class)
.addPackage(MocoRemoteExtension.class.getPackage())
.addAsServiceProvider(RemoteLoadableExtension.class, MocoRemoteExtension.class);
}
}
## Instruction:
Add Arquillian Moco API to remote deployment
## Code After:
package org.jboss.arquillian.moco.client;
import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
import org.jboss.arquillian.moco.ReflectionHelper;
import org.jboss.arquillian.moco.api.Moco;
import org.jboss.arquillian.moco.container.MocoRemoteExtension;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
public class MocoArchiveAppender implements AuxiliaryArchiveAppender {
@Override
public Archive<?> createAuxiliaryArchive() {
return ShrinkWrap.create(JavaArchive.class, "arquillian-moco.jar")
.addClass(ReflectionHelper.class)
.addPackage(Moco.class.getPackage())
.addPackage(MocoRemoteExtension.class.getPackage())
.addAsServiceProvider(RemoteLoadableExtension.class, MocoRemoteExtension.class);
}
}
| package org.jboss.arquillian.moco.client;
import org.jboss.arquillian.container.test.spi.RemoteLoadableExtension;
import org.jboss.arquillian.container.test.spi.client.deployment.AuxiliaryArchiveAppender;
import org.jboss.arquillian.moco.ReflectionHelper;
+ import org.jboss.arquillian.moco.api.Moco;
import org.jboss.arquillian.moco.container.MocoRemoteExtension;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
public class MocoArchiveAppender implements AuxiliaryArchiveAppender {
@Override
public Archive<?> createAuxiliaryArchive() {
return ShrinkWrap.create(JavaArchive.class, "arquillian-moco.jar")
.addClass(ReflectionHelper.class)
+ .addPackage(Moco.class.getPackage())
.addPackage(MocoRemoteExtension.class.getPackage())
.addAsServiceProvider(RemoteLoadableExtension.class, MocoRemoteExtension.class);
}
} | 2 | 0.086957 | 2 | 0 |
1ac4616a483c22510ca7c99f57b0777ef88096cc | stop_torq_demo.bat | stop_torq_demo.bat | REM see README.txt
REM SET UP ENVIRONMENT VARIABLES
set KDBCODE=%cd%\code
set KDBCONFIG=%cd%\config
set KDBLOG=%cd%\logs
set KDBHTML=%cd%\html
set KDBLIB=%cd%\lib
set KDBBASEPORT=6000
set PATH=%PATH%;%KDBLIB%\w32
REM to kill it, run this:
start "kill" q torq.q -load code/processes/kill.q -proctype kill -procname killtick -.servers.CONNECTIONS rdb wdb tickerplant chainedtp hdb gateway housekeeping monitor discovery sort reporter compression feed
| REM see README.txt
REM SET UP ENVIRONMENT VARIABLES
set TORQHOME=%cd%
set KDBCODE=%TORQHOME%\code
set KDBCONFIG=%TORQHOME%\config
set KDBLOG=%TORQHOME%\logs
set KDBHTML=%TORQHOME%\html
set KDBLIB=%TORQHOME%\lib
set KDBBASEPORT=6000
set KDBHDB=%TORQHOME%/hdb/database
REM App specific configuration directory
set KDBAPPCONFIG=%TORQHOME%\appconfig
set KDBBASEPORT=6000
set PATH=%PATH%;%KDBLIB%\w32
REM to kill it, run this:
start "kill" q torq.q -load code/processes/kill.q -proctype kill -procname killtick -.servers.CONNECTIONS rdb wdb tickerplant chainedtp hdb gateway housekeeping monitor discovery sort reporter compression feed
| Change environment variables in stop.bat file. | Change environment variables in stop.bat file.
| Batchfile | mit | AquaQAnalytics/TorQ-Finance-Starter-Pack | batchfile | ## Code Before:
REM see README.txt
REM SET UP ENVIRONMENT VARIABLES
set KDBCODE=%cd%\code
set KDBCONFIG=%cd%\config
set KDBLOG=%cd%\logs
set KDBHTML=%cd%\html
set KDBLIB=%cd%\lib
set KDBBASEPORT=6000
set PATH=%PATH%;%KDBLIB%\w32
REM to kill it, run this:
start "kill" q torq.q -load code/processes/kill.q -proctype kill -procname killtick -.servers.CONNECTIONS rdb wdb tickerplant chainedtp hdb gateway housekeeping monitor discovery sort reporter compression feed
## Instruction:
Change environment variables in stop.bat file.
## Code After:
REM see README.txt
REM SET UP ENVIRONMENT VARIABLES
set TORQHOME=%cd%
set KDBCODE=%TORQHOME%\code
set KDBCONFIG=%TORQHOME%\config
set KDBLOG=%TORQHOME%\logs
set KDBHTML=%TORQHOME%\html
set KDBLIB=%TORQHOME%\lib
set KDBBASEPORT=6000
set KDBHDB=%TORQHOME%/hdb/database
REM App specific configuration directory
set KDBAPPCONFIG=%TORQHOME%\appconfig
set KDBBASEPORT=6000
set PATH=%PATH%;%KDBLIB%\w32
REM to kill it, run this:
start "kill" q torq.q -load code/processes/kill.q -proctype kill -procname killtick -.servers.CONNECTIONS rdb wdb tickerplant chainedtp hdb gateway housekeeping monitor discovery sort reporter compression feed
| REM see README.txt
REM SET UP ENVIRONMENT VARIABLES
+ set TORQHOME=%cd%
- set KDBCODE=%cd%\code
? ^^
+ set KDBCODE=%TORQHOME%\code
? ^^^^^^^^
- set KDBCONFIG=%cd%\config
? ^^
+ set KDBCONFIG=%TORQHOME%\config
? ^^^^^^^^
- set KDBLOG=%cd%\logs
? ^^
+ set KDBLOG=%TORQHOME%\logs
? ^^^^^^^^
- set KDBHTML=%cd%\html
? ^^
+ set KDBHTML=%TORQHOME%\html
? ^^^^^^^^
- set KDBLIB=%cd%\lib
? ^^
+ set KDBLIB=%TORQHOME%\lib
? ^^^^^^^^
+ set KDBBASEPORT=6000
+ set KDBHDB=%TORQHOME%/hdb/database
+
+ REM App specific configuration directory
+ set KDBAPPCONFIG=%TORQHOME%\appconfig
set KDBBASEPORT=6000
set PATH=%PATH%;%KDBLIB%\w32
REM to kill it, run this:
start "kill" q torq.q -load code/processes/kill.q -proctype kill -procname killtick -.servers.CONNECTIONS rdb wdb tickerplant chainedtp hdb gateway housekeeping monitor discovery sort reporter compression feed | 16 | 1.066667 | 11 | 5 |
3cc120b985c7134fd6c3d2a40bab85711b2da4ee | Runtime/Rendering/LightingPass.h | Runtime/Rendering/LightingPass.h |
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
Vector3 LightRadiance;
Vector3 LightDirection;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
} |
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
Vector3 LightDirection;
Vector3 LightRadiance;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
} | Reorder light params buffer struct | Reorder light params buffer struct
| C | mit | HoRangDev/MileEngine,HoRangDev/MileEngine | c | ## Code Before:
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
Vector3 LightRadiance;
Vector3 LightDirection;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
}
## Instruction:
Reorder light params buffer struct
## Code After:
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
Vector3 LightDirection;
Vector3 LightRadiance;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
} |
namespace Mile
{
class GBuffer;
class BlendState;
class MEAPI LightingPass : public RenderingPass
{
DEFINE_CONSTANT_BUFFER(CameraParamsConstantBuffer)
{
Vector3 CameraPos;
};
DEFINE_CONSTANT_BUFFER(LightParamsConstantBuffer)
{
Vector3 LightPos;
+ Vector3 LightDirection;
Vector3 LightRadiance;
- Vector3 LightDirection;
UINT32 LightType;
};
public:
LightingPass(class RendererDX11* renderer);
~LightingPass();
virtual bool Init(const String& shaderPath) override;
virtual bool Bind(ID3D11DeviceContext& deviceContext) override;
virtual bool Unbind(ID3D11DeviceContext& deviceContext) override;
void SetGBuffer(GBuffer* gBuffer);
void UpdateCameraParamsBuffer(ID3D11DeviceContext& deviceContext, CameraParamsConstantBuffer buffer);
void UpdateLightParamsBuffer(ID3D11DeviceContext& deviceContext, LightParamsConstantBuffer buffer);
private:
GBuffer* m_gBuffer;
CBufferPtr m_cameraParamsBuffer;
CBufferPtr m_lightParamsBuffer;
BlendState* m_additiveBlendState;
};
} | 2 | 0.05 | 1 | 1 |
240e8eea6bdcf07b8816df1142b254cca13b3205 | themes/base/css/dialog.css | themes/base/css/dialog.css | .aui-dialog {
}
.aui-dialog .aui-icon-loading {
margin: 0 auto;
}
.aui-dialog .aui-widget-hd {
color: #333333;
cursor: move;
font-size: 15px;
font-weight: bold;
padding: 8px 10px;
}
.aui-dialog .aui-widget-bd {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 10px;
background: #fff;
}
.aui-dialog .aui-widget-ft {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 5px 10px;
text-align: right;
background: #fff;
}
.aui-dialog-close {
cursor: pointer;
position: absolute;
right: 0;
top: 0;
margin: 5px;
}
.aui-dialog-hidden {
visibility: hidden;
} | .aui-dialog {
}
.aui-dialog .aui-icon-loading {
margin: 0 auto;
}
.aui-dialog .aui-widget-hd {
color: #333333;
cursor: move;
font-size: 15px;
font-weight: bold;
padding: 8px 10px;
}
.aui-dialog .aui-widget-bd {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 10px;
background: #fff;
overflow: auto;
}
.aui-dialog .aui-widget-ft {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 5px 10px;
text-align: right;
background: #fff;
}
.aui-dialog-close {
cursor: pointer;
position: absolute;
right: 0;
top: 0;
margin: 5px;
}
.aui-dialog-hidden {
visibility: hidden;
} | Fix Dialog CSS overflow auto to aui-wdiget-bd | Fix Dialog CSS overflow auto to aui-wdiget-bd
git-svn-id: eaac6977d0b6fa3343c402860739874625caf655@36446 05bdf26c-840f-0410-9ced-eb539d925f36
| CSS | bsd-3-clause | pei-jung/alloy-ui,zsagia/alloy-ui,mairatma/alloy-ui,jonathanmccann/alloy-ui,mairatma/alloy-ui,zsagia/alloy-ui,Preston-Crary/alloy-ui,fernandosouza/alloy-ui,inacionery/alloy-ui,4talesa/alloy-ui,ericyanLr/alloy-ui,4talesa/alloy-ui,peterborkuti/alloy-ui,antoniopol06/alloy-ui,seedtigo/alloy-ui,ipeychev/alloy-ui,pei-jung/alloy-ui,BryanEngler/alloy-ui,dsanz/alloy-ui,ambrinchaudhary/alloy-ui,zenorocha/alloy-ui,zenorocha/alloy-ui,brianchandotcom/alloy-ui,eduardolundgren/alloy-ui,thiago-rocha/alloy-ui,ampratt/alloy-ui,ampratt/alloy-ui,modulexcite/alloy-ui,Preston-Crary/alloy-ui,zsigmondrab/alloy-ui,dsanz/alloy-ui,ambrinchaudhary/alloy-ui,zxdgoal/alloy-ui,mthadley/alloy-ui,modulexcite/alloy-ui,jonathanmccann/alloy-ui,zxdgoal/alloy-ui,westonhancock/alloy-ui,ericyanLr/alloy-ui,samanzanedo/alloy-ui,henvic/alloy-ui,mthadley/alloy-ui,bryceosterhaus/alloy-ui,inacionery/alloy-ui,BryanEngler/alloy-ui,ipeychev/alloy-ui,fernandosouza/alloy-ui,crimago/alloy-ui,crimago/alloy-ui,dsanz/alloy-ui,thiago-rocha/alloy-ui,seedtigo/alloy-ui,drewbrokke/alloy-ui,ericchin/alloy-ui,dsanz/alloy-ui,Khamull/alloy-ui,ericchin/alloy-ui,antoniopol06/alloy-ui,zsigmondrab/alloy-ui,henvic/alloy-ui,drewbrokke/alloy-ui,bryceosterhaus/alloy-ui,westonhancock/alloy-ui,Khamull/alloy-ui,peterborkuti/alloy-ui | css | ## Code Before:
.aui-dialog {
}
.aui-dialog .aui-icon-loading {
margin: 0 auto;
}
.aui-dialog .aui-widget-hd {
color: #333333;
cursor: move;
font-size: 15px;
font-weight: bold;
padding: 8px 10px;
}
.aui-dialog .aui-widget-bd {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 10px;
background: #fff;
}
.aui-dialog .aui-widget-ft {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 5px 10px;
text-align: right;
background: #fff;
}
.aui-dialog-close {
cursor: pointer;
position: absolute;
right: 0;
top: 0;
margin: 5px;
}
.aui-dialog-hidden {
visibility: hidden;
}
## Instruction:
Fix Dialog CSS overflow auto to aui-wdiget-bd
git-svn-id: eaac6977d0b6fa3343c402860739874625caf655@36446 05bdf26c-840f-0410-9ced-eb539d925f36
## Code After:
.aui-dialog {
}
.aui-dialog .aui-icon-loading {
margin: 0 auto;
}
.aui-dialog .aui-widget-hd {
color: #333333;
cursor: move;
font-size: 15px;
font-weight: bold;
padding: 8px 10px;
}
.aui-dialog .aui-widget-bd {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 10px;
background: #fff;
overflow: auto;
}
.aui-dialog .aui-widget-ft {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 5px 10px;
text-align: right;
background: #fff;
}
.aui-dialog-close {
cursor: pointer;
position: absolute;
right: 0;
top: 0;
margin: 5px;
}
.aui-dialog-hidden {
visibility: hidden;
} | .aui-dialog {
}
.aui-dialog .aui-icon-loading {
margin: 0 auto;
}
.aui-dialog .aui-widget-hd {
color: #333333;
cursor: move;
font-size: 15px;
font-weight: bold;
padding: 8px 10px;
}
.aui-dialog .aui-widget-bd {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 10px;
background: #fff;
+ overflow: auto;
}
.aui-dialog .aui-widget-ft {
border: 1px solid #ccc;
border-color: transparent #999 #999 #bbb;
padding: 5px 10px;
text-align: right;
background: #fff;
}
.aui-dialog-close {
cursor: pointer;
position: absolute;
right: 0;
top: 0;
margin: 5px;
}
.aui-dialog-hidden {
visibility: hidden;
} | 1 | 0.02439 | 1 | 0 |
90c7946059c88766518b5717b4db94b8d7c72ecd | src/ui/styles/_general.scss | src/ui/styles/_general.scss | /*
|--------------------------------------------------------------------------
| General
|--------------------------------------------------------------------------
*/
html {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
}
body {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
font-family: OpenSans;
border: 1px solid rgb(182, 182, 182);
}
* {
-webkit-user-drag: none;
}
button {
outline: none;
}
::-webkit-scrollbar {
width: 5px;
background-color: #DDD;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .25);
}
input[type=range] {
-webkit-appearance: none;
outline: none;
cursor: pointer;
&::-webkit-slider-thumb {
-webkit-appearance: none;
height: 12px;
width: 12px;
border-radius: 6px;
background-color: $generic-white;
border: 1px solid #AAA;
position: relative;
top: -5px;
}
&::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #BBB;
border: solid 1px #999;
border-radius: 5px;
height: 5px;
}
}
| /*
|--------------------------------------------------------------------------
| General
|--------------------------------------------------------------------------
*/
html {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
}
body {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, OpenSans;
border: 1px solid rgb(182, 182, 182);
}
* {
-webkit-user-drag: none;
}
button {
outline: none;
}
::-webkit-scrollbar {
width: 5px;
background-color: #DDD;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .25);
}
input[type=range] {
-webkit-appearance: none;
outline: none;
cursor: pointer;
&::-webkit-slider-thumb {
-webkit-appearance: none;
height: 12px;
width: 12px;
border-radius: 6px;
background-color: $generic-white;
border: 1px solid #AAA;
position: relative;
top: -5px;
}
&::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #BBB;
border: solid 1px #999;
border-radius: 5px;
height: 5px;
}
}
| Use system fonts for macOS | Use system fonts for macOS
| SCSS | mit | KeitIG/museeks,KeitIG/museeks,KeitIG/museeks | scss | ## Code Before:
/*
|--------------------------------------------------------------------------
| General
|--------------------------------------------------------------------------
*/
html {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
}
body {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
font-family: OpenSans;
border: 1px solid rgb(182, 182, 182);
}
* {
-webkit-user-drag: none;
}
button {
outline: none;
}
::-webkit-scrollbar {
width: 5px;
background-color: #DDD;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .25);
}
input[type=range] {
-webkit-appearance: none;
outline: none;
cursor: pointer;
&::-webkit-slider-thumb {
-webkit-appearance: none;
height: 12px;
width: 12px;
border-radius: 6px;
background-color: $generic-white;
border: 1px solid #AAA;
position: relative;
top: -5px;
}
&::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #BBB;
border: solid 1px #999;
border-radius: 5px;
height: 5px;
}
}
## Instruction:
Use system fonts for macOS
## Code After:
/*
|--------------------------------------------------------------------------
| General
|--------------------------------------------------------------------------
*/
html {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
}
body {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, OpenSans;
border: 1px solid rgb(182, 182, 182);
}
* {
-webkit-user-drag: none;
}
button {
outline: none;
}
::-webkit-scrollbar {
width: 5px;
background-color: #DDD;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .25);
}
input[type=range] {
-webkit-appearance: none;
outline: none;
cursor: pointer;
&::-webkit-slider-thumb {
-webkit-appearance: none;
height: 12px;
width: 12px;
border-radius: 6px;
background-color: $generic-white;
border: 1px solid #AAA;
position: relative;
top: -5px;
}
&::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #BBB;
border: solid 1px #999;
border-radius: 5px;
height: 5px;
}
}
| /*
|--------------------------------------------------------------------------
| General
|--------------------------------------------------------------------------
*/
html {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
}
body {
font-size: 12px;
user-select: none;
-webkit-user-select: none;
height: 100%;
overflow: hidden;
- font-family: OpenSans;
+ font-family: -apple-system, BlinkMacSystemFont, OpenSans;
border: 1px solid rgb(182, 182, 182);
}
* {
-webkit-user-drag: none;
}
button {
outline: none;
}
::-webkit-scrollbar {
width: 5px;
background-color: #DDD;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, .25);
}
input[type=range] {
-webkit-appearance: none;
outline: none;
cursor: pointer;
&::-webkit-slider-thumb {
-webkit-appearance: none;
height: 12px;
width: 12px;
border-radius: 6px;
background-color: $generic-white;
border: 1px solid #AAA;
position: relative;
top: -5px;
}
&::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #BBB;
border: solid 1px #999;
border-radius: 5px;
height: 5px;
}
} | 2 | 0.030769 | 1 | 1 |
b25a78818503cbd02c39da7a0dd9abb3f2e3cb76 | app/actions/LoginActions.js | app/actions/LoginActions.js | /**
* LoginActions
* Actions for helping with login
*/
import { browserHistory } from 'react-router';
import Parse from 'parse';
import AuthService from '../middleware/api/Authentication';
export const LOGIN_REQUEST = "LOGIN_REQUEST";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const LOGIN_FAIL = "LOGIN_FAIL";
export const LOGOUT_REQUEST = "LOGOUT_REQUEST";
export const SIGNUP_USER = "SIGNUP_USER";
function requestLogin (username) {
return {
type: LOGIN_REQUEST,
username,
isLoggedIn: true
}
}
function loginSuccess (username) {
return {
type: LOGIN_SUCCESS,
username,
isLoggedIn: true
}
}
function logoutUser (username) {
return {
type: LOGOUT_REQUEST,
username,
isLoggedIn: false
}
}
function signupUser (username) {
return {
type: SIGNUP_USER,
username,
isLoggedIn: true
}
}
export function loginRequest (username, password) {
AuthService.login(username, password)
return requestLogin(username)
}
export function success (username) {
browserHistory.push('/home')
return loginSuccess(username)
}
export function userLogout () {
let username = Parse.User.current()
browserHistory.push('/login')
return logoutUser(username)
}
export function signup (username, password) {
AuthService.signup (username, password)
browserHistory.push('/home')
return signupUser(username)
}
| /**
* LoginActions
* Actions for helping with login
*/
import { browserHistory } from 'react-router';
import Parse from 'parse';
import AuthService from '../middleware/api/Authentication';
export const LOGIN_REQUEST = "LOGIN_REQUEST";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const LOGIN_FAIL = "LOGIN_FAIL";
export const LOGOUT_REQUEST = "LOGOUT_REQUEST";
export const SIGNUP_USER = "SIGNUP_USER";
function requestLogin (username) {
return {
type: LOGIN_REQUEST,
username,
isLoggedIn: true
}
}
function loginSuccess (username) {
return {
type: LOGIN_SUCCESS,
username,
isLoggedIn: true
}
}
function logoutUser (username) {
return {
type: LOGOUT_REQUEST,
username,
isLoggedIn: false
}
}
function signupUser (username) {
return {
type: SIGNUP_USER,
username,
isLoggedIn: true
}
}
export function loginRequest (username, password) {
AuthService.login(username, password)
return requestLogin(username)
}
export function success (username) {
browserHistory.push('/home')
return loginSuccess(username)
}
export function userLogout () {
let username = Parse.User.current()
AuthService.logout()
browserHistory.push('/login')
return logoutUser(username)
}
export function signup (username, password) {
AuthService.signup (username, password)
browserHistory.push('/home')
return signupUser(username)
}
| Add call to AuthService for logout | Add call to AuthService for logout
| JavaScript | mit | bspride/ModernCookbook,bspride/ModernCookbook,bspride/ModernCookbook | javascript | ## Code Before:
/**
* LoginActions
* Actions for helping with login
*/
import { browserHistory } from 'react-router';
import Parse from 'parse';
import AuthService from '../middleware/api/Authentication';
export const LOGIN_REQUEST = "LOGIN_REQUEST";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const LOGIN_FAIL = "LOGIN_FAIL";
export const LOGOUT_REQUEST = "LOGOUT_REQUEST";
export const SIGNUP_USER = "SIGNUP_USER";
function requestLogin (username) {
return {
type: LOGIN_REQUEST,
username,
isLoggedIn: true
}
}
function loginSuccess (username) {
return {
type: LOGIN_SUCCESS,
username,
isLoggedIn: true
}
}
function logoutUser (username) {
return {
type: LOGOUT_REQUEST,
username,
isLoggedIn: false
}
}
function signupUser (username) {
return {
type: SIGNUP_USER,
username,
isLoggedIn: true
}
}
export function loginRequest (username, password) {
AuthService.login(username, password)
return requestLogin(username)
}
export function success (username) {
browserHistory.push('/home')
return loginSuccess(username)
}
export function userLogout () {
let username = Parse.User.current()
browserHistory.push('/login')
return logoutUser(username)
}
export function signup (username, password) {
AuthService.signup (username, password)
browserHistory.push('/home')
return signupUser(username)
}
## Instruction:
Add call to AuthService for logout
## Code After:
/**
* LoginActions
* Actions for helping with login
*/
import { browserHistory } from 'react-router';
import Parse from 'parse';
import AuthService from '../middleware/api/Authentication';
export const LOGIN_REQUEST = "LOGIN_REQUEST";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const LOGIN_FAIL = "LOGIN_FAIL";
export const LOGOUT_REQUEST = "LOGOUT_REQUEST";
export const SIGNUP_USER = "SIGNUP_USER";
function requestLogin (username) {
return {
type: LOGIN_REQUEST,
username,
isLoggedIn: true
}
}
function loginSuccess (username) {
return {
type: LOGIN_SUCCESS,
username,
isLoggedIn: true
}
}
function logoutUser (username) {
return {
type: LOGOUT_REQUEST,
username,
isLoggedIn: false
}
}
function signupUser (username) {
return {
type: SIGNUP_USER,
username,
isLoggedIn: true
}
}
export function loginRequest (username, password) {
AuthService.login(username, password)
return requestLogin(username)
}
export function success (username) {
browserHistory.push('/home')
return loginSuccess(username)
}
export function userLogout () {
let username = Parse.User.current()
AuthService.logout()
browserHistory.push('/login')
return logoutUser(username)
}
export function signup (username, password) {
AuthService.signup (username, password)
browserHistory.push('/home')
return signupUser(username)
}
| /**
* LoginActions
* Actions for helping with login
*/
import { browserHistory } from 'react-router';
import Parse from 'parse';
import AuthService from '../middleware/api/Authentication';
export const LOGIN_REQUEST = "LOGIN_REQUEST";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const LOGIN_FAIL = "LOGIN_FAIL";
export const LOGOUT_REQUEST = "LOGOUT_REQUEST";
export const SIGNUP_USER = "SIGNUP_USER";
function requestLogin (username) {
return {
type: LOGIN_REQUEST,
username,
isLoggedIn: true
}
}
function loginSuccess (username) {
return {
type: LOGIN_SUCCESS,
username,
isLoggedIn: true
}
}
function logoutUser (username) {
return {
type: LOGOUT_REQUEST,
username,
isLoggedIn: false
}
}
function signupUser (username) {
return {
type: SIGNUP_USER,
username,
isLoggedIn: true
}
}
export function loginRequest (username, password) {
AuthService.login(username, password)
return requestLogin(username)
}
export function success (username) {
browserHistory.push('/home')
return loginSuccess(username)
}
export function userLogout () {
let username = Parse.User.current()
+ AuthService.logout()
browserHistory.push('/login')
return logoutUser(username)
}
export function signup (username, password) {
AuthService.signup (username, password)
browserHistory.push('/home')
return signupUser(username)
} | 1 | 0.013514 | 1 | 0 |
d03e28f879db716c7c21c9cac010c775495cece4 | engine/Routing/Urls/class_urlBuilder.php | engine/Routing/Urls/class_urlBuilder.php | <?php
namespace Naterweb\Routing\Urls;
use Naterweb\Engine\Configuration;
class UrlBuilder {
private $urlParams;
public function __construct($params)
{
$this->urlParams = $params;
}
public function build()
{
$friendlyUrl = Configuration::get_option('friendly_urls');
$domain = Configuration::get_option('site_domain');
$params = array();
$params[] = $domain;
$formatString = "%s/";
$formatString .= $friendlyUrl ? '' : '?url=';
foreach ($this->urlParams as $key => $value) {
$formatString .= '%s/%s/';
$params[] = urlencode($key);
$params[] = urlencode($value);
}
return vsprintf($formatString, $params);
}
}
| <?php
namespace Naterweb\Routing\Urls;
use Naterweb\Engine\Configuration;
class UrlBuilder {
private $urlParams;
public function __construct($params)
{
$this->urlParams = $params;
}
public function build()
{
$friendlyUrl = Configuration::get_option('friendly_urls');
$domain = Configuration::get_option('site_domain');
$params = array();
$params[] = $domain;
$formatString = "%s";
$formatString .= $friendlyUrl ? '' : '?url=';
$firstPass = True;
foreach ($this->urlParams as $key => $value) {
$formatString .= $firstPass ? '%s/%s' : '/%s/%s';
$params[] = urlencode($key);
$params[] = urlencode($value);
$firstPass = False;
}
return vsprintf($formatString, $params);
}
}
| Fix issue with separating variables | Fix issue with separating variables
| PHP | bsd-3-clause | thenaterhood/thenaterweb | php | ## Code Before:
<?php
namespace Naterweb\Routing\Urls;
use Naterweb\Engine\Configuration;
class UrlBuilder {
private $urlParams;
public function __construct($params)
{
$this->urlParams = $params;
}
public function build()
{
$friendlyUrl = Configuration::get_option('friendly_urls');
$domain = Configuration::get_option('site_domain');
$params = array();
$params[] = $domain;
$formatString = "%s/";
$formatString .= $friendlyUrl ? '' : '?url=';
foreach ($this->urlParams as $key => $value) {
$formatString .= '%s/%s/';
$params[] = urlencode($key);
$params[] = urlencode($value);
}
return vsprintf($formatString, $params);
}
}
## Instruction:
Fix issue with separating variables
## Code After:
<?php
namespace Naterweb\Routing\Urls;
use Naterweb\Engine\Configuration;
class UrlBuilder {
private $urlParams;
public function __construct($params)
{
$this->urlParams = $params;
}
public function build()
{
$friendlyUrl = Configuration::get_option('friendly_urls');
$domain = Configuration::get_option('site_domain');
$params = array();
$params[] = $domain;
$formatString = "%s";
$formatString .= $friendlyUrl ? '' : '?url=';
$firstPass = True;
foreach ($this->urlParams as $key => $value) {
$formatString .= $firstPass ? '%s/%s' : '/%s/%s';
$params[] = urlencode($key);
$params[] = urlencode($value);
$firstPass = False;
}
return vsprintf($formatString, $params);
}
}
| <?php
namespace Naterweb\Routing\Urls;
use Naterweb\Engine\Configuration;
class UrlBuilder {
private $urlParams;
public function __construct($params)
{
$this->urlParams = $params;
}
public function build()
{
$friendlyUrl = Configuration::get_option('friendly_urls');
$domain = Configuration::get_option('site_domain');
$params = array();
$params[] = $domain;
- $formatString = "%s/";
? -
+ $formatString = "%s";
$formatString .= $friendlyUrl ? '' : '?url=';
-
+ $firstPass = True;
foreach ($this->urlParams as $key => $value) {
- $formatString .= '%s/%s/';
+ $formatString .= $firstPass ? '%s/%s' : '/%s/%s';
$params[] = urlencode($key);
$params[] = urlencode($value);
+ $firstPass = False;
}
return vsprintf($formatString, $params);
}
} | 7 | 0.189189 | 4 | 3 |
7bf1151a2adc1d6815d39cd09e173265a8d711ff | main/createWindow.js | main/createWindow.js | import { BrowserWindow, globalShortcut } from 'electron';
import {
INPUT_HEIGHT,
WINDOW_WIDTH,
RESULT_HEIGHT,
MIN_VISIBLE_RESULTS
} from './constants/ui';
import buildMenu from './createWindow/buildMenu';
export default (url) => {
const mainWindow = new BrowserWindow({
alwaysOnTop: true,
show: false,
width: WINDOW_WIDTH,
minWidth: WINDOW_WIDTH,
maxWidth: WINDOW_WIDTH,
height: INPUT_HEIGHT,
minHeight: INPUT_HEIGHT + RESULT_HEIGHT * MIN_VISIBLE_RESULTS,
frame: false,
resizable: false
});
mainWindow.loadURL(url);
if (process.env.NODE_ENV !== 'development') {
// Hide window on blur in production move
// In development we usually use developer tools
mainWindow.on('blur', () => mainWindow.hide());
}
// const HOTKEY = 'Cmd+Alt+Shift+Control+Space';
const HOTKEY = 'Control+Space';
globalShortcut.register(HOTKEY, () => {
mainWindow.show();
mainWindow.focus();
});
buildMenu(mainWindow);
return mainWindow;
}
| import { BrowserWindow, globalShortcut } from 'electron';
import {
INPUT_HEIGHT,
WINDOW_WIDTH,
RESULT_HEIGHT,
MIN_VISIBLE_RESULTS
} from './constants/ui';
import buildMenu from './createWindow/buildMenu';
export default (url) => {
const mainWindow = new BrowserWindow({
alwaysOnTop: true,
show: false,
width: WINDOW_WIDTH,
minWidth: WINDOW_WIDTH,
maxWidth: WINDOW_WIDTH,
height: INPUT_HEIGHT,
minHeight: INPUT_HEIGHT + RESULT_HEIGHT * MIN_VISIBLE_RESULTS,
frame: false,
resizable: false
});
mainWindow.loadURL(url);
if (process.env.NODE_ENV !== 'development') {
// Hide window on blur in production move
// In development we usually use developer tools
mainWindow.on('blur', () => mainWindow.hide());
}
// const HOTKEY = 'Cmd+Alt+Shift+Control+Space';
const HOTKEY = 'Control+Space';
globalShortcut.register(HOTKEY, () => {
if (mainWindow.isVisible()) {
mainWindow.hide();
} else {
mainWindow.show();
mainWindow.focus();
}
});
buildMenu(mainWindow);
return mainWindow;
}
| Hide window by hotkey if it is visible | Hide window by hotkey if it is visible
| JavaScript | mit | KELiON/cerebro,KELiON/cerebro | javascript | ## Code Before:
import { BrowserWindow, globalShortcut } from 'electron';
import {
INPUT_HEIGHT,
WINDOW_WIDTH,
RESULT_HEIGHT,
MIN_VISIBLE_RESULTS
} from './constants/ui';
import buildMenu from './createWindow/buildMenu';
export default (url) => {
const mainWindow = new BrowserWindow({
alwaysOnTop: true,
show: false,
width: WINDOW_WIDTH,
minWidth: WINDOW_WIDTH,
maxWidth: WINDOW_WIDTH,
height: INPUT_HEIGHT,
minHeight: INPUT_HEIGHT + RESULT_HEIGHT * MIN_VISIBLE_RESULTS,
frame: false,
resizable: false
});
mainWindow.loadURL(url);
if (process.env.NODE_ENV !== 'development') {
// Hide window on blur in production move
// In development we usually use developer tools
mainWindow.on('blur', () => mainWindow.hide());
}
// const HOTKEY = 'Cmd+Alt+Shift+Control+Space';
const HOTKEY = 'Control+Space';
globalShortcut.register(HOTKEY, () => {
mainWindow.show();
mainWindow.focus();
});
buildMenu(mainWindow);
return mainWindow;
}
## Instruction:
Hide window by hotkey if it is visible
## Code After:
import { BrowserWindow, globalShortcut } from 'electron';
import {
INPUT_HEIGHT,
WINDOW_WIDTH,
RESULT_HEIGHT,
MIN_VISIBLE_RESULTS
} from './constants/ui';
import buildMenu from './createWindow/buildMenu';
export default (url) => {
const mainWindow = new BrowserWindow({
alwaysOnTop: true,
show: false,
width: WINDOW_WIDTH,
minWidth: WINDOW_WIDTH,
maxWidth: WINDOW_WIDTH,
height: INPUT_HEIGHT,
minHeight: INPUT_HEIGHT + RESULT_HEIGHT * MIN_VISIBLE_RESULTS,
frame: false,
resizable: false
});
mainWindow.loadURL(url);
if (process.env.NODE_ENV !== 'development') {
// Hide window on blur in production move
// In development we usually use developer tools
mainWindow.on('blur', () => mainWindow.hide());
}
// const HOTKEY = 'Cmd+Alt+Shift+Control+Space';
const HOTKEY = 'Control+Space';
globalShortcut.register(HOTKEY, () => {
if (mainWindow.isVisible()) {
mainWindow.hide();
} else {
mainWindow.show();
mainWindow.focus();
}
});
buildMenu(mainWindow);
return mainWindow;
}
| import { BrowserWindow, globalShortcut } from 'electron';
import {
INPUT_HEIGHT,
WINDOW_WIDTH,
RESULT_HEIGHT,
MIN_VISIBLE_RESULTS
} from './constants/ui';
import buildMenu from './createWindow/buildMenu';
export default (url) => {
const mainWindow = new BrowserWindow({
alwaysOnTop: true,
show: false,
width: WINDOW_WIDTH,
minWidth: WINDOW_WIDTH,
maxWidth: WINDOW_WIDTH,
height: INPUT_HEIGHT,
minHeight: INPUT_HEIGHT + RESULT_HEIGHT * MIN_VISIBLE_RESULTS,
frame: false,
resizable: false
});
mainWindow.loadURL(url);
if (process.env.NODE_ENV !== 'development') {
// Hide window on blur in production move
// In development we usually use developer tools
mainWindow.on('blur', () => mainWindow.hide());
}
// const HOTKEY = 'Cmd+Alt+Shift+Control+Space';
const HOTKEY = 'Control+Space';
globalShortcut.register(HOTKEY, () => {
+ if (mainWindow.isVisible()) {
+ mainWindow.hide();
+ } else {
- mainWindow.show();
+ mainWindow.show();
? ++
- mainWindow.focus();
+ mainWindow.focus();
? ++
+ }
});
buildMenu(mainWindow);
return mainWindow;
} | 8 | 0.190476 | 6 | 2 |
e875979f84e597660f368da91e11cced3fc512e2 | README.md | README.md |
Simple realtime note application.
Notes can be created, destroyed and their size and position can be changed by
dragging with mouse.
State is stored into database after updates from browsers stop for a while.
Requires Elixir, PostgreSQL and NodeJS to be installed for building and running
the application.
To build frontend (/priv/static/js/bundle.js):
1. cd priv/frontend
2. npm install
3. npm run build
To start server:
1. Install dependencies with `mix deps.get`
2. Create and migrate your database with `mix ecto.create && mix ecto.migrate`
3. Start Phoenix endpoint with `mix phoenix.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
|
Simple realtime note application.
Notes can be created, destroyed and their size and position can be changed by
dragging with mouse.
State is stored into database after updates from browsers stop for a while.
Requires Elixir, PostgreSQL and NodeJS to be installed for building and running
the application.
To build frontend (/priv/static/js/bundle.js):
1. cd priv/frontend
2. npm install
3. npm run build
To start server:
1. Install dependencies with `mix deps.get`
2. Create and migrate your database with `mix ecto.create && mix ecto.migrate`
3. Start Phoenix endpoint with `mix phoenix.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
# Changing note contents via HTTP API
1. Create a new note in the UI (or use an existing note for this)
2. Click the note for entering editing mode
3. Then click the ID field in note's left upper corner
4. A prompt will ask for a new API ID. The API ID is a string.
5. Note will change to orange color for indicating that it can be updated via API
6. PUT and PATCH requests to /api/notes/:api_id with JSON payload changes the contents of a note
Example:
curl -H "Content-Type: application/json" -X PUT -d '{"contents": "eggs"}' "http://localhost:4000/api/notes/ham"
This request updates note's which API ID is "ham" contents to "eggs".
| Update readme with HTTP API usage instructions | Update readme with HTTP API usage instructions
| Markdown | mit | losch/phoestit,losch/phoestit | markdown | ## Code Before:
Simple realtime note application.
Notes can be created, destroyed and their size and position can be changed by
dragging with mouse.
State is stored into database after updates from browsers stop for a while.
Requires Elixir, PostgreSQL and NodeJS to be installed for building and running
the application.
To build frontend (/priv/static/js/bundle.js):
1. cd priv/frontend
2. npm install
3. npm run build
To start server:
1. Install dependencies with `mix deps.get`
2. Create and migrate your database with `mix ecto.create && mix ecto.migrate`
3. Start Phoenix endpoint with `mix phoenix.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
## Instruction:
Update readme with HTTP API usage instructions
## Code After:
Simple realtime note application.
Notes can be created, destroyed and their size and position can be changed by
dragging with mouse.
State is stored into database after updates from browsers stop for a while.
Requires Elixir, PostgreSQL and NodeJS to be installed for building and running
the application.
To build frontend (/priv/static/js/bundle.js):
1. cd priv/frontend
2. npm install
3. npm run build
To start server:
1. Install dependencies with `mix deps.get`
2. Create and migrate your database with `mix ecto.create && mix ecto.migrate`
3. Start Phoenix endpoint with `mix phoenix.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
# Changing note contents via HTTP API
1. Create a new note in the UI (or use an existing note for this)
2. Click the note for entering editing mode
3. Then click the ID field in note's left upper corner
4. A prompt will ask for a new API ID. The API ID is a string.
5. Note will change to orange color for indicating that it can be updated via API
6. PUT and PATCH requests to /api/notes/:api_id with JSON payload changes the contents of a note
Example:
curl -H "Content-Type: application/json" -X PUT -d '{"contents": "eggs"}' "http://localhost:4000/api/notes/ham"
This request updates note's which API ID is "ham" contents to "eggs".
|
Simple realtime note application.
Notes can be created, destroyed and their size and position can be changed by
dragging with mouse.
State is stored into database after updates from browsers stop for a while.
Requires Elixir, PostgreSQL and NodeJS to be installed for building and running
the application.
To build frontend (/priv/static/js/bundle.js):
1. cd priv/frontend
2. npm install
3. npm run build
To start server:
1. Install dependencies with `mix deps.get`
2. Create and migrate your database with `mix ecto.create && mix ecto.migrate`
3. Start Phoenix endpoint with `mix phoenix.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
+
+ # Changing note contents via HTTP API
+
+ 1. Create a new note in the UI (or use an existing note for this)
+ 2. Click the note for entering editing mode
+ 3. Then click the ID field in note's left upper corner
+ 4. A prompt will ask for a new API ID. The API ID is a string.
+ 5. Note will change to orange color for indicating that it can be updated via API
+ 6. PUT and PATCH requests to /api/notes/:api_id with JSON payload changes the contents of a note
+
+ Example:
+
+ curl -H "Content-Type: application/json" -X PUT -d '{"contents": "eggs"}' "http://localhost:4000/api/notes/ham"
+
+ This request updates note's which API ID is "ham" contents to "eggs". | 15 | 0.652174 | 15 | 0 |
c93f2ea58e45f17e07c65005ce479be92f4e5df6 | atmessager/lib/verifier.js | atmessager/lib/verifier.js | var logger = require('log4js').getLogger('APP_LOG');
function verifiyMessage(config, receiver, message, botname, sender, password) {
//If miss message, return error message
if (message === undefined || message === null) {
return 'Bad Request: Missing message';
}
//If receiver not found, return error message
if (config.get(receiver) === undefined) {
return 'Bad Request: Wrong receiver name';
}
//If sender not found, return error message
if (config.get(sender) === undefined) {
return 'Bad Request: Sender not found';
}
//If bot not found, return error message
if (config.get(botname) === undefined) {
return 'Bad Request: Wrong bot name';
}
//If password missmatch, return error message
if (password !== config.get(sender).password1 &&
password !== config.get(sender).password2) {
return 'Bad Request: Password not match';
}
//If there are not any error, return Success
return 'Message verified';
}
module.exports = {
'verifiyMessage': verifiyMessage
};
| var logger = require('log4js').getLogger('APP_LOG');
function verifiyMessage(config, receiver, message, botname, sender, password) {
//If miss message, return error message
if (message === undefined || message === null) {
return 'Bad Request: Missing message';
}
//If receiver not found, return error message
if (config.receivers[receiver] === undefined) {
return 'Bad Request: Wrong receiver name';
}
//If sender not found, return error message
if (config.senders[sender] === undefined) {
return 'Bad Request: Sender not found';
}
//If bot not found, return error message
if (config.bots[botname] === undefined) {
return 'Bad Request: Wrong bot name';
}
//If password missmatch, return error message
if (password !== config.senders[sender].password1 &&
password !== config.senders[sender].password2) {
return 'Bad Request: Password not match';
}
//If there are not any error, return Success
return 'Message verified';
}
module.exports = {
'verifiyMessage': verifiyMessage
};
| Change solution of get config from config file | Change solution of get config from config file
| JavaScript | apache-2.0 | dollars0427/ATMessager,dollars0427/ATMessager | javascript | ## Code Before:
var logger = require('log4js').getLogger('APP_LOG');
function verifiyMessage(config, receiver, message, botname, sender, password) {
//If miss message, return error message
if (message === undefined || message === null) {
return 'Bad Request: Missing message';
}
//If receiver not found, return error message
if (config.get(receiver) === undefined) {
return 'Bad Request: Wrong receiver name';
}
//If sender not found, return error message
if (config.get(sender) === undefined) {
return 'Bad Request: Sender not found';
}
//If bot not found, return error message
if (config.get(botname) === undefined) {
return 'Bad Request: Wrong bot name';
}
//If password missmatch, return error message
if (password !== config.get(sender).password1 &&
password !== config.get(sender).password2) {
return 'Bad Request: Password not match';
}
//If there are not any error, return Success
return 'Message verified';
}
module.exports = {
'verifiyMessage': verifiyMessage
};
## Instruction:
Change solution of get config from config file
## Code After:
var logger = require('log4js').getLogger('APP_LOG');
function verifiyMessage(config, receiver, message, botname, sender, password) {
//If miss message, return error message
if (message === undefined || message === null) {
return 'Bad Request: Missing message';
}
//If receiver not found, return error message
if (config.receivers[receiver] === undefined) {
return 'Bad Request: Wrong receiver name';
}
//If sender not found, return error message
if (config.senders[sender] === undefined) {
return 'Bad Request: Sender not found';
}
//If bot not found, return error message
if (config.bots[botname] === undefined) {
return 'Bad Request: Wrong bot name';
}
//If password missmatch, return error message
if (password !== config.senders[sender].password1 &&
password !== config.senders[sender].password2) {
return 'Bad Request: Password not match';
}
//If there are not any error, return Success
return 'Message verified';
}
module.exports = {
'verifiyMessage': verifiyMessage
};
| var logger = require('log4js').getLogger('APP_LOG');
function verifiyMessage(config, receiver, message, botname, sender, password) {
//If miss message, return error message
if (message === undefined || message === null) {
return 'Bad Request: Missing message';
}
//If receiver not found, return error message
- if (config.get(receiver) === undefined) {
? ---- ^
+ if (config.receivers[receiver] === undefined) {
? ^^^^^^^^^^^
return 'Bad Request: Wrong receiver name';
}
//If sender not found, return error message
- if (config.get(sender) === undefined) {
? ---- ^
+ if (config.senders[sender] === undefined) {
? ^^^^^^^^^
return 'Bad Request: Sender not found';
}
//If bot not found, return error message
- if (config.get(botname) === undefined) {
? ^^ ^ ^
+ if (config.bots[botname] === undefined) {
? ^^ ^^ ^
return 'Bad Request: Wrong bot name';
}
//If password missmatch, return error message
- if (password !== config.get(sender).password1 &&
? ---- ^
+ if (password !== config.senders[sender].password1 &&
? ^^^^^^^^^
- password !== config.get(sender).password2) {
? ---- ^
+ password !== config.senders[sender].password2) {
? ^^^^^^^^^
return 'Bad Request: Password not match';
}
//If there are not any error, return Success
return 'Message verified';
}
module.exports = {
'verifiyMessage': verifiyMessage
}; | 10 | 0.204082 | 5 | 5 |
acbb272431c26f34e08ff23b2f9b20d0d43093c3 | roles/monitoring/client/tasks/main.yml | roles/monitoring/client/tasks/main.yml | ---
- name: Install Sensu plugins
action: copy src={{ item }} dest=/etc/sensu/plugins/ owner=sensu group=sensu mode=0755
with_fileglob: plugins/*
| ---
- name: Install Sensu plugins
action: copy src={{ item }} dest=/etc/sensu/plugins/ owner=sensu group=sensu mode=0755
with_fileglob: plugins/*
- name: Add Sensu user to adm group
action: user name=sensu groups=adm append=yes
| Add Sensu user to adm group | Add Sensu user to adm group
| YAML | mit | RitwikGupta/ansible,Pitt-CSC/ansible,Pitt-CSC/ansible,RitwikGupta/ansible,RitwikGupta/ansible,Pitt-CSC/ansible | yaml | ## Code Before:
---
- name: Install Sensu plugins
action: copy src={{ item }} dest=/etc/sensu/plugins/ owner=sensu group=sensu mode=0755
with_fileglob: plugins/*
## Instruction:
Add Sensu user to adm group
## Code After:
---
- name: Install Sensu plugins
action: copy src={{ item }} dest=/etc/sensu/plugins/ owner=sensu group=sensu mode=0755
with_fileglob: plugins/*
- name: Add Sensu user to adm group
action: user name=sensu groups=adm append=yes
| ---
- name: Install Sensu plugins
action: copy src={{ item }} dest=/etc/sensu/plugins/ owner=sensu group=sensu mode=0755
with_fileglob: plugins/*
+
+ - name: Add Sensu user to adm group
+ action: user name=sensu groups=adm append=yes | 3 | 0.75 | 3 | 0 |
8b103aafa59cef17d9617eaa4d5b8448ebedbbb9 | src/components/templates/_page.html | src/components/templates/_page.html | {% include "@banner" %}
{% include "@menu" %}
<main class="c-main" id="main" role="main">
{% block main %}
{% endblock %}
</main>
{% include "@traverse-nav" %}
{% include "@contentinfo" %}
| {% include "@banner" %}
{% include "@menu" %}
<main class="c-main" id="main">
{% block main %}
{% endblock %}
</main>
{% include "@traverse-nav" %}
{% include "@contentinfo" %}
| Remove unnecessary landmark role for main element | Remove unnecessary landmark role for main element
| HTML | mit | 24ways/frontend,24ways/frontend | html | ## Code Before:
{% include "@banner" %}
{% include "@menu" %}
<main class="c-main" id="main" role="main">
{% block main %}
{% endblock %}
</main>
{% include "@traverse-nav" %}
{% include "@contentinfo" %}
## Instruction:
Remove unnecessary landmark role for main element
## Code After:
{% include "@banner" %}
{% include "@menu" %}
<main class="c-main" id="main">
{% block main %}
{% endblock %}
</main>
{% include "@traverse-nav" %}
{% include "@contentinfo" %}
| {% include "@banner" %}
{% include "@menu" %}
- <main class="c-main" id="main" role="main">
? ------------
+ <main class="c-main" id="main">
{% block main %}
{% endblock %}
</main>
{% include "@traverse-nav" %}
{% include "@contentinfo" %} | 2 | 0.2 | 1 | 1 |
a7892eed3bd633bd323b77f4f8cf50629a831a58 | dhcpsapi.gemspec | dhcpsapi.gemspec | $:.push File.expand_path("../lib", __FILE__)
require "dhcpsapi/version"
Gem::Specification.new do |gem|
gem.authors = ["Dmitri Dolguikh"]
gem.email = 'dmitri@appliedlogic.ca'
gem.description = 'Ruby wrappers for MS DHCP api'
gem.summary = 'Ruby wrappers for MS DHCP api'
gem.homepage = "https://github.com/witlessbird/ruby-dhcpsapi_win2008"
gem.license = "Apache License, v2.0"
gem.files = %w(LICENSE.txt README.md Rakefile) + Dir["lib/**/*"]
gem.name = "dhcpsapi"
gem.require_path = "lib"
gem.version = DhcpsApi::VERSION
gem.add_dependency 'ffi'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'minitest', '~> 4.3'
gem.add_development_dependency 'yard'
end
| $:.push File.expand_path("../lib", __FILE__)
require "dhcpsapi/version"
Gem::Specification.new do |gem|
gem.authors = ["Dmitri Dolguikh"]
gem.email = 'dmitri@appliedlogic.ca'
gem.description = 'Ruby wrappers for MS DHCP api'
gem.summary = 'Ruby wrappers for MS DHCP api'
gem.homepage = "https://github.com/witlessbird/ruby-dhcpsapi"
gem.license = "Apache-2.0"
gem.files = %w(LICENSE.txt README.md Rakefile) + Dir["lib/**/*"]
gem.name = "dhcpsapi"
gem.require_path = "lib"
gem.version = DhcpsApi::VERSION
gem.add_dependency 'ffi'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'minitest', '~> 4.3'
gem.add_development_dependency 'yard'
end
| Correct homepage and licence SPDX identifier | Correct homepage and licence SPDX identifier | Ruby | apache-2.0 | witlessbird/ruby-dhcpsapi | ruby | ## Code Before:
$:.push File.expand_path("../lib", __FILE__)
require "dhcpsapi/version"
Gem::Specification.new do |gem|
gem.authors = ["Dmitri Dolguikh"]
gem.email = 'dmitri@appliedlogic.ca'
gem.description = 'Ruby wrappers for MS DHCP api'
gem.summary = 'Ruby wrappers for MS DHCP api'
gem.homepage = "https://github.com/witlessbird/ruby-dhcpsapi_win2008"
gem.license = "Apache License, v2.0"
gem.files = %w(LICENSE.txt README.md Rakefile) + Dir["lib/**/*"]
gem.name = "dhcpsapi"
gem.require_path = "lib"
gem.version = DhcpsApi::VERSION
gem.add_dependency 'ffi'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'minitest', '~> 4.3'
gem.add_development_dependency 'yard'
end
## Instruction:
Correct homepage and licence SPDX identifier
## Code After:
$:.push File.expand_path("../lib", __FILE__)
require "dhcpsapi/version"
Gem::Specification.new do |gem|
gem.authors = ["Dmitri Dolguikh"]
gem.email = 'dmitri@appliedlogic.ca'
gem.description = 'Ruby wrappers for MS DHCP api'
gem.summary = 'Ruby wrappers for MS DHCP api'
gem.homepage = "https://github.com/witlessbird/ruby-dhcpsapi"
gem.license = "Apache-2.0"
gem.files = %w(LICENSE.txt README.md Rakefile) + Dir["lib/**/*"]
gem.name = "dhcpsapi"
gem.require_path = "lib"
gem.version = DhcpsApi::VERSION
gem.add_dependency 'ffi'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'minitest', '~> 4.3'
gem.add_development_dependency 'yard'
end
| $:.push File.expand_path("../lib", __FILE__)
require "dhcpsapi/version"
Gem::Specification.new do |gem|
gem.authors = ["Dmitri Dolguikh"]
gem.email = 'dmitri@appliedlogic.ca'
gem.description = 'Ruby wrappers for MS DHCP api'
gem.summary = 'Ruby wrappers for MS DHCP api'
- gem.homepage = "https://github.com/witlessbird/ruby-dhcpsapi_win2008"
? --------
+ gem.homepage = "https://github.com/witlessbird/ruby-dhcpsapi"
- gem.license = "Apache License, v2.0"
? ^^^^^^^^^^^
+ gem.license = "Apache-2.0"
? ^
gem.files = %w(LICENSE.txt README.md Rakefile) + Dir["lib/**/*"]
gem.name = "dhcpsapi"
gem.require_path = "lib"
gem.version = DhcpsApi::VERSION
gem.add_dependency 'ffi'
gem.add_development_dependency 'rake'
gem.add_development_dependency 'minitest', '~> 4.3'
gem.add_development_dependency 'yard'
end | 4 | 0.181818 | 2 | 2 |
dc784be92e16e5b1778515805402faccd18f8322 | app/views/main/index.html.erb | app/views/main/index.html.erb | <%= form_tag(main_index_path, method: "post") do %>
<%= label_tag(:id, "Billion second starting point") %>
<%= date_field_tag(:id, '', required: true ) %>
<%= submit_tag("Find out!") %>
<% end %>
| <% content_for :title do %>
One billion time calculator
<% end %>
<%= form_tag(main_index_path, method: "post") do %>
<%= label_tag(:id, "Billion second starting point") %>
<%= date_field_tag(:id, '', required: true ) %>
<%= submit_tag("Find out!") %>
<% end %>
| Index page needs a title and a home link | Index page needs a title and a home link
| HTML+ERB | mit | halkeye/billionyear,halkeye/billionyear,halkeye/billionyear | html+erb | ## Code Before:
<%= form_tag(main_index_path, method: "post") do %>
<%= label_tag(:id, "Billion second starting point") %>
<%= date_field_tag(:id, '', required: true ) %>
<%= submit_tag("Find out!") %>
<% end %>
## Instruction:
Index page needs a title and a home link
## Code After:
<% content_for :title do %>
One billion time calculator
<% end %>
<%= form_tag(main_index_path, method: "post") do %>
<%= label_tag(:id, "Billion second starting point") %>
<%= date_field_tag(:id, '', required: true ) %>
<%= submit_tag("Find out!") %>
<% end %>
| + <% content_for :title do %>
+ One billion time calculator
+ <% end %>
+
<%= form_tag(main_index_path, method: "post") do %>
<%= label_tag(:id, "Billion second starting point") %>
<%= date_field_tag(:id, '', required: true ) %>
<%= submit_tag("Find out!") %>
<% end %> | 4 | 0.8 | 4 | 0 |
44952f034b7bb8263ca42d972658845b0057540c | README.md | README.md | Userscripts to modify Panda.TV to show Twitch Chat
Click the players avatar for settings menu.
One script works on all 5 TS members.
# Installation
Download a userscript extension such as TamperMonkey (Chrome) or GreaseMonkey (Firefox)
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
Install the script by viewing the raw files on github.
https://github.com/Wigguno/pandatwitch/raw/master/pandatwitch.user.js
# Settings
Insert Twitch - Puts Twitch chat in place of Panda chat
Move Panda - Moves Panda chat to the left sidebar
Rearrange Footer - Moves the title to the footer
Remove Detail - Removes the detail text from below the stream
Dark Theme - Darkens the background (Use with BTTV Dark Mode) | Userscripts to modify Panda.TV to show Twitch Chat
Click the players avatar for settings menu.
One script works on all 5 TS members.
Preview: http://i.imgur.com/VYBODJw.png
# Installation
Download a userscript extension such as TamperMonkey (Chrome) or GreaseMonkey (Firefox)
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
Install the script by viewing the raw files on github.
https://github.com/Wigguno/pandatwitch/raw/master/pandatwitch.user.js
# Settings
Insert Twitch - Puts Twitch chat in place of Panda chat
Move Panda - Moves Panda chat to the left sidebar
Rearrange Footer - Moves the title to the footer
Remove Detail - Removes the detail text from below the stream
Dark Theme - Darkens the background (Use with BTTV Dark Mode) | Add preview image to readme | Add preview image to readme
| Markdown | mit | Wigguno/pandatwitch | markdown | ## Code Before:
Userscripts to modify Panda.TV to show Twitch Chat
Click the players avatar for settings menu.
One script works on all 5 TS members.
# Installation
Download a userscript extension such as TamperMonkey (Chrome) or GreaseMonkey (Firefox)
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
Install the script by viewing the raw files on github.
https://github.com/Wigguno/pandatwitch/raw/master/pandatwitch.user.js
# Settings
Insert Twitch - Puts Twitch chat in place of Panda chat
Move Panda - Moves Panda chat to the left sidebar
Rearrange Footer - Moves the title to the footer
Remove Detail - Removes the detail text from below the stream
Dark Theme - Darkens the background (Use with BTTV Dark Mode)
## Instruction:
Add preview image to readme
## Code After:
Userscripts to modify Panda.TV to show Twitch Chat
Click the players avatar for settings menu.
One script works on all 5 TS members.
Preview: http://i.imgur.com/VYBODJw.png
# Installation
Download a userscript extension such as TamperMonkey (Chrome) or GreaseMonkey (Firefox)
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
Install the script by viewing the raw files on github.
https://github.com/Wigguno/pandatwitch/raw/master/pandatwitch.user.js
# Settings
Insert Twitch - Puts Twitch chat in place of Panda chat
Move Panda - Moves Panda chat to the left sidebar
Rearrange Footer - Moves the title to the footer
Remove Detail - Removes the detail text from below the stream
Dark Theme - Darkens the background (Use with BTTV Dark Mode) | Userscripts to modify Panda.TV to show Twitch Chat
Click the players avatar for settings menu.
One script works on all 5 TS members.
+
+ Preview: http://i.imgur.com/VYBODJw.png
# Installation
Download a userscript extension such as TamperMonkey (Chrome) or GreaseMonkey (Firefox)
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
Install the script by viewing the raw files on github.
https://github.com/Wigguno/pandatwitch/raw/master/pandatwitch.user.js
# Settings
Insert Twitch - Puts Twitch chat in place of Panda chat
Move Panda - Moves Panda chat to the left sidebar
Rearrange Footer - Moves the title to the footer
Remove Detail - Removes the detail text from below the stream
Dark Theme - Darkens the background (Use with BTTV Dark Mode) | 2 | 0.1 | 2 | 0 |
65fc7d42b7afcca0aa2336f1b2cdfda68e73dd08 | src/main/scala/com/oreilly/learningsparkexamples/scala/WordCount.scala | src/main/scala/com/oreilly/learningsparkexamples/scala/WordCount.scala | /**
* Illustrates flatMap + countByValue for wordcount.
*/
package com.oreilly.learningsparkexamples.scala
import org.apache.spark._
import org.apache.spark.SparkContext._
object WordCount {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
case _ => "local"
}
val sc = new SparkContext(master, "WordCount", System.getenv("SPARK_HOME"))
val input = args.length match {
case x: Int if x > 1 => sc.textFile(args(1))
case _ => sc.parallelize(List("pandas", "i like pandas"))
}
val counts = input.flatMap(_.split(" ")).map((_, 1)).reduceByKey(_ + _)
args.length match {
case x: Int if x > 2 => counts.saveAsTextFile(args(2))
case _ => println(counts.collect().mkString(","))
}
}
}
| /**
* Illustrates flatMap + countByValue for wordcount.
*/
package com.oreilly.learningsparkexamples.scala
import org.apache.spark._
import org.apache.spark.SparkContext._
object WordCount {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
case _ => "local"
}
val sc = new SparkContext(master, "WordCount", System.getenv("SPARK_HOME"))
val input = args.length match {
case x: Int if x > 1 => sc.textFile(args(1))
case _ => sc.parallelize(List("pandas", "i like pandas"))
}
val words = input.flatMap(_.split(" "))
args.length match {
case x: Int if x > 2 => {
val counts = words.map((_, 1)).reduceByKey(_ + _)
counts.saveAsTextFile(args(2))
}
case _ => {
val wc = words.countByValue()
println(wc.mkString(","))
}
}
}
}
| Make the wordcount example match its description (we didn't use countbyvalue before) | Make the wordcount example match its description (we didn't use countbyvalue before)
| Scala | mit | asarraf/learning-spark,gaoxuesong/learning-spark,huixiang/learning-spark,negokaz/learning-spark,mohitsh/learning-spark,ramyasrigangula/learning-spark,anjuncc/learning-spark-examples,concerned3rdparty/learning-spark,GatsbyNewton/learning-spark,ramyasrigangula/learning-spark,jindalcastle/learning-spark,ellis429/learning-spark,noprom/learning-spark,GatsbyNewton/learning-spark,ramyasrigangula/learning-spark,junwucs/learning-spark,tengteng/learning-spark,bhagatsingh/learning-spark,GatsbyNewton/learning-spark,bhagatsingh/learning-spark,asarraf/learning-spark,concerned3rdparty/learning-spark,JerryTseng/learning-spark,bhagatsingh/learning-spark,huixiang/learning-spark,anjuncc/learning-spark-examples,obinsanni/learning-spark,mohitsh/learning-spark,noprom/learning-spark,UsterNes/learning-spark,ellis429/learning-spark,mohitsh/learning-spark,DINESHKUMARMURUGAN/learning-spark,coursera4ashok/learning-spark,anjuncc/learning-spark-examples,jaehyuk/learning-spark,SunGuo/learning-spark,mmirolim/learning-spark,huixiang/learning-spark,XiaoqingWang/learning-spark,databricks/learning-spark,DINESHKUMARMURUGAN/learning-spark,UsterNes/learning-spark,mohitsh/learning-spark,qingkaikong/learning-spark-examples,rex1100/learning-spark,junwucs/learning-spark,tengteng/learning-spark,qingkaikong/learning-spark-examples,databricks/learning-spark,XiaoqingWang/learning-spark,shimizust/learning-spark,anjuncc/learning-spark-examples,junwucs/learning-spark,concerned3rdparty/learning-spark,coursera4ashok/learning-spark,qingkaikong/learning-spark-examples,dsdinter/learning-spark-examples,shimizust/learning-spark,XiaoqingWang/learning-spark,DINESHKUMARMURUGAN/learning-spark,asarraf/learning-spark,jaehyuk/learning-spark,mmirolim/learning-spark,ellis429/learning-spark-examples,asarraf/learning-spark,negokaz/learning-spark,baokunguo/learning-spark-examples,gaoxuesong/learning-spark,jindalcastle/learning-spark,NBSW/learning-spark,diogoaurelio/learning-spark,NBSW/learning-spark,GatsbyNewton/learning-spark,kod3r/learning-spark,gaoxuesong/learning-spark,zaxliu/learning-spark,gaoxuesong/learning-spark,anjuncc/learning-spark-examples,dsdinter/learning-spark-examples,jaehyuk/learning-spark,ramyasrigangula/learning-spark,ellis429/learning-spark-examples,kpraveen420/learning-spark,NBSW/learning-spark,shimizust/learning-spark,negokaz/learning-spark,kpraveen420/learning-spark,mmirolim/learning-spark,holdenk/learning-spark-examples,junwucs/learning-spark,asarraf/learning-spark,feynman0825/learning-spark,databricks/learning-spark,zaxliu/learning-spark,JerryTseng/learning-spark,SunGuo/learning-spark,SunGuo/learning-spark,baokunguo/learning-spark-examples,tengteng/learning-spark,obinsanni/learning-spark,mohitsh/learning-spark,shimizust/learning-spark,jindalcastle/learning-spark,ellis429/learning-spark,huydx/learning-spark,UsterNes/learning-spark,ellis429/learning-spark,obinsanni/learning-spark,jaehyuk/learning-spark,ramyasrigangula/learning-spark,NBSW/learning-spark,negokaz/learning-spark,feynman0825/learning-spark,bhagatsingh/learning-spark,zaxliu/learning-spark,holdenk/learning-spark-examples,kpraveen420/learning-spark,huixiang/learning-spark,UsterNes/learning-spark,kpraveen420/learning-spark,diogoaurelio/learning-spark,dsdinter/learning-spark-examples,huydx/learning-spark,gaoxuesong/learning-spark,obinsanni/learning-spark,huixiang/learning-spark,diogoaurelio/learning-spark,feynman0825/learning-spark,ellis429/learning-spark,XiaoqingWang/learning-spark,shimizust/learning-spark,JerryTseng/learning-spark,kod3r/learning-spark,kod3r/learning-spark,kpraveen420/learning-spark,noprom/learning-spark,baokunguo/learning-spark-examples,holdenk/learning-spark-examples,bhagatsingh/learning-spark,noprom/learning-spark,concerned3rdparty/learning-spark,JerryTseng/learning-spark,huydx/learning-spark,jaehyuk/learning-spark,concerned3rdparty/learning-spark,dsdinter/learning-spark-examples,kod3r/learning-spark,ellis429/learning-spark-examples,NBSW/learning-spark,databricks/learning-spark,noprom/learning-spark,dsdinter/learning-spark-examples,holdenk/learning-spark-examples,holdenk/learning-spark-examples,coursera4ashok/learning-spark,databricks/learning-spark,huydx/learning-spark,tengteng/learning-spark,mmirolim/learning-spark,jindalcastle/learning-spark,JerryTseng/learning-spark,ellis429/learning-spark-examples,jindalcastle/learning-spark,coursera4ashok/learning-spark,ellis429/learning-spark-examples,XiaoqingWang/learning-spark,mmirolim/learning-spark,diogoaurelio/learning-spark,negokaz/learning-spark,kod3r/learning-spark,rex1100/learning-spark,GatsbyNewton/learning-spark,DINESHKUMARMURUGAN/learning-spark,obinsanni/learning-spark,zaxliu/learning-spark,qingkaikong/learning-spark-examples,junwucs/learning-spark,diogoaurelio/learning-spark,tengteng/learning-spark,zaxliu/learning-spark,SunGuo/learning-spark,feynman0825/learning-spark,coursera4ashok/learning-spark,feynman0825/learning-spark,baokunguo/learning-spark-examples,UsterNes/learning-spark,SunGuo/learning-spark,baokunguo/learning-spark-examples,rex1100/learning-spark,qingkaikong/learning-spark-examples,huydx/learning-spark,DINESHKUMARMURUGAN/learning-spark | scala | ## Code Before:
/**
* Illustrates flatMap + countByValue for wordcount.
*/
package com.oreilly.learningsparkexamples.scala
import org.apache.spark._
import org.apache.spark.SparkContext._
object WordCount {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
case _ => "local"
}
val sc = new SparkContext(master, "WordCount", System.getenv("SPARK_HOME"))
val input = args.length match {
case x: Int if x > 1 => sc.textFile(args(1))
case _ => sc.parallelize(List("pandas", "i like pandas"))
}
val counts = input.flatMap(_.split(" ")).map((_, 1)).reduceByKey(_ + _)
args.length match {
case x: Int if x > 2 => counts.saveAsTextFile(args(2))
case _ => println(counts.collect().mkString(","))
}
}
}
## Instruction:
Make the wordcount example match its description (we didn't use countbyvalue before)
## Code After:
/**
* Illustrates flatMap + countByValue for wordcount.
*/
package com.oreilly.learningsparkexamples.scala
import org.apache.spark._
import org.apache.spark.SparkContext._
object WordCount {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
case _ => "local"
}
val sc = new SparkContext(master, "WordCount", System.getenv("SPARK_HOME"))
val input = args.length match {
case x: Int if x > 1 => sc.textFile(args(1))
case _ => sc.parallelize(List("pandas", "i like pandas"))
}
val words = input.flatMap(_.split(" "))
args.length match {
case x: Int if x > 2 => {
val counts = words.map((_, 1)).reduceByKey(_ + _)
counts.saveAsTextFile(args(2))
}
case _ => {
val wc = words.countByValue()
println(wc.mkString(","))
}
}
}
}
| /**
* Illustrates flatMap + countByValue for wordcount.
*/
package com.oreilly.learningsparkexamples.scala
import org.apache.spark._
import org.apache.spark.SparkContext._
object WordCount {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
case _ => "local"
}
val sc = new SparkContext(master, "WordCount", System.getenv("SPARK_HOME"))
val input = args.length match {
case x: Int if x > 1 => sc.textFile(args(1))
case _ => sc.parallelize(List("pandas", "i like pandas"))
}
- val counts = input.flatMap(_.split(" ")).map((_, 1)).reduceByKey(_ + _)
+ val words = input.flatMap(_.split(" "))
args.length match {
+ case x: Int if x > 2 => {
+ val counts = words.map((_, 1)).reduceByKey(_ + _)
- case x: Int if x > 2 => counts.saveAsTextFile(args(2))
? ---- ------------------
+ counts.saveAsTextFile(args(2))
- case _ => println(counts.collect().mkString(","))
+ }
+ case _ => {
+ val wc = words.countByValue()
+ println(wc.mkString(","))
+ }
}
}
} | 12 | 0.461538 | 9 | 3 |
026e939e596ee3d96f0e26d6a6ddc01d4e8fa077 | client/planner-page/template.html | client/planner-page/template.html | <div class="fullscreen">
<div class="MapView"></div>
<div class="SidePanel">
<div id="scrollable" class="scrollable">
<form autosubmit id="locations-form">
<div class="title">Describe <strong>your</strong> trip <a class="fa fa-fw icon-reverse pull-right" on-tap="reverseCommute" title="Reverse Commute" href="#"></a></div>
<div reactive="locations-view"></div>
<div reactive="filter-view"></div>
</form>
<div reactive="options-view"></div>
</div>
<div reactive="planner-nav"></div>
<div class="footer hidden">
<button class="btn btn-default help-me-choose" on-tap="helpMeChoose"><i class="fa fa-fw fa-list"></i> help me choose</button>
<a href="#" on-tap="scroll" class="more-options pull-right"><i class="fa fa-fw fa-chevron-down"></i> more options</a>
</div>
</div>
</div>
| <div class="fullscreen">
<div class="MapView"></div>
<div class="SidePanel">
<div id="scrollable" class="scrollable">
<form autosubmit id="locations-form">
<div class="title">Describe <strong>your</strong> trip <a class="fa fa-fw icon-reverse pull-right" on-tap="reverseCommute" title="Reverse Commute" href="#"></a></div>
<div reactive="locations-view"></div>
<div reactive="filter-view"></div>
</form>
<div reactive="options-view"></div>
</div>
<div reactive="planner-nav"></div>
<div class="footer hidden">
<button class="btn btn-default help-me-choose" on-tap="helpMeChoose"><i class="fa fa-fw fa-list"></i> help me choose</button>
<button class="btn btn-demph more-options pull-right" on-tap="scroll"><i class="fa fa-fw fa-chevron-down"></i></a>
</div>
</div>
</div>
| Make more a button and remove text | Make more a button and remove text
| HTML | bsd-3-clause | arunnair80/modeify-1,arunnair80/modeify,tismart/modeify,arunnair80/modeify,miraculixx/modeify,tismart/modeify,amigocloud/modeify,amigocloud/modified-tripplanner,amigocloud/modified-tripplanner,tismart/modeify,amigocloud/modified-tripplanner,arunnair80/modeify,arunnair80/modeify-1,amigocloud/modeify,amigocloud/modeify,tismart/modeify,arunnair80/modeify-1,arunnair80/modeify,arunnair80/modeify-1,amigocloud/modeify,miraculixx/modeify,amigocloud/modified-tripplanner,miraculixx/modeify,miraculixx/modeify | html | ## Code Before:
<div class="fullscreen">
<div class="MapView"></div>
<div class="SidePanel">
<div id="scrollable" class="scrollable">
<form autosubmit id="locations-form">
<div class="title">Describe <strong>your</strong> trip <a class="fa fa-fw icon-reverse pull-right" on-tap="reverseCommute" title="Reverse Commute" href="#"></a></div>
<div reactive="locations-view"></div>
<div reactive="filter-view"></div>
</form>
<div reactive="options-view"></div>
</div>
<div reactive="planner-nav"></div>
<div class="footer hidden">
<button class="btn btn-default help-me-choose" on-tap="helpMeChoose"><i class="fa fa-fw fa-list"></i> help me choose</button>
<a href="#" on-tap="scroll" class="more-options pull-right"><i class="fa fa-fw fa-chevron-down"></i> more options</a>
</div>
</div>
</div>
## Instruction:
Make more a button and remove text
## Code After:
<div class="fullscreen">
<div class="MapView"></div>
<div class="SidePanel">
<div id="scrollable" class="scrollable">
<form autosubmit id="locations-form">
<div class="title">Describe <strong>your</strong> trip <a class="fa fa-fw icon-reverse pull-right" on-tap="reverseCommute" title="Reverse Commute" href="#"></a></div>
<div reactive="locations-view"></div>
<div reactive="filter-view"></div>
</form>
<div reactive="options-view"></div>
</div>
<div reactive="planner-nav"></div>
<div class="footer hidden">
<button class="btn btn-default help-me-choose" on-tap="helpMeChoose"><i class="fa fa-fw fa-list"></i> help me choose</button>
<button class="btn btn-demph more-options pull-right" on-tap="scroll"><i class="fa fa-fw fa-chevron-down"></i></a>
</div>
</div>
</div>
| <div class="fullscreen">
<div class="MapView"></div>
<div class="SidePanel">
<div id="scrollable" class="scrollable">
<form autosubmit id="locations-form">
<div class="title">Describe <strong>your</strong> trip <a class="fa fa-fw icon-reverse pull-right" on-tap="reverseCommute" title="Reverse Commute" href="#"></a></div>
<div reactive="locations-view"></div>
<div reactive="filter-view"></div>
</form>
<div reactive="options-view"></div>
</div>
<div reactive="planner-nav"></div>
<div class="footer hidden">
<button class="btn btn-default help-me-choose" on-tap="helpMeChoose"><i class="fa fa-fw fa-list"></i> help me choose</button>
- <a href="#" on-tap="scroll" class="more-options pull-right"><i class="fa fa-fw fa-chevron-down"></i> more options</a>
+ <button class="btn btn-demph more-options pull-right" on-tap="scroll"><i class="fa fa-fw fa-chevron-down"></i></a>
</div>
</div>
</div> | 2 | 0.111111 | 1 | 1 |
430fbbd54a6bf6b1c552ab2dbde277c9de31251b | requirements.txt | requirements.txt | alabaster==0.7.7
Babel==2.3.4
docutils==0.12
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
pytz==2016.4
requests==2.5.3
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.1
sphinx-bootstrap-theme==0.4.5
sphinx-rtd-theme==0.1.9
| alabaster==0.7.7
Babel==2.3.4
datadiff==2.0.0
docutils==0.12
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
pytz==2016.4
requests==2.5.3
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.1
sphinx-bootstrap-theme==0.4.5
sphinx-rtd-theme==0.1.9
| Use datadiff to diff envelopes. | Use datadiff to diff envelopes.
| Text | apache-2.0 | deconst/preparer-sphinx,deconst/preparer-sphinx | text | ## Code Before:
alabaster==0.7.7
Babel==2.3.4
docutils==0.12
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
pytz==2016.4
requests==2.5.3
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.1
sphinx-bootstrap-theme==0.4.5
sphinx-rtd-theme==0.1.9
## Instruction:
Use datadiff to diff envelopes.
## Code After:
alabaster==0.7.7
Babel==2.3.4
datadiff==2.0.0
docutils==0.12
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
pytz==2016.4
requests==2.5.3
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.1
sphinx-bootstrap-theme==0.4.5
sphinx-rtd-theme==0.1.9
| alabaster==0.7.7
Babel==2.3.4
+ datadiff==2.0.0
docutils==0.12
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
pytz==2016.4
requests==2.5.3
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.1
sphinx-bootstrap-theme==0.4.5
sphinx-rtd-theme==0.1.9 | 1 | 0.076923 | 1 | 0 |
84155efbaef5e38bcf6150beba9e6854a4e0f705 | requirements.txt | requirements.txt | amqp==2.1.4
appdirs==1.4.0
billiard==3.5.0.2
celery==4.0.2
coreapi==2.1.1
coreschema==0.0.4
Django==1.10.5
django-celery-results==1.0.1
django-filter==1.0.1
django-logging-json==1.5.3
django-nose==1.4.4
django-rest-swagger==2.1.1
djangorestframework==3.5.3
elasticsearch==2.4.1
itypes==1.1.0
Jinja2==2.9.5
kombu==4.0.2
Markdown==2.6.8
MarkupSafe==0.23
nose==1.3.7
nose2==0.6.5
openapi-codec==1.3.1
packaging==16.8
pika==0.10.0
pyparsing==2.1.10
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
six==1.10.0
uritemplate==3.0.0
urllib3==1.20
vine==1.1.3
| amqp==2.1.4
appdirs==1.4.0
billiard==3.5.0.2
celery==4.0.2
coreapi==2.1.1
coreschema==0.0.4
Django==1.10.5
django-celery-results==1.0.1
django-filter==1.0.1
django-logging-json==1.5.3
django-nose==1.4.4
django-rest-swagger==2.1.1
djangorestframework==3.5.3
elasticsearch==2.4.1
itypes==1.1.0
Jinja2==2.9.5
kombu==4.0.2
Markdown==2.6.8
MarkupSafe==0.23
mysqlclient==1.3.10
nose==1.3.7
nose2==0.6.5
openapi-codec==1.3.1
packaging==16.8
pika==0.10.0
pyparsing==2.1.10
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
six==1.10.0
uritemplate==3.0.0
urllib3==1.20
vine==1.1.3
| Add mysql client as dependency | Add mysql client as dependency
| Text | mit | heytrav/drs-project | text | ## Code Before:
amqp==2.1.4
appdirs==1.4.0
billiard==3.5.0.2
celery==4.0.2
coreapi==2.1.1
coreschema==0.0.4
Django==1.10.5
django-celery-results==1.0.1
django-filter==1.0.1
django-logging-json==1.5.3
django-nose==1.4.4
django-rest-swagger==2.1.1
djangorestframework==3.5.3
elasticsearch==2.4.1
itypes==1.1.0
Jinja2==2.9.5
kombu==4.0.2
Markdown==2.6.8
MarkupSafe==0.23
nose==1.3.7
nose2==0.6.5
openapi-codec==1.3.1
packaging==16.8
pika==0.10.0
pyparsing==2.1.10
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
six==1.10.0
uritemplate==3.0.0
urllib3==1.20
vine==1.1.3
## Instruction:
Add mysql client as dependency
## Code After:
amqp==2.1.4
appdirs==1.4.0
billiard==3.5.0.2
celery==4.0.2
coreapi==2.1.1
coreschema==0.0.4
Django==1.10.5
django-celery-results==1.0.1
django-filter==1.0.1
django-logging-json==1.5.3
django-nose==1.4.4
django-rest-swagger==2.1.1
djangorestframework==3.5.3
elasticsearch==2.4.1
itypes==1.1.0
Jinja2==2.9.5
kombu==4.0.2
Markdown==2.6.8
MarkupSafe==0.23
mysqlclient==1.3.10
nose==1.3.7
nose2==0.6.5
openapi-codec==1.3.1
packaging==16.8
pika==0.10.0
pyparsing==2.1.10
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
six==1.10.0
uritemplate==3.0.0
urllib3==1.20
vine==1.1.3
| amqp==2.1.4
appdirs==1.4.0
billiard==3.5.0.2
celery==4.0.2
coreapi==2.1.1
coreschema==0.0.4
Django==1.10.5
django-celery-results==1.0.1
django-filter==1.0.1
django-logging-json==1.5.3
django-nose==1.4.4
django-rest-swagger==2.1.1
djangorestframework==3.5.3
elasticsearch==2.4.1
itypes==1.1.0
Jinja2==2.9.5
kombu==4.0.2
Markdown==2.6.8
MarkupSafe==0.23
+ mysqlclient==1.3.10
nose==1.3.7
nose2==0.6.5
openapi-codec==1.3.1
packaging==16.8
pika==0.10.0
pyparsing==2.1.10
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
six==1.10.0
uritemplate==3.0.0
urllib3==1.20
vine==1.1.3 | 1 | 0.03125 | 1 | 0 |
666839c1dabc2f68135ba91e3d5bb0336433b0e6 | meta-oe/recipes-support/pps-tools/pps-tools_git.bb | meta-oe/recipes-support/pps-tools/pps-tools_git.bb | SUMMARY = "User-space tools for LinuxPPS"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.0.0+git${SRCPV}"
SRCREV = "0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
SRC_URI = "git://github.com/ago/pps-tools.git"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir} ${D}${includedir} \
${D}${includedir}/sys
oe_runmake 'DESTDIR=${D}' install
}
| SUMMARY = "User-space tools for LinuxPPS"
HOMEPAGE = "http://linuxpps.org"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.0.0+git${SRCPV}"
SRCREV = "0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
SRC_URI = "git://github.com/ago/pps-tools.git"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir} ${D}${includedir} \
${D}${includedir}/sys
oe_runmake 'DESTDIR=${D}' install
}
| Add HOMEPAGE info into recipe file. | pps-tools: Add HOMEPAGE info into recipe file.
Signed-off-by: Fan Xin <ee7a28ba56c4c7ec12bf5a3574eb24bedf0b9d89@jp.fujitsu.com>
Signed-off-by: Martin Jansa <516df3ff67e1fa5d153800b15fb204c0a1a389dc@gmail.com>
| BitBake | mit | lgirdk/meta-openembedded,lgirdk/meta-openembedded,lgirdk/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,moto-timo/meta-openembedded,VCTLabs/meta-openembedded,rehsack/meta-openembedded,kraj/meta-openembedded,moto-timo/meta-openembedded,openembedded/meta-openembedded,moto-timo/meta-openembedded,amery/meta-openembedded,openembedded/meta-openembedded,victronenergy/meta-openembedded,amery/meta-openembedded,victronenergy/meta-openembedded,kraj/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,sigma-embedded/elito-org.openembedded.meta,victronenergy/meta-openembedded,amery/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,VCTLabs/meta-openembedded,kraj/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,VCTLabs/meta-openembedded,victronenergy/meta-openembedded,amery/meta-openembedded,amery/meta-openembedded,kraj/meta-openembedded,lgirdk/meta-openembedded,rehsack/meta-openembedded,victronenergy/meta-openembedded,victronenergy/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,mrchapp/meta-openembedded,victronenergy/meta-openembedded,VCTLabs/meta-openembedded,mrchapp/meta-openembedded,VCTLabs/meta-openembedded,mrchapp/meta-openembedded,schnitzeltony/meta-openembedded,mrchapp/meta-openembedded,VCTLabs/meta-openembedded,schnitzeltony/meta-openembedded,rehsack/meta-openembedded,amery/meta-openembedded,lgirdk/meta-openembedded,lgirdk/meta-openembedded,mrchapp/meta-openembedded,mrchapp/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,rehsack/meta-openembedded,schnitzeltony/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,schnitzeltony/meta-openembedded,kraj/meta-openembedded,kraj/meta-openembedded,sigma-embedded/elito-org.openembedded.meta,openembedded/meta-openembedded,VCTLabs/meta-openembedded,amery/meta-openembedded,lgirdk/meta-openembedded,moto-timo/meta-openembedded,schnitzeltony/meta-openembedded,moto-timo/meta-openembedded,VCTLabs/meta-openembedded,kraj/meta-openembedded,amery/meta-openembedded,mrchapp/meta-openembedded,schnitzeltony/meta-openembedded | bitbake | ## Code Before:
SUMMARY = "User-space tools for LinuxPPS"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.0.0+git${SRCPV}"
SRCREV = "0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
SRC_URI = "git://github.com/ago/pps-tools.git"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir} ${D}${includedir} \
${D}${includedir}/sys
oe_runmake 'DESTDIR=${D}' install
}
## Instruction:
pps-tools: Add HOMEPAGE info into recipe file.
Signed-off-by: Fan Xin <ee7a28ba56c4c7ec12bf5a3574eb24bedf0b9d89@jp.fujitsu.com>
Signed-off-by: Martin Jansa <516df3ff67e1fa5d153800b15fb204c0a1a389dc@gmail.com>
## Code After:
SUMMARY = "User-space tools for LinuxPPS"
HOMEPAGE = "http://linuxpps.org"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.0.0+git${SRCPV}"
SRCREV = "0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
SRC_URI = "git://github.com/ago/pps-tools.git"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir} ${D}${includedir} \
${D}${includedir}/sys
oe_runmake 'DESTDIR=${D}' install
}
| SUMMARY = "User-space tools for LinuxPPS"
+ HOMEPAGE = "http://linuxpps.org"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.0.0+git${SRCPV}"
SRCREV = "0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
SRC_URI = "git://github.com/ago/pps-tools.git"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir} ${D}${includedir} \
${D}${includedir}/sys
oe_runmake 'DESTDIR=${D}' install
} | 1 | 0.0625 | 1 | 0 |
b78e302391477c5a68c05ed72bf486ab6f54098e | kitchen-ssh-cisco.gemspec | kitchen-ssh-cisco.gemspec |
$:.unshift File.expand_path('../lib', __FILE__)
Gem::Specification.new do |s|
s.name = "kitchen-ssh"
s.version = '0.1.0'
s.authors = ["Neill Turner","Carl Perry"]
s.email = ["neillwturner@gmail.com","partnereng@chef.io"]
s.homepage = "https://github.com/chef-partners/kitchen-ssh-cisco"
s.add_dependency('minitar', '~> 0.5')
s.summary = "ssh driver for test-kitchen for Linux based Cisco platform with an ip address"
candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh.gemspec']
s.files = candidates.sort
s.platform = Gem::Platform::RUBY
s.require_paths = ['lib']
s.rubyforge_project = '[none]'
s.description = <<-EOF
ssh driver for test-kitchen for any Linux based Cisco platform with an ip address
Works the same as kitchen-ssh but adds a prefix_command directive to prefix a string before every command.
Useful for changing network namespace (hint, hint)
EOF
end
|
$:.unshift File.expand_path('../lib', __FILE__)
Gem::Specification.new do |s|
s.name = "kitchen-ssh-cisco"
s.version = '0.1.0'
s.authors = ["Neill Turner","Carl Perry"]
s.email = ["neillwturner@gmail.com","partnereng@chef.io"]
s.homepage = "https://github.com/chef-partners/kitchen-ssh-cisco"
s.add_dependency('minitar', '~> 0.5')
s.summary = "ssh driver for test-kitchen for Linux based Cisco platform with an ip address"
candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh-cisco.gemspec']
s.files = candidates.sort
s.platform = Gem::Platform::RUBY
s.require_paths = ['lib']
s.rubyforge_project = '[none]'
s.description = <<-EOF
ssh driver for test-kitchen for any Linux based Cisco platform with an ip address
Works the same as kitchen-ssh but adds a prefix_command directive to prefix a string before every command.
Useful for changing network namespace (hint, hint)
EOF
end
| Fix typos in gem name | Fix typos in gem name
| Ruby | mit | chef-partners/kitchen-ssh-cisco | ruby | ## Code Before:
$:.unshift File.expand_path('../lib', __FILE__)
Gem::Specification.new do |s|
s.name = "kitchen-ssh"
s.version = '0.1.0'
s.authors = ["Neill Turner","Carl Perry"]
s.email = ["neillwturner@gmail.com","partnereng@chef.io"]
s.homepage = "https://github.com/chef-partners/kitchen-ssh-cisco"
s.add_dependency('minitar', '~> 0.5')
s.summary = "ssh driver for test-kitchen for Linux based Cisco platform with an ip address"
candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh.gemspec']
s.files = candidates.sort
s.platform = Gem::Platform::RUBY
s.require_paths = ['lib']
s.rubyforge_project = '[none]'
s.description = <<-EOF
ssh driver for test-kitchen for any Linux based Cisco platform with an ip address
Works the same as kitchen-ssh but adds a prefix_command directive to prefix a string before every command.
Useful for changing network namespace (hint, hint)
EOF
end
## Instruction:
Fix typos in gem name
## Code After:
$:.unshift File.expand_path('../lib', __FILE__)
Gem::Specification.new do |s|
s.name = "kitchen-ssh-cisco"
s.version = '0.1.0'
s.authors = ["Neill Turner","Carl Perry"]
s.email = ["neillwturner@gmail.com","partnereng@chef.io"]
s.homepage = "https://github.com/chef-partners/kitchen-ssh-cisco"
s.add_dependency('minitar', '~> 0.5')
s.summary = "ssh driver for test-kitchen for Linux based Cisco platform with an ip address"
candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh-cisco.gemspec']
s.files = candidates.sort
s.platform = Gem::Platform::RUBY
s.require_paths = ['lib']
s.rubyforge_project = '[none]'
s.description = <<-EOF
ssh driver for test-kitchen for any Linux based Cisco platform with an ip address
Works the same as kitchen-ssh but adds a prefix_command directive to prefix a string before every command.
Useful for changing network namespace (hint, hint)
EOF
end
|
$:.unshift File.expand_path('../lib', __FILE__)
Gem::Specification.new do |s|
- s.name = "kitchen-ssh"
+ s.name = "kitchen-ssh-cisco"
? ++++++
s.version = '0.1.0'
s.authors = ["Neill Turner","Carl Perry"]
s.email = ["neillwturner@gmail.com","partnereng@chef.io"]
s.homepage = "https://github.com/chef-partners/kitchen-ssh-cisco"
s.add_dependency('minitar', '~> 0.5')
s.summary = "ssh driver for test-kitchen for Linux based Cisco platform with an ip address"
- candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh.gemspec']
+ candidates = Dir.glob("{lib}/**/*") + ['README.md', 'LICENSE.txt', 'kitchen-ssh-cisco.gemspec']
? ++++++
s.files = candidates.sort
s.platform = Gem::Platform::RUBY
s.require_paths = ['lib']
s.rubyforge_project = '[none]'
s.description = <<-EOF
ssh driver for test-kitchen for any Linux based Cisco platform with an ip address
Works the same as kitchen-ssh but adds a prefix_command directive to prefix a string before every command.
Useful for changing network namespace (hint, hint)
EOF
end | 4 | 0.166667 | 2 | 2 |
89fc18975970643a67ad1170d6c5d9cf2678237b | WebGame/package.json | WebGame/package.json | {
"name" : "WebGame",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.18.3",
"socket.io": "1.2.1",
"johnny-five": "0.8.28"
}
} | {
"name" : "WebGame",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.18.3",
"socket.io": "1.2.1",
"johnny-five": "0.8.28",
"raspi-io":"1.0.3"
}
} | Add raspbery pi io to dependencies list | Add raspbery pi io to dependencies list
| JSON | mit | inf-rno/machack2014 | json | ## Code Before:
{
"name" : "WebGame",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.18.3",
"socket.io": "1.2.1",
"johnny-five": "0.8.28"
}
}
## Instruction:
Add raspbery pi io to dependencies list
## Code After:
{
"name" : "WebGame",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.18.3",
"socket.io": "1.2.1",
"johnny-five": "0.8.28",
"raspi-io":"1.0.3"
}
} | {
"name" : "WebGame",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.18.3",
"socket.io": "1.2.1",
- "johnny-five": "0.8.28"
+ "johnny-five": "0.8.28",
? +
+ "raspi-io":"1.0.3"
}
} | 3 | 0.333333 | 2 | 1 |
5d59f115d0e59599580ee4255989861fe2add56d | app/views/layouts/application.html.haml | app/views/layouts/application.html.haml | !!!
%html
%head
%title Cyclekit
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
%body
= yield
| !!!
%html
%head
%title Cyclekit
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
%body
%header
%h1 CycleKit
- [:alert, :notice].each do |type|
- if flash.key? type
.flash{class: type}
= flash[type]
.content
= yield
%footer
| Add flash output to layout. | Add flash output to layout.
| Haml | mit | cyclestreets/cyclescape,auto-mat/toolkit,auto-mat/toolkit,cyclestreets/cyclescape,cyclestreets/cyclescape | haml | ## Code Before:
!!!
%html
%head
%title Cyclekit
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
%body
= yield
## Instruction:
Add flash output to layout.
## Code After:
!!!
%html
%head
%title Cyclekit
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
%body
%header
%h1 CycleKit
- [:alert, :notice].each do |type|
- if flash.key? type
.flash{class: type}
= flash[type]
.content
= yield
%footer
| !!!
%html
%head
%title Cyclekit
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
%body
+ %header
+ %h1 CycleKit
+ - [:alert, :notice].each do |type|
+ - if flash.key? type
+ .flash{class: type}
+ = flash[type]
+ .content
- = yield
+ = yield
? ++
+ %footer | 10 | 1.111111 | 9 | 1 |
57a0d8eaffc364164a7dd1392ddf82055aa10125 | internal/main_test.go | internal/main_test.go | package main
import (
"errors"
"reflect"
"testing"
)
func TestGetMetadataProvider(t *testing.T) {
tests := []struct {
desc string
name string
err error
}{
{
desc: "supported provider",
name: "digitalocean",
err: nil,
},
{
desc: "unknown provider",
name: "not-supported",
err: errors.New("unknown provider"),
},
{
desc: "empty provider",
name: "",
err: errors.New("unknown provider"),
},
}
for _, tt := range tests {
_, err := getMetadataProvider(tt.name)
if !reflect.DeepEqual(err, tt.err) {
t.Errorf("%s:\nwant: %v\n got: %v", tt.desc, tt.err, err)
}
}
}
| package main
import (
"reflect"
"testing"
)
func TestGetMetadataProvider(t *testing.T) {
tests := []struct {
desc string
name string
err error
}{
{
desc: "supported provider",
name: "digitalocean",
err: nil,
},
{
desc: "unknown provider",
name: "not-supported",
err: ErrUnknownProvider,
},
{
desc: "empty provider",
name: "",
err: ErrUnknownProvider,
},
}
for _, tt := range tests {
_, err := getMetadataProvider(tt.name)
if !reflect.DeepEqual(err, tt.err) {
t.Errorf("%s:\nwant: %v\n got: %v", tt.desc, tt.err, err)
}
}
}
| Use ErrUnknownProvider in tests as well | internal: Use ErrUnknownProvider in tests as well
| Go | apache-2.0 | coreos/coreos-metadata | go | ## Code Before:
package main
import (
"errors"
"reflect"
"testing"
)
func TestGetMetadataProvider(t *testing.T) {
tests := []struct {
desc string
name string
err error
}{
{
desc: "supported provider",
name: "digitalocean",
err: nil,
},
{
desc: "unknown provider",
name: "not-supported",
err: errors.New("unknown provider"),
},
{
desc: "empty provider",
name: "",
err: errors.New("unknown provider"),
},
}
for _, tt := range tests {
_, err := getMetadataProvider(tt.name)
if !reflect.DeepEqual(err, tt.err) {
t.Errorf("%s:\nwant: %v\n got: %v", tt.desc, tt.err, err)
}
}
}
## Instruction:
internal: Use ErrUnknownProvider in tests as well
## Code After:
package main
import (
"reflect"
"testing"
)
func TestGetMetadataProvider(t *testing.T) {
tests := []struct {
desc string
name string
err error
}{
{
desc: "supported provider",
name: "digitalocean",
err: nil,
},
{
desc: "unknown provider",
name: "not-supported",
err: ErrUnknownProvider,
},
{
desc: "empty provider",
name: "",
err: ErrUnknownProvider,
},
}
for _, tt := range tests {
_, err := getMetadataProvider(tt.name)
if !reflect.DeepEqual(err, tt.err) {
t.Errorf("%s:\nwant: %v\n got: %v", tt.desc, tt.err, err)
}
}
}
| package main
import (
- "errors"
"reflect"
"testing"
)
func TestGetMetadataProvider(t *testing.T) {
tests := []struct {
desc string
name string
err error
}{
{
desc: "supported provider",
name: "digitalocean",
err: nil,
},
{
desc: "unknown provider",
name: "not-supported",
- err: errors.New("unknown provider"),
+ err: ErrUnknownProvider,
},
{
desc: "empty provider",
name: "",
- err: errors.New("unknown provider"),
+ err: ErrUnknownProvider,
},
}
for _, tt := range tests {
_, err := getMetadataProvider(tt.name)
if !reflect.DeepEqual(err, tt.err) {
t.Errorf("%s:\nwant: %v\n got: %v", tt.desc, tt.err, err)
}
}
} | 5 | 0.131579 | 2 | 3 |
fa72183c9ac4b7c1884117559f04e9bf31e55c54 | test/test_cli.js | test/test_cli.js | var test = require('tape');
var child = require('child_process');
test('--client chrome', function(t) {
var exe = child.spawn('node', ['./bin/cmd.js', '--client', 'chrome', 'fixture/console.js']);
exe.on('close', function() {
t.end();
});
exe.stdout.on('data', function(data) {
t.equal(data.toString(), 'ok\n');
exe.kill();
});
});
| var test = require('tape');
var child = require('child_process');
var bin = './bin/cmd.js';
test('amok --client chrome fixture/console.js', function(t) {
t.plan(1);
var exe = child.spawn('node', [bin, '--client', 'chrome', 'test/fixture/console.js']);
exe.stdout.once('data', function(data) {
t.equal(data.toString(), 'ok\n');
exe.kill();
});
});
| Clean up chrome console test case | Clean up chrome console test case
| JavaScript | mit | stereokai/amok,stereokai/amok,stereokai/amok | javascript | ## Code Before:
var test = require('tape');
var child = require('child_process');
test('--client chrome', function(t) {
var exe = child.spawn('node', ['./bin/cmd.js', '--client', 'chrome', 'fixture/console.js']);
exe.on('close', function() {
t.end();
});
exe.stdout.on('data', function(data) {
t.equal(data.toString(), 'ok\n');
exe.kill();
});
});
## Instruction:
Clean up chrome console test case
## Code After:
var test = require('tape');
var child = require('child_process');
var bin = './bin/cmd.js';
test('amok --client chrome fixture/console.js', function(t) {
t.plan(1);
var exe = child.spawn('node', [bin, '--client', 'chrome', 'test/fixture/console.js']);
exe.stdout.once('data', function(data) {
t.equal(data.toString(), 'ok\n');
exe.kill();
});
});
| var test = require('tape');
var child = require('child_process');
+ var bin = './bin/cmd.js';
- test('--client chrome', function(t) {
+ test('amok --client chrome fixture/console.js', function(t) {
? +++++ +++++++++++++++++++
+ t.plan(1);
- var exe = child.spawn('node', ['./bin/cmd.js', '--client', 'chrome', 'fixture/console.js']);
- exe.on('close', function() {
- t.end();
- });
+ var exe = child.spawn('node', [bin, '--client', 'chrome', 'test/fixture/console.js']);
- exe.stdout.on('data', function(data) {
+ exe.stdout.once('data', function(data) {
? ++
t.equal(data.toString(), 'ok\n');
exe.kill();
});
}); | 11 | 0.785714 | 5 | 6 |
762b8cd461a72c9d22fadd61fe7d15a13c34e97e | src/_mixins.scss | src/_mixins.scss | @mixin clearfix {
&::before,
&::after {
content: ' ';
display: table;
}
&::after {
clear: both;
}
}
@mixin shadow-low {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2);
}
| @mixin clearfix {
&::after {
clear: both;
content: ' ';
display: table;
}
}
@mixin shadow-low {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2);
}
| Update clearfix for modern browsers | Update clearfix for modern browsers
| SCSS | mit | kiswa/scss-base,kiswa/scss-base | scss | ## Code Before:
@mixin clearfix {
&::before,
&::after {
content: ' ';
display: table;
}
&::after {
clear: both;
}
}
@mixin shadow-low {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2);
}
## Instruction:
Update clearfix for modern browsers
## Code After:
@mixin clearfix {
&::after {
clear: both;
content: ' ';
display: table;
}
}
@mixin shadow-low {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2);
}
| @mixin clearfix {
- &::before,
&::after {
+ clear: both;
content: ' ';
display: table;
- }
-
- &::after {
- clear: both;
}
}
@mixin shadow-low {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2);
} | 6 | 0.352941 | 1 | 5 |
2d01643601a2a3dfa22933289b271425dd2c574b | app/views/groups/show.html.haml | app/views/groups/show.html.haml | .group-title
%span
%h2
= link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
= " - " unless @group.parent.nil?
= @group.name
- if @group.can_be_edited_by? current_user
= link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
- if @group.users_include? current_user
- membership = current_user.group_membership(@group)
= link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
confirm: "Are you sure you wish to leave #{@group.name}?"
.row
%section.span4#content-left
- if display_subgroups_block?(@group)
.block
=render 'subgroups', group: @group
=render 'users', group: @group
%section.span8#content-main
%h1 Discussions
= link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
#discussions
- @group.discussions_sorted.each do |discussion|
=render discussion
| .group-title
%span
%h2
= link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
= " - " unless @group.parent.nil?
= @group.name
- if @group.can_be_edited_by? current_user
= link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
- if @group.users_include? current_user
- membership = current_user.group_membership(@group)
= link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
confirm: "Are you sure you wish to leave #{@group.name}?"
.row
%section.span4#content-left
- if display_subgroups_block?(@group)
.block
=render 'subgroups', group: @group
=render 'users', group: @group
%section.span8#content-main
%h1 Discussions
- if current_user && @group.users_include?(current_user)
= link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
#discussions
- @group.discussions_sorted.each do |discussion|
=render discussion
| Remove 'Start a new discussion' button for non-members. | Remove 'Start a new discussion' button for non-members.
| Haml | agpl-3.0 | podemos-info/loomio,rafacouto/loomio-bak,travis-repos/loomio,podemos-info/loomio,rafacouto/loomio-bak,travis-repos/loomio,rafacouto/loomio-bak,podemos-info/loomio | haml | ## Code Before:
.group-title
%span
%h2
= link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
= " - " unless @group.parent.nil?
= @group.name
- if @group.can_be_edited_by? current_user
= link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
- if @group.users_include? current_user
- membership = current_user.group_membership(@group)
= link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
confirm: "Are you sure you wish to leave #{@group.name}?"
.row
%section.span4#content-left
- if display_subgroups_block?(@group)
.block
=render 'subgroups', group: @group
=render 'users', group: @group
%section.span8#content-main
%h1 Discussions
= link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
#discussions
- @group.discussions_sorted.each do |discussion|
=render discussion
## Instruction:
Remove 'Start a new discussion' button for non-members.
## Code After:
.group-title
%span
%h2
= link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
= " - " unless @group.parent.nil?
= @group.name
- if @group.can_be_edited_by? current_user
= link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
- if @group.users_include? current_user
- membership = current_user.group_membership(@group)
= link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
confirm: "Are you sure you wish to leave #{@group.name}?"
.row
%section.span4#content-left
- if display_subgroups_block?(@group)
.block
=render 'subgroups', group: @group
=render 'users', group: @group
%section.span8#content-main
%h1 Discussions
- if current_user && @group.users_include?(current_user)
= link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
#discussions
- @group.discussions_sorted.each do |discussion|
=render discussion
| .group-title
%span
%h2
= link_to @group.parent.name, group_path(@group.parent), title: "group" unless @group.parent.nil?
= " - " unless @group.parent.nil?
= @group.name
- if @group.can_be_edited_by? current_user
= link_to "Edit group", edit_group_path(@group), class: "btn btn-mini"
- if @group.users_include? current_user
- membership = current_user.group_membership(@group)
= link_to "Leave group", membership, method: :delete, class: "btn btn-mini",
confirm: "Are you sure you wish to leave #{@group.name}?"
.row
%section.span4#content-left
- if display_subgroups_block?(@group)
.block
=render 'subgroups', group: @group
=render 'users', group: @group
%section.span8#content-main
%h1 Discussions
+ - if current_user && @group.users_include?(current_user)
- = link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
+ = link_to 'Start a new discussion', new_discussion_path(discussion: { group_id: @group }), class: "btn btn-info", id: "new-discussion"
? ++
#discussions
- @group.discussions_sorted.each do |discussion|
=render discussion | 3 | 0.115385 | 2 | 1 |
72348df75e96188345f897bef56ec81aca9a826e | test/Feature/packed.ll | test/Feature/packed.ll | ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
; RUN: llvm-as < %s | llvm-dis
%foo1 = uninitialized global <4 x float>;
%foo2 = uninitialized global <2 x int>;
implementation ; Functions:
void %main()
{
store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
store <2 x int> <int 4, int 4>, <2 x int>* %foo2
%l1 = load <4 x float>* %foo1
%l2 = load <2 x int>* %foo2
ret void
}
| ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
%foo1 = uninitialized global <4 x float>;
%foo2 = uninitialized global <2 x int>;
implementation ; Functions:
void %main()
{
store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
store <2 x int> <int 4, int 4>, <2 x int>* %foo2
%l1 = load <4 x float>* %foo1
%l2 = load <2 x int>* %foo2
ret void
}
| Remove a redundant RUN: line. | Remove a redundant RUN: line.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@32126 91177308-0d34-0410-b5e6-96231b3b80d8
| LLVM | apache-2.0 | apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm | llvm | ## Code Before:
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
; RUN: llvm-as < %s | llvm-dis
%foo1 = uninitialized global <4 x float>;
%foo2 = uninitialized global <2 x int>;
implementation ; Functions:
void %main()
{
store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
store <2 x int> <int 4, int 4>, <2 x int>* %foo2
%l1 = load <4 x float>* %foo1
%l2 = load <2 x int>* %foo2
ret void
}
## Instruction:
Remove a redundant RUN: line.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@32126 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
%foo1 = uninitialized global <4 x float>;
%foo2 = uninitialized global <2 x int>;
implementation ; Functions:
void %main()
{
store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
store <2 x int> <int 4, int 4>, <2 x int>* %foo2
%l1 = load <4 x float>* %foo1
%l2 = load <2 x int>* %foo2
ret void
}
| ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
-
- ; RUN: llvm-as < %s | llvm-dis
%foo1 = uninitialized global <4 x float>;
%foo2 = uninitialized global <2 x int>;
implementation ; Functions:
void %main()
{
store <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>, <4 x float>* %foo1
store <2 x int> <int 4, int 4>, <2 x int>* %foo2
%l1 = load <4 x float>* %foo1
%l2 = load <2 x int>* %foo2
ret void
} | 2 | 0.105263 | 0 | 2 |
045bfced2b386df9ff2f0f648bc96f2bd1c37be6 | source/docs/version/index.html.slim | source/docs/version/index.html.slim | - content_for(:title, "Bourbon Documentation | #{version}")
- content_for(:preferred_path, "docs/#{version}")
section
.container
ul
- versions.each do |version|
li
= link_to version, "/docs/#{version}"
nav
ol
- version.doc_items.each do |item|
li
= link_to "##{item.context.name}" do
code
= item.context.name
- version.doc_items.each do |item|
article.doc-item id="#{item.context.name}"
= partial "partials/doc_item_header", locals: { item: item }
- if item.parameter.present?
= partial "partials/doc_item_arguments", locals: { item: item }
- if item.example.present?
= partial "partials/doc_item_example", locals: { item: item }
| - content_for(:title, "Bourbon Documentation | #{version}")
- content_for(:preferred_path, "docs/#{version}")
section
.container
nav
ol
- version.doc_items.each do |item|
li
= link_to "##{item.context.name}" do
code
= item.context.name
- version.doc_items.each do |item|
article.doc-item id="#{item.context.name}"
= partial "partials/doc_item_header", locals: { item: item }
- if item.parameter.present?
= partial "partials/doc_item_arguments", locals: { item: item }
- if item.example.present?
= partial "partials/doc_item_example", locals: { item: item }
| Remove versions nav for now | Remove versions nav for now
| Slim | mit | thoughtbot/bourbon.io,thoughtbot/bourbon.io,thoughtbot/bourbon.io,thoughtbot/bourbon.io | slim | ## Code Before:
- content_for(:title, "Bourbon Documentation | #{version}")
- content_for(:preferred_path, "docs/#{version}")
section
.container
ul
- versions.each do |version|
li
= link_to version, "/docs/#{version}"
nav
ol
- version.doc_items.each do |item|
li
= link_to "##{item.context.name}" do
code
= item.context.name
- version.doc_items.each do |item|
article.doc-item id="#{item.context.name}"
= partial "partials/doc_item_header", locals: { item: item }
- if item.parameter.present?
= partial "partials/doc_item_arguments", locals: { item: item }
- if item.example.present?
= partial "partials/doc_item_example", locals: { item: item }
## Instruction:
Remove versions nav for now
## Code After:
- content_for(:title, "Bourbon Documentation | #{version}")
- content_for(:preferred_path, "docs/#{version}")
section
.container
nav
ol
- version.doc_items.each do |item|
li
= link_to "##{item.context.name}" do
code
= item.context.name
- version.doc_items.each do |item|
article.doc-item id="#{item.context.name}"
= partial "partials/doc_item_header", locals: { item: item }
- if item.parameter.present?
= partial "partials/doc_item_arguments", locals: { item: item }
- if item.example.present?
= partial "partials/doc_item_example", locals: { item: item }
| - content_for(:title, "Bourbon Documentation | #{version}")
- content_for(:preferred_path, "docs/#{version}")
section
.container
- ul
- - versions.each do |version|
- li
- = link_to version, "/docs/#{version}"
nav
ol
- version.doc_items.each do |item|
li
= link_to "##{item.context.name}" do
code
= item.context.name
- version.doc_items.each do |item|
article.doc-item id="#{item.context.name}"
= partial "partials/doc_item_header", locals: { item: item }
- if item.parameter.present?
= partial "partials/doc_item_arguments", locals: { item: item }
- if item.example.present?
= partial "partials/doc_item_example", locals: { item: item } | 4 | 0.166667 | 0 | 4 |
d4bcb018a61964502a5e5f25107e3a722a90a122 | .travis.yml | .travis.yml | on:
tags: true
sudo: required
services:
- docker
before_install:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- ALPINE_ID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
- docker tag $ALPINE_ID "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine"
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge" -f Dockerfile .
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch" -f Dockerfile.arch . # Build with Arch
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang" -f Dockerfile.golang . # Build with Golang
after_success:
- docker push carbonsrv/carbon
| on:
tags: true
sudo: required
services:
- docker
before_install:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- ALPINE_ID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
- docker tag $ALPINE_ID "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine"
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge" -f Dockerfile .
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch" -f Dockerfile.arch . # Build with Arch
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang" -f Dockerfile.golang . # Build with Golang
after_success:
- docker push carbonsrv/carbon
| Copy build output to stderr too, so you can see it. | Docker: Copy build output to stderr too, so you can see it.
| YAML | mit | carbonsrv/carbon,vifino/carbon,carbonsrv/carbon,vifino/carbon,carbonsrv/carbon,vifino/carbon | yaml | ## Code Before:
on:
tags: true
sudo: required
services:
- docker
before_install:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- ALPINE_ID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
- docker tag $ALPINE_ID "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine"
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge" -f Dockerfile .
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch" -f Dockerfile.arch . # Build with Arch
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang" -f Dockerfile.golang . # Build with Golang
after_success:
- docker push carbonsrv/carbon
## Instruction:
Docker: Copy build output to stderr too, so you can see it.
## Code After:
on:
tags: true
sudo: required
services:
- docker
before_install:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- ALPINE_ID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
- docker tag $ALPINE_ID "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine"
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge" -f Dockerfile .
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch" -f Dockerfile.arch . # Build with Arch
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang" -f Dockerfile.golang . # Build with Golang
after_success:
- docker push carbonsrv/carbon
| on:
tags: true
sudo: required
services:
- docker
before_install:
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- - ALPINE_ID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
+ - ALPINE_ID=$(docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}" -f Dockerfile . | tee /dev/stderr | tail -1 | sed 's/.*Successfully built \(.*\)$/\1/') # Build with Alpine
? ++++++++++++++++++
- docker tag $ALPINE_ID "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine"
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-alpine_edge" -f Dockerfile .
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-arch" -f Dockerfile.arch . # Build with Arch
- docker build -t "carbonsrv/carbon:${TRAVIS_TAG:-latest}-golang" -f Dockerfile.golang . # Build with Golang
after_success:
- docker push carbonsrv/carbon | 2 | 0.1 | 1 | 1 |
f617920b8e3c8e66284ceb6e12fd5740274d0d42 | .travis.yml | .travis.yml | language: java
jdk:
- oraclejdk8
matrix:
include:
- os: linux
- os: osx
osx_image: xcode9.3
| language: java
matrix:
include:
- os: linux
dist: trusty
jdk:
- openjdk8
- os: osx
osx_image: xcode9.3
jdk:
- oraclejdk8
| Use OpenJDK and trusty Linux. | Use OpenJDK and trusty Linux.
| YAML | mit | dblock/jenkins-ansicolor-plugin,jenkinsci/ansicolor-plugin,jenkinsci/ansicolor-plugin,dblock/jenkins-ansicolor-plugin | yaml | ## Code Before:
language: java
jdk:
- oraclejdk8
matrix:
include:
- os: linux
- os: osx
osx_image: xcode9.3
## Instruction:
Use OpenJDK and trusty Linux.
## Code After:
language: java
matrix:
include:
- os: linux
dist: trusty
jdk:
- openjdk8
- os: osx
osx_image: xcode9.3
jdk:
- oraclejdk8
| language: java
+
- jdk:
- - oraclejdk8
matrix:
include:
- os: linux
+ dist: trusty
+ jdk:
+ - openjdk8
- os: osx
osx_image: xcode9.3
+ jdk:
+ - oraclejdk8 | 8 | 1 | 6 | 2 |
3b7328dd7d9d235bf32b3cfb836b49e50b70be77 | oz/plugins/redis_sessions/__init__.py | oz/plugins/redis_sessions/__init__.py | from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(os.urandom(length))[length:]
def password_hash(password, password_salt=None):
"""Hashes a specified password"""
password_salt = password_salt or oz.app.settings["session_salt"]
return u"sha256!%s" % hashlib.sha256(unicode(password_salt) + unicode(password)).hexdigest()
| from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(os.urandom(length))[length:]
def password_hash(password, password_salt=None):
"""Hashes a specified password"""
password_salt = password_salt or oz.app.settings["session_salt"]
salted_password = "".join([unicode(password_salt), password])
return "sha256!%s" % unicode(hashlib.sha256(salted_password.encode("utf-8")).hexdigest())
| Allow for non-ascii characters in password_hash | Allow for non-ascii characters in password_hash
| Python | bsd-3-clause | dailymuse/oz,dailymuse/oz,dailymuse/oz | python | ## Code Before:
from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(os.urandom(length))[length:]
def password_hash(password, password_salt=None):
"""Hashes a specified password"""
password_salt = password_salt or oz.app.settings["session_salt"]
return u"sha256!%s" % hashlib.sha256(unicode(password_salt) + unicode(password)).hexdigest()
## Instruction:
Allow for non-ascii characters in password_hash
## Code After:
from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(os.urandom(length))[length:]
def password_hash(password, password_salt=None):
"""Hashes a specified password"""
password_salt = password_salt or oz.app.settings["session_salt"]
salted_password = "".join([unicode(password_salt), password])
return "sha256!%s" % unicode(hashlib.sha256(salted_password.encode("utf-8")).hexdigest())
| from __future__ import absolute_import, division, print_function, with_statement, unicode_literals
import os
import binascii
import hashlib
import oz.app
from .middleware import *
from .options import *
from .tests import *
def random_hex(length):
"""Generates a random hex string"""
return binascii.hexlify(os.urandom(length))[length:]
def password_hash(password, password_salt=None):
"""Hashes a specified password"""
password_salt = password_salt or oz.app.settings["session_salt"]
- return u"sha256!%s" % hashlib.sha256(unicode(password_salt) + unicode(password)).hexdigest()
+ salted_password = "".join([unicode(password_salt), password])
+ return "sha256!%s" % unicode(hashlib.sha256(salted_password.encode("utf-8")).hexdigest()) | 3 | 0.157895 | 2 | 1 |
e1851bb67559b0ef8427a531fa2dce3aa816da2d | .travis.yml | .travis.yml | sudo: required
dist: trusty
language: python
python:
- '2.6'
- '2.7'
- '3.2'
- '3.3'
- '3.4'
- '3.5'
- '3.5-dev'
- 'nightly'
- 'pypy'
- 'pypy3'
matrix:
allow_failures:
- python: '2.6'
- python: '3.2'
- python: '3.5-dev'
- python: 'nightly'
- python: 'pypy'
- python: 'pypy3'
addons:
apt:
packages:
- texlive-latex-extra
- texlive-pictures
- texlive-science
- texlive-full
install:
- pip install 3to2 future
- pip install -r dev_requirements.txt
script: ./testall.sh
| sudo: required
dist: trusty
language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.5-dev'
- 'nightly'
matrix:
allow_failures:
- python: '3.5-dev'
- python: 'nightly'
addons:
apt:
packages:
- texlive-latex-extra
- texlive-pictures
- texlive-science
- texlive-fonts-recommended
install:
- pip install 3to2 future
- pip install -r dev_requirements.txt
script: ./testall.sh
| Remove broken python builds and don't use texlive-full | Report: Remove broken python builds and don't use texlive-full
| YAML | mit | JelteF/PyLaTeX,JelteF/PyLaTeX | yaml | ## Code Before:
sudo: required
dist: trusty
language: python
python:
- '2.6'
- '2.7'
- '3.2'
- '3.3'
- '3.4'
- '3.5'
- '3.5-dev'
- 'nightly'
- 'pypy'
- 'pypy3'
matrix:
allow_failures:
- python: '2.6'
- python: '3.2'
- python: '3.5-dev'
- python: 'nightly'
- python: 'pypy'
- python: 'pypy3'
addons:
apt:
packages:
- texlive-latex-extra
- texlive-pictures
- texlive-science
- texlive-full
install:
- pip install 3to2 future
- pip install -r dev_requirements.txt
script: ./testall.sh
## Instruction:
Report: Remove broken python builds and don't use texlive-full
## Code After:
sudo: required
dist: trusty
language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.5-dev'
- 'nightly'
matrix:
allow_failures:
- python: '3.5-dev'
- python: 'nightly'
addons:
apt:
packages:
- texlive-latex-extra
- texlive-pictures
- texlive-science
- texlive-fonts-recommended
install:
- pip install 3to2 future
- pip install -r dev_requirements.txt
script: ./testall.sh
| sudo: required
dist: trusty
language: python
python:
- - '2.6'
- '2.7'
- - '3.2'
- '3.3'
- '3.4'
- '3.5'
- '3.5-dev'
- 'nightly'
- - 'pypy'
- - 'pypy3'
matrix:
allow_failures:
- - python: '2.6'
- - python: '3.2'
- python: '3.5-dev'
- python: 'nightly'
- - python: 'pypy'
- - python: 'pypy3'
addons:
apt:
packages:
- texlive-latex-extra
- texlive-pictures
- texlive-science
- - texlive-full
+ - texlive-fonts-recommended
install:
- pip install 3to2 future
- pip install -r dev_requirements.txt
script: ./testall.sh | 10 | 0.277778 | 1 | 9 |
8a613ea8e691beb543bc4c5060bfe042bbae64b0 | packages/CodingStandard/config/symplify.yml | packages/CodingStandard/config/symplify.yml | services:
# class has to be final, abstract or Doctrine entity
SlamCsFixer\FinalInternalClassFixer: ~
# import namespaces for classes, constants and functions
# configuration: https://github.com/slevomat/coding-standard#slevomatcodingstandardnamespacesreferenceusednamesonly-
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
allowFallbackGlobalFunctions: true
allowFallbackGlobalConstants: true
# see https://github.com/symplify/codingstandard to see all loaded Symplify checkers
Symplify\CodingStandard\:
resource: '../src'
# checkers that needs configuration to run
exclude: '../src/{Sniffs/DeadCode/UnusedPublicMethodSniff.php,Sniffs/CleanCode/ForbiddenParentClassSniff.php,Fixer/Order/MethodOrderByTypeFixer.php}'
| services:
# class has to be final, abstract or Doctrine entity
SlamCsFixer\FinalInternalClassFixer: ~
# import namespaces for classes, constants and functions
# configuration: https://github.com/slevomat/coding-standard#slevomatcodingstandardnamespacesreferenceusednamesonly-
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
searchAnnotations: true
allowFallbackGlobalFunctions: true
allowFallbackGlobalConstants: true
# see https://github.com/symplify/codingstandard to see all loaded Symplify checkers
Symplify\CodingStandard\:
resource: '../src'
# checkers that needs configuration to run
exclude: '../src/{Sniffs/DeadCode/UnusedPublicMethodSniff.php,Sniffs/CleanCode/ForbiddenParentClassSniff.php,Fixer/Order/MethodOrderByTypeFixer.php}'
| Fix old import namespace name compat | [CodingStandard] Fix old import namespace name compat
| YAML | mit | Symplify/Symplify,Symplify/Symplify,Symplify/Symplify,Symplify/Symplify | yaml | ## Code Before:
services:
# class has to be final, abstract or Doctrine entity
SlamCsFixer\FinalInternalClassFixer: ~
# import namespaces for classes, constants and functions
# configuration: https://github.com/slevomat/coding-standard#slevomatcodingstandardnamespacesreferenceusednamesonly-
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
allowFallbackGlobalFunctions: true
allowFallbackGlobalConstants: true
# see https://github.com/symplify/codingstandard to see all loaded Symplify checkers
Symplify\CodingStandard\:
resource: '../src'
# checkers that needs configuration to run
exclude: '../src/{Sniffs/DeadCode/UnusedPublicMethodSniff.php,Sniffs/CleanCode/ForbiddenParentClassSniff.php,Fixer/Order/MethodOrderByTypeFixer.php}'
## Instruction:
[CodingStandard] Fix old import namespace name compat
## Code After:
services:
# class has to be final, abstract or Doctrine entity
SlamCsFixer\FinalInternalClassFixer: ~
# import namespaces for classes, constants and functions
# configuration: https://github.com/slevomat/coding-standard#slevomatcodingstandardnamespacesreferenceusednamesonly-
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
searchAnnotations: true
allowFallbackGlobalFunctions: true
allowFallbackGlobalConstants: true
# see https://github.com/symplify/codingstandard to see all loaded Symplify checkers
Symplify\CodingStandard\:
resource: '../src'
# checkers that needs configuration to run
exclude: '../src/{Sniffs/DeadCode/UnusedPublicMethodSniff.php,Sniffs/CleanCode/ForbiddenParentClassSniff.php,Fixer/Order/MethodOrderByTypeFixer.php}'
| services:
# class has to be final, abstract or Doctrine entity
SlamCsFixer\FinalInternalClassFixer: ~
# import namespaces for classes, constants and functions
# configuration: https://github.com/slevomat/coding-standard#slevomatcodingstandardnamespacesreferenceusednamesonly-
SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff:
+ searchAnnotations: true
allowFallbackGlobalFunctions: true
allowFallbackGlobalConstants: true
# see https://github.com/symplify/codingstandard to see all loaded Symplify checkers
Symplify\CodingStandard\:
resource: '../src'
# checkers that needs configuration to run
exclude: '../src/{Sniffs/DeadCode/UnusedPublicMethodSniff.php,Sniffs/CleanCode/ForbiddenParentClassSniff.php,Fixer/Order/MethodOrderByTypeFixer.php}' | 1 | 0.066667 | 1 | 0 |
9149bd2c3a9a443367b31bc99c55b69cb60e920b | IRKit/IRKit/IRHTTPJSONOperation.h | IRKit/IRKit/IRHTTPJSONOperation.h | //
// IRHTTPJSONOperation.h
// IRKit
//
// Created by Masakazu Ohtsuka on 2013/12/02.
//
//
#import "ISHTTPOperation.h"
@interface IRHTTPJSONOperation : ISHTTPOperation
@end
| //
// IRHTTPJSONOperation.h
// IRKit
//
// Created by Masakazu Ohtsuka on 2013/12/02.
//
//
// #import "ISHTTPOperation.h"
@import ISHTTPOperation;
@interface IRHTTPJSONOperation : ISHTTPOperation
@end
| Fix again error: include of non-modular header inside framework module | Fix again error: include of non-modular header inside framework module
| C | mit | irkit/ios-sdk | c | ## Code Before:
//
// IRHTTPJSONOperation.h
// IRKit
//
// Created by Masakazu Ohtsuka on 2013/12/02.
//
//
#import "ISHTTPOperation.h"
@interface IRHTTPJSONOperation : ISHTTPOperation
@end
## Instruction:
Fix again error: include of non-modular header inside framework module
## Code After:
//
// IRHTTPJSONOperation.h
// IRKit
//
// Created by Masakazu Ohtsuka on 2013/12/02.
//
//
// #import "ISHTTPOperation.h"
@import ISHTTPOperation;
@interface IRHTTPJSONOperation : ISHTTPOperation
@end
| //
// IRHTTPJSONOperation.h
// IRKit
//
// Created by Masakazu Ohtsuka on 2013/12/02.
//
//
- #import "ISHTTPOperation.h"
+ // #import "ISHTTPOperation.h"
? +++
+ @import ISHTTPOperation;
@interface IRHTTPJSONOperation : ISHTTPOperation
-
@end | 4 | 0.285714 | 2 | 2 |
37944572389464400a1d67d993157ddfe9826c3c | UIFXKit/effects/ripple/ripple_shader.frag | UIFXKit/effects/ripple/ripple_shader.frag | uniform sampler2D uTexture;
varying highp vec3 vFragPosition;
varying mediump vec2 vFragTextureCoords;
uniform highp vec3 uRippleOrigin;
uniform highp float uRippleRadius;
#define kFrequency .05
#define kMaxAmplitude .02
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator);
void main()
{
//vector from ripple origin to current fragment
highp vec3 radial = vFragPosition - uRippleOrigin;
//Distance from fragment to ripple orgin
highp float dCenter = length(radial);
//Distance from fragment to wave edge
highp float dEdge = uRippleRadius - dCenter;
highp float radialTextureOffset = sin(dEdge * kFrequency) * kMaxAmplitude;
highp vec2 modUV = modulateUVAlongAxis(vFragTextureCoords, radial.xy, radialTextureOffset);
gl_FragColor = texture2D(uTexture, modUV);
}
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator)
{
highp vec2 nAxis = normalize(axis);
return uv + nAxis * modulator;
} | uniform sampler2D uTexture;
varying highp vec3 vFragPosition;
varying mediump vec2 vFragTextureCoords;
uniform highp vec3 uRippleOrigin;
uniform highp float uRippleRadius;
#define kFrequency .05
#define kMaxAmplitude .02
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator);
void main()
{
//vector from ripple origin to current fragment
highp vec3 radial = vFragPosition - uRippleOrigin;
//Distance from fragment to ripple orgin
highp float dCenter = length(radial);
//Distance from fragment to wave edge
highp float dEdge = uRippleRadius - dCenter;
highp float radialTextureOffset = sin(dEdge * kFrequency) * kMaxAmplitude;
highp vec2 modUV = modulateUVAlongAxis(vFragTextureCoords, radial.xy, radialTextureOffset);
gl_FragColor = texture2D(uTexture, modUV);
if (dCenter > uRippleRadius)
{
gl_FragColor = texture2D(uTexture, vFragTextureCoords);
} else {
gl_FragColor = texture2D(uTexture, modUV);
}
}
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator)
{
highp vec2 nAxis = normalize(axis);
return uv + nAxis * modulator;
}
| Make ripple emanate from the ripple origin | Make ripple emanate from the ripple origin
Fragments outside the ripple radius are unmodulated, fragments inside
are modulated like a wave.
| GLSL | mit | Tylerc230/UIFXKit | glsl | ## Code Before:
uniform sampler2D uTexture;
varying highp vec3 vFragPosition;
varying mediump vec2 vFragTextureCoords;
uniform highp vec3 uRippleOrigin;
uniform highp float uRippleRadius;
#define kFrequency .05
#define kMaxAmplitude .02
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator);
void main()
{
//vector from ripple origin to current fragment
highp vec3 radial = vFragPosition - uRippleOrigin;
//Distance from fragment to ripple orgin
highp float dCenter = length(radial);
//Distance from fragment to wave edge
highp float dEdge = uRippleRadius - dCenter;
highp float radialTextureOffset = sin(dEdge * kFrequency) * kMaxAmplitude;
highp vec2 modUV = modulateUVAlongAxis(vFragTextureCoords, radial.xy, radialTextureOffset);
gl_FragColor = texture2D(uTexture, modUV);
}
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator)
{
highp vec2 nAxis = normalize(axis);
return uv + nAxis * modulator;
}
## Instruction:
Make ripple emanate from the ripple origin
Fragments outside the ripple radius are unmodulated, fragments inside
are modulated like a wave.
## Code After:
uniform sampler2D uTexture;
varying highp vec3 vFragPosition;
varying mediump vec2 vFragTextureCoords;
uniform highp vec3 uRippleOrigin;
uniform highp float uRippleRadius;
#define kFrequency .05
#define kMaxAmplitude .02
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator);
void main()
{
//vector from ripple origin to current fragment
highp vec3 radial = vFragPosition - uRippleOrigin;
//Distance from fragment to ripple orgin
highp float dCenter = length(radial);
//Distance from fragment to wave edge
highp float dEdge = uRippleRadius - dCenter;
highp float radialTextureOffset = sin(dEdge * kFrequency) * kMaxAmplitude;
highp vec2 modUV = modulateUVAlongAxis(vFragTextureCoords, radial.xy, radialTextureOffset);
gl_FragColor = texture2D(uTexture, modUV);
if (dCenter > uRippleRadius)
{
gl_FragColor = texture2D(uTexture, vFragTextureCoords);
} else {
gl_FragColor = texture2D(uTexture, modUV);
}
}
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator)
{
highp vec2 nAxis = normalize(axis);
return uv + nAxis * modulator;
}
| uniform sampler2D uTexture;
varying highp vec3 vFragPosition;
varying mediump vec2 vFragTextureCoords;
uniform highp vec3 uRippleOrigin;
uniform highp float uRippleRadius;
#define kFrequency .05
#define kMaxAmplitude .02
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator);
void main()
{
//vector from ripple origin to current fragment
highp vec3 radial = vFragPosition - uRippleOrigin;
//Distance from fragment to ripple orgin
highp float dCenter = length(radial);
//Distance from fragment to wave edge
highp float dEdge = uRippleRadius - dCenter;
highp float radialTextureOffset = sin(dEdge * kFrequency) * kMaxAmplitude;
highp vec2 modUV = modulateUVAlongAxis(vFragTextureCoords, radial.xy, radialTextureOffset);
gl_FragColor = texture2D(uTexture, modUV);
+
+ if (dCenter > uRippleRadius)
+ {
+ gl_FragColor = texture2D(uTexture, vFragTextureCoords);
+ } else {
+ gl_FragColor = texture2D(uTexture, modUV);
+ }
}
mediump vec2 modulateUVAlongAxis(in mediump vec2 uv, in highp vec2 axis, in highp float modulator)
{
highp vec2 nAxis = normalize(axis);
return uv + nAxis * modulator;
} | 7 | 0.21875 | 7 | 0 |
41d096ccb865ca23b5aa0ee2bc80f529e00cff04 | app/views/buckets/_issue.html.erb | app/views/buckets/_issue.html.erb | <li class="ui-state-default issue collapsed" data-prioritized-issue-path="<%= prioritized_issue_move_to_bucket_path(issue) %>">
<%= form_tag "/", :class => "issue-state-toggle" do %>
<%= check_box_tag :state, issue.closed?, issue.closed? %>
<% end %>
<%= link_to issue.title, github_issue_url(issue), :class => "issue-link" %>
<div class="issue-details">
<%= link_to "#{issue.owner} / #{issue.repository}", github_repository_url(issue), :class => "issue-repository-label" %>
<%= link_to "@#{issue.assignee}", github_user_url(issue), :class => "issue-assignee" if issue.assignee %>
<% issue.labels.each do |label| %>
<span class="issue-label"><%= label %></span>
<% end %>
</div>
<%= link_to image_tag("/assets/expand.png"), "#", :class => "issue-expand issue-toggle js-issue-toggle" %>
<%= link_to image_tag("/assets/collapse.png"), "#", :class => "issue-collapse issue-toggle js-issue-toggle" %>
</li>
| <li class="ui-state-default issue collapsed" data-prioritized-issue-path="<%= prioritized_issue_move_to_bucket_path(issue) %>">
<%= form_tag "/", :class => "issue-state-toggle" do %>
<%= check_box_tag :state, issue.closed?, issue.closed? %>
<% end %>
<%= link_to issue.title, github_issue_url(issue), :class => "issue-link" %>
<div class="issue-details">
<%= link_to "#{issue.owner} / #{issue.repository}", github_repository_url(issue), :class => "issue-repository-label" %>
<% if issue.assignee %>
<%= link_to "@#{issue.assignee}", github_user_url(issue), :class => "issue-assignee" %>
<% else %>
<%= link_to "claim or assign", "#", :class => "issue-assignee js-issue-assignee" %>
<% end %>
<% issue.labels.each do |label| %>
<span class="issue-label"><%= label %></span>
<% end %>
</div>
<%= link_to image_tag("/assets/expand.png"), "#", :class => "issue-expand issue-toggle js-issue-toggle" %>
<%= link_to image_tag("/assets/collapse.png"), "#", :class => "issue-collapse issue-toggle js-issue-toggle" %>
</li>
| Add claim or assign button | Add claim or assign button
| HTML+ERB | mit | jonmagic/i-got-issues,jonmagic/i-got-issues,jonmagic/i-got-issues | html+erb | ## Code Before:
<li class="ui-state-default issue collapsed" data-prioritized-issue-path="<%= prioritized_issue_move_to_bucket_path(issue) %>">
<%= form_tag "/", :class => "issue-state-toggle" do %>
<%= check_box_tag :state, issue.closed?, issue.closed? %>
<% end %>
<%= link_to issue.title, github_issue_url(issue), :class => "issue-link" %>
<div class="issue-details">
<%= link_to "#{issue.owner} / #{issue.repository}", github_repository_url(issue), :class => "issue-repository-label" %>
<%= link_to "@#{issue.assignee}", github_user_url(issue), :class => "issue-assignee" if issue.assignee %>
<% issue.labels.each do |label| %>
<span class="issue-label"><%= label %></span>
<% end %>
</div>
<%= link_to image_tag("/assets/expand.png"), "#", :class => "issue-expand issue-toggle js-issue-toggle" %>
<%= link_to image_tag("/assets/collapse.png"), "#", :class => "issue-collapse issue-toggle js-issue-toggle" %>
</li>
## Instruction:
Add claim or assign button
## Code After:
<li class="ui-state-default issue collapsed" data-prioritized-issue-path="<%= prioritized_issue_move_to_bucket_path(issue) %>">
<%= form_tag "/", :class => "issue-state-toggle" do %>
<%= check_box_tag :state, issue.closed?, issue.closed? %>
<% end %>
<%= link_to issue.title, github_issue_url(issue), :class => "issue-link" %>
<div class="issue-details">
<%= link_to "#{issue.owner} / #{issue.repository}", github_repository_url(issue), :class => "issue-repository-label" %>
<% if issue.assignee %>
<%= link_to "@#{issue.assignee}", github_user_url(issue), :class => "issue-assignee" %>
<% else %>
<%= link_to "claim or assign", "#", :class => "issue-assignee js-issue-assignee" %>
<% end %>
<% issue.labels.each do |label| %>
<span class="issue-label"><%= label %></span>
<% end %>
</div>
<%= link_to image_tag("/assets/expand.png"), "#", :class => "issue-expand issue-toggle js-issue-toggle" %>
<%= link_to image_tag("/assets/collapse.png"), "#", :class => "issue-collapse issue-toggle js-issue-toggle" %>
</li>
| <li class="ui-state-default issue collapsed" data-prioritized-issue-path="<%= prioritized_issue_move_to_bucket_path(issue) %>">
<%= form_tag "/", :class => "issue-state-toggle" do %>
<%= check_box_tag :state, issue.closed?, issue.closed? %>
<% end %>
<%= link_to issue.title, github_issue_url(issue), :class => "issue-link" %>
<div class="issue-details">
<%= link_to "#{issue.owner} / #{issue.repository}", github_repository_url(issue), :class => "issue-repository-label" %>
+ <% if issue.assignee %>
- <%= link_to "@#{issue.assignee}", github_user_url(issue), :class => "issue-assignee" if issue.assignee %>
? ------------------
+ <%= link_to "@#{issue.assignee}", github_user_url(issue), :class => "issue-assignee" %>
? ++
+ <% else %>
+ <%= link_to "claim or assign", "#", :class => "issue-assignee js-issue-assignee" %>
+ <% end %>
<% issue.labels.each do |label| %>
<span class="issue-label"><%= label %></span>
<% end %>
</div>
<%= link_to image_tag("/assets/expand.png"), "#", :class => "issue-expand issue-toggle js-issue-toggle" %>
<%= link_to image_tag("/assets/collapse.png"), "#", :class => "issue-collapse issue-toggle js-issue-toggle" %>
</li> | 6 | 0.4 | 5 | 1 |
47b5618a6b832aa2f5fd60b79b4b974f8aa29118 | app/views/users/new.html.erb | app/views/users/new.html.erb | This is where your form for creating new users will go.
<%= render 'form', item: @user %> | <h2>Register New User</h2>
<%= render 'form', item: @user %>
<p>Already have a profile? <%= link_to 'Login here!', login_path%></p> | Add a level 2 header to new user form. Add clickable link that will take users from registration form to login form | Add a level 2 header to new user form. Add clickable link that will take users from registration form to login form
| HTML+ERB | mit | benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop | html+erb | ## Code Before:
This is where your form for creating new users will go.
<%= render 'form', item: @user %>
## Instruction:
Add a level 2 header to new user form. Add clickable link that will take users from registration form to login form
## Code After:
<h2>Register New User</h2>
<%= render 'form', item: @user %>
<p>Already have a profile? <%= link_to 'Login here!', login_path%></p> | - This is where your form for creating new users will go.
+ <h2>Register New User</h2>
+
+
<%= render 'form', item: @user %>
+
+ <p>Already have a profile? <%= link_to 'Login here!', login_path%></p> | 6 | 2 | 5 | 1 |
7bf477f2ce728ed4af4163a0a96f9ec1b3b76d8d | tests/cyclus_tools.py | tests/cyclus_tools.py |
import os
from tools import check_cmd
def run_cyclus(cyclus, cwd, sim_files):
"""Runs cyclus with various inputs and creates output databases
"""
for sim_input, sim_output in sim_files:
holdsrtn = [1] # needed because nose does not send() to test generator
# make sure the output target directory exists
if not os.path.exists(sim_output):
os.makedirs(sim_output)
cmd = [cyclus, "-o", sim_output, "--input-file", sim_input]
check_cmd(cmd, cwd, holdsrtn)
rtn = holdsrtn[0]
if rtn != 0:
return # don"t execute further commands
|
import os
from tools import check_cmd
def run_cyclus(cyclus, cwd, sim_files):
"""Runs cyclus with various inputs and creates output databases
"""
for sim_input, sim_output in sim_files:
holdsrtn = [1] # needed because nose does not send() to test generator
# make sure the output target directory exists
if not os.path.exists(os.path.dirname(sim_output)):
os.makedirs(os.path.dirname(sim_output))
cmd = [cyclus, "-o", sim_output, "--input-file", sim_input]
check_cmd(cmd, cwd, holdsrtn)
rtn = holdsrtn[0]
if rtn != 0:
return # don"t execute further commands
| Correct a bug in creating directories as needed for output. | Correct a bug in creating directories as needed for output.
| Python | bsd-3-clause | Baaaaam/cyBaM,Baaaaam/cyBaM,Baaaaam/cyBaM,rwcarlsen/cycamore,rwcarlsen/cycamore,gonuke/cycamore,Baaaaam/cycamore,Baaaaam/cyBaM,jlittell/cycamore,rwcarlsen/cycamore,jlittell/cycamore,cyclus/cycaless,gonuke/cycamore,Baaaaam/cyCLASS,jlittell/cycamore,gonuke/cycamore,jlittell/cycamore,Baaaaam/cycamore,gonuke/cycamore,cyclus/cycaless,Baaaaam/cyCLASS,rwcarlsen/cycamore,Baaaaam/cycamore | python | ## Code Before:
import os
from tools import check_cmd
def run_cyclus(cyclus, cwd, sim_files):
"""Runs cyclus with various inputs and creates output databases
"""
for sim_input, sim_output in sim_files:
holdsrtn = [1] # needed because nose does not send() to test generator
# make sure the output target directory exists
if not os.path.exists(sim_output):
os.makedirs(sim_output)
cmd = [cyclus, "-o", sim_output, "--input-file", sim_input]
check_cmd(cmd, cwd, holdsrtn)
rtn = holdsrtn[0]
if rtn != 0:
return # don"t execute further commands
## Instruction:
Correct a bug in creating directories as needed for output.
## Code After:
import os
from tools import check_cmd
def run_cyclus(cyclus, cwd, sim_files):
"""Runs cyclus with various inputs and creates output databases
"""
for sim_input, sim_output in sim_files:
holdsrtn = [1] # needed because nose does not send() to test generator
# make sure the output target directory exists
if not os.path.exists(os.path.dirname(sim_output)):
os.makedirs(os.path.dirname(sim_output))
cmd = [cyclus, "-o", sim_output, "--input-file", sim_input]
check_cmd(cmd, cwd, holdsrtn)
rtn = holdsrtn[0]
if rtn != 0:
return # don"t execute further commands
|
import os
from tools import check_cmd
def run_cyclus(cyclus, cwd, sim_files):
"""Runs cyclus with various inputs and creates output databases
"""
for sim_input, sim_output in sim_files:
holdsrtn = [1] # needed because nose does not send() to test generator
# make sure the output target directory exists
- if not os.path.exists(sim_output):
+ if not os.path.exists(os.path.dirname(sim_output)):
? ++++++++++++++++ +
- os.makedirs(sim_output)
+ os.makedirs(os.path.dirname(sim_output))
? ++++++++++++++++ +
cmd = [cyclus, "-o", sim_output, "--input-file", sim_input]
check_cmd(cmd, cwd, holdsrtn)
rtn = holdsrtn[0]
if rtn != 0:
return # don"t execute further commands | 4 | 0.2 | 2 | 2 |
157c9ff7d4629817eea0a2f4bf202ecf7c1a3d1f | src/features/header/header-main/nav-main/desktop/styled-components/ListTypes.js | src/features/header/header-main/nav-main/desktop/styled-components/ListTypes.js | //@flow
import styled, { css } from "styled-components";
export const Ul = styled.ul`
${({ theme }: { theme: Theme }) => css`
padding: 0 0 0 ${theme.scale.s8()};
display: flex;
justify-content: flex-start;
align-items: flex-end;
list-style: none;
margin: 0;
`}
`;
export const Li = styled.li`
${({ theme }: { theme: Theme }) => {
const textColor = theme.color.black;
return css`
${theme.type.paragraph};
color: ${textColor};
font-size: ${theme.scale.s2(-1)};
line-height: ${theme.scale.s8()};
position: relative;
padding: 0 1em;
transition: color 0.2s;
z-index: 1;
&:hover{
cursor: pointer;
color: ${theme.effect.darken(0.2, textColor)};
}
`;
}}
`;
| //@flow
import styled, { css } from "styled-components";
export const Ul = styled.ul`
${({ theme }: { theme: Theme }) => css`
padding: 0 0 0 ${theme.scale.s8()};
display: flex;
justify-content: flex-start;
align-items: flex-end;
list-style: none;
margin: 0;
`}
`;
export const Li = styled.li`
${({ theme }: { theme: Theme }) => {
const textColor = theme.color.black;
return css`
${theme.type.paragraph};
font-size: ${theme.scale.s2(-1)};
line-height: ${theme.scale.s8()};
position: relative;
padding: 0 1em;
transition: color 0.2s;
z-index: 1;
`;
}}
`;
| Remove css hover from nav items - moved to Highlight comp | Remove css hover from nav items - moved to Highlight comp
| JavaScript | mit | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | javascript | ## Code Before:
//@flow
import styled, { css } from "styled-components";
export const Ul = styled.ul`
${({ theme }: { theme: Theme }) => css`
padding: 0 0 0 ${theme.scale.s8()};
display: flex;
justify-content: flex-start;
align-items: flex-end;
list-style: none;
margin: 0;
`}
`;
export const Li = styled.li`
${({ theme }: { theme: Theme }) => {
const textColor = theme.color.black;
return css`
${theme.type.paragraph};
color: ${textColor};
font-size: ${theme.scale.s2(-1)};
line-height: ${theme.scale.s8()};
position: relative;
padding: 0 1em;
transition: color 0.2s;
z-index: 1;
&:hover{
cursor: pointer;
color: ${theme.effect.darken(0.2, textColor)};
}
`;
}}
`;
## Instruction:
Remove css hover from nav items - moved to Highlight comp
## Code After:
//@flow
import styled, { css } from "styled-components";
export const Ul = styled.ul`
${({ theme }: { theme: Theme }) => css`
padding: 0 0 0 ${theme.scale.s8()};
display: flex;
justify-content: flex-start;
align-items: flex-end;
list-style: none;
margin: 0;
`}
`;
export const Li = styled.li`
${({ theme }: { theme: Theme }) => {
const textColor = theme.color.black;
return css`
${theme.type.paragraph};
font-size: ${theme.scale.s2(-1)};
line-height: ${theme.scale.s8()};
position: relative;
padding: 0 1em;
transition: color 0.2s;
z-index: 1;
`;
}}
`;
| //@flow
import styled, { css } from "styled-components";
export const Ul = styled.ul`
${({ theme }: { theme: Theme }) => css`
padding: 0 0 0 ${theme.scale.s8()};
display: flex;
justify-content: flex-start;
align-items: flex-end;
list-style: none;
margin: 0;
`}
`;
export const Li = styled.li`
${({ theme }: { theme: Theme }) => {
const textColor = theme.color.black;
return css`
-
${theme.type.paragraph};
- color: ${textColor};
font-size: ${theme.scale.s2(-1)};
line-height: ${theme.scale.s8()};
position: relative;
padding: 0 1em;
transition: color 0.2s;
z-index: 1;
-
- &:hover{
- cursor: pointer;
- color: ${theme.effect.darken(0.2, textColor)};
- }
-
`;
}}
`; | 8 | 0.2 | 0 | 8 |
ca53eda46eeab0825babf9e26cf2d955dba9e612 | jest.config.js | jest.config.js | // jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.js$': 'babel-jest',
'.(ts|tsx)': 'ts-jest'
},
moduleFileExtensions: [
'ts',
'js'
],
};
| // jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.jsx?$': 'babel-jest',
'.(ts|tsx)': 'ts-jest'
},
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx'
],
};
| Enable jsx to be loaded from js tests in jest | Enable jsx to be loaded from js tests in jest
| JavaScript | apache-2.0 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | javascript | ## Code Before:
// jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.js$': 'babel-jest',
'.(ts|tsx)': 'ts-jest'
},
moduleFileExtensions: [
'ts',
'js'
],
};
## Instruction:
Enable jsx to be loaded from js tests in jest
## Code After:
// jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.jsx?$': 'babel-jest',
'.(ts|tsx)': 'ts-jest'
},
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx'
],
};
| // jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
- '^.+\\.js$': 'babel-jest',
+ '^.+\\.jsx?$': 'babel-jest',
? ++
'.(ts|tsx)': 'ts-jest'
},
moduleFileExtensions: [
'ts',
+ 'tsx',
- 'js'
+ 'js',
? +
+ 'jsx'
],
}; | 6 | 0.333333 | 4 | 2 |
8c69afc70cf40c6ea93329135d23af1dc4bab7ab | src/crustache/filesystem.cr | src/crustache/filesystem.cr | require "./tree.cr"
module Crustache
abstract class FileSystem
abstract def load(value : String) : Tree::Template?
def load!(value : String) : Tree::Template
if tmpl = self.load value
return tmpl
else
raise "#{value} is not found"
end
end
end
class HashFileSystem < FileSystem
def initialize
@tmpls = {} of String => Tree::Template
end
def register(name, tmpl)
@tmpls[name] = tmpl
end
def load(value)
return @tmpls[value]?
end
end
class ViewLoader < FileSystem
def initialize(@basedir : String, @use_cache = false)
@cache = {} of String => Tree::Template?
end
def load(value)
if @cache.has_key?(value)
return @cache[value]
end
filename = "#{@basedir}/#{value}"
filename_ext = "#{filename}.mustache"
if File.exists?(filename_ext)
tmpl = Crustache.parseFile filename_ext
@cache[value] = tmpl if @use_cache
return tmpl
end
if File.exists?(filename)
tmpl = Crustache.parse filename
@cache[value] = tmpl if @use_cache
return tmpl
end
@cache[value] = nil if @use_cache
return nil
end
end
end
| require "./tree.cr"
module Crustache
abstract class FileSystem
abstract def load(value : String) : Tree::Template?
def load!(value : String) : Tree::Template
if tmpl = self.load value
return tmpl
else
raise "#{value} is not found"
end
end
end
class HashFileSystem < FileSystem
def initialize
@tmpls = {} of String => Tree::Template
end
def register(name, tmpl)
@tmpls[name] = tmpl
end
def load(value)
return @tmpls[value]?
end
end
class ViewLoader < FileSystem
EXTENSION = [".mustache", ".html", ""]
def initialize(@basedir : String, @use_cache = false, @extension = EXTENSION)
@cache = {} of String => Tree::Template?
end
def load(value)
if @cache.has_key?(value)
return @cache[value]
end
@extension.each do |ext|
filename = "#{@basedir}/#{value}"
filename_ext = "#{filename}#{ext}"
if File.exists?(filename_ext)
tmpl = Crustache.parseFile filename_ext
@cache[value] = tmpl if @use_cache
return tmpl
end
end
@cache[value] = nil if @use_cache
return nil
end
end
end
| Add extensions for implicit loading | Add extensions for implicit loading
| Crystal | mit | MakeNowJust/crustache | crystal | ## Code Before:
require "./tree.cr"
module Crustache
abstract class FileSystem
abstract def load(value : String) : Tree::Template?
def load!(value : String) : Tree::Template
if tmpl = self.load value
return tmpl
else
raise "#{value} is not found"
end
end
end
class HashFileSystem < FileSystem
def initialize
@tmpls = {} of String => Tree::Template
end
def register(name, tmpl)
@tmpls[name] = tmpl
end
def load(value)
return @tmpls[value]?
end
end
class ViewLoader < FileSystem
def initialize(@basedir : String, @use_cache = false)
@cache = {} of String => Tree::Template?
end
def load(value)
if @cache.has_key?(value)
return @cache[value]
end
filename = "#{@basedir}/#{value}"
filename_ext = "#{filename}.mustache"
if File.exists?(filename_ext)
tmpl = Crustache.parseFile filename_ext
@cache[value] = tmpl if @use_cache
return tmpl
end
if File.exists?(filename)
tmpl = Crustache.parse filename
@cache[value] = tmpl if @use_cache
return tmpl
end
@cache[value] = nil if @use_cache
return nil
end
end
end
## Instruction:
Add extensions for implicit loading
## Code After:
require "./tree.cr"
module Crustache
abstract class FileSystem
abstract def load(value : String) : Tree::Template?
def load!(value : String) : Tree::Template
if tmpl = self.load value
return tmpl
else
raise "#{value} is not found"
end
end
end
class HashFileSystem < FileSystem
def initialize
@tmpls = {} of String => Tree::Template
end
def register(name, tmpl)
@tmpls[name] = tmpl
end
def load(value)
return @tmpls[value]?
end
end
class ViewLoader < FileSystem
EXTENSION = [".mustache", ".html", ""]
def initialize(@basedir : String, @use_cache = false, @extension = EXTENSION)
@cache = {} of String => Tree::Template?
end
def load(value)
if @cache.has_key?(value)
return @cache[value]
end
@extension.each do |ext|
filename = "#{@basedir}/#{value}"
filename_ext = "#{filename}#{ext}"
if File.exists?(filename_ext)
tmpl = Crustache.parseFile filename_ext
@cache[value] = tmpl if @use_cache
return tmpl
end
end
@cache[value] = nil if @use_cache
return nil
end
end
end
| require "./tree.cr"
module Crustache
abstract class FileSystem
abstract def load(value : String) : Tree::Template?
def load!(value : String) : Tree::Template
if tmpl = self.load value
return tmpl
else
raise "#{value} is not found"
end
end
end
class HashFileSystem < FileSystem
def initialize
@tmpls = {} of String => Tree::Template
end
def register(name, tmpl)
@tmpls[name] = tmpl
end
def load(value)
return @tmpls[value]?
end
end
class ViewLoader < FileSystem
+ EXTENSION = [".mustache", ".html", ""]
+
- def initialize(@basedir : String, @use_cache = false)
+ def initialize(@basedir : String, @use_cache = false, @extension = EXTENSION)
? ++++++++++++++++++++++++
@cache = {} of String => Tree::Template?
end
def load(value)
if @cache.has_key?(value)
return @cache[value]
end
+ @extension.each do |ext|
- filename = "#{@basedir}/#{value}"
+ filename = "#{@basedir}/#{value}"
? ++
- filename_ext = "#{filename}.mustache"
? ^^^^ ^^^^
+ filename_ext = "#{filename}#{ext}"
? ++ ^^^^ ^
- if File.exists?(filename_ext)
+ if File.exists?(filename_ext)
? ++
- tmpl = Crustache.parseFile filename_ext
+ tmpl = Crustache.parseFile filename_ext
? ++
- @cache[value] = tmpl if @use_cache
+ @cache[value] = tmpl if @use_cache
? ++
- return tmpl
+ return tmpl
? ++
- end
+ end
? ++
-
- if File.exists?(filename)
- tmpl = Crustache.parse filename
- @cache[value] = tmpl if @use_cache
- return tmpl
end
@cache[value] = nil if @use_cache
return nil
end
end
end | 24 | 0.413793 | 11 | 13 |
bbf983a3bc01e53bfcaacfc75a16bd013f3c48f9 | .travis.yml | .travis.yml |
language: ruby
rvm:
- 2.0.0
- 1.9.3
- 1.8.7
- ree
- jruby-19mode
env:
- TEST_COMMAND="rake test:unit"
- TEST_COMMAND="rake test:integration"
script: "bundle exec $TEST_COMMAND"
services:
- elasticsearch
- redis
- mongodb
matrix:
exclude:
- rvm: 1.8.7
env: TEST_COMMAND="rake test:integration"
- rvm: ree
env: TEST_COMMAND="rake test:integration"
allow_failures:
- rvm: ree
notifications:
disable: true
|
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- jruby-19mode
env:
- TEST_COMMAND="rake test:unit"
- TEST_COMMAND="rake test:integration"
script: "bundle exec $TEST_COMMAND"
services:
- elasticsearch
- redis
- mongodb
matrix:
exclude:
- rvm: 1.8.7
env: TEST_COMMAND="rake test:integration"
notifications:
disable: true
| Update Travis-CI configuration (remove REE, restructure) | [SETUP] Update Travis-CI configuration (remove REE, restructure)
| YAML | mit | karmi/retire,zaharpecherin/retire,fabn/retire,1776/tire,iamrahulroy/retire,Telmate/tire,tklee/tire_shiphawk,elbuo8/retire,brijeshgpt7/retire,dbose/retire,mavenlink/retire,HenleyChiu/tire,rubydubee/retire,ChapterMedia/tire,doximity/tire | yaml | ## Code Before:
language: ruby
rvm:
- 2.0.0
- 1.9.3
- 1.8.7
- ree
- jruby-19mode
env:
- TEST_COMMAND="rake test:unit"
- TEST_COMMAND="rake test:integration"
script: "bundle exec $TEST_COMMAND"
services:
- elasticsearch
- redis
- mongodb
matrix:
exclude:
- rvm: 1.8.7
env: TEST_COMMAND="rake test:integration"
- rvm: ree
env: TEST_COMMAND="rake test:integration"
allow_failures:
- rvm: ree
notifications:
disable: true
## Instruction:
[SETUP] Update Travis-CI configuration (remove REE, restructure)
## Code After:
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- jruby-19mode
env:
- TEST_COMMAND="rake test:unit"
- TEST_COMMAND="rake test:integration"
script: "bundle exec $TEST_COMMAND"
services:
- elasticsearch
- redis
- mongodb
matrix:
exclude:
- rvm: 1.8.7
env: TEST_COMMAND="rake test:integration"
notifications:
disable: true
|
language: ruby
rvm:
+ - 1.8.7
+ - 1.9.3
- 2.0.0
- - 1.9.3
- - 1.8.7
- - ree
- jruby-19mode
env:
- TEST_COMMAND="rake test:unit"
- TEST_COMMAND="rake test:integration"
script: "bundle exec $TEST_COMMAND"
services:
- elasticsearch
- redis
- mongodb
matrix:
exclude:
- rvm: 1.8.7
env: TEST_COMMAND="rake test:integration"
- - rvm: ree
- env: TEST_COMMAND="rake test:integration"
- allow_failures:
- - rvm: ree
notifications:
disable: true | 9 | 0.28125 | 2 | 7 |
94602ab973ecf6fa12470470d750aee8bbfe6d7c | vitess.io/_config_dev.yml | vitess.io/_config_dev.yml |
title: Vitess
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess_logo_with_border.svg
icon: vitess_logo_icon_size.png
teaser: 400x250.gif
locale: en_US
url:
project-name: Vitess
repo: https://github.com/youtube/vitess
# Jekyll configuration
sass:
sass_dir: _sass
style: compressed
permalink: /:categories/:title/
highlighter: pygments
plugins:
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-seo-tag
markdown: redcarpet
redcarpet:
extensions: ["autolink", "fenced_code_blocks", "highlight", "no_intra_emphasis", "prettify", "tables", "with_toc_data"]
# Site owner
owner:
name: Vitess Team
web: https://github.com/youtube/vitess
email:
twitter:
bio:
avatar:
disqus-shortname:
exclude: ["config.rb", ".sass-cache", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "*.sublime-project", "*.sublime-workspace", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "node_modules", "Gruntfile.js", "package.json", "preview-site.sh", "publish-site.sh"]
|
title: Vitess
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess_logo_with_border.svg
icon: vitess_logo_icon_size.png
teaser: 400x250.gif
locale: en_US
url:
project-name: Vitess
repo: https://github.com/youtube/vitess
# Jekyll configuration
sass:
sass_dir: _sass
style: compressed
permalink: /:categories/:title/
highlighter: pygments
plugins:
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-seo-tag
markdown: redcarpet
redcarpet:
extensions: ["autolink", "fenced_code_blocks", "highlight", "no_intra_emphasis", "prettify", "tables", "with_toc_data"]
# Site owner
owner:
name: Vitess Team
web: https://github.com/youtube/vitess
email:
twitter:
bio:
avatar:
disqus-shortname:
exclude: ["config.rb", ".sass-cache", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "*.sublime-project", "*.sublime-workspace", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "node_modules", "Gruntfile.js", "package.json", "preview-site.sh", "publish-site.sh"]
# Open up "jekyll serve" because the requests via the Docker forwarding are not
# treated as incoming from "localhost".
host: 0.0.0.0
| Fix preview-site.sh script after upgrade to Jekyll 3. | vitess.io: Fix preview-site.sh script after upgrade to Jekyll 3.
| YAML | apache-2.0 | vitessio/vitess,HubSpot/vitess,mahak/vitess,tinyspeck/vitess,HubSpot/vitess,HubSpot/vitess,mattharden/vitess,alainjobart/vitess,alainjobart/vitess,enisoc/vitess,mattharden/vitess,davygeek/vitess,sougou/vitess,vitessio/vitess,tinyspeck/vitess,tinyspeck/vitess,tinyspeck/vitess,mahak/vitess,alainjobart/vitess,alainjobart/vitess,tirsen/vitess,mahak/vitess,dcadevil/vitess,vitessio/vitess,tinyspeck/vitess,tirsen/vitess,dcadevil/vitess,dcadevil/vitess,mattharden/vitess,enisoc/vitess,dcadevil/vitess,tirsen/vitess,dcadevil/vitess,HubSpot/vitess,davygeek/vitess,mattharden/vitess,HubSpot/vitess,enisoc/vitess,tinyspeck/vitess,HubSpot/vitess,vitessio/vitess,davygeek/vitess,HubSpot/vitess,enisoc/vitess,mahak/vitess,vitessio/vitess,alainjobart/vitess,alainjobart/vitess,mattharden/vitess,tirsen/vitess,mahak/vitess,alainjobart/vitess,vitessio/vitess,vitessio/vitess,mattharden/vitess,dcadevil/vitess,mattharden/vitess,mattharden/vitess,davygeek/vitess,tirsen/vitess,davygeek/vitess,sougou/vitess,sougou/vitess,sougou/vitess,mahak/vitess,davygeek/vitess,tinyspeck/vitess,tirsen/vitess,vitessio/vitess,mattharden/vitess,sougou/vitess,tirsen/vitess,enisoc/vitess,alainjobart/vitess,davygeek/vitess,enisoc/vitess,tirsen/vitess,sougou/vitess,tirsen/vitess,mahak/vitess,sougou/vitess,mahak/vitess,enisoc/vitess,mattharden/vitess,sougou/vitess,dcadevil/vitess,HubSpot/vitess | yaml | ## Code Before:
title: Vitess
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess_logo_with_border.svg
icon: vitess_logo_icon_size.png
teaser: 400x250.gif
locale: en_US
url:
project-name: Vitess
repo: https://github.com/youtube/vitess
# Jekyll configuration
sass:
sass_dir: _sass
style: compressed
permalink: /:categories/:title/
highlighter: pygments
plugins:
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-seo-tag
markdown: redcarpet
redcarpet:
extensions: ["autolink", "fenced_code_blocks", "highlight", "no_intra_emphasis", "prettify", "tables", "with_toc_data"]
# Site owner
owner:
name: Vitess Team
web: https://github.com/youtube/vitess
email:
twitter:
bio:
avatar:
disqus-shortname:
exclude: ["config.rb", ".sass-cache", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "*.sublime-project", "*.sublime-workspace", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "node_modules", "Gruntfile.js", "package.json", "preview-site.sh", "publish-site.sh"]
## Instruction:
vitess.io: Fix preview-site.sh script after upgrade to Jekyll 3.
## Code After:
title: Vitess
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess_logo_with_border.svg
icon: vitess_logo_icon_size.png
teaser: 400x250.gif
locale: en_US
url:
project-name: Vitess
repo: https://github.com/youtube/vitess
# Jekyll configuration
sass:
sass_dir: _sass
style: compressed
permalink: /:categories/:title/
highlighter: pygments
plugins:
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-seo-tag
markdown: redcarpet
redcarpet:
extensions: ["autolink", "fenced_code_blocks", "highlight", "no_intra_emphasis", "prettify", "tables", "with_toc_data"]
# Site owner
owner:
name: Vitess Team
web: https://github.com/youtube/vitess
email:
twitter:
bio:
avatar:
disqus-shortname:
exclude: ["config.rb", ".sass-cache", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "*.sublime-project", "*.sublime-workspace", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "node_modules", "Gruntfile.js", "package.json", "preview-site.sh", "publish-site.sh"]
# Open up "jekyll serve" because the requests via the Docker forwarding are not
# treated as incoming from "localhost".
host: 0.0.0.0
|
title: Vitess
description: "Vitess is a database clustering system for horizontal scaling of MySQL."
logo: vitess_logo_with_border.svg
icon: vitess_logo_icon_size.png
teaser: 400x250.gif
locale: en_US
url:
project-name: Vitess
repo: https://github.com/youtube/vitess
# Jekyll configuration
sass:
sass_dir: _sass
style: compressed
permalink: /:categories/:title/
highlighter: pygments
plugins:
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-seo-tag
markdown: redcarpet
redcarpet:
extensions: ["autolink", "fenced_code_blocks", "highlight", "no_intra_emphasis", "prettify", "tables", "with_toc_data"]
# Site owner
owner:
name: Vitess Team
web: https://github.com/youtube/vitess
email:
twitter:
bio:
avatar:
disqus-shortname:
exclude: ["config.rb", ".sass-cache", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "*.sublime-project", "*.sublime-workspace", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "node_modules", "Gruntfile.js", "package.json", "preview-site.sh", "publish-site.sh"]
+ # Open up "jekyll serve" because the requests via the Docker forwarding are not
+ # treated as incoming from "localhost".
+ host: 0.0.0.0 | 3 | 0.075 | 3 | 0 |
0af696857faa6890fe4c97c8b23c71962a4ec089 | _scripts/deploy.sh | _scripts/deploy.sh | set -x
if [ $TRAVIS_BRANCH == 'master' ] ; then
# Initialize a new git repo in _site, and push it to our server.
cd _site
git init
git remote add deploy "deploy@kjaermaxi.me:/var/www/kjaermaxi.me"
git config user.name "Travis CI"
git config user.email "maxime.kjaer+travisCI@gmail.com"
git add .
git commit -m "Deploy"
git push --force deploy master
else
echo 'Invalid branch. You can only deploy from master.'
exit 1
fi
| set -x
if [ $TRAVIS_BRANCH == 'master' ] ; then
# Initialize a new git repo in _site, and push it to our server.
cd _site
git init
git remote add deploy "deploy@kjaermaxi.me:/var/www/kjaermaxi.me"
git config user.name "Travis CI"
git config user.email "maxime.kjaer+travisCI@gmail.com"
git add .
git commit -m "Deploy"
git push --force deploy master
else
echo "Not deploying, since this branch isn't master."
fi
| Remove error exit for non-master branches. | Remove error exit for non-master branches.
| Shell | mit | MaximeKjaer/kjaer.io,MaximeKjaer/kjaermaxi.me,MaximeKjaer/kjaermaxi.me,MaximeKjaer/kjaermaxi.me,MaximeKjaer/MaximeKjaer.github.io,MaximeKjaer/kjaer.io,MaximeKjaer/MaximeKjaer.github.io,MaximeKjaer/kjaermaxi.me,MaximeKjaer/MaximeKjaer.github.io,MaximeKjaer/kjaer.io,MaximeKjaer/MaximeKjaer.github.io,MaximeKjaer/kjaer.io | shell | ## Code Before:
set -x
if [ $TRAVIS_BRANCH == 'master' ] ; then
# Initialize a new git repo in _site, and push it to our server.
cd _site
git init
git remote add deploy "deploy@kjaermaxi.me:/var/www/kjaermaxi.me"
git config user.name "Travis CI"
git config user.email "maxime.kjaer+travisCI@gmail.com"
git add .
git commit -m "Deploy"
git push --force deploy master
else
echo 'Invalid branch. You can only deploy from master.'
exit 1
fi
## Instruction:
Remove error exit for non-master branches.
## Code After:
set -x
if [ $TRAVIS_BRANCH == 'master' ] ; then
# Initialize a new git repo in _site, and push it to our server.
cd _site
git init
git remote add deploy "deploy@kjaermaxi.me:/var/www/kjaermaxi.me"
git config user.name "Travis CI"
git config user.email "maxime.kjaer+travisCI@gmail.com"
git add .
git commit -m "Deploy"
git push --force deploy master
else
echo "Not deploying, since this branch isn't master."
fi
| set -x
if [ $TRAVIS_BRANCH == 'master' ] ; then
# Initialize a new git repo in _site, and push it to our server.
cd _site
git init
git remote add deploy "deploy@kjaermaxi.me:/var/www/kjaermaxi.me"
git config user.name "Travis CI"
git config user.email "maxime.kjaer+travisCI@gmail.com"
git add .
git commit -m "Deploy"
git push --force deploy master
else
+ echo "Not deploying, since this branch isn't master."
- echo 'Invalid branch. You can only deploy from master.'
- exit 1
fi | 3 | 0.176471 | 1 | 2 |
faa9f6054b72fc3cf347945033f664082cd677a3 | templates/oio-event-handlers.conf.erb | templates/oio-event-handlers.conf.erb | [handler:storage.content.new]
<% if @quarantine or @replication -%>
pipeline =<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
<% end -%>
[handler:storage.content.deleted]
pipeline = content_cleaner<% if @replication %> replication<% end %>
[handler:storage.container.new]
pipeline = account_update
[handler:storage.container.deleted]
pipeline = account_update
[handler:storage.container.state]
pipeline = account_update
[handler:storage.chunk.new]
pipeline = volume_index
[handler:storage.chunk.deleted]
pipeline = volume_index
[filter:content_cleaner]
use = egg:oio#content_cleaner
[filter:account_update]
use = egg:oio#account_update
[filter:volume_index]
use = egg:oio#volume_index
<% if @quarantine -%>
[filter:quarantine]
use = egg:oio#notify
tube = vrc-quarantine
queue_url = <%= @quarantine_queue_url %>
<% end -%>
<% if @replication -%>
[handler:storage.content.append]
pipeline = replication
[filter:replication]
use = egg:oio#notify
tube = oio-repli
queue_url = <%= @replication_queue_url %>
<% end -%>
| [handler:storage.content.new]
<% if @quarantine or @replication -%>
pipeline =<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
<% end -%>
[handler:storage.content.deleted]
pipeline = content_cleaner<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
[handler:storage.container.new]
pipeline = account_update
[handler:storage.container.deleted]
pipeline = account_update
[handler:storage.container.state]
pipeline = account_update
[handler:storage.chunk.new]
pipeline = volume_index
[handler:storage.chunk.deleted]
pipeline = volume_index
[filter:content_cleaner]
use = egg:oio#content_cleaner
[filter:account_update]
use = egg:oio#account_update
[filter:volume_index]
use = egg:oio#volume_index
<% if @quarantine -%>
[filter:quarantine]
use = egg:oio#notify
tube = vrc-quarantine
queue_url = <%= @quarantine_queue_url %>
<% end -%>
<% if @replication -%>
[handler:storage.content.append]
pipeline = replication
[filter:replication]
use = egg:oio#notify
tube = oio-repli
queue_url = <%= @replication_queue_url %>
<% end -%>
| Add quarantine in delete event handlers | Add quarantine in delete event handlers
| HTML+ERB | apache-2.0 | sebastienlapierre/puppet-openiosds,racciari/puppet-openiosds,sebastienlapierre/puppet-openiosds,open-io/puppet-openiosds,open-io/puppet-openiosds,racciari/puppet-openiosds | html+erb | ## Code Before:
[handler:storage.content.new]
<% if @quarantine or @replication -%>
pipeline =<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
<% end -%>
[handler:storage.content.deleted]
pipeline = content_cleaner<% if @replication %> replication<% end %>
[handler:storage.container.new]
pipeline = account_update
[handler:storage.container.deleted]
pipeline = account_update
[handler:storage.container.state]
pipeline = account_update
[handler:storage.chunk.new]
pipeline = volume_index
[handler:storage.chunk.deleted]
pipeline = volume_index
[filter:content_cleaner]
use = egg:oio#content_cleaner
[filter:account_update]
use = egg:oio#account_update
[filter:volume_index]
use = egg:oio#volume_index
<% if @quarantine -%>
[filter:quarantine]
use = egg:oio#notify
tube = vrc-quarantine
queue_url = <%= @quarantine_queue_url %>
<% end -%>
<% if @replication -%>
[handler:storage.content.append]
pipeline = replication
[filter:replication]
use = egg:oio#notify
tube = oio-repli
queue_url = <%= @replication_queue_url %>
<% end -%>
## Instruction:
Add quarantine in delete event handlers
## Code After:
[handler:storage.content.new]
<% if @quarantine or @replication -%>
pipeline =<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
<% end -%>
[handler:storage.content.deleted]
pipeline = content_cleaner<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
[handler:storage.container.new]
pipeline = account_update
[handler:storage.container.deleted]
pipeline = account_update
[handler:storage.container.state]
pipeline = account_update
[handler:storage.chunk.new]
pipeline = volume_index
[handler:storage.chunk.deleted]
pipeline = volume_index
[filter:content_cleaner]
use = egg:oio#content_cleaner
[filter:account_update]
use = egg:oio#account_update
[filter:volume_index]
use = egg:oio#volume_index
<% if @quarantine -%>
[filter:quarantine]
use = egg:oio#notify
tube = vrc-quarantine
queue_url = <%= @quarantine_queue_url %>
<% end -%>
<% if @replication -%>
[handler:storage.content.append]
pipeline = replication
[filter:replication]
use = egg:oio#notify
tube = oio-repli
queue_url = <%= @replication_queue_url %>
<% end -%>
| [handler:storage.content.new]
<% if @quarantine or @replication -%>
pipeline =<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
<% end -%>
[handler:storage.content.deleted]
- pipeline = content_cleaner<% if @replication %> replication<% end %>
+ pipeline = content_cleaner<% if @quarantine %> quarantine<% end %><% if @replication %> replication<% end %>
? ++++++++++++++++++++++++++++++++++++++++
[handler:storage.container.new]
pipeline = account_update
[handler:storage.container.deleted]
pipeline = account_update
[handler:storage.container.state]
pipeline = account_update
[handler:storage.chunk.new]
pipeline = volume_index
[handler:storage.chunk.deleted]
pipeline = volume_index
[filter:content_cleaner]
use = egg:oio#content_cleaner
[filter:account_update]
use = egg:oio#account_update
[filter:volume_index]
use = egg:oio#volume_index
<% if @quarantine -%>
[filter:quarantine]
use = egg:oio#notify
tube = vrc-quarantine
queue_url = <%= @quarantine_queue_url %>
<% end -%>
<% if @replication -%>
[handler:storage.content.append]
pipeline = replication
[filter:replication]
use = egg:oio#notify
tube = oio-repli
queue_url = <%= @replication_queue_url %>
<% end -%> | 2 | 0.041667 | 1 | 1 |
e1f6ce189f95ffa22ab4ecd9615728361d8c8a4c | app/react/styles/modules/site.styl | app/react/styles/modules/site.styl | body
background-color $gallery
background-image url(/images/background-pattern.png)
background-size 300px auto
.site
height 100%
.logo__image
position relative
top -1px
margin-right .5rem
.logo__text
position relative
top 1px
height 15px
+above(md)
height 20px
.site__navigation
background white
position relative
z-index 100
box-shadow 0px 2px 4px 0px rgba(0,0,0,0.15)
padding .5rem
+above(lg)
padding 1rem 0
img
display inline-block
vertical-align middle
border none
.btn,
.btn.btn-primary
border-radius 0
font-size 12px
padding 9px
+above(md)
border-radius 3px
padding 9px 15px
font-size 14px
.site__content
padding 0
.site__mobile-navigation
max-height 0px
overflow hidden
transition all 300ms linear
padding 0 2rem
&.open
max-height 9999px
.site__footer
small
display inline-block
max-width 600px
font-size 10px
line-height 1.3
.site__footer__inappropriate-content
font-size 12px
| body
background-color $gallery
background-image url(/images/background-pattern.png)
background-size 300px auto
.site
height 100%
.logo__image
position relative
top -1px
margin-right .5rem
.logo__text
position relative
top 1px
height 15px
+above(md)
height 20px
.site__navigation
background white
position relative
z-index 100
box-shadow 0px 2px 4px 0px rgba(0,0,0,0.15)
padding .5rem
+above(lg)
padding 1rem 0
img
display inline-block
vertical-align middle
border none
.btn,
.btn.btn-primary
border-radius 0
font-size 12px
padding 9px
+above(md)
border-radius 3px
padding 9px 15px
font-size 14px
.site__content
position relative
padding 0
z-index 105
.site__mobile-navigation
max-height 0px
overflow hidden
transition all 300ms linear
padding 0 2rem
&.open
max-height 9999px
.site__footer
small
display inline-block
max-width 600px
font-size 10px
line-height 1.3
.site__footer__inappropriate-content
font-size 12px
| Fix z-index for new search location | Fix z-index for new search location
| Stylus | mit | WikiEducationFoundation/Wiki-Playlist,WikiEducationFoundation/Wiki-Playlist,WikiEducationFoundation/Wiki-Playlist | stylus | ## Code Before:
body
background-color $gallery
background-image url(/images/background-pattern.png)
background-size 300px auto
.site
height 100%
.logo__image
position relative
top -1px
margin-right .5rem
.logo__text
position relative
top 1px
height 15px
+above(md)
height 20px
.site__navigation
background white
position relative
z-index 100
box-shadow 0px 2px 4px 0px rgba(0,0,0,0.15)
padding .5rem
+above(lg)
padding 1rem 0
img
display inline-block
vertical-align middle
border none
.btn,
.btn.btn-primary
border-radius 0
font-size 12px
padding 9px
+above(md)
border-radius 3px
padding 9px 15px
font-size 14px
.site__content
padding 0
.site__mobile-navigation
max-height 0px
overflow hidden
transition all 300ms linear
padding 0 2rem
&.open
max-height 9999px
.site__footer
small
display inline-block
max-width 600px
font-size 10px
line-height 1.3
.site__footer__inappropriate-content
font-size 12px
## Instruction:
Fix z-index for new search location
## Code After:
body
background-color $gallery
background-image url(/images/background-pattern.png)
background-size 300px auto
.site
height 100%
.logo__image
position relative
top -1px
margin-right .5rem
.logo__text
position relative
top 1px
height 15px
+above(md)
height 20px
.site__navigation
background white
position relative
z-index 100
box-shadow 0px 2px 4px 0px rgba(0,0,0,0.15)
padding .5rem
+above(lg)
padding 1rem 0
img
display inline-block
vertical-align middle
border none
.btn,
.btn.btn-primary
border-radius 0
font-size 12px
padding 9px
+above(md)
border-radius 3px
padding 9px 15px
font-size 14px
.site__content
position relative
padding 0
z-index 105
.site__mobile-navigation
max-height 0px
overflow hidden
transition all 300ms linear
padding 0 2rem
&.open
max-height 9999px
.site__footer
small
display inline-block
max-width 600px
font-size 10px
line-height 1.3
.site__footer__inappropriate-content
font-size 12px
| body
background-color $gallery
background-image url(/images/background-pattern.png)
background-size 300px auto
.site
height 100%
.logo__image
position relative
top -1px
margin-right .5rem
.logo__text
position relative
top 1px
height 15px
+above(md)
height 20px
.site__navigation
background white
position relative
z-index 100
box-shadow 0px 2px 4px 0px rgba(0,0,0,0.15)
padding .5rem
+above(lg)
padding 1rem 0
img
display inline-block
vertical-align middle
border none
.btn,
.btn.btn-primary
border-radius 0
font-size 12px
padding 9px
+above(md)
border-radius 3px
padding 9px 15px
font-size 14px
.site__content
+ position relative
padding 0
+ z-index 105
.site__mobile-navigation
max-height 0px
overflow hidden
transition all 300ms linear
padding 0 2rem
&.open
max-height 9999px
.site__footer
small
display inline-block
max-width 600px
font-size 10px
line-height 1.3
.site__footer__inappropriate-content
font-size 12px | 2 | 0.030303 | 2 | 0 |
46a568690a9a284ddc350519a15e092e1211d073 | reviewboard/site/urlresolvers.py | reviewboard/site/urlresolvers.py | from __future__ import unicode_literals
from django.core.urlresolvers import NoReverseMatch, reverse
def local_site_reverse(viewname, request=None, local_site_name=None,
args=None, kwargs=None, *func_args, **func_kwargs):
"""Reverses a URL name, returning a working URL.
This works much like Django's reverse(), but handles returning a
localsite version of a URL when invoked with a request within a localsite.
"""
if request or local_site_name:
if request and not local_site_name:
local_site_name = getattr(request, '_local_site_name', None)
if local_site_name:
if args:
new_args = [local_site_name] + args
new_kwargs = kwargs
else:
new_args = args
new_kwargs = {
'local_site_name': local_site_name,
}
if kwargs:
new_kwargs.update(kwargs)
try:
return reverse(viewname, args=new_args, kwargs=new_kwargs,
*func_args, **func_kwargs)
except NoReverseMatch:
# We'll try it again without those arguments.
pass
return reverse(viewname, args=args, kwargs=kwargs,
*func_args, **func_kwargs)
| from __future__ import unicode_literals
from django.core.urlresolvers import NoReverseMatch, reverse
def local_site_reverse(viewname, request=None, local_site_name=None,
local_site=None, args=None, kwargs=None,
*func_args, **func_kwargs):
"""Reverses a URL name, returning a working URL.
This works much like Django's reverse(), but handles returning a
localsite version of a URL when invoked with a request within a localsite.
"""
assert not (local_site_name and local_site)
if request or local_site_name or local_site:
if local_site:
local_site_name = local_site.name
elif request and not local_site_name:
local_site_name = getattr(request, '_local_site_name', None)
if local_site_name:
if args:
new_args = [local_site_name] + args
new_kwargs = kwargs
else:
new_args = args
new_kwargs = {
'local_site_name': local_site_name,
}
if kwargs:
new_kwargs.update(kwargs)
try:
return reverse(viewname, args=new_args, kwargs=new_kwargs,
*func_args, **func_kwargs)
except NoReverseMatch:
# We'll try it again without those arguments.
pass
return reverse(viewname, args=args, kwargs=kwargs,
*func_args, **func_kwargs)
| Allow local_site_reverse to take an actual LocalSite. | Allow local_site_reverse to take an actual LocalSite.
local_site_reverse was able to take a LocalSite's name, or a request
object, but if you actually had a LocalSite (or None), you'd have to
write your own conditional to extract the name and pass it.
Now, local_site_reverse can take a LocalSite. This saves a database
query, if one is already available, and simplifies calling code.
Reviewed at https://reviews.reviewboard.org/r/6302/
| Python | mit | custode/reviewboard,custode/reviewboard,bkochendorfer/reviewboard,custode/reviewboard,brennie/reviewboard,reviewboard/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,custode/reviewboard,sgallagher/reviewboard,brennie/reviewboard,davidt/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,beol/reviewboard,bkochendorfer/reviewboard,davidt/reviewboard,bkochendorfer/reviewboard,beol/reviewboard,chipx86/reviewboard,davidt/reviewboard,bkochendorfer/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,davidt/reviewboard,brennie/reviewboard,reviewboard/reviewboard,brennie/reviewboard,beol/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,reviewboard/reviewboard,beol/reviewboard,sgallagher/reviewboard | python | ## Code Before:
from __future__ import unicode_literals
from django.core.urlresolvers import NoReverseMatch, reverse
def local_site_reverse(viewname, request=None, local_site_name=None,
args=None, kwargs=None, *func_args, **func_kwargs):
"""Reverses a URL name, returning a working URL.
This works much like Django's reverse(), but handles returning a
localsite version of a URL when invoked with a request within a localsite.
"""
if request or local_site_name:
if request and not local_site_name:
local_site_name = getattr(request, '_local_site_name', None)
if local_site_name:
if args:
new_args = [local_site_name] + args
new_kwargs = kwargs
else:
new_args = args
new_kwargs = {
'local_site_name': local_site_name,
}
if kwargs:
new_kwargs.update(kwargs)
try:
return reverse(viewname, args=new_args, kwargs=new_kwargs,
*func_args, **func_kwargs)
except NoReverseMatch:
# We'll try it again without those arguments.
pass
return reverse(viewname, args=args, kwargs=kwargs,
*func_args, **func_kwargs)
## Instruction:
Allow local_site_reverse to take an actual LocalSite.
local_site_reverse was able to take a LocalSite's name, or a request
object, but if you actually had a LocalSite (or None), you'd have to
write your own conditional to extract the name and pass it.
Now, local_site_reverse can take a LocalSite. This saves a database
query, if one is already available, and simplifies calling code.
Reviewed at https://reviews.reviewboard.org/r/6302/
## Code After:
from __future__ import unicode_literals
from django.core.urlresolvers import NoReverseMatch, reverse
def local_site_reverse(viewname, request=None, local_site_name=None,
local_site=None, args=None, kwargs=None,
*func_args, **func_kwargs):
"""Reverses a URL name, returning a working URL.
This works much like Django's reverse(), but handles returning a
localsite version of a URL when invoked with a request within a localsite.
"""
assert not (local_site_name and local_site)
if request or local_site_name or local_site:
if local_site:
local_site_name = local_site.name
elif request and not local_site_name:
local_site_name = getattr(request, '_local_site_name', None)
if local_site_name:
if args:
new_args = [local_site_name] + args
new_kwargs = kwargs
else:
new_args = args
new_kwargs = {
'local_site_name': local_site_name,
}
if kwargs:
new_kwargs.update(kwargs)
try:
return reverse(viewname, args=new_args, kwargs=new_kwargs,
*func_args, **func_kwargs)
except NoReverseMatch:
# We'll try it again without those arguments.
pass
return reverse(viewname, args=args, kwargs=kwargs,
*func_args, **func_kwargs)
| from __future__ import unicode_literals
from django.core.urlresolvers import NoReverseMatch, reverse
def local_site_reverse(viewname, request=None, local_site_name=None,
+ local_site=None, args=None, kwargs=None,
- args=None, kwargs=None, *func_args, **func_kwargs):
? ------------------------
+ *func_args, **func_kwargs):
"""Reverses a URL name, returning a working URL.
This works much like Django's reverse(), but handles returning a
localsite version of a URL when invoked with a request within a localsite.
"""
+ assert not (local_site_name and local_site)
+
- if request or local_site_name:
+ if request or local_site_name or local_site:
? ++++++++++++++
+ if local_site:
+ local_site_name = local_site.name
- if request and not local_site_name:
+ elif request and not local_site_name:
? ++
local_site_name = getattr(request, '_local_site_name', None)
if local_site_name:
if args:
new_args = [local_site_name] + args
new_kwargs = kwargs
else:
new_args = args
new_kwargs = {
'local_site_name': local_site_name,
}
if kwargs:
new_kwargs.update(kwargs)
try:
return reverse(viewname, args=new_args, kwargs=new_kwargs,
*func_args, **func_kwargs)
except NoReverseMatch:
# We'll try it again without those arguments.
pass
return reverse(viewname, args=args, kwargs=kwargs,
*func_args, **func_kwargs) | 11 | 0.289474 | 8 | 3 |
455583c076b0ecd42206896de68d5d315d6f8cf9 | lib/tasks/update_organisation_slug.rake | lib/tasks/update_organisation_slug.rake | desc "Update an organisation slug"
task :update_organisation_slug, [:old_slug, :new_slug] => :environment do |_task, args|
logger = Logger.new(STDOUT)
logger.error("You must specify [old_slug,new_slug]") unless args.old_slug.present? && args.new_slug.present?
exit(1) unless OrganisationSlugUpdater.new(old_slug, new_slug, logger).call
end
| desc "Update an organisation slug"
task :update_organisation_slug, [:old_slug, :new_slug] => :environment do |_task, args|
logger = Logger.new(STDOUT)
logger.error("You must specify [old_slug,new_slug]") unless args.old_slug.present? && args.new_slug.present?
exit(1) unless OrganisationSlugUpdater.new(args.old_slug, args.new_slug, logger).call
end
| Fix `undefined local variable` errors in the update org slugs rake task | Fix `undefined local variable` errors in the update org slugs rake task
- On second-line while running each of the rake tasks within each of
the apps as per the guide to change an organisation slug, we came
across this one that didn't work. Fix it by referencing
`args.old_slug` etc, because they come from command-line arguments.
| Ruby | mit | alphagov/contacts-admin,alphagov/contacts-admin,alphagov/contacts-admin | ruby | ## Code Before:
desc "Update an organisation slug"
task :update_organisation_slug, [:old_slug, :new_slug] => :environment do |_task, args|
logger = Logger.new(STDOUT)
logger.error("You must specify [old_slug,new_slug]") unless args.old_slug.present? && args.new_slug.present?
exit(1) unless OrganisationSlugUpdater.new(old_slug, new_slug, logger).call
end
## Instruction:
Fix `undefined local variable` errors in the update org slugs rake task
- On second-line while running each of the rake tasks within each of
the apps as per the guide to change an organisation slug, we came
across this one that didn't work. Fix it by referencing
`args.old_slug` etc, because they come from command-line arguments.
## Code After:
desc "Update an organisation slug"
task :update_organisation_slug, [:old_slug, :new_slug] => :environment do |_task, args|
logger = Logger.new(STDOUT)
logger.error("You must specify [old_slug,new_slug]") unless args.old_slug.present? && args.new_slug.present?
exit(1) unless OrganisationSlugUpdater.new(args.old_slug, args.new_slug, logger).call
end
| desc "Update an organisation slug"
task :update_organisation_slug, [:old_slug, :new_slug] => :environment do |_task, args|
logger = Logger.new(STDOUT)
logger.error("You must specify [old_slug,new_slug]") unless args.old_slug.present? && args.new_slug.present?
- exit(1) unless OrganisationSlugUpdater.new(old_slug, new_slug, logger).call
+ exit(1) unless OrganisationSlugUpdater.new(args.old_slug, args.new_slug, logger).call
? +++++ +++++
end | 2 | 0.285714 | 1 | 1 |
34f1dd390949dddc5dbaeedffe0097355abc8b62 | lib/druid/console.rb | lib/druid/console.rb | require 'active_support/time'
require 'ap'
require 'forwardable'
require 'irb'
require 'ripl'
require 'terminal-table'
require 'druid'
Ripl::Shell.class_eval do
def format_query_result(result, query)
include_timestamp = query.properties[:granularity] != 'all'
Terminal::Table.new({
headings: (include_timestamp ? ["timestamp"] : []) + result.last.keys,
rows: result.map { |row| (include_timestamp ? [row.timestamp] : []) + row.values }
})
end
def format_result(result)
if result.is_a?(Druid::Query)
puts format_query_result(result.send, result)
else
ap(result)
end
end
end
module Druid
class Console
extend Forwardable
def initialize(uri, source, options)
@uri, @source, @options = uri, source, options
Ripl.start(binding: binding)
end
def client
@client ||= Druid::Client.new(@uri, @options)
@source ||= @client.data_sources[0]
@client
end
def source
client.data_source(@source)
end
def dimensions
source.dimensions
end
def metrics
source.metrics
end
def query
client.query(@source)
end
def_delegators :query, :group_by, :long_sum, :postagg, :interval, :granularity, :filter
end
end
| require 'active_support/time'
require 'ap'
require 'forwardable'
require 'irb'
require 'ripl'
require 'terminal-table'
require 'druid'
Ripl::Shell.class_eval do
def format_query_result(result, query)
include_timestamp = query.properties[:granularity] != 'all'
keys = result.empty? ? [] : result.last.keys
Terminal::Table.new({
headings: (include_timestamp ? ["timestamp"] : []) + keys,
rows: result.map { |row| (include_timestamp ? [row.timestamp] : []) + row.values }
})
end
def format_result(result)
if result.is_a?(Druid::Query)
puts format_query_result(result.send, result)
else
ap(result)
end
end
end
module Druid
class Console
extend Forwardable
def initialize(uri, source, options)
@uri, @source, @options = uri, source, options
Ripl.start(binding: binding)
end
def client
@client ||= Druid::Client.new(@uri, @options)
@source ||= @client.data_sources[0]
@client
end
def source
client.data_source(@source)
end
def dimensions
source.dimensions
end
def metrics
source.metrics
end
def query
client.query(@source)
end
def_delegators :query, :group_by, :long_sum, :postagg, :interval, :granularity, :filter
end
end
| Fix a nullpointer exception on empty result set | Fix a nullpointer exception on empty result set
| Ruby | mit | ruby-druid/ruby-druid,liquidm/ruby-druid,TetrationAnalytics/ruby-druid | ruby | ## Code Before:
require 'active_support/time'
require 'ap'
require 'forwardable'
require 'irb'
require 'ripl'
require 'terminal-table'
require 'druid'
Ripl::Shell.class_eval do
def format_query_result(result, query)
include_timestamp = query.properties[:granularity] != 'all'
Terminal::Table.new({
headings: (include_timestamp ? ["timestamp"] : []) + result.last.keys,
rows: result.map { |row| (include_timestamp ? [row.timestamp] : []) + row.values }
})
end
def format_result(result)
if result.is_a?(Druid::Query)
puts format_query_result(result.send, result)
else
ap(result)
end
end
end
module Druid
class Console
extend Forwardable
def initialize(uri, source, options)
@uri, @source, @options = uri, source, options
Ripl.start(binding: binding)
end
def client
@client ||= Druid::Client.new(@uri, @options)
@source ||= @client.data_sources[0]
@client
end
def source
client.data_source(@source)
end
def dimensions
source.dimensions
end
def metrics
source.metrics
end
def query
client.query(@source)
end
def_delegators :query, :group_by, :long_sum, :postagg, :interval, :granularity, :filter
end
end
## Instruction:
Fix a nullpointer exception on empty result set
## Code After:
require 'active_support/time'
require 'ap'
require 'forwardable'
require 'irb'
require 'ripl'
require 'terminal-table'
require 'druid'
Ripl::Shell.class_eval do
def format_query_result(result, query)
include_timestamp = query.properties[:granularity] != 'all'
keys = result.empty? ? [] : result.last.keys
Terminal::Table.new({
headings: (include_timestamp ? ["timestamp"] : []) + keys,
rows: result.map { |row| (include_timestamp ? [row.timestamp] : []) + row.values }
})
end
def format_result(result)
if result.is_a?(Druid::Query)
puts format_query_result(result.send, result)
else
ap(result)
end
end
end
module Druid
class Console
extend Forwardable
def initialize(uri, source, options)
@uri, @source, @options = uri, source, options
Ripl.start(binding: binding)
end
def client
@client ||= Druid::Client.new(@uri, @options)
@source ||= @client.data_sources[0]
@client
end
def source
client.data_source(@source)
end
def dimensions
source.dimensions
end
def metrics
source.metrics
end
def query
client.query(@source)
end
def_delegators :query, :group_by, :long_sum, :postagg, :interval, :granularity, :filter
end
end
| require 'active_support/time'
require 'ap'
require 'forwardable'
require 'irb'
require 'ripl'
require 'terminal-table'
require 'druid'
Ripl::Shell.class_eval do
def format_query_result(result, query)
include_timestamp = query.properties[:granularity] != 'all'
+ keys = result.empty? ? [] : result.last.keys
+
Terminal::Table.new({
- headings: (include_timestamp ? ["timestamp"] : []) + result.last.keys,
? ------------
+ headings: (include_timestamp ? ["timestamp"] : []) + keys,
rows: result.map { |row| (include_timestamp ? [row.timestamp] : []) + row.values }
})
end
def format_result(result)
if result.is_a?(Druid::Query)
puts format_query_result(result.send, result)
else
ap(result)
end
end
end
module Druid
class Console
extend Forwardable
def initialize(uri, source, options)
@uri, @source, @options = uri, source, options
Ripl.start(binding: binding)
end
def client
@client ||= Druid::Client.new(@uri, @options)
@source ||= @client.data_sources[0]
@client
end
def source
client.data_source(@source)
end
def dimensions
source.dimensions
end
def metrics
source.metrics
end
def query
client.query(@source)
end
def_delegators :query, :group_by, :long_sum, :postagg, :interval, :granularity, :filter
end
end | 4 | 0.0625 | 3 | 1 |
89a6c06198a377b8dfc93067e7eae081606cc7ec | qt5/CMakeLists.txt | qt5/CMakeLists.txt | include_directories(
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(qtlxqt_SRCS
main.cpp
lxqtplatformtheme.cpp
)
add_library(qtlxqt SHARED ${qtlxqt_SRCS})
target_link_libraries(qtlxqt
Qt5::Widgets
)
# there is no standard way to get the plugin dir of Qt5 with cmake
# The best way is get_target_property(QT_PLUGINS_DIR Qt5::QGtk2ThemePlugin LOCATION).
# This directly returns the platformthemes dir.
# However, I'm not sure if Qt5::QGtk2ThemePlugin exists in every distro
# Let's use a stupid but safer method, which is well documented in Qt doc.
foreach(plugin ${Qt5Gui_PLUGINS}) # iterate over all plugins
get_target_property(plugin_dir ${plugin} LOCATION)
if(plugin_dir)
# remove the filename part
get_filename_component(plugin_dir ${plugin_dir} PATH)
# go to parent dir (should be something like /usr/lib/qt/plugins)
get_filename_component(QT_PLUGINS_DIR ${plugin_dir} PATH)
break()
endif()
endforeach()
message(STATUS "Qt5 plugin directory:" ${QT_PLUGINS_DIR})
install (TARGETS qtlxqt LIBRARY DESTINATION ${QT_PLUGINS_DIR}/platformthemes)
| include_directories(
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(qtlxqt_SRCS
main.cpp
lxqtplatformtheme.cpp
)
add_library(qtlxqt SHARED ${qtlxqt_SRCS})
target_link_libraries(qtlxqt
Qt5::Widgets
)
# there is no standard way to get the plugin dir of Qt5 with cmake
# The best way is get_target_property(QT_PLUGINS_DIR Qt5::QGtk2ThemePlugin LOCATION).
# This directly returns the platformthemes dir. However, this does not work
# in some distros, such as ubuntu.
# Finally, I came up with a more reliable way by using qmake.
get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
if(NOT QT_QMAKE_EXECUTABLE)
message(FATAL_ERROR "qmake is not found.")
endif()
# execute the command "qmake -query QT_INSTALL_PLUGINS" to get the path of plugins dir.
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
OUTPUT_VARIABLE QT_PLUGINS_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(QT_PLUGINS_DIR)
message(STATUS "Qt5 plugin directory:" ${QT_PLUGINS_DIR})
else()
message(FATAL_ERROR "Qt5 plugin directory cannot be detected.")
endif()
install (TARGETS qtlxqt LIBRARY DESTINATION ${QT_PLUGINS_DIR}/platformthemes)
| Use qmake to query the path of Qt5 plugin dir, which is much more reliable. | Use qmake to query the path of Qt5 plugin dir, which is much more reliable.
| Text | lgpl-2.1 | rbazaud/lxqt-qtplugin,lxde/lxqt-qtplugin | text | ## Code Before:
include_directories(
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(qtlxqt_SRCS
main.cpp
lxqtplatformtheme.cpp
)
add_library(qtlxqt SHARED ${qtlxqt_SRCS})
target_link_libraries(qtlxqt
Qt5::Widgets
)
# there is no standard way to get the plugin dir of Qt5 with cmake
# The best way is get_target_property(QT_PLUGINS_DIR Qt5::QGtk2ThemePlugin LOCATION).
# This directly returns the platformthemes dir.
# However, I'm not sure if Qt5::QGtk2ThemePlugin exists in every distro
# Let's use a stupid but safer method, which is well documented in Qt doc.
foreach(plugin ${Qt5Gui_PLUGINS}) # iterate over all plugins
get_target_property(plugin_dir ${plugin} LOCATION)
if(plugin_dir)
# remove the filename part
get_filename_component(plugin_dir ${plugin_dir} PATH)
# go to parent dir (should be something like /usr/lib/qt/plugins)
get_filename_component(QT_PLUGINS_DIR ${plugin_dir} PATH)
break()
endif()
endforeach()
message(STATUS "Qt5 plugin directory:" ${QT_PLUGINS_DIR})
install (TARGETS qtlxqt LIBRARY DESTINATION ${QT_PLUGINS_DIR}/platformthemes)
## Instruction:
Use qmake to query the path of Qt5 plugin dir, which is much more reliable.
## Code After:
include_directories(
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(qtlxqt_SRCS
main.cpp
lxqtplatformtheme.cpp
)
add_library(qtlxqt SHARED ${qtlxqt_SRCS})
target_link_libraries(qtlxqt
Qt5::Widgets
)
# there is no standard way to get the plugin dir of Qt5 with cmake
# The best way is get_target_property(QT_PLUGINS_DIR Qt5::QGtk2ThemePlugin LOCATION).
# This directly returns the platformthemes dir. However, this does not work
# in some distros, such as ubuntu.
# Finally, I came up with a more reliable way by using qmake.
get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
if(NOT QT_QMAKE_EXECUTABLE)
message(FATAL_ERROR "qmake is not found.")
endif()
# execute the command "qmake -query QT_INSTALL_PLUGINS" to get the path of plugins dir.
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
OUTPUT_VARIABLE QT_PLUGINS_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(QT_PLUGINS_DIR)
message(STATUS "Qt5 plugin directory:" ${QT_PLUGINS_DIR})
else()
message(FATAL_ERROR "Qt5 plugin directory cannot be detected.")
endif()
install (TARGETS qtlxqt LIBRARY DESTINATION ${QT_PLUGINS_DIR}/platformthemes)
| include_directories(
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
set(qtlxqt_SRCS
main.cpp
lxqtplatformtheme.cpp
)
add_library(qtlxqt SHARED ${qtlxqt_SRCS})
target_link_libraries(qtlxqt
Qt5::Widgets
)
# there is no standard way to get the plugin dir of Qt5 with cmake
# The best way is get_target_property(QT_PLUGINS_DIR Qt5::QGtk2ThemePlugin LOCATION).
- # This directly returns the platformthemes dir.
+ # This directly returns the platformthemes dir. However, this does not work
? ++++++++++++++++++++++++++++
+ # in some distros, such as ubuntu.
+ # Finally, I came up with a more reliable way by using qmake.
+ get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION)
+ if(NOT QT_QMAKE_EXECUTABLE)
+ message(FATAL_ERROR "qmake is not found.")
- # However, I'm not sure if Qt5::QGtk2ThemePlugin exists in every distro
- # Let's use a stupid but safer method, which is well documented in Qt doc.
- foreach(plugin ${Qt5Gui_PLUGINS}) # iterate over all plugins
- get_target_property(plugin_dir ${plugin} LOCATION)
- if(plugin_dir)
- # remove the filename part
- get_filename_component(plugin_dir ${plugin_dir} PATH)
- # go to parent dir (should be something like /usr/lib/qt/plugins)
- get_filename_component(QT_PLUGINS_DIR ${plugin_dir} PATH)
- break()
- endif()
? -
+ endif()
- endforeach()
+
+ # execute the command "qmake -query QT_INSTALL_PLUGINS" to get the path of plugins dir.
+ execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_PLUGINS
+ OUTPUT_VARIABLE QT_PLUGINS_DIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(QT_PLUGINS_DIR)
- message(STATUS "Qt5 plugin directory:" ${QT_PLUGINS_DIR})
+ message(STATUS "Qt5 plugin directory:" ${QT_PLUGINS_DIR})
? ++++
+ else()
+ message(FATAL_ERROR "Qt5 plugin directory cannot be detected.")
+ endif()
install (TARGETS qtlxqt LIBRARY DESTINATION ${QT_PLUGINS_DIR}/platformthemes) | 32 | 0.941176 | 18 | 14 |
90a456e726314b2bab7dafd3ab5387387e36d026 | composer.json | composer.json | {
"name": "bafs/parvula",
"description": "Simple, Markdown and Fast CMS",
"keywords": ["cms", "markdown"],
"license": "MIT",
"authors": [
{
"name": "BafS",
"email": "fabacrans@gmail.com"
}
],
"require": {
"php": ">=5.3",
"michelf/php-markdown": "1.3.*@dev"
},
"autoload": {
"psr-0": {
"Parvula": "."
}
},
"config": {
"preferred-install": "dist"
}
} | {
"name": "bafs/parvula",
"description": "Simple, Markdown and Fast CMS",
"keywords": ["cms", "markdown"],
"license": "MIT",
"homepage": "https://github.com/BafS/parvula",
"authors": [
{
"name": "BafS",
"email": "fabacrans@gmail.com"
}
],
"require": {
"php": ">=5.3",
"michelf/php-markdown": "1.4.*"
},
"autoload": {
"psr-4": {
"Parvula\\": "Parvula"
}
}
} | Use PSR4 and update require | Use PSR4 and update require
Use PSR4 and update require (php-markdown 1.4.x)
| JSON | mit | ParvulaCMS/parvula,BafS/parvula,ParvulaCMS/parvula,BafS/parvula,BafS/parvula | json | ## Code Before:
{
"name": "bafs/parvula",
"description": "Simple, Markdown and Fast CMS",
"keywords": ["cms", "markdown"],
"license": "MIT",
"authors": [
{
"name": "BafS",
"email": "fabacrans@gmail.com"
}
],
"require": {
"php": ">=5.3",
"michelf/php-markdown": "1.3.*@dev"
},
"autoload": {
"psr-0": {
"Parvula": "."
}
},
"config": {
"preferred-install": "dist"
}
}
## Instruction:
Use PSR4 and update require
Use PSR4 and update require (php-markdown 1.4.x)
## Code After:
{
"name": "bafs/parvula",
"description": "Simple, Markdown and Fast CMS",
"keywords": ["cms", "markdown"],
"license": "MIT",
"homepage": "https://github.com/BafS/parvula",
"authors": [
{
"name": "BafS",
"email": "fabacrans@gmail.com"
}
],
"require": {
"php": ">=5.3",
"michelf/php-markdown": "1.4.*"
},
"autoload": {
"psr-4": {
"Parvula\\": "Parvula"
}
}
} | {
"name": "bafs/parvula",
"description": "Simple, Markdown and Fast CMS",
"keywords": ["cms", "markdown"],
"license": "MIT",
+ "homepage": "https://github.com/BafS/parvula",
"authors": [
{
"name": "BafS",
"email": "fabacrans@gmail.com"
}
],
"require": {
"php": ">=5.3",
- "michelf/php-markdown": "1.3.*@dev"
? ^ ----
+ "michelf/php-markdown": "1.4.*"
? ^
},
"autoload": {
- "psr-0": {
? ^
+ "psr-4": {
? ^
- "Parvula": "."
? ^
+ "Parvula\\": "Parvula"
? ++ ^^^^^^^
}
- },
- "config": {
- "preferred-install": "dist"
}
} | 10 | 0.416667 | 4 | 6 |
dbdfa5489566acac89bf650ecae36322f7f6877f | .travis.yml | .travis.yml | language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq qt5-qmake qtbase5-dev
script:
- qmake -v
- qmake
- make
| language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq qt5-default
script:
- qmake -v
- qmake
- make
| Add qt5-default to apt-get install | Add qt5-default to apt-get install
| YAML | lgpl-2.1 | dstftw/qosdnotification,dstftw/qosdnotification | yaml | ## Code Before:
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq qt5-qmake qtbase5-dev
script:
- qmake -v
- qmake
- make
## Instruction:
Add qt5-default to apt-get install
## Code After:
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq qt5-default
script:
- qmake -v
- qmake
- make
| language: cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- - sudo apt-get install -qq qt5-qmake qtbase5-dev
? -------------- ^
+ - sudo apt-get install -qq qt5-default
? ^^^^^
script:
- qmake -v
- qmake
- make | 2 | 0.166667 | 1 | 1 |
63955bbdf96e39f2005ccb92c4e1c9e5304b685e | src/ci/azure-pipelines/pr.yml | src/ci/azure-pipelines/pr.yml |
trigger: none
pr:
- master
variables:
- group: public-credentials
jobs:
- job: Linux
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
IMAGE: x86_64-gnu-llvm-6.0
mingw-check:
IMAGE: mingw-check
asmjs:
IMAGE: asmjs
wasm32:
IMAGE: wasm32
- job: LinuxTools
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
parameters:
only_on_updated_submodules: 'yes'
variables:
IMAGE: x86_64-gnu-tools
|
trigger: none
pr:
- master
variables:
- group: public-credentials
jobs:
- job: Linux
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
IMAGE: x86_64-gnu-llvm-6.0
mingw-check:
IMAGE: mingw-check
- job: LinuxTools
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
parameters:
only_on_updated_submodules: 'yes'
variables:
IMAGE: x86_64-gnu-tools
| Remove asmjs and wasm32 from PR CI | Remove asmjs and wasm32 from PR CI
| YAML | apache-2.0 | graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust | yaml | ## Code Before:
trigger: none
pr:
- master
variables:
- group: public-credentials
jobs:
- job: Linux
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
IMAGE: x86_64-gnu-llvm-6.0
mingw-check:
IMAGE: mingw-check
asmjs:
IMAGE: asmjs
wasm32:
IMAGE: wasm32
- job: LinuxTools
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
parameters:
only_on_updated_submodules: 'yes'
variables:
IMAGE: x86_64-gnu-tools
## Instruction:
Remove asmjs and wasm32 from PR CI
## Code After:
trigger: none
pr:
- master
variables:
- group: public-credentials
jobs:
- job: Linux
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
IMAGE: x86_64-gnu-llvm-6.0
mingw-check:
IMAGE: mingw-check
- job: LinuxTools
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
parameters:
only_on_updated_submodules: 'yes'
variables:
IMAGE: x86_64-gnu-tools
|
trigger: none
pr:
- master
variables:
- group: public-credentials
jobs:
- job: Linux
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
IMAGE: x86_64-gnu-llvm-6.0
mingw-check:
IMAGE: mingw-check
- asmjs:
- IMAGE: asmjs
- wasm32:
- IMAGE: wasm32
- job: LinuxTools
timeoutInMinutes: 600
pool:
vmImage: ubuntu-16.04
steps:
- template: steps/run.yml
parameters:
only_on_updated_submodules: 'yes'
variables:
IMAGE: x86_64-gnu-tools | 4 | 0.111111 | 0 | 4 |
4287765a776a6f09a1df471c753fdf323134aaa7 | README.md | README.md | snmp4jr
=======
SNMP4J for JRuby
| snmp4jr
=======
SNMP4J for JRuby
Enhances the original SNMP4JR project, found here: https://github.com/awksedgreep/SNMP4JR.
| Add link to original project | Add link to original project
| Markdown | mit | mzaccari/snmp4jr | markdown | ## Code Before:
snmp4jr
=======
SNMP4J for JRuby
## Instruction:
Add link to original project
## Code After:
snmp4jr
=======
SNMP4J for JRuby
Enhances the original SNMP4JR project, found here: https://github.com/awksedgreep/SNMP4JR.
| snmp4jr
=======
SNMP4J for JRuby
+
+ Enhances the original SNMP4JR project, found here: https://github.com/awksedgreep/SNMP4JR. | 2 | 0.5 | 2 | 0 |
ed6ff75720948e506d34d25bc4768adc337b1e0a | server/controllers/index.coffee | server/controllers/index.coffee | async = require 'async'
Account = require '../models/account'
CozyInstance = require '../models/cozy_instance'
fixtures = require 'cozy-fixtures'
module.exports.main = (req, res, next) ->
async.parallel [
(cb) -> CozyInstance.getLocale cb
(cb) -> Account.getAll cb
], (err, results) ->
if err?
# for now we handle error case loosely
res.render 'index.jade', imports: ""
else
[locale, accounts] = results
accounts = accounts.map Account.clientVersion
res.render 'index.jade', imports: """
window.locale = "#{locale}";
window.accounts = #{JSON.stringify accounts};
"""
module.exports.loadFixtures = (req, res, next) ->
fixtures.load silent: true, callback: (err) ->
if err? then next err
else
res.send 200, message: 'LOAD FIXTURES SUCCESS'
| async = require 'async'
Account = require '../models/account'
CozyInstance = require '../models/cozy_instance'
fixtures = require 'cozy-fixtures'
module.exports.main = (req, res, next) ->
async.parallel [
(cb) -> CozyInstance.getLocale cb
(cb) -> Account.getAll cb
], (err, results) ->
if err?
# for now we handle error case loosely
console.log err
res.render 'index.jade', imports: """
console.log("#{err}")
window.locale = "en";
window.accounts = {};
"""
else
[locale, accounts] = results
accounts = accounts.map Account.clientVersion
res.render 'index.jade', imports: """
window.locale = "#{locale}";
window.accounts = #{JSON.stringify accounts};
"""
module.exports.loadFixtures = (req, res, next) ->
fixtures.load silent: true, callback: (err) ->
if err? then next err
else
res.send 200, message: 'LOAD FIXTURES SUCCESS'
| Improve logging when Cozy instance goes down | Improve logging when Cozy instance goes down
| CoffeeScript | agpl-3.0 | poupotte/cozy-emails,kelukelu/cozy-emails,nono/cozy-emails,cozy/cozy-emails,robinmoussu/cozy-emails,kelukelu/cozy-emails,lemelon/cozy-emails,frankrousseau/cozy-emails,m4dz/cozy-emails,aenario/cozy-emails,robinmoussu/cozy-emails,clochix/cozy-emails,poupotte/cozy-emails,cozy/cozy-emails,cozy-labs/emails,clochix/cozy-emails,aenario/cozy-emails,cozy-labs/emails,frankrousseau/cozy-emails,lemelon/cozy-emails,m4dz/cozy-emails,nono/cozy-emails | coffeescript | ## Code Before:
async = require 'async'
Account = require '../models/account'
CozyInstance = require '../models/cozy_instance'
fixtures = require 'cozy-fixtures'
module.exports.main = (req, res, next) ->
async.parallel [
(cb) -> CozyInstance.getLocale cb
(cb) -> Account.getAll cb
], (err, results) ->
if err?
# for now we handle error case loosely
res.render 'index.jade', imports: ""
else
[locale, accounts] = results
accounts = accounts.map Account.clientVersion
res.render 'index.jade', imports: """
window.locale = "#{locale}";
window.accounts = #{JSON.stringify accounts};
"""
module.exports.loadFixtures = (req, res, next) ->
fixtures.load silent: true, callback: (err) ->
if err? then next err
else
res.send 200, message: 'LOAD FIXTURES SUCCESS'
## Instruction:
Improve logging when Cozy instance goes down
## Code After:
async = require 'async'
Account = require '../models/account'
CozyInstance = require '../models/cozy_instance'
fixtures = require 'cozy-fixtures'
module.exports.main = (req, res, next) ->
async.parallel [
(cb) -> CozyInstance.getLocale cb
(cb) -> Account.getAll cb
], (err, results) ->
if err?
# for now we handle error case loosely
console.log err
res.render 'index.jade', imports: """
console.log("#{err}")
window.locale = "en";
window.accounts = {};
"""
else
[locale, accounts] = results
accounts = accounts.map Account.clientVersion
res.render 'index.jade', imports: """
window.locale = "#{locale}";
window.accounts = #{JSON.stringify accounts};
"""
module.exports.loadFixtures = (req, res, next) ->
fixtures.load silent: true, callback: (err) ->
if err? then next err
else
res.send 200, message: 'LOAD FIXTURES SUCCESS'
| async = require 'async'
Account = require '../models/account'
CozyInstance = require '../models/cozy_instance'
fixtures = require 'cozy-fixtures'
module.exports.main = (req, res, next) ->
async.parallel [
(cb) -> CozyInstance.getLocale cb
(cb) -> Account.getAll cb
], (err, results) ->
if err?
# for now we handle error case loosely
+ console.log err
- res.render 'index.jade', imports: ""
+ res.render 'index.jade', imports: """
? +
+ console.log("#{err}")
+ window.locale = "en";
+ window.accounts = {};
+ """
else
[locale, accounts] = results
accounts = accounts.map Account.clientVersion
res.render 'index.jade', imports: """
window.locale = "#{locale}";
window.accounts = #{JSON.stringify accounts};
"""
module.exports.loadFixtures = (req, res, next) ->
fixtures.load silent: true, callback: (err) ->
if err? then next err
else
res.send 200, message: 'LOAD FIXTURES SUCCESS' | 7 | 0.241379 | 6 | 1 |
66d75a80820a06255ec2cb3a0434df82ac42efc7 | spec/quality/reek_source_spec.rb | spec/quality/reek_source_spec.rb | require_relative '../spec_helper'
describe 'Reek source code' do
it 'has no smells' do
Dir['lib/**/*.rb'].should_not reek
end
end
| require_relative '../spec_helper'
describe 'Reek source code' do
it 'has no smells' do
expect(Dir['lib/**/*.rb']).to_not reek
end
end
| Update quality spec to new rspec syntax | Update quality spec to new rspec syntax
| Ruby | mit | andyw8/reek,weby/reek,andyw8/reek,tansaku/reek,skywinder/reek,weby/reek,andyw8/reek,troessner/reek,weby/reek,troessner/reek,skywinder/reek,tansaku/reek,tansaku/reek,apuratepp/reek,skywinder/reek,HParker/reek,HParker/reek,nTraum/reek,HParker/reek,apuratepp/reek,nTraum/reek,apuratepp/reek | ruby | ## Code Before:
require_relative '../spec_helper'
describe 'Reek source code' do
it 'has no smells' do
Dir['lib/**/*.rb'].should_not reek
end
end
## Instruction:
Update quality spec to new rspec syntax
## Code After:
require_relative '../spec_helper'
describe 'Reek source code' do
it 'has no smells' do
expect(Dir['lib/**/*.rb']).to_not reek
end
end
| require_relative '../spec_helper'
describe 'Reek source code' do
it 'has no smells' do
- Dir['lib/**/*.rb'].should_not reek
? ^^ ---
+ expect(Dir['lib/**/*.rb']).to_not reek
? +++++++ + ^
end
end | 2 | 0.285714 | 1 | 1 |
053d4a338a66ae18facf0d0afa865f2a21352b6d | site/docs/skylark/index.md | site/docs/skylark/index.md |
Skylark is a work-in-progress project, which allows extending Bazel with new
rules or macros (composition of rules and macros).
## Goals
* **Power to the user**. We want to allow users to write new rules in a simple
language without having to understand all of Bazel's internals. The core
contributors have to write or review all changes to native Bazel rules (both
inside and outside of Google). This is a lot of work and we have to push back
on new rules.
* **Simplicity**. Skylark has been designed to be as simple as possible. Contrary
to native rules, the code is very short and does not rely on complex
inheritance.
* **Faster development**. With Skylark, rules are stored in the source tree. Modify one
rule file and run Bazel to see the result immediately. Before Skylark, we
had to rebuild and restart Bazel before seeing a change, this slowed down the
development process a lot.
* **Faster release cycle**. Update one rule file, commit the changes to
version control and everyone will use it when they sync. No need to wait for
a native rule to be released with the next Bazel binary.
## Getting started
Read the [concepts](concepts.md) behind Skylark and try the
[cookbook examples](cookbook.md). To go further, read about the
[standard library](lib/globals.html).
|
Bazel includes an API for writing your own rules, called Skylark. Skylark is a
work-in-progress project, which allows extending Bazel with new rules or macros
(composition of rules and macros).
## Goals
* **Power to the user**. We want to allow users to write new rules in a simple
language without having to understand all of Bazel's internals. The core
contributors have to write or review all changes to native Bazel rules (both
inside and outside of Google). This is a lot of work and we have to push back
on new rules.
* **Simplicity**. Skylark has been designed to be as simple as possible. Contrary
to native rules, the code is very short and does not rely on complex
inheritance.
* **Faster development**. With Skylark, rules are stored in the source tree. Modify one
rule file and run Bazel to see the result immediately. Before Skylark, we
had to rebuild and restart Bazel before seeing a change, this slowed down the
development process a lot.
* **Faster release cycle**. Update one rule file, commit the changes to
version control and everyone will use it when they sync. No need to wait for
a native rule to be released with the next Bazel binary.
## Getting started
Read the [concepts](concepts.md) behind Skylark and try the
[cookbook examples](cookbook.md). To go further, read about the
[standard library](lib/globals.html).
| Make sidebar use more descriptive names | Make sidebar use more descriptive names
A user (hio) on IRC pointed out that putting "Skylark" and "Skyframe" in the
sidebar is intimidating to new users (what is a skylark and why would one
care?).
--
MOS_MIGRATED_REVID=101931895
| Markdown | apache-2.0 | xindaya/bazel,wakashige/bazel,whuwxl/bazel,kchodorow/bazel,snnn/bazel,rohitsaboo/bazel,sicipio/bazel,nkhuyu/bazel,JackSullivan/bazel,snnn/bazel,UrbanCompass/bazel,nkhuyu/bazel,zhexuany/bazel,aehlig/bazel,spxtr/bazel,damienmg/bazel,murugamsm/bazel,dinowernli/bazel,kamalmarhubi/bazel,ButterflyNetwork/bazel,bazelbuild/bazel,dropbox/bazel,zhexuany/bazel,wakashige/bazel,juhalindfors/bazel-patches,murugamsm/bazel,davidzchen/bazel,damienmg/bazel,davidzchen/bazel,dhootha/bazel,dhootha/bazel,mikelikespie/bazel,mikelikespie/bazel,JackSullivan/bazel,wakashige/bazel,dslomov/bazel,murugamsm/bazel,JackSullivan/bazel,perezd/bazel,kchodorow/bazel,UrbanCompass/bazel,juhalindfors/bazel-patches,dslomov/bazel,dslomov/bazel,kchodorow/bazel-1,hhclam/bazel,cushon/bazel,vt09/bazel,snnn/bazel,variac/bazel,hermione521/bazel,asarazan/bazel,zhexuany/bazel,cushon/bazel,iamthearm/bazel,werkt/bazel,variac/bazel,ruo91/bazel,mikelikespie/bazel,mbrukman/bazel,davidzchen/bazel,JackSullivan/bazel,kamalmarhubi/bazel,meteorcloudy/bazel,dinowernli/bazel,iamthearm/bazel,iamthearm/bazel,akira-baruah/bazel,damienmg/bazel,joshua0pang/bazel,Ansahmadiba/bazel,anupcshan/bazel,kchodorow/bazel-1,kchodorow/bazel-1,vt09/bazel,variac/bazel,damienmg/bazel,akira-baruah/bazel,Asana/bazel,damienmg/bazel,kamalmarhubi/bazel,dhootha/bazel,katre/bazel,ruo91/bazel,perezd/bazel,Asana/bazel,mikelalcon/bazel,katre/bazel,Asana/bazel,joshua0pang/bazel,perezd/bazel,katre/bazel,UrbanCompass/bazel,mikelalcon/bazel,murugamsm/bazel,twitter-forks/bazel,bazelbuild/bazel,xindaya/bazel,dinowernli/bazel,manashmndl/bazel,d/bazel,variac/bazel,ulfjack/bazel,dslomov/bazel,dslomov/bazel,snnn/bazel,mrdomino/bazel,twitter-forks/bazel,hermione521/bazel,JackSullivan/bazel,Ansahmadiba/bazel,nkhuyu/bazel,dslomov/bazel,rohitsaboo/bazel,sicipio/bazel,kamalmarhubi/bazel,ulfjack/bazel,dslomov/bazel-windows,hermione521/bazel,manashmndl/bazel,abergmeier-dsfishlabs/bazel,dinowernli/bazel,spxtr/bazel,kchodorow/bazel-1,Digas29/bazel,juhalindfors/bazel-patches,akira-baruah/bazel,aehlig/bazel,zhexuany/bazel,Asana/bazel,perezd/bazel,mikelalcon/bazel,safarmer/bazel,kchodorow/bazel,ulfjack/bazel,davidzchen/bazel,xindaya/bazel,werkt/bazel,juhalindfors/bazel-patches,rhuss/bazel,ulfjack/bazel,d/bazel,werkt/bazel,aehlig/bazel,mbrukman/bazel,LuminateWireless/bazel,asarazan/bazel,aehlig/bazel,twitter-forks/bazel,sicipio/bazel,d/bazel,zhexuany/bazel,vt09/bazel,JackSullivan/bazel,dhootha/bazel,safarmer/bazel,abergmeier-dsfishlabs/bazel,iamthearm/bazel,murugamsm/bazel,dslomov/bazel-windows,meteorcloudy/bazel,d/bazel,hermione521/bazel,dslomov/bazel-windows,ruo91/bazel,dropbox/bazel,dinowernli/bazel,mrdomino/bazel,Digas29/bazel,juhalindfors/bazel-patches,bazelbuild/bazel,ruo91/bazel,mbrukman/bazel,joshua0pang/bazel,Ansahmadiba/bazel,dslomov/bazel-windows,damienmg/bazel,vt09/bazel,juhalindfors/bazel-patches,damienmg/bazel,mbrukman/bazel,nkhuyu/bazel,Ansahmadiba/bazel,dhootha/bazel,davidzchen/bazel,safarmer/bazel,rhuss/bazel,murugamsm/bazel,rohitsaboo/bazel,safarmer/bazel,anupcshan/bazel,mikelikespie/bazel,dhootha/bazel,ButterflyNetwork/bazel,wakashige/bazel,kchodorow/bazel,rhuss/bazel,mikelalcon/bazel,dslomov/bazel-windows,kchodorow/bazel,ulfjack/bazel,sicipio/bazel,katre/bazel,hermione521/bazel,perezd/bazel,abergmeier-dsfishlabs/bazel,kamalmarhubi/bazel,aehlig/bazel,twitter-forks/bazel,nkhuyu/bazel,anupcshan/bazel,xindaya/bazel,whuwxl/bazel,hhclam/bazel,rohitsaboo/bazel,aehlig/bazel,bazelbuild/bazel,Digas29/bazel,whuwxl/bazel,safarmer/bazel,dslomov/bazel-windows,xindaya/bazel,mikelikespie/bazel,UrbanCompass/bazel,kamalmarhubi/bazel,LuminateWireless/bazel,snnn/bazel,joshua0pang/bazel,variac/bazel,ruo91/bazel,nkhuyu/bazel,manashmndl/bazel,akira-baruah/bazel,asarazan/bazel,d/bazel,manashmndl/bazel,mikelikespie/bazel,joshua0pang/bazel,akira-baruah/bazel,meteorcloudy/bazel,asarazan/bazel,manashmndl/bazel,LuminateWireless/bazel,davidzchen/bazel,snnn/bazel,variac/bazel,Asana/bazel,asarazan/bazel,spxtr/bazel,mikelalcon/bazel,akira-baruah/bazel,kchodorow/bazel,cushon/bazel,cushon/bazel,ButterflyNetwork/bazel,kchodorow/bazel-1,mbrukman/bazel,whuwxl/bazel,ButterflyNetwork/bazel,spxtr/bazel,JackSullivan/bazel,manashmndl/bazel,meteorcloudy/bazel,katre/bazel,spxtr/bazel,werkt/bazel,Ansahmadiba/bazel,snnn/bazel,abergmeier-dsfishlabs/bazel,ulfjack/bazel,dslomov/bazel,dhootha/bazel,meteorcloudy/bazel,murugamsm/bazel,meteorcloudy/bazel,asarazan/bazel,spxtr/bazel,hhclam/bazel,iamthearm/bazel,zhexuany/bazel,UrbanCompass/bazel,meteorcloudy/bazel,mrdomino/bazel,anupcshan/bazel,wakashige/bazel,safarmer/bazel,abergmeier-dsfishlabs/bazel,spxtr/bazel,hhclam/bazel,whuwxl/bazel,d/bazel,mrdomino/bazel,vt09/bazel,rhuss/bazel,bazelbuild/bazel,mikelalcon/bazel,nkhuyu/bazel,Digas29/bazel,cushon/bazel,d/bazel,dropbox/bazel,sicipio/bazel,ruo91/bazel,xindaya/bazel,werkt/bazel,davidzchen/bazel,hhclam/bazel,rohitsaboo/bazel,Digas29/bazel,katre/bazel,vt09/bazel,ruo91/bazel,juhalindfors/bazel-patches,vt09/bazel,mrdomino/bazel,rhuss/bazel,Ansahmadiba/bazel,ulfjack/bazel,wakashige/bazel,kchodorow/bazel,perezd/bazel,wakashige/bazel,variac/bazel,kchodorow/bazel-1,aehlig/bazel,twitter-forks/bazel,Ansahmadiba/bazel,Asana/bazel,mbrukman/bazel,twitter-forks/bazel,asarazan/bazel,rhuss/bazel,joshua0pang/bazel,dinowernli/bazel,rhuss/bazel,ButterflyNetwork/bazel,joshua0pang/bazel,anupcshan/bazel,UrbanCompass/bazel,dropbox/bazel,dropbox/bazel,LuminateWireless/bazel,anupcshan/bazel,abergmeier-dsfishlabs/bazel,rohitsaboo/bazel,LuminateWireless/bazel,werkt/bazel,perezd/bazel,hermione521/bazel,iamthearm/bazel,cushon/bazel,LuminateWireless/bazel,sicipio/bazel,Digas29/bazel,ButterflyNetwork/bazel,xindaya/bazel,twitter-forks/bazel,bazelbuild/bazel,Asana/bazel,sicipio/bazel,dropbox/bazel,hhclam/bazel,whuwxl/bazel,manashmndl/bazel,mrdomino/bazel | markdown | ## Code Before:
Skylark is a work-in-progress project, which allows extending Bazel with new
rules or macros (composition of rules and macros).
## Goals
* **Power to the user**. We want to allow users to write new rules in a simple
language without having to understand all of Bazel's internals. The core
contributors have to write or review all changes to native Bazel rules (both
inside and outside of Google). This is a lot of work and we have to push back
on new rules.
* **Simplicity**. Skylark has been designed to be as simple as possible. Contrary
to native rules, the code is very short and does not rely on complex
inheritance.
* **Faster development**. With Skylark, rules are stored in the source tree. Modify one
rule file and run Bazel to see the result immediately. Before Skylark, we
had to rebuild and restart Bazel before seeing a change, this slowed down the
development process a lot.
* **Faster release cycle**. Update one rule file, commit the changes to
version control and everyone will use it when they sync. No need to wait for
a native rule to be released with the next Bazel binary.
## Getting started
Read the [concepts](concepts.md) behind Skylark and try the
[cookbook examples](cookbook.md). To go further, read about the
[standard library](lib/globals.html).
## Instruction:
Make sidebar use more descriptive names
A user (hio) on IRC pointed out that putting "Skylark" and "Skyframe" in the
sidebar is intimidating to new users (what is a skylark and why would one
care?).
--
MOS_MIGRATED_REVID=101931895
## Code After:
Bazel includes an API for writing your own rules, called Skylark. Skylark is a
work-in-progress project, which allows extending Bazel with new rules or macros
(composition of rules and macros).
## Goals
* **Power to the user**. We want to allow users to write new rules in a simple
language without having to understand all of Bazel's internals. The core
contributors have to write or review all changes to native Bazel rules (both
inside and outside of Google). This is a lot of work and we have to push back
on new rules.
* **Simplicity**. Skylark has been designed to be as simple as possible. Contrary
to native rules, the code is very short and does not rely on complex
inheritance.
* **Faster development**. With Skylark, rules are stored in the source tree. Modify one
rule file and run Bazel to see the result immediately. Before Skylark, we
had to rebuild and restart Bazel before seeing a change, this slowed down the
development process a lot.
* **Faster release cycle**. Update one rule file, commit the changes to
version control and everyone will use it when they sync. No need to wait for
a native rule to be released with the next Bazel binary.
## Getting started
Read the [concepts](concepts.md) behind Skylark and try the
[cookbook examples](cookbook.md). To go further, read about the
[standard library](lib/globals.html).
|
+ Bazel includes an API for writing your own rules, called Skylark. Skylark is a
- Skylark is a work-in-progress project, which allows extending Bazel with new
? -------------
+ work-in-progress project, which allows extending Bazel with new rules or macros
? ++++++++++++++++
- rules or macros (composition of rules and macros).
? ----------------
+ (composition of rules and macros).
## Goals
* **Power to the user**. We want to allow users to write new rules in a simple
language without having to understand all of Bazel's internals. The core
contributors have to write or review all changes to native Bazel rules (both
inside and outside of Google). This is a lot of work and we have to push back
on new rules.
* **Simplicity**. Skylark has been designed to be as simple as possible. Contrary
to native rules, the code is very short and does not rely on complex
inheritance.
* **Faster development**. With Skylark, rules are stored in the source tree. Modify one
rule file and run Bazel to see the result immediately. Before Skylark, we
had to rebuild and restart Bazel before seeing a change, this slowed down the
development process a lot.
* **Faster release cycle**. Update one rule file, commit the changes to
version control and everyone will use it when they sync. No need to wait for
a native rule to be released with the next Bazel binary.
## Getting started
Read the [concepts](concepts.md) behind Skylark and try the
[cookbook examples](cookbook.md). To go further, read about the
[standard library](lib/globals.html).
| 5 | 0.166667 | 3 | 2 |
ed044a79347fcde11416c51a5c577fe2cc467050 | pyfr/readers/base.py | pyfr/readers/base.py |
import uuid
from abc import ABCMeta, abstractmethod
class BaseReader(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self):
pass
@abstractmethod
def _to_raw_pyfrm(self):
pass
def to_pyfrm(self):
mesh = self._to_raw_pyfrm()
# Add metadata
mesh['mesh_uuid'] = str(uuid.uuid4())
return mesh
|
import re
import uuid
import itertools as it
from abc import ABCMeta, abstractmethod
import numpy as np
class BaseReader(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self):
pass
@abstractmethod
def _to_raw_pyfrm(self):
pass
def _optimize(self, mesh):
# Sort interior interfaces
for f in it.ifilter(lambda f: re.match('con_p\d+', f), mesh):
mesh[f] = mesh[f][:,np.argsort(mesh[f][0])]
def to_pyfrm(self):
mesh = self._to_raw_pyfrm()
# Perform some simple optimizations on the mesh
self._optimize(mesh)
# Add metadata
mesh['mesh_uuid'] = str(uuid.uuid4())
return mesh
| Add some simple optimizations into the mesh reader classes. | Add some simple optimizations into the mesh reader classes.
This yields a ~1.5% performance improvement.
| Python | bsd-3-clause | tjcorona/PyFR,tjcorona/PyFR,BrianVermeire/PyFR,tjcorona/PyFR,Aerojspark/PyFR,iyer-arvind/PyFR | python | ## Code Before:
import uuid
from abc import ABCMeta, abstractmethod
class BaseReader(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self):
pass
@abstractmethod
def _to_raw_pyfrm(self):
pass
def to_pyfrm(self):
mesh = self._to_raw_pyfrm()
# Add metadata
mesh['mesh_uuid'] = str(uuid.uuid4())
return mesh
## Instruction:
Add some simple optimizations into the mesh reader classes.
This yields a ~1.5% performance improvement.
## Code After:
import re
import uuid
import itertools as it
from abc import ABCMeta, abstractmethod
import numpy as np
class BaseReader(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self):
pass
@abstractmethod
def _to_raw_pyfrm(self):
pass
def _optimize(self, mesh):
# Sort interior interfaces
for f in it.ifilter(lambda f: re.match('con_p\d+', f), mesh):
mesh[f] = mesh[f][:,np.argsort(mesh[f][0])]
def to_pyfrm(self):
mesh = self._to_raw_pyfrm()
# Perform some simple optimizations on the mesh
self._optimize(mesh)
# Add metadata
mesh['mesh_uuid'] = str(uuid.uuid4())
return mesh
|
+ import re
import uuid
+ import itertools as it
from abc import ABCMeta, abstractmethod
+
+ import numpy as np
class BaseReader(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self):
pass
@abstractmethod
def _to_raw_pyfrm(self):
pass
+ def _optimize(self, mesh):
+ # Sort interior interfaces
+ for f in it.ifilter(lambda f: re.match('con_p\d+', f), mesh):
+ mesh[f] = mesh[f][:,np.argsort(mesh[f][0])]
+
def to_pyfrm(self):
mesh = self._to_raw_pyfrm()
+
+ # Perform some simple optimizations on the mesh
+ self._optimize(mesh)
# Add metadata
mesh['mesh_uuid'] = str(uuid.uuid4())
return mesh | 12 | 0.5 | 12 | 0 |
b69084b93d1e5e7af40824417c77842babca011d | README.md | README.md |
[](https://travis-ci.org/soasme/retries)
A dead simple way to retry your method.
Through source code:
git clone git://github.com/soasme/retries.git
cd retries
python setup.py install
Usage:
from retry import retry
@retry(errors=(urllib2.URLError), tries=3, delay=3.5)
def fetch_page():
pass
@retry(errors=(TTransportException, ), delay=0.1)
def thrift_call():
pass
|
[](https://travis-ci.org/soasme/retries)
A dead simple way to retry your method.
Through pip:
pip install retries
Through source code:
git clone git://github.com/soasme/retries.git
cd retries
python setup.py install
Usage:
from retry import retry
@retry(errors=(urllib2.URLError), tries=3, delay=3.5)
def fetch_page():
pass
@retry(errors=(TTransportException, ), delay=0.1)
def thrift_call():
pass
| Add pip way in readme | Add pip way in readme
| Markdown | mit | soasme/retries | markdown | ## Code Before:
[](https://travis-ci.org/soasme/retries)
A dead simple way to retry your method.
Through source code:
git clone git://github.com/soasme/retries.git
cd retries
python setup.py install
Usage:
from retry import retry
@retry(errors=(urllib2.URLError), tries=3, delay=3.5)
def fetch_page():
pass
@retry(errors=(TTransportException, ), delay=0.1)
def thrift_call():
pass
## Instruction:
Add pip way in readme
## Code After:
[](https://travis-ci.org/soasme/retries)
A dead simple way to retry your method.
Through pip:
pip install retries
Through source code:
git clone git://github.com/soasme/retries.git
cd retries
python setup.py install
Usage:
from retry import retry
@retry(errors=(urllib2.URLError), tries=3, delay=3.5)
def fetch_page():
pass
@retry(errors=(TTransportException, ), delay=0.1)
def thrift_call():
pass
|
[](https://travis-ci.org/soasme/retries)
A dead simple way to retry your method.
+
+ Through pip:
+
+ pip install retries
Through source code:
git clone git://github.com/soasme/retries.git
cd retries
python setup.py install
Usage:
from retry import retry
@retry(errors=(urllib2.URLError), tries=3, delay=3.5)
def fetch_page():
pass
@retry(errors=(TTransportException, ), delay=0.1)
def thrift_call():
pass | 4 | 0.181818 | 4 | 0 |
4bac5d5401b16c4fadf8d01ab98df6ff96b51ab0 | CMakeLists.txt | CMakeLists.txt | cmake_minimum_required(VERSION 2.8)
option(test "Build all tests." OFF)
project(fj)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wextra -g")
add_library(fj_lib src/term.cpp src/term_visitor.h src/eval_term_visitor.cpp src/eval_term_visitor.h src/utils.h src/utils.cpp src/context.cpp src/context.h test/context_test.cpp src/method_body.cpp src/method_body.h src/class_body.cpp src/class_body.h src/base_types.h src/ast_struct.h)
add_executable(fj src/main.cpp src/tokenizer/keyword_token.cpp src/tokenizer/keyword_token.h src/tokenizer/tokenizer.cpp src/tokenizer/tokenizer.h src/tokenizer/token.h src/tokenizer/token_builder.cpp src/tokenizer/token_builder.h src/tokenizer/bracket_token.cpp src/tokenizer/bracket_token.h)
target_link_libraries(fj fj_lib)
add_executable(fj_test test/class_body_test.cpp test/context_test.cpp test/evaluation_test.cpp test/tokenizer_test.cpp)
include_directories(../PEGTL)
include_directories(src)
target_link_libraries(fj_test gtest gtest_main pthread)
target_link_libraries(fj_test fj_lib)
| cmake_minimum_required(VERSION 2.8)
option(test "Build all tests." OFF)
project(fj)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wextra -g")
add_library(fj_lib src/term.cpp src/term_visitor.h src/eval_term_visitor.cpp src/eval_term_visitor.h src/utils.h src/utils.cpp src/context.cpp src/context.h test/context_test.cpp src/method_body.cpp src/method_body.h src/class_body.cpp src/class_body.h src/base_types.h src/ast_struct.h)
add_executable(fj src/main.cpp)
target_link_libraries(fj fj_lib)
add_executable(fj_test test/class_body_test.cpp test/context_test.cpp test/evaluation_test.cpp test/tokenizer_test.cpp)
include_directories(../PEGTL)
include_directories(src)
target_link_libraries(fj_test gtest gtest_main pthread)
target_link_libraries(fj_test fj_lib)
| Remove tokenizer files from build | Remove tokenizer files from build
| Text | mit | triplepointfive/fj,triplepointfive/fj | text | ## Code Before:
cmake_minimum_required(VERSION 2.8)
option(test "Build all tests." OFF)
project(fj)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wextra -g")
add_library(fj_lib src/term.cpp src/term_visitor.h src/eval_term_visitor.cpp src/eval_term_visitor.h src/utils.h src/utils.cpp src/context.cpp src/context.h test/context_test.cpp src/method_body.cpp src/method_body.h src/class_body.cpp src/class_body.h src/base_types.h src/ast_struct.h)
add_executable(fj src/main.cpp src/tokenizer/keyword_token.cpp src/tokenizer/keyword_token.h src/tokenizer/tokenizer.cpp src/tokenizer/tokenizer.h src/tokenizer/token.h src/tokenizer/token_builder.cpp src/tokenizer/token_builder.h src/tokenizer/bracket_token.cpp src/tokenizer/bracket_token.h)
target_link_libraries(fj fj_lib)
add_executable(fj_test test/class_body_test.cpp test/context_test.cpp test/evaluation_test.cpp test/tokenizer_test.cpp)
include_directories(../PEGTL)
include_directories(src)
target_link_libraries(fj_test gtest gtest_main pthread)
target_link_libraries(fj_test fj_lib)
## Instruction:
Remove tokenizer files from build
## Code After:
cmake_minimum_required(VERSION 2.8)
option(test "Build all tests." OFF)
project(fj)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wextra -g")
add_library(fj_lib src/term.cpp src/term_visitor.h src/eval_term_visitor.cpp src/eval_term_visitor.h src/utils.h src/utils.cpp src/context.cpp src/context.h test/context_test.cpp src/method_body.cpp src/method_body.h src/class_body.cpp src/class_body.h src/base_types.h src/ast_struct.h)
add_executable(fj src/main.cpp)
target_link_libraries(fj fj_lib)
add_executable(fj_test test/class_body_test.cpp test/context_test.cpp test/evaluation_test.cpp test/tokenizer_test.cpp)
include_directories(../PEGTL)
include_directories(src)
target_link_libraries(fj_test gtest gtest_main pthread)
target_link_libraries(fj_test fj_lib)
| cmake_minimum_required(VERSION 2.8)
option(test "Build all tests." OFF)
project(fj)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wextra -g")
add_library(fj_lib src/term.cpp src/term_visitor.h src/eval_term_visitor.cpp src/eval_term_visitor.h src/utils.h src/utils.cpp src/context.cpp src/context.h test/context_test.cpp src/method_body.cpp src/method_body.h src/class_body.cpp src/class_body.h src/base_types.h src/ast_struct.h)
- add_executable(fj src/main.cpp src/tokenizer/keyword_token.cpp src/tokenizer/keyword_token.h src/tokenizer/tokenizer.cpp src/tokenizer/tokenizer.h src/tokenizer/token.h src/tokenizer/token_builder.cpp src/tokenizer/token_builder.h src/tokenizer/bracket_token.cpp src/tokenizer/bracket_token.h)
+ add_executable(fj src/main.cpp)
target_link_libraries(fj fj_lib)
add_executable(fj_test test/class_body_test.cpp test/context_test.cpp test/evaluation_test.cpp test/tokenizer_test.cpp)
include_directories(../PEGTL)
include_directories(src)
target_link_libraries(fj_test gtest gtest_main pthread)
target_link_libraries(fj_test fj_lib)
| 2 | 0.117647 | 1 | 1 |
783f792a73cf55116db8c04f01a5276c8bc256c8 | platforms/esp32-idf/README.md | platforms/esp32-idf/README.md |
Download and install ESP-IDF v4.0
```sh
export IDF_PATH=/opt/esp32/esp-idf
# Set tools path if needed:
#export IDF_TOOLS_PATH=/opt/esp32
source $IDF_PATH/export.sh
idf.py menuconfig
# Select target:
idf.py set-target esp32s2beta # or esp32
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
```
|
Download and install ESP-IDF v4.3-beta1
```sh
export IDF_PATH=/opt/esp32/esp-idf
# Set tools path if needed:
#export IDF_TOOLS_PATH=/opt/esp32
source $IDF_PATH/export.sh
idf.py menuconfig
# Select target:
idf.py set-target esp32
#idf.py set-target esp32s2
#idf.py --preview set-target esp32c3
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
```
| Add build instructions for ESP32-C3 | Add build instructions for ESP32-C3
| Markdown | mit | wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3,wasm3/wasm3 | markdown | ## Code Before:
Download and install ESP-IDF v4.0
```sh
export IDF_PATH=/opt/esp32/esp-idf
# Set tools path if needed:
#export IDF_TOOLS_PATH=/opt/esp32
source $IDF_PATH/export.sh
idf.py menuconfig
# Select target:
idf.py set-target esp32s2beta # or esp32
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
```
## Instruction:
Add build instructions for ESP32-C3
## Code After:
Download and install ESP-IDF v4.3-beta1
```sh
export IDF_PATH=/opt/esp32/esp-idf
# Set tools path if needed:
#export IDF_TOOLS_PATH=/opt/esp32
source $IDF_PATH/export.sh
idf.py menuconfig
# Select target:
idf.py set-target esp32
#idf.py set-target esp32s2
#idf.py --preview set-target esp32c3
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
```
|
- Download and install ESP-IDF v4.0
? ^
+ Download and install ESP-IDF v4.3-beta1
? ^^^^^^^
```sh
export IDF_PATH=/opt/esp32/esp-idf
# Set tools path if needed:
#export IDF_TOOLS_PATH=/opt/esp32
source $IDF_PATH/export.sh
idf.py menuconfig
# Select target:
+ idf.py set-target esp32
- idf.py set-target esp32s2beta # or esp32
? ---------------
+ #idf.py set-target esp32s2
? +
+ #idf.py --preview set-target esp32c3
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor
``` | 6 | 0.285714 | 4 | 2 |
15a46cd30a1e3f54a141c4b3c26e3e9ab5f250d2 | docs/index.rst | docs/index.rst | .. jira-python documentation master file, created by
sphinx-quickstart on Thu May 3 17:01:50 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Python JIRA
###########
Python library to work with JIRA APIs
.. toctree::
installation
examples
jirashell
advanced
contributing
api
This documents the ``jira-python`` package (version |release|), a Python library designed to ease the use of the
JIRA REST API. Some basic support for the GreenHopper REST API also exists.
The source is stored at https://github.com/pycontribs/jira.
Until someone will find a better way to generate the release notes you can read
https://github.com/pycontribs/jira/blob/master/CHANGELOG which is generated based on git commit messages.
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| .. jira-python documentation master file, created by
sphinx-quickstart on Thu May 3 17:01:50 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Python JIRA
###########
Python library to work with JIRA APIs
.. toctree::
:numbered:
installation
examples
jirashell
advanced
contributing
api
This documents the ``jira-python`` package (version |release|), a Python library designed to ease the use of the
JIRA REST API. Some basic support for the GreenHopper REST API also exists.
The source is stored at https://github.com/pycontribs/jira.
Until someone will find a better way to generate the release notes you can read
https://github.com/pycontribs/jira/blob/master/CHANGELOG which is generated based on git commit messages.
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| Make the sections numbered again | Make the sections numbered again
| reStructuredText | bsd-2-clause | pycontribs/jira,pycontribs/jira,dwmarshall/pycontribs-jira,dwmarshall/pycontribs-jira | restructuredtext | ## Code Before:
.. jira-python documentation master file, created by
sphinx-quickstart on Thu May 3 17:01:50 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Python JIRA
###########
Python library to work with JIRA APIs
.. toctree::
installation
examples
jirashell
advanced
contributing
api
This documents the ``jira-python`` package (version |release|), a Python library designed to ease the use of the
JIRA REST API. Some basic support for the GreenHopper REST API also exists.
The source is stored at https://github.com/pycontribs/jira.
Until someone will find a better way to generate the release notes you can read
https://github.com/pycontribs/jira/blob/master/CHANGELOG which is generated based on git commit messages.
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
## Instruction:
Make the sections numbered again
## Code After:
.. jira-python documentation master file, created by
sphinx-quickstart on Thu May 3 17:01:50 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Python JIRA
###########
Python library to work with JIRA APIs
.. toctree::
:numbered:
installation
examples
jirashell
advanced
contributing
api
This documents the ``jira-python`` package (version |release|), a Python library designed to ease the use of the
JIRA REST API. Some basic support for the GreenHopper REST API also exists.
The source is stored at https://github.com/pycontribs/jira.
Until someone will find a better way to generate the release notes you can read
https://github.com/pycontribs/jira/blob/master/CHANGELOG which is generated based on git commit messages.
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| .. jira-python documentation master file, created by
sphinx-quickstart on Thu May 3 17:01:50 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Python JIRA
###########
Python library to work with JIRA APIs
.. toctree::
+ :numbered:
+
installation
examples
jirashell
advanced
contributing
api
This documents the ``jira-python`` package (version |release|), a Python library designed to ease the use of the
JIRA REST API. Some basic support for the GreenHopper REST API also exists.
The source is stored at https://github.com/pycontribs/jira.
Until someone will find a better way to generate the release notes you can read
https://github.com/pycontribs/jira/blob/master/CHANGELOG which is generated based on git commit messages.
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search` | 2 | 0.0625 | 2 | 0 |
b57a2e184e3861617c12801529295b0095257cd9 | petition/resources.py | petition/resources.py | from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
| from import_export import resources
import swapper
Signature = swapper.load_model("petition", "Signature")
class SignatureResource(resources.ModelResource):
class Meta:
model = Signature
| Fix swappable model in signature export | Fix swappable model in signature export
| Python | mit | watchdogpolska/django-one-petition,watchdogpolska/django-one-petition,watchdogpolska/django-one-petition | python | ## Code Before:
from import_export import resources
from .models import Signature
class SignatureResource(resources.ModelResource):
class Meta:
exclude = ('created_on', 'modified_on')
model = Signature
## Instruction:
Fix swappable model in signature export
## Code After:
from import_export import resources
import swapper
Signature = swapper.load_model("petition", "Signature")
class SignatureResource(resources.ModelResource):
class Meta:
model = Signature
| from import_export import resources
- from .models import Signature
+ import swapper
+
+ Signature = swapper.load_model("petition", "Signature")
class SignatureResource(resources.ModelResource):
class Meta:
- exclude = ('created_on', 'modified_on')
model = Signature | 5 | 0.625 | 3 | 2 |
f0005d4d30923ce6c583c6af2dd990134fb3d826 | unsafe.go | unsafe.go | package bbolt
import "unsafe"
func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset)
}
func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz)
}
func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
}
| package bbolt
import "unsafe"
func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset)
}
func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz)
}
func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
// See: https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices
//
// This memory is not allocated from C, but it is unmanaged by Go's
// garbage collector and should behave similarly, and the compiler
// should produce similar code. Note that this conversion allows a
// subslice to begin after the base address, with an optional offset,
// while the URL above does not cover this case and only slices from
// index 0. However, the wiki never says that the address must be to
// the beginning of a C allocation (or even that malloc was used at
// all), so this is believed to be correct.
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
}
| Comment the byte slice conversion | Comment the byte slice conversion
| Go | mit | etcd-io/bbolt | go | ## Code Before:
package bbolt
import "unsafe"
func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset)
}
func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz)
}
func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
}
## Instruction:
Comment the byte slice conversion
## Code After:
package bbolt
import "unsafe"
func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset)
}
func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz)
}
func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
// See: https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices
//
// This memory is not allocated from C, but it is unmanaged by Go's
// garbage collector and should behave similarly, and the compiler
// should produce similar code. Note that this conversion allows a
// subslice to begin after the base address, with an optional offset,
// while the URL above does not cover this case and only slices from
// index 0. However, the wiki never says that the address must be to
// the beginning of a C allocation (or even that malloc was used at
// all), so this is believed to be correct.
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
}
| package bbolt
import "unsafe"
func unsafeAdd(base unsafe.Pointer, offset uintptr) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset)
}
func unsafeIndex(base unsafe.Pointer, offset uintptr, elemsz uintptr, n int) unsafe.Pointer {
return unsafe.Pointer(uintptr(base) + offset + uintptr(n)*elemsz)
}
func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
+ // See: https://github.com/golang/go/wiki/cgo#turning-c-arrays-into-go-slices
+ //
+ // This memory is not allocated from C, but it is unmanaged by Go's
+ // garbage collector and should behave similarly, and the compiler
+ // should produce similar code. Note that this conversion allows a
+ // subslice to begin after the base address, with an optional offset,
+ // while the URL above does not cover this case and only slices from
+ // index 0. However, the wiki never says that the address must be to
+ // the beginning of a C allocation (or even that malloc was used at
+ // all), so this is believed to be correct.
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
} | 10 | 0.666667 | 10 | 0 |
f689e4dd028db8e006fc80fa7253d651d67e8969 | lib/dockly/util/git.rb | lib/dockly/util/git.rb | require 'grit'
module Dockly::Util::Git
extend self
def git_repo
@git_repo ||= Grit::Repo.new('.')
end
def git_sha
@git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown'
end
end
| require 'grit'
module Dockly::Util::Git
module_function
def git_repo
@git_repo ||= Grit::Repo.new('.')
end
def git_sha
@git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown'
end
end
| Use `module_function` instead of `extend self` in Dockly::Util::Git | Use `module_function` instead of `extend self` in Dockly::Util::Git
| Ruby | mit | swipely/dockly,swipely/dockly,jefflaplante/dockly,jefflaplante/dockly | ruby | ## Code Before:
require 'grit'
module Dockly::Util::Git
extend self
def git_repo
@git_repo ||= Grit::Repo.new('.')
end
def git_sha
@git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown'
end
end
## Instruction:
Use `module_function` instead of `extend self` in Dockly::Util::Git
## Code After:
require 'grit'
module Dockly::Util::Git
module_function
def git_repo
@git_repo ||= Grit::Repo.new('.')
end
def git_sha
@git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown'
end
end
| require 'grit'
module Dockly::Util::Git
- extend self
+ module_function
def git_repo
@git_repo ||= Grit::Repo.new('.')
end
def git_sha
@git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown'
end
end | 2 | 0.153846 | 1 | 1 |
10880baf9d4daa3c890c9a34ed6e1424674f3005 | e2e-tests/check-build.sh | e2e-tests/check-build.sh |
# 10 minutes
set timeout 600
spawn docker run homebridge-pc-volume-e2e
expect {
"ERROR LOADING PLUGIN" {exit 1}
-re {Homebridge\ v[0-9.]*\ is\ running}
}
| set timeout 600
spawn docker run homebridge-pc-volume-e2e
expect {
"ERROR LOADING PLUGIN" {exit 1}
# Version 1.2.3 used to output "Homebridge v1.2.3 is running", but now appears to output "Homebridge is running" so both are accepted. This would also match version like `v1.2.` but 🤷♂️
-re {Homebridge( v[0-9]+[0-9.]*)? is running}
}
| Fix e2e tests expect regex | Fix e2e tests expect regex
| Shell | mit | JosephDuffy/homebridge-pc-volume,JosephDuffy/homebridge-pc-volume,JosephDuffy/homebridge-pc-volume | shell | ## Code Before:
# 10 minutes
set timeout 600
spawn docker run homebridge-pc-volume-e2e
expect {
"ERROR LOADING PLUGIN" {exit 1}
-re {Homebridge\ v[0-9.]*\ is\ running}
}
## Instruction:
Fix e2e tests expect regex
## Code After:
set timeout 600
spawn docker run homebridge-pc-volume-e2e
expect {
"ERROR LOADING PLUGIN" {exit 1}
# Version 1.2.3 used to output "Homebridge v1.2.3 is running", but now appears to output "Homebridge is running" so both are accepted. This would also match version like `v1.2.` but 🤷♂️
-re {Homebridge( v[0-9]+[0-9.]*)? is running}
}
| -
- # 10 minutes
set timeout 600
spawn docker run homebridge-pc-volume-e2e
expect {
"ERROR LOADING PLUGIN" {exit 1}
+ # Version 1.2.3 used to output "Homebridge v1.2.3 is running", but now appears to output "Homebridge is running" so both are accepted. This would also match version like `v1.2.` but 🤷♂️
- -re {Homebridge\ v[0-9.]*\ is\ running}
? ^ ^ -
+ -re {Homebridge( v[0-9]+[0-9.]*)? is running}
? ^ ++++++ ^^
} | 5 | 0.625 | 2 | 3 |
6a2db8478364554c343dc4d96ef73e5d6e40919b | .emacs.d/personal/personal.el | .emacs.d/personal/personal.el | ;; show line numbers
(global-linum-mode t)
;; enable arrow keys
(setq prelude-guru nil)
;; disable standard theme
(disable-theme 'zenburn)
;; disable spellchecking
(setq prelude-flyspell nil)
;; hide scrollbar
(scroll-bar-mode -1)
;; Highlight current line
(global-hl-line-mode 0)
;; Install Intero
(require 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)
;; PureScript
(require 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation)))
;; nix
(require 'nix-mode)
| ;; show line numbers
(global-linum-mode t)
;; enable arrow keys
(setq prelude-guru nil)
;; disable standard theme
(disable-theme 'zenburn)
;; disable spellchecking
(setq prelude-flyspell nil)
;; hide scrollbar
(scroll-bar-mode -1)
;; Highlight current line
(global-hl-line-mode 0)
;; Install Intero
(package-install 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)
;; PureScript
(package-install 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation)))
;; nix
(package-install 'nix-mode)
| Fix installation of needed packages | Fix installation of needed packages
| Emacs Lisp | mit | sectore/dotfiles,sectore/dotfiles | emacs-lisp | ## Code Before:
;; show line numbers
(global-linum-mode t)
;; enable arrow keys
(setq prelude-guru nil)
;; disable standard theme
(disable-theme 'zenburn)
;; disable spellchecking
(setq prelude-flyspell nil)
;; hide scrollbar
(scroll-bar-mode -1)
;; Highlight current line
(global-hl-line-mode 0)
;; Install Intero
(require 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)
;; PureScript
(require 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation)))
;; nix
(require 'nix-mode)
## Instruction:
Fix installation of needed packages
## Code After:
;; show line numbers
(global-linum-mode t)
;; enable arrow keys
(setq prelude-guru nil)
;; disable standard theme
(disable-theme 'zenburn)
;; disable spellchecking
(setq prelude-flyspell nil)
;; hide scrollbar
(scroll-bar-mode -1)
;; Highlight current line
(global-hl-line-mode 0)
;; Install Intero
(package-install 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)
;; PureScript
(package-install 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation)))
;; nix
(package-install 'nix-mode)
| ;; show line numbers
(global-linum-mode t)
;; enable arrow keys
(setq prelude-guru nil)
;; disable standard theme
(disable-theme 'zenburn)
;; disable spellchecking
(setq prelude-flyspell nil)
;; hide scrollbar
(scroll-bar-mode -1)
;; Highlight current line
(global-hl-line-mode 0)
;; Install Intero
- (require 'intero)
+ (package-install 'intero)
(add-hook 'haskell-mode-hook 'intero-mode)
;; PureScript
- (require 'psc-ide)
+ (package-install 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation)))
;; nix
- (require 'nix-mode)
+ (package-install 'nix-mode) | 6 | 0.176471 | 3 | 3 |
f964f44aa001c282689de4c72578ea20b97544d5 | tests/www/index2.html | tests/www/index2.html | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
</head>
<body>
<script type="text/javascript" src="../../cordova.js"></script>
<script>
document.addEventListener("deviceready",function() {
var success = function(data) {
document.body.innerText = data;
setTimeout(function(){
PGMultiView.dismissView(data);
},10);
};
var error = function(e) { };
PGMultiView.getMessage(success, error);
});
</script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<!--<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';script-src * 'unsafe-inline';style-src 'self' 'unsafe-inline'; media-src *">-->
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
</head>
<body>
<script type="text/javascript" src="../../cordova.js"></script>
<script>
document.addEventListener("deviceready",function() {
var success = function(data) {
// for some reason, we need to wait to pass data back
setTimeout(function(){
PGMultiView.dismissView(data);
},500);
};
var error = function(e) { };
PGMultiView.getMessage(success, error);
});
</script>
</body>
</html>
| Fix failing test, removed csp, and delay callback | Fix failing test, removed csp, and delay callback
| HTML | apache-2.0 | purplecabbage/phonegap-plugin-multiview,purplecabbage/phonegap-plugin-multiview,purplecabbage/phonegap-plugin-multiview,phonegap/phonegap-plugin-multiview,phonegap/phonegap-plugin-multiview,phonegap/phonegap-plugin-multiview | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
</head>
<body>
<script type="text/javascript" src="../../cordova.js"></script>
<script>
document.addEventListener("deviceready",function() {
var success = function(data) {
document.body.innerText = data;
setTimeout(function(){
PGMultiView.dismissView(data);
},10);
};
var error = function(e) { };
PGMultiView.getMessage(success, error);
});
</script>
</body>
</html>
## Instruction:
Fix failing test, removed csp, and delay callback
## Code After:
<!DOCTYPE html>
<html>
<head>
<!--<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';script-src * 'unsafe-inline';style-src 'self' 'unsafe-inline'; media-src *">-->
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
</head>
<body>
<script type="text/javascript" src="../../cordova.js"></script>
<script>
document.addEventListener("deviceready",function() {
var success = function(data) {
// for some reason, we need to wait to pass data back
setTimeout(function(){
PGMultiView.dismissView(data);
},500);
};
var error = function(e) { };
PGMultiView.getMessage(success, error);
});
</script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
- <meta http-equiv="Content-Security-Policy" content="default-src * 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';style-src 'self' 'unsafe-inline'; media-src *">
? --
+ <!--<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';script-src * 'unsafe-inline';style-src 'self' 'unsafe-inline'; media-src *">-->
? ++++ +++++++++++++++++++++++++++++ +++
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
</head>
<body>
<script type="text/javascript" src="../../cordova.js"></script>
<script>
document.addEventListener("deviceready",function() {
var success = function(data) {
- document.body.innerText = data;
+ // for some reason, we need to wait to pass data back
setTimeout(function(){
PGMultiView.dismissView(data);
- },10);
? ^
+ },500);
? ^^
};
var error = function(e) { };
PGMultiView.getMessage(success, error);
});
</script>
</body>
</html> | 6 | 0.230769 | 3 | 3 |
c2707ddc68cc15d4218d9bb0d95a0f7b6c7e954f | public/views/repositories.html | public/views/repositories.html | <div ng-controller="RegistryBrowseCtrl">
<div class="col-md-8 col-s-12" ng-controller="RegistryRepositoriesCtrl">
<div class="row" id="topfield">
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-circle btn-small" ng-click="buildList()"><i class="fa fa-refresh"></i></button>
</div>
<div class="col-md-3">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Enter repository name..." search-enter-pressed="searchRepository()" ng-model="searchval">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="searchRepository()">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-offset-1" ng-if="search_error!==null">
{{search_error}}
</div>
</div>
<br/>
<div class="row">
<div class="repositoriesList col-xs-12 col-md-4" repositories-list=""></div>
</div>
</div>
</div>
| <div ng-controller="RegistryBrowseCtrl">
<div class="col-md-8 col-s-12" ng-controller="RegistryRepositoriesCtrl">
<div class="row" id="topfield">
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-circle btn-small" ng-click="buildList()"><i class="fa fa-list" title="Reload catalog"></i></button>
</div>
<div class="col-md-3">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Enter repository name..." search-enter-pressed="searchRepository()" ng-model="searchval">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="searchRepository()">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-offset-1" ng-if="search_error!==null">
{{search_error}}
</div>
</div>
<br/>
<div class="row">
<div class="repositoriesList col-xs-12 col-md-4" repositories-list=""></div>
</div>
</div>
</div>
| Refresh list button with other icon and tooltip | Refresh list button with other icon and tooltip
| HTML | apache-2.0 | Messinger/docker-redmine-auth,Messinger/docker-redmine-auth,Messinger/docker-redmine-auth,Messinger/docker-redmine-auth | html | ## Code Before:
<div ng-controller="RegistryBrowseCtrl">
<div class="col-md-8 col-s-12" ng-controller="RegistryRepositoriesCtrl">
<div class="row" id="topfield">
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-circle btn-small" ng-click="buildList()"><i class="fa fa-refresh"></i></button>
</div>
<div class="col-md-3">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Enter repository name..." search-enter-pressed="searchRepository()" ng-model="searchval">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="searchRepository()">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-offset-1" ng-if="search_error!==null">
{{search_error}}
</div>
</div>
<br/>
<div class="row">
<div class="repositoriesList col-xs-12 col-md-4" repositories-list=""></div>
</div>
</div>
</div>
## Instruction:
Refresh list button with other icon and tooltip
## Code After:
<div ng-controller="RegistryBrowseCtrl">
<div class="col-md-8 col-s-12" ng-controller="RegistryRepositoriesCtrl">
<div class="row" id="topfield">
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-circle btn-small" ng-click="buildList()"><i class="fa fa-list" title="Reload catalog"></i></button>
</div>
<div class="col-md-3">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Enter repository name..." search-enter-pressed="searchRepository()" ng-model="searchval">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="searchRepository()">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-offset-1" ng-if="search_error!==null">
{{search_error}}
</div>
</div>
<br/>
<div class="row">
<div class="repositoriesList col-xs-12 col-md-4" repositories-list=""></div>
</div>
</div>
</div>
| <div ng-controller="RegistryBrowseCtrl">
<div class="col-md-8 col-s-12" ng-controller="RegistryRepositoriesCtrl">
<div class="row" id="topfield">
<div class="col-sm-1">
- <button type="button" class="btn btn-primary btn-circle btn-small" ng-click="buildList()"><i class="fa fa-refresh"></i></button>
? ^ ^^ ^^
+ <button type="button" class="btn btn-primary btn-circle btn-small" ng-click="buildList()"><i class="fa fa-list" title="Reload catalog"></i></button>
? ^^^^^^^^^^ ^^^ ^^^^^^^^^^^^
</div>
<div class="col-md-3">
<div class="input-group custom-search-form">
<input type="text" class="form-control" placeholder="Enter repository name..." search-enter-pressed="searchRepository()" ng-model="searchval">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="searchRepository()">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-offset-1" ng-if="search_error!==null">
{{search_error}}
</div>
</div>
<br/>
<div class="row">
<div class="repositoriesList col-xs-12 col-md-4" repositories-list=""></div>
</div>
</div>
</div> | 2 | 0.0625 | 1 | 1 |
168a83ca38df39dee82e35c3bc8da0ebc062acca | .github/workflows/main.yml | .github/workflows/main.yml | name: Deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_function:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: auth
name: 'Authenticate to Google Cloud'
uses: google-github-actions/auth@main
with:
workload_identity_provider: 'projects/259817799976/locations/global/workloadIdentityPools/actions-pool/providers/actions-provider'
service_account: 'github-cloud-functions-deploy@bayesian-calibration.iam.gserviceaccount.com'
access_token_lifetime: '300s' # optional, default: '3600s' (1 hour)
- id: deploy
uses: google-github-actions/deploy-cloud-functions@main
with:
source_dir: functions
name: QuestionsV2
runtime: go113
max_instances: 2
- id: test
run: curl "${{ steps.deploy.outputs.url }}"
| name: Deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_function:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: auth
name: 'Authenticate to Google Cloud'
uses: google-github-actions/auth@main
with:
workload_identity_provider: 'projects/259817799976/locations/global/workloadIdentityPools/actions-pool/providers/actions-provider'
service_account: 'github-cloud-functions-deploy@bayesian-calibration.iam.gserviceaccount.com'
access_token_lifetime: '300s' # optional, default: '3600s' (1 hour)
- id: deploy
uses: google-github-actions/deploy-cloud-functions@main
with:
source_dir: functions
name: QuestionsV2
runtime: go113
max_instances: 2
- id: test
run: curl "${{ steps.deploy.outputs.url }}"
build_svelte:
permissions:
contents: 'read'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: build
run: |
npm install
npm run build
- id: deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: docs
| Add svelte build as separate job. | Add svelte build as separate job.
| YAML | mit | sethrylan/bayesian,sethrylan/bayesian | yaml | ## Code Before:
name: Deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_function:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: auth
name: 'Authenticate to Google Cloud'
uses: google-github-actions/auth@main
with:
workload_identity_provider: 'projects/259817799976/locations/global/workloadIdentityPools/actions-pool/providers/actions-provider'
service_account: 'github-cloud-functions-deploy@bayesian-calibration.iam.gserviceaccount.com'
access_token_lifetime: '300s' # optional, default: '3600s' (1 hour)
- id: deploy
uses: google-github-actions/deploy-cloud-functions@main
with:
source_dir: functions
name: QuestionsV2
runtime: go113
max_instances: 2
- id: test
run: curl "${{ steps.deploy.outputs.url }}"
## Instruction:
Add svelte build as separate job.
## Code After:
name: Deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_function:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: auth
name: 'Authenticate to Google Cloud'
uses: google-github-actions/auth@main
with:
workload_identity_provider: 'projects/259817799976/locations/global/workloadIdentityPools/actions-pool/providers/actions-provider'
service_account: 'github-cloud-functions-deploy@bayesian-calibration.iam.gserviceaccount.com'
access_token_lifetime: '300s' # optional, default: '3600s' (1 hour)
- id: deploy
uses: google-github-actions/deploy-cloud-functions@main
with:
source_dir: functions
name: QuestionsV2
runtime: go113
max_instances: 2
- id: test
run: curl "${{ steps.deploy.outputs.url }}"
build_svelte:
permissions:
contents: 'read'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: build
run: |
npm install
npm run build
- id: deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: docs
| name: Deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_function:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: auth
name: 'Authenticate to Google Cloud'
uses: google-github-actions/auth@main
with:
workload_identity_provider: 'projects/259817799976/locations/global/workloadIdentityPools/actions-pool/providers/actions-provider'
service_account: 'github-cloud-functions-deploy@bayesian-calibration.iam.gserviceaccount.com'
access_token_lifetime: '300s' # optional, default: '3600s' (1 hour)
- id: deploy
uses: google-github-actions/deploy-cloud-functions@main
with:
source_dir: functions
name: QuestionsV2
runtime: go113
max_instances: 2
- id: test
run: curl "${{ steps.deploy.outputs.url }}"
+ build_svelte:
+ permissions:
+ contents: 'read'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - id: build
+ run: |
+ npm install
+ npm run build
+ - id: deploy
+ uses: JamesIves/github-pages-deploy-action@4.1.5
+ with:
+ branch: gh-pages
+ folder: docs | 15 | 0.441176 | 15 | 0 |
b4c045dcd90f7dc4264285276889a085e68ac282 | engines/synergy/app/controllers/synergy/pages_controller.rb | engines/synergy/app/controllers/synergy/pages_controller.rb | require_dependency "synergy/application_controller"
module Synergy
class PagesController < ApplicationController
attr_accessor :node
helper_method :node
def index
@node = Synergy::Node.find_by!(slug: '')
# @tree = Synergy::Node.tree_view(:slug)
render action: :index
end
def show
node = parent = Synergy::Node.find_by!(slug: '')
if params[:path]
path = params[:path].split('/')
path.each do |p|
parent = node = parent.children.find_by!(slug: p)
end
end
@node = node
render action: :show
end
end
end
| require_dependency "synergy/application_controller"
module Synergy
class PagesController < ApplicationController
attr_accessor :node
helper_method :node
def show
path = params[:path].blank? ? '' : "/#{params[:path]}"
@node = Synergy::Node.find_by!(path: path)
render action: :show
end
end
end
| Clean up controller to use path | Clean up controller to use path
| Ruby | mit | AusDTO/gov-au-beta,AusDTO/gov-au-beta,AusDTO/gov-au-beta,AusDTO/gov-au-beta,AusDTO/gov-au-beta | ruby | ## Code Before:
require_dependency "synergy/application_controller"
module Synergy
class PagesController < ApplicationController
attr_accessor :node
helper_method :node
def index
@node = Synergy::Node.find_by!(slug: '')
# @tree = Synergy::Node.tree_view(:slug)
render action: :index
end
def show
node = parent = Synergy::Node.find_by!(slug: '')
if params[:path]
path = params[:path].split('/')
path.each do |p|
parent = node = parent.children.find_by!(slug: p)
end
end
@node = node
render action: :show
end
end
end
## Instruction:
Clean up controller to use path
## Code After:
require_dependency "synergy/application_controller"
module Synergy
class PagesController < ApplicationController
attr_accessor :node
helper_method :node
def show
path = params[:path].blank? ? '' : "/#{params[:path]}"
@node = Synergy::Node.find_by!(path: path)
render action: :show
end
end
end
| require_dependency "synergy/application_controller"
module Synergy
class PagesController < ApplicationController
attr_accessor :node
helper_method :node
- def index
- @node = Synergy::Node.find_by!(slug: '')
- # @tree = Synergy::Node.tree_view(:slug)
- render action: :index
- end
-
def show
+ path = params[:path].blank? ? '' : "/#{params[:path]}"
- node = parent = Synergy::Node.find_by!(slug: '')
? --------- ^^^^ ^^
+ @node = Synergy::Node.find_by!(path: path)
? + ^^^^ ^^^^
-
- if params[:path]
- path = params[:path].split('/')
- path.each do |p|
- parent = node = parent.children.find_by!(slug: p)
- end
- end
- @node = node
render action: :show
end
end
end | 17 | 0.607143 | 2 | 15 |
df032380e3314d804eb6a624d75dbab4bf2d7ef9 | files/ansible.cfg | files/ansible.cfg | [defaults]
roles_path = /etc/ansible/roles:/opt/roles
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o IdentityFile /etc/dork-keys/key -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null
ansible_ssh_user = root | [defaults]
roles_path = /etc/ansible/roles:/opt/roles
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o IdentityFile /etc/dork-keys/key -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null
| Clone dorkstation instead of copying files. | Clone dorkstation instead of copying files.
| INI | mit | iamdork/dork.host | ini | ## Code Before:
[defaults]
roles_path = /etc/ansible/roles:/opt/roles
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o IdentityFile /etc/dork-keys/key -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null
ansible_ssh_user = root
## Instruction:
Clone dorkstation instead of copying files.
## Code After:
[defaults]
roles_path = /etc/ansible/roles:/opt/roles
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o IdentityFile /etc/dork-keys/key -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null
| [defaults]
roles_path = /etc/ansible/roles:/opt/roles
ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o IdentityFile /etc/dork-keys/key -o StrictHostKeyChecking no -o UserKnownHostsFile /dev/null
- ansible_ssh_user = root | 1 | 0.25 | 0 | 1 |
922ee126bcca9023284e97399012bbaf6ee89e46 | blog/css-concepts.html | blog/css-concepts.html |
The main thing to remember when using classes versus ids in HTML/CSS is **classes** can be used as many times as needed within a document. **IDs** can only be applied once within a document. Just like no two people should have the same passport number, NEVER use the same id on different elements.
You can also combine classes within an element, such as:
```
<p class="highlight indent">
.highlight { font-weight: bold; }
.indent { padding-left: 2em; }
```
Lastly, ids have higher specificity than classes. When declaration conflicts arise, these conflicts are resolved using the cascade rules - In simple terms, if a class selector and ID selector were to be in conflict, the ID selector wins.
Classes should be used mostly to group elements that have something in common together into a class, in order to be able to address them later. Classes are mostly used for styling. | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>$1</title>
</head>
<body>
<h1>What are the best practices associated with using classes vs. ids?</h1>
<p>
The main thing to remember when using classes versus ids in HTML/CSS is **classes** can be used as many times as needed within a document. **IDs** can only be applied once within a document. Just like no two people should have the same passport number, NEVER use the same id on different elements.</p>
You can also combine classes within an element, such as:
<br>
<code>
<p class="highlight indent">
.highlight { font-weight: bold; }
.indent { padding-left: 2em; }
</code>
<br>
<p>Lastly, ids have higher specificity than classes. When declaration conflicts arise, these conflicts are resolved using the cascade rules - In simple terms, if a class selector and ID selector were to be in conflict, the ID selector wins.
Classes should be used mostly to group elements that have something in common together into a class, in order to be able to address them later. Classes are mostly used for styling.
</p>
</body>
</html>
| Change CSS-Concepts blog to HTML | Change CSS-Concepts blog to HTML
| HTML | mit | AndyVegas/AndyVegas.github.io | html | ## Code Before:
The main thing to remember when using classes versus ids in HTML/CSS is **classes** can be used as many times as needed within a document. **IDs** can only be applied once within a document. Just like no two people should have the same passport number, NEVER use the same id on different elements.
You can also combine classes within an element, such as:
```
<p class="highlight indent">
.highlight { font-weight: bold; }
.indent { padding-left: 2em; }
```
Lastly, ids have higher specificity than classes. When declaration conflicts arise, these conflicts are resolved using the cascade rules - In simple terms, if a class selector and ID selector were to be in conflict, the ID selector wins.
Classes should be used mostly to group elements that have something in common together into a class, in order to be able to address them later. Classes are mostly used for styling.
## Instruction:
Change CSS-Concepts blog to HTML
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>$1</title>
</head>
<body>
<h1>What are the best practices associated with using classes vs. ids?</h1>
<p>
The main thing to remember when using classes versus ids in HTML/CSS is **classes** can be used as many times as needed within a document. **IDs** can only be applied once within a document. Just like no two people should have the same passport number, NEVER use the same id on different elements.</p>
You can also combine classes within an element, such as:
<br>
<code>
<p class="highlight indent">
.highlight { font-weight: bold; }
.indent { padding-left: 2em; }
</code>
<br>
<p>Lastly, ids have higher specificity than classes. When declaration conflicts arise, these conflicts are resolved using the cascade rules - In simple terms, if a class selector and ID selector were to be in conflict, the ID selector wins.
Classes should be used mostly to group elements that have something in common together into a class, in order to be able to address them later. Classes are mostly used for styling.
</p>
</body>
</html>
| -
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset="UTF-8">
+ <title>$1</title>
+ </head>
+ <body>
+ <h1>What are the best practices associated with using classes vs. ids?</h1>
+ <p>
- The main thing to remember when using classes versus ids in HTML/CSS is **classes** can be used as many times as needed within a document. **IDs** can only be applied once within a document. Just like no two people should have the same passport number, NEVER use the same id on different elements.
+ The main thing to remember when using classes versus ids in HTML/CSS is **classes** can be used as many times as needed within a document. **IDs** can only be applied once within a document. Just like no two people should have the same passport number, NEVER use the same id on different elements.</p>
? ++ ++++
You can also combine classes within an element, such as:
- ```
+ <br>
+ <code>
<p class="highlight indent">
.highlight { font-weight: bold; }
.indent { padding-left: 2em; }
- ```
+ </code>
+
+ <br>
+
- Lastly, ids have higher specificity than classes. When declaration conflicts arise, these conflicts are resolved using the cascade rules - In simple terms, if a class selector and ID selector were to be in conflict, the ID selector wins.
+ <p>Lastly, ids have higher specificity than classes. When declaration conflicts arise, these conflicts are resolved using the cascade rules - In simple terms, if a class selector and ID selector were to be in conflict, the ID selector wins.
? +++
Classes should be used mostly to group elements that have something in common together into a class, in order to be able to address them later. Classes are mostly used for styling.
+ </p>
+ </body>
+ </html>
+ | 26 | 2 | 21 | 5 |
4b832518b0dc445a44b0cb98fda3dda8c2d181fa | README.md | README.md | [](https://github.com/ustwo/formvalidator-swift/blob/master/LICENSE)
[](https://travis-ci.org/ustwo/formvalidator-swift)
[](https://codecov.io/github/ustwo/formvalidator-swift?branch=master)
# FormValidatorSwift
The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way.
## Dependencies
* [Xcode](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#)
| [](https://github.com/ustwo/formvalidator-swift/blob/master/LICENSE)
[](https://travis-ci.org/ustwo/formvalidator-swift)
[](https://codecov.io/github/ustwo/formvalidator-swift?branch=master)
# FormValidatorSwift
The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way.
## Features
- [x] Simply use `ValidatorTextField` instead of `UITextField` (`ValidatorTextView` instead of `UITextView`)
- [x] Know what went wrong and where
- [x] Create own conditions using regular expressions for example
- [x] Create own validators which contain a collection of conditions
- [x] Support iOS and tvOS
## Dependencies
* [Xcode](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#)
## Installation
## Usage
## Contributors
* [Shagun Madhikarmi](mailto:shagun@ustwo.com)
* [Aaron McTavish](mailto:aamct@ustwo.com)
* [Martin Stolz](mailto:martin@ustwo.com)
## License
BaseView is released under the MIT License. See the LICENSE file.
| Add more structure to readme | Add more structure to readme | Markdown | mit | ustwo/formvalidator-swift,ustwo/formvalidator-swift,ustwo/formvalidator-swift | markdown | ## Code Before:
[](https://github.com/ustwo/formvalidator-swift/blob/master/LICENSE)
[](https://travis-ci.org/ustwo/formvalidator-swift)
[](https://codecov.io/github/ustwo/formvalidator-swift?branch=master)
# FormValidatorSwift
The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way.
## Dependencies
* [Xcode](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#)
## Instruction:
Add more structure to readme
## Code After:
[](https://github.com/ustwo/formvalidator-swift/blob/master/LICENSE)
[](https://travis-ci.org/ustwo/formvalidator-swift)
[](https://codecov.io/github/ustwo/formvalidator-swift?branch=master)
# FormValidatorSwift
The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way.
## Features
- [x] Simply use `ValidatorTextField` instead of `UITextField` (`ValidatorTextView` instead of `UITextView`)
- [x] Know what went wrong and where
- [x] Create own conditions using regular expressions for example
- [x] Create own validators which contain a collection of conditions
- [x] Support iOS and tvOS
## Dependencies
* [Xcode](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#)
## Installation
## Usage
## Contributors
* [Shagun Madhikarmi](mailto:shagun@ustwo.com)
* [Aaron McTavish](mailto:aamct@ustwo.com)
* [Martin Stolz](mailto:martin@ustwo.com)
## License
BaseView is released under the MIT License. See the LICENSE file.
| [](https://github.com/ustwo/formvalidator-swift/blob/master/LICENSE)
[](https://travis-ci.org/ustwo/formvalidator-swift)
[](https://codecov.io/github/ustwo/formvalidator-swift?branch=master)
# FormValidatorSwift
The FormValidatorSwift framework allows you to validate inputs of text fields and text views in a convenient way.
+ ## Features
+
+ - [x] Simply use `ValidatorTextField` instead of `UITextField` (`ValidatorTextView` instead of `UITextView`)
+ - [x] Know what went wrong and where
+ - [x] Create own conditions using regular expressions for example
+ - [x] Create own validators which contain a collection of conditions
+ - [x] Support iOS and tvOS
+
## Dependencies
* [Xcode](https://itunes.apple.com/gb/app/xcode/id497799835?mt=12#)
+
+ ## Installation
+
+ ## Usage
+
+ ## Contributors
+
+ * [Shagun Madhikarmi](mailto:shagun@ustwo.com)
+ * [Aaron McTavish](mailto:aamct@ustwo.com)
+ * [Martin Stolz](mailto:martin@ustwo.com)
+
+ ## License
+
+ BaseView is released under the MIT License. See the LICENSE file. | 22 | 2 | 22 | 0 |
7e54c9e92f650b32b490f99fc08cca0219c94bf2 | opencommercesearch-api/app/org/opencommercesearch/api/I18n.scala | opencommercesearch-api/app/org/opencommercesearch/api/I18n.scala | package org.opencommercesearch.api
import play.api.mvc.Request
import play.api.i18n.Lang
/**
* Some convenient i18n definitions
* @author rmerizalde
*/
object I18n {
val DefaultLang = Lang("en", "US")
val SupportedLocales = Seq(DefaultLang, Lang("en", "CA"), Lang("en", "FR"))
def language()(implicit request: Request[_]) = request.acceptLanguages.collectFirst({ case l if SupportedLocales.contains(l) => l}).getOrElse(DefaultLang)
}
| package org.opencommercesearch.api
import play.api.mvc.Request
import play.api.i18n.Lang
/**
* Some convenient i18n definitions
* @author rmerizalde
*/
object I18n {
val DefaultLang = Lang("en", "US")
val SupportedLocales = Seq(DefaultLang, Lang("en", "CA"), Lang("fr", "CA"), Lang("en"), Lang("fr"))
def language()(implicit request: Request[_]) = request.acceptLanguages.collectFirst({ case l if SupportedLocales.contains(l) => l}).getOrElse(DefaultLang)
}
| Fix locale issue on product feeds | Fix locale issue on product feeds
| Scala | apache-2.0 | madickson/opencommercesearch,madickson/opencommercesearch,madickson/opencommercesearch,madickson/opencommercesearch | scala | ## Code Before:
package org.opencommercesearch.api
import play.api.mvc.Request
import play.api.i18n.Lang
/**
* Some convenient i18n definitions
* @author rmerizalde
*/
object I18n {
val DefaultLang = Lang("en", "US")
val SupportedLocales = Seq(DefaultLang, Lang("en", "CA"), Lang("en", "FR"))
def language()(implicit request: Request[_]) = request.acceptLanguages.collectFirst({ case l if SupportedLocales.contains(l) => l}).getOrElse(DefaultLang)
}
## Instruction:
Fix locale issue on product feeds
## Code After:
package org.opencommercesearch.api
import play.api.mvc.Request
import play.api.i18n.Lang
/**
* Some convenient i18n definitions
* @author rmerizalde
*/
object I18n {
val DefaultLang = Lang("en", "US")
val SupportedLocales = Seq(DefaultLang, Lang("en", "CA"), Lang("fr", "CA"), Lang("en"), Lang("fr"))
def language()(implicit request: Request[_]) = request.acceptLanguages.collectFirst({ case l if SupportedLocales.contains(l) => l}).getOrElse(DefaultLang)
}
| package org.opencommercesearch.api
import play.api.mvc.Request
import play.api.i18n.Lang
/**
* Some convenient i18n definitions
* @author rmerizalde
*/
object I18n {
val DefaultLang = Lang("en", "US")
- val SupportedLocales = Seq(DefaultLang, Lang("en", "CA"), Lang("en", "FR"))
? ^^ ^^
+ val SupportedLocales = Seq(DefaultLang, Lang("en", "CA"), Lang("fr", "CA"), Lang("en"), Lang("fr"))
? ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
def language()(implicit request: Request[_]) = request.acceptLanguages.collectFirst({ case l if SupportedLocales.contains(l) => l}).getOrElse(DefaultLang)
} | 2 | 0.133333 | 1 | 1 |
b8bd15b5c09fb7cc4eca0743b674a28e5f177839 | index.html | index.html | <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beaverton High School</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="main-header">
<img src="img/bhs-banner.png" alt="Beaverton High School">
</header>
<nav>
<ul class="main-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">Academics</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Parents & Students</a></li>
<li><a href="#">BHS & Community</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
<footer class="main-footer">
<span>©2014 Beaverton School District</span>
</footer>
</body>
</html> | <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beaverton High School</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="main-header">
<img src="img/bhs-banner.png" alt="Beaverton High School">
</header>
<nav>
<ul class="main-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">Academics</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Parents & Students</a></li>
<li><a href="#">BHS & Community</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
<section>
<h1>Welcome!</h1>
<p>We believe that ALL students will graduate from BHS prepared for, confident in, and excited about the future they choose.</p>
</section>
<section>
<h2>Academic Programs</h2>
<p>at Beaverton High School prepare students for a career and college.</p>
</section>
<section>
<h2>Activites & Athletics</h2>
<p>at Beaverton High School build character and teach life lessons.</p>
</section>
<section>
<h2>Opportunities</h2>
<p>abound to help make Beaverton High School even better.</p>
</section>
<footer class="main-footer">
<span>©2014 Beaverton School District</span>
</footer>
</body>
</html> | Add main sections to html | Add main sections to html
| HTML | mit | milowyner/bhs-website,milowyner/bhs-website | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beaverton High School</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="main-header">
<img src="img/bhs-banner.png" alt="Beaverton High School">
</header>
<nav>
<ul class="main-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">Academics</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Parents & Students</a></li>
<li><a href="#">BHS & Community</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
<footer class="main-footer">
<span>©2014 Beaverton School District</span>
</footer>
</body>
</html>
## Instruction:
Add main sections to html
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beaverton High School</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="main-header">
<img src="img/bhs-banner.png" alt="Beaverton High School">
</header>
<nav>
<ul class="main-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">Academics</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Parents & Students</a></li>
<li><a href="#">BHS & Community</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
<section>
<h1>Welcome!</h1>
<p>We believe that ALL students will graduate from BHS prepared for, confident in, and excited about the future they choose.</p>
</section>
<section>
<h2>Academic Programs</h2>
<p>at Beaverton High School prepare students for a career and college.</p>
</section>
<section>
<h2>Activites & Athletics</h2>
<p>at Beaverton High School build character and teach life lessons.</p>
</section>
<section>
<h2>Opportunities</h2>
<p>abound to help make Beaverton High School even better.</p>
</section>
<footer class="main-footer">
<span>©2014 Beaverton School District</span>
</footer>
</body>
</html> | <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beaverton High School</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="main-header">
<img src="img/bhs-banner.png" alt="Beaverton High School">
</header>
<nav>
<ul class="main-nav">
<li><a href="#">About Us</a></li>
<li><a href="#">Academics</a></li>
<li><a href="#">Calendar</a></li>
<li><a href="#">Parents & Students</a></li>
<li><a href="#">BHS & Community</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
-
+
+ <section>
+ <h1>Welcome!</h1>
+ <p>We believe that ALL students will graduate from BHS prepared for, confident in, and excited about the future they choose.</p>
+ </section>
+
+ <section>
+ <h2>Academic Programs</h2>
+ <p>at Beaverton High School prepare students for a career and college.</p>
+ </section>
+
+ <section>
+ <h2>Activites & Athletics</h2>
+ <p>at Beaverton High School build character and teach life lessons.</p>
+ </section>
+
+ <section>
+ <h2>Opportunities</h2>
+ <p>abound to help make Beaverton High School even better.</p>
+ </section>
+
<footer class="main-footer">
<span>©2014 Beaverton School District</span>
</footer>
</body>
</html> | 22 | 0.709677 | 21 | 1 |
b90893a8b4cebcc0fed8fb8cd1001ae3286c14d9 | utils/replaceRootDirInPath.js | utils/replaceRootDirInPath.js | // Copied from https://github.com/facebook/jest/blob/master/packages/jest-config/src/utils.js
// in order to reduce incompatible jest dependencies
const path = require('path');
module.exports = {
replaceRootDirInPath : (
rootDir,
filePath,
) => {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
}
return path.resolve(
rootDir,
path.normalize('./' + filePath.substr('<rootDir>'.length)),
);
}
}
| // Copied from https://github.com/facebook/jest/blob/master/packages/jest-config/src/utils.js
// in order to reduce incompatible jest dependencies
const path = require('path');
module.exports = {
replaceRootDirInPath : (rootDir,filePath) => {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
}
return path.resolve(
rootDir,
path.normalize('./' + filePath.substr('<rootDir>'.length))
)
}
}
| Fix issue with node 6 where it cannot handle trailing comma | Fix issue with node 6 where it cannot handle trailing comma
| JavaScript | apache-2.0 | palmerj3/jest-junit | javascript | ## Code Before:
// Copied from https://github.com/facebook/jest/blob/master/packages/jest-config/src/utils.js
// in order to reduce incompatible jest dependencies
const path = require('path');
module.exports = {
replaceRootDirInPath : (
rootDir,
filePath,
) => {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
}
return path.resolve(
rootDir,
path.normalize('./' + filePath.substr('<rootDir>'.length)),
);
}
}
## Instruction:
Fix issue with node 6 where it cannot handle trailing comma
## Code After:
// Copied from https://github.com/facebook/jest/blob/master/packages/jest-config/src/utils.js
// in order to reduce incompatible jest dependencies
const path = require('path');
module.exports = {
replaceRootDirInPath : (rootDir,filePath) => {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
}
return path.resolve(
rootDir,
path.normalize('./' + filePath.substr('<rootDir>'.length))
)
}
}
| // Copied from https://github.com/facebook/jest/blob/master/packages/jest-config/src/utils.js
// in order to reduce incompatible jest dependencies
const path = require('path');
module.exports = {
+ replaceRootDirInPath : (rootDir,filePath) => {
- replaceRootDirInPath : (
- rootDir,
- filePath,
- ) => {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
}
return path.resolve(
rootDir,
- path.normalize('./' + filePath.substr('<rootDir>'.length)),
? -
+ path.normalize('./' + filePath.substr('<rootDir>'.length))
- );
? -
+ )
}
} | 9 | 0.45 | 3 | 6 |
641ae4cc207fb9f2f132380c8c2f514435532c49 | _guides/proxies.md | _guides/proxies.md | ---
layout: guide
title: Browser Proxies
permalink: /guides/proxies/
redirect_from: /docs/proxies/
---
### Example: setting a http and https proxy for Firefox
{% highlight ruby %}
profile = Selenium::WebDriver::Firefox::Profile.new
profile.proxy = Selenium::WebDriver::Proxy.new http: 'my.proxy.com:8080', ssl: 'my.proxy.com:8080'
browser = Watir::Browser.new :firefox, profile: profile
{% endhighlight %}
### Example: setting a http and https proxy for Chrome
{% highlight ruby %}
switches = '--proxy-server=my.proxy.com:8080'
browser = Watir::Browser.new :chrome, switches: switches
{% endhighlight %}
### Example: setting a http and https proxy for Remote Chrome
{% highlight ruby %}
proxy = 'my.proxy.com:8080'
browser = Watir::Browser.new :chrome, url: REMOTE_URL, proxy: {http: proxy, ssl: proxy}
{% endhighlight %}
| ---
layout: guide
title: Browser Proxies
permalink: /guides/proxies/
redirect_from: /docs/proxies/
---
In many cases, you can specify a proxy to use with the `proxy: {}` option. While each browser driver handles this slightly differently, the following format works in Chrome or Firefox.
### Example: using a proxy in Chrome or Firefox
{% highlight ruby %}
require 'watir'
proxy = {
http: 'my.proxy.com:8080',
ssl: 'my.proxy.com:8080'
}
firefox_browser = Watir::Browser.new :firefox, proxy: proxy
remote_firefox = Watir::Browser.new :firefox, url: REMOTE_SELENIUM, proxy: proxy
chrome_browser = Watir::Browser.new :chrome, proxy: proxy
remote_chrome = Watir::Browser.new :chrome, url: REMOTE_SELENIUM, proxy: proxy
{% endhighlight %}
Be sure to specify both `:http` and `:ssl` to route both types of traffic through your proxy.
Under the hood, this is passing options to create a `Selenium::WebDriver::Proxy` object.
### Example: setting a http and https proxy for Remote Chrome
{% highlight ruby %}
proxy = 'my.proxy.com:8080'
browser = Watir::Browser.new :chrome, url: REMOTE_URL, proxy: {http: proxy, ssl: proxy}
{% endhighlight %}
| Add a working example for setting the proxy when targeting a remote browser. | Add a working example for setting the proxy when targeting a remote browser.
| Markdown | mit | watir/watir.github.io,watir/watir.github.io,watir/watir.github.io,watir/watir.github.io | markdown | ## Code Before:
---
layout: guide
title: Browser Proxies
permalink: /guides/proxies/
redirect_from: /docs/proxies/
---
### Example: setting a http and https proxy for Firefox
{% highlight ruby %}
profile = Selenium::WebDriver::Firefox::Profile.new
profile.proxy = Selenium::WebDriver::Proxy.new http: 'my.proxy.com:8080', ssl: 'my.proxy.com:8080'
browser = Watir::Browser.new :firefox, profile: profile
{% endhighlight %}
### Example: setting a http and https proxy for Chrome
{% highlight ruby %}
switches = '--proxy-server=my.proxy.com:8080'
browser = Watir::Browser.new :chrome, switches: switches
{% endhighlight %}
### Example: setting a http and https proxy for Remote Chrome
{% highlight ruby %}
proxy = 'my.proxy.com:8080'
browser = Watir::Browser.new :chrome, url: REMOTE_URL, proxy: {http: proxy, ssl: proxy}
{% endhighlight %}
## Instruction:
Add a working example for setting the proxy when targeting a remote browser.
## Code After:
---
layout: guide
title: Browser Proxies
permalink: /guides/proxies/
redirect_from: /docs/proxies/
---
In many cases, you can specify a proxy to use with the `proxy: {}` option. While each browser driver handles this slightly differently, the following format works in Chrome or Firefox.
### Example: using a proxy in Chrome or Firefox
{% highlight ruby %}
require 'watir'
proxy = {
http: 'my.proxy.com:8080',
ssl: 'my.proxy.com:8080'
}
firefox_browser = Watir::Browser.new :firefox, proxy: proxy
remote_firefox = Watir::Browser.new :firefox, url: REMOTE_SELENIUM, proxy: proxy
chrome_browser = Watir::Browser.new :chrome, proxy: proxy
remote_chrome = Watir::Browser.new :chrome, url: REMOTE_SELENIUM, proxy: proxy
{% endhighlight %}
Be sure to specify both `:http` and `:ssl` to route both types of traffic through your proxy.
Under the hood, this is passing options to create a `Selenium::WebDriver::Proxy` object.
### Example: setting a http and https proxy for Remote Chrome
{% highlight ruby %}
proxy = 'my.proxy.com:8080'
browser = Watir::Browser.new :chrome, url: REMOTE_URL, proxy: {http: proxy, ssl: proxy}
{% endhighlight %}
| ---
layout: guide
title: Browser Proxies
permalink: /guides/proxies/
redirect_from: /docs/proxies/
---
- ### Example: setting a http and https proxy for Firefox
+ In many cases, you can specify a proxy to use with the `proxy: {}` option. While each browser driver handles this slightly differently, the following format works in Chrome or Firefox.
+
+ ### Example: using a proxy in Chrome or Firefox
{% highlight ruby %}
- profile = Selenium::WebDriver::Firefox::Profile.new
- profile.proxy = Selenium::WebDriver::Proxy.new http: 'my.proxy.com:8080', ssl: 'my.proxy.com:8080'
+ require 'watir'
+
+ proxy = {
+ http: 'my.proxy.com:8080',
+ ssl: 'my.proxy.com:8080'
+ }
+
- browser = Watir::Browser.new :firefox, profile: profile
? ^^^^ ^^^^
+ firefox_browser = Watir::Browser.new :firefox, proxy: proxy
? ++++++++ ^^ ^^
+
+ remote_firefox = Watir::Browser.new :firefox, url: REMOTE_SELENIUM, proxy: proxy
+
+ chrome_browser = Watir::Browser.new :chrome, proxy: proxy
+
+ remote_chrome = Watir::Browser.new :chrome, url: REMOTE_SELENIUM, proxy: proxy
{% endhighlight %}
- ### Example: setting a http and https proxy for Chrome
+ Be sure to specify both `:http` and `:ssl` to route both types of traffic through your proxy.
+ Under the hood, this is passing options to create a `Selenium::WebDriver::Proxy` object.
- {% highlight ruby %}
- switches = '--proxy-server=my.proxy.com:8080'
- browser = Watir::Browser.new :chrome, switches: switches
- {% endhighlight %}
### Example: setting a http and https proxy for Remote Chrome
{% highlight ruby %}
proxy = 'my.proxy.com:8080'
browser = Watir::Browser.new :chrome, url: REMOTE_URL, proxy: {http: proxy, ssl: proxy}
{% endhighlight %}
| 28 | 0.965517 | 19 | 9 |
2bc945949413d5f44d6311e6a62ddfa226d071c5 | Dockerfiles/build.Dockerfile | Dockerfiles/build.Dockerfile | FROM node:10
RUN apt update
RUN apt install -y tar curl lftp
# create app directory
RUN mkdir -p /root/cli
COPY package.json /root/package.json
COPY cli/package.json /root/cli/package.json
WORKDIR /root/cli
RUN npm install
WORKDIR /root
RUN npm install
WORKDIR /
CMD [ "bash" ]
| FROM node:10
RUN apt update
RUN apt install -y tar curl lftp
# create app directory
RUN mkdir -p /root/cli/bin
COPY package.json /root/package.json
COPY cli/package.json /root/cli/package.json
COPY cli/bin/tuvero.js /root/cli/bin/tuvero.js
WORKDIR /root/cli
RUN npm install
WORKDIR /root
RUN npm install
WORKDIR /
CMD [ "bash" ]
| Add missing 'main' file of tuvero/cli | Add missing 'main' file of tuvero/cli
| unknown | mit | elor/tuvero | unknown | ## Code Before:
FROM node:10
RUN apt update
RUN apt install -y tar curl lftp
# create app directory
RUN mkdir -p /root/cli
COPY package.json /root/package.json
COPY cli/package.json /root/cli/package.json
WORKDIR /root/cli
RUN npm install
WORKDIR /root
RUN npm install
WORKDIR /
CMD [ "bash" ]
## Instruction:
Add missing 'main' file of tuvero/cli
## Code After:
FROM node:10
RUN apt update
RUN apt install -y tar curl lftp
# create app directory
RUN mkdir -p /root/cli/bin
COPY package.json /root/package.json
COPY cli/package.json /root/cli/package.json
COPY cli/bin/tuvero.js /root/cli/bin/tuvero.js
WORKDIR /root/cli
RUN npm install
WORKDIR /root
RUN npm install
WORKDIR /
CMD [ "bash" ]
| FROM node:10
RUN apt update
RUN apt install -y tar curl lftp
# create app directory
- RUN mkdir -p /root/cli
+ RUN mkdir -p /root/cli/bin
? ++++
COPY package.json /root/package.json
COPY cli/package.json /root/cli/package.json
+ COPY cli/bin/tuvero.js /root/cli/bin/tuvero.js
WORKDIR /root/cli
RUN npm install
WORKDIR /root
RUN npm install
WORKDIR /
CMD [ "bash" ] | 3 | 0.15 | 2 | 1 |
7db64ab266e698224f7718f8be63181acf006866 | src/config/services.php | src/config/services.php | <?php
return [
'request' => [
'class' => \blink\http\Request::class,
'middleware' => [],
],
'response' => [
'class' => \blink\http\Response::class,
'middleware' => [
\rethink\hrouter\restapi\middleware\ResponseFormatter::class,
],
],
'session' => [
'class' => 'blink\session\Manager',
'expires' => 3600 * 24 * 15,
'storage' => [
'class' => 'blink\session\FileStorage',
'path' => __DIR__ . '/../../runtime/sessions'
]
],
'auth' => [
'class' => 'blink\auth\Auth',
'model' => 'app\models\User',
],
'haproxy' => [
'class' => \rethink\hrouter\Haproxy::class,
],
'log' => [
'class' => 'blink\log\Logger',
'targets' => [
'file' => [
'class' => 'blink\log\StreamTarget',
'enabled' => true,
'stream' => 'php://stderr',
'level' => 'info',
]
],
],
];
| <?php
return [
'request' => [
'class' => \blink\http\Request::class,
'middleware' => [],
],
'response' => [
'class' => \blink\http\Response::class,
'middleware' => [
\rethink\hrouter\restapi\middleware\ResponseFormatter::class,
],
],
'session' => [
'class' => 'blink\session\Manager',
'expires' => 3600 * 24 * 15,
'storage' => [
'class' => 'blink\session\FileStorage',
'path' => __DIR__ . '/../../runtime/sessions'
]
],
'auth' => [
'class' => 'blink\auth\Auth',
'model' => 'app\models\User',
],
'haproxy' => [
'class' => \rethink\hrouter\Haproxy::class,
],
'log' => [
'class' => 'blink\log\Logger',
'targets' => [
'file' => [
'class' => 'blink\log\StreamTarget',
'enabled' => BLINK_ENV != 'test',
'stream' => 'php://stderr',
'level' => 'info',
]
],
],
];
| Disable log component on test environment | Disable log component on test environment
| PHP | mit | rethinkphp/haproxy-router,rethinkphp/harpoxy-router | php | ## Code Before:
<?php
return [
'request' => [
'class' => \blink\http\Request::class,
'middleware' => [],
],
'response' => [
'class' => \blink\http\Response::class,
'middleware' => [
\rethink\hrouter\restapi\middleware\ResponseFormatter::class,
],
],
'session' => [
'class' => 'blink\session\Manager',
'expires' => 3600 * 24 * 15,
'storage' => [
'class' => 'blink\session\FileStorage',
'path' => __DIR__ . '/../../runtime/sessions'
]
],
'auth' => [
'class' => 'blink\auth\Auth',
'model' => 'app\models\User',
],
'haproxy' => [
'class' => \rethink\hrouter\Haproxy::class,
],
'log' => [
'class' => 'blink\log\Logger',
'targets' => [
'file' => [
'class' => 'blink\log\StreamTarget',
'enabled' => true,
'stream' => 'php://stderr',
'level' => 'info',
]
],
],
];
## Instruction:
Disable log component on test environment
## Code After:
<?php
return [
'request' => [
'class' => \blink\http\Request::class,
'middleware' => [],
],
'response' => [
'class' => \blink\http\Response::class,
'middleware' => [
\rethink\hrouter\restapi\middleware\ResponseFormatter::class,
],
],
'session' => [
'class' => 'blink\session\Manager',
'expires' => 3600 * 24 * 15,
'storage' => [
'class' => 'blink\session\FileStorage',
'path' => __DIR__ . '/../../runtime/sessions'
]
],
'auth' => [
'class' => 'blink\auth\Auth',
'model' => 'app\models\User',
],
'haproxy' => [
'class' => \rethink\hrouter\Haproxy::class,
],
'log' => [
'class' => 'blink\log\Logger',
'targets' => [
'file' => [
'class' => 'blink\log\StreamTarget',
'enabled' => BLINK_ENV != 'test',
'stream' => 'php://stderr',
'level' => 'info',
]
],
],
];
| <?php
return [
'request' => [
'class' => \blink\http\Request::class,
'middleware' => [],
],
'response' => [
'class' => \blink\http\Response::class,
'middleware' => [
\rethink\hrouter\restapi\middleware\ResponseFormatter::class,
],
],
'session' => [
'class' => 'blink\session\Manager',
'expires' => 3600 * 24 * 15,
'storage' => [
'class' => 'blink\session\FileStorage',
'path' => __DIR__ . '/../../runtime/sessions'
]
],
'auth' => [
'class' => 'blink\auth\Auth',
'model' => 'app\models\User',
],
'haproxy' => [
'class' => \rethink\hrouter\Haproxy::class,
],
'log' => [
'class' => 'blink\log\Logger',
'targets' => [
'file' => [
'class' => 'blink\log\StreamTarget',
- 'enabled' => true,
? --
+ 'enabled' => BLINK_ENV != 'test',
? ++++++++++++++ +++
'stream' => 'php://stderr',
'level' => 'info',
]
],
],
]; | 2 | 0.051282 | 1 | 1 |
8b5c0db5a88fccf4efc10d3ddb028479d55e8ced | .travis.yml | .travis.yml | sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.2.6
- 2.3.3
- 2.4.0
- ruby-head
before_install:
- gem update --system
- gem install bundler
matrix:
allow_failures:
- rvm: ruby-head
- rvm: 1.9.3
| sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.1.10
- 2.2.9
- 2.3.6
- 2.4.3
- 2.5.0
- ruby-head
before_install:
- gem update --system
- gem install bundler
matrix:
allow_failures:
- rvm: ruby-head
- rvm: 1.9.3
| Test against Ruby 2.1 and 2.5 | [CI] Test against Ruby 2.1 and 2.5 | YAML | mit | hexorx/countries | yaml | ## Code Before:
sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.2.6
- 2.3.3
- 2.4.0
- ruby-head
before_install:
- gem update --system
- gem install bundler
matrix:
allow_failures:
- rvm: ruby-head
- rvm: 1.9.3
## Instruction:
[CI] Test against Ruby 2.1 and 2.5
## Code After:
sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
- 2.1.10
- 2.2.9
- 2.3.6
- 2.4.3
- 2.5.0
- ruby-head
before_install:
- gem update --system
- gem install bundler
matrix:
allow_failures:
- rvm: ruby-head
- rvm: 1.9.3
| sudo: false
cache: bundler
language: ruby
rvm:
- 1.9.3
+ - 2.1.10
- - 2.2.6
? ^
+ - 2.2.9
? ^
- - 2.3.3
? ^
+ - 2.3.6
? ^
- - 2.4.0
? ^
+ - 2.4.3
? ^
+ - 2.5.0
- ruby-head
before_install:
- gem update --system
- gem install bundler
matrix:
allow_failures:
- rvm: ruby-head
- rvm: 1.9.3 | 8 | 0.5 | 5 | 3 |
8da03dcba2ed93ad0dfaf1dac8b5fa41b22e815e | app/assets/sass/admin/_shame.scss | app/assets/sass/admin/_shame.scss | // Stuff that we are ashamed off
// For example any overrides to the GOVUK default styles should be placed in here
// This should give us a cleaner upgrade path
i.fa-exclamation-circle{
color: $mellow-red;
}
// mark the passed indicator on the office performance page as red
.search_string .passed, tr .passed {
color: $red;
}
input#initial {
width: 10%;
}
#content {
max-width: 100%;
margin: 0;
}
.main-content {
padding:0 em(40);
}
.form-group-area{
width: 40%;
}
.form-group-local{
width: 25%;
}
// Make the new radio and checkboxes grey when disabled
.block-label.disabled {
color: $grey-1;
}
.button-secondary{
@include button($grey-3);
}
caption {
text-align: left;
} | // Stuff that we are ashamed off
// For example any overrides to the GOVUK default styles should be placed in here
// This should give us a cleaner upgrade path
i.fa-exclamation-circle{
color: $mellow-red;
}
// mark the passed indicator on the office performance page as red
.search_string .passed, tr .passed {
color: $red;
}
input#initial {
width: 10%;
}
#content {
max-width: 100%;
margin: 0;
}
.main-content {
padding:0 em(40);
}
.form-group-area{
width: 40%;
}
.form-group-local{
width: 25%;
}
// Make the new radio and checkboxes grey when disabled
.block-label.disabled {
color: $grey-1;
}
.button-secondary{
@include button($grey-3);
}
caption {
text-align: left;
}
.column-three-quarters {
@include grid-column( 3/4 );
}
| Add in the column three quarter style | Add in the column three quarter style
| SCSS | mit | dwpdigitaltech/ejs-prototype,dwpdigitaltech/ejs-prototype,dwpdigitaltech/ejs-prototype | scss | ## Code Before:
// Stuff that we are ashamed off
// For example any overrides to the GOVUK default styles should be placed in here
// This should give us a cleaner upgrade path
i.fa-exclamation-circle{
color: $mellow-red;
}
// mark the passed indicator on the office performance page as red
.search_string .passed, tr .passed {
color: $red;
}
input#initial {
width: 10%;
}
#content {
max-width: 100%;
margin: 0;
}
.main-content {
padding:0 em(40);
}
.form-group-area{
width: 40%;
}
.form-group-local{
width: 25%;
}
// Make the new radio and checkboxes grey when disabled
.block-label.disabled {
color: $grey-1;
}
.button-secondary{
@include button($grey-3);
}
caption {
text-align: left;
}
## Instruction:
Add in the column three quarter style
## Code After:
// Stuff that we are ashamed off
// For example any overrides to the GOVUK default styles should be placed in here
// This should give us a cleaner upgrade path
i.fa-exclamation-circle{
color: $mellow-red;
}
// mark the passed indicator on the office performance page as red
.search_string .passed, tr .passed {
color: $red;
}
input#initial {
width: 10%;
}
#content {
max-width: 100%;
margin: 0;
}
.main-content {
padding:0 em(40);
}
.form-group-area{
width: 40%;
}
.form-group-local{
width: 25%;
}
// Make the new radio and checkboxes grey when disabled
.block-label.disabled {
color: $grey-1;
}
.button-secondary{
@include button($grey-3);
}
caption {
text-align: left;
}
.column-three-quarters {
@include grid-column( 3/4 );
}
| // Stuff that we are ashamed off
// For example any overrides to the GOVUK default styles should be placed in here
// This should give us a cleaner upgrade path
i.fa-exclamation-circle{
color: $mellow-red;
}
// mark the passed indicator on the office performance page as red
.search_string .passed, tr .passed {
color: $red;
}
input#initial {
width: 10%;
}
#content {
max-width: 100%;
margin: 0;
}
.main-content {
padding:0 em(40);
}
.form-group-area{
width: 40%;
}
.form-group-local{
width: 25%;
}
// Make the new radio and checkboxes grey when disabled
.block-label.disabled {
color: $grey-1;
}
.button-secondary{
@include button($grey-3);
}
caption {
text-align: left;
}
+
+
+ .column-three-quarters {
+ @include grid-column( 3/4 );
+ } | 5 | 0.111111 | 5 | 0 |
52e10c2b6e7e934e6d4dccf762f99490d04ec0b9 | src/sorter/Code.js | src/sorter/Code.js | Ext.define('Slate.sorter.Code', {
extend: 'Ext.util.Sorter',
config: {
numberRe: /^\d+$/,
numberDelim: '.',
sorterFn: function(a, b) {
var codeA = a.get('Code').toLowerCase(),
codeB = b.get('Code').toLowerCase(),
numberRe = this._numberRe, // eslint-disable-line no-underscore-dangle
numberDelim = this._numberDelim, // eslint-disable-line no-underscore-dangle
dotIndexA, dotIndexB,
numberA, numberB;
if (codeA == codeB) {
return 0;
}
dotIndexA = codeA.lastIndexOf(numberDelim);
dotIndexB = codeB.lastIndexOf(numberDelim);
if (
dotIndexA == -1
|| dotIndexB == -1
|| codeA.substr(0, dotIndexA) != codeB.substr(0, dotIndexB)
|| (numberA = codeA.substr(dotIndexA + 1)) == ''
|| (numberB = codeB.substr(dotIndexB + 1)) == ''
|| !numberRe.test(numberA)
|| !numberRe.test(numberB)
) {
return codeA < codeB ? -1 : 1;
}
return numberA - numberB;
}
},
}); | Ext.define('Slate.sorter.Code', {
extend: 'Ext.util.Sorter',
config: {
numberRe: /^\d+$/,
numberDelim: '.',
codeFn: function(item) {
return item.get('Code');
},
sorterFn: function(a, b) {
var me = this,
codeFn = me._codeFn, // eslint-disable-line no-underscore-dangle
numberRe = me._numberRe, // eslint-disable-line no-underscore-dangle
numberDelim = me._numberDelim, // eslint-disable-line no-underscore-dangle
codeA = codeFn(a).toLowerCase(),
codeB = codeFn(b).toLowerCase(),
dotIndexA, dotIndexB,
numberA, numberB;
if (codeA == codeB) {
return 0;
}
dotIndexA = codeA.lastIndexOf(numberDelim);
dotIndexB = codeB.lastIndexOf(numberDelim);
if (
dotIndexA == -1
|| dotIndexB == -1
|| codeA.substr(0, dotIndexA) != codeB.substr(0, dotIndexB)
|| (numberA = codeA.substr(dotIndexA + 1)) == ''
|| (numberB = codeB.substr(dotIndexB + 1)) == ''
|| !numberRe.test(numberA)
|| !numberRe.test(numberB)
) {
return codeA < codeB ? -1 : 1;
}
return numberA - numberB;
}
},
constructor: function(config) {
this.initConfig(config);
}
}); | Add support for configurable function to extract code from item for sorting | Add support for configurable function to extract code from item for sorting
| JavaScript | mit | SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-core-data | javascript | ## Code Before:
Ext.define('Slate.sorter.Code', {
extend: 'Ext.util.Sorter',
config: {
numberRe: /^\d+$/,
numberDelim: '.',
sorterFn: function(a, b) {
var codeA = a.get('Code').toLowerCase(),
codeB = b.get('Code').toLowerCase(),
numberRe = this._numberRe, // eslint-disable-line no-underscore-dangle
numberDelim = this._numberDelim, // eslint-disable-line no-underscore-dangle
dotIndexA, dotIndexB,
numberA, numberB;
if (codeA == codeB) {
return 0;
}
dotIndexA = codeA.lastIndexOf(numberDelim);
dotIndexB = codeB.lastIndexOf(numberDelim);
if (
dotIndexA == -1
|| dotIndexB == -1
|| codeA.substr(0, dotIndexA) != codeB.substr(0, dotIndexB)
|| (numberA = codeA.substr(dotIndexA + 1)) == ''
|| (numberB = codeB.substr(dotIndexB + 1)) == ''
|| !numberRe.test(numberA)
|| !numberRe.test(numberB)
) {
return codeA < codeB ? -1 : 1;
}
return numberA - numberB;
}
},
});
## Instruction:
Add support for configurable function to extract code from item for sorting
## Code After:
Ext.define('Slate.sorter.Code', {
extend: 'Ext.util.Sorter',
config: {
numberRe: /^\d+$/,
numberDelim: '.',
codeFn: function(item) {
return item.get('Code');
},
sorterFn: function(a, b) {
var me = this,
codeFn = me._codeFn, // eslint-disable-line no-underscore-dangle
numberRe = me._numberRe, // eslint-disable-line no-underscore-dangle
numberDelim = me._numberDelim, // eslint-disable-line no-underscore-dangle
codeA = codeFn(a).toLowerCase(),
codeB = codeFn(b).toLowerCase(),
dotIndexA, dotIndexB,
numberA, numberB;
if (codeA == codeB) {
return 0;
}
dotIndexA = codeA.lastIndexOf(numberDelim);
dotIndexB = codeB.lastIndexOf(numberDelim);
if (
dotIndexA == -1
|| dotIndexB == -1
|| codeA.substr(0, dotIndexA) != codeB.substr(0, dotIndexB)
|| (numberA = codeA.substr(dotIndexA + 1)) == ''
|| (numberB = codeB.substr(dotIndexB + 1)) == ''
|| !numberRe.test(numberA)
|| !numberRe.test(numberB)
) {
return codeA < codeB ? -1 : 1;
}
return numberA - numberB;
}
},
constructor: function(config) {
this.initConfig(config);
}
}); | Ext.define('Slate.sorter.Code', {
extend: 'Ext.util.Sorter',
config: {
numberRe: /^\d+$/,
numberDelim: '.',
+ codeFn: function(item) {
+ return item.get('Code');
+ },
+
sorterFn: function(a, b) {
- var codeA = a.get('Code').toLowerCase(),
- codeB = b.get('Code').toLowerCase(),
+ var me = this,
+ codeFn = me._codeFn, // eslint-disable-line no-underscore-dangle
- numberRe = this._numberRe, // eslint-disable-line no-underscore-dangle
? ^^^^
+ numberRe = me._numberRe, // eslint-disable-line no-underscore-dangle
? ^^
- numberDelim = this._numberDelim, // eslint-disable-line no-underscore-dangle
? ^^^^
+ numberDelim = me._numberDelim, // eslint-disable-line no-underscore-dangle
? ^^
+ codeA = codeFn(a).toLowerCase(),
+ codeB = codeFn(b).toLowerCase(),
dotIndexA, dotIndexB,
numberA, numberB;
if (codeA == codeB) {
return 0;
}
dotIndexA = codeA.lastIndexOf(numberDelim);
dotIndexB = codeB.lastIndexOf(numberDelim);
if (
dotIndexA == -1
|| dotIndexB == -1
|| codeA.substr(0, dotIndexA) != codeB.substr(0, dotIndexB)
|| (numberA = codeA.substr(dotIndexA + 1)) == ''
|| (numberB = codeB.substr(dotIndexB + 1)) == ''
|| !numberRe.test(numberA)
|| !numberRe.test(numberB)
) {
return codeA < codeB ? -1 : 1;
}
return numberA - numberB;
}
},
+
+ constructor: function(config) {
+ this.initConfig(config);
+ }
}); | 18 | 0.45 | 14 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.