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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ef9435fdf74ea12498465b6bb853fc4188c321fa | spec/file_manager_spec.rb | spec/file_manager_spec.rb | describe WinRM::FileManager, :integration => true do
let(:service) { winrm_connection }
let(:src_file) { __FILE__ }
let(:dest_file) { File.join(subject.temp_dir, 'winrm_filemanager_test') }
subject { WinRM::FileManager.new(service) }
context 'temp_dir' do
it 'should return the remote guests temp dir' do
expect(subject.temp_dir).to eq('C:\Users\vagrant\AppData\Local\Temp')
end
end
context 'upload' do
it 'should upload the specified file' do
subject.upload(src_file, dest_file)
expect(subject.exists?(dest_file)).to be true
end
end
end
| describe WinRM::FileManager, :integration => true do
let(:service) { winrm_connection }
let(:src_file) { __FILE__ }
let(:dest_file) { File.join(subject.temp_dir, 'winrm_filemanager_test') }
subject { WinRM::FileManager.new(service) }
context 'temp_dir' do
it 'should return the remote guests temp dir' do
expect(subject.temp_dir).to match(/C:\\Users\\\w+\\AppData\\Local\\Temp/)
end
end
context 'upload' do
it 'should upload the specified file' do
subject.upload(src_file, dest_file)
expect(subject.exists?(dest_file)).to be true
end
end
end
| Refactor test to match temp dir on regex | Refactor test to match temp dir on regex
| Ruby | apache-2.0 | alistairpialek/winrb,modulexcite/WinRM,WinRb/WinRM,ClogenyTechnologies/WinRM,WinRb/WinRM | ruby | ## Code Before:
describe WinRM::FileManager, :integration => true do
let(:service) { winrm_connection }
let(:src_file) { __FILE__ }
let(:dest_file) { File.join(subject.temp_dir, 'winrm_filemanager_test') }
subject { WinRM::FileManager.new(service) }
context 'temp_dir' do
it 'should return the remote guests temp dir' do
expect(subject.temp_dir).to eq('C:\Users\vagrant\AppData\Local\Temp')
end
end
context 'upload' do
it 'should upload the specified file' do
subject.upload(src_file, dest_file)
expect(subject.exists?(dest_file)).to be true
end
end
end
## Instruction:
Refactor test to match temp dir on regex
## Code After:
describe WinRM::FileManager, :integration => true do
let(:service) { winrm_connection }
let(:src_file) { __FILE__ }
let(:dest_file) { File.join(subject.temp_dir, 'winrm_filemanager_test') }
subject { WinRM::FileManager.new(service) }
context 'temp_dir' do
it 'should return the remote guests temp dir' do
expect(subject.temp_dir).to match(/C:\\Users\\\w+\\AppData\\Local\\Temp/)
end
end
context 'upload' do
it 'should upload the specified file' do
subject.upload(src_file, dest_file)
expect(subject.exists?(dest_file)).to be true
end
end
end
| describe WinRM::FileManager, :integration => true do
let(:service) { winrm_connection }
let(:src_file) { __FILE__ }
let(:dest_file) { File.join(subject.temp_dir, 'winrm_filemanager_test') }
subject { WinRM::FileManager.new(service) }
context 'temp_dir' do
it 'should return the remote guests temp dir' do
- expect(subject.temp_dir).to eq('C:\Users\vagrant\AppData\Local\Temp')
? ^^ ^ ^^^^^^^ ^
+ expect(subject.temp_dir).to match(/C:\\Users\\\w+\\AppData\\Local\\Temp/)
? ^^^^^ ^ + ^^^^^ + + ^
end
end
context 'upload' do
it 'should upload the specified file' do
subject.upload(src_file, dest_file)
expect(subject.exists?(dest_file)).to be true
end
end
end | 2 | 0.1 | 1 | 1 |
0840c2afc3ede520e8fd0900f4dc7570a4b4c8bc | .drone.yml | .drone.yml | kind: pipeline
type: docker
name: test
volumes:
- name: pypirc
host:
path: /home/albertyw/.ssh/other/pypirc
steps:
- name: Test Python
image: python:3.10
commands:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- pip install -r requirements-test.txt
- flake8
- mypy . --ignore-missing-imports
- cc-test-reporter before-build
- coverage run setup.py test
- exitcode="$?"
- coverage report -m
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 2baac9a046cac4e8790932772e1c9954ed0d6786e55a011f32dcc30da97781a1
- name: Upload Python
image: python:3.10
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
volumes:
- name: pypirc
path: /root/.pypirc
when:
event:
- tag
| kind: pipeline
type: docker
name: test
volumes:
- name: pypirc
host:
path: /home/albertyw/.ssh/other/pypirc
steps:
- name: Test Python
image: python:3.10
commands:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- python setup.py develop
- pip install -r requirements-test.txt
- flake8
- mypy . --ignore-missing-imports
- cc-test-reporter before-build
- coverage run -m unittest
- exitcode="$?"
- coverage report -m
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 2baac9a046cac4e8790932772e1c9954ed0d6786e55a011f32dcc30da97781a1
- name: Upload Python
image: python:3.10
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
volumes:
- name: pypirc
path: /root/.pypirc
when:
event:
- tag
| Switch from setup.py test to unittest module | Switch from setup.py test to unittest module
| YAML | mit | albertyw/csv-to-ical | yaml | ## Code Before:
kind: pipeline
type: docker
name: test
volumes:
- name: pypirc
host:
path: /home/albertyw/.ssh/other/pypirc
steps:
- name: Test Python
image: python:3.10
commands:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- pip install -r requirements-test.txt
- flake8
- mypy . --ignore-missing-imports
- cc-test-reporter before-build
- coverage run setup.py test
- exitcode="$?"
- coverage report -m
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 2baac9a046cac4e8790932772e1c9954ed0d6786e55a011f32dcc30da97781a1
- name: Upload Python
image: python:3.10
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
volumes:
- name: pypirc
path: /root/.pypirc
when:
event:
- tag
## Instruction:
Switch from setup.py test to unittest module
## Code After:
kind: pipeline
type: docker
name: test
volumes:
- name: pypirc
host:
path: /home/albertyw/.ssh/other/pypirc
steps:
- name: Test Python
image: python:3.10
commands:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
- python setup.py develop
- pip install -r requirements-test.txt
- flake8
- mypy . --ignore-missing-imports
- cc-test-reporter before-build
- coverage run -m unittest
- exitcode="$?"
- coverage report -m
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 2baac9a046cac4e8790932772e1c9954ed0d6786e55a011f32dcc30da97781a1
- name: Upload Python
image: python:3.10
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
volumes:
- name: pypirc
path: /root/.pypirc
when:
event:
- tag
| kind: pipeline
type: docker
name: test
volumes:
- name: pypirc
host:
path: /home/albertyw/.ssh/other/pypirc
steps:
- name: Test Python
image: python:3.10
commands:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > "${HOME}/bin/cc-test-reporter"
- chmod +x "${HOME}/bin/cc-test-reporter"
+ - python setup.py develop
- pip install -r requirements-test.txt
- flake8
- mypy . --ignore-missing-imports
- cc-test-reporter before-build
- - coverage run setup.py test
? ^^ ------
+ - coverage run -m unittest
? ^^^^^^
- exitcode="$?"
- coverage report -m
- coverage xml
- cc-test-reporter after-build --exit-code "$exitcode"
environment:
CC_TEST_REPORTER_ID: 2baac9a046cac4e8790932772e1c9954ed0d6786e55a011f32dcc30da97781a1
- name: Upload Python
image: python:3.10
commands:
- pip install twine
- python setup.py sdist bdist_wheel
- twine upload dist/*
volumes:
- name: pypirc
path: /root/.pypirc
when:
event:
- tag | 3 | 0.076923 | 2 | 1 |
8078c2d2a4ba9a8414b8b7e4560831062903e4bc | example/index.html | example/index.html | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo of gallery.css</title>
<link rel="stylesheet" href="./css/vendor/normalize.css">
<link rel="stylesheet" href="/css/gallery.build.css">
<link rel="stylesheet" href="/css/gallery.theme.css">
<script src="./js/prefixfree.min.js"></script>
<style>
.gallery .item { height: 400px; text-align: center; }
</style>
</head>
<body>
<div class="gallery items-3">
<div id="item-1" class="control-operator"></div>
<figure class="item">
<h1>Item 1</h1>
</figure>
<div id="item-2" class="control-operator"></div>
<figure class="item">
<h1>Item 2</h1>
</figure>
<div id="item-3" class="control-operator"></div>
<figure class="item">
<h1>Item 3</h1>
</figure>
<div class="controls">
<a href="#item-1" class="control-button">•</a>
<a href="#item-2" class="control-button">•</a>
<a href="#item-3" class="control-button">•</a>
</div>
</div>
</body>
</html> | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo of gallery.css</title>
<link rel="stylesheet" href="./css/vendor/normalize.css">
<link rel="stylesheet" href="/css/gallery.build.css">
<link rel="stylesheet" href="/css/gallery.theme.css">
<script src="./js/prefixfree.min.js"></script>
<style>
.gallery .item { height: 400px; text-align: center; background: #4d87e2; }
</style>
</head>
<body>
<div class="gallery items-3">
<div id="item-1" class="control-operator"></div>
<figure class="item">
<h1>Item 1</h1>
</figure>
<div id="item-2" class="control-operator"></div>
<figure class="item">
<h1>Item 2</h1>
</figure>
<div id="item-3" class="control-operator"></div>
<figure class="item">
<h1>Item 3</h1>
</figure>
<div class="controls">
<a href="#item-1" class="control-button">•</a>
<a href="#item-2" class="control-button">•</a>
<a href="#item-3" class="control-button">•</a>
</div>
</div>
</body>
</html> | Set a background colour on the example. | Set a background colour on the example. | HTML | mit | JimiPedros/gallery-css,benschwarz/gallery-css,JimiPedros/gallery-css,jetcomp/gallery-css,JimiPedros/gallery-css,front-thinking/gallery-css | html | ## Code Before:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo of gallery.css</title>
<link rel="stylesheet" href="./css/vendor/normalize.css">
<link rel="stylesheet" href="/css/gallery.build.css">
<link rel="stylesheet" href="/css/gallery.theme.css">
<script src="./js/prefixfree.min.js"></script>
<style>
.gallery .item { height: 400px; text-align: center; }
</style>
</head>
<body>
<div class="gallery items-3">
<div id="item-1" class="control-operator"></div>
<figure class="item">
<h1>Item 1</h1>
</figure>
<div id="item-2" class="control-operator"></div>
<figure class="item">
<h1>Item 2</h1>
</figure>
<div id="item-3" class="control-operator"></div>
<figure class="item">
<h1>Item 3</h1>
</figure>
<div class="controls">
<a href="#item-1" class="control-button">•</a>
<a href="#item-2" class="control-button">•</a>
<a href="#item-3" class="control-button">•</a>
</div>
</div>
</body>
</html>
## Instruction:
Set a background colour on the example.
## Code After:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo of gallery.css</title>
<link rel="stylesheet" href="./css/vendor/normalize.css">
<link rel="stylesheet" href="/css/gallery.build.css">
<link rel="stylesheet" href="/css/gallery.theme.css">
<script src="./js/prefixfree.min.js"></script>
<style>
.gallery .item { height: 400px; text-align: center; background: #4d87e2; }
</style>
</head>
<body>
<div class="gallery items-3">
<div id="item-1" class="control-operator"></div>
<figure class="item">
<h1>Item 1</h1>
</figure>
<div id="item-2" class="control-operator"></div>
<figure class="item">
<h1>Item 2</h1>
</figure>
<div id="item-3" class="control-operator"></div>
<figure class="item">
<h1>Item 3</h1>
</figure>
<div class="controls">
<a href="#item-1" class="control-button">•</a>
<a href="#item-2" class="control-button">•</a>
<a href="#item-3" class="control-button">•</a>
</div>
</div>
</body>
</html> | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Demo of gallery.css</title>
<link rel="stylesheet" href="./css/vendor/normalize.css">
<link rel="stylesheet" href="/css/gallery.build.css">
<link rel="stylesheet" href="/css/gallery.theme.css">
<script src="./js/prefixfree.min.js"></script>
<style>
- .gallery .item { height: 400px; text-align: center; }
+ .gallery .item { height: 400px; text-align: center; background: #4d87e2; }
? +++++++++++++++++++++
</style>
</head>
<body>
<div class="gallery items-3">
<div id="item-1" class="control-operator"></div>
<figure class="item">
<h1>Item 1</h1>
</figure>
<div id="item-2" class="control-operator"></div>
<figure class="item">
<h1>Item 2</h1>
</figure>
<div id="item-3" class="control-operator"></div>
<figure class="item">
<h1>Item 3</h1>
</figure>
<div class="controls">
<a href="#item-1" class="control-button">•</a>
<a href="#item-2" class="control-button">•</a>
<a href="#item-3" class="control-button">•</a>
</div>
</div>
</body>
</html> | 2 | 0.051282 | 1 | 1 |
46c0553951a15006e86ddaff2ce3ab6a884faabf | setup/default-editor-filetypes.txt | setup/default-editor-filetypes.txt | applescript
asm
c
code-snippets
coffee
conf
cpp
cs
css
diff
h
java
js
json
jsx
less
lisp
md
patch
pegjs
php
plist
py
rb
rss
scss
sh
sql
ss
ssp
svg
tex
tpl
ts
tsx
txt
xml
yaml
yml
| applescript
asm
bash_profile
bashrc
c
cfg
code-snippets
coffee
conf
cpp
cs
css
diff
editorconfig
h
java
js
json
jsx
less
lisp
md
patch
pegjs
php
plist
py
rb
rss
scss
sh
sql
ss
ssp
svg
tex
tpl
ts
tsx
txt
xml
yaml
yml
| Update default editor filetypes with more types | Update default editor filetypes with more types
| Text | mit | caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles | text | ## Code Before:
applescript
asm
c
code-snippets
coffee
conf
cpp
cs
css
diff
h
java
js
json
jsx
less
lisp
md
patch
pegjs
php
plist
py
rb
rss
scss
sh
sql
ss
ssp
svg
tex
tpl
ts
tsx
txt
xml
yaml
yml
## Instruction:
Update default editor filetypes with more types
## Code After:
applescript
asm
bash_profile
bashrc
c
cfg
code-snippets
coffee
conf
cpp
cs
css
diff
editorconfig
h
java
js
json
jsx
less
lisp
md
patch
pegjs
php
plist
py
rb
rss
scss
sh
sql
ss
ssp
svg
tex
tpl
ts
tsx
txt
xml
yaml
yml
| applescript
asm
+ bash_profile
+ bashrc
c
+ cfg
code-snippets
coffee
conf
cpp
cs
css
diff
+ editorconfig
h
java
js
json
jsx
less
lisp
md
patch
pegjs
php
plist
py
rb
rss
scss
sh
sql
ss
ssp
svg
tex
tpl
ts
tsx
txt
xml
yaml
yml | 4 | 0.102564 | 4 | 0 |
518c34a225e4d8c4e30ab681cc13d5c5d7ca5b8c | README.md | README.md | MidnightBSD APP Store API
| [](https://app.fossa.io/projects/git%2Bgithub.com%2FMidnightBSD%2Fmidnightbsd-app-store?ref=badge_shield)
MidnightBSD APP Store API
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FMidnightBSD%2Fmidnightbsd-app-store?ref=badge_large) | Add license scan report and status | Add license scan report and status
Signed-off-by: fossabot <33ee59f62122b3df5dd1d28e3318bfde0d0db52e@fossa.io> | Markdown | bsd-2-clause | laffer1/midnightbsd-app-store,laffer1/midnightbsd-app-store,laffer1/midnightbsd-app-store | markdown | ## Code Before:
MidnightBSD APP Store API
## Instruction:
Add license scan report and status
Signed-off-by: fossabot <33ee59f62122b3df5dd1d28e3318bfde0d0db52e@fossa.io>
## Code After:
[](https://app.fossa.io/projects/git%2Bgithub.com%2FMidnightBSD%2Fmidnightbsd-app-store?ref=badge_shield)
MidnightBSD APP Store API
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FMidnightBSD%2Fmidnightbsd-app-store?ref=badge_large) | + [](https://app.fossa.io/projects/git%2Bgithub.com%2FMidnightBSD%2Fmidnightbsd-app-store?ref=badge_shield)
+
MidnightBSD APP Store API
+
+
+ ## License
+ [](https://app.fossa.io/projects/git%2Bgithub.com%2FMidnightBSD%2Fmidnightbsd-app-store?ref=badge_large) | 6 | 6 | 6 | 0 |
8bc6b266c61209f89b3c87af27b2cf1dc776633d | tests/integration/pods/components/zesty/time-input/component-test.js | tests/integration/pods/components/zesty/time-input/component-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
test('displays an input field', async function(assert) {
await this.render(hbs`
{{zesty/time-input
entries=entries
property="status"}}
`);
assert.equal(this.$("input").length, 1);
});
| import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import moment from 'moment';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
test('can update a moment date', async function(assert) {
assert.expect(3);
this.set('date', moment("2016-11-03T10:30"));
this.set('updateDate', (date) => {
assert.equal(moment.isMoment(date), true, "sends up a moment object");
assert.equal(moment("2016-11-03T10:45").isSame(date), true, "has the same date");
});
await this.render(hbs`
{{zesty/time-input
value=date
action=(action updateDate)
entries=entries
property="status"
format="h.mm a"
}}
`);
assert.equal(this.$("input").val(), "10.30 am");
this.$("input").val("10.45 am");
await this.$("input").blur();
});
test('can update a js date', async function(assert) {
assert.expect(3);
this.set('date', new Date(2016, 10, 3, 10, 30));
this.set('updateDate', (date) => {
assert.equal(moment.isDate(date), true, "sends up a moment object");
assert.equal(moment("2016-11-03T10:45").isSame(moment(date)), true, "has the same date");
});
await this.render(hbs`
{{zesty/time-input
value=date
action=(action updateDate)
entries=entries
property="status"
format="h.mm a"
}}
`);
assert.equal(this.$("input").val(), "10.30 am");
this.$("input").val("10.45 am");
await this.$("input").blur();
});
| Add a test for the right date being set | Add a test for the right date being set
| JavaScript | mit | zestyzesty/ember-cli-zesty-shared-components,zestyzesty/ember-cli-zesty-shared-components | javascript | ## Code Before:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
test('displays an input field', async function(assert) {
await this.render(hbs`
{{zesty/time-input
entries=entries
property="status"}}
`);
assert.equal(this.$("input").length, 1);
});
## Instruction:
Add a test for the right date being set
## Code After:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import moment from 'moment';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
test('can update a moment date', async function(assert) {
assert.expect(3);
this.set('date', moment("2016-11-03T10:30"));
this.set('updateDate', (date) => {
assert.equal(moment.isMoment(date), true, "sends up a moment object");
assert.equal(moment("2016-11-03T10:45").isSame(date), true, "has the same date");
});
await this.render(hbs`
{{zesty/time-input
value=date
action=(action updateDate)
entries=entries
property="status"
format="h.mm a"
}}
`);
assert.equal(this.$("input").val(), "10.30 am");
this.$("input").val("10.45 am");
await this.$("input").blur();
});
test('can update a js date', async function(assert) {
assert.expect(3);
this.set('date', new Date(2016, 10, 3, 10, 30));
this.set('updateDate', (date) => {
assert.equal(moment.isDate(date), true, "sends up a moment object");
assert.equal(moment("2016-11-03T10:45").isSame(moment(date)), true, "has the same date");
});
await this.render(hbs`
{{zesty/time-input
value=date
action=(action updateDate)
entries=entries
property="status"
format="h.mm a"
}}
`);
assert.equal(this.$("input").val(), "10.30 am");
this.$("input").val("10.45 am");
await this.$("input").blur();
});
| import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
+ import moment from 'moment';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
- test('displays an input field', async function(assert) {
+ test('can update a moment date', async function(assert) {
+ assert.expect(3);
+
+ this.set('date', moment("2016-11-03T10:30"));
+ this.set('updateDate', (date) => {
+ assert.equal(moment.isMoment(date), true, "sends up a moment object");
+ assert.equal(moment("2016-11-03T10:45").isSame(date), true, "has the same date");
+ });
+
await this.render(hbs`
{{zesty/time-input
+ value=date
+ action=(action updateDate)
entries=entries
- property="status"}}
? --
+ property="status"
+ format="h.mm a"
+ }}
`);
- assert.equal(this.$("input").length, 1);
? ^^^^^
+ assert.equal(this.$("input").val(), "10.30 am");
? ++ ^^ + ++++++++
+
+ this.$("input").val("10.45 am");
+ await this.$("input").blur();
});
+
+ test('can update a js date', async function(assert) {
+ assert.expect(3);
+
+ this.set('date', new Date(2016, 10, 3, 10, 30));
+ this.set('updateDate', (date) => {
+ assert.equal(moment.isDate(date), true, "sends up a moment object");
+ assert.equal(moment("2016-11-03T10:45").isSame(moment(date)), true, "has the same date");
+ });
+
+ await this.render(hbs`
+ {{zesty/time-input
+ value=date
+ action=(action updateDate)
+ entries=entries
+ property="status"
+ format="h.mm a"
+ }}
+ `);
+
+ assert.equal(this.$("input").val(), "10.30 am");
+
+ this.$("input").val("10.45 am");
+ await this.$("input").blur();
+ }); | 47 | 2.9375 | 44 | 3 |
7d81ece0291bb469f1bea3bcf2c9225f74eab7d6 | server/game/cards/events/01/puttothetorch.js | server/game/cards/events/01/puttothetorch.js | const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChallenge.winner !== this.controller || currentChallenge.attacker !== this.controller || currentChallenge.strengthDifference < 5 ||
currentChallenge.challengeType !== 'military') {
return false;
}
return true;
}
play(player) {
if(this.controller !== player) {
return;
}
this.game.promptForSelect(player, {
activePromptTitle: 'Select a location to discard',
waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
cardCondition: card => card.inPlay && card.controller !== player && card.getType() === 'location',
onSelect: (p, card) => this.onCardSelected(p, card)
});
}
onCardSelected(player, card) {
card.controller.moveCard(card, 'discard pile');
this.game.addMessage('{0} uses {1} to discard {2}', player, this, card);
return true;
}
}
PutToTheTorch.code = '01042';
module.exports = PutToTheTorch;
| const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChallenge.winner !== this.controller || currentChallenge.attackingPlayer !== this.controller || currentChallenge.strengthDifference < 5 ||
currentChallenge.challengeType !== 'military') {
return false;
}
return true;
}
play(player) {
if(this.controller !== player) {
return;
}
this.game.promptForSelect(player, {
activePromptTitle: 'Select a location to discard',
waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
cardCondition: card => card.inPlay && card.controller !== player && card.getType() === 'location',
onSelect: (p, card) => this.onCardSelected(p, card)
});
}
onCardSelected(player, card) {
card.controller.discardCard(card);
this.game.addMessage('{0} uses {1} to discard {2}', player, this, card);
return true;
}
}
PutToTheTorch.code = '01042';
module.exports = PutToTheTorch;
| Fix put to the torch and allow it to use saves | Fix put to the torch and allow it to use saves
| JavaScript | mit | Antaiseito/throneteki_for_doomtown,jeremylarner/ringteki,jeremylarner/ringteki,samuellinde/throneteki,cavnak/throneteki,cryogen/gameteki,jbrz/throneteki,cryogen/throneteki,gryffon/ringteki,cryogen/throneteki,Antaiseito/throneteki_for_doomtown,cryogen/gameteki,jeremylarner/ringteki,ystros/throneteki,gryffon/ringteki,DukeTax/throneteki,DukeTax/throneteki,jbrz/throneteki,cavnak/throneteki,samuellinde/throneteki,gryffon/ringteki | javascript | ## Code Before:
const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChallenge.winner !== this.controller || currentChallenge.attacker !== this.controller || currentChallenge.strengthDifference < 5 ||
currentChallenge.challengeType !== 'military') {
return false;
}
return true;
}
play(player) {
if(this.controller !== player) {
return;
}
this.game.promptForSelect(player, {
activePromptTitle: 'Select a location to discard',
waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
cardCondition: card => card.inPlay && card.controller !== player && card.getType() === 'location',
onSelect: (p, card) => this.onCardSelected(p, card)
});
}
onCardSelected(player, card) {
card.controller.moveCard(card, 'discard pile');
this.game.addMessage('{0} uses {1} to discard {2}', player, this, card);
return true;
}
}
PutToTheTorch.code = '01042';
module.exports = PutToTheTorch;
## Instruction:
Fix put to the torch and allow it to use saves
## Code After:
const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
if(!currentChallenge || currentChallenge.winner !== this.controller || currentChallenge.attackingPlayer !== this.controller || currentChallenge.strengthDifference < 5 ||
currentChallenge.challengeType !== 'military') {
return false;
}
return true;
}
play(player) {
if(this.controller !== player) {
return;
}
this.game.promptForSelect(player, {
activePromptTitle: 'Select a location to discard',
waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
cardCondition: card => card.inPlay && card.controller !== player && card.getType() === 'location',
onSelect: (p, card) => this.onCardSelected(p, card)
});
}
onCardSelected(player, card) {
card.controller.discardCard(card);
this.game.addMessage('{0} uses {1} to discard {2}', player, this, card);
return true;
}
}
PutToTheTorch.code = '01042';
module.exports = PutToTheTorch;
| const DrawCard = require('../../../drawcard.js');
class PutToTheTorch extends DrawCard {
canPlay(player, card) {
if(player !== this.controller || this !== card) {
return false;
}
var currentChallenge = this.game.currentChallenge;
- if(!currentChallenge || currentChallenge.winner !== this.controller || currentChallenge.attacker !== this.controller || currentChallenge.strengthDifference < 5 ||
+ if(!currentChallenge || currentChallenge.winner !== this.controller || currentChallenge.attackingPlayer !== this.controller || currentChallenge.strengthDifference < 5 ||
? +++++++
currentChallenge.challengeType !== 'military') {
return false;
}
return true;
}
play(player) {
if(this.controller !== player) {
return;
}
this.game.promptForSelect(player, {
activePromptTitle: 'Select a location to discard',
waitingPromptTitle: 'Waiting for opponent to use ' + this.name,
cardCondition: card => card.inPlay && card.controller !== player && card.getType() === 'location',
onSelect: (p, card) => this.onCardSelected(p, card)
});
}
onCardSelected(player, card) {
- card.controller.moveCard(card, 'discard pile');
+ card.controller.discardCard(card);
this.game.addMessage('{0} uses {1} to discard {2}', player, this, card);
return true;
}
}
PutToTheTorch.code = '01042';
module.exports = PutToTheTorch; | 4 | 0.093023 | 2 | 2 |
cdbeb19df91d31dfa7d672b4378946a6bac31284 | spec/adapter/faraday_spec.rb | spec/adapter/faraday_spec.rb | require 'spec_helper'
require 'rack/client/adapter/faraday'
describe Faraday::Adapter::RackClient do
let(:url) { URI.join(@base_url, '/faraday') }
let(:conn) do
Faraday.new(:url => url) do |faraday|
faraday.request :multipart
faraday.request :url_encoded
faraday.adapter(:rack_client) do |builder|
builder.use Rack::Lint
builder.run Rack::Client::Handler::NetHTTP.new
end
end
end
describe 'GET' do
it 'retrieves the response body' do
conn.get('echo').body.should == 'get'
end
it 'send url encoded params' do
conn.get('echo', :name => 'zack').body.should == %(get ?{"name"=>"zack"})
end
it 'retrieves the response headers' do
response = conn.get('echo')
response.headers['Content-Type'].should =~ %r{text/plain}
response.headers['content-type'].should =~ %r{text/plain}
end
it 'handles headers with multiple values' do
conn.get('multi').headers['set-cookie'].should == 'one, two'
end
it 'with body' do
pending "Faraday tests a GET request with a POST body, which rack-client forbids."
response = conn.get('echo') do |req|
req.body = {'bodyrock' => true}
end
response.body.should == %(get {"bodyrock"=>"true"})
end
end
end
| require 'spec_helper'
require 'rack/client/adapter/faraday'
describe Faraday::Adapter::RackClient do
let(:url) { @base_url }
let(:conn) do
Faraday.new(:url => url) do |faraday|
faraday.request :multipart
faraday.request :url_encoded
faraday.adapter(:rack_client) do |builder|
builder.use Rack::Lint
builder.run LiveServer
end
end
end
describe 'GET' do
it 'retrieves the response body' do
conn.get('echo').body.should == 'get'
end
it 'send url encoded params' do
conn.get('echo', :name => 'zack').body.should == %(get ?{"name"=>"zack"})
end
it 'retrieves the response headers' do
response = conn.get('echo')
response.headers['Content-Type'].should =~ %r{text/plain}
response.headers['content-type'].should =~ %r{text/plain}
end
it 'handles headers with multiple values' do
conn.get('multi').headers['set-cookie'].should == 'one, two'
end
it 'with body' do
response = conn.get('echo') do |req|
req.body = {'bodyrock' => true}
end
response.body.should == %(get {"bodyrock"=>"true"})
end
end
end
| Switch the Faraday specs to use the faraday test app directly. | Switch the Faraday specs to use the faraday test app directly.
| Ruby | mit | halorgium/rack-client | ruby | ## Code Before:
require 'spec_helper'
require 'rack/client/adapter/faraday'
describe Faraday::Adapter::RackClient do
let(:url) { URI.join(@base_url, '/faraday') }
let(:conn) do
Faraday.new(:url => url) do |faraday|
faraday.request :multipart
faraday.request :url_encoded
faraday.adapter(:rack_client) do |builder|
builder.use Rack::Lint
builder.run Rack::Client::Handler::NetHTTP.new
end
end
end
describe 'GET' do
it 'retrieves the response body' do
conn.get('echo').body.should == 'get'
end
it 'send url encoded params' do
conn.get('echo', :name => 'zack').body.should == %(get ?{"name"=>"zack"})
end
it 'retrieves the response headers' do
response = conn.get('echo')
response.headers['Content-Type'].should =~ %r{text/plain}
response.headers['content-type'].should =~ %r{text/plain}
end
it 'handles headers with multiple values' do
conn.get('multi').headers['set-cookie'].should == 'one, two'
end
it 'with body' do
pending "Faraday tests a GET request with a POST body, which rack-client forbids."
response = conn.get('echo') do |req|
req.body = {'bodyrock' => true}
end
response.body.should == %(get {"bodyrock"=>"true"})
end
end
end
## Instruction:
Switch the Faraday specs to use the faraday test app directly.
## Code After:
require 'spec_helper'
require 'rack/client/adapter/faraday'
describe Faraday::Adapter::RackClient do
let(:url) { @base_url }
let(:conn) do
Faraday.new(:url => url) do |faraday|
faraday.request :multipart
faraday.request :url_encoded
faraday.adapter(:rack_client) do |builder|
builder.use Rack::Lint
builder.run LiveServer
end
end
end
describe 'GET' do
it 'retrieves the response body' do
conn.get('echo').body.should == 'get'
end
it 'send url encoded params' do
conn.get('echo', :name => 'zack').body.should == %(get ?{"name"=>"zack"})
end
it 'retrieves the response headers' do
response = conn.get('echo')
response.headers['Content-Type'].should =~ %r{text/plain}
response.headers['content-type'].should =~ %r{text/plain}
end
it 'handles headers with multiple values' do
conn.get('multi').headers['set-cookie'].should == 'one, two'
end
it 'with body' do
response = conn.get('echo') do |req|
req.body = {'bodyrock' => true}
end
response.body.should == %(get {"bodyrock"=>"true"})
end
end
end
| require 'spec_helper'
require 'rack/client/adapter/faraday'
describe Faraday::Adapter::RackClient do
- let(:url) { URI.join(@base_url, '/faraday') }
+ let(:url) { @base_url }
let(:conn) do
Faraday.new(:url => url) do |faraday|
faraday.request :multipart
faraday.request :url_encoded
faraday.adapter(:rack_client) do |builder|
builder.use Rack::Lint
- builder.run Rack::Client::Handler::NetHTTP.new
+ builder.run LiveServer
end
end
end
describe 'GET' do
it 'retrieves the response body' do
conn.get('echo').body.should == 'get'
end
it 'send url encoded params' do
conn.get('echo', :name => 'zack').body.should == %(get ?{"name"=>"zack"})
end
it 'retrieves the response headers' do
response = conn.get('echo')
response.headers['Content-Type'].should =~ %r{text/plain}
response.headers['content-type'].should =~ %r{text/plain}
end
it 'handles headers with multiple values' do
conn.get('multi').headers['set-cookie'].should == 'one, two'
end
it 'with body' do
- pending "Faraday tests a GET request with a POST body, which rack-client forbids."
-
response = conn.get('echo') do |req|
req.body = {'bodyrock' => true}
end
response.body.should == %(get {"bodyrock"=>"true"})
end
end
end | 6 | 0.115385 | 2 | 4 |
767cf582e41fcae86891e0e3b57d507807bdeb10 | metadata.rb | metadata.rb | name 'httpd'
version '0.2.19'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache 2.0'
description 'Provides httpd_service, httpd_config, and httpd_module resources'
source_url 'https://github.com/chef-cookbooks/httpd' if respond_to?(:source_url)
issues_url 'https://github.com/chef-cookbooks/httpd/issues' if respond_to?(:issues_url)
supports 'amazon'
supports 'redhat'
supports 'centos'
supports 'scientific'
supports 'fedora'
supports 'debian'
supports 'ubuntu'
# supports 'smartos'
# supports 'omnios'
# supports 'suse'
| name 'httpd'
version '0.2.19'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache 2.0'
description 'Provides httpd_service, httpd_config, and httpd_module resources'
source_url 'https://github.com/chef-cookbooks/httpd' if respond_to?(:source_url)
issues_url 'https://github.com/chef-cookbooks/httpd/issues' if respond_to?(:issues_url)
depends 'compat_resource'
supports 'amazon'
supports 'redhat'
supports 'centos'
supports 'scientific'
supports 'fedora'
supports 'debian'
supports 'ubuntu'
# supports 'smartos'
# supports 'omnios'
# supports 'suse'
| Bring in the compat_resource cookbook | Bring in the compat_resource cookbook
| Ruby | apache-2.0 | karmix/httpd,karmix/httpd,tpetchel/httpd,chef-cookbooks/httpd,autoclone/httpd,karmix/httpd,juliandunn/httpd,tpetchel/httpd,autoclone/httpd,tpetchel/httpd,juliandunn/httpd,karmix/httpd,autoclone/httpd,chef-cookbooks/httpd,juliandunn/httpd,tpetchel/httpd,chef-cookbooks/httpd,chef-cookbooks/httpd,autoclone/httpd,juliandunn/httpd | ruby | ## Code Before:
name 'httpd'
version '0.2.19'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache 2.0'
description 'Provides httpd_service, httpd_config, and httpd_module resources'
source_url 'https://github.com/chef-cookbooks/httpd' if respond_to?(:source_url)
issues_url 'https://github.com/chef-cookbooks/httpd/issues' if respond_to?(:issues_url)
supports 'amazon'
supports 'redhat'
supports 'centos'
supports 'scientific'
supports 'fedora'
supports 'debian'
supports 'ubuntu'
# supports 'smartos'
# supports 'omnios'
# supports 'suse'
## Instruction:
Bring in the compat_resource cookbook
## Code After:
name 'httpd'
version '0.2.19'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache 2.0'
description 'Provides httpd_service, httpd_config, and httpd_module resources'
source_url 'https://github.com/chef-cookbooks/httpd' if respond_to?(:source_url)
issues_url 'https://github.com/chef-cookbooks/httpd/issues' if respond_to?(:issues_url)
depends 'compat_resource'
supports 'amazon'
supports 'redhat'
supports 'centos'
supports 'scientific'
supports 'fedora'
supports 'debian'
supports 'ubuntu'
# supports 'smartos'
# supports 'omnios'
# supports 'suse'
| name 'httpd'
version '0.2.19'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache 2.0'
description 'Provides httpd_service, httpd_config, and httpd_module resources'
source_url 'https://github.com/chef-cookbooks/httpd' if respond_to?(:source_url)
issues_url 'https://github.com/chef-cookbooks/httpd/issues' if respond_to?(:issues_url)
+
+ depends 'compat_resource'
supports 'amazon'
supports 'redhat'
supports 'centos'
supports 'scientific'
supports 'fedora'
supports 'debian'
supports 'ubuntu'
# supports 'smartos'
# supports 'omnios'
# supports 'suse' | 2 | 0.105263 | 2 | 0 |
297783482158f0bcaea3993a2970b00a813d6d43 | Formula/modelgen.rb | Formula/modelgen.rb | class Modelgen < Formula
desc "Swift CLI to generate Models based on a JSON Schema and a template."
homepage "https://github.com/hebertialmeida/ModelGen"
url "https://github.com/hebertialmeida/ModelGen.git"
:branch => "master"
# :tag => "0.1.0",
# :revision => "930c017c0a066f6be0d9f97a867652849d3ce448"
head "https://github.com/hebertialmeida/ModelGen.git"
depends_on :xcode => ["9.3", :build]
def install
ENV["NO_CODE_LINT"]="1" # Disable swiftlint Build Phase to avoid build errors if versions mismatch
system "gem", "install", "bundler"
system "bundle", "install", "--without", "development"
system "bundle", "exec", "rake", "cli:install[#{bin},#{lib}]"
end
test do
system bin/"modelgen", "--version"
end
end | class Modelgen < Formula
desc "Swift CLI to generate Models based on a JSON Schema and a template."
homepage "https://github.com/hebertialmeida/ModelGen"
url "https://github.com/hebertialmeida/ModelGen.git"
:tag => "0.3.0",
:revision => "dda61ca457c805514708537a79fe65a5c7856533"
head "https://github.com/hebertialmeida/ModelGen.git"
depends_on :xcode => ["9.3", :build]
def install
ENV["NO_CODE_LINT"]="1" # Disable swiftlint Build Phase to avoid build errors if versions mismatch
system "gem", "install", "bundler"
system "bundle", "install", "--without", "development"
system "bundle", "exec", "rake", "cli:install[#{bin},#{lib}]"
end
test do
system bin/"modelgen", "--version"
end
end | Update formula for new tag | Update formula for new tag
| Ruby | mit | hebertialmeida/ModelGen,hebertialmeida/ModelGen,hebertialmeida/ModelGen,hebertialmeida/ModelGen | ruby | ## Code Before:
class Modelgen < Formula
desc "Swift CLI to generate Models based on a JSON Schema and a template."
homepage "https://github.com/hebertialmeida/ModelGen"
url "https://github.com/hebertialmeida/ModelGen.git"
:branch => "master"
# :tag => "0.1.0",
# :revision => "930c017c0a066f6be0d9f97a867652849d3ce448"
head "https://github.com/hebertialmeida/ModelGen.git"
depends_on :xcode => ["9.3", :build]
def install
ENV["NO_CODE_LINT"]="1" # Disable swiftlint Build Phase to avoid build errors if versions mismatch
system "gem", "install", "bundler"
system "bundle", "install", "--without", "development"
system "bundle", "exec", "rake", "cli:install[#{bin},#{lib}]"
end
test do
system bin/"modelgen", "--version"
end
end
## Instruction:
Update formula for new tag
## Code After:
class Modelgen < Formula
desc "Swift CLI to generate Models based on a JSON Schema and a template."
homepage "https://github.com/hebertialmeida/ModelGen"
url "https://github.com/hebertialmeida/ModelGen.git"
:tag => "0.3.0",
:revision => "dda61ca457c805514708537a79fe65a5c7856533"
head "https://github.com/hebertialmeida/ModelGen.git"
depends_on :xcode => ["9.3", :build]
def install
ENV["NO_CODE_LINT"]="1" # Disable swiftlint Build Phase to avoid build errors if versions mismatch
system "gem", "install", "bundler"
system "bundle", "install", "--without", "development"
system "bundle", "exec", "rake", "cli:install[#{bin},#{lib}]"
end
test do
system bin/"modelgen", "--version"
end
end | class Modelgen < Formula
desc "Swift CLI to generate Models based on a JSON Schema and a template."
homepage "https://github.com/hebertialmeida/ModelGen"
url "https://github.com/hebertialmeida/ModelGen.git"
- :branch => "master"
- # :tag => "0.1.0",
? -- ^
+ :tag => "0.3.0",
? ^
- # :revision => "930c017c0a066f6be0d9f97a867652849d3ce448"
+ :revision => "dda61ca457c805514708537a79fe65a5c7856533"
head "https://github.com/hebertialmeida/ModelGen.git"
depends_on :xcode => ["9.3", :build]
def install
ENV["NO_CODE_LINT"]="1" # Disable swiftlint Build Phase to avoid build errors if versions mismatch
system "gem", "install", "bundler"
system "bundle", "install", "--without", "development"
system "bundle", "exec", "rake", "cli:install[#{bin},#{lib}]"
end
test do
system bin/"modelgen", "--version"
end
end | 5 | 0.217391 | 2 | 3 |
758aaf184e3727e80bb7aa87465510b39fcacb25 | app/services/tag_importer/fetch_remote_data.rb | app/services/tag_importer/fetch_remote_data.rb | require 'csv'
module TagImporter
class FetchRemoteData
attr_reader :tagging_spreadsheet
attr_accessor :errors
def initialize(tagging_spreadsheet)
@tagging_spreadsheet = tagging_spreadsheet
@errors = []
end
def run
unless valid_response?
Airbrake.notify(RuntimeError.new(response.body))
return [spreadsheet_download_error]
end
process_spreadsheet
errors
end
private
def process_spreadsheet
parsed_data.each do |row|
save_row(row)
end
rescue => e
errors << e
end
def save_row(row)
tagging_spreadsheet.tag_mappings.build(
content_base_path: row["content_base_path"],
link_title: row["link_title"],
link_content_id: row["link_content_id"],
link_type: row["link_type"],
state: 'ready_to_tag'
).save
end
def parsed_data
CSV.parse(sheet_data, col_sep: "\t", headers: true)
end
def spreadsheet_download_error
I18n.t('errors.spreadsheet_download_error')
end
def valid_response?
response.code == '200'
end
def response
@response ||= Net::HTTP.get_response(URI(tagging_spreadsheet.url))
end
def sheet_data
response.body
end
end
end
| require 'csv'
module TagImporter
class FetchRemoteData
attr_reader :tagging_spreadsheet
attr_accessor :errors
def initialize(tagging_spreadsheet)
@tagging_spreadsheet = tagging_spreadsheet
@errors = []
end
def run
unless valid_response?
Airbrake.notify(RuntimeError.new(response.body))
return [spreadsheet_download_error]
end
process_spreadsheet
errors
end
private
def process_spreadsheet
parsed_data.each do |row|
save_row(row)
end
rescue => e
errors << e
end
def save_row(row)
tagging_spreadsheet.tag_mappings.build(
content_base_path: String(row["content_base_path"]),
link_title: row["link_title"],
link_content_id: String(row["link_content_id"]),
link_type: String(row["link_type"]),
state: 'ready_to_tag'
).save
end
def parsed_data
CSV.parse(sheet_data, col_sep: "\t", headers: true)
end
def spreadsheet_download_error
I18n.t('errors.spreadsheet_download_error')
end
def valid_response?
response.code == '200'
end
def response
@response ||= Net::HTTP.get_response(URI(tagging_spreadsheet.url))
end
def sheet_data
response.body
end
end
end
| Handle blank values when processing remote TSV data | Handle blank values when processing remote TSV data
We have not null DB constraints on several fields in the TagMapping
model. An import TSV may have blank values in any of its fields. We
should handle these cases and not attempt to persist null values in the
tag_mappings table.
| Ruby | mit | alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger | ruby | ## Code Before:
require 'csv'
module TagImporter
class FetchRemoteData
attr_reader :tagging_spreadsheet
attr_accessor :errors
def initialize(tagging_spreadsheet)
@tagging_spreadsheet = tagging_spreadsheet
@errors = []
end
def run
unless valid_response?
Airbrake.notify(RuntimeError.new(response.body))
return [spreadsheet_download_error]
end
process_spreadsheet
errors
end
private
def process_spreadsheet
parsed_data.each do |row|
save_row(row)
end
rescue => e
errors << e
end
def save_row(row)
tagging_spreadsheet.tag_mappings.build(
content_base_path: row["content_base_path"],
link_title: row["link_title"],
link_content_id: row["link_content_id"],
link_type: row["link_type"],
state: 'ready_to_tag'
).save
end
def parsed_data
CSV.parse(sheet_data, col_sep: "\t", headers: true)
end
def spreadsheet_download_error
I18n.t('errors.spreadsheet_download_error')
end
def valid_response?
response.code == '200'
end
def response
@response ||= Net::HTTP.get_response(URI(tagging_spreadsheet.url))
end
def sheet_data
response.body
end
end
end
## Instruction:
Handle blank values when processing remote TSV data
We have not null DB constraints on several fields in the TagMapping
model. An import TSV may have blank values in any of its fields. We
should handle these cases and not attempt to persist null values in the
tag_mappings table.
## Code After:
require 'csv'
module TagImporter
class FetchRemoteData
attr_reader :tagging_spreadsheet
attr_accessor :errors
def initialize(tagging_spreadsheet)
@tagging_spreadsheet = tagging_spreadsheet
@errors = []
end
def run
unless valid_response?
Airbrake.notify(RuntimeError.new(response.body))
return [spreadsheet_download_error]
end
process_spreadsheet
errors
end
private
def process_spreadsheet
parsed_data.each do |row|
save_row(row)
end
rescue => e
errors << e
end
def save_row(row)
tagging_spreadsheet.tag_mappings.build(
content_base_path: String(row["content_base_path"]),
link_title: row["link_title"],
link_content_id: String(row["link_content_id"]),
link_type: String(row["link_type"]),
state: 'ready_to_tag'
).save
end
def parsed_data
CSV.parse(sheet_data, col_sep: "\t", headers: true)
end
def spreadsheet_download_error
I18n.t('errors.spreadsheet_download_error')
end
def valid_response?
response.code == '200'
end
def response
@response ||= Net::HTTP.get_response(URI(tagging_spreadsheet.url))
end
def sheet_data
response.body
end
end
end
| require 'csv'
module TagImporter
class FetchRemoteData
attr_reader :tagging_spreadsheet
attr_accessor :errors
def initialize(tagging_spreadsheet)
@tagging_spreadsheet = tagging_spreadsheet
@errors = []
end
def run
unless valid_response?
Airbrake.notify(RuntimeError.new(response.body))
return [spreadsheet_download_error]
end
process_spreadsheet
errors
end
private
def process_spreadsheet
parsed_data.each do |row|
save_row(row)
end
rescue => e
errors << e
end
def save_row(row)
tagging_spreadsheet.tag_mappings.build(
- content_base_path: row["content_base_path"],
+ content_base_path: String(row["content_base_path"]),
? +++++++ +
link_title: row["link_title"],
- link_content_id: row["link_content_id"],
+ link_content_id: String(row["link_content_id"]),
? +++++++ +
- link_type: row["link_type"],
+ link_type: String(row["link_type"]),
? +++++++ +
state: 'ready_to_tag'
).save
end
def parsed_data
CSV.parse(sheet_data, col_sep: "\t", headers: true)
end
def spreadsheet_download_error
I18n.t('errors.spreadsheet_download_error')
end
def valid_response?
response.code == '200'
end
def response
@response ||= Net::HTTP.get_response(URI(tagging_spreadsheet.url))
end
def sheet_data
response.body
end
end
end | 6 | 0.095238 | 3 | 3 |
0efa7eda72c851959fa7da2bd084cc9aec310a77 | src/ai/FSMTransition.h | src/ai/FSMTransition.h |
namespace ADBLib
{
class FSMTransition
{
public:
FSMState* currentState; //!< The current state.
int input; //!< If this input is recieved and the FSM state is the currentState, transition.
FSMState* nextState; //!< The next state to transition to.
};
}
|
namespace ADBLib
{
struct FSMTransition
{
FSMState* currentState; //!< The current state.
int input; //!< If this input is received and the FSM state is the currentState, transition.
FSMState* nextState; //!< The next state to transition to.
};
}
| Fix END_STATE_TABLE define causing bool -> ptr conversion error | Fix END_STATE_TABLE define causing bool -> ptr conversion error
| C | mit | Dreadbot/ADBLib,Dreadbot/ADBLib,Sourec/ADBLib,Sourec/ADBLib | c | ## Code Before:
namespace ADBLib
{
class FSMTransition
{
public:
FSMState* currentState; //!< The current state.
int input; //!< If this input is recieved and the FSM state is the currentState, transition.
FSMState* nextState; //!< The next state to transition to.
};
}
## Instruction:
Fix END_STATE_TABLE define causing bool -> ptr conversion error
## Code After:
namespace ADBLib
{
struct FSMTransition
{
FSMState* currentState; //!< The current state.
int input; //!< If this input is received and the FSM state is the currentState, transition.
FSMState* nextState; //!< The next state to transition to.
};
}
|
namespace ADBLib
{
- class FSMTransition
? ^^^^
+ struct FSMTransition
? ++++ ^
{
- public:
FSMState* currentState; //!< The current state.
- int input; //!< If this input is recieved and the FSM state is the currentState, transition.
? -
+ int input; //!< If this input is received and the FSM state is the currentState, transition.
? +
FSMState* nextState; //!< The next state to transition to.
};
} | 5 | 0.454545 | 2 | 3 |
70fae094a14ee80692a61143d712a767da9d2976 | README.md | README.md |
Generates a map visualization of interesting data.

## Setup
Copy the following collections from Artsy database to your local `gravity_development` mongo.
* `partner_locations`
* `partners`
* `users`
Get a backup of the impulse production database from heroku, and move it into a local postgres setup in `artsy-impulse-production`.
## Install node modules:
`yarn install`
Generate the geo points data, by using the coffescript files in the `data` dirs, then to start up the sites run
`npm run watch`
Then look at the html files inside `public/web`.
|
Generates a map visualization of interesting data.

## Setup
Copy the following collections from Artsy database to your local `gravity_development` mongo.
* `partner_locations`
* `partners`
* `users`
Get a backup of the impulse production database from heroku, and move it into a local postgres setup in `artsy-impulse-production`.
## Install node modules:
`yarn install`
Generate the geo points data, by using the coffescript files in the `data` dirs, then to start up the sites run
`npm run watch`
Then look at the html files inside `public/web`.
## Docs
There's a write-up on the Artsy Blog: [Mashing Data, Making Maps](http://artsy.github.io/blog/2017/01/25/mashing-maps/).
| Add a link to the post | Add a link to the post
| Markdown | mit | artsy/partner-map | markdown | ## Code Before:
Generates a map visualization of interesting data.

## Setup
Copy the following collections from Artsy database to your local `gravity_development` mongo.
* `partner_locations`
* `partners`
* `users`
Get a backup of the impulse production database from heroku, and move it into a local postgres setup in `artsy-impulse-production`.
## Install node modules:
`yarn install`
Generate the geo points data, by using the coffescript files in the `data` dirs, then to start up the sites run
`npm run watch`
Then look at the html files inside `public/web`.
## Instruction:
Add a link to the post
## Code After:
Generates a map visualization of interesting data.

## Setup
Copy the following collections from Artsy database to your local `gravity_development` mongo.
* `partner_locations`
* `partners`
* `users`
Get a backup of the impulse production database from heroku, and move it into a local postgres setup in `artsy-impulse-production`.
## Install node modules:
`yarn install`
Generate the geo points data, by using the coffescript files in the `data` dirs, then to start up the sites run
`npm run watch`
Then look at the html files inside `public/web`.
## Docs
There's a write-up on the Artsy Blog: [Mashing Data, Making Maps](http://artsy.github.io/blog/2017/01/25/mashing-maps/).
|
Generates a map visualization of interesting data.

## Setup
Copy the following collections from Artsy database to your local `gravity_development` mongo.
* `partner_locations`
* `partners`
* `users`
Get a backup of the impulse production database from heroku, and move it into a local postgres setup in `artsy-impulse-production`.
## Install node modules:
`yarn install`
Generate the geo points data, by using the coffescript files in the `data` dirs, then to start up the sites run
`npm run watch`
Then look at the html files inside `public/web`.
+
+ ## Docs
+
+ There's a write-up on the Artsy Blog: [Mashing Data, Making Maps](http://artsy.github.io/blog/2017/01/25/mashing-maps/). | 4 | 0.166667 | 4 | 0 |
d2851c82302b4a598e7263e0ade43ee7e36d9346 | src/Korobi/WebBundle/Resources/views/partials/footer.html.twig | src/Korobi/WebBundle/Resources/views/partials/footer.html.twig | <footer class="footer">
<div class="footer--inner">
<div class="footer--copyright">© {{ "now"|date("Y") }}, korobi.io team – <div class="footer--revision"><i class="fa fa-code-fork"></i> Korobi/Web ({{ gitInfo.getShortHash() }}) on {{ gitInfo.getBranch() }} – </div><a href="/theme"><i class="fa fa-adjust"></i></a></div>
<ul class="footer--links" role="menubar">
{% spaceless %}
{% for item in navigation.getFooter() %}
{{ nav.nav_link(item) }}
{% endfor %}
{% endspaceless %}
{% if not app.user %}
<li><a href="/auth/connect/github" rel="nofollow">Login</a></li>
{% else %}
<li><a href="/auth/logout">Logout</a></li>
{% endif %}
</ul>
</div>
</footer>
| <footer class="footer">
<div class="footer--inner">
<div class="footer--copyright">© {{ "now"|date("Y") }}, korobi.io team – <div class="footer--revision"><i class="fa fa-code-fork"></i> Korobi/Web ({{ gitInfo.getShortHash() }}) on {{ gitInfo.getBranch() }}</div></div>
<ul class="footer--links" role="menubar">
{% spaceless %}
{% for item in navigation.getFooter() %}
{{ nav.nav_link(item) }}
{% endfor %}
{% endspaceless %}
{% if not app.user %}
<li><a href="/auth/connect/github" rel="nofollow">Login</a></li>
{% else %}
<li><a href="/auth/logout">Logout</a></li>
{% endif %}
</ul>
</div>
</footer>
| Remove theme link from footer | Remove theme link from footer
| Twig | mit | korobi/Web,korobi/Web,korobi/Web,korobi/Web,korobi/Web | twig | ## Code Before:
<footer class="footer">
<div class="footer--inner">
<div class="footer--copyright">© {{ "now"|date("Y") }}, korobi.io team – <div class="footer--revision"><i class="fa fa-code-fork"></i> Korobi/Web ({{ gitInfo.getShortHash() }}) on {{ gitInfo.getBranch() }} – </div><a href="/theme"><i class="fa fa-adjust"></i></a></div>
<ul class="footer--links" role="menubar">
{% spaceless %}
{% for item in navigation.getFooter() %}
{{ nav.nav_link(item) }}
{% endfor %}
{% endspaceless %}
{% if not app.user %}
<li><a href="/auth/connect/github" rel="nofollow">Login</a></li>
{% else %}
<li><a href="/auth/logout">Logout</a></li>
{% endif %}
</ul>
</div>
</footer>
## Instruction:
Remove theme link from footer
## Code After:
<footer class="footer">
<div class="footer--inner">
<div class="footer--copyright">© {{ "now"|date("Y") }}, korobi.io team – <div class="footer--revision"><i class="fa fa-code-fork"></i> Korobi/Web ({{ gitInfo.getShortHash() }}) on {{ gitInfo.getBranch() }}</div></div>
<ul class="footer--links" role="menubar">
{% spaceless %}
{% for item in navigation.getFooter() %}
{{ nav.nav_link(item) }}
{% endfor %}
{% endspaceless %}
{% if not app.user %}
<li><a href="/auth/connect/github" rel="nofollow">Login</a></li>
{% else %}
<li><a href="/auth/logout">Logout</a></li>
{% endif %}
</ul>
</div>
</footer>
| <footer class="footer">
<div class="footer--inner">
- <div class="footer--copyright">© {{ "now"|date("Y") }}, korobi.io team – <div class="footer--revision"><i class="fa fa-code-fork"></i> Korobi/Web ({{ gitInfo.getShortHash() }}) on {{ gitInfo.getBranch() }} – </div><a href="/theme"><i class="fa fa-adjust"></i></a></div>
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ <div class="footer--copyright">© {{ "now"|date("Y") }}, korobi.io team – <div class="footer--revision"><i class="fa fa-code-fork"></i> Korobi/Web ({{ gitInfo.getShortHash() }}) on {{ gitInfo.getBranch() }}</div></div>
? ^^^^^^^^^^^^
<ul class="footer--links" role="menubar">
{% spaceless %}
{% for item in navigation.getFooter() %}
{{ nav.nav_link(item) }}
{% endfor %}
{% endspaceless %}
{% if not app.user %}
<li><a href="/auth/connect/github" rel="nofollow">Login</a></li>
{% else %}
<li><a href="/auth/logout">Logout</a></li>
{% endif %}
</ul>
</div>
</footer> | 2 | 0.117647 | 1 | 1 |
d6a913aa7fa53069500b2a0f065f31689640bda7 | register.php | register.php | <?php
$REGISTER_LTI2 = array(
"name" => "Quizzes",
"FontAwesome" => "fa-question-circle",
"short_name" => "Quizzes",
"description" => "This tool provides a quiz engine that supports the GIFT format. GIFT is a line-oriented plain text question format that is simple to understand and esaily edited by hand or even stored in a repository like github."
);
| <?php
$REGISTER_LTI2 = array(
"name" => "Quizzes",
"FontAwesome" => "fa-question-circle",
"short_name" => "Quizzes",
"description" => "This tool provides a quiz engine that supports the GIFT format. GIFT is a line-oriented plain text question format that is simple to understand and esaily edited by hand or even stored in a repository like github.",
"messages" => array("launch", "launch_grade")
);
| Add a bunch of things for ContentItem support | Add a bunch of things for ContentItem support
| PHP | apache-2.0 | csev/tsugi-php-mod,csev/tsugi-php-mod,csev/tsugi-php-mod,csev/tsugi-php-mod,csev/tsugi-php-mod | php | ## Code Before:
<?php
$REGISTER_LTI2 = array(
"name" => "Quizzes",
"FontAwesome" => "fa-question-circle",
"short_name" => "Quizzes",
"description" => "This tool provides a quiz engine that supports the GIFT format. GIFT is a line-oriented plain text question format that is simple to understand and esaily edited by hand or even stored in a repository like github."
);
## Instruction:
Add a bunch of things for ContentItem support
## Code After:
<?php
$REGISTER_LTI2 = array(
"name" => "Quizzes",
"FontAwesome" => "fa-question-circle",
"short_name" => "Quizzes",
"description" => "This tool provides a quiz engine that supports the GIFT format. GIFT is a line-oriented plain text question format that is simple to understand and esaily edited by hand or even stored in a repository like github.",
"messages" => array("launch", "launch_grade")
);
| <?php
$REGISTER_LTI2 = array(
"name" => "Quizzes",
"FontAwesome" => "fa-question-circle",
"short_name" => "Quizzes",
- "description" => "This tool provides a quiz engine that supports the GIFT format. GIFT is a line-oriented plain text question format that is simple to understand and esaily edited by hand or even stored in a repository like github."
+ "description" => "This tool provides a quiz engine that supports the GIFT format. GIFT is a line-oriented plain text question format that is simple to understand and esaily edited by hand or even stored in a repository like github.",
? +
+ "messages" => array("launch", "launch_grade")
);
| 3 | 0.333333 | 2 | 1 |
ae0c31040829f0b2bcc08e5bb0d8050f1852c7d7 | app/screens/add_timer_screen.rb | app/screens/add_timer_screen.rb | class AddTimerScreen < PM::FormotionScreen
title ""
def on_submit(_form)
formValues = _form.render
name = formValues[:name]
happened_at = Time.at(formValues[:start_time])
if name && name != ""
Timer.create(:name => name, :happened_at => happened_at)
cdq.save
end
close_screen
end
def table_data
{
:sections => [{
:title => nil,
:key => :primary_values,
:rows => [{
:key => :name,
:placeholder => "I learn to drive?",
:type => :string,
:auto_capitalization => :none
}, {
:key => :start_time,
:value => NSDate.alloc.init.timeIntervalSince1970.to_i,
:type => :date,
:picker_mode => :date_time
}, {
:title => "Start",
:type => :submit
}]
}]
}
end
end
| class AddTimerScreen < PM::FormotionScreen
title ""
def on_submit(_form)
formValues = _form.render
name = formValues[:name]
happened_at = Time.at(formValues[:start_time])
if name && name != ""
Timer.create(:name => name, :happened_at => happened_at)
cdq.save
end
close_screen
end
def table_data
{
:sections => [{
:title => nil,
:key => :primary_values,
:rows => [{
:key => :name,
:placeholder => "I learn to drive?",
:type => :string
}, {
:key => :start_time,
:value => NSDate.alloc.init.timeIntervalSince1970.to_i,
:type => :date,
:picker_mode => :date_time
}, {
:title => "Start",
:type => :submit
}]
}]
}
end
end
| Enable auto capitalization on form | Enable auto capitalization on form
| Ruby | mit | when-apps/whendid-ios | ruby | ## Code Before:
class AddTimerScreen < PM::FormotionScreen
title ""
def on_submit(_form)
formValues = _form.render
name = formValues[:name]
happened_at = Time.at(formValues[:start_time])
if name && name != ""
Timer.create(:name => name, :happened_at => happened_at)
cdq.save
end
close_screen
end
def table_data
{
:sections => [{
:title => nil,
:key => :primary_values,
:rows => [{
:key => :name,
:placeholder => "I learn to drive?",
:type => :string,
:auto_capitalization => :none
}, {
:key => :start_time,
:value => NSDate.alloc.init.timeIntervalSince1970.to_i,
:type => :date,
:picker_mode => :date_time
}, {
:title => "Start",
:type => :submit
}]
}]
}
end
end
## Instruction:
Enable auto capitalization on form
## Code After:
class AddTimerScreen < PM::FormotionScreen
title ""
def on_submit(_form)
formValues = _form.render
name = formValues[:name]
happened_at = Time.at(formValues[:start_time])
if name && name != ""
Timer.create(:name => name, :happened_at => happened_at)
cdq.save
end
close_screen
end
def table_data
{
:sections => [{
:title => nil,
:key => :primary_values,
:rows => [{
:key => :name,
:placeholder => "I learn to drive?",
:type => :string
}, {
:key => :start_time,
:value => NSDate.alloc.init.timeIntervalSince1970.to_i,
:type => :date,
:picker_mode => :date_time
}, {
:title => "Start",
:type => :submit
}]
}]
}
end
end
| class AddTimerScreen < PM::FormotionScreen
title ""
def on_submit(_form)
formValues = _form.render
name = formValues[:name]
happened_at = Time.at(formValues[:start_time])
if name && name != ""
Timer.create(:name => name, :happened_at => happened_at)
cdq.save
end
close_screen
end
def table_data
{
:sections => [{
:title => nil,
:key => :primary_values,
:rows => [{
- :key => :name,
? --------
+ :key => :name,
- :placeholder => "I learn to drive?",
? --------
+ :placeholder => "I learn to drive?",
- :type => :string,
? -------- -
+ :type => :string
- :auto_capitalization => :none
}, {
:key => :start_time,
:value => NSDate.alloc.init.timeIntervalSince1970.to_i,
:type => :date,
:picker_mode => :date_time
}, {
:title => "Start",
:type => :submit
}]
}]
}
end
end | 7 | 0.179487 | 3 | 4 |
a2a86fb46d2d170675dbab2145835871933bad01 | common/models/user.js | common/models/user.js | 'use strict';
module.exports = function(User) {
if (process.env.NODE_ENV !== 'testing') {
User.afterRemote('create', async (context, user) => {
const options = {
type: 'email',
protocol: process.env.PROTOCOL || 'http',
port: process.env.DISPLAY_PORT || 3000,
host: process.env.HOSTNAME || 'localhost',
to: user.email,
from: 'noreply@redborder.com',
user: user,
};
user.verify(options, (err, response) => {
if (err) {
User.deleteById(user.id);
throw err;
}
});
});
}
};
| 'use strict';
class StubMailer {
static send(options, context, cb) {
cb(null, null);
}
}
module.exports = function(User) {
User.afterRemote('create', async (context, user) => {
let options = null;
if (process.env.NODE_ENV === 'testing') {
options = {
type: 'email',
from: 'test',
mailer: StubMailer,
};
} else {
options = {
type: 'email',
protocol: process.env.PROTOCOL || 'http',
port: process.env.DISPLAY_PORT || 3000,
host: process.env.HOSTNAME || 'localhost',
to: user.email,
from: 'noreply@redborder.com',
user: user,
};
}
user.verify(options, (err, response) => {
if (err) {
User.deleteById(user.id);
throw err;
}
});
});
};
| Use fake mailer on tests | :sparkes: Use fake mailer on tests
| JavaScript | agpl-3.0 | redBorder/license-manager-api | javascript | ## Code Before:
'use strict';
module.exports = function(User) {
if (process.env.NODE_ENV !== 'testing') {
User.afterRemote('create', async (context, user) => {
const options = {
type: 'email',
protocol: process.env.PROTOCOL || 'http',
port: process.env.DISPLAY_PORT || 3000,
host: process.env.HOSTNAME || 'localhost',
to: user.email,
from: 'noreply@redborder.com',
user: user,
};
user.verify(options, (err, response) => {
if (err) {
User.deleteById(user.id);
throw err;
}
});
});
}
};
## Instruction:
:sparkes: Use fake mailer on tests
## Code After:
'use strict';
class StubMailer {
static send(options, context, cb) {
cb(null, null);
}
}
module.exports = function(User) {
User.afterRemote('create', async (context, user) => {
let options = null;
if (process.env.NODE_ENV === 'testing') {
options = {
type: 'email',
from: 'test',
mailer: StubMailer,
};
} else {
options = {
type: 'email',
protocol: process.env.PROTOCOL || 'http',
port: process.env.DISPLAY_PORT || 3000,
host: process.env.HOSTNAME || 'localhost',
to: user.email,
from: 'noreply@redborder.com',
user: user,
};
}
user.verify(options, (err, response) => {
if (err) {
User.deleteById(user.id);
throw err;
}
});
});
};
| 'use strict';
+ class StubMailer {
+ static send(options, context, cb) {
+ cb(null, null);
+ }
+ }
+
module.exports = function(User) {
- if (process.env.NODE_ENV !== 'testing') {
- User.afterRemote('create', async (context, user) => {
? --
+ User.afterRemote('create', async (context, user) => {
+ let options = null;
+
+ if (process.env.NODE_ENV === 'testing') {
- const options = {
? ------
+ options = {
+ type: 'email',
+ from: 'test',
+ mailer: StubMailer,
+ };
+ } else {
+ options = {
type: 'email',
protocol: process.env.PROTOCOL || 'http',
port: process.env.DISPLAY_PORT || 3000,
host: process.env.HOSTNAME || 'localhost',
to: user.email,
from: 'noreply@redborder.com',
user: user,
};
+ }
- user.verify(options, (err, response) => {
? --
+ user.verify(options, (err, response) => {
- if (err) {
? --
+ if (err) {
- User.deleteById(user.id);
? --
+ User.deleteById(user.id);
- throw err;
? --
+ throw err;
- }
? --
+ }
- });
});
- }
+ });
? ++
}; | 34 | 1.416667 | 24 | 10 |
c6d7beb83ccea3c60233275a26683797bfef66b1 | Readme.html | Readme.html | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=build/doc/html/index.html">
<title></title>
</head>
<body>
This document will redirect you to the real documenation which starts at doc/html/index.html.
<p>
If your browser doesn't support redirects, or you are looking at this file from the download
package, you will need to go to doc/html/index.html manually.
</body>
</html>
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=doc/index.html">
<title></title>
</head>
<body>
This document will redirect you to the real documentation which starts at
doc/index.html.
<p>
If your browser doesn't support redirects, or you are looking at this file
from the download package, you will need to go to doc/index.html manually.
</body>
</html>
| Fix the broken redirect link to docs. Fix typo. | Fix the broken redirect link to docs. Fix typo.
git-svn-id: c5bb8e2b15dc16fd1aec0e5653c08870c9ddec7d@669267 13f79535-47bb-0310-9956-ffa450edef68
| HTML | apache-2.0 | apache/santuario-java,apache/santuario-java,apache/santuario-java | html | ## Code Before:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=build/doc/html/index.html">
<title></title>
</head>
<body>
This document will redirect you to the real documenation which starts at doc/html/index.html.
<p>
If your browser doesn't support redirects, or you are looking at this file from the download
package, you will need to go to doc/html/index.html manually.
</body>
</html>
## Instruction:
Fix the broken redirect link to docs. Fix typo.
git-svn-id: c5bb8e2b15dc16fd1aec0e5653c08870c9ddec7d@669267 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=doc/index.html">
<title></title>
</head>
<body>
This document will redirect you to the real documentation which starts at
doc/index.html.
<p>
If your browser doesn't support redirects, or you are looking at this file
from the download package, you will need to go to doc/index.html manually.
</body>
</html>
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
- <meta http-equiv="Refresh" content="0; URL=build/doc/html/index.html">
? ------ -----
+ <meta http-equiv="Refresh" content="0; URL=doc/index.html">
<title></title>
</head>
<body>
- This document will redirect you to the real documenation which starts at doc/html/index.html.
? --------------------
+ This document will redirect you to the real documentation which starts at
? +
+ doc/index.html.
<p>
- If your browser doesn't support redirects, or you are looking at this file from the download
? ------------------
+ If your browser doesn't support redirects, or you are looking at this file
- package, you will need to go to doc/html/index.html manually.
? -----
+ from the download package, you will need to go to doc/index.html manually.
? ++++++++++++++++++
</body>
</html> | 9 | 0.642857 | 5 | 4 |
f8f1153d6f54d8a89726b1ae40379a24feedcc76 | zuul/main.yaml | zuul/main.yaml | - tenant:
name: openstack
source:
gerrit:
config-projects:
- openstack-infra/project-config
untrusted-projects:
# Order matters, load common job repos first
- openstack-infra/zuul-jobs:
shadow: openstack-infra/project-config
- openstack-infra/openstack-zuul-jobs
- openstack-infra/openstack-zuul-roles
# After this point, sorting projects alphabetically will help
# merge conflicts
- openstack-dev/sandbox
- openstack-infra/nodepool
- openstack-infra/shade
- openstack-infra/zuul
- openstack/ansible-role-bindep
- openstack/requirements
github:
untrusted-projects:
- gtest-org/ansible
| - tenant:
name: openstack
source:
gerrit:
config-projects:
- openstack-infra/project-config
untrusted-projects:
# Order matters, load common job repos first
- openstack-infra/zuul-jobs:
shadow: openstack-infra/project-config
- openstack-infra/openstack-zuul-jobs
- openstack-infra/openstack-zuul-roles
# After this point, sorting projects alphabetically will help
# merge conflicts
- openstack-dev/sandbox
- openstack-infra/devstack-gate
- openstack-infra/nodepool
- openstack-infra/shade
- openstack-infra/zuul
- openstack/ansible-role-bindep
- openstack/requirements
github:
untrusted-projects:
- gtest-org/ansible
| Add devstack-gate repo to zuul v3 | Add devstack-gate repo to zuul v3
In order for us to be able to hack on devstack-gate jobs, we need to
have devstack-gate be in zuul.
Change-Id: I3b995dd03a68b5f5e282af9da19456e870d0ff8c
| YAML | apache-2.0 | openstack-infra/project-config,openstack-infra/project-config | yaml | ## Code Before:
- tenant:
name: openstack
source:
gerrit:
config-projects:
- openstack-infra/project-config
untrusted-projects:
# Order matters, load common job repos first
- openstack-infra/zuul-jobs:
shadow: openstack-infra/project-config
- openstack-infra/openstack-zuul-jobs
- openstack-infra/openstack-zuul-roles
# After this point, sorting projects alphabetically will help
# merge conflicts
- openstack-dev/sandbox
- openstack-infra/nodepool
- openstack-infra/shade
- openstack-infra/zuul
- openstack/ansible-role-bindep
- openstack/requirements
github:
untrusted-projects:
- gtest-org/ansible
## Instruction:
Add devstack-gate repo to zuul v3
In order for us to be able to hack on devstack-gate jobs, we need to
have devstack-gate be in zuul.
Change-Id: I3b995dd03a68b5f5e282af9da19456e870d0ff8c
## Code After:
- tenant:
name: openstack
source:
gerrit:
config-projects:
- openstack-infra/project-config
untrusted-projects:
# Order matters, load common job repos first
- openstack-infra/zuul-jobs:
shadow: openstack-infra/project-config
- openstack-infra/openstack-zuul-jobs
- openstack-infra/openstack-zuul-roles
# After this point, sorting projects alphabetically will help
# merge conflicts
- openstack-dev/sandbox
- openstack-infra/devstack-gate
- openstack-infra/nodepool
- openstack-infra/shade
- openstack-infra/zuul
- openstack/ansible-role-bindep
- openstack/requirements
github:
untrusted-projects:
- gtest-org/ansible
| - tenant:
name: openstack
source:
gerrit:
config-projects:
- openstack-infra/project-config
untrusted-projects:
# Order matters, load common job repos first
- openstack-infra/zuul-jobs:
shadow: openstack-infra/project-config
- openstack-infra/openstack-zuul-jobs
- openstack-infra/openstack-zuul-roles
# After this point, sorting projects alphabetically will help
# merge conflicts
- openstack-dev/sandbox
+ - openstack-infra/devstack-gate
- openstack-infra/nodepool
- openstack-infra/shade
- openstack-infra/zuul
- openstack/ansible-role-bindep
- openstack/requirements
github:
untrusted-projects:
- gtest-org/ansible | 1 | 0.043478 | 1 | 0 |
bc083087cd7aadbf11fba9a8d1312bde3b7a2a27 | osgtest/library/mysql.py | osgtest/library/mysql.py | import os
from osgtest.library import core
from osgtest.library import service
def name():
if core.el_release() < 7:
return 'mysql'
else:
return 'mariadb'
def daemon_name():
if core.el_release() < 7:
return 'mysqld'
else:
return 'mariadb'
def init_script():
return daemon_name()
def pidfile():
return os.path.join('/var/run', daemon_name(), daemon_name() + '.pid')
def server_rpm():
return name() + '-server'
def client_rpm():
return name()
def start():
service.start('mysql', init_script=init_script(), sentinel_file=pidfile())
def stop():
service.stop('mysql')
def is_running():
service.is_running('mysql', init_script=init_script())
| import os
import re
from osgtest.library import core
from osgtest.library import service
def name():
if core.el_release() < 7:
return 'mysql'
else:
return 'mariadb'
def daemon_name():
if core.el_release() < 7:
return 'mysqld'
else:
return 'mariadb'
def init_script():
return daemon_name()
def pidfile():
return os.path.join('/var/run', daemon_name(), daemon_name() + '.pid')
def server_rpm():
return name() + '-server'
def client_rpm():
return name()
def start():
service.start('mysql', init_script=init_script(), sentinel_file=pidfile())
def stop():
service.stop('mysql')
def is_running():
service.is_running('mysql', init_script=init_script())
def _get_command(user='root', database=None):
command = ['mysql', '-N', '-B', '--user=' + str(user)]
if database:
command.append('--database=' + str(database))
return command
def execute(statements, database=None):
return core.system(_get_command(database=database), stdin=statements)
def check_execute(statements, message, database=None, exit=0):
return core.check_system(_get_command(database=database), message, stdin=statements, exit=exit)
def dbdump(destfile, database=None):
command = "mysqldump --skip-comments --skip-extended-insert -u root "
if database:
command += re.escape(database)
else:
command += "--all-databases"
command += ">" + re.escape(destfile)
core.system(command, user=None, stdin=None, log_output=False, shell=True)
| Add several useful MySQL functions | Add several useful MySQL functions
Functions useful for examining and manipulating MySQL databases:
- execute() -- execute one or more MySQL statements (as a single string),
optionally on a specific database. Returns the same thing as core.system()
- check_execute() -- same as execute(), but checks return code and
errors out on failure. Returns the same thing as core.check_system()
- dbdump() -- create a dump of one or all mysql databases in the given file
| Python | apache-2.0 | efajardo/osg-test,efajardo/osg-test | python | ## Code Before:
import os
from osgtest.library import core
from osgtest.library import service
def name():
if core.el_release() < 7:
return 'mysql'
else:
return 'mariadb'
def daemon_name():
if core.el_release() < 7:
return 'mysqld'
else:
return 'mariadb'
def init_script():
return daemon_name()
def pidfile():
return os.path.join('/var/run', daemon_name(), daemon_name() + '.pid')
def server_rpm():
return name() + '-server'
def client_rpm():
return name()
def start():
service.start('mysql', init_script=init_script(), sentinel_file=pidfile())
def stop():
service.stop('mysql')
def is_running():
service.is_running('mysql', init_script=init_script())
## Instruction:
Add several useful MySQL functions
Functions useful for examining and manipulating MySQL databases:
- execute() -- execute one or more MySQL statements (as a single string),
optionally on a specific database. Returns the same thing as core.system()
- check_execute() -- same as execute(), but checks return code and
errors out on failure. Returns the same thing as core.check_system()
- dbdump() -- create a dump of one or all mysql databases in the given file
## Code After:
import os
import re
from osgtest.library import core
from osgtest.library import service
def name():
if core.el_release() < 7:
return 'mysql'
else:
return 'mariadb'
def daemon_name():
if core.el_release() < 7:
return 'mysqld'
else:
return 'mariadb'
def init_script():
return daemon_name()
def pidfile():
return os.path.join('/var/run', daemon_name(), daemon_name() + '.pid')
def server_rpm():
return name() + '-server'
def client_rpm():
return name()
def start():
service.start('mysql', init_script=init_script(), sentinel_file=pidfile())
def stop():
service.stop('mysql')
def is_running():
service.is_running('mysql', init_script=init_script())
def _get_command(user='root', database=None):
command = ['mysql', '-N', '-B', '--user=' + str(user)]
if database:
command.append('--database=' + str(database))
return command
def execute(statements, database=None):
return core.system(_get_command(database=database), stdin=statements)
def check_execute(statements, message, database=None, exit=0):
return core.check_system(_get_command(database=database), message, stdin=statements, exit=exit)
def dbdump(destfile, database=None):
command = "mysqldump --skip-comments --skip-extended-insert -u root "
if database:
command += re.escape(database)
else:
command += "--all-databases"
command += ">" + re.escape(destfile)
core.system(command, user=None, stdin=None, log_output=False, shell=True)
| import os
+ import re
from osgtest.library import core
from osgtest.library import service
def name():
if core.el_release() < 7:
return 'mysql'
else:
return 'mariadb'
def daemon_name():
if core.el_release() < 7:
return 'mysqld'
else:
return 'mariadb'
def init_script():
return daemon_name()
def pidfile():
return os.path.join('/var/run', daemon_name(), daemon_name() + '.pid')
def server_rpm():
return name() + '-server'
def client_rpm():
return name()
def start():
service.start('mysql', init_script=init_script(), sentinel_file=pidfile())
def stop():
service.stop('mysql')
def is_running():
service.is_running('mysql', init_script=init_script())
+
+ def _get_command(user='root', database=None):
+ command = ['mysql', '-N', '-B', '--user=' + str(user)]
+ if database:
+ command.append('--database=' + str(database))
+ return command
+
+ def execute(statements, database=None):
+ return core.system(_get_command(database=database), stdin=statements)
+
+ def check_execute(statements, message, database=None, exit=0):
+ return core.check_system(_get_command(database=database), message, stdin=statements, exit=exit)
+
+ def dbdump(destfile, database=None):
+ command = "mysqldump --skip-comments --skip-extended-insert -u root "
+ if database:
+ command += re.escape(database)
+ else:
+ command += "--all-databases"
+ command += ">" + re.escape(destfile)
+ core.system(command, user=None, stdin=None, log_output=False, shell=True) | 22 | 0.594595 | 22 | 0 |
c7daef487fee51b68d410d2f4be3fd16068c7d5a | tests/export/test_task_types_to_csv.py | tests/export/test_task_types_to_csv.py | from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_department()
self.generate_fixture_task_type()
def test_get_output_files(self):
csv_task_types = self.get_raw("export/csv/task-types.csv")
expected_result = """Department;Name\r
Animation;Animation\r
Modeling;Shaders\r
"""
self.assertEqual(csv_task_types, expected_result)
| from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_department()
self.generate_fixture_task_type()
def test_get_output_files(self):
csv_task_types = self.get_raw("export/csv/task-types.csv")
expected_result = """Department;Name\r
Animation;Animation\r
Animation;Layout\r
Modeling;Shaders\r
"""
self.assertEqual(csv_task_types, expected_result)
| Fix task type export test | Fix task type export test
| Python | agpl-3.0 | cgwire/zou | python | ## Code Before:
from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_department()
self.generate_fixture_task_type()
def test_get_output_files(self):
csv_task_types = self.get_raw("export/csv/task-types.csv")
expected_result = """Department;Name\r
Animation;Animation\r
Modeling;Shaders\r
"""
self.assertEqual(csv_task_types, expected_result)
## Instruction:
Fix task type export test
## Code After:
from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_department()
self.generate_fixture_task_type()
def test_get_output_files(self):
csv_task_types = self.get_raw("export/csv/task-types.csv")
expected_result = """Department;Name\r
Animation;Animation\r
Animation;Layout\r
Modeling;Shaders\r
"""
self.assertEqual(csv_task_types, expected_result)
| from tests.base import ApiDBTestCase
class TasksCsvExportTestCase(ApiDBTestCase):
def setUp(self):
super(TasksCsvExportTestCase, self).setUp()
self.generate_fixture_project_status()
self.generate_fixture_project()
self.generate_fixture_asset_type()
self.generate_fixture_department()
self.generate_fixture_task_type()
def test_get_output_files(self):
csv_task_types = self.get_raw("export/csv/task-types.csv")
expected_result = """Department;Name\r
Animation;Animation\r
+ Animation;Layout\r
Modeling;Shaders\r
"""
self.assertEqual(csv_task_types, expected_result) | 1 | 0.047619 | 1 | 0 |
e3f0fc14c58eb350c862c68cd3f90b136854d730 | map-blocks/3_ROAD.md | map-blocks/3_ROAD.md |
For each node there is a road going to these directions:
- right
- bottom right
- bottom left
Each road is stored as a two bit value.
Direction | Operation
:------------|:---------
Right | `value & 0x03`
Bottom right | `(value >> 2) & 0x03`
Bottom left | `(value >> 4) & 0x03`
Resulting value for each direction then decides which road type to render:
Value | Type
:-----|:----
`0x00`| No road
`0x01`| Normal road (helper)
`0x02`| Gravel road (helper + donkey)
`0x03`| Waterway (helper + boat)
|
For each node there is a road going to these directions:
- right
- bottom right
- bottom left
- middle dot
Each road is stored as a two bit value.
Direction | Operation
:------------|:---------
Right | `value & 0x03`
Bottom right | `(value >> 2) & 0x03`
Bottom left | `(value >> 4) & 0x03`
Middle dot | `(value >> 6) & 0x03`
Resulting value for each direction then decides which road type to render:
Value | Type
:-----|:----
`0x00`| No road
`0x01`| Normal road (helper)
`0x02`| Gravel road (helper + donkey)
`0x03`| Waterway (helper + boat)
| Add note about highest two bits | Add note about highest two bits | Markdown | mit | Merri/settlers2,Merri/settlers2,Merri/settlers2,Merri/settlers2 | markdown | ## Code Before:
For each node there is a road going to these directions:
- right
- bottom right
- bottom left
Each road is stored as a two bit value.
Direction | Operation
:------------|:---------
Right | `value & 0x03`
Bottom right | `(value >> 2) & 0x03`
Bottom left | `(value >> 4) & 0x03`
Resulting value for each direction then decides which road type to render:
Value | Type
:-----|:----
`0x00`| No road
`0x01`| Normal road (helper)
`0x02`| Gravel road (helper + donkey)
`0x03`| Waterway (helper + boat)
## Instruction:
Add note about highest two bits
## Code After:
For each node there is a road going to these directions:
- right
- bottom right
- bottom left
- middle dot
Each road is stored as a two bit value.
Direction | Operation
:------------|:---------
Right | `value & 0x03`
Bottom right | `(value >> 2) & 0x03`
Bottom left | `(value >> 4) & 0x03`
Middle dot | `(value >> 6) & 0x03`
Resulting value for each direction then decides which road type to render:
Value | Type
:-----|:----
`0x00`| No road
`0x01`| Normal road (helper)
`0x02`| Gravel road (helper + donkey)
`0x03`| Waterway (helper + boat)
|
For each node there is a road going to these directions:
- right
- bottom right
- bottom left
+ - middle dot
Each road is stored as a two bit value.
Direction | Operation
:------------|:---------
Right | `value & 0x03`
Bottom right | `(value >> 2) & 0x03`
Bottom left | `(value >> 4) & 0x03`
+ Middle dot | `(value >> 6) & 0x03`
Resulting value for each direction then decides which road type to render:
Value | Type
:-----|:----
`0x00`| No road
`0x01`| Normal road (helper)
`0x02`| Gravel road (helper + donkey)
`0x03`| Waterway (helper + boat)
+ | 3 | 0.130435 | 3 | 0 |
6a09d4148e50a2666babb2e1ee474a65da075210 | web.rb | web.rb | require 'icalendar'
require 'sinatra'
require 'twilio-ruby'
require 'json'
FEED_MAP = JSON.parse(ENV["FEED_MAP"])
puts "Loaded feed map: #{FEED_MAP.inspect}"
def find_on_call_number(number)
data = %x{curl -s #{FEED_MAP[number]}}
cal = Icalendar.parse(data)
event = cal.first.events.select { |e|
Date.today >= e.dtstart.value && Date.today < e.dtend.value
}.first
event.location
end
def twiml_response(params, type)
puts "#{type} received from #{params[:From]} to #{params[:To]}"
target = find_on_call_number(params[:To])
puts "Target found: #{target}"
response = Twilio::TwiML::Response.new do |r|
yield r, target
end
response.text
end
post '/voice' do
twiml_response(params, "Call") do |r, target|
r.Say "Your call is being redirected"
r.Dial do |d|
d.Number target
end
end
end
post '/sms' do
twiml_response(params, "SMS") do |r, target|
r.Message(to: target, from: params[:To]) do |m|
m.Body params[:Body]
end
end
end
| require 'icalendar'
require 'sinatra'
require 'twilio-ruby'
require 'json'
FEED_MAP = JSON.parse(ENV["FEED_MAP"])
FALLBACK = ENV["FALLBACK_NUMBER"]
puts "Loaded feed map: #{FEED_MAP.inspect}"
def find_on_call_number(number)
data = %x{curl -s #{FEED_MAP[number]}}
cal = Icalendar.parse(data)
event = cal.first.events.select { |e|
Date.today >= e.dtstart.value && Date.today < e.dtend.value
}.first
if event
event.location
else
puts "WARNING: No number found, using fallback"
FALLBACK
end
end
def twiml_response(params, type)
puts "#{type} received from #{params[:From]} to #{params[:To]}"
target = find_on_call_number(params[:To])
puts "Target found: #{target}"
response = Twilio::TwiML::Response.new do |r|
yield r, target
end
response.text
end
post '/voice' do
twiml_response(params, "Call") do |r, target|
r.Say "Your call is being redirected"
r.Dial do |d|
d.Number target
end
end
end
post '/sms' do
twiml_response(params, "SMS") do |r, target|
r.Message(to: target, from: params[:To]) do |m|
m.Body params[:Body]
end
end
end
| Support a fallback number if no one is scheduled | Support a fallback number if no one is scheduled
| Ruby | mit | Hubbub/on-call | ruby | ## Code Before:
require 'icalendar'
require 'sinatra'
require 'twilio-ruby'
require 'json'
FEED_MAP = JSON.parse(ENV["FEED_MAP"])
puts "Loaded feed map: #{FEED_MAP.inspect}"
def find_on_call_number(number)
data = %x{curl -s #{FEED_MAP[number]}}
cal = Icalendar.parse(data)
event = cal.first.events.select { |e|
Date.today >= e.dtstart.value && Date.today < e.dtend.value
}.first
event.location
end
def twiml_response(params, type)
puts "#{type} received from #{params[:From]} to #{params[:To]}"
target = find_on_call_number(params[:To])
puts "Target found: #{target}"
response = Twilio::TwiML::Response.new do |r|
yield r, target
end
response.text
end
post '/voice' do
twiml_response(params, "Call") do |r, target|
r.Say "Your call is being redirected"
r.Dial do |d|
d.Number target
end
end
end
post '/sms' do
twiml_response(params, "SMS") do |r, target|
r.Message(to: target, from: params[:To]) do |m|
m.Body params[:Body]
end
end
end
## Instruction:
Support a fallback number if no one is scheduled
## Code After:
require 'icalendar'
require 'sinatra'
require 'twilio-ruby'
require 'json'
FEED_MAP = JSON.parse(ENV["FEED_MAP"])
FALLBACK = ENV["FALLBACK_NUMBER"]
puts "Loaded feed map: #{FEED_MAP.inspect}"
def find_on_call_number(number)
data = %x{curl -s #{FEED_MAP[number]}}
cal = Icalendar.parse(data)
event = cal.first.events.select { |e|
Date.today >= e.dtstart.value && Date.today < e.dtend.value
}.first
if event
event.location
else
puts "WARNING: No number found, using fallback"
FALLBACK
end
end
def twiml_response(params, type)
puts "#{type} received from #{params[:From]} to #{params[:To]}"
target = find_on_call_number(params[:To])
puts "Target found: #{target}"
response = Twilio::TwiML::Response.new do |r|
yield r, target
end
response.text
end
post '/voice' do
twiml_response(params, "Call") do |r, target|
r.Say "Your call is being redirected"
r.Dial do |d|
d.Number target
end
end
end
post '/sms' do
twiml_response(params, "SMS") do |r, target|
r.Message(to: target, from: params[:To]) do |m|
m.Body params[:Body]
end
end
end
| require 'icalendar'
require 'sinatra'
require 'twilio-ruby'
require 'json'
FEED_MAP = JSON.parse(ENV["FEED_MAP"])
+ FALLBACK = ENV["FALLBACK_NUMBER"]
puts "Loaded feed map: #{FEED_MAP.inspect}"
def find_on_call_number(number)
data = %x{curl -s #{FEED_MAP[number]}}
cal = Icalendar.parse(data)
event = cal.first.events.select { |e|
Date.today >= e.dtstart.value && Date.today < e.dtend.value
}.first
+ if event
- event.location
+ event.location
? ++
+ else
+ puts "WARNING: No number found, using fallback"
+ FALLBACK
+ end
end
def twiml_response(params, type)
puts "#{type} received from #{params[:From]} to #{params[:To]}"
target = find_on_call_number(params[:To])
puts "Target found: #{target}"
response = Twilio::TwiML::Response.new do |r|
yield r, target
end
response.text
end
post '/voice' do
twiml_response(params, "Call") do |r, target|
r.Say "Your call is being redirected"
r.Dial do |d|
d.Number target
end
end
end
post '/sms' do
twiml_response(params, "SMS") do |r, target|
r.Message(to: target, from: params[:To]) do |m|
m.Body params[:Body]
end
end
end | 8 | 0.170213 | 7 | 1 |
a9155ae234a7ccd342fc0d82c14636b9938f996f | index.html | index.html | <h1>##JS</h1>
<img src="./js.png" width="200px" height="200px">
<h2>Mission Statement</h2>
<p>To support users of javascript to create a collaborative, creative, diverse, interested, and inter-generational sustainable culture of programmers of all skill levels, with room and encougragement to grow.
<cite><a href="http://aredridel.dinhe.net/2014/06/15/an-unofficial-mission-statement-for-the-node-js-irc-channel/">source</a></cite>
<h2>CoC</h2>
<h2>Trolling Policy</h2>
| <title>Friendly JS Discussion channel</title>
<link rel="icon" type="image/png" href="./js.png">
<h1>##JS</h1>
<img src="./js.png">
<h2>Mission Statement</h2>
<p>To support users of javascript to create a collaborative, creative, diverse, interested, and inter-generational sustainable culture of programmers of all skill levels, with room and encougragement to grow.
<cite><a href="http://aredridel.dinhe.net/2014/06/15/an-unofficial-mission-statement-for-the-node-js-irc-channel/">source</a></cite>
<h2>CoC</h2>
<h2>Trolling Policy</h2>
| Add title, favicon. Remove img dims. | Add title, favicon. Remove img dims.
| HTML | mit | js-irc/js-irc.github.io | html | ## Code Before:
<h1>##JS</h1>
<img src="./js.png" width="200px" height="200px">
<h2>Mission Statement</h2>
<p>To support users of javascript to create a collaborative, creative, diverse, interested, and inter-generational sustainable culture of programmers of all skill levels, with room and encougragement to grow.
<cite><a href="http://aredridel.dinhe.net/2014/06/15/an-unofficial-mission-statement-for-the-node-js-irc-channel/">source</a></cite>
<h2>CoC</h2>
<h2>Trolling Policy</h2>
## Instruction:
Add title, favicon. Remove img dims.
## Code After:
<title>Friendly JS Discussion channel</title>
<link rel="icon" type="image/png" href="./js.png">
<h1>##JS</h1>
<img src="./js.png">
<h2>Mission Statement</h2>
<p>To support users of javascript to create a collaborative, creative, diverse, interested, and inter-generational sustainable culture of programmers of all skill levels, with room and encougragement to grow.
<cite><a href="http://aredridel.dinhe.net/2014/06/15/an-unofficial-mission-statement-for-the-node-js-irc-channel/">source</a></cite>
<h2>CoC</h2>
<h2>Trolling Policy</h2>
| + <title>Friendly JS Discussion channel</title>
+ <link rel="icon" type="image/png" href="./js.png">
+
<h1>##JS</h1>
- <img src="./js.png" width="200px" height="200px">
+ <img src="./js.png">
<h2>Mission Statement</h2>
<p>To support users of javascript to create a collaborative, creative, diverse, interested, and inter-generational sustainable culture of programmers of all skill levels, with room and encougragement to grow.
<cite><a href="http://aredridel.dinhe.net/2014/06/15/an-unofficial-mission-statement-for-the-node-js-irc-channel/">source</a></cite>
<h2>CoC</h2>
<h2>Trolling Policy</h2> | 5 | 0.5 | 4 | 1 |
9b71be972bf410df2f4005fb1d4b09f0f89fef68 | spec/unit/templates/rabbitmq-server_rabbitmq_config_spec.rb | spec/unit/templates/rabbitmq-server_rabbitmq_config_spec.rb |
RSpec.describe 'rabbit.config file generation', template: true do
let(:output) do
compiled_template('rabbitmq-server', 'rabbitmq.config', {'rabbitmq-server' => { 'config' => config}}).strip
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
let(:config) { nil }
context 'statistics emission' do
it 'sets the correct default interval' do
expect(output).to include '{rabbit, [ {collect_statistics_interval, 60000}] }'
end
it 'sets the correct default management rate mode' do
expect(output).to include '{rabbitmq_management, [ {rates_mode, none}] }'
end
end
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
let(:config) { [ 'custom_config' ].pack('m0') }
it 'uses provided config' do
expect(output).to eq 'custom_config'
end
end
end
|
RSpec.describe 'rabbit.config file generation', template: true do
let(:output) do
compiled_template('rabbitmq-server', 'rabbitmq.config', { 'rabbitmq-server' => { 'config' => config } }).strip
end
context 'when base64 encoded rabbitmq-server.rabbit.config is not provided' do
let(:config) { nil }
it 'should be empty' do
expect(output).to be_empty
end
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
let(:config) {[ 'custom_config' ].pack('m0') }
it 'uses provided config' do
expect(output).to eq 'custom_config'
end
end
end
| Fix tests for when config is not provided | Fix tests for when config is not provided
[#141401071]
Signed-off-by: Vlad Stoian <3a646ed2933376f6ad3d8f73c719d7c5225000dd@pivotal.io>
| Ruby | apache-2.0 | pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release,pivotal-cf/cf-rabbitmq-release | ruby | ## Code Before:
RSpec.describe 'rabbit.config file generation', template: true do
let(:output) do
compiled_template('rabbitmq-server', 'rabbitmq.config', {'rabbitmq-server' => { 'config' => config}}).strip
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
let(:config) { nil }
context 'statistics emission' do
it 'sets the correct default interval' do
expect(output).to include '{rabbit, [ {collect_statistics_interval, 60000}] }'
end
it 'sets the correct default management rate mode' do
expect(output).to include '{rabbitmq_management, [ {rates_mode, none}] }'
end
end
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
let(:config) { [ 'custom_config' ].pack('m0') }
it 'uses provided config' do
expect(output).to eq 'custom_config'
end
end
end
## Instruction:
Fix tests for when config is not provided
[#141401071]
Signed-off-by: Vlad Stoian <3a646ed2933376f6ad3d8f73c719d7c5225000dd@pivotal.io>
## Code After:
RSpec.describe 'rabbit.config file generation', template: true do
let(:output) do
compiled_template('rabbitmq-server', 'rabbitmq.config', { 'rabbitmq-server' => { 'config' => config } }).strip
end
context 'when base64 encoded rabbitmq-server.rabbit.config is not provided' do
let(:config) { nil }
it 'should be empty' do
expect(output).to be_empty
end
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
let(:config) {[ 'custom_config' ].pack('m0') }
it 'uses provided config' do
expect(output).to eq 'custom_config'
end
end
end
|
RSpec.describe 'rabbit.config file generation', template: true do
let(:output) do
- compiled_template('rabbitmq-server', 'rabbitmq.config', {'rabbitmq-server' => { 'config' => config}}).strip
+ compiled_template('rabbitmq-server', 'rabbitmq.config', { 'rabbitmq-server' => { 'config' => config } }).strip
? + + +
end
- context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
+ context 'when base64 encoded rabbitmq-server.rabbit.config is not provided' do
? ++++
- let(:config) { nil }
? -
+ let(:config) { nil }
- context 'statistics emission' do
+ it 'should be empty' do
+ expect(output).to be_empty
- it 'sets the correct default interval' do
- expect(output).to include '{rabbit, [ {collect_statistics_interval, 60000}] }'
- end
-
- it 'sets the correct default management rate mode' do
- expect(output).to include '{rabbitmq_management, [ {rates_mode, none}] }'
- end
end
end
context 'when base64 encoded rabbitmq-server.rabbit.config is provided' do
- let(:config) { [ 'custom_config' ].pack('m0') }
? -
+ let(:config) {[ 'custom_config' ].pack('m0') }
it 'uses provided config' do
expect(output).to eq 'custom_config'
end
end
end
| 18 | 0.62069 | 6 | 12 |
8617ebde53fddd2fff3ef1cfca6f1ffce53fcb9e | js/lib/utils.js | js/lib/utils.js | import $ from 'jquery';
import Modernizr from 'modernizr';
const utils = {};
let running = false;
(function wait () {
if (window.requestAnimationFrame) return window.requestAnimationFrame;
return function (cb) {
window.setTimeout(cb, 100);
};
})();
utils.replaceSVG = function () {
// If SVG is not supported replace it with png version
if (!Modernizr.svg) {
$('img[src*="svg"]').attr('src', () => {
return $(this).attr('src').replace('.svg', '.png');
});
}
};
utils.throttle = function (cb) {
return () => {
if (running) return;
running = true;
wait(() => {
cb.apply();
running = false;
});
};
}
export default utils;
| import $ from 'jquery';
import Modernizr from 'modernizr';
const utils = {};
let running = false;
window.raf = (function () {
if (window.requestAnimationFrame) return window.requestAnimationFrame;
return function (cb) {
window.setTimeout(cb, 100);
};
})();
utils.replaceSVG = function () {
// If SVG is not supported replace it with png version
if (!Modernizr.svg) {
$('img[src*="svg"]').attr('src', () => {
return $(this).attr('src').replace('.svg', '.png');
});
}
};
utils.throttle = function (cb) {
return () => {
if (running) return;
running = true;
window.raf(() => {
cb.apply();
running = false;
});
};
};
export default utils;
| Attach wait function to window | Attach wait function to window
| JavaScript | mit | oddhill/oddbaby-8 | javascript | ## Code Before:
import $ from 'jquery';
import Modernizr from 'modernizr';
const utils = {};
let running = false;
(function wait () {
if (window.requestAnimationFrame) return window.requestAnimationFrame;
return function (cb) {
window.setTimeout(cb, 100);
};
})();
utils.replaceSVG = function () {
// If SVG is not supported replace it with png version
if (!Modernizr.svg) {
$('img[src*="svg"]').attr('src', () => {
return $(this).attr('src').replace('.svg', '.png');
});
}
};
utils.throttle = function (cb) {
return () => {
if (running) return;
running = true;
wait(() => {
cb.apply();
running = false;
});
};
}
export default utils;
## Instruction:
Attach wait function to window
## Code After:
import $ from 'jquery';
import Modernizr from 'modernizr';
const utils = {};
let running = false;
window.raf = (function () {
if (window.requestAnimationFrame) return window.requestAnimationFrame;
return function (cb) {
window.setTimeout(cb, 100);
};
})();
utils.replaceSVG = function () {
// If SVG is not supported replace it with png version
if (!Modernizr.svg) {
$('img[src*="svg"]').attr('src', () => {
return $(this).attr('src').replace('.svg', '.png');
});
}
};
utils.throttle = function (cb) {
return () => {
if (running) return;
running = true;
window.raf(() => {
cb.apply();
running = false;
});
};
};
export default utils;
| import $ from 'jquery';
import Modernizr from 'modernizr';
const utils = {};
let running = false;
- (function wait () {
+ window.raf = (function () {
if (window.requestAnimationFrame) return window.requestAnimationFrame;
return function (cb) {
window.setTimeout(cb, 100);
};
})();
utils.replaceSVG = function () {
// If SVG is not supported replace it with png version
if (!Modernizr.svg) {
$('img[src*="svg"]').attr('src', () => {
return $(this).attr('src').replace('.svg', '.png');
});
}
};
utils.throttle = function (cb) {
return () => {
if (running) return;
running = true;
- wait(() => {
+ window.raf(() => {
cb.apply();
running = false;
});
};
- }
+ };
export default utils; | 6 | 0.162162 | 3 | 3 |
ba0a72675f2c493451e062cbde7ac1a1c1260bb6 | lib/components/form/general-settings-panel.js | lib/components/form/general-settings-panel.js | import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import DropdownSelector from './dropdown-selector'
import queryParams from '../../common/query-params'
class GeneralSettingsPanel extends Component {
static propTypes = {
query: PropTypes.object,
paramNames: PropTypes.array
}
static defaultProps = {
paramNames: [ 'maxWalkDistance', 'maxWalkTime', 'walkSpeed', 'bikeSpeed', 'optimize' ]
}
render () {
const { paramNames, query } = this.props
return (
<div className='general-settings-panel'>
{paramNames.map(param => {
const paramInfo = queryParams.find(qp => qp.name === param)
if (paramInfo.planTypes.indexOf(query.type) === -1) return
switch (paramInfo.selector) {
case 'DROPDOWN':
return <DropdownSelector
key={paramInfo.name}
name={paramInfo.name}
value={query[paramInfo.name]}
label={paramInfo.label}
options={paramInfo.options}
/>
}
})}
</div>
)
}
}
// connect to redux store
const mapStateToProps = (state, ownProps) => {
return {
query: state.otp.currentQuery
}
}
const mapDispatchToProps = (dispatch, ownProps) => {
return {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(GeneralSettingsPanel)
| import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import DropdownSelector from './dropdown-selector'
import queryParams from '../../common/query-params'
class GeneralSettingsPanel extends Component {
static propTypes = {
query: PropTypes.object,
paramNames: PropTypes.array
}
static defaultProps = {
paramNames: [ 'maxWalkDistance', 'maxWalkTime', 'walkSpeed', 'maxBikeTime', 'bikeSpeed', 'optimize' ]
}
render () {
const { paramNames, query } = this.props
return (
<div className='general-settings-panel'>
{paramNames.map(param => {
const paramInfo = queryParams.find(qp => qp.name === param)
if (paramInfo.planTypes.indexOf(query.type) === -1) return
switch (paramInfo.selector) {
case 'DROPDOWN':
return <DropdownSelector
key={paramInfo.name}
name={paramInfo.name}
value={query[paramInfo.name]}
label={paramInfo.label}
options={paramInfo.options}
/>
}
})}
</div>
)
}
}
// connect to redux store
const mapStateToProps = (state, ownProps) => {
return {
query: state.otp.currentQuery
}
}
const mapDispatchToProps = (dispatch, ownProps) => {
return {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(GeneralSettingsPanel)
| Include maxBikeTime with default general settings | feat(form): Include maxBikeTime with default general settings
| JavaScript | mit | opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux | javascript | ## Code Before:
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import DropdownSelector from './dropdown-selector'
import queryParams from '../../common/query-params'
class GeneralSettingsPanel extends Component {
static propTypes = {
query: PropTypes.object,
paramNames: PropTypes.array
}
static defaultProps = {
paramNames: [ 'maxWalkDistance', 'maxWalkTime', 'walkSpeed', 'bikeSpeed', 'optimize' ]
}
render () {
const { paramNames, query } = this.props
return (
<div className='general-settings-panel'>
{paramNames.map(param => {
const paramInfo = queryParams.find(qp => qp.name === param)
if (paramInfo.planTypes.indexOf(query.type) === -1) return
switch (paramInfo.selector) {
case 'DROPDOWN':
return <DropdownSelector
key={paramInfo.name}
name={paramInfo.name}
value={query[paramInfo.name]}
label={paramInfo.label}
options={paramInfo.options}
/>
}
})}
</div>
)
}
}
// connect to redux store
const mapStateToProps = (state, ownProps) => {
return {
query: state.otp.currentQuery
}
}
const mapDispatchToProps = (dispatch, ownProps) => {
return {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(GeneralSettingsPanel)
## Instruction:
feat(form): Include maxBikeTime with default general settings
## Code After:
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import DropdownSelector from './dropdown-selector'
import queryParams from '../../common/query-params'
class GeneralSettingsPanel extends Component {
static propTypes = {
query: PropTypes.object,
paramNames: PropTypes.array
}
static defaultProps = {
paramNames: [ 'maxWalkDistance', 'maxWalkTime', 'walkSpeed', 'maxBikeTime', 'bikeSpeed', 'optimize' ]
}
render () {
const { paramNames, query } = this.props
return (
<div className='general-settings-panel'>
{paramNames.map(param => {
const paramInfo = queryParams.find(qp => qp.name === param)
if (paramInfo.planTypes.indexOf(query.type) === -1) return
switch (paramInfo.selector) {
case 'DROPDOWN':
return <DropdownSelector
key={paramInfo.name}
name={paramInfo.name}
value={query[paramInfo.name]}
label={paramInfo.label}
options={paramInfo.options}
/>
}
})}
</div>
)
}
}
// connect to redux store
const mapStateToProps = (state, ownProps) => {
return {
query: state.otp.currentQuery
}
}
const mapDispatchToProps = (dispatch, ownProps) => {
return {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(GeneralSettingsPanel)
| import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import DropdownSelector from './dropdown-selector'
import queryParams from '../../common/query-params'
class GeneralSettingsPanel extends Component {
static propTypes = {
query: PropTypes.object,
paramNames: PropTypes.array
}
static defaultProps = {
- paramNames: [ 'maxWalkDistance', 'maxWalkTime', 'walkSpeed', 'bikeSpeed', 'optimize' ]
+ paramNames: [ 'maxWalkDistance', 'maxWalkTime', 'walkSpeed', 'maxBikeTime', 'bikeSpeed', 'optimize' ]
? +++++++++++++++
}
render () {
const { paramNames, query } = this.props
return (
<div className='general-settings-panel'>
{paramNames.map(param => {
const paramInfo = queryParams.find(qp => qp.name === param)
if (paramInfo.planTypes.indexOf(query.type) === -1) return
switch (paramInfo.selector) {
case 'DROPDOWN':
return <DropdownSelector
key={paramInfo.name}
name={paramInfo.name}
value={query[paramInfo.name]}
label={paramInfo.label}
options={paramInfo.options}
/>
}
})}
</div>
)
}
}
// connect to redux store
const mapStateToProps = (state, ownProps) => {
return {
query: state.otp.currentQuery
}
}
const mapDispatchToProps = (dispatch, ownProps) => {
return {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(GeneralSettingsPanel) | 2 | 0.037736 | 1 | 1 |
8bbb4fd04b8bd3de10407277463facf61d323114 | README.md | README.md |

|
**This app uses a simple event-based architecture, described in this blog post: http://vickychijwani.me/udacity-android-nanodegree-weeks-3-7/**

| Add link to architecture blog post | Add link to architecture blog post | Markdown | mit | vickychijwani/udacity-p1-p2-popular-movies | markdown | ## Code Before:

## Instruction:
Add link to architecture blog post
## Code After:
**This app uses a simple event-based architecture, described in this blog post: http://vickychijwani.me/udacity-android-nanodegree-weeks-3-7/**

| +
+ **This app uses a simple event-based architecture, described in this blog post: http://vickychijwani.me/udacity-android-nanodegree-weeks-3-7/**
 | 2 | 1 | 2 | 0 |
e4d271011ff352d4fa83c252739a71dc74a6c0d8 | packages/Python/lldbsuite/test/lang/swift/protocols/class_protocol/TestClassConstrainedProtocolArgument.py | packages/Python/lldbsuite/test/lang/swift/protocols/class_protocol/TestClassConstrainedProtocolArgument.py | import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
| import lldbsuite.test.lldbinline as lldbinline
import lldbsuite.test.decorators as decorators
lldbinline.MakeInlineTest(
__file__, globals(), decorators=[decorators.skipUnlessDarwin])
| Mark a test relying on foundation as darwin only. | [SwiftLanguageRuntime] Mark a test relying on foundation as darwin only.
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | python | ## Code Before:
import lldbsuite.test.lldbinline as lldbinline
lldbinline.MakeInlineTest(__file__, globals())
## Instruction:
[SwiftLanguageRuntime] Mark a test relying on foundation as darwin only.
## Code After:
import lldbsuite.test.lldbinline as lldbinline
import lldbsuite.test.decorators as decorators
lldbinline.MakeInlineTest(
__file__, globals(), decorators=[decorators.skipUnlessDarwin])
| import lldbsuite.test.lldbinline as lldbinline
+ import lldbsuite.test.decorators as decorators
- lldbinline.MakeInlineTest(__file__, globals())
+ lldbinline.MakeInlineTest(
+ __file__, globals(), decorators=[decorators.skipUnlessDarwin]) | 4 | 1.333333 | 3 | 1 |
eb51c67c2b7635381d69b6351b8efe302acf3df8 | lib/src/Hostname.cpp | lib/src/Hostname.cpp |
Hostname::Hostname()
{
}
Hostname::Hostname(const ci_string& hostname)
{
create(hostname);
}
bool Hostname::isValid()
{
return !data.empty();
}
void Hostname::create(const ci_string & hostname)
{
if (isValid())
{
throw std::runtime_error("Hostname is defined!");
}
data = hostname;
std::transform(data.begin(), data.end(), data.begin(), std::tolower);
}
void Hostname::destroy()
{
data.clear();
}
bool Hostname::operator==(const Hostname & other) const
{
return data == other.data;
}
bool Hostname::operator!=(const Hostname & other) const
{
return !(*this == other);
}
std::ostream& operator<<(std::ostream& output, const Hostname & hostname)
{
output << hostname.data.c_str();
return output;
}
std::istream& operator>>(std::istream& input, Hostname & hostname)
{
ci_string str;
std::copy(
std::istreambuf_iterator<char>(input),
std::istreambuf_iterator<char>(),
std::back_inserter(str));
if (hostname.isValid())
{
hostname.destroy();
}
hostname.create(str);
return input;
}
|
Hostname::Hostname()
{
}
Hostname::Hostname(const ci_string& hostname)
{
create(hostname);
}
bool Hostname::isValid()
{
return !data.empty();
}
void Hostname::create(const ci_string & hostname)
{
if (isValid())
{
throw std::runtime_error("Hostname is defined!");
}
data = hostname;
std::for_each(data.begin(), data.end(),
[](char& c)
{
c = std::tolower(c);
});
}
void Hostname::destroy()
{
data.clear();
}
bool Hostname::operator==(const Hostname & other) const
{
return data == other.data;
}
bool Hostname::operator!=(const Hostname & other) const
{
return !(*this == other);
}
std::ostream& operator<<(std::ostream& output, const Hostname & hostname)
{
output << hostname.data.c_str();
return output;
}
std::istream& operator>>(std::istream& input, Hostname & hostname)
{
ci_string str;
std::copy(
std::istreambuf_iterator<char>(input),
std::istreambuf_iterator<char>(),
std::back_inserter(str));
if (hostname.isValid())
{
hostname.destroy();
}
hostname.create(str);
return input;
}
| Convert std::transform to std::for_each (not supported by GCC 4.6) | Convert std::transform to std::for_each (not supported by GCC 4.6)
| C++ | mit | cristian-szabo/bt-code-test | c++ | ## Code Before:
Hostname::Hostname()
{
}
Hostname::Hostname(const ci_string& hostname)
{
create(hostname);
}
bool Hostname::isValid()
{
return !data.empty();
}
void Hostname::create(const ci_string & hostname)
{
if (isValid())
{
throw std::runtime_error("Hostname is defined!");
}
data = hostname;
std::transform(data.begin(), data.end(), data.begin(), std::tolower);
}
void Hostname::destroy()
{
data.clear();
}
bool Hostname::operator==(const Hostname & other) const
{
return data == other.data;
}
bool Hostname::operator!=(const Hostname & other) const
{
return !(*this == other);
}
std::ostream& operator<<(std::ostream& output, const Hostname & hostname)
{
output << hostname.data.c_str();
return output;
}
std::istream& operator>>(std::istream& input, Hostname & hostname)
{
ci_string str;
std::copy(
std::istreambuf_iterator<char>(input),
std::istreambuf_iterator<char>(),
std::back_inserter(str));
if (hostname.isValid())
{
hostname.destroy();
}
hostname.create(str);
return input;
}
## Instruction:
Convert std::transform to std::for_each (not supported by GCC 4.6)
## Code After:
Hostname::Hostname()
{
}
Hostname::Hostname(const ci_string& hostname)
{
create(hostname);
}
bool Hostname::isValid()
{
return !data.empty();
}
void Hostname::create(const ci_string & hostname)
{
if (isValid())
{
throw std::runtime_error("Hostname is defined!");
}
data = hostname;
std::for_each(data.begin(), data.end(),
[](char& c)
{
c = std::tolower(c);
});
}
void Hostname::destroy()
{
data.clear();
}
bool Hostname::operator==(const Hostname & other) const
{
return data == other.data;
}
bool Hostname::operator!=(const Hostname & other) const
{
return !(*this == other);
}
std::ostream& operator<<(std::ostream& output, const Hostname & hostname)
{
output << hostname.data.c_str();
return output;
}
std::istream& operator>>(std::istream& input, Hostname & hostname)
{
ci_string str;
std::copy(
std::istreambuf_iterator<char>(input),
std::istreambuf_iterator<char>(),
std::back_inserter(str));
if (hostname.isValid())
{
hostname.destroy();
}
hostname.create(str);
return input;
}
|
Hostname::Hostname()
{
}
Hostname::Hostname(const ci_string& hostname)
{
create(hostname);
}
bool Hostname::isValid()
{
return !data.empty();
}
void Hostname::create(const ci_string & hostname)
{
if (isValid())
{
throw std::runtime_error("Hostname is defined!");
}
data = hostname;
- std::transform(data.begin(), data.end(), data.begin(), std::tolower);
+ std::for_each(data.begin(), data.end(),
+ [](char& c)
+ {
+ c = std::tolower(c);
+ });
}
void Hostname::destroy()
{
data.clear();
}
bool Hostname::operator==(const Hostname & other) const
{
return data == other.data;
}
bool Hostname::operator!=(const Hostname & other) const
{
return !(*this == other);
}
std::ostream& operator<<(std::ostream& output, const Hostname & hostname)
{
output << hostname.data.c_str();
return output;
}
std::istream& operator>>(std::istream& input, Hostname & hostname)
{
ci_string str;
std::copy(
std::istreambuf_iterator<char>(input),
std::istreambuf_iterator<char>(),
std::back_inserter(str));
if (hostname.isValid())
{
hostname.destroy();
}
hostname.create(str);
return input;
} | 6 | 0.089552 | 5 | 1 |
df50569dd2564c3b8054b7fc86cd955d30bdb295 | src/models/RequestSearch.php | src/models/RequestSearch.php | <?php
/**
* Hosting Plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-hosting
* @package hipanel-module-hosting
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
*/
/**
* @see http://hiqdev.com/hipanel-module-hosting
* @license http://hiqdev.com/hipanel-module-hosting/license
* @copyright Copyright (c) 2015 HiQDev
*/
namespace hipanel\modules\hosting\models;
use hipanel\base\SearchModelTrait;
use hipanel\helpers\ArrayHelper;
class RequestSearch extends Request
{
use SearchModelTrait {
searchAttributes as defaultSearchAttributes;
}
public function rules()
{
return ArrayHelper::merge(parent::rules(), [
[['ids'], 'safe', 'on' => ['search']],
]);
}
}
| <?php
/**
* Hosting Plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-hosting
* @package hipanel-module-hosting
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
*/
/**
* @see http://hiqdev.com/hipanel-module-hosting
* @license http://hiqdev.com/hipanel-module-hosting/license
* @copyright Copyright (c) 2015 HiQDev
*/
namespace hipanel\modules\hosting\models;
use hipanel\base\SearchModelTrait;
use hipanel\helpers\ArrayHelper;
class RequestSearch extends Request
{
use SearchModelTrait {
searchAttributes as defaultSearchAttributes;
}
public function rules()
{
return ArrayHelper::merge(parent::rules(), [
[['ids'], 'safe', 'on' => ['search']],
[['id_in'], 'safe'],
]);
}
}
| Add `id_in` to request search | Add `id_in` to request search
| PHP | bsd-3-clause | hiqdev/hipanel-module-hosting,hiqdev/hipanel-module-hosting | php | ## Code Before:
<?php
/**
* Hosting Plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-hosting
* @package hipanel-module-hosting
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
*/
/**
* @see http://hiqdev.com/hipanel-module-hosting
* @license http://hiqdev.com/hipanel-module-hosting/license
* @copyright Copyright (c) 2015 HiQDev
*/
namespace hipanel\modules\hosting\models;
use hipanel\base\SearchModelTrait;
use hipanel\helpers\ArrayHelper;
class RequestSearch extends Request
{
use SearchModelTrait {
searchAttributes as defaultSearchAttributes;
}
public function rules()
{
return ArrayHelper::merge(parent::rules(), [
[['ids'], 'safe', 'on' => ['search']],
]);
}
}
## Instruction:
Add `id_in` to request search
## Code After:
<?php
/**
* Hosting Plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-hosting
* @package hipanel-module-hosting
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
*/
/**
* @see http://hiqdev.com/hipanel-module-hosting
* @license http://hiqdev.com/hipanel-module-hosting/license
* @copyright Copyright (c) 2015 HiQDev
*/
namespace hipanel\modules\hosting\models;
use hipanel\base\SearchModelTrait;
use hipanel\helpers\ArrayHelper;
class RequestSearch extends Request
{
use SearchModelTrait {
searchAttributes as defaultSearchAttributes;
}
public function rules()
{
return ArrayHelper::merge(parent::rules(), [
[['ids'], 'safe', 'on' => ['search']],
[['id_in'], 'safe'],
]);
}
}
| <?php
/**
* Hosting Plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-hosting
* @package hipanel-module-hosting
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
*/
/**
* @see http://hiqdev.com/hipanel-module-hosting
* @license http://hiqdev.com/hipanel-module-hosting/license
* @copyright Copyright (c) 2015 HiQDev
*/
namespace hipanel\modules\hosting\models;
use hipanel\base\SearchModelTrait;
use hipanel\helpers\ArrayHelper;
class RequestSearch extends Request
{
use SearchModelTrait {
searchAttributes as defaultSearchAttributes;
}
public function rules()
{
return ArrayHelper::merge(parent::rules(), [
[['ids'], 'safe', 'on' => ['search']],
+ [['id_in'], 'safe'],
]);
}
} | 1 | 0.029412 | 1 | 0 |
d7922e3fee9a90e9ef22de17a7a752f9dac14af9 | app/jobs/check_new_achievements.rb | app/jobs/check_new_achievements.rb | class CheckNewAchievements
@queue = :cron
def self.perform
User.all.each{|u| u.earn_achievements }
end
end
| class CheckNewAchievements
@queue = :cron
def self.perform
User.where(User.arel_table[:achievements_fetched_at].not_eq(nil)).each{|u| u.earn_achievements }
end
end
| Fix race condition bug, when background and realtime workers tried to check achievements for same user at once | Fix race condition bug, when background and realtime workers tried to check achievements for same user at once
| Ruby | mit | codeagenet/codeagenet,codeagenet/codeagenet | ruby | ## Code Before:
class CheckNewAchievements
@queue = :cron
def self.perform
User.all.each{|u| u.earn_achievements }
end
end
## Instruction:
Fix race condition bug, when background and realtime workers tried to check achievements for same user at once
## Code After:
class CheckNewAchievements
@queue = :cron
def self.perform
User.where(User.arel_table[:achievements_fetched_at].not_eq(nil)).each{|u| u.earn_achievements }
end
end
| class CheckNewAchievements
@queue = :cron
def self.perform
- User.all.each{|u| u.earn_achievements }
+ User.where(User.arel_table[:achievements_fetched_at].not_eq(nil)).each{|u| u.earn_achievements }
end
end | 2 | 0.285714 | 1 | 1 |
0ef82c3b6b98da84f423a61482969cb1cdb64681 | setup.py | setup.py | import os
import re
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'jsondiff', '__init__.py')) as f:
version = re.compile(r".*__version__ = '(.*?)'", re.S).match(f.read()).group(1)
setup(
name='jsondiff',
packages=find_packages(exclude=['tests']),
version=version,
description='Diff JSON and JSON-like structures in Python',
author='Zoomer Analytics LLC',
author_email='eric.reynolds@zoomeranalytics.com',
url='https://github.com/ZoomerAnalytics/jsondiff',
keywords=['json', 'diff', 'diffing', 'difference', 'patch', 'delta', 'dict', 'LCS'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
entry_points={
'console_scripts': [
'jsondiff=jsondiff.cli:main_deprecated',
'jdiff=jsondiff.cli:main'
]
}
)
| import os
import re
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'jsondiff', '__init__.py')) as f:
version = re.compile(r".*__version__ = '(.*?)'", re.S).match(f.read()).group(1)
setup(
name='jsondiff',
packages=find_packages(exclude=['tests']),
version=version,
description='Diff JSON and JSON-like structures in Python',
author='Zoomer Analytics LLC',
author_email='eric.reynolds@zoomeranalytics.com',
url='https://github.com/ZoomerAnalytics/jsondiff',
keywords=['json', 'diff', 'diffing', 'difference', 'patch', 'delta', 'dict', 'LCS'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
entry_points={
'console_scripts': [
'jdiff=jsondiff.cli:main'
]
}
)
| Remove deprecated jsondiff entry point. | Remove deprecated jsondiff entry point.
| Python | mit | ZoomerAnalytics/jsondiff | python | ## Code Before:
import os
import re
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'jsondiff', '__init__.py')) as f:
version = re.compile(r".*__version__ = '(.*?)'", re.S).match(f.read()).group(1)
setup(
name='jsondiff',
packages=find_packages(exclude=['tests']),
version=version,
description='Diff JSON and JSON-like structures in Python',
author='Zoomer Analytics LLC',
author_email='eric.reynolds@zoomeranalytics.com',
url='https://github.com/ZoomerAnalytics/jsondiff',
keywords=['json', 'diff', 'diffing', 'difference', 'patch', 'delta', 'dict', 'LCS'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
entry_points={
'console_scripts': [
'jsondiff=jsondiff.cli:main_deprecated',
'jdiff=jsondiff.cli:main'
]
}
)
## Instruction:
Remove deprecated jsondiff entry point.
## Code After:
import os
import re
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'jsondiff', '__init__.py')) as f:
version = re.compile(r".*__version__ = '(.*?)'", re.S).match(f.read()).group(1)
setup(
name='jsondiff',
packages=find_packages(exclude=['tests']),
version=version,
description='Diff JSON and JSON-like structures in Python',
author='Zoomer Analytics LLC',
author_email='eric.reynolds@zoomeranalytics.com',
url='https://github.com/ZoomerAnalytics/jsondiff',
keywords=['json', 'diff', 'diffing', 'difference', 'patch', 'delta', 'dict', 'LCS'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
entry_points={
'console_scripts': [
'jdiff=jsondiff.cli:main'
]
}
)
| import os
import re
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'jsondiff', '__init__.py')) as f:
version = re.compile(r".*__version__ = '(.*?)'", re.S).match(f.read()).group(1)
setup(
name='jsondiff',
packages=find_packages(exclude=['tests']),
version=version,
description='Diff JSON and JSON-like structures in Python',
author='Zoomer Analytics LLC',
author_email='eric.reynolds@zoomeranalytics.com',
url='https://github.com/ZoomerAnalytics/jsondiff',
keywords=['json', 'diff', 'diffing', 'difference', 'patch', 'delta', 'dict', 'LCS'],
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
entry_points={
'console_scripts': [
- 'jsondiff=jsondiff.cli:main_deprecated',
'jdiff=jsondiff.cli:main'
]
}
) | 1 | 0.034483 | 0 | 1 |
1381b9b68cef50ee43dfa684203752c50747c7eb | lib/Linker/LLVMBuild.txt | lib/Linker/LLVMBuild.txt | ;===- ./lib/Linker/LLVMBuild.txt -------------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Linker
parent = Libraries
required_libraries = Archive BitReader Core Support TransformUtils
| ;===- ./lib/Linker/LLVMBuild.txt -------------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Linker
parent = Libraries
required_libraries = Core Support TransformUtils
| Drop some now-dead component dependencies. | [Linker] Drop some now-dead component dependencies.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@172759 91177308-0d34-0410-b5e6-96231b3b80d8
| Text | apache-2.0 | GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm | text | ## Code Before:
;===- ./lib/Linker/LLVMBuild.txt -------------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Linker
parent = Libraries
required_libraries = Archive BitReader Core Support TransformUtils
## Instruction:
[Linker] Drop some now-dead component dependencies.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@172759 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
;===- ./lib/Linker/LLVMBuild.txt -------------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Linker
parent = Libraries
required_libraries = Core Support TransformUtils
| ;===- ./lib/Linker/LLVMBuild.txt -------------------------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Linker
parent = Libraries
- required_libraries = Archive BitReader Core Support TransformUtils
? ------------------
+ required_libraries = Core Support TransformUtils | 2 | 0.090909 | 1 | 1 |
0536097590d0658df2f91f455b3ab5148af7e622 | metadata/de.bwl.lfdi.app.yml | metadata/de.bwl.lfdi.app.yml | AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Science & Education
License: EUPL-1.2
AuthorEmail: poststelle@lfdi.bwl.de
AuthorWebSite: https://www.baden-wuerttemberg.datenschutz.de/
SourceCode: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public
AutoName: LfDI BW
RepoType: git
Repo: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: 9063dbd8d333a538fcf073b3a7843b473f629ee6
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.0'
CurrentVersionCode: 1
| AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Science & Education
License: EUPL-1.2
AuthorEmail: poststelle@lfdi.bwl.de
AuthorWebSite: https://www.baden-wuerttemberg.datenschutz.de/
SourceCode: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public
AutoName: LfDI BW
RepoType: git
Repo: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: 9063dbd8d333a538fcf073b3a7843b473f629ee6
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
- versionName: '1.1'
versionCode: 2
commit: 0f0a0cd7ddc578b375b760c2e9959b266960241d
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.1'
CurrentVersionCode: 2
| Update LfDI BW to 1.1 (2) | Update LfDI BW to 1.1 (2)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Science & Education
License: EUPL-1.2
AuthorEmail: poststelle@lfdi.bwl.de
AuthorWebSite: https://www.baden-wuerttemberg.datenschutz.de/
SourceCode: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public
AutoName: LfDI BW
RepoType: git
Repo: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: 9063dbd8d333a538fcf073b3a7843b473f629ee6
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.0'
CurrentVersionCode: 1
## Instruction:
Update LfDI BW to 1.1 (2)
## Code After:
AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Science & Education
License: EUPL-1.2
AuthorEmail: poststelle@lfdi.bwl.de
AuthorWebSite: https://www.baden-wuerttemberg.datenschutz.de/
SourceCode: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public
AutoName: LfDI BW
RepoType: git
Repo: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: 9063dbd8d333a538fcf073b3a7843b473f629ee6
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
- versionName: '1.1'
versionCode: 2
commit: 0f0a0cd7ddc578b375b760c2e9959b266960241d
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.1'
CurrentVersionCode: 2
| AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Science & Education
License: EUPL-1.2
AuthorEmail: poststelle@lfdi.bwl.de
AuthorWebSite: https://www.baden-wuerttemberg.datenschutz.de/
SourceCode: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public
AutoName: LfDI BW
RepoType: git
Repo: https://gitlab.lfdi-bw.de/LfDI/lfdi-app-android-public.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: 9063dbd8d333a538fcf073b3a7843b473f629ee6
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk-headless
- update-alternatives --auto java
gradle:
- yes
+ - versionName: '1.1'
+ versionCode: 2
+ commit: 0f0a0cd7ddc578b375b760c2e9959b266960241d
+ subdir: app
+ sudo:
+ - apt-get update || apt-get update
+ - apt-get install -y openjdk-11-jdk-headless
+ - update-alternatives --auto java
+ gradle:
+ - yes
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
- CurrentVersion: '1.0'
? ^
+ CurrentVersion: '1.1'
? ^
- CurrentVersionCode: 1
? ^
+ CurrentVersionCode: 2
? ^
| 15 | 0.483871 | 13 | 2 |
efee1e2913d5f72cbfc0029244102105c3046ee3 | contacts/templates/log_line.html | contacts/templates/log_line.html | {{ log.display_time | date:"l, M j, Y"}} - {{ log.logged_by }} {{ log.action_str }}. Notes: {{ log.notes }} {% if log.link %}(<a href="{{ log.link }}">Link</a>){% endif %} | {{ log.display_time | date:"l, M j, Y"}} - {% if log.logged_by.firstname }}{{ log.logged_by.first_name }}{% else %}{{ log.logged_by }}{% endif %} {{ log.action_str }}. Notes: {{ log.notes }} {% if log.link %}(<a href="{{ log.link }}">Link</a>){% endif %} | Use first name if available in log line | Use first name if available in log line
| HTML | mit | phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts | html | ## Code Before:
{{ log.display_time | date:"l, M j, Y"}} - {{ log.logged_by }} {{ log.action_str }}. Notes: {{ log.notes }} {% if log.link %}(<a href="{{ log.link }}">Link</a>){% endif %}
## Instruction:
Use first name if available in log line
## Code After:
{{ log.display_time | date:"l, M j, Y"}} - {% if log.logged_by.firstname }}{{ log.logged_by.first_name }}{% else %}{{ log.logged_by }}{% endif %} {{ log.action_str }}. Notes: {{ log.notes }} {% if log.link %}(<a href="{{ log.link }}">Link</a>){% endif %} | - {{ log.display_time | date:"l, M j, Y"}} - {{ log.logged_by }} {{ log.action_str }}. Notes: {{ log.notes }} {% if log.link %}(<a href="{{ log.link }}">Link</a>){% endif %}
? ^ ^^
+ {{ log.display_time | date:"l, M j, Y"}} - {% if log.logged_by.firstname }}{{ log.logged_by.first_name }}{% else %}{{ log.logged_by }}{% endif %} {{ log.action_str }}. Notes: {{ log.notes }} {% if log.link %}(<a href="{{ log.link }}">Link</a>){% endif %}
? ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| 2 | 2 | 1 | 1 |
db108d8951401e8d2ce012e3b0c1f248800ed059 | files/default/test/install_update_test.rb | files/default/test/install_update_test.rb | require 'minitest/spec'
require_relative 'spec_helper'
class InstallUpdateSpec < MiniTest::Chef::Spec
describe_recipe 'visualstudio::install_update' do
describe 'packages' do
include ChefHelper
it 'installs Visual Studio update' do
each_version_edition(node) do |version, _|
node['visualstudio'][version]['update']['package_name'].must_be_installed
end
end
end
end
end
| require 'minitest/spec'
require_relative 'spec_helper'
class InstallUpdateSpec < MiniTest::Chef::Spec
describe_recipe 'visualstudio::install_update' do
describe 'packages' do
include ChefHelper
it 'installs Visual Studio update' do
each_version_edition(node) do |version, _|
# not all versions support an update
if node['visualstudio'][version]['update']
node['visualstudio'][version]['update']['package_name'].must_be_installed
end
end
end
end
end
end
| Fix update minitest when installing VS 2015 | Fix update minitest when installing VS 2015
| Ruby | apache-2.0 | daptiv/visualstudio,daptiv/visualstudio,windowschefcookbooks/visualstudio,windowschefcookbooks/visualstudio | ruby | ## Code Before:
require 'minitest/spec'
require_relative 'spec_helper'
class InstallUpdateSpec < MiniTest::Chef::Spec
describe_recipe 'visualstudio::install_update' do
describe 'packages' do
include ChefHelper
it 'installs Visual Studio update' do
each_version_edition(node) do |version, _|
node['visualstudio'][version]['update']['package_name'].must_be_installed
end
end
end
end
end
## Instruction:
Fix update minitest when installing VS 2015
## Code After:
require 'minitest/spec'
require_relative 'spec_helper'
class InstallUpdateSpec < MiniTest::Chef::Spec
describe_recipe 'visualstudio::install_update' do
describe 'packages' do
include ChefHelper
it 'installs Visual Studio update' do
each_version_edition(node) do |version, _|
# not all versions support an update
if node['visualstudio'][version]['update']
node['visualstudio'][version]['update']['package_name'].must_be_installed
end
end
end
end
end
end
| require 'minitest/spec'
require_relative 'spec_helper'
class InstallUpdateSpec < MiniTest::Chef::Spec
describe_recipe 'visualstudio::install_update' do
describe 'packages' do
include ChefHelper
it 'installs Visual Studio update' do
each_version_edition(node) do |version, _|
+ # not all versions support an update
+ if node['visualstudio'][version]['update']
- node['visualstudio'][version]['update']['package_name'].must_be_installed
+ node['visualstudio'][version]['update']['package_name'].must_be_installed
? ++
+ end
end
end
end
end
end | 5 | 0.294118 | 4 | 1 |
f3750f180a7092d72f5d37105b213ccfe3db7df0 | input/blog/2021-01-19-cake-rider-0.2.0-released.md | input/blog/2021-01-19-cake-rider-0.2.0-released.md | ---
title: Cake for Rider 0.2.0 released
category: Release Notes
author: nils-a
---
Version 0.2.0 of Cake for Rider has been released.
This release features, among many small changes, the possibility to add
arbitrary arguments to run configurations.
Full details of everything that was included in this release can be seen
in the [release notes](https://github.com/cake-build/cake-rider/releases/tag/0.2.0) for this version.
| ---
title: Cake for Rider 0.2.0 released
category: Release Notes
author: nils-a
---
Version 0.2.0 of Cake for Rider has been released.
This release features, among many small changes, the possibility to add
arbitrary arguments to run configurations.
### Release Notes
Full details of everything that was included in this release can be seen
in the [release notes](https://github.com/cake-build/cake-rider/releases/tag/0.2.0) for this version.
### Release Video
There is a [short video](https://youtu.be/yA73I4Ky87s) discussing the main aspects of this release.
<iframe width="560" height="315" src="https://www.youtube.com/embed/yA73I4Ky87s" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
| Add video to blog post for Cake for Rider 0.2.0 | Add video to blog post for Cake for Rider 0.2.0
| Markdown | mit | cake-build/website,cake-build/website,cake-build/website | markdown | ## Code Before:
---
title: Cake for Rider 0.2.0 released
category: Release Notes
author: nils-a
---
Version 0.2.0 of Cake for Rider has been released.
This release features, among many small changes, the possibility to add
arbitrary arguments to run configurations.
Full details of everything that was included in this release can be seen
in the [release notes](https://github.com/cake-build/cake-rider/releases/tag/0.2.0) for this version.
## Instruction:
Add video to blog post for Cake for Rider 0.2.0
## Code After:
---
title: Cake for Rider 0.2.0 released
category: Release Notes
author: nils-a
---
Version 0.2.0 of Cake for Rider has been released.
This release features, among many small changes, the possibility to add
arbitrary arguments to run configurations.
### Release Notes
Full details of everything that was included in this release can be seen
in the [release notes](https://github.com/cake-build/cake-rider/releases/tag/0.2.0) for this version.
### Release Video
There is a [short video](https://youtu.be/yA73I4Ky87s) discussing the main aspects of this release.
<iframe width="560" height="315" src="https://www.youtube.com/embed/yA73I4Ky87s" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
| ---
title: Cake for Rider 0.2.0 released
category: Release Notes
author: nils-a
---
Version 0.2.0 of Cake for Rider has been released.
This release features, among many small changes, the possibility to add
arbitrary arguments to run configurations.
+ ### Release Notes
+
- Full details of everything that was included in this release can be seen
? -
+ Full details of everything that was included in this release can be seen
in the [release notes](https://github.com/cake-build/cake-rider/releases/tag/0.2.0) for this version.
+
+ ### Release Video
+
+ There is a [short video](https://youtu.be/yA73I4Ky87s) discussing the main aspects of this release.
+
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/yA73I4Ky87s" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | 10 | 0.769231 | 9 | 1 |
a67bbc1051b74d2dfd7fc9cea2973f1cd72c54bf | src/index.html | src/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ulkoilukartta</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>
<div id="root"/>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kuntokartta</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta property="og:title" content="Kuntokartta"/>
<meta property="og:description" content="Pääkaupunkiseudun luistelukentät ja hiihtoladut."/>
</head>
<body>
<div id="root"/>
</body>
</html>
| Add Open Graph meta tags | Add Open Graph meta tags
| HTML | mit | nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ulkoilukartta</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>
<div id="root"/>
</body>
</html>
## Instruction:
Add Open Graph meta tags
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kuntokartta</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta property="og:title" content="Kuntokartta"/>
<meta property="og:description" content="Pääkaupunkiseudun luistelukentät ja hiihtoladut."/>
</head>
<body>
<div id="root"/>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
- <title>Ulkoilukartta</title>
? ^^^ ---
+ <title>Kuntokartta</title>
? ^^^^
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+ <meta property="og:title" content="Kuntokartta"/>
+ <meta property="og:description" content="Pääkaupunkiseudun luistelukentät ja hiihtoladut."/>
</head>
<body>
<div id="root"/>
</body>
</html> | 5 | 0.384615 | 3 | 2 |
2a3bda6ea52a71396e054eeef98445d901a065b1 | setup.cfg | setup.cfg | [bumpversion]
current_version = 1.1.0a
commit = True
tag = True
[bumpversion:file:setup.py]
[bumpversion:file:pyup/__init__.py]
[wheel]
universal = 1
| [bumpversion]
current_version = 1.1.0a
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<pre>[a-z]*)
serialize =
{major}.{minor}.{patch}{pre}
{major}.{minor}.{patch}
[bumpversion:file:setup.py]
[bumpversion:file:pyup/__init__.py]
[bumpversion:part:pre]
optional_value = final
values =
a
final
[wheel]
universal = 1
| Configure pre version of utility | Configure pre version of utility
| INI | mit | pyupio/pyup | ini | ## Code Before:
[bumpversion]
current_version = 1.1.0a
commit = True
tag = True
[bumpversion:file:setup.py]
[bumpversion:file:pyup/__init__.py]
[wheel]
universal = 1
## Instruction:
Configure pre version of utility
## Code After:
[bumpversion]
current_version = 1.1.0a
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<pre>[a-z]*)
serialize =
{major}.{minor}.{patch}{pre}
{major}.{minor}.{patch}
[bumpversion:file:setup.py]
[bumpversion:file:pyup/__init__.py]
[bumpversion:part:pre]
optional_value = final
values =
a
final
[wheel]
universal = 1
| [bumpversion]
current_version = 1.1.0a
commit = True
tag = True
+ parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<pre>[a-z]*)
+ serialize =
+ {major}.{minor}.{patch}{pre}
+ {major}.{minor}.{patch}
+
[bumpversion:file:setup.py]
[bumpversion:file:pyup/__init__.py]
+ [bumpversion:part:pre]
+ optional_value = final
+ values =
+ a
+ final
+
[wheel]
universal = 1
| 11 | 0.916667 | 11 | 0 |
c9642a1600404e8a67395590ef83ea7cb5d728b0 | toolkit/mtk/mtk-window.js | toolkit/mtk/mtk-window.js | function MtkWindow (settings) {
MtkContainer.call (this, settings);
this.Xaml = this.Control.Content.Root;
this.Realize ();
this.Override ("OnSizeAllocationRequest", function () {
var self = this;
return {
Width: self.Control.Content.ActualWidth,
Height: self.Control.Content.ActualHeight,
Top: 0,
Left: 0
};
});
this.Virtual ("OnFullScreenChange", function () this.QueueResize);
this.Virtual ("OnToggleFullScreen", function () {
this.Control.Content.FullScreen = !this.Control.Content.FullScreen;
this.QueueResize ();
});
this.ToggleFullScreen = function () this.OnToggleFullScreen ();
this.Control.Content.OnResize = delegate (this, this.QueueResize);
this.Control.Content.OnFullScreenChange = delegate (this, this.OnFullScreenChange);
this.MapProperties (["Background"]);
this.AfterConstructed ();
}
| function MtkWindow (settings) {
MtkContainer.call (this, settings);
MtkStyle.Reload ();
this.Xaml = this.Control.Content.Root;
this.Realize ();
this.Override ("OnSizeAllocationRequest", function () {
var self = this;
return {
Width: self.Control.Content.ActualWidth,
Height: self.Control.Content.ActualHeight,
Top: 0,
Left: 0
};
});
this.Virtual ("OnFullScreenChange", function () this.QueueResize);
this.Virtual ("OnToggleFullScreen", function () {
this.Control.Content.FullScreen = !this.Control.Content.FullScreen;
this.QueueResize ();
});
this.ToggleFullScreen = function () this.OnToggleFullScreen ();
this.Control.Content.OnResize = delegate (this, this.QueueResize);
this.Control.Content.OnFullScreenChange = delegate (this, this.OnFullScreenChange);
this.MapProperties (["Background"]);
this.AfterConstructed ();
}
| Call MtkStyle.Reload whenever a window is created | Call MtkStyle.Reload whenever a window is created
| JavaScript | mit | abock/moonshine,abock/moonshine,abock/moonshine,abock/moonshine | javascript | ## Code Before:
function MtkWindow (settings) {
MtkContainer.call (this, settings);
this.Xaml = this.Control.Content.Root;
this.Realize ();
this.Override ("OnSizeAllocationRequest", function () {
var self = this;
return {
Width: self.Control.Content.ActualWidth,
Height: self.Control.Content.ActualHeight,
Top: 0,
Left: 0
};
});
this.Virtual ("OnFullScreenChange", function () this.QueueResize);
this.Virtual ("OnToggleFullScreen", function () {
this.Control.Content.FullScreen = !this.Control.Content.FullScreen;
this.QueueResize ();
});
this.ToggleFullScreen = function () this.OnToggleFullScreen ();
this.Control.Content.OnResize = delegate (this, this.QueueResize);
this.Control.Content.OnFullScreenChange = delegate (this, this.OnFullScreenChange);
this.MapProperties (["Background"]);
this.AfterConstructed ();
}
## Instruction:
Call MtkStyle.Reload whenever a window is created
## Code After:
function MtkWindow (settings) {
MtkContainer.call (this, settings);
MtkStyle.Reload ();
this.Xaml = this.Control.Content.Root;
this.Realize ();
this.Override ("OnSizeAllocationRequest", function () {
var self = this;
return {
Width: self.Control.Content.ActualWidth,
Height: self.Control.Content.ActualHeight,
Top: 0,
Left: 0
};
});
this.Virtual ("OnFullScreenChange", function () this.QueueResize);
this.Virtual ("OnToggleFullScreen", function () {
this.Control.Content.FullScreen = !this.Control.Content.FullScreen;
this.QueueResize ();
});
this.ToggleFullScreen = function () this.OnToggleFullScreen ();
this.Control.Content.OnResize = delegate (this, this.QueueResize);
this.Control.Content.OnFullScreenChange = delegate (this, this.OnFullScreenChange);
this.MapProperties (["Background"]);
this.AfterConstructed ();
}
| function MtkWindow (settings) {
MtkContainer.call (this, settings);
+
+ MtkStyle.Reload ();
this.Xaml = this.Control.Content.Root;
this.Realize ();
this.Override ("OnSizeAllocationRequest", function () {
var self = this;
return {
Width: self.Control.Content.ActualWidth,
Height: self.Control.Content.ActualHeight,
Top: 0,
Left: 0
};
});
this.Virtual ("OnFullScreenChange", function () this.QueueResize);
this.Virtual ("OnToggleFullScreen", function () {
this.Control.Content.FullScreen = !this.Control.Content.FullScreen;
this.QueueResize ();
});
this.ToggleFullScreen = function () this.OnToggleFullScreen ();
this.Control.Content.OnResize = delegate (this, this.QueueResize);
this.Control.Content.OnFullScreenChange = delegate (this, this.OnFullScreenChange);
this.MapProperties (["Background"]);
this.AfterConstructed ();
}
| 2 | 0.0625 | 2 | 0 |
d7bec3a786a1d9849168f7e95ce92a44c80da2cb | Controller/Controller.php | Controller/Controller.php | <?php
class Controller {
function view($file,$data=false){
require Views_DIR.$file.'.php';
}
}
?> | <?php
class Controller {
function view($file,$data=false){
header('X-Frame-Options:DENY');
require Views_DIR.$file.'.php';
}
}
?>
| Add X-Frame-Options header, requires review | Add X-Frame-Options header, requires review
| PHP | mit | mousems/NTUvote102-2,mousems/NTUvote102-2,mousems/NTUvote102-2,mousems/NTUvote102-2 | php | ## Code Before:
<?php
class Controller {
function view($file,$data=false){
require Views_DIR.$file.'.php';
}
}
?>
## Instruction:
Add X-Frame-Options header, requires review
## Code After:
<?php
class Controller {
function view($file,$data=false){
header('X-Frame-Options:DENY');
require Views_DIR.$file.'.php';
}
}
?>
| <?php
class Controller {
function view($file,$data=false){
+ header('X-Frame-Options:DENY');
require Views_DIR.$file.'.php';
}
}
?> | 1 | 0.142857 | 1 | 0 |
ccbceb486dd4775ec6dfe3764e522a869860703b | examples/rbd_fast/rbd_fast.py | examples/rbd_fast/rbd_fast.py | import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami.txt')
# Generate samples
param_values = latin.sample(problem, 1000)
# Run the "model" and save the output in a text file
# This will happen offline for external models
Y = Ishigami.evaluate(param_values)
# Perform the sensitivity analysis using the model output
# Specify which column of the output file to analyze (zero-indexed)
Si = rbd_fast.analyze(problem, param_values, Y, print_to_console=True)
# Returns a dictionary with keys 'S1' and 'ST'
# e.g. Si['S1'] contains the first-order index for each parameter, in the
# same order as the parameter file
| import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami.txt')
# Generate samples
param_values = latin.sample(problem, 1000)
# Run the "model" and save the output in a text file
# This will happen offline for external models
Y = Ishigami.evaluate(param_values)
# Perform the sensitivity analysis using the model output
# Specify which column of the output file to analyze (zero-indexed)
Si = rbd_fast.analyze(problem, param_values, Y, print_to_console=True)
# Returns a dictionary with key 'S1'
# e.g. Si['S1'] contains the first-order index for each parameter, in the
# same order as the parameter file
| Fix incorrect description of returned dict entries | Fix incorrect description of returned dict entries
| Python | mit | jdherman/SALib,SALib/SALib,jdherman/SALib | python | ## Code Before:
import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami.txt')
# Generate samples
param_values = latin.sample(problem, 1000)
# Run the "model" and save the output in a text file
# This will happen offline for external models
Y = Ishigami.evaluate(param_values)
# Perform the sensitivity analysis using the model output
# Specify which column of the output file to analyze (zero-indexed)
Si = rbd_fast.analyze(problem, param_values, Y, print_to_console=True)
# Returns a dictionary with keys 'S1' and 'ST'
# e.g. Si['S1'] contains the first-order index for each parameter, in the
# same order as the parameter file
## Instruction:
Fix incorrect description of returned dict entries
## Code After:
import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami.txt')
# Generate samples
param_values = latin.sample(problem, 1000)
# Run the "model" and save the output in a text file
# This will happen offline for external models
Y = Ishigami.evaluate(param_values)
# Perform the sensitivity analysis using the model output
# Specify which column of the output file to analyze (zero-indexed)
Si = rbd_fast.analyze(problem, param_values, Y, print_to_console=True)
# Returns a dictionary with key 'S1'
# e.g. Si['S1'] contains the first-order index for each parameter, in the
# same order as the parameter file
| import sys
sys.path.append('../..')
from SALib.analyze import rbd_fast
from SALib.sample import latin
from SALib.test_functions import Ishigami
from SALib.util import read_param_file
# Read the parameter range file and generate samples
problem = read_param_file('../../src/SALib/test_functions/params/Ishigami.txt')
# Generate samples
param_values = latin.sample(problem, 1000)
# Run the "model" and save the output in a text file
# This will happen offline for external models
Y = Ishigami.evaluate(param_values)
# Perform the sensitivity analysis using the model output
# Specify which column of the output file to analyze (zero-indexed)
Si = rbd_fast.analyze(problem, param_values, Y, print_to_console=True)
- # Returns a dictionary with keys 'S1' and 'ST'
? - ---------
+ # Returns a dictionary with key 'S1'
# e.g. Si['S1'] contains the first-order index for each parameter, in the
# same order as the parameter file | 2 | 0.083333 | 1 | 1 |
230db9787f644598930784db9f013bbde5ee68ad | .pullapprove.yml | .pullapprove.yml | approve_by_comment: true
approve_regex: '^([Aa]pproved|:\+1:|:shipit:|:ship: it|LGTM|:zap:|:boom:|:clap:|:bow:)'
reject_regex: '^([Nn]ope|[Nn]ope\.jpg|[Dd]enied|[Rr]ejected|:\-1:)'
reset_on_push: true
author_approval: default
reviewers:
required: 1
members:
- afanfa
- rouson
- zbeekman
| approve_by_comment: true
approve_regex: '^([Aa]pproved|:\+1:|:shipit:|:ship: it|LGTM|[Ll]ooks good to me|:zap:|:boom:|:clap:|:bow:)'
reject_regex: '^([Nn]ope|[Nn]ope\.jpg|[Dd]enied|[Rr]ejected|:\-1:)'
reset_on_push: true
author_approval: default
reviewers:
required: 1
members:
- afanfa
- rouson
- zbeekman
| Add long LGTM: [Ll]ooks good to me approve regexp | Add long LGTM: [Ll]ooks good to me approve regexp
| YAML | bsd-3-clause | sourceryinstitute/opencoarrays,zbeekman/opencoarrays,sourceryinstitute/opencoarrays,zbeekman/opencoarrays,sourceryinstitute/opencoarrays,jerryd/opencoarrays,jerryd/opencoarrays,zbeekman/opencoarrays,jerryd/opencoarrays | yaml | ## Code Before:
approve_by_comment: true
approve_regex: '^([Aa]pproved|:\+1:|:shipit:|:ship: it|LGTM|:zap:|:boom:|:clap:|:bow:)'
reject_regex: '^([Nn]ope|[Nn]ope\.jpg|[Dd]enied|[Rr]ejected|:\-1:)'
reset_on_push: true
author_approval: default
reviewers:
required: 1
members:
- afanfa
- rouson
- zbeekman
## Instruction:
Add long LGTM: [Ll]ooks good to me approve regexp
## Code After:
approve_by_comment: true
approve_regex: '^([Aa]pproved|:\+1:|:shipit:|:ship: it|LGTM|[Ll]ooks good to me|:zap:|:boom:|:clap:|:bow:)'
reject_regex: '^([Nn]ope|[Nn]ope\.jpg|[Dd]enied|[Rr]ejected|:\-1:)'
reset_on_push: true
author_approval: default
reviewers:
required: 1
members:
- afanfa
- rouson
- zbeekman
| approve_by_comment: true
- approve_regex: '^([Aa]pproved|:\+1:|:shipit:|:ship: it|LGTM|:zap:|:boom:|:clap:|:bow:)'
+ approve_regex: '^([Aa]pproved|:\+1:|:shipit:|:ship: it|LGTM|[Ll]ooks good to me|:zap:|:boom:|:clap:|:bow:)'
? ++++++++++++++++++++
reject_regex: '^([Nn]ope|[Nn]ope\.jpg|[Dd]enied|[Rr]ejected|:\-1:)'
reset_on_push: true
author_approval: default
reviewers:
required: 1
members:
- afanfa
- rouson
- zbeekman | 2 | 0.181818 | 1 | 1 |
0635d17d1aec0af212f43eb5aa91aa5663769b8e | project/scrape-summitpost-data/test/scrape_summitpost_data/extract_result_links_test.clj | project/scrape-summitpost-data/test/scrape_summitpost_data/extract_result_links_test.clj | (ns scrape-summitpost-data.extract-result-links-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest is]]
[scrape-summitpost-data.extract-result-links :as test-ns]))
(defn- make-test-page
[url]
(let [template "<table class='srch_results'>
<tbody>
<tr>
<td class='srch_results_lft'></td>
<td class='srch_results_rht'>
<a href='{}'></a>
</td>
</tr>
</tbody>
</table>"]
(string/replace template "{}" url)))
(deftest extract-result-links-test
(let [page (make-test-page "/test-item-name/12345")]
(is (= ["/test-item-name/12345"]
(test-ns/extract-result-links page))
"extracts link to item from search results table")))
| (ns scrape-summitpost-data.extract-result-links-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest is]]
[scrape-summitpost-data.extract-result-links :as test-ns]))
(defn- make-test-page
[urls]
(let [header "<table class='srch_results'>
<tbody>"
row-template "<tr>
<td class='srch_results_lft'></td>
<td class='srch_results_rht'>
<a href='{}'></a>
</td>
</tr>"
footer " </tbody>
</table>"
rows (mapv #(string/replace row-template "{}" %) urls)
page (conj (cons header rows) footer)]
(apply str page)))
(deftest extract-result-links-test
(let [urls ["/test1"]]
(is (= urls
(test-ns/extract-result-links (make-test-page urls)))
"extracts single link from search results table"))
(let [urls ["/test1" "/test2" "/test3"]]
(is (= urls
(test-ns/extract-result-links (make-test-page urls)))
"extracts multiple links from search results table")))
| Improve make-test-page to allow multiple urls and add multiple url test for extract-result-links. | Improve make-test-page to allow multiple urls and add multiple url test for extract-result-links.
| Clojure | mit | dylanfprice/stanfordml,dylanfprice/stanfordml | clojure | ## Code Before:
(ns scrape-summitpost-data.extract-result-links-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest is]]
[scrape-summitpost-data.extract-result-links :as test-ns]))
(defn- make-test-page
[url]
(let [template "<table class='srch_results'>
<tbody>
<tr>
<td class='srch_results_lft'></td>
<td class='srch_results_rht'>
<a href='{}'></a>
</td>
</tr>
</tbody>
</table>"]
(string/replace template "{}" url)))
(deftest extract-result-links-test
(let [page (make-test-page "/test-item-name/12345")]
(is (= ["/test-item-name/12345"]
(test-ns/extract-result-links page))
"extracts link to item from search results table")))
## Instruction:
Improve make-test-page to allow multiple urls and add multiple url test for extract-result-links.
## Code After:
(ns scrape-summitpost-data.extract-result-links-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest is]]
[scrape-summitpost-data.extract-result-links :as test-ns]))
(defn- make-test-page
[urls]
(let [header "<table class='srch_results'>
<tbody>"
row-template "<tr>
<td class='srch_results_lft'></td>
<td class='srch_results_rht'>
<a href='{}'></a>
</td>
</tr>"
footer " </tbody>
</table>"
rows (mapv #(string/replace row-template "{}" %) urls)
page (conj (cons header rows) footer)]
(apply str page)))
(deftest extract-result-links-test
(let [urls ["/test1"]]
(is (= urls
(test-ns/extract-result-links (make-test-page urls)))
"extracts single link from search results table"))
(let [urls ["/test1" "/test2" "/test3"]]
(is (= urls
(test-ns/extract-result-links (make-test-page urls)))
"extracts multiple links from search results table")))
| (ns scrape-summitpost-data.extract-result-links-test
(:require [clojure.string :as string]
[clojure.test :refer [deftest is]]
[scrape-summitpost-data.extract-result-links :as test-ns]))
(defn- make-test-page
- [url]
+ [urls]
? +
- (let [template "<table class='srch_results'>
? ^ --- ^
+ (let [header "<table class='srch_results'>
? ^ ^ +
- <tbody>
? --
+ <tbody>"
? +
- <tr>
+ row-template "<tr>
- <td class='srch_results_lft'></td>
+ <td class='srch_results_lft'></td>
? ++
- <td class='srch_results_rht'>
+ <td class='srch_results_rht'>
? ++
- <a href='{}'></a>
+ <a href='{}'></a>
? ++
- </td>
+ </td>
? ++
- </tr>
+ </tr>"
? ++ +
- </tbody>
+ footer " </tbody>
- </table>"]
? -- -
+ </table>"
- (string/replace template "{}" url)))
+ rows (mapv #(string/replace row-template "{}" %) urls)
+ page (conj (cons header rows) footer)]
+ (apply str page)))
(deftest extract-result-links-test
- (let [page (make-test-page "/test-item-name/12345")]
- (is (= ["/test-item-name/12345"]
+ (let [urls ["/test1"]]
+ (is (= urls
- (test-ns/extract-result-links page))
+ (test-ns/extract-result-links (make-test-page urls)))
? +++++++++++ +++++ +
- "extracts link to item from search results table")))
? -------- -
+ "extracts single link from search results table"))
? +++++++
+ (let [urls ["/test1" "/test2" "/test3"]]
+ (is (= urls
+ (test-ns/extract-result-links (make-test-page urls)))
+ "extracts multiple links from search results table"))) | 38 | 1.583333 | 22 | 16 |
2938a632b70d982d527122e6425ae0c300eeed9e | .travis.yml | .travis.yml | os:
- osx
- linux
sudo: false
language: go
go: 1.5.1
addons:
apt:
sources:
- deadsnakes
packages:
- libonig-dev
- python3.5
- python3.5-dev
install:
- ./tasks/general/ci/install.sh lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
| os:
- osx
- linux
sudo: false
language: go
go: 1.5.1
addons:
apt:
sources:
- deadsnakes
packages:
- libonig-dev
- python3.5
- python3.5-dev
- xsel
install:
- ./tasks/general/ci/install.sh lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
| Add xsel for clipboard support. | Add xsel for clipboard support.
| YAML | bsd-2-clause | limetext/lime-backend,limetext/lime-backend,limetext/backend,limetext/lime-backend,limetext/lime-backend | yaml | ## Code Before:
os:
- osx
- linux
sudo: false
language: go
go: 1.5.1
addons:
apt:
sources:
- deadsnakes
packages:
- libonig-dev
- python3.5
- python3.5-dev
install:
- ./tasks/general/ci/install.sh lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
## Instruction:
Add xsel for clipboard support.
## Code After:
os:
- osx
- linux
sudo: false
language: go
go: 1.5.1
addons:
apt:
sources:
- deadsnakes
packages:
- libonig-dev
- python3.5
- python3.5-dev
- xsel
install:
- ./tasks/general/ci/install.sh lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
| os:
- osx
- linux
sudo: false
language: go
go: 1.5.1
addons:
apt:
sources:
- deadsnakes
packages:
- libonig-dev
- python3.5
- python3.5-dev
+ - xsel
install:
- ./tasks/general/ci/install.sh lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false | 1 | 0.029412 | 1 | 0 |
f9057218de580d33bd10595583c80decfb71d4ef | Casks/jabref.rb | Casks/jabref.rb | cask 'jabref' do
version '2.10'
sha256 'c63a49e47a43bdb026dde7fb695210d9a3f8c0e71445af7d6736c5379b23baa2'
url "http://downloads.sourceforge.net/project/jabref/jabref/#{version}/JabRef-#{version}-OSX.zip"
name 'JabRef'
homepage 'http://jabref.sourceforge.net/'
license :gpl
app 'JabRef.app'
end
| cask 'jabref' do
version '3.2'
sha256 'ddde9938c3d5092ffe2ba2ecd127439de4ae304d783b5e33056951f449a185b5'
# sourceforge.net/project/jabref was verified as official when first introduced to the cask
url "http://downloads.sourceforge.net/project/jabref/v#{version}/JabRef_macos_#{version.dots_to_underscores}.dmg"
appcast 'https://github.com/JabRef/jabref/releases.atom',
checkpoint: '397228862c29af39b57e97e0a4337508d56fadd96289ecf54a8369955c9d2e21'
name 'JabRef'
homepage 'http://www.jabref.org/'
license :gpl
installer script: 'JabRef Installer.app/Contents/MacOS/JavaApplicationStub',
args: [
'-q',
'-VcreateDesktopLinkAction$Boolean=false',
'-VaddToDockAction$Boolean=false',
'-VshowFileAction$Boolean=false',
'-Vsys.installationDir=/Applications',
'-VexecutionLauncherAction$Boolean=false',
],
sudo: false
uninstall delete: '/Applications/JabRef.app'
end
| Update JabRef to version (3.2) | Update JabRef to version (3.2)
updated jabref (3.2)
Update JabRef (3.2) with comments modification
replace with #{version.dots_to_underscores} to convert version number
comments removed
| Ruby | bsd-2-clause | malford/homebrew-cask,FinalDes/homebrew-cask,seanzxx/homebrew-cask,hanxue/caskroom,mlocher/homebrew-cask,a1russell/homebrew-cask,My2ndAngelic/homebrew-cask,reitermarkus/homebrew-cask,mattrobenolt/homebrew-cask,markthetech/homebrew-cask,a1russell/homebrew-cask,wmorin/homebrew-cask,muan/homebrew-cask,cprecioso/homebrew-cask,lukasbestle/homebrew-cask,stephenwade/homebrew-cask,janlugt/homebrew-cask,pkq/homebrew-cask,feigaochn/homebrew-cask,esebastian/homebrew-cask,syscrusher/homebrew-cask,sscotth/homebrew-cask,danielbayley/homebrew-cask,vin047/homebrew-cask,boecko/homebrew-cask,ksato9700/homebrew-cask,rajiv/homebrew-cask,6uclz1/homebrew-cask,Ephemera/homebrew-cask,mikem/homebrew-cask,kTitan/homebrew-cask,gyndav/homebrew-cask,RJHsiao/homebrew-cask,kesara/homebrew-cask,mjgardner/homebrew-cask,thomanq/homebrew-cask,xight/homebrew-cask,exherb/homebrew-cask,shonjir/homebrew-cask,pkq/homebrew-cask,vigosan/homebrew-cask,alebcay/homebrew-cask,jellyfishcoder/homebrew-cask,ebraminio/homebrew-cask,robertgzr/homebrew-cask,afh/homebrew-cask,vitorgalvao/homebrew-cask,Ephemera/homebrew-cask,lantrix/homebrew-cask,nathanielvarona/homebrew-cask,koenrh/homebrew-cask,tjnycum/homebrew-cask,retrography/homebrew-cask,chadcatlett/caskroom-homebrew-cask,flaviocamilo/homebrew-cask,sanyer/homebrew-cask,joschi/homebrew-cask,devmynd/homebrew-cask,yuhki50/homebrew-cask,lucasmezencio/homebrew-cask,gilesdring/homebrew-cask,hristozov/homebrew-cask,antogg/homebrew-cask,chrisfinazzo/homebrew-cask,JacopKane/homebrew-cask,jalaziz/homebrew-cask,BenjaminHCCarr/homebrew-cask,perfide/homebrew-cask,haha1903/homebrew-cask,guerrero/homebrew-cask,sjackman/homebrew-cask,optikfluffel/homebrew-cask,ebraminio/homebrew-cask,jasmas/homebrew-cask,asbachb/homebrew-cask,hakamadare/homebrew-cask,Keloran/homebrew-cask,stigkj/homebrew-caskroom-cask,skatsuta/homebrew-cask,rajiv/homebrew-cask,pkq/homebrew-cask,gmkey/homebrew-cask,stephenwade/homebrew-cask,thii/homebrew-cask,yutarody/homebrew-cask,jasmas/homebrew-cask,winkelsdorf/homebrew-cask,andrewdisley/homebrew-cask,wmorin/homebrew-cask,optikfluffel/homebrew-cask,dcondrey/homebrew-cask,hakamadare/homebrew-cask,kamilboratynski/homebrew-cask,moimikey/homebrew-cask,lukeadams/homebrew-cask,nathanielvarona/homebrew-cask,rogeriopradoj/homebrew-cask,jangalinski/homebrew-cask,sgnh/homebrew-cask,okket/homebrew-cask,lantrix/homebrew-cask,joshka/homebrew-cask,yutarody/homebrew-cask,sanyer/homebrew-cask,onlynone/homebrew-cask,jbeagley52/homebrew-cask,cobyism/homebrew-cask,ywfwj2008/homebrew-cask,miccal/homebrew-cask,renard/homebrew-cask,andyli/homebrew-cask,shorshe/homebrew-cask,malford/homebrew-cask,greg5green/homebrew-cask,bosr/homebrew-cask,timsutton/homebrew-cask,codeurge/homebrew-cask,reitermarkus/homebrew-cask,hellosky806/homebrew-cask,nshemonsky/homebrew-cask,rogeriopradoj/homebrew-cask,mazehall/homebrew-cask,kpearson/homebrew-cask,JosephViolago/homebrew-cask,amatos/homebrew-cask,hyuna917/homebrew-cask,FredLackeyOfficial/homebrew-cask,diguage/homebrew-cask,blainesch/homebrew-cask,hovancik/homebrew-cask,mathbunnyru/homebrew-cask,seanorama/homebrew-cask,colindunn/homebrew-cask,seanzxx/homebrew-cask,mjgardner/homebrew-cask,xcezx/homebrew-cask,nathancahill/homebrew-cask,klane/homebrew-cask,13k/homebrew-cask,morganestes/homebrew-cask,greg5green/homebrew-cask,Bombenleger/homebrew-cask,mishari/homebrew-cask,otaran/homebrew-cask,jiashuw/homebrew-cask,tolbkni/homebrew-cask,kassi/homebrew-cask,wickles/homebrew-cask,Saklad5/homebrew-cask,claui/homebrew-cask,reelsense/homebrew-cask,tolbkni/homebrew-cask,cobyism/homebrew-cask,scribblemaniac/homebrew-cask,thii/homebrew-cask,mhubig/homebrew-cask,optikfluffel/homebrew-cask,shoichiaizawa/homebrew-cask,deanmorin/homebrew-cask,deiga/homebrew-cask,MircoT/homebrew-cask,gabrielizaias/homebrew-cask,paour/homebrew-cask,usami-k/homebrew-cask,kronicd/homebrew-cask,haha1903/homebrew-cask,jconley/homebrew-cask,schneidmaster/homebrew-cask,ianyh/homebrew-cask,dictcp/homebrew-cask,cprecioso/homebrew-cask,jmeridth/homebrew-cask,claui/homebrew-cask,elyscape/homebrew-cask,shoichiaizawa/homebrew-cask,athrunsun/homebrew-cask,nathanielvarona/homebrew-cask,morganestes/homebrew-cask,sanchezm/homebrew-cask,shorshe/homebrew-cask,dictcp/homebrew-cask,cblecker/homebrew-cask,jawshooah/homebrew-cask,sgnh/homebrew-cask,jawshooah/homebrew-cask,jeanregisser/homebrew-cask,larseggert/homebrew-cask,rogeriopradoj/homebrew-cask,tangestani/homebrew-cask,jpmat296/homebrew-cask,xyb/homebrew-cask,zmwangx/homebrew-cask,sscotth/homebrew-cask,gyndav/homebrew-cask,bosr/homebrew-cask,moimikey/homebrew-cask,0rax/homebrew-cask,kassi/homebrew-cask,troyxmccall/homebrew-cask,Keloran/homebrew-cask,inta/homebrew-cask,gyndav/homebrew-cask,jaredsampson/homebrew-cask,esebastian/homebrew-cask,mjgardner/homebrew-cask,elnappo/homebrew-cask,jmeridth/homebrew-cask,maxnordlund/homebrew-cask,seanorama/homebrew-cask,ninjahoahong/homebrew-cask,stigkj/homebrew-caskroom-cask,xtian/homebrew-cask,xakraz/homebrew-cask,kkdd/homebrew-cask,victorpopkov/homebrew-cask,gerrypower/homebrew-cask,amatos/homebrew-cask,artdevjs/homebrew-cask,cblecker/homebrew-cask,hristozov/homebrew-cask,mathbunnyru/homebrew-cask,janlugt/homebrew-cask,ywfwj2008/homebrew-cask,Ephemera/homebrew-cask,ericbn/homebrew-cask,alebcay/homebrew-cask,doits/homebrew-cask,malob/homebrew-cask,sscotth/homebrew-cask,renaudguerin/homebrew-cask,gabrielizaias/homebrew-cask,gilesdring/homebrew-cask,klane/homebrew-cask,chadcatlett/caskroom-homebrew-cask,puffdad/homebrew-cask,giannitm/homebrew-cask,mjdescy/homebrew-cask,adrianchia/homebrew-cask,xight/homebrew-cask,sanchezm/homebrew-cask,kpearson/homebrew-cask,mwean/homebrew-cask,thomanq/homebrew-cask,riyad/homebrew-cask,dcondrey/homebrew-cask,tjnycum/homebrew-cask,johnjelinek/homebrew-cask,goxberry/homebrew-cask,diogodamiani/homebrew-cask,cobyism/homebrew-cask,tjt263/homebrew-cask,guerrero/homebrew-cask,malob/homebrew-cask,muan/homebrew-cask,Ngrd/homebrew-cask,Labutin/homebrew-cask,caskroom/homebrew-cask,markhuber/homebrew-cask,KosherBacon/homebrew-cask,fanquake/homebrew-cask,exherb/homebrew-cask,xyb/homebrew-cask,adrianchia/homebrew-cask,mauricerkelly/homebrew-cask,kingthorin/homebrew-cask,Bombenleger/homebrew-cask,phpwutz/homebrew-cask,kesara/homebrew-cask,fanquake/homebrew-cask,jalaziz/homebrew-cask,moimikey/homebrew-cask,coeligena/homebrew-customized,zerrot/homebrew-cask,troyxmccall/homebrew-cask,mlocher/homebrew-cask,jedahan/homebrew-cask,athrunsun/homebrew-cask,patresi/homebrew-cask,timsutton/homebrew-cask,bric3/homebrew-cask,miguelfrde/homebrew-cask,forevergenin/homebrew-cask,MichaelPei/homebrew-cask,deiga/homebrew-cask,bcomnes/homebrew-cask,leipert/homebrew-cask,FranklinChen/homebrew-cask,dvdoliveira/homebrew-cask,pacav69/homebrew-cask,mattrobenolt/homebrew-cask,jaredsampson/homebrew-cask,JacopKane/homebrew-cask,cliffcotino/homebrew-cask,tyage/homebrew-cask,tan9/homebrew-cask,sjackman/homebrew-cask,ksylvan/homebrew-cask,deiga/homebrew-cask,mathbunnyru/homebrew-cask,psibre/homebrew-cask,n8henrie/homebrew-cask,johnjelinek/homebrew-cask,otaran/homebrew-cask,andyli/homebrew-cask,sosedoff/homebrew-cask,samdoran/homebrew-cask,colindean/homebrew-cask,moogar0880/homebrew-cask,aguynamedryan/homebrew-cask,adrianchia/homebrew-cask,julionc/homebrew-cask,lucasmezencio/homebrew-cask,mishari/homebrew-cask,y00rb/homebrew-cask,tan9/homebrew-cask,stephenwade/homebrew-cask,imgarylai/homebrew-cask,sohtsuka/homebrew-cask,Gasol/homebrew-cask,jgarber623/homebrew-cask,jeanregisser/homebrew-cask,vigosan/homebrew-cask,paour/homebrew-cask,fharbe/homebrew-cask,kronicd/homebrew-cask,riyad/homebrew-cask,MoOx/homebrew-cask,lumaxis/homebrew-cask,13k/homebrew-cask,jpmat296/homebrew-cask,alebcay/homebrew-cask,m3nu/homebrew-cask,cblecker/homebrew-cask,theoriginalgri/homebrew-cask,koenrh/homebrew-cask,phpwutz/homebrew-cask,jacobbednarz/homebrew-cask,samshadwell/homebrew-cask,tedski/homebrew-cask,yurikoles/homebrew-cask,diogodamiani/homebrew-cask,johndbritton/homebrew-cask,Gasol/homebrew-cask,maxnordlund/homebrew-cask,a1russell/homebrew-cask,pacav69/homebrew-cask,FranklinChen/homebrew-cask,perfide/homebrew-cask,singingwolfboy/homebrew-cask,psibre/homebrew-cask,diguage/homebrew-cask,casidiablo/homebrew-cask,FredLackeyOfficial/homebrew-cask,codeurge/homebrew-cask,winkelsdorf/homebrew-cask,kongslund/homebrew-cask,josa42/homebrew-cask,colindunn/homebrew-cask,xyb/homebrew-cask,samnung/homebrew-cask,elyscape/homebrew-cask,rajiv/homebrew-cask,scottsuch/homebrew-cask,zmwangx/homebrew-cask,robertgzr/homebrew-cask,neverfox/homebrew-cask,onlynone/homebrew-cask,fharbe/homebrew-cask,julionc/homebrew-cask,kingthorin/homebrew-cask,imgarylai/homebrew-cask,vin047/homebrew-cask,nrlquaker/homebrew-cask,kkdd/homebrew-cask,joshka/homebrew-cask,singingwolfboy/homebrew-cask,chuanxd/homebrew-cask,JacopKane/homebrew-cask,chuanxd/homebrew-cask,decrement/homebrew-cask,vitorgalvao/homebrew-cask,colindean/homebrew-cask,daften/homebrew-cask,nrlquaker/homebrew-cask,ianyh/homebrew-cask,andrewdisley/homebrew-cask,patresi/homebrew-cask,lumaxis/homebrew-cask,squid314/homebrew-cask,jgarber623/homebrew-cask,wastrachan/homebrew-cask,hyuna917/homebrew-cask,kongslund/homebrew-cask,goxberry/homebrew-cask,mchlrmrz/homebrew-cask,asins/homebrew-cask,afh/homebrew-cask,MoOx/homebrew-cask,slack4u/homebrew-cask,yurikoles/homebrew-cask,hanxue/caskroom,scribblemaniac/homebrew-cask,opsdev-ws/homebrew-cask,anbotero/homebrew-cask,xcezx/homebrew-cask,anbotero/homebrew-cask,sanyer/homebrew-cask,ksato9700/homebrew-cask,inz/homebrew-cask,syscrusher/homebrew-cask,n8henrie/homebrew-cask,joschi/homebrew-cask,forevergenin/homebrew-cask,BenjaminHCCarr/homebrew-cask,usami-k/homebrew-cask,paour/homebrew-cask,victorpopkov/homebrew-cask,y00rb/homebrew-cask,moogar0880/homebrew-cask,blainesch/homebrew-cask,linc01n/homebrew-cask,yumitsu/homebrew-cask,lifepillar/homebrew-cask,renaudguerin/homebrew-cask,Labutin/homebrew-cask,reitermarkus/homebrew-cask,MerelyAPseudonym/homebrew-cask,miguelfrde/homebrew-cask,inz/homebrew-cask,jeroenj/homebrew-cask,leipert/homebrew-cask,joschi/homebrew-cask,shoichiaizawa/homebrew-cask,imgarylai/homebrew-cask,yutarody/homebrew-cask,xight/homebrew-cask,alexg0/homebrew-cask,uetchy/homebrew-cask,kteru/homebrew-cask,Amorymeltzer/homebrew-cask,julionc/homebrew-cask,howie/homebrew-cask,Cottser/homebrew-cask,yurikoles/homebrew-cask,scottsuch/homebrew-cask,jangalinski/homebrew-cask,wmorin/homebrew-cask,SentinelWarren/homebrew-cask,neverfox/homebrew-cask,wickles/homebrew-cask,mazehall/homebrew-cask,jacobbednarz/homebrew-cask,jalaziz/homebrew-cask,jgarber623/homebrew-cask,kTitan/homebrew-cask,sohtsuka/homebrew-cask,mchlrmrz/homebrew-cask,0xadada/homebrew-cask,claui/homebrew-cask,uetchy/homebrew-cask,jbeagley52/homebrew-cask,wKovacs64/homebrew-cask,0rax/homebrew-cask,ninjahoahong/homebrew-cask,joshka/homebrew-cask,bric3/homebrew-cask,My2ndAngelic/homebrew-cask,RJHsiao/homebrew-cask,tyage/homebrew-cask,Ngrd/homebrew-cask,miccal/homebrew-cask,josa42/homebrew-cask,tangestani/homebrew-cask,stonehippo/homebrew-cask,stonehippo/homebrew-cask,asins/homebrew-cask,samdoran/homebrew-cask,MerelyAPseudonym/homebrew-cask,deanmorin/homebrew-cask,mattrobenolt/homebrew-cask,devmynd/homebrew-cask,blogabe/homebrew-cask,antogg/homebrew-cask,lcasey001/homebrew-cask,wastrachan/homebrew-cask,franklouwers/homebrew-cask,franklouwers/homebrew-cask,MichaelPei/homebrew-cask,gerrypower/homebrew-cask,renard/homebrew-cask,wKovacs64/homebrew-cask,farmerchris/homebrew-cask,ericbn/homebrew-cask,arronmabrey/homebrew-cask,michelegera/homebrew-cask,puffdad/homebrew-cask,lifepillar/homebrew-cask,cliffcotino/homebrew-cask,wickedsp1d3r/homebrew-cask,opsdev-ws/homebrew-cask,larseggert/homebrew-cask,neverfox/homebrew-cask,mwean/homebrew-cask,cfillion/homebrew-cask,casidiablo/homebrew-cask,tsparber/homebrew-cask,winkelsdorf/homebrew-cask,mrmachine/homebrew-cask,yuhki50/homebrew-cask,ericbn/homebrew-cask,6uclz1/homebrew-cask,jeroenj/homebrew-cask,xtian/homebrew-cask,asbachb/homebrew-cask,mhubig/homebrew-cask,toonetown/homebrew-cask,howie/homebrew-cask,MircoT/homebrew-cask,reelsense/homebrew-cask,jedahan/homebrew-cask,nathancahill/homebrew-cask,ptb/homebrew-cask,singingwolfboy/homebrew-cask,tangestani/homebrew-cask,skatsuta/homebrew-cask,malob/homebrew-cask,JosephViolago/homebrew-cask,decrement/homebrew-cask,danielbayley/homebrew-cask,tjnycum/homebrew-cask,michelegera/homebrew-cask,danielbayley/homebrew-cask,toonetown/homebrew-cask,daften/homebrew-cask,tsparber/homebrew-cask,caskroom/homebrew-cask,ptb/homebrew-cask,theoriginalgri/homebrew-cask,mchlrmrz/homebrew-cask,inta/homebrew-cask,alexg0/homebrew-cask,sosedoff/homebrew-cask,flaviocamilo/homebrew-cask,josa42/homebrew-cask,KosherBacon/homebrew-cask,markhuber/homebrew-cask,alexg0/homebrew-cask,jellyfishcoder/homebrew-cask,AnastasiaSulyagina/homebrew-cask,Cottser/homebrew-cask,n0ts/homebrew-cask,sebcode/homebrew-cask,giannitm/homebrew-cask,feigaochn/homebrew-cask,m3nu/homebrew-cask,okket/homebrew-cask,gmkey/homebrew-cask,coeligena/homebrew-customized,coeligena/homebrew-customized,blogabe/homebrew-cask,Amorymeltzer/homebrew-cask,jiashuw/homebrew-cask,chrisfinazzo/homebrew-cask,hellosky806/homebrew-cask,lcasey001/homebrew-cask,chrisfinazzo/homebrew-cask,sebcode/homebrew-cask,timsutton/homebrew-cask,squid314/homebrew-cask,kingthorin/homebrew-cask,mjdescy/homebrew-cask,bric3/homebrew-cask,mikem/homebrew-cask,m3nu/homebrew-cask,arronmabrey/homebrew-cask,aguynamedryan/homebrew-cask,tjt263/homebrew-cask,JosephViolago/homebrew-cask,johndbritton/homebrew-cask,scribblemaniac/homebrew-cask,mahori/homebrew-cask,retrography/homebrew-cask,stonehippo/homebrew-cask,samshadwell/homebrew-cask,jconley/homebrew-cask,n0ts/homebrew-cask,FinalDes/homebrew-cask,shonjir/homebrew-cask,linc01n/homebrew-cask,cfillion/homebrew-cask,antogg/homebrew-cask,thehunmonkgroup/homebrew-cask,doits/homebrew-cask,artdevjs/homebrew-cask,lukeadams/homebrew-cask,samnung/homebrew-cask,nrlquaker/homebrew-cask,lukasbestle/homebrew-cask,thehunmonkgroup/homebrew-cask,zerrot/homebrew-cask,dictcp/homebrew-cask,blogabe/homebrew-cask,yumitsu/homebrew-cask,mahori/homebrew-cask,SentinelWarren/homebrew-cask,mauricerkelly/homebrew-cask,bdhess/homebrew-cask,scottsuch/homebrew-cask,shonjir/homebrew-cask,Saklad5/homebrew-cask,andrewdisley/homebrew-cask,Ketouem/homebrew-cask,kesara/homebrew-cask,tedski/homebrew-cask,markthetech/homebrew-cask,mrmachine/homebrew-cask,0xadada/homebrew-cask,JikkuJose/homebrew-cask,bcomnes/homebrew-cask,elnappo/homebrew-cask,JikkuJose/homebrew-cask,farmerchris/homebrew-cask,Ketouem/homebrew-cask,kteru/homebrew-cask,nshemonsky/homebrew-cask,uetchy/homebrew-cask,esebastian/homebrew-cask,kamilboratynski/homebrew-cask,miccal/homebrew-cask,ksylvan/homebrew-cask,mahori/homebrew-cask,Amorymeltzer/homebrew-cask,bdhess/homebrew-cask,slack4u/homebrew-cask,hanxue/caskroom,boecko/homebrew-cask,hovancik/homebrew-cask,wickedsp1d3r/homebrew-cask,dvdoliveira/homebrew-cask,BenjaminHCCarr/homebrew-cask,schneidmaster/homebrew-cask,xakraz/homebrew-cask,AnastasiaSulyagina/homebrew-cask | ruby | ## Code Before:
cask 'jabref' do
version '2.10'
sha256 'c63a49e47a43bdb026dde7fb695210d9a3f8c0e71445af7d6736c5379b23baa2'
url "http://downloads.sourceforge.net/project/jabref/jabref/#{version}/JabRef-#{version}-OSX.zip"
name 'JabRef'
homepage 'http://jabref.sourceforge.net/'
license :gpl
app 'JabRef.app'
end
## Instruction:
Update JabRef to version (3.2)
updated jabref (3.2)
Update JabRef (3.2) with comments modification
replace with #{version.dots_to_underscores} to convert version number
comments removed
## Code After:
cask 'jabref' do
version '3.2'
sha256 'ddde9938c3d5092ffe2ba2ecd127439de4ae304d783b5e33056951f449a185b5'
# sourceforge.net/project/jabref was verified as official when first introduced to the cask
url "http://downloads.sourceforge.net/project/jabref/v#{version}/JabRef_macos_#{version.dots_to_underscores}.dmg"
appcast 'https://github.com/JabRef/jabref/releases.atom',
checkpoint: '397228862c29af39b57e97e0a4337508d56fadd96289ecf54a8369955c9d2e21'
name 'JabRef'
homepage 'http://www.jabref.org/'
license :gpl
installer script: 'JabRef Installer.app/Contents/MacOS/JavaApplicationStub',
args: [
'-q',
'-VcreateDesktopLinkAction$Boolean=false',
'-VaddToDockAction$Boolean=false',
'-VshowFileAction$Boolean=false',
'-Vsys.installationDir=/Applications',
'-VexecutionLauncherAction$Boolean=false',
],
sudo: false
uninstall delete: '/Applications/JabRef.app'
end
| cask 'jabref' do
- version '2.10'
? ---
+ version '3.2'
? ++
- sha256 'c63a49e47a43bdb026dde7fb695210d9a3f8c0e71445af7d6736c5379b23baa2'
+ sha256 'ddde9938c3d5092ffe2ba2ecd127439de4ae304d783b5e33056951f449a185b5'
+ # sourceforge.net/project/jabref was verified as official when first introduced to the cask
- url "http://downloads.sourceforge.net/project/jabref/jabref/#{version}/JabRef-#{version}-OSX.zip"
? ^^^^^^^ ^ ---- ^^^
+ url "http://downloads.sourceforge.net/project/jabref/v#{version}/JabRef_macos_#{version.dots_to_underscores}.dmg"
? ^ ^^^^^^^ ++++++++++++++++++++ ^^^
+ appcast 'https://github.com/JabRef/jabref/releases.atom',
+ checkpoint: '397228862c29af39b57e97e0a4337508d56fadd96289ecf54a8369955c9d2e21'
name 'JabRef'
- homepage 'http://jabref.sourceforge.net/'
? ------- -----
+ homepage 'http://www.jabref.org/'
? ++++
license :gpl
- app 'JabRef.app'
+ installer script: 'JabRef Installer.app/Contents/MacOS/JavaApplicationStub',
+ args: [
+ '-q',
+ '-VcreateDesktopLinkAction$Boolean=false',
+ '-VaddToDockAction$Boolean=false',
+ '-VshowFileAction$Boolean=false',
+ '-Vsys.installationDir=/Applications',
+ '-VexecutionLauncherAction$Boolean=false',
+ ],
+ sudo: false
+
+ uninstall delete: '/Applications/JabRef.app'
end | 24 | 2.181818 | 19 | 5 |
de5e7ce49318d14ab907461000730835a58273ae | app/components/header-component.js | app/components/header-component.js | import Ember from "ember";
import config from '../config/environment';
export default Ember.Component.extend({
didInsertElement: function() {
this._super();
this.set("error_message", undefined);
this.resizeBody();
var self = this;
Ember.$(window).on("window:resize", function() {
self.resizeBody();
});
},
actions: {
logout: function() {
Ember.$.ajax({
url: config.API_LOC + "/logout",
data: {},
contentType: "application/json",
type: 'GET'
});
this.get('session').invalidate();
}
},
resizeBody: function() {
if(this.get("session.current_user.admin")) {
console.log("Admin!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height() + 150);
}
else {
console.log("User!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height()+30);
}
}.observes("session.current_user.admin")
});
| import Ember from "ember";
import config from '../config/environment';
export default Ember.Component.extend({
didInsertElement: function() {
this._super();
this.set("error_message", undefined);
this.resizeBody();
var self = this;
Ember.$(window).on("window:resize", function() {
self.resizeBody();
});
},
actions: {
logout: function() {
var self = this;
Ember.$.ajax({
url: config.API_LOC + "/logout",
data: {},
contentType: "application/json",
type: 'GET',
success: function() {
self.get("session").invalidate();
},
error: function() {
self.get("session").invalidate();
}
});
}
},
resizeBody: function() {
if(this.get("session.current_user.admin")) {
console.log("Admin!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height() + 150);
}
else {
console.log("User!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height()+30);
}
}.observes("session.current_user.admin")
});
| Change sending of the logout request | Change sending of the logout request
| JavaScript | mit | fi-ksi/web-frontend,fi-ksi/web-frontend,fi-ksi/web-frontend | javascript | ## Code Before:
import Ember from "ember";
import config from '../config/environment';
export default Ember.Component.extend({
didInsertElement: function() {
this._super();
this.set("error_message", undefined);
this.resizeBody();
var self = this;
Ember.$(window).on("window:resize", function() {
self.resizeBody();
});
},
actions: {
logout: function() {
Ember.$.ajax({
url: config.API_LOC + "/logout",
data: {},
contentType: "application/json",
type: 'GET'
});
this.get('session').invalidate();
}
},
resizeBody: function() {
if(this.get("session.current_user.admin")) {
console.log("Admin!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height() + 150);
}
else {
console.log("User!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height()+30);
}
}.observes("session.current_user.admin")
});
## Instruction:
Change sending of the logout request
## Code After:
import Ember from "ember";
import config from '../config/environment';
export default Ember.Component.extend({
didInsertElement: function() {
this._super();
this.set("error_message", undefined);
this.resizeBody();
var self = this;
Ember.$(window).on("window:resize", function() {
self.resizeBody();
});
},
actions: {
logout: function() {
var self = this;
Ember.$.ajax({
url: config.API_LOC + "/logout",
data: {},
contentType: "application/json",
type: 'GET',
success: function() {
self.get("session").invalidate();
},
error: function() {
self.get("session").invalidate();
}
});
}
},
resizeBody: function() {
if(this.get("session.current_user.admin")) {
console.log("Admin!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height() + 150);
}
else {
console.log("User!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height()+30);
}
}.observes("session.current_user.admin")
});
| import Ember from "ember";
import config from '../config/environment';
export default Ember.Component.extend({
didInsertElement: function() {
this._super();
this.set("error_message", undefined);
this.resizeBody();
var self = this;
Ember.$(window).on("window:resize", function() {
self.resizeBody();
});
},
actions: {
logout: function() {
+ var self = this;
Ember.$.ajax({
url: config.API_LOC + "/logout",
data: {},
contentType: "application/json",
- type: 'GET'
+ type: 'GET',
? +
+ success: function() {
+ self.get("session").invalidate();
+ },
+ error: function() {
+ self.get("session").invalidate();
+ }
});
- this.get('session').invalidate();
}
},
resizeBody: function() {
if(this.get("session.current_user.admin")) {
console.log("Admin!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height() + 150);
}
else {
console.log("User!");
Ember.$('body').css("padding-top", Ember.$("#navbar").height()+30);
}
}.observes("session.current_user.admin")
}); | 10 | 0.285714 | 8 | 2 |
afcc7ee28618c163fc29468cd255b78be40cc974 | deploy.sh | deploy.sh | BRANCH=master
TARGET_REPO=diana-hep/diana-hep.github.io.git
PELICAN_OUTPUT_FOLDER=output
echo -e "Testing travis-encrypt"
echo -e "$VARNAME"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo -e "Starting to deploy to Github Pages\n"
if [ "$TRAVIS" == "true" ]; then
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
fi
#using token clone gh-pages branch
git clone --quiet --branch=$BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO built_website > /dev/null
#go into directory and copy data we're interested in to that directory
cd built_website
rsync -rv --exclude=.git ../$PELICAN_OUTPUT_FOLDER/* .
#add, commit and push files
git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to Github Pages"
git push -fq origin $BRANCH > /dev/null
echo -e "Deploy completed\n"
fi | BRANCH=master
TARGET_REPO=s2i2-hep/s2i2-hep.github.io.git
PELICAN_OUTPUT_FOLDER=output
echo -e "Testing travis-encrypt"
echo -e "$VARNAME"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo -e "Starting to deploy to Github Pages\n"
if [ "$TRAVIS" == "true" ]; then
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
fi
#using token clone gh-pages branch
git clone --quiet --branch=$BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO built_website > /dev/null
#go into directory and copy data we're interested in to that directory
cd built_website
rsync -rv --exclude=.git ../$PELICAN_OUTPUT_FOLDER/* .
#add, commit and push files
git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to Github Pages"
git push -fq origin $BRANCH > /dev/null
echo -e "Deploy completed\n"
fi
| Switch from diana-hep to s2i2-hep | Switch from diana-hep to s2i2-hep
| Shell | mit | s2i2-hep/s2i2-hep.github.io-source,s2i2-hep/s2i2-hep.github.io-source,s2i2-hep/s2i2-hep.github.io-source | shell | ## Code Before:
BRANCH=master
TARGET_REPO=diana-hep/diana-hep.github.io.git
PELICAN_OUTPUT_FOLDER=output
echo -e "Testing travis-encrypt"
echo -e "$VARNAME"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo -e "Starting to deploy to Github Pages\n"
if [ "$TRAVIS" == "true" ]; then
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
fi
#using token clone gh-pages branch
git clone --quiet --branch=$BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO built_website > /dev/null
#go into directory and copy data we're interested in to that directory
cd built_website
rsync -rv --exclude=.git ../$PELICAN_OUTPUT_FOLDER/* .
#add, commit and push files
git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to Github Pages"
git push -fq origin $BRANCH > /dev/null
echo -e "Deploy completed\n"
fi
## Instruction:
Switch from diana-hep to s2i2-hep
## Code After:
BRANCH=master
TARGET_REPO=s2i2-hep/s2i2-hep.github.io.git
PELICAN_OUTPUT_FOLDER=output
echo -e "Testing travis-encrypt"
echo -e "$VARNAME"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo -e "Starting to deploy to Github Pages\n"
if [ "$TRAVIS" == "true" ]; then
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
fi
#using token clone gh-pages branch
git clone --quiet --branch=$BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO built_website > /dev/null
#go into directory and copy data we're interested in to that directory
cd built_website
rsync -rv --exclude=.git ../$PELICAN_OUTPUT_FOLDER/* .
#add, commit and push files
git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to Github Pages"
git push -fq origin $BRANCH > /dev/null
echo -e "Deploy completed\n"
fi
| BRANCH=master
- TARGET_REPO=diana-hep/diana-hep.github.io.git
? ^ ^^^ ^ ^^^
+ TARGET_REPO=s2i2-hep/s2i2-hep.github.io.git
? ^^ ^ ^^ ^
PELICAN_OUTPUT_FOLDER=output
echo -e "Testing travis-encrypt"
echo -e "$VARNAME"
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo -e "Starting to deploy to Github Pages\n"
if [ "$TRAVIS" == "true" ]; then
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis"
fi
#using token clone gh-pages branch
git clone --quiet --branch=$BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO built_website > /dev/null
#go into directory and copy data we're interested in to that directory
cd built_website
rsync -rv --exclude=.git ../$PELICAN_OUTPUT_FOLDER/* .
#add, commit and push files
git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to Github Pages"
git push -fq origin $BRANCH > /dev/null
echo -e "Deploy completed\n"
fi | 2 | 0.083333 | 1 | 1 |
6ac071ba47112f79b5e08b4cc5f69c1d039c494f | README.md | README.md | zippr
=====
A PHP class for handeling zip files. The class abstracts the ZipArchive class.
Current support:
- Add file to archive
- Add directory to archive
- Add comment to archive
- Extract an archive
UPDATED
-------
Zip is now called Zippr and carries version number 1.0.
This major update has the following updates
- PSR-0 standard for namespacing
- Error handling using PHP Exception class
- Bug fixes on addDir method
- extractArchive has become a static function
- Dependencies are checked in a seperate method
INSTALL
------
Add the next line to the require section in your composer.json file
"barry127/zippr": "1.*" | zippr
=====
A PHP class for handeling zip files. The class abstracts the ZipArchive class.
Current support:
- Add file to archive
- Add directory to archive
- Add comment to archive
- Extract an archive
Complete documentation can be found at [zippr.barrydekleijn.nl](http://zippr.barrydekleijn.nl)
UPDATED
-------
Zip is now called Zippr and carries version number 1.0.
This major update has the following updates
- PSR-0 standard for namespacing
- Error handling using PHP Exception class
- Bug fixes on addDir method
- extractArchive has become a static function
- Dependencies are checked in a seperate method
INSTALL
------
Add the next line to the require section in your composer.json file
"barry127/zippr": "1.*" | Add website link to readme | Add website link to readme
| Markdown | mit | Barry127/Zippr | markdown | ## Code Before:
zippr
=====
A PHP class for handeling zip files. The class abstracts the ZipArchive class.
Current support:
- Add file to archive
- Add directory to archive
- Add comment to archive
- Extract an archive
UPDATED
-------
Zip is now called Zippr and carries version number 1.0.
This major update has the following updates
- PSR-0 standard for namespacing
- Error handling using PHP Exception class
- Bug fixes on addDir method
- extractArchive has become a static function
- Dependencies are checked in a seperate method
INSTALL
------
Add the next line to the require section in your composer.json file
"barry127/zippr": "1.*"
## Instruction:
Add website link to readme
## Code After:
zippr
=====
A PHP class for handeling zip files. The class abstracts the ZipArchive class.
Current support:
- Add file to archive
- Add directory to archive
- Add comment to archive
- Extract an archive
Complete documentation can be found at [zippr.barrydekleijn.nl](http://zippr.barrydekleijn.nl)
UPDATED
-------
Zip is now called Zippr and carries version number 1.0.
This major update has the following updates
- PSR-0 standard for namespacing
- Error handling using PHP Exception class
- Bug fixes on addDir method
- extractArchive has become a static function
- Dependencies are checked in a seperate method
INSTALL
------
Add the next line to the require section in your composer.json file
"barry127/zippr": "1.*" | zippr
=====
A PHP class for handeling zip files. The class abstracts the ZipArchive class.
Current support:
- Add file to archive
- Add directory to archive
- Add comment to archive
- Extract an archive
+
+ Complete documentation can be found at [zippr.barrydekleijn.nl](http://zippr.barrydekleijn.nl)
UPDATED
-------
Zip is now called Zippr and carries version number 1.0.
This major update has the following updates
- PSR-0 standard for namespacing
- Error handling using PHP Exception class
- Bug fixes on addDir method
- extractArchive has become a static function
- Dependencies are checked in a seperate method
INSTALL
------
Add the next line to the require section in your composer.json file
"barry127/zippr": "1.*" | 2 | 0.0625 | 2 | 0 |
cfb9bb925802c3d902325e4046081ab1df37d32a | fish-shell/tasks/main.yml | fish-shell/tasks/main.yml | ---
- name: install fish shell
package:
name: fish
state: head
- name: set fish as one of bashes
command: "echo '/usr/local/bin/fish' | sudo tee -a /etc/shells"
become: true
- name: Set fish as default shell
user: name={{ user }} shell=/usr/local/bin/fish
| ---
- name: install fish shell
package:
name: fish
state: head
- name: set fish as one of bashes
command: "echo '/usr/local/bin/fish' | sudo tee -a /etc/shells"
become: true
when: ansible_os_family == "Darwin"
- name: get fish location
shell: which fish
register: fish_location
- name: Set fish as default shell
user: name={{ user }} shell={{ fish_location.stdout }}
| Set fish shell install to be OS agnostic | Set fish shell install to be OS agnostic
| YAML | mit | celsocrivelaro/mac_setup | yaml | ## Code Before:
---
- name: install fish shell
package:
name: fish
state: head
- name: set fish as one of bashes
command: "echo '/usr/local/bin/fish' | sudo tee -a /etc/shells"
become: true
- name: Set fish as default shell
user: name={{ user }} shell=/usr/local/bin/fish
## Instruction:
Set fish shell install to be OS agnostic
## Code After:
---
- name: install fish shell
package:
name: fish
state: head
- name: set fish as one of bashes
command: "echo '/usr/local/bin/fish' | sudo tee -a /etc/shells"
become: true
when: ansible_os_family == "Darwin"
- name: get fish location
shell: which fish
register: fish_location
- name: Set fish as default shell
user: name={{ user }} shell={{ fish_location.stdout }}
| ---
- name: install fish shell
package:
name: fish
state: head
- name: set fish as one of bashes
command: "echo '/usr/local/bin/fish' | sudo tee -a /etc/shells"
become: true
+ when: ansible_os_family == "Darwin"
+
+ - name: get fish location
+ shell: which fish
+ register: fish_location
- name: Set fish as default shell
- user: name={{ user }} shell=/usr/local/bin/fish
+ user: name={{ user }} shell={{ fish_location.stdout }} | 7 | 0.583333 | 6 | 1 |
98f5708022efc55baca5efd56b829d524d702c9e | .travis.yml | .travis.yml | language: elixir
elixir:
- 1.5.2
- 1.4.5
- 1.3.4
- 1.2.6
otp_release:
- 20.1
- 19.3
- 18.3
branches:
only:
- master
script:
- SIPHASH_IMPL=native mix test --trace
- SIPHASH_IMPL=embedded mix test --trace
after_success:
- SIPHASH_IMPL=embedded mix coveralls.travis
| language: elixir
elixir:
- 1.5.2
- 1.4.5
- 1.3.4
- 1.2.6
otp_release:
- 20.1
- 19.3
- 18.3
matrix:
exclude:
- elixir: 1.3.4
otp_release: 20.1
- elixir: 1.2.6
otp_release: 20.1
branches:
only:
- master
before_install:
- mix local.rebar --force
script:
- SIPHASH_IMPL=native mix test --trace
- SIPHASH_IMPL=embedded mix test --trace
after_success:
- SIPHASH_IMPL=embedded mix coveralls.travis
| Remove some invalid matrix builds | Remove some invalid matrix builds
| YAML | mit | zackehh/siphash-elixir,zackehh/siphash-elixir | yaml | ## Code Before:
language: elixir
elixir:
- 1.5.2
- 1.4.5
- 1.3.4
- 1.2.6
otp_release:
- 20.1
- 19.3
- 18.3
branches:
only:
- master
script:
- SIPHASH_IMPL=native mix test --trace
- SIPHASH_IMPL=embedded mix test --trace
after_success:
- SIPHASH_IMPL=embedded mix coveralls.travis
## Instruction:
Remove some invalid matrix builds
## Code After:
language: elixir
elixir:
- 1.5.2
- 1.4.5
- 1.3.4
- 1.2.6
otp_release:
- 20.1
- 19.3
- 18.3
matrix:
exclude:
- elixir: 1.3.4
otp_release: 20.1
- elixir: 1.2.6
otp_release: 20.1
branches:
only:
- master
before_install:
- mix local.rebar --force
script:
- SIPHASH_IMPL=native mix test --trace
- SIPHASH_IMPL=embedded mix test --trace
after_success:
- SIPHASH_IMPL=embedded mix coveralls.travis
| language: elixir
elixir:
- 1.5.2
- 1.4.5
- 1.3.4
- 1.2.6
otp_release:
- 20.1
- 19.3
- 18.3
+ matrix:
+ exclude:
+ - elixir: 1.3.4
+ otp_release: 20.1
+ - elixir: 1.2.6
+ otp_release: 20.1
branches:
only:
- master
+ before_install:
+ - mix local.rebar --force
script:
- SIPHASH_IMPL=native mix test --trace
- SIPHASH_IMPL=embedded mix test --trace
after_success:
- SIPHASH_IMPL=embedded mix coveralls.travis | 8 | 0.444444 | 8 | 0 |
390fa07c191d79290b1ef83c268f38431f68093a | tests/clients/simple.py | tests/clients/simple.py |
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
|
import os
import sys
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
| Fix import in test client. | Fix import in test client.
| Python | mit | riga/jsonrpyc | python | ## Code Before:
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
## Instruction:
Fix import in test client.
## Code After:
import os
import sys
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass())
|
+
+ import os
+ import sys
+
+ base = os.path.dirname(os.path.abspath(__file__))
+ sys.path.append(base)
from base import jsonrpyc
class MyClass(object):
def one(self):
return 1
def twice(self, n):
return n * 2
def arglen(self, *args, **kwargs):
return len(args) + len(kwargs)
if __name__ == "__main__":
rpc = jsonrpyc.RPC(MyClass()) | 6 | 0.315789 | 6 | 0 |
af3a6268f163fb94263607a49363ee35e5df9332 | quickgo-solr-indexing/src/main/java/uk/ac/ebi/quickgo/indexer/QuickGOIndexerProcess.java | quickgo-solr-indexing/src/main/java/uk/ac/ebi/quickgo/indexer/QuickGOIndexerProcess.java | package uk.ac.ebi.quickgo.indexer;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Process to index all the information in Solr
*
* @author cbonill
*
*/
public class QuickGOIndexerProcess {
static ApplicationContext appContext;
static QuickGOIndexer quickGOIndexer;
/**
* We can use this method for indexing the data in Solr for the moment
*
* @param args
*/
public static void main(String[] args) {
appContext = new ClassPathXmlApplicationContext("common-beans.xml", "indexing-beans.xml", "query-beans.xml");
quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
String start = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
System.out.println("STARTED: " + start);
quickGOIndexer.index();
String end = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
System.out.println("DONE: " + end);
}
}
| package uk.ac.ebi.quickgo.indexer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Process to index all the information in Solr
*
* @author cbonill
*
*/
public class QuickGOIndexerProcess {
static ApplicationContext appContext;
static QuickGOIndexer quickGOIndexer;
/**
* We can use this method for indexing the data in Solr for the moment
*
* @param args
*/
public static void main(String[] args) {
appContext = new ClassPathXmlApplicationContext("common-beans.xml", "indexing-beans.xml", "query-beans.xml");
quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
String start = DateFormat.getInstance().format(Calendar.getInstance().getTime());
System.out.println("================================================================");
System.out.println("STARTED: " + start);
System.out.println("================================================================");
quickGOIndexer.index();
System.out.println("================================================================");
System.out.println("DONE: " + DateFormat.getInstance().format(Calendar.getInstance().getTime()));
System.out.println("================================================================");
}
}
| Improve the formatting of the output to stdout. | Improve the formatting of the output to stdout. | Java | apache-2.0 | ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE | java | ## Code Before:
package uk.ac.ebi.quickgo.indexer;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Process to index all the information in Solr
*
* @author cbonill
*
*/
public class QuickGOIndexerProcess {
static ApplicationContext appContext;
static QuickGOIndexer quickGOIndexer;
/**
* We can use this method for indexing the data in Solr for the moment
*
* @param args
*/
public static void main(String[] args) {
appContext = new ClassPathXmlApplicationContext("common-beans.xml", "indexing-beans.xml", "query-beans.xml");
quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
String start = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
System.out.println("STARTED: " + start);
quickGOIndexer.index();
String end = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
System.out.println("DONE: " + end);
}
}
## Instruction:
Improve the formatting of the output to stdout.
## Code After:
package uk.ac.ebi.quickgo.indexer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Process to index all the information in Solr
*
* @author cbonill
*
*/
public class QuickGOIndexerProcess {
static ApplicationContext appContext;
static QuickGOIndexer quickGOIndexer;
/**
* We can use this method for indexing the data in Solr for the moment
*
* @param args
*/
public static void main(String[] args) {
appContext = new ClassPathXmlApplicationContext("common-beans.xml", "indexing-beans.xml", "query-beans.xml");
quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
String start = DateFormat.getInstance().format(Calendar.getInstance().getTime());
System.out.println("================================================================");
System.out.println("STARTED: " + start);
System.out.println("================================================================");
quickGOIndexer.index();
System.out.println("================================================================");
System.out.println("DONE: " + DateFormat.getInstance().format(Calendar.getInstance().getTime()));
System.out.println("================================================================");
}
}
| package uk.ac.ebi.quickgo.indexer;
+ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Process to index all the information in Solr
- *
? -
+ *
* @author cbonill
- *
? -
+ *
*/
public class QuickGOIndexerProcess {
static ApplicationContext appContext;
static QuickGOIndexer quickGOIndexer;
/**
* We can use this method for indexing the data in Solr for the moment
- *
? -
+ *
* @param args
*/
public static void main(String[] args) {
appContext = new ClassPathXmlApplicationContext("common-beans.xml", "indexing-beans.xml", "query-beans.xml");
quickGOIndexer = (QuickGOIndexer) appContext.getBean("quickGOIndexer");
- String start = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
? ---------- -----------------
+ String start = DateFormat.getInstance().format(Calendar.getInstance().getTime());
? ++++++++++++
+ System.out.println("================================================================");
System.out.println("STARTED: " + start);
+ System.out.println("================================================================");
quickGOIndexer.index();
- String end = new SimpleDateFormat("yyyyMMdd_HHmmss").format(Calendar.getInstance().getTime());
- System.out.println("DONE: " + end);
+ System.out.println("================================================================");
+ System.out.println("DONE: " + DateFormat.getInstance().format(Calendar.getInstance().getTime()));
+ System.out.println("================================================================");
- }
? -
+ }
} | 18 | 0.486486 | 11 | 7 |
9e620d3bec74b5d3c58aa6a3f48a2272b5db1735 | cms/static/js/factories/edit_tabs.js | cms/static/js/factories/edit_tabs.js | import * as TabsModel from 'js/models/explicit_url';
import * as TabsEditView from 'js/views/tabs';
import * as xmoduleLoader from 'xmodule';
import './base';
import 'cms/js/main';
import 'xblock/cms.runtime.v1';
'use strict';
export default function EditTabsFactory(courseLocation, explicitUrl) {
xmoduleLoader.done(function() {
var model = new TabsModel({
id: courseLocation,
explicit_url: explicitUrl
}),
editView;
editView = new TabsEditView({
el: $('.tab-list'),
model: model,
mast: $('.wrapper-mast')
});
});
};
export {EditTabsFactory}
| import * as TabsModel from 'js/models/explicit_url';
import * as TabsEditView from 'js/views/tabs';
import * as xmoduleLoader from 'xmodule';
import './base';
import 'cms/js/main';
import 'xblock/cms.runtime.v1';
import 'xmodule/js/src/xmodule'; // Force the XBlockToXModuleShim to load for Static Tabs
'use strict';
export default function EditTabsFactory(courseLocation, explicitUrl) {
xmoduleLoader.done(function() {
var model = new TabsModel({
id: courseLocation,
explicit_url: explicitUrl
}),
editView;
editView = new TabsEditView({
el: $('.tab-list'),
model: model,
mast: $('.wrapper-mast')
});
});
};
export {EditTabsFactory}
| Load XBlockToXModuleShim for Studio Tabs page | Load XBlockToXModuleShim for Studio Tabs page
The studio tabs page had a race condition when loading many static tabs.
The result was that those tabs couldn't be deleted. By requiring the
`xmodule` module, we force the EditTabsFactory to load
XBlockToXModuleShim before it's needed.
| JavaScript | agpl-3.0 | msegado/edx-platform,EDUlib/edx-platform,appsembler/edx-platform,edx-solutions/edx-platform,angelapper/edx-platform,arbrandes/edx-platform,stvstnfrd/edx-platform,msegado/edx-platform,stvstnfrd/edx-platform,mitocw/edx-platform,EDUlib/edx-platform,mitocw/edx-platform,eduNEXT/edx-platform,arbrandes/edx-platform,eduNEXT/edx-platform,eduNEXT/edunext-platform,EDUlib/edx-platform,arbrandes/edx-platform,msegado/edx-platform,eduNEXT/edunext-platform,eduNEXT/edx-platform,eduNEXT/edunext-platform,edx/edx-platform,appsembler/edx-platform,msegado/edx-platform,edx/edx-platform,edx/edx-platform,appsembler/edx-platform,angelapper/edx-platform,edx-solutions/edx-platform,edx/edx-platform,stvstnfrd/edx-platform,mitocw/edx-platform,EDUlib/edx-platform,eduNEXT/edunext-platform,eduNEXT/edx-platform,msegado/edx-platform,edx-solutions/edx-platform,appsembler/edx-platform,arbrandes/edx-platform,mitocw/edx-platform,stvstnfrd/edx-platform,edx-solutions/edx-platform,angelapper/edx-platform,angelapper/edx-platform | javascript | ## Code Before:
import * as TabsModel from 'js/models/explicit_url';
import * as TabsEditView from 'js/views/tabs';
import * as xmoduleLoader from 'xmodule';
import './base';
import 'cms/js/main';
import 'xblock/cms.runtime.v1';
'use strict';
export default function EditTabsFactory(courseLocation, explicitUrl) {
xmoduleLoader.done(function() {
var model = new TabsModel({
id: courseLocation,
explicit_url: explicitUrl
}),
editView;
editView = new TabsEditView({
el: $('.tab-list'),
model: model,
mast: $('.wrapper-mast')
});
});
};
export {EditTabsFactory}
## Instruction:
Load XBlockToXModuleShim for Studio Tabs page
The studio tabs page had a race condition when loading many static tabs.
The result was that those tabs couldn't be deleted. By requiring the
`xmodule` module, we force the EditTabsFactory to load
XBlockToXModuleShim before it's needed.
## Code After:
import * as TabsModel from 'js/models/explicit_url';
import * as TabsEditView from 'js/views/tabs';
import * as xmoduleLoader from 'xmodule';
import './base';
import 'cms/js/main';
import 'xblock/cms.runtime.v1';
import 'xmodule/js/src/xmodule'; // Force the XBlockToXModuleShim to load for Static Tabs
'use strict';
export default function EditTabsFactory(courseLocation, explicitUrl) {
xmoduleLoader.done(function() {
var model = new TabsModel({
id: courseLocation,
explicit_url: explicitUrl
}),
editView;
editView = new TabsEditView({
el: $('.tab-list'),
model: model,
mast: $('.wrapper-mast')
});
});
};
export {EditTabsFactory}
| import * as TabsModel from 'js/models/explicit_url';
import * as TabsEditView from 'js/views/tabs';
import * as xmoduleLoader from 'xmodule';
import './base';
import 'cms/js/main';
import 'xblock/cms.runtime.v1';
+ import 'xmodule/js/src/xmodule'; // Force the XBlockToXModuleShim to load for Static Tabs
'use strict';
export default function EditTabsFactory(courseLocation, explicitUrl) {
xmoduleLoader.done(function() {
var model = new TabsModel({
id: courseLocation,
explicit_url: explicitUrl
}),
editView;
editView = new TabsEditView({
el: $('.tab-list'),
model: model,
mast: $('.wrapper-mast')
});
});
};
export {EditTabsFactory} | 1 | 0.04 | 1 | 0 |
a7b5fd2b3884902781a771b66816f7dc8e0b1479 | spec/dummy/config/database.yml | spec/dummy/config/database.yml |
sqlite: &sqlite
adapter: sqlite3
database: db/test.sqlite3
mysql: &mysql
adapter: mysql2
username: root
password:
database: has_accounts_test
postgresql: &postgresql
adapter: postgresql
username: postgres
password:
database: has_accounts_test
test:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'sqlite' %>
development:
<<: *sqlite
|
sqlite: &sqlite
adapter: sqlite3
database: db/test.sqlite3
mysql: &mysql
adapter: mysql2
username: root
password:
database: has_accounts_test
postgresql: &postgresql
adapter: postgresql
username: postgres
password:
database: has_accounts_test
test:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'sqlite' %>
development:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'mysql' %>
| Support DB env variable also for development. | Support DB env variable also for development.
| YAML | mit | hauledev/has_account,huerlisi/has_accounts,hauledev/has_account,huerlisi/has_accounts,hauledev/has_account,huerlisi/has_accounts | yaml | ## Code Before:
sqlite: &sqlite
adapter: sqlite3
database: db/test.sqlite3
mysql: &mysql
adapter: mysql2
username: root
password:
database: has_accounts_test
postgresql: &postgresql
adapter: postgresql
username: postgres
password:
database: has_accounts_test
test:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'sqlite' %>
development:
<<: *sqlite
## Instruction:
Support DB env variable also for development.
## Code After:
sqlite: &sqlite
adapter: sqlite3
database: db/test.sqlite3
mysql: &mysql
adapter: mysql2
username: root
password:
database: has_accounts_test
postgresql: &postgresql
adapter: postgresql
username: postgres
password:
database: has_accounts_test
test:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'sqlite' %>
development:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'mysql' %>
|
sqlite: &sqlite
adapter: sqlite3
database: db/test.sqlite3
mysql: &mysql
adapter: mysql2
username: root
password:
database: has_accounts_test
postgresql: &postgresql
adapter: postgresql
username: postgres
password:
database: has_accounts_test
test:
pool: 5
timeout: 5000
host: localhost
<<: *<%= ENV['DB'] || 'sqlite' %>
development:
- <<: *sqlite
+ pool: 5
+ timeout: 5000
+ host: localhost
+ <<: *<%= ENV['DB'] || 'mysql' %> | 5 | 0.2 | 4 | 1 |
3434de7451b5942ade651a4674ca648e87ef98cc | buildout.cfg | buildout.cfg | [buildout]
develop = .
parts = devpython scripts sphinxbuilder
versions = versions
show-picked-versions = true
extensions = mr.developer
auto-checkout = reg
[versions]
venusian = 1.0a8
[sources]
reg = git git@github.com:morepath/reg.git branch=noiface
[devpython]
recipe = zc.recipe.egg
interpreter = devpython
eggs = morepath
pyflakes
flake8
[scripts]
recipe = zc.recipe.egg:scripts
eggs = morepath [test]
pytest
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/doc
build = ${buildout:directory}/doc/build
| [buildout]
develop = .
parts = devpython scripts sphinxbuilder
versions = versions
show-picked-versions = true
extensions = mr.developer
auto-checkout = reg
[versions]
venusian = 1.0a8
[sources]
reg = git git@github.com:morepath/reg.git
[devpython]
recipe = zc.recipe.egg
interpreter = devpython
eggs = morepath
pyflakes
flake8
[scripts]
recipe = zc.recipe.egg:scripts
eggs = morepath [test]
pytest
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/doc
build = ${buildout:directory}/doc/build
| Use main branch of reg as noiface branch was merged. | Use main branch of reg as noiface branch was merged.
| INI | bsd-3-clause | faassen/morepath,morepath/morepath,taschini/morepath | ini | ## Code Before:
[buildout]
develop = .
parts = devpython scripts sphinxbuilder
versions = versions
show-picked-versions = true
extensions = mr.developer
auto-checkout = reg
[versions]
venusian = 1.0a8
[sources]
reg = git git@github.com:morepath/reg.git branch=noiface
[devpython]
recipe = zc.recipe.egg
interpreter = devpython
eggs = morepath
pyflakes
flake8
[scripts]
recipe = zc.recipe.egg:scripts
eggs = morepath [test]
pytest
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/doc
build = ${buildout:directory}/doc/build
## Instruction:
Use main branch of reg as noiface branch was merged.
## Code After:
[buildout]
develop = .
parts = devpython scripts sphinxbuilder
versions = versions
show-picked-versions = true
extensions = mr.developer
auto-checkout = reg
[versions]
venusian = 1.0a8
[sources]
reg = git git@github.com:morepath/reg.git
[devpython]
recipe = zc.recipe.egg
interpreter = devpython
eggs = morepath
pyflakes
flake8
[scripts]
recipe = zc.recipe.egg:scripts
eggs = morepath [test]
pytest
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/doc
build = ${buildout:directory}/doc/build
| [buildout]
develop = .
parts = devpython scripts sphinxbuilder
versions = versions
show-picked-versions = true
extensions = mr.developer
auto-checkout = reg
[versions]
venusian = 1.0a8
[sources]
- reg = git git@github.com:morepath/reg.git branch=noiface
? ---------------
+ reg = git git@github.com:morepath/reg.git
[devpython]
recipe = zc.recipe.egg
interpreter = devpython
eggs = morepath
pyflakes
flake8
[scripts]
recipe = zc.recipe.egg:scripts
eggs = morepath [test]
pytest
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/doc
build = ${buildout:directory}/doc/build | 2 | 0.066667 | 1 | 1 |
f845f56002f573ebfd1b97650bd039e1bee85ab8 | contact.md | contact.md | ---
title: Contact Us
layout: simple
permalink: /contact
---
## Twitter
The easiest way to get in touch with us is often via twitter through the [@plaidctf](http://twitter.com/plaidctf) handle. We will try to respond to direct messages as quickly as possible.
<!-- Do we want to include this, the email *is* public, but it seems like this might be worth keeping private -->
## Email
You can also email us at [plaid.parliament.of.pwning@gmail.com](mailto:plaid.parliament.of.pwning@gmail.com). We will still try to be responsive, but may be slower responding to these. | ---
title: Contact Us
layout: simple
permalink: /contact
---
## Twitter
The easiest way to get in touch with us is often via twitter through the [@plaidctf](http://twitter.com/plaidctf) handle. We will try to respond to direct messages as quickly as possible.
<!-- Do we want to include this, the email *is* public, but it seems like this might be worth keeping private -->
## Email
You can also email us at [plaid.parliament.of.pwning@gmail.com](mailto:plaid.parliament.of.pwning@gmail.com). We will still try to be responsive, but may be slower responding to these.
## Current Students
We meet at CIC DEC 1201 every Friday, at 5:00 pm (ET). We also have a [mailing list](https://lists.andrew.cmu.edu/mailman/listinfo/plaid-parliament-pwning) that you can subscribe to receive information about upcoming meetings. Be sure to use your Andrew email to subscribe.
| Add meeting info and mailing list | Add meeting info and mailing list | Markdown | mit | pwning/pwning.github.io,pwning/pwning.github.io,pwning/pwning.github.io | markdown | ## Code Before:
---
title: Contact Us
layout: simple
permalink: /contact
---
## Twitter
The easiest way to get in touch with us is often via twitter through the [@plaidctf](http://twitter.com/plaidctf) handle. We will try to respond to direct messages as quickly as possible.
<!-- Do we want to include this, the email *is* public, but it seems like this might be worth keeping private -->
## Email
You can also email us at [plaid.parliament.of.pwning@gmail.com](mailto:plaid.parliament.of.pwning@gmail.com). We will still try to be responsive, but may be slower responding to these.
## Instruction:
Add meeting info and mailing list
## Code After:
---
title: Contact Us
layout: simple
permalink: /contact
---
## Twitter
The easiest way to get in touch with us is often via twitter through the [@plaidctf](http://twitter.com/plaidctf) handle. We will try to respond to direct messages as quickly as possible.
<!-- Do we want to include this, the email *is* public, but it seems like this might be worth keeping private -->
## Email
You can also email us at [plaid.parliament.of.pwning@gmail.com](mailto:plaid.parliament.of.pwning@gmail.com). We will still try to be responsive, but may be slower responding to these.
## Current Students
We meet at CIC DEC 1201 every Friday, at 5:00 pm (ET). We also have a [mailing list](https://lists.andrew.cmu.edu/mailman/listinfo/plaid-parliament-pwning) that you can subscribe to receive information about upcoming meetings. Be sure to use your Andrew email to subscribe.
| ---
title: Contact Us
layout: simple
permalink: /contact
---
## Twitter
The easiest way to get in touch with us is often via twitter through the [@plaidctf](http://twitter.com/plaidctf) handle. We will try to respond to direct messages as quickly as possible.
<!-- Do we want to include this, the email *is* public, but it seems like this might be worth keeping private -->
## Email
You can also email us at [plaid.parliament.of.pwning@gmail.com](mailto:plaid.parliament.of.pwning@gmail.com). We will still try to be responsive, but may be slower responding to these.
+
+ ## Current Students
+
+ We meet at CIC DEC 1201 every Friday, at 5:00 pm (ET). We also have a [mailing list](https://lists.andrew.cmu.edu/mailman/listinfo/plaid-parliament-pwning) that you can subscribe to receive information about upcoming meetings. Be sure to use your Andrew email to subscribe. | 4 | 0.235294 | 4 | 0 |
3c3a26b636db7c29db9746b34493bc8f389583d3 | corrcheck.h | corrcheck.h |
int create_database(const std::string& directory);
int update_database();
int verify_database(const std::string& directory);
int write_database(const std::string& directory, const File* file_list);
#endif
|
/*
Create a .corrcheckdb of the files in a directory given by 'directory'.
Returns SUCCESS (0) if no errors occur; returns FAILURE (1) otherwise.
*/
int create_database(const std::string& directory);
/*
---NOT IMPLEMENTED---
Rewrite the .corrcheckdb of the files in a directory while notifying of
apparent changes since creation or last update.
*/
int update_database();
/*
Check the .corrcheckdb of the files in a directory given by 'directory' and
notify of apparent changes since creation or last update. This function does not
modify the .corrcheckdb file.
*/
int verify_database(const std::string& directory);
/*
Write a .corrcheckdb in the directory given by 'directory' based on the list of
files given as 'file_list', overwriting any that may already be present.
*/
int write_database(const std::string& directory, const File* file_list);
#endif
| Write more brief function descriptions. | Write more brief function descriptions.
| C | mit | mdclyburn/corrcheck,mdclyburn/corrcheck | c | ## Code Before:
int create_database(const std::string& directory);
int update_database();
int verify_database(const std::string& directory);
int write_database(const std::string& directory, const File* file_list);
#endif
## Instruction:
Write more brief function descriptions.
## Code After:
/*
Create a .corrcheckdb of the files in a directory given by 'directory'.
Returns SUCCESS (0) if no errors occur; returns FAILURE (1) otherwise.
*/
int create_database(const std::string& directory);
/*
---NOT IMPLEMENTED---
Rewrite the .corrcheckdb of the files in a directory while notifying of
apparent changes since creation or last update.
*/
int update_database();
/*
Check the .corrcheckdb of the files in a directory given by 'directory' and
notify of apparent changes since creation or last update. This function does not
modify the .corrcheckdb file.
*/
int verify_database(const std::string& directory);
/*
Write a .corrcheckdb in the directory given by 'directory' based on the list of
files given as 'file_list', overwriting any that may already be present.
*/
int write_database(const std::string& directory, const File* file_list);
#endif
|
+ /*
+ Create a .corrcheckdb of the files in a directory given by 'directory'.
+ Returns SUCCESS (0) if no errors occur; returns FAILURE (1) otherwise.
+ */
int create_database(const std::string& directory);
+
+ /*
+ ---NOT IMPLEMENTED---
+ Rewrite the .corrcheckdb of the files in a directory while notifying of
+ apparent changes since creation or last update.
+ */
int update_database();
+
+ /*
+ Check the .corrcheckdb of the files in a directory given by 'directory' and
+ notify of apparent changes since creation or last update. This function does not
+ modify the .corrcheckdb file.
+ */
int verify_database(const std::string& directory);
+
+ /*
+ Write a .corrcheckdb in the directory given by 'directory' based on the list of
+ files given as 'file_list', overwriting any that may already be present.
+ */
int write_database(const std::string& directory, const File* file_list);
#endif
| 21 | 2.625 | 21 | 0 |
fbb3c38417e85f327e6a347338a005162779314b | run_tests.py | run_tests.py | from __future__ import print_function
import os
import imp
import fnmatch
# Test directory
DIR_TEST = 'tests'
def find_tests(pathname):
"""Recursively finds the test modules.
:param str pathname: Path name where the tests are stored.
:returns: List of paths to each test modules.
:rtype: :class:`list`
"""
founds = []
for base, _, files in os.walk(pathname):
founds.extend((
(matched_file, base)
for matched_file in fnmatch.filter(files, '*.py')
if matched_file != "__init__.py"))
return founds
def run_tests(pathnames):
"""Loads each test module and run their `run` function.
:param list pathnames: List of (module_name, path_to_the_module).
"""
for module, path in pathnames:
current_mod = imp.load_source(
os.path.splitext(module)[0],
os.path.join(path, module))
print("Testing:", current_mod.__testname__)
current_mod.run()
if __name__ == '__main__':
run_tests(find_tests(os.path.join(os.getcwd(), DIR_TEST)))
| from __future__ import print_function
import os
import sys
import imp
import fnmatch
# Test directory
DIR_TEST = 'tests'
def find_tests(pathname):
"""Recursively finds the test modules.
:param str pathname: Path name where the tests are stored.
:returns: List of paths to each test modules.
:rtype: :class:`list`
"""
founds = []
for base, _, files in os.walk(pathname):
founds.extend((
(matched_file, base)
for matched_file in fnmatch.filter(files, '*.py')
if matched_file != "__init__.py"))
return founds
def run_tests(pathnames, test_name=None):
"""Loads each test module and run their `run` function.
:param list pathnames: List of (module_name, path_to_the_module).
"""
for module, path in pathnames:
current_mod = imp.load_source(
os.path.splitext(module)[0],
os.path.join(path, module))
if test_name and test_name != current_mod.__testname__:
continue
print("Testing:", current_mod.__testname__)
current_mod.run()
if __name__ == '__main__':
test_name = None
if len(sys.argv) == 2:
test_name = sys.argv[1]
run_tests(find_tests(os.path.join(os.getcwd(), DIR_TEST)), test_name)
| Allow to chose a specific case test. | [tests] Allow to chose a specific case test.
| Python | bsd-3-clause | owtf/ptp,DoomTaper/ptp | python | ## Code Before:
from __future__ import print_function
import os
import imp
import fnmatch
# Test directory
DIR_TEST = 'tests'
def find_tests(pathname):
"""Recursively finds the test modules.
:param str pathname: Path name where the tests are stored.
:returns: List of paths to each test modules.
:rtype: :class:`list`
"""
founds = []
for base, _, files in os.walk(pathname):
founds.extend((
(matched_file, base)
for matched_file in fnmatch.filter(files, '*.py')
if matched_file != "__init__.py"))
return founds
def run_tests(pathnames):
"""Loads each test module and run their `run` function.
:param list pathnames: List of (module_name, path_to_the_module).
"""
for module, path in pathnames:
current_mod = imp.load_source(
os.path.splitext(module)[0],
os.path.join(path, module))
print("Testing:", current_mod.__testname__)
current_mod.run()
if __name__ == '__main__':
run_tests(find_tests(os.path.join(os.getcwd(), DIR_TEST)))
## Instruction:
[tests] Allow to chose a specific case test.
## Code After:
from __future__ import print_function
import os
import sys
import imp
import fnmatch
# Test directory
DIR_TEST = 'tests'
def find_tests(pathname):
"""Recursively finds the test modules.
:param str pathname: Path name where the tests are stored.
:returns: List of paths to each test modules.
:rtype: :class:`list`
"""
founds = []
for base, _, files in os.walk(pathname):
founds.extend((
(matched_file, base)
for matched_file in fnmatch.filter(files, '*.py')
if matched_file != "__init__.py"))
return founds
def run_tests(pathnames, test_name=None):
"""Loads each test module and run their `run` function.
:param list pathnames: List of (module_name, path_to_the_module).
"""
for module, path in pathnames:
current_mod = imp.load_source(
os.path.splitext(module)[0],
os.path.join(path, module))
if test_name and test_name != current_mod.__testname__:
continue
print("Testing:", current_mod.__testname__)
current_mod.run()
if __name__ == '__main__':
test_name = None
if len(sys.argv) == 2:
test_name = sys.argv[1]
run_tests(find_tests(os.path.join(os.getcwd(), DIR_TEST)), test_name)
| from __future__ import print_function
import os
+ import sys
import imp
import fnmatch
# Test directory
DIR_TEST = 'tests'
def find_tests(pathname):
"""Recursively finds the test modules.
:param str pathname: Path name where the tests are stored.
:returns: List of paths to each test modules.
:rtype: :class:`list`
"""
founds = []
for base, _, files in os.walk(pathname):
founds.extend((
(matched_file, base)
for matched_file in fnmatch.filter(files, '*.py')
if matched_file != "__init__.py"))
return founds
- def run_tests(pathnames):
+ def run_tests(pathnames, test_name=None):
? ++++++++++++++++
"""Loads each test module and run their `run` function.
:param list pathnames: List of (module_name, path_to_the_module).
"""
for module, path in pathnames:
current_mod = imp.load_source(
os.path.splitext(module)[0],
os.path.join(path, module))
+ if test_name and test_name != current_mod.__testname__:
+ continue
print("Testing:", current_mod.__testname__)
current_mod.run()
if __name__ == '__main__':
+ test_name = None
+ if len(sys.argv) == 2:
+ test_name = sys.argv[1]
- run_tests(find_tests(os.path.join(os.getcwd(), DIR_TEST)))
+ run_tests(find_tests(os.path.join(os.getcwd(), DIR_TEST)), test_name)
? +++++++++++
| 10 | 0.227273 | 8 | 2 |
93080bf6006fc0c4925a80c616eee389759efb13 | test/tasks/adminpanel_rake_test.rb | test/tasks/adminpanel_rake_test.rb | require 'test_helper'
require 'rails'
class AdminpanelRakeTest < ActiveSupport::TestCase
include Rake
# include
Rake.application.rake_require 'tasks/adminpanel/adminpanel'
Rake::Task.define_task(:environment)
def test_populate_task
I18n.enforce_available_locales = false
I18n.reload!
products_count = Adminpanel::Product.count
Rake.application.invoke_task "adminpanel:populate[10, product, name:name description:lorem price:number]"
assert_equal products_count + 10, Adminpanel::Product.count
# assert true
end
def test_section_task
Rake.application.invoke_task "adminpanel:section[Mission Mars, about us]"
last_section = Adminpanel::Section.last
assert_equal 'Mission Mars', last_section.name
assert_equal 'About us', last_section.page
assert_equal 'mission_mars', last_section.key
assert_equal false, last_section.has_description
assert_equal false, last_section.has_image
end
def test_user_task
Rake.application.invoke_task 'adminpanel:user'
generated_user = Adminpanel::User.last
assert_equal 'webmaster@codn.mx', generated_user.email
assert_equal 'Webmaster', generated_user.name
assert_equal 'Admin', generated_user.role.name
end
end
| require 'test_helper'
require 'rails'
class AdminpanelRakeTest < ActiveSupport::TestCase
include Rake
Rake.application.rake_require 'tasks/adminpanel/adminpanel'
Rake::Task.define_task(:environment)
def test_populate_task
I18n.enforce_available_locales = false
I18n.reload!
products_count = Adminpanel::Product.count
Rake.application.invoke_task "adminpanel:populate[10, product, name:name description:lorem price:number]"
assert_equal products_count + 10, Adminpanel::Product.count
# assert true
end
def test_section_task
Rake.application.invoke_task "adminpanel:section[Mission Mars, about us]"
last_section = Adminpanel::Section.last
assert_equal 'Mission Mars', last_section.name
assert_equal 'About us', last_section.page
assert_equal 'mission_mars', last_section.key
assert_equal false, last_section.has_description
assert_equal false, last_section.has_image
end
def test_user_task
Rake.application.invoke_task 'adminpanel:user'
generated_user = Adminpanel::User.last
assert_equal 'webmaster@codn.mx', generated_user.email
assert_equal 'Webmaster', generated_user.name
assert_equal 'Admin', generated_user.role.name
end
end
| Remove empty include in task | Remove empty include in task
| Ruby | mit | codn/adminpanel,codn/adminpanel,codn/adminpanel | ruby | ## Code Before:
require 'test_helper'
require 'rails'
class AdminpanelRakeTest < ActiveSupport::TestCase
include Rake
# include
Rake.application.rake_require 'tasks/adminpanel/adminpanel'
Rake::Task.define_task(:environment)
def test_populate_task
I18n.enforce_available_locales = false
I18n.reload!
products_count = Adminpanel::Product.count
Rake.application.invoke_task "adminpanel:populate[10, product, name:name description:lorem price:number]"
assert_equal products_count + 10, Adminpanel::Product.count
# assert true
end
def test_section_task
Rake.application.invoke_task "adminpanel:section[Mission Mars, about us]"
last_section = Adminpanel::Section.last
assert_equal 'Mission Mars', last_section.name
assert_equal 'About us', last_section.page
assert_equal 'mission_mars', last_section.key
assert_equal false, last_section.has_description
assert_equal false, last_section.has_image
end
def test_user_task
Rake.application.invoke_task 'adminpanel:user'
generated_user = Adminpanel::User.last
assert_equal 'webmaster@codn.mx', generated_user.email
assert_equal 'Webmaster', generated_user.name
assert_equal 'Admin', generated_user.role.name
end
end
## Instruction:
Remove empty include in task
## Code After:
require 'test_helper'
require 'rails'
class AdminpanelRakeTest < ActiveSupport::TestCase
include Rake
Rake.application.rake_require 'tasks/adminpanel/adminpanel'
Rake::Task.define_task(:environment)
def test_populate_task
I18n.enforce_available_locales = false
I18n.reload!
products_count = Adminpanel::Product.count
Rake.application.invoke_task "adminpanel:populate[10, product, name:name description:lorem price:number]"
assert_equal products_count + 10, Adminpanel::Product.count
# assert true
end
def test_section_task
Rake.application.invoke_task "adminpanel:section[Mission Mars, about us]"
last_section = Adminpanel::Section.last
assert_equal 'Mission Mars', last_section.name
assert_equal 'About us', last_section.page
assert_equal 'mission_mars', last_section.key
assert_equal false, last_section.has_description
assert_equal false, last_section.has_image
end
def test_user_task
Rake.application.invoke_task 'adminpanel:user'
generated_user = Adminpanel::User.last
assert_equal 'webmaster@codn.mx', generated_user.email
assert_equal 'Webmaster', generated_user.name
assert_equal 'Admin', generated_user.role.name
end
end
| require 'test_helper'
require 'rails'
class AdminpanelRakeTest < ActiveSupport::TestCase
include Rake
- # include
+
Rake.application.rake_require 'tasks/adminpanel/adminpanel'
Rake::Task.define_task(:environment)
def test_populate_task
I18n.enforce_available_locales = false
I18n.reload!
products_count = Adminpanel::Product.count
Rake.application.invoke_task "adminpanel:populate[10, product, name:name description:lorem price:number]"
assert_equal products_count + 10, Adminpanel::Product.count
# assert true
end
def test_section_task
Rake.application.invoke_task "adminpanel:section[Mission Mars, about us]"
last_section = Adminpanel::Section.last
assert_equal 'Mission Mars', last_section.name
assert_equal 'About us', last_section.page
assert_equal 'mission_mars', last_section.key
assert_equal false, last_section.has_description
assert_equal false, last_section.has_image
end
def test_user_task
Rake.application.invoke_task 'adminpanel:user'
generated_user = Adminpanel::User.last
assert_equal 'webmaster@codn.mx', generated_user.email
assert_equal 'Webmaster', generated_user.name
assert_equal 'Admin', generated_user.role.name
end
end | 2 | 0.054054 | 1 | 1 |
1ee42d314c26c5d5f25146ecb2979f19e3b5cc5e | templates/blog/_post_tags.html.twig | templates/blog/_post_tags.html.twig | {% if not post.tags.empty %}
<p class="post-tags">
{% for tag in post.tags %}
<a href="{{ path('blog_index', {'tag': tag.name}) }}"
class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}"
>
<i class="fa fa-tag"></i> {{ tag.name }}
</a>
{% endfor %}
</p>
{% endif %}
| {% if not post.tags.empty %}
<p class="post-tags">
{% for tag in post.tags %}
<a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}"
class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}"
>
<i class="fa fa-tag"></i> {{ tag.name }}
</a>
{% endfor %}
</p>
{% endif %}
| Reset tag filter if it's link was clicked again | Reset tag filter if it's link was clicked again
| Twig | mit | TomasVotruba/symfony-demo,javiereguiluz/symfony-demo,symfony/symfony-demo,Codeception/symfony-demo,javiereguiluz/symfony-demo,Codeception/symfony-demo,voronkovich/symfony-demo,symfony/symfony-demo,javiereguiluz/symfony-demo,voronkovich/symfony-demo,yceruto/symfony-demo,Codeception/symfony-demo,yceruto/symfony-demo,bocharsky-bw/symfony-demo,symfony/symfony-demo,TomasVotruba/symfony-demo,bocharsky-bw/symfony-demo,TomasVotruba/symfony-demo,yceruto/symfony-demo,bocharsky-bw/symfony-demo,voronkovich/symfony-demo | twig | ## Code Before:
{% if not post.tags.empty %}
<p class="post-tags">
{% for tag in post.tags %}
<a href="{{ path('blog_index', {'tag': tag.name}) }}"
class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}"
>
<i class="fa fa-tag"></i> {{ tag.name }}
</a>
{% endfor %}
</p>
{% endif %}
## Instruction:
Reset tag filter if it's link was clicked again
## Code After:
{% if not post.tags.empty %}
<p class="post-tags">
{% for tag in post.tags %}
<a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}"
class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}"
>
<i class="fa fa-tag"></i> {{ tag.name }}
</a>
{% endfor %}
</p>
{% endif %}
| {% if not post.tags.empty %}
<p class="post-tags">
{% for tag in post.tags %}
- <a href="{{ path('blog_index', {'tag': tag.name}) }}"
+ <a href="{{ path('blog_index', {'tag': tag.name == app.request.query.get('tag') ? null : tag.name}) }}"
class="label label-{{ tag.name == app.request.query.get('tag') ? 'success' : 'default' }}"
>
<i class="fa fa-tag"></i> {{ tag.name }}
</a>
{% endfor %}
</p>
{% endif %}
| 2 | 0.166667 | 1 | 1 |
e5807fe5e7e76214c1a291cd81eaeff05cf12627 | lib/views/general/frontpage.html.erb | lib/views/general/frontpage.html.erb | <div id="frontpage_splash">
<div class='container'>
<div id="left_column">
<%= render :partial => "frontpage_new_request" %>
</div>
<div id="right_column">
<div id="frontpage_search_box">
<%= render :partial => "frontpage_search_box" %>
</div>
<div id="frontpage_right_to_know">
<%= render :partial => 'frontpage_intro_sentence' %>
</div>
</div>
<div style="clear:both"></div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
</div>
</div>
</div>
<div id="frontpage_examples">
<%= render :partial => "frontpage_bodies_list" %>
<%= render :partial => "frontpage_requests_list" %>
</div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
</div>
| <div id="frontpage_splash">
<div class='container'>
<div id="left_column">
<%= render :partial => "frontpage_new_request" %>
</div>
<div id="right_column">
<div id="frontpage_search_box">
<%= render :partial => "frontpage_search_box" %>
</div>
<div id="frontpage_right_to_know">
<%= render :partial => 'frontpage_intro_sentence' %>
</div>
</div>
<div style="clear:both"></div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald-white.png"></a>
</div>
</div>
</div>
<div id="frontpage_examples">
<%= render :partial => "frontpage_bodies_list" %>
<%= render :partial => "frontpage_requests_list" %>
</div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
</div>
| Use white image for header | Use white image for header
| HTML+ERB | mit | olineham/morebetter-theme,nzherald/fyi-theme,olineham/morebetter-theme,nzherald/fyi-theme,olineham/morebetter-theme,nzherald/fyi-theme | html+erb | ## Code Before:
<div id="frontpage_splash">
<div class='container'>
<div id="left_column">
<%= render :partial => "frontpage_new_request" %>
</div>
<div id="right_column">
<div id="frontpage_search_box">
<%= render :partial => "frontpage_search_box" %>
</div>
<div id="frontpage_right_to_know">
<%= render :partial => 'frontpage_intro_sentence' %>
</div>
</div>
<div style="clear:both"></div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
</div>
</div>
</div>
<div id="frontpage_examples">
<%= render :partial => "frontpage_bodies_list" %>
<%= render :partial => "frontpage_requests_list" %>
</div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
</div>
## Instruction:
Use white image for header
## Code After:
<div id="frontpage_splash">
<div class='container'>
<div id="left_column">
<%= render :partial => "frontpage_new_request" %>
</div>
<div id="right_column">
<div id="frontpage_search_box">
<%= render :partial => "frontpage_search_box" %>
</div>
<div id="frontpage_right_to_know">
<%= render :partial => 'frontpage_intro_sentence' %>
</div>
</div>
<div style="clear:both"></div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald-white.png"></a>
</div>
</div>
</div>
<div id="frontpage_examples">
<%= render :partial => "frontpage_bodies_list" %>
<%= render :partial => "frontpage_requests_list" %>
</div>
<div class="nzherald">
<a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
</div>
| <div id="frontpage_splash">
<div class='container'>
<div id="left_column">
<%= render :partial => "frontpage_new_request" %>
</div>
<div id="right_column">
<div id="frontpage_search_box">
<%= render :partial => "frontpage_search_box" %>
</div>
<div id="frontpage_right_to_know">
<%= render :partial => 'frontpage_intro_sentence' %>
</div>
</div>
<div style="clear:both"></div>
<div class="nzherald">
- <a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
+ <a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald-white.png"></a>
? ++++++
</div>
</div>
</div>
+
<div id="frontpage_examples">
<%= render :partial => "frontpage_bodies_list" %>
<%= render :partial => "frontpage_requests_list" %>
</div>
+
- <div class="nzherald">
? --
+ <div class="nzherald">
- <a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
? --
+ <a href="http://nzherald.co.nz">Supported by <img class='sponsor' src="//s3-ap-southeast-2.amazonaws.com/nzh-assets/herald.png"></a>
- </div>
? --
+ </div> | 10 | 0.384615 | 6 | 4 |
a53f8e707b42910330a80809ad2b9ab334a685aa | core/db/migrate/20101026184746_delete_in_progress_orders.rb | core/db/migrate/20101026184746_delete_in_progress_orders.rb | class DeleteInProgressOrders < ActiveRecord::Migration
def self.up
Order.delete_all(:state=>'in_progress')
delete_orphans('adjustments')
delete_orphans('checkouts')
delete_orphans('shipments')
delete_orphans('payments')
delete_orphans('line_items')
delete_orphans('inventory_units')
end
def self.delete_orphans(table_name)
execute("delete from #{table_name} where order_id not in (select id from orders)")
end
def self.down
end
end | class DeleteInProgressOrders < ActiveRecord::Migration
# legacy table support
class Order < ActiveRecord::Base
end
def self.up
Order.delete_all(:state=>'in_progress')
delete_orphans('adjustments')
delete_orphans('checkouts')
delete_orphans('shipments')
delete_orphans('payments')
delete_orphans('line_items')
delete_orphans('inventory_units')
end
def self.delete_orphans(table_name)
execute("delete from #{table_name} where order_id not in (select id from orders)")
end
def self.down
end
end | Add legacy table support to delete in progress orders migration | Add legacy table support to delete in progress orders migration
| Ruby | bsd-3-clause | LBRapid/spree,APohio/spree,jsurdilla/solidus,hifly/spree,groundctrl/spree,adaddeo/spree,JuandGirald/spree,codesavvy/sandbox,Machpowersystems/spree_mach,cutefrank/spree,biagidp/spree,wolfieorama/spree,welitonfreitas/spree,devilcoders/solidus,mleglise/spree,Nevensoft/spree,TimurTarasenko/spree,jaspreet21anand/spree,progsri/spree,miyazawatomoka/spree,edgward/spree,volpejoaquin/spree,zamiang/spree,lzcabrera/spree-1-3-stable,kitwalker12/spree,reidblomquist/spree,athal7/solidus,yushine/spree,rbngzlv/spree,joanblake/spree,urimikhli/spree,azclick/spree,forkata/solidus,shioyama/spree,omarsar/spree,degica/spree,Migweld/spree,richardnuno/solidus,Boomkat/spree,bjornlinder/Spree,woboinc/spree,edgward/spree,TimurTarasenko/spree,alvinjean/spree,fahidnasir/spree,thogg4/spree,woboinc/spree,StemboltHQ/spree,beni55/spree,firman/spree,fahidnasir/spree,Senjai/spree,Nevensoft/spree,sfcgeorge/spree,tailic/spree,Senjai/solidus,lsirivong/spree,madetech/spree,bricesanchez/spree,radarseesradar/spree,berkes/spree,athal7/solidus,moneyspyder/spree,Mayvenn/spree,forkata/solidus,rakibulislam/spree,rakibulislam/spree,shaywood2/spree,jspizziri/spree,softr8/spree,welitonfreitas/spree,keatonrow/spree,ujai/spree,camelmasa/spree,Nevensoft/spree,builtbybuffalo/spree,jeffboulet/spree,dotandbo/spree,DarkoP/spree,priyank-gupta/spree,wolfieorama/spree,abhishekjain16/spree,vmatekole/spree,joanblake/spree,lsirivong/solidus,zaeznet/spree,ahmetabdi/spree,pervino/solidus,njerrywerry/spree,imella/spree,biagidp/spree,jasonfb/spree,richardnuno/solidus,sunny2601/spree,bjornlinder/Spree,AgilTec/spree,PhoenixTeam/spree_phoenix,karlitxo/spree,sideci-sample/sideci-sample-spree,shaywood2/spree,freerunningtech/spree,lyzxsc/spree,mindvolt/spree,LBRapid/spree,sfcgeorge/spree,bonobos/solidus,nooysters/spree,jordan-brough/spree,pjmj777/spree,robodisco/spree,surfdome/spree,xuewenfei/solidus,xuewenfei/solidus,jhawthorn/spree,JDutil/spree,zamiang/spree,jordan-brough/solidus,delphsoft/spree-store-ballchair,NerdsvilleCEO/spree,keatonrow/spree,lsirivong/solidus,Boomkat/spree,yushine/spree,ayb/spree,jhawthorn/spree,APohio/spree,raow/spree,yushine/spree,JuandGirald/spree,CJMrozek/spree,quentinuys/spree,moneyspyder/spree,camelmasa/spree,njerrywerry/spree,trigrass2/spree,judaro13/spree-fork,priyank-gupta/spree,woboinc/spree,Arpsara/solidus,Nevensoft/spree,jimblesm/spree,nooysters/spree,pervino/solidus,tancnle/spree,surfdome/spree,progsri/spree,robodisco/spree,JDutil/spree,project-eutopia/spree,vinayvinsol/spree,ahmetabdi/spree,volpejoaquin/spree,Arpsara/solidus,grzlus/solidus,cutefrank/spree,yiqing95/spree,fahidnasir/spree,moneyspyder/spree,athal7/solidus,delphsoft/spree-store-ballchair,vcavallo/spree,locomotivapro/spree,TimurTarasenko/spree,codesavvy/sandbox,siddharth28/spree,radarseesradar/spree,carlesjove/spree,siddharth28/spree,hifly/spree,firman/spree,alejandromangione/spree,berkes/spree,adaddeo/spree,NerdsvilleCEO/spree,azranel/spree,Ropeney/spree,dandanwei/spree,tomash/spree,calvinl/spree,biagidp/spree,vinayvinsol/spree,calvinl/spree,net2b/spree,HealthWave/spree,CJMrozek/spree,welitonfreitas/spree,pulkit21/spree,imella/spree,yomishra/pce,ahmetabdi/spree,tailic/spree,jimblesm/spree,FadliKun/spree,KMikhaylovCTG/spree,scottcrawford03/solidus,assembledbrands/spree,gregoryrikson/spree-sample,hoanghiep90/spree,gautamsawhney/spree,Machpowersystems/spree_mach,DynamoMTL/spree,RatioClothing/spree,pervino/spree,gautamsawhney/spree,yiqing95/spree,rajeevriitm/spree,AgilTec/spree,edgward/spree,RatioClothing/spree,derekluo/spree,builtbybuffalo/spree,pervino/solidus,grzlus/solidus,dafontaine/spree,brchristian/spree,odk211/spree,archSeer/spree,hoanghiep90/spree,jspizziri/spree,cutefrank/spree,Arpsara/solidus,vulk/spree,jasonfb/spree,ckk-scratch/solidus,grzlus/solidus,scottcrawford03/solidus,ahmetabdi/spree,kewaunited/spree,jspizziri/spree,useiichi/spree,azclick/spree,Lostmyname/spree,ckk-scratch/solidus,FadliKun/spree,jeffboulet/spree,njerrywerry/spree,Hates/spree,reidblomquist/spree,DarkoP/spree,Mayvenn/spree,mleglise/spree,tesserakt/clean_spree,grzlus/spree,Engeltj/spree,tesserakt/clean_spree,shioyama/spree,Antdesk/karpal-spree,groundctrl/spree,jordan-brough/spree,hoanghiep90/spree,wolfieorama/spree,net2b/spree,Lostmyname/spree,HealthWave/spree,omarsar/spree,beni55/spree,mindvolt/spree,kitwalker12/spree,DarkoP/spree,brchristian/spree,watg/spree,Engeltj/spree,sliaquat/spree,caiqinghua/spree,zamiang/spree,odk211/spree,sliaquat/spree,gregoryrikson/spree-sample,assembledbrands/spree,moneyspyder/spree,karlitxo/spree,vcavallo/spree,gregoryrikson/spree-sample,imella/spree,joanblake/spree,yomishra/pce,mindvolt/spree,mindvolt/spree,ayb/spree,FadliKun/spree,mleglise/spree,rakibulislam/spree,CJMrozek/spree,Antdesk/karpal-spree,vinsol/spree,cutefrank/spree,patdec/spree,scottcrawford03/solidus,PhoenixTeam/spree_phoenix,useiichi/spree,tesserakt/clean_spree,ramkumar-kr/spree,assembledbrands/spree,project-eutopia/spree,volpejoaquin/spree,CiscoCloud/spree,berkes/spree,dafontaine/spree,shekibobo/spree,calvinl/spree,hifly/spree,dafontaine/spree,Mayvenn/spree,orenf/spree,azranel/spree,Senjai/spree,calvinl/spree,vcavallo/spree,vinsol/spree,APohio/spree,freerunningtech/spree,alvinjean/spree,abhishekjain16/spree,pjmj777/spree,thogg4/spree,Arpsara/solidus,forkata/solidus,surfdome/spree,kitwalker12/spree,vulk/spree,project-eutopia/spree,scottcrawford03/solidus,maybii/spree,groundctrl/spree,sunny2601/spree,forkata/solidus,ujai/spree,TrialGuides/spree,groundctrl/spree,jaspreet21anand/spree,rakibulislam/spree,Kagetsuki/spree,karlitxo/spree,alepore/spree,nooysters/spree,jspizziri/spree,reinaris/spree,lyzxsc/spree,reinaris/spree,devilcoders/solidus,rajeevriitm/spree,jsurdilla/solidus,Senjai/solidus,reinaris/spree,raow/spree,devilcoders/solidus,alvinjean/spree,judaro13/spree-fork,StemboltHQ/spree,lsirivong/solidus,APohio/spree,orenf/spree,pulkit21/spree,Boomkat/spree,pulkit21/spree,odk211/spree,camelmasa/spree,miyazawatomoka/spree,TrialGuides/spree,quentinuys/spree,rajeevriitm/spree,gautamsawhney/spree,SadTreeFriends/spree,progsri/spree,jhawthorn/spree,project-eutopia/spree,Migweld/spree,ckk-scratch/solidus,sliaquat/spree,orenf/spree,alepore/spree,radarseesradar/spree,Ropeney/spree,sfcgeorge/spree,maybii/spree,sunny2601/spree,jparr/spree,vmatekole/spree,tancnle/spree,bjornlinder/Spree,locomotivapro/spree,abhishekjain16/spree,Hates/spree,TrialGuides/spree,dandanwei/spree,degica/spree,dandanwei/spree,njerrywerry/spree,tomash/spree,Kagetsuki/spree,grzlus/spree,TrialGuides/spree,reinaris/spree,rajeevriitm/spree,volpejoaquin/spree,Engeltj/spree,shaywood2/spree,berkes/spree,yiqing95/spree,jsurdilla/solidus,joanblake/spree,Migweld/spree,Hawaiideveloper/shoppingcart,piousbox/spree,ramkumar-kr/spree,vmatekole/spree,trigrass2/spree,patdec/spree,PhoenixTeam/spree_phoenix,jparr/spree,carlesjove/spree,Ropeney/spree,jeffboulet/spree,yushine/spree,ujai/spree,lyzxsc/spree,delphsoft/spree-store-ballchair,Lostmyname/spree,kewaunited/spree,Hates/spree,caiqinghua/spree,Engeltj/spree,agient/agientstorefront,xuewenfei/solidus,beni55/spree,SadTreeFriends/spree,lsirivong/solidus,Boomkat/spree,tomash/spree,tancnle/spree,kewaunited/spree,DynamoMTL/spree,quentinuys/spree,firman/spree,JuandGirald/spree,pervino/spree,Senjai/solidus,JuandGirald/spree,wolfieorama/spree,jordan-brough/solidus,CiscoCloud/spree,vinsol/spree,net2b/spree,zaeznet/spree,softr8/spree,tancnle/spree,urimikhli/spree,sliaquat/spree,ramkumar-kr/spree,HealthWave/spree,SadTreeFriends/spree,tailic/spree,patdec/spree,shaywood2/spree,jasonfb/spree,bricesanchez/spree,vmatekole/spree,knuepwebdev/FloatTubeRodHolders,SadTreeFriends/spree,TimurTarasenko/spree,KMikhaylovCTG/spree,hifly/spree,softr8/spree,robodisco/spree,orenf/spree,jasonfb/spree,builtbybuffalo/spree,agient/agientstorefront,kewaunited/spree,DynamoMTL/spree,reidblomquist/spree,welitonfreitas/spree,Hawaiideveloper/shoppingcart,richardnuno/solidus,jimblesm/spree,madetech/spree,rbngzlv/spree,derekluo/spree,alvinjean/spree,bonobos/solidus,StemboltHQ/spree,jparr/spree,lsirivong/spree,shekibobo/spree,DarkoP/spree,nooysters/spree,lzcabrera/spree-1-3-stable,RatioClothing/spree,Lostmyname/spree,radarseesradar/spree,beni55/spree,FadliKun/spree,tomash/spree,caiqinghua/spree,dandanwei/spree,yiqing95/spree,Kagetsuki/spree,NerdsvilleCEO/spree,shekibobo/spree,patdec/spree,alejandromangione/spree,Senjai/solidus,tesserakt/clean_spree,KMikhaylovCTG/spree,siddharth28/spree,dotandbo/spree,azranel/spree,jparr/spree,bonobos/solidus,jimblesm/spree,agient/agientstorefront,ckk-scratch/solidus,zaeznet/spree,omarsar/spree,lyzxsc/spree,dotandbo/spree,yomishra/pce,reidblomquist/spree,vinsol/spree,bonobos/solidus,softr8/spree,useiichi/spree,jaspreet21anand/spree,thogg4/spree,freerunningtech/spree,Antdesk/karpal-spree,urimikhli/spree,alejandromangione/spree,watg/spree,progsri/spree,thogg4/spree,miyazawatomoka/spree,trigrass2/spree,CiscoCloud/spree,vulk/spree,caiqinghua/spree,dafontaine/spree,net2b/spree,codesavvy/sandbox,LBRapid/spree,JDutil/spree,pjmj777/spree,richardnuno/solidus,piousbox/spree,siddharth28/spree,derekluo/spree,Hawaiideveloper/shoppingcart,sunny2601/spree,codesavvy/sandbox,AgilTec/spree,lzcabrera/spree-1-3-stable,shekibobo/spree,edgward/spree,pervino/solidus,vinayvinsol/spree,Machpowersystems/spree_mach,hoanghiep90/spree,jordan-brough/solidus,brchristian/spree,azranel/spree,robodisco/spree,jsurdilla/solidus,jordan-brough/solidus,grzlus/solidus,JDutil/spree,firman/spree,zaeznet/spree,carlesjove/spree,degica/spree,piousbox/spree,bricesanchez/spree,KMikhaylovCTG/spree,ayb/spree,knuepwebdev/FloatTubeRodHolders,azclick/spree,gautamsawhney/spree,jaspreet21anand/spree,Hawaiideveloper/shoppingcart,grzlus/spree,ramkumar-kr/spree,mleglise/spree,archSeer/spree,lsirivong/spree,Hates/spree,jordan-brough/spree,adaddeo/spree,DynamoMTL/spree,priyank-gupta/spree,dotandbo/spree,trigrass2/spree,lsirivong/spree,rbngzlv/spree,CiscoCloud/spree,camelmasa/spree,azclick/spree,Ropeney/spree,maybii/spree,CJMrozek/spree,keatonrow/spree,alejandromangione/spree,locomotivapro/spree,judaro13/spree-fork,sfcgeorge/spree,builtbybuffalo/spree,gregoryrikson/spree-sample,xuewenfei/solidus,carlesjove/spree,derekluo/spree,piousbox/spree,knuepwebdev/FloatTubeRodHolders,devilcoders/solidus,NerdsvilleCEO/spree,fahidnasir/spree,adaddeo/spree,surfdome/spree,sideci-sample/sideci-sample-spree,odk211/spree,alepore/spree,watg/spree,rbngzlv/spree,raow/spree,priyank-gupta/spree,locomotivapro/spree,maybii/spree,pulkit21/spree,vulk/spree,pervino/spree,jeffboulet/spree,ayb/spree,shioyama/spree,Kagetsuki/spree,karlitxo/spree,archSeer/spree,delphsoft/spree-store-ballchair,zamiang/spree,omarsar/spree,quentinuys/spree,raow/spree,athal7/solidus,Mayvenn/spree,pervino/spree,vinayvinsol/spree,sideci-sample/sideci-sample-spree,Migweld/spree,vcavallo/spree,brchristian/spree,AgilTec/spree,abhishekjain16/spree,archSeer/spree,agient/agientstorefront,useiichi/spree,PhoenixTeam/spree_phoenix,miyazawatomoka/spree,Senjai/spree,madetech/spree,grzlus/spree,keatonrow/spree,madetech/spree | ruby | ## Code Before:
class DeleteInProgressOrders < ActiveRecord::Migration
def self.up
Order.delete_all(:state=>'in_progress')
delete_orphans('adjustments')
delete_orphans('checkouts')
delete_orphans('shipments')
delete_orphans('payments')
delete_orphans('line_items')
delete_orphans('inventory_units')
end
def self.delete_orphans(table_name)
execute("delete from #{table_name} where order_id not in (select id from orders)")
end
def self.down
end
end
## Instruction:
Add legacy table support to delete in progress orders migration
## Code After:
class DeleteInProgressOrders < ActiveRecord::Migration
# legacy table support
class Order < ActiveRecord::Base
end
def self.up
Order.delete_all(:state=>'in_progress')
delete_orphans('adjustments')
delete_orphans('checkouts')
delete_orphans('shipments')
delete_orphans('payments')
delete_orphans('line_items')
delete_orphans('inventory_units')
end
def self.delete_orphans(table_name)
execute("delete from #{table_name} where order_id not in (select id from orders)")
end
def self.down
end
end | class DeleteInProgressOrders < ActiveRecord::Migration
+ # legacy table support
+ class Order < ActiveRecord::Base
+
+ end
def self.up
Order.delete_all(:state=>'in_progress')
delete_orphans('adjustments')
delete_orphans('checkouts')
delete_orphans('shipments')
delete_orphans('payments')
delete_orphans('line_items')
delete_orphans('inventory_units')
end
def self.delete_orphans(table_name)
execute("delete from #{table_name} where order_id not in (select id from orders)")
end
def self.down
end
end | 4 | 0.222222 | 4 | 0 |
2832abadcb672888a1411104ebdcd6e4bf97b0ba | addon/components/techno-table.js | addon/components/techno-table.js | import Ember from 'ember';
import layout from '../templates/components/techno-table';
import ColumnSpec from '../lib/column-spec';
export default Ember.Component.extend({
layout: layout,
columnSpecs: Ember.computed('columns', function() {
let cols = this.get('columns');
let specs = Ember.A();
for (let c of cols) {
let s = ColumnSpec.create(c);
specs.push(s);
}
return specs;
}),
actions: {
showCreateComponent: function(obj) {
this.set('newObj', obj);
this.set('showCreate',true);
},
newObjChanged: function() {
this.get('objModified')(this.get('newObj'));
}
}
});
| import Ember from 'ember';
import layout from '../templates/components/techno-table';
import ColumnSpec from '../lib/column-spec';
export default Ember.Component.extend({
layout: layout,
columnSpecs: Ember.computed('columns', function() {
let cols = this.get('columns');
let specs = Ember.A();
for (let c of cols) {
let s = ColumnSpec.create(c);
specs.push(s);
}
return specs;
}),
actions: {
showCreateComponent: function(obj) {
this.set('newObj', obj);
this.set('showCreate',true);
},
newObjChanged: function(obj) {
this.get('objModified')(obj);
}
}
});
| Use passed object in objChanged rather than table held version, to pass along the change set | Use passed object in objChanged rather than table held version, to pass along the change set
| JavaScript | mit | technomage/ember-techno-table,technomage/ember-techno-table | javascript | ## Code Before:
import Ember from 'ember';
import layout from '../templates/components/techno-table';
import ColumnSpec from '../lib/column-spec';
export default Ember.Component.extend({
layout: layout,
columnSpecs: Ember.computed('columns', function() {
let cols = this.get('columns');
let specs = Ember.A();
for (let c of cols) {
let s = ColumnSpec.create(c);
specs.push(s);
}
return specs;
}),
actions: {
showCreateComponent: function(obj) {
this.set('newObj', obj);
this.set('showCreate',true);
},
newObjChanged: function() {
this.get('objModified')(this.get('newObj'));
}
}
});
## Instruction:
Use passed object in objChanged rather than table held version, to pass along the change set
## Code After:
import Ember from 'ember';
import layout from '../templates/components/techno-table';
import ColumnSpec from '../lib/column-spec';
export default Ember.Component.extend({
layout: layout,
columnSpecs: Ember.computed('columns', function() {
let cols = this.get('columns');
let specs = Ember.A();
for (let c of cols) {
let s = ColumnSpec.create(c);
specs.push(s);
}
return specs;
}),
actions: {
showCreateComponent: function(obj) {
this.set('newObj', obj);
this.set('showCreate',true);
},
newObjChanged: function(obj) {
this.get('objModified')(obj);
}
}
});
| import Ember from 'ember';
import layout from '../templates/components/techno-table';
import ColumnSpec from '../lib/column-spec';
export default Ember.Component.extend({
layout: layout,
columnSpecs: Ember.computed('columns', function() {
let cols = this.get('columns');
let specs = Ember.A();
for (let c of cols) {
let s = ColumnSpec.create(c);
specs.push(s);
}
return specs;
}),
actions: {
showCreateComponent: function(obj) {
this.set('newObj', obj);
this.set('showCreate',true);
},
- newObjChanged: function() {
+ newObjChanged: function(obj) {
? +++
- this.get('objModified')(this.get('newObj'));
? ^^^^^^^^^^^^^^ --
+ this.get('objModified')(obj);
? ^
}
}
}); | 4 | 0.16 | 2 | 2 |
dcd5462db00480da82ea3b12f5397aba7330de30 | v-ol2/src/main/java/org/vaadin/vol/client/OpenLayersMapState.java | v-ol2/src/main/java/org/vaadin/vol/client/OpenLayersMapState.java | package org.vaadin.vol.client;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;
import java.util.*;
public class OpenLayersMapState extends AbstractComponentState {
public List<Connector> layers = new LinkedList<Connector>();
public Point center;
public int zoom = 3;
public Bounds bounds = Bounds.WORLD;
public Connector baseLayer;
public String jsMapOptions;
public Bounds zoomToExtent;
public Bounds restrictedExtent;
public String projection;
public Set<String> controls = new HashSet<String>();
public List<ContextMenuAction> actions = new ArrayList<ContextMenuAction>();
}
| package org.vaadin.vol.client;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;
import java.util.*;
public class OpenLayersMapState extends AbstractComponentState {
public List<Connector> layers = new LinkedList<Connector>();
public Point center;
public int zoom = 3;
public Bounds bounds = Bounds.WORLD;
public Connector baseLayer;
public String jsMapOptions;
public Bounds zoomToExtent;
public Bounds restrictedExtent;
public String projection = "EPSG:4326";
public Set<String> controls = new HashSet<String>();
public List<ContextMenuAction> actions = new ArrayList<ContextMenuAction>();
}
| Set map default project to null (same way as addon's Vaadin 6 version works) | Set map default project to null (same way as addon's Vaadin 6 version works)
| Java | apache-2.0 | markathomas/v-ol2,markathomas/v-ol2 | java | ## Code Before:
package org.vaadin.vol.client;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;
import java.util.*;
public class OpenLayersMapState extends AbstractComponentState {
public List<Connector> layers = new LinkedList<Connector>();
public Point center;
public int zoom = 3;
public Bounds bounds = Bounds.WORLD;
public Connector baseLayer;
public String jsMapOptions;
public Bounds zoomToExtent;
public Bounds restrictedExtent;
public String projection;
public Set<String> controls = new HashSet<String>();
public List<ContextMenuAction> actions = new ArrayList<ContextMenuAction>();
}
## Instruction:
Set map default project to null (same way as addon's Vaadin 6 version works)
## Code After:
package org.vaadin.vol.client;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;
import java.util.*;
public class OpenLayersMapState extends AbstractComponentState {
public List<Connector> layers = new LinkedList<Connector>();
public Point center;
public int zoom = 3;
public Bounds bounds = Bounds.WORLD;
public Connector baseLayer;
public String jsMapOptions;
public Bounds zoomToExtent;
public Bounds restrictedExtent;
public String projection = "EPSG:4326";
public Set<String> controls = new HashSet<String>();
public List<ContextMenuAction> actions = new ArrayList<ContextMenuAction>();
}
| package org.vaadin.vol.client;
import com.vaadin.shared.AbstractComponentState;
import com.vaadin.shared.Connector;
import java.util.*;
public class OpenLayersMapState extends AbstractComponentState {
public List<Connector> layers = new LinkedList<Connector>();
public Point center;
public int zoom = 3;
public Bounds bounds = Bounds.WORLD;
public Connector baseLayer;
public String jsMapOptions;
public Bounds zoomToExtent;
public Bounds restrictedExtent;
- public String projection;
+ public String projection = "EPSG:4326";
? ++++++++++++++
public Set<String> controls = new HashSet<String>();
public List<ContextMenuAction> actions = new ArrayList<ContextMenuAction>();
} | 2 | 0.083333 | 1 | 1 |
16c8f23cd6ad9f9a10592bb40d1a18eb2c673d34 | common.py | common.py | import mechanize
import os
class McGillException(Exception):
pass
urls = {
'login': 'twbkwbis.P_WWWLogin',
'transcript': 'bzsktran.P_Display_Form?user_type=S&tran_type=V'
}
_base_url = 'https://banweb.mcgill.ca/pban1/%s'
urls = {k: _base_url % v for k,v in urls.items()}
browser = mechanize.Browser()
def login(sid=None, pin=None):
if sid is None:
sid = os.environ.get('MCGILL_SID', None)
if pin is None:
pin = os.environ.get('MCGILL_PIN', None)
if sid is None or pin is None:
raise McGillException('McGill ID or PIN not provided.')
browser.open(urls['login'])
browser.select_form('loginform')
browser['sid'] = sid
browser['PIN'] = pin
response = browser.submit()
if 'Authorization Failure' in response.read():
raise McGillException('Invalid McGill ID or PIN.')
| import mechanize
import os
class error(Exception):
pass
urls = {
'login': 'twbkwbis.P_WWWLogin',
'transcript': 'bzsktran.P_Display_Form?user_type=S&tran_type=V'
}
_base_url = 'https://banweb.mcgill.ca/pban1/%s'
urls = {k: _base_url % v for k,v in urls.items()}
browser = mechanize.Browser()
def login(sid=None, pin=None):
if sid is None:
sid = os.environ.get('MCGILL_SID', None)
if pin is None:
pin = os.environ.get('MCGILL_PIN', None)
if sid is None or pin is None:
raise error('McGill ID or PIN not provided.')
browser.open(urls['login'])
browser.select_form('loginform')
browser['sid'] = sid
browser['PIN'] = pin
response = browser.submit()
if 'Authorization Failure' in response.read():
raise error('Invalid McGill ID or PIN.')
| Rename McGillException to error (mcgill.error) | Rename McGillException to error (mcgill.error)
| Python | mit | isbadawi/minerva | python | ## Code Before:
import mechanize
import os
class McGillException(Exception):
pass
urls = {
'login': 'twbkwbis.P_WWWLogin',
'transcript': 'bzsktran.P_Display_Form?user_type=S&tran_type=V'
}
_base_url = 'https://banweb.mcgill.ca/pban1/%s'
urls = {k: _base_url % v for k,v in urls.items()}
browser = mechanize.Browser()
def login(sid=None, pin=None):
if sid is None:
sid = os.environ.get('MCGILL_SID', None)
if pin is None:
pin = os.environ.get('MCGILL_PIN', None)
if sid is None or pin is None:
raise McGillException('McGill ID or PIN not provided.')
browser.open(urls['login'])
browser.select_form('loginform')
browser['sid'] = sid
browser['PIN'] = pin
response = browser.submit()
if 'Authorization Failure' in response.read():
raise McGillException('Invalid McGill ID or PIN.')
## Instruction:
Rename McGillException to error (mcgill.error)
## Code After:
import mechanize
import os
class error(Exception):
pass
urls = {
'login': 'twbkwbis.P_WWWLogin',
'transcript': 'bzsktran.P_Display_Form?user_type=S&tran_type=V'
}
_base_url = 'https://banweb.mcgill.ca/pban1/%s'
urls = {k: _base_url % v for k,v in urls.items()}
browser = mechanize.Browser()
def login(sid=None, pin=None):
if sid is None:
sid = os.environ.get('MCGILL_SID', None)
if pin is None:
pin = os.environ.get('MCGILL_PIN', None)
if sid is None or pin is None:
raise error('McGill ID or PIN not provided.')
browser.open(urls['login'])
browser.select_form('loginform')
browser['sid'] = sid
browser['PIN'] = pin
response = browser.submit()
if 'Authorization Failure' in response.read():
raise error('Invalid McGill ID or PIN.')
| import mechanize
import os
- class McGillException(Exception):
+ class error(Exception):
pass
urls = {
'login': 'twbkwbis.P_WWWLogin',
'transcript': 'bzsktran.P_Display_Form?user_type=S&tran_type=V'
}
_base_url = 'https://banweb.mcgill.ca/pban1/%s'
urls = {k: _base_url % v for k,v in urls.items()}
browser = mechanize.Browser()
def login(sid=None, pin=None):
if sid is None:
sid = os.environ.get('MCGILL_SID', None)
if pin is None:
pin = os.environ.get('MCGILL_PIN', None)
if sid is None or pin is None:
- raise McGillException('McGill ID or PIN not provided.')
? --------- ^^^ ^
+ raise error('McGill ID or PIN not provided.')
? ^^ ^
browser.open(urls['login'])
browser.select_form('loginform')
browser['sid'] = sid
browser['PIN'] = pin
response = browser.submit()
if 'Authorization Failure' in response.read():
- raise McGillException('Invalid McGill ID or PIN.')
? --------- ^^^ ^
+ raise error('Invalid McGill ID or PIN.')
? ^^ ^
| 6 | 0.206897 | 3 | 3 |
fcd98cc714b5a790eaf2e946c492ab4e14700568 | scripts/award_badge_to_user.py | scripts/award_badge_to_user.py |
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validators import validate_user_screen_name
from bootstrap.util import app_context
@click.command()
@click.argument('badge_slug')
@click.argument('user', callback=validate_user_screen_name)
def execute(badge_slug, user):
badge = badge_service.find_badge_by_slug(badge_slug)
if badge is None:
raise click.BadParameter('Unknown badge slug "{}".'.format(badge_slug))
click.echo('Awarding badge "{}" to user "{}" ... '
.format(badge.label, user.screen_name), nl=False)
badge_service.award_badge_to_user(badge.id, user.id)
click.secho('done.', fg='green')
if __name__ == '__main__':
config_filename = get_config_filename_from_env_or_exit()
with app_context(config_filename):
execute()
|
import click
from byceps.database import db
from byceps.services.user_badge.models.badge import Badge, BadgeID
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validators import validate_user_screen_name
from bootstrap.util import app_context
@click.command()
@click.argument('badge_slug')
@click.argument('user', callback=validate_user_screen_name)
def execute(badge_slug, user):
badge_id = find_badge_id_for_badge_slug(badge_slug)
click.echo('Awarding badge "{}" to user "{}" ... '
.format(badge_slug, user.screen_name), nl=False)
badge_service.award_badge_to_user(badge_id, user.id)
click.secho('done.', fg='green')
def find_badge_id_for_badge_slug(slug: str) -> BadgeID:
"""Finde the badge with that slug and return its ID, or raise an
error if not found.
"""
badge_id = db.session \
.query(Badge.id) \
.filter_by(slug=slug) \
.scalar()
if badge_id is None:
raise click.BadParameter('Unknown badge slug "{}".'.format(slug))
return badge_id
if __name__ == '__main__':
config_filename = get_config_filename_from_env_or_exit()
with app_context(config_filename):
execute()
| Change script to avoid creation of badge URLs to make it work outside of a *party-specific* app context | Change script to avoid creation of badge URLs to make it work outside of a *party-specific* app context
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps | python | ## Code Before:
import click
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validators import validate_user_screen_name
from bootstrap.util import app_context
@click.command()
@click.argument('badge_slug')
@click.argument('user', callback=validate_user_screen_name)
def execute(badge_slug, user):
badge = badge_service.find_badge_by_slug(badge_slug)
if badge is None:
raise click.BadParameter('Unknown badge slug "{}".'.format(badge_slug))
click.echo('Awarding badge "{}" to user "{}" ... '
.format(badge.label, user.screen_name), nl=False)
badge_service.award_badge_to_user(badge.id, user.id)
click.secho('done.', fg='green')
if __name__ == '__main__':
config_filename = get_config_filename_from_env_or_exit()
with app_context(config_filename):
execute()
## Instruction:
Change script to avoid creation of badge URLs to make it work outside of a *party-specific* app context
## Code After:
import click
from byceps.database import db
from byceps.services.user_badge.models.badge import Badge, BadgeID
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validators import validate_user_screen_name
from bootstrap.util import app_context
@click.command()
@click.argument('badge_slug')
@click.argument('user', callback=validate_user_screen_name)
def execute(badge_slug, user):
badge_id = find_badge_id_for_badge_slug(badge_slug)
click.echo('Awarding badge "{}" to user "{}" ... '
.format(badge_slug, user.screen_name), nl=False)
badge_service.award_badge_to_user(badge_id, user.id)
click.secho('done.', fg='green')
def find_badge_id_for_badge_slug(slug: str) -> BadgeID:
"""Finde the badge with that slug and return its ID, or raise an
error if not found.
"""
badge_id = db.session \
.query(Badge.id) \
.filter_by(slug=slug) \
.scalar()
if badge_id is None:
raise click.BadParameter('Unknown badge slug "{}".'.format(slug))
return badge_id
if __name__ == '__main__':
config_filename = get_config_filename_from_env_or_exit()
with app_context(config_filename):
execute()
|
import click
+ from byceps.database import db
+ from byceps.services.user_badge.models.badge import Badge, BadgeID
from byceps.services.user_badge import service as badge_service
from byceps.util.system import get_config_filename_from_env_or_exit
from bootstrap.validators import validate_user_screen_name
from bootstrap.util import app_context
@click.command()
@click.argument('badge_slug')
@click.argument('user', callback=validate_user_screen_name)
def execute(badge_slug, user):
+ badge_id = find_badge_id_for_badge_slug(badge_slug)
- badge = badge_service.find_badge_by_slug(badge_slug)
-
- if badge is None:
- raise click.BadParameter('Unknown badge slug "{}".'.format(badge_slug))
click.echo('Awarding badge "{}" to user "{}" ... '
- .format(badge.label, user.screen_name), nl=False)
? ^ ^^^^
+ .format(badge_slug, user.screen_name), nl=False)
? ^^ ^^
- badge_service.award_badge_to_user(badge.id, user.id)
? ^
+ badge_service.award_badge_to_user(badge_id, user.id)
? ^
click.secho('done.', fg='green')
+
+
+ def find_badge_id_for_badge_slug(slug: str) -> BadgeID:
+ """Finde the badge with that slug and return its ID, or raise an
+ error if not found.
+ """
+ badge_id = db.session \
+ .query(Badge.id) \
+ .filter_by(slug=slug) \
+ .scalar()
+
+ if badge_id is None:
+ raise click.BadParameter('Unknown badge slug "{}".'.format(slug))
+
+ return badge_id
if __name__ == '__main__':
config_filename = get_config_filename_from_env_or_exit()
with app_context(config_filename):
execute() | 26 | 0.83871 | 20 | 6 |
619d7e607b8357130260112ce22e370fef632dbb | releng/update-site/category.xml | releng/update-site/category.xml | <?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="/features/org.tigris.subversion.clientadapter.feature-1.10.3.jar" id="org.tigris.subversion.clientadapter.feature" version="1.10.3">
<category name="Subclipse"/>
</feature>
<feature url="/features/org.tigris.subversion.subclipse-1.10.3.jar" id="org.tigris.subversion.subclipse" version="1.10.3">
<category name="Subclipse"/>
</feature>
<category-def name="Subclipse" label="Subclipse">
<description>
Eclipse Team Provider for Subversion
</description>
</category-def>
</site> | <?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/org.tigris.subversion.subclipse_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<feature url="features/org.tigris.subversion.clientadapter.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.clientadapter.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<feature url="features/org.tigris.subversion.subclipse.graph.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse.graph.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<feature url="features/org.tigris.subversion.subclipse.mylyn.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse.mylyn.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<category-def name="Subclipse" label="Subclipse">
<description>
Eclipse Team Provider for Subversion
</description>
</category-def>
</site>
| Fix the p2 build via Maven | Fix the p2 build via Maven | XML | epl-1.0 | subclipse/subclipse,subclipse/subclipse,subclipse/subclipse | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="/features/org.tigris.subversion.clientadapter.feature-1.10.3.jar" id="org.tigris.subversion.clientadapter.feature" version="1.10.3">
<category name="Subclipse"/>
</feature>
<feature url="/features/org.tigris.subversion.subclipse-1.10.3.jar" id="org.tigris.subversion.subclipse" version="1.10.3">
<category name="Subclipse"/>
</feature>
<category-def name="Subclipse" label="Subclipse">
<description>
Eclipse Team Provider for Subversion
</description>
</category-def>
</site>
## Instruction:
Fix the p2 build via Maven
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/org.tigris.subversion.subclipse_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<feature url="features/org.tigris.subversion.clientadapter.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.clientadapter.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<feature url="features/org.tigris.subversion.subclipse.graph.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse.graph.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<feature url="features/org.tigris.subversion.subclipse.mylyn.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse.mylyn.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<category-def name="Subclipse" label="Subclipse">
<description>
Eclipse Team Provider for Subversion
</description>
</category-def>
</site>
| <?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="/features/org.tigris.subversion.clientadapter.feature-1.10.3.jar" id="org.tigris.subversion.clientadapter.feature" version="1.10.3">
+ <feature url="features/org.tigris.subversion.subclipse_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
+ <feature url="features/org.tigris.subversion.clientadapter.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.clientadapter.feature" version="4.0.0.qualifier">
+ <category name="Subclipse"/>
+ </feature>
- <feature url="/features/org.tigris.subversion.subclipse-1.10.3.jar" id="org.tigris.subversion.subclipse" version="1.10.3">
? - -- ^ ^ ^ - ^
+ <feature url="features/org.tigris.subversion.subclipse.graph.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse.graph.feature" version="4.0.0.qualifier">
? ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ ++++++++++++++ ^ ^^^^^^^^^^^
+ <category name="Subclipse"/>
+ </feature>
+ <feature url="features/org.tigris.subversion.subclipse.mylyn.feature_4.0.0.qualifier.jar" id="org.tigris.subversion.subclipse.mylyn.feature" version="4.0.0.qualifier">
<category name="Subclipse"/>
</feature>
<category-def name="Subclipse" label="Subclipse">
<description>
Eclipse Team Provider for Subversion
</description>
</category-def>
</site> | 10 | 0.714286 | 8 | 2 |
b84b3edd061f7e946c4404a555ba7544167a9a0d | zsh/local/MacBook-Pro.zsh | zsh/local/MacBook-Pro.zsh | [[ -d "/usr/texbin" ]] && path=(/usr/texbin $path)
alias dircolors=gdircolors
alias show_dot_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hide_dot_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
export PYTHONPATH=$HOME/src/hooks:$PYTHONPATH
# https://github.com/tonsky/AnyBar
function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; }
| [[ -d "/usr/texbin" ]] && path=(/usr/texbin $path)
alias dircolors=gdircolors
alias show_dot_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hide_dot_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
export PYTHONPATH=$HOME/src/hooks:$PYTHONPATH
# https://github.com/tonsky/AnyBar
function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; }
antigen bundle vagrant
antigen apply
| Add zsh local file to MBP | Add zsh local file to MBP
| Shell | mit | skk/dotfiles,skk/dotfiles | shell | ## Code Before:
[[ -d "/usr/texbin" ]] && path=(/usr/texbin $path)
alias dircolors=gdircolors
alias show_dot_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hide_dot_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
export PYTHONPATH=$HOME/src/hooks:$PYTHONPATH
# https://github.com/tonsky/AnyBar
function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; }
## Instruction:
Add zsh local file to MBP
## Code After:
[[ -d "/usr/texbin" ]] && path=(/usr/texbin $path)
alias dircolors=gdircolors
alias show_dot_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hide_dot_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
export PYTHONPATH=$HOME/src/hooks:$PYTHONPATH
# https://github.com/tonsky/AnyBar
function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; }
antigen bundle vagrant
antigen apply
| [[ -d "/usr/texbin" ]] && path=(/usr/texbin $path)
alias dircolors=gdircolors
alias show_dot_files='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hide_dot_files='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
export PYTHONPATH=$HOME/src/hooks:$PYTHONPATH
# https://github.com/tonsky/AnyBar
function anybar { echo -n $1 | nc -4u -w0 localhost ${2:-1738}; }
+
+ antigen bundle vagrant
+
+ antigen apply | 4 | 0.363636 | 4 | 0 |
1cc9400ec2d1cb6ad973a51a1725ce1c9ca138c5 | test/active_trail_test.rb | test/active_trail_test.rb | require 'test_helper'
class ActiveTrailTest < ActionView::TestCase
test "should return true if path is in active trail" do
set_path '/some-path/other-path'
assert active_trail?('/')
assert active_trail?('/some-path')
end
test "should return true if path is the same as active trail" do
set_path '/'
assert active_trail?('/')
set_path '/some-path'
assert active_trail?('/some-path')
end
test "should return false if path is not in active trail" do
set_path '/'
assert_not active_trail?('/some-path')
set_path '/some-path'
assert_not active_trail?('/other-path')
end
private
def set_path(path)
self.request = OpenStruct.new(path: path)
end
end
| require 'test_helper'
class ActiveTrailTest < ActionView::TestCase
test "should return true if path is in active trail" do
set_path '/some-path/other-path'
assert active_trail?('/')
assert active_trail?('/some-path')
end
test "should return true if path is the same as active trail" do
set_path '/'
assert active_trail?('/')
set_path '/some-path'
assert active_trail?('/some-path')
end
test "should return false if path is not in active trail" do
set_path '/'
assert !active_trail?('/some-path')
set_path '/some-path'
assert !active_trail?('/other-path')
end
private
def set_path(path)
self.request = OpenStruct.new(path: path)
end
end
| Fix assert_not error with rails 3 | Fix assert_not error with rails 3
| Ruby | mit | museways/tuning,museways/tuning,museways/tuning,mmontossi/tuning,mmontossi/tuning,mmontossi/tuning | ruby | ## Code Before:
require 'test_helper'
class ActiveTrailTest < ActionView::TestCase
test "should return true if path is in active trail" do
set_path '/some-path/other-path'
assert active_trail?('/')
assert active_trail?('/some-path')
end
test "should return true if path is the same as active trail" do
set_path '/'
assert active_trail?('/')
set_path '/some-path'
assert active_trail?('/some-path')
end
test "should return false if path is not in active trail" do
set_path '/'
assert_not active_trail?('/some-path')
set_path '/some-path'
assert_not active_trail?('/other-path')
end
private
def set_path(path)
self.request = OpenStruct.new(path: path)
end
end
## Instruction:
Fix assert_not error with rails 3
## Code After:
require 'test_helper'
class ActiveTrailTest < ActionView::TestCase
test "should return true if path is in active trail" do
set_path '/some-path/other-path'
assert active_trail?('/')
assert active_trail?('/some-path')
end
test "should return true if path is the same as active trail" do
set_path '/'
assert active_trail?('/')
set_path '/some-path'
assert active_trail?('/some-path')
end
test "should return false if path is not in active trail" do
set_path '/'
assert !active_trail?('/some-path')
set_path '/some-path'
assert !active_trail?('/other-path')
end
private
def set_path(path)
self.request = OpenStruct.new(path: path)
end
end
| require 'test_helper'
class ActiveTrailTest < ActionView::TestCase
test "should return true if path is in active trail" do
set_path '/some-path/other-path'
assert active_trail?('/')
assert active_trail?('/some-path')
end
test "should return true if path is the same as active trail" do
set_path '/'
assert active_trail?('/')
set_path '/some-path'
assert active_trail?('/some-path')
end
test "should return false if path is not in active trail" do
set_path '/'
- assert_not active_trail?('/some-path')
? ----
+ assert !active_trail?('/some-path')
? +
set_path '/some-path'
- assert_not active_trail?('/other-path')
? ----
+ assert !active_trail?('/other-path')
? +
end
private
def set_path(path)
self.request = OpenStruct.new(path: path)
end
end | 4 | 0.121212 | 2 | 2 |
193394238637f951380af66866f70ea7706239b2 | README.md | README.md | [](https://travis-ci.org/ab-vm/ab)
[](https://ci.appveyor.com/project/ab-vm/ab)
# Ab: A WASM interpreter
## Major Components
* [Ab: WASM VM](./ab/README.md)
* [Abi: Ab Interactive Interpreter](./abi/README.md)
* [Om: Object Model](./om/README.md)
* [Pith: Core Utilities](./pith/README.md)
---
Ab is built on [Eclipse OMR](https://github.com/eclipse/omr)
| [](https://travis-ci.org/ab-vm/ab)
[](https://ci.appveyor.com/project/ab-vm/ab)
# Ab: A WebAssembly Virtual Machine
## Major Components
* [Ab: WASM VM](./ab/README.md)
* [Abi: Ab Interactive Interpreter](./abi/README.md)
* [Om: GC Object Model](./om/README.md)
* [Pith: Core Utilities](./pith/README.md)
---
Ab is built on [Eclipse OMR](https://github.com/eclipse/omr)
| Update heading to match github | Update heading to match github
[ci skip] documentation change
Signed-off-by: Robert Young <42c59959a3f4413d6a1b4d7b4f99db457d199e49@gmail.com>
| Markdown | apache-2.0 | ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab | markdown | ## Code Before:
[](https://travis-ci.org/ab-vm/ab)
[](https://ci.appveyor.com/project/ab-vm/ab)
# Ab: A WASM interpreter
## Major Components
* [Ab: WASM VM](./ab/README.md)
* [Abi: Ab Interactive Interpreter](./abi/README.md)
* [Om: Object Model](./om/README.md)
* [Pith: Core Utilities](./pith/README.md)
---
Ab is built on [Eclipse OMR](https://github.com/eclipse/omr)
## Instruction:
Update heading to match github
[ci skip] documentation change
Signed-off-by: Robert Young <42c59959a3f4413d6a1b4d7b4f99db457d199e49@gmail.com>
## Code After:
[](https://travis-ci.org/ab-vm/ab)
[](https://ci.appveyor.com/project/ab-vm/ab)
# Ab: A WebAssembly Virtual Machine
## Major Components
* [Ab: WASM VM](./ab/README.md)
* [Abi: Ab Interactive Interpreter](./abi/README.md)
* [Om: GC Object Model](./om/README.md)
* [Pith: Core Utilities](./pith/README.md)
---
Ab is built on [Eclipse OMR](https://github.com/eclipse/omr)
| [](https://travis-ci.org/ab-vm/ab)
[](https://ci.appveyor.com/project/ab-vm/ab)
- # Ab: A WASM interpreter
+ # Ab: A WebAssembly Virtual Machine
## Major Components
* [Ab: WASM VM](./ab/README.md)
* [Abi: Ab Interactive Interpreter](./abi/README.md)
- * [Om: Object Model](./om/README.md)
+ * [Om: GC Object Model](./om/README.md)
? +++
* [Pith: Core Utilities](./pith/README.md)
---
Ab is built on [Eclipse OMR](https://github.com/eclipse/omr) | 4 | 0.266667 | 2 | 2 |
4b69a7859d426583c9d6e50a2695061ee0178709 | src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditormenu.directive.js | src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditormenu.directive.js | (function () {
'use strict';
function EditorMenuDirective($injector, treeService, navigationService, umbModelMapper, appState) {
function link(scope, el, attr, ctrl) {
scope.dropdown = {
isOpen: false
};
function onInit() {
getOptions();
}
//adds a handler to the context menu item click, we need to handle this differently
//depending on what the menu item is supposed to do.
scope.executeMenuItem = function (action) {
navigationService.executeMenuAction(action, scope.currentNode, scope.currentSection);
scope.dropdown.isOpen = false;
};
//callback method to go and get the options async
function getOptions() {
if (!scope.currentNode) {
return;
}
//when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
// Niels: No i think we are wrong, we should not set the currentNode, cause it represents the currentNode of interaction.
//appState.setMenuState("currentNode", scope.currentNode);
if (!scope.actions) {
treeService.getMenu({ treeNode: scope.currentNode })
.then(function (data) {
scope.actions = data.menuItems;
});
}
};
onInit();
}
var directive = {
restrict: 'E',
replace: true,
templateUrl: 'views/components/editor/umb-editor-menu.html',
link: link,
scope: {
currentNode: "=",
currentSection: "@"
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbEditorMenu', EditorMenuDirective);
})();
| (function () {
'use strict';
function EditorMenuDirective($injector, treeService, navigationService, umbModelMapper, appState) {
function link(scope, el, attr, ctrl) {
scope.dropdown = {
isOpen: false
};
function onInit() {
getOptions();
}
//adds a handler to the context menu item click, we need to handle this differently
//depending on what the menu item is supposed to do.
scope.executeMenuItem = function (action) {
navigationService.executeMenuAction(action, scope.currentNode, scope.currentSection);
scope.dropdown.isOpen = false;
};
//callback method to go and get the options async
function getOptions() {
if (!scope.currentNode) {
return;
}
//when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
//- otherwise we break any tree dialog that works with the current node (and that's pretty much all of them)
appState.setMenuState("currentNode", scope.currentNode);
if (!scope.actions) {
treeService.getMenu({ treeNode: scope.currentNode })
.then(function (data) {
scope.actions = data.menuItems;
});
}
};
onInit();
}
var directive = {
restrict: 'E',
replace: true,
templateUrl: 'views/components/editor/umb-editor-menu.html',
link: link,
scope: {
currentNode: "=",
currentSection: "@"
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbEditorMenu', EditorMenuDirective);
})();
| Make sure the app menu state is set | Make sure the app menu state is set
| JavaScript | mit | arknu/Umbraco-CMS,KevinJump/Umbraco-CMS,leekelleher/Umbraco-CMS,abjerner/Umbraco-CMS,hfloyd/Umbraco-CMS,abryukhov/Umbraco-CMS,hfloyd/Umbraco-CMS,KevinJump/Umbraco-CMS,robertjf/Umbraco-CMS,tcmorris/Umbraco-CMS,mattbrailsford/Umbraco-CMS,NikRimington/Umbraco-CMS,robertjf/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,rasmuseeg/Umbraco-CMS,arknu/Umbraco-CMS,dawoe/Umbraco-CMS,tcmorris/Umbraco-CMS,bjarnef/Umbraco-CMS,marcemarc/Umbraco-CMS,leekelleher/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,abjerner/Umbraco-CMS,dawoe/Umbraco-CMS,bjarnef/Umbraco-CMS,tcmorris/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,abjerner/Umbraco-CMS,madsoulswe/Umbraco-CMS,tcmorris/Umbraco-CMS,leekelleher/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,dawoe/Umbraco-CMS,bjarnef/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,robertjf/Umbraco-CMS,arknu/Umbraco-CMS,arknu/Umbraco-CMS,rasmuseeg/Umbraco-CMS,marcemarc/Umbraco-CMS,robertjf/Umbraco-CMS,hfloyd/Umbraco-CMS,mattbrailsford/Umbraco-CMS,rasmuseeg/Umbraco-CMS,leekelleher/Umbraco-CMS,umbraco/Umbraco-CMS,mattbrailsford/Umbraco-CMS,dawoe/Umbraco-CMS,madsoulswe/Umbraco-CMS,NikRimington/Umbraco-CMS,madsoulswe/Umbraco-CMS,NikRimington/Umbraco-CMS,abjerner/Umbraco-CMS,marcemarc/Umbraco-CMS,marcemarc/Umbraco-CMS,dawoe/Umbraco-CMS,abryukhov/Umbraco-CMS,KevinJump/Umbraco-CMS,tcmorris/Umbraco-CMS,hfloyd/Umbraco-CMS,leekelleher/Umbraco-CMS,tcmorris/Umbraco-CMS,abryukhov/Umbraco-CMS,mattbrailsford/Umbraco-CMS,umbraco/Umbraco-CMS,bjarnef/Umbraco-CMS,umbraco/Umbraco-CMS,umbraco/Umbraco-CMS,KevinJump/Umbraco-CMS,abryukhov/Umbraco-CMS,KevinJump/Umbraco-CMS,hfloyd/Umbraco-CMS,robertjf/Umbraco-CMS,marcemarc/Umbraco-CMS | javascript | ## Code Before:
(function () {
'use strict';
function EditorMenuDirective($injector, treeService, navigationService, umbModelMapper, appState) {
function link(scope, el, attr, ctrl) {
scope.dropdown = {
isOpen: false
};
function onInit() {
getOptions();
}
//adds a handler to the context menu item click, we need to handle this differently
//depending on what the menu item is supposed to do.
scope.executeMenuItem = function (action) {
navigationService.executeMenuAction(action, scope.currentNode, scope.currentSection);
scope.dropdown.isOpen = false;
};
//callback method to go and get the options async
function getOptions() {
if (!scope.currentNode) {
return;
}
//when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
// Niels: No i think we are wrong, we should not set the currentNode, cause it represents the currentNode of interaction.
//appState.setMenuState("currentNode", scope.currentNode);
if (!scope.actions) {
treeService.getMenu({ treeNode: scope.currentNode })
.then(function (data) {
scope.actions = data.menuItems;
});
}
};
onInit();
}
var directive = {
restrict: 'E',
replace: true,
templateUrl: 'views/components/editor/umb-editor-menu.html',
link: link,
scope: {
currentNode: "=",
currentSection: "@"
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbEditorMenu', EditorMenuDirective);
})();
## Instruction:
Make sure the app menu state is set
## Code After:
(function () {
'use strict';
function EditorMenuDirective($injector, treeService, navigationService, umbModelMapper, appState) {
function link(scope, el, attr, ctrl) {
scope.dropdown = {
isOpen: false
};
function onInit() {
getOptions();
}
//adds a handler to the context menu item click, we need to handle this differently
//depending on what the menu item is supposed to do.
scope.executeMenuItem = function (action) {
navigationService.executeMenuAction(action, scope.currentNode, scope.currentSection);
scope.dropdown.isOpen = false;
};
//callback method to go and get the options async
function getOptions() {
if (!scope.currentNode) {
return;
}
//when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
//- otherwise we break any tree dialog that works with the current node (and that's pretty much all of them)
appState.setMenuState("currentNode", scope.currentNode);
if (!scope.actions) {
treeService.getMenu({ treeNode: scope.currentNode })
.then(function (data) {
scope.actions = data.menuItems;
});
}
};
onInit();
}
var directive = {
restrict: 'E',
replace: true,
templateUrl: 'views/components/editor/umb-editor-menu.html',
link: link,
scope: {
currentNode: "=",
currentSection: "@"
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbEditorMenu', EditorMenuDirective);
})();
| (function () {
'use strict';
function EditorMenuDirective($injector, treeService, navigationService, umbModelMapper, appState) {
function link(scope, el, attr, ctrl) {
scope.dropdown = {
isOpen: false
};
function onInit() {
getOptions();
}
//adds a handler to the context menu item click, we need to handle this differently
//depending on what the menu item is supposed to do.
scope.executeMenuItem = function (action) {
navigationService.executeMenuAction(action, scope.currentNode, scope.currentSection);
scope.dropdown.isOpen = false;
};
//callback method to go and get the options async
function getOptions() {
if (!scope.currentNode) {
return;
}
//when the options item is selected, we need to set the current menu item in appState (since this is synonymous with a menu)
- // Niels: No i think we are wrong, we should not set the currentNode, cause it represents the currentNode of interaction.
+ //- otherwise we break any tree dialog that works with the current node (and that's pretty much all of them)
- //appState.setMenuState("currentNode", scope.currentNode);
? --
+ appState.setMenuState("currentNode", scope.currentNode);
if (!scope.actions) {
treeService.getMenu({ treeNode: scope.currentNode })
.then(function (data) {
scope.actions = data.menuItems;
});
}
};
onInit();
}
var directive = {
restrict: 'E',
replace: true,
templateUrl: 'views/components/editor/umb-editor-menu.html',
link: link,
scope: {
currentNode: "=",
currentSection: "@"
}
};
return directive;
}
angular.module('umbraco.directives').directive('umbEditorMenu', EditorMenuDirective);
})(); | 4 | 0.0625 | 2 | 2 |
fca32eb6c5b41e4f19a25b7b246c4a8a3d763667 | activerecord/lib/active_record/notifications.rb | activerecord/lib/active_record/notifications.rb | require 'active_support/notifications'
ActiveSupport::Notifications.subscribe("sql") do |event|
ActiveRecord::Base.connection.log_info(event.payload[:sql], event.payload[:name], event.duration)
end
| require 'active_support/notifications'
ActiveSupport::Notifications.subscribe("sql") do |name, before, after, result, instrumenter_id, payload|
ActiveRecord::Base.connection.log_info(payload[:sql], name, after - before)
end
| Update AR logger subscriber for Notifications subscriber args change | Update AR logger subscriber for Notifications subscriber args change
| Ruby | mit | pschambacher/rails,repinel/rails,prathamesh-sonpatki/rails,rossta/rails,illacceptanything/illacceptanything,kamipo/rails,rafaelfranca/omg-rails,gavingmiller/rails,georgeclaghorn/rails,MichaelSp/rails,kmcphillips/rails,schuetzm/rails,iainbeeston/rails,felipecvo/rails,mijoharas/rails,mohitnatoo/rails,kmcphillips/rails,tgxworld/rails,88rabbit/newRails,lucasmazza/rails,Stellenticket/rails,ledestin/rails,betesh/rails,voray/rails,shioyama/rails,vassilevsky/rails,deraru/rails,amoody2108/TechForJustice,Erol/rails,flanger001/rails,lcreid/rails,printercu/rails,notapatch/rails,notapatch/rails,rbhitchcock/rails,kmcphillips/rails,georgeclaghorn/rails,travisofthenorth/rails,utilum/rails,mtsmfm/railstest,eileencodes/rails,starknx/rails,kamipo/rails,maicher/rails,tjschuck/rails,repinel/rails,palkan/rails,Sen-Zhang/rails,Edouard-chin/rails,alecspopa/rails,schuetzm/rails,illacceptanything/illacceptanything,Vasfed/rails,ngpestelos/rails,gfvcastro/rails,repinel/rails,riseshia/railsguides.kr,arjes/rails,flanger001/rails,illacceptanything/illacceptanything,sergey-alekseev/rails,illacceptanything/illacceptanything,fabianoleittes/rails,mtsmfm/rails,bogdanvlviv/rails,stefanmb/rails,elfassy/rails,brchristian/rails,riseshia/railsguides.kr,MSP-Greg/rails,Envek/rails,bogdanvlviv/rails,mohitnatoo/rails,matrinox/rails,yasslab/railsguides.jp,iainbeeston/rails,assain/rails,esparta/rails,baerjam/rails,mathieujobin/reduced-rails-for-travis,maicher/rails,baerjam/rails,gauravtiwari/rails,tjschuck/rails,gfvcastro/rails,Erol/rails,felipecvo/rails,odedniv/rails,marklocklear/rails,yawboakye/rails,yalab/rails,jeremy/rails,travisofthenorth/rails,vassilevsky/rails,vipulnsward/rails,untidy-hair/rails,brchristian/rails,sergey-alekseev/rails,kmayer/rails,flanger001/rails,yalab/rails,kenta-s/rails,EmmaB/rails-1,printercu/rails,sealocal/rails,kaspth/rails,assain/rails,xlymian/rails,richseviora/rails,MichaelSp/rails,tjschuck/rails,eileencodes/rails,iainbeeston/rails,tijwelch/rails,utilum/rails,travisofthenorth/rails,Edouard-chin/rails,shioyama/rails,bogdanvlviv/rails,Vasfed/rails,notapatch/rails,riseshia/railsguides.kr,yahonda/rails,matrinox/rails,pschambacher/rails,MSP-Greg/rails,MSP-Greg/rails,mtsmfm/rails,yawboakye/rails,untidy-hair/rails,kirs/rails-1,ttanimichi/rails,joonyou/rails,illacceptanything/illacceptanything,Sen-Zhang/rails,baerjam/rails,Envek/rails,rbhitchcock/rails,kmayer/rails,felipecvo/rails,88rabbit/newRails,kenta-s/rails,bradleypriest/rails,rails/rails,yasslab/railsguides.jp,rbhitchcock/rails,esparta/rails,tijwelch/rails,kenta-s/rails,coreyward/rails,bolek/rails,Vasfed/rails,palkan/rails,prathamesh-sonpatki/rails,illacceptanything/illacceptanything,elfassy/rails,gcourtemanche/rails,gfvcastro/rails,Erol/rails,illacceptanything/illacceptanything,arunagw/rails,ttanimichi/rails,stefanmb/rails,illacceptanything/illacceptanything,deraru/rails,mijoharas/rails,ngpestelos/rails,maicher/rails,illacceptanything/illacceptanything,fabianoleittes/rails,prathamesh-sonpatki/rails,rossta/rails,yalab/rails,mathieujobin/reduced-rails-for-travis,EmmaB/rails-1,xlymian/rails,bradleypriest/rails,kachick/rails,fabianoleittes/rails,gfvcastro/rails,Erol/rails,lcreid/rails,Sen-Zhang/rails,tgxworld/rails,kachick/rails,arunagw/rails,vassilevsky/rails,travisofthenorth/rails,mechanicles/rails,eileencodes/rails,samphilipd/rails,yhirano55/rails,gauravtiwari/rails,mechanicles/rails,coreyward/rails,esparta/rails,kamipo/rails,arunagw/rails,fabianoleittes/rails,koic/rails,alecspopa/rails,stefanmb/rails,Stellenticket/rails,starknx/rails,starknx/rails,eileencodes/rails,jeremy/rails,aditya-kapoor/rails,mechanicles/rails,Edouard-chin/rails,sergey-alekseev/rails,koic/rails,kaspth/rails,hanystudy/rails,MSP-Greg/rails,ngpestelos/rails,schuetzm/rails,ledestin/rails,illacceptanything/illacceptanything,betesh/rails,gavingmiller/rails,yhirano55/rails,ttanimichi/rails,Vasfed/rails,yawboakye/rails,hanystudy/rails,rossta/rails,lucasmazza/rails,Edouard-chin/rails,Spin42/rails,Envek/rails,rafaelfranca/omg-rails,ledestin/rails,riseshia/railsguides.kr,sealocal/rails,jeremy/rails,richseviora/rails,deraru/rails,palkan/rails,shioyama/rails,BlakeWilliams/rails,Stellenticket/rails,aditya-kapoor/rails,kirs/rails-1,mijoharas/rails,yahonda/rails,kmcphillips/rails,vipulnsward/rails,marklocklear/rails,mathieujobin/reduced-rails-for-travis,Spin42/rails,yawboakye/rails,sealocal/rails,lcreid/rails,rails/rails,mtsmfm/rails,kachick/rails,gcourtemanche/rails,brchristian/rails,iainbeeston/rails,voray/rails,aditya-kapoor/rails,odedniv/rails,kddeisz/rails,kirs/rails-1,yhirano55/rails,rafaelfranca/omg-rails,kddeisz/rails,repinel/rails,lcreid/rails,notapatch/rails,illacceptanything/illacceptanything,lucasmazza/rails,utilum/rails,Stellenticket/rails,amoody2108/TechForJustice,prathamesh-sonpatki/rails,yasslab/railsguides.jp,jeremy/rails,bolek/rails,gavingmiller/rails,joonyou/rails,betesh/rails,elfassy/rails,MichaelSp/rails,yhirano55/rails,arunagw/rails,illacceptanything/illacceptanything,printercu/rails,mohitnatoo/rails,kmayer/rails,EmmaB/rails-1,bradleypriest/rails,pvalena/rails,mtsmfm/railstest,kddeisz/rails,illacceptanything/illacceptanything,yahonda/rails,joonyou/rails,kaspth/rails,voray/rails,arjes/rails,deraru/rails,88rabbit/newRails,palkan/rails,BlakeWilliams/rails,mtsmfm/railstest,bogdanvlviv/rails,schuetzm/rails,utilum/rails,pvalena/rails,tgxworld/rails,georgeclaghorn/rails,joonyou/rails,vipulnsward/rails,rails/rails,Envek/rails,pvalena/rails,baerjam/rails,richseviora/rails,arjes/rails,pschambacher/rails,yasslab/railsguides.jp,yahonda/rails,esparta/rails,hanystudy/rails,assain/rails,pvalena/rails,untidy-hair/rails,flanger001/rails,tgxworld/rails,printercu/rails,mechanicles/rails,tijwelch/rails,alecspopa/rails,illacceptanything/illacceptanything,odedniv/rails,vipulnsward/rails,tjschuck/rails,koic/rails,bolek/rails,yalab/rails,mohitnatoo/rails,georgeclaghorn/rails,samphilipd/rails,coreyward/rails,illacceptanything/illacceptanything,xlymian/rails,betesh/rails,Spin42/rails,BlakeWilliams/rails,matrinox/rails,aditya-kapoor/rails,amoody2108/TechForJustice,untidy-hair/rails,shioyama/rails,assain/rails,kddeisz/rails,samphilipd/rails,rails/rails,marklocklear/rails,gauravtiwari/rails,gcourtemanche/rails,BlakeWilliams/rails | ruby | ## Code Before:
require 'active_support/notifications'
ActiveSupport::Notifications.subscribe("sql") do |event|
ActiveRecord::Base.connection.log_info(event.payload[:sql], event.payload[:name], event.duration)
end
## Instruction:
Update AR logger subscriber for Notifications subscriber args change
## Code After:
require 'active_support/notifications'
ActiveSupport::Notifications.subscribe("sql") do |name, before, after, result, instrumenter_id, payload|
ActiveRecord::Base.connection.log_info(payload[:sql], name, after - before)
end
| require 'active_support/notifications'
- ActiveSupport::Notifications.subscribe("sql") do |event|
+ ActiveSupport::Notifications.subscribe("sql") do |name, before, after, result, instrumenter_id, payload|
- ActiveRecord::Base.connection.log_info(event.payload[:sql], event.payload[:name], event.duration)
? ------ --------------- - ^ ^^^^^ ^^^^^
+ ActiveRecord::Base.connection.log_info(payload[:sql], name, after - before)
? +++ ^^^^^ ^^ ^
end | 4 | 0.8 | 2 | 2 |
1045a242afbb848e10dd846afc8432ab2521a83a | zsh/zsh.d/options.zsh | zsh/zsh.d/options.zsh |
unsetopt menu_complete
unsetopt rec_exact
setopt always_to_end
unsetopt auto_cd
unsetopt auto_name_dirs
unsetopt auto_pushd
unsetopt cdable_vars
# Error on dangerous overwrite attempts (shell redirection).
# I'm not settled on this, but I'll try it for a while.
unsetopt clobber
unsetopt flow_control
# Error if glob doesn't match. Use glob*(N) to override.
setopt nomatch
setopt interactive_comments
setopt pushd_minus
# perl!
setopt rematch_pcre
|
unsetopt menu_complete
unsetopt rec_exact
setopt always_to_end
unsetopt auto_cd
unsetopt auto_name_dirs
unsetopt auto_pushd
unsetopt cdable_vars
# Error on dangerous overwrite attempts (shell redirection).
# I'm not settled on this, but I'll try it for a while.
unsetopt clobber
unsetopt flow_control
# Error if glob doesn't match. Use glob*(N) to override.
setopt nomatch
# Ignore Ctrl-D, require "exit" or "logout".
#setopt ignore_eof
setopt interactive_comments
setopt pushd_minus
# perl!
setopt rematch_pcre
# Print timing statistics for commands that take longer than this.
REPORTTIME=10
| Print timing stats if command takes longer than 10s | Print timing stats if command takes longer than 10s
| Shell | mit | rwstauner/run_control,rwstauner/run_control,rwstauner/run_control,rwstauner/run_control,rwstauner/run_control | shell | ## Code Before:
unsetopt menu_complete
unsetopt rec_exact
setopt always_to_end
unsetopt auto_cd
unsetopt auto_name_dirs
unsetopt auto_pushd
unsetopt cdable_vars
# Error on dangerous overwrite attempts (shell redirection).
# I'm not settled on this, but I'll try it for a while.
unsetopt clobber
unsetopt flow_control
# Error if glob doesn't match. Use glob*(N) to override.
setopt nomatch
setopt interactive_comments
setopt pushd_minus
# perl!
setopt rematch_pcre
## Instruction:
Print timing stats if command takes longer than 10s
## Code After:
unsetopt menu_complete
unsetopt rec_exact
setopt always_to_end
unsetopt auto_cd
unsetopt auto_name_dirs
unsetopt auto_pushd
unsetopt cdable_vars
# Error on dangerous overwrite attempts (shell redirection).
# I'm not settled on this, but I'll try it for a while.
unsetopt clobber
unsetopt flow_control
# Error if glob doesn't match. Use glob*(N) to override.
setopt nomatch
# Ignore Ctrl-D, require "exit" or "logout".
#setopt ignore_eof
setopt interactive_comments
setopt pushd_minus
# perl!
setopt rematch_pcre
# Print timing statistics for commands that take longer than this.
REPORTTIME=10
|
unsetopt menu_complete
unsetopt rec_exact
setopt always_to_end
unsetopt auto_cd
unsetopt auto_name_dirs
unsetopt auto_pushd
unsetopt cdable_vars
# Error on dangerous overwrite attempts (shell redirection).
# I'm not settled on this, but I'll try it for a while.
unsetopt clobber
unsetopt flow_control
# Error if glob doesn't match. Use glob*(N) to override.
setopt nomatch
+ # Ignore Ctrl-D, require "exit" or "logout".
+ #setopt ignore_eof
+
setopt interactive_comments
setopt pushd_minus
# perl!
setopt rematch_pcre
+
+ # Print timing statistics for commands that take longer than this.
+ REPORTTIME=10 | 6 | 0.230769 | 6 | 0 |
5c3c55c51b81f373d6a057f1f44f48853c591223 | README.md | README.md |
The `respond_with` gem is an extension of Sinatra. It is intended to
make API responses dead simple.
## Installation
`respond_with` relies on the serialize gem which is still in development
so you'll need to install that from git.
Add these lines to your application's Gemfile:
gem 'respond_with', :git => 'git://github.com/daneharrigan/respond_with.git'
gem 'serialize', :git => 'git://github.com/daneharrigan/serialize.git'
And then execute:
$ bundle
## Usage
require "sinatra"
require "respond_with"
# in a sinatra app
get "/resources/:id.?:format?" do
@resource = Resource.find(params[:id])
respond_with ResourceSerializer.new(@resource)
end
Notice we're using a `ResourceSerializer`. This is built with the
[serialize][1] gem.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
[1]: https://github.com/heroku/serialize
[2]: https://secure.travis-ci.org/daneharrigan/respond_with
|
The `respond_with` gem is an extension of Sinatra. It is intended to
make API responses dead simple.
## Installation
`respond_with` relies on the serialize gem which is still in development
so you'll need to install that from git.
Add these lines to your application's Gemfile:
gem 'respond_with', :git => 'git://github.com/daneharrigan/respond_with.git'
gem 'serialize', :git => 'git://github.com/daneharrigan/serialize.git'
And then execute:
$ bundle
## Usage
require "sinatra"
require "respond_with"
# in a sinatra app
get "/resources/:id.?:format?" do
@resource = Resource.find(params[:id])
respond_with ResourceSerializer.new(@resource)
end
Notice we're using a `ResourceSerializer`. This is built with the
[serialize][1] gem.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
[1]: https://github.com/daneharrigan/serialize
[2]: https://secure.travis-ci.org/daneharrigan/respond_with
| Update link to the serialize project | Update link to the serialize project | Markdown | mit | daneharrigan/respond_with | markdown | ## Code Before:
The `respond_with` gem is an extension of Sinatra. It is intended to
make API responses dead simple.
## Installation
`respond_with` relies on the serialize gem which is still in development
so you'll need to install that from git.
Add these lines to your application's Gemfile:
gem 'respond_with', :git => 'git://github.com/daneharrigan/respond_with.git'
gem 'serialize', :git => 'git://github.com/daneharrigan/serialize.git'
And then execute:
$ bundle
## Usage
require "sinatra"
require "respond_with"
# in a sinatra app
get "/resources/:id.?:format?" do
@resource = Resource.find(params[:id])
respond_with ResourceSerializer.new(@resource)
end
Notice we're using a `ResourceSerializer`. This is built with the
[serialize][1] gem.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
[1]: https://github.com/heroku/serialize
[2]: https://secure.travis-ci.org/daneharrigan/respond_with
## Instruction:
Update link to the serialize project
## Code After:
The `respond_with` gem is an extension of Sinatra. It is intended to
make API responses dead simple.
## Installation
`respond_with` relies on the serialize gem which is still in development
so you'll need to install that from git.
Add these lines to your application's Gemfile:
gem 'respond_with', :git => 'git://github.com/daneharrigan/respond_with.git'
gem 'serialize', :git => 'git://github.com/daneharrigan/serialize.git'
And then execute:
$ bundle
## Usage
require "sinatra"
require "respond_with"
# in a sinatra app
get "/resources/:id.?:format?" do
@resource = Resource.find(params[:id])
respond_with ResourceSerializer.new(@resource)
end
Notice we're using a `ResourceSerializer`. This is built with the
[serialize][1] gem.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
[1]: https://github.com/daneharrigan/serialize
[2]: https://secure.travis-ci.org/daneharrigan/respond_with
|
The `respond_with` gem is an extension of Sinatra. It is intended to
make API responses dead simple.
## Installation
`respond_with` relies on the serialize gem which is still in development
so you'll need to install that from git.
Add these lines to your application's Gemfile:
gem 'respond_with', :git => 'git://github.com/daneharrigan/respond_with.git'
gem 'serialize', :git => 'git://github.com/daneharrigan/serialize.git'
And then execute:
$ bundle
## Usage
require "sinatra"
require "respond_with"
# in a sinatra app
get "/resources/:id.?:format?" do
@resource = Resource.find(params[:id])
respond_with ResourceSerializer.new(@resource)
end
Notice we're using a `ResourceSerializer`. This is built with the
[serialize][1] gem.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
- [1]: https://github.com/heroku/serialize
? ^ ^^^
+ [1]: https://github.com/daneharrigan/serialize
? ++++ ^ ^^^^^
[2]: https://secure.travis-ci.org/daneharrigan/respond_with | 2 | 0.04878 | 1 | 1 |
1e86c363868b530eedb69bd6e0cf4ac08b517b6d | app/helpers/restaurants_helper.rb | app/helpers/restaurants_helper.rb | module RestaurantsHelper
include HTTParty
def search_by_location(latitude, longitude)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"latitude" => latitude,
"longitude" => longitude
}
response = HTTParty.get(
"https://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def search_by_zip(zip_code)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"location" => zip_code
}
response = HTTParty.get(
"http://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def parse_restaurant_info(restaurants_json)
restaurants = restaurants_json['businesses'].map do | restaurant |
{
"name": restaurant['name'],
"image_url": restaurant['image_url'],
"phone_number": restaurant['phone'],
"address1": restaurant['location']['address1'],
"address2": restaurant['location']['address2'],
"city": restaurant['location']['city'],
"state": restaurant['location']['state'],
"zip_code": restaurant['location']['zip_code'],
"longitude": restaurant['coordinates']['longitude'],
"latitude": restaurant['coordinates']['latitude']
}
end
end
end
| module RestaurantsHelper
include HTTParty
def search_by_location(latitude, longitude)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"latitude" => latitude,
"longitude" => longitude
}
response = HTTParty.get(
"https://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def search_by_zip(zip_code)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"location" => zip_code
}
response = HTTParty.get(
"http://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def parse_restaurant_info(restaurants_json)
restaurants = restaurants_json['businesses'].map do | restaurant |
{
"name" => restaurant['name'],
"image_url" => restaurant['image_url'],
"phone_number" => restaurant['phone'],
"address1" => restaurant['location']['address1'],
"address2" => restaurant['location']['address2'],
"city" => restaurant['location']['city'],
"state" => restaurant['location']['state'],
"zip_code" => restaurant['location']['zip_code'],
"longitude" => restaurant['coordinates']['longitude'],
"latitude" => restaurant['coordinates']['latitude']
}
end
end
end
| Change hash symbols to strings in parsed json | Change hash symbols to strings in parsed json
| Ruby | mit | meredith-jones/see-food,meredith-jones/see-food | ruby | ## Code Before:
module RestaurantsHelper
include HTTParty
def search_by_location(latitude, longitude)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"latitude" => latitude,
"longitude" => longitude
}
response = HTTParty.get(
"https://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def search_by_zip(zip_code)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"location" => zip_code
}
response = HTTParty.get(
"http://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def parse_restaurant_info(restaurants_json)
restaurants = restaurants_json['businesses'].map do | restaurant |
{
"name": restaurant['name'],
"image_url": restaurant['image_url'],
"phone_number": restaurant['phone'],
"address1": restaurant['location']['address1'],
"address2": restaurant['location']['address2'],
"city": restaurant['location']['city'],
"state": restaurant['location']['state'],
"zip_code": restaurant['location']['zip_code'],
"longitude": restaurant['coordinates']['longitude'],
"latitude": restaurant['coordinates']['latitude']
}
end
end
end
## Instruction:
Change hash symbols to strings in parsed json
## Code After:
module RestaurantsHelper
include HTTParty
def search_by_location(latitude, longitude)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"latitude" => latitude,
"longitude" => longitude
}
response = HTTParty.get(
"https://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def search_by_zip(zip_code)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"location" => zip_code
}
response = HTTParty.get(
"http://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def parse_restaurant_info(restaurants_json)
restaurants = restaurants_json['businesses'].map do | restaurant |
{
"name" => restaurant['name'],
"image_url" => restaurant['image_url'],
"phone_number" => restaurant['phone'],
"address1" => restaurant['location']['address1'],
"address2" => restaurant['location']['address2'],
"city" => restaurant['location']['city'],
"state" => restaurant['location']['state'],
"zip_code" => restaurant['location']['zip_code'],
"longitude" => restaurant['coordinates']['longitude'],
"latitude" => restaurant['coordinates']['latitude']
}
end
end
end
| module RestaurantsHelper
include HTTParty
def search_by_location(latitude, longitude)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"latitude" => latitude,
"longitude" => longitude
}
response = HTTParty.get(
"https://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def search_by_zip(zip_code)
headers = { "Authorization" => "Bearer #{ENV['YELP_ACCESS_TOKEN']}" }
query = {
"location" => zip_code
}
response = HTTParty.get(
"http://api.yelp.com/v3/businesses/search",
:query => query,
:headers => headers
)
parse_restaurant_info(response.parsed_response)
end
def parse_restaurant_info(restaurants_json)
restaurants = restaurants_json['businesses'].map do | restaurant |
{
- "name": restaurant['name'],
? ^
+ "name" => restaurant['name'],
? ^^^
- "image_url": restaurant['image_url'],
? ^
+ "image_url" => restaurant['image_url'],
? ^^^
- "phone_number": restaurant['phone'],
? ^
+ "phone_number" => restaurant['phone'],
? ^^^
- "address1": restaurant['location']['address1'],
? ^
+ "address1" => restaurant['location']['address1'],
? ^^^
- "address2": restaurant['location']['address2'],
? ^
+ "address2" => restaurant['location']['address2'],
? ^^^
- "city": restaurant['location']['city'],
? ^
+ "city" => restaurant['location']['city'],
? ^^^
- "state": restaurant['location']['state'],
? ^
+ "state" => restaurant['location']['state'],
? ^^^
- "zip_code": restaurant['location']['zip_code'],
? ^
+ "zip_code" => restaurant['location']['zip_code'],
? ^^^
- "longitude": restaurant['coordinates']['longitude'],
? ^
+ "longitude" => restaurant['coordinates']['longitude'],
? ^^^
- "latitude": restaurant['coordinates']['latitude']
? ^
+ "latitude" => restaurant['coordinates']['latitude']
? ^^^
}
end
end
end | 20 | 0.4 | 10 | 10 |
0b93e3697ea3a906e015670a9e5433d06f13c226 | doc/rds.md | doc/rds.md |
- No `SUPER` privileges.
- `gh-ost` runs should be setup use [`--assume-rbr`][assume_rbr_docs] and use `binlog_format=ROW`.
- Aurora does not allow editing of the `read_only` parameter. While it is defined as `{TrueIfReplica}`, the parameter is non-modifiable field.
|
- No `SUPER` privileges.
- `gh-ost` runs should be setup use [`--assume-rbr`][assume_rbr_docs] and use `binlog_format=ROW`.
- Aurora does not allow editing of the `read_only` parameter. While it is defined as `{TrueIfReplica}`, the parameter is non-modifiable field.
## Aurora
#### Replication
In Aurora replication, you have separate reader and writer endpoints however because the cluster shares the underlying storage layer, `gh-ost` will detect it is running on the master. This becomes an issue when you wish to use [migrate/test on replica][migrate_test_on_replica_docs] because you won't be able to use a single cluster in the same way you would with MySQL RDS.
To work around this, you can follow along the [AWS replication between clusters documentation][aws_replication_docs] for Aurora with one small caveat. For the "Create a Snapshot of Your Replication Master" step, the binlog position is not available in the AWS console. You will need to issue the SQL query `SHOW SLAVE STATUS` or `aws rds describe-events` API call to get the correct position.
[migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica
[aws_replication_docs]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Overview.Replication.MySQLReplication.html | Add notes for aurora replication | Add notes for aurora replication
Due to the way aurora is architected, replication means something
slightly different to the traditional sense. This includes a work
around to use test/migrate on replica instead of only master migrations.
| Markdown | mit | wfxiang08/gh-ost,shuhaowu/gh-ost,shuhaowu/gh-ost,druud62/gh-ost,druud62/gh-ost,wfxiang08/gh-ost | markdown | ## Code Before:
- No `SUPER` privileges.
- `gh-ost` runs should be setup use [`--assume-rbr`][assume_rbr_docs] and use `binlog_format=ROW`.
- Aurora does not allow editing of the `read_only` parameter. While it is defined as `{TrueIfReplica}`, the parameter is non-modifiable field.
## Instruction:
Add notes for aurora replication
Due to the way aurora is architected, replication means something
slightly different to the traditional sense. This includes a work
around to use test/migrate on replica instead of only master migrations.
## Code After:
- No `SUPER` privileges.
- `gh-ost` runs should be setup use [`--assume-rbr`][assume_rbr_docs] and use `binlog_format=ROW`.
- Aurora does not allow editing of the `read_only` parameter. While it is defined as `{TrueIfReplica}`, the parameter is non-modifiable field.
## Aurora
#### Replication
In Aurora replication, you have separate reader and writer endpoints however because the cluster shares the underlying storage layer, `gh-ost` will detect it is running on the master. This becomes an issue when you wish to use [migrate/test on replica][migrate_test_on_replica_docs] because you won't be able to use a single cluster in the same way you would with MySQL RDS.
To work around this, you can follow along the [AWS replication between clusters documentation][aws_replication_docs] for Aurora with one small caveat. For the "Create a Snapshot of Your Replication Master" step, the binlog position is not available in the AWS console. You will need to issue the SQL query `SHOW SLAVE STATUS` or `aws rds describe-events` API call to get the correct position.
[migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica
[aws_replication_docs]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Overview.Replication.MySQLReplication.html |
- No `SUPER` privileges.
- `gh-ost` runs should be setup use [`--assume-rbr`][assume_rbr_docs] and use `binlog_format=ROW`.
- Aurora does not allow editing of the `read_only` parameter. While it is defined as `{TrueIfReplica}`, the parameter is non-modifiable field.
+
+ ## Aurora
+
+ #### Replication
+
+ In Aurora replication, you have separate reader and writer endpoints however because the cluster shares the underlying storage layer, `gh-ost` will detect it is running on the master. This becomes an issue when you wish to use [migrate/test on replica][migrate_test_on_replica_docs] because you won't be able to use a single cluster in the same way you would with MySQL RDS.
+
+ To work around this, you can follow along the [AWS replication between clusters documentation][aws_replication_docs] for Aurora with one small caveat. For the "Create a Snapshot of Your Replication Master" step, the binlog position is not available in the AWS console. You will need to issue the SQL query `SHOW SLAVE STATUS` or `aws rds describe-events` API call to get the correct position.
+
+ [migrate_test_on_replica_docs]: https://github.com/github/gh-ost/blob/master/doc/cheatsheet.md#c-migratetest-on-replica
+ [aws_replication_docs]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Overview.Replication.MySQLReplication.html | 11 | 2.75 | 11 | 0 |
bb94dc19275addde8bcacb6c000f3f514939bbbd | documentation/manual/working/commonGuide/build/sbtSettings.md | documentation/manual/working/commonGuide/build/sbtSettings.md | <!--- Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> -->
# About sbt Settings
## About sbt settings
The `build.sbt` file defines settings for your project. You can also define your own custom settings for your project, as described in the [sbt documentation](https://www.scala-sbt.org). In particular, it helps to be familiar with the [settings](https://www.scala-sbt.org/release/docs/Getting-Started/More-About-Settings) in sbt.
To set a basic setting, use the `:=` operator:
```scala
confDirectory := "myConfFolder"
```
## Default settings for Java applications
Play defines a default set of settings suitable for Java-based applications. To enable them add the `PlayJava` plugin via your project's enablePlugins method. These settings mostly define the default imports for generated templates e.g. importing `java.lang.*` so types like `Long` are the Java ones by default instead of the Scala ones. `play.Project.playJavaSettings` also imports `java.util.*` so that the default collection library will be the Java one.
## Default settings for Scala applications
Play defines a default set of settings suitable for Scala-based applications. To enable them add the `PlayScala` plugin via your project's enablePlugins method. These default settings define the default imports for generated templates (such as internationalized messages, and core APIs).
| <!--- Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> -->
# About sbt Settings
## About sbt settings
The `build.sbt` file defines settings for your project. You can also define your own custom settings for your project, as described in the [sbt documentation](https://www.scala-sbt.org/1.x/docs/index.html). In particular, it helps to be familiar with the [settings](https://www.scala-sbt.org/1.x/docs/Settings-Core.html) in sbt.
To set a basic setting, use the `:=` operator:
```scala
confDirectory := "myConfFolder"
```
## Default settings for Java applications
Play defines a default set of settings suitable for Java-based applications. To enable them add the `PlayJava` plugin via your project's enablePlugins method. These settings mostly define the default imports for generated templates e.g. importing `java.lang.*` so types like `Long` are the Java ones by default instead of the Scala ones. `play.Project.playJavaSettings` also imports `java.util.*` so that the default collection library will be the Java one.
## Default settings for Scala applications
Play defines a default set of settings suitable for Scala-based applications. To enable them add the `PlayScala` plugin via your project's enablePlugins method. These default settings define the default imports for generated templates (such as internationalized messages, and core APIs).
| Fix broken link to sbt documentation | Fix broken link to sbt documentation
Fixes #9595 | Markdown | apache-2.0 | mkurz/playframework,marcospereira/playframework,wegtam/playframework,benmccann/playframework,marcospereira/playframework,playframework/playframework,marcospereira/playframework,playframework/playframework,playframework/playframework,benmccann/playframework,marcospereira/playframework,mkurz/playframework,wegtam/playframework,benmccann/playframework,mkurz/playframework,wegtam/playframework,benmccann/playframework,wegtam/playframework,mkurz/playframework | markdown | ## Code Before:
<!--- Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> -->
# About sbt Settings
## About sbt settings
The `build.sbt` file defines settings for your project. You can also define your own custom settings for your project, as described in the [sbt documentation](https://www.scala-sbt.org). In particular, it helps to be familiar with the [settings](https://www.scala-sbt.org/release/docs/Getting-Started/More-About-Settings) in sbt.
To set a basic setting, use the `:=` operator:
```scala
confDirectory := "myConfFolder"
```
## Default settings for Java applications
Play defines a default set of settings suitable for Java-based applications. To enable them add the `PlayJava` plugin via your project's enablePlugins method. These settings mostly define the default imports for generated templates e.g. importing `java.lang.*` so types like `Long` are the Java ones by default instead of the Scala ones. `play.Project.playJavaSettings` also imports `java.util.*` so that the default collection library will be the Java one.
## Default settings for Scala applications
Play defines a default set of settings suitable for Scala-based applications. To enable them add the `PlayScala` plugin via your project's enablePlugins method. These default settings define the default imports for generated templates (such as internationalized messages, and core APIs).
## Instruction:
Fix broken link to sbt documentation
Fixes #9595
## Code After:
<!--- Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> -->
# About sbt Settings
## About sbt settings
The `build.sbt` file defines settings for your project. You can also define your own custom settings for your project, as described in the [sbt documentation](https://www.scala-sbt.org/1.x/docs/index.html). In particular, it helps to be familiar with the [settings](https://www.scala-sbt.org/1.x/docs/Settings-Core.html) in sbt.
To set a basic setting, use the `:=` operator:
```scala
confDirectory := "myConfFolder"
```
## Default settings for Java applications
Play defines a default set of settings suitable for Java-based applications. To enable them add the `PlayJava` plugin via your project's enablePlugins method. These settings mostly define the default imports for generated templates e.g. importing `java.lang.*` so types like `Long` are the Java ones by default instead of the Scala ones. `play.Project.playJavaSettings` also imports `java.util.*` so that the default collection library will be the Java one.
## Default settings for Scala applications
Play defines a default set of settings suitable for Scala-based applications. To enable them add the `PlayScala` plugin via your project's enablePlugins method. These default settings define the default imports for generated templates (such as internationalized messages, and core APIs).
| <!--- Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> -->
# About sbt Settings
## About sbt settings
- The `build.sbt` file defines settings for your project. You can also define your own custom settings for your project, as described in the [sbt documentation](https://www.scala-sbt.org). In particular, it helps to be familiar with the [settings](https://www.scala-sbt.org/release/docs/Getting-Started/More-About-Settings) in sbt.
? ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ The `build.sbt` file defines settings for your project. You can also define your own custom settings for your project, as described in the [sbt documentation](https://www.scala-sbt.org/1.x/docs/index.html). In particular, it helps to be familiar with the [settings](https://www.scala-sbt.org/1.x/docs/Settings-Core.html) in sbt.
? ++++++++++++++++++++ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^
To set a basic setting, use the `:=` operator:
```scala
confDirectory := "myConfFolder"
```
## Default settings for Java applications
Play defines a default set of settings suitable for Java-based applications. To enable them add the `PlayJava` plugin via your project's enablePlugins method. These settings mostly define the default imports for generated templates e.g. importing `java.lang.*` so types like `Long` are the Java ones by default instead of the Scala ones. `play.Project.playJavaSettings` also imports `java.util.*` so that the default collection library will be the Java one.
## Default settings for Scala applications
Play defines a default set of settings suitable for Scala-based applications. To enable them add the `PlayScala` plugin via your project's enablePlugins method. These default settings define the default imports for generated templates (such as internationalized messages, and core APIs). | 2 | 0.1 | 1 | 1 |
6e9e378b519e21f79d345f5048729cfa1d167e92 | src/main/resources/application.yml | src/main/resources/application.yml | spring:
jpa:
generate-ddl: true
management:
endpoints:
web:
exposure:
include: "*"
| spring:
jpa:
generate-ddl: true
management:
endpoints:
web:
exposure:
include: "*"
---
spring:
profiles:
active: mysql
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL55Dialect
| Use MySQL55Dialect for mysql dbs. | Use MySQL55Dialect for mysql dbs.
| YAML | apache-2.0 | malston/spring-music,malston/spring-music,malston/spring-music,cloudfoundry-samples/spring-music,cloudfoundry-samples/spring-music,scottfrederick/spring-music,scottfrederick/spring-music,scottfrederick/spring-music,cloudfoundry-samples/spring-music | yaml | ## Code Before:
spring:
jpa:
generate-ddl: true
management:
endpoints:
web:
exposure:
include: "*"
## Instruction:
Use MySQL55Dialect for mysql dbs.
## Code After:
spring:
jpa:
generate-ddl: true
management:
endpoints:
web:
exposure:
include: "*"
---
spring:
profiles:
active: mysql
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL55Dialect
| spring:
jpa:
generate-ddl: true
management:
endpoints:
web:
exposure:
include: "*"
+
+ ---
+ spring:
+ profiles:
+ active: mysql
+ jpa:
+ properties:
+ hibernate:
+ dialect: org.hibernate.dialect.MySQL55Dialect | 9 | 1 | 9 | 0 |
4cef3788a19b9ad7059184a39accd2b551407de4 | tests/test_benchmark.py | tests/test_benchmark.py | import os
from subprocess import check_call
import pytest
def run(command, problem, so, shape, nbpml, *extra):
args = ["python", "../benchmarks/user/benchmark.py", command]
args.extend(["-P", str(problem)])
args.extend(["-so", str(so)])
args.extend(["-d"] + [str(i) for i in shape])
args.extend(["--nbpml", str(nbpml)])
args.extend(extra)
check_call(args)
def test_test_tti():
run('test', 'tti', 4, [20, 20, 20], 5)
def test_test_acoustic():
run('test', 'acoustic', 4, [20, 20, 20], 5)
def test_run_acoustic_fixed_bs():
run('run', 'acoustic', 4, [20, 20, 20], 5, '-bs', '5', '5', '4')
| from subprocess import check_call
def run_cmd(command, problem, so, shape, nbpml, *extra):
args = ["python", "../benchmarks/user/benchmark.py", command]
args.extend(["-P", str(problem)])
args.extend(["-so", str(so)])
args.extend(["-d"] + [str(i) for i in shape])
args.extend(["--nbpml", str(nbpml)])
args.extend(extra)
check_call(args)
def test_test_tti():
run_cmd('test', 'tti', 4, [20, 20, 20], 5)
def test_test_acoustic():
run_cmd('test', 'acoustic', 4, [20, 20, 20], 5)
def test_run_acoustic_fixed_bs():
run_cmd('run', 'acoustic', 4, [20, 20, 20], 5, '-bs', '5', '5', '4')
| Check bench mode==run with fixed block shape | tests: Check bench mode==run with fixed block shape
| Python | mit | opesci/devito,opesci/devito | python | ## Code Before:
import os
from subprocess import check_call
import pytest
def run(command, problem, so, shape, nbpml, *extra):
args = ["python", "../benchmarks/user/benchmark.py", command]
args.extend(["-P", str(problem)])
args.extend(["-so", str(so)])
args.extend(["-d"] + [str(i) for i in shape])
args.extend(["--nbpml", str(nbpml)])
args.extend(extra)
check_call(args)
def test_test_tti():
run('test', 'tti', 4, [20, 20, 20], 5)
def test_test_acoustic():
run('test', 'acoustic', 4, [20, 20, 20], 5)
def test_run_acoustic_fixed_bs():
run('run', 'acoustic', 4, [20, 20, 20], 5, '-bs', '5', '5', '4')
## Instruction:
tests: Check bench mode==run with fixed block shape
## Code After:
from subprocess import check_call
def run_cmd(command, problem, so, shape, nbpml, *extra):
args = ["python", "../benchmarks/user/benchmark.py", command]
args.extend(["-P", str(problem)])
args.extend(["-so", str(so)])
args.extend(["-d"] + [str(i) for i in shape])
args.extend(["--nbpml", str(nbpml)])
args.extend(extra)
check_call(args)
def test_test_tti():
run_cmd('test', 'tti', 4, [20, 20, 20], 5)
def test_test_acoustic():
run_cmd('test', 'acoustic', 4, [20, 20, 20], 5)
def test_run_acoustic_fixed_bs():
run_cmd('run', 'acoustic', 4, [20, 20, 20], 5, '-bs', '5', '5', '4')
| - import os
from subprocess import check_call
- import pytest
-
- def run(command, problem, so, shape, nbpml, *extra):
+ def run_cmd(command, problem, so, shape, nbpml, *extra):
? ++++
args = ["python", "../benchmarks/user/benchmark.py", command]
args.extend(["-P", str(problem)])
args.extend(["-so", str(so)])
args.extend(["-d"] + [str(i) for i in shape])
args.extend(["--nbpml", str(nbpml)])
args.extend(extra)
check_call(args)
def test_test_tti():
- run('test', 'tti', 4, [20, 20, 20], 5)
+ run_cmd('test', 'tti', 4, [20, 20, 20], 5)
? ++++
def test_test_acoustic():
- run('test', 'acoustic', 4, [20, 20, 20], 5)
+ run_cmd('test', 'acoustic', 4, [20, 20, 20], 5)
? ++++
def test_run_acoustic_fixed_bs():
- run('run', 'acoustic', 4, [20, 20, 20], 5, '-bs', '5', '5', '4')
+ run_cmd('run', 'acoustic', 4, [20, 20, 20], 5, '-bs', '5', '5', '4')
? ++++
| 11 | 0.423077 | 4 | 7 |
dbf1119295394e89f271bc90cf42898b62e5b702 | views/templates.jade | views/templates.jade | script#message-template(type="text/template").
<li class="list-group-item">
<div class="media">
<div class="pull-left">
<img class="media-object" src="http://placekitten.com/80/80" alt="avatar">
</div>
<div class="media-body">
<h4 class="media-heading"><%= name || 'Guest' %></h4>
<%= marked(_.escape(message)) %>
</div>
</div>
</li>
mixin user(name)
li.list-group-item
.media
img.media-object.pull-left(src='http://placekitten.com/20/20', alt='avatar')
.media-body= name
.modal.fade#profile-modal: .modal-dialog: .modal-content
.modal-header
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
h4.modal-title Profile
.modal-body
.form-group
label(for='name-field') Name
input#name-field.form-control(type='text', placeholder='Guest')
| script#message-template(type="text/template").
<li class="list-group-item">
<div class="media">
<div class="pull-left">
<img class="media-object" src="http://placehold.it/80" alt="avatar">
</div>
<div class="media-body">
<h4 class="media-heading"><%= name || 'Guest' %></h4>
<%= marked(_.escape(message)) %>
</div>
</div>
</li>
mixin user(name)
li.list-group-item
.media
img.media-object.pull-left(src='http://placehold.it/20', alt='avatar')
.media-body= name
.modal.fade#profile-modal: .modal-dialog: .modal-content
.modal-header
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
h4.modal-title Profile
.modal-body
.form-group
label(for='name-field') Name
input#name-field.form-control(type='text', placeholder='Guest')
| Replace placekitten (which is broken :frowning:) with placehold.it | Replace placekitten (which is broken :frowning:) with placehold.it
| Jade | mit | nicolasmccurdy/ochat,nicolasmccurdy/ochat | jade | ## Code Before:
script#message-template(type="text/template").
<li class="list-group-item">
<div class="media">
<div class="pull-left">
<img class="media-object" src="http://placekitten.com/80/80" alt="avatar">
</div>
<div class="media-body">
<h4 class="media-heading"><%= name || 'Guest' %></h4>
<%= marked(_.escape(message)) %>
</div>
</div>
</li>
mixin user(name)
li.list-group-item
.media
img.media-object.pull-left(src='http://placekitten.com/20/20', alt='avatar')
.media-body= name
.modal.fade#profile-modal: .modal-dialog: .modal-content
.modal-header
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
h4.modal-title Profile
.modal-body
.form-group
label(for='name-field') Name
input#name-field.form-control(type='text', placeholder='Guest')
## Instruction:
Replace placekitten (which is broken :frowning:) with placehold.it
## Code After:
script#message-template(type="text/template").
<li class="list-group-item">
<div class="media">
<div class="pull-left">
<img class="media-object" src="http://placehold.it/80" alt="avatar">
</div>
<div class="media-body">
<h4 class="media-heading"><%= name || 'Guest' %></h4>
<%= marked(_.escape(message)) %>
</div>
</div>
</li>
mixin user(name)
li.list-group-item
.media
img.media-object.pull-left(src='http://placehold.it/20', alt='avatar')
.media-body= name
.modal.fade#profile-modal: .modal-dialog: .modal-content
.modal-header
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
h4.modal-title Profile
.modal-body
.form-group
label(for='name-field') Name
input#name-field.form-control(type='text', placeholder='Guest')
| script#message-template(type="text/template").
<li class="list-group-item">
<div class="media">
<div class="pull-left">
- <img class="media-object" src="http://placekitten.com/80/80" alt="avatar">
? ^ ----------
+ <img class="media-object" src="http://placehold.it/80" alt="avatar">
? ^^^^^
</div>
<div class="media-body">
<h4 class="media-heading"><%= name || 'Guest' %></h4>
<%= marked(_.escape(message)) %>
</div>
</div>
</li>
mixin user(name)
li.list-group-item
.media
- img.media-object.pull-left(src='http://placekitten.com/20/20', alt='avatar')
? ^ ----------
+ img.media-object.pull-left(src='http://placehold.it/20', alt='avatar')
? ^^^^^
.media-body= name
.modal.fade#profile-modal: .modal-dialog: .modal-content
.modal-header
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
h4.modal-title Profile
.modal-body
.form-group
label(for='name-field') Name
input#name-field.form-control(type='text', placeholder='Guest') | 4 | 0.137931 | 2 | 2 |
8c50245bbfcb0128b76385c4492fe6c145260bda | components/__tests__/utils.cjsx | components/__tests__/utils.cjsx | React = require('react/addons')
TestUtils = React.addons.TestUtils
module.exports =
# Generates a shallow render for a given component with properties and children
shallowRenderComponent: (component, props, children...) ->
shallowRenderer = TestUtils.createRenderer()
shallowRenderer.render(React.createElement(component, props,
children.length > 1 ? children : children[0]))
shallowRenderer.getRenderOutput()
| TestUtils = React.addons.TestUtils
module.exports =
renderComponent: (Component, props={}, state={}) ->
component = TestUtils.renderIntoDocument(<Component {...props}/>)
component.setState(state) unless state == {}
component
shallowRenderComponent: (component, props, children...) ->
shallowRenderer = TestUtils.createRenderer()
shallowRenderer.render(React.createElement(component, props,
children.length > 1 ? children : children[0]))
shallowRenderer.getRenderOutput()
| Add test helper to render into document | Add test helper to render into document
| CoffeeScript | mit | soyjavi/react-toolbox,Magneticmagnum/react-atlas,react-toolbox/react-toolbox,jasonleibowitz/react-toolbox,soyjavi/react-toolbox,react-toolbox/react-toolbox,rubenmoya/react-toolbox,showings/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,KerenChandran/react-toolbox,rubenmoya/react-toolbox,showings/react-toolbox,DigitalRiver/react-atlas,jasonleibowitz/react-toolbox,KerenChandran/react-toolbox | coffeescript | ## Code Before:
React = require('react/addons')
TestUtils = React.addons.TestUtils
module.exports =
# Generates a shallow render for a given component with properties and children
shallowRenderComponent: (component, props, children...) ->
shallowRenderer = TestUtils.createRenderer()
shallowRenderer.render(React.createElement(component, props,
children.length > 1 ? children : children[0]))
shallowRenderer.getRenderOutput()
## Instruction:
Add test helper to render into document
## Code After:
TestUtils = React.addons.TestUtils
module.exports =
renderComponent: (Component, props={}, state={}) ->
component = TestUtils.renderIntoDocument(<Component {...props}/>)
component.setState(state) unless state == {}
component
shallowRenderComponent: (component, props, children...) ->
shallowRenderer = TestUtils.createRenderer()
shallowRenderer.render(React.createElement(component, props,
children.length > 1 ? children : children[0]))
shallowRenderer.getRenderOutput()
| - React = require('react/addons')
TestUtils = React.addons.TestUtils
module.exports =
- # Generates a shallow render for a given component with properties and children
+ renderComponent: (Component, props={}, state={}) ->
+ component = TestUtils.renderIntoDocument(<Component {...props}/>)
+ component.setState(state) unless state == {}
+ component
+
shallowRenderComponent: (component, props, children...) ->
shallowRenderer = TestUtils.createRenderer()
shallowRenderer.render(React.createElement(component, props,
children.length > 1 ? children : children[0]))
shallowRenderer.getRenderOutput() | 7 | 0.7 | 5 | 2 |
48a48e519cb66838d150f9f474930946c4114967 | lib/object_json_mapper/associations/has_one.rb | lib/object_json_mapper/associations/has_one.rb | module ObjectJSONMapper
module Associations
class HasOne < Association
# @param object [ObjectJSONMapper::Base]
# @return [ObjectJSONMapper::Base]
def call(object)
klass.persist(
HTTP.parse_json(object.client[endpoint].get.body)
)
end
end
end
end
| module ObjectJSONMapper
module Associations
class HasOne < Association
# @param object [ObjectJSONMapper::Base]
# @return [ObjectJSONMapper::Base]
def call(object)
attributes = object[name]
attributes ||= HTTP.parse_json(object.client[endpoint].get.body)
klass.persist(attributes)
end
end
end
end
| Use attributes before fetching endpoint for HasOne association | Use attributes before fetching endpoint for HasOne association
| Ruby | mit | InspireNL/object_json_mapper,InspireNL/object_json_mapper | ruby | ## Code Before:
module ObjectJSONMapper
module Associations
class HasOne < Association
# @param object [ObjectJSONMapper::Base]
# @return [ObjectJSONMapper::Base]
def call(object)
klass.persist(
HTTP.parse_json(object.client[endpoint].get.body)
)
end
end
end
end
## Instruction:
Use attributes before fetching endpoint for HasOne association
## Code After:
module ObjectJSONMapper
module Associations
class HasOne < Association
# @param object [ObjectJSONMapper::Base]
# @return [ObjectJSONMapper::Base]
def call(object)
attributes = object[name]
attributes ||= HTTP.parse_json(object.client[endpoint].get.body)
klass.persist(attributes)
end
end
end
end
| module ObjectJSONMapper
module Associations
class HasOne < Association
# @param object [ObjectJSONMapper::Base]
# @return [ObjectJSONMapper::Base]
def call(object)
- klass.persist(
+ attributes = object[name]
- HTTP.parse_json(object.client[endpoint].get.body)
+ attributes ||= HTTP.parse_json(object.client[endpoint].get.body)
? ++++++++++ +++
- )
+
+ klass.persist(attributes)
end
end
end
end | 7 | 0.538462 | 4 | 3 |
19ec1ec645a1a2618e659cfb7cca081684738389 | src/HostBox/Components/PayPal/PaymentButtons/templates/default.latte | src/HostBox/Components/PayPal/PaymentButtons/templates/default.latte | <script src="{$src}?merchant={$config->merchantId}" {if $config->sandbox}data-env="sandbox"{/if} data-currency="{$config->currency}" {!$pluginSettings}></script>
| <script src="{$basePath}/js/{$src}?merchant={$config->merchantId}" {if $config->sandbox}data-env="sandbox"{/if} data-currency="{$config->currency}" {!$pluginSettings}></script>
| Fix JS path in template | Fix JS path in template
| Latte | mit | HostBox/nette-paypal-payment-buttons,HostBox/nette-paypal-payment-buttons | latte | ## Code Before:
<script src="{$src}?merchant={$config->merchantId}" {if $config->sandbox}data-env="sandbox"{/if} data-currency="{$config->currency}" {!$pluginSettings}></script>
## Instruction:
Fix JS path in template
## Code After:
<script src="{$basePath}/js/{$src}?merchant={$config->merchantId}" {if $config->sandbox}data-env="sandbox"{/if} data-currency="{$config->currency}" {!$pluginSettings}></script>
| - <script src="{$src}?merchant={$config->merchantId}" {if $config->sandbox}data-env="sandbox"{/if} data-currency="{$config->currency}" {!$pluginSettings}></script>
+ <script src="{$basePath}/js/{$src}?merchant={$config->merchantId}" {if $config->sandbox}data-env="sandbox"{/if} data-currency="{$config->currency}" {!$pluginSettings}></script>
? +++++++++++++++
| 2 | 2 | 1 | 1 |
a6bc03b09d04df24b049fa9f3e5c257b82040078 | src/Model/Game/Levels.js | src/Model/Game/Levels.js | function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
if( typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.random() * 360);
var saturation = Math.floor(this.prng.random() * 20) + 80;
this.paletteBuilder.hue = hue;
this.paletteBuilder.saturation = saturation;
var boardColors = this.paletteBuilder.build(16, this.paletteRange);
var numberColor = HSL.complement(boardColors[Math.floor(this.prng.random() * 16)]);
var levelPalette = new LevelPalette(numberColor, boardColors);
var board = Board.create(4, 4, this.prng);
board.shuffle();
var puzzle = new Puzzle(level, board);
return new Level(puzzle, levelPalette);
};
| function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
if(typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.random() * 360);
var saturation = Math.floor(this.prng.random() * 20) + 80;
this.paletteBuilder.hue = hue;
this.paletteBuilder.saturation = saturation;
var boardColors = this.paletteBuilder.build(16, this.paletteRange);
var numberColor = HSL.complement(boardColors[Math.floor(this.prng.random() * 16)]);
var levelPalette = new LevelPalette(numberColor, boardColors);
var board = Board.create(4, 4, this.prng);
board.shuffle();
var puzzle = new Puzzle(level, board);
return new Level(puzzle, levelPalette);
};
| Remove extra space from if statement | Remove extra space from if statement
| JavaScript | mit | mnito/factors-game,mnito/factors-game | javascript | ## Code Before:
function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
if( typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.random() * 360);
var saturation = Math.floor(this.prng.random() * 20) + 80;
this.paletteBuilder.hue = hue;
this.paletteBuilder.saturation = saturation;
var boardColors = this.paletteBuilder.build(16, this.paletteRange);
var numberColor = HSL.complement(boardColors[Math.floor(this.prng.random() * 16)]);
var levelPalette = new LevelPalette(numberColor, boardColors);
var board = Board.create(4, 4, this.prng);
board.shuffle();
var puzzle = new Puzzle(level, board);
return new Level(puzzle, levelPalette);
};
## Instruction:
Remove extra space from if statement
## Code After:
function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
if(typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.random() * 360);
var saturation = Math.floor(this.prng.random() * 20) + 80;
this.paletteBuilder.hue = hue;
this.paletteBuilder.saturation = saturation;
var boardColors = this.paletteBuilder.build(16, this.paletteRange);
var numberColor = HSL.complement(boardColors[Math.floor(this.prng.random() * 16)]);
var levelPalette = new LevelPalette(numberColor, boardColors);
var board = Board.create(4, 4, this.prng);
board.shuffle();
var puzzle = new Puzzle(level, board);
return new Level(puzzle, levelPalette);
};
| function Levels(prng, paletteRange, paletteBuilder) {
this.prng = prng;
this.paletteRange = paletteRange;
this.paletteBuilder = paletteBuilder;
}
Levels.prototype.get = function(level) {
- if( typeof this.prng.seed === 'function') {
? -
+ if(typeof this.prng.seed === 'function') {
this.prng.seed(level);
}
var hue = Math.floor(this.prng.random() * 360);
var saturation = Math.floor(this.prng.random() * 20) + 80;
-
+
this.paletteBuilder.hue = hue;
this.paletteBuilder.saturation = saturation;
var boardColors = this.paletteBuilder.build(16, this.paletteRange);
var numberColor = HSL.complement(boardColors[Math.floor(this.prng.random() * 16)]);
-
+
var levelPalette = new LevelPalette(numberColor, boardColors);
var board = Board.create(4, 4, this.prng);
board.shuffle();
-
+
var puzzle = new Puzzle(level, board);
-
+
return new Level(puzzle, levelPalette);
}; | 10 | 0.357143 | 5 | 5 |
fb81bdf43c25b69e61a7a2809e7ce7bf97d3b228 | config/initializers/_site_constants.rb | config/initializers/_site_constants.rb | EMAIL_URI = 'lets.gopushcart.com'
SITE_NAME = 'pushcart'
SITE_URL = 'gopushcart.com'
SECRET_KEY = Rails.application.secrets.aes_secret_key
USE_PRIVACY_HASHING = true | EMAIL_URI = Rails.env.staging? ? 'sandbox.gopushcart.com' : 'lets.gopushcart.com'
SITE_NAME = 'pushcart'
SITE_URL = Rails.env.staging? ? 'sandbox.gopushcart.com' : 'gopushcart.com'
SECRET_KEY = Rails.application.secrets.aes_secret_key
USE_PRIVACY_HASHING = true | Update e-mail and URL constants for staging server | Update e-mail and URL constants for staging server
| Ruby | apache-2.0 | smalldatalab/pushcart,smalldatalab/pushcart,smalldatalab/pushcart,smalldatalab/pushcart | ruby | ## Code Before:
EMAIL_URI = 'lets.gopushcart.com'
SITE_NAME = 'pushcart'
SITE_URL = 'gopushcart.com'
SECRET_KEY = Rails.application.secrets.aes_secret_key
USE_PRIVACY_HASHING = true
## Instruction:
Update e-mail and URL constants for staging server
## Code After:
EMAIL_URI = Rails.env.staging? ? 'sandbox.gopushcart.com' : 'lets.gopushcart.com'
SITE_NAME = 'pushcart'
SITE_URL = Rails.env.staging? ? 'sandbox.gopushcart.com' : 'gopushcart.com'
SECRET_KEY = Rails.application.secrets.aes_secret_key
USE_PRIVACY_HASHING = true | - EMAIL_URI = 'lets.gopushcart.com'
+ EMAIL_URI = Rails.env.staging? ? 'sandbox.gopushcart.com' : 'lets.gopushcart.com'
SITE_NAME = 'pushcart'
- SITE_URL = 'gopushcart.com'
+ SITE_URL = Rails.env.staging? ? 'sandbox.gopushcart.com' : 'gopushcart.com'
SECRET_KEY = Rails.application.secrets.aes_secret_key
USE_PRIVACY_HASHING = true | 4 | 0.8 | 2 | 2 |
76c3ab17f2e66873a3b52fc910482be0406c562f | metadata/me.tsukanov.counter.txt | metadata/me.tsukanov.counter.txt | Categories:Writing
License:Apache2
Web Site:https://github.com/gentlecat/Simple-Counter/blob/HEAD/README.md
Source Code:https://github.com/gentlecat/Simple-Counter/
Issue Tracker:https://github.com/gentlecat/Simple-Counter/issues
Changelog:https://github.com/gentlecat/Simple-Counter/blob/HEAD/CHANGELOG.md
Auto Name:Counter
Summary:Tally counter
Description:
Tally counter that makes counting easier. You can have multiple counters with
their own names and values. Values can be changed using volume buttons.
.
Repo Type:git
Repo:https://github.com/gentlecat/Simple-Counter/
Build:15,15
commit=f6b3445105906c9bea1a70c452b780dc8ee3276c
gradle=yes
Build:16,16
commit=v16
gradle=yes
Auto Update Mode:Version v%c
Update Check Mode:Tags
Current Version:16
Current Version Code:16
| Categories:Writing
License:Apache2
Web Site:https://github.com/gentlecat/Simple-Counter/blob/HEAD/README.md
Source Code:https://github.com/gentlecat/Simple-Counter/
Issue Tracker:https://github.com/gentlecat/Simple-Counter/issues
Changelog:https://github.com/gentlecat/Simple-Counter/blob/HEAD/CHANGELOG.md
Auto Name:Counter
Summary:Tally counter
Description:
Tally counter that makes counting easier. You can have multiple counters with
their own names and values. Values can be changed using volume buttons.
.
Repo Type:git
Repo:https://github.com/gentlecat/Simple-Counter/
Build:13,13
commit=v13
gradle=yes
Build:15,15
commit=f6b3445105906c9bea1a70c452b780dc8ee3276c
gradle=yes
Build:16,16
commit=v16
gradle=yes
Auto Update Mode:Version v%c
Update Check Mode:Tags
Current Version:13
Current Version Code:13
| Update Counter to 13 (13) | Update Counter to 13 (13)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:Writing
License:Apache2
Web Site:https://github.com/gentlecat/Simple-Counter/blob/HEAD/README.md
Source Code:https://github.com/gentlecat/Simple-Counter/
Issue Tracker:https://github.com/gentlecat/Simple-Counter/issues
Changelog:https://github.com/gentlecat/Simple-Counter/blob/HEAD/CHANGELOG.md
Auto Name:Counter
Summary:Tally counter
Description:
Tally counter that makes counting easier. You can have multiple counters with
their own names and values. Values can be changed using volume buttons.
.
Repo Type:git
Repo:https://github.com/gentlecat/Simple-Counter/
Build:15,15
commit=f6b3445105906c9bea1a70c452b780dc8ee3276c
gradle=yes
Build:16,16
commit=v16
gradle=yes
Auto Update Mode:Version v%c
Update Check Mode:Tags
Current Version:16
Current Version Code:16
## Instruction:
Update Counter to 13 (13)
## Code After:
Categories:Writing
License:Apache2
Web Site:https://github.com/gentlecat/Simple-Counter/blob/HEAD/README.md
Source Code:https://github.com/gentlecat/Simple-Counter/
Issue Tracker:https://github.com/gentlecat/Simple-Counter/issues
Changelog:https://github.com/gentlecat/Simple-Counter/blob/HEAD/CHANGELOG.md
Auto Name:Counter
Summary:Tally counter
Description:
Tally counter that makes counting easier. You can have multiple counters with
their own names and values. Values can be changed using volume buttons.
.
Repo Type:git
Repo:https://github.com/gentlecat/Simple-Counter/
Build:13,13
commit=v13
gradle=yes
Build:15,15
commit=f6b3445105906c9bea1a70c452b780dc8ee3276c
gradle=yes
Build:16,16
commit=v16
gradle=yes
Auto Update Mode:Version v%c
Update Check Mode:Tags
Current Version:13
Current Version Code:13
| Categories:Writing
License:Apache2
Web Site:https://github.com/gentlecat/Simple-Counter/blob/HEAD/README.md
Source Code:https://github.com/gentlecat/Simple-Counter/
Issue Tracker:https://github.com/gentlecat/Simple-Counter/issues
Changelog:https://github.com/gentlecat/Simple-Counter/blob/HEAD/CHANGELOG.md
Auto Name:Counter
Summary:Tally counter
Description:
Tally counter that makes counting easier. You can have multiple counters with
their own names and values. Values can be changed using volume buttons.
.
Repo Type:git
Repo:https://github.com/gentlecat/Simple-Counter/
+ Build:13,13
+ commit=v13
+ gradle=yes
+
Build:15,15
commit=f6b3445105906c9bea1a70c452b780dc8ee3276c
gradle=yes
Build:16,16
commit=v16
gradle=yes
Auto Update Mode:Version v%c
Update Check Mode:Tags
- Current Version:16
? ^
+ Current Version:13
? ^
- Current Version Code:16
? ^
+ Current Version Code:13
? ^
| 8 | 0.275862 | 6 | 2 |
a90e4ead6bd349a232c0ebe368c182107ba7843a | spec/acceptance/github/auth/cli_spec.rb | spec/acceptance/github/auth/cli_spec.rb | require 'spec_helper'
require 'support/mock_github_server'
require 'github/auth'
describe Github::Auth::CLI do
with_mock_github_server do |mock_server_hostname|
let(:hostname) { mock_server_hostname }
let(:keys_file) { Tempfile.new 'authorized_keys' }
let(:keys) { Github::Auth::MockGithubServer::KEYS }
after { keys_file.unlink }
def cli(argv)
described_class.new(argv).tap do |cli|
cli.stub(
github_hostname: hostname,
keys_file_path: keys_file.path
)
end
end
it 'adds and removes keys from the keys file' do
cli(%w(add chrishunt)).execute
keys_file.read.tap do |content|
keys.each { |key| expect(content).to include key }
end
cli(%w(remove chrishunt)).execute
expect(keys_file.read).to be_empty
keys_file.unlink
end
end
end
| require 'spec_helper'
require 'support/mock_github_server'
require 'github/auth'
describe Github::Auth::CLI do
with_mock_github_server do |mock_server_hostname, mock_keys|
let(:hostname) { mock_server_hostname }
let(:keys_file) { Tempfile.new 'authorized_keys' }
let(:keys) { mock_keys }
after { keys_file.unlink }
def cli(argv)
described_class.new(argv).tap do |cli|
cli.stub(
github_hostname: hostname,
keys_file_path: keys_file.path
)
end
end
it 'adds and removes keys from the keys file' do
cli(%w(add chrishunt)).execute
keys_file.read.tap do |content|
keys.each { |key| expect(content).to include key }
end
cli(%w(remove chrishunt)).execute
expect(keys_file.read).to be_empty
keys_file.unlink
end
end
end
| Use mock_keys that are passed into the block | Use mock_keys that are passed into the block
| Ruby | mit | chrishunt/github-auth | ruby | ## Code Before:
require 'spec_helper'
require 'support/mock_github_server'
require 'github/auth'
describe Github::Auth::CLI do
with_mock_github_server do |mock_server_hostname|
let(:hostname) { mock_server_hostname }
let(:keys_file) { Tempfile.new 'authorized_keys' }
let(:keys) { Github::Auth::MockGithubServer::KEYS }
after { keys_file.unlink }
def cli(argv)
described_class.new(argv).tap do |cli|
cli.stub(
github_hostname: hostname,
keys_file_path: keys_file.path
)
end
end
it 'adds and removes keys from the keys file' do
cli(%w(add chrishunt)).execute
keys_file.read.tap do |content|
keys.each { |key| expect(content).to include key }
end
cli(%w(remove chrishunt)).execute
expect(keys_file.read).to be_empty
keys_file.unlink
end
end
end
## Instruction:
Use mock_keys that are passed into the block
## Code After:
require 'spec_helper'
require 'support/mock_github_server'
require 'github/auth'
describe Github::Auth::CLI do
with_mock_github_server do |mock_server_hostname, mock_keys|
let(:hostname) { mock_server_hostname }
let(:keys_file) { Tempfile.new 'authorized_keys' }
let(:keys) { mock_keys }
after { keys_file.unlink }
def cli(argv)
described_class.new(argv).tap do |cli|
cli.stub(
github_hostname: hostname,
keys_file_path: keys_file.path
)
end
end
it 'adds and removes keys from the keys file' do
cli(%w(add chrishunt)).execute
keys_file.read.tap do |content|
keys.each { |key| expect(content).to include key }
end
cli(%w(remove chrishunt)).execute
expect(keys_file.read).to be_empty
keys_file.unlink
end
end
end
| require 'spec_helper'
require 'support/mock_github_server'
require 'github/auth'
describe Github::Auth::CLI do
- with_mock_github_server do |mock_server_hostname|
+ with_mock_github_server do |mock_server_hostname, mock_keys|
? +++++++++++
let(:hostname) { mock_server_hostname }
let(:keys_file) { Tempfile.new 'authorized_keys' }
- let(:keys) { Github::Auth::MockGithubServer::KEYS }
+ let(:keys) { mock_keys }
after { keys_file.unlink }
def cli(argv)
described_class.new(argv).tap do |cli|
cli.stub(
github_hostname: hostname,
keys_file_path: keys_file.path
)
end
end
it 'adds and removes keys from the keys file' do
cli(%w(add chrishunt)).execute
keys_file.read.tap do |content|
keys.each { |key| expect(content).to include key }
end
cli(%w(remove chrishunt)).execute
expect(keys_file.read).to be_empty
keys_file.unlink
end
end
end | 4 | 0.111111 | 2 | 2 |
3eddd5c6229a422b4046fa8f2ef184e7dbcde55b | README.md | README.md | A [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks)
that runs shell scripts during deploy process.
## Usage
This buildpack works best with
[heroku-buildpack-multi](https://github.com/heroku/heroku-buildpack-multi)
so that it can be used with your app's existing buildpacks.
Add a line
```
https://github.com/zunda/heroku-buildpack-sh.git
```
into the file `.buildpacks` anywhere you want to run the scripts.
Place shell scripts to be run during deploy into the directory `./.buildpack-sh`
and add execute flag: `chmod +x` to them.
## License
[MIT](LICENSE)
| A [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks)
that runs shell scripts during deploy process.
## Usage
This buildpack works best with
[heroku-buildpack-multi](https://github.com/heroku/heroku-buildpack-multi)
so that it can be used with your app's existing buildpacks.
Add a line
```
https://github.com/zunda/heroku-buildpack-sh.git
```
into the file `.buildpacks` anywhere you want to run the scripts.
Place shell scripts to be run during deploy into the directory `./.buildpack-sh`
and add execute flag: `chmod +x` to them.
This buildpack runs `run-parts -v .buildpack-sh` to detect and execute them.
## License
[MIT](LICENSE)
| Add a note about run-parts | Add a note about run-parts
| Markdown | mit | zunda/heroku-buildpack-sh | markdown | ## Code Before:
A [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks)
that runs shell scripts during deploy process.
## Usage
This buildpack works best with
[heroku-buildpack-multi](https://github.com/heroku/heroku-buildpack-multi)
so that it can be used with your app's existing buildpacks.
Add a line
```
https://github.com/zunda/heroku-buildpack-sh.git
```
into the file `.buildpacks` anywhere you want to run the scripts.
Place shell scripts to be run during deploy into the directory `./.buildpack-sh`
and add execute flag: `chmod +x` to them.
## License
[MIT](LICENSE)
## Instruction:
Add a note about run-parts
## Code After:
A [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks)
that runs shell scripts during deploy process.
## Usage
This buildpack works best with
[heroku-buildpack-multi](https://github.com/heroku/heroku-buildpack-multi)
so that it can be used with your app's existing buildpacks.
Add a line
```
https://github.com/zunda/heroku-buildpack-sh.git
```
into the file `.buildpacks` anywhere you want to run the scripts.
Place shell scripts to be run during deploy into the directory `./.buildpack-sh`
and add execute flag: `chmod +x` to them.
This buildpack runs `run-parts -v .buildpack-sh` to detect and execute them.
## License
[MIT](LICENSE)
| A [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks)
that runs shell scripts during deploy process.
## Usage
This buildpack works best with
[heroku-buildpack-multi](https://github.com/heroku/heroku-buildpack-multi)
so that it can be used with your app's existing buildpacks.
Add a line
```
https://github.com/zunda/heroku-buildpack-sh.git
```
into the file `.buildpacks` anywhere you want to run the scripts.
Place shell scripts to be run during deploy into the directory `./.buildpack-sh`
and add execute flag: `chmod +x` to them.
+ This buildpack runs `run-parts -v .buildpack-sh` to detect and execute them.
## License
[MIT](LICENSE) | 1 | 0.05 | 1 | 0 |
ee906b8a86347a37565d0750f728ff008be59609 | .goreleaser.yml | .goreleaser.yml | builds:
- binary: porcelain
goos:
- linux
- darwin
goarch:
- amd64
archive:
format: tar.gz
replacements:
darwin: macOS
files:
- LICENSE
| builds:
- binary: porcelain
goos:
- linux
- darwin
goarch:
- amd64
archive:
format: tar.gz
files:
- LICENSE
| Use platform name 'darwin' for macOS builds | Use platform name 'darwin' for macOS builds
| YAML | mit | robertgzr/porcelain,robertgzr/porcelain | yaml | ## Code Before:
builds:
- binary: porcelain
goos:
- linux
- darwin
goarch:
- amd64
archive:
format: tar.gz
replacements:
darwin: macOS
files:
- LICENSE
## Instruction:
Use platform name 'darwin' for macOS builds
## Code After:
builds:
- binary: porcelain
goos:
- linux
- darwin
goarch:
- amd64
archive:
format: tar.gz
files:
- LICENSE
| builds:
- binary: porcelain
goos:
- linux
- darwin
goarch:
- amd64
archive:
format: tar.gz
- replacements:
- darwin: macOS
files:
- LICENSE | 2 | 0.153846 | 0 | 2 |
31be97b26aa2c9b688ed88ce41a8ed65cd0cb0f5 | app/views/applications/myApplications.scala.html | app/views/applications/myApplications.scala.html | @(user: User, applications: List[BreakpointApplication])(implicit flash: Flash, l: Lang)
@main(Messages("applications.myApplications.title"), showSubHeader = false, user = Some(user)) {
<div class="lightbg padtop padbottom shadow" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.my_applications")</h1>
</div>
</div>
<div class="whitebg padtop padbottom raiseshadow clearfix" style="z-index: 10;">
<div class="constraint">
<div class="left halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_own")</h1>
</div>
<div class="right halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_use")</h1>
</div>
</div>
</div>
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.application_showcase")</h1>
<p>@Messages("applications.myApplications.application_showcase_description")</p>
</div>
</div>
}
| @(user: User, applications: List[BreakpointApplication])(implicit flash: Flash, l: Lang)
@main(Messages("applications.myApplications.title"), showSubHeader = false, user = Some(user)) {
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin left">@Messages("applications.myApplications.my_applications")</h1>
<a href="@routes.BreakpointApplicationController.newApplication">
<button class="submit_button pad right" style="width: 250px;">@Messages("applications.newApplication.new_application")</button>
</a>
</div>
</div>
<div class="whitebg padtop padbottom raiseshadow clearfix" style="z-index: 10;">
<div class="constraint">
<div class="left halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_own")</h1>
</div>
<div class="right halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_use")</h1>
</div>
</div>
</div>
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.application_showcase")</h1>
<p>@Messages("applications.myApplications.application_showcase_description")</p>
</div>
</div>
}
| Add a fancy new application button to myApplications | Add a fancy new application button to myApplications
| HTML | apache-2.0 | eval-so/frontend,eval-so/frontend | html | ## Code Before:
@(user: User, applications: List[BreakpointApplication])(implicit flash: Flash, l: Lang)
@main(Messages("applications.myApplications.title"), showSubHeader = false, user = Some(user)) {
<div class="lightbg padtop padbottom shadow" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.my_applications")</h1>
</div>
</div>
<div class="whitebg padtop padbottom raiseshadow clearfix" style="z-index: 10;">
<div class="constraint">
<div class="left halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_own")</h1>
</div>
<div class="right halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_use")</h1>
</div>
</div>
</div>
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.application_showcase")</h1>
<p>@Messages("applications.myApplications.application_showcase_description")</p>
</div>
</div>
}
## Instruction:
Add a fancy new application button to myApplications
## Code After:
@(user: User, applications: List[BreakpointApplication])(implicit flash: Flash, l: Lang)
@main(Messages("applications.myApplications.title"), showSubHeader = false, user = Some(user)) {
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin left">@Messages("applications.myApplications.my_applications")</h1>
<a href="@routes.BreakpointApplicationController.newApplication">
<button class="submit_button pad right" style="width: 250px;">@Messages("applications.newApplication.new_application")</button>
</a>
</div>
</div>
<div class="whitebg padtop padbottom raiseshadow clearfix" style="z-index: 10;">
<div class="constraint">
<div class="left halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_own")</h1>
</div>
<div class="right halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_use")</h1>
</div>
</div>
</div>
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.application_showcase")</h1>
<p>@Messages("applications.myApplications.application_showcase_description")</p>
</div>
</div>
}
| @(user: User, applications: List[BreakpointApplication])(implicit flash: Flash, l: Lang)
@main(Messages("applications.myApplications.title"), showSubHeader = false, user = Some(user)) {
- <div class="lightbg padtop padbottom shadow" style="z-index: 9;">
+ <div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
? +++++++++
<div class="constraint">
- <h1 class="nomargin">@Messages("applications.myApplications.my_applications")</h1>
+ <h1 class="nomargin left">@Messages("applications.myApplications.my_applications")</h1>
? +++++
+ <a href="@routes.BreakpointApplicationController.newApplication">
+ <button class="submit_button pad right" style="width: 250px;">@Messages("applications.newApplication.new_application")</button>
+ </a>
</div>
</div>
<div class="whitebg padtop padbottom raiseshadow clearfix" style="z-index: 10;">
<div class="constraint">
<div class="left halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_own")</h1>
</div>
<div class="right halfwidth">
<h1 class="nomargin">@Messages("applications.myApplications.applications_i_use")</h1>
</div>
</div>
</div>
<div class="lightbg padtop padbottom shadow clearfix" style="z-index: 9;">
<div class="constraint">
<h1 class="nomargin">@Messages("applications.myApplications.application_showcase")</h1>
<p>@Messages("applications.myApplications.application_showcase_description")</p>
</div>
</div>
} | 7 | 0.259259 | 5 | 2 |
3af3831986136005504d4db5580e886ab83b2a35 | app/components/edit-interface.js | app/components/edit-interface.js | import Ember from 'ember';
import EmberValidations from 'ember-validations';
export default Ember.Component.extend(EmberValidations, {
classNames: ["edit-interface"],
validations: {
'changes': {
changeset: true,
}
},
/* This is only required because ember-validations doesn't correctly observe child errors */
runValidations: function() {
this.validate().then(function() {}, function() {});
}.observes("hup.at"),
actions: {
addNewMeaning() {
this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: []}));
this.validate();
},
addNewSeq() {
this.get("changes.seqs").pushObject(new Object({action: "add", text: "", labels: []}));
this.validate();
},
}
});
| import Ember from 'ember';
import EmberValidations from 'ember-validations';
export default Ember.Component.extend(EmberValidations, {
classNames: ["edit-interface"],
validations: {
'changes': {
changeset: true,
}
},
/* This is only required because ember-validations doesn't correctly observe child errors */
runValidations: function() {
this.validate().then(function() {}, function() {});
}.observes("hup.at"),
actions: {
addNewMeaning() {
this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: [], synonyms: []}));
this.validate();
},
addNewSeq() {
this.get("changes.seqs").pushObject(new Object({action: "add", text: "", labels: []}));
this.validate();
},
}
});
| Add new meaning should have synonyms added too (empty array) | Add new meaning should have synonyms added too (empty array)
| JavaScript | mit | wordset/wordset-ui,BryanCode/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui | javascript | ## Code Before:
import Ember from 'ember';
import EmberValidations from 'ember-validations';
export default Ember.Component.extend(EmberValidations, {
classNames: ["edit-interface"],
validations: {
'changes': {
changeset: true,
}
},
/* This is only required because ember-validations doesn't correctly observe child errors */
runValidations: function() {
this.validate().then(function() {}, function() {});
}.observes("hup.at"),
actions: {
addNewMeaning() {
this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: []}));
this.validate();
},
addNewSeq() {
this.get("changes.seqs").pushObject(new Object({action: "add", text: "", labels: []}));
this.validate();
},
}
});
## Instruction:
Add new meaning should have synonyms added too (empty array)
## Code After:
import Ember from 'ember';
import EmberValidations from 'ember-validations';
export default Ember.Component.extend(EmberValidations, {
classNames: ["edit-interface"],
validations: {
'changes': {
changeset: true,
}
},
/* This is only required because ember-validations doesn't correctly observe child errors */
runValidations: function() {
this.validate().then(function() {}, function() {});
}.observes("hup.at"),
actions: {
addNewMeaning() {
this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: [], synonyms: []}));
this.validate();
},
addNewSeq() {
this.get("changes.seqs").pushObject(new Object({action: "add", text: "", labels: []}));
this.validate();
},
}
});
| import Ember from 'ember';
import EmberValidations from 'ember-validations';
export default Ember.Component.extend(EmberValidations, {
classNames: ["edit-interface"],
validations: {
'changes': {
changeset: true,
}
},
/* This is only required because ember-validations doesn't correctly observe child errors */
runValidations: function() {
this.validate().then(function() {}, function() {});
}.observes("hup.at"),
actions: {
addNewMeaning() {
- this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: []}));
+ this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: [], synonyms: []}));
? ++++++++++++++
this.validate();
},
addNewSeq() {
this.get("changes.seqs").pushObject(new Object({action: "add", text: "", labels: []}));
this.validate();
},
}
}); | 2 | 0.08 | 1 | 1 |
87b1adb95e02eed0dec8e57db2c48d179372a507 | .travis.yml | .travis.yml | language: go
go:
- 1.8
| language: go
go:
- 1.8
before_script:
- sudo apt-get update && sudo apt-get install protobuf-compiler
| Install the protobuf compiler before running the build. | Install the protobuf compiler before running the build.
| YAML | mit | wallaceicy06/muni-sign,wallaceicy06/muni-sign,wallaceicy06/muni-sign | yaml | ## Code Before:
language: go
go:
- 1.8
## Instruction:
Install the protobuf compiler before running the build.
## Code After:
language: go
go:
- 1.8
before_script:
- sudo apt-get update && sudo apt-get install protobuf-compiler
| language: go
go:
- 1.8
-
+ before_script:
+ - sudo apt-get update && sudo apt-get install protobuf-compiler | 3 | 0.6 | 2 | 1 |
8cde5a3f6536e281e9c664b3324ccad2638b320a | app/controllers/search_controller.rb | app/controllers/search_controller.rb | class SearchController < ApplicationController
skip_before_filter :load_project
before_filter :load_project_search, :only => :results
before_filter :permission_to_search, :only => :results
def results
@search = params[:search]
unless @search.blank?
@comments = Comment.search @search,
:retry_stale => true, :order => 'created_at DESC',
:with => { :project_id => project_ids },
:page => params[:page]
end
end
protected
def load_project_search
@current_project = Project.find_by_permalink(params[:project_id]) if params[:project_id]
end
def permission_to_search
unless user_can_search? or (@current_project and project_owner.can_search?)
flash[:notice] = "Search is disabled"
redirect_to root_path
end
end
def user_can_search?
current_user.can_search?
end
def project_owner
@current_project.user
end
def project_ids
if @current_project
@current_project.id
else
current_user.projects.collect { |p| p.id }
end
end
end
| class SearchController < ApplicationController
before_filter :permission_to_search, :only => :results
def results
@search = params[:search]
unless @search.blank?
@comments = Comment.search @search,
:retry_stale => true, :order => 'created_at DESC',
:with => { :project_id => project_ids },
:page => params[:page]
end
end
protected
def permission_to_search
unless user_can_search? or (@current_project and project_owner.can_search?)
flash[:notice] = "Search is disabled"
redirect_to root_path
end
end
def user_can_search?
current_user.can_search?
end
def project_owner
@current_project.user
end
def project_ids
if @current_project
@current_project.id
else
current_user.projects.collect { |p| p.id }
end
end
end
| Revert before_filter tampering in SearchController | Revert before_filter tampering in SearchController
These "fixes" are no longer necessary and they broke some
permissions features of searching across all projects.
This reverts commits:
- 04a7f9b8358a5c053c4b76a91993e920f820d5e6
- 04a5479a4291a39801d6bfd05d8cd09ece361e74
| Ruby | agpl-3.0 | irfanah/teambox,teambox/teambox,teambox/teambox,irfanah/teambox,ccarruitero/teambox,vveliev/teambox,nfredrik/teambox,teambox/teambox,vveliev/teambox,crewmate/crewmate,alx/teambox,vveliev/teambox,alx/teambox,crewmate/crewmate,irfanah/teambox,nfredrik/teambox,wesbillman/projects,wesbillman/projects,irfanah/teambox,rahouldatta/teambox,codeforeurope/samenspel,codeforeurope/samenspel,rahouldatta/teambox,ccarruitero/teambox,nfredrik/teambox,rahouldatta/teambox,crewmate/crewmate,nfredrik/teambox,vveliev/teambox | ruby | ## Code Before:
class SearchController < ApplicationController
skip_before_filter :load_project
before_filter :load_project_search, :only => :results
before_filter :permission_to_search, :only => :results
def results
@search = params[:search]
unless @search.blank?
@comments = Comment.search @search,
:retry_stale => true, :order => 'created_at DESC',
:with => { :project_id => project_ids },
:page => params[:page]
end
end
protected
def load_project_search
@current_project = Project.find_by_permalink(params[:project_id]) if params[:project_id]
end
def permission_to_search
unless user_can_search? or (@current_project and project_owner.can_search?)
flash[:notice] = "Search is disabled"
redirect_to root_path
end
end
def user_can_search?
current_user.can_search?
end
def project_owner
@current_project.user
end
def project_ids
if @current_project
@current_project.id
else
current_user.projects.collect { |p| p.id }
end
end
end
## Instruction:
Revert before_filter tampering in SearchController
These "fixes" are no longer necessary and they broke some
permissions features of searching across all projects.
This reverts commits:
- 04a7f9b8358a5c053c4b76a91993e920f820d5e6
- 04a5479a4291a39801d6bfd05d8cd09ece361e74
## Code After:
class SearchController < ApplicationController
before_filter :permission_to_search, :only => :results
def results
@search = params[:search]
unless @search.blank?
@comments = Comment.search @search,
:retry_stale => true, :order => 'created_at DESC',
:with => { :project_id => project_ids },
:page => params[:page]
end
end
protected
def permission_to_search
unless user_can_search? or (@current_project and project_owner.can_search?)
flash[:notice] = "Search is disabled"
redirect_to root_path
end
end
def user_can_search?
current_user.can_search?
end
def project_owner
@current_project.user
end
def project_ids
if @current_project
@current_project.id
else
current_user.projects.collect { |p| p.id }
end
end
end
| class SearchController < ApplicationController
+
-
- skip_before_filter :load_project
- before_filter :load_project_search, :only => :results
before_filter :permission_to_search, :only => :results
-
+
def results
@search = params[:search]
-
+
unless @search.blank?
@comments = Comment.search @search,
:retry_stale => true, :order => 'created_at DESC',
:with => { :project_id => project_ids },
:page => params[:page]
end
end
protected
+
-
- def load_project_search
- @current_project = Project.find_by_permalink(params[:project_id]) if params[:project_id]
- end
-
def permission_to_search
unless user_can_search? or (@current_project and project_owner.can_search?)
flash[:notice] = "Search is disabled"
redirect_to root_path
end
end
def user_can_search?
current_user.can_search?
end
def project_owner
@current_project.user
end
def project_ids
if @current_project
@current_project.id
else
current_user.projects.collect { |p| p.id }
end
end
end | 14 | 0.297872 | 4 | 10 |
518fcded047d260b3377b0546b97673da734a3e8 | app/src/main/res/layout/drawer_menu.xml | app/src/main/res/layout/drawer_menu.xml | <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent" />
| <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start" />
| Add missing gravity to NavigationDrawer | Add missing gravity to NavigationDrawer
| XML | apache-2.0 | squanchy-dev/squanchy-android,squanchy-dev/squanchy-android,squanchy-dev/squanchy-android | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent" />
## Instruction:
Add missing gravity to NavigationDrawer
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start" />
| <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width"
- android:layout_height="match_parent" />
? ---
+ android:layout_height="match_parent"
+ android:layout_gravity="start" /> | 3 | 0.6 | 2 | 1 |
95acc8ea8150029259389d360be4aeeba143e045 | blueprints/ember-cli-paint/index.js | blueprints/ember-cli-paint/index.js | 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.7.22' },
{ name: 'spinjs', target: '2.0.1' },
{ name: 'tooltipster', target: '3.3.0' },
{ name: 'trackpad-scroll-emulator', target: '1.0.8' }
]).then(function() {
return this.insertIntoFile('.jshintrc', ' "Spinner",', { after: '"predef": [\n' } );
}.bind(this));
}.bind(this));
}
}
| 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.9.0' },
{ name: 'modernizr', target: '2.8.3' },
{ name: 'spinjs', target: '2.0.1' },
{ name: 'tooltipster', target: '3.3.0' },
{ name: 'trackpad-scroll-emulator', target: '1.0.8' }
]).then(function() {
return this.insertIntoFile('.jshintrc', ' "Spinner",', { after: '"predef": [\n' } );
}.bind(this));
}.bind(this));
}
}
| Update blueprints to include latest package versions | Update blueprints to include latest package versions
| JavaScript | mit | alphasights/ember-cli-paint,alphasights/ember-cli-paint | javascript | ## Code Before:
'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.7.22' },
{ name: 'spinjs', target: '2.0.1' },
{ name: 'tooltipster', target: '3.3.0' },
{ name: 'trackpad-scroll-emulator', target: '1.0.8' }
]).then(function() {
return this.insertIntoFile('.jshintrc', ' "Spinner",', { after: '"predef": [\n' } );
}.bind(this));
}.bind(this));
}
}
## Instruction:
Update blueprints to include latest package versions
## Code After:
'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.9.0' },
{ name: 'modernizr', target: '2.8.3' },
{ name: 'spinjs', target: '2.0.1' },
{ name: 'tooltipster', target: '3.3.0' },
{ name: 'trackpad-scroll-emulator', target: '1.0.8' }
]).then(function() {
return this.insertIntoFile('.jshintrc', ' "Spinner",', { after: '"predef": [\n' } );
}.bind(this));
}.bind(this));
}
}
| 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
- { name: 'paint', target: '0.7.22' },
? ^ ^^
+ { name: 'paint', target: '0.9.0' },
? ^ ^
+ { name: 'modernizr', target: '2.8.3' },
{ name: 'spinjs', target: '2.0.1' },
{ name: 'tooltipster', target: '3.3.0' },
{ name: 'trackpad-scroll-emulator', target: '1.0.8' }
]).then(function() {
return this.insertIntoFile('.jshintrc', ' "Spinner",', { after: '"predef": [\n' } );
}.bind(this));
}.bind(this));
}
} | 3 | 0.15 | 2 | 1 |
563221f066a624673c78363fe94dda0437df8873 | src/listen.js | src/listen.js | 'use strict';
import { composeAsync, factoryComposers, factoryIntents } from './helpers'
export default (state) => ({
listen: (sentence) => {
return new Promise( (resolve, reject) => {
state.rawSentence = sentence;
const factory = composeAsync(factoryComposers, factoryIntents);
factory(state)
.then( value => {
state.action ? resolve(state) : reject(new Error('No action'))
})
.catch ( error => {
if (!error) error = {code: 0, message: "Sorry, I haven't understood you"};
reject(error);
})
});
}
})
| 'use strict';
import { composeAsync, factoryComposers, factoryIntents, timeout } from './helpers'
export default (state) => ({
listen: (sentence) => {
return new Promise( (resolve, reject) => {
state.rawSentence = sentence;
timeout(reject);
const factory = composeAsync(factoryComposers, factoryIntents);
factory(state)
.then( value => {
state.action ? resolve(state) : reject(new Error('No action'))
})
.catch ( error => {
if (!error) error = { code: 0, message: "Sorry, I haven't understood you" };
reject(error);
})
});
}
})
| Use a default timeout (using config.json) | Use a default timeout (using config.json)
| JavaScript | mit | ava-ia/core | javascript | ## Code Before:
'use strict';
import { composeAsync, factoryComposers, factoryIntents } from './helpers'
export default (state) => ({
listen: (sentence) => {
return new Promise( (resolve, reject) => {
state.rawSentence = sentence;
const factory = composeAsync(factoryComposers, factoryIntents);
factory(state)
.then( value => {
state.action ? resolve(state) : reject(new Error('No action'))
})
.catch ( error => {
if (!error) error = {code: 0, message: "Sorry, I haven't understood you"};
reject(error);
})
});
}
})
## Instruction:
Use a default timeout (using config.json)
## Code After:
'use strict';
import { composeAsync, factoryComposers, factoryIntents, timeout } from './helpers'
export default (state) => ({
listen: (sentence) => {
return new Promise( (resolve, reject) => {
state.rawSentence = sentence;
timeout(reject);
const factory = composeAsync(factoryComposers, factoryIntents);
factory(state)
.then( value => {
state.action ? resolve(state) : reject(new Error('No action'))
})
.catch ( error => {
if (!error) error = { code: 0, message: "Sorry, I haven't understood you" };
reject(error);
})
});
}
})
| 'use strict';
- import { composeAsync, factoryComposers, factoryIntents } from './helpers'
+ import { composeAsync, factoryComposers, factoryIntents, timeout } from './helpers'
? +++++++++
export default (state) => ({
listen: (sentence) => {
return new Promise( (resolve, reject) => {
state.rawSentence = sentence;
+ timeout(reject);
const factory = composeAsync(factoryComposers, factoryIntents);
factory(state)
.then( value => {
state.action ? resolve(state) : reject(new Error('No action'))
})
.catch ( error => {
- if (!error) error = {code: 0, message: "Sorry, I haven't understood you"};
+ if (!error) error = { code: 0, message: "Sorry, I haven't understood you" };
? + +
reject(error);
})
});
}
}) | 5 | 0.227273 | 3 | 2 |
a5a60654efc3f97ba1cf6cbf7043c28ed9860b02 | cmd/lefty/exec.h | cmd/lefty/exec.h | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Bell Laboratories */
#ifndef _EXEC_H
#define _EXEC_H
typedef struct Tonm_t lvar_t;
extern Tobj root, null;
extern Tobj rtno;
extern int Erun;
extern int Eerrlevel, Estackdepth, Eshowbody, Eshowcalls, Eoktorun;
void Einit(void);
void Eterm(void);
Tobj Eunit(Tobj);
Tobj Efunction(Tobj, char *);
#endif /* _EXEC_H */
#ifdef __cplusplus
}
#endif
| /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _EXEC_H
#define _EXEC_H
typedef struct Tonm_t lvar_t;
extern Tobj root, null;
extern Tobj rtno;
extern int Erun;
extern int Eerrlevel, Estackdepth, Eshowbody, Eshowcalls, Eoktorun;
void Einit (void);
void Eterm (void);
Tobj Eunit (Tobj);
Tobj Efunction (Tobj, char *);
#endif /* _EXEC_H */
#ifdef __cplusplus
}
#endif
| Update with new lefty, fixing many bugs and supporting new features | Update with new lefty, fixing many bugs and supporting new features
| C | epl-1.0 | MjAbuz/graphviz,MjAbuz/graphviz,jho1965us/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,pixelglow/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,kbrock/graphviz,pixelglow/graphviz,tkelman/graphviz,BMJHayward/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,ellson/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,tkelman/graphviz,tkelman/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,tkelman/graphviz,BMJHayward/graphviz,tkelman/graphviz,BMJHayward/graphviz,kbrock/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,ellson/graphviz,BMJHayward/graphviz | c | ## Code Before:
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Bell Laboratories */
#ifndef _EXEC_H
#define _EXEC_H
typedef struct Tonm_t lvar_t;
extern Tobj root, null;
extern Tobj rtno;
extern int Erun;
extern int Eerrlevel, Estackdepth, Eshowbody, Eshowcalls, Eoktorun;
void Einit(void);
void Eterm(void);
Tobj Eunit(Tobj);
Tobj Efunction(Tobj, char *);
#endif /* _EXEC_H */
#ifdef __cplusplus
}
#endif
## Instruction:
Update with new lefty, fixing many bugs and supporting new features
## Code After:
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _EXEC_H
#define _EXEC_H
typedef struct Tonm_t lvar_t;
extern Tobj root, null;
extern Tobj rtno;
extern int Erun;
extern int Eerrlevel, Estackdepth, Eshowbody, Eshowcalls, Eoktorun;
void Einit (void);
void Eterm (void);
Tobj Eunit (Tobj);
Tobj Efunction (Tobj, char *);
#endif /* _EXEC_H */
#ifdef __cplusplus
}
#endif
| - /* $Id$ $Revision$ */
+ /* $Id$ $Revision$ */
? +
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
-
+
#ifdef __cplusplus
extern "C" {
#endif
-
- /* Lefteris Koutsofios - AT&T Bell Laboratories */
? ----- ^^^^^^^
+ /* Lefteris Koutsofios - AT&T Labs Research */
? ^^^ +++++
#ifndef _EXEC_H
#define _EXEC_H
- typedef struct Tonm_t lvar_t;
? ----
+ typedef struct Tonm_t lvar_t;
- extern Tobj root, null;
? ----
+ extern Tobj root, null;
- extern Tobj rtno;
? ----
+ extern Tobj rtno;
- extern int Erun;
? ----
+ extern int Erun;
- extern int Eerrlevel, Estackdepth, Eshowbody, Eshowcalls, Eoktorun;
? ----
+ extern int Eerrlevel, Estackdepth, Eshowbody, Eshowcalls, Eoktorun;
- void Einit(void);
? ----
+ void Einit (void);
? +
- void Eterm(void);
? ----
+ void Eterm (void);
? +
- Tobj Eunit(Tobj);
? ----
+ Tobj Eunit (Tobj);
? +
- Tobj Efunction(Tobj, char *);
? ----
+ Tobj Efunction (Tobj, char *);
? +
- #endif /* _EXEC_H */
? ^^^^
+ #endif /* _EXEC_H */
? ^
#ifdef __cplusplus
}
#endif
+ | 28 | 0.682927 | 14 | 14 |
63b8fba326ae0d58687b700cbe1fcbe2437c261b | packages/accounts-weibo/package.js | packages/accounts-weibo/package.js | Package.describe({
summary: "Login service for Sina Weibo accounts",
version: "1.1.0"
});
Package.onUse(function(api) {
api.use('accounts-base', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('accounts-oauth', ['client', 'server']);
api.use('twitter-oauth');
api.imply('twitter-oauth');
api.use(['accounts-ui', 'weibo-config-ui'], ['client', 'server'], { weak: true });
api.addFiles("notice.js");
api.addFiles("weibo.js");
});
| Package.describe({
summary: "Login service for Sina Weibo accounts",
version: "1.1.0"
});
Package.onUse(function(api) {
api.use('accounts-base', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('accounts-oauth', ['client', 'server']);
api.use('weibo-oauth');
api.imply('weibo-oauth');
api.use(['accounts-ui', 'weibo-config-ui'], ['client', 'server'], { weak: true });
api.addFiles("notice.js");
api.addFiles("weibo.js");
});
| Change `twitter-oauth` => to `weibo-oauth` | Change `twitter-oauth` => to `weibo-oauth`
Seemingly copy-paste residue in the PR, but this is the Weibo package
it should be Weibo, not Twitter.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | javascript | ## Code Before:
Package.describe({
summary: "Login service for Sina Weibo accounts",
version: "1.1.0"
});
Package.onUse(function(api) {
api.use('accounts-base', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('accounts-oauth', ['client', 'server']);
api.use('twitter-oauth');
api.imply('twitter-oauth');
api.use(['accounts-ui', 'weibo-config-ui'], ['client', 'server'], { weak: true });
api.addFiles("notice.js");
api.addFiles("weibo.js");
});
## Instruction:
Change `twitter-oauth` => to `weibo-oauth`
Seemingly copy-paste residue in the PR, but this is the Weibo package
it should be Weibo, not Twitter.
## Code After:
Package.describe({
summary: "Login service for Sina Weibo accounts",
version: "1.1.0"
});
Package.onUse(function(api) {
api.use('accounts-base', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('accounts-oauth', ['client', 'server']);
api.use('weibo-oauth');
api.imply('weibo-oauth');
api.use(['accounts-ui', 'weibo-config-ui'], ['client', 'server'], { weak: true });
api.addFiles("notice.js");
api.addFiles("weibo.js");
});
| Package.describe({
summary: "Login service for Sina Weibo accounts",
version: "1.1.0"
});
Package.onUse(function(api) {
api.use('accounts-base', ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
api.use('accounts-oauth', ['client', 'server']);
- api.use('twitter-oauth');
? - ^^^^
+ api.use('weibo-oauth');
? + ^^
- api.imply('twitter-oauth');
? - ^^^^
+ api.imply('weibo-oauth');
? + ^^
api.use(['accounts-ui', 'weibo-config-ui'], ['client', 'server'], { weak: true });
api.addFiles("notice.js");
api.addFiles("weibo.js");
}); | 4 | 0.222222 | 2 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.