commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
e3f4682708fbe0ef26148a7f1fd4fb19bb7fd826
library/tempfile/_close_spec.rb
library/tempfile/_close_spec.rb
require File.dirname(__FILE__) + '/../../spec_helper' require 'tempfile' describe "Tempfile#_close" do before(:each) do @tempfile = Tempfile.new("specs") end it "is protected" do @tempfile.protected_methods.should include("_close") end it "closes self" do @tempfile.send(:_close) @tempfile.closed?.should be_true end end
require File.dirname(__FILE__) + '/../../spec_helper' require 'tempfile' describe "Tempfile#_close" do before(:each) do @tempfile = Tempfile.new("specs") end it "is protected" do Tempfile.should have_protected_instance_method(:_close) end it "closes self" do @tempfile.send(:_close) @tempfile.closed?.should be_true end end
Use have_protected_instance_method for 1.9 compat
Use have_protected_instance_method for 1.9 compat
Ruby
mit
alindeman/rubyspec,eregon/rubyspec,alex/rubyspec,rkh/rubyspec,JuanitoFatas/rubyspec,alexch/rubyspec,kachick/rubyspec,bjeanes/rubyspec,josedonizetti/rubyspec,terceiro/rubyspec,mbj/rubyspec,rdp/rubyspec,yous/rubyspec,enricosada/rubyspec,bjeanes/rubyspec,iainbeeston/rubyspec,tinco/rubyspec,Zoxc/rubyspec,flavio/rubyspec,ruby/spec,bomatson/rubyspec,DavidEGrayson/rubyspec,wied03/rubyspec,nobu/rubyspec,oggy/rubyspec,MagLev/rubyspec,godfat/rubyspec,marcandre/rubyspec,rdp/rubyspec,atambo/rubyspec,jstepien/rubyspec,iliabylich/rubyspec,saturnflyer/rubyspec,ericmeyer/rubyspec,no6v/rubyspec,benlovell/rubyspec,griff/rubyspec,eregon/rubyspec,jstepien/rubyspec,benburkert/rubyspec,scooter-dangle/rubyspec,tinco/rubyspec,freerange/rubyspec,sferik/rubyspec,no6v/rubyspec,godfat/rubyspec,eregon/rubyspec,xaviershay/rubyspec,DavidEGrayson/rubyspec,amarshall/rubyspec,ruby/rubyspec,calavera/rubyspec,bomatson/rubyspec,yb66/rubyspec,josedonizetti/rubyspec,neomadara/rubyspec,sorah/rubyspec,jvshahid/rubyspec,markburns/rubyspec,yaauie/rubyspec,metadave/rubyspec,yous/rubyspec,bl4ckdu5t/rubyspec,mrkn/rubyspec,julik/rubyspec,jvshahid/rubyspec,markburns/rubyspec,marcandre/rubyspec,nevir/rubyspec,sgarciac/spec,undees/rubyspec,teleological/rubyspec,kidaa/rubyspec,freerange/rubyspec,ruby/rubyspec,griff/rubyspec,alexch/rubyspec,sorah/rubyspec,undees/rubyspec,roshats/rubyspec,chesterbr/rubyspec,bl4ckdu5t/rubyspec,Zoxc/rubyspec,agrimm/rubyspec,jabley/rubyspec,jannishuebl/rubyspec,iainbeeston/rubyspec,jannishuebl/rubyspec,saturnflyer/rubyspec,kidaa/rubyspec,nobu/rubyspec,nevir/rubyspec,askl56/rubyspec,ruby/spec,scooter-dangle/rubyspec,wied03/rubyspec,Aesthetikx/rubyspec,ericmeyer/rubyspec,oggy/rubyspec,lucaspinto/rubyspec,agrimm/rubyspec,terceiro/rubyspec,timfel/rubyspec,atambo/rubyspec,mbj/rubyspec,sferik/rubyspec,sgarciac/spec,neomadara/rubyspec,calavera/rubyspec,sgarciac/spec,BanzaiMan/rubyspec,benlovell/rubyspec,mrkn/rubyspec,metadave/rubyspec,jabley/rubyspec,flavio/rubyspec,xaviershay/rubyspec,kachick/rubyspec,rkh/rubyspec,shirosaki/rubyspec,JuanitoFatas/rubyspec,amarshall/rubyspec,qmx/rubyspec,roshats/rubyspec,BanzaiMan/rubyspec,yb66/rubyspec,Aesthetikx/rubyspec,DawidJanczak/rubyspec,askl56/rubyspec,benburkert/rubyspec,ruby/spec,alindeman/rubyspec,enricosada/rubyspec,DawidJanczak/rubyspec,chesterbr/rubyspec,alex/rubyspec,shirosaki/rubyspec,wied03/rubyspec,yaauie/rubyspec,lucaspinto/rubyspec,iliabylich/rubyspec,timfel/rubyspec,MagLev/rubyspec,kachick/rubyspec,teleological/rubyspec,nobu/rubyspec,qmx/rubyspec,julik/rubyspec
ruby
## Code Before: require File.dirname(__FILE__) + '/../../spec_helper' require 'tempfile' describe "Tempfile#_close" do before(:each) do @tempfile = Tempfile.new("specs") end it "is protected" do @tempfile.protected_methods.should include("_close") end it "closes self" do @tempfile.send(:_close) @tempfile.closed?.should be_true end end ## Instruction: Use have_protected_instance_method for 1.9 compat ## Code After: require File.dirname(__FILE__) + '/../../spec_helper' require 'tempfile' describe "Tempfile#_close" do before(:each) do @tempfile = Tempfile.new("specs") end it "is protected" do Tempfile.should have_protected_instance_method(:_close) end it "closes self" do @tempfile.send(:_close) @tempfile.closed?.should be_true end end
45362894f0b6e23505546ecc482cf2a326ae61ac
localprops/src/main/kotlin/pink/madis/gradle/localprops/plugin.kt
localprops/src/main/kotlin/pink/madis/gradle/localprops/plugin.kt
package pink.madis.gradle.localprops import org.gradle.api.Plugin import org.gradle.api.Project import java.nio.charset.StandardCharsets import java.util.Properties class LocalPropertiesPlugin : Plugin<Project> { override fun apply(project: Project) { val propsFile = project.file("local.properties") val map = mutableMapOf<String, String>() if (propsFile.exists()) { val props = Properties() propsFile.reader(StandardCharsets.UTF_8).use { reader -> props.load(reader) } props.forEach { key, value -> map.put(key.toString(), value.toString()) } } project.extensions.add("localprops", LocalProperties(map, project)) } } class LocalProperties( internal val props: Map<String, String>, internal val project: Project) : Map<String, String> by props { fun file(key: String) = project.file(props[key]) }
package pink.madis.gradle.localprops import org.gradle.api.Plugin import org.gradle.api.Project import java.io.File import java.nio.charset.StandardCharsets import java.util.Properties class LocalPropertiesPlugin : Plugin<Project> { override fun apply(project: Project) { val propsFile = project.file("local.properties") val map = mutableMapOf<String, String>() if (propsFile.exists()) { val props = Properties() propsFile.reader(StandardCharsets.UTF_8).use { reader -> props.load(reader) } props.forEach { key, value -> map.put(key.toString(), value.toString()) } } project.extensions.add("localprops", LocalProperties(map, project)) } } class LocalProperties( internal val props: Map<String, String>, internal val project: Project) : Map<String, String> by props { fun file(key: String) = props[key]?.let { project.file(it) } } }
Fix file() helper usage to return null if key was not defined
Fix file() helper usage to return null if key was not defined
Kotlin
mit
madisp/localprops,madisp/localprops
kotlin
## Code Before: package pink.madis.gradle.localprops import org.gradle.api.Plugin import org.gradle.api.Project import java.nio.charset.StandardCharsets import java.util.Properties class LocalPropertiesPlugin : Plugin<Project> { override fun apply(project: Project) { val propsFile = project.file("local.properties") val map = mutableMapOf<String, String>() if (propsFile.exists()) { val props = Properties() propsFile.reader(StandardCharsets.UTF_8).use { reader -> props.load(reader) } props.forEach { key, value -> map.put(key.toString(), value.toString()) } } project.extensions.add("localprops", LocalProperties(map, project)) } } class LocalProperties( internal val props: Map<String, String>, internal val project: Project) : Map<String, String> by props { fun file(key: String) = project.file(props[key]) } ## Instruction: Fix file() helper usage to return null if key was not defined ## Code After: package pink.madis.gradle.localprops import org.gradle.api.Plugin import org.gradle.api.Project import java.io.File import java.nio.charset.StandardCharsets import java.util.Properties class LocalPropertiesPlugin : Plugin<Project> { override fun apply(project: Project) { val propsFile = project.file("local.properties") val map = mutableMapOf<String, String>() if (propsFile.exists()) { val props = Properties() propsFile.reader(StandardCharsets.UTF_8).use { reader -> props.load(reader) } props.forEach { key, value -> map.put(key.toString(), value.toString()) } } project.extensions.add("localprops", LocalProperties(map, project)) } } class LocalProperties( internal val props: Map<String, String>, internal val project: Project) : Map<String, String> by props { fun file(key: String) = props[key]?.let { project.file(it) } } }
e27fd32ecb89f5f2de1a784e902fe64d1b73d33c
{{cookiecutter.app_name}}/urls.py
{{cookiecutter.app_name}}/urls.py
from django.conf.urls import patterns, url from .views import {{ cookiecutter.model_name }}List, {{ cookiecutter.model_name }}Create, {{ cookiecutter.model_name }}Detail, {{ cookiecutter.model_name }}Update, {{ cookiecutter.model_name }}Delete urlpatterns = patterns( '', url(r'^$', {{ cookiecutter.model_name }}List.as_view(), name='{{ cookiecutter.model_name|lower }}_list'), url(r'^new/$', {{ cookiecutter.model_name }}Create.as_view(), name='{{ cookiecutter.model_name|lower }}_create'), url(r'^(?P<pk>\d+)/$', {{ cookiecutter.model_name }}Detail.as_view(), name='{{ cookiecutter.model_name|lower }}_detail'), url(r'^(?P<pk>\d+)/update/$', {{ cookiecutter.model_name }}Update.as_view(), name='{{ cookiecutter.model_name|lower }}_update'), url(r'^(?P<pk>\d+)/delete/$', {{ cookiecutter.model_name }}Delete.as_view(), name='{{ cookiecutter.model_name|lower }}_delete'), )
from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url(r'^$', views.{{ cookiecutter.model_name }}List.as_view(), name='{{ cookiecutter.model_name|lower }}_list'), url(r'^new/$', views.{{ cookiecutter.model_name }}Create.as_view(), name='{{ cookiecutter.model_name|lower }}_create'), url(r'^(?P<pk>\d+)/$', views.{{ cookiecutter.model_name }}Detail.as_view(), name='{{ cookiecutter.model_name|lower }}_detail'), url(r'^(?P<pk>\d+)/update/$', views.{{ cookiecutter.model_name }}Update.as_view(), name='{{ cookiecutter.model_name|lower }}_update'), url(r'^(?P<pk>\d+)/delete/$', views.{{ cookiecutter.model_name }}Delete.as_view(), name='{{ cookiecutter.model_name|lower }}_delete'), )
Use briefer url views import.
Use briefer url views import.
Python
bsd-3-clause
wildfish/cookiecutter-django-crud,janusnic/cookiecutter-django-crud,wildfish/cookiecutter-django-crud,janusnic/cookiecutter-django-crud
python
## Code Before: from django.conf.urls import patterns, url from .views import {{ cookiecutter.model_name }}List, {{ cookiecutter.model_name }}Create, {{ cookiecutter.model_name }}Detail, {{ cookiecutter.model_name }}Update, {{ cookiecutter.model_name }}Delete urlpatterns = patterns( '', url(r'^$', {{ cookiecutter.model_name }}List.as_view(), name='{{ cookiecutter.model_name|lower }}_list'), url(r'^new/$', {{ cookiecutter.model_name }}Create.as_view(), name='{{ cookiecutter.model_name|lower }}_create'), url(r'^(?P<pk>\d+)/$', {{ cookiecutter.model_name }}Detail.as_view(), name='{{ cookiecutter.model_name|lower }}_detail'), url(r'^(?P<pk>\d+)/update/$', {{ cookiecutter.model_name }}Update.as_view(), name='{{ cookiecutter.model_name|lower }}_update'), url(r'^(?P<pk>\d+)/delete/$', {{ cookiecutter.model_name }}Delete.as_view(), name='{{ cookiecutter.model_name|lower }}_delete'), ) ## Instruction: Use briefer url views import. ## Code After: from django.conf.urls import patterns, url from . import views urlpatterns = patterns( '', url(r'^$', views.{{ cookiecutter.model_name }}List.as_view(), name='{{ cookiecutter.model_name|lower }}_list'), url(r'^new/$', views.{{ cookiecutter.model_name }}Create.as_view(), name='{{ cookiecutter.model_name|lower }}_create'), url(r'^(?P<pk>\d+)/$', views.{{ cookiecutter.model_name }}Detail.as_view(), name='{{ cookiecutter.model_name|lower }}_detail'), url(r'^(?P<pk>\d+)/update/$', views.{{ cookiecutter.model_name }}Update.as_view(), name='{{ cookiecutter.model_name|lower }}_update'), url(r'^(?P<pk>\d+)/delete/$', views.{{ cookiecutter.model_name }}Delete.as_view(), name='{{ cookiecutter.model_name|lower }}_delete'), )
3d542d8f0fe320145fd607ebae6df6f1a81ac5ed
index.js
index.js
const createPolobxMixin = function(stores) { let appState = {}; Object.keys(stores).forEach( key => { const store = mobx.observable(stores[key].store); const actions = stores[key].actions; appState[key] = { store, actions }; }); function dispatch({store, action, payload}) { if (appState[store] && appState[store].actions && appState[store].actions[action]) { const storeAction = appState[store].actions[action]; mobx.action(storeAction.bind(appState[store], [payload]))(); return appState[store]; } console.warn(`No action "${action}" for "${store}" store`); }; mobx.useStrict(true); return subclass => class extends subclass { constructor() { super(); this._appState = appState; this.dispatch = dispatch; } connectedCallback() { super.connectedCallback(); const properties = this.constructor.config.properties; if (properties) { for (let property in properties) { const statePath = properties[property].statePath; if (statePath && this._appState[statePath.store]) { mobx.autorun(() => { const store = this._appState[statePath.store].store; this[property] = store[statePath.path]; }); } } } } }; };
const createPolobxBehavior = function(stores) { let appState = {}; Object.keys(stores).forEach( key => { const store = mobx.observable(stores[key].store); const actions = stores[key].actions; appState[key] = { store, actions }; }); function dispatch({store, action, payload}) { if (appState[store] && appState[store].actions && appState[store].actions[action]) { const storeAction = appState[store].actions[action]; mobx.action(storeAction.bind(appState[store], [payload]))(); return appState[store]; } console.warn(`No action "${action}" for "${store}" store`); }; mobx.useStrict(true); return { created() { this._appState = appState; this.dispatch = dispatch; } attached() { const properties = this.constructor.config.properties; if (properties) { for (let property in properties) { const statePath = properties[property].statePath; if (statePath && this._appState[statePath.store]) { mobx.autorun(() => { const store = this._appState[statePath.store].store; this[property] = store[statePath.path]; }); } } } } }; };
Use behavior instead mixin to Polymer 1.x compatibility
Use behavior instead mixin to Polymer 1.x compatibility
JavaScript
mit
ivanrod/polobx,ivanrod/polobx
javascript
## Code Before: const createPolobxMixin = function(stores) { let appState = {}; Object.keys(stores).forEach( key => { const store = mobx.observable(stores[key].store); const actions = stores[key].actions; appState[key] = { store, actions }; }); function dispatch({store, action, payload}) { if (appState[store] && appState[store].actions && appState[store].actions[action]) { const storeAction = appState[store].actions[action]; mobx.action(storeAction.bind(appState[store], [payload]))(); return appState[store]; } console.warn(`No action "${action}" for "${store}" store`); }; mobx.useStrict(true); return subclass => class extends subclass { constructor() { super(); this._appState = appState; this.dispatch = dispatch; } connectedCallback() { super.connectedCallback(); const properties = this.constructor.config.properties; if (properties) { for (let property in properties) { const statePath = properties[property].statePath; if (statePath && this._appState[statePath.store]) { mobx.autorun(() => { const store = this._appState[statePath.store].store; this[property] = store[statePath.path]; }); } } } } }; }; ## Instruction: Use behavior instead mixin to Polymer 1.x compatibility ## Code After: const createPolobxBehavior = function(stores) { let appState = {}; Object.keys(stores).forEach( key => { const store = mobx.observable(stores[key].store); const actions = stores[key].actions; appState[key] = { store, actions }; }); function dispatch({store, action, payload}) { if (appState[store] && appState[store].actions && appState[store].actions[action]) { const storeAction = appState[store].actions[action]; mobx.action(storeAction.bind(appState[store], [payload]))(); return appState[store]; } console.warn(`No action "${action}" for "${store}" store`); }; mobx.useStrict(true); return { created() { this._appState = appState; this.dispatch = dispatch; } attached() { const properties = this.constructor.config.properties; if (properties) { for (let property in properties) { const statePath = properties[property].statePath; if (statePath && this._appState[statePath.store]) { mobx.autorun(() => { const store = this._appState[statePath.store].store; this[property] = store[statePath.path]; }); } } } } }; };
cf24de5a185c2376e173200e5f7677633d6506df
release-instructions.txt
release-instructions.txt
Sonatype : https://oss.sonatype.org/ Bump Maven version: mvn versions:set -DnewVersion=xxx mvn release:clean mvn release:prepare mvn release:perform -Darguments=-Dgpg.passphrase=PASSPHRASE
Sonatype : https://oss.sonatype.org/ Bump Maven version: mvn versions:set -DnewVersion=xxx mvn release:clean -PDSE && mvn release:prepare -PDSE mvn release:perform -PDSE -Darguments=-Dgpg.passphrase=PASSPHRASE
Add DSE profile in release instructions
Add DSE profile in release instructions
Text
apache-2.0
doanduyhai/Achilles,doanduyhai/Achilles
text
## Code Before: Sonatype : https://oss.sonatype.org/ Bump Maven version: mvn versions:set -DnewVersion=xxx mvn release:clean mvn release:prepare mvn release:perform -Darguments=-Dgpg.passphrase=PASSPHRASE ## Instruction: Add DSE profile in release instructions ## Code After: Sonatype : https://oss.sonatype.org/ Bump Maven version: mvn versions:set -DnewVersion=xxx mvn release:clean -PDSE && mvn release:prepare -PDSE mvn release:perform -PDSE -Darguments=-Dgpg.passphrase=PASSPHRASE
d769d4b6df913d6b4e32e1e4b44d4f69d9f926ca
bin/cli.js
bin/cli.js
var program = require('commander'); program .description('Generate random documents, numbers, names, address, etc.') .version('0.0.1') .option('-f, --cpf', 'Select CPF') .option('-j, --cnpj', 'Select CNPJ') .option('-n, --name [gender]', 'Select Name') .option('-c, --creditCard <type>', 'Select Credit Card. Types: maestro, dinersclub, laser, jcb, unionpay, discover, mastercard, amex, visa') .option('-q, --quantity <number>', 'Quantity of generate data', parseInt) .option('-m, --mask', 'Add mask to') .option('-v, --validate <document>', 'Validate document') .option('-C, --clipboard', 'Copy text to clipboard') .parse(process.argv); module.exports = program;
var program = require('commander'); program .description('Generate random documents, numbers, names, address, etc.') .version('0.0.1') .option('-f, --cpf', 'Select CPF') .option('-j, --cnpj', 'Select CNPJ') .option('-c, --creditCard <type>', 'Select Credit Card. Types: maestro, dinersclub, laser, jcb, unionpay, discover, mastercard, amex, visa') .option('-q, --quantity <number>', 'Quantity of generate data', parseInt) .option('-m, --mask', 'Add mask to') .option('-v, --validate <document>', 'Validate document') .option('-C, --clipboard', 'Copy text to clipboard') .parse(process.argv); module.exports = program;
Remove --name feature as it's not working at the moment
Remove --name feature as it's not working at the moment
JavaScript
mit
lvendrame/dev-util-cli,lagden/dev-util-cli
javascript
## Code Before: var program = require('commander'); program .description('Generate random documents, numbers, names, address, etc.') .version('0.0.1') .option('-f, --cpf', 'Select CPF') .option('-j, --cnpj', 'Select CNPJ') .option('-n, --name [gender]', 'Select Name') .option('-c, --creditCard <type>', 'Select Credit Card. Types: maestro, dinersclub, laser, jcb, unionpay, discover, mastercard, amex, visa') .option('-q, --quantity <number>', 'Quantity of generate data', parseInt) .option('-m, --mask', 'Add mask to') .option('-v, --validate <document>', 'Validate document') .option('-C, --clipboard', 'Copy text to clipboard') .parse(process.argv); module.exports = program; ## Instruction: Remove --name feature as it's not working at the moment ## Code After: var program = require('commander'); program .description('Generate random documents, numbers, names, address, etc.') .version('0.0.1') .option('-f, --cpf', 'Select CPF') .option('-j, --cnpj', 'Select CNPJ') .option('-c, --creditCard <type>', 'Select Credit Card. Types: maestro, dinersclub, laser, jcb, unionpay, discover, mastercard, amex, visa') .option('-q, --quantity <number>', 'Quantity of generate data', parseInt) .option('-m, --mask', 'Add mask to') .option('-v, --validate <document>', 'Validate document') .option('-C, --clipboard', 'Copy text to clipboard') .parse(process.argv); module.exports = program;
6e09b75032a7cc9da6598ad3f1ebf950838fc4c5
.travis.yml
.travis.yml
language: bash sudo: required os: - linux - osx before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi script: - sudo make install - time neofetch --ascii --config off --ascii_distro travis -v --test
language: bash sudo: required os: - linux - osx before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PREFIX=/usr/local ; fi script: - sudo make install - time neofetch --ascii --config off --ascii_distro travis -v --test
Fix TravisCI for macOS build
Fix TravisCI for macOS build Travis updated the macOS build server to El Capitan, which means it has SIP now. Prefix changed to /usr/local to mitigate this
YAML
mit
dylanaraps/fetch,mstraube/neofetch,konimex/neofetch,dylanaraps/neofetch
yaml
## Code Before: language: bash sudo: required os: - linux - osx before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi script: - sudo make install - time neofetch --ascii --config off --ascii_distro travis -v --test ## Instruction: Fix TravisCI for macOS build Travis updated the macOS build server to El Capitan, which means it has SIP now. Prefix changed to /usr/local to mitigate this ## Code After: language: bash sudo: required os: - linux - osx before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PREFIX=/usr/local ; fi script: - sudo make install - time neofetch --ascii --config off --ascii_distro travis -v --test
696bba8e342ae5ccbac433142502c8e7debbb0f5
zsh.d/10-rust.zsh
zsh.d/10-rust.zsh
if test -d "$HOME/.cargo/bin"; then export PATH="${PATH}:$HOME/.cargo/bin" fi
if test -d "$HOME/.cargo/bin"; then export PATH="$HOME/.cargo/bin:${PATH}" fi
Put cargo path in front of $PATH
[rust] Put cargo path in front of $PATH This makes it easier to override regular commands.
Shell
mit
koenwtje/dotfiles
shell
## Code Before: if test -d "$HOME/.cargo/bin"; then export PATH="${PATH}:$HOME/.cargo/bin" fi ## Instruction: [rust] Put cargo path in front of $PATH This makes it easier to override regular commands. ## Code After: if test -d "$HOME/.cargo/bin"; then export PATH="$HOME/.cargo/bin:${PATH}" fi
b6dd77de522ad90f7e1fac154b4ef0f3487c4382
game.css
game.css
color: grey; } #invalid-square { color: orange; } #title { text-align: center; font-family: helvetica, arial, sans-serif; background: linear-gradient(90deg, white 50%, black 50%); } canvas { display : block; margin : auto; } #box1 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #box2 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #start { width: 90px; height: 90px; border-radius: 45px; margin-left: 0px; background: linear-gradient(90deg, black 50%, white 50%); border-width: 10px; border-color: darkseagreen; color: cadetblue; font-size: medium; font-weight: bold; } #othello-right { color: white; width: 50%; float: right; text-align: left; font-size: 50px; margin-top: -40px; } #othello-left { color: black; width: 50%; float: left; text-align: right; font-size: 50px; margin-top: -40px; }
color: darkseagreen; } #title { text-align: center; font-family: helvetica, arial, sans-serif; background: linear-gradient(90deg, white 50%, black 50%); } canvas { display : block; margin : auto; } #box1 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #box2 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #start, #play-again { width: 90px; height: 90px; border-radius: 45px; margin-left: 0px; background: linear-gradient(90deg, black 50%, white 50%); border-width: 10px; border-color: darkseagreen; color: cadetblue; font-size: medium; font-weight: bold; } #othello-right { color: white; width: 50%; float: right; text-align: left; font-size: 50px; margin-top: -40px; } #othello-left { color: black; width: 50%; float: left; text-align: right; font-size: 50px; margin-top: -40px; }
Make both messages sea green
Make both messages sea green Both turn prompt and invalid square selection prompt.
CSS
mit
androidgrl/othello,androidgrl/othello
css
## Code Before: color: grey; } #invalid-square { color: orange; } #title { text-align: center; font-family: helvetica, arial, sans-serif; background: linear-gradient(90deg, white 50%, black 50%); } canvas { display : block; margin : auto; } #box1 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #box2 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #start { width: 90px; height: 90px; border-radius: 45px; margin-left: 0px; background: linear-gradient(90deg, black 50%, white 50%); border-width: 10px; border-color: darkseagreen; color: cadetblue; font-size: medium; font-weight: bold; } #othello-right { color: white; width: 50%; float: right; text-align: left; font-size: 50px; margin-top: -40px; } #othello-left { color: black; width: 50%; float: left; text-align: right; font-size: 50px; margin-top: -40px; } ## Instruction: Make both messages sea green Both turn prompt and invalid square selection prompt. ## Code After: color: darkseagreen; } #title { text-align: center; font-family: helvetica, arial, sans-serif; background: linear-gradient(90deg, white 50%, black 50%); } canvas { display : block; margin : auto; } #box1 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #box2 { padding: 30px; margin-left: 27px; color: green; font-weight: bold; } #start, #play-again { width: 90px; height: 90px; border-radius: 45px; margin-left: 0px; background: linear-gradient(90deg, black 50%, white 50%); border-width: 10px; border-color: darkseagreen; color: cadetblue; font-size: medium; font-weight: bold; } #othello-right { color: white; width: 50%; float: right; text-align: left; font-size: 50px; margin-top: -40px; } #othello-left { color: black; width: 50%; float: left; text-align: right; font-size: 50px; margin-top: -40px; }
97db526a655f9723342df3c0c27e7325002c50aa
ovp_users/serializers.py
ovp_users/serializers.py
from django.core.exceptions import ValidationError from django.contrib.auth.password_validation import validate_password from ovp_users import models from rest_framework import serializers class UserCreateSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['id', 'name', 'email', 'password'] def validate(self, data): password = data.get('password') errors = dict() try: validate_password(password=password) pass except ValidationError as e: errors['password'] = list(e.messages) if errors: raise serializers.ValidationError(errors) return super(UserCreateSerializer, self).validate(data) class UserSearchSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['name'] class RecoveryTokenSerializer(serializers.Serializer): email = serializers.CharField(required=True) class Meta: fields = ['email'] class RecoverPasswordSerializer(serializers.Serializer): email = serializers.CharField(required=True) token = serializers.CharField(required=True) new_password = serializers.CharField(required=True) class Meta: fields = ['email', 'token', 'new_password']
from django.core.exceptions import ValidationError from django.contrib.auth.password_validation import validate_password from ovp_users import models from rest_framework import serializers class UserCreateSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['id', 'name', 'email', 'password'] extra_kwargs = {'password': {'write_only': True}} def validate(self, data): password = data.get('password') errors = dict() try: validate_password(password=password) except ValidationError as e: errors['password'] = list(e.messages) if errors: raise serializers.ValidationError(errors) return super(UserCreateSerializer, self).validate(data) class UserSearchSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['name'] class RecoveryTokenSerializer(serializers.Serializer): email = serializers.CharField(required=True) class Meta: fields = ['email'] class RecoverPasswordSerializer(serializers.Serializer): email = serializers.CharField(required=True) token = serializers.CharField(required=True) new_password = serializers.CharField(required=True) class Meta: fields = ['email', 'token', 'new_password']
Add password as a write_only field on CreateUserSerializer
Add password as a write_only field on CreateUserSerializer
Python
agpl-3.0
OpenVolunteeringPlatform/django-ovp-users,OpenVolunteeringPlatform/django-ovp-users
python
## Code Before: from django.core.exceptions import ValidationError from django.contrib.auth.password_validation import validate_password from ovp_users import models from rest_framework import serializers class UserCreateSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['id', 'name', 'email', 'password'] def validate(self, data): password = data.get('password') errors = dict() try: validate_password(password=password) pass except ValidationError as e: errors['password'] = list(e.messages) if errors: raise serializers.ValidationError(errors) return super(UserCreateSerializer, self).validate(data) class UserSearchSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['name'] class RecoveryTokenSerializer(serializers.Serializer): email = serializers.CharField(required=True) class Meta: fields = ['email'] class RecoverPasswordSerializer(serializers.Serializer): email = serializers.CharField(required=True) token = serializers.CharField(required=True) new_password = serializers.CharField(required=True) class Meta: fields = ['email', 'token', 'new_password'] ## Instruction: Add password as a write_only field on CreateUserSerializer ## Code After: from django.core.exceptions import ValidationError from django.contrib.auth.password_validation import validate_password from ovp_users import models from rest_framework import serializers class UserCreateSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['id', 'name', 'email', 'password'] extra_kwargs = {'password': {'write_only': True}} def validate(self, data): password = data.get('password') errors = dict() try: validate_password(password=password) except ValidationError as e: errors['password'] = list(e.messages) if errors: raise serializers.ValidationError(errors) return super(UserCreateSerializer, self).validate(data) class UserSearchSerializer(serializers.ModelSerializer): class Meta: model = models.User fields = ['name'] class RecoveryTokenSerializer(serializers.Serializer): email = serializers.CharField(required=True) class Meta: fields = ['email'] class RecoverPasswordSerializer(serializers.Serializer): email = serializers.CharField(required=True) token = serializers.CharField(required=True) new_password = serializers.CharField(required=True) class Meta: fields = ['email', 'token', 'new_password']
34c95d960f80dcb62859e01c67d5cd265535f96a
requirements/base.txt
requirements/base.txt
-c constraints.txt Django==1.11.13 # rq.filter: >=1.11,<2 wagtail==1.13.1 psycopg2==2.7.5 django-compressor==2.2 wagtail-django-recaptcha==1.0 wagtailgmaps==0.4 # rq.filter: >=0.4,<1 slackweb==1.0.5 raven
-c constraints.txt Django==1.11.13 # rq.filter: >=1.11,<2 wagtail==1.13.1 # rq.filter: >=1.13,<2 psycopg2==2.7.5 django-compressor==2.2 wagtail-django-recaptcha==1.0 wagtailgmaps==0.4 # rq.filter: >=0.4,<1 slackweb==1.0.5 raven
Add filter to restrict Wagtail to <2.0
Add filter to restrict Wagtail to <2.0 Wagtail 2.0 is only compatible with Python 3 and the infra isn't ready for that.
Text
mit
springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail
text
## Code Before: -c constraints.txt Django==1.11.13 # rq.filter: >=1.11,<2 wagtail==1.13.1 psycopg2==2.7.5 django-compressor==2.2 wagtail-django-recaptcha==1.0 wagtailgmaps==0.4 # rq.filter: >=0.4,<1 slackweb==1.0.5 raven ## Instruction: Add filter to restrict Wagtail to <2.0 Wagtail 2.0 is only compatible with Python 3 and the infra isn't ready for that. ## Code After: -c constraints.txt Django==1.11.13 # rq.filter: >=1.11,<2 wagtail==1.13.1 # rq.filter: >=1.13,<2 psycopg2==2.7.5 django-compressor==2.2 wagtail-django-recaptcha==1.0 wagtailgmaps==0.4 # rq.filter: >=0.4,<1 slackweb==1.0.5 raven
49cd76529f5ff662ac78d97857deffbb12ceb38f
.travis.yml
.travis.yml
sudo: required language: c before_install: - sudo apt-get update install: - sudo apt-get install gcc-avr binutils-avr avr-libc - pip install --user cpp-coveralls script: - make all - make avr - make check after_success: - coveralls --verbose -i test/mbasic.gcno -i test/sbasic.gcno -i test/slave.gcno -i test/master.gcno -i test/modlib.gcno -i test/test.gcno
sudo: required language: c before_install: - sudo apt-get update install: - sudo apt-get install gcc-avr binutils-avr avr-libc - pip install --user cpp-coveralls script: - make all - make avr - make check after_success: - coveralls --verbose -n -i test
Make coveralls not run gcov
Make coveralls not run gcov
YAML
mit
Jacajack/modlib
yaml
## Code Before: sudo: required language: c before_install: - sudo apt-get update install: - sudo apt-get install gcc-avr binutils-avr avr-libc - pip install --user cpp-coveralls script: - make all - make avr - make check after_success: - coveralls --verbose -i test/mbasic.gcno -i test/sbasic.gcno -i test/slave.gcno -i test/master.gcno -i test/modlib.gcno -i test/test.gcno ## Instruction: Make coveralls not run gcov ## Code After: sudo: required language: c before_install: - sudo apt-get update install: - sudo apt-get install gcc-avr binutils-avr avr-libc - pip install --user cpp-coveralls script: - make all - make avr - make check after_success: - coveralls --verbose -n -i test
6a9355da9e02d40713b15f4e8f5046c47ff38a14
assets/samples/sample_activity.rb
assets/samples/sample_activity.rb
require 'ruboto' ruboto_import_widgets :Button, :LinearLayout, :TextView $activity.handle_create do |bundle| setTitle 'This is the Title' setup_content do linear_layout :orientation => LinearLayout::VERTICAL do @text_view = text_view :text => 'What hath Matz wrought?', :id => 42 button :text => 'M-x butterfly', :width => :wrap_content, :id => 43 end end handle_click do |view| if view.getText == 'M-x butterfly' @text_view.setText 'What hath Matz wrought!' toast 'Flipped a bit via butterfly' end end end
require 'ruboto/activity' require 'ruboto/widget' require 'ruboto/util/toast' ruboto_import_widgets :Button, :LinearLayout, :TextView $activity.start_ruboto_activity "$sample_activity" do setTitle 'This is the Title' def on_create(bundle) self.content_view = linear_layout(:orientation => :vertical) do @text_view = text_view :text => 'What hath Matz wrought?', :id => 42 button :text => 'M-x butterfly', :width => :wrap_content, :id => 43, :on_click_listener => @handle_click end end @handle_click = proc do |view| @text_view.text = 'What hath Matz wrought!' toast 'Flipped a bit via butterfly' end end
Update sample to match new ruboto split
Update sample to match new ruboto split
Ruby
mit
lucasallan/ruboto,baberthal/ruboto,ruboto/ruboto,lucasallan/ruboto,ruboto/ruboto,Jodell88/ruboto,baberthal/ruboto,lucasallan/ruboto,ruboto/ruboto,Jodell88/ruboto,Jodell88/ruboto,baberthal/ruboto
ruby
## Code Before: require 'ruboto' ruboto_import_widgets :Button, :LinearLayout, :TextView $activity.handle_create do |bundle| setTitle 'This is the Title' setup_content do linear_layout :orientation => LinearLayout::VERTICAL do @text_view = text_view :text => 'What hath Matz wrought?', :id => 42 button :text => 'M-x butterfly', :width => :wrap_content, :id => 43 end end handle_click do |view| if view.getText == 'M-x butterfly' @text_view.setText 'What hath Matz wrought!' toast 'Flipped a bit via butterfly' end end end ## Instruction: Update sample to match new ruboto split ## Code After: require 'ruboto/activity' require 'ruboto/widget' require 'ruboto/util/toast' ruboto_import_widgets :Button, :LinearLayout, :TextView $activity.start_ruboto_activity "$sample_activity" do setTitle 'This is the Title' def on_create(bundle) self.content_view = linear_layout(:orientation => :vertical) do @text_view = text_view :text => 'What hath Matz wrought?', :id => 42 button :text => 'M-x butterfly', :width => :wrap_content, :id => 43, :on_click_listener => @handle_click end end @handle_click = proc do |view| @text_view.text = 'What hath Matz wrought!' toast 'Flipped a bit via butterfly' end end
9ef134cb756009260e05e219bcecbe45d2729e9f
exp/wsj/configs/wsj_reward1.yaml
exp/wsj/configs/wsj_reward1.yaml
parent: $LVSR/exp/wsj/configs/wsj_paper1.yaml net: criterion: name: mse_gain min_reward: -5 training: scale: 0.01 initialization: /recognizer: weights_init: !!python/object/apply:blocks.initialization.Uniform [0.0, 0.1] /recognizer/generator/readout/post_merge/mlp: biases_init: !!python/object/apply:blocks.initialization.Constant [-1.0] monitoring: search: round_to_inf: 4.5 stages: pretraining: training: num_epochs: 4 annealing2: null
parent: $LVSR/exp/wsj/configs/wsj_paper1.yaml net: criterion: name: mse_gain min_reward: -5 training: scale: 0.01 initialization: /recognizer: weights_init: !!python/object/apply:blocks.initialization.Uniform [0.0, 0.1] /recognizer/generator/readout/post_merge/mlp: biases_init: !!python/object/apply:blocks.initialization.Constant [-1.0] monitoring: search: round_to_inf: 4.5 stop_on: patience stages: pretraining: training: num_epochs: 4 annealing2: null
Fix stop_on for wsj_reward model
Fix stop_on for wsj_reward model
YAML
mit
rizar/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr,rizar/attention-lvcsr
yaml
## Code Before: parent: $LVSR/exp/wsj/configs/wsj_paper1.yaml net: criterion: name: mse_gain min_reward: -5 training: scale: 0.01 initialization: /recognizer: weights_init: !!python/object/apply:blocks.initialization.Uniform [0.0, 0.1] /recognizer/generator/readout/post_merge/mlp: biases_init: !!python/object/apply:blocks.initialization.Constant [-1.0] monitoring: search: round_to_inf: 4.5 stages: pretraining: training: num_epochs: 4 annealing2: null ## Instruction: Fix stop_on for wsj_reward model ## Code After: parent: $LVSR/exp/wsj/configs/wsj_paper1.yaml net: criterion: name: mse_gain min_reward: -5 training: scale: 0.01 initialization: /recognizer: weights_init: !!python/object/apply:blocks.initialization.Uniform [0.0, 0.1] /recognizer/generator/readout/post_merge/mlp: biases_init: !!python/object/apply:blocks.initialization.Constant [-1.0] monitoring: search: round_to_inf: 4.5 stop_on: patience stages: pretraining: training: num_epochs: 4 annealing2: null
99223550bf14c176d9b4574bba84e2feb46efca5
features/support/capybara.rb
features/support/capybara.rb
Capybara.default_wait_time = 5
Capybara.default_wait_time = 5 module ScreenshotHelper def screenshot(name = 'capybara') page.driver.render(File.join(Rails.root, 'tmp', "#{name}.png"), full: true) end end World(ScreenshotHelper)
Add screenshot helper for cucumber @javascript scenarios
Add screenshot helper for cucumber @javascript scenarios Call `screenshot` within a Cucumber step and Poltergeist (the capybara driver) will create a tmp/capybara.png file containing a screenshot of the current page. Pass an argument to give the screenshot a different name. Useful when debugging failing steps.
Ruby
mit
robinwhittleton/whitehall,alphagov/whitehall,robinwhittleton/whitehall,ggoral/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,alphagov/whitehall,alphagov/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,robinwhittleton/whitehall,ggoral/whitehall,askl56/whitehall,hotvulcan/whitehall,hotvulcan/whitehall,askl56/whitehall,alphagov/whitehall,ggoral/whitehall,hotvulcan/whitehall
ruby
## Code Before: Capybara.default_wait_time = 5 ## Instruction: Add screenshot helper for cucumber @javascript scenarios Call `screenshot` within a Cucumber step and Poltergeist (the capybara driver) will create a tmp/capybara.png file containing a screenshot of the current page. Pass an argument to give the screenshot a different name. Useful when debugging failing steps. ## Code After: Capybara.default_wait_time = 5 module ScreenshotHelper def screenshot(name = 'capybara') page.driver.render(File.join(Rails.root, 'tmp', "#{name}.png"), full: true) end end World(ScreenshotHelper)
9a79746eebc3e4553c561f34794a7368bad9eaf7
lib/mongoskin/gridfs.js
lib/mongoskin/gridfs.js
var GridStore = require('mongodb').GridStore; /** * @param filename: filename or ObjectId */ var SkinGridStore = exports.SkinGridStore = function(skinDb) { this.skinDb = skinDb; } /** * @param filename: filename or ObjectId * callback(err, gridStoreObject) */ SkinGridStore.prototype.open = function(filename, mode, options, callback){ if(!callback){ callback = options; options = undefined; } this.skinDb.open(function(err, db) { new GridStore(db, filename, mode, options).open(callback); }); } /** * @param filename: filename or ObjectId */ SkinGridStore.prototype.unlink = SkinGridStore.prototype.remove = function(filename, callback){ this.skinDb.open(function(err, db) { GridStore.unlink(db, filename, callback); }); } SkinGridStore.prototype.exist = function(filename, callback){ this.skinDb.open(function(err, db) { GridStore.exist(db, filename, callback); }); } exports.SkinGridStore = SkinGridStore;
var GridStore = require('mongodb').GridStore; /** * @param filename: filename or ObjectId */ var SkinGridStore = exports.SkinGridStore = function(skinDb) { this.skinDb = skinDb; } /** * @param filename: filename or ObjectId * callback(err, gridStoreObject) */ SkinGridStore.prototype.open = function(filename, mode, options, callback){ if(!callback){ callback = options; options = undefined; } this.skinDb.open(function(err, db) { new GridStore(db, filename, mode, options).open(callback); }); } /** * @param filename: filename or ObjectId */ SkinGridStore.prototype.unlink = SkinGridStore.prototype.remove = function(filename, callback){ this.skinDb.open(function(err, db) { GridStore.unlink(db, filename, callback); }); } SkinGridStore.prototype.exist = function(filename, rootCollection, callback){ this.skinDb.open(function(err, db) { GridStore.exist(db, filename, rootCollection, callback); }); } exports.SkinGridStore = SkinGridStore;
Add rootCollection option to SkinGridStore.exist
Add rootCollection option to SkinGridStore.exist
JavaScript
mit
mleanos/node-mongoskin,kissjs/node-mongoskin,microlv/node-mongoskin,dropfen/node-mongoskin
javascript
## Code Before: var GridStore = require('mongodb').GridStore; /** * @param filename: filename or ObjectId */ var SkinGridStore = exports.SkinGridStore = function(skinDb) { this.skinDb = skinDb; } /** * @param filename: filename or ObjectId * callback(err, gridStoreObject) */ SkinGridStore.prototype.open = function(filename, mode, options, callback){ if(!callback){ callback = options; options = undefined; } this.skinDb.open(function(err, db) { new GridStore(db, filename, mode, options).open(callback); }); } /** * @param filename: filename or ObjectId */ SkinGridStore.prototype.unlink = SkinGridStore.prototype.remove = function(filename, callback){ this.skinDb.open(function(err, db) { GridStore.unlink(db, filename, callback); }); } SkinGridStore.prototype.exist = function(filename, callback){ this.skinDb.open(function(err, db) { GridStore.exist(db, filename, callback); }); } exports.SkinGridStore = SkinGridStore; ## Instruction: Add rootCollection option to SkinGridStore.exist ## Code After: var GridStore = require('mongodb').GridStore; /** * @param filename: filename or ObjectId */ var SkinGridStore = exports.SkinGridStore = function(skinDb) { this.skinDb = skinDb; } /** * @param filename: filename or ObjectId * callback(err, gridStoreObject) */ SkinGridStore.prototype.open = function(filename, mode, options, callback){ if(!callback){ callback = options; options = undefined; } this.skinDb.open(function(err, db) { new GridStore(db, filename, mode, options).open(callback); }); } /** * @param filename: filename or ObjectId */ SkinGridStore.prototype.unlink = SkinGridStore.prototype.remove = function(filename, callback){ this.skinDb.open(function(err, db) { GridStore.unlink(db, filename, callback); }); } SkinGridStore.prototype.exist = function(filename, rootCollection, callback){ this.skinDb.open(function(err, db) { GridStore.exist(db, filename, rootCollection, callback); }); } exports.SkinGridStore = SkinGridStore;
44ba423897a69d8fab5f398cc15010e1338f1ea5
README.md
README.md
Backoff, Simple backoff / retry functionality -------------------------------------------------- [![Build Status](https://travis-ci.org/yriveiro/php-backoff](https://travis-ci.org/yriveiro/php-backoff.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/yriveiro/php-backoff/badge.svg?branch=master&service=github)](https://coveralls.io/github/yriveiro/php-backoff?branch=master) Installation ------------ The recommended way to install this package is through [Composer](http://getcomposer.org/download/). ```sh php composer.phar require "yriveiro/php-backoff" ``` License ------- Backoff is licensed under MIT license.
Backoff, Simple backoff / retry functionality -------------------------------------------------- [![License](https://poser.pugx.org/yriveiro/php-backoff/license)](https://packagist.org/packages/yriveiro/php-backoff) [![Build Status](https://travis-ci.org/yriveiro/php-backoff.svg?branch=master)](https://travis-ci.org/yriveiro/php-backoff) [![Coverage Status](https://coveralls.io/repos/yriveiro/php-backoff/badge.svg?branch=master&service=github)](https://coveralls.io/github/yriveiro/php-backoff?branch=master) [![Total Downloads](https://poser.pugx.org/yriveiro/php-backoff/downloads)](https://packagist.org/packages/yriveiro/php-backoff) Installation ------------ The recommended way to install this package is through [Composer](http://getcomposer.org/download/). ```sh php composer.phar require "yriveiro/php-backoff" ``` License ------- Backoff is licensed under MIT license.
Add Licence and downloads badges
Add Licence and downloads badges
Markdown
mit
yriveiro/php-backoff
markdown
## Code Before: Backoff, Simple backoff / retry functionality -------------------------------------------------- [![Build Status](https://travis-ci.org/yriveiro/php-backoff](https://travis-ci.org/yriveiro/php-backoff.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/yriveiro/php-backoff/badge.svg?branch=master&service=github)](https://coveralls.io/github/yriveiro/php-backoff?branch=master) Installation ------------ The recommended way to install this package is through [Composer](http://getcomposer.org/download/). ```sh php composer.phar require "yriveiro/php-backoff" ``` License ------- Backoff is licensed under MIT license. ## Instruction: Add Licence and downloads badges ## Code After: Backoff, Simple backoff / retry functionality -------------------------------------------------- [![License](https://poser.pugx.org/yriveiro/php-backoff/license)](https://packagist.org/packages/yriveiro/php-backoff) [![Build Status](https://travis-ci.org/yriveiro/php-backoff.svg?branch=master)](https://travis-ci.org/yriveiro/php-backoff) [![Coverage Status](https://coveralls.io/repos/yriveiro/php-backoff/badge.svg?branch=master&service=github)](https://coveralls.io/github/yriveiro/php-backoff?branch=master) [![Total Downloads](https://poser.pugx.org/yriveiro/php-backoff/downloads)](https://packagist.org/packages/yriveiro/php-backoff) Installation ------------ The recommended way to install this package is through [Composer](http://getcomposer.org/download/). ```sh php composer.phar require "yriveiro/php-backoff" ``` License ------- Backoff is licensed under MIT license.
d10d930bbcd1fa0093747a2a6e8a07cbcd5b2fcf
README.md
README.md
This is omniauth strategy for authenticating to your Backlog service used OAuth 2.0 style. Backlog is project management tools served by Nulab Inc. ## Installation Add this line to your application's Gemfile: ```ruby gem 'omniauth-backlog' ``` And then execute: $ bundle Or install it yourself as: $ gem install omniauth-backlog ## Usage Backlog is managed by space-id, used backlog url (ex. https://xxxx.backlog.jp). Backlog's oauth endpoint uses space url. so it need to configure site in client_options. ```ruby use OmniAuth::Builder do provider :backlog, ENV['CLIENT_ID'], ENV['CLIENT_SERCRET'], :client_options => { :site => 'https://yourspaceid.backlog.jp' } end ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/attakei/omniauth-backlog. 0. Fork it 0. Create your feature branch (git checkout -b my-new-feature) 0. Commit your changes (git commit -am 'Add some feature') 0. Push to the branch (git push origin my-new-feature) 0. Create new Pull Request ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
This is omniauth strategy for authenticating to your Backlog service used OAuth 2.0 style. Backlog is project management tools served by [Nulab Inc](https://nulab-inc.com). ## Installation Add this line to your application's Gemfile: ```ruby gem 'omniauth-backlog' ``` And then execute: $ bundle Or install it yourself as: $ gem install omniauth-backlog ## Usage Backlog is managed by space-id, used backlog url (ex. https://xxxx.backlog.jp). Backlog's oauth endpoint uses space url. so it need to configure site in client_options. ```ruby use OmniAuth::Builder do provider :backlog, ENV['CLIENT_ID'], ENV['CLIENT_SERCRET'], :client_options => { :site => 'https://yourspaceid.backlog.jp' } end ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/attakei/omniauth-backlog. 0. Fork it 0. Create your feature branch (git checkout -b my-new-feature) 0. Commit your changes (git commit -am 'Add some feature') 0. Push to the branch (git push origin my-new-feature) 0. Create new Pull Request ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Add link to Nulab Inc page.
Add link to Nulab Inc page.
Markdown
mit
attakei/omniauth-backlog,k-tada/omniauth-backlog
markdown
## Code Before: This is omniauth strategy for authenticating to your Backlog service used OAuth 2.0 style. Backlog is project management tools served by Nulab Inc. ## Installation Add this line to your application's Gemfile: ```ruby gem 'omniauth-backlog' ``` And then execute: $ bundle Or install it yourself as: $ gem install omniauth-backlog ## Usage Backlog is managed by space-id, used backlog url (ex. https://xxxx.backlog.jp). Backlog's oauth endpoint uses space url. so it need to configure site in client_options. ```ruby use OmniAuth::Builder do provider :backlog, ENV['CLIENT_ID'], ENV['CLIENT_SERCRET'], :client_options => { :site => 'https://yourspaceid.backlog.jp' } end ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/attakei/omniauth-backlog. 0. Fork it 0. Create your feature branch (git checkout -b my-new-feature) 0. Commit your changes (git commit -am 'Add some feature') 0. Push to the branch (git push origin my-new-feature) 0. Create new Pull Request ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). ## Instruction: Add link to Nulab Inc page. ## Code After: This is omniauth strategy for authenticating to your Backlog service used OAuth 2.0 style. Backlog is project management tools served by [Nulab Inc](https://nulab-inc.com). ## Installation Add this line to your application's Gemfile: ```ruby gem 'omniauth-backlog' ``` And then execute: $ bundle Or install it yourself as: $ gem install omniauth-backlog ## Usage Backlog is managed by space-id, used backlog url (ex. https://xxxx.backlog.jp). Backlog's oauth endpoint uses space url. so it need to configure site in client_options. ```ruby use OmniAuth::Builder do provider :backlog, ENV['CLIENT_ID'], ENV['CLIENT_SERCRET'], :client_options => { :site => 'https://yourspaceid.backlog.jp' } end ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/attakei/omniauth-backlog. 0. Fork it 0. Create your feature branch (git checkout -b my-new-feature) 0. Commit your changes (git commit -am 'Add some feature') 0. Push to the branch (git push origin my-new-feature) 0. Create new Pull Request ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
580226fae69c354a1527abc03fb174215d4619d4
lib/tzinfo/data.rb
lib/tzinfo/data.rb
require 'tzinfo/data/version'
module TZInfo # Top level module for TZInfo::Data. module Data end end require 'tzinfo/data/version'
Add documentation comments for TZInfo and TZInfo::Data modules.
Add documentation comments for TZInfo and TZInfo::Data modules. Avoids blank pages being generated by RDoc and the licence being used as documentation by YARD.
Ruby
mit
tzinfo/tzinfo-data
ruby
## Code Before: require 'tzinfo/data/version' ## Instruction: Add documentation comments for TZInfo and TZInfo::Data modules. Avoids blank pages being generated by RDoc and the licence being used as documentation by YARD. ## Code After: module TZInfo # Top level module for TZInfo::Data. module Data end end require 'tzinfo/data/version'
afdd3669fbe4793490cae3975d6ca3f0ece2312b
test/DebugInfo/bool.swift
test/DebugInfo/bool.swift
// RUN: %target-swift-frontend %s -emit-ir -gdwarf-types -o - | %FileCheck %s func markUsed<T>(_ t: T) {} // Int1 uses 1 bit, but is aligned at 8 bits. // CHECK: !DIBasicType(name: "_T0Bi1_D", size: 1, encoding: DW_ATE_unsigned) func main() { var t = true var f = false markUsed("hello") } main()
// RUN: %target-swift-frontend %s -emit-ir -gdwarf-types -o - | %FileCheck %s // RUN: %target-swift-frontend %s -emit-ir -g -o - \ // RUN: | %FileCheck %s --check-prefix=CHECK_G func markUsed<T>(_ t: T) {} // Int1 uses 1 bit, but is aligned at 8 bits. // CHECK: !DIBasicType(name: "_T0Bi1_D", size: 1, encoding: DW_ATE_unsigned) // Bool has a fixed layout with a storage size of 1 byte and 7 "spare" bits. // CHECK_G: !DICompositeType(tag: DW_TAG_structure_type, name: "Bool", // CHECK_G-SAME: size: 8 func main() { var t = true var f = false markUsed("hello") } main()
Add a testcase for the debug infor generated for 'Bool'.
Add a testcase for the debug infor generated for 'Bool'. rdar://problem/29605924
Swift
apache-2.0
karwa/swift,hooman/swift,arvedviehweger/swift,rudkx/swift,tkremenek/swift,brentdax/swift,arvedviehweger/swift,OscarSwanros/swift,aschwaighofer/swift,lorentey/swift,hooman/swift,JGiola/swift,hooman/swift,parkera/swift,natecook1000/swift,danielmartin/swift,apple/swift,devincoughlin/swift,CodaFi/swift,hughbe/swift,lorentey/swift,stephentyrone/swift,milseman/swift,arvedviehweger/swift,jtbandes/swift,CodaFi/swift,harlanhaskins/swift,practicalswift/swift,CodaFi/swift,aschwaighofer/swift,harlanhaskins/swift,felix91gr/swift,devincoughlin/swift,atrick/swift,uasys/swift,apple/swift,xwu/swift,parkera/swift,nathawes/swift,xedin/swift,uasys/swift,shajrawi/swift,amraboelela/swift,aschwaighofer/swift,deyton/swift,huonw/swift,jopamer/swift,tjw/swift,CodaFi/swift,devincoughlin/swift,tjw/swift,roambotics/swift,djwbrown/swift,allevato/swift,atrick/swift,allevato/swift,jckarter/swift,jmgc/swift,benlangmuir/swift,calebd/swift,xedin/swift,JGiola/swift,shahmishal/swift,danielmartin/swift,huonw/swift,uasys/swift,tjw/swift,xedin/swift,allevato/swift,practicalswift/swift,sschiau/swift,milseman/swift,jopamer/swift,danielmartin/swift,frootloops/swift,OscarSwanros/swift,tjw/swift,jckarter/swift,airspeedswift/swift,danielmartin/swift,gribozavr/swift,arvedviehweger/swift,xedin/swift,tjw/swift,jtbandes/swift,tkremenek/swift,shajrawi/swift,harlanhaskins/swift,felix91gr/swift,deyton/swift,amraboelela/swift,zisko/swift,harlanhaskins/swift,gribozavr/swift,swiftix/swift,deyton/swift,nathawes/swift,brentdax/swift,nathawes/swift,natecook1000/swift,lorentey/swift,hooman/swift,alblue/swift,sschiau/swift,zisko/swift,huonw/swift,atrick/swift,jtbandes/swift,OscarSwanros/swift,jckarter/swift,ahoppen/swift,devincoughlin/swift,uasys/swift,devincoughlin/swift,Jnosh/swift,sschiau/swift,shahmishal/swift,milseman/swift,gregomni/swift,airspeedswift/swift,huonw/swift,danielmartin/swift,calebd/swift,stephentyrone/swift,xwu/swift,brentdax/swift,felix91gr/swift,hughbe/swift,shahmishal/swift,frootloops/swift,Jnosh/swift,alblue/swift,alblue/swift,shajrawi/swift,zisko/swift,austinzheng/swift,xwu/swift,glessard/swift,shajrawi/swift,calebd/swift,swiftix/swift,ahoppen/swift,alblue/swift,atrick/swift,stephentyrone/swift,amraboelela/swift,devincoughlin/swift,tjw/swift,huonw/swift,milseman/swift,hughbe/swift,airspeedswift/swift,tkremenek/swift,jopamer/swift,amraboelela/swift,tkremenek/swift,airspeedswift/swift,zisko/swift,xwu/swift,return/swift,airspeedswift/swift,natecook1000/swift,sschiau/swift,austinzheng/swift,felix91gr/swift,zisko/swift,apple/swift,alblue/swift,shajrawi/swift,OscarSwanros/swift,Jnosh/swift,CodaFi/swift,jtbandes/swift,rudkx/swift,djwbrown/swift,benlangmuir/swift,JGiola/swift,brentdax/swift,danielmartin/swift,djwbrown/swift,karwa/swift,rudkx/swift,shahmishal/swift,frootloops/swift,jckarter/swift,aschwaighofer/swift,return/swift,lorentey/swift,jckarter/swift,xwu/swift,devincoughlin/swift,rudkx/swift,karwa/swift,jckarter/swift,natecook1000/swift,OscarSwanros/swift,ahoppen/swift,milseman/swift,nathawes/swift,jmgc/swift,jmgc/swift,CodaFi/swift,JGiola/swift,lorentey/swift,jmgc/swift,hooman/swift,benlangmuir/swift,natecook1000/swift,natecook1000/swift,lorentey/swift,lorentey/swift,felix91gr/swift,allevato/swift,brentdax/swift,sschiau/swift,parkera/swift,tkremenek/swift,alblue/swift,apple/swift,stephentyrone/swift,jmgc/swift,alblue/swift,aschwaighofer/swift,deyton/swift,harlanhaskins/swift,stephentyrone/swift,practicalswift/swift,deyton/swift,Jnosh/swift,nathawes/swift,gribozavr/swift,djwbrown/swift,natecook1000/swift,calebd/swift,parkera/swift,roambotics/swift,roambotics/swift,gregomni/swift,tkremenek/swift,shajrawi/swift,nathawes/swift,jopamer/swift,amraboelela/swift,felix91gr/swift,zisko/swift,jopamer/swift,jtbandes/swift,lorentey/swift,huonw/swift,gregomni/swift,Jnosh/swift,gregomni/swift,swiftix/swift,return/swift,gregomni/swift,karwa/swift,airspeedswift/swift,shahmishal/swift,tkremenek/swift,xwu/swift,frootloops/swift,aschwaighofer/swift,jtbandes/swift,arvedviehweger/swift,stephentyrone/swift,danielmartin/swift,shahmishal/swift,austinzheng/swift,xwu/swift,JGiola/swift,nathawes/swift,amraboelela/swift,jopamer/swift,milseman/swift,benlangmuir/swift,felix91gr/swift,arvedviehweger/swift,austinzheng/swift,hughbe/swift,benlangmuir/swift,return/swift,shahmishal/swift,roambotics/swift,ahoppen/swift,atrick/swift,glessard/swift,aschwaighofer/swift,gribozavr/swift,airspeedswift/swift,uasys/swift,return/swift,glessard/swift,gribozavr/swift,frootloops/swift,gribozavr/swift,sschiau/swift,milseman/swift,rudkx/swift,devincoughlin/swift,parkera/swift,xedin/swift,allevato/swift,brentdax/swift,practicalswift/swift,frootloops/swift,swiftix/swift,return/swift,practicalswift/swift,jmgc/swift,xedin/swift,amraboelela/swift,xedin/swift,uasys/swift,glessard/swift,hooman/swift,swiftix/swift,rudkx/swift,djwbrown/swift,parkera/swift,roambotics/swift,parkera/swift,allevato/swift,Jnosh/swift,brentdax/swift,jckarter/swift,harlanhaskins/swift,calebd/swift,sschiau/swift,allevato/swift,huonw/swift,Jnosh/swift,glessard/swift,apple/swift,tjw/swift,gregomni/swift,uasys/swift,return/swift,apple/swift,OscarSwanros/swift,practicalswift/swift,austinzheng/swift,swiftix/swift,zisko/swift,practicalswift/swift,karwa/swift,deyton/swift,djwbrown/swift,glessard/swift,shahmishal/swift,hughbe/swift,jopamer/swift,ahoppen/swift,gribozavr/swift,roambotics/swift,OscarSwanros/swift,karwa/swift,benlangmuir/swift,karwa/swift,hughbe/swift,JGiola/swift,djwbrown/swift,ahoppen/swift,atrick/swift,calebd/swift,CodaFi/swift,practicalswift/swift,parkera/swift,swiftix/swift,frootloops/swift,austinzheng/swift,xedin/swift,austinzheng/swift,jtbandes/swift,shajrawi/swift,harlanhaskins/swift,gribozavr/swift,shajrawi/swift,karwa/swift,deyton/swift,hughbe/swift,calebd/swift,stephentyrone/swift,jmgc/swift,arvedviehweger/swift,hooman/swift,sschiau/swift
swift
## Code Before: // RUN: %target-swift-frontend %s -emit-ir -gdwarf-types -o - | %FileCheck %s func markUsed<T>(_ t: T) {} // Int1 uses 1 bit, but is aligned at 8 bits. // CHECK: !DIBasicType(name: "_T0Bi1_D", size: 1, encoding: DW_ATE_unsigned) func main() { var t = true var f = false markUsed("hello") } main() ## Instruction: Add a testcase for the debug infor generated for 'Bool'. rdar://problem/29605924 ## Code After: // RUN: %target-swift-frontend %s -emit-ir -gdwarf-types -o - | %FileCheck %s // RUN: %target-swift-frontend %s -emit-ir -g -o - \ // RUN: | %FileCheck %s --check-prefix=CHECK_G func markUsed<T>(_ t: T) {} // Int1 uses 1 bit, but is aligned at 8 bits. // CHECK: !DIBasicType(name: "_T0Bi1_D", size: 1, encoding: DW_ATE_unsigned) // Bool has a fixed layout with a storage size of 1 byte and 7 "spare" bits. // CHECK_G: !DICompositeType(tag: DW_TAG_structure_type, name: "Bool", // CHECK_G-SAME: size: 8 func main() { var t = true var f = false markUsed("hello") } main()
af967f79810cbdb02cf05b5a91356eb83fa26175
src/cpp/desktop-mac/WebViewWithKeyEquiv.mm
src/cpp/desktop-mac/WebViewWithKeyEquiv.mm
/* * WebViewWithKeyEquiv.mm * * Copyright (C) 2009-13 by RStudio, Inc. * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ #import "WebViewWithKeyEquiv.h" @implementation WebViewWithKeyEquiv - (void) setKeyEquivDelegate: (id) delegate { keyEquivDelegate_ = delegate; } - (BOOL) performKeyEquivalent: (NSEvent *) theEvent { if (keyEquivDelegate_ != nil) { return [keyEquivDelegate_ performKeyEquivalent: theEvent]; } return [super performKeyEquivalent: theEvent]; } @end
/* * WebViewWithKeyEquiv.mm * * Copyright (C) 2009-13 by RStudio, Inc. * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ #import "WebViewWithKeyEquiv.h" @implementation WebViewWithKeyEquiv - (void) setKeyEquivDelegate: (id) delegate { keyEquivDelegate_ = delegate; } - (BOOL) performKeyEquivalent: (NSEvent *) theEvent { if (keyEquivDelegate_ != nil && [keyEquivDelegate_ performKeyEquivalent: theEvent]) return YES; return [super performKeyEquivalent: theEvent]; } @end
Revert "fix window cycling between plots and main window via shortcut key"
Revert "fix window cycling between plots and main window via shortcut key" This reverts commit a7b564b094bdfa0f09bce3061d2dee6aaa892b3e. This change broke some keyboard shortcuts (e.g. Undo)
Objective-C++
agpl-3.0
pssguy/rstudio,more1/rstudio,piersharding/rstudio,brsimioni/rstudio,piersharding/rstudio,more1/rstudio,jar1karp/rstudio,tbarrongh/rstudio,jrnold/rstudio,suribes/rstudio,nvoron23/rstudio,jzhu8803/rstudio,jzhu8803/rstudio,sfloresm/rstudio,JanMarvin/rstudio,more1/rstudio,tbarrongh/rstudio,more1/rstudio,githubfun/rstudio,githubfun/rstudio,pssguy/rstudio,edrogers/rstudio,pssguy/rstudio,jrnold/rstudio,maligulzar/Rstudio-instrumented,githubfun/rstudio,brsimioni/rstudio,suribes/rstudio,jzhu8803/rstudio,jzhu8803/rstudio,jrnold/rstudio,maligulzar/Rstudio-instrumented,githubfun/rstudio,thklaus/rstudio,tbarrongh/rstudio,tbarrongh/rstudio,maligulzar/Rstudio-instrumented,tbarrongh/rstudio,suribes/rstudio,piersharding/rstudio,sfloresm/rstudio,jar1karp/rstudio,john-r-mcpherson/rstudio,tbarrongh/rstudio,suribes/rstudio,piersharding/rstudio,jrnold/rstudio,john-r-mcpherson/rstudio,piersharding/rstudio,john-r-mcpherson/rstudio,jar1karp/rstudio,JanMarvin/rstudio,nvoron23/rstudio,more1/rstudio,vbelakov/rstudio,tbarrongh/rstudio,JanMarvin/rstudio,jrnold/rstudio,john-r-mcpherson/rstudio,brsimioni/rstudio,nvoron23/rstudio,edrogers/rstudio,jzhu8803/rstudio,brsimioni/rstudio,JanMarvin/rstudio,maligulzar/Rstudio-instrumented,brsimioni/rstudio,thklaus/rstudio,pssguy/rstudio,pssguy/rstudio,sfloresm/rstudio,jrnold/rstudio,brsimioni/rstudio,pssguy/rstudio,nvoron23/rstudio,jar1karp/rstudio,JanMarvin/rstudio,nvoron23/rstudio,vbelakov/rstudio,vbelakov/rstudio,john-r-mcpherson/rstudio,edrogers/rstudio,thklaus/rstudio,nvoron23/rstudio,sfloresm/rstudio,edrogers/rstudio,githubfun/rstudio,suribes/rstudio,vbelakov/rstudio,piersharding/rstudio,tbarrongh/rstudio,piersharding/rstudio,edrogers/rstudio,piersharding/rstudio,john-r-mcpherson/rstudio,jar1karp/rstudio,brsimioni/rstudio,more1/rstudio,edrogers/rstudio,edrogers/rstudio,JanMarvin/rstudio,vbelakov/rstudio,jar1karp/rstudio,pssguy/rstudio,JanMarvin/rstudio,nvoron23/rstudio,JanMarvin/rstudio,jrnold/rstudio,githubfun/rstudio,maligulzar/Rstudio-instrumented,suribes/rstudio,sfloresm/rstudio,jzhu8803/rstudio,jzhu8803/rstudio,brsimioni/rstudio,sfloresm/rstudio,maligulzar/Rstudio-instrumented,jar1karp/rstudio,jar1karp/rstudio,thklaus/rstudio,thklaus/rstudio,suribes/rstudio,thklaus/rstudio,thklaus/rstudio,maligulzar/Rstudio-instrumented,john-r-mcpherson/rstudio,piersharding/rstudio,jzhu8803/rstudio,sfloresm/rstudio,vbelakov/rstudio,vbelakov/rstudio,githubfun/rstudio,pssguy/rstudio,john-r-mcpherson/rstudio,JanMarvin/rstudio,more1/rstudio,thklaus/rstudio,jar1karp/rstudio,suribes/rstudio,maligulzar/Rstudio-instrumented,githubfun/rstudio,sfloresm/rstudio,edrogers/rstudio,more1/rstudio,vbelakov/rstudio,jrnold/rstudio,maligulzar/Rstudio-instrumented,jrnold/rstudio
objective-c++
## Code Before: /* * WebViewWithKeyEquiv.mm * * Copyright (C) 2009-13 by RStudio, Inc. * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ #import "WebViewWithKeyEquiv.h" @implementation WebViewWithKeyEquiv - (void) setKeyEquivDelegate: (id) delegate { keyEquivDelegate_ = delegate; } - (BOOL) performKeyEquivalent: (NSEvent *) theEvent { if (keyEquivDelegate_ != nil) { return [keyEquivDelegate_ performKeyEquivalent: theEvent]; } return [super performKeyEquivalent: theEvent]; } @end ## Instruction: Revert "fix window cycling between plots and main window via shortcut key" This reverts commit a7b564b094bdfa0f09bce3061d2dee6aaa892b3e. This change broke some keyboard shortcuts (e.g. Undo) ## Code After: /* * WebViewWithKeyEquiv.mm * * Copyright (C) 2009-13 by RStudio, Inc. * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the terms of version 3 of the * GNU Affero General Public License. This program is distributed WITHOUT * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. * */ #import "WebViewWithKeyEquiv.h" @implementation WebViewWithKeyEquiv - (void) setKeyEquivDelegate: (id) delegate { keyEquivDelegate_ = delegate; } - (BOOL) performKeyEquivalent: (NSEvent *) theEvent { if (keyEquivDelegate_ != nil && [keyEquivDelegate_ performKeyEquivalent: theEvent]) return YES; return [super performKeyEquivalent: theEvent]; } @end
cfc3e6d5cb1ee69d09635d894f57e9717b53f978
.github/ISSUE_TEMPLATE.md
.github/ISSUE_TEMPLATE.md
* [ ] I have searched through existing [Issues](https://github.com/manastungare/google-calendar-crx/issues) and confirmed that this particular issue has not already been reported. * [ ] I have read and performed all the steps listed under the [Troubleshooting section](https://github.com/manastungare/google-calendar-crx/wiki/Troubleshooting). What steps will reproduce the problem? 1. 2. 3. What is the expected result? What happens instead? Screenshot: - Upload to GitHub directly, do not post to a different site. System Information: - Version: - Language: - Timezone Offset: - User Agent:
* [ ] I have searched through existing [Issues](https://github.com/manastungare/google-calendar-crx/issues) and confirmed that this particular issue has not already been reported. * [ ] I have read and performed all the steps listed in the [Wiki](https://github.com/manastungare/google-calendar-crx/wiki). What steps will reproduce the problem? 1. 2. 3. What is the expected result? What happens instead? Screenshot: - Upload to GitHub directly, do not post to a different site. System Information: - Version: - Language: - Timezone Offset: - User Agent:
Change link from Troubleshooting to Wiki Main Page
Change link from Troubleshooting to Wiki Main Page
Markdown
apache-2.0
thanhpd/google-calendar-crx,manastungare/google-calendar-crx,manastungare/google-calendar-crx,thanhpd/google-calendar-crx
markdown
## Code Before: * [ ] I have searched through existing [Issues](https://github.com/manastungare/google-calendar-crx/issues) and confirmed that this particular issue has not already been reported. * [ ] I have read and performed all the steps listed under the [Troubleshooting section](https://github.com/manastungare/google-calendar-crx/wiki/Troubleshooting). What steps will reproduce the problem? 1. 2. 3. What is the expected result? What happens instead? Screenshot: - Upload to GitHub directly, do not post to a different site. System Information: - Version: - Language: - Timezone Offset: - User Agent: ## Instruction: Change link from Troubleshooting to Wiki Main Page ## Code After: * [ ] I have searched through existing [Issues](https://github.com/manastungare/google-calendar-crx/issues) and confirmed that this particular issue has not already been reported. * [ ] I have read and performed all the steps listed in the [Wiki](https://github.com/manastungare/google-calendar-crx/wiki). What steps will reproduce the problem? 1. 2. 3. What is the expected result? What happens instead? Screenshot: - Upload to GitHub directly, do not post to a different site. System Information: - Version: - Language: - Timezone Offset: - User Agent:
fb36f67b067869278dc5aadfd93350ad026aec2c
.travis.yml
.travis.yml
language: ruby rvm: - 2.3.1 - 2.4.0 services: - mysql cache: bundler before_script: - mv config/database.yml config/database.yml.old - cp config/database.yml.ci config/database.yml - RAILS_ENV=test bin/rails db:create db:schema:load script: - bin/rails test - bundle exec codeclimate-test-reporter install: bundle install
language: ruby services: - mysql cache: bundler before_script: - mv config/database.yml config/database.yml.old - cp config/database.yml.ci config/database.yml - RAILS_ENV=test bin/rails db:create db:schema:load script: - bin/rails test - bundle exec codeclimate-test-reporter install: bundle install
Remove rvm for ruby 2.4.0 test
Remove rvm for ruby 2.4.0 test
YAML
mit
riseshia/Bonghwa,riseshia/Bonghwa,riseshia/Bonghwa,riseshia/Bonghwa
yaml
## Code Before: language: ruby rvm: - 2.3.1 - 2.4.0 services: - mysql cache: bundler before_script: - mv config/database.yml config/database.yml.old - cp config/database.yml.ci config/database.yml - RAILS_ENV=test bin/rails db:create db:schema:load script: - bin/rails test - bundle exec codeclimate-test-reporter install: bundle install ## Instruction: Remove rvm for ruby 2.4.0 test ## Code After: language: ruby services: - mysql cache: bundler before_script: - mv config/database.yml config/database.yml.old - cp config/database.yml.ci config/database.yml - RAILS_ENV=test bin/rails db:create db:schema:load script: - bin/rails test - bundle exec codeclimate-test-reporter install: bundle install
57d9cb67524e7aa1934450bd4c73d54d613bb70b
code/ranlux32.cpp
code/ranlux32.cpp
/* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint seed_num) { state[0] = seed_num; /* * Initialize seed vector using MINSTD */ static constexpr uint64_t g = 48271; static constexpr uint64_t n = (1UL << 48UL); // 2^49 for(size_t i = 1; i < state.size(); ++i) { state[i] = static_cast<fuint>((static_cast<uint64_t>(state[i-1]) * g) % n); } } fuint RANLUX32::operator()() { if(count == discard) { count = 0; for(uint i = 0; i < block_size-discard; ++i) { next_state(); } } uint64_t output = next_state(); count++; return static_cast<fuint>(output); } }
/* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint seed_num) { state[0] = seed_num; /* * Initialize seed vector using MINSTD */ static constexpr uint64_t g = 48271; static constexpr uint64_t n = (1UL << 31UL) - 1UL; // 2^32 -1 fuint first, second; for(size_t i = 1; i < state.size(); ++i) { first = static_cast<fuint>((static_cast<uint64_t>(state[i-1]) * g) % n); second = static_cast<fuint>((static_cast<uint64_t>(first) * g) % n); state[i] = ((static_cast<uint64_t>(first)) << 32UL) << second; } } fuint RANLUX32::operator()() { if(count == discard) { count = 0; for(uint i = 0; i < block_size-discard; ++i) { next_state(); } } uint64_t output = next_state(); count++; return static_cast<fuint>(output); } }
Change seed generation using MINSTD
Change seed generation using MINSTD
C++
mit
kashev/rngs,kashev/rngs,kashev/rngs
c++
## Code Before: /* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint seed_num) { state[0] = seed_num; /* * Initialize seed vector using MINSTD */ static constexpr uint64_t g = 48271; static constexpr uint64_t n = (1UL << 48UL); // 2^49 for(size_t i = 1; i < state.size(); ++i) { state[i] = static_cast<fuint>((static_cast<uint64_t>(state[i-1]) * g) % n); } } fuint RANLUX32::operator()() { if(count == discard) { count = 0; for(uint i = 0; i < block_size-discard; ++i) { next_state(); } } uint64_t output = next_state(); count++; return static_cast<fuint>(output); } } ## Instruction: Change seed generation using MINSTD ## Code After: /* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint seed_num) { state[0] = seed_num; /* * Initialize seed vector using MINSTD */ static constexpr uint64_t g = 48271; static constexpr uint64_t n = (1UL << 31UL) - 1UL; // 2^32 -1 fuint first, second; for(size_t i = 1; i < state.size(); ++i) { first = static_cast<fuint>((static_cast<uint64_t>(state[i-1]) * g) % n); second = static_cast<fuint>((static_cast<uint64_t>(first) * g) % n); state[i] = ((static_cast<uint64_t>(first)) << 32UL) << second; } } fuint RANLUX32::operator()() { if(count == discard) { count = 0; for(uint i = 0; i < block_size-discard; ++i) { next_state(); } } uint64_t output = next_state(); count++; return static_cast<fuint>(output); } }
6ebf55543e74771a80f4e871af5b3cfc8f845101
indico/MaKaC/plugins/Collaboration/RecordingManager/__init__.py
indico/MaKaC/plugins/Collaboration/RecordingManager/__init__.py
from MaKaC.plugins import getModules, initModule from MaKaC.i18n import _ pluginType = "Collaboration" pluginName = "RecordingManager" pluginDescription = _("Recording Manager") modules = {} topModule = None
from MaKaC.i18n import _ pluginType = "Collaboration" pluginName = "RecordingManager" pluginDescription = _("Recording Manager")
Make RecordingManager work with new plugin system
[FIX] Make RecordingManager work with new plugin system
Python
mit
OmeGak/indico,mvidalgarcia/indico,DirkHoffmann/indico,mic4ael/indico,mic4ael/indico,pferreir/indico,pferreir/indico,DirkHoffmann/indico,indico/indico,mic4ael/indico,DirkHoffmann/indico,pferreir/indico,OmeGak/indico,pferreir/indico,mic4ael/indico,indico/indico,mvidalgarcia/indico,ThiefMaster/indico,DirkHoffmann/indico,indico/indico,OmeGak/indico,mvidalgarcia/indico,OmeGak/indico,ThiefMaster/indico,ThiefMaster/indico,mvidalgarcia/indico,ThiefMaster/indico,indico/indico
python
## Code Before: from MaKaC.plugins import getModules, initModule from MaKaC.i18n import _ pluginType = "Collaboration" pluginName = "RecordingManager" pluginDescription = _("Recording Manager") modules = {} topModule = None ## Instruction: [FIX] Make RecordingManager work with new plugin system ## Code After: from MaKaC.i18n import _ pluginType = "Collaboration" pluginName = "RecordingManager" pluginDescription = _("Recording Manager")
4d09b36b71853100eda128b4ef50376c3376cd49
src/index.js
src/index.js
require('dotenv').config() import {version} from '../package.json' import path from 'path' import Koa from 'koa' import Route from 'koa-route' import Serve from 'koa-static' import Octokat from 'octokat' import Badge from './Badge' const app = new Koa() app.context.github = new Octokat({ token: process.env.GITHUB_TOKEN }) Badge.$app = app.context Badge.$env = process.env app.use(Serve(path.join(__dirname, '../public'), { maxage: 31536000000 })) app.use(Route.get('/', function * () { this.body = 'Hireable v' + version })) app.use(Route.get('/:user/:repo?', function * show (id, repo) { yield Badge.show(id, repo).then(src => { this.redirect(src) }) })) app.listen(process.env.APP_PORT) console.log('Listening on :' + process.env.APP_PORT) console.log('Visit http://localhost:' + process.env.APP_PORT)
require('dotenv').config() import {version} from '../package.json' import path from 'path' import Koa from 'koa' import Route from 'koa-route' import Serve from 'koa-static' import Octokat from 'octokat' import Badge from './Badge' const app = new Koa() app.context.github = new Octokat({ token: process.env.GITHUB_TOKEN }) Badge.$app = app.context Badge.$env = process.env app.use(Serve(path.join(__dirname, '../public'), { maxage: 31536000000 })) app.use(Route.get('/', function * () { this.body = 'Hireable v' + version })) app.use(Route.get('/p/:user', function * (user) { this.redirect('https://github.com/' + user) })) app.use(Route.get('/:user/:repo?', function * show (id, repo) { yield Badge.show(id, repo).then(src => { this.redirect(src) }) })) app.listen(process.env.APP_PORT) console.log('Listening on :' + process.env.APP_PORT) console.log('Visit http://localhost:' + process.env.APP_PORT)
Add a profile link which allow users to control the redirection
Add a profile link which allow users to control the redirection
JavaScript
mit
hiendv/hireable
javascript
## Code Before: require('dotenv').config() import {version} from '../package.json' import path from 'path' import Koa from 'koa' import Route from 'koa-route' import Serve from 'koa-static' import Octokat from 'octokat' import Badge from './Badge' const app = new Koa() app.context.github = new Octokat({ token: process.env.GITHUB_TOKEN }) Badge.$app = app.context Badge.$env = process.env app.use(Serve(path.join(__dirname, '../public'), { maxage: 31536000000 })) app.use(Route.get('/', function * () { this.body = 'Hireable v' + version })) app.use(Route.get('/:user/:repo?', function * show (id, repo) { yield Badge.show(id, repo).then(src => { this.redirect(src) }) })) app.listen(process.env.APP_PORT) console.log('Listening on :' + process.env.APP_PORT) console.log('Visit http://localhost:' + process.env.APP_PORT) ## Instruction: Add a profile link which allow users to control the redirection ## Code After: require('dotenv').config() import {version} from '../package.json' import path from 'path' import Koa from 'koa' import Route from 'koa-route' import Serve from 'koa-static' import Octokat from 'octokat' import Badge from './Badge' const app = new Koa() app.context.github = new Octokat({ token: process.env.GITHUB_TOKEN }) Badge.$app = app.context Badge.$env = process.env app.use(Serve(path.join(__dirname, '../public'), { maxage: 31536000000 })) app.use(Route.get('/', function * () { this.body = 'Hireable v' + version })) app.use(Route.get('/p/:user', function * (user) { this.redirect('https://github.com/' + user) })) app.use(Route.get('/:user/:repo?', function * show (id, repo) { yield Badge.show(id, repo).then(src => { this.redirect(src) }) })) app.listen(process.env.APP_PORT) console.log('Listening on :' + process.env.APP_PORT) console.log('Visit http://localhost:' + process.env.APP_PORT)
fab38b0858f41a3671ab05e368d439e43507f005
treeherder/embed/templates/embed/resultset_status.html
treeherder/embed/templates/embed/resultset_status.html
{% load staticfiles %} <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="{% static "embed/css/embed.css" %}" media="screen"/> </head> <body> <div id="resultset_status"> <ul > {% for status, tot in resultset_status_dict.items %} <li class="btn-{{status}}"> <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}&filter-resultStatus={{status}}">{{status}}</a>: {{ tot }} </li> {% endfor %} </ul> See it on <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}" title="Push {{revision}} on Treeherder" target="_blank">Treeherder</a> </div> </body> </html>
{% load staticfiles %} <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="{% static "embed/css/embed.css" %}" media="screen"/> <base target="_blank" /> </head> <body> <div id="resultset_status"> <ul > {% for status, tot in resultset_status_dict.items %} <li class="btn-{{status}}"> <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}&filter-resultStatus={{status}}">{{status}}</a>: {{ tot }} </li> {% endfor %} </ul> See it on <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}" title="Push {{revision}} on Treeherder" target="_blank">Treeherder</a> </div> </body> </html>
Embed links should open on a new page
Embed links should open on a new page
HTML
mpl-2.0
akhileshpillai/treeherder,parkouss/treeherder,moijes12/treeherder,tojonmz/treeherder,glenn124f/treeherder,avih/treeherder,akhileshpillai/treeherder,tojonmz/treeherder,parkouss/treeherder,tojonmz/treeherder,kapy2010/treeherder,glenn124f/treeherder,sylvestre/treeherder,moijes12/treeherder,akhileshpillai/treeherder,vaishalitekale/treeherder,gbrmachado/treeherder,gbrmachado/treeherder,avih/treeherder,tojonmz/treeherder,avih/treeherder,moijes12/treeherder,rail/treeherder,gbrmachado/treeherder,KWierso/treeherder,vaishalitekale/treeherder,moijes12/treeherder,wlach/treeherder,rail/treeherder,rail/treeherder,wlach/treeherder,sylvestre/treeherder,moijes12/treeherder,tojonmz/treeherder,wlach/treeherder,vaishalitekale/treeherder,deathping1994/treeherder,akhileshpillai/treeherder,glenn124f/treeherder,rail/treeherder,parkouss/treeherder,jgraham/treeherder,kapy2010/treeherder,tojon/treeherder,kapy2010/treeherder,edmorley/treeherder,gbrmachado/treeherder,jgraham/treeherder,adusca/treeherder,tojon/treeherder,vaishalitekale/treeherder,glenn124f/treeherder,jgraham/treeherder,deathping1994/treeherder,tojon/treeherder,deathping1994/treeherder,adusca/treeherder,sylvestre/treeherder,KWierso/treeherder,avih/treeherder,rail/treeherder,vaishalitekale/treeherder,KWierso/treeherder,rail/treeherder,edmorley/treeherder,parkouss/treeherder,gbrmachado/treeherder,parkouss/treeherder,moijes12/treeherder,adusca/treeherder,wlach/treeherder,jgraham/treeherder,edmorley/treeherder,wlach/treeherder,jgraham/treeherder,KWierso/treeherder,avih/treeherder,deathping1994/treeherder,sylvestre/treeherder,sylvestre/treeherder,sylvestre/treeherder,deathping1994/treeherder,glenn124f/treeherder,kapy2010/treeherder,tojon/treeherder,adusca/treeherder,parkouss/treeherder,glenn124f/treeherder,edmorley/treeherder,akhileshpillai/treeherder,deathping1994/treeherder,tojonmz/treeherder,adusca/treeherder,kapy2010/treeherder,avih/treeherder,gbrmachado/treeherder,wlach/treeherder,adusca/treeherder,akhileshpillai/treeherder,vaishalitekale/treeherder,jgraham/treeherder
html
## Code Before: {% load staticfiles %} <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="{% static "embed/css/embed.css" %}" media="screen"/> </head> <body> <div id="resultset_status"> <ul > {% for status, tot in resultset_status_dict.items %} <li class="btn-{{status}}"> <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}&filter-resultStatus={{status}}">{{status}}</a>: {{ tot }} </li> {% endfor %} </ul> See it on <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}" title="Push {{revision}} on Treeherder" target="_blank">Treeherder</a> </div> </body> </html> ## Instruction: Embed links should open on a new page ## Code After: {% load staticfiles %} <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="{% static "embed/css/embed.css" %}" media="screen"/> <base target="_blank" /> </head> <body> <div id="resultset_status"> <ul > {% for status, tot in resultset_status_dict.items %} <li class="btn-{{status}}"> <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}&filter-resultStatus={{status}}">{{status}}</a>: {{ tot }} </li> {% endfor %} </ul> See it on <a href="https://treeherder.mozilla.org/#/jobs?repo={{repository}}&revision={{revision}}" title="Push {{revision}} on Treeherder" target="_blank">Treeherder</a> </div> </body> </html>
a3e1a8c2b8e7b4d199b34df25aeb42213a1cf5b6
CHANGELOG.md
CHANGELOG.md
- `1.0.x` Releases - [1.0.0](#100) --- ## [1.0.0](https://github.com/endoze/Initializable/releases/tag/1.0.0) Released on 2016-04-25 Initial Release
- `1.0.x` Releases - [1.0.1](#101) | [1.0.0](#100) --- ## [1.0.1](https://github.com/endoze/RosettaStoneKit/releases/tag/1.0.1) Released on 2015-03-24 ### Added - Additional documentation for library ### Updated ### Removed - UIKit import in module header and replaced with Foundation import ## [1.0.0](https://github.com/endoze/Initializable/releases/tag/1.0.0) Released on 2016-04-25 Initial Release
Update changelog with latest release
Update changelog with latest release This commit updates the changelog with the latest release information.
Markdown
mit
endoze/Initializable,endoze/Initializable,endoze/Initializable
markdown
## Code Before: - `1.0.x` Releases - [1.0.0](#100) --- ## [1.0.0](https://github.com/endoze/Initializable/releases/tag/1.0.0) Released on 2016-04-25 Initial Release ## Instruction: Update changelog with latest release This commit updates the changelog with the latest release information. ## Code After: - `1.0.x` Releases - [1.0.1](#101) | [1.0.0](#100) --- ## [1.0.1](https://github.com/endoze/RosettaStoneKit/releases/tag/1.0.1) Released on 2015-03-24 ### Added - Additional documentation for library ### Updated ### Removed - UIKit import in module header and replaced with Foundation import ## [1.0.0](https://github.com/endoze/Initializable/releases/tag/1.0.0) Released on 2016-04-25 Initial Release
ff26d8a2e5ab7a9af6827c4afae6b5a1e15e4266
lib/a11y/color/matrix/cli.rb
lib/a11y/color/matrix/cli.rb
module A11y module Color module Matrix class CLI < Thor desc "check", "check list of colors" def check(*c) colors = Set.new c colors.sort.combination(2).each do |fg, bg| ratio = WCAGColorContrast.ratio(fg.dup, bg.dup) if fg != bg puts "#{fg}/#{bg}: #{ratio}" puts end end end end end end end
module A11y module Color module Matrix class CLI < Thor option :w, :type => :boolean, :desc => "add white to comparisons" option :b, :type => :boolean, :desc => "add black to comparision" desc "check", "check list of colors" def check(*c) colors = Set.new add_white(add_black(c, options['b']), options['w']) colors.sort.combination(2).each do |fg, bg| ratio = WCAGColorContrast.ratio(fg.dup, bg.dup) if fg != bg puts "% 6s/% 6s: %5.2f" % [fg, bg, ratio] end end end no_commands do def add_black(c, b) if b return c + ['000000'] end return c end def add_white(c, w) if w return c + ['ffffff'] end return c end end end end end end
Add b/w options. Improve output format
Add b/w options. Improve output format
Ruby
mit
seanredmond/a11y-color-matrix,seanredmond/a11y-color-matrix
ruby
## Code Before: module A11y module Color module Matrix class CLI < Thor desc "check", "check list of colors" def check(*c) colors = Set.new c colors.sort.combination(2).each do |fg, bg| ratio = WCAGColorContrast.ratio(fg.dup, bg.dup) if fg != bg puts "#{fg}/#{bg}: #{ratio}" puts end end end end end end end ## Instruction: Add b/w options. Improve output format ## Code After: module A11y module Color module Matrix class CLI < Thor option :w, :type => :boolean, :desc => "add white to comparisons" option :b, :type => :boolean, :desc => "add black to comparision" desc "check", "check list of colors" def check(*c) colors = Set.new add_white(add_black(c, options['b']), options['w']) colors.sort.combination(2).each do |fg, bg| ratio = WCAGColorContrast.ratio(fg.dup, bg.dup) if fg != bg puts "% 6s/% 6s: %5.2f" % [fg, bg, ratio] end end end no_commands do def add_black(c, b) if b return c + ['000000'] end return c end def add_white(c, w) if w return c + ['ffffff'] end return c end end end end end end
35792ba18a5f0d38b28ab0b072e46772fb7a398a
.travis.yml
.travis.yml
language: rust rust: - nightly notifications: email: - [email protected] - [email protected]
language: rust rust: - stable - beta - nightly before_script: - | pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local.bin:$PATH script: - | travis-cargo build && travis-cargo test env: global: - TRAVIS_CARGO_NIGHTLY_FEATURE=channel_select notifications: email: - [email protected] - [email protected]
Update Travis config (will now test with and without channel_select feature).
Update Travis config (will now test with and without channel_select feature).
YAML
mit
Munksgaard/session-types
yaml
## Code Before: language: rust rust: - nightly notifications: email: - [email protected] - [email protected] ## Instruction: Update Travis config (will now test with and without channel_select feature). ## Code After: language: rust rust: - stable - beta - nightly before_script: - | pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local.bin:$PATH script: - | travis-cargo build && travis-cargo test env: global: - TRAVIS_CARGO_NIGHTLY_FEATURE=channel_select notifications: email: - [email protected] - [email protected]
700425754476dd95b270a665935b9ab6df7903f7
templates/app/app.js
templates/app/app.js
var path = require('path'), express = require('express'), http = require('http'), mongoose = require('mongoose'), config = require('./config'); var app = express(); // Configuration app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.set('view options', { layout: false }); app.use(express.logger()); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'))); }); app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); }); app.configure('production', function(){ app.use(express.errorHandler()); }); mongoose.connect(config.db.url); require('./helpers')(app); require('./routes')(app); http.createServer(app).listen(config.port, config.address, function() { console.log("Express server listening on %s:%d in %s mode", config.address, config.port, app.settings.env); });
var path = require('path'), express = require('express'), http = require('http'), mongoose = require('mongoose'), config = require('./config'); var app = express(); // Configuration app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.set('view options', { layout: false }); app.use(express.logger()); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(express.cookieParser('your secret here')); app.use(express.session()); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'))); }); app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); }); app.configure('production', function(){ app.use(express.errorHandler()); }); mongoose.connect(config.db.url); require('./helpers')(app); require('./routes')(app); http.createServer(app).listen(config.port, config.address, function() { console.log("Express server listening on %s:%d in %s mode", config.address, config.port, app.settings.env); });
Add cookieParser and session to express setup
Add cookieParser and session to express setup
JavaScript
mit
saintedlama/bumm,the-diamond-dogs-group-oss/bumm,saintedlama/bumm
javascript
## Code Before: var path = require('path'), express = require('express'), http = require('http'), mongoose = require('mongoose'), config = require('./config'); var app = express(); // Configuration app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.set('view options', { layout: false }); app.use(express.logger()); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'))); }); app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); }); app.configure('production', function(){ app.use(express.errorHandler()); }); mongoose.connect(config.db.url); require('./helpers')(app); require('./routes')(app); http.createServer(app).listen(config.port, config.address, function() { console.log("Express server listening on %s:%d in %s mode", config.address, config.port, app.settings.env); }); ## Instruction: Add cookieParser and session to express setup ## Code After: var path = require('path'), express = require('express'), http = require('http'), mongoose = require('mongoose'), config = require('./config'); var app = express(); // Configuration app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.set('view options', { layout: false }); app.use(express.logger()); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(express.cookieParser('your secret here')); app.use(express.session()); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'))); }); app.configure('development', function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); }); app.configure('production', function(){ app.use(express.errorHandler()); }); mongoose.connect(config.db.url); require('./helpers')(app); require('./routes')(app); http.createServer(app).listen(config.port, config.address, function() { console.log("Express server listening on %s:%d in %s mode", config.address, config.port, app.settings.env); });
427a19c43d70adcf71fbb91e516ce06731e36403
index.js
index.js
'use strict' const commitStream = require('commit-stream') const listStream = require('list-stream') const program = require('commander') const split2 = require('split2') const spawn = require('child_process').spawn const version = require('./package').version program .version(version) .parse(process.argv) spawn('bash', ['-c', 'git log']) .stdout .pipe(split2()) .pipe(commitStream()) .pipe(listStream.obj(onCommitList)) function onCommitList (error, commitList) { if (error) throw error commitList.forEach(function (commit) { console.log(commit) }) }
'use strict' const commitStream = require('commit-stream') const listStream = require('list-stream') const program = require('commander') const split2 = require('split2') const spawn = require('child_process').spawn const pkg = require('./package') program .version(pkg.version) .description(pkg.description) .parse(process.argv) spawn('bash', ['-c', 'git log']) .stdout .pipe(split2()) .pipe(commitStream()) .pipe(listStream.obj(onCommitList)) function onCommitList (error, commitList) { if (error) throw error commitList.forEach(function (commit) { console.log(commit) }) }
Add description to command line help
Add description to command line help
JavaScript
isc
jcollado/pr-tagger
javascript
## Code Before: 'use strict' const commitStream = require('commit-stream') const listStream = require('list-stream') const program = require('commander') const split2 = require('split2') const spawn = require('child_process').spawn const version = require('./package').version program .version(version) .parse(process.argv) spawn('bash', ['-c', 'git log']) .stdout .pipe(split2()) .pipe(commitStream()) .pipe(listStream.obj(onCommitList)) function onCommitList (error, commitList) { if (error) throw error commitList.forEach(function (commit) { console.log(commit) }) } ## Instruction: Add description to command line help ## Code After: 'use strict' const commitStream = require('commit-stream') const listStream = require('list-stream') const program = require('commander') const split2 = require('split2') const spawn = require('child_process').spawn const pkg = require('./package') program .version(pkg.version) .description(pkg.description) .parse(process.argv) spawn('bash', ['-c', 'git log']) .stdout .pipe(split2()) .pipe(commitStream()) .pipe(listStream.obj(onCommitList)) function onCommitList (error, commitList) { if (error) throw error commitList.forEach(function (commit) { console.log(commit) }) }
39e656f3fdd6757ac7b11a5ead2f320accfb92b4
.appveyor.yml
.appveyor.yml
build: false platform: - x64 environment: matrix: - PYTHON: "C:\\Python37-x64" - PYTHON: "C:\\Python36-x64" - PYTHON: "C:\\Python35-x64" matrix: fast_finish: false install: - cmd: set "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" - cmd: pip install tox codecov test_script: - cmd: tox -e py -- -n 2 --color=yes after_test: - cmd: codecov notifications: - provider: Email on_build_success: false on_build_failure: false on_build_status_changed: false
build: false platform: - x64 environment: matrix: - PYTHON: "C:\\Python37-x64" - PYTHON: "C:\\Python36-x64" matrix: fast_finish: false install: - cmd: set "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" - cmd: pip install tox codecov test_script: - cmd: tox -e py -- -n 2 --color=yes after_test: - cmd: codecov notifications: - provider: Email on_build_success: false on_build_failure: false on_build_status_changed: false
Remove Python 3.5 from AppVeyor's pipelines
Remove Python 3.5 from AppVeyor's pipelines
YAML
apache-2.0
opensistemas-hub/osbrain
yaml
## Code Before: build: false platform: - x64 environment: matrix: - PYTHON: "C:\\Python37-x64" - PYTHON: "C:\\Python36-x64" - PYTHON: "C:\\Python35-x64" matrix: fast_finish: false install: - cmd: set "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" - cmd: pip install tox codecov test_script: - cmd: tox -e py -- -n 2 --color=yes after_test: - cmd: codecov notifications: - provider: Email on_build_success: false on_build_failure: false on_build_status_changed: false ## Instruction: Remove Python 3.5 from AppVeyor's pipelines ## Code After: build: false platform: - x64 environment: matrix: - PYTHON: "C:\\Python37-x64" - PYTHON: "C:\\Python36-x64" matrix: fast_finish: false install: - cmd: set "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" - cmd: pip install tox codecov test_script: - cmd: tox -e py -- -n 2 --color=yes after_test: - cmd: codecov notifications: - provider: Email on_build_success: false on_build_failure: false on_build_status_changed: false
2b8b10784d1689083d3bfe420fbe4f5dc4ab6606
index.js
index.js
module.exports = { core: { Product: require('./src/core/product'), Fabric: require('./src/core/fabric'), Buyer: require('./src/core/buyer'), Supplier: require('./src/core/supplier'), Textile: require('./src/core/textile'), Accessories: require('./src/core/accessories'), Sparepart: require('./src/core/sparepart'), UoM: require('./src/core/UoM').UoM, UoM_Template: require('./src/core/UoM').UoM_Template, GeneralMerchandise: require('./src/core/general-merchandise') }, po: { PurchaseOrderItem: require('./src/po/purchase-order-item'), PurchaseOrder: require('./src/po/purchase-order'), PurchaseOrderGroup: require('./src/po/purchase-order-group'), POGarmentGeneral: require('./src/po/PO-garment-general'), POGroupGarmentGeneral: require('./src/po/purchase-order-group-garment-general'), POGarmentSparepart: require('./src/po/po-garment-sparepart') }, map: require('./src/map'), validator: require('./src/validator') }
module.exports = { core: { Product: require('./src/core/product'), Fabric: require('./src/core/fabric'), Buyer: require('./src/core/buyer'), Supplier: require('./src/core/supplier'), Textile: require('./src/core/textile'), Accessories: require('./src/core/accessories'), Sparepart: require('./src/core/sparepart'), UoM: require('./src/core/UoM').UoM, UoM_Template: require('./src/core/UoM').UoM_Template, GeneralMerchandise: require('./src/core/general-merchandise') }, po: { PurchaseOrderItem: require('./src/po/purchase-order-item'), PurchaseOrder: require('./src/po/purchase-order'), PurchaseOrderGroup: require('./src/po/purchase-order-group'), POGarmentGeneral: require('./src/po/PO-garment-general'), POGroupGarmentGeneral: require('./src/po/purchase-order-group-garment-general'), POGarmentSparepart: require('./src/po/po-garment-sparepart'), POTextileJobOrder: require('./src/po/po-textile-job-order-external') }, map: require('./src/map'), validator: require('./src/validator') }
Update Index (Add PO Textile Job Order)
Update Index (Add PO Textile Job Order)
JavaScript
mit
kanisiusandrew/dl-module,danliris/dl-module,indriHutabalian/dl-module,saidiahmad/dl-module,kristika/dl-module,danliris/dl-models,AndreaZain/dl-module,kanisiusandrew/dl-models,baguswidypriyono/dl-module
javascript
## Code Before: module.exports = { core: { Product: require('./src/core/product'), Fabric: require('./src/core/fabric'), Buyer: require('./src/core/buyer'), Supplier: require('./src/core/supplier'), Textile: require('./src/core/textile'), Accessories: require('./src/core/accessories'), Sparepart: require('./src/core/sparepart'), UoM: require('./src/core/UoM').UoM, UoM_Template: require('./src/core/UoM').UoM_Template, GeneralMerchandise: require('./src/core/general-merchandise') }, po: { PurchaseOrderItem: require('./src/po/purchase-order-item'), PurchaseOrder: require('./src/po/purchase-order'), PurchaseOrderGroup: require('./src/po/purchase-order-group'), POGarmentGeneral: require('./src/po/PO-garment-general'), POGroupGarmentGeneral: require('./src/po/purchase-order-group-garment-general'), POGarmentSparepart: require('./src/po/po-garment-sparepart') }, map: require('./src/map'), validator: require('./src/validator') } ## Instruction: Update Index (Add PO Textile Job Order) ## Code After: module.exports = { core: { Product: require('./src/core/product'), Fabric: require('./src/core/fabric'), Buyer: require('./src/core/buyer'), Supplier: require('./src/core/supplier'), Textile: require('./src/core/textile'), Accessories: require('./src/core/accessories'), Sparepart: require('./src/core/sparepart'), UoM: require('./src/core/UoM').UoM, UoM_Template: require('./src/core/UoM').UoM_Template, GeneralMerchandise: require('./src/core/general-merchandise') }, po: { PurchaseOrderItem: require('./src/po/purchase-order-item'), PurchaseOrder: require('./src/po/purchase-order'), PurchaseOrderGroup: require('./src/po/purchase-order-group'), POGarmentGeneral: require('./src/po/PO-garment-general'), POGroupGarmentGeneral: require('./src/po/purchase-order-group-garment-general'), POGarmentSparepart: require('./src/po/po-garment-sparepart'), POTextileJobOrder: require('./src/po/po-textile-job-order-external') }, map: require('./src/map'), validator: require('./src/validator') }
17b393781de2be7f50470e306965779d91cae554
app/serializers/movie_serializer.rb
app/serializers/movie_serializer.rb
class MovieSerializer < ActiveModel::Serializer attributes :id, :title, :gross, :release_date, :mpaa_rating, :description end
class MovieSerializer < ActiveModel::Serializer attributes :id, :title, :gross, :release_date, :mpaa_rating, :description has_many :reviews end
Add has_many reviews to movie serializer so child reviews show up in reviews index json response
Add has_many reviews to movie serializer so child reviews show up in reviews index json response
Ruby
mit
npupillo/bananas-api,npupillo/bananas-api
ruby
## Code Before: class MovieSerializer < ActiveModel::Serializer attributes :id, :title, :gross, :release_date, :mpaa_rating, :description end ## Instruction: Add has_many reviews to movie serializer so child reviews show up in reviews index json response ## Code After: class MovieSerializer < ActiveModel::Serializer attributes :id, :title, :gross, :release_date, :mpaa_rating, :description has_many :reviews end
fbfcc452b63edf4268bb6fe5529979a3ccf2ee21
MidnightBacon/WebViewController.swift
MidnightBacon/WebViewController.swift
// // WebViewController.swift // MidnightBacon // // Created by Justin Kolb on 10/29/14. // Copyright (c) 2014 Justin Kolb. All rights reserved. // import UIKit import WebKit class WebViewController : UIViewController { var webView: WKWebView! var url: NSURL! override func viewDidLoad() { super.viewDidLoad() webView = WKWebView() view.addSubview(webView) webView.loadRequest(NSURLRequest(URL: url)) } override func viewWillLayoutSubviews() { webView.frame = webView.layout( Left(equalTo: view.bounds.left), Top(equalTo: view.bounds.top), Width(equalTo: view.bounds.width), Height(equalTo: view.bounds.height) ) } }
// // WebViewController.swift // MidnightBacon // // Created by Justin Kolb on 10/29/14. // Copyright (c) 2014 Justin Kolb. All rights reserved. // import UIKit import WebKit class WebViewController : UIViewController { var webView: WKWebView! var activityIndicator: UIActivityIndicatorView! var url: NSURL! override func viewDidLoad() { super.viewDidLoad() webView = WKWebView() webView.addObserver(self, forKeyPath: "estimatedProgress", options: .New, context: nil) view.addSubview(webView) activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .WhiteLarge) activityIndicator.color = GlobalStyle().redditOrangeRedColor activityIndicator.startAnimating() view.addSubview(activityIndicator) webView.loadRequest(NSURLRequest(URL: url)) } deinit { webView.removeObserver(self, forKeyPath: "estimatedProgress") } override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: UnsafeMutablePointer<Void>) { if keyPath == "estimatedProgress" { if webView.estimatedProgress >= 1.0 { activityIndicator.stopAnimating() } } } override func viewWillLayoutSubviews() { webView.frame = webView.layout( Left(equalTo: view.bounds.left), Top(equalTo: view.bounds.top), Width(equalTo: view.bounds.width), Height(equalTo: view.bounds.height) ) activityIndicator.frame = activityIndicator.layout( CenterX(equalTo: view.bounds.centerX), CenterY(equalTo: view.bounds.centerY) ) } }
Add loading indicator to web view.
Add loading indicator to web view.
Swift
mit
jkolb/midnightbacon
swift
## Code Before: // // WebViewController.swift // MidnightBacon // // Created by Justin Kolb on 10/29/14. // Copyright (c) 2014 Justin Kolb. All rights reserved. // import UIKit import WebKit class WebViewController : UIViewController { var webView: WKWebView! var url: NSURL! override func viewDidLoad() { super.viewDidLoad() webView = WKWebView() view.addSubview(webView) webView.loadRequest(NSURLRequest(URL: url)) } override func viewWillLayoutSubviews() { webView.frame = webView.layout( Left(equalTo: view.bounds.left), Top(equalTo: view.bounds.top), Width(equalTo: view.bounds.width), Height(equalTo: view.bounds.height) ) } } ## Instruction: Add loading indicator to web view. ## Code After: // // WebViewController.swift // MidnightBacon // // Created by Justin Kolb on 10/29/14. // Copyright (c) 2014 Justin Kolb. All rights reserved. // import UIKit import WebKit class WebViewController : UIViewController { var webView: WKWebView! var activityIndicator: UIActivityIndicatorView! var url: NSURL! override func viewDidLoad() { super.viewDidLoad() webView = WKWebView() webView.addObserver(self, forKeyPath: "estimatedProgress", options: .New, context: nil) view.addSubview(webView) activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .WhiteLarge) activityIndicator.color = GlobalStyle().redditOrangeRedColor activityIndicator.startAnimating() view.addSubview(activityIndicator) webView.loadRequest(NSURLRequest(URL: url)) } deinit { webView.removeObserver(self, forKeyPath: "estimatedProgress") } override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: UnsafeMutablePointer<Void>) { if keyPath == "estimatedProgress" { if webView.estimatedProgress >= 1.0 { activityIndicator.stopAnimating() } } } override func viewWillLayoutSubviews() { webView.frame = webView.layout( Left(equalTo: view.bounds.left), Top(equalTo: view.bounds.top), Width(equalTo: view.bounds.width), Height(equalTo: view.bounds.height) ) activityIndicator.frame = activityIndicator.layout( CenterX(equalTo: view.bounds.centerX), CenterY(equalTo: view.bounds.centerY) ) } }
663e71ffe27c448e8885597332a8e543f40952dd
src/HubDrop/Bundle/Command/UpdateAllCommand.php
src/HubDrop/Bundle/Command/UpdateAllCommand.php
<?php /** * @file UpdateAllCommand.php */ namespace HubDrop\Bundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class UpdateAllCommand extends ContainerAwareCommand { protected function configure() { $this ->setName('hubdrop:update:all') ->setDescription('Update all mirrors of HubDrop.'); } protected function execute(InputInterface $input, OutputInterface $output) { // Get hubdrop service. $hubdrop = $this->getContainer()->get('hubdrop'); // Loop through all repo folders. if ($handle = opendir($hubdrop->repo_path)) { $blacklist = array('.', '..'); while (false !== ($file = readdir($handle))) { if (!in_array($file, $blacklist)) { $project_name = str_replace(".git", "", $file); $out = array(); $out[] = ""; $out[] = "<info>HUBDROP</info> Updating mirror of $project_name"; $output->writeln($out); $project = $hubdrop->getProject($project_name); $project->update(); } } closedir($handle); } } }
<?php /** * @file UpdateAllCommand.php */ namespace HubDrop\Bundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class UpdateAllCommand extends ContainerAwareCommand { protected function configure() { $this ->setName('hubdrop:update:all') ->setDescription('Update all mirrors of HubDrop.'); } protected function execute(InputInterface $input, OutputInterface $output) { // Get hubdrop service. $hubdrop = $this->getContainer()->get('hubdrop'); // Loop through all repo folders. if ($handle = opendir($hubdrop->repo_path)) { $blacklist = array('.', '..'); while (false !== ($file = readdir($handle))) { if (!in_array($file, $blacklist)) { $project_name = str_replace(".git", "", $file); $out = array(); $out[] = ""; $out[] = "<info>HUBDROP</info> Updating mirror of $project_name"; $output->writeln($out); $project = $hubdrop->getProject($project_name); if ($project->source == 'drupal') { $project->update(); } else { $output->write('skipping project, source is github.'); } $project->update(); } } closedir($handle); } } }
Check if source is drupal before updating.
Check if source is drupal before updating.
PHP
mit
hubdrop/app,hubdrop/app,hubdrop/app
php
## Code Before: <?php /** * @file UpdateAllCommand.php */ namespace HubDrop\Bundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class UpdateAllCommand extends ContainerAwareCommand { protected function configure() { $this ->setName('hubdrop:update:all') ->setDescription('Update all mirrors of HubDrop.'); } protected function execute(InputInterface $input, OutputInterface $output) { // Get hubdrop service. $hubdrop = $this->getContainer()->get('hubdrop'); // Loop through all repo folders. if ($handle = opendir($hubdrop->repo_path)) { $blacklist = array('.', '..'); while (false !== ($file = readdir($handle))) { if (!in_array($file, $blacklist)) { $project_name = str_replace(".git", "", $file); $out = array(); $out[] = ""; $out[] = "<info>HUBDROP</info> Updating mirror of $project_name"; $output->writeln($out); $project = $hubdrop->getProject($project_name); $project->update(); } } closedir($handle); } } } ## Instruction: Check if source is drupal before updating. ## Code After: <?php /** * @file UpdateAllCommand.php */ namespace HubDrop\Bundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; class UpdateAllCommand extends ContainerAwareCommand { protected function configure() { $this ->setName('hubdrop:update:all') ->setDescription('Update all mirrors of HubDrop.'); } protected function execute(InputInterface $input, OutputInterface $output) { // Get hubdrop service. $hubdrop = $this->getContainer()->get('hubdrop'); // Loop through all repo folders. if ($handle = opendir($hubdrop->repo_path)) { $blacklist = array('.', '..'); while (false !== ($file = readdir($handle))) { if (!in_array($file, $blacklist)) { $project_name = str_replace(".git", "", $file); $out = array(); $out[] = ""; $out[] = "<info>HUBDROP</info> Updating mirror of $project_name"; $output->writeln($out); $project = $hubdrop->getProject($project_name); if ($project->source == 'drupal') { $project->update(); } else { $output->write('skipping project, source is github.'); } $project->update(); } } closedir($handle); } } }
19f59f9e7743fe075d48af13d45e33c776bba577
ansible-smstools/inventory/group_vars/all.yml
ansible-smstools/inventory/group_vars/all.yml
--- smstools_service_allow: [ '0.0.0.0/0' ]
--- # Disable PKI support in Postfix postfix_pki: False smstools_service_allow: [ '0.0.0.0/0' ]
Create a test case with Postfix and disabled PKI
Create a test case with Postfix and disabled PKI
YAML
mit
ganto/debops-test-suite,ganto/test-suite,ganto/test-suite,ypid/test-suite-ypid,ganto/debops-test-suite,ganto/test-suite,debops/test-suite,ypid/test-suite-ypid,debops/test-suite,ganto/test-suite,ganto/test-suite,ypid/test-suite-ypid,debops/test-suite,debops/test-suite,ganto/debops-test-suite,drybjed/test-suite,drybjed/test-suite,debops/test-suite,drybjed/test-suite,ganto/debops-test-suite,drybjed/test-suite,ypid/test-suite-ypid,ypid/test-suite-ypid,ganto/debops-test-suite,drybjed/test-suite
yaml
## Code Before: --- smstools_service_allow: [ '0.0.0.0/0' ] ## Instruction: Create a test case with Postfix and disabled PKI ## Code After: --- # Disable PKI support in Postfix postfix_pki: False smstools_service_allow: [ '0.0.0.0/0' ]
7f42be12da8429ad5cef835a043b35da7f548747
main.go
main.go
package main // import "github.com/CenturyLinkLabs/imagelayers" import ( "flag" "fmt" "log" "net/http" "github.com/CenturyLinkLabs/imagelayers/api" "github.com/CenturyLinkLabs/imagelayers/server" "github.com/gorilla/mux" ) type layerServer struct { } func NewServer() *layerServer { return new(layerServer) } func (s *layerServer) Start(port int) { router := s.createRouter() log.Printf("Server running on port %d", port) portString := fmt.Sprintf(":%d", port) http.ListenAndServe(portString, router) } func (s *layerServer) createRouter() server.Router { registry := api.NewRemoteRegistry() router := server.Router{mux.NewRouter()} registry.Routes("/registry", &router) return router } func main() { port := flag.Int("p", 8888, "port on which the server will run") flag.Parse() s := NewServer() s.Start(*port) }
package main // import "github.com/CenturyLinkLabs/imagelayers" import ( "flag" "fmt" "log" "net/http" "os" "github.com/CenturyLinkLabs/imagelayers/api" "github.com/CenturyLinkLabs/imagelayers/server" "github.com/gorilla/mux" ) type layerServer struct { } func NewServer() *layerServer { return new(layerServer) } func (s *layerServer) Start(port int) error { router := s.createRouter() log.Printf("Server starting on port %d", port) portString := fmt.Sprintf(":%d", port) return http.ListenAndServe(portString, router) } func (s *layerServer) createRouter() server.Router { registry := api.NewRemoteRegistry() router := server.Router{mux.NewRouter()} registry.Routes("/registry", &router) return router } func main() { port := flag.Int("p", 8888, "port on which the server will run") flag.Parse() s := NewServer() if err := s.Start(*port); err != nil { fmt.Fprintf(os.Stderr, "error: %v\n", err) os.Exit(1) } }
Halt appropriately on server error start.
Halt appropriately on server error start. Show the error and return a correct non-successful exit code.
Go
apache-2.0
BWITS/imagelayers,argvader/imagelayers,Acidburn0zzz/imagelayers,patocox/imagelayers,Acidburn0zzz/imagelayers,CenturyLinkLabs/imagelayers,BWITS/imagelayers,CenturyLinkLabs/imagelayers,patocox/imagelayers,rupakg/imagelayers,argvader/imagelayers,rupakg/imagelayers
go
## Code Before: package main // import "github.com/CenturyLinkLabs/imagelayers" import ( "flag" "fmt" "log" "net/http" "github.com/CenturyLinkLabs/imagelayers/api" "github.com/CenturyLinkLabs/imagelayers/server" "github.com/gorilla/mux" ) type layerServer struct { } func NewServer() *layerServer { return new(layerServer) } func (s *layerServer) Start(port int) { router := s.createRouter() log.Printf("Server running on port %d", port) portString := fmt.Sprintf(":%d", port) http.ListenAndServe(portString, router) } func (s *layerServer) createRouter() server.Router { registry := api.NewRemoteRegistry() router := server.Router{mux.NewRouter()} registry.Routes("/registry", &router) return router } func main() { port := flag.Int("p", 8888, "port on which the server will run") flag.Parse() s := NewServer() s.Start(*port) } ## Instruction: Halt appropriately on server error start. Show the error and return a correct non-successful exit code. ## Code After: package main // import "github.com/CenturyLinkLabs/imagelayers" import ( "flag" "fmt" "log" "net/http" "os" "github.com/CenturyLinkLabs/imagelayers/api" "github.com/CenturyLinkLabs/imagelayers/server" "github.com/gorilla/mux" ) type layerServer struct { } func NewServer() *layerServer { return new(layerServer) } func (s *layerServer) Start(port int) error { router := s.createRouter() log.Printf("Server starting on port %d", port) portString := fmt.Sprintf(":%d", port) return http.ListenAndServe(portString, router) } func (s *layerServer) createRouter() server.Router { registry := api.NewRemoteRegistry() router := server.Router{mux.NewRouter()} registry.Routes("/registry", &router) return router } func main() { port := flag.Int("p", 8888, "port on which the server will run") flag.Parse() s := NewServer() if err := s.Start(*port); err != nil { fmt.Fprintf(os.Stderr, "error: %v\n", err) os.Exit(1) } }
a2dd3f5119d4d806923e6a84b6667df9f6d5d1c1
src/sentry/static/sentry/app/components/selectInput.jsx
src/sentry/static/sentry/app/components/selectInput.jsx
import React from 'react'; import jQuery from 'jquery'; const SelectInput = React.createClass({ getDefaultProps() { return { // HTML attrs disabled: false, multiple: false, required: false, // Extra options placeholder: 'Select an option...', // Component options value: '', onChange: $.noop }; }, componentDidMount() { this.create(); }, componentWillUpdate() { this.destroy(); }, componentDidUpdate() { this.create(); }, componentWillUnmount() { this.destroy(); }, getValue() { return this.select2.getValue(); }, create() { this.select2 = jQuery(this.refs.select).select2(); this.select2.on('change', this.onChange); }, destroy() { jQuery(this.refs.select).select2('destroy'); }, onChange(...args) { this.props.onChange.call(this, this.select2, ...args); }, render() { let opts = { ref: 'select', disabled: this.props.disabled, required: this.props.required, multiple: this.props.multiple, placeholder: this.props.placeholder, className: this.props.className }; return ( <select {...opts}> {this.props.children} </select> ); } }); export default SelectInput;
import React from 'react'; import jQuery from 'jquery'; const SelectInput = React.createClass({ getDefaultProps() { return { // HTML attrs disabled: false, multiple: false, required: false, // Extra options placeholder: 'Select an option...', // Component options value: '', onChange: $.noop }; }, componentDidMount() { this.create(); }, componentWillUpdate() { this.destroy(); }, componentDidUpdate() { this.create(); }, componentWillUnmount() { this.destroy(); }, getValue() { return this.select2.getValue(); }, create() { this.select2 = jQuery(this.refs.select).select2(); this.select2.on('change', this.onChange); }, destroy() { jQuery(this.refs.select).select2('destroy'); }, onChange(...args) { this.props.onChange.call(this, this.select2, ...args); }, render() { let opts = { ref: 'select', disabled: this.props.disabled, required: this.props.required, multiple: this.props.multiple, placeholder: this.props.placeholder, className: this.props.className, value: this.props.value, }; return ( <select {...opts}> {this.props.children} </select> ); } }); export default SelectInput;
Correct default value on SelectInput
Correct default value on SelectInput
JSX
bsd-3-clause
jean/sentry,daevaorn/sentry,JamesMura/sentry,gencer/sentry,JamesMura/sentry,mvaled/sentry,gencer/sentry,JackDanger/sentry,nicholasserra/sentry,jean/sentry,beeftornado/sentry,looker/sentry,jean/sentry,mitsuhiko/sentry,looker/sentry,fotinakis/sentry,zenefits/sentry,BuildingLink/sentry,ifduyue/sentry,mvaled/sentry,mvaled/sentry,ifduyue/sentry,BuildingLink/sentry,zenefits/sentry,looker/sentry,ifduyue/sentry,ifduyue/sentry,jean/sentry,ifduyue/sentry,looker/sentry,beeftornado/sentry,gencer/sentry,JamesMura/sentry,JamesMura/sentry,gencer/sentry,alexm92/sentry,zenefits/sentry,nicholasserra/sentry,mvaled/sentry,daevaorn/sentry,fotinakis/sentry,alexm92/sentry,BuildingLink/sentry,BuildingLink/sentry,fotinakis/sentry,nicholasserra/sentry,fotinakis/sentry,alexm92/sentry,daevaorn/sentry,beeftornado/sentry,JackDanger/sentry,JackDanger/sentry,JamesMura/sentry,mitsuhiko/sentry,BuildingLink/sentry,jean/sentry,gencer/sentry,mvaled/sentry,zenefits/sentry,zenefits/sentry,mvaled/sentry,looker/sentry,daevaorn/sentry
jsx
## Code Before: import React from 'react'; import jQuery from 'jquery'; const SelectInput = React.createClass({ getDefaultProps() { return { // HTML attrs disabled: false, multiple: false, required: false, // Extra options placeholder: 'Select an option...', // Component options value: '', onChange: $.noop }; }, componentDidMount() { this.create(); }, componentWillUpdate() { this.destroy(); }, componentDidUpdate() { this.create(); }, componentWillUnmount() { this.destroy(); }, getValue() { return this.select2.getValue(); }, create() { this.select2 = jQuery(this.refs.select).select2(); this.select2.on('change', this.onChange); }, destroy() { jQuery(this.refs.select).select2('destroy'); }, onChange(...args) { this.props.onChange.call(this, this.select2, ...args); }, render() { let opts = { ref: 'select', disabled: this.props.disabled, required: this.props.required, multiple: this.props.multiple, placeholder: this.props.placeholder, className: this.props.className }; return ( <select {...opts}> {this.props.children} </select> ); } }); export default SelectInput; ## Instruction: Correct default value on SelectInput ## Code After: import React from 'react'; import jQuery from 'jquery'; const SelectInput = React.createClass({ getDefaultProps() { return { // HTML attrs disabled: false, multiple: false, required: false, // Extra options placeholder: 'Select an option...', // Component options value: '', onChange: $.noop }; }, componentDidMount() { this.create(); }, componentWillUpdate() { this.destroy(); }, componentDidUpdate() { this.create(); }, componentWillUnmount() { this.destroy(); }, getValue() { return this.select2.getValue(); }, create() { this.select2 = jQuery(this.refs.select).select2(); this.select2.on('change', this.onChange); }, destroy() { jQuery(this.refs.select).select2('destroy'); }, onChange(...args) { this.props.onChange.call(this, this.select2, ...args); }, render() { let opts = { ref: 'select', disabled: this.props.disabled, required: this.props.required, multiple: this.props.multiple, placeholder: this.props.placeholder, className: this.props.className, value: this.props.value, }; return ( <select {...opts}> {this.props.children} </select> ); } }); export default SelectInput;
539bd8a9df362f285bda375732ec71b3df1bcaae
orbeon_xml_api/tests/test_runner.py
orbeon_xml_api/tests/test_runner.py
from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') self.builder_xml = xml_from_file('tests/data', 'test_controls_builder.xml') self.runner = Runner(self.runner_xml, None, self.builder_xml) # TODO def _test_constructor(self): self.assertRaisesRegex( Runner(self.runner_xml) ) self.assertRaisesRegex( Runner(self.runner_xml, self.builder_xml) ) self.assertRaisesRegex( Runner(self.runner_xml, self.builder) ) self.assertRaisesRegex( Runner(self.runner_xml, self.builder_xml, self.builder) ) # Ok tests runner = Runner(self.runner_xml, None, self.builder_xml) self.assertIsInstance(runner, Runner) runner = Runner(self.runner_xml, self.builder) self.assertIsInstance(runner, Runner) self.assertIsInstance(self.runner.form, RunnerForm)
from xmlunittest import XmlTestCase from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase, XmlTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner_no-image-attachments-iteration.xml') self.builder_xml = xml_from_file('tests/data', 'test_controls_builder_no-image-attachments-iteration.xml') self.runner = Runner(self.runner_xml, None, self.builder_xml) def test_constructor_validation_ok(self): runner = Runner(self.runner_xml, None, self.builder_xml) self.assertIsInstance(runner, Runner) runner = Runner(self.runner_xml, self.builder) self.assertIsInstance(runner, Runner) self.assertIsInstance(self.runner.form, RunnerForm) def test_constructor_validation_fails(self): with self.assertRaisesRegexp(Exception, "Provide either the argument: builder or builder_xml."): Runner(self.runner_xml) with self.assertRaisesRegexp(Exception, "Constructor accepts either builder or builder_xml."): Runner(self.runner_xml, self.builder, self.builder_xml)
Add Runner unit-tests: constructor with validation.
Add Runner unit-tests: constructor with validation.
Python
mit
bobslee/orbeon-xml-api
python
## Code Before: from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner.xml') self.builder_xml = xml_from_file('tests/data', 'test_controls_builder.xml') self.runner = Runner(self.runner_xml, None, self.builder_xml) # TODO def _test_constructor(self): self.assertRaisesRegex( Runner(self.runner_xml) ) self.assertRaisesRegex( Runner(self.runner_xml, self.builder_xml) ) self.assertRaisesRegex( Runner(self.runner_xml, self.builder) ) self.assertRaisesRegex( Runner(self.runner_xml, self.builder_xml, self.builder) ) # Ok tests runner = Runner(self.runner_xml, None, self.builder_xml) self.assertIsInstance(runner, Runner) runner = Runner(self.runner_xml, self.builder) self.assertIsInstance(runner, Runner) self.assertIsInstance(self.runner.form, RunnerForm) ## Instruction: Add Runner unit-tests: constructor with validation. ## Code After: from xmlunittest import XmlTestCase from .test_common import CommonTestCase from ..runner import Runner, RunnerForm from ..utils import xml_from_file class RunnerTestCase(CommonTestCase, XmlTestCase): def setUp(self): super(RunnerTestCase, self).setUp() self.runner_xml = xml_from_file('tests/data', 'test_controls_runner_no-image-attachments-iteration.xml') self.builder_xml = xml_from_file('tests/data', 'test_controls_builder_no-image-attachments-iteration.xml') self.runner = Runner(self.runner_xml, None, self.builder_xml) def test_constructor_validation_ok(self): runner = Runner(self.runner_xml, None, self.builder_xml) self.assertIsInstance(runner, Runner) runner = Runner(self.runner_xml, self.builder) self.assertIsInstance(runner, Runner) self.assertIsInstance(self.runner.form, RunnerForm) def test_constructor_validation_fails(self): with self.assertRaisesRegexp(Exception, "Provide either the argument: builder or builder_xml."): Runner(self.runner_xml) with self.assertRaisesRegexp(Exception, "Constructor accepts either builder or builder_xml."): Runner(self.runner_xml, self.builder, self.builder_xml)
4f75c5081ed623443a892764e7ba468e2d48094f
app/models/concerns/with_omniauth.rb
app/models/concerns/with_omniauth.rb
module WithOmniauth extend ActiveSupport::Concern module ClassMethods def omniauth(auth) where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user| extract_profile!(auth, user) user.save! end end def extract_profile!(auth, user) user.provider = auth.provider user.uid = auth.uid user.name = auth.info.nickname || auth.info.name user.email = auth.info.email user.image_url = auth.info.image user.create_remember_me_token! end end end
module WithOmniauth extend ActiveSupport::Concern module ClassMethods def omniauth(auth) find_by_auth(auth).first_or_initialize.tap do |user| extract_profile!(auth, user) user.save! end end def extract_profile!(auth, user) user.provider = auth.provider user.uid = auth.uid user.name = auth.info.nickname || auth.info.name user.email = auth.info.email user.image_url = auth.info.image user.create_remember_me_token! end def find_by_auth(auth) where('(provider = ? and uid = ?) or email = ?', auth.provider, auth.uid, auth.info.email) end end end
Support profile unification by email
Support profile unification by email
Ruby
agpl-3.0
mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory
ruby
## Code Before: module WithOmniauth extend ActiveSupport::Concern module ClassMethods def omniauth(auth) where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user| extract_profile!(auth, user) user.save! end end def extract_profile!(auth, user) user.provider = auth.provider user.uid = auth.uid user.name = auth.info.nickname || auth.info.name user.email = auth.info.email user.image_url = auth.info.image user.create_remember_me_token! end end end ## Instruction: Support profile unification by email ## Code After: module WithOmniauth extend ActiveSupport::Concern module ClassMethods def omniauth(auth) find_by_auth(auth).first_or_initialize.tap do |user| extract_profile!(auth, user) user.save! end end def extract_profile!(auth, user) user.provider = auth.provider user.uid = auth.uid user.name = auth.info.nickname || auth.info.name user.email = auth.info.email user.image_url = auth.info.image user.create_remember_me_token! end def find_by_auth(auth) where('(provider = ? and uid = ?) or email = ?', auth.provider, auth.uid, auth.info.email) end end end
470210847c616be7d4e96cb89eff8fe5bd39f0d2
config/initializers/cad_avl.rb
config/initializers/cad_avl.rb
if !Rails.env.test? ApplicationSetting['cad_avl.gps_interval_seconds'] = 10 ApplicationSetting['cad_avl.data_storage_months'] = 1 end
if !Rails.env.test? ApplicationSetting['cad_avl.gps_interval_seconds'] = 10 ApplicationSetting['cad_avl.cad_refresh_interval_seconds'] = 30 ApplicationSetting['cad_avl.data_storage_months'] = 1 end
Add CAD refresh interval config
Add CAD refresh interval config
Ruby
agpl-3.0
camsys/ridepilot,camsys/ridepilot,camsys/ridepilot
ruby
## Code Before: if !Rails.env.test? ApplicationSetting['cad_avl.gps_interval_seconds'] = 10 ApplicationSetting['cad_avl.data_storage_months'] = 1 end ## Instruction: Add CAD refresh interval config ## Code After: if !Rails.env.test? ApplicationSetting['cad_avl.gps_interval_seconds'] = 10 ApplicationSetting['cad_avl.cad_refresh_interval_seconds'] = 30 ApplicationSetting['cad_avl.data_storage_months'] = 1 end
29242aa9108e41d1db4c3bc913a78ebed6252fc4
iterableapi/src/main/AndroidManifest.xml
iterableapi/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.iterable.iterableapi"> <application android:label="@string/app_name" android:supportsRtl="true"> <!--FCM--> <service android:name="com.iterable.iterableapi.IterableFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> <service android:name="com.iterable.iterableapi.IterableFirebaseInstanceIDService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> </intent-filter> </service> <!-- Action receiver for push interactions --> <receiver android:name="com.iterable.iterableapi.IterablePushActionReceiver" android:exported="false"> <intent-filter> <action android:name="com.iterable.push.ACTION_PUSH_ACTION" /> </intent-filter> </receiver> </application> </manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.iterable.iterableapi"> <application android:label="@string/app_name" android:supportsRtl="true"> <!--FCM--> <service android:name="com.iterable.iterableapi.IterableFirebaseMessagingService" android:exported="false"> <intent-filter android:priority="-1"> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> <service android:name="com.iterable.iterableapi.IterableFirebaseInstanceIDService" android:exported="false"> <intent-filter android:priority="-1"> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> </intent-filter> </service> <!-- Action receiver for push interactions --> <receiver android:name="com.iterable.iterableapi.IterablePushActionReceiver" android:exported="false"> <intent-filter> <action android:name="com.iterable.push.ACTION_PUSH_ACTION" /> </intent-filter> </receiver> </application> </manifest>
Set priority to -1 for Iterable Firebase services so they can be easily overriden
Set priority to -1 for Iterable Firebase services so they can be easily overriden
XML
mit
Iterable/iterable-android-sdk,Iterable/iterable-android-sdk,Iterable/iterable-android-sdk
xml
## Code Before: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.iterable.iterableapi"> <application android:label="@string/app_name" android:supportsRtl="true"> <!--FCM--> <service android:name="com.iterable.iterableapi.IterableFirebaseMessagingService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> <service android:name="com.iterable.iterableapi.IterableFirebaseInstanceIDService" android:exported="false"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> </intent-filter> </service> <!-- Action receiver for push interactions --> <receiver android:name="com.iterable.iterableapi.IterablePushActionReceiver" android:exported="false"> <intent-filter> <action android:name="com.iterable.push.ACTION_PUSH_ACTION" /> </intent-filter> </receiver> </application> </manifest> ## Instruction: Set priority to -1 for Iterable Firebase services so they can be easily overriden ## Code After: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.iterable.iterableapi"> <application android:label="@string/app_name" android:supportsRtl="true"> <!--FCM--> <service android:name="com.iterable.iterableapi.IterableFirebaseMessagingService" android:exported="false"> <intent-filter android:priority="-1"> <action android:name="com.google.firebase.MESSAGING_EVENT"/> </intent-filter> </service> <service android:name="com.iterable.iterableapi.IterableFirebaseInstanceIDService" android:exported="false"> <intent-filter android:priority="-1"> <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/> </intent-filter> </service> <!-- Action receiver for push interactions --> <receiver android:name="com.iterable.iterableapi.IterablePushActionReceiver" android:exported="false"> <intent-filter> <action android:name="com.iterable.push.ACTION_PUSH_ACTION" /> </intent-filter> </receiver> </application> </manifest>
ac49a132cf207f00f3fa67a9649cde90bd7571f1
app/views/lesson_plan/_milestone.html.erb
app/views/lesson_plan/_milestone.html.erb
<div> <h2><%= milestone.title %></h2> <% if milestone.description %> <p> <%= milestone.description.html_safe %> </p> <% end %> <% if (can? :manage, LessonPlanEntry) && milestone.is_virtual != true %> <%= link_to edit_course_lesson_plan_milestone_path(@course, milestone), class: 'btn' do %> <i class="icon-edit"></i> <% end %> <%= link_to course_lesson_plan_milestone_path(@course, milestone), method: :delete, data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, class: 'btn btn-danger' do %> <i class="icon-trash"></i> <% end %> <% end %> <table class="table"> <tbody> <% entries = milestone.entries.sort { |a, b| a.start_at <=> b.start_at } %> <% entries.each {|entry| %> <%= render :partial => 'lesson_plan/entry', locals: { :entry => entry } %> <% } %> </tbody> </table> </div>
<div> <table class="table-top-align"> <tr> <td> <h2><%= milestone.title %></h2> <% if milestone.description %> <p> <%= milestone.description.html_safe %> </p> <% end %> </td> <td width="10%"> <% if (can? :manage, LessonPlanEntry) && milestone.is_virtual != true %> <%= link_to edit_course_lesson_plan_milestone_path(@course, milestone), class: 'btn' do %> <i class="icon-edit"></i> <% end %> <%= link_to course_lesson_plan_milestone_path(@course, milestone), method: :delete, data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, class: 'btn btn-danger' do %> <i class="icon-trash"></i> <% end %> </td> <% end %> </table> <table class="table"> <tbody> <% entries = milestone.entries.sort { |a, b| a.start_at <=> b.start_at } %> <% entries.each {|entry| %> <%= render :partial => 'lesson_plan/entry', locals: { :entry => entry } %> <% } %> </tbody> </table> </div>
Move milestone Edit/Delete buttons to right. Using table :|
Move milestone Edit/Delete buttons to right. Using table :|
HTML+ERB
mit
Coursemology/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,nusedutech/coursemology.org,nnamon/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,nusedutech/coursemology.org,nnamon/coursemology.org,Coursemology/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,nnamon/coursemology.org,dariusf/coursemology.org,nusedutech/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org,nusedutech/coursemology.org,nusedutech/coursemology.org,nnamon/coursemology.org,allenwq/coursemology.org
html+erb
## Code Before: <div> <h2><%= milestone.title %></h2> <% if milestone.description %> <p> <%= milestone.description.html_safe %> </p> <% end %> <% if (can? :manage, LessonPlanEntry) && milestone.is_virtual != true %> <%= link_to edit_course_lesson_plan_milestone_path(@course, milestone), class: 'btn' do %> <i class="icon-edit"></i> <% end %> <%= link_to course_lesson_plan_milestone_path(@course, milestone), method: :delete, data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, class: 'btn btn-danger' do %> <i class="icon-trash"></i> <% end %> <% end %> <table class="table"> <tbody> <% entries = milestone.entries.sort { |a, b| a.start_at <=> b.start_at } %> <% entries.each {|entry| %> <%= render :partial => 'lesson_plan/entry', locals: { :entry => entry } %> <% } %> </tbody> </table> </div> ## Instruction: Move milestone Edit/Delete buttons to right. Using table :| ## Code After: <div> <table class="table-top-align"> <tr> <td> <h2><%= milestone.title %></h2> <% if milestone.description %> <p> <%= milestone.description.html_safe %> </p> <% end %> </td> <td width="10%"> <% if (can? :manage, LessonPlanEntry) && milestone.is_virtual != true %> <%= link_to edit_course_lesson_plan_milestone_path(@course, milestone), class: 'btn' do %> <i class="icon-edit"></i> <% end %> <%= link_to course_lesson_plan_milestone_path(@course, milestone), method: :delete, data: { confirm: t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }, class: 'btn btn-danger' do %> <i class="icon-trash"></i> <% end %> </td> <% end %> </table> <table class="table"> <tbody> <% entries = milestone.entries.sort { |a, b| a.start_at <=> b.start_at } %> <% entries.each {|entry| %> <%= render :partial => 'lesson_plan/entry', locals: { :entry => entry } %> <% } %> </tbody> </table> </div>
eba55b9b4eb59af9a56965086aae240c6615ba1f
author/urls.py
author/urls.py
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from author import views def author_required(function=None, login_url=None): author_permission = Permission( content_type=ContentType.objects.get(app_label='game', model='task'), codename='add_task', ) actual_decorator = permission_required(author_permission, login_url=login_url) if function is None: return actual_decorator(login_required) return actual_decorator(login_required(function)) urlpatterns = patterns( '', url(r'^$', RedirectView.as_view(url=reverse_lazy('author-login'), permanent=False)), url(r'^login/$', login, {'template_name': 'author/login.html'}, name='author-login'), url(r'^panel/$', author_required(function=views.PanelView.as_view(), login_url=reverse_lazy('author-login')), name='panel'), )
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from author import views def author_required(function=None, login_url=None): actual_decorator = permission_required('game.add_task', login_url=login_url) if function is None: return actual_decorator(login_required) return actual_decorator(login_required(function)) urlpatterns = patterns( '', url(r'^$', RedirectView.as_view(url=reverse_lazy('author-login'), permanent=False)), url(r'^login/$', login, {'template_name': 'author/login.html'}, name='author-login'), url(r'^panel/$', author_required(function=views.PanelView.as_view(), login_url=reverse_lazy('author-login')), name='panel'), )
Fix bug with author permission check
Fix bug with author permission check
Python
bsd-3-clause
stefantsov/blackbox3,stefantsov/blackbox3,stefantsov/blackbox3
python
## Code Before: from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from author import views def author_required(function=None, login_url=None): author_permission = Permission( content_type=ContentType.objects.get(app_label='game', model='task'), codename='add_task', ) actual_decorator = permission_required(author_permission, login_url=login_url) if function is None: return actual_decorator(login_required) return actual_decorator(login_required(function)) urlpatterns = patterns( '', url(r'^$', RedirectView.as_view(url=reverse_lazy('author-login'), permanent=False)), url(r'^login/$', login, {'template_name': 'author/login.html'}, name='author-login'), url(r'^panel/$', author_required(function=views.PanelView.as_view(), login_url=reverse_lazy('author-login')), name='panel'), ) ## Instruction: Fix bug with author permission check ## Code After: from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from author import views def author_required(function=None, login_url=None): actual_decorator = permission_required('game.add_task', login_url=login_url) if function is None: return actual_decorator(login_required) return actual_decorator(login_required(function)) urlpatterns = patterns( '', url(r'^$', RedirectView.as_view(url=reverse_lazy('author-login'), permanent=False)), url(r'^login/$', login, {'template_name': 'author/login.html'}, name='author-login'), url(r'^panel/$', author_required(function=views.PanelView.as_view(), login_url=reverse_lazy('author-login')), name='panel'), )
c0355f0c985293a741867ad4ef48eb448ef4f4de
build-aux/urbi-win32.m4
build-aux/urbi-win32.m4
AC_DEFUN([URBI_WIN32], [AC_CHECK_HEADERS([windows.h], [windows=true], [windows=false]) AM_CONDITIONAL([WIN32], [$windows]) case $host_alias in (*mingw*) # Remove windows-style paths from dependencies files AC_CONFIG_COMMANDS([mingw-fix-path], [sed -i \ "/mv.*Pl\?o$/{;s/$/;\\\\/;p;s/;\\$//;s,.*\.Tpo \(.*\), sed -i s/c:\\\\\\\\\\\\\\\\/\\\\\\\\\\\\\\\\/g \1,;};" \ Makefile ]) ;; esac ])
AC_DEFUN([URBI_WIN32], [AC_CHECK_HEADERS([windows.h], [windows=true], [windows=false]) AM_CONDITIONAL([WIN32], [$windows]) case $host_alias in (*mingw*) # Remove windows-style paths from dependencies files AC_CONFIG_COMMANDS([mingw-fix-path], [sed -i \ "/mv.*Pl\?o$/{;h;s/$/ \\&\\&\\\\/;p;g;s,.*\.Tpo \(.*\), sed -i s/c:\\\\\\\\\\\\\\\\/\\\\\\\\\\\\\\\\/g \1,;};" \ Makefile ]) ;; esac ])
Fix mingw build: do not ignore compilation errors.
Fix mingw build: do not ignore compilation errors. * build-aux/urbi-win32.m4: Use && instead of ; to take errors in account.
M4
bsd-3-clause
aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport
m4
## Code Before: AC_DEFUN([URBI_WIN32], [AC_CHECK_HEADERS([windows.h], [windows=true], [windows=false]) AM_CONDITIONAL([WIN32], [$windows]) case $host_alias in (*mingw*) # Remove windows-style paths from dependencies files AC_CONFIG_COMMANDS([mingw-fix-path], [sed -i \ "/mv.*Pl\?o$/{;s/$/;\\\\/;p;s/;\\$//;s,.*\.Tpo \(.*\), sed -i s/c:\\\\\\\\\\\\\\\\/\\\\\\\\\\\\\\\\/g \1,;};" \ Makefile ]) ;; esac ]) ## Instruction: Fix mingw build: do not ignore compilation errors. * build-aux/urbi-win32.m4: Use && instead of ; to take errors in account. ## Code After: AC_DEFUN([URBI_WIN32], [AC_CHECK_HEADERS([windows.h], [windows=true], [windows=false]) AM_CONDITIONAL([WIN32], [$windows]) case $host_alias in (*mingw*) # Remove windows-style paths from dependencies files AC_CONFIG_COMMANDS([mingw-fix-path], [sed -i \ "/mv.*Pl\?o$/{;h;s/$/ \\&\\&\\\\/;p;g;s,.*\.Tpo \(.*\), sed -i s/c:\\\\\\\\\\\\\\\\/\\\\\\\\\\\\\\\\/g \1,;};" \ Makefile ]) ;; esac ])
59dd05b9cc55525c1901d2c414ca1dab40400521
src/projects.coffee
src/projects.coffee
exports.findMainGraph = (project) -> return null unless project.graphs.length if project.main # Ensure currently set main graph exists for graph in project.graphs return project.main if graph.properties.id is project.main # No 'main' graph sent, see if we can make a smart choice for graph in project.graphs return graph.properties.id if graph.name is 'main' return graph.properties.id if graph.properties.main return null exports.getProjectHash = (project, callback) -> unless project.graphs.length if project.components.length # No graphs in this project, but there are components callback null, [ 'project' project.id 'component' project.components[0].name ] return setTimeout -> # Wait for graphs to be populated if not project.graphs.length and not project.components.length return callback new Error "Project #{project.id} has no graphs or components" exports.getProjectHash project, callback , 100 return # Open main graph, or the first graph main = project.main or project.graphs[0].properties.id unless main return callback new Error "Unable find a main graph for project #{project.id}" callback null, [ 'project' project.id main ] return
exports.findMainGraph = (project) -> return null unless project.graphs.length if project.main # Ensure currently set main graph exists for graph in project.graphs return project.main if graph.properties.id is project.main # No 'main' graph sent, see if we can make a smart choice for graph in project.graphs return graph.properties.id if graph.name is 'main' return graph.properties.id if graph.properties.main # No suitable graph found, use first return project.graphs[0].properties.id exports.getProjectHash = (project, callback) -> unless project.graphs.length if project.components.length # No graphs in this project, but there are components callback null, [ 'project' project.id 'component' project.components[0].name ] return setTimeout -> # Wait for graphs to be populated if not project.graphs.length and not project.components.length return callback new Error "Project #{project.id} has no graphs or components" exports.getProjectHash project, callback , 100 return # Open main graph, or the first graph main = project.main or project.graphs[0].properties.id unless main return callback new Error "Unable find a main graph for project #{project.id}" callback null, [ 'project' project.id main ] return
Set first graph as main if no other suitable is found
Set first graph as main if no other suitable is found
CoffeeScript
mit
noflo/noflo-ui,noflo/noflo-ui
coffeescript
## Code Before: exports.findMainGraph = (project) -> return null unless project.graphs.length if project.main # Ensure currently set main graph exists for graph in project.graphs return project.main if graph.properties.id is project.main # No 'main' graph sent, see if we can make a smart choice for graph in project.graphs return graph.properties.id if graph.name is 'main' return graph.properties.id if graph.properties.main return null exports.getProjectHash = (project, callback) -> unless project.graphs.length if project.components.length # No graphs in this project, but there are components callback null, [ 'project' project.id 'component' project.components[0].name ] return setTimeout -> # Wait for graphs to be populated if not project.graphs.length and not project.components.length return callback new Error "Project #{project.id} has no graphs or components" exports.getProjectHash project, callback , 100 return # Open main graph, or the first graph main = project.main or project.graphs[0].properties.id unless main return callback new Error "Unable find a main graph for project #{project.id}" callback null, [ 'project' project.id main ] return ## Instruction: Set first graph as main if no other suitable is found ## Code After: exports.findMainGraph = (project) -> return null unless project.graphs.length if project.main # Ensure currently set main graph exists for graph in project.graphs return project.main if graph.properties.id is project.main # No 'main' graph sent, see if we can make a smart choice for graph in project.graphs return graph.properties.id if graph.name is 'main' return graph.properties.id if graph.properties.main # No suitable graph found, use first return project.graphs[0].properties.id exports.getProjectHash = (project, callback) -> unless project.graphs.length if project.components.length # No graphs in this project, but there are components callback null, [ 'project' project.id 'component' project.components[0].name ] return setTimeout -> # Wait for graphs to be populated if not project.graphs.length and not project.components.length return callback new Error "Project #{project.id} has no graphs or components" exports.getProjectHash project, callback , 100 return # Open main graph, or the first graph main = project.main or project.graphs[0].properties.id unless main return callback new Error "Unable find a main graph for project #{project.id}" callback null, [ 'project' project.id main ] return
51fb8c903c6258e80c1cfdf2bada93f64babd32a
app.json
app.json
{ "name": "Consul", "description": "Consul - Open Government and E-Participation Web Software", "repository": "https://github.com/consul/consul", "scripts": { "postdeploy": "bundle exec rake db:setup" }, "env": { "RACK_ENV": { "description": "The rack environment to set up this deployment with.", "required": true, "value": "production" }, "SECRET_KEY_BASE": { "description": "A secret key for verifying the integrity of signed cookies.", "generator": "secret" }, "SEED": { "description": "Yes if wanting to seed test data", "value": "yes" }, "WEB_CONCURRENCY": { "description": "The amount of workers (forks) a web dyno will spawn.", "required": false, "value": "1" }, "MAX_THREADS": { "description": "The maximum amount of threads worker will spawn.", "required": false, "value": "3" } }, "addons": [ "heroku-postgresql", "heroku-redis", "rollbar:free", "sendgrid:starter" ], "formation": [ { "process": "web", "quantity": 1}, { "process": "worker", "quantity": 1} ] }
{ "name": "Consul", "description": "Consul - Open Government and E-Participation Web Software", "repository": "https://github.com/consul/consul", "scripts": { "postdeploy": "bundle exec rake db:setup" }, "env": { "RACK_ENV": { "description": "The rack environment to set up this deployment with.", "required": true, "value": "production" }, "SECRET_KEY_BASE": { "description": "A secret key for verifying the integrity of signed cookies.", "generator": "secret" }, "SEED": { "description": "Yes if wanting to seed test data", "value": "yes" }, "WEB_CONCURRENCY": { "description": "The amount of workers (forks) a web dyno will spawn.", "required": false, "value": "1" }, "MAX_THREADS": { "description": "The maximum amount of threads worker will spawn.", "required": false, "value": "3" } }, "addons": [ "heroku-postgresql", "heroku-redis", "rollbar:free", "sendgrid:starter", "memcachedcloud" ], "formation": [ { "process": "web", "quantity": 1}, { "process": "worker", "quantity": 1} ] }
Add addon to the buildpack
Add addon to the buildpack
JSON
agpl-3.0
AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/barcelona-participa,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/barcelona-participa,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/barcelona-participa
json
## Code Before: { "name": "Consul", "description": "Consul - Open Government and E-Participation Web Software", "repository": "https://github.com/consul/consul", "scripts": { "postdeploy": "bundle exec rake db:setup" }, "env": { "RACK_ENV": { "description": "The rack environment to set up this deployment with.", "required": true, "value": "production" }, "SECRET_KEY_BASE": { "description": "A secret key for verifying the integrity of signed cookies.", "generator": "secret" }, "SEED": { "description": "Yes if wanting to seed test data", "value": "yes" }, "WEB_CONCURRENCY": { "description": "The amount of workers (forks) a web dyno will spawn.", "required": false, "value": "1" }, "MAX_THREADS": { "description": "The maximum amount of threads worker will spawn.", "required": false, "value": "3" } }, "addons": [ "heroku-postgresql", "heroku-redis", "rollbar:free", "sendgrid:starter" ], "formation": [ { "process": "web", "quantity": 1}, { "process": "worker", "quantity": 1} ] } ## Instruction: Add addon to the buildpack ## Code After: { "name": "Consul", "description": "Consul - Open Government and E-Participation Web Software", "repository": "https://github.com/consul/consul", "scripts": { "postdeploy": "bundle exec rake db:setup" }, "env": { "RACK_ENV": { "description": "The rack environment to set up this deployment with.", "required": true, "value": "production" }, "SECRET_KEY_BASE": { "description": "A secret key for verifying the integrity of signed cookies.", "generator": "secret" }, "SEED": { "description": "Yes if wanting to seed test data", "value": "yes" }, "WEB_CONCURRENCY": { "description": "The amount of workers (forks) a web dyno will spawn.", "required": false, "value": "1" }, "MAX_THREADS": { "description": "The maximum amount of threads worker will spawn.", "required": false, "value": "3" } }, "addons": [ "heroku-postgresql", "heroku-redis", "rollbar:free", "sendgrid:starter", "memcachedcloud" ], "formation": [ { "process": "web", "quantity": 1}, { "process": "worker", "quantity": 1} ] }
caeb90c3811fb0f59d43b4f697755ef91bec992e
spec/mongoid_embed_finder/relation_discovery_spec.rb
spec/mongoid_embed_finder/relation_discovery_spec.rb
require "spec_helper" require "mongoid_embed_finder/relation_discovery" describe MongoidEmbedFinder::RelationDiscovery do describe "#relations" do subject { described_class.new(Child, :parent).relations } its(:child_class) { should eq Child } its(:parent_class) { should eq Parent } its('children.key') { should eq "children" } its('children.class_name') { should eq "Child" } its('parent.setter') { should eq "parent=" } end end
require "spec_helper" require "mongoid_embed_finder/relation_discovery" describe MongoidEmbedFinder::RelationDiscovery do describe "#relations" do subject { described_class.new(Door, :car).relations } its(:child_class) { should eq Door } its(:parent_class) { should eq Car } its('children.key') { should eq "doors" } its('children.class_name') { should eq "Door" } its('parent.setter') { should eq "car=" } end end
Fix not updated spec after renaming test entities.
Fix not updated spec after renaming test entities.
Ruby
mit
growthrepublic/mongoid_embed_finder
ruby
## Code Before: require "spec_helper" require "mongoid_embed_finder/relation_discovery" describe MongoidEmbedFinder::RelationDiscovery do describe "#relations" do subject { described_class.new(Child, :parent).relations } its(:child_class) { should eq Child } its(:parent_class) { should eq Parent } its('children.key') { should eq "children" } its('children.class_name') { should eq "Child" } its('parent.setter') { should eq "parent=" } end end ## Instruction: Fix not updated spec after renaming test entities. ## Code After: require "spec_helper" require "mongoid_embed_finder/relation_discovery" describe MongoidEmbedFinder::RelationDiscovery do describe "#relations" do subject { described_class.new(Door, :car).relations } its(:child_class) { should eq Door } its(:parent_class) { should eq Car } its('children.key') { should eq "doors" } its('children.class_name') { should eq "Door" } its('parent.setter') { should eq "car=" } end end
c6311207eef6cf66f77d410269efc7581288cb2f
spec/fixtures/api/schemas/public_api/v4/user/basic.json
spec/fixtures/api/schemas/public_api/v4/user/basic.json
{ "type": ["object", "null"], "required": [ "id", "state", "avatar_url", "web_url" ], "properties": { "id": { "type": "integer" }, "state": { "type": "string" }, "avatar_url": { "type": "string" }, "web_url": { "type": "string" } } }
{ "type": ["object", "null"], "required": [ "id", "name", "username", "state", "avatar_url", "web_url" ], "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "username": { "type": "string" }, "state": { "type": "string" }, "avatar_url": { "type": "string" }, "web_url": { "type": "string" } } }
Fix a JSON schema that doesn't include enough fields
Fix a JSON schema that doesn't include enough fields Signed-off-by: Rémy Coutable <[email protected]>
JSON
mit
stoplightio/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,dreampet/gitlab,iiet/iiet-git,iiet/iiet-git,jirutka/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,dreampet/gitlab,iiet/iiet-git,axilleas/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq
json
## Code Before: { "type": ["object", "null"], "required": [ "id", "state", "avatar_url", "web_url" ], "properties": { "id": { "type": "integer" }, "state": { "type": "string" }, "avatar_url": { "type": "string" }, "web_url": { "type": "string" } } } ## Instruction: Fix a JSON schema that doesn't include enough fields Signed-off-by: Rémy Coutable <[email protected]> ## Code After: { "type": ["object", "null"], "required": [ "id", "name", "username", "state", "avatar_url", "web_url" ], "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "username": { "type": "string" }, "state": { "type": "string" }, "avatar_url": { "type": "string" }, "web_url": { "type": "string" } } }
f2946cbd288cc923aea384187af93f03c757d1a1
src/app/account/change-email/change-email-component.html
src/app/account/change-email/change-email-component.html
<div crud> <form class="form-container form-horizontal" crud-submit="save()" novalidate> <div frm-field frm-group> <div frm-label>Current Password</div> <div frm-control> <div frm-password-field model="item.currentPassword" required="true"></div> <div frm-errors errors="item.errors.currentPassword"></div> </div> </div> <div frm-field frm-group> <div frm-label>New Email</div> <div frm-control> <div frm-email-field model="data.email" required="true"></div> <div frm-errors errors="item.errors.email"></div> </div> </div> <div frm-field frm-group> <div frm-label>Confirm New Email</div> <div frm-control> <div frm-confirm-email-field email="data.email" required="true"></div> <div frm-errors> <div frm-error key="equalTo">Emails do not match.</div> </div> </div> </div> <div frm-buttons> <span crud-save-button></span> </div> </form> </div>
<div crud> <form class="form-container form-horizontal" crud-submit="save()" novalidate> <div frm-field frm-group> <div frm-label>Current Email</div> <div frm-control> <p class="form-control-static">{{ originalItem.email }}</p> </div> </div> <div frm-field frm-group> <div frm-label>Current Password</div> <div frm-control> <div frm-password-field model="item.currentPassword" required="true"></div> <div frm-errors errors="item.errors.currentPassword"></div> </div> </div> <div frm-field frm-group> <div frm-label>New Email</div> <div frm-control> <div frm-email-field model="data.email" required="true"></div> <div frm-errors errors="item.errors.email"></div> </div> </div> <div frm-field frm-group> <div frm-label>Confirm New Email</div> <div frm-control> <div frm-confirm-email-field email="data.email" required="true"></div> <div frm-errors> <div frm-error key="equalTo">Emails do not match.</div> </div> </div> </div> <div frm-buttons> <span crud-save-button></span> </div> </form> </div>
Add current email to change email form
Add current email to change email form
HTML
agpl-3.0
renalreg/radar-client,renalreg/radar-client,renalreg/radar-client
html
## Code Before: <div crud> <form class="form-container form-horizontal" crud-submit="save()" novalidate> <div frm-field frm-group> <div frm-label>Current Password</div> <div frm-control> <div frm-password-field model="item.currentPassword" required="true"></div> <div frm-errors errors="item.errors.currentPassword"></div> </div> </div> <div frm-field frm-group> <div frm-label>New Email</div> <div frm-control> <div frm-email-field model="data.email" required="true"></div> <div frm-errors errors="item.errors.email"></div> </div> </div> <div frm-field frm-group> <div frm-label>Confirm New Email</div> <div frm-control> <div frm-confirm-email-field email="data.email" required="true"></div> <div frm-errors> <div frm-error key="equalTo">Emails do not match.</div> </div> </div> </div> <div frm-buttons> <span crud-save-button></span> </div> </form> </div> ## Instruction: Add current email to change email form ## Code After: <div crud> <form class="form-container form-horizontal" crud-submit="save()" novalidate> <div frm-field frm-group> <div frm-label>Current Email</div> <div frm-control> <p class="form-control-static">{{ originalItem.email }}</p> </div> </div> <div frm-field frm-group> <div frm-label>Current Password</div> <div frm-control> <div frm-password-field model="item.currentPassword" required="true"></div> <div frm-errors errors="item.errors.currentPassword"></div> </div> </div> <div frm-field frm-group> <div frm-label>New Email</div> <div frm-control> <div frm-email-field model="data.email" required="true"></div> <div frm-errors errors="item.errors.email"></div> </div> </div> <div frm-field frm-group> <div frm-label>Confirm New Email</div> <div frm-control> <div frm-confirm-email-field email="data.email" required="true"></div> <div frm-errors> <div frm-error key="equalTo">Emails do not match.</div> </div> </div> </div> <div frm-buttons> <span crud-save-button></span> </div> </form> </div>
50714f6b030bddce42d1e3f69be83cb4c9da4188
src/notebook/components/transforms/index.js
src/notebook/components/transforms/index.js
import { displayOrder, transforms } from 'transformime-react'; /** * Thus begins our path for custom mimetypes and future extensions */ import PlotlyTransform from './plotly'; import GeoJSONTransform from './geojson'; const defaultDisplayOrder = displayOrder .insert(0, PlotlyTransform.MIMETYPE) .insert(0, GeoJSONTransform.MIMETYPE); const defaultTransforms = transforms .set(PlotlyTransform.MIMETYPE, PlotlyTransform) .set(GeoJSONTransform.MIMETYPE, GeoJSONTransform); export { defaultDisplayOrder, defaultTransforms };
import { displayOrder, transforms } from 'transformime-react'; /** * Thus begins our path for custom mimetypes and future extensions */ import PlotlyTransform from './plotly'; import GeoJSONTransform from './geojson'; // Register custom transforms const defaultTransforms = transforms .set(PlotlyTransform.MIMETYPE, PlotlyTransform) .set(GeoJSONTransform.MIMETYPE, GeoJSONTransform); // Register our custom transforms as the most rich (front of List) const defaultDisplayOrder = displayOrder .insert(0, PlotlyTransform.MIMETYPE) .insert(0, GeoJSONTransform.MIMETYPE); export { defaultDisplayOrder, defaultTransforms };
Comment on custom transform registration
Comment on custom transform registration
JavaScript
bsd-3-clause
jdetle/nteract,0u812/nteract,jdetle/nteract,nteract/composition,captainsafia/nteract,rgbkrk/nteract,0u812/nteract,jdfreder/nteract,captainsafia/nteract,nteract/nteract,rgbkrk/nteract,nteract/nteract,temogen/nteract,temogen/nteract,temogen/nteract,jdfreder/nteract,jdetle/nteract,nteract/composition,nteract/nteract,rgbkrk/nteract,jdfreder/nteract,jdfreder/nteract,0u812/nteract,captainsafia/nteract,nteract/composition,0u812/nteract,rgbkrk/nteract,nteract/nteract,captainsafia/nteract,nteract/nteract,rgbkrk/nteract,jdetle/nteract
javascript
## Code Before: import { displayOrder, transforms } from 'transformime-react'; /** * Thus begins our path for custom mimetypes and future extensions */ import PlotlyTransform from './plotly'; import GeoJSONTransform from './geojson'; const defaultDisplayOrder = displayOrder .insert(0, PlotlyTransform.MIMETYPE) .insert(0, GeoJSONTransform.MIMETYPE); const defaultTransforms = transforms .set(PlotlyTransform.MIMETYPE, PlotlyTransform) .set(GeoJSONTransform.MIMETYPE, GeoJSONTransform); export { defaultDisplayOrder, defaultTransforms }; ## Instruction: Comment on custom transform registration ## Code After: import { displayOrder, transforms } from 'transformime-react'; /** * Thus begins our path for custom mimetypes and future extensions */ import PlotlyTransform from './plotly'; import GeoJSONTransform from './geojson'; // Register custom transforms const defaultTransforms = transforms .set(PlotlyTransform.MIMETYPE, PlotlyTransform) .set(GeoJSONTransform.MIMETYPE, GeoJSONTransform); // Register our custom transforms as the most rich (front of List) const defaultDisplayOrder = displayOrder .insert(0, PlotlyTransform.MIMETYPE) .insert(0, GeoJSONTransform.MIMETYPE); export { defaultDisplayOrder, defaultTransforms };
cb89252b3d44e0b81f7fcaa121c72066ec12cc58
src/js/routes/jobs.js
src/js/routes/jobs.js
import {Route} from 'react-router'; import JobDetailPage from '../pages/jobs/JobDetailPage'; import JobsPage from '../pages/JobsPage'; import JobsTab from '../pages/jobs/JobsTab'; let jobsRoutes = { type: Route, name: 'jobs-page', handler: JobsPage, path: '/jobs/?', children: [ { type: Route, handler: JobsTab, children: [ { type: Route, handler: JobDetailPage, name: 'jobs-page-detail', path: ':id/?', hideHeaderNavigation: true } ] } ] }; module.exports = jobsRoutes;
import {DefaultRoute, Route} from 'react-router'; /* eslint-disable no-unused-vars */ import React from 'react'; /* eslint-enable no-unused-vars */ import JobDetailPage from '../pages/jobs/JobDetailPage'; import JobsPage from '../pages/JobsPage'; import JobsTab from '../pages/jobs/JobsTab'; import TaskDetail from '../pages/task-details/TaskDetail'; import TaskDetailsTab from '../pages/task-details/TaskDetailsTab'; import TaskFilesTab from '../pages/task-details/TaskFilesTab'; import TaskLogsTab from '../pages/task-details/TaskLogsTab'; let jobsRoutes = { type: Route, name: 'jobs-page', handler: JobsPage, path: '/jobs/?', children: [ { type: Route, handler: JobsTab, children: [ { type: Route, handler: JobDetailPage, name: 'jobs-page-detail', path: ':id/?', hideHeaderNavigation: true, children:[ { type: Route, path: 'tasks/:taskID/?', name: 'jobs-task-details', handler: TaskDetail, hideHeaderNavigation: true, children: [ { type: DefaultRoute, name: 'jobs-task-details-tab', handler: TaskDetailsTab, hideHeaderNavigation: true, title:'Details' }, { type: Route, name: 'jobs-task-details-files', path: 'files/?', handler: TaskFilesTab, hideHeaderNavigation: true, title:'Files' }, { type: Route, name: 'jobs-task-details-logs', dontScroll: true, path: 'logs/?', handler: TaskLogsTab, hideHeaderNavigation: true, title:'Logs' } ] } ] } ] } ] }; module.exports = jobsRoutes;
Add job task detail routes
Add job task detail routes
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
javascript
## Code Before: import {Route} from 'react-router'; import JobDetailPage from '../pages/jobs/JobDetailPage'; import JobsPage from '../pages/JobsPage'; import JobsTab from '../pages/jobs/JobsTab'; let jobsRoutes = { type: Route, name: 'jobs-page', handler: JobsPage, path: '/jobs/?', children: [ { type: Route, handler: JobsTab, children: [ { type: Route, handler: JobDetailPage, name: 'jobs-page-detail', path: ':id/?', hideHeaderNavigation: true } ] } ] }; module.exports = jobsRoutes; ## Instruction: Add job task detail routes ## Code After: import {DefaultRoute, Route} from 'react-router'; /* eslint-disable no-unused-vars */ import React from 'react'; /* eslint-enable no-unused-vars */ import JobDetailPage from '../pages/jobs/JobDetailPage'; import JobsPage from '../pages/JobsPage'; import JobsTab from '../pages/jobs/JobsTab'; import TaskDetail from '../pages/task-details/TaskDetail'; import TaskDetailsTab from '../pages/task-details/TaskDetailsTab'; import TaskFilesTab from '../pages/task-details/TaskFilesTab'; import TaskLogsTab from '../pages/task-details/TaskLogsTab'; let jobsRoutes = { type: Route, name: 'jobs-page', handler: JobsPage, path: '/jobs/?', children: [ { type: Route, handler: JobsTab, children: [ { type: Route, handler: JobDetailPage, name: 'jobs-page-detail', path: ':id/?', hideHeaderNavigation: true, children:[ { type: Route, path: 'tasks/:taskID/?', name: 'jobs-task-details', handler: TaskDetail, hideHeaderNavigation: true, children: [ { type: DefaultRoute, name: 'jobs-task-details-tab', handler: TaskDetailsTab, hideHeaderNavigation: true, title:'Details' }, { type: Route, name: 'jobs-task-details-files', path: 'files/?', handler: TaskFilesTab, hideHeaderNavigation: true, title:'Files' }, { type: Route, name: 'jobs-task-details-logs', dontScroll: true, path: 'logs/?', handler: TaskLogsTab, hideHeaderNavigation: true, title:'Logs' } ] } ] } ] } ] }; module.exports = jobsRoutes;
9beedb6a599cf010292b26ca41aee694115be7fb
app/src/main/java/jp/toastkid/yobidashi/main/StartUp.kt
app/src/main/java/jp/toastkid/yobidashi/main/StartUp.kt
package jp.toastkid.yobidashi.main import android.support.annotation.IdRes import android.support.annotation.StringRes import jp.toastkid.yobidashi.R /** * Start-up view definition. * * @param titleId * @param radioButtonId * * @author toastkidjp */ enum class StartUp(@StringRes val titleId: Int, @IdRes val radioButtonId: Int) { START(R.string.title_startup_start, R.id.start_up_start), SEARCH(R.string.title_search, R.id.start_up_search), BROWSER(R.string.title_browser, R.id.start_up_browser), APPS_LAUNCHER(R.string.title_apps_launcher, R.id.start_up_launcher); companion object { fun find(name: String): StartUp { if (name.isEmpty()) { return getDefault() } return valueOf(name) } private fun getDefault(): StartUp = START fun findById(@IdRes checkedRadioButtonId: Int): StartUp = values().find { it.radioButtonId == checkedRadioButtonId } ?: START } }
package jp.toastkid.yobidashi.main import android.support.annotation.IdRes import android.support.annotation.StringRes import jp.toastkid.yobidashi.R /** * Start-up view definition. * * @param titleId * @param radioButtonId * * @author toastkidjp */ enum class StartUp(@StringRes val titleId: Int, @IdRes val radioButtonId: Int) { START(R.string.title_startup_start, R.id.start_up_start), SEARCH(R.string.title_search, R.id.start_up_search), BROWSER(R.string.title_browser, R.id.start_up_browser), APPS_LAUNCHER(R.string.title_apps_launcher, R.id.start_up_launcher); companion object { fun find(name: String): StartUp { if (name.isEmpty()) { return getDefault() } return valueOf(name) } private fun getDefault(): StartUp = BROWSER fun findById(@IdRes checkedRadioButtonId: Int): StartUp = values().find { it.radioButtonId == checkedRadioButtonId } ?: getDefault() } }
Modify default startup to browser.
Modify default startup to browser.
Kotlin
epl-1.0
toastkidjp/Jitte,toastkidjp/Jitte,toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt
kotlin
## Code Before: package jp.toastkid.yobidashi.main import android.support.annotation.IdRes import android.support.annotation.StringRes import jp.toastkid.yobidashi.R /** * Start-up view definition. * * @param titleId * @param radioButtonId * * @author toastkidjp */ enum class StartUp(@StringRes val titleId: Int, @IdRes val radioButtonId: Int) { START(R.string.title_startup_start, R.id.start_up_start), SEARCH(R.string.title_search, R.id.start_up_search), BROWSER(R.string.title_browser, R.id.start_up_browser), APPS_LAUNCHER(R.string.title_apps_launcher, R.id.start_up_launcher); companion object { fun find(name: String): StartUp { if (name.isEmpty()) { return getDefault() } return valueOf(name) } private fun getDefault(): StartUp = START fun findById(@IdRes checkedRadioButtonId: Int): StartUp = values().find { it.radioButtonId == checkedRadioButtonId } ?: START } } ## Instruction: Modify default startup to browser. ## Code After: package jp.toastkid.yobidashi.main import android.support.annotation.IdRes import android.support.annotation.StringRes import jp.toastkid.yobidashi.R /** * Start-up view definition. * * @param titleId * @param radioButtonId * * @author toastkidjp */ enum class StartUp(@StringRes val titleId: Int, @IdRes val radioButtonId: Int) { START(R.string.title_startup_start, R.id.start_up_start), SEARCH(R.string.title_search, R.id.start_up_search), BROWSER(R.string.title_browser, R.id.start_up_browser), APPS_LAUNCHER(R.string.title_apps_launcher, R.id.start_up_launcher); companion object { fun find(name: String): StartUp { if (name.isEmpty()) { return getDefault() } return valueOf(name) } private fun getDefault(): StartUp = BROWSER fun findById(@IdRes checkedRadioButtonId: Int): StartUp = values().find { it.radioButtonId == checkedRadioButtonId } ?: getDefault() } }
bb5da5f12fa2a84955e39596119053e4bd1bbfee
groups/templates/groups/base.html
groups/templates/groups/base.html
{% extends 'base.html' %} {% block title %} {% block groups_title %}{% endblock groups_title %} {% endblock title %} {% block main_head_subtitle %} {% block groups_subtitle %}{% endblock groups_subtitle %} {% endblock main_head_subtitle %} {% block main_content %} {% block back_link %}{% endblock back_link %} {% block groups_main_content %}{% endblock groups_main_content %} {% endblock main_content %}
{% extends 'base.html' %} {% block title %} {% block groups_title %}{% endblock groups_title %} {% endblock title %} {% block subtitle %} {% block groups_subtitle %}{% endblock groups_subtitle %} {% endblock subtitle %} {% block main_content %} {% block back_link %}{% endblock back_link %} {% block groups_main_content %}{% endblock groups_main_content %} {% endblock main_content %}
Use {% block subtitle %} instead of main_head_subtitle.
Use {% block subtitle %} instead of main_head_subtitle.
HTML
bsd-2-clause
incuna/incuna-groups,incuna/incuna-groups
html
## Code Before: {% extends 'base.html' %} {% block title %} {% block groups_title %}{% endblock groups_title %} {% endblock title %} {% block main_head_subtitle %} {% block groups_subtitle %}{% endblock groups_subtitle %} {% endblock main_head_subtitle %} {% block main_content %} {% block back_link %}{% endblock back_link %} {% block groups_main_content %}{% endblock groups_main_content %} {% endblock main_content %} ## Instruction: Use {% block subtitle %} instead of main_head_subtitle. ## Code After: {% extends 'base.html' %} {% block title %} {% block groups_title %}{% endblock groups_title %} {% endblock title %} {% block subtitle %} {% block groups_subtitle %}{% endblock groups_subtitle %} {% endblock subtitle %} {% block main_content %} {% block back_link %}{% endblock back_link %} {% block groups_main_content %}{% endblock groups_main_content %} {% endblock main_content %}
a41f3aa7f8a81e5f8734cde31008d0e23c77d016
Cargo.toml
Cargo.toml
[package] name = "ccal" version = "0.1.0" authors = ["John Colagioia <[email protected]>"] [dependencies] time = "0.1"
[package] name = "ccal" version = "0.1.0" authors = ["John Colagioia <[email protected]>"] [dependencies] time = "0.1" getopts = "*"
Add argument-parsing library for next step
Add argument-parsing library for next step
TOML
agpl-3.0
jcolag/CommonCalendar
toml
## Code Before: [package] name = "ccal" version = "0.1.0" authors = ["John Colagioia <[email protected]>"] [dependencies] time = "0.1" ## Instruction: Add argument-parsing library for next step ## Code After: [package] name = "ccal" version = "0.1.0" authors = ["John Colagioia <[email protected]>"] [dependencies] time = "0.1" getopts = "*"
e45d8dcfb862fc70a35a7820f87f28baf5d1bcff
ruby/command-t/finder/mru_buffer_finder.rb
ruby/command-t/finder/mru_buffer_finder.rb
require 'command-t/ext' # CommandT::Matcher require 'command-t/scanner/mru_buffer_scanner' require 'command-t/finder/buffer_finder' module CommandT class MRUBufferFinder < BufferFinder # Override sorted_matches_for to prevent MRU ordered matches from being # ordered alphabetically. def sorted_matches_for(str, options = {}) matches = super(str, options.merge(:sort => false)) # take current buffer (by definition, the most recently used) and move it # to the end of the results if MRU.stack.last && relative_path_under_working_directory(MRU.stack.last.name) == matches.first matches[1..-1] + [matches.first] else matches end end def initialize @scanner = MRUBufferScanner.new @matcher = Matcher.new @scanner, :always_show_dot_files => true end end # class MRUBufferFinder end # CommandT
require 'command-t/ext' # CommandT::Matcher require 'command-t/scanner/mru_buffer_scanner' require 'command-t/finder/buffer_finder' module CommandT class MRUBufferFinder < BufferFinder def initialize @scanner = MRUBufferScanner.new @matcher = Matcher.new @scanner, :always_show_dot_files => true end # Override sorted_matches_for to prevent MRU ordered matches from being # ordered alphabetically. def sorted_matches_for(str, options = {}) matches = super(str, options.merge(:sort => false)) # take current buffer (by definition, the most recently used) and move it # to the end of the results if MRU.stack.last && relative_path_under_working_directory(MRU.stack.last.name) == matches.first matches[1..-1] + [matches.first] else matches end end end # class MRUBufferFinder end # CommandT
Put initialize method at top of class
Put initialize method at top of class By convention, this is where people expect to see this.
Ruby
bsd-2-clause
supriyantomaftuh/command-t,mtimkovich/command-t,vrkansagara/command-t,besarthoxhaj/command-t,besarthoxhaj/command-t,lencioni/command-t,wincent/command-t,yrro/command-t,lencioni/command-t,simichaels/dotfiles,wincent/command-t,supriyantomaftuh/command-t,simichaels/dotfiles,yrro/command-t,wincent/command-t,1234-/command-t,mtimkovich/command-t,1234-/command-t,vrkansagara/command-t
ruby
## Code Before: require 'command-t/ext' # CommandT::Matcher require 'command-t/scanner/mru_buffer_scanner' require 'command-t/finder/buffer_finder' module CommandT class MRUBufferFinder < BufferFinder # Override sorted_matches_for to prevent MRU ordered matches from being # ordered alphabetically. def sorted_matches_for(str, options = {}) matches = super(str, options.merge(:sort => false)) # take current buffer (by definition, the most recently used) and move it # to the end of the results if MRU.stack.last && relative_path_under_working_directory(MRU.stack.last.name) == matches.first matches[1..-1] + [matches.first] else matches end end def initialize @scanner = MRUBufferScanner.new @matcher = Matcher.new @scanner, :always_show_dot_files => true end end # class MRUBufferFinder end # CommandT ## Instruction: Put initialize method at top of class By convention, this is where people expect to see this. ## Code After: require 'command-t/ext' # CommandT::Matcher require 'command-t/scanner/mru_buffer_scanner' require 'command-t/finder/buffer_finder' module CommandT class MRUBufferFinder < BufferFinder def initialize @scanner = MRUBufferScanner.new @matcher = Matcher.new @scanner, :always_show_dot_files => true end # Override sorted_matches_for to prevent MRU ordered matches from being # ordered alphabetically. def sorted_matches_for(str, options = {}) matches = super(str, options.merge(:sort => false)) # take current buffer (by definition, the most recently used) and move it # to the end of the results if MRU.stack.last && relative_path_under_working_directory(MRU.stack.last.name) == matches.first matches[1..-1] + [matches.first] else matches end end end # class MRUBufferFinder end # CommandT
f9e5b428814e71b0b26b581d18435de963c89010
README.md
README.md
Python combines HTTP and WebSocketServer with SSL support
Python combines HTTP and WebSocketServer with SSL support ##command line options ```shell #assume ExampleWSServer.py and HTTPWebSocketsHandler.py are in the current directory nohup python ExampleWSServer.py 8000 secure username:mysecret >>ws.log& ``` This uses SSL/https. Change username:mysecret in a username:password chosen by yourself. The websserver uses port 8000 by default, and can be changed by an optional parameter: `nohup python ExampleWSServer.py 8001 secure username:mysecret >>ws.log&` Providing a user:password is optional, as well as using SSL/https. When the website is only accessible within your LAN, then the server can be used as plain http, by omitting the secure parameter. The following parameter formats are valid: ```shell nohup python ExampleWSServer.py 8001 secure user:password >>ws.log& #no username and password requested nohup python ExampleWSServer.py 8000 secure >>ws.log& #plain http, with optional port nohup python ExampleWSServer.py 8002 >>ws.log& #plain http, default port 8000 nohup python ExampleWSServer.py >>ws.log& ```
Update readme with command line options
Update readme with command line options
Markdown
mit
SevenW/httpwebsockethandler,SevenW/httpwebsockethandler
markdown
## Code Before: Python combines HTTP and WebSocketServer with SSL support ## Instruction: Update readme with command line options ## Code After: Python combines HTTP and WebSocketServer with SSL support ##command line options ```shell #assume ExampleWSServer.py and HTTPWebSocketsHandler.py are in the current directory nohup python ExampleWSServer.py 8000 secure username:mysecret >>ws.log& ``` This uses SSL/https. Change username:mysecret in a username:password chosen by yourself. The websserver uses port 8000 by default, and can be changed by an optional parameter: `nohup python ExampleWSServer.py 8001 secure username:mysecret >>ws.log&` Providing a user:password is optional, as well as using SSL/https. When the website is only accessible within your LAN, then the server can be used as plain http, by omitting the secure parameter. The following parameter formats are valid: ```shell nohup python ExampleWSServer.py 8001 secure user:password >>ws.log& #no username and password requested nohup python ExampleWSServer.py 8000 secure >>ws.log& #plain http, with optional port nohup python ExampleWSServer.py 8002 >>ws.log& #plain http, default port 8000 nohup python ExampleWSServer.py >>ws.log& ```
0b785c23154e15b470bfff3aa0a7125600276ad4
README.md
README.md
> A directory of Progressive Web App case studies. ## Contributing See [CONTRIBUTING.md](.github/CONTRIBUTING.md) ## Developing This site is built with [Jekyll](https://jekyllrb.com/docs/home/). ### Quick start ```sh git clone [email protected]:cloudfour/pwastats.git cd pwastats gem install bundler bundle install npm install ``` For local development: ``` npm start ``` For a single build: ``` npm run build ``` View the local site at http://localhost:4000. ### Fetching an icon for a PWA ```sh npm run fetch-icon ``` This will ask you for the PWA url and the directory to download to. It will fetch the icon from the app's `manifest.json`. ### Resizing icons To resize all the PWA icons in `images`: 1. Run `npm install` to install the dependencies 2. Run `npm run resize-images` to automatically generate optimized 1x and 2x versions of the images
> A directory of Progressive Web App case studies. ## Contributing See [CONTRIBUTING.md](.github/CONTRIBUTING.md) ## Developing This site is built with [Jekyll](https://jekyllrb.com/docs/home/). ### Quick start This project relies on [Ruby](https://www.ruby-lang.org/en/), [Node](https://nodejs.org/), and [npm](https://www.npmjs.com/). Before following these steps you'll need to [set up a Ruby dev environment](https://jekyllrb.com/docs/installation/) as well as [install node and npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm) if you haven't already. ```sh git clone [email protected]:cloudfour/pwastats.git cd pwastats gem install bundler bundle install npm install ``` For local development: ``` npm start ``` For a single build: ``` npm run build ``` View the local site at http://localhost:4000. ### Fetching an icon for a PWA ```sh npm run fetch-icon ``` This will ask you for the PWA url and the directory to download to. It will fetch the icon from the app's `manifest.json`. ### Resizing icons To resize all the PWA icons in `images`: 1. Run `npm install` to install the dependencies 2. Run `npm run resize-images` to automatically generate optimized 1x and 2x versions of the images
Add a note about installing Ruby and Node/npm
Add a note about installing Ruby and Node/npm When following the install instructions I did not have Ruby installed. It took me a little while to figure out the proper way to install gems. MacOS has a global Ruby install that you should not be modifying. Instead your should use something like `rbenv` to set up a dev install. This commit adds a link to an explanation of how to do so. For completeness sake, it also adds instructions for installing npm.
Markdown
mit
cloudfour/pwastats,cloudfour/pwastats
markdown
## Code Before: > A directory of Progressive Web App case studies. ## Contributing See [CONTRIBUTING.md](.github/CONTRIBUTING.md) ## Developing This site is built with [Jekyll](https://jekyllrb.com/docs/home/). ### Quick start ```sh git clone [email protected]:cloudfour/pwastats.git cd pwastats gem install bundler bundle install npm install ``` For local development: ``` npm start ``` For a single build: ``` npm run build ``` View the local site at http://localhost:4000. ### Fetching an icon for a PWA ```sh npm run fetch-icon ``` This will ask you for the PWA url and the directory to download to. It will fetch the icon from the app's `manifest.json`. ### Resizing icons To resize all the PWA icons in `images`: 1. Run `npm install` to install the dependencies 2. Run `npm run resize-images` to automatically generate optimized 1x and 2x versions of the images ## Instruction: Add a note about installing Ruby and Node/npm When following the install instructions I did not have Ruby installed. It took me a little while to figure out the proper way to install gems. MacOS has a global Ruby install that you should not be modifying. Instead your should use something like `rbenv` to set up a dev install. This commit adds a link to an explanation of how to do so. For completeness sake, it also adds instructions for installing npm. ## Code After: > A directory of Progressive Web App case studies. ## Contributing See [CONTRIBUTING.md](.github/CONTRIBUTING.md) ## Developing This site is built with [Jekyll](https://jekyllrb.com/docs/home/). ### Quick start This project relies on [Ruby](https://www.ruby-lang.org/en/), [Node](https://nodejs.org/), and [npm](https://www.npmjs.com/). Before following these steps you'll need to [set up a Ruby dev environment](https://jekyllrb.com/docs/installation/) as well as [install node and npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm) if you haven't already. ```sh git clone [email protected]:cloudfour/pwastats.git cd pwastats gem install bundler bundle install npm install ``` For local development: ``` npm start ``` For a single build: ``` npm run build ``` View the local site at http://localhost:4000. ### Fetching an icon for a PWA ```sh npm run fetch-icon ``` This will ask you for the PWA url and the directory to download to. It will fetch the icon from the app's `manifest.json`. ### Resizing icons To resize all the PWA icons in `images`: 1. Run `npm install` to install the dependencies 2. Run `npm run resize-images` to automatically generate optimized 1x and 2x versions of the images
4ff6499b93e52849eb3dd97ebeb45c8c32f55e08
db/ignore_patterns/dreamwidth.json
db/ignore_patterns/dreamwidth.json
{ "name": "dreamwidth", "patterns": [ "replyto=", "mode=reply", "/inbox/compose", "/manage/tracking/", "/manage/circle/", "/shop/account", "/tools/tellafriend", "/tools/memadd" ], "type": "ignore_patterns" }
{ "name": "dreamwidth", "patterns": [ "/\\d+\\.html\\?(.*&)?replyto=\\d+(&|$)", "/\\d+\\.html\\?(.*&)?mode=reply(&|$)", "/inbox/compose\\.bml\\?", "/manage/tracking/", "/manage/circle/", "/manage/subscriptions/user\\.bml\\?", "/shop/account", "/tools/tellafriend\\?", "/tools/memadd\\?", "/tools/content_flag\\.bml\\?", "/identity/login\\.bml\\?", "/subscribers/add\\?", "/update\\.bml\\?", "/\\d{4}/\\d\\d/\\d\\d/\\?get=(prev|next)$", "^https?://[^/]+\\.livejournal\\.com/.*/flymeango\\.com/$", "^https?://[^/]+\\.livejournal\\.com/.*/fotogid\\.info$", "^https?://[^/]+\\.livejournal\\.com/.*/spring\\.me$", "^https?://[^/]+\\.livejournal\\.com/.*/www\\.arte\\.tv/en/$", "^https?://[^/]+\\.livejournal\\.com/.*/error\\.[^/]+\\.text$", "^https?://[^/]+\\.livejournal\\.com/.*/fbmerging\\.[^/]+\\.text$", "^https?://[^/]+\\.livejournal\\.com/.*/popup\\.[^/]+\\.text$", "^https?://[^/]+\\.livejournal\\.com/.*/\\*sup_ru/ru/UTF-8/", "^https?://(?=[^/]+\\.livejournal\\.com/){primary_netloc}/(.*/)?https?%3A%2F%2F{primary_netloc}%2F", "^https?://[^/]+\\.livejournal\\.com/.*/(photo/(\\{\\{|%7B%7B)photo\\.siteroot(\\}\\}|%7D%7D)/){2}", "^https?://[^/]+\\.livejournal\\.com/.*/gtm\\.js$" ], "type": "ignore_patterns" }
Extend and update Dreamwidth/LiveJournal igset
Extend and update Dreamwidth/LiveJournal igset Updated most of the existing ignores to be more precise, and added a large number of ignores appearing in particular on LJ (login, member-only functions, calendar recursion, various broken stuff due to JS extraction or simply broken links).
JSON
mit
falconkirtaran/ArchiveBot,falconkirtaran/ArchiveBot,falconkirtaran/ArchiveBot,ArchiveTeam/ArchiveBot,falconkirtaran/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,falconkirtaran/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot
json
## Code Before: { "name": "dreamwidth", "patterns": [ "replyto=", "mode=reply", "/inbox/compose", "/manage/tracking/", "/manage/circle/", "/shop/account", "/tools/tellafriend", "/tools/memadd" ], "type": "ignore_patterns" } ## Instruction: Extend and update Dreamwidth/LiveJournal igset Updated most of the existing ignores to be more precise, and added a large number of ignores appearing in particular on LJ (login, member-only functions, calendar recursion, various broken stuff due to JS extraction or simply broken links). ## Code After: { "name": "dreamwidth", "patterns": [ "/\\d+\\.html\\?(.*&)?replyto=\\d+(&|$)", "/\\d+\\.html\\?(.*&)?mode=reply(&|$)", "/inbox/compose\\.bml\\?", "/manage/tracking/", "/manage/circle/", "/manage/subscriptions/user\\.bml\\?", "/shop/account", "/tools/tellafriend\\?", "/tools/memadd\\?", "/tools/content_flag\\.bml\\?", "/identity/login\\.bml\\?", "/subscribers/add\\?", "/update\\.bml\\?", "/\\d{4}/\\d\\d/\\d\\d/\\?get=(prev|next)$", "^https?://[^/]+\\.livejournal\\.com/.*/flymeango\\.com/$", "^https?://[^/]+\\.livejournal\\.com/.*/fotogid\\.info$", "^https?://[^/]+\\.livejournal\\.com/.*/spring\\.me$", "^https?://[^/]+\\.livejournal\\.com/.*/www\\.arte\\.tv/en/$", "^https?://[^/]+\\.livejournal\\.com/.*/error\\.[^/]+\\.text$", "^https?://[^/]+\\.livejournal\\.com/.*/fbmerging\\.[^/]+\\.text$", "^https?://[^/]+\\.livejournal\\.com/.*/popup\\.[^/]+\\.text$", "^https?://[^/]+\\.livejournal\\.com/.*/\\*sup_ru/ru/UTF-8/", "^https?://(?=[^/]+\\.livejournal\\.com/){primary_netloc}/(.*/)?https?%3A%2F%2F{primary_netloc}%2F", "^https?://[^/]+\\.livejournal\\.com/.*/(photo/(\\{\\{|%7B%7B)photo\\.siteroot(\\}\\}|%7D%7D)/){2}", "^https?://[^/]+\\.livejournal\\.com/.*/gtm\\.js$" ], "type": "ignore_patterns" }
22a4375c2ecb1549281cbd92b7fb2cf0c0be9989
.travis.yml
.travis.yml
language: ruby sudo: required addons: chrome: stable cache: - bundler notifications: email: false rvm: - 2.4.4 - 2.3.7 - 2.2.10 - jruby-9.0.3.0 install: bin/setup_ci before_script: - export PATH="$HOME/.nvm/versions/node/v${NODE_JS_VERSION}/bin:$PATH" script: bin/rake env: global: - secure: RbWKxwfpzyQ5uv/jYH68/0J3Y9xe7rQbGULsWZT98FxZcVWLoOFlPPITmnmEK32CjQUww8iMz50FRLxFNmXg8prt1KzpzikVdIZLmYg1NFShI8+JOFhJzwCuk/LLybNUmydejR58FJvV9gS8NYqMh5leFkDM3OwLxhWdcE8hDDQ= - NODE_JS_VERSION=7.10.0 gemfile: - gemfiles/4.2.gemfile - gemfiles/5.0.gemfile - gemfiles/5.1.gemfile - gemfiles/master.gemfile matrix: allow_failures: - rvm: jruby-9.0.3.0 - gemfile: gemfiles/master.gemfile
language: ruby sudo: required addons: chrome: stable cache: - bundler notifications: email: false rvm: - 2.4.4 - 2.3.7 - 2.2.10 - jruby-9.1.16.0 install: bin/setup_ci before_script: - export PATH="$HOME/.nvm/versions/node/v${NODE_JS_VERSION}/bin:$PATH" script: bin/rake env: global: - secure: RbWKxwfpzyQ5uv/jYH68/0J3Y9xe7rQbGULsWZT98FxZcVWLoOFlPPITmnmEK32CjQUww8iMz50FRLxFNmXg8prt1KzpzikVdIZLmYg1NFShI8+JOFhJzwCuk/LLybNUmydejR58FJvV9gS8NYqMh5leFkDM3OwLxhWdcE8hDDQ= - NODE_JS_VERSION=7.10.0 gemfile: - gemfiles/4.2.gemfile - gemfiles/5.0.gemfile - gemfiles/5.1.gemfile - gemfiles/master.gemfile matrix: allow_failures: - gemfile: gemfiles/master.gemfile
Update CI's JRuby version to `9.1.16.0`
Update CI's JRuby version to `9.1.16.0` Remove it from the allowed failures matrix.
YAML
mit
thoughtbot/ember-cli-rails,seanpdoyle/ember-cli-rails,rwz/ember-cli-rails,seanpdoyle/ember-cli-rails,rwz/ember-cli-rails,seanpdoyle/ember-cli-rails,rwz/ember-cli-rails,thoughtbot/ember-cli-rails,thoughtbot/ember-cli-rails
yaml
## Code Before: language: ruby sudo: required addons: chrome: stable cache: - bundler notifications: email: false rvm: - 2.4.4 - 2.3.7 - 2.2.10 - jruby-9.0.3.0 install: bin/setup_ci before_script: - export PATH="$HOME/.nvm/versions/node/v${NODE_JS_VERSION}/bin:$PATH" script: bin/rake env: global: - secure: RbWKxwfpzyQ5uv/jYH68/0J3Y9xe7rQbGULsWZT98FxZcVWLoOFlPPITmnmEK32CjQUww8iMz50FRLxFNmXg8prt1KzpzikVdIZLmYg1NFShI8+JOFhJzwCuk/LLybNUmydejR58FJvV9gS8NYqMh5leFkDM3OwLxhWdcE8hDDQ= - NODE_JS_VERSION=7.10.0 gemfile: - gemfiles/4.2.gemfile - gemfiles/5.0.gemfile - gemfiles/5.1.gemfile - gemfiles/master.gemfile matrix: allow_failures: - rvm: jruby-9.0.3.0 - gemfile: gemfiles/master.gemfile ## Instruction: Update CI's JRuby version to `9.1.16.0` Remove it from the allowed failures matrix. ## Code After: language: ruby sudo: required addons: chrome: stable cache: - bundler notifications: email: false rvm: - 2.4.4 - 2.3.7 - 2.2.10 - jruby-9.1.16.0 install: bin/setup_ci before_script: - export PATH="$HOME/.nvm/versions/node/v${NODE_JS_VERSION}/bin:$PATH" script: bin/rake env: global: - secure: RbWKxwfpzyQ5uv/jYH68/0J3Y9xe7rQbGULsWZT98FxZcVWLoOFlPPITmnmEK32CjQUww8iMz50FRLxFNmXg8prt1KzpzikVdIZLmYg1NFShI8+JOFhJzwCuk/LLybNUmydejR58FJvV9gS8NYqMh5leFkDM3OwLxhWdcE8hDDQ= - NODE_JS_VERSION=7.10.0 gemfile: - gemfiles/4.2.gemfile - gemfiles/5.0.gemfile - gemfiles/5.1.gemfile - gemfiles/master.gemfile matrix: allow_failures: - gemfile: gemfiles/master.gemfile
5504e8b04dcf7bed4863027ca8811ac7078a54ed
dub.selections.json
dub.selections.json
{ "fileVersion": 1, "versions": { "antispam": "0.1.2", "botan": "1.12.9", "botan-math": "1.0.3", "ddox": "0.16.3", "diet-ng": "1.4.0", "diskuto": "1.5.1", "dyaml-dlang-tour": "0.5.5", "eventcore": "0.8.13", "fuzzydate": "1.0.0", "hyphenate": "1.1.1", "libasync": "0.8.3", "libdparse": "0.7.1-beta.9", "libevent": "2.0.2+2.0.16", "memutils": "0.4.9", "openssl": "1.1.5+1.0.1g", "rs-bootstrap": "1.0.4", "stringex": "0.0.3", "taggedalgebraic": "0.10.7", "tinyendian": "0.1.2", "vibe-core": "1.1.1+commit.6.g24f4e5f", "vibe-d": "0.8.1-rc.2", "vibelog": "0.6.0" } }
{ "fileVersion": 1, "versions": { "antispam": "0.1.3", "botan": "1.12.9", "botan-math": "1.0.3", "ddox": "0.16.4", "diet-ng": "1.4.0", "diskuto": "1.5.1", "eventcore": "0.8.13", "fuzzydate": "1.0.0", "hyphenate": "1.1.1", "libasync": "0.8.3", "libdparse": "0.7.1-beta.9", "libevent": "2.0.2+2.0.16", "memutils": "0.4.9", "openssl": "1.1.5+1.0.1g", "rs-bootstrap": "1.0.4", "stringex": "0.1.0", "taggedalgebraic": "0.10.7", "vibe-core": "1.1.1+commit.7.g5e97936", "vibe-d": "0.8.1-rc.2", "vibelog": "0.6.1" } }
Upgrade dependencies to fix build errors.
Upgrade dependencies to fix build errors.
JSON
agpl-3.0
rejectedsoftware/vibed.org
json
## Code Before: { "fileVersion": 1, "versions": { "antispam": "0.1.2", "botan": "1.12.9", "botan-math": "1.0.3", "ddox": "0.16.3", "diet-ng": "1.4.0", "diskuto": "1.5.1", "dyaml-dlang-tour": "0.5.5", "eventcore": "0.8.13", "fuzzydate": "1.0.0", "hyphenate": "1.1.1", "libasync": "0.8.3", "libdparse": "0.7.1-beta.9", "libevent": "2.0.2+2.0.16", "memutils": "0.4.9", "openssl": "1.1.5+1.0.1g", "rs-bootstrap": "1.0.4", "stringex": "0.0.3", "taggedalgebraic": "0.10.7", "tinyendian": "0.1.2", "vibe-core": "1.1.1+commit.6.g24f4e5f", "vibe-d": "0.8.1-rc.2", "vibelog": "0.6.0" } } ## Instruction: Upgrade dependencies to fix build errors. ## Code After: { "fileVersion": 1, "versions": { "antispam": "0.1.3", "botan": "1.12.9", "botan-math": "1.0.3", "ddox": "0.16.4", "diet-ng": "1.4.0", "diskuto": "1.5.1", "eventcore": "0.8.13", "fuzzydate": "1.0.0", "hyphenate": "1.1.1", "libasync": "0.8.3", "libdparse": "0.7.1-beta.9", "libevent": "2.0.2+2.0.16", "memutils": "0.4.9", "openssl": "1.1.5+1.0.1g", "rs-bootstrap": "1.0.4", "stringex": "0.1.0", "taggedalgebraic": "0.10.7", "vibe-core": "1.1.1+commit.7.g5e97936", "vibe-d": "0.8.1-rc.2", "vibelog": "0.6.1" } }
3513f49df275866ecf71be8defd581707cf67dc0
src/test/java/org/utplsql/cli/DataSourceProviderIT.java
src/test/java/org/utplsql/cli/DataSourceProviderIT.java
package org.utplsql.cli; import org.junit.jupiter.api.Test; import org.utplsql.cli.datasource.TestedDataSourceProvider; import javax.sql.DataSource; import java.io.IOException; import java.sql.SQLException; import static org.junit.jupiter.api.Assertions.assertNotNull; public class DataSourceProviderIT { @Test public void connectToDatabase() throws IOException, SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); } }
package org.utplsql.cli; import org.junit.jupiter.api.Test; import org.utplsql.cli.datasource.TestedDataSourceProvider; import javax.sql.DataSource; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; public class DataSourceProviderIT { @Test public void connectToDatabase() throws IOException, SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); } @Test public void initNlsLang() throws SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); System.setProperty("NLS_LANG", "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1"); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); try ( Connection con = dataSource.getConnection() ) { try (PreparedStatement stmt = con.prepareStatement("select value from nls_session_parameters where parameter = 'NLS_LANGUAGE'")) { ResultSet rs = stmt.executeQuery(); if ( rs.next() ) { assertEquals("BRAZILIAN PORTUGUESE", rs.getString(1)); } } } } @Test public void initPartialNlsLang() throws SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); System.setProperty("NLS_LANG", "_SOMALIA"); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); try ( Connection con = dataSource.getConnection() ) { try (PreparedStatement stmt = con.prepareStatement("select value from nls_session_parameters where parameter = 'NLS_TERRITORY'")) { ResultSet rs = stmt.executeQuery(); if ( rs.next() ) { assertEquals("SOMALIA", rs.getString(1)); } } } } }
Test to parse/set NLS_LANG correctly
Test to parse/set NLS_LANG correctly
Java
apache-2.0
utPLSQL/utPLSQL-cli,utPLSQL/utPLSQL-cli
java
## Code Before: package org.utplsql.cli; import org.junit.jupiter.api.Test; import org.utplsql.cli.datasource.TestedDataSourceProvider; import javax.sql.DataSource; import java.io.IOException; import java.sql.SQLException; import static org.junit.jupiter.api.Assertions.assertNotNull; public class DataSourceProviderIT { @Test public void connectToDatabase() throws IOException, SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); } } ## Instruction: Test to parse/set NLS_LANG correctly ## Code After: package org.utplsql.cli; import org.junit.jupiter.api.Test; import org.utplsql.cli.datasource.TestedDataSourceProvider; import javax.sql.DataSource; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; public class DataSourceProviderIT { @Test public void connectToDatabase() throws IOException, SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); } @Test public void initNlsLang() throws SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); System.setProperty("NLS_LANG", "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1"); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); try ( Connection con = dataSource.getConnection() ) { try (PreparedStatement stmt = con.prepareStatement("select value from nls_session_parameters where parameter = 'NLS_LANGUAGE'")) { ResultSet rs = stmt.executeQuery(); if ( rs.next() ) { assertEquals("BRAZILIAN PORTUGUESE", rs.getString(1)); } } } } @Test public void initPartialNlsLang() throws SQLException { ConnectionConfig config = new ConnectionConfig(TestHelper.getConnectionString()); System.setProperty("NLS_LANG", "_SOMALIA"); DataSource dataSource = new TestedDataSourceProvider(config).getDataSource(); assertNotNull(dataSource); try ( Connection con = dataSource.getConnection() ) { try (PreparedStatement stmt = con.prepareStatement("select value from nls_session_parameters where parameter = 'NLS_TERRITORY'")) { ResultSet rs = stmt.executeQuery(); if ( rs.next() ) { assertEquals("SOMALIA", rs.getString(1)); } } } } }
0509bf878c9b9a76153cb6503608f5778f02601b
.travis.yml
.travis.yml
language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake-local && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake-local export PATH=${TRAVIS_BUILD_DIR}/cmake-local/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
Update path where the local version of cmake lives.
Update path where the local version of cmake lives. This should fix the Travis CI build in PR #118.
YAML
bsd-2-clause
mmp/pbrt-v3,nyue/pbrt-v3,nispaur/pbrt-v3,nyue/pbrt-v3,shihchinw/pbrt-v3,mmp/pbrt-v3,mmp/pbrt-v3,shihchinw/pbrt-v3,mmp/pbrt-v3,nyue/pbrt-v3,nispaur/pbrt-v3,nispaur/pbrt-v3,nyue/pbrt-v3,shihchinw/pbrt-v3,shihchinw/pbrt-v3,nispaur/pbrt-v3
yaml
## Code Before: language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake export PATH=${TRAVIS_BUILD_DIR}/cmake/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test ## Instruction: Update path where the local version of cmake lives. This should fix the Travis CI build in PR #118. ## Code After: language: cpp compiler: gcc sudo: required install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -yq build-essential gcc-4.8 g++-4.8 make bison flex libpthread-stubs0-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - echo 2 | sudo update-alternatives --config gcc - | CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz" mkdir ${TRAVIS_BUILD_DIR}/cmake-local && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/cmake-local export PATH=${TRAVIS_BUILD_DIR}/cmake-local/bin:${PATH} after_install: - g++ --version script: - cmake -G 'Unix Makefiles' - make -j2 - ./pbrt_test
26765cb2bea7eb4fe1f2ce4497b489031dbd6790
.github/workflows/pythonpackage.yml
.github/workflows/pythonpackage.yml
name: Python package on: [push, pull_request] jobs: test: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [3.6, 3.9] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Test run: | python setup.py build_ext -b . python -m unittest release: needs: [test] runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags') steps: - name: Checkout uses: actions/checkout@v1 - name: Set up Python 3.9 uses: actions/setup-python@v1 with: python-version: 3.9 - name: Install pypa/build run: | python -m pip install build --user - name: Build a binary wheel and a source tarball run: | git clean -dfx python -m build --sdist --outdir dist/ . - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@master with: skip_existing: true password: ${{ secrets.pypi_password }}
name: Python package on: [push, pull_request] jobs: test: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: ['3.6', '3.9', '3.10'] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Test run: | python setup.py build_ext -b . python -m unittest release: needs: [test] runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags') steps: - name: Checkout uses: actions/checkout@v1 - name: Set up Python 3.9 uses: actions/setup-python@v1 with: python-version: 3.9 - name: Install pypa/build run: | python -m pip install build --user - name: Build a binary wheel and a source tarball run: | git clean -dfx python -m build --sdist --outdir dist/ . - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@master with: skip_existing: true password: ${{ secrets.pypi_password }}
Test on more Python versions.
Test on more Python versions.
YAML
mit
eerimoq/bitstruct,eerimoq/bitstruct
yaml
## Code Before: name: Python package on: [push, pull_request] jobs: test: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: [3.6, 3.9] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Test run: | python setup.py build_ext -b . python -m unittest release: needs: [test] runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags') steps: - name: Checkout uses: actions/checkout@v1 - name: Set up Python 3.9 uses: actions/setup-python@v1 with: python-version: 3.9 - name: Install pypa/build run: | python -m pip install build --user - name: Build a binary wheel and a source tarball run: | git clean -dfx python -m build --sdist --outdir dist/ . - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@master with: skip_existing: true password: ${{ secrets.pypi_password }} ## Instruction: Test on more Python versions. ## Code After: name: Python package on: [push, pull_request] jobs: test: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: python-version: ['3.6', '3.9', '3.10'] steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Test run: | python setup.py build_ext -b . python -m unittest release: needs: [test] runs-on: ubuntu-20.04 if: startsWith(github.ref, 'refs/tags') steps: - name: Checkout uses: actions/checkout@v1 - name: Set up Python 3.9 uses: actions/setup-python@v1 with: python-version: 3.9 - name: Install pypa/build run: | python -m pip install build --user - name: Build a binary wheel and a source tarball run: | git clean -dfx python -m build --sdist --outdir dist/ . - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@master with: skip_existing: true password: ${{ secrets.pypi_password }}
1c7a4a59c382a766f398a3a61193b16bb1af0361
app_server/test/util/Utility.js
app_server/test/util/Utility.js
var rfr = require('rfr'); var Lab = require('lab'); var lab = exports.lab = Lab.script(); var Code = require('code'); var Utility = rfr('app/util/Utility'); lab.experiment('Utility#getModuleName Tests', function () { lab.test('Empty path', function (done) { Code.expect(Utility.getModuleName('')).to.equal(''); done(); }); lab.test('Null path', function (done) { Code.expect(Utility.getModuleName()).to.equal('undefined'); done(); }); lab.test('Valid path 1', function (done) { Code.expect(Utility.getModuleName('path/to/module.js')) .to.equal('module.js'); done(); }); });
var rfr = require('rfr'); var Lab = require('lab'); var lab = exports.lab = Lab.script(); var Code = require('code'); var Utility = rfr('app/util/Utility'); lab.experiment('Utility#getModuleName Tests', function () { lab.test('Empty path', function (done) { Code.expect(Utility.getModuleName('')).to.equal(''); done(); }); lab.test('Null path', function (done) { Code.expect(Utility.getModuleName()).to.equal('undefined'); done(); }); lab.test('Valid path 1', function (done) { Code.expect(Utility.getModuleName('path/to/module.js')) .to.equal('module.js'); done(); }); }); lab.experiment('Utility#randomValueBase64 tests', function () { lab.test('Should return some strings', function (done) { Code.expect(Utility.randomValueBase64(20).length).to.equal(20); done(); }); });
Add random string generator tests
Add random string generator tests
JavaScript
mit
nus-mtp/worldscope,nus-mtp/worldscope,nus-mtp/worldscope,nus-mtp/worldscope
javascript
## Code Before: var rfr = require('rfr'); var Lab = require('lab'); var lab = exports.lab = Lab.script(); var Code = require('code'); var Utility = rfr('app/util/Utility'); lab.experiment('Utility#getModuleName Tests', function () { lab.test('Empty path', function (done) { Code.expect(Utility.getModuleName('')).to.equal(''); done(); }); lab.test('Null path', function (done) { Code.expect(Utility.getModuleName()).to.equal('undefined'); done(); }); lab.test('Valid path 1', function (done) { Code.expect(Utility.getModuleName('path/to/module.js')) .to.equal('module.js'); done(); }); }); ## Instruction: Add random string generator tests ## Code After: var rfr = require('rfr'); var Lab = require('lab'); var lab = exports.lab = Lab.script(); var Code = require('code'); var Utility = rfr('app/util/Utility'); lab.experiment('Utility#getModuleName Tests', function () { lab.test('Empty path', function (done) { Code.expect(Utility.getModuleName('')).to.equal(''); done(); }); lab.test('Null path', function (done) { Code.expect(Utility.getModuleName()).to.equal('undefined'); done(); }); lab.test('Valid path 1', function (done) { Code.expect(Utility.getModuleName('path/to/module.js')) .to.equal('module.js'); done(); }); }); lab.experiment('Utility#randomValueBase64 tests', function () { lab.test('Should return some strings', function (done) { Code.expect(Utility.randomValueBase64(20).length).to.equal(20); done(); }); });
5cba9b306b6244179230aadf7b70072ed9586919
README.md
README.md
A web app that connects those with things they no longer need with needy people who want them. Final project for COMPSCI 125/225: Next Generation Search Systems, taught by Ramesh Chandra Jain at the University of California Irvine. *** ### Created By Nathaniel Baer <<[email protected]>> Yang Jiao <<[email protected]>> Shruti Khurana <<[email protected]>>
A web app that connects those with things they no longer need with needy people who want them. Final project for COMPSCI 125/225: Next Generation Search Systems, taught by Ramesh Chandra Jain at the University of California Irvine. ## Production https://give-get-green.herokuapp.com/ Note: `master` branch automatically deploys to Heroku ## Authors Nathaniel Baer <<[email protected]>> Yang Jiao <<[email protected]>> Shruti Khurana <<[email protected]>>
Update readme with production url
Update readme with production url
Markdown
mit
njbbaer/give-get-green,njbbaer/give-get-green,njbbaer/give-get-green
markdown
## Code Before: A web app that connects those with things they no longer need with needy people who want them. Final project for COMPSCI 125/225: Next Generation Search Systems, taught by Ramesh Chandra Jain at the University of California Irvine. *** ### Created By Nathaniel Baer <<[email protected]>> Yang Jiao <<[email protected]>> Shruti Khurana <<[email protected]>> ## Instruction: Update readme with production url ## Code After: A web app that connects those with things they no longer need with needy people who want them. Final project for COMPSCI 125/225: Next Generation Search Systems, taught by Ramesh Chandra Jain at the University of California Irvine. ## Production https://give-get-green.herokuapp.com/ Note: `master` branch automatically deploys to Heroku ## Authors Nathaniel Baer <<[email protected]>> Yang Jiao <<[email protected]>> Shruti Khurana <<[email protected]>>
eedad82535112f9012b34a9cb9abb42f1f3b6e6f
app/views/layouts/bobcat.rb
app/views/layouts/bobcat.rb
module Views module Layouts class Bobcat < ActionView::Mustache def application_javascript javascript_include_tag "search" end def gauges_tracking_code views["gauges_tracking_code"] end def breadcrumbs breadcrumbs = super unless params["controller"] == "export_email" if params["action"].eql?("journal_list") or params["action"].eql?("journal_search") breadcrumbs << link_to('E-Journals', :controller=>'search') breadcrumbs << "Results" else breadcrumbs << "Journals" end end end # Login link and icon def login(params={}) (current_user) ? link_to_logout(params) : link_to_login(params) end # Link to logout def link_to_logout(params={}) icon_tag(:logout) + link_to("Log-out #{current_user.firstname}", logout_url(params), class: "logout") end end end end
module Views module Layouts class Bobcat < ActionView::Mustache def application_javascript javascript_include_tag "search" end def gauges_tracking_code views["gauges_tracking_code"] end def breadcrumbs breadcrumbs = super unless params["controller"] == "export_email" if params["action"].eql?("journal_list") or params["action"].eql?("journal_search") breadcrumbs << link_to('E-Journals', :controller=>'search') breadcrumbs << "Results" else breadcrumbs << "Journals" end end end end end end
Remove firstname login code for the BobCat layout since it's now bundled in with nyulibraries-assets
Remove firstname login code for the BobCat layout since it's now bundled in with nyulibraries-assets
Ruby
mit
NYULibraries/getit,NYULibraries/getit,NYULibraries/getit,NYULibraries/getit
ruby
## Code Before: module Views module Layouts class Bobcat < ActionView::Mustache def application_javascript javascript_include_tag "search" end def gauges_tracking_code views["gauges_tracking_code"] end def breadcrumbs breadcrumbs = super unless params["controller"] == "export_email" if params["action"].eql?("journal_list") or params["action"].eql?("journal_search") breadcrumbs << link_to('E-Journals', :controller=>'search') breadcrumbs << "Results" else breadcrumbs << "Journals" end end end # Login link and icon def login(params={}) (current_user) ? link_to_logout(params) : link_to_login(params) end # Link to logout def link_to_logout(params={}) icon_tag(:logout) + link_to("Log-out #{current_user.firstname}", logout_url(params), class: "logout") end end end end ## Instruction: Remove firstname login code for the BobCat layout since it's now bundled in with nyulibraries-assets ## Code After: module Views module Layouts class Bobcat < ActionView::Mustache def application_javascript javascript_include_tag "search" end def gauges_tracking_code views["gauges_tracking_code"] end def breadcrumbs breadcrumbs = super unless params["controller"] == "export_email" if params["action"].eql?("journal_list") or params["action"].eql?("journal_search") breadcrumbs << link_to('E-Journals', :controller=>'search') breadcrumbs << "Results" else breadcrumbs << "Journals" end end end end end end
6e108d664079cad989638f2e046db4551becf7a0
UPGRADE-1.5.md
UPGRADE-1.5.md
Require upgraded Sylius version using Composer: ```bash composer require sylius/sylius:~1.5.0 ``` Copy [a new migration file](https://raw.githubusercontent.com/Sylius/Sylius-Standard/94888ff604f7dfdcdc7165e82ce0119ce892c17e/src/Migrations/Version20190508083953.php) and run new migrations: ```bash bin/console doctrine:migrations:migrate ```
* `Property "code" does not exist in class "Sylius\Component\Currency\Model\CurrencyInterface"` while clearing the cache: * Introduced by `symfony/doctrine-bridge v4.3.0` * Will be fixed in `symfony/doctrine-bridge v4.3.1` ([see the pull request with fix](https://github.com/symfony/symfony/pull/31749)) * Could be avoided by adding a conflict with `symfony/doctrine-bridge v4.3.0` to your `composer.json`: ```json { "conflict": { "symfony/doctrine-bridge": "4.3.0" } } ``` * `Argument 1 passed to Sylius\Behat\Context\Api\Admin\ManagingTaxonsContext::__construct() must be an instance of Symfony\Component\HttpKernel\Client, instance of Symfony\Bundle\FrameworkBundle\KernelBrowser given` while running Behat scenarios: * Introduced by `symfony/framework-bundle v4.3.0` * Will be fixed in `symfony/framework-bundle v4.3.1` ([see the pull request with fix](https://github.com/symfony/symfony/pull/31881)) * Could be avoided by adding a conflict with `symfony/framework-bundle v4.3.0` to your `composer.json`: ```json { "conflict": { "symfony/framework-bundle": "4.3.0" } } ``` # UPGRADE FROM `v1.4.X` TO `v1.5.0` Require upgraded Sylius version using Composer: ```bash composer require sylius/sylius:~1.5.0 ``` Copy [a new migration file](https://raw.githubusercontent.com/Sylius/Sylius-Standard/94888ff604f7dfdcdc7165e82ce0119ce892c17e/src/Migrations/Version20190508083953.php) and run new migrations: ```bash bin/console doctrine:migrations:migrate ```
Add known errors section to UPGRADE file
Add known errors section to UPGRADE file
Markdown
mit
foobarflies/Sylius,mbabker/Sylius,SyliusBot/Sylius,loic425/Sylius,Sylius/Sylius,mbabker/Sylius,foobarflies/Sylius,Arminek/Sylius,pjedrzejewski/Sylius,lchrusciel/Sylius,antonioperic/Sylius,itinance/Sylius,kayue/Sylius,kayue/Sylius,mbabker/Sylius,Zales0123/Sylius,kayue/Sylius,SyliusBot/Sylius,GSadee/Sylius,foobarflies/Sylius,GSadee/Sylius,antonioperic/Sylius,Arminek/Sylius,pamil/Sylius,mbabker/Sylius,itinance/Sylius,Sylius/Sylius,loic425/Sylius,diimpp/Sylius,itinance/Sylius,101medialab/Sylius,101medialab/Sylius,diimpp/Sylius,Zales0123/Sylius,pjedrzejewski/Sylius,antonioperic/Sylius,itinance/Sylius,Brille24/Sylius,loic425/Sylius,Sylius/Sylius,lchrusciel/Sylius,Brille24/Sylius,pjedrzejewski/Sylius,diimpp/Sylius,SyliusBot/Sylius,Brille24/Sylius,foobarflies/Sylius,pamil/Sylius,GSadee/Sylius,lchrusciel/Sylius,pamil/Sylius,pjedrzejewski/Sylius,Arminek/Sylius,101medialab/Sylius,Brille24/Sylius,Zales0123/Sylius
markdown
## Code Before: Require upgraded Sylius version using Composer: ```bash composer require sylius/sylius:~1.5.0 ``` Copy [a new migration file](https://raw.githubusercontent.com/Sylius/Sylius-Standard/94888ff604f7dfdcdc7165e82ce0119ce892c17e/src/Migrations/Version20190508083953.php) and run new migrations: ```bash bin/console doctrine:migrations:migrate ``` ## Instruction: Add known errors section to UPGRADE file ## Code After: * `Property "code" does not exist in class "Sylius\Component\Currency\Model\CurrencyInterface"` while clearing the cache: * Introduced by `symfony/doctrine-bridge v4.3.0` * Will be fixed in `symfony/doctrine-bridge v4.3.1` ([see the pull request with fix](https://github.com/symfony/symfony/pull/31749)) * Could be avoided by adding a conflict with `symfony/doctrine-bridge v4.3.0` to your `composer.json`: ```json { "conflict": { "symfony/doctrine-bridge": "4.3.0" } } ``` * `Argument 1 passed to Sylius\Behat\Context\Api\Admin\ManagingTaxonsContext::__construct() must be an instance of Symfony\Component\HttpKernel\Client, instance of Symfony\Bundle\FrameworkBundle\KernelBrowser given` while running Behat scenarios: * Introduced by `symfony/framework-bundle v4.3.0` * Will be fixed in `symfony/framework-bundle v4.3.1` ([see the pull request with fix](https://github.com/symfony/symfony/pull/31881)) * Could be avoided by adding a conflict with `symfony/framework-bundle v4.3.0` to your `composer.json`: ```json { "conflict": { "symfony/framework-bundle": "4.3.0" } } ``` # UPGRADE FROM `v1.4.X` TO `v1.5.0` Require upgraded Sylius version using Composer: ```bash composer require sylius/sylius:~1.5.0 ``` Copy [a new migration file](https://raw.githubusercontent.com/Sylius/Sylius-Standard/94888ff604f7dfdcdc7165e82ce0119ce892c17e/src/Migrations/Version20190508083953.php) and run new migrations: ```bash bin/console doctrine:migrations:migrate ```
1b6895c6948c90ab230dfedbb942c5ab63f159da
README.md
README.md
This is a project designed to allow for the running of a website which will deliver information about account changes while livestreaming; it combines tools like: - http://chrisplaysgames.com/sub/ - http://www.iopred.com/fanfundingalerts/ - http://chrisplaysgames.com/sponsor/ into a single UI. The intent is to allow an extensible way to add additional alerting into this application for additional features, e.g. highlighting on hotwords in livestream chat, connecting to twitter, connecting to other features of videos, etc. This tool is designed to replace StreamWarrior for some of its uses, but may still be useful with a combination of other tools. ## Disclaimer This is not an official Google product.
This is a project designed to allow for the running of a website which will deliver information about account changes while livestreaming; it uses Google's YouTube, Gmail, and Live Streaming APIs (and eventually others) to access information about your account, and provide a web UI for presenting this information. This is an alternative to software like Stream Warrior/tnotify. The intent is to allow an extensible way to add additional alerting into this application for additional features, e.g. highlighting on hotwords in livestream chat, connecting to twitter, connecting to other features of videos, etc. This tool is designed to replace StreamWarrior for some of its uses, but may still be useful with a combination of other tools. ## Disclaimer This is not an official Google product.
Update readme to refer to other similar projects.
Update readme to refer to other similar projects.
Markdown
apache-2.0
google/mirandum,google/mirandum,google/mirandum,google/mirandum
markdown
## Code Before: This is a project designed to allow for the running of a website which will deliver information about account changes while livestreaming; it combines tools like: - http://chrisplaysgames.com/sub/ - http://www.iopred.com/fanfundingalerts/ - http://chrisplaysgames.com/sponsor/ into a single UI. The intent is to allow an extensible way to add additional alerting into this application for additional features, e.g. highlighting on hotwords in livestream chat, connecting to twitter, connecting to other features of videos, etc. This tool is designed to replace StreamWarrior for some of its uses, but may still be useful with a combination of other tools. ## Disclaimer This is not an official Google product. ## Instruction: Update readme to refer to other similar projects. ## Code After: This is a project designed to allow for the running of a website which will deliver information about account changes while livestreaming; it uses Google's YouTube, Gmail, and Live Streaming APIs (and eventually others) to access information about your account, and provide a web UI for presenting this information. This is an alternative to software like Stream Warrior/tnotify. The intent is to allow an extensible way to add additional alerting into this application for additional features, e.g. highlighting on hotwords in livestream chat, connecting to twitter, connecting to other features of videos, etc. This tool is designed to replace StreamWarrior for some of its uses, but may still be useful with a combination of other tools. ## Disclaimer This is not an official Google product.
e6392450bce9df2578652204daf896cd6a96f78f
README.md
README.md
Wye: Platform connects trainers to educational institutes and open source organisation who has interested in conducting trainings # License This software is licensed under The MIT License(MIT). See the LICENSE file in the top distribution directory for the full license text.
Wye: Platform connects trainers to educational institutes and open source organisation who has interested in conducting trainings How to setup === - Create a PostgreSQL 9.3 database - It is advised to install all the requirements inside virtualenv, use virtualenvwrapper to manage virtualenvs. pip install -r requirements/dev.txt python manage.py migrate --noinput # License This software is licensed under The MIT License(MIT). See the LICENSE file in the top distribution directory for the full license text.
Add How to Setup steps
Add How to Setup steps Add How to Setup steps
Markdown
mit
pythonindia/wye,shankig/wye,shankisg/wye,DESHRAJ/wye,shankig/wye,shankig/wye,pythonindia/wye,DESHRAJ/wye,harisibrahimkv/wye,harisibrahimkv/wye,shankig/wye,pythonindia/wye,shankisg/wye,harisibrahimkv/wye,harisibrahimkv/wye,shankisg/wye,pythonindia/wye,DESHRAJ/wye,DESHRAJ/wye,shankisg/wye
markdown
## Code Before: Wye: Platform connects trainers to educational institutes and open source organisation who has interested in conducting trainings # License This software is licensed under The MIT License(MIT). See the LICENSE file in the top distribution directory for the full license text. ## Instruction: Add How to Setup steps Add How to Setup steps ## Code After: Wye: Platform connects trainers to educational institutes and open source organisation who has interested in conducting trainings How to setup === - Create a PostgreSQL 9.3 database - It is advised to install all the requirements inside virtualenv, use virtualenvwrapper to manage virtualenvs. pip install -r requirements/dev.txt python manage.py migrate --noinput # License This software is licensed under The MIT License(MIT). See the LICENSE file in the top distribution directory for the full license text.
6e361e6eca051bc3f0e50d7439e41e59be29bad8
src/test_helper.rs
src/test_helper.rs
use std::rand::random; /// Test helper to standardize how random files and directories are generated. pub fn random_name() -> String { format!("test_{}", random::<f64>()) }
use std::rand::random; use std::io::fs; /// Test helper to standardize how random files and directories are generated. pub fn random_name() -> String { format!("test_{}", random::<f64>()) } pub fn cleanup_file(path: &Path) { match fs::unlink(path) { Ok(()) => (), // succeeded Err(e) => println!("Failed to unlink the path {} with error {}", path.display(), e), } }
Add a method to quickly clean up the files created during testing.
Add a method to quickly clean up the files created during testing.
Rust
mit
brianp/muxed,brianp/muxed
rust
## Code Before: use std::rand::random; /// Test helper to standardize how random files and directories are generated. pub fn random_name() -> String { format!("test_{}", random::<f64>()) } ## Instruction: Add a method to quickly clean up the files created during testing. ## Code After: use std::rand::random; use std::io::fs; /// Test helper to standardize how random files and directories are generated. pub fn random_name() -> String { format!("test_{}", random::<f64>()) } pub fn cleanup_file(path: &Path) { match fs::unlink(path) { Ok(()) => (), // succeeded Err(e) => println!("Failed to unlink the path {} with error {}", path.display(), e), } }
b0efb8b93261a7909b209dbd9ff9a701e1832013
ansible/playbook.yml
ansible/playbook.yml
--- - hosts: typer become: true vars: ansible_python_interpreter: "/usr/bin/python3" roles: - role: letsencrypt extra_location_blocks: "location /api { rewrite /api(.*) $1 break; include uwsgi_params; uwsgi_pass unix:/tmp/uwsgieved.sock; }" - eve - mongo - deploy - upgraded
--- - hosts: typer become: true vars: ansible_python_interpreter: "/usr/bin/python3" extra_location_blocks: "location /api { rewrite /api(.*) $1 break; include uwsgi_params; uwsgi_pass unix:/tmp/uwsgieved.sock; }" roles: - letsencrypt - eve - mongo - deploy - upgraded
Fix extra location blocks override
Fix extra location blocks override
YAML
mit
mattiaslundberg/typer,mattiaslundberg/typer,mattiaslundberg/typer,mattiaslundberg/typer
yaml
## Code Before: --- - hosts: typer become: true vars: ansible_python_interpreter: "/usr/bin/python3" roles: - role: letsencrypt extra_location_blocks: "location /api { rewrite /api(.*) $1 break; include uwsgi_params; uwsgi_pass unix:/tmp/uwsgieved.sock; }" - eve - mongo - deploy - upgraded ## Instruction: Fix extra location blocks override ## Code After: --- - hosts: typer become: true vars: ansible_python_interpreter: "/usr/bin/python3" extra_location_blocks: "location /api { rewrite /api(.*) $1 break; include uwsgi_params; uwsgi_pass unix:/tmp/uwsgieved.sock; }" roles: - letsencrypt - eve - mongo - deploy - upgraded
15da0fa8044c564873be4972759814404947aa44
packages/mongoose/src/decorators/schemaIgnore.ts
packages/mongoose/src/decorators/schemaIgnore.ts
import {Schema} from "@tsed/mongoose"; /** * Do not apply this property to schema (create virtual property) * * ### Example * * ```typescript * @Model() * @SchemaIgnore() * @Property() * kind: string; * * ``` * * @returns {Function} * @decorator * @mongoose * @class */ export function SchemaIgnore(): Function { return Schema({schemaIgnore: true}); }
import {Schema} from "./schema"; /** * Do not apply this property to schema (create virtual property) * * ### Example * * ```typescript * @Model() * @SchemaIgnore() * @Property() * kind: string; * * ``` * * @returns {Function} * @decorator * @mongoose * @class */ export function SchemaIgnore(): Function { return Schema({schemaIgnore: true}); }
Fix automatic import to lib style
Fix automatic import to lib style
TypeScript
mit
Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators
typescript
## Code Before: import {Schema} from "@tsed/mongoose"; /** * Do not apply this property to schema (create virtual property) * * ### Example * * ```typescript * @Model() * @SchemaIgnore() * @Property() * kind: string; * * ``` * * @returns {Function} * @decorator * @mongoose * @class */ export function SchemaIgnore(): Function { return Schema({schemaIgnore: true}); } ## Instruction: Fix automatic import to lib style ## Code After: import {Schema} from "./schema"; /** * Do not apply this property to schema (create virtual property) * * ### Example * * ```typescript * @Model() * @SchemaIgnore() * @Property() * kind: string; * * ``` * * @returns {Function} * @decorator * @mongoose * @class */ export function SchemaIgnore(): Function { return Schema({schemaIgnore: true}); }
666d29e510473dabcb6c854e6e337c0c69dc78de
.travis.yml
.travis.yml
language: java addons: sonarcloud: organization: steinarb-github token: $SONAR_TOKEN script: - travis_wait mvn -q -B -Dorg.slf4j.simpleLogger.defaultLogLevel=warn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar coveralls:report >/dev/null deploy: provider: script script: bash scripts/deploy.sh skip_cleanup: true
language: java addons: sonarcloud: organization: steinarb-github token: $SONAR_TOKEN script: - mvn -B clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar coveralls:report deploy: provider: script script: bash scripts/deploy.sh skip_cleanup: true
Use the same maven command as authservice in an attempt at fixing the build
Use the same maven command as authservice in an attempt at fixing the build
YAML
apache-2.0
steinarb/ukelonn,steinarb/ukelonn,steinarb/ukelonn
yaml
## Code Before: language: java addons: sonarcloud: organization: steinarb-github token: $SONAR_TOKEN script: - travis_wait mvn -q -B -Dorg.slf4j.simpleLogger.defaultLogLevel=warn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar coveralls:report >/dev/null deploy: provider: script script: bash scripts/deploy.sh skip_cleanup: true ## Instruction: Use the same maven command as authservice in an attempt at fixing the build ## Code After: language: java addons: sonarcloud: organization: steinarb-github token: $SONAR_TOKEN script: - mvn -B clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar coveralls:report deploy: provider: script script: bash scripts/deploy.sh skip_cleanup: true
9489a26a0aaa6fcdc181432f8656a5e786101794
src/main/java/com/questionanswer/controller/UserController.java
src/main/java/com/questionanswer/controller/UserController.java
package com.questionanswer.controller; import com.questionanswer.config.Routes; import com.questionanswer.model.User; import com.questionanswer.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.security.Principal; @RestController @RequestMapping(value = Routes.API_BASE_ROUTE + "/authentication") public class UserController { @Autowired UserService userService; @RequestMapping(value = "/currentuser", method = { RequestMethod.GET }) public Principal currentUser(Principal user) { return user; } @RequestMapping(value = "/register", method = { RequestMethod.POST }) public HttpEntity<User> Register(@RequestBody User user) { User savedUser = this.userService.save(user); return new ResponseEntity<User>(savedUser, HttpStatus.CREATED); } }
package com.questionanswer.controller; import com.questionanswer.config.Routes; import com.questionanswer.model.User; import com.questionanswer.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.http.HttpEntity; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.security.Principal; @RestController @RequestMapping(value = Routes.API_BASE_ROUTE + "/authentication") public class UserController { @Autowired UserService userService; @RequestMapping(value = "/currentuser", method = { RequestMethod.GET }) public Principal currentUser(Principal user) { return user; } @RequestMapping(value = "/register", method = { RequestMethod.POST }) public HttpEntity<?> Register(@RequestBody User user) { if (this.userService.loadUserByUsername(user.getEmail()) != null) { return new ResponseEntity<>("User with the same email already exists!", HttpStatus.BAD_REQUEST); } try { User savedUser = this.userService.save(user); return new ResponseEntity<User>(savedUser, HttpStatus.CREATED); } catch (DataIntegrityViolationException ex) { return prepareExceptionResponce(ex); } } private HttpEntity<?> prepareExceptionResponce(Exception ex) { String errorMessage; errorMessage = ex + " <== error"; return new ResponseEntity<>(errorMessage, HttpStatus.BAD_REQUEST); } }
Add some error handling during the register user action
Add some error handling during the register user action
Java
mit
webdude21/QuestionAndAnswer,webdude21/QuestionAndAnswer,webdude21/QuestionAndAnswer,webdude21/QuestionAndAnswer,webdude21/QuestionAndAnswer
java
## Code Before: package com.questionanswer.controller; import com.questionanswer.config.Routes; import com.questionanswer.model.User; import com.questionanswer.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.security.Principal; @RestController @RequestMapping(value = Routes.API_BASE_ROUTE + "/authentication") public class UserController { @Autowired UserService userService; @RequestMapping(value = "/currentuser", method = { RequestMethod.GET }) public Principal currentUser(Principal user) { return user; } @RequestMapping(value = "/register", method = { RequestMethod.POST }) public HttpEntity<User> Register(@RequestBody User user) { User savedUser = this.userService.save(user); return new ResponseEntity<User>(savedUser, HttpStatus.CREATED); } } ## Instruction: Add some error handling during the register user action ## Code After: package com.questionanswer.controller; import com.questionanswer.config.Routes; import com.questionanswer.model.User; import com.questionanswer.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.http.HttpEntity; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.security.Principal; @RestController @RequestMapping(value = Routes.API_BASE_ROUTE + "/authentication") public class UserController { @Autowired UserService userService; @RequestMapping(value = "/currentuser", method = { RequestMethod.GET }) public Principal currentUser(Principal user) { return user; } @RequestMapping(value = "/register", method = { RequestMethod.POST }) public HttpEntity<?> Register(@RequestBody User user) { if (this.userService.loadUserByUsername(user.getEmail()) != null) { return new ResponseEntity<>("User with the same email already exists!", HttpStatus.BAD_REQUEST); } try { User savedUser = this.userService.save(user); return new ResponseEntity<User>(savedUser, HttpStatus.CREATED); } catch (DataIntegrityViolationException ex) { return prepareExceptionResponce(ex); } } private HttpEntity<?> prepareExceptionResponce(Exception ex) { String errorMessage; errorMessage = ex + " <== error"; return new ResponseEntity<>(errorMessage, HttpStatus.BAD_REQUEST); } }
930c7c8a5332fc8121f98dc419ac3717b3ff5706
recipes/jlime/jlime-extras_1.0.1.bb
recipes/jlime/jlime-extras_1.0.1.bb
DESCRIPTION = "Various extras for the Jlime userlands" PR = "r0" RRECOMMENDS = "jlime-extras-${MACHINE}" PACKAGE_ARCH = "all" SRC_URI = "http://jlime.com/downloads/development/software/${PN}-${PV}.tar.gz" FILES_${PN} = "/etc /usr" do_install() { install -d ${D} cp -R etc usr ${D} } SRC_URI[md5sum] = "ebad10a6e081273271393507f88cca39" SRC_URI[sha256sum] = "bb78cda43906deb5bbd73f0d9157108799ecc048521bf9654e7cfbba0885f2be"
DESCRIPTION = "Various extras for the Jlime userlands" PR = "r0" RRECOMMENDS = "jlime-extras-${MACHINE}" PACKAGE_ARCH = "all" SRC_URI = "http://jlime.com/downloads/development/software/${PN}-${PV}.tar.gz" FILES_${PN} = "/etc /usr" do_install() { install -d ${D} cp -R etc usr ${D} } SRC_URI[md5sum] = "920be63e2269289b5ffdf3c0199d71ef" SRC_URI[sha256sum] = "3fd6016ac8bafab8eaa8c1cc2975a8bbeca116dcdf807989154bc772fbf518d0"
Modify checksums for upstream source file change.
jlime-extras: Modify checksums for upstream source file change. This one is a quick modification of the checksums to mirror a small change in the upstream source file. Signed-off-by: Alex Ferguson <[email protected]> Signed-off-by: Kristoffer Ericson <[email protected]>
BitBake
mit
dellysunnymtech/sakoman-oe,Martix/Eonos,sledz/oe,thebohemian/openembedded,yyli/overo-oe,rascalmicro/openembedded-rascal,BlackPole/bp-openembedded,JamesAng/goe,nx111/openembeded_openpli2.1_nx111,JamesAng/oe,SIFTeam/openembedded,BlackPole/bp-openembedded,openembedded/openembedded,xifengchuo/openembedded,sutajiokousagi/openembedded,yyli/overo-oe,dave-billin/overo-ui-moos-auv,mrchapp/arago-oe-dev,xifengchuo/openembedded,buglabs/oe-buglabs,SIFTeam/openembedded,sentient-energy/emsw-oe-mirror,rascalmicro/openembedded-rascal,sentient-energy/emsw-oe-mirror,nx111/openembeded_openpli2.1_nx111,sutajiokousagi/openembedded,hulifox008/openembedded,sutajiokousagi/openembedded,mrchapp/arago-oe-dev,JamesAng/goe,sentient-energy/emsw-oe-mirror,sentient-energy/emsw-oe-mirror,trini/openembedded,John-NY/overo-oe,sutajiokousagi/openembedded,dellysunnymtech/sakoman-oe,sentient-energy/emsw-oe-mirror,xifengchuo/openembedded,dellysunnymtech/sakoman-oe,xifengchuo/openembedded,thebohemian/openembedded,buglabs/oe-buglabs,SIFTeam/openembedded,SIFTeam/openembedded,giobauermeister/openembedded,sutajiokousagi/openembedded,giobauermeister/openembedded,JamesAng/oe,mrchapp/arago-oe-dev,sampov2/audio-openembedded,dave-billin/overo-ui-moos-auv,John-NY/overo-oe,dave-billin/overo-ui-moos-auv,buglabs/oe-buglabs,yyli/overo-oe,JamesAng/oe,JamesAng/goe,Martix/Eonos,thebohemian/openembedded,JamesAng/goe,Martix/Eonos,giobauermeister/openembedded,rascalmicro/openembedded-rascal,openembedded/openembedded,thebohemian/openembedded,John-NY/overo-oe,dellysunnymtech/sakoman-oe,BlackPole/bp-openembedded,yyli/overo-oe,sledz/oe,sutajiokousagi/openembedded,openembedded/openembedded,dave-billin/overo-ui-moos-auv,dellysunnymtech/sakoman-oe,JamesAng/oe,dave-billin/overo-ui-moos-auv,giobauermeister/openembedded,sentient-energy/emsw-oe-mirror,openembedded/openembedded,yyli/overo-oe,thebohemian/openembedded,trini/openembedded,yyli/overo-oe,scottellis/overo-oe,dave-billin/overo-ui-moos-auv,openembedded/openembedded,John-NY/overo-oe,JamesAng/goe,scottellis/overo-oe,xifengchuo/openembedded,sampov2/audio-openembedded,trini/openembedded,rascalmicro/openembedded-rascal,xifengchuo/openembedded,BlackPole/bp-openembedded,sledz/oe,mrchapp/arago-oe-dev,sledz/oe,BlackPole/bp-openembedded,openembedded/openembedded,sampov2/audio-openembedded,sampov2/audio-openembedded,scottellis/overo-oe,JamesAng/goe,sledz/oe,JamesAng/oe,scottellis/overo-oe,nx111/openembeded_openpli2.1_nx111,sampov2/audio-openembedded,Martix/Eonos,openembedded/openembedded,giobauermeister/openembedded,sampov2/audio-openembedded,rascalmicro/openembedded-rascal,buglabs/oe-buglabs,JamesAng/oe,sledz/oe,trini/openembedded,thebohemian/openembedded,hulifox008/openembedded,xifengchuo/openembedded,nx111/openembeded_openpli2.1_nx111,JamesAng/oe,nx111/openembeded_openpli2.1_nx111,John-NY/overo-oe,giobauermeister/openembedded,rascalmicro/openembedded-rascal,dellysunnymtech/sakoman-oe,openembedded/openembedded,dellysunnymtech/sakoman-oe,scottellis/overo-oe,openembedded/openembedded,SIFTeam/openembedded,John-NY/overo-oe,hulifox008/openembedded,BlackPole/bp-openembedded,mrchapp/arago-oe-dev,xifengchuo/openembedded,nx111/openembeded_openpli2.1_nx111,yyli/overo-oe,sentient-energy/emsw-oe-mirror,hulifox008/openembedded,giobauermeister/openembedded,sledz/oe,giobauermeister/openembedded,xifengchuo/openembedded,mrchapp/arago-oe-dev,dave-billin/overo-ui-moos-auv,Martix/Eonos,hulifox008/openembedded,openembedded/openembedded,buglabs/oe-buglabs,sampov2/audio-openembedded,Martix/Eonos,buglabs/oe-buglabs,rascalmicro/openembedded-rascal,buglabs/oe-buglabs,rascalmicro/openembedded-rascal,SIFTeam/openembedded,nx111/openembeded_openpli2.1_nx111,scottellis/overo-oe,scottellis/overo-oe,trini/openembedded,trini/openembedded,nx111/openembeded_openpli2.1_nx111,SIFTeam/openembedded,trini/openembedded,dellysunnymtech/sakoman-oe,hulifox008/openembedded,giobauermeister/openembedded,BlackPole/bp-openembedded,sutajiokousagi/openembedded,openembedded/openembedded,thebohemian/openembedded,buglabs/oe-buglabs,hulifox008/openembedded,mrchapp/arago-oe-dev,Martix/Eonos,JamesAng/goe,dellysunnymtech/sakoman-oe,yyli/overo-oe,John-NY/overo-oe
bitbake
## Code Before: DESCRIPTION = "Various extras for the Jlime userlands" PR = "r0" RRECOMMENDS = "jlime-extras-${MACHINE}" PACKAGE_ARCH = "all" SRC_URI = "http://jlime.com/downloads/development/software/${PN}-${PV}.tar.gz" FILES_${PN} = "/etc /usr" do_install() { install -d ${D} cp -R etc usr ${D} } SRC_URI[md5sum] = "ebad10a6e081273271393507f88cca39" SRC_URI[sha256sum] = "bb78cda43906deb5bbd73f0d9157108799ecc048521bf9654e7cfbba0885f2be" ## Instruction: jlime-extras: Modify checksums for upstream source file change. This one is a quick modification of the checksums to mirror a small change in the upstream source file. Signed-off-by: Alex Ferguson <[email protected]> Signed-off-by: Kristoffer Ericson <[email protected]> ## Code After: DESCRIPTION = "Various extras for the Jlime userlands" PR = "r0" RRECOMMENDS = "jlime-extras-${MACHINE}" PACKAGE_ARCH = "all" SRC_URI = "http://jlime.com/downloads/development/software/${PN}-${PV}.tar.gz" FILES_${PN} = "/etc /usr" do_install() { install -d ${D} cp -R etc usr ${D} } SRC_URI[md5sum] = "920be63e2269289b5ffdf3c0199d71ef" SRC_URI[sha256sum] = "3fd6016ac8bafab8eaa8c1cc2975a8bbeca116dcdf807989154bc772fbf518d0"
6c89e9a2eb6c429f9faf8f8fdbb7360239b15a61
setup.py
setup.py
from setuptools import setup, find_packages import io # List all of your Python package dependencies in the # requirements.txt file def readfile(filename, split=False): with io.open(filename, encoding="utf-8") as stream: if split: return stream.read().split("\n") return stream.read() readme = readfile("README.rst", split=True)[3:] # skip title requires = readfile("requirements.txt", split=True) software_licence = readfile("LICENSE") setup( name='opencmiss.utils', version='0.1.1', description='OpenCMISS Utilities for Python.', long_description='\n'.join(readme) + software_licence, classifiers=[], author='Hugh Sorby', author_email='', url='', license='APACHE', packages=find_packages(exclude=['ez_setup',]), namespace_packages=['opencmiss'], include_package_data=True, zip_safe=False, install_requires=requires, )
from setuptools import setup, find_packages import io # List all of your Python package dependencies in the # requirements.txt file def readfile(filename, split=False): with io.open(filename, encoding="utf-8") as stream: if split: return stream.read().split("\n") return stream.read() readme = readfile("README.rst", split=True)[3:] # skip title requires = readfile("requirements.txt", split=True) software_licence = readfile("LICENSE") setup( name='opencmiss.utils', version='0.1.1', description='OpenCMISS Utilities for Python.', long_description='\n'.join(readme) + software_licence, classifiers=[], author='Hugh Sorby', author_email='', url='', license='APACHE', packages=find_packages(exclude=['ez_setup',]), include_package_data=True, zip_safe=False, install_requires=requires, )
Remove namespace_packages argument which works with declare_namespace.
Remove namespace_packages argument which works with declare_namespace.
Python
apache-2.0
OpenCMISS-Bindings/opencmiss.utils
python
## Code Before: from setuptools import setup, find_packages import io # List all of your Python package dependencies in the # requirements.txt file def readfile(filename, split=False): with io.open(filename, encoding="utf-8") as stream: if split: return stream.read().split("\n") return stream.read() readme = readfile("README.rst", split=True)[3:] # skip title requires = readfile("requirements.txt", split=True) software_licence = readfile("LICENSE") setup( name='opencmiss.utils', version='0.1.1', description='OpenCMISS Utilities for Python.', long_description='\n'.join(readme) + software_licence, classifiers=[], author='Hugh Sorby', author_email='', url='', license='APACHE', packages=find_packages(exclude=['ez_setup',]), namespace_packages=['opencmiss'], include_package_data=True, zip_safe=False, install_requires=requires, ) ## Instruction: Remove namespace_packages argument which works with declare_namespace. ## Code After: from setuptools import setup, find_packages import io # List all of your Python package dependencies in the # requirements.txt file def readfile(filename, split=False): with io.open(filename, encoding="utf-8") as stream: if split: return stream.read().split("\n") return stream.read() readme = readfile("README.rst", split=True)[3:] # skip title requires = readfile("requirements.txt", split=True) software_licence = readfile("LICENSE") setup( name='opencmiss.utils', version='0.1.1', description='OpenCMISS Utilities for Python.', long_description='\n'.join(readme) + software_licence, classifiers=[], author='Hugh Sorby', author_email='', url='', license='APACHE', packages=find_packages(exclude=['ez_setup',]), include_package_data=True, zip_safe=False, install_requires=requires, )
9334d14a724cdc50e187d719690ccaa49483be3f
app/Resources/views/default/homepage.html.twig
app/Resources/views/default/homepage.html.twig
{% extends 'base.html.twig' %} {% block body_id 'homepage' %} {# the homepage is a special page which displays neither a header nor a footer. this is done with the 'trick' of defining empty Twig blocks without any content #} {% block header %}{% endblock %} {% block footer %}{% endblock %} {% block body %} <div class="page-header"> <h1>Welcome to the <b>Symfony Demo On Roids</b> application</h1> </div> <div class="row"> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_app'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('blog_index') }}"> <i class="fa fa-users"></i> {{ 'action.browse_app'|trans }} </a> </p> </div> </div> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_admin'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('admin_index') }}"> <i class="fa fa-lock"></i> {{ 'action.browse_admin'|trans }} </a> </p> </div> </div> </div> {% endblock %}
{% extends 'base.html.twig' %} {% block body_id 'homepage' %} {# the homepage is a special page which displays neither a header nor a footer. this is done with the 'trick' of defining empty Twig blocks without any content #} {% block header %}{% endblock %} {% block footer %}{% endblock %} {% block body %} <div class="page-header"> <h1>Welcome to the <b>Symfony Demo On Roids</b> application</h1> </div> <div class="row"> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_app'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('blog_index') }}"> <i class="fa fa-users"></i> {{ 'action.browse_app'|trans }} </a> </p> </div> </div> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_admin'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('admin_index') }}"> <i class="fa fa-lock"></i> {{ 'action.browse_admin'|trans }} </a> </p> </div> </div> <h1> <a href="https://github.com/alfonsomga/symfony.demo.on.roids" target="_blank" style="color: #2c3e50"> <i class="fa fa-github-square fa-3x"></i> </a> </h1> </div> {% endblock %}
Add GitHub icon + <a> to this repository
Add GitHub icon + <a> to this repository
Twig
mit
alfonsomga/symfony.demo.on.roids,alfonsomga/symfony.demo.on.roids,alfonsomga/symfony-demo-on-roids,alfonsomga/symfony-demo-on-roids,alfonsomga/symfony.demo.on.roids,alfonsomga/symfony-demo-on-roids,alfonsomga/symfony.demo.on.roids,alfonsomga/symfony-demo-on-roids,alfonsomga/symfony.demo.on.roids,alfonsomga/symfony-demo-on-roids
twig
## Code Before: {% extends 'base.html.twig' %} {% block body_id 'homepage' %} {# the homepage is a special page which displays neither a header nor a footer. this is done with the 'trick' of defining empty Twig blocks without any content #} {% block header %}{% endblock %} {% block footer %}{% endblock %} {% block body %} <div class="page-header"> <h1>Welcome to the <b>Symfony Demo On Roids</b> application</h1> </div> <div class="row"> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_app'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('blog_index') }}"> <i class="fa fa-users"></i> {{ 'action.browse_app'|trans }} </a> </p> </div> </div> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_admin'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('admin_index') }}"> <i class="fa fa-lock"></i> {{ 'action.browse_admin'|trans }} </a> </p> </div> </div> </div> {% endblock %} ## Instruction: Add GitHub icon + <a> to this repository ## Code After: {% extends 'base.html.twig' %} {% block body_id 'homepage' %} {# the homepage is a special page which displays neither a header nor a footer. this is done with the 'trick' of defining empty Twig blocks without any content #} {% block header %}{% endblock %} {% block footer %}{% endblock %} {% block body %} <div class="page-header"> <h1>Welcome to the <b>Symfony Demo On Roids</b> application</h1> </div> <div class="row"> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_app'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('blog_index') }}"> <i class="fa fa-users"></i> {{ 'action.browse_app'|trans }} </a> </p> </div> </div> <div class="col-sm-6"> <div class="jumbotron"> <p> {{ 'help.browse_admin'|trans|raw }} </p> <p> <a class="btn btn-primary btn-lg" href="{{ path('admin_index') }}"> <i class="fa fa-lock"></i> {{ 'action.browse_admin'|trans }} </a> </p> </div> </div> <h1> <a href="https://github.com/alfonsomga/symfony.demo.on.roids" target="_blank" style="color: #2c3e50"> <i class="fa fa-github-square fa-3x"></i> </a> </h1> </div> {% endblock %}
8f8597a705d541631dcab204cf9171c1a18b80f4
tests/249-math.swift
tests/249-math.swift
import math; import assert; assert(abs(PI - 3.1416) < 0.0001, "PI"); assert(abs(E - 2.7183) < 0.0001, "E"); assert(abs(sin(PI/2) - 1.0) < 1e-15, "sin"); assert(abs(cos(PI) - -1.0) < 1e-15, "cos"); assert(abs(tan(PI/4) - 1.0) < 1e-15, "tan"); assert(abs(asin(PI/4) - 0.9033391107665127) < 1e-15, "asin"); assert(abs(acos(0) - 1.5707963267948966) < 1e-15, "acos"); assert(abs(atan(PI) - 1.2626272556789118) < 1e-15, "atan"); assert(abs(atan2(-1, 4) - -0.24497866312686414) < 1e-15, "atan2");
import math; import assert; /* constants */ assert(abs(PI - 3.1416) < 0.0001, "PI"); assert(abs(E - 2.7183) < 0.0001, "E"); /* logarithms */ assert(abs(log10(1000) - 3.0) < 1e-15, "log10"); assert(abs(ln(E ** 2) - 2.0) < 1e-15, "ln"); assert(abs(log(5**4, 25) - 2.0) < 1e-15, "log25"); /* trig */ assert(abs(sin(PI/2) - 1.0) < 1e-15, "sin"); assert(abs(cos(PI) - -1.0) < 1e-15, "cos"); assert(abs(tan(PI/4) - 1.0) < 1e-15, "tan"); assert(abs(asin(PI/4) - 0.9033391107665127) < 1e-15, "asin"); assert(abs(acos(0) - 1.5707963267948966) < 1e-15, "acos"); assert(abs(atan(PI) - 1.2626272556789118) < 1e-15, "atan"); assert(abs(atan2(-1, 4) - -0.24497866312686414) < 1e-15, "atan2");
Implement log functions and test them
Implement log functions and test them git-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@14823 dc4e9af1-7f46-4ead-bba6-71afc04862de
Swift
apache-2.0
basheersubei/swift-t,basheersubei/swift-t,blue42u/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,blue42u/swift-t,basheersubei/swift-t,swift-lang/swift-t,swift-lang/swift-t,basheersubei/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,blue42u/swift-t,blue42u/swift-t,basheersubei/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,blue42u/swift-t,swift-lang/swift-t,blue42u/swift-t,swift-lang/swift-t,basheersubei/swift-t,swift-lang/swift-t,basheersubei/swift-t,blue42u/swift-t
swift
## Code Before: import math; import assert; assert(abs(PI - 3.1416) < 0.0001, "PI"); assert(abs(E - 2.7183) < 0.0001, "E"); assert(abs(sin(PI/2) - 1.0) < 1e-15, "sin"); assert(abs(cos(PI) - -1.0) < 1e-15, "cos"); assert(abs(tan(PI/4) - 1.0) < 1e-15, "tan"); assert(abs(asin(PI/4) - 0.9033391107665127) < 1e-15, "asin"); assert(abs(acos(0) - 1.5707963267948966) < 1e-15, "acos"); assert(abs(atan(PI) - 1.2626272556789118) < 1e-15, "atan"); assert(abs(atan2(-1, 4) - -0.24497866312686414) < 1e-15, "atan2"); ## Instruction: Implement log functions and test them git-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@14823 dc4e9af1-7f46-4ead-bba6-71afc04862de ## Code After: import math; import assert; /* constants */ assert(abs(PI - 3.1416) < 0.0001, "PI"); assert(abs(E - 2.7183) < 0.0001, "E"); /* logarithms */ assert(abs(log10(1000) - 3.0) < 1e-15, "log10"); assert(abs(ln(E ** 2) - 2.0) < 1e-15, "ln"); assert(abs(log(5**4, 25) - 2.0) < 1e-15, "log25"); /* trig */ assert(abs(sin(PI/2) - 1.0) < 1e-15, "sin"); assert(abs(cos(PI) - -1.0) < 1e-15, "cos"); assert(abs(tan(PI/4) - 1.0) < 1e-15, "tan"); assert(abs(asin(PI/4) - 0.9033391107665127) < 1e-15, "asin"); assert(abs(acos(0) - 1.5707963267948966) < 1e-15, "acos"); assert(abs(atan(PI) - 1.2626272556789118) < 1e-15, "atan"); assert(abs(atan2(-1, 4) - -0.24497866312686414) < 1e-15, "atan2");
f8dfdfb4d9e0d1bbb5883ee88a0d6778940da302
test/cartridgeSassSpec.js
test/cartridgeSassSpec.js
var spawn = require('child_process').spawn; var path = require('path'); var chai = require('chai'); var expect = chai.expect; // chai.use(require('chai-fs')); chai.should(); const MOCK_PROJECT_DIR = path.join(process.cwd(), 'test', 'mock-project'); const STYLE_SRC_DIR = path.join(MOCK_PROJECT_DIR, '_source', 'styles'); const STYLE_DEST_DIR = path.join(MOCK_PROJECT_DIR, 'public', '_client', 'styles'); process.chdir(MOCK_PROJECT_DIR); function runGulpTask(options, callback) { var gulp = spawn('gulp', options) gulp.on('close', function() { callback(); }); } describe('As a user of the cartridge-sass module', function() { this.timeout(10000); describe('when `gulp sass` is run', function() { before(function(done) { runGulpTask(['sass'], done) }) it('should generate the main.scss file', function() { expect(true).to.be.true; }) }) })
var spawn = require('child_process').spawn; var path = require('path'); var chai = require('chai'); var expect = chai.expect; chai.use(require('chai-fs')); chai.should(); const MOCK_PROJECT_DIR = path.join(process.cwd(), 'test', 'mock-project'); const STYLE_SRC_DIR = path.join(MOCK_PROJECT_DIR, '_source', 'styles'); const STYLE_DEST_DIR = path.join(MOCK_PROJECT_DIR, 'public', '_client', 'styles'); process.chdir(MOCK_PROJECT_DIR); function runGulpTask(options, callback) { var gulp = spawn('gulp', options) gulp.on('close', function() { callback(); }); } describe('As a user of the cartridge-sass module', function() { this.timeout(10000); describe('when `gulp sass` is run', function() { before(function(done) { runGulpTask(['sass'], done) }) it('should generate the main.scss file in the _source dir', function() { var mainScssFilePath = path.join(STYLE_SRC_DIR, 'main.scss'); expect(mainScssFilePath).to.be.a.file(); }) it('should compile the main.css file in the public styles folder', function() { var mainCssFilePath = path.join(STYLE_DEST_DIR, 'main.css'); expect(mainCssFilePath).to.be.a.file(); }) it('should generate the the main.map.css sourcemap file in the public styles folder', function() { var mainCssSourceMapFilePath = path.join(STYLE_DEST_DIR, 'main.map.css'); expect(mainCssSourceMapFilePath).to.be.a.file(); }) }) })
Add in tests to check for file output for sass
tests: Add in tests to check for file output for sass
JavaScript
mit
cartridge/cartridge-sass,code-computerlove/slate-styles
javascript
## Code Before: var spawn = require('child_process').spawn; var path = require('path'); var chai = require('chai'); var expect = chai.expect; // chai.use(require('chai-fs')); chai.should(); const MOCK_PROJECT_DIR = path.join(process.cwd(), 'test', 'mock-project'); const STYLE_SRC_DIR = path.join(MOCK_PROJECT_DIR, '_source', 'styles'); const STYLE_DEST_DIR = path.join(MOCK_PROJECT_DIR, 'public', '_client', 'styles'); process.chdir(MOCK_PROJECT_DIR); function runGulpTask(options, callback) { var gulp = spawn('gulp', options) gulp.on('close', function() { callback(); }); } describe('As a user of the cartridge-sass module', function() { this.timeout(10000); describe('when `gulp sass` is run', function() { before(function(done) { runGulpTask(['sass'], done) }) it('should generate the main.scss file', function() { expect(true).to.be.true; }) }) }) ## Instruction: tests: Add in tests to check for file output for sass ## Code After: var spawn = require('child_process').spawn; var path = require('path'); var chai = require('chai'); var expect = chai.expect; chai.use(require('chai-fs')); chai.should(); const MOCK_PROJECT_DIR = path.join(process.cwd(), 'test', 'mock-project'); const STYLE_SRC_DIR = path.join(MOCK_PROJECT_DIR, '_source', 'styles'); const STYLE_DEST_DIR = path.join(MOCK_PROJECT_DIR, 'public', '_client', 'styles'); process.chdir(MOCK_PROJECT_DIR); function runGulpTask(options, callback) { var gulp = spawn('gulp', options) gulp.on('close', function() { callback(); }); } describe('As a user of the cartridge-sass module', function() { this.timeout(10000); describe('when `gulp sass` is run', function() { before(function(done) { runGulpTask(['sass'], done) }) it('should generate the main.scss file in the _source dir', function() { var mainScssFilePath = path.join(STYLE_SRC_DIR, 'main.scss'); expect(mainScssFilePath).to.be.a.file(); }) it('should compile the main.css file in the public styles folder', function() { var mainCssFilePath = path.join(STYLE_DEST_DIR, 'main.css'); expect(mainCssFilePath).to.be.a.file(); }) it('should generate the the main.map.css sourcemap file in the public styles folder', function() { var mainCssSourceMapFilePath = path.join(STYLE_DEST_DIR, 'main.map.css'); expect(mainCssSourceMapFilePath).to.be.a.file(); }) }) })
fdfc0c5d2056f11021d1b5dcdce4e92728d323a4
akonadi/resources/openchange/lzfu.h
akonadi/resources/openchange/lzfu.h
KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
/* Copyright (C) Brad Hards <[email protected]> 2007 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <kdemacros.h> KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
Add license, to help the GPLV3 zealots.
Add license, to help the GPLV3 zealots. svn path=/trunk/KDE/kdepim/; revision=748604
C
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
c
## Code Before: KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp); ## Instruction: Add license, to help the GPLV3 zealots. svn path=/trunk/KDE/kdepim/; revision=748604 ## Code After: /* Copyright (C) Brad Hards <[email protected]> 2007 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <kdemacros.h> KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
6e9684dcb26cb3ddc54c472c9962b19797c46a8b
tests/unit/Jadu/Pulsar/Twig/Macro/Fixtures/tabs/tabs_list-class.html
tests/unit/Jadu/Pulsar/Twig/Macro/Fixtures/tabs/tabs_list-class.html
<div class="nav-inline t-nav-inline"> <ul class="nav-inline__list"> <li class="nav-inline__item nav-inline__item--is-active is-active"> <a href="#foo" data-toggle="tab" class="one two three nav-inline__link">bar</a> </li> </ul> </div> <div class="tab__pane is-active" id="foo"> baz </div>
<div class="nav-inline t-nav-inline"> <ul class="nav-inline__list"> <li class="nav-inline__item nav-inline__item--is-active is-active"> <a href="#foo" data-toggle="tab" class="one two three nav-inline__link">bar</a> </li> </ul> </div> <div class="tab__pane is-active one two three" id="foo"> baz </div>
Fix unit test for adding tab class to both the tab link and the tab pane
Fix unit test for adding tab class to both the tab link and the tab pane
HTML
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
html
## Code Before: <div class="nav-inline t-nav-inline"> <ul class="nav-inline__list"> <li class="nav-inline__item nav-inline__item--is-active is-active"> <a href="#foo" data-toggle="tab" class="one two three nav-inline__link">bar</a> </li> </ul> </div> <div class="tab__pane is-active" id="foo"> baz </div> ## Instruction: Fix unit test for adding tab class to both the tab link and the tab pane ## Code After: <div class="nav-inline t-nav-inline"> <ul class="nav-inline__list"> <li class="nav-inline__item nav-inline__item--is-active is-active"> <a href="#foo" data-toggle="tab" class="one two three nav-inline__link">bar</a> </li> </ul> </div> <div class="tab__pane is-active one two three" id="foo"> baz </div>
8d2cb910705a51563af5860e878db6f9f2afd3f3
tests/MaxMind/Test/WebService/Http/CurlRequestTest.php
tests/MaxMind/Test/WebService/Http/CurlRequestTest.php
<?php namespace MaxMind\Test\WebService\Http; use MaxMind\WebService\Http\CurlRequest; // These tests are totally insufficient, but they do test that most of our // curl calls are at least syntactically valid and available in each PHP // version. Doing more sophisticated testing would require setting up a // server, which is very painful to do in PHP 5.3. For 5.4+, there are // various solutions. When we increase our required PHP version, we should // look into those. class CurlRequestTest extends \PHPUnit_Framework_TestCase { private $options = array( 'caBundle'=> null, 'headers' => array(), 'userAgent' => 'Test', 'connectTimeout' => 0, 'timeout' => 0, ); /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): Could not resolve host: invalid host */ public function testGet() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->get(); } /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): Could not resolve host: invalid host */ public function testPost() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->post('POST BODY'); } }
<?php namespace MaxMind\Test\WebService\Http; use MaxMind\WebService\Http\CurlRequest; // These tests are totally insufficient, but they do test that most of our // curl calls are at least syntactically valid and available in each PHP // version. Doing more sophisticated testing would require setting up a // server, which is very painful to do in PHP 5.3. For 5.4+, there are // various solutions. When we increase our required PHP version, we should // look into those. class CurlRequestTest extends \PHPUnit_Framework_TestCase { private $options = array( 'caBundle'=> null, 'headers' => array(), 'userAgent' => 'Test', 'connectTimeout' => 0, 'timeout' => 0, ); /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): */ public function testGet() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->get(); } /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): */ public function testPost() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->post('POST BODY'); } }
Fix exception message to work on Travis
Fix exception message to work on Travis
PHP
apache-2.0
maxmind/web-service-common-php,maxmind/web-service-common-php
php
## Code Before: <?php namespace MaxMind\Test\WebService\Http; use MaxMind\WebService\Http\CurlRequest; // These tests are totally insufficient, but they do test that most of our // curl calls are at least syntactically valid and available in each PHP // version. Doing more sophisticated testing would require setting up a // server, which is very painful to do in PHP 5.3. For 5.4+, there are // various solutions. When we increase our required PHP version, we should // look into those. class CurlRequestTest extends \PHPUnit_Framework_TestCase { private $options = array( 'caBundle'=> null, 'headers' => array(), 'userAgent' => 'Test', 'connectTimeout' => 0, 'timeout' => 0, ); /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): Could not resolve host: invalid host */ public function testGet() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->get(); } /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): Could not resolve host: invalid host */ public function testPost() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->post('POST BODY'); } } ## Instruction: Fix exception message to work on Travis ## Code After: <?php namespace MaxMind\Test\WebService\Http; use MaxMind\WebService\Http\CurlRequest; // These tests are totally insufficient, but they do test that most of our // curl calls are at least syntactically valid and available in each PHP // version. Doing more sophisticated testing would require setting up a // server, which is very painful to do in PHP 5.3. For 5.4+, there are // various solutions. When we increase our required PHP version, we should // look into those. class CurlRequestTest extends \PHPUnit_Framework_TestCase { private $options = array( 'caBundle'=> null, 'headers' => array(), 'userAgent' => 'Test', 'connectTimeout' => 0, 'timeout' => 0, ); /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): */ public function testGet() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->get(); } /** * @expectedException MaxMind\Exception\HttpException * @expectedExceptionMessage cURL error (6): */ public function testPost() { $cr = new CurlRequest( 'invalid host', $this->options ); $cr->post('POST BODY'); } }
85ab007bb0f0cd2c107177e60e7b1746f55c9ad4
app/lib/notifier.rb
app/lib/notifier.rb
class Notifier def initialize(appointment) @appointment = appointment end def call return unless appointment.previous_changes notify_customer(appointment) notify_guiders(appointment) end private def notify_guiders(appointment) guiders_to_notify(appointment).each do |guider_id| PusherNotificationJob.perform_later(guider_id, appointment) end end def guiders_to_notify(appointment) Array(appointment.previous_changes.fetch('guider_id', appointment.guider_id)) end def notify_customer(appointment) if appointment_details_changed?(appointment) CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::UPDATED_MESSAGE) elsif appointment_cancelled?(appointment) CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::CANCELLED_MESSAGE) elsif appointment_missed?(appointment) CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::MISSED_MESSAGE) end end def appointment_details_changed?(appointment) appointment.previous_changes.any? && (appointment.previous_changes.keys - Appointment::NON_NOTIFY_COLUMNS).present? end def appointment_cancelled?(appointment) appointment.previous_changes.slice('status').present? && appointment.cancelled? end def appointment_missed?(appointment) appointment.previous_changes.slice('status').present? && appointment.no_show? end attr_reader :appointment end
class Notifier def initialize(appointment) @appointment = appointment end def call return unless appointment.previous_changes notify_customer notify_guiders end private def notify_guiders guiders_to_notify.each do |guider_id| PusherNotificationJob.perform_later(guider_id, appointment) end end def guiders_to_notify Array(appointment.previous_changes.fetch('guider_id', appointment.guider_id)) end def notify_customer if appointment_details_changed? CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::UPDATED_MESSAGE) elsif appointment_cancelled? CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::CANCELLED_MESSAGE) elsif appointment_missed? CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::MISSED_MESSAGE) end end def appointment_details_changed? appointment.previous_changes.any? && (appointment.previous_changes.keys - Appointment::NON_NOTIFY_COLUMNS).present? end def appointment_cancelled? appointment.previous_changes.slice('status').present? && appointment.cancelled? end def appointment_missed? appointment.previous_changes.slice('status').present? && appointment.no_show? end attr_reader :appointment end
Clean up method signatures in Notify object
Clean up method signatures in Notify object appointment didn’t need to be passed in to each and every object.
Ruby
mit
guidance-guarantee-programme/telephone_appointment_planner,guidance-guarantee-programme/telephone_appointment_planner,guidance-guarantee-programme/telephone_appointment_planner
ruby
## Code Before: class Notifier def initialize(appointment) @appointment = appointment end def call return unless appointment.previous_changes notify_customer(appointment) notify_guiders(appointment) end private def notify_guiders(appointment) guiders_to_notify(appointment).each do |guider_id| PusherNotificationJob.perform_later(guider_id, appointment) end end def guiders_to_notify(appointment) Array(appointment.previous_changes.fetch('guider_id', appointment.guider_id)) end def notify_customer(appointment) if appointment_details_changed?(appointment) CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::UPDATED_MESSAGE) elsif appointment_cancelled?(appointment) CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::CANCELLED_MESSAGE) elsif appointment_missed?(appointment) CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::MISSED_MESSAGE) end end def appointment_details_changed?(appointment) appointment.previous_changes.any? && (appointment.previous_changes.keys - Appointment::NON_NOTIFY_COLUMNS).present? end def appointment_cancelled?(appointment) appointment.previous_changes.slice('status').present? && appointment.cancelled? end def appointment_missed?(appointment) appointment.previous_changes.slice('status').present? && appointment.no_show? end attr_reader :appointment end ## Instruction: Clean up method signatures in Notify object appointment didn’t need to be passed in to each and every object. ## Code After: class Notifier def initialize(appointment) @appointment = appointment end def call return unless appointment.previous_changes notify_customer notify_guiders end private def notify_guiders guiders_to_notify.each do |guider_id| PusherNotificationJob.perform_later(guider_id, appointment) end end def guiders_to_notify Array(appointment.previous_changes.fetch('guider_id', appointment.guider_id)) end def notify_customer if appointment_details_changed? CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::UPDATED_MESSAGE) elsif appointment_cancelled? CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::CANCELLED_MESSAGE) elsif appointment_missed? CustomerUpdateJob.perform_later(appointment, CustomerUpdateActivity::MISSED_MESSAGE) end end def appointment_details_changed? appointment.previous_changes.any? && (appointment.previous_changes.keys - Appointment::NON_NOTIFY_COLUMNS).present? end def appointment_cancelled? appointment.previous_changes.slice('status').present? && appointment.cancelled? end def appointment_missed? appointment.previous_changes.slice('status').present? && appointment.no_show? end attr_reader :appointment end
09b4307c74869bd3713c280def0b2522afb7704f
package.json
package.json
{ "name": "newbcss", "version": "1.0.0", "description": "An attempt to create an extremely lightweight but flexible CSS framework. ", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Carlos Filoteo", "license": "MIT", "devDependencies": { "babel-cli": "^6.3.17", "babel-preset-es2015": "^6.3.13", "express": "^4.13.3", "gulp": "^3.9.0", "gulp-babel": "^6.1.1", "gulp-jade": "^1.1.0", "gulp-rename": "^1.2.2", "jade": "^1.11.0", "node-sass": "^3.4.2" }, "dependencies": { "normalize.css": "^3.0.3" } }
{ "name": "newbcss", "version": "1.0.0", "description": "An attempt to create an extremely lightweight but flexible CSS framework. ", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "webpack-dev-server" }, "author": "Carlos Filoteo", "license": "MIT", "devDependencies": { "babel-cli": "^6.3.17", "babel-preset-es2015": "^6.3.13", "express": "^4.13.3", "gulp": "^3.9.0", "gulp-babel": "^6.1.1", "gulp-jade": "^1.1.0", "gulp-rename": "^1.2.2", "gulp-sass": "^2.2.0", "jade": "^1.11.0", "node-sass": "^3.4.2" }, "dependencies": { "normalize.css": "^3.0.3", "react": "^0.14.3", "react-dom": "^0.14.3" } }
Add start npm script. Add gulp-sass and react as dependencies.
Add start npm script. Add gulp-sass and react as dependencies.
JSON
mit
filoxo/NewbCSS,filoxo/NewbCSS
json
## Code Before: { "name": "newbcss", "version": "1.0.0", "description": "An attempt to create an extremely lightweight but flexible CSS framework. ", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Carlos Filoteo", "license": "MIT", "devDependencies": { "babel-cli": "^6.3.17", "babel-preset-es2015": "^6.3.13", "express": "^4.13.3", "gulp": "^3.9.0", "gulp-babel": "^6.1.1", "gulp-jade": "^1.1.0", "gulp-rename": "^1.2.2", "jade": "^1.11.0", "node-sass": "^3.4.2" }, "dependencies": { "normalize.css": "^3.0.3" } } ## Instruction: Add start npm script. Add gulp-sass and react as dependencies. ## Code After: { "name": "newbcss", "version": "1.0.0", "description": "An attempt to create an extremely lightweight but flexible CSS framework. ", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "webpack-dev-server" }, "author": "Carlos Filoteo", "license": "MIT", "devDependencies": { "babel-cli": "^6.3.17", "babel-preset-es2015": "^6.3.13", "express": "^4.13.3", "gulp": "^3.9.0", "gulp-babel": "^6.1.1", "gulp-jade": "^1.1.0", "gulp-rename": "^1.2.2", "gulp-sass": "^2.2.0", "jade": "^1.11.0", "node-sass": "^3.4.2" }, "dependencies": { "normalize.css": "^3.0.3", "react": "^0.14.3", "react-dom": "^0.14.3" } }
7e05249b9d8e4888a63d668dbecd23ddf2f90b82
contrib/examples/actions/workflows/mistral-handle-retry.yaml
contrib/examples/actions/workflows/mistral-handle-retry.yaml
version: '2.0' name: examples.mistral-handle-retry description: > Sample workflow that demonstrates how to handle rollback and retry on error. In this example, the workflow will error and then continue to retry until the file /tmp/done exists. A parallel task will wait for some time before creating the file. When completed, /tmp/done will be deleted. workflows: main: type: direct tasks: test-error-undo-retry: workflow: work policies: retry: count: 10 delay: 2 on-complete: - delete-file create-file: action: core.local input: cmd: "touch /tmp/done" policies: wait-before: 10 on-complete: - delete-file delete-file: join: all action: core.local input: cmd: "rm -f /tmp/done" work: type: direct tasks: do: action: core.local input: cmd: "if [ ! -e \"/tmp/done\" ]; then exit 1; fi" on-error: - undo undo: action: core.local input: cmd: "echo \"Define rollback tasks here.\"" on-success: - fail
version: '2.0' name: examples.mistral-handle-retry description: > Sample workflow that demonstrates how to handle rollback and retry on error. In this example, the workflow will error and then continue to retry until the file /tmp/done exists. A parallel task will wait for some time before creating the file. When completed, /tmp/done will be deleted. workflows: main: type: direct tasks: test-error-undo-retry: workflow: work policies: retry: count: 10 delay: 2 on-success: - delete-file create-file: action: core.local input: cmd: "touch /tmp/done" policies: wait-before: 10 delete-file: action: core.local input: cmd: "rm -f /tmp/done" work: type: direct tasks: do: action: core.local input: cmd: "if [ ! -e \"/tmp/done\" ]; then exit 1; fi" on-error: - undo undo: action: core.local input: cmd: "echo \"Define rollback tasks here.\"" on-success: - fail
Fix mistral workflow example to handle retry
Fix mistral workflow example to handle retry Move the delete file task to run on success of the test retry task.
YAML
apache-2.0
alfasin/st2,tonybaloney/st2,alfasin/st2,StackStorm/st2,grengojbo/st2,Plexxi/st2,punalpatel/st2,jtopjian/st2,pinterb/st2,dennybaa/st2,pixelrebel/st2,StackStorm/st2,peak6/st2,Itxaka/st2,pixelrebel/st2,Itxaka/st2,jtopjian/st2,emedvedev/st2,nzlosh/st2,StackStorm/st2,jtopjian/st2,dennybaa/st2,dennybaa/st2,Plexxi/st2,emedvedev/st2,lakshmi-kannan/st2,pinterb/st2,armab/st2,punalpatel/st2,nzlosh/st2,grengojbo/st2,tonybaloney/st2,lakshmi-kannan/st2,emedvedev/st2,nzlosh/st2,nzlosh/st2,punalpatel/st2,Plexxi/st2,Itxaka/st2,lakshmi-kannan/st2,armab/st2,tonybaloney/st2,alfasin/st2,grengojbo/st2,peak6/st2,pixelrebel/st2,peak6/st2,pinterb/st2,StackStorm/st2,armab/st2,Plexxi/st2
yaml
## Code Before: version: '2.0' name: examples.mistral-handle-retry description: > Sample workflow that demonstrates how to handle rollback and retry on error. In this example, the workflow will error and then continue to retry until the file /tmp/done exists. A parallel task will wait for some time before creating the file. When completed, /tmp/done will be deleted. workflows: main: type: direct tasks: test-error-undo-retry: workflow: work policies: retry: count: 10 delay: 2 on-complete: - delete-file create-file: action: core.local input: cmd: "touch /tmp/done" policies: wait-before: 10 on-complete: - delete-file delete-file: join: all action: core.local input: cmd: "rm -f /tmp/done" work: type: direct tasks: do: action: core.local input: cmd: "if [ ! -e \"/tmp/done\" ]; then exit 1; fi" on-error: - undo undo: action: core.local input: cmd: "echo \"Define rollback tasks here.\"" on-success: - fail ## Instruction: Fix mistral workflow example to handle retry Move the delete file task to run on success of the test retry task. ## Code After: version: '2.0' name: examples.mistral-handle-retry description: > Sample workflow that demonstrates how to handle rollback and retry on error. In this example, the workflow will error and then continue to retry until the file /tmp/done exists. A parallel task will wait for some time before creating the file. When completed, /tmp/done will be deleted. workflows: main: type: direct tasks: test-error-undo-retry: workflow: work policies: retry: count: 10 delay: 2 on-success: - delete-file create-file: action: core.local input: cmd: "touch /tmp/done" policies: wait-before: 10 delete-file: action: core.local input: cmd: "rm -f /tmp/done" work: type: direct tasks: do: action: core.local input: cmd: "if [ ! -e \"/tmp/done\" ]; then exit 1; fi" on-error: - undo undo: action: core.local input: cmd: "echo \"Define rollback tasks here.\"" on-success: - fail
9c45a76c7432bc7007a62a81754e8d7933c33ee3
.travis.yml
.travis.yml
language: node_js node_js: - "6.3.1" deploy: provider: npm email: [email protected] api_key: $NPM_TOKEN on: tags: true after_success: - codeclimate-test-reporter < ./coverage/lcov.info addons: code_climate: repo_token: $CODE_CLIMATE_TOKEN notifications: email: recipients: - [email protected] on_success: never # default: change on_failure: always # default: always slack: $SLACK_TOKEN
language: node_js node_js: - "6.3.1" deploy: - provider: npm email: [email protected] api_key: $NPM_TOKEN on: tags: true - provider: s3 access_key_id: $AWS_ACCESS_KEY secret_access_key: $AWS_SECRET_KEY bucket: "travis-demo-client" skip_cleanup: true on: tags: true after_success: - codeclimate-test-reporter < ./coverage/lcov.info addons: code_climate: repo_token: $CODE_CLIMATE_TOKEN notifications: email: recipients: - [email protected] on_success: never # default: change on_failure: always # default: always slack: $SLACK_TOKEN
Deploy on S3 on tags
Deploy on S3 on tags
YAML
mit
thomaswinckell/travis-demo-client,thomaswinckell/travis-demo-client,thomaswinckell/travis-demo-client
yaml
## Code Before: language: node_js node_js: - "6.3.1" deploy: provider: npm email: [email protected] api_key: $NPM_TOKEN on: tags: true after_success: - codeclimate-test-reporter < ./coverage/lcov.info addons: code_climate: repo_token: $CODE_CLIMATE_TOKEN notifications: email: recipients: - [email protected] on_success: never # default: change on_failure: always # default: always slack: $SLACK_TOKEN ## Instruction: Deploy on S3 on tags ## Code After: language: node_js node_js: - "6.3.1" deploy: - provider: npm email: [email protected] api_key: $NPM_TOKEN on: tags: true - provider: s3 access_key_id: $AWS_ACCESS_KEY secret_access_key: $AWS_SECRET_KEY bucket: "travis-demo-client" skip_cleanup: true on: tags: true after_success: - codeclimate-test-reporter < ./coverage/lcov.info addons: code_climate: repo_token: $CODE_CLIMATE_TOKEN notifications: email: recipients: - [email protected] on_success: never # default: change on_failure: always # default: always slack: $SLACK_TOKEN
5df5040438f897f151c3c238942f353fce5417fe
lib/arrthorizer/rails/controller_action.rb
lib/arrthorizer/rails/controller_action.rb
module Arrthorizer module Rails class ControllerAction ControllerNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotConfigured = Class.new(Arrthorizer::ArrthorizerException) attr_accessor :privilege attr_reader :controller_path, :action_name def self.get_current(controller) fetch(key_for(controller)) end def initialize(attrs) self.controller_path = attrs.fetch(:controller) { raise ControllerNotDefined } self.action_name = attrs.fetch(:action) { raise ActionNotDefined } self.class.register(self) end def to_key "#{controller_path}##{action_name}" end private attr_writer :controller_path, :action_name def self.key_for(controller) "#{controller.controller_path}##{controller.action_name}" end def self.fetch(key) registry.fetch(key) rescue Arrthorizer::Registry::NotFound raise ActionNotConfigured, "No privileges granted for #{key}" end def self.register(controller_action) registry.add(controller_action) end def self.registry @registry ||= Registry.new end end end end
module Arrthorizer module Rails class ControllerAction ControllerNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotConfigured = Class.new(Arrthorizer::ArrthorizerException) attr_accessor :privilege attr_reader :controller_path, :action_name def self.get_current(controller) fetch(key_for(controller)) end def initialize(attrs) self.controller_path = attrs.fetch(:controller) { raise ControllerNotDefined } self.action_name = attrs.fetch(:action) { raise ActionNotDefined } self.class.register(self) end def to_key "#{controller_path}##{action_name}" end private attr_writer :controller_path, :action_name def self.key_for(current) "#{current.controller_path}##{current.action_name}" end def self.fetch(key) registry.fetch(key) rescue Arrthorizer::Registry::NotFound raise ActionNotConfigured, "No privileges granted for #{key}" end def self.register(controller_action) registry.add(controller_action) end def self.registry @registry ||= Registry.new end end end end
Improve variable naming in the key_for method
Improve variable naming in the key_for method This eliminates doubt about whether this is a controller instance or a controller class - it is just the current controller, executing the current action.
Ruby
mit
BUS-OGD/arrthorizer,BUS-OGD/arrthorizer,BUS-OGD/arrthorizer
ruby
## Code Before: module Arrthorizer module Rails class ControllerAction ControllerNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotConfigured = Class.new(Arrthorizer::ArrthorizerException) attr_accessor :privilege attr_reader :controller_path, :action_name def self.get_current(controller) fetch(key_for(controller)) end def initialize(attrs) self.controller_path = attrs.fetch(:controller) { raise ControllerNotDefined } self.action_name = attrs.fetch(:action) { raise ActionNotDefined } self.class.register(self) end def to_key "#{controller_path}##{action_name}" end private attr_writer :controller_path, :action_name def self.key_for(controller) "#{controller.controller_path}##{controller.action_name}" end def self.fetch(key) registry.fetch(key) rescue Arrthorizer::Registry::NotFound raise ActionNotConfigured, "No privileges granted for #{key}" end def self.register(controller_action) registry.add(controller_action) end def self.registry @registry ||= Registry.new end end end end ## Instruction: Improve variable naming in the key_for method This eliminates doubt about whether this is a controller instance or a controller class - it is just the current controller, executing the current action. ## Code After: module Arrthorizer module Rails class ControllerAction ControllerNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotDefined = Class.new(Arrthorizer::ArrthorizerException) ActionNotConfigured = Class.new(Arrthorizer::ArrthorizerException) attr_accessor :privilege attr_reader :controller_path, :action_name def self.get_current(controller) fetch(key_for(controller)) end def initialize(attrs) self.controller_path = attrs.fetch(:controller) { raise ControllerNotDefined } self.action_name = attrs.fetch(:action) { raise ActionNotDefined } self.class.register(self) end def to_key "#{controller_path}##{action_name}" end private attr_writer :controller_path, :action_name def self.key_for(current) "#{current.controller_path}##{current.action_name}" end def self.fetch(key) registry.fetch(key) rescue Arrthorizer::Registry::NotFound raise ActionNotConfigured, "No privileges granted for #{key}" end def self.register(controller_action) registry.add(controller_action) end def self.registry @registry ||= Registry.new end end end end
7b7d27b7adfd3936703275851b200f4c752639b4
workstation_setup/install_packages.sh
workstation_setup/install_packages.sh
sudo apt-get install -y make sudo apt-get install -y swig sudo apt-get install -y git # Python dependencies sudo apt-get install -y build-essential sudo apt-get install -y checkinstall sudo apt-get install -y libreadline-gplv2-dev sudo apt-get install -y libncursesw5-dev sudo apt-get install -y libssl-dev sudo apt-get install -y libsqlite3-dev sudo apt-get install -y tk-dev sudo apt-get install -y libgdbm-dev sudo apt-get install -y libc6-dev sudo apt-get install -y libbz2-dev # Qt and PyQt sudo apt-get install -y liblapack-dev sudo apt-get install -y libdbus-1-3 sudo apt-get install -y libglu1-mesa-dev # Fac dependecies sudo apt-get install -y libffi6 sudo apt-get install -y libffi-dev libfreetype6 sudo apt-get install -y libfreetype6-dev # sudo apt-get install -y libpng3 sudo apt-get install -y nmap sudo apt-get install -y dvipng
sudo apt-get install -y make sudo apt-get install -y swig sudo apt-get install -y git sudo apt-get install -y openjfx # Python dependencies sudo apt-get install -y build-essential sudo apt-get install -y checkinstall sudo apt-get install -y libreadline-gplv2-dev sudo apt-get install -y libncursesw5-dev sudo apt-get install -y libssl-dev sudo apt-get install -y libsqlite3-dev sudo apt-get install -y tk-dev sudo apt-get install -y libgdbm-dev sudo apt-get install -y libc6-dev sudo apt-get install -y libbz2-dev # Qt and PyQt sudo apt-get install -y liblapack-dev sudo apt-get install -y libdbus-1-3 sudo apt-get install -y libglu1-mesa-dev # Fac dependecies sudo apt-get install -y libffi6 sudo apt-get install -y libffi-dev libfreetype6 sudo apt-get install -y libfreetype6-dev # sudo apt-get install -y libpng3 sudo apt-get install -y nmap sudo apt-get install -y dvipng
Add openjfx for DIG's cs-studio
Add openjfx for DIG's cs-studio
Shell
mit
lnls-fac/scripts,lnls-fac/scripts
shell
## Code Before: sudo apt-get install -y make sudo apt-get install -y swig sudo apt-get install -y git # Python dependencies sudo apt-get install -y build-essential sudo apt-get install -y checkinstall sudo apt-get install -y libreadline-gplv2-dev sudo apt-get install -y libncursesw5-dev sudo apt-get install -y libssl-dev sudo apt-get install -y libsqlite3-dev sudo apt-get install -y tk-dev sudo apt-get install -y libgdbm-dev sudo apt-get install -y libc6-dev sudo apt-get install -y libbz2-dev # Qt and PyQt sudo apt-get install -y liblapack-dev sudo apt-get install -y libdbus-1-3 sudo apt-get install -y libglu1-mesa-dev # Fac dependecies sudo apt-get install -y libffi6 sudo apt-get install -y libffi-dev libfreetype6 sudo apt-get install -y libfreetype6-dev # sudo apt-get install -y libpng3 sudo apt-get install -y nmap sudo apt-get install -y dvipng ## Instruction: Add openjfx for DIG's cs-studio ## Code After: sudo apt-get install -y make sudo apt-get install -y swig sudo apt-get install -y git sudo apt-get install -y openjfx # Python dependencies sudo apt-get install -y build-essential sudo apt-get install -y checkinstall sudo apt-get install -y libreadline-gplv2-dev sudo apt-get install -y libncursesw5-dev sudo apt-get install -y libssl-dev sudo apt-get install -y libsqlite3-dev sudo apt-get install -y tk-dev sudo apt-get install -y libgdbm-dev sudo apt-get install -y libc6-dev sudo apt-get install -y libbz2-dev # Qt and PyQt sudo apt-get install -y liblapack-dev sudo apt-get install -y libdbus-1-3 sudo apt-get install -y libglu1-mesa-dev # Fac dependecies sudo apt-get install -y libffi6 sudo apt-get install -y libffi-dev libfreetype6 sudo apt-get install -y libfreetype6-dev # sudo apt-get install -y libpng3 sudo apt-get install -y nmap sudo apt-get install -y dvipng
e3f04a42c9a5e0f4d0d19aa936caff0c4ffe2512
.travis.yml
.travis.yml
language: "node_js" node_js: - 0.8 - 0.10 services: - rabbitmq # will start rabbitmq-server - mongodb # will start mongodb branches: only: - v1.1 before_install: - npm install - sudo mkdir -p /var/log/push_server/ # To store log files - sudo chmod 777 /var/log/push_server/ - cd scripts/ - awk -f load_mcc_mnc_onmongo.awk mcc_mnc_list.txt - cd .. before_script: - cd src - export NODE_TLS_REJECT_UNAUTHORIZED="0" - node start.js > out & # Start the server - PID=$! # Save the PID - cd .. && sleep 5 # Wait for everything to start correctly script: - make tests after_script: - sleep 30 - kill $PID - sleep 15 - cd src - cat out notifications: email: - [email protected] - [email protected]
language: "node_js" node_js: - 0.8 - 0.10 services: - rabbitmq # will start rabbitmq-server - mongodb # will start mongodb branches: only: - v1.1 before_install: - npm install - sudo mkdir -p /var/log/push_server/ # To store log files - sudo chmod 777 /var/log/push_server/ - cd scripts/ - awk -f load_mcc_mnc_onmongo.awk mcc_mnc_list.txt - cd .. - make version.info before_script: - cd src - export NODE_TLS_REJECT_UNAUTHORIZED="0" - node start.js > out & # Start the server - PID=$! # Save the PID - cd .. && sleep 5 # Wait for everything to start correctly script: - make tests after_script: - sleep 30 - kill $PID - sleep 15 - cd src - cat out notifications: email: - [email protected] - [email protected]
Call make to create the version.info file
Call make to create the version.info file
YAML
agpl-3.0
telefonicaid/notification_server,telefonicaid/notification_server,frsela/notification_server,frsela/notification_server,telefonicaid/notification_server,frsela/notification_server,frsela/notification_server,telefonicaid/notification_server,telefonicaid/notification_server,frsela/notification_server
yaml
## Code Before: language: "node_js" node_js: - 0.8 - 0.10 services: - rabbitmq # will start rabbitmq-server - mongodb # will start mongodb branches: only: - v1.1 before_install: - npm install - sudo mkdir -p /var/log/push_server/ # To store log files - sudo chmod 777 /var/log/push_server/ - cd scripts/ - awk -f load_mcc_mnc_onmongo.awk mcc_mnc_list.txt - cd .. before_script: - cd src - export NODE_TLS_REJECT_UNAUTHORIZED="0" - node start.js > out & # Start the server - PID=$! # Save the PID - cd .. && sleep 5 # Wait for everything to start correctly script: - make tests after_script: - sleep 30 - kill $PID - sleep 15 - cd src - cat out notifications: email: - [email protected] - [email protected] ## Instruction: Call make to create the version.info file ## Code After: language: "node_js" node_js: - 0.8 - 0.10 services: - rabbitmq # will start rabbitmq-server - mongodb # will start mongodb branches: only: - v1.1 before_install: - npm install - sudo mkdir -p /var/log/push_server/ # To store log files - sudo chmod 777 /var/log/push_server/ - cd scripts/ - awk -f load_mcc_mnc_onmongo.awk mcc_mnc_list.txt - cd .. - make version.info before_script: - cd src - export NODE_TLS_REJECT_UNAUTHORIZED="0" - node start.js > out & # Start the server - PID=$! # Save the PID - cd .. && sleep 5 # Wait for everything to start correctly script: - make tests after_script: - sleep 30 - kill $PID - sleep 15 - cd src - cat out notifications: email: - [email protected] - [email protected]
72bceb622d0eef02cf1533b39559508368d45195
test.js
test.js
///////////////// // Test script // ///////////////// earhorn$(this, 'phoria.js', function() { var canvas = document.getElementById('canvas'); var scene = new Phoria.Scene(); scene.camera.position = {x:0.0, y:2.0, z:-6.0}; scene.perspective.aspect = canvas.width / canvas.height; scene.viewport.width = canvas.width; scene.viewport.height = canvas.height; var renderer = new Phoria.CanvasRenderer(canvas); var c = Phoria.Util.generateUnitCube(); var cube = Phoria.Entity.create({ points: c.points, edges: c.edges, polygons: c.polygons, style: { color: [0, 0, 0], linewidth: 3, drawmode: 'wireframe' } }); scene.graph.push(cube); scene.graph.push(new Phoria.DistantLight()); var fnAnimate = function() { cube.rotateY(0.01); // Phoria uses this matrix of elements to render the cube cube.matrix[0] cube.matrix[1] cube.matrix[2] scene.modelView(); renderer.render(scene); requestAnimationFrame(fnAnimate); }; console.log(cube); requestAnimationFrame(fnAnimate); })
///////////////// // Test script // ///////////////// earhorn$(this, 'phoria.js', function() { var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(c) { window.setTimeout(c, 15) } var canvas = document.getElementById('canvas'); var scene = new Phoria.Scene(); scene.camera.position = {x:0.0, y:2.0, z:-6.0}; scene.perspective.aspect = canvas.width / canvas.height; scene.viewport.width = canvas.width; scene.viewport.height = canvas.height; var renderer = new Phoria.CanvasRenderer(canvas); var c = Phoria.Util.generateUnitCube(); var cube = Phoria.Entity.create({ points: c.points, edges: c.edges, polygons: c.polygons, style: { color: [0, 0, 0], linewidth: 3, drawmode: 'wireframe' } }); scene.graph.push(cube); scene.graph.push(new Phoria.DistantLight()); function animate() { cube.rotateY(0.01); // Phoria uses this matrix of elements to render the cube cube.matrix[0] cube.matrix[1] cube.matrix[2] scene.modelView(); renderer.render(scene); requestAnimationFrame(animate); } requestAnimationFrame(animate); })
Add polyfill for request animation from.
Add polyfill for request animation from.
JavaScript
mit
omphalos/earhorn,omphalos/earhorn,omphalos/earhorn,omphalos/earhorn,omphalos/earhorn,omphalos/earhorn
javascript
## Code Before: ///////////////// // Test script // ///////////////// earhorn$(this, 'phoria.js', function() { var canvas = document.getElementById('canvas'); var scene = new Phoria.Scene(); scene.camera.position = {x:0.0, y:2.0, z:-6.0}; scene.perspective.aspect = canvas.width / canvas.height; scene.viewport.width = canvas.width; scene.viewport.height = canvas.height; var renderer = new Phoria.CanvasRenderer(canvas); var c = Phoria.Util.generateUnitCube(); var cube = Phoria.Entity.create({ points: c.points, edges: c.edges, polygons: c.polygons, style: { color: [0, 0, 0], linewidth: 3, drawmode: 'wireframe' } }); scene.graph.push(cube); scene.graph.push(new Phoria.DistantLight()); var fnAnimate = function() { cube.rotateY(0.01); // Phoria uses this matrix of elements to render the cube cube.matrix[0] cube.matrix[1] cube.matrix[2] scene.modelView(); renderer.render(scene); requestAnimationFrame(fnAnimate); }; console.log(cube); requestAnimationFrame(fnAnimate); }) ## Instruction: Add polyfill for request animation from. ## Code After: ///////////////// // Test script // ///////////////// earhorn$(this, 'phoria.js', function() { var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(c) { window.setTimeout(c, 15) } var canvas = document.getElementById('canvas'); var scene = new Phoria.Scene(); scene.camera.position = {x:0.0, y:2.0, z:-6.0}; scene.perspective.aspect = canvas.width / canvas.height; scene.viewport.width = canvas.width; scene.viewport.height = canvas.height; var renderer = new Phoria.CanvasRenderer(canvas); var c = Phoria.Util.generateUnitCube(); var cube = Phoria.Entity.create({ points: c.points, edges: c.edges, polygons: c.polygons, style: { color: [0, 0, 0], linewidth: 3, drawmode: 'wireframe' } }); scene.graph.push(cube); scene.graph.push(new Phoria.DistantLight()); function animate() { cube.rotateY(0.01); // Phoria uses this matrix of elements to render the cube cube.matrix[0] cube.matrix[1] cube.matrix[2] scene.modelView(); renderer.render(scene); requestAnimationFrame(animate); } requestAnimationFrame(animate); })
f9708cf1ba01b4240f391fdb61a77fa22b8b037f
docs/markdown/Release-notes-for-0.41.0.md
docs/markdown/Release-notes-for-0.41.0.md
--- title: Release 0.41 short-description: Release notes for 0.41 (preliminary) ... **Preliminary, 0.41.0 has not been released yet.** # New features Add features here as code is merged to master. ## Dependency Handler for LLVM Native support for linking against LLVM using the `dependency` function. ## vcs_tag keyword fallback is is now optional The `fallback` keyword in `vcs_tag` is now optional. If not given, its value defaults to the return value of `meson.project_version()`.
--- title: Release 0.41 short-description: Release notes for 0.41 (preliminary) ... **Preliminary, 0.41.0 has not been released yet.** # New features Add features here as code is merged to master. ## Dependency Handler for LLVM Native support for linking against LLVM using the `dependency` function. ## vcs_tag keyword fallback is is now optional The `fallback` keyword in `vcs_tag` is now optional. If not given, its value defaults to the return value of `meson.project_version()`. ## Better quoting of special characters in ninja command invocations The ninja backend now quotes special characters that may be interpreted by ninja itself, providing better interoperability with custom commands. This support may not be perfect; please report any issues found with special characters to the issue tracker.
Add release note about ninja character escaping.
Add release note about ninja character escaping.
Markdown
apache-2.0
trhd/meson,QuLogic/meson,ernestask/meson,trhd/meson,trhd/meson,wberrier/meson,QuLogic/meson,becm/meson,pexip/meson,jeandet/meson,rhd/meson,ernestask/meson,trhd/meson,QuLogic/meson,fmuellner/meson,rhd/meson,MathieuDuponchelle/meson,jpakkane/meson,fmuellner/meson,fmuellner/meson,pexip/meson,becm/meson,becm/meson,mesonbuild/meson,jeandet/meson,jpakkane/meson,becm/meson,aaronp24/meson,wberrier/meson,QuLogic/meson,thiblahute/meson,fmuellner/meson,becm/meson,rhd/meson,pexip/meson,aaronp24/meson,aaronp24/meson,jeandet/meson,wberrier/meson,becm/meson,trhd/meson,ernestask/meson,ernestask/meson,MathieuDuponchelle/meson,thiblahute/meson,aaronp24/meson,pexip/meson,wberrier/meson,jpakkane/meson,trhd/meson,mesonbuild/meson,aaronp24/meson,MathieuDuponchelle/meson,trhd/meson,jeandet/meson,MathieuDuponchelle/meson,thiblahute/meson,mesonbuild/meson,mesonbuild/meson,MathieuDuponchelle/meson,QuLogic/meson,rhd/meson,thiblahute/meson,jpakkane/meson,rhd/meson,aaronp24/meson,thiblahute/meson,jeandet/meson,thiblahute/meson,jpakkane/meson,wberrier/meson,thiblahute/meson,jeandet/meson,fmuellner/meson,ernestask/meson,mesonbuild/meson,pexip/meson,pexip/meson,QuLogic/meson,jpakkane/meson,MathieuDuponchelle/meson,thiblahute/meson,pexip/meson,fmuellner/meson,rhd/meson,thiblahute/meson,jeandet/meson,becm/meson,jeandet/meson,QuLogic/meson,fmuellner/meson,jpakkane/meson,QuLogic/meson,wberrier/meson,QuLogic/meson,mesonbuild/meson,wberrier/meson,trhd/meson,rhd/meson,aaronp24/meson,jeandet/meson,ernestask/meson,ernestask/meson,becm/meson,fmuellner/meson,aaronp24/meson,pexip/meson,wberrier/meson,mesonbuild/meson,aaronp24/meson,mesonbuild/meson,fmuellner/meson,mesonbuild/meson,jpakkane/meson,ernestask/meson,MathieuDuponchelle/meson,MathieuDuponchelle/meson,MathieuDuponchelle/meson,rhd/meson,pexip/meson,becm/meson,pexip/meson,mesonbuild/meson,becm/meson,trhd/meson,ernestask/meson,jpakkane/meson
markdown
## Code Before: --- title: Release 0.41 short-description: Release notes for 0.41 (preliminary) ... **Preliminary, 0.41.0 has not been released yet.** # New features Add features here as code is merged to master. ## Dependency Handler for LLVM Native support for linking against LLVM using the `dependency` function. ## vcs_tag keyword fallback is is now optional The `fallback` keyword in `vcs_tag` is now optional. If not given, its value defaults to the return value of `meson.project_version()`. ## Instruction: Add release note about ninja character escaping. ## Code After: --- title: Release 0.41 short-description: Release notes for 0.41 (preliminary) ... **Preliminary, 0.41.0 has not been released yet.** # New features Add features here as code is merged to master. ## Dependency Handler for LLVM Native support for linking against LLVM using the `dependency` function. ## vcs_tag keyword fallback is is now optional The `fallback` keyword in `vcs_tag` is now optional. If not given, its value defaults to the return value of `meson.project_version()`. ## Better quoting of special characters in ninja command invocations The ninja backend now quotes special characters that may be interpreted by ninja itself, providing better interoperability with custom commands. This support may not be perfect; please report any issues found with special characters to the issue tracker.
c3cefd70467cea18436dd9e69a627ca0a07fd7d3
scripts/travis-install.sh
scripts/travis-install.sh
if [ "$TRAVIS_PYTHON_VERSION" = "pypy3" ]; then git clone https://github.com/yyuu/pyenv.git ~/.pyenv; PYENV_ROOT="$HOME/.pyenv"; PATH="$PYENV_ROOT/bin:$PATH"; eval "$(pyenv init -)"; pypyversion="pypy3.5-5.7-beta"; pyenv install $pypyversion; pyenv global $pypyversion; python --version; pip --version; fi # The OS X VM doesn't have any Python support at all # See https://github.com/travis-ci/travis-ci/issues/2312 if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update brew install python3 virtualenv -p python3 $HOME/osx-py3 . $HOME/osx-py3/bin/activate fi
if [ "$TRAVIS_PYTHON_VERSION" = "pypy3" ]; then PYENV_ROOT="$HOME/.pyenv"; rm -rf "$PYENV_ROOT"; git clone https://github.com/yyuu/pyenv.git "$PYENV_ROOT"; PATH="$PYENV_ROOT/bin:$PATH"; eval "$(pyenv init -)"; pypyversion="pypy3.5-5.7-beta"; pyenv install $pypyversion; pyenv global $pypyversion; python --version; pip --version; fi # The OS X VM doesn't have any Python support at all # See https://github.com/travis-ci/travis-ci/issues/2312 if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update brew install python3 virtualenv -p python3 $HOME/osx-py3 . $HOME/osx-py3/bin/activate fi
Clear pyenv installation before installing pyenv
Clear pyenv installation before installing pyenv
Shell
mit
untitaker/vdirsyncer,untitaker/vdirsyncer,untitaker/vdirsyncer
shell
## Code Before: if [ "$TRAVIS_PYTHON_VERSION" = "pypy3" ]; then git clone https://github.com/yyuu/pyenv.git ~/.pyenv; PYENV_ROOT="$HOME/.pyenv"; PATH="$PYENV_ROOT/bin:$PATH"; eval "$(pyenv init -)"; pypyversion="pypy3.5-5.7-beta"; pyenv install $pypyversion; pyenv global $pypyversion; python --version; pip --version; fi # The OS X VM doesn't have any Python support at all # See https://github.com/travis-ci/travis-ci/issues/2312 if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update brew install python3 virtualenv -p python3 $HOME/osx-py3 . $HOME/osx-py3/bin/activate fi ## Instruction: Clear pyenv installation before installing pyenv ## Code After: if [ "$TRAVIS_PYTHON_VERSION" = "pypy3" ]; then PYENV_ROOT="$HOME/.pyenv"; rm -rf "$PYENV_ROOT"; git clone https://github.com/yyuu/pyenv.git "$PYENV_ROOT"; PATH="$PYENV_ROOT/bin:$PATH"; eval "$(pyenv init -)"; pypyversion="pypy3.5-5.7-beta"; pyenv install $pypyversion; pyenv global $pypyversion; python --version; pip --version; fi # The OS X VM doesn't have any Python support at all # See https://github.com/travis-ci/travis-ci/issues/2312 if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update brew install python3 virtualenv -p python3 $HOME/osx-py3 . $HOME/osx-py3/bin/activate fi
4802f41e8d012781c5b21f8fef43007c6b529e5e
Magic/src/main/java/com/elmakers/mine/bukkit/action/CheckAction.java
Magic/src/main/java/com/elmakers/mine/bukkit/action/CheckAction.java
package com.elmakers.mine.bukkit.action; import com.elmakers.mine.bukkit.api.action.ActionHandler; import com.elmakers.mine.bukkit.api.action.CastContext; import com.elmakers.mine.bukkit.api.spell.SpellResult; public abstract class CheckAction extends CompoundAction { protected abstract boolean isAllowed(CastContext context); @Override public SpellResult step(CastContext context) { boolean allowed = isAllowed(context); ActionHandler actions = getHandler("actions"); if (actions == null || actions.size() == 0) { return allowed ? SpellResult.CAST : SpellResult.STOP; } if (!allowed) { return SpellResult.NO_TARGET; } return startActions(); } }
package com.elmakers.mine.bukkit.action; import org.bukkit.configuration.ConfigurationSection; import com.elmakers.mine.bukkit.api.action.ActionHandler; import com.elmakers.mine.bukkit.api.action.CastContext; import com.elmakers.mine.bukkit.api.spell.Spell; import com.elmakers.mine.bukkit.api.spell.SpellResult; public abstract class CheckAction extends CompoundAction { protected abstract boolean isAllowed(CastContext context); @Override protected void addHandlers(Spell spell, ConfigurationSection parameters) { addHandler(spell, "actions"); addHandler(spell, "fail"); } @Override public SpellResult step(CastContext context) { boolean allowed = isAllowed(context); if (!allowed) { ActionHandler fail = getHandler("fail"); if (fail != null && fail.size() != 0) { return startActions("fail"); } } ActionHandler actions = getHandler("actions"); if (actions == null || actions.size() == 0) { return allowed ? SpellResult.CAST : SpellResult.STOP; } if (!allowed) { return SpellResult.NO_TARGET; } return startActions(); } }
Add optional "fail" action handler to Check actions
Add optional "fail" action handler to Check actions
Java
mit
elBukkit/MagicPlugin,elBukkit/MagicPlugin,elBukkit/MagicPlugin
java
## Code Before: package com.elmakers.mine.bukkit.action; import com.elmakers.mine.bukkit.api.action.ActionHandler; import com.elmakers.mine.bukkit.api.action.CastContext; import com.elmakers.mine.bukkit.api.spell.SpellResult; public abstract class CheckAction extends CompoundAction { protected abstract boolean isAllowed(CastContext context); @Override public SpellResult step(CastContext context) { boolean allowed = isAllowed(context); ActionHandler actions = getHandler("actions"); if (actions == null || actions.size() == 0) { return allowed ? SpellResult.CAST : SpellResult.STOP; } if (!allowed) { return SpellResult.NO_TARGET; } return startActions(); } } ## Instruction: Add optional "fail" action handler to Check actions ## Code After: package com.elmakers.mine.bukkit.action; import org.bukkit.configuration.ConfigurationSection; import com.elmakers.mine.bukkit.api.action.ActionHandler; import com.elmakers.mine.bukkit.api.action.CastContext; import com.elmakers.mine.bukkit.api.spell.Spell; import com.elmakers.mine.bukkit.api.spell.SpellResult; public abstract class CheckAction extends CompoundAction { protected abstract boolean isAllowed(CastContext context); @Override protected void addHandlers(Spell spell, ConfigurationSection parameters) { addHandler(spell, "actions"); addHandler(spell, "fail"); } @Override public SpellResult step(CastContext context) { boolean allowed = isAllowed(context); if (!allowed) { ActionHandler fail = getHandler("fail"); if (fail != null && fail.size() != 0) { return startActions("fail"); } } ActionHandler actions = getHandler("actions"); if (actions == null || actions.size() == 0) { return allowed ? SpellResult.CAST : SpellResult.STOP; } if (!allowed) { return SpellResult.NO_TARGET; } return startActions(); } }
acf9089c6be0d3388ba5922e0136e4bc1b46592a
lib/jasmine-phantom/tasks.rake
lib/jasmine-phantom/tasks.rake
namespace :jasmine do namespace :phantom do desc "Run jasmine specs using phantomjs and report the results" task :ci => "jasmine:require" do jasmine_config_overrides = File.join(Jasmine::Config.new.project_root, 'spec', 'javascripts' ,'support' ,'jasmine_config.rb') require jasmine_config_overrides if File.exist?(jasmine_config_overrides) config = Jasmine::Config.new config.start_jasmine_server # omg config.jasmine_port finds a new unused port every time! port = config.instance_variable_get :@jasmine_server_port script = File.join File.dirname(__FILE__), 'run-jasmine.js' sh "phantomjs #{script} http://localhost:#{port}" end end end
namespace :jasmine do namespace :phantom do desc "Run jasmine specs using phantomjs and report the results" task :ci => "jasmine:require" do jasmine_config_overrides = File.join(Jasmine::Config.new.project_root, 'spec', 'javascripts' ,'support' ,'jasmine_config.rb') require jasmine_config_overrides if File.exist?(jasmine_config_overrides) config = Jasmine::Config.new config.start_jasmine_server # omg config.jasmine_port finds a new unused port every time! port = config.instance_variable_get :@jasmine_server_port script = File.join File.dirname(__FILE__), 'run-jasmine.js' pid = Process.spawn "phantomjs #{script} http://localhost:#{port}" _, status = Process.waitpid2 pid exit(1) unless status.success? end end end
Use Process.spawn instead of sh
Use Process.spawn instead of sh
Ruby
mit
flipstone/jasmine-phantom,flipstone/jasmine-phantom
ruby
## Code Before: namespace :jasmine do namespace :phantom do desc "Run jasmine specs using phantomjs and report the results" task :ci => "jasmine:require" do jasmine_config_overrides = File.join(Jasmine::Config.new.project_root, 'spec', 'javascripts' ,'support' ,'jasmine_config.rb') require jasmine_config_overrides if File.exist?(jasmine_config_overrides) config = Jasmine::Config.new config.start_jasmine_server # omg config.jasmine_port finds a new unused port every time! port = config.instance_variable_get :@jasmine_server_port script = File.join File.dirname(__FILE__), 'run-jasmine.js' sh "phantomjs #{script} http://localhost:#{port}" end end end ## Instruction: Use Process.spawn instead of sh ## Code After: namespace :jasmine do namespace :phantom do desc "Run jasmine specs using phantomjs and report the results" task :ci => "jasmine:require" do jasmine_config_overrides = File.join(Jasmine::Config.new.project_root, 'spec', 'javascripts' ,'support' ,'jasmine_config.rb') require jasmine_config_overrides if File.exist?(jasmine_config_overrides) config = Jasmine::Config.new config.start_jasmine_server # omg config.jasmine_port finds a new unused port every time! port = config.instance_variable_get :@jasmine_server_port script = File.join File.dirname(__FILE__), 'run-jasmine.js' pid = Process.spawn "phantomjs #{script} http://localhost:#{port}" _, status = Process.waitpid2 pid exit(1) unless status.success? end end end
82e93be80cbfae1257b0ba80adfce6bb31f36b18
prow/cluster/build_deployment.yaml
prow/cluster/build_deployment.yaml
kind: Deployment apiVersion: apps/v1 metadata: name: prow-build namespace: default spec: replicas: 1 strategy: type: Recreate # replace, do not scale up selector: matchLabels: app: prow-build template: metadata: labels: app: prow-build spec: serviceAccount: prow-build # build_rbac.yaml containers: - name: build image: gcr.io/k8s-prow/build:v20181218-8eb6f41
kind: Deployment apiVersion: apps/v1 metadata: name: prow-build namespace: default spec: replicas: 1 strategy: type: Recreate # replace, do not scale up selector: matchLabels: app: prow-build template: metadata: labels: app: prow-build spec: serviceAccount: prow-build # build_rbac.yaml containers: - name: build image: gcr.io/k8s-prow/build:v20181218-8eb6f41 args: - --all-contexts - --tot-url=http://tot - --config=/etc/prow-config/config.yaml - --build-cluster=/etc/build-cluster/cluster volumeMounts: - mountPath: /etc/build-cluster name: build-cluster readOnly: true - mountPath: /etc/prow-config name: prow-config readOnly: true volumes: - name: build-cluster secret: defaultMode: 420 secretName: build-cluster - name: prow-config configMap: name: config
Configure build controller to manage external clusters
Configure build controller to manage external clusters
YAML
apache-2.0
cblecker/test-infra,michelle192837/test-infra,kubernetes/test-infra,BenTheElder/test-infra,dims/test-infra,jlowdermilk/test-infra,monopole/test-infra,brahmaroutu/test-infra,dims/test-infra,cjwagner/test-infra,pwittrock/test-infra,brahmaroutu/test-infra,cblecker/test-infra,michelle192837/test-infra,ixdy/kubernetes-test-infra,brahmaroutu/test-infra,pwittrock/test-infra,fejta/test-infra,lavalamp/test-infra,fejta/test-infra,kubernetes/test-infra,jessfraz/test-infra,monopole/test-infra,shyamjvs/test-infra,jessfraz/test-infra,cblecker/test-infra,cjwagner/test-infra,fejta/test-infra,lavalamp/test-infra,BenTheElder/test-infra,michelle192837/test-infra,BenTheElder/test-infra,krzyzacy/test-infra,ixdy/kubernetes-test-infra,fejta/test-infra,krzyzacy/test-infra,krzyzacy/test-infra,monopole/test-infra,jessfraz/test-infra,krzyzacy/test-infra,shyamjvs/test-infra,BenTheElder/test-infra,fejta/test-infra,shyamjvs/test-infra,monopole/test-infra,jlowdermilk/test-infra,shyamjvs/test-infra,brahmaroutu/test-infra,ixdy/kubernetes-test-infra,cblecker/test-infra,michelle192837/test-infra,jlowdermilk/test-infra,shyamjvs/test-infra,monopole/test-infra,pwittrock/test-infra,cjwagner/test-infra,lavalamp/test-infra,fejta/test-infra,michelle192837/test-infra,jessfraz/test-infra,BenTheElder/test-infra,dims/test-infra,cjwagner/test-infra,jlowdermilk/test-infra,cjwagner/test-infra,kubernetes/test-infra,cblecker/test-infra,jlowdermilk/test-infra,ixdy/kubernetes-test-infra,ixdy/kubernetes-test-infra,shyamjvs/test-infra,brahmaroutu/test-infra,cjwagner/test-infra,jlowdermilk/test-infra,lavalamp/test-infra,krzyzacy/test-infra,lavalamp/test-infra,jessfraz/test-infra,kubernetes/test-infra,jessfraz/test-infra,pwittrock/test-infra,pwittrock/test-infra,dims/test-infra,monopole/test-infra,krzyzacy/test-infra,michelle192837/test-infra,BenTheElder/test-infra,cblecker/test-infra,dims/test-infra,kubernetes/test-infra,dims/test-infra,kubernetes/test-infra,brahmaroutu/test-infra,lavalamp/test-infra
yaml
## Code Before: kind: Deployment apiVersion: apps/v1 metadata: name: prow-build namespace: default spec: replicas: 1 strategy: type: Recreate # replace, do not scale up selector: matchLabels: app: prow-build template: metadata: labels: app: prow-build spec: serviceAccount: prow-build # build_rbac.yaml containers: - name: build image: gcr.io/k8s-prow/build:v20181218-8eb6f41 ## Instruction: Configure build controller to manage external clusters ## Code After: kind: Deployment apiVersion: apps/v1 metadata: name: prow-build namespace: default spec: replicas: 1 strategy: type: Recreate # replace, do not scale up selector: matchLabels: app: prow-build template: metadata: labels: app: prow-build spec: serviceAccount: prow-build # build_rbac.yaml containers: - name: build image: gcr.io/k8s-prow/build:v20181218-8eb6f41 args: - --all-contexts - --tot-url=http://tot - --config=/etc/prow-config/config.yaml - --build-cluster=/etc/build-cluster/cluster volumeMounts: - mountPath: /etc/build-cluster name: build-cluster readOnly: true - mountPath: /etc/prow-config name: prow-config readOnly: true volumes: - name: build-cluster secret: defaultMode: 420 secretName: build-cluster - name: prow-config configMap: name: config
87b69a799940155ca671bfa7b072647a9e2c93e2
packages/ne/network-messagepack-rpc.yaml
packages/ne/network-messagepack-rpc.yaml
homepage: https://github.com/iij-ii/direct-hs/tree/master/network-messagepack-rpc changelog-type: '' hash: cec2e03283bde56695fb88ff96099e479a5866be42854b408f513eab64bd730f test-bench-deps: {} maintainer: [email protected], [email protected] synopsis: MessagePack RPC changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any safe-exceptions: -any data-msgpack: -any all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.1.1 - 0.1.1.2 - 0.1.1.4 author: Yuji Yamamoto and Kazu Yamamoto latest: 0.1.1.4 description-type: haddock description: ! '[MessagePack RPC](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md) library based on the "data-msgpack" package.' license-name: BSD-3-Clause
homepage: https://github.com/iij-ii/direct-hs/tree/master/network-messagepack-rpc changelog-type: '' hash: cec2e03283bde56695fb88ff96099e479a5866be42854b408f513eab64bd730f test-bench-deps: {} maintainer: [email protected], [email protected] synopsis: MessagePack RPC changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any safe-exceptions: -any data-msgpack: -any all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.1.1 - 0.1.1.4 author: Yuji Yamamoto and Kazu Yamamoto latest: 0.1.1.4 description-type: haddock description: ! '[MessagePack RPC](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md) library based on the "data-msgpack" package.' license-name: BSD-3-Clause
Update from Hackage at 2019-09-24T09:41:52Z
Update from Hackage at 2019-09-24T09:41:52Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/iij-ii/direct-hs/tree/master/network-messagepack-rpc changelog-type: '' hash: cec2e03283bde56695fb88ff96099e479a5866be42854b408f513eab64bd730f test-bench-deps: {} maintainer: [email protected], [email protected] synopsis: MessagePack RPC changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any safe-exceptions: -any data-msgpack: -any all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.1.1 - 0.1.1.2 - 0.1.1.4 author: Yuji Yamamoto and Kazu Yamamoto latest: 0.1.1.4 description-type: haddock description: ! '[MessagePack RPC](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md) library based on the "data-msgpack" package.' license-name: BSD-3-Clause ## Instruction: Update from Hackage at 2019-09-24T09:41:52Z ## Code After: homepage: https://github.com/iij-ii/direct-hs/tree/master/network-messagepack-rpc changelog-type: '' hash: cec2e03283bde56695fb88ff96099e479a5866be42854b408f513eab64bd730f test-bench-deps: {} maintainer: [email protected], [email protected] synopsis: MessagePack RPC changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any safe-exceptions: -any data-msgpack: -any all-versions: - 0.1.0.0 - 0.1.1.0 - 0.1.1.1 - 0.1.1.4 author: Yuji Yamamoto and Kazu Yamamoto latest: 0.1.1.4 description-type: haddock description: ! '[MessagePack RPC](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md) library based on the "data-msgpack" package.' license-name: BSD-3-Clause
0c7f235a5a7c443a7afa079e63cea8d79089dd00
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.5) project(genkfs C) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Werror") if (NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RELEASE) endif() if(EMSCRIPTEN) set(CMAKE_EXE_LINKER_FLAGS "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js -s EXPORTED_FUNCTIONS=\"['_main', '_emscripten_main']\"") set(CMAKE_C_FLAGS "-O3") endif() add_executable(genkfs main.c) install(TARGETS genkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) ADD_CUSTOM_TARGET(man ALL) ADD_CUSTOM_COMMAND( TARGET man COMMAND a2x --no-xmllint --doctype manpage --format manpage ${CMAKE_CURRENT_SOURCE_DIR}/genkfs.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 ) if (NOT DEFINED CMAKE_INSTALL_MANDIR) set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man) endif() INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
cmake_minimum_required(VERSION 2.8.5) project(genkfs C) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99 -D_POSIX_C_SOURCE=200809 -D_BSD_SOURCE -D_DEFAULT_SOURCE") if (NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RELEASE) endif() if(EMSCRIPTEN) set(CMAKE_EXE_LINKER_FLAGS "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js -s EXPORTED_FUNCTIONS=\"['_main', '_emscripten_main']\"") set(CMAKE_C_FLAGS "-O3") endif() add_executable(genkfs main.c) install(TARGETS genkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) ADD_CUSTOM_TARGET(man ALL) ADD_CUSTOM_COMMAND( TARGET man COMMAND a2x --no-xmllint --doctype manpage --format manpage ${CMAKE_CURRENT_SOURCE_DIR}/genkfs.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 ) if (NOT DEFINED CMAKE_INSTALL_MANDIR) set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man) endif() INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )
Use BSD_SOURCE for now... (and remove Werror)
Use BSD_SOURCE for now... (and remove Werror)
Text
mit
KnightOS/genkfs,KnightOS/genkfs
text
## Code Before: cmake_minimum_required(VERSION 2.8.5) project(genkfs C) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Werror") if (NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RELEASE) endif() if(EMSCRIPTEN) set(CMAKE_EXE_LINKER_FLAGS "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js -s EXPORTED_FUNCTIONS=\"['_main', '_emscripten_main']\"") set(CMAKE_C_FLAGS "-O3") endif() add_executable(genkfs main.c) install(TARGETS genkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) ADD_CUSTOM_TARGET(man ALL) ADD_CUSTOM_COMMAND( TARGET man COMMAND a2x --no-xmllint --doctype manpage --format manpage ${CMAKE_CURRENT_SOURCE_DIR}/genkfs.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 ) if (NOT DEFINED CMAKE_INSTALL_MANDIR) set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man) endif() INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) ## Instruction: Use BSD_SOURCE for now... (and remove Werror) ## Code After: cmake_minimum_required(VERSION 2.8.5) project(genkfs C) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99 -D_POSIX_C_SOURCE=200809 -D_BSD_SOURCE -D_DEFAULT_SOURCE") if (NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RELEASE) endif() if(EMSCRIPTEN) set(CMAKE_EXE_LINKER_FLAGS "--pre-js ${CMAKE_CURRENT_SOURCE_DIR}/module.js -s EXPORTED_FUNCTIONS=\"['_main', '_emscripten_main']\"") set(CMAKE_C_FLAGS "-O3") endif() add_executable(genkfs main.c) install(TARGETS genkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) ADD_CUSTOM_TARGET(man ALL) ADD_CUSTOM_COMMAND( TARGET man COMMAND a2x --no-xmllint --doctype manpage --format manpage ${CMAKE_CURRENT_SOURCE_DIR}/genkfs.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 ) if (NOT DEFINED CMAKE_INSTALL_MANDIR) set(CMAKE_INSTALL_MANDIR ${CMAKE_INSTALL_PREFIX}/share/man) endif() INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/genkfs.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 )