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
129d1b98512f60d38b3e3939d97d60b357fe7eeb
pkgs/tools/networking/modemmanager/default.nix
pkgs/tools/networking/modemmanager/default.nix
{ stdenv, fetchurl, udev, polkit, dbus_glib, ppp, intltool, pkgconfig, libmbim, libqmi }: stdenv.mkDerivation rec { name = "ModemManager-0.7.991"; src = fetchurl { url = "mirror://gnome/sources/ModemManager/0.7/${name}.tar.xz"; sha256 = "0p8shqsbgnsazim7s52ylxjk064cbx2n1vm1jgywr7i58hsd6n4y"; }; nativeBuildInputs = [ intltool pkgconfig ]; buildInputs = [ udev polkit dbus_glib ppp libmbim libqmi ]; configureFlags = [ "--with-polkit" "--with-udev-base-dir=$(out)/lib/udev" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; meta = { description = "WWAN modem manager, part of NetworkManager"; maintainers = [ stdenv.lib.maintainers.urkud ]; platforms = stdenv.lib.platforms.linux; }; }
{ stdenv, fetchurl, udev, polkit, dbus_glib, ppp, intltool, pkgconfig, libmbim, libqmi }: stdenv.mkDerivation rec { name = "ModemManager-${version}"; version = "1.2.0"; src = fetchurl { url = "http://www.freedesktop.org/software/ModemManager/${name}.tar.xz"; sha256 = "1g08ciyhys9bi5m45z30kln17zni4r07i5byjaglmwq6np1xincb"; }; nativeBuildInputs = [ intltool pkgconfig ]; buildInputs = [ udev polkit dbus_glib ppp libmbim libqmi ]; configureFlags = [ "--with-polkit" "--with-udev-base-dir=$(out)/lib/udev" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; postInstall = '' # systemd in NixOS doesn't use `systemctl enable`, so we need to establish # aliases ourselves. ln -s $out/etc/systemd/system/ModemManager.service \ $out/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service ''; meta = { description = "WWAN modem manager, part of NetworkManager"; maintainers = [ stdenv.lib.maintainers.urkud ]; platforms = stdenv.lib.platforms.linux; }; }
Update from 0.7.991 to 1.2.0
modemmanager: Update from 0.7.991 to 1.2.0
Nix
mit
NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs
nix
## Code Before: { stdenv, fetchurl, udev, polkit, dbus_glib, ppp, intltool, pkgconfig, libmbim, libqmi }: stdenv.mkDerivation rec { name = "ModemManager-0.7.991"; src = fetchurl { url = "mirror://gnome/sources/ModemManager/0.7/${name}.tar.xz"; sha256 = "0p8shqsbgnsazim7s52ylxjk064cbx2n1vm1jgywr7i58hsd6n4y"; }; nativeBuildInputs = [ intltool pkgconfig ]; buildInputs = [ udev polkit dbus_glib ppp libmbim libqmi ]; configureFlags = [ "--with-polkit" "--with-udev-base-dir=$(out)/lib/udev" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; meta = { description = "WWAN modem manager, part of NetworkManager"; maintainers = [ stdenv.lib.maintainers.urkud ]; platforms = stdenv.lib.platforms.linux; }; } ## Instruction: modemmanager: Update from 0.7.991 to 1.2.0 ## Code After: { stdenv, fetchurl, udev, polkit, dbus_glib, ppp, intltool, pkgconfig, libmbim, libqmi }: stdenv.mkDerivation rec { name = "ModemManager-${version}"; version = "1.2.0"; src = fetchurl { url = "http://www.freedesktop.org/software/ModemManager/${name}.tar.xz"; sha256 = "1g08ciyhys9bi5m45z30kln17zni4r07i5byjaglmwq6np1xincb"; }; nativeBuildInputs = [ intltool pkgconfig ]; buildInputs = [ udev polkit dbus_glib ppp libmbim libqmi ]; configureFlags = [ "--with-polkit" "--with-udev-base-dir=$(out)/lib/udev" "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; postInstall = '' # systemd in NixOS doesn't use `systemctl enable`, so we need to establish # aliases ourselves. ln -s $out/etc/systemd/system/ModemManager.service \ $out/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service ''; meta = { description = "WWAN modem manager, part of NetworkManager"; maintainers = [ stdenv.lib.maintainers.urkud ]; platforms = stdenv.lib.platforms.linux; }; }
4819632628caa9972ab6f621a26398778cdd355a
test/test_helper.rb
test/test_helper.rb
require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'simplecov' SimpleCov.start do add_filter "/test/" add_group 'SidekiqCron', 'lib/' end require "minitest/autorun" require 'shoulda-context' require 'turn' #SIDEKIQ Require - need to have sidekiq running! require 'sidekiq' require 'sidekiq/util' Sidekiq.logger.level = Logger::ERROR require 'sidekiq/redis_connection' redis_url = ENV['REDIS_URL'] || 'redis://localhost/15' REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'testy') Sidekiq.configure_client do |config| config.redis = { :url => redis_url, :namespace => 'testy' } end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'sidekiq-cron' class Test::Unit::TestCase end
require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'simplecov' SimpleCov.start do add_filter "/test/" add_group 'SidekiqCron', 'lib/' end require "minitest/autorun" require 'shoulda-context' require 'turn' #SIDEKIQ Require - need to have sidekiq running! require 'celluloid/autostart' require 'sidekiq' require 'sidekiq/util' Sidekiq.logger.level = Logger::ERROR require 'sidekiq/redis_connection' redis_url = ENV['REDIS_URL'] || 'redis://localhost/15' REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'testy') Sidekiq.configure_client do |config| config.redis = { :url => redis_url, :namespace => 'testy' } end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'sidekiq-cron' class Test::Unit::TestCase end
Test start - sidekiq needs require of celluloid
[FIX] Test start - sidekiq needs require of celluloid
Ruby
mit
Eunix/sidekiq-cron,farainc/sidekiq-cron,farainc/sidekiq-cron,ondrejbartas/sidekiq-cron,nhoffmann/sidekiq-cron,davidtrogers/sidekiq-cron,nhoffmann/sidekiq-cron,Eunix/sidekiq-cron,ondrejbartas/sidekiq-cron,davidtrogers/sidekiq-cron,nikolai-b/sidekiq-cron,nikolai-b/sidekiq-cron
ruby
## Code Before: require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'simplecov' SimpleCov.start do add_filter "/test/" add_group 'SidekiqCron', 'lib/' end require "minitest/autorun" require 'shoulda-context' require 'turn' #SIDEKIQ Require - need to have sidekiq running! require 'sidekiq' require 'sidekiq/util' Sidekiq.logger.level = Logger::ERROR require 'sidekiq/redis_connection' redis_url = ENV['REDIS_URL'] || 'redis://localhost/15' REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'testy') Sidekiq.configure_client do |config| config.redis = { :url => redis_url, :namespace => 'testy' } end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'sidekiq-cron' class Test::Unit::TestCase end ## Instruction: [FIX] Test start - sidekiq needs require of celluloid ## Code After: require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'simplecov' SimpleCov.start do add_filter "/test/" add_group 'SidekiqCron', 'lib/' end require "minitest/autorun" require 'shoulda-context' require 'turn' #SIDEKIQ Require - need to have sidekiq running! require 'celluloid/autostart' require 'sidekiq' require 'sidekiq/util' Sidekiq.logger.level = Logger::ERROR require 'sidekiq/redis_connection' redis_url = ENV['REDIS_URL'] || 'redis://localhost/15' REDIS = Sidekiq::RedisConnection.create(:url => redis_url, :namespace => 'testy') Sidekiq.configure_client do |config| config.redis = { :url => redis_url, :namespace => 'testy' } end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'sidekiq-cron' class Test::Unit::TestCase end
189e5288928ad40192bd1594351746ea5ae7db7f
src/main/java/name/matco/simcity/api/ObjectMapperResolver.java
src/main/java/name/matco/simcity/api/ObjectMapperResolver.java
package name.matco.simcity.api; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @Provider public class ObjectMapperResolver implements ContextResolver<ObjectMapper> { private final ObjectMapper mapper; public ObjectMapperResolver() { mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); } @Override public ObjectMapper getContext(final Class<?> type) { return mapper; } }
package name.matco.simcity.api; import java.io.IOException; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.util.DefaultIndenter; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.jaxrs.cfg.EndpointConfigBase; import com.fasterxml.jackson.jaxrs.cfg.ObjectWriterInjector; import com.fasterxml.jackson.jaxrs.cfg.ObjectWriterModifier; @Provider public class ObjectMapperResolver implements ContextResolver<ObjectMapper> { private final ObjectMapper mapper; public ObjectMapperResolver() { mapper = new ObjectMapper(); ObjectWriterInjector.set(new ObjectWriterModifier() { @Override public ObjectWriter modify(final EndpointConfigBase<?> endpoint, final MultivaluedMap<String, Object> responseHeaders, final Object valueToWrite, final ObjectWriter w, final JsonGenerator g) throws IOException { final DefaultPrettyPrinter pp = new DefaultPrettyPrinter(); pp.indentObjectsWith(new DefaultIndenter("\t", "\n")); g.setPrettyPrinter(pp); return w; } }); } @Override public ObjectMapper getContext(final Class<?> type) { return mapper; } }
Improve indentation of JSON content from REST API
Improve indentation of JSON content from REST API
Java
unlicense
matco/simcity,matco/simcity,matco/simcity
java
## Code Before: package name.matco.simcity.api; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @Provider public class ObjectMapperResolver implements ContextResolver<ObjectMapper> { private final ObjectMapper mapper; public ObjectMapperResolver() { mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); } @Override public ObjectMapper getContext(final Class<?> type) { return mapper; } } ## Instruction: Improve indentation of JSON content from REST API ## Code After: package name.matco.simcity.api; import java.io.IOException; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.util.DefaultIndenter; import com.fasterxml.jackson.core.util.DefaultPrettyPrinter; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import com.fasterxml.jackson.jaxrs.cfg.EndpointConfigBase; import com.fasterxml.jackson.jaxrs.cfg.ObjectWriterInjector; import com.fasterxml.jackson.jaxrs.cfg.ObjectWriterModifier; @Provider public class ObjectMapperResolver implements ContextResolver<ObjectMapper> { private final ObjectMapper mapper; public ObjectMapperResolver() { mapper = new ObjectMapper(); ObjectWriterInjector.set(new ObjectWriterModifier() { @Override public ObjectWriter modify(final EndpointConfigBase<?> endpoint, final MultivaluedMap<String, Object> responseHeaders, final Object valueToWrite, final ObjectWriter w, final JsonGenerator g) throws IOException { final DefaultPrettyPrinter pp = new DefaultPrettyPrinter(); pp.indentObjectsWith(new DefaultIndenter("\t", "\n")); g.setPrettyPrinter(pp); return w; } }); } @Override public ObjectMapper getContext(final Class<?> type) { return mapper; } }
3207e863f2e683f84b993bf914ad1414b272f1e1
src/tests/core/CMakeLists.txt
src/tests/core/CMakeLists.txt
SET(TESTS test_CH_function_recorder test_AVX ) MESSAGE(STATUS "Additional test programs for Chrono core...") FOREACH(PROGRAM ${TESTS}) MESSAGE(STATUS "...add ${PROGRAM}") ADD_EXECUTABLE(${PROGRAM} "${PROGRAM}.cpp") SOURCE_GROUP("" FILES "${PROGRAM}.cpp") SET_TARGET_PROPERTIES(${PROGRAM} PROPERTIES FOLDER tests COMPILE_FLAGS "${CH_CXX_FLAGS}" LINK_FLAGS "${CH_LINKERFLAG_EXE}" ) TARGET_LINK_LIBRARIES(${PROGRAM} ChronoEngine) INSTALL(TARGETS ${PROGRAM} DESTINATION bin) ENDFOREACH(PROGRAM)
SET(TESTS test_CH_function_recorder ) if(AVX_FOUND) set(TESTS ${TESTS} test_AVX ) endif() MESSAGE(STATUS "Additional test programs for Chrono core...") FOREACH(PROGRAM ${TESTS}) MESSAGE(STATUS "...add ${PROGRAM}") ADD_EXECUTABLE(${PROGRAM} "${PROGRAM}.cpp") SOURCE_GROUP("" FILES "${PROGRAM}.cpp") SET_TARGET_PROPERTIES(${PROGRAM} PROPERTIES FOLDER tests COMPILE_FLAGS "${CH_CXX_FLAGS}" LINK_FLAGS "${CH_LINKERFLAG_EXE}" ) TARGET_LINK_LIBRARIES(${PROGRAM} ChronoEngine) INSTALL(TARGETS ${PROGRAM} DESTINATION bin) ENDFOREACH(PROGRAM)
Build test_AVX only if AVX support is available
Build test_AVX only if AVX support is available
Text
bsd-3-clause
Milad-Rakhsha/chrono,dariomangoni/chrono,andrewseidl/chrono,tjolsen/chrono,amelmquist/chrono,amelmquist/chrono,Milad-Rakhsha/chrono,rserban/chrono,jcmadsen/chrono,projectchrono/chrono,tjolsen/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,jcmadsen/chrono,armanpazouki/chrono,jcmadsen/chrono,rserban/chrono,amelmquist/chrono,Milad-Rakhsha/chrono,rserban/chrono,amelmquist/chrono,jcmadsen/chrono,dariomangoni/chrono,rserban/chrono,amelmquist/chrono,rserban/chrono,dariomangoni/chrono,jcmadsen/chrono,armanpazouki/chrono,rserban/chrono,andrewseidl/chrono,rserban/chrono,Milad-Rakhsha/chrono,tjolsen/chrono,projectchrono/chrono,projectchrono/chrono,andrewseidl/chrono,andrewseidl/chrono,armanpazouki/chrono,dariomangoni/chrono,jcmadsen/chrono,tjolsen/chrono,dariomangoni/chrono,tjolsen/chrono,projectchrono/chrono,andrewseidl/chrono,projectchrono/chrono,armanpazouki/chrono,projectchrono/chrono,amelmquist/chrono,armanpazouki/chrono,armanpazouki/chrono,Milad-Rakhsha/chrono,jcmadsen/chrono
text
## Code Before: SET(TESTS test_CH_function_recorder test_AVX ) MESSAGE(STATUS "Additional test programs for Chrono core...") FOREACH(PROGRAM ${TESTS}) MESSAGE(STATUS "...add ${PROGRAM}") ADD_EXECUTABLE(${PROGRAM} "${PROGRAM}.cpp") SOURCE_GROUP("" FILES "${PROGRAM}.cpp") SET_TARGET_PROPERTIES(${PROGRAM} PROPERTIES FOLDER tests COMPILE_FLAGS "${CH_CXX_FLAGS}" LINK_FLAGS "${CH_LINKERFLAG_EXE}" ) TARGET_LINK_LIBRARIES(${PROGRAM} ChronoEngine) INSTALL(TARGETS ${PROGRAM} DESTINATION bin) ENDFOREACH(PROGRAM) ## Instruction: Build test_AVX only if AVX support is available ## Code After: SET(TESTS test_CH_function_recorder ) if(AVX_FOUND) set(TESTS ${TESTS} test_AVX ) endif() MESSAGE(STATUS "Additional test programs for Chrono core...") FOREACH(PROGRAM ${TESTS}) MESSAGE(STATUS "...add ${PROGRAM}") ADD_EXECUTABLE(${PROGRAM} "${PROGRAM}.cpp") SOURCE_GROUP("" FILES "${PROGRAM}.cpp") SET_TARGET_PROPERTIES(${PROGRAM} PROPERTIES FOLDER tests COMPILE_FLAGS "${CH_CXX_FLAGS}" LINK_FLAGS "${CH_LINKERFLAG_EXE}" ) TARGET_LINK_LIBRARIES(${PROGRAM} ChronoEngine) INSTALL(TARGETS ${PROGRAM} DESTINATION bin) ENDFOREACH(PROGRAM)
9f2a71a4f815bb206d3a3e3cea243ed49bf7d200
knexfile.js
knexfile.js
const databaseName = 'transcriptus' const pathToDatabase = `${__dirname}/database` module.exports = { development: { client: 'pg', connection: "postgres://kudakwashe:admin@localhost:5432/transcriptus", migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, test: { client: 'pg', connection: "postgres://kudakwashe:admin@localhost:5432/transcriptus_test", migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, production: { client: 'pg', connection: process.env.DATABASE_URL, migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } } }
const databaseName = 'transcriptus' const pathToDatabase = `${__dirname}/database` module.exports = { development: { client: 'pg', connection: "postgres://kudakwashe:admin@localhost:5432/transcriptus", migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, test: { client: 'pg', connection: process.env.TEST_DATABASE_URL, migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, production: { client: 'pg', connection: process.env.DATABASE_URL, migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } } }
Use the TEST_DATABASE_URL for the test database connections
Use the TEST_DATABASE_URL for the test database connections
JavaScript
mit
byteBridge/transcriptus-api
javascript
## Code Before: const databaseName = 'transcriptus' const pathToDatabase = `${__dirname}/database` module.exports = { development: { client: 'pg', connection: "postgres://kudakwashe:admin@localhost:5432/transcriptus", migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, test: { client: 'pg', connection: "postgres://kudakwashe:admin@localhost:5432/transcriptus_test", migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, production: { client: 'pg', connection: process.env.DATABASE_URL, migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } } } ## Instruction: Use the TEST_DATABASE_URL for the test database connections ## Code After: const databaseName = 'transcriptus' const pathToDatabase = `${__dirname}/database` module.exports = { development: { client: 'pg', connection: "postgres://kudakwashe:admin@localhost:5432/transcriptus", migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, test: { client: 'pg', connection: process.env.TEST_DATABASE_URL, migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } }, production: { client: 'pg', connection: process.env.DATABASE_URL, migrations: { directory: `${pathToDatabase}/migrations` }, seeds: { directory: `${pathToDatabase}/seeds` } } }
27872988ea81e0b4b0d23e0c464d50ff75854685
db/data_migration/20161206120331_remove_stats_dataset_relationship.rb
db/data_migration/20161206120331_remove_stats_dataset_relationship.rb
pub = Publication.find(392444) pub.statistical_data_sets.select! { |ds| ds.id != 14779 } pub.save!
pub = Publication.find(392444) data_set = StatisticalDataSet.find(14779) pub.statistical_data_sets.delete(data_set)
Remove relationship to stats data set
Remove relationship to stats data set This DfT publication has an association to a statistical data set from DCLG on a completely irrelevant subject. We're assuming this is not intended. The data set is also superseded so remove the relationship.
Ruby
mit
alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall
ruby
## Code Before: pub = Publication.find(392444) pub.statistical_data_sets.select! { |ds| ds.id != 14779 } pub.save! ## Instruction: Remove relationship to stats data set This DfT publication has an association to a statistical data set from DCLG on a completely irrelevant subject. We're assuming this is not intended. The data set is also superseded so remove the relationship. ## Code After: pub = Publication.find(392444) data_set = StatisticalDataSet.find(14779) pub.statistical_data_sets.delete(data_set)
0592ad0f68d6f2adce434ff7350373934677864a
cookbooks/PF_CIS_CentOS7_v1.1.0_level_2/recipes/default.rb
cookbooks/PF_CIS_CentOS7_v1.1.0_level_2/recipes/default.rb
case ENV['PF_LEVEL'] when '0' when '1' include_recipe "PF_CIS_CentOS7_v1.1.0::2_os_services" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall.rb" when '1c' include_recipe "PF_CIS_CentOS7_v1.1.0::2_os_services" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services_ns.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall_ns.rb" when '2' else Chef::Log.warn("Policy level #{ENV['PF_LEVEL']} is not supported at this time.") return end
include_recipe "PF_CIS_CentOS7_v1.1.0::2_os_services" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall.rb" return end
Tidy up the cookbook to use the new one level format.
Tidy up the cookbook to use the new one level format.
Ruby
mit
ConorLee/policy-factory
ruby
## Code Before: case ENV['PF_LEVEL'] when '0' when '1' include_recipe "PF_CIS_CentOS7_v1.1.0::2_os_services" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall.rb" when '1c' include_recipe "PF_CIS_CentOS7_v1.1.0::2_os_services" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services_ns.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall_ns.rb" when '2' else Chef::Log.warn("Policy level #{ENV['PF_LEVEL']} is not supported at this time.") return end ## Instruction: Tidy up the cookbook to use the new one level format. ## Code After: include_recipe "PF_CIS_CentOS7_v1.1.0::2_os_services" include_recipe "PF_CIS_CentOS7_v1.1.0::3_special_purpose_services.rb" include_recipe "PF_CIS_CentOS7_v1.1.0::4_network_config_and_firewall.rb" return end
049dd10b45d01f1e9b794342dad4335e84019745
app/services/facebook.js
app/services/facebook.js
'use strict'; const request = require('request-promise'); const config = require('../../config'); const scraper = require('./scraper'); module.exports = { getFirstMessagingEntry: (body) => { const val = body.object == 'page' && body.entry && Array.isArray(body.entry) && body.entry.length > 0 && body.entry[0] && body.entry[0].id == config.Facebook.pageId && body.entry[0].messaging && Array.isArray(body.entry[0].messaging) && body.entry[0].messaging.length > 0 && body.entry[0].messaging[0] ; return val || null; }, sendTextMessage: (sender, text) => { const url = text; const metadata = scraper(url); return metadata.metadata().then((meta) => { let messageData = { attachment: { type: 'template', payload: { template_type: 'generic', elements: [ { title: 'Test', image_url: meta.image, subtitle: 'test', buttons: [] } ] } } }; console.log(messageData); return request({ uri: 'https://graph.facebook.com/v2.6/me/messages', qs: {access_token: config.Facebook.pageToken}, method: 'POST', body: { recipient: {id: sender}, message: messageData, }, json: true }); }); } };
'use strict'; const request = require('request-promise'); const config = require('../../config'); const scraper = require('./scraper'); module.exports = { getFirstMessagingEntry: (body) => { const val = body.object == 'page' && body.entry && Array.isArray(body.entry) && body.entry.length > 0 && body.entry[0] && body.entry[0].id == config.Facebook.pageId && body.entry[0].messaging && Array.isArray(body.entry[0].messaging) && body.entry[0].messaging.length > 0 && body.entry[0].messaging[0] ; return val || null; }, sendTextMessage: (sender, text) => { const url = text; const metadata = scraper(url); return metadata.metadata().then((meta) => { let messageData = { attachment: { type: 'template', payload: { template_type: 'generic', elements: [ { title: 'Test', image_url: meta.image, subtitle: 'test', buttons: [{ type: 'web_url', url: url, title: 'Click here' }] } ] } } }; console.log(messageData); return request({ uri: 'https://graph.facebook.com/v2.6/me/messages', qs: {access_token: config.Facebook.pageToken}, method: 'POST', body: { recipient: {id: sender}, message: messageData, }, json: true }); }); } };
Add button to the template
Add button to the template
JavaScript
mit
Keeprcom/keepr-bot
javascript
## Code Before: 'use strict'; const request = require('request-promise'); const config = require('../../config'); const scraper = require('./scraper'); module.exports = { getFirstMessagingEntry: (body) => { const val = body.object == 'page' && body.entry && Array.isArray(body.entry) && body.entry.length > 0 && body.entry[0] && body.entry[0].id == config.Facebook.pageId && body.entry[0].messaging && Array.isArray(body.entry[0].messaging) && body.entry[0].messaging.length > 0 && body.entry[0].messaging[0] ; return val || null; }, sendTextMessage: (sender, text) => { const url = text; const metadata = scraper(url); return metadata.metadata().then((meta) => { let messageData = { attachment: { type: 'template', payload: { template_type: 'generic', elements: [ { title: 'Test', image_url: meta.image, subtitle: 'test', buttons: [] } ] } } }; console.log(messageData); return request({ uri: 'https://graph.facebook.com/v2.6/me/messages', qs: {access_token: config.Facebook.pageToken}, method: 'POST', body: { recipient: {id: sender}, message: messageData, }, json: true }); }); } }; ## Instruction: Add button to the template ## Code After: 'use strict'; const request = require('request-promise'); const config = require('../../config'); const scraper = require('./scraper'); module.exports = { getFirstMessagingEntry: (body) => { const val = body.object == 'page' && body.entry && Array.isArray(body.entry) && body.entry.length > 0 && body.entry[0] && body.entry[0].id == config.Facebook.pageId && body.entry[0].messaging && Array.isArray(body.entry[0].messaging) && body.entry[0].messaging.length > 0 && body.entry[0].messaging[0] ; return val || null; }, sendTextMessage: (sender, text) => { const url = text; const metadata = scraper(url); return metadata.metadata().then((meta) => { let messageData = { attachment: { type: 'template', payload: { template_type: 'generic', elements: [ { title: 'Test', image_url: meta.image, subtitle: 'test', buttons: [{ type: 'web_url', url: url, title: 'Click here' }] } ] } } }; console.log(messageData); return request({ uri: 'https://graph.facebook.com/v2.6/me/messages', qs: {access_token: config.Facebook.pageToken}, method: 'POST', body: { recipient: {id: sender}, message: messageData, }, json: true }); }); } };
ae5e1b42c06cf04a2fcf6ec78c4b028aa69791eb
ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h
ReactiveCocoaFramework/ReactiveCocoa/UIActionSheet+RACSignalSupport.h
// // UIActionSheet+RACSignalSupport.h // ReactiveCocoa // // Created by Dave Lee on 2013-06-22. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <UIKit/UIKit.h> @class RACDelegateProxy; @class RACSignal; @interface UIActionSheet (RACSignalSupport) // A delegate proxy which will be set as the receiver's delegate when any of the // methods in this category are used. @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; // Creates a signal for button clicks on the receiver. // // When this method is invoked, the receiver's `delegate` will be set to // the `rac_delegateProxy` if it is not already. Any existing delegate will be // set as the proxy's `rac_proxiedDelegate`. // // Returns a signal which will send the index of the specific button clicked. // The signal will complete when the receiver is deallocated. - (RACSignal *)rac_buttonClickedSignal; @end
// // UIActionSheet+RACSignalSupport.h // ReactiveCocoa // // Created by Dave Lee on 2013-06-22. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <UIKit/UIKit.h> @class RACDelegateProxy; @class RACSignal; @interface UIActionSheet (RACSignalSupport) // A delegate proxy which will be set as the receiver's delegate when any of the // methods in this category are used. @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; // Creates a signal for button clicks on the receiver. // // When this method is invoked, the `rac_delegateProxy` will become the // receiver's delegate. Any previous delegate will become the -[RACDelegateProxy // rac_proxiedDelegate], so that it receives any messages that the proxy doesn't // know how to handle. Setting the receiver's `delegate` afterward is // considered undefined behavior. // // Returns a signal which will send the index of the specific button clicked. // The signal will complete when the receiver is deallocated. - (RACSignal *)rac_buttonClickedSignal; @end
Copy documentation wording from UITextView+RACSignalSupport.h
Copy documentation wording from UITextView+RACSignalSupport.h
C
mit
buildo/ReactiveCocoa,ioshger0125/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,fanghao085/ReactiveCocoa,cstars135/ReactiveCocoa,itschaitanya/ReactiveCocoa,longv2go/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,paulyoung/ReactiveCocoa,itschaitanya/ReactiveCocoa,Ray0218/ReactiveCocoa,Carthage/ReactiveCocoa,qq644531343/ReactiveCocoa,add715/ReactiveCocoa,Juraldinio/ReactiveCocoa,zxq3220122/ReactiveCocoa,BlessNeo/ReactiveCocoa,alvinvarghese/ReactiveCocoa,yonekawa/ReactiveCocoa,walkingsmarts/ReactiveCocoa,yytong/ReactiveCocoa,isghe/ReactiveCocoa,zhiwen1024/ReactiveCocoa,jam891/ReactiveCocoa,monkeydbobo/ReactiveCocoa,ikesyo/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,taylormoonxu/ReactiveCocoa,cnbin/ReactiveCocoa,llb1119/test,bensonday/ReactiveCocoa,sdhzwm/ReactiveCocoa,hj3938/ReactiveCocoa,brasbug/ReactiveCocoa,eyu1988/ReactiveCocoa,valleyman86/ReactiveCocoa,windgo/ReactiveCocoa,bscarano/ReactiveCocoa,towik/ReactiveCocoa,jsslai/ReactiveCocoa,shaohung001/ReactiveCocoa,BrooksWon/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,sandyway/ReactiveCocoa,tzongw/ReactiveCocoa,huiping192/ReactiveCocoa,zzzworm/ReactiveCocoa,wpstarnice/ReactiveCocoa,hoanganh6491/ReactiveCocoa,Khan/ReactiveCocoa,taylormoonxu/ReactiveCocoa,fhchina/ReactiveCocoa,xulibao/ReactiveCocoa,libiao88/ReactiveCocoa,zzqiltw/ReactiveCocoa,AlanJN/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,monkeydbobo/ReactiveCocoa,jackywpy/ReactiveCocoa,buildo/ReactiveCocoa,valleyman86/ReactiveCocoa,xumaolin/ReactiveCocoa,itschaitanya/ReactiveCocoa,mxxiv/ReactiveCocoa,victorlin/ReactiveCocoa,stupidfive/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,bencochran/ReactiveCocoa,longv2go/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,swizzlr/ReactiveCocoa,yoichitgy/ReactiveCocoa,Remitly/ReactiveCocoa,KJin99/ReactiveCocoa,zhigang1992/ReactiveCocoa,xulibao/ReactiveCocoa,hoanganh6491/ReactiveCocoa,windgo/ReactiveCocoa,tipbit/ReactiveCocoa,200895045/ReactiveCocoa,koamac/ReactiveCocoa,ddc391565320/ReactiveCocoa,cogddo/ReactiveCocoa,ztchena/ReactiveCocoa,tonyarnold/ReactiveCocoa,Ray0218/ReactiveCocoa,cnbin/ReactiveCocoa,Khan/ReactiveCocoa,almassapargali/ReactiveCocoa,hbucius/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,Rupert-RR/ReactiveCocoa,WEIBP/ReactiveCocoa,nickcheng/ReactiveCocoa,yizzuide/ReactiveCocoa,tonyli508/ReactiveCocoa,kaylio/ReactiveCocoa,takeshineshiro/ReactiveCocoa,LHDsimon/ReactiveCocoa,esttorhe/ReactiveCocoa,chao95957/ReactiveCocoa,Pingco/ReactiveCocoa,zhukaixy/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,rpowelll/ReactiveCocoa,pzw224/ReactiveCocoa,dz1111/ReactiveCocoa,luerhouhou/ReactiveCocoa,gabemdev/ReactiveCocoa,leichunfeng/ReactiveCocoa,victorlin/ReactiveCocoa,valleyman86/ReactiveCocoa,yizzuide/ReactiveCocoa,bensonday/ReactiveCocoa,koamac/ReactiveCocoa,howandhao/ReactiveCocoa,hoanganh6491/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,monkeydbobo/ReactiveCocoa,sujeking/ReactiveCocoa,kiurentu/ReactiveCocoa,SanChain/ReactiveCocoa,towik/ReactiveCocoa,ikesyo/ReactiveCocoa,eyu1988/ReactiveCocoa,beni55/ReactiveCocoa,icepy/ReactiveCocoa,dz1111/ReactiveCocoa,calebd/ReactiveCocoa,Remitly/ReactiveCocoa,KuPai32G/ReactiveCocoa,zzzworm/ReactiveCocoa,almassapargali/ReactiveCocoa,goodheart/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,libiao88/ReactiveCocoa,AlanJN/ReactiveCocoa,longv2go/ReactiveCocoa,SanChain/ReactiveCocoa,wpstarnice/ReactiveCocoa,xiaobing2007/ReactiveCocoa,OneSmallTree/ReactiveCocoa,liufeigit/ReactiveCocoa,sugar2010/ReactiveCocoa,ddc391565320/ReactiveCocoa,on99/ReactiveCocoa,ioshger0125/ReactiveCocoa,zhaoguohui/ReactiveCocoa,Rupert-RR/ReactiveCocoa,terry408911/ReactiveCocoa,andersio/ReactiveCocoa,leelili/ReactiveCocoa,shaohung001/ReactiveCocoa,luerhouhou/ReactiveCocoa,clg0118/ReactiveCocoa,brasbug/ReactiveCocoa,natan/ReactiveCocoa,Eveian/ReactiveCocoa,tiger8888/ReactiveCocoa,hj3938/ReactiveCocoa,nickcheng/ReactiveCocoa,ailyanlu/ReactiveCocoa,tipbit/ReactiveCocoa,ztchena/ReactiveCocoa,huiping192/ReactiveCocoa,OneSmallTree/ReactiveCocoa,victorlin/ReactiveCocoa,isghe/ReactiveCocoa,alvinvarghese/ReactiveCocoa,yoichitgy/ReactiveCocoa,leichunfeng/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,mattpetters/ReactiveCocoa,natestedman/ReactiveCocoa,WEIBP/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,zxq3220122/ReactiveCocoa,xumaolin/ReactiveCocoa,zhenlove/ReactiveCocoa,KJin99/ReactiveCocoa,windgo/ReactiveCocoa,jeelun/ReactiveCocoa,liufeigit/ReactiveCocoa,eyu1988/ReactiveCocoa,DreamHill/ReactiveCocoa,LHDsimon/ReactiveCocoa,cstars135/ReactiveCocoa,SuPair/ReactiveCocoa,dullgrass/ReactiveCocoa,bencochran/ReactiveCocoa,FelixYin66/ReactiveCocoa,jrmiddle/ReactiveCocoa,stevielu/ReactiveCocoa,dullgrass/ReactiveCocoa,335g/ReactiveCocoa,tonyli508/ReactiveCocoa,tiger8888/ReactiveCocoa,xumaolin/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,yoichitgy/ReactiveCocoa,zhukaixy/ReactiveCocoa,smilypeda/ReactiveCocoa,hbucius/ReactiveCocoa,SuPair/ReactiveCocoa,beni55/ReactiveCocoa,chao95957/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,ohwutup/ReactiveCocoa,tzongw/ReactiveCocoa,paulyoung/ReactiveCocoa,ailyanlu/ReactiveCocoa,PSPDFKit-labs/ReactiveCocoa,fanghao085/ReactiveCocoa,zhaoguohui/ReactiveCocoa,sandyway/ReactiveCocoa,andersio/ReactiveCocoa,zhenlove/ReactiveCocoa,JohnJin007/ReactiveCocoa,ailyanlu/ReactiveCocoa,llb1119/test,ShawnLeee/ReactiveCocoa,dachaoisme/ReactiveCocoa,esttorhe/ReactiveCocoa,tonyarnold/ReactiveCocoa,WEIBP/ReactiveCocoa,rpowelll/ReactiveCocoa,mattpetters/ReactiveCocoa,j364960953/ReactiveCocoa,j364960953/ReactiveCocoa,nikita-leonov/ReactiveCocoa,wangqi211/ReactiveCocoa,Juraldinio/ReactiveCocoa,tonyli508/ReactiveCocoa,swizzlr/ReactiveCocoa,kevin-zqw/ReactiveCocoa,mtxs007/ReactiveCocoa,JackLian/ReactiveCocoa,hj3938/ReactiveCocoa,leichunfeng/ReactiveCocoa,gengjf/ReactiveCocoa,loupman/ReactiveCocoa,lixar/ReactiveCocoa,GuitarPlayer-Ma/ReactiveCocoa,add715/ReactiveCocoa,wpstarnice/ReactiveCocoa,pzw224/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,JohnJin007/ReactiveCocoa,yytong/ReactiveCocoa,Carthage/ReactiveCocoa,luerhouhou/ReactiveCocoa,icepy/ReactiveCocoa,vincentiss/ReactiveCocoa,ShawnLeee/ReactiveCocoa,FelixYin66/ReactiveCocoa,yaoxiaoyong/ReactiveCocoa,dz1111/ReactiveCocoa,vincentiss/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,ddc391565320/ReactiveCocoa,huiping192/ReactiveCocoa,goodheart/ReactiveCocoa,brightcove/ReactiveCocoa,stevielu/ReactiveCocoa,nickcheng/ReactiveCocoa,xulibao/ReactiveCocoa,Liquidsoul/ReactiveCocoa,Ricowere/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,sugar2010/ReactiveCocoa,leelili/ReactiveCocoa,xiaoliyang/ReactiveCocoa,ericzhou2008/ReactiveCocoa,Farteen/ReactiveCocoa,terry408911/ReactiveCocoa,Ethan89/ReactiveCocoa,hilllinux/ReactiveCocoa,fhchina/ReactiveCocoa,jaylib/ReactiveCocoa,stupidfive/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,xiaoliyang/ReactiveCocoa,loupman/ReactiveCocoa,natestedman/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,DreamHill/ReactiveCocoa,rpowelll/ReactiveCocoa,ztchena/ReactiveCocoa,zhigang1992/ReactiveCocoa,Liquidsoul/ReactiveCocoa,Pingco/ReactiveCocoa,mtxs007/ReactiveCocoa,zhenlove/ReactiveCocoa,BlessNeo/ReactiveCocoa,ShawnLeee/ReactiveCocoa,Rupert-RR/ReactiveCocoa,dullgrass/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,alvinvarghese/ReactiveCocoa,zhiwen1024/ReactiveCocoa,kiurentu/ReactiveCocoa,howandhao/ReactiveCocoa,dskatz22/ReactiveCocoa,brightcove/ReactiveCocoa,ericzhou2008/ReactiveCocoa,towik/ReactiveCocoa,JohnJin007/ReactiveCocoa,Ray0218/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,zhiwen1024/ReactiveCocoa,Remitly/ReactiveCocoa,sugar2010/ReactiveCocoa,bencochran/ReactiveCocoa,sandyway/ReactiveCocoa,OneSmallTree/ReactiveCocoa,richeterre/ReactiveCocoa,kiurentu/ReactiveCocoa,CQXfly/ReactiveCocoa,hilllinux/ReactiveCocoa,SuPair/ReactiveCocoa,Eveian/ReactiveCocoa,ceekayel/ReactiveCocoa,eliperkins/ReactiveCocoa,llb1119/test,walkingsmarts/ReactiveCocoa,Ethan89/ReactiveCocoa,zzzworm/ReactiveCocoa,OnTheWay1988/ReactiveCocoa,terry408911/ReactiveCocoa,KuPai32G/ReactiveCocoa,howandhao/ReactiveCocoa,jeelun/ReactiveCocoa,goodheart/ReactiveCocoa,JackLian/ReactiveCocoa,imkerberos/ReactiveCocoa,kevin-zqw/ReactiveCocoa,j364960953/ReactiveCocoa,shaohung001/ReactiveCocoa,yytong/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,andersio/ReactiveCocoa,jsslai/ReactiveCocoa,mxxiv/ReactiveCocoa,Adlai-Holler/ReactiveCocoa,kaylio/ReactiveCocoa,cogddo/ReactiveCocoa,jsslai/ReactiveCocoa,chieryw/ReactiveCocoa,200895045/ReactiveCocoa,wangqi211/ReactiveCocoa,Pikdays/ReactiveCocoa,sdhzwm/ReactiveCocoa,libiao88/ReactiveCocoa,Carthage/ReactiveCocoa,ioshger0125/ReactiveCocoa,Juraldinio/ReactiveCocoa,leelili/ReactiveCocoa,zxq3220122/ReactiveCocoa,CQXfly/ReactiveCocoa,chao95957/ReactiveCocoa,DreamHill/ReactiveCocoa,clg0118/ReactiveCocoa,AlanJN/ReactiveCocoa,dachaoisme/ReactiveCocoa,beni55/ReactiveCocoa,KJin99/ReactiveCocoa,almassapargali/ReactiveCocoa,sdhzwm/ReactiveCocoa,FelixYin66/ReactiveCocoa,clg0118/ReactiveCocoa,jrmiddle/ReactiveCocoa,calebd/ReactiveCocoa,tornade0913/ReactiveCocoa,jianwoo/ReactiveCocoa,Farteen/ReactiveCocoa,mattpetters/ReactiveCocoa,tornade0913/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,AllanChen/ReactiveCocoa,CCOOOOLL/ReactiveCocoa,smilypeda/ReactiveCocoa,SmartEncounter/ReactiveCocoa,335g/ReactiveCocoa,taylormoonxu/ReactiveCocoa,jam891/ReactiveCocoa,zzqiltw/ReactiveCocoa,yangyangluoluo/ReactiveCocoa,tiger8888/ReactiveCocoa,zhukaixy/ReactiveCocoa,Ricowere/ReactiveCocoa,sujeking/ReactiveCocoa,ceekayel/ReactiveCocoa,esttorhe/ReactiveCocoa,tzongw/ReactiveCocoa,qq644531343/ReactiveCocoa,xiaoliyang/ReactiveCocoa,esttorhe/ReactiveCocoa,hbucius/ReactiveCocoa,lixar/ReactiveCocoa,on99/ReactiveCocoa,vincentiss/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,KuPai32G/ReactiveCocoa,Ethan89/ReactiveCocoa,pzw224/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,SmartEncounter/ReactiveCocoa,emodeqidao/ReactiveCocoa,koamac/ReactiveCocoa,natan/ReactiveCocoa,BrooksWon/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,cstars135/ReactiveCocoa,chieryw/ReactiveCocoa,335g/ReactiveCocoa,jrmiddle/ReactiveCocoa,takeshineshiro/ReactiveCocoa,ceekayel/ReactiveCocoa,yizzuide/ReactiveCocoa,emodeqidao/ReactiveCocoa,brasbug/ReactiveCocoa,imkerberos/ReactiveCocoa,dskatz22/ReactiveCocoa,fanghao085/ReactiveCocoa,on99/ReactiveCocoa,liufeigit/ReactiveCocoa,qq644531343/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,Ricowere/ReactiveCocoa,BrooksWon/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,bensonday/ReactiveCocoa,mtxs007/ReactiveCocoa,eliperkins/ReactiveCocoa,ReactiveCocoa/ReactiveSwift,jaylib/ReactiveCocoa,zzqiltw/ReactiveCocoa,huiping192/ReactiveCocoa,gengjf/ReactiveCocoa,shuxiashusheng/ReactiveCocoa,yonekawa/ReactiveCocoa,mxxiv/ReactiveCocoa,jaylib/ReactiveCocoa,imkerberos/ReactiveCocoa,brightcove/ReactiveCocoa,hilllinux/ReactiveCocoa,natan/ReactiveCocoa,cnbin/ReactiveCocoa,zhaoguohui/ReactiveCocoa,Khan/ReactiveCocoa,loupman/ReactiveCocoa,paulyoung/ReactiveCocoa,richeterre/ReactiveCocoa,200895045/ReactiveCocoa,nikita-leonov/ReactiveCocoa,bscarano/ReactiveCocoa,BlessNeo/ReactiveCocoa,juliangrosshauser/ReactiveCocoa,RuiAAPeres/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,nikita-leonov/ReactiveCocoa,isghe/ReactiveCocoa,jackywpy/ReactiveCocoa,DongDongDongDong/ReactiveCocoa,icepy/ReactiveCocoa,takeshineshiro/ReactiveCocoa,yonekawa/ReactiveCocoa,Farteen/ReactiveCocoa,kevin-zqw/ReactiveCocoa,jianwoo/ReactiveCocoa,AndyZhaoHe/ReactiveCocoa,add715/ReactiveCocoa,tonyarnold/ReactiveCocoa,Liquidsoul/ReactiveCocoa,dachaoisme/ReactiveCocoa,SanChain/ReactiveCocoa,zhigang1992/ReactiveCocoa,msdgwzhy6/ReactiveCocoa,Ricowere/ReactiveCocoa,richeterre/ReactiveCocoa,bscarano/ReactiveCocoa,Pingco/ReactiveCocoa,Pikdays/ReactiveCocoa,calebd/ReactiveCocoa,nickcheng/ReactiveCocoa,chieryw/ReactiveCocoa,xiaobing2007/ReactiveCocoa,fhchina/ReactiveCocoa,yangshengchaoios/ReactiveCocoa,kaylio/ReactiveCocoa,cogddo/ReactiveCocoa,eliperkins/ReactiveCocoa,stevielu/ReactiveCocoa,jackywpy/ReactiveCocoa,ohwutup/ReactiveCocoa,sujeking/ReactiveCocoa,jam891/ReactiveCocoa,buildo/ReactiveCocoa,jeelun/ReactiveCocoa,CQXfly/ReactiveCocoa,dskatz22/ReactiveCocoa,gengjf/ReactiveCocoa,smilypeda/ReactiveCocoa,LHDsimon/ReactiveCocoa,tornade0913/ReactiveCocoa,ericzhou2008/ReactiveCocoa,natestedman/ReactiveCocoa,walkingsmarts/ReactiveCocoa,wangqi211/ReactiveCocoa,AllanChen/ReactiveCocoa,JackLian/ReactiveCocoa,Eveian/ReactiveCocoa,stupidfive/ReactiveCocoa,gabemdev/ReactiveCocoa,emodeqidao/ReactiveCocoa,ohwutup/ReactiveCocoa,Pikdays/ReactiveCocoa,lixar/ReactiveCocoa,jianwoo/ReactiveCocoa,xiaobing2007/ReactiveCocoa,jaylib/ReactiveCocoa
c
## Code Before: // // UIActionSheet+RACSignalSupport.h // ReactiveCocoa // // Created by Dave Lee on 2013-06-22. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <UIKit/UIKit.h> @class RACDelegateProxy; @class RACSignal; @interface UIActionSheet (RACSignalSupport) // A delegate proxy which will be set as the receiver's delegate when any of the // methods in this category are used. @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; // Creates a signal for button clicks on the receiver. // // When this method is invoked, the receiver's `delegate` will be set to // the `rac_delegateProxy` if it is not already. Any existing delegate will be // set as the proxy's `rac_proxiedDelegate`. // // Returns a signal which will send the index of the specific button clicked. // The signal will complete when the receiver is deallocated. - (RACSignal *)rac_buttonClickedSignal; @end ## Instruction: Copy documentation wording from UITextView+RACSignalSupport.h ## Code After: // // UIActionSheet+RACSignalSupport.h // ReactiveCocoa // // Created by Dave Lee on 2013-06-22. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <UIKit/UIKit.h> @class RACDelegateProxy; @class RACSignal; @interface UIActionSheet (RACSignalSupport) // A delegate proxy which will be set as the receiver's delegate when any of the // methods in this category are used. @property (nonatomic, strong, readonly) RACDelegateProxy *rac_delegateProxy; // Creates a signal for button clicks on the receiver. // // When this method is invoked, the `rac_delegateProxy` will become the // receiver's delegate. Any previous delegate will become the -[RACDelegateProxy // rac_proxiedDelegate], so that it receives any messages that the proxy doesn't // know how to handle. Setting the receiver's `delegate` afterward is // considered undefined behavior. // // Returns a signal which will send the index of the specific button clicked. // The signal will complete when the receiver is deallocated. - (RACSignal *)rac_buttonClickedSignal; @end
ad837566d07bcc67356b3d16f586ae938cc54870
data/galaxy_tools_playbook/taxonomic_assignation_tool_list.yaml
data/galaxy_tools_playbook/taxonomic_assignation_tool_list.yaml
api_key: <Admin user API key from galaxy_instance> galaxy_instance: <Galaxy instance IP> tools: #- name: 'metaphlan' # owner: 'dannon' # tool_panel_section_id: 'non_rRNA_taxonomic_assignation' # tool_shed_url: 'https://toolshed.g2.bx.psu.edu' # install_tool_dependencies: True # install_repository_dependencies: True - name: 'metaphlan2' owner: 'bebatut' tool_panel_section_id: 'non_rRNA_taxonomic_assignation' tool_shed_url: 'https://testtoolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True - name: 'qiime1_3_0' owner: 'azuzolo' tool_panel_section_id: 'qiime_rRNA_taxonomic_assignation' tool_shed_url: 'https://toolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True
api_key: <Admin user API key from galaxy_instance> galaxy_instance: <Galaxy instance IP> tools: - name: 'metaphlan2' owner: 'bebatut' tool_panel_section_id: 'non_rRNA_taxonomic_assignation' tool_shed_url: 'https://testtoolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True #revisions: #- '8ec3dfde378b' - name: 'qiime' owner: 'bebatut'#'iuc' tool_panel_section_id: 'qiime_rRNA_taxonomic_assignation' tool_shed_url: 'https://testtoolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True
Add qiime in taxonomic tools
Add qiime in taxonomic tools
YAML
apache-2.0
ASaiM/framework,ASaiM/framework
yaml
## Code Before: api_key: <Admin user API key from galaxy_instance> galaxy_instance: <Galaxy instance IP> tools: #- name: 'metaphlan' # owner: 'dannon' # tool_panel_section_id: 'non_rRNA_taxonomic_assignation' # tool_shed_url: 'https://toolshed.g2.bx.psu.edu' # install_tool_dependencies: True # install_repository_dependencies: True - name: 'metaphlan2' owner: 'bebatut' tool_panel_section_id: 'non_rRNA_taxonomic_assignation' tool_shed_url: 'https://testtoolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True - name: 'qiime1_3_0' owner: 'azuzolo' tool_panel_section_id: 'qiime_rRNA_taxonomic_assignation' tool_shed_url: 'https://toolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True ## Instruction: Add qiime in taxonomic tools ## Code After: api_key: <Admin user API key from galaxy_instance> galaxy_instance: <Galaxy instance IP> tools: - name: 'metaphlan2' owner: 'bebatut' tool_panel_section_id: 'non_rRNA_taxonomic_assignation' tool_shed_url: 'https://testtoolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True #revisions: #- '8ec3dfde378b' - name: 'qiime' owner: 'bebatut'#'iuc' tool_panel_section_id: 'qiime_rRNA_taxonomic_assignation' tool_shed_url: 'https://testtoolshed.g2.bx.psu.edu' install_tool_dependencies: True install_repository_dependencies: True
0b069bab7d94c187915398f02cde1479413d8929
lib/awspec/type/base.rb
lib/awspec/type/base.rb
require 'aws-sdk' require 'awspec/helper/finder' module Awspec::Type class Base include Awspec::Helper::Finder attr_reader :id, :resource def initialize(id = nil) super @id = nil end def exists? @id end def method_missing(name) describe = name.to_sym if @resource.members.include?(describe) @resource[describe] else super end end end end
require 'aws-sdk' require 'awspec/helper/finder' module Awspec::Type class Base include Awspec::Helper::Finder attr_reader :id, :resource def initialize(id = nil) @display_name = id super @id = nil end def to_s type = self.class.name.demodulize.underscore "#{type} '#{@display_name}'" end def exists? @id end def method_missing(name) describe = name.to_sym if @resource.members.include?(describe) @resource[describe] else super end end end end
Add method to_s for spec results
Add method to_s for spec results
Ruby
mit
k1LoW/awspec,AgarFu/awspec,AgarFu/awspec,k1LoW/awspec,hoshinotsuyoshi/awspec
ruby
## Code Before: require 'aws-sdk' require 'awspec/helper/finder' module Awspec::Type class Base include Awspec::Helper::Finder attr_reader :id, :resource def initialize(id = nil) super @id = nil end def exists? @id end def method_missing(name) describe = name.to_sym if @resource.members.include?(describe) @resource[describe] else super end end end end ## Instruction: Add method to_s for spec results ## Code After: require 'aws-sdk' require 'awspec/helper/finder' module Awspec::Type class Base include Awspec::Helper::Finder attr_reader :id, :resource def initialize(id = nil) @display_name = id super @id = nil end def to_s type = self.class.name.demodulize.underscore "#{type} '#{@display_name}'" end def exists? @id end def method_missing(name) describe = name.to_sym if @resource.members.include?(describe) @resource[describe] else super end end end end
7ed17afc39c5f0de163ef0b5b0424dd0ec75bf28
.drone/build.sh
.drone/build.sh
set -e ls -R /var/cache/drone/src cd /var/cache/drone/src/github.com/icecreammatt/lookup go build go test status=$? if [ $status -ne 0 ] then exit $status fi ./wrapdocker & sleep 5 docker build -t icecreammatt/lookup . docker login -e $DOCKERHUB_EMAIL -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD docker push icecreammatt/lookup
set -e ls -R /var/cache/drone/src cd /var/cache/drone/src/github.com/icecreammatt/lookup go build go test echo $DOCKERHUB_USERNAME status=$? if [ $status -ne 0 ] then exit $status fi ./wrapdocker & sleep 5 docker build -t icecreammatt/lookup . docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD docker push icecreammatt/lookup
Print dockerhub email for testing
Print dockerhub email for testing
Shell
mit
icecreammatt/lookup,icecreammatt/lookup
shell
## Code Before: set -e ls -R /var/cache/drone/src cd /var/cache/drone/src/github.com/icecreammatt/lookup go build go test status=$? if [ $status -ne 0 ] then exit $status fi ./wrapdocker & sleep 5 docker build -t icecreammatt/lookup . docker login -e $DOCKERHUB_EMAIL -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD docker push icecreammatt/lookup ## Instruction: Print dockerhub email for testing ## Code After: set -e ls -R /var/cache/drone/src cd /var/cache/drone/src/github.com/icecreammatt/lookup go build go test echo $DOCKERHUB_USERNAME status=$? if [ $status -ne 0 ] then exit $status fi ./wrapdocker & sleep 5 docker build -t icecreammatt/lookup . docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD docker push icecreammatt/lookup
6771b83ec65f015fa58191694ad068063f61672b
amazon.py
amazon.py
from osv import osv, fields import time import datetime import inspect import xmlrpclib import netsvc import os import logging import urllib2 import base64 from tools.translate import _ import httplib, ConfigParser, urlparse from xml.dom.minidom import parse, parseString from lxml import etree from xml.etree.ElementTree import ElementTree import amazonerp_osv as mws from mako.lookup import TemplateLookup this_dir = os.path.dirname(os.path.realpath(__file__)) logger = logging.getLogger(__name__) templates = TemplateLookup(directories=[os.path.join(this_dir, 'ups')], default_filters=['unicode', 'x']) class amazon_instance(osv.osv): _inherit = 'amazon.instance' def create_orders(self, cr, uid, instance_obj, shop_id, results): res = super(amazon_instance, self).create_orders(cr, uid, instance_obj, shop_id, results) if res: amazon_order_ids = [result['AmazonOrderId'] for result in results if result.get('OrderStatus') == 'Unshipped' and 'AmazonOrderId' in result] sale_order_pool = self.pool.get('sale.order') sale_order_pool.write(cr, uid, sale_order_pool.search( cr, uid, ['amazon_order_id', 'in', amazon_order_ids]), { 'input_channel': 'amazon', 'payment_channel': 'amazon' }) return res amazon_instance()
from osv import osv, fields class amazon_instance(osv.osv): _inherit = 'amazon.instance' def create_orders(self, cr, uid, instance_obj, shop_id, results): return super(amazon_instance, self).create_orders(cr, uid, instance_obj, shop_id, results, defaults={ "payment_channel": "amazon", "input_channel": "amazon" }) amazon_instance()
Simplify defaulting the sale and payment channels for Amazon sales.
Simplify defaulting the sale and payment channels for Amazon sales.
Python
agpl-3.0
ryepdx/sale_channels
python
## Code Before: from osv import osv, fields import time import datetime import inspect import xmlrpclib import netsvc import os import logging import urllib2 import base64 from tools.translate import _ import httplib, ConfigParser, urlparse from xml.dom.minidom import parse, parseString from lxml import etree from xml.etree.ElementTree import ElementTree import amazonerp_osv as mws from mako.lookup import TemplateLookup this_dir = os.path.dirname(os.path.realpath(__file__)) logger = logging.getLogger(__name__) templates = TemplateLookup(directories=[os.path.join(this_dir, 'ups')], default_filters=['unicode', 'x']) class amazon_instance(osv.osv): _inherit = 'amazon.instance' def create_orders(self, cr, uid, instance_obj, shop_id, results): res = super(amazon_instance, self).create_orders(cr, uid, instance_obj, shop_id, results) if res: amazon_order_ids = [result['AmazonOrderId'] for result in results if result.get('OrderStatus') == 'Unshipped' and 'AmazonOrderId' in result] sale_order_pool = self.pool.get('sale.order') sale_order_pool.write(cr, uid, sale_order_pool.search( cr, uid, ['amazon_order_id', 'in', amazon_order_ids]), { 'input_channel': 'amazon', 'payment_channel': 'amazon' }) return res amazon_instance() ## Instruction: Simplify defaulting the sale and payment channels for Amazon sales. ## Code After: from osv import osv, fields class amazon_instance(osv.osv): _inherit = 'amazon.instance' def create_orders(self, cr, uid, instance_obj, shop_id, results): return super(amazon_instance, self).create_orders(cr, uid, instance_obj, shop_id, results, defaults={ "payment_channel": "amazon", "input_channel": "amazon" }) amazon_instance()
397ba5f183077a609a92c5cd6e29fc591f17f1d1
core/db/migrate/20151026093607_change_return_item_pre_tax_amount_to_amount.rb
core/db/migrate/20151026093607_change_return_item_pre_tax_amount_to_amount.rb
class ChangeReturnItemPreTaxAmountToAmount < ActiveRecord::Migration def up execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL; UPDATE spree_return_items SET pre_tax_amount = pre_tax_amount + included_tax_total; SQL rename_column :spree_return_items, :pre_tax_amount, :amount end def down execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL; UPDATE spree_return_items SET amount = amount - included_tax_total; SQL rename_column :spree_return_items, :amount, :pre_tax_amount end end
class ChangeReturnItemPreTaxAmountToAmount < ActiveRecord::Migration def up execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL SQL execute(<<-SQL) UPDATE spree_return_items SET pre_tax_amount = pre_tax_amount + included_tax_total SQL rename_column :spree_return_items, :pre_tax_amount, :amount end def down execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL SQL execute(<<-SQL) UPDATE spree_return_items SET amount = amount - included_tax_total SQL rename_column :spree_return_items, :amount, :pre_tax_amount end end
Split up SQL statements in migration
Split up SQL statements in migration This previously didn't work under mysql. In rails 4.2.6.rc1 this raises an exception, in previous versions the second statement was ignored.
Ruby
bsd-3-clause
jordan-brough/solidus,Arpsara/solidus,Arpsara/solidus,Arpsara/solidus,pervino/solidus,jordan-brough/solidus,pervino/solidus,jordan-brough/solidus,jordan-brough/solidus,pervino/solidus,pervino/solidus,Arpsara/solidus
ruby
## Code Before: class ChangeReturnItemPreTaxAmountToAmount < ActiveRecord::Migration def up execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL; UPDATE spree_return_items SET pre_tax_amount = pre_tax_amount + included_tax_total; SQL rename_column :spree_return_items, :pre_tax_amount, :amount end def down execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL; UPDATE spree_return_items SET amount = amount - included_tax_total; SQL rename_column :spree_return_items, :amount, :pre_tax_amount end end ## Instruction: Split up SQL statements in migration This previously didn't work under mysql. In rails 4.2.6.rc1 this raises an exception, in previous versions the second statement was ignored. ## Code After: class ChangeReturnItemPreTaxAmountToAmount < ActiveRecord::Migration def up execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL SQL execute(<<-SQL) UPDATE spree_return_items SET pre_tax_amount = pre_tax_amount + included_tax_total SQL rename_column :spree_return_items, :pre_tax_amount, :amount end def down execute(<<-SQL) UPDATE spree_return_items SET included_tax_total = 0 WHERE included_tax_total IS NULL SQL execute(<<-SQL) UPDATE spree_return_items SET amount = amount - included_tax_total SQL rename_column :spree_return_items, :amount, :pre_tax_amount end end
51801dee5c61943a4a4983180a942fb5f8fcbcbf
composer.json
composer.json
{ "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" } }
{ "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" }, "extra": { "installer-name": "CakePdf" } }
Set explicit installer location for BC
Set explicit installer location for BC CakePdf was always installed to CakePdf, the explicit installer-name setting was lost in the switch to FriendsOfCake. This restores it.
JSON
mit
birdy247/CakePdf,p-try/CakePdf,darkglamb/CakePdf,FriendsOfCake/CakePdf,Laykou/CakePdf,burzum/CakePdf,xyng/CakePdf
json
## Code Before: { "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" } } ## Instruction: Set explicit installer location for BC CakePdf was always installed to CakePdf, the explicit installer-name setting was lost in the switch to FriendsOfCake. This restores it. ## Code After: { "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" }, "extra": { "installer-name": "CakePdf" } }
900deb5e9b212e3982a6d3e77d92ed20b5d98c77
_sass/_docs.sass
_sass/_docs.sass
// Styling for the /docs/ pages $inner-width: 87% .docs @include grid-wrap margin-bottom: $baseline * 2 .docs-nav @include grid-x-col(5) .docs-nav-inner width: $inner-width padding: 20px background: darken($color-nnt-purple, 20%) ul margin-bottom: 0 li padding-bottom: $baseline / 2 h2 font-size: 24px line-height: $baseline .docs-content @include grid-x-col(11) .docs-nav-tabs @include grid-clear width: $inner-width .docs-nav-tab float: left width: 50% background: darken($color-nnt-purple, 30%) &.current background: darken($color-nnt-purple, 22%) a color: darken($color-text-white, 2%) a display: block padding: $baseline / 2 text-align: center color: $color-text-white text-transform: uppercase font-size: $base-font-size * 0.8 #github-issues-widget background: #f7f7f7 border: none padding: $baseline / 4
// Styling for the /docs/ pages $inner-width: 87% .docs @include grid-wrap margin-bottom: $baseline * 2 .docs-nav @include grid-x-col(5) .docs-nav-inner width: $inner-width padding: 20px background: darken($color-nnt-purple, 20%) ul margin-bottom: 0 li padding-bottom: $baseline / 2 h2 font-size: 24px line-height: $baseline .docs-content @include grid-x-col(11) .docs-nav-tabs @include grid-clear width: $inner-width .docs-nav-tab float: left width: 50% background: darken($color-nnt-purple, 30%) a display: block padding: $baseline / 2 text-align: center color: darken($color-nnt-purple, 20%) // Slightly lighter than the background for inactive tab text-transform: uppercase font-size: $base-font-size * 0.8 &.current background: darken($color-nnt-purple, 22%) a color: darken($color-text-white, 2%) #github-issues-widget background: #f7f7f7 border: none padding: $baseline / 4
Tweak to nav tab inactive colour
Tweak to nav tab inactive colour
Sass
mit
newtheatre/history-project,newtheatre/history-project,newtheatre/history-project,newtheatre/history-project,johnathan99j/history-project,newtheatre/history-project,johnathan99j/history-project,johnathan99j/history-project,johnathan99j/history-project,johnathan99j/history-project
sass
## Code Before: // Styling for the /docs/ pages $inner-width: 87% .docs @include grid-wrap margin-bottom: $baseline * 2 .docs-nav @include grid-x-col(5) .docs-nav-inner width: $inner-width padding: 20px background: darken($color-nnt-purple, 20%) ul margin-bottom: 0 li padding-bottom: $baseline / 2 h2 font-size: 24px line-height: $baseline .docs-content @include grid-x-col(11) .docs-nav-tabs @include grid-clear width: $inner-width .docs-nav-tab float: left width: 50% background: darken($color-nnt-purple, 30%) &.current background: darken($color-nnt-purple, 22%) a color: darken($color-text-white, 2%) a display: block padding: $baseline / 2 text-align: center color: $color-text-white text-transform: uppercase font-size: $base-font-size * 0.8 #github-issues-widget background: #f7f7f7 border: none padding: $baseline / 4 ## Instruction: Tweak to nav tab inactive colour ## Code After: // Styling for the /docs/ pages $inner-width: 87% .docs @include grid-wrap margin-bottom: $baseline * 2 .docs-nav @include grid-x-col(5) .docs-nav-inner width: $inner-width padding: 20px background: darken($color-nnt-purple, 20%) ul margin-bottom: 0 li padding-bottom: $baseline / 2 h2 font-size: 24px line-height: $baseline .docs-content @include grid-x-col(11) .docs-nav-tabs @include grid-clear width: $inner-width .docs-nav-tab float: left width: 50% background: darken($color-nnt-purple, 30%) a display: block padding: $baseline / 2 text-align: center color: darken($color-nnt-purple, 20%) // Slightly lighter than the background for inactive tab text-transform: uppercase font-size: $base-font-size * 0.8 &.current background: darken($color-nnt-purple, 22%) a color: darken($color-text-white, 2%) #github-issues-widget background: #f7f7f7 border: none padding: $baseline / 4
45b135eaa3afd3fb9a65911b57b94a845e40490f
client/src/main/java/replicant/messages/EtagsData.java
client/src/main/java/replicant/messages/EtagsData.java
package replicant.messages; import elemental2.core.JsObject; import javax.annotation.Nonnull; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; import jsinterop.base.Any; import jsinterop.base.Js; /** * A simple abstraction for key-value etag pairs. */ @JsType( isNative = true, name = "Object", namespace = JsPackage.GLOBAL ) public interface EtagsData { /** * Return true if etag for channel is present. * * @param key the channel key. * @return true if the etag is present. */ @JsOverlay default boolean containsChannel( @Nonnull final String key ) { return Js.asPropertyMap( this ).has( key ); } /** * Return the channels. * * @return eturn the channels. */ @JsOverlay default String[] channels() { return JsObject.keys( this ); } @Nonnull @JsOverlay default String getEtag( @Nonnull final String key ) { final Any any = Js.asPropertyMap( this ).getAsAny( key ); assert null != any; return any.asString(); } }
package replicant.messages; import elemental2.core.JsArray; import elemental2.core.JsObject; import javax.annotation.Nonnull; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; import jsinterop.base.Any; import jsinterop.base.Js; /** * A simple abstraction for key-value etag pairs. */ @JsType( isNative = true, name = "Object", namespace = JsPackage.GLOBAL ) public interface EtagsData { /** * Return true if etag for channel is present. * * @param key the channel key. * @return true if the etag is present. */ @JsOverlay default boolean containsChannel( @Nonnull final String key ) { return Js.asPropertyMap( this ).has( key ); } /** * Return the channels. * * @return eturn the channels. */ @JsOverlay default String[] channels() { final JsArray<String> keys = JsObject.keys( this ); return keys.asArray( new String[ keys.length ] ); } @Nonnull @JsOverlay default String getEtag( @Nonnull final String key ) { final Any any = Js.asPropertyMap( this ).getAsAny( key ); assert null != any; return any.asString(); } }
Upgrade to the latest Elemental2 API
Upgrade to the latest Elemental2 API
Java
apache-2.0
realityforge/replicant,realityforge/replicant
java
## Code Before: package replicant.messages; import elemental2.core.JsObject; import javax.annotation.Nonnull; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; import jsinterop.base.Any; import jsinterop.base.Js; /** * A simple abstraction for key-value etag pairs. */ @JsType( isNative = true, name = "Object", namespace = JsPackage.GLOBAL ) public interface EtagsData { /** * Return true if etag for channel is present. * * @param key the channel key. * @return true if the etag is present. */ @JsOverlay default boolean containsChannel( @Nonnull final String key ) { return Js.asPropertyMap( this ).has( key ); } /** * Return the channels. * * @return eturn the channels. */ @JsOverlay default String[] channels() { return JsObject.keys( this ); } @Nonnull @JsOverlay default String getEtag( @Nonnull final String key ) { final Any any = Js.asPropertyMap( this ).getAsAny( key ); assert null != any; return any.asString(); } } ## Instruction: Upgrade to the latest Elemental2 API ## Code After: package replicant.messages; import elemental2.core.JsArray; import elemental2.core.JsObject; import javax.annotation.Nonnull; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsType; import jsinterop.base.Any; import jsinterop.base.Js; /** * A simple abstraction for key-value etag pairs. */ @JsType( isNative = true, name = "Object", namespace = JsPackage.GLOBAL ) public interface EtagsData { /** * Return true if etag for channel is present. * * @param key the channel key. * @return true if the etag is present. */ @JsOverlay default boolean containsChannel( @Nonnull final String key ) { return Js.asPropertyMap( this ).has( key ); } /** * Return the channels. * * @return eturn the channels. */ @JsOverlay default String[] channels() { final JsArray<String> keys = JsObject.keys( this ); return keys.asArray( new String[ keys.length ] ); } @Nonnull @JsOverlay default String getEtag( @Nonnull final String key ) { final Any any = Js.asPropertyMap( this ).getAsAny( key ); assert null != any; return any.asString(); } }
c32186d53c5814bc1bc037898330b946558c576b
metadata/com.github.pires.obd.reader.txt
metadata/com.github.pires.obd.reader.txt
Categories:Science & Education License:Apache2 Web Site:https://github.com/pires/android-obd-reader/blob/HEAD/README.md Source Code:https://github.com/pires/android-obd-reader Issue Tracker:https://github.com/pires/android-obd-reader/issues Auto Name:Android OBD-II Reader Summary:Car diagnostics Description: OBD II reader, designed to connect to a bluetooth Elm327 OBD reader. Note application was previously known as [[eu.lighthouselabs.obd.reader]]. Status: Testing. . Repo Type:git Repo:https://github.com/pires/android-obd-reader.git Build:2.0-rc1,12 commit=2.0-RC1 gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:2.0-rc1 Current Version Code:12
Categories:Science & Education License:Apache2 Web Site:https://github.com/pires/android-obd-reader/blob/HEAD/README.md Source Code:https://github.com/pires/android-obd-reader Issue Tracker:https://github.com/pires/android-obd-reader/issues Auto Name:Android OBD-II Reader Summary:Car diagnostics Description: OBD II reader, designed to connect to a bluetooth Elm327 OBD reader. Note application was previously known as [[eu.lighthouselabs.obd.reader]]. Status: Testing. . Repo Type:git Repo:https://github.com/pires/android-obd-reader.git Build:2.0-rc1,12 commit=2.0-RC1 gradle=yes Build:2.0-RC2,13 commit=2.0-RC2 gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:2.0-RC2 Current Version Code:13
Update Android OBD-II Reader to 2.0-RC2 (13)
Update Android OBD-II Reader to 2.0-RC2 (13)
Text
agpl-3.0
f-droid/fdroiddata,f-droid/fdroid-data,f-droid/fdroiddata
text
## Code Before: Categories:Science & Education License:Apache2 Web Site:https://github.com/pires/android-obd-reader/blob/HEAD/README.md Source Code:https://github.com/pires/android-obd-reader Issue Tracker:https://github.com/pires/android-obd-reader/issues Auto Name:Android OBD-II Reader Summary:Car diagnostics Description: OBD II reader, designed to connect to a bluetooth Elm327 OBD reader. Note application was previously known as [[eu.lighthouselabs.obd.reader]]. Status: Testing. . Repo Type:git Repo:https://github.com/pires/android-obd-reader.git Build:2.0-rc1,12 commit=2.0-RC1 gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:2.0-rc1 Current Version Code:12 ## Instruction: Update Android OBD-II Reader to 2.0-RC2 (13) ## Code After: Categories:Science & Education License:Apache2 Web Site:https://github.com/pires/android-obd-reader/blob/HEAD/README.md Source Code:https://github.com/pires/android-obd-reader Issue Tracker:https://github.com/pires/android-obd-reader/issues Auto Name:Android OBD-II Reader Summary:Car diagnostics Description: OBD II reader, designed to connect to a bluetooth Elm327 OBD reader. Note application was previously known as [[eu.lighthouselabs.obd.reader]]. Status: Testing. . Repo Type:git Repo:https://github.com/pires/android-obd-reader.git Build:2.0-rc1,12 commit=2.0-RC1 gradle=yes Build:2.0-RC2,13 commit=2.0-RC2 gradle=yes Auto Update Mode:Version %v Update Check Mode:Tags Current Version:2.0-RC2 Current Version Code:13
f9f558e61020740f95a0fd0ec43b0597904866bc
printmodal.html
printmodal.html
<!-- print modal ('popup') screen template. Data binding context: PrintJob --> <div class="modal fade" id="printModal" tabindex="-1" role="dialog" aria-labelledby="printModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title text-left" id="printModalLabel">Auswahl drucken</h4> </div> <div class="modal-body clearfix"> <div class="text-left" data-bind="with: cart"> <h4 data-bind="text: name" style="margin-top: 0px;"></h4> <ul data-bind="foreach: lectures()"> <li data-bind="text: $data"></li> </ul> </div> <!-- ko template: { name: 'print' } --> <!-- /ko --> </div> </div> </div> </div>
<!-- print modal ('popup') screen template. Data binding context: PrintJob --> <div class="modal fade" id="printModal" tabindex="-1" role="dialog" aria-labelledby="printModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title text-left" id="printModalLabel">Auswahl drucken</h4> </div> <div class="modal-body clearfix"> <div class="text-left" data-bind="with: cart"> <h4 data-bind="text: name" style="margin-top: 0px;"></h4> <ul data-bind="foreach: lectures()"> <li data-bind="text: $data"></li> </ul> </div> <!-- ko template: { name: 'print', data: $data } --> <!-- /ko --> </div> </div> </div> </div>
Make print widget data binding context explicit
Make print widget data binding context explicit
HTML
mit
TehMillhouse/odie-client,TehMillhouse/odie-client,fsmi/odie-client,fsmi/odie-client,TehMillhouse/odie-client,fsmi/odie-client
html
## Code Before: <!-- print modal ('popup') screen template. Data binding context: PrintJob --> <div class="modal fade" id="printModal" tabindex="-1" role="dialog" aria-labelledby="printModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title text-left" id="printModalLabel">Auswahl drucken</h4> </div> <div class="modal-body clearfix"> <div class="text-left" data-bind="with: cart"> <h4 data-bind="text: name" style="margin-top: 0px;"></h4> <ul data-bind="foreach: lectures()"> <li data-bind="text: $data"></li> </ul> </div> <!-- ko template: { name: 'print' } --> <!-- /ko --> </div> </div> </div> </div> ## Instruction: Make print widget data binding context explicit ## Code After: <!-- print modal ('popup') screen template. Data binding context: PrintJob --> <div class="modal fade" id="printModal" tabindex="-1" role="dialog" aria-labelledby="printModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title text-left" id="printModalLabel">Auswahl drucken</h4> </div> <div class="modal-body clearfix"> <div class="text-left" data-bind="with: cart"> <h4 data-bind="text: name" style="margin-top: 0px;"></h4> <ul data-bind="foreach: lectures()"> <li data-bind="text: $data"></li> </ul> </div> <!-- ko template: { name: 'print', data: $data } --> <!-- /ko --> </div> </div> </div> </div>
8ca76d1ce7c0aab8faafd486c642effcd9502518
src/chess/MoveData.java
src/chess/MoveData.java
package chess; public class MoveData { private int toRow; private int toCol; private boolean isACapture; public MoveData(int row, int col, boolean capture) { toRow = row; toCol = col; isACapture = capture; } public int getRow() { return toRow; } public int getCol() { return toCol; } public boolean checkCapture() { return isACapture; } }
package chess; import chess.pieces.Piece; public class MoveData { private Piece startPiece; private int toRow; private int toCol; private int fromRow; private int fromCol; private boolean isACapture; public MoveData(Piece startPiece, int fromRow, int fromCol, int toRow, int toCol, boolean capture) { this.startPiece = startPiece; this.fromRow = fromRow; this.fromCol = fromCol; this.toRow = toRow; this.toCol = toCol; isACapture = capture; } public Piece getPiece() { return startPiece; } public int getStartRow() { return fromRow; } public int getStartCol() { return fromCol; } public int getEndRow() { return toRow; } public int getEndCol() { return toCol; } public boolean checkCapture() { return isACapture; } }
Add from squares and calling piece data.
Add from squares and calling piece data.
Java
unlicense
b-lu8961/ChessPlus
java
## Code Before: package chess; public class MoveData { private int toRow; private int toCol; private boolean isACapture; public MoveData(int row, int col, boolean capture) { toRow = row; toCol = col; isACapture = capture; } public int getRow() { return toRow; } public int getCol() { return toCol; } public boolean checkCapture() { return isACapture; } } ## Instruction: Add from squares and calling piece data. ## Code After: package chess; import chess.pieces.Piece; public class MoveData { private Piece startPiece; private int toRow; private int toCol; private int fromRow; private int fromCol; private boolean isACapture; public MoveData(Piece startPiece, int fromRow, int fromCol, int toRow, int toCol, boolean capture) { this.startPiece = startPiece; this.fromRow = fromRow; this.fromCol = fromCol; this.toRow = toRow; this.toCol = toCol; isACapture = capture; } public Piece getPiece() { return startPiece; } public int getStartRow() { return fromRow; } public int getStartCol() { return fromCol; } public int getEndRow() { return toRow; } public int getEndCol() { return toCol; } public boolean checkCapture() { return isACapture; } }
8c572f55b17b86cbfa56f18f0491e05092f755b1
application/libraries/Customautoloader.php
application/libraries/Customautoloader.php
<?php /* * Copyright 2014 Florian "Bluewind" Pritz <[email protected]> * * Licensed under AGPLv3 * (see COPYING for full license text) * */ // Original source: http://stackoverflow.com/a/9526005/953022 class CustomAutoloader{ public function __construct() { spl_autoload_register(array($this, 'loader')); } public function loader($className) { $base_paths = array( APPPATH, APPPATH."/third_party/mockery/library/", ); foreach ($base_paths as $base_path) { $path = $base_path.str_replace('\\', DIRECTORY_SEPARATOR, $className).'.php'; if (file_exists($path)) { require $path; return; } } } }
<?php /* * Copyright 2014 Florian "Bluewind" Pritz <[email protected]> * * Licensed under AGPLv3 * (see COPYING for full license text) * */ // Original source: http://stackoverflow.com/a/9526005/953022 class CustomAutoloader{ public function __construct() { spl_autoload_register(array($this, 'loader')); } public function loader($className) { $namespaces = array( '' => [ ["path" => APPPATH], ["path" => APPPATH."/third_party/mockery/library/"] ], ); foreach ($namespaces as $namespace => $search_items) { if ($namespace === '' || strpos($className, $namespace) === 0) { foreach ($search_items as $search_item) { $nameToLoad = str_replace($namespace, '', $className); $path = $search_item['path'].str_replace('\\', DIRECTORY_SEPARATOR, $nameToLoad).'.php'; if (file_exists($path)) { require $path; return; } } } } } }
Support PSR-4 style namespace/directory mapping
Autoloader: Support PSR-4 style namespace/directory mapping Signed-off-by: Florian Pritz <[email protected]>
PHP
mit
Bluewind/filebin,Bluewind/filebin,Bluewind/filebin,Bluewind/filebin,Bluewind/filebin
php
## Code Before: <?php /* * Copyright 2014 Florian "Bluewind" Pritz <[email protected]> * * Licensed under AGPLv3 * (see COPYING for full license text) * */ // Original source: http://stackoverflow.com/a/9526005/953022 class CustomAutoloader{ public function __construct() { spl_autoload_register(array($this, 'loader')); } public function loader($className) { $base_paths = array( APPPATH, APPPATH."/third_party/mockery/library/", ); foreach ($base_paths as $base_path) { $path = $base_path.str_replace('\\', DIRECTORY_SEPARATOR, $className).'.php'; if (file_exists($path)) { require $path; return; } } } } ## Instruction: Autoloader: Support PSR-4 style namespace/directory mapping Signed-off-by: Florian Pritz <[email protected]> ## Code After: <?php /* * Copyright 2014 Florian "Bluewind" Pritz <[email protected]> * * Licensed under AGPLv3 * (see COPYING for full license text) * */ // Original source: http://stackoverflow.com/a/9526005/953022 class CustomAutoloader{ public function __construct() { spl_autoload_register(array($this, 'loader')); } public function loader($className) { $namespaces = array( '' => [ ["path" => APPPATH], ["path" => APPPATH."/third_party/mockery/library/"] ], ); foreach ($namespaces as $namespace => $search_items) { if ($namespace === '' || strpos($className, $namespace) === 0) { foreach ($search_items as $search_item) { $nameToLoad = str_replace($namespace, '', $className); $path = $search_item['path'].str_replace('\\', DIRECTORY_SEPARATOR, $nameToLoad).'.php'; if (file_exists($path)) { require $path; return; } } } } } }
fe7cf1e131683640088c72d9e42ee848377b022c
lib/future-resource.rb
lib/future-resource.rb
require "thread" require "monitor" class FutureResource def initialize @resource_lock = Monitor.new @resource_value_blocker = @resource_lock.new_cond end def set_yet? !!@resource_lock.synchronize { defined? @resource } end def resource @resource_lock.synchronize do @resource_value_blocker.wait unless defined? @resource @resource end end def resource=(resource) @resource_lock.synchronize do raise ResourceAlreadySetException if defined? @resource @resource = resource @resource_value_blocker.broadcast @resource_value_blocker = nil # Don't really need it anymore. end end class ResourceAlreadySetException < StandardError def initialize super "Cannot set this resource twice!" end end end
require "thread" require "monitor" class FutureResource def initialize @resource_lock = Monitor.new @resource_value_blocker = @resource_lock.new_cond end def set_yet? !!@resource_lock.synchronize { defined? @resource } end def resource(timeout = nil) @resource_lock.synchronize do @resource_value_blocker.wait timeout unless defined? @resource @resource end end def resource=(resource) @resource_lock.synchronize do raise ResourceAlreadySetException if defined? @resource @resource = resource @resource_value_blocker.broadcast @resource_value_blocker = nil # Don't really need it anymore. end end class ResourceAlreadySetException < StandardError def initialize super "Cannot set this resource twice!" end end end
Allow setting a timeout on waiting for a resource
Allow setting a timeout on waiting for a resource
Ruby
mit
adhearsion/future-resource
ruby
## Code Before: require "thread" require "monitor" class FutureResource def initialize @resource_lock = Monitor.new @resource_value_blocker = @resource_lock.new_cond end def set_yet? !!@resource_lock.synchronize { defined? @resource } end def resource @resource_lock.synchronize do @resource_value_blocker.wait unless defined? @resource @resource end end def resource=(resource) @resource_lock.synchronize do raise ResourceAlreadySetException if defined? @resource @resource = resource @resource_value_blocker.broadcast @resource_value_blocker = nil # Don't really need it anymore. end end class ResourceAlreadySetException < StandardError def initialize super "Cannot set this resource twice!" end end end ## Instruction: Allow setting a timeout on waiting for a resource ## Code After: require "thread" require "monitor" class FutureResource def initialize @resource_lock = Monitor.new @resource_value_blocker = @resource_lock.new_cond end def set_yet? !!@resource_lock.synchronize { defined? @resource } end def resource(timeout = nil) @resource_lock.synchronize do @resource_value_blocker.wait timeout unless defined? @resource @resource end end def resource=(resource) @resource_lock.synchronize do raise ResourceAlreadySetException if defined? @resource @resource = resource @resource_value_blocker.broadcast @resource_value_blocker = nil # Don't really need it anymore. end end class ResourceAlreadySetException < StandardError def initialize super "Cannot set this resource twice!" end end end
3ec7f2cfe57989d7e69bbf4db4adcd984b160f02
test/test_projects/hello_world/test/basic_test.dart
test/test_projects/hello_world/test/basic_test.dart
import "package:test/test.dart"; void main() { group("String", () { test(".split() splits the string on the delimiter", () { var string = "foo,bar,baz"; expect(string.split(","), equals(["foo", "bar", "baz"])); }); test(".split() splits the string on the delimiter 2", () { expect("foo,bar,baz", allOf([contains("foo"), isNot(startsWith("bar")), endsWith("baz")])); }); test(".trim() removes surrounding whitespace", () { var string = " foo "; expect(string.trim(), equals("foo")); }); }); group("int", () { test(".remainder() returns the remainder of division", () { expect(11.remainder(3), equals(2)); }); test(".toRadixString() returns a hex string", () { expect(11.toRadixString(16), equals("b")); }); }); }
import "package:test/test.dart"; void main() { group("String", () { test(".split() splits the string on the delimiter", () { var string = "foo,bar,baz"; // BREAKPOINT1 expect(string.split(","), equals(["foo", "bar", "baz"])); }); test(".split() splits the string on the delimiter 2", () { expect("foo,bar,baz", allOf([contains("foo"), isNot(startsWith("bar")), endsWith("baz")])); }); test(".trim() removes surrounding whitespace", () { var string = " foo "; expect(string.trim(), equals("foo")); }); }); group("int", () { test(".remainder() returns the remainder of division", () { expect(11.remainder(3), equals(2)); }); test(".toRadixString() returns a hex string", () { expect(11.toRadixString(16), equals("b")); }); }); }
Add breakpoint marker for Dart tests
Add breakpoint marker for Dart tests
Dart
mit
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
dart
## Code Before: import "package:test/test.dart"; void main() { group("String", () { test(".split() splits the string on the delimiter", () { var string = "foo,bar,baz"; expect(string.split(","), equals(["foo", "bar", "baz"])); }); test(".split() splits the string on the delimiter 2", () { expect("foo,bar,baz", allOf([contains("foo"), isNot(startsWith("bar")), endsWith("baz")])); }); test(".trim() removes surrounding whitespace", () { var string = " foo "; expect(string.trim(), equals("foo")); }); }); group("int", () { test(".remainder() returns the remainder of division", () { expect(11.remainder(3), equals(2)); }); test(".toRadixString() returns a hex string", () { expect(11.toRadixString(16), equals("b")); }); }); } ## Instruction: Add breakpoint marker for Dart tests ## Code After: import "package:test/test.dart"; void main() { group("String", () { test(".split() splits the string on the delimiter", () { var string = "foo,bar,baz"; // BREAKPOINT1 expect(string.split(","), equals(["foo", "bar", "baz"])); }); test(".split() splits the string on the delimiter 2", () { expect("foo,bar,baz", allOf([contains("foo"), isNot(startsWith("bar")), endsWith("baz")])); }); test(".trim() removes surrounding whitespace", () { var string = " foo "; expect(string.trim(), equals("foo")); }); }); group("int", () { test(".remainder() returns the remainder of division", () { expect(11.remainder(3), equals(2)); }); test(".toRadixString() returns a hex string", () { expect(11.toRadixString(16), equals("b")); }); }); }
7fd1d437ca8c4f15c6d578fb9d58e6abd3dba736
README.rst
README.rst
====== Metron ====== Current analytics services supported: * Google Analytics * Mixpanel * gaug.es * Google AdWords Conversion Tracking
====== Metron ====== Current analytics services supported: * Google Analytics * Mixpanel * gaug.es * Google AdWords Conversion Tracking Documentation ------------- Documentation can be found online at http://metron.readthedocs.org/
Update readme with documentation link
Update readme with documentation link
reStructuredText
mit
pinax/metron,pinax/pinax-webanalytics,pinax/pinax-webanalytics,pinax/metron
restructuredtext
## Code Before: ====== Metron ====== Current analytics services supported: * Google Analytics * Mixpanel * gaug.es * Google AdWords Conversion Tracking ## Instruction: Update readme with documentation link ## Code After: ====== Metron ====== Current analytics services supported: * Google Analytics * Mixpanel * gaug.es * Google AdWords Conversion Tracking Documentation ------------- Documentation can be found online at http://metron.readthedocs.org/
5ac2a47a5cbb9b22028917aedd9f6e3b80871f24
etherpad-saver.sh
etherpad-saver.sh
URL=https://pad.riseup.net/p PAD=B7VT41OAfOe3 FORMAT=txt WGET_OPTS="-N --no-check-certificate -nd" LOCALDIR=(~/etherpad-saver/) wget $WGET_OPTS -P $LOCALDIR $URL/$PAD/export/$FORMAT ( cd $LOCALDIR git update-index -q --refresh if ! git diff-index --quiet HEAD --; then git add . git commit -a -m"Change detected - automatic commit" fi )
URL=https://pad.riseup.net/p PAD=B7VT41OAfOe3 FORMAT=txt WGET_OPTS="-N --no-check-certificate -nd" LOCALDIR=(~/etherpad-saver/) if [ ! -d $LOCALDIR ] ; then mkdir -p $LOCALDIR fi wget $WGET_OPTS -P $LOCALDIR $URL/$PAD/export/$FORMAT ( cd $LOCALDIR git update-index -q --refresh if ! git diff-index --quiet HEAD --; then git add . git commit -a -m"Change detected - automatic commit" fi )
Create if it doesn't exist already
Create if it doesn't exist already
Shell
unlicense
graphiclunarkid/etherpad-saver
shell
## Code Before: URL=https://pad.riseup.net/p PAD=B7VT41OAfOe3 FORMAT=txt WGET_OPTS="-N --no-check-certificate -nd" LOCALDIR=(~/etherpad-saver/) wget $WGET_OPTS -P $LOCALDIR $URL/$PAD/export/$FORMAT ( cd $LOCALDIR git update-index -q --refresh if ! git diff-index --quiet HEAD --; then git add . git commit -a -m"Change detected - automatic commit" fi ) ## Instruction: Create if it doesn't exist already ## Code After: URL=https://pad.riseup.net/p PAD=B7VT41OAfOe3 FORMAT=txt WGET_OPTS="-N --no-check-certificate -nd" LOCALDIR=(~/etherpad-saver/) if [ ! -d $LOCALDIR ] ; then mkdir -p $LOCALDIR fi wget $WGET_OPTS -P $LOCALDIR $URL/$PAD/export/$FORMAT ( cd $LOCALDIR git update-index -q --refresh if ! git diff-index --quiet HEAD --; then git add . git commit -a -m"Change detected - automatic commit" fi )
d3b09c092fb98a424e6a87269bcdb18d1bcbf405
app/views/addresses/_form.html.erb
app/views/addresses/_form.html.erb
<div> <%= form.label :full_name %>:<br> <%= form.text_field :full_name %> </div> <div> <%= form.label :email_address %>:<br> <%= form.email_field :email_address %> <small>We hate spam too!</small> </div> <div> <%= form.label :address_line_1 %>:<br> <%= form.text_field :address_line_1 %> </div> <div> <%= form.label :address_line_2 %>:<br> <%= form.text_field :address_line_2 %> </div> <div> <%= form.label :town_city, 'Town/city' %>:<br> <%= form.text_field :town_city %> </div> <div> <%= form.label :county %>:<br> <%= form.text_field :county %> </div> <div> <%= form.label :postcode %>:<br> <%= form.text_field :postcode %> </div> <p> Please contact us for a delivery quote if your country is not provided in the list below. </p> <div> <%= form.label :country_id %>:<br> <%= collection_select :address, :country_id, @w.shipping_countries, :id, :name %> </div> <div> <%= form.label :phone_number %>:<br> <%= form.phone_field :phone_number %> </div>
<div> <%= form.label :full_name %>:<br> <%= form.text_field :full_name, required: true %> </div> <div> <%= form.label :email_address %>:<br> <%= form.email_field :email_address, required: true %> <small>We hate spam too!</small> </div> <div> <%= form.label :address_line_1 %>:<br> <%= form.text_field :address_line_1, required: true %> </div> <div> <%= form.label :address_line_2 %>:<br> <%= form.text_field :address_line_2 %> </div> <div> <%= form.label :town_city, 'Town/city' %>:<br> <%= form.text_field :town_city, required: true %> </div> <div> <%= form.label :county %>:<br> <%= form.text_field :county %> </div> <div> <%= form.label :postcode %>:<br> <%= form.text_field :postcode, required: true %> </div> <p> Please contact us for a delivery quote if your country is not provided in the list below. </p> <div> <%= form.label :country_id %>:<br> <%= collection_select :address, :country_id, @w.shipping_countries, :id, :name %> </div> <div> <%= form.label :phone_number %>:<br> <%= form.phone_field :phone_number %> </div>
Use HTML5 required attribute in address form
Use HTML5 required attribute in address form
HTML+ERB
mit
ianfleeton/zmey,ianfleeton/zmey,ianfleeton/zmey,ianfleeton/zmey
html+erb
## Code Before: <div> <%= form.label :full_name %>:<br> <%= form.text_field :full_name %> </div> <div> <%= form.label :email_address %>:<br> <%= form.email_field :email_address %> <small>We hate spam too!</small> </div> <div> <%= form.label :address_line_1 %>:<br> <%= form.text_field :address_line_1 %> </div> <div> <%= form.label :address_line_2 %>:<br> <%= form.text_field :address_line_2 %> </div> <div> <%= form.label :town_city, 'Town/city' %>:<br> <%= form.text_field :town_city %> </div> <div> <%= form.label :county %>:<br> <%= form.text_field :county %> </div> <div> <%= form.label :postcode %>:<br> <%= form.text_field :postcode %> </div> <p> Please contact us for a delivery quote if your country is not provided in the list below. </p> <div> <%= form.label :country_id %>:<br> <%= collection_select :address, :country_id, @w.shipping_countries, :id, :name %> </div> <div> <%= form.label :phone_number %>:<br> <%= form.phone_field :phone_number %> </div> ## Instruction: Use HTML5 required attribute in address form ## Code After: <div> <%= form.label :full_name %>:<br> <%= form.text_field :full_name, required: true %> </div> <div> <%= form.label :email_address %>:<br> <%= form.email_field :email_address, required: true %> <small>We hate spam too!</small> </div> <div> <%= form.label :address_line_1 %>:<br> <%= form.text_field :address_line_1, required: true %> </div> <div> <%= form.label :address_line_2 %>:<br> <%= form.text_field :address_line_2 %> </div> <div> <%= form.label :town_city, 'Town/city' %>:<br> <%= form.text_field :town_city, required: true %> </div> <div> <%= form.label :county %>:<br> <%= form.text_field :county %> </div> <div> <%= form.label :postcode %>:<br> <%= form.text_field :postcode, required: true %> </div> <p> Please contact us for a delivery quote if your country is not provided in the list below. </p> <div> <%= form.label :country_id %>:<br> <%= collection_select :address, :country_id, @w.shipping_countries, :id, :name %> </div> <div> <%= form.label :phone_number %>:<br> <%= form.phone_field :phone_number %> </div>
e39b75ceb9f40e43e82956aea0161bf8373a8253
src/index.ts
src/index.ts
import { SandboxParameter } from './interfaces'; import nativeAddon from './nativeAddon'; import { SandboxProcess } from './sandboxProcess'; import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { throw new Error("Your linux kernel doesn't support memory-swap account. Please turn it on following the readme."); } const startSandbox = function (parameter: SandboxParameter) { return new Promise((res, rej) => { nativeAddon.StartChild(parameter, function (err, result) { if (err) rej(err); else res(new SandboxProcess(result.pid, parameter)); }); }); }; export { startSandbox };
import { SandboxParameter } from './interfaces'; import nativeAddon from './nativeAddon'; import { SandboxProcess } from './sandboxProcess'; import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { throw new Error("Your linux kernel doesn't support memory-swap account. Please turn it on following the readme."); } export async function startSandbox(parameter: SandboxParameter): Promise<SandboxProcess> { return new Promise<SandboxProcess>((res, rej) => { nativeAddon.StartChild(parameter, function (err, result) { if (err) rej(err); else res(new SandboxProcess(result.pid, parameter)); }); }); };
Add return type for startSandbox.
Add return type for startSandbox.
TypeScript
mit
t123yh/simple-sandbox,t123yh/simple-sandbox
typescript
## Code Before: import { SandboxParameter } from './interfaces'; import nativeAddon from './nativeAddon'; import { SandboxProcess } from './sandboxProcess'; import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { throw new Error("Your linux kernel doesn't support memory-swap account. Please turn it on following the readme."); } const startSandbox = function (parameter: SandboxParameter) { return new Promise((res, rej) => { nativeAddon.StartChild(parameter, function (err, result) { if (err) rej(err); else res(new SandboxProcess(result.pid, parameter)); }); }); }; export { startSandbox }; ## Instruction: Add return type for startSandbox. ## Code After: import { SandboxParameter } from './interfaces'; import nativeAddon from './nativeAddon'; import { SandboxProcess } from './sandboxProcess'; import { existsSync } from 'fs'; if (!existsSync('/sys/fs/cgroup/memory/memory.memsw.usage_in_bytes')) { throw new Error("Your linux kernel doesn't support memory-swap account. Please turn it on following the readme."); } export async function startSandbox(parameter: SandboxParameter): Promise<SandboxProcess> { return new Promise<SandboxProcess>((res, rej) => { nativeAddon.StartChild(parameter, function (err, result) { if (err) rej(err); else res(new SandboxProcess(result.pid, parameter)); }); }); };
27e807c83a0fd2acdaaf5384e313ed9b80cfc718
.travis.yml
.travis.yml
language: "ruby" script: "bundle exec rake ci" rvm: - 2.5.0 - 2.6.0 - 2.7.0 - jruby-9.2.12.0
language: "ruby" script: "bundle exec rake ci" rvm: - 2.5.8 - 2.6.6 - 2.7.1
Use latest patch versions of Ruby
CI: Use latest patch versions of Ruby
YAML
mit
savonrb/httpi
yaml
## Code Before: language: "ruby" script: "bundle exec rake ci" rvm: - 2.5.0 - 2.6.0 - 2.7.0 - jruby-9.2.12.0 ## Instruction: CI: Use latest patch versions of Ruby ## Code After: language: "ruby" script: "bundle exec rake ci" rvm: - 2.5.8 - 2.6.6 - 2.7.1
df2301e1c0d4403743918ad0e4fe7afab95efb4e
ghost/admin/app/controllers/application.js
ghost/admin/app/controllers/application.js
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {inject as service} from '@ember/service'; export default class ApplicationController extends Controller { @service billing; @service customViews; @service config; @service dropdown; @service router; @service session; @service settings; @service ui; get showBilling() { return this.config.get('hostSettings.billing.enabled'); } get showNavMenu() { // if we're in fullscreen mode don't show the nav menu if (this.ui.isFullScreen) { return false; } // we need to defer showing the navigation menu until the session.user // promise has fulfilled so that gh-user-can-admin has the correct data if (!this.session.isAuthenticated || !this.session.user.isFulfilled) { return false; } return (this.router.currentRouteName !== 'error404' || this.session.isAuthenticated) && !this.router.currentRouteName.match(/(signin|signup|setup|reset)/); } }
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; export default Controller.extend({ billing: service(), customViews: service(), config: service(), dropdown: service(), router: service(), session: service(), settings: service(), ui: service(), showBilling: computed.reads('config.hostSettings.billing.enabled'), showNavMenu: computed('router.currentRouteName', 'session.{isAuthenticated,user.isFulfilled}', 'ui.isFullScreen', function () { let {router, session, ui} = this; // if we're in fullscreen mode don't show the nav menu if (ui.isFullScreen) { return false; } // we need to defer showing the navigation menu until the session.user // promise has fulfilled so that gh-user-can-admin has the correct data if (!session.isAuthenticated || !session.user.isFulfilled) { return false; } return (router.currentRouteName !== 'error404' || session.isAuthenticated) && !router.currentRouteName.match(/(signin|signup|setup|reset)/); }) });
Revert "Refactored ApplicationController to use native class"
Revert "Refactored ApplicationController to use native class" This reverts commit 9b6d4822e72425ceec192723f4d469060afe1ea5. - there is an issue with properties not being tracked correctly and the menu not being shown when returning from the editor - reverting to working version with computed properties for now
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
javascript
## Code Before: /* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {inject as service} from '@ember/service'; export default class ApplicationController extends Controller { @service billing; @service customViews; @service config; @service dropdown; @service router; @service session; @service settings; @service ui; get showBilling() { return this.config.get('hostSettings.billing.enabled'); } get showNavMenu() { // if we're in fullscreen mode don't show the nav menu if (this.ui.isFullScreen) { return false; } // we need to defer showing the navigation menu until the session.user // promise has fulfilled so that gh-user-can-admin has the correct data if (!this.session.isAuthenticated || !this.session.user.isFulfilled) { return false; } return (this.router.currentRouteName !== 'error404' || this.session.isAuthenticated) && !this.router.currentRouteName.match(/(signin|signup|setup|reset)/); } } ## Instruction: Revert "Refactored ApplicationController to use native class" This reverts commit 9b6d4822e72425ceec192723f4d469060afe1ea5. - there is an issue with properties not being tracked correctly and the menu not being shown when returning from the editor - reverting to working version with computed properties for now ## Code After: /* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; export default Controller.extend({ billing: service(), customViews: service(), config: service(), dropdown: service(), router: service(), session: service(), settings: service(), ui: service(), showBilling: computed.reads('config.hostSettings.billing.enabled'), showNavMenu: computed('router.currentRouteName', 'session.{isAuthenticated,user.isFulfilled}', 'ui.isFullScreen', function () { let {router, session, ui} = this; // if we're in fullscreen mode don't show the nav menu if (ui.isFullScreen) { return false; } // we need to defer showing the navigation menu until the session.user // promise has fulfilled so that gh-user-can-admin has the correct data if (!session.isAuthenticated || !session.user.isFulfilled) { return false; } return (router.currentRouteName !== 'error404' || session.isAuthenticated) && !router.currentRouteName.match(/(signin|signup|setup|reset)/); }) });
94701f09422ed9536463afc7dc2e48463af2301e
app/config/config.js
app/config/config.js
const dotenv = require('dotenv'); dotenv.config({silent: true}); const config = { "development": { "username": process.env.DB_DEV_USER, "password": process.env.DB_DEV_PASS, "database": process.env.DB_DEV_NAME, "host": process.env.DB_DEV_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres" }, "test": { "username": process.env.DB_TEST_USER, "password": process.env.DB_TEST_PASS, "database": process.env.DB_TEST_NAME, "host": process.env.DB_TEST_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", "logging": false }, "production": { "username": process.env.DB_USER, "password": process.env.DB_PASS, "database": process.env.DB_NAME, "host": process.env.DB_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", "logging": false } }; if(process.env.NODE_ENV === 'production'){ module.exports = config.production; }else if(process.env.NODE_ENV === 'test'){ module.exports = config.test; }else{ module.exports = config.development; }
const dotenv = require('dotenv'); dotenv.config({silent: true}); const config = { "development": { "username": process.env.DB_DEV_USER, "password": process.env.DB_DEV_PASS, "database": process.env.DB_DEV_NAME, "host": process.env.DB_DEV_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres" }, "test": { "username": process.env.DB_TEST_USER, "password": process.env.DB_TEST_PASS, "database": process.env.DB_TEST_NAME, "host": process.env.DB_TEST_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", }, "production": { "username": process.env.DB_USER, "password": process.env.DB_PASS, "database": process.env.DB_NAME, "host": process.env.DB_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", "logging": false } }; if(process.env.NODE_ENV === 'production'){ module.exports = config.production; }else if(process.env.NODE_ENV === 'test'){ module.exports = config.test; }else{ module.exports = config.development; }
Enable logging for test environment
Enable logging for test environment
JavaScript
mit
cyrielo/document-manager
javascript
## Code Before: const dotenv = require('dotenv'); dotenv.config({silent: true}); const config = { "development": { "username": process.env.DB_DEV_USER, "password": process.env.DB_DEV_PASS, "database": process.env.DB_DEV_NAME, "host": process.env.DB_DEV_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres" }, "test": { "username": process.env.DB_TEST_USER, "password": process.env.DB_TEST_PASS, "database": process.env.DB_TEST_NAME, "host": process.env.DB_TEST_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", "logging": false }, "production": { "username": process.env.DB_USER, "password": process.env.DB_PASS, "database": process.env.DB_NAME, "host": process.env.DB_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", "logging": false } }; if(process.env.NODE_ENV === 'production'){ module.exports = config.production; }else if(process.env.NODE_ENV === 'test'){ module.exports = config.test; }else{ module.exports = config.development; } ## Instruction: Enable logging for test environment ## Code After: const dotenv = require('dotenv'); dotenv.config({silent: true}); const config = { "development": { "username": process.env.DB_DEV_USER, "password": process.env.DB_DEV_PASS, "database": process.env.DB_DEV_NAME, "host": process.env.DB_DEV_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres" }, "test": { "username": process.env.DB_TEST_USER, "password": process.env.DB_TEST_PASS, "database": process.env.DB_TEST_NAME, "host": process.env.DB_TEST_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", }, "production": { "username": process.env.DB_USER, "password": process.env.DB_PASS, "database": process.env.DB_NAME, "host": process.env.DB_HOST, "secrete": process.env.AUTH_SECRETE, "dialect": "postgres", "logging": false } }; if(process.env.NODE_ENV === 'production'){ module.exports = config.production; }else if(process.env.NODE_ENV === 'test'){ module.exports = config.test; }else{ module.exports = config.development; }
a9b225d033d0462f47e4adecef2ef90fc0bf2318
docs/conf.py
docs/conf.py
import os import sys sys.path.insert(0, os.path.dirname(__file__)) from gravity import __version__ # noqa: E402 project = 'Gravity' copyright = '2022, The Galaxy Project' author = 'The Galaxy Project' release = '__version__' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'alabaster' html_static_path = ['_static']
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) from gravity import __version__ # noqa: E402 project = 'Gravity' copyright = '2022, The Galaxy Project' author = 'The Galaxy Project' release = '__version__' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'alabaster' html_static_path = ['_static']
Correct path to parent dir
Correct path to parent dir
Python
mit
galaxyproject/gravity
python
## Code Before: import os import sys sys.path.insert(0, os.path.dirname(__file__)) from gravity import __version__ # noqa: E402 project = 'Gravity' copyright = '2022, The Galaxy Project' author = 'The Galaxy Project' release = '__version__' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'alabaster' html_static_path = ['_static'] ## Instruction: Correct path to parent dir ## Code After: import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) from gravity import __version__ # noqa: E402 project = 'Gravity' copyright = '2022, The Galaxy Project' author = 'The Galaxy Project' release = '__version__' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output html_theme = 'alabaster' html_static_path = ['_static']
2f20b84c4b037a78a56ddb590afa080dc1351e6c
_posts/2016-10-27-celery-笔记-.markdown
_posts/2016-10-27-celery-笔记-.markdown
--- layout: post title: "celery 笔记\_" tagline: 架构 category: null tags: [] published: true --- ## 架构 笔记## ###Nginx ### ![nginx](http://www.rowkey.me/images/blog_images/nginx/ngx_arch.jpg)
--- layout: post title: "celery 笔记\_" tagline: 架构 category: null tags: [] published: true --- ## 架构 笔记## ###Nginx ### ![nginx](http://www.rowkey.me/images/blog_images/nginx/ngx_arch.jpg) * 一个 master 进程负责分配工作 worker进程则是处理基本的网络事件。多个worker进程之间是对等的,他们同等竞争来自客户端的请求,各进程互相之间是独立的。一个请求,只可能在一个worker进程中处理,一个worker进程,不可能处理其它进程的请求。 开发模型:epoll和kqueue。 支持的事件机制:kqueue、epoll、rt signals、/dev/poll 、event ports、select以及poll。
Update by gitblog.io at 11/22/2016, 11:04:15 AM
Update by gitblog.io at 11/22/2016, 11:04:15 AM
Markdown
apache-2.0
rtx3/rtx3.github.io,rtx3/rtx3.github.io
markdown
## Code Before: --- layout: post title: "celery 笔记\_" tagline: 架构 category: null tags: [] published: true --- ## 架构 笔记## ###Nginx ### ![nginx](http://www.rowkey.me/images/blog_images/nginx/ngx_arch.jpg) ## Instruction: Update by gitblog.io at 11/22/2016, 11:04:15 AM ## Code After: --- layout: post title: "celery 笔记\_" tagline: 架构 category: null tags: [] published: true --- ## 架构 笔记## ###Nginx ### ![nginx](http://www.rowkey.me/images/blog_images/nginx/ngx_arch.jpg) * 一个 master 进程负责分配工作 worker进程则是处理基本的网络事件。多个worker进程之间是对等的,他们同等竞争来自客户端的请求,各进程互相之间是独立的。一个请求,只可能在一个worker进程中处理,一个worker进程,不可能处理其它进程的请求。 开发模型:epoll和kqueue。 支持的事件机制:kqueue、epoll、rt signals、/dev/poll 、event ports、select以及poll。
00b0502150bcbf6b50a6fd0695f0f8df03ebd790
filterChecksumAlgos.go
filterChecksumAlgos.go
package main import "crypto" import "strings" // Checksum algos import ( _ "crypto/md5" _ "crypto/sha1" _ "crypto/sha256" _ "crypto/sha512" ) // Man, why don't people allow their table to be exported... var checksumLookupTable = map[string]crypto.Hash{ "md5": crypto.MD5, "sha1": crypto.SHA1, "sha256": crypto.SHA256, "sha256sum": crypto.SHA256, "sha512": crypto.SHA512, } var checksumAlgos = map[string]crypto.Hash{} func filterChecksumAlgos() { i := strings.Split(checksums, ",") var j = map[string]crypto.Hash{} for _, checksum := range i { if checksumLookupTable[checksum].Available() == false { Error.Fatalln("Unsupported checksum algorithm: " + checksum) } j[checksum] = checksumLookupTable[checksum] } checksumLookupTable = j }
package main import "crypto" import "strings" // Checksum algos import ( _ "crypto/md5" _ "crypto/sha1" _ "crypto/sha256" _ "crypto/sha512" ) // Man, why don't people allow their table to be exported... var checksumLookupTable = map[string]crypto.Hash{ "md5": crypto.MD5, "sha1": crypto.SHA1, "sha256": crypto.SHA256, "sha512": crypto.SHA512, } var checksumAlgos = map[string]crypto.Hash{} func filterChecksumAlgos() { i := strings.Split(checksums, ",") var j = map[string]crypto.Hash{} for _, checksum := range i { if checksumLookupTable[checksum].Available() == false { Error.Fatalln("Unsupported checksum algorithm: " + checksum) } j[checksum] = checksumLookupTable[checksum] } checksumLookupTable = j }
Format mismatch, can not use historic node name
Format mismatch, can not use historic node name
Go
mit
kormoc/bitrot-scanner
go
## Code Before: package main import "crypto" import "strings" // Checksum algos import ( _ "crypto/md5" _ "crypto/sha1" _ "crypto/sha256" _ "crypto/sha512" ) // Man, why don't people allow their table to be exported... var checksumLookupTable = map[string]crypto.Hash{ "md5": crypto.MD5, "sha1": crypto.SHA1, "sha256": crypto.SHA256, "sha256sum": crypto.SHA256, "sha512": crypto.SHA512, } var checksumAlgos = map[string]crypto.Hash{} func filterChecksumAlgos() { i := strings.Split(checksums, ",") var j = map[string]crypto.Hash{} for _, checksum := range i { if checksumLookupTable[checksum].Available() == false { Error.Fatalln("Unsupported checksum algorithm: " + checksum) } j[checksum] = checksumLookupTable[checksum] } checksumLookupTable = j } ## Instruction: Format mismatch, can not use historic node name ## Code After: package main import "crypto" import "strings" // Checksum algos import ( _ "crypto/md5" _ "crypto/sha1" _ "crypto/sha256" _ "crypto/sha512" ) // Man, why don't people allow their table to be exported... var checksumLookupTable = map[string]crypto.Hash{ "md5": crypto.MD5, "sha1": crypto.SHA1, "sha256": crypto.SHA256, "sha512": crypto.SHA512, } var checksumAlgos = map[string]crypto.Hash{} func filterChecksumAlgos() { i := strings.Split(checksums, ",") var j = map[string]crypto.Hash{} for _, checksum := range i { if checksumLookupTable[checksum].Available() == false { Error.Fatalln("Unsupported checksum algorithm: " + checksum) } j[checksum] = checksumLookupTable[checksum] } checksumLookupTable = j }
cc18a6d0fdb83a05a7e47c52fc0405ba63082616
src/main/web/florence/js/functions/_handleApiError.js
src/main/web/florence/js/functions/_handleApiError.js
function handleApiError(response) { if(!response || response.status === 200) return; if(response.status === 403 || response.status === 401) { logout(); } else { console.log('An error has occurred, please contact an administrator. ' + response.responseText); alert(response.responseText); } }
function handleApiError(response) { if(!response || response.status === 200) return; if(response.status === 403 || response.status === 401) { logout(); } else { console.log('An error has occurred, please contact an administrator. ' + response.responseText); alert('An error has occurred, please contact an administrator. ' + response.responseText); } }
Add friendly error in alert box when an error occurs.
Add friendly error in alert box when an error occurs.
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
javascript
## Code Before: function handleApiError(response) { if(!response || response.status === 200) return; if(response.status === 403 || response.status === 401) { logout(); } else { console.log('An error has occurred, please contact an administrator. ' + response.responseText); alert(response.responseText); } } ## Instruction: Add friendly error in alert box when an error occurs. ## Code After: function handleApiError(response) { if(!response || response.status === 200) return; if(response.status === 403 || response.status === 401) { logout(); } else { console.log('An error has occurred, please contact an administrator. ' + response.responseText); alert('An error has occurred, please contact an administrator. ' + response.responseText); } }
468354d562944ca8552782b2eb33602509c38bc9
config/sphinx.yml
config/sphinx.yml
development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 cucumber: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
Add stuff for cucumber environment.
Add stuff for cucumber environment.
YAML
apache-2.0
lincompch/stizun,sabcio/stizun,lincompch/stizun,sabcio/stizun,lincompch/stizun,lincompch/stizun,sabcio/stizun,lincompch/stizun,sabcio/stizun
yaml
## Code Before: development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000 ## Instruction: Add stuff for cucumber environment. ## Code After: development: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9312 test: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 cucumber: enable_star: true min_prefix_len: 3 max_matches: 100000 port: 9313 production: enable_star: true min_prefix_len: 3 max_matches: 100000
71704f6e3171b0871814cdd946cde775f6bd7a1d
README.md
README.md
Fluid ViewHelper Schema Generator ================================= [![Build Status](https://img.shields.io/travis/NamelessCoder/TYPO3.Fluid.SchemaGenerator.svg?branch=master&style=flat-square)](https://travis-ci.org/NamelessCoder/TYPO3.Fluid.SchemaGenerator) [![Coverage](https://img.shields.io/coveralls/NamelessCoder/TYPO3.Fluid.SchemaGenerator.svg?branch=master&style=flat-square)](https://coveralls.io/r/NamelessCoder/TYPO3.Fluid.SchemaGenerator) Generates nice XSD schemas for (X)HTML files which can be used in editors to enable autocompletion of Fluid template code. Can generate schemas for the official as well as any of your own packages which provide ViewHelpers. Installation ------------ ```bash composer require typo3/fluid-schema-generator ``` Usage ----- ```bash ./vendor/bin/generateschema VendorName\\PackageName VendorName\\OptionalSecondPackage > schema.xsd ``` Provide as many package namespaces as desired and all ViewHelper classes in all those namespaces will be included in the schame. The *first* provided namespace gets used when determining the XSD namespace URL.
Fluid ViewHelper Schema Generator ================================= [![Build Status](https://travis-ci.org/TYPO3/Fluid.SchemaGenerator.svg?branch=master)](https://travis-ci.org/TYPO3/Fluid.SchemaGenerator) [![Coverage](https://img.shields.io/coveralls/NamelessCoder/TYPO3.Fluid.SchemaGenerator.svg?branch=master&style=flat-square)](https://coveralls.io/r/NamelessCoder/TYPO3.Fluid.SchemaGenerator) Generates nice XSD schemas for (X)HTML files which can be used in editors to enable autocompletion of Fluid template code. Can generate schemas for the official as well as any of your own packages which provide ViewHelpers. Installation ------------ ```bash composer require typo3/fluid-schema-generator ``` Usage ----- ```bash ./vendor/bin/generateschema VendorName\\PackageName VendorName\\OptionalSecondPackage > schema.xsd ``` Provide as many package namespaces as desired and all ViewHelper classes in all those namespaces will be included in the schame. The *first* provided namespace gets used when determining the XSD namespace URL.
Update travis-ci build status image
Update travis-ci build status image
Markdown
mit
NamelessCoder/TYPO3.Fluid.SchemaGenerator
markdown
## Code Before: Fluid ViewHelper Schema Generator ================================= [![Build Status](https://img.shields.io/travis/NamelessCoder/TYPO3.Fluid.SchemaGenerator.svg?branch=master&style=flat-square)](https://travis-ci.org/NamelessCoder/TYPO3.Fluid.SchemaGenerator) [![Coverage](https://img.shields.io/coveralls/NamelessCoder/TYPO3.Fluid.SchemaGenerator.svg?branch=master&style=flat-square)](https://coveralls.io/r/NamelessCoder/TYPO3.Fluid.SchemaGenerator) Generates nice XSD schemas for (X)HTML files which can be used in editors to enable autocompletion of Fluid template code. Can generate schemas for the official as well as any of your own packages which provide ViewHelpers. Installation ------------ ```bash composer require typo3/fluid-schema-generator ``` Usage ----- ```bash ./vendor/bin/generateschema VendorName\\PackageName VendorName\\OptionalSecondPackage > schema.xsd ``` Provide as many package namespaces as desired and all ViewHelper classes in all those namespaces will be included in the schame. The *first* provided namespace gets used when determining the XSD namespace URL. ## Instruction: Update travis-ci build status image ## Code After: Fluid ViewHelper Schema Generator ================================= [![Build Status](https://travis-ci.org/TYPO3/Fluid.SchemaGenerator.svg?branch=master)](https://travis-ci.org/TYPO3/Fluid.SchemaGenerator) [![Coverage](https://img.shields.io/coveralls/NamelessCoder/TYPO3.Fluid.SchemaGenerator.svg?branch=master&style=flat-square)](https://coveralls.io/r/NamelessCoder/TYPO3.Fluid.SchemaGenerator) Generates nice XSD schemas for (X)HTML files which can be used in editors to enable autocompletion of Fluid template code. Can generate schemas for the official as well as any of your own packages which provide ViewHelpers. Installation ------------ ```bash composer require typo3/fluid-schema-generator ``` Usage ----- ```bash ./vendor/bin/generateschema VendorName\\PackageName VendorName\\OptionalSecondPackage > schema.xsd ``` Provide as many package namespaces as desired and all ViewHelper classes in all those namespaces will be included in the schame. The *first* provided namespace gets used when determining the XSD namespace URL.
18f910868404d1f1cf7b41767341cab7d1d311cd
.travis.yml
.travis.yml
language: "perl" perl: - "5.18" - "5.16" - "5.14" before_install: - cpanm Test::Pod # optional dependency install: - cpanm -v --installdeps --notest --mirror http://cpan.mirrors.travis-ci.org . script: - perl Makefile.PL - make test # branches: # only: # - master notifications: recipients: - [email protected] - [email protected] email: on_success: change on_failure: always #env:
language: "perl" perl: - "5.18" - "5.16" - "5.14" before_install: - cpanm Test::Pod # optional dependency install: # - cpanm -v --installdeps --notest --mirror http://cpan.mirrors.travis-ci.org . - cpanm -v --installdeps --notest script: - perl Makefile.PL - make test # branches: # only: # - master notifications: recipients: - [email protected] - [email protected] email: on_success: change on_failure: always #env:
Disable Travis CI CPAN mirror, which seems to be borked
Disable Travis CI CPAN mirror, which seems to be borked
YAML
artistic-2.0
letolabs/app-parrot-create
yaml
## Code Before: language: "perl" perl: - "5.18" - "5.16" - "5.14" before_install: - cpanm Test::Pod # optional dependency install: - cpanm -v --installdeps --notest --mirror http://cpan.mirrors.travis-ci.org . script: - perl Makefile.PL - make test # branches: # only: # - master notifications: recipients: - [email protected] - [email protected] email: on_success: change on_failure: always #env: ## Instruction: Disable Travis CI CPAN mirror, which seems to be borked ## Code After: language: "perl" perl: - "5.18" - "5.16" - "5.14" before_install: - cpanm Test::Pod # optional dependency install: # - cpanm -v --installdeps --notest --mirror http://cpan.mirrors.travis-ci.org . - cpanm -v --installdeps --notest script: - perl Makefile.PL - make test # branches: # only: # - master notifications: recipients: - [email protected] - [email protected] email: on_success: change on_failure: always #env:
76fb3d9777caf67f6fc5a1a94f6b9ab4f8cd3a8f
src/PhpGenerator/Constant/ConstantType.php
src/PhpGenerator/Constant/ConstantType.php
<?php namespace ModuleGenerator\PhpGenerator\Constant; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Validator\Constraints\NotBlank; final class ConstantType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add( 'name', TextType::class, [ 'label' => 'Name', 'required' => true, 'constraints' => [ new NotBlank(), ], ] )->add( 'value', $options['type_class_name'], [ 'label' => $options['value_label'], 'required' => true, 'constraints' => $options['value_constraints'], ] ); } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults( [ 'data_class' => ConstantDataTransferObject::class, 'label' => 'Constant', 'required' => true, 'value_label' => 'Value', 'value_constraints' => [ new NotBlank(), ], ] ); } }
<?php namespace ModuleGenerator\PhpGenerator\Constant; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Validator\Constraints\NotBlank; final class ConstantType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add( 'name', TextType::class, [ 'label' => 'Name', 'required' => true, 'constraints' => [ new NotBlank(), ], ] )->add( 'value', $options['value_type_class_name'], [ 'label' => $options['value_label'], 'required' => true, 'constraints' => $options['value_constraints'], ] ); } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults( [ 'data_class' => ConstantDataTransferObject::class, 'label' => 'Constant', 'required' => true, 'value_type_class_name' => TextType::class, 'value_label' => 'Value', 'value_constraints' => [ new NotBlank(), ], ] ); } }
Configure mission form type option
Configure mission form type option
PHP
mit
carakas/fork-cms-module-generator,carakas/fork-cms-module-generator,carakas/fork-cms-module-generator
php
## Code Before: <?php namespace ModuleGenerator\PhpGenerator\Constant; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Validator\Constraints\NotBlank; final class ConstantType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add( 'name', TextType::class, [ 'label' => 'Name', 'required' => true, 'constraints' => [ new NotBlank(), ], ] )->add( 'value', $options['type_class_name'], [ 'label' => $options['value_label'], 'required' => true, 'constraints' => $options['value_constraints'], ] ); } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults( [ 'data_class' => ConstantDataTransferObject::class, 'label' => 'Constant', 'required' => true, 'value_label' => 'Value', 'value_constraints' => [ new NotBlank(), ], ] ); } } ## Instruction: Configure mission form type option ## Code After: <?php namespace ModuleGenerator\PhpGenerator\Constant; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Validator\Constraints\NotBlank; final class ConstantType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add( 'name', TextType::class, [ 'label' => 'Name', 'required' => true, 'constraints' => [ new NotBlank(), ], ] )->add( 'value', $options['value_type_class_name'], [ 'label' => $options['value_label'], 'required' => true, 'constraints' => $options['value_constraints'], ] ); } public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults( [ 'data_class' => ConstantDataTransferObject::class, 'label' => 'Constant', 'required' => true, 'value_type_class_name' => TextType::class, 'value_label' => 'Value', 'value_constraints' => [ new NotBlank(), ], ] ); } }
1cf3d33d29742d1299893acbf7c30eeea566c429
extensions/smallrye-graphql-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml
extensions/smallrye-graphql-client/runtime/src/main/resources/META-INF/quarkus-extension.yaml
--- name: "SmallRye GraphQL Client" metadata: short-name: "graphql-client" keywords: - "smallrye-graphql" - "graphql" - "graphql-client" - "microprofile-graphql" guide: "https://quarkus.io/guides/smallrye-graphql-client" status: "preview"
--- name: "SmallRye GraphQL Client" metadata: short-name: "graphql-client" keywords: - "smallrye-graphql" - "graphql" - "graphql-client" - "microprofile-graphql" categories: - "web" guide: "https://quarkus.io/guides/smallrye-graphql-client" status: "preview"
Add a category to SmallRye GraphQL Client
Add a category to SmallRye GraphQL Client Without that, it doesn't appear on code.quarkus.io.
YAML
apache-2.0
quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus
yaml
## Code Before: --- name: "SmallRye GraphQL Client" metadata: short-name: "graphql-client" keywords: - "smallrye-graphql" - "graphql" - "graphql-client" - "microprofile-graphql" guide: "https://quarkus.io/guides/smallrye-graphql-client" status: "preview" ## Instruction: Add a category to SmallRye GraphQL Client Without that, it doesn't appear on code.quarkus.io. ## Code After: --- name: "SmallRye GraphQL Client" metadata: short-name: "graphql-client" keywords: - "smallrye-graphql" - "graphql" - "graphql-client" - "microprofile-graphql" categories: - "web" guide: "https://quarkus.io/guides/smallrye-graphql-client" status: "preview"
b97fb7dca361812dd056f1b949b8dd04e1d43e41
db/seeds.rb
db/seeds.rb
AdminSet.find_or_create_default_admin_set_id if Rails.env.development? users = ['[email protected]', '[email protected]', '[email protected]'] users.each do |email| User.where(email: email).first_or_create do |user| user.password = 'testing123' user.approved = true end end end
AdminSet.find_or_create_default_admin_set_id if Rails.env.development? users = ['[email protected]', '[email protected]', '[email protected]'] users.each do |email| User.where(email: email).first_or_create do |user| user.password = 'testing123' user.approved = true end end class WorkFactory def actor_create(attributes:, work_class: Vdc::Resource) user = User.find_by(email: '[email protected]') ability = Ability.new(user) work = work_class.new env = Hyrax::Actors::Environment.new(work, ability, attributes) Hyrax::CurationConcern.actor.create(env) end end factory = WorkFactory.new factory.actor_create(attributes: { title: ['Test'] }) end
Introduce a seed for a test `Vdc::Resource`
Introduce a seed for a test `Vdc::Resource` Creates a test `Vdc::Resource` when `rake db:seeds` is run.
Ruby
apache-2.0
dibbs-vdc/ccql,dibbs-vdc/ccql,dibbs-vdc/ccql,dibbs-vdc/ccql
ruby
## Code Before: AdminSet.find_or_create_default_admin_set_id if Rails.env.development? users = ['[email protected]', '[email protected]', '[email protected]'] users.each do |email| User.where(email: email).first_or_create do |user| user.password = 'testing123' user.approved = true end end end ## Instruction: Introduce a seed for a test `Vdc::Resource` Creates a test `Vdc::Resource` when `rake db:seeds` is run. ## Code After: AdminSet.find_or_create_default_admin_set_id if Rails.env.development? users = ['[email protected]', '[email protected]', '[email protected]'] users.each do |email| User.where(email: email).first_or_create do |user| user.password = 'testing123' user.approved = true end end class WorkFactory def actor_create(attributes:, work_class: Vdc::Resource) user = User.find_by(email: '[email protected]') ability = Ability.new(user) work = work_class.new env = Hyrax::Actors::Environment.new(work, ability, attributes) Hyrax::CurationConcern.actor.create(env) end end factory = WorkFactory.new factory.actor_create(attributes: { title: ['Test'] }) end
1c33ad3e59f1d39bd2d4749e70dca9626c0d6ea9
hackerrank/ClimbingTheLaderboard.hs
hackerrank/ClimbingTheLaderboard.hs
-- https://www.hackerrank.com/challenges/climbing-the-leaderboard/problem -- How to run: stack runhaskell ClimbingTheLaderboard.hs import Control.Exception.Base(assert) import qualified Data.Set as Set readScores :: Int -> IO([Int]) readScores size = do line <- getLine let leaderboard = map (read :: String -> Int) $ words line assert (size == length leaderboard) (return leaderboard) rankScore :: [Int] -> [Int] -> Int -> ([Int], Int) rankScore initial [] score = (initial ++ [score], length initial) rankScore initial (x:xs) score | score > x = (initial ++ score:x:xs, length initial) | score == x = (initial ++ x:xs, length initial) | score < x = rankScore (initial ++ [x]) xs score getRanks :: [Int] -> [Int] -> [Int] -> [Int] getRanks leaderboard [] ranks = ranks getRanks leaderboard (score:scores) ranks = let (newLeaderboard, rank) = rankScore [] leaderboard score in getRanks newLeaderboard scores (ranks ++ [rank]) main = do leaderboardSize <- readLn :: IO Int leaderboard <- readScores leaderboardSize aliceGamesSize <- readLn :: IO Int aliceGames <- readScores aliceGamesSize let leaderboardNoDuplicates = (Set.toDescList . Set.fromDescList) leaderboard let aliceRanks = getRanks leaderboardNoDuplicates aliceGames [] let correctedIndicesRanks = map (+1) aliceRanks mapM_ print correctedIndicesRanks
-- https://www.hackerrank.com/challenges/climbing-the-leaderboard/problem -- How to run: stack runhaskell ClimbingTheLaderboard.hs import Control.Exception.Base(assert) import qualified Data.Set as Set readScores :: Int -> IO([Int]) readScores size = do line <- getLine let leaderboard = map (read :: String -> Int) $ words line assert (size == length leaderboard) (return leaderboard) getRanks :: [Int] -> [Int] -> Int -> [Int] getRanks [] scores index = replicate (length scores) index getRanks leaderboard [] index = [] getRanks (x:xs) (score:scores) index | score < x = getRanks xs (score:scores) (index + 1) | score == x = index:getRanks (x:xs) scores index | score > x = index:getRanks (x:xs) scores index main = do leaderboardSize <- readLn :: IO Int leaderboard <- readScores leaderboardSize let leaderboardSet = (Set.toDescList . Set.fromDescList) leaderboard aliceGamesSize <- readLn :: IO Int aliceGames <- readScores aliceGamesSize let aliceGamesDesc = reverse aliceGames let aliceRanks = getRanks leaderboardSet aliceGamesDesc 0 let correctedIndicesRanks = map (+1) $ reverse aliceRanks mapM_ print correctedIndicesRanks
Improve solution to O(n) complexity.
Improve solution to O(n) complexity.
Haskell
mit
julianespinel/training,julianespinel/trainning,julianespinel/trainning,julianespinel/training,julianespinel/training,julianespinel/training
haskell
## Code Before: -- https://www.hackerrank.com/challenges/climbing-the-leaderboard/problem -- How to run: stack runhaskell ClimbingTheLaderboard.hs import Control.Exception.Base(assert) import qualified Data.Set as Set readScores :: Int -> IO([Int]) readScores size = do line <- getLine let leaderboard = map (read :: String -> Int) $ words line assert (size == length leaderboard) (return leaderboard) rankScore :: [Int] -> [Int] -> Int -> ([Int], Int) rankScore initial [] score = (initial ++ [score], length initial) rankScore initial (x:xs) score | score > x = (initial ++ score:x:xs, length initial) | score == x = (initial ++ x:xs, length initial) | score < x = rankScore (initial ++ [x]) xs score getRanks :: [Int] -> [Int] -> [Int] -> [Int] getRanks leaderboard [] ranks = ranks getRanks leaderboard (score:scores) ranks = let (newLeaderboard, rank) = rankScore [] leaderboard score in getRanks newLeaderboard scores (ranks ++ [rank]) main = do leaderboardSize <- readLn :: IO Int leaderboard <- readScores leaderboardSize aliceGamesSize <- readLn :: IO Int aliceGames <- readScores aliceGamesSize let leaderboardNoDuplicates = (Set.toDescList . Set.fromDescList) leaderboard let aliceRanks = getRanks leaderboardNoDuplicates aliceGames [] let correctedIndicesRanks = map (+1) aliceRanks mapM_ print correctedIndicesRanks ## Instruction: Improve solution to O(n) complexity. ## Code After: -- https://www.hackerrank.com/challenges/climbing-the-leaderboard/problem -- How to run: stack runhaskell ClimbingTheLaderboard.hs import Control.Exception.Base(assert) import qualified Data.Set as Set readScores :: Int -> IO([Int]) readScores size = do line <- getLine let leaderboard = map (read :: String -> Int) $ words line assert (size == length leaderboard) (return leaderboard) getRanks :: [Int] -> [Int] -> Int -> [Int] getRanks [] scores index = replicate (length scores) index getRanks leaderboard [] index = [] getRanks (x:xs) (score:scores) index | score < x = getRanks xs (score:scores) (index + 1) | score == x = index:getRanks (x:xs) scores index | score > x = index:getRanks (x:xs) scores index main = do leaderboardSize <- readLn :: IO Int leaderboard <- readScores leaderboardSize let leaderboardSet = (Set.toDescList . Set.fromDescList) leaderboard aliceGamesSize <- readLn :: IO Int aliceGames <- readScores aliceGamesSize let aliceGamesDesc = reverse aliceGames let aliceRanks = getRanks leaderboardSet aliceGamesDesc 0 let correctedIndicesRanks = map (+1) $ reverse aliceRanks mapM_ print correctedIndicesRanks
931dde64ed0cfe281ac175796b3830a24fcc0156
app-backend/database/src/main/scala/com/azavea/rf/database/Database.scala
app-backend/database/src/main/scala/com/azavea/rf/database/Database.scala
package com.azavea.rf.database import com.zaxxer.hikari.{HikariConfig, HikariDataSource} /** * PostGIS Database for Raster Foundry data * * @param jdbcUrl connection url for JDBC * @param dbUser user to authenticate in the database as * @param dbPassword password to use to authenticate user */ class Database(jdbcUrl: String, dbUser: String, dbPassword: String) { private val hikariConfig = new HikariConfig() // This property is now being manually set because it seemed not // to get picked up automatically through the JDBC url. See the hikari documentation // under the jdbcUrl for more information. hikariConfig.setDriverClassName("org.postgresql.Driver") hikariConfig.setJdbcUrl(jdbcUrl) hikariConfig.setUsername(dbUser) hikariConfig.setPassword(dbPassword) hikariConfig.setConnectionTimeout(2000) private val dataSource = new HikariDataSource(hikariConfig) /** * Utility function for closing the underlying DB connection pool */ def closeConnectionPool() = dataSource.close() // Custom driver to handle postgres column types val driver = ExtendedPostgresDriver import driver.api._ val db = { val executor = AsyncExecutor("slick", numThreads=64, queueSize=1000) driver.api.Database.forDataSource(dataSource, executor) } } object Database extends Config { def DEFAULT = new Database(jdbcUrl, dbUser, dbPassword) }
package com.azavea.rf.database import com.zaxxer.hikari.{HikariConfig, HikariDataSource} /** * PostGIS Database for Raster Foundry data * * @param jdbcUrl connection url for JDBC * @param dbUser user to authenticate in the database as * @param dbPassword password to use to authenticate user */ class Database(jdbcUrl: String, dbUser: String, dbPassword: String) { private val hikariConfig = new HikariConfig() // This property is now being manually set because it seemed not // to get picked up automatically through the JDBC url. See the hikari documentation // under the jdbcUrl for more information. hikariConfig.setDriverClassName("org.postgresql.Driver") hikariConfig.setJdbcUrl(jdbcUrl) hikariConfig.setUsername(dbUser) hikariConfig.setPassword(dbPassword) private val dataSource = new HikariDataSource(hikariConfig) /** * Utility function for closing the underlying DB connection pool */ def closeConnectionPool() = dataSource.close() // Custom driver to handle postgres column types val driver = ExtendedPostgresDriver import driver.api._ val db = { val executor = AsyncExecutor("slick", numThreads=5, queueSize=1000) driver.api.Database.forDataSource(dataSource, executor) } } object Database extends Config { def DEFAULT = new Database(jdbcUrl, dbUser, dbPassword) }
Fix tiler deadlocks when interacting with the database
Fix tiler deadlocks when interacting with the database The connection timeout for our database connection pool was initially set too low, which in conjunction with the number of threads allocated for Slick, caused many of the Slick threads to spin in a parked state while eating up all of the available CPU. These changes reduce the overall number of threads to 5 ((2 * CPU Cores) + 1) and remove the explicit 2000ms connection timeout in favor of the 30s default.
Scala
apache-2.0
azavea/raster-foundry,aaronxsu/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry,raster-foundry/raster-foundry,raster-foundry/raster-foundry,aaronxsu/raster-foundry,aaronxsu/raster-foundry,azavea/raster-foundry
scala
## Code Before: package com.azavea.rf.database import com.zaxxer.hikari.{HikariConfig, HikariDataSource} /** * PostGIS Database for Raster Foundry data * * @param jdbcUrl connection url for JDBC * @param dbUser user to authenticate in the database as * @param dbPassword password to use to authenticate user */ class Database(jdbcUrl: String, dbUser: String, dbPassword: String) { private val hikariConfig = new HikariConfig() // This property is now being manually set because it seemed not // to get picked up automatically through the JDBC url. See the hikari documentation // under the jdbcUrl for more information. hikariConfig.setDriverClassName("org.postgresql.Driver") hikariConfig.setJdbcUrl(jdbcUrl) hikariConfig.setUsername(dbUser) hikariConfig.setPassword(dbPassword) hikariConfig.setConnectionTimeout(2000) private val dataSource = new HikariDataSource(hikariConfig) /** * Utility function for closing the underlying DB connection pool */ def closeConnectionPool() = dataSource.close() // Custom driver to handle postgres column types val driver = ExtendedPostgresDriver import driver.api._ val db = { val executor = AsyncExecutor("slick", numThreads=64, queueSize=1000) driver.api.Database.forDataSource(dataSource, executor) } } object Database extends Config { def DEFAULT = new Database(jdbcUrl, dbUser, dbPassword) } ## Instruction: Fix tiler deadlocks when interacting with the database The connection timeout for our database connection pool was initially set too low, which in conjunction with the number of threads allocated for Slick, caused many of the Slick threads to spin in a parked state while eating up all of the available CPU. These changes reduce the overall number of threads to 5 ((2 * CPU Cores) + 1) and remove the explicit 2000ms connection timeout in favor of the 30s default. ## Code After: package com.azavea.rf.database import com.zaxxer.hikari.{HikariConfig, HikariDataSource} /** * PostGIS Database for Raster Foundry data * * @param jdbcUrl connection url for JDBC * @param dbUser user to authenticate in the database as * @param dbPassword password to use to authenticate user */ class Database(jdbcUrl: String, dbUser: String, dbPassword: String) { private val hikariConfig = new HikariConfig() // This property is now being manually set because it seemed not // to get picked up automatically through the JDBC url. See the hikari documentation // under the jdbcUrl for more information. hikariConfig.setDriverClassName("org.postgresql.Driver") hikariConfig.setJdbcUrl(jdbcUrl) hikariConfig.setUsername(dbUser) hikariConfig.setPassword(dbPassword) private val dataSource = new HikariDataSource(hikariConfig) /** * Utility function for closing the underlying DB connection pool */ def closeConnectionPool() = dataSource.close() // Custom driver to handle postgres column types val driver = ExtendedPostgresDriver import driver.api._ val db = { val executor = AsyncExecutor("slick", numThreads=5, queueSize=1000) driver.api.Database.forDataSource(dataSource, executor) } } object Database extends Config { def DEFAULT = new Database(jdbcUrl, dbUser, dbPassword) }
c6ab73a718d7f8c948ba79071993cd7a8f484ab5
rm/userprofiles/views.py
rm/userprofiles/views.py
from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser form_class = ProfileForm success_url = reverse_lazy('account-edit') def get_object(self, *args, **kwargs): """ Override the default get object to return the currently logged in user. """ return self.request.user
from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.http import LoginRequiredMixin from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(LoginRequiredMixin, UpdateView): model = RMUser form_class = ProfileForm success_url = reverse_lazy('account-edit') def get_object(self, *args, **kwargs): """ Override the default get object to return the currently logged in user. """ return self.request.user
Make our account pages require a logged in user.
Make our account pages require a logged in user. closes #221
Python
agpl-3.0
openhealthcare/randomise.me,openhealthcare/randomise.me,openhealthcare/randomise.me,openhealthcare/randomise.me
python
## Code Before: from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(UpdateView): model = RMUser form_class = ProfileForm success_url = reverse_lazy('account-edit') def get_object(self, *args, **kwargs): """ Override the default get object to return the currently logged in user. """ return self.request.user ## Instruction: Make our account pages require a logged in user. closes #221 ## Code After: from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import UpdateView from rm.http import LoginRequiredMixin from rm.userprofiles.forms import ProfileForm from rm.userprofiles.models import RMUser class RMUserUpdate(LoginRequiredMixin, UpdateView): model = RMUser form_class = ProfileForm success_url = reverse_lazy('account-edit') def get_object(self, *args, **kwargs): """ Override the default get object to return the currently logged in user. """ return self.request.user
9eb6a6d6576d0e22e8077c6a21e9476dc9db1346
test/generator_test.rb
test/generator_test.rb
require_relative 'test_helper' class GeneratorTest < Minitest::Test def test_default_metadata_path subject = Generator.new('aname', 'some cases') # This is relative to the xruby root assert_equal '../x-common/exercises/aname', subject.metadata_dir end def test_initalize_with_fixture_path fixture_path = 'xruby/test/fixtures' subject = Generator.new('aname', 'some cases', fixture_path) assert_equal 'xruby/test/fixtures/exercises/aname', subject.metadata_dir end def test_exercise_dir subject = Generator.new('aname', 'some cases') # This is relative to the xruby root assert_equal 'exercises/aname', subject.exercise_dir end end
require_relative 'test_helper' class GeneratorTest < Minitest::Test def test_default_metadata_path subject = Generator.new('aname', nil) # This is relative to the xruby root assert_equal '../x-common/exercises/aname', subject.metadata_dir end def test_initalize_with_fixture_path fixture_path = 'xruby/test/fixtures' subject = Generator.new('aname', nil, fixture_path) assert_equal 'xruby/test/fixtures/exercises/aname', subject.metadata_dir end def test_exercise_dir subject = Generator.new('aname', nil) # This is relative to the xruby root assert_equal 'exercises/aname', subject.exercise_dir end end
Use nil to indicate we don't care about the cases for now.
Use nil to indicate we don't care about the cases for now.
Ruby
mit
Insti/exercism-ruby,tommyschaefer/xruby,exercism/xruby,exercism/xruby,Insti/xruby,Insti/exercism-ruby,NeimadTL/ruby,Insti/xruby,NeimadTL/ruby,tommyschaefer/xruby,Insti/exercism-ruby,NeimadTL/ruby
ruby
## Code Before: require_relative 'test_helper' class GeneratorTest < Minitest::Test def test_default_metadata_path subject = Generator.new('aname', 'some cases') # This is relative to the xruby root assert_equal '../x-common/exercises/aname', subject.metadata_dir end def test_initalize_with_fixture_path fixture_path = 'xruby/test/fixtures' subject = Generator.new('aname', 'some cases', fixture_path) assert_equal 'xruby/test/fixtures/exercises/aname', subject.metadata_dir end def test_exercise_dir subject = Generator.new('aname', 'some cases') # This is relative to the xruby root assert_equal 'exercises/aname', subject.exercise_dir end end ## Instruction: Use nil to indicate we don't care about the cases for now. ## Code After: require_relative 'test_helper' class GeneratorTest < Minitest::Test def test_default_metadata_path subject = Generator.new('aname', nil) # This is relative to the xruby root assert_equal '../x-common/exercises/aname', subject.metadata_dir end def test_initalize_with_fixture_path fixture_path = 'xruby/test/fixtures' subject = Generator.new('aname', nil, fixture_path) assert_equal 'xruby/test/fixtures/exercises/aname', subject.metadata_dir end def test_exercise_dir subject = Generator.new('aname', nil) # This is relative to the xruby root assert_equal 'exercises/aname', subject.exercise_dir end end
67eab995d329fe9ffadb37031b75fa746aeab1b5
ruby-rails/README.md
ruby-rails/README.md
* Ruby * Rails
Similar to the [Grails example](https://github.com/daniloradenovic/helloworld-rest/tree/master/groovy-grails), almost all of the code is generated by the Rails framework itself, by using: ```bash rails new myapp cd myapp bin/rails generate controller HelloWorld helloworld ``` This will generate ALL the necessary project files, including Gemfile, Rakefile, as well as all the code necessary for starting a service, and a controller that looks like ```ruby class HelloWorldController < ApplicationController def helloworld end end ``` HelloWorldController located in `controllers/hello_world_controller.rb` is bound to a generated view in `views/hello_world/helloworld.html.erb`. By default, [puma server](http://puma.io/) for ruby applications is listening on port `3000`. If we would start the application with ```bash bin/rails server ``` and navigate to ```bash http://localhost:3000/hello_world/helloworld ``` we would see an _HTML_ page with content ```html <h1>Hello World!</h1> ``` However, we want to get 1. _Plain_ text returned as a response, not an HTML page 2. We want it to be accessible at `/helloworld`, not `/hello_world/helloworld` 3. We want the server running on port 8080 To address the first issue, we modify the above HelloWorldController as such ```ruby class HelloWorldController < ApplicationController def helloworld render plain: "Hello World!" end end ``` This will return plain text, instead of returning the whole .html page. Second, we open the `config/routes.rb` ```ruby Rails.application.routes.draw do get 'hello_world/helloworld' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end ``` and add ```ruby Rails.application.routes.draw do get 'hello_world/helloworld' get 'helloworld', to: 'hello_world#helloworld' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end ``` This will redirect get requests to `/helloworld` to the `HelloWorldController`, which will in turn return the plain text `"Hello World!"` Finally, we append the following to the `config/boot.rb` ```ruby require 'rails/commands/server' module Rails class Server alias :default_options_alias :default_options def default_options default_options_alias.merge!(:Port => 8080) end end end ``` Now we're ready to access `http://localhost:8080/helloworld` and enjoy our favorite message :-). ## Dependencies * Ruby * Rails
Update readme.md for Ruby, Rails example
Update readme.md for Ruby, Rails example
Markdown
mit
daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest,daniloradenovic/helloworld-rest
markdown
## Code Before: * Ruby * Rails ## Instruction: Update readme.md for Ruby, Rails example ## Code After: Similar to the [Grails example](https://github.com/daniloradenovic/helloworld-rest/tree/master/groovy-grails), almost all of the code is generated by the Rails framework itself, by using: ```bash rails new myapp cd myapp bin/rails generate controller HelloWorld helloworld ``` This will generate ALL the necessary project files, including Gemfile, Rakefile, as well as all the code necessary for starting a service, and a controller that looks like ```ruby class HelloWorldController < ApplicationController def helloworld end end ``` HelloWorldController located in `controllers/hello_world_controller.rb` is bound to a generated view in `views/hello_world/helloworld.html.erb`. By default, [puma server](http://puma.io/) for ruby applications is listening on port `3000`. If we would start the application with ```bash bin/rails server ``` and navigate to ```bash http://localhost:3000/hello_world/helloworld ``` we would see an _HTML_ page with content ```html <h1>Hello World!</h1> ``` However, we want to get 1. _Plain_ text returned as a response, not an HTML page 2. We want it to be accessible at `/helloworld`, not `/hello_world/helloworld` 3. We want the server running on port 8080 To address the first issue, we modify the above HelloWorldController as such ```ruby class HelloWorldController < ApplicationController def helloworld render plain: "Hello World!" end end ``` This will return plain text, instead of returning the whole .html page. Second, we open the `config/routes.rb` ```ruby Rails.application.routes.draw do get 'hello_world/helloworld' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end ``` and add ```ruby Rails.application.routes.draw do get 'hello_world/helloworld' get 'helloworld', to: 'hello_world#helloworld' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end ``` This will redirect get requests to `/helloworld` to the `HelloWorldController`, which will in turn return the plain text `"Hello World!"` Finally, we append the following to the `config/boot.rb` ```ruby require 'rails/commands/server' module Rails class Server alias :default_options_alias :default_options def default_options default_options_alias.merge!(:Port => 8080) end end end ``` Now we're ready to access `http://localhost:8080/helloworld` and enjoy our favorite message :-). ## Dependencies * Ruby * Rails
5b29dd7ebb53226552d83551cc1e5acb37331d9b
lib/vagrant/ansible_auto/cap/guest/posix/gateway_addresses.rb
lib/vagrant/ansible_auto/cap/guest/posix/gateway_addresses.rb
require 'set' module VagrantPlugins module AnsibleAuto module Cap module Guest module POSIX class GatewayAddresses class << self def gateway_addresses(machine) with_default_gateway_addresses(machine).to_a.compact end private def with_default_gateway_addresses(machine) return enum_for(__method__, machine) unless block_given? seen_addresses = Set.new yield_unseen_address = lambda do |a| yield a unless seen_addresses.include? a seen_addresses << a end machine.communicate.execute('ip route show', error_check: false) do |type, data| if type == :stdout data.lines.each do |line| if line.start_with?('default') yield_unseen_address.call(line.split[2]) end end end end machine.communicate.execute('route -n', error_check: false) do |type, data| if type == :stdout data.lines.each do |line| if line.start_with?('0.0.0.0') yield_unseen_address.call(line.split[1]) end end end end machine.communicate.execute('netstat -rn', error_check: false) do |type, data| if type == :stdout data.lines.each do |line| if line.start_with?('0.0.0.0') yield_unseen_address.call(line.split[1]) end end end end end end end end end end end end
require 'set' module VagrantPlugins module AnsibleAuto module Cap module Guest module POSIX class GatewayAddresses class << self def gateway_addresses(machine) with_default_gateway_addresses(machine).to_a.compact end private def with_default_gateway_addresses(machine) return enum_for(__method__, machine) unless block_given? machine.communicate.execute('ip route show', error_check: false) do |type, data| if type == :stdout data.each_line { |l| yield l.split[2] if l.start_with? 'default' } end end machine.communicate.execute('route -n', error_check: false) do |type, data| if type == :stdout data.each_line { |l| yield l.split[1] if l.start_with? '0.0.0.0' } end end machine.communicate.execute('netstat -rn', error_check: false) do |type, data| if type == :stdout data.each_line { |l| yield l.split[1] if l.start_with? '0.0.0.0' } end end end end end end end end end end
Simplify iteration over candidate gateway IP addresses
Simplify iteration over candidate gateway IP addresses
Ruby
mit
BaxterStockman/vagrant-ansible_auto
ruby
## Code Before: require 'set' module VagrantPlugins module AnsibleAuto module Cap module Guest module POSIX class GatewayAddresses class << self def gateway_addresses(machine) with_default_gateway_addresses(machine).to_a.compact end private def with_default_gateway_addresses(machine) return enum_for(__method__, machine) unless block_given? seen_addresses = Set.new yield_unseen_address = lambda do |a| yield a unless seen_addresses.include? a seen_addresses << a end machine.communicate.execute('ip route show', error_check: false) do |type, data| if type == :stdout data.lines.each do |line| if line.start_with?('default') yield_unseen_address.call(line.split[2]) end end end end machine.communicate.execute('route -n', error_check: false) do |type, data| if type == :stdout data.lines.each do |line| if line.start_with?('0.0.0.0') yield_unseen_address.call(line.split[1]) end end end end machine.communicate.execute('netstat -rn', error_check: false) do |type, data| if type == :stdout data.lines.each do |line| if line.start_with?('0.0.0.0') yield_unseen_address.call(line.split[1]) end end end end end end end end end end end end ## Instruction: Simplify iteration over candidate gateway IP addresses ## Code After: require 'set' module VagrantPlugins module AnsibleAuto module Cap module Guest module POSIX class GatewayAddresses class << self def gateway_addresses(machine) with_default_gateway_addresses(machine).to_a.compact end private def with_default_gateway_addresses(machine) return enum_for(__method__, machine) unless block_given? machine.communicate.execute('ip route show', error_check: false) do |type, data| if type == :stdout data.each_line { |l| yield l.split[2] if l.start_with? 'default' } end end machine.communicate.execute('route -n', error_check: false) do |type, data| if type == :stdout data.each_line { |l| yield l.split[1] if l.start_with? '0.0.0.0' } end end machine.communicate.execute('netstat -rn', error_check: false) do |type, data| if type == :stdout data.each_line { |l| yield l.split[1] if l.start_with? '0.0.0.0' } end end end end end end end end end end
d1b912e80d16de879578c2ff50378e9dddbedfc8
.travis.yml
.travis.yml
language: node_js node_js: - '4.2' sudo: false cache: directories: - node_modules - vendor/bundle git: submodules: false before_install: - ruby --version - gem --version - gem install bundler --quiet --no-ri --no-rdoc - bundle --version - bundle install --without documentation --path vendor/bundle - npm install -g grunt-cli - grunt --version script: - npm start
language: node_js node_js: - '4.2' sudo: false cache: directories: - node_modules - vendor/bundle git: submodules: false before_install: - rvm install 2.2.3 - rvm use 2.0.0 --fuzzy - export GEMDIR=$(rvm gemdir) - ruby --version - gem --version - gem install bundler --quiet --no-ri --no-rdoc - bundle --version - bundle install --without documentation --path vendor/bundle - npm install -g grunt-cli - grunt --version script: - npm start
Update Travis CI configure (Ruby version setting)
Update Travis CI configure (Ruby version setting)
YAML
mit
windyakin/Eli,windyakin/Eli
yaml
## Code Before: language: node_js node_js: - '4.2' sudo: false cache: directories: - node_modules - vendor/bundle git: submodules: false before_install: - ruby --version - gem --version - gem install bundler --quiet --no-ri --no-rdoc - bundle --version - bundle install --without documentation --path vendor/bundle - npm install -g grunt-cli - grunt --version script: - npm start ## Instruction: Update Travis CI configure (Ruby version setting) ## Code After: language: node_js node_js: - '4.2' sudo: false cache: directories: - node_modules - vendor/bundle git: submodules: false before_install: - rvm install 2.2.3 - rvm use 2.0.0 --fuzzy - export GEMDIR=$(rvm gemdir) - ruby --version - gem --version - gem install bundler --quiet --no-ri --no-rdoc - bundle --version - bundle install --without documentation --path vendor/bundle - npm install -g grunt-cli - grunt --version script: - npm start
aa830111aff0681da1e82cd9399faca2b6ccb9f8
adl-parser/README.md
adl-parser/README.md
A java implementation of an ADL 1.5 parser and flattener. It can parse .adls files and flatten the resulting differential archetypes into flat archetypes. It also provides some validation of archetypes after parsing. ## Status Based on Archetype Definition Language (ADL) 1.5 and Archetype Object Model and other related Information Models from revision 1.5.4 (July 2014) ## Usage Parse source archetype: ```java String adl = ...; // read a .adls file into a string DifferentialArchetype archetype = AdlDeserializer.parse(adl); ``` Flatten differential archetype: ```java ArchetypeFlattener flattener = new ArchetypeFlattener(new OpenEhrRmModel()); DifferentialArchetype specializedArchetype = ...; // parse source archetype FlatArchetype flatParent = ...; // get flattened parent archetype, or null if no parent FlatArchetype flatArchetype = flattener.flatten(flatParent, specializedArchetype); ``` Validate flat archetype: ```java FlatArchetype flatArchetype = ...; // parse and flatten archetype ArchetypeValidator validator = new ArchetypeValidator(new OpenEhrRmModel(), flatArchetype); validator.validate(); List<AqlValidationError> errors = validator.getErrors(); ```
A java implementation of an ADL 1.5 parser and flattener. It can parse .adls files and flatten the resulting differential archetypes into flat archetypes. It also provides some validation of archetypes after parsing. ## Status Based on Archetype Definition Language (ADL) 1.5 and Archetype Object Model and other related Information Models from revision 1.5.4 (July 2014) ## Usage Parse source archetype: ```java AdlDeserializer deserializer = new AdlDeserializer(); String adl = ...; // read a .adls file into a string DifferentialArchetype archetype = deserializer.parse(adl); ``` Flatten differential archetype: ```java ArchetypeFlattener flattener = new ArchetypeFlattener(new OpenEhrRmModel()); DifferentialArchetype specializedArchetype = ...; // parse source archetype FlatArchetype flatParent = ...; // get flattened parent archetype, or null if no parent FlatArchetype flatArchetype = flattener.flatten(flatParent, specializedArchetype); ``` Validate flat archetype: ```java FlatArchetype flatArchetype = ...; // parse and flatten archetype ArchetypeValidator validator = new ArchetypeValidator(new OpenEhrRmModel(), flatArchetype); validator.validate(); List<AqlValidationError> errors = validator.getErrors(); ```
Fix example for parsing adl
Fix example for parsing adl
Markdown
agpl-3.0
lonangel/adl2-core,openEHR/adl2-core,bjornna/adl2-core
markdown
## Code Before: A java implementation of an ADL 1.5 parser and flattener. It can parse .adls files and flatten the resulting differential archetypes into flat archetypes. It also provides some validation of archetypes after parsing. ## Status Based on Archetype Definition Language (ADL) 1.5 and Archetype Object Model and other related Information Models from revision 1.5.4 (July 2014) ## Usage Parse source archetype: ```java String adl = ...; // read a .adls file into a string DifferentialArchetype archetype = AdlDeserializer.parse(adl); ``` Flatten differential archetype: ```java ArchetypeFlattener flattener = new ArchetypeFlattener(new OpenEhrRmModel()); DifferentialArchetype specializedArchetype = ...; // parse source archetype FlatArchetype flatParent = ...; // get flattened parent archetype, or null if no parent FlatArchetype flatArchetype = flattener.flatten(flatParent, specializedArchetype); ``` Validate flat archetype: ```java FlatArchetype flatArchetype = ...; // parse and flatten archetype ArchetypeValidator validator = new ArchetypeValidator(new OpenEhrRmModel(), flatArchetype); validator.validate(); List<AqlValidationError> errors = validator.getErrors(); ``` ## Instruction: Fix example for parsing adl ## Code After: A java implementation of an ADL 1.5 parser and flattener. It can parse .adls files and flatten the resulting differential archetypes into flat archetypes. It also provides some validation of archetypes after parsing. ## Status Based on Archetype Definition Language (ADL) 1.5 and Archetype Object Model and other related Information Models from revision 1.5.4 (July 2014) ## Usage Parse source archetype: ```java AdlDeserializer deserializer = new AdlDeserializer(); String adl = ...; // read a .adls file into a string DifferentialArchetype archetype = deserializer.parse(adl); ``` Flatten differential archetype: ```java ArchetypeFlattener flattener = new ArchetypeFlattener(new OpenEhrRmModel()); DifferentialArchetype specializedArchetype = ...; // parse source archetype FlatArchetype flatParent = ...; // get flattened parent archetype, or null if no parent FlatArchetype flatArchetype = flattener.flatten(flatParent, specializedArchetype); ``` Validate flat archetype: ```java FlatArchetype flatArchetype = ...; // parse and flatten archetype ArchetypeValidator validator = new ArchetypeValidator(new OpenEhrRmModel(), flatArchetype); validator.validate(); List<AqlValidationError> errors = validator.getErrors(); ```
95ee51ea2400d8a30b61adce05b0288652235ec7
localization/jquery-ui-timepicker-pl.js
localization/jquery-ui-timepicker-pl.js
/* German translation for the jQuery Timepicker Addon */ /* Written by Michał Pena */ (function($) { $.timepicker.regional['pl'] = { timeOnlyTitle: 'Wybierz godzinę', timeText: 'Czas', hourText: 'Godzina', minuteText: 'Minuta', secondText: 'Sekunda', millisecText: 'Milisekunda', timezoneText: 'Strefa czasowa', currentText: 'Teraz', closeText: 'Gotowe', timeFormat: 'hh:mm tt', ampm: false }; $.timepicker.setDefaults($.timepicker.regional['pl']); })(jQuery);
/* Polish translation for the jQuery Timepicker Addon */ /* Written by Michał Pena */ (function($) { $.timepicker.regional['pl'] = { timeOnlyTitle: 'Wybierz godzinę', timeText: 'Czas', hourText: 'Godzina', minuteText: 'Minuta', secondText: 'Sekunda', millisecText: 'Milisekunda', timezoneText: 'Strefa czasowa', currentText: 'Teraz', closeText: 'Gotowe', timeFormat: 'hh:mm tt', amNames: ['AM', 'A'], pmNames: ['PM', 'P'], ampm: false }; $.timepicker.setDefaults($.timepicker.regional['pl']); })(jQuery);
Add `amNames`/`pmNames` for Polish translation.
Add `amNames`/`pmNames` for Polish translation.
JavaScript
mit
Jaspersoft/jQuery-Timepicker-Addon,Youraiseme/jQuery-Timepicker-Addon,Jaspersoft/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,brenosilver/jQuery-Timepicker-Addon,pyonnuka/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,brenosilver/jQuery-Timepicker-Addon,trentrichardson/jQuery-Timepicker-Addon,Youraiseme/jQuery-Timepicker-Addon,nicofrand/jQuery-Timepicker-Addon,ssyang0102/jQuery-Timepicker-Addon,gaissa/jQuery-Timepicker-Addon,trentrichardson/jQuery-Timepicker-Addon,nicofrand/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon,ristovskiv/jQuery-Timepicker-Addon
javascript
## Code Before: /* German translation for the jQuery Timepicker Addon */ /* Written by Michał Pena */ (function($) { $.timepicker.regional['pl'] = { timeOnlyTitle: 'Wybierz godzinę', timeText: 'Czas', hourText: 'Godzina', minuteText: 'Minuta', secondText: 'Sekunda', millisecText: 'Milisekunda', timezoneText: 'Strefa czasowa', currentText: 'Teraz', closeText: 'Gotowe', timeFormat: 'hh:mm tt', ampm: false }; $.timepicker.setDefaults($.timepicker.regional['pl']); })(jQuery); ## Instruction: Add `amNames`/`pmNames` for Polish translation. ## Code After: /* Polish translation for the jQuery Timepicker Addon */ /* Written by Michał Pena */ (function($) { $.timepicker.regional['pl'] = { timeOnlyTitle: 'Wybierz godzinę', timeText: 'Czas', hourText: 'Godzina', minuteText: 'Minuta', secondText: 'Sekunda', millisecText: 'Milisekunda', timezoneText: 'Strefa czasowa', currentText: 'Teraz', closeText: 'Gotowe', timeFormat: 'hh:mm tt', amNames: ['AM', 'A'], pmNames: ['PM', 'P'], ampm: false }; $.timepicker.setDefaults($.timepicker.regional['pl']); })(jQuery);
2ba109b51901e266d3ae84795d30ee1c85fbe545
src/Traits/StringableIdEntity.php
src/Traits/StringableIdEntity.php
<?php declare(strict_types=1); namespace App\Traits; /** * Class StringableIdEntity */ trait StringableIdEntity { public function __toString(): string { return (string) $this->id; } }
<?php declare(strict_types=1); namespace App\Traits; trait StringableIdEntity { public function __toString(): string { return isset($this->id) ? (string) $this->id : ''; } }
Handle objects without an ID yet
Handle objects without an ID yet This is used when we build log data and in some cases the thing being logged hasn't been created yet when we run this method so we need to account for the id not yet being set.
PHP
mit
thecoolestguy/ilios,stopfstedt/ilios,dartajax/ilios,thecoolestguy/ilios,stopfstedt/ilios,ilios/ilios,ilios/ilios,dartajax/ilios
php
## Code Before: <?php declare(strict_types=1); namespace App\Traits; /** * Class StringableIdEntity */ trait StringableIdEntity { public function __toString(): string { return (string) $this->id; } } ## Instruction: Handle objects without an ID yet This is used when we build log data and in some cases the thing being logged hasn't been created yet when we run this method so we need to account for the id not yet being set. ## Code After: <?php declare(strict_types=1); namespace App\Traits; trait StringableIdEntity { public function __toString(): string { return isset($this->id) ? (string) $this->id : ''; } }
0eee97b9887795316dccaaf1892e0668c13fdcc2
test/370_persist_ipam_2_test.sh
test/370_persist_ipam_2_test.sh
. ./config.sh start_suite "Checking persistence of IPAM" launch_router_with_db() { host=$1 shift WEAVE_DOCKER_ARGS="-v /tmp:/db" weave_on $host launch-router --db-prefix=/db/test162- "$@" } # Remove any persisted data from previous runs run_on $HOST1 "sudo rm -f /tmp/test162-*" run_on $HOST2 "sudo rm -f /tmp/test162-*" launch_router_with_db $HOST1 $HOST2 launch_router_with_db $HOST2 $HOST1 start_container $HOST1 --name=c1 C1=$(container_ip $HOST1 c1) start_container $HOST2 --name=c2 assert_raises "exec_on $HOST2 c2 $PING $C1" stop_weave_on $HOST1 stop_weave_on $HOST2 # Start just HOST2; if nothing persisted it would form its own ring launch_router_with_db $HOST2 start_container $HOST2 --name=c3 C3=$(container_ip $HOST2 c3) assert_raises "[ $C3 != $C1 ]" # Restart HOST1 and see if it remembers to connect to HOST2 launch_router_with_db $HOST1 assert_raises "exec_on $HOST2 c2 $PING $C1" end_suite
. ./config.sh start_suite "Checking persistence of IPAM" launch_router_with_db() { host=$1 shift weave_on $host launch-router "$@" } launch_router_with_db $HOST1 $HOST2 launch_router_with_db $HOST2 $HOST1 start_container $HOST1 --name=c1 C1=$(container_ip $HOST1 c1) start_container $HOST2 --name=c2 assert_raises "exec_on $HOST2 c2 $PING $C1" stop_weave_on $HOST1 stop_weave_on $HOST2 # Start just HOST2; if nothing persisted it would form its own ring launch_router_with_db $HOST2 start_container $HOST2 --name=c3 C3=$(container_ip $HOST2 c3) assert_raises "[ $C3 != $C1 ]" # Restart HOST1 and see if it remembers to connect to HOST2 launch_router_with_db $HOST1 assert_raises "exec_on $HOST2 c2 $PING $C1" end_suite
Use regular persistence settings in test, since they now survive a restart
Use regular persistence settings in test, since they now survive a restart
Shell
apache-2.0
weaveworks/weave,paulbellamy/weave,weaveworks/weave,n054/weave,n054/weave,weaveworks/weave,weaveworks/weave,paulbellamy/weave,paulbellamy/weave,n054/weave,n054/weave,paulbellamy/weave,n054/weave
shell
## Code Before: . ./config.sh start_suite "Checking persistence of IPAM" launch_router_with_db() { host=$1 shift WEAVE_DOCKER_ARGS="-v /tmp:/db" weave_on $host launch-router --db-prefix=/db/test162- "$@" } # Remove any persisted data from previous runs run_on $HOST1 "sudo rm -f /tmp/test162-*" run_on $HOST2 "sudo rm -f /tmp/test162-*" launch_router_with_db $HOST1 $HOST2 launch_router_with_db $HOST2 $HOST1 start_container $HOST1 --name=c1 C1=$(container_ip $HOST1 c1) start_container $HOST2 --name=c2 assert_raises "exec_on $HOST2 c2 $PING $C1" stop_weave_on $HOST1 stop_weave_on $HOST2 # Start just HOST2; if nothing persisted it would form its own ring launch_router_with_db $HOST2 start_container $HOST2 --name=c3 C3=$(container_ip $HOST2 c3) assert_raises "[ $C3 != $C1 ]" # Restart HOST1 and see if it remembers to connect to HOST2 launch_router_with_db $HOST1 assert_raises "exec_on $HOST2 c2 $PING $C1" end_suite ## Instruction: Use regular persistence settings in test, since they now survive a restart ## Code After: . ./config.sh start_suite "Checking persistence of IPAM" launch_router_with_db() { host=$1 shift weave_on $host launch-router "$@" } launch_router_with_db $HOST1 $HOST2 launch_router_with_db $HOST2 $HOST1 start_container $HOST1 --name=c1 C1=$(container_ip $HOST1 c1) start_container $HOST2 --name=c2 assert_raises "exec_on $HOST2 c2 $PING $C1" stop_weave_on $HOST1 stop_weave_on $HOST2 # Start just HOST2; if nothing persisted it would form its own ring launch_router_with_db $HOST2 start_container $HOST2 --name=c3 C3=$(container_ip $HOST2 c3) assert_raises "[ $C3 != $C1 ]" # Restart HOST1 and see if it remembers to connect to HOST2 launch_router_with_db $HOST1 assert_raises "exec_on $HOST2 c2 $PING $C1" end_suite
1d6c17e5adc3df4de86636ef77fc0a406bf065e9
scrapi/harvesters/dryad.py
scrapi/harvesters/dryad.py
''' Harvester for Dryad for the SHARE project Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class DryadHarvester(OAIHarvester): short_name = 'dryad' long_name = 'Dryad Data Repository' url = 'http://www.datadryad.org/oai/request' base_url = 'http://www.datadryad.org/oai/request' property_list = ['rights', 'format', 'relation', 'date', 'identifier', 'type', 'setSpec'] timezone_granularity = True
''' Harvester for Dryad for the SHARE project Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from lxml import etree import logging from scrapi.base import OAIHarvester logger = logging.getLogger(__name__) class DryadHarvester(OAIHarvester): short_name = 'dryad' long_name = 'Dryad Data Repository' url = 'http://www.datadryad.org/oai/request' base_url = 'http://www.datadryad.org/oai/request' property_list = ['rights', 'format', 'relation', 'date', 'identifier', 'type', 'setSpec'] timezone_granularity = True def normalize(self, raw_doc): str_result = raw_doc.get('doc') result = etree.XML(str_result) status = (result.xpath('ns0:header/@status', namespaces=self.namespaces) or [''])[0] if status.lower() == 'deleted' or status.lower() == 'item is not available': logger.info('Not normalizing record with ID {}, status {}'.format(raw_doc['docID'], status)) return None return super(OAIHarvester, self).normalize(raw_doc)
Add custom normaluze function that will not get non existant items
Add custom normaluze function that will not get non existant items
Python
apache-2.0
icereval/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,erinspace/scrapi,felliott/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,ostwald/scrapi,fabianvf/scrapi,jeffreyliu3230/scrapi,mehanig/scrapi
python
## Code Before: ''' Harvester for Dryad for the SHARE project Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class DryadHarvester(OAIHarvester): short_name = 'dryad' long_name = 'Dryad Data Repository' url = 'http://www.datadryad.org/oai/request' base_url = 'http://www.datadryad.org/oai/request' property_list = ['rights', 'format', 'relation', 'date', 'identifier', 'type', 'setSpec'] timezone_granularity = True ## Instruction: Add custom normaluze function that will not get non existant items ## Code After: ''' Harvester for Dryad for the SHARE project Example API call: http://www.datadryad.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from lxml import etree import logging from scrapi.base import OAIHarvester logger = logging.getLogger(__name__) class DryadHarvester(OAIHarvester): short_name = 'dryad' long_name = 'Dryad Data Repository' url = 'http://www.datadryad.org/oai/request' base_url = 'http://www.datadryad.org/oai/request' property_list = ['rights', 'format', 'relation', 'date', 'identifier', 'type', 'setSpec'] timezone_granularity = True def normalize(self, raw_doc): str_result = raw_doc.get('doc') result = etree.XML(str_result) status = (result.xpath('ns0:header/@status', namespaces=self.namespaces) or [''])[0] if status.lower() == 'deleted' or status.lower() == 'item is not available': logger.info('Not normalizing record with ID {}, status {}'.format(raw_doc['docID'], status)) return None return super(OAIHarvester, self).normalize(raw_doc)
c89f85ff8f0092befe39ed44bc82dfbd20ec8a6b
test/sampleTest.js
test/sampleTest.js
'use strict'; const TwitterService = require('./twitterService'); const assert = require('chai').assert; const _ = require('lodash'); suite('Candidate API tests', function () { let service; before((done) => { service = new TwitterService(); service.start(done); }); beforeEach(() => { service.clearDB(); }); after(() => { service.stop(); }); test('sample api endpoint responds with 200 and data', () => { const expectedResult = { key: 'value' }; return service.getAPISample().then((res) => { assert.equal(res.statusCode, 200); assert.deepEqual(res.result, expectedResult); }); }); test('sample static endpoint responds with 200 and template', () => { return service.getStaticSample().then((res) => { assert.equal(res.statusCode, 200); assert.include(res.payload, 'hare your thoughts with this innovative twitter clone!'); }); }); });
'use strict'; const TwitterService = require('./twitterService'); const assert = require('chai').assert; const _ = require('lodash'); suite('Sample tests', function () { let service; before((done) => { service = new TwitterService(); service.start(done); }); beforeEach(() => { service.clearDB(); }); after(() => { service.stop(); }); test('sample api endpoint responds with 200 and data', () => { const expectedResult = { key: 'value' }; return service.getAPISample().then((res) => { assert.equal(res.statusCode, 200); assert.deepEqual(res.result, expectedResult); }); }); test('sample static endpoint responds with 200 and template', () => { return service.getStaticSample().then((res) => { assert.equal(res.statusCode, 200); assert.include(res.payload, 'hare your thoughts with this innovative twitter clone!'); }); }); });
Fix typo in sample test
Fix typo in sample test
JavaScript
mit
FritzFlorian/true-parrot,FritzFlorian/true-parrot
javascript
## Code Before: 'use strict'; const TwitterService = require('./twitterService'); const assert = require('chai').assert; const _ = require('lodash'); suite('Candidate API tests', function () { let service; before((done) => { service = new TwitterService(); service.start(done); }); beforeEach(() => { service.clearDB(); }); after(() => { service.stop(); }); test('sample api endpoint responds with 200 and data', () => { const expectedResult = { key: 'value' }; return service.getAPISample().then((res) => { assert.equal(res.statusCode, 200); assert.deepEqual(res.result, expectedResult); }); }); test('sample static endpoint responds with 200 and template', () => { return service.getStaticSample().then((res) => { assert.equal(res.statusCode, 200); assert.include(res.payload, 'hare your thoughts with this innovative twitter clone!'); }); }); }); ## Instruction: Fix typo in sample test ## Code After: 'use strict'; const TwitterService = require('./twitterService'); const assert = require('chai').assert; const _ = require('lodash'); suite('Sample tests', function () { let service; before((done) => { service = new TwitterService(); service.start(done); }); beforeEach(() => { service.clearDB(); }); after(() => { service.stop(); }); test('sample api endpoint responds with 200 and data', () => { const expectedResult = { key: 'value' }; return service.getAPISample().then((res) => { assert.equal(res.statusCode, 200); assert.deepEqual(res.result, expectedResult); }); }); test('sample static endpoint responds with 200 and template', () => { return service.getStaticSample().then((res) => { assert.equal(res.statusCode, 200); assert.include(res.payload, 'hare your thoughts with this innovative twitter clone!'); }); }); });
504655574163cf10e6a95f8178f64a0006a0f3c3
build.sbt
build.sbt
sbtPlugin := true organization := "com.theomn.sbt" name := "sbt-babeljs" version := "1.0.0-SNAPSHOT" scalaVersion := "2.10.5" libraryDependencies ++= Seq( "com.typesafe" % "jstranspiler" % "1.0.0", "org.webjars" % "mkdirp" % "0.3.5", "org.webjars" % "when-node" % "3.2.2", "org.webjars" % "babel" % "4.7.16-1-SNAPSHOT" ) resolvers ++= Seq( "Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/releases/", Resolver.url("sbt snapshot plugins", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns), Resolver.sonatypeRepo("snapshots"), "Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/snapshots/", Resolver.mavenLocal ) addSbtPlugin("com.typesafe.sbt" %% "sbt-js-engine" % "1.0.2") publishMavenStyle := false publishTo := { if (isSnapshot.value) Some(Classpaths.sbtPluginSnapshots) else Some(Classpaths.sbtPluginReleases) } scriptedSettings scriptedLaunchOpts <+= version apply { v => s"-Dproject.version=$v" }
sbtPlugin := true organization := "com.theomn.sbt" name := "sbt-babeljs" version := "1.0.0-SNAPSHOT" scalaVersion := "2.10.5" libraryDependencies ++= Seq( "com.typesafe" % "jstranspiler" % "1.0.0", "org.webjars" % "mkdirp" % "0.3.5", "org.webjars" % "when-node" % "3.2.2", "org.webjars" % "babel" % "4.7.16-1-SNAPSHOT" ) resolvers ++= Seq( "Typesafe Releases Repository" at "https://repo.typesafe.com/typesafe/maven-releases/" ) addSbtPlugin("com.typesafe.sbt" %% "sbt-js-engine" % "1.1.2") publishMavenStyle := false publishTo := { if (isSnapshot.value) Some(Classpaths.sbtPluginSnapshots) else Some(Classpaths.sbtPluginReleases) } scriptedSettings scriptedLaunchOpts <+= version apply { v => s"-Dproject.version=$v" }
Upgrade to sbt js engine 1.1.2
Upgrade to sbt js engine 1.1.2
Scala
mit
onelson/sbt-babeljs
scala
## Code Before: sbtPlugin := true organization := "com.theomn.sbt" name := "sbt-babeljs" version := "1.0.0-SNAPSHOT" scalaVersion := "2.10.5" libraryDependencies ++= Seq( "com.typesafe" % "jstranspiler" % "1.0.0", "org.webjars" % "mkdirp" % "0.3.5", "org.webjars" % "when-node" % "3.2.2", "org.webjars" % "babel" % "4.7.16-1-SNAPSHOT" ) resolvers ++= Seq( "Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/releases/", Resolver.url("sbt snapshot plugins", url("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns), Resolver.sonatypeRepo("snapshots"), "Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/snapshots/", Resolver.mavenLocal ) addSbtPlugin("com.typesafe.sbt" %% "sbt-js-engine" % "1.0.2") publishMavenStyle := false publishTo := { if (isSnapshot.value) Some(Classpaths.sbtPluginSnapshots) else Some(Classpaths.sbtPluginReleases) } scriptedSettings scriptedLaunchOpts <+= version apply { v => s"-Dproject.version=$v" } ## Instruction: Upgrade to sbt js engine 1.1.2 ## Code After: sbtPlugin := true organization := "com.theomn.sbt" name := "sbt-babeljs" version := "1.0.0-SNAPSHOT" scalaVersion := "2.10.5" libraryDependencies ++= Seq( "com.typesafe" % "jstranspiler" % "1.0.0", "org.webjars" % "mkdirp" % "0.3.5", "org.webjars" % "when-node" % "3.2.2", "org.webjars" % "babel" % "4.7.16-1-SNAPSHOT" ) resolvers ++= Seq( "Typesafe Releases Repository" at "https://repo.typesafe.com/typesafe/maven-releases/" ) addSbtPlugin("com.typesafe.sbt" %% "sbt-js-engine" % "1.1.2") publishMavenStyle := false publishTo := { if (isSnapshot.value) Some(Classpaths.sbtPluginSnapshots) else Some(Classpaths.sbtPluginReleases) } scriptedSettings scriptedLaunchOpts <+= version apply { v => s"-Dproject.version=$v" }
3a2173fbd4be7f51eb7d2f205ff2d7935c6ae971
AccountTests/SyncAuthStateTests.swift
AccountTests/SyncAuthStateTests.swift
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import Foundation import FxA import Shared import UIKit import XCTest class SyncAuthStateTests: LiveAccountTest { func testLive() { let e = self.expectationWithDescription("Wait for token.") syncAuthState(NSDate.now()).upon { result in if let (token, forKey) = result.successValue { let uidString = NSNumber(unsignedLongLong: token.uid).stringValue XCTAssertTrue(token.api_endpoint.endsWith(uidString)) XCTAssertNotNil(forKey) } else { if let error = result.failureValue as? AccountError { XCTAssertEqual(error, AccountError.NoSignedInUser) } else { XCTAssertEqual(result.failureValue!.description, "<FxAClientError.Local Error Domain=NSURLErrorDomain Code=-999 \"cancelled\">") } } e.fulfill() } self.waitForExpectationsWithTimeout(10, handler: nil) } }
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import Foundation import FxA import Shared import UIKit import XCTest class SyncAuthStateTests: LiveAccountTest { func testLive() { let e = self.expectationWithDescription("Wait for token.") syncAuthState(NSDate.now()).upon { result in if let (token, forKey) = result.successValue { let uidString = NSNumber(unsignedLongLong: token.uid).stringValue XCTAssertTrue(token.api_endpoint.endsWith(uidString)) XCTAssertNotNil(forKey) } else { if let error = result.failureValue as? AccountError { XCTAssertEqual(error, AccountError.NoSignedInUser) } else { XCTAssertEqual(result.failureValue!.description, "") } } e.fulfill() } self.waitForExpectationsWithTimeout(10, handler: nil) } }
Undo incorrectly 'fixed' test - should not produce an error!
Undo incorrectly 'fixed' test - should not produce an error!
Swift
mpl-2.0
zybug/firefox-ios,strangeliu/firefox-ios,StYaphet/firefox-ios,xiaoyanit/firefox-ios,knorrium/firefox-ios,vbudhram/firefox-ios,Ehrippura/firefox-ios,cliqz-oss/browser-ios,radazzouz/firefox-ios,st3fan/firefox-ios,zybug/firefox-ios,varkor/firefox-ios,StYaphet/firefox-ios,doronkatz/firefox-ios,Ehrippura/firefox-ios,marcuses/firefox-ios,DarrenKong/firefox-ios,xiaoyanit/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,vamsirajendra/firefox-ios,doronkatz/firefox-ios,sharath-cliqz/browser-ios,belkhadir/firefox-ios,taochengbo/firefox-ios,aaronraimist/firefox-ios,shorlander/firefox-ios,cliqz-oss/browser-ios,HongliYu/firefox-ios,jacobwhite/firefox-ios,Acidburn0zzz/firefox-ios,Johennes/firefox-ios,thebnich/firefox-ios,reza-ryte-club/firefox-ios,youprofit/firefox-ios,matthewpurcell/firefox-ios,knorrium/firefox-ios,HongliYu/firefox-ios,zybug/firefox-ios,DarrenKong/firefox-ios,Ehrippura/firefox-ios,farhanpatel/firefox-ios,flodolo/firefox-ios,taoguan/firefox-ios,sachin004/firefox-ios,st3fan/firefox-ios,st3fan/firefox-ios,farhanpatel/firefox-ios,vishnuvaradaraj/firefox-ios,reza-ryte-club/firefox-ios,dhanvi/firefox-ios,cliqz-oss/browser-ios,strangeliu/firefox-ios,StYaphet/firefox-ios,strangeliu/firefox-ios,farhanpatel/firefox-ios,varkor/firefox-ios,Allow2CEO/browser-ios,ncalexan/firefox-ios,brave/browser-ios,sharath-cliqz/browser-ios,DarrenKong/firefox-ios,Bunn/firefox-ios,taoguan/firefox-ios,Allow2CEO/browser-ios,TribeMedia/firefox-ios,radazzouz/firefox-ios,aaronraimist/firefox-ios,brave/browser-ios,sachin004/firefox-ios,radazzouz/firefox-ios,cliqz-oss/browser-ios,SuPair/firefox-ios,garvankeeley/firefox-ios,taochengbo/firefox-ios,AaronMT/firefox-ios,mshhmzh/firefox-ios,mozilla-mobile/firefox-ios,lady12/firefox-ios,thebnich/firefox-ios,strangeliu/firefox-ios,ipmobiletech/firefox-ios,z8927623/firefox-ios,fscherwi/firefox-ios,DarrenKong/firefox-ios,ilhanadiyaman/firefox-ios,taochengbo/firefox-ios,hgl888/firefox-ios,zybug/firefox-ios,mozilla-mobile/firefox-ios,youprofit/firefox-ios,dhanvi/firefox-ios,lady12/firefox-ios,vamsirajendra/firefox-ios,mshhmzh/firefox-ios,lady12/firefox-ios,zybug/firefox-ios,kesun421/firefox-ios,jacobwhite/firefox-ios,Ferrari-lee/firefox-ios,Acidburn0zzz/firefox-ios,varkor/firefox-ios,mshhmzh/firefox-ios,alessiobrozzi/firefox-ios,xiaoyanit/firefox-ios,brave/browser-ios,xiaoyanit/firefox-ios,reza-ryte-club/firefox-ios,Acidburn0zzz/firefox-ios,brave/browser-ios,sachin004/firefox-ios,taoguan/firefox-ios,vishnuvaradaraj/firefox-ios,marcuses/firefox-ios,remypanicker/firefox-ios,jacobwhite/firefox-ios,DarrenKong/firefox-ios,taochengbo/firefox-ios,matthewpurcell/firefox-ios,AaronMT/firefox-ios,ilhanadiyaman/firefox-ios,tecgirl/firefox-ios,radazzouz/firefox-ios,youprofit/firefox-ios,matthewpurcell/firefox-ios,remypanicker/firefox-ios,remypanicker/firefox-ios,mozilla-mobile/firefox-ios,belkhadir/firefox-ios,sharath-cliqz/browser-ios,brave/browser-ios,vishnuvaradaraj/firefox-ios,sachin004/firefox-ios,taoguan/firefox-ios,brave/browser-ios,jacobwhite/firefox-ios,doronkatz/firefox-ios,varkor/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,kesun421/firefox-ios,farhanpatel/firefox-ios,Acidburn0zzz/firefox-ios,st3fan/firefox-ios,alessiobrozzi/firefox-ios,oscarmorrison/firefox-ios,oscarmorrison/firefox-ios,marcuses/firefox-ios,Bunn/firefox-ios,mauryat/firefox-ios,Johennes/firefox-ios,st3fan/firefox-ios,marcuses/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,farhanpatel/firefox-ios,doronkatz/firefox-ios,vbudhram/firefox-ios,strangeliu/firefox-ios,TribeMedia/firefox-ios,ipmobiletech/firefox-ios,thebnich/firefox-ios,garvankeeley/firefox-ios,taoguan/firefox-ios,fscherwi/firefox-ios,Johennes/firefox-ios,AaronMT/firefox-ios,tecgirl/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,ilhanadiyaman/firefox-ios,ipmobiletech/firefox-ios,fscherwi/firefox-ios,matthewpurcell/firefox-ios,fscherwi/firefox-ios,eoger/firefox-ios,strangeliu/firefox-ios,remypanicker/firefox-ios,thebnich/firefox-ios,vishnuvaradaraj/firefox-ios,Johennes/firefox-ios,mauryat/firefox-ios,reza-ryte-club/firefox-ios,flodolo/firefox-ios,mozilla-mobile/firefox-ios,kesun421/firefox-ios,Acidburn0zzz/firefox-ios,vamsirajendra/firefox-ios,remypanicker/firefox-ios,knorrium/firefox-ios,z8927623/firefox-ios,shorlander/firefox-ios,TribeMedia/firefox-ios,vamsirajendra/firefox-ios,StYaphet/firefox-ios,cliqz-oss/browser-ios,hgl888/firefox-ios,garvankeeley/firefox-ios,luoziyong/firefox-ios,Bunn/firefox-ios,farhanpatel/firefox-ios,mkaply/firefox-ios,hgl888/firefox-ios,sharath-cliqz/browser-ios,Allow2CEO/browser-ios,StYaphet/firefox-ios,brave/browser-ios,TribeMedia/firefox-ios,sharath-cliqz/browser-ios,HongliYu/firefox-ios,z8927623/firefox-ios,reza-ryte-club/firefox-ios,taochengbo/firefox-ios,aaronraimist/firefox-ios,StYaphet/firefox-ios,Allow2CEO/browser-ios,varkor/firefox-ios,doronkatz/firefox-ios,hgl888/firefox-ios,lady12/firefox-ios,mkaply/firefox-ios,ipmobiletech/firefox-ios,vamsirajendra/firefox-ios,ncalexan/firefox-ios,strangeliu/firefox-ios,youprofit/firefox-ios,sachin004/firefox-ios,vbudhram/firefox-ios,justindarc/firefox-ios,ipmobiletech/firefox-ios,cliqz-oss/browser-ios,z8927623/firefox-ios,justindarc/firefox-ios,belkhadir/firefox-ios,doronkatz/firefox-ios,st3fan/firefox-ios,Johennes/firefox-ios,sachin004/firefox-ios,jacobwhite/firefox-ios,marcuses/firefox-ios,alessiobrozzi/firefox-ios,radazzouz/firefox-ios,dhanvi/firefox-ios,TribeMedia/firefox-ios,kesun421/firefox-ios,Ehrippura/firefox-ios,ncalexan/firefox-ios,oscarmorrison/firefox-ios,ncalexan/firefox-ios,lady12/firefox-ios,thebnich/firefox-ios,eoger/firefox-ios,Bunn/firefox-ios,hgl888/firefox-ios,justindarc/firefox-ios,vbudhram/firefox-ios,eoger/firefox-ios,garvankeeley/firefox-ios,ilhanadiyaman/firefox-ios,reza-ryte-club/firefox-ios,mshhmzh/firefox-ios,kesun421/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,SuPair/firefox-ios,luoziyong/firefox-ios,Acidburn0zzz/firefox-ios,sachin004/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,brave/browser-ios,aaronraimist/firefox-ios,Ferrari-lee/firefox-ios,mshhmzh/firefox-ios,belkhadir/firefox-ios,aaronraimist/firefox-ios,vishnuvaradaraj/firefox-ios,HongliYu/firefox-ios,Bunn/firefox-ios,knorrium/firefox-ios,ipmobiletech/firefox-ios,strangeliu/firefox-ios,youprofit/firefox-ios,fscherwi/firefox-ios,taochengbo/firefox-ios,justindarc/firefox-ios,Acidburn0zzz/firefox-ios,flodolo/firefox-ios,oscarmorrison/firefox-ios,ilhanadiyaman/firefox-ios,reza-ryte-club/firefox-ios,TribeMedia/firefox-ios,Bunn/firefox-ios,hgl888/firefox-ios,knorrium/firefox-ios,Bunn/firefox-ios,mauryat/firefox-ios,kesun421/firefox-ios,dhanvi/firefox-ios,StYaphet/firefox-ios,mshhmzh/firefox-ios,shorlander/firefox-ios,belkhadir/firefox-ios,cliqz-oss/browser-ios,Ehrippura/firefox-ios,vbudhram/firefox-ios,sharath-cliqz/browser-ios,taoguan/firefox-ios,aaronraimist/firefox-ios,vamsirajendra/firefox-ios,justindarc/firefox-ios,thebnich/firefox-ios,eoger/firefox-ios,radazzouz/firefox-ios,mauryat/firefox-ios,varkor/firefox-ios,TribeMedia/firefox-ios,tecgirl/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,flodolo/firefox-ios,StYaphet/firefox-ios,lady12/firefox-ios,SuPair/firefox-ios,shorlander/firefox-ios,Johennes/firefox-ios,shorlander/firefox-ios,AaronMT/firefox-ios,lady12/firefox-ios,zybug/firefox-ios,matthewpurcell/firefox-ios,oscarmorrison/firefox-ios,mkaply/firefox-ios,ncalexan/firefox-ios,luoziyong/firefox-ios,z8927623/firefox-ios,Ferrari-lee/firefox-ios,mozilla-mobile/firefox-ios,SuPair/firefox-ios,jacobwhite/firefox-ios,thebnich/firefox-ios,tecgirl/firefox-ios,tecgirl/firefox-ios,AaronMT/firefox-ios,sharath-cliqz/browser-ios,mauryat/firefox-ios,st3fan/firefox-ios,vamsirajendra/firefox-ios,Ferrari-lee/firefox-ios,vamsirajendra/firefox-ios,mkaply/firefox-ios,alessiobrozzi/firefox-ios,ncalexan/firefox-ios,mozilla-mobile/firefox-ios,brave/browser-ios,youprofit/firefox-ios,taoguan/firefox-ios,lady12/firefox-ios,Acidburn0zzz/firefox-ios,matthewpurcell/firefox-ios,SuPair/firefox-ios,ipmobiletech/firefox-ios,luoziyong/firefox-ios,mshhmzh/firefox-ios,Ehrippura/firefox-ios,justindarc/firefox-ios,tecgirl/firefox-ios,oscarmorrison/firefox-ios,taochengbo/firefox-ios,luoziyong/firefox-ios,sachin004/firefox-ios,vishnuvaradaraj/firefox-ios,dhanvi/firefox-ios,marcuses/firefox-ios,knorrium/firefox-ios,Allow2CEO/browser-ios,justindarc/firefox-ios,xiaoyanit/firefox-ios,Allow2CEO/browser-ios,aaronraimist/firefox-ios,vishnuvaradaraj/firefox-ios,garvankeeley/firefox-ios,xiaoyanit/firefox-ios,fscherwi/firefox-ios,jacobwhite/firefox-ios,taoguan/firefox-ios,st3fan/firefox-ios,Ehrippura/firefox-ios,vishnuvaradaraj/firefox-ios,garvankeeley/firefox-ios,youprofit/firefox-ios,tecgirl/firefox-ios,ipmobiletech/firefox-ios,varkor/firefox-ios,youprofit/firefox-ios,Allow2CEO/browser-ios,Ferrari-lee/firefox-ios,DarrenKong/firefox-ios,marcuses/firefox-ios,garvankeeley/firefox-ios,eoger/firefox-ios,farhanpatel/firefox-ios,ilhanadiyaman/firefox-ios,zybug/firefox-ios,luoziyong/firefox-ios,dhanvi/firefox-ios,ncalexan/firefox-ios,xiaoyanit/firefox-ios,doronkatz/firefox-ios,Allow2CEO/browser-ios,remypanicker/firefox-ios,tecgirl/firefox-ios,dhanvi/firefox-ios,kesun421/firefox-ios,hgl888/firefox-ios,zybug/firefox-ios,z8927623/firefox-ios,ilhanadiyaman/firefox-ios,eoger/firefox-ios,fscherwi/firefox-ios,matthewpurcell/firefox-ios,marcuses/firefox-ios,Johennes/firefox-ios,Ferrari-lee/firefox-ios,belkhadir/firefox-ios,serbomjack/Firefox-for-windows-10-mobile,reza-ryte-club/firefox-ios,sharath-cliqz/browser-ios,z8927623/firefox-ios,flodolo/firefox-ios,remypanicker/firefox-ios,alessiobrozzi/firefox-ios,oscarmorrison/firefox-ios,z8927623/firefox-ios,SuPair/firefox-ios,flodolo/firefox-ios,shorlander/firefox-ios,ilhanadiyaman/firefox-ios,xiaoyanit/firefox-ios,DarrenKong/firefox-ios,alessiobrozzi/firefox-ios,mkaply/firefox-ios,mauryat/firefox-ios,dhanvi/firefox-ios,mshhmzh/firefox-ios,vbudhram/firefox-ios,mkaply/firefox-ios,eoger/firefox-ios,shorlander/firefox-ios,thebnich/firefox-ios,radazzouz/firefox-ios,belkhadir/firefox-ios,Ferrari-lee/firefox-ios,Johennes/firefox-ios,AaronMT/firefox-ios,hgl888/firefox-ios,matthewpurcell/firefox-ios,aaronraimist/firefox-ios,mozilla-mobile/firefox-ios,fscherwi/firefox-ios,knorrium/firefox-ios,knorrium/firefox-ios,remypanicker/firefox-ios,mauryat/firefox-ios,SuPair/firefox-ios,oscarmorrison/firefox-ios,mkaply/firefox-ios,TribeMedia/firefox-ios,alessiobrozzi/firefox-ios,Ferrari-lee/firefox-ios,HongliYu/firefox-ios,belkhadir/firefox-ios,varkor/firefox-ios,HongliYu/firefox-ios,AaronMT/firefox-ios,cliqz-oss/browser-ios,flodolo/firefox-ios,luoziyong/firefox-ios,taochengbo/firefox-ios,HongliYu/firefox-ios,vbudhram/firefox-ios
swift
## Code Before: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import Foundation import FxA import Shared import UIKit import XCTest class SyncAuthStateTests: LiveAccountTest { func testLive() { let e = self.expectationWithDescription("Wait for token.") syncAuthState(NSDate.now()).upon { result in if let (token, forKey) = result.successValue { let uidString = NSNumber(unsignedLongLong: token.uid).stringValue XCTAssertTrue(token.api_endpoint.endsWith(uidString)) XCTAssertNotNil(forKey) } else { if let error = result.failureValue as? AccountError { XCTAssertEqual(error, AccountError.NoSignedInUser) } else { XCTAssertEqual(result.failureValue!.description, "<FxAClientError.Local Error Domain=NSURLErrorDomain Code=-999 \"cancelled\">") } } e.fulfill() } self.waitForExpectationsWithTimeout(10, handler: nil) } } ## Instruction: Undo incorrectly 'fixed' test - should not produce an error! ## Code After: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import Foundation import FxA import Shared import UIKit import XCTest class SyncAuthStateTests: LiveAccountTest { func testLive() { let e = self.expectationWithDescription("Wait for token.") syncAuthState(NSDate.now()).upon { result in if let (token, forKey) = result.successValue { let uidString = NSNumber(unsignedLongLong: token.uid).stringValue XCTAssertTrue(token.api_endpoint.endsWith(uidString)) XCTAssertNotNil(forKey) } else { if let error = result.failureValue as? AccountError { XCTAssertEqual(error, AccountError.NoSignedInUser) } else { XCTAssertEqual(result.failureValue!.description, "") } } e.fulfill() } self.waitForExpectationsWithTimeout(10, handler: nil) } }
6011286b6f88d42781b8e38184cffeef38e85aa6
dist.min.config.babel.js
dist.min.config.babel.js
/** * ReactFashionWatch - a carefully crafted Fashion Watch component for React. * https://github.com/virtyaluk/react-fashion-watch * * Copyright (c) 2016 Bohdan Shtepan * http://modern-dev.com/ * * Licensed under the MIT license. */ import cfg from './dist.config.babel'; import ExtractTextPlugin from 'extract-text-webpack-plugin'; cfg.output.filename = 'react-fashion-watch.min.js'; cfg.plugins[0] = new ExtractTextPlugin('styles.min.css'); export default cfg;
/** * ReactFashionWatch - a carefully crafted Fashion Watch component for React. * https://github.com/virtyaluk/react-fashion-watch * * Copyright (c) 2016 Bohdan Shtepan * http://modern-dev.com/ * * Licensed under the MIT license. */ import cfg from './dist.config.babel'; import ExtractTextPlugin from 'extract-text-webpack-plugin'; cfg.output.filename = 'react-fashion-watch.min.js'; cfg.plugins[0] = new ExtractTextPlugin('react-fashion-watch.min.css'); export default cfg;
Fix output css file name
Fix output css file name
JavaScript
mit
virtyaluk/react-fashion-watch,virtyaluk/react-fashion-watch
javascript
## Code Before: /** * ReactFashionWatch - a carefully crafted Fashion Watch component for React. * https://github.com/virtyaluk/react-fashion-watch * * Copyright (c) 2016 Bohdan Shtepan * http://modern-dev.com/ * * Licensed under the MIT license. */ import cfg from './dist.config.babel'; import ExtractTextPlugin from 'extract-text-webpack-plugin'; cfg.output.filename = 'react-fashion-watch.min.js'; cfg.plugins[0] = new ExtractTextPlugin('styles.min.css'); export default cfg; ## Instruction: Fix output css file name ## Code After: /** * ReactFashionWatch - a carefully crafted Fashion Watch component for React. * https://github.com/virtyaluk/react-fashion-watch * * Copyright (c) 2016 Bohdan Shtepan * http://modern-dev.com/ * * Licensed under the MIT license. */ import cfg from './dist.config.babel'; import ExtractTextPlugin from 'extract-text-webpack-plugin'; cfg.output.filename = 'react-fashion-watch.min.js'; cfg.plugins[0] = new ExtractTextPlugin('react-fashion-watch.min.css'); export default cfg;
c23af53bfde5d55860d5e988f75b3cc43f8ad060
build_and_deploy.sh
build_and_deploy.sh
rm -r dist/* rm -r build/* rmdir dist rmdir build python setup.py sdist python setup.py bdist_wheel #twine upload dist/* twine upload --repository-url https://test.pypi.org/legacy/ dist/*
rm -r dist/* rm -r build/* rmdir dist rmdir build python setup.py sdist python setup.py bdist_wheel twine upload dist/*
Update build script for real pypi
Update build script for real pypi
Shell
apache-2.0
great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations
shell
## Code Before: rm -r dist/* rm -r build/* rmdir dist rmdir build python setup.py sdist python setup.py bdist_wheel #twine upload dist/* twine upload --repository-url https://test.pypi.org/legacy/ dist/* ## Instruction: Update build script for real pypi ## Code After: rm -r dist/* rm -r build/* rmdir dist rmdir build python setup.py sdist python setup.py bdist_wheel twine upload dist/*
b1b25ffaa756b1b1e01a35616933c204b8b48843
lib/warden_oauth_provider/token_strategy.rb
lib/warden_oauth_provider/token_strategy.rb
module WardenOauthProvider class TokenStrategy < Warden::Strategies::Base def valid? true end def authenticate! request_token = WardenOauthProvider::Token::Request.find_by_token(request.params["oauth_token"]) if !request_token or request_token.invalidated? fail! else if request_token.authorize!(env['warden'].user) redirect_url = URI.parse(request_token.oob? ? request_token.client_application.callback_url : request_token.callback_url) redirect_url.query ||= "" redirect_url.query += "&" unless redirect_url.query.blank? redirect_url.query += "oauth_token=#{request_token.token}&oauth_verifier=#{request_token.verifier}" env['oauth.redirect_url'] = redirect_url.to_s success!(request_token) else fail!("Token authorization failed!") end end end private def request @request ||= Rack::Request.new(env) end end end
module WardenOauthProvider class TokenStrategy < Warden::Strategies::Base def valid? true end def authenticate! request_token = WardenOauthProvider::Token::Request.find_by_token(request.params["oauth_token"]) if !request_token or request_token.invalidated? fail! else if request_token.authorize!(env['warden'].user) redirect_url = URI.parse(request_token.oob? ? request_token.client_application.callback_url : request_token.callback_url) redirect_url.query ||= "" redirect_url.query += "&" unless redirect_url.query.blank? redirect_url.query += "oauth_token=#{request_token.token}&oauth_verifier=#{request_token.verifier}" env['oauth.redirect_url'] = redirect_url.to_s success!(env['warden'].user) else fail!("Token authorization failed!") end end end private def request @request ||= Rack::Request.new(env) end end end
Fix for 404 redirect error
Fix for 404 redirect error
Ruby
mit
moneybird/warden_oauth_provider
ruby
## Code Before: module WardenOauthProvider class TokenStrategy < Warden::Strategies::Base def valid? true end def authenticate! request_token = WardenOauthProvider::Token::Request.find_by_token(request.params["oauth_token"]) if !request_token or request_token.invalidated? fail! else if request_token.authorize!(env['warden'].user) redirect_url = URI.parse(request_token.oob? ? request_token.client_application.callback_url : request_token.callback_url) redirect_url.query ||= "" redirect_url.query += "&" unless redirect_url.query.blank? redirect_url.query += "oauth_token=#{request_token.token}&oauth_verifier=#{request_token.verifier}" env['oauth.redirect_url'] = redirect_url.to_s success!(request_token) else fail!("Token authorization failed!") end end end private def request @request ||= Rack::Request.new(env) end end end ## Instruction: Fix for 404 redirect error ## Code After: module WardenOauthProvider class TokenStrategy < Warden::Strategies::Base def valid? true end def authenticate! request_token = WardenOauthProvider::Token::Request.find_by_token(request.params["oauth_token"]) if !request_token or request_token.invalidated? fail! else if request_token.authorize!(env['warden'].user) redirect_url = URI.parse(request_token.oob? ? request_token.client_application.callback_url : request_token.callback_url) redirect_url.query ||= "" redirect_url.query += "&" unless redirect_url.query.blank? redirect_url.query += "oauth_token=#{request_token.token}&oauth_verifier=#{request_token.verifier}" env['oauth.redirect_url'] = redirect_url.to_s success!(env['warden'].user) else fail!("Token authorization failed!") end end end private def request @request ||= Rack::Request.new(env) end end end
79a8dbcddb7b0065541eaabaf7c8ee718be26e80
lib/node_modules/@stdlib/utils/find/lib/index.js
lib/node_modules/@stdlib/utils/find/lib/index.js
'use strict'; /** * Find elements in an array-like object that satisfy a test condition. * * @module @stdlib/utils/find * * @example * var find = require( '@stdlib/utils/find' ); * * var data = [ 30, 20, 50, 60, 10 ]; * * function condition( val ) { * return val > 20; * } * * var vals = find( data, condition ); * // returns [ 0, 2, 3 ] * * data = [ 30, 20, 50, 60, 10 ]; * var opts = { * 'k': 2, * 'returns': 'values' * }; * vals = find( data, opts, condition ); * // returns [ 30, 50 ] */ // MODULES // var find = require( './find.js' ); // EXPORTS // module.exports = find;
'use strict'; /** * Find elements in an array-like object that satisfy a test condition. * * @module @stdlib/utils/find * * @example * var find = require( '@stdlib/utils/find' ); * * var data = [ 30, 20, 50, 60, 10 ]; * * function condition( val ) { * return val > 20; * } * * var vals = find( data, condition ); * // returns [ 0, 2, 3 ] * * data = [ 30, 20, 50, 60, 10 ]; * var opts = { * 'k': 2, * 'returns': 'values' * }; * vals = find( data, opts, condition ); * // returns [ 30, 50 ] */ // MODULES // var find = require( './find.js' ); // eslint-disable-line no-redeclare // EXPORTS // module.exports = find;
Disable no-redeclare for non-standard `find` identifier
Disable no-redeclare for non-standard `find` identifier
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
javascript
## Code Before: 'use strict'; /** * Find elements in an array-like object that satisfy a test condition. * * @module @stdlib/utils/find * * @example * var find = require( '@stdlib/utils/find' ); * * var data = [ 30, 20, 50, 60, 10 ]; * * function condition( val ) { * return val > 20; * } * * var vals = find( data, condition ); * // returns [ 0, 2, 3 ] * * data = [ 30, 20, 50, 60, 10 ]; * var opts = { * 'k': 2, * 'returns': 'values' * }; * vals = find( data, opts, condition ); * // returns [ 30, 50 ] */ // MODULES // var find = require( './find.js' ); // EXPORTS // module.exports = find; ## Instruction: Disable no-redeclare for non-standard `find` identifier ## Code After: 'use strict'; /** * Find elements in an array-like object that satisfy a test condition. * * @module @stdlib/utils/find * * @example * var find = require( '@stdlib/utils/find' ); * * var data = [ 30, 20, 50, 60, 10 ]; * * function condition( val ) { * return val > 20; * } * * var vals = find( data, condition ); * // returns [ 0, 2, 3 ] * * data = [ 30, 20, 50, 60, 10 ]; * var opts = { * 'k': 2, * 'returns': 'values' * }; * vals = find( data, opts, condition ); * // returns [ 30, 50 ] */ // MODULES // var find = require( './find.js' ); // eslint-disable-line no-redeclare // EXPORTS // module.exports = find;
9a0adb5fc4d07aa4ec4d725e1ddc9b651e622fce
setup.py
setup.py
"""Model-like encapsulation of big dict structure (like JSON data).""" from setuptools import setup, find_packages setup( name='barrel', version='0.1.3', description='python interface to reaktor API', long_description=__doc__, license='BSD', author='txtr web team', author_email='[email protected]', url='https://github.com/txtr/barrel/', packages=find_packages(), platforms='any', install_requires=['blinker', 'iso8601', 'holon', ], dependency_links=[ 'https://github.com/txtr/holon/zipball/0.0.5#egg=holon', ] )
"""Model-like encapsulation of big dict structure (like JSON data).""" from setuptools import setup, find_packages setup( name='barrel', version='0.2.0', description='Python stores for JSON data encapsulation', long_description=__doc__, license='BSD', author='txtr web team', author_email='[email protected]', url='https://github.com/txtr/barrel/', packages=find_packages(), platforms='any', install_requires=['blinker', 'iso8601', 'holon', ], dependency_links=[ 'https://github.com/txtr/holon/zipball/0.0.5#egg=holon', ] )
Bump version to 0.2.0 and update description.
Bump version to 0.2.0 and update description.
Python
bsd-2-clause
storecast/barrel
python
## Code Before: """Model-like encapsulation of big dict structure (like JSON data).""" from setuptools import setup, find_packages setup( name='barrel', version='0.1.3', description='python interface to reaktor API', long_description=__doc__, license='BSD', author='txtr web team', author_email='[email protected]', url='https://github.com/txtr/barrel/', packages=find_packages(), platforms='any', install_requires=['blinker', 'iso8601', 'holon', ], dependency_links=[ 'https://github.com/txtr/holon/zipball/0.0.5#egg=holon', ] ) ## Instruction: Bump version to 0.2.0 and update description. ## Code After: """Model-like encapsulation of big dict structure (like JSON data).""" from setuptools import setup, find_packages setup( name='barrel', version='0.2.0', description='Python stores for JSON data encapsulation', long_description=__doc__, license='BSD', author='txtr web team', author_email='[email protected]', url='https://github.com/txtr/barrel/', packages=find_packages(), platforms='any', install_requires=['blinker', 'iso8601', 'holon', ], dependency_links=[ 'https://github.com/txtr/holon/zipball/0.0.5#egg=holon', ] )
02d6ab9e5eb4e7143a006b2c24f9d5d1856e9754
src/peergos/server/net/JarHandler.java
src/peergos/server/net/JarHandler.java
package peergos.server.net; import java.io.*; import java.nio.file.Path; public class JarHandler extends StaticHandler { private final Path root; public JarHandler(boolean isGzip, Path root) { super(isGzip); this.root = root; } @Override public Asset getAsset(String resourcePath) throws IOException { String pathWithinJar = root.resolve(resourcePath).toString(); ClassLoader context = Thread.currentThread().getContextClassLoader(); byte[] data = StaticHandler.readResource(context.getResourceAsStream(pathWithinJar), isGzip()); return new Asset(data); } }
package peergos.server.net; import java.io.*; import java.nio.file.Path; public class JarHandler extends StaticHandler { private final Path root; public JarHandler(boolean isGzip, Path root) { super(isGzip); this.root = root; } @Override public Asset getAsset(String resourcePath) throws IOException { String pathWithinJar = "/" + root.resolve(resourcePath).toString() .replaceAll("\\\\", "/"); // needed for Windows! byte[] data = StaticHandler.readResource(JarHandler.class.getResourceAsStream(pathWithinJar), isGzip()); return new Asset(data); } }
Fix jar static file handler on Windows
Fix jar static file handler on Windows
Java
agpl-3.0
ianopolous/Peergos,ianopolous/Peergos,Peergos/Peergos,ianopolous/Peergos,Peergos/Peergos,Peergos/Peergos
java
## Code Before: package peergos.server.net; import java.io.*; import java.nio.file.Path; public class JarHandler extends StaticHandler { private final Path root; public JarHandler(boolean isGzip, Path root) { super(isGzip); this.root = root; } @Override public Asset getAsset(String resourcePath) throws IOException { String pathWithinJar = root.resolve(resourcePath).toString(); ClassLoader context = Thread.currentThread().getContextClassLoader(); byte[] data = StaticHandler.readResource(context.getResourceAsStream(pathWithinJar), isGzip()); return new Asset(data); } } ## Instruction: Fix jar static file handler on Windows ## Code After: package peergos.server.net; import java.io.*; import java.nio.file.Path; public class JarHandler extends StaticHandler { private final Path root; public JarHandler(boolean isGzip, Path root) { super(isGzip); this.root = root; } @Override public Asset getAsset(String resourcePath) throws IOException { String pathWithinJar = "/" + root.resolve(resourcePath).toString() .replaceAll("\\\\", "/"); // needed for Windows! byte[] data = StaticHandler.readResource(JarHandler.class.getResourceAsStream(pathWithinJar), isGzip()); return new Asset(data); } }
c10cfa0cecac786eeffc15ca36dd9afa839ff081
db/seeds.rb
db/seeds.rb
i = 1 until i == 20 page = Page.create(text: Faker::Lorem.paragraph, next_page_id: i+1) if page.id % 3 == 0 page.has_challenge = true Challenge.create(page_id: page.id, success_page_id: rand(20), fail_page_id: rand(20)) page.next_page = nil page.save end i+=1 end pro_users = [] 5.times do pro_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email: Faker::Internet.email) end new_users = [] 3.times do new_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email:Faker::Internet.email) end pro_users.each do |user| i = 0 until i > Challenge.all.count outcome = [true,false].sample UserChallenge.create(user_id: rand(user.id), challenge_id: i, success: outcome ) i+=1 end end pro_users.each do |user| i = 1 until i > Page.all.count UserPage.create(user_id: user.id, page_id: i) i += 1 end end
i = 1 until i == 20 page = Page.create(text: Faker::Lorem.paragraph, next_page_id: i+1) if page.id % 3 == 0 Challenge.create(page_id: page.id, success_page_id: rand(20), fail_page_id: rand(20)) page.next_page = nil page.save end i+=1 end pro_users = [] 5.times do pro_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email: Faker::Internet.email) end new_users = [] 3.times do new_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email:Faker::Internet.email) end pro_users.each do |user| i = 0 until i > Challenge.all.count outcome = [true,false].sample UserChallenge.create(user_id: rand(user.id), challenge_id: i, success: outcome ) i+=1 end end pro_users.each do |user| i = 1 until i > Page.all.count UserPage.create(user_id: user.id, page_id: i) i += 1 end end
Update seed file to reflect removal of has_challenge boolean form User migration.
Update seed file to reflect removal of has_challenge boolean form User migration.
Ruby
mit
lukert33/project_raleigh,lukert33/project_raleigh
ruby
## Code Before: i = 1 until i == 20 page = Page.create(text: Faker::Lorem.paragraph, next_page_id: i+1) if page.id % 3 == 0 page.has_challenge = true Challenge.create(page_id: page.id, success_page_id: rand(20), fail_page_id: rand(20)) page.next_page = nil page.save end i+=1 end pro_users = [] 5.times do pro_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email: Faker::Internet.email) end new_users = [] 3.times do new_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email:Faker::Internet.email) end pro_users.each do |user| i = 0 until i > Challenge.all.count outcome = [true,false].sample UserChallenge.create(user_id: rand(user.id), challenge_id: i, success: outcome ) i+=1 end end pro_users.each do |user| i = 1 until i > Page.all.count UserPage.create(user_id: user.id, page_id: i) i += 1 end end ## Instruction: Update seed file to reflect removal of has_challenge boolean form User migration. ## Code After: i = 1 until i == 20 page = Page.create(text: Faker::Lorem.paragraph, next_page_id: i+1) if page.id % 3 == 0 Challenge.create(page_id: page.id, success_page_id: rand(20), fail_page_id: rand(20)) page.next_page = nil page.save end i+=1 end pro_users = [] 5.times do pro_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email: Faker::Internet.email) end new_users = [] 3.times do new_users << User.create(username:Faker::Internet.user_name, password:Faker::Internet.password, email:Faker::Internet.email) end pro_users.each do |user| i = 0 until i > Challenge.all.count outcome = [true,false].sample UserChallenge.create(user_id: rand(user.id), challenge_id: i, success: outcome ) i+=1 end end pro_users.each do |user| i = 1 until i > Page.all.count UserPage.create(user_id: user.id, page_id: i) i += 1 end end
e29c8976bb1ba648b4ba0bc43194bf10949b29f8
spec/rackstash/encoders/json_spec.rb
spec/rackstash/encoders/json_spec.rb
require 'spec_helper' require 'rackstash/encoders/json' describe Rackstash::Encoders::JSON do let(:encoder) { Rackstash::Encoders::JSON.new } describe '#encode' do it 'formats the passed event hash as a JSON string' do event = { 'hello' => 'world', 'message' => 'hello' } expect(encoder.encode(event)).to eql '{"hello":"world","message":"hello"}' end it 'formats newlines as \n' do event = { 'message' => "text\nwith\nnewlines" } expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}' end it 'rstrips the message' do event = { 'message' => "line1\nline2\n \n\t\n" } expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}' end end end
require 'spec_helper' require 'rackstash/encoders/json' describe Rackstash::Encoders::JSON do let(:encoder) { Rackstash::Encoders::JSON.new } describe '#encode' do it 'formats the passed event hash as a JSON string' do event = { 'hello' => 'world', 'message' => 'hello' } expect(encoder.encode(event)).to eql '{"hello":"world","message":"hello"}' end it 'formats newlines as \n' do event = { 'message' => "text\nwith\nnewlines" } expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}' end it 'strips the message from all surpunding whitespace' do event = { 'message' => "\n\t \nline1\nline2\n \n\t\n" } expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}' end end end
Clarify that the JSON encoder strips all whitespace
Clarify that the JSON encoder strips all whitespace
Ruby
mit
meineerde/rackstash,meineerde/rackstash
ruby
## Code Before: require 'spec_helper' require 'rackstash/encoders/json' describe Rackstash::Encoders::JSON do let(:encoder) { Rackstash::Encoders::JSON.new } describe '#encode' do it 'formats the passed event hash as a JSON string' do event = { 'hello' => 'world', 'message' => 'hello' } expect(encoder.encode(event)).to eql '{"hello":"world","message":"hello"}' end it 'formats newlines as \n' do event = { 'message' => "text\nwith\nnewlines" } expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}' end it 'rstrips the message' do event = { 'message' => "line1\nline2\n \n\t\n" } expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}' end end end ## Instruction: Clarify that the JSON encoder strips all whitespace ## Code After: require 'spec_helper' require 'rackstash/encoders/json' describe Rackstash::Encoders::JSON do let(:encoder) { Rackstash::Encoders::JSON.new } describe '#encode' do it 'formats the passed event hash as a JSON string' do event = { 'hello' => 'world', 'message' => 'hello' } expect(encoder.encode(event)).to eql '{"hello":"world","message":"hello"}' end it 'formats newlines as \n' do event = { 'message' => "text\nwith\nnewlines" } expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}' end it 'strips the message from all surpunding whitespace' do event = { 'message' => "\n\t \nline1\nline2\n \n\t\n" } expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}' end end end
a89adf35a155b2feac610cb5b7d558640c82ed05
plugins/spaminator/test/unit/spaminator_plugin/report_test.rb
plugins/spaminator/test/unit/spaminator_plugin/report_test.rb
require 'test_helper' class SpaminatorPlugin::ReportTest < ActiveSupport::TestCase should 'must belong to an environment' do report = SpaminatorPlugin::Report.new report.valid? assert report.errors.include?(:environment) report.environment = Environment.default report.valid? refute report.errors.include?(:environment) end should 'have scope of all reports from an environment' do environment = Environment.default r1 = SpaminatorPlugin::Report.create(:environment => environment) r2 = SpaminatorPlugin::Report.create(:environment => environment) r3 = SpaminatorPlugin::Report.create(:environment => environment) r4 = SpaminatorPlugin::Report.create(:environment => fast_create(Environment)) reports = SpaminatorPlugin::Report.from_environment(environment) assert_equal ActiveRecord::Relation, reports.class assert_includes reports, r1 assert_includes reports, r2 assert_includes reports, r3 assert_not_includes reports, r4 end should 'initialize failed hash' do report = SpaminatorPlugin::Report.new assert report.failed.kind_of?(Hash) assert report.failed.has_key?(:people) assert report.failed.has_key?(:comments) assert_equal [], report.failed[:people] assert_equal [], report.failed[:comments] end end
require 'test_helper' class SpaminatorPlugin::ReportTest < ActiveSupport::TestCase should 'must belong to an environment' do report = SpaminatorPlugin::Report.new report.valid? assert report.errors.include?(:environment) report.environment = Environment.default report.valid? refute report.errors.include?(:environment) end should 'have scope of all reports from an environment' do environment = Environment.default r1 = SpaminatorPlugin::Report.create(:environment => environment) r2 = SpaminatorPlugin::Report.create(:environment => environment) r3 = SpaminatorPlugin::Report.create(:environment => environment) r4 = SpaminatorPlugin::Report.create(:environment => fast_create(Environment)) reports = SpaminatorPlugin::Report.from_environment(environment) assert_includes reports, r1 assert_includes reports, r2 assert_includes reports, r3 assert_not_includes reports, r4 end should 'initialize failed hash' do report = SpaminatorPlugin::Report.new assert report.failed.kind_of?(Hash) assert report.failed.has_key?(:people) assert report.failed.has_key?(:comments) assert_equal [], report.failed[:people] assert_equal [], report.failed[:comments] end end
Remove unnecessary type assert (fix test)
spaminator: Remove unnecessary type assert (fix test)
Ruby
agpl-3.0
AlessandroCaetano/noosfero,coletivoEITA/noosfero-ecosol,alexandreab/noosfero,CIRANDAS/noosfero-ecosol,AlessandroCaetano/noosfero,blogoosfero/noosfero,vfcosta/noosfero,tallysmartins/noosfero,macartur/noosfero,evandrojr/noosfero,evandrojr/noosfero,vfcosta/noosfero,evandrojr/noosfero,vfcosta/noosfero,marcosronaldo/noosfero,samasti/noosfero,blogoosfero/noosfero,alexandreab/noosfero,tallysmartins/noosfero,AlessandroCaetano/noosfero,macartur/noosfero,coletivoEITA/noosfero-ecosol,alexandreab/noosfero,marcosronaldo/noosfero,tallysmartins/noosfero,evandrojr/noosfero,AlessandroCaetano/noosfero,evandrojr/noosfero,LuisBelo/tccnoosfero,marcosronaldo/noosfero,larissa/noosfero,LuisBelo/tccnoosfero,alexandreab/noosfero,evandrojr/noosfero,vfcosta/noosfero,larissa/noosfero,tallysmartins/noosfero,larissa/noosfero,evandrojr/noosfero,blogoosfero/noosfero,CIRANDAS/noosfero-ecosol,coletivoEITA/noosfero-ecosol,LuisBelo/tccnoosfero,marcosronaldo/noosfero,blogoosfero/noosfero,larissa/noosfero,tallysmartins/noosfero,larissa/noosfero,blogoosfero/noosfero,LuisBelo/tccnoosfero,CIRANDAS/noosfero-ecosol,marcosronaldo/noosfero,coletivoEITA/noosfero-ecosol,tallysmartins/noosfero,AlessandroCaetano/noosfero,LuisBelo/tccnoosfero,alexandreab/noosfero,macartur/noosfero,marcosronaldo/noosfero,alexandreab/noosfero,CIRANDAS/noosfero-ecosol,samasti/noosfero,AlessandroCaetano/noosfero,macartur/noosfero,AlessandroCaetano/noosfero,samasti/noosfero,blogoosfero/noosfero,samasti/noosfero,larissa/noosfero,blogoosfero/noosfero,LuisBelo/tccnoosfero,macartur/noosfero,tallysmartins/noosfero,coletivoEITA/noosfero-ecosol,vfcosta/noosfero,samasti/noosfero,CIRANDAS/noosfero-ecosol,macartur/noosfero,coletivoEITA/noosfero-ecosol,macartur/noosfero,vfcosta/noosfero,larissa/noosfero,marcosronaldo/noosfero,alexandreab/noosfero,samasti/noosfero
ruby
## Code Before: require 'test_helper' class SpaminatorPlugin::ReportTest < ActiveSupport::TestCase should 'must belong to an environment' do report = SpaminatorPlugin::Report.new report.valid? assert report.errors.include?(:environment) report.environment = Environment.default report.valid? refute report.errors.include?(:environment) end should 'have scope of all reports from an environment' do environment = Environment.default r1 = SpaminatorPlugin::Report.create(:environment => environment) r2 = SpaminatorPlugin::Report.create(:environment => environment) r3 = SpaminatorPlugin::Report.create(:environment => environment) r4 = SpaminatorPlugin::Report.create(:environment => fast_create(Environment)) reports = SpaminatorPlugin::Report.from_environment(environment) assert_equal ActiveRecord::Relation, reports.class assert_includes reports, r1 assert_includes reports, r2 assert_includes reports, r3 assert_not_includes reports, r4 end should 'initialize failed hash' do report = SpaminatorPlugin::Report.new assert report.failed.kind_of?(Hash) assert report.failed.has_key?(:people) assert report.failed.has_key?(:comments) assert_equal [], report.failed[:people] assert_equal [], report.failed[:comments] end end ## Instruction: spaminator: Remove unnecessary type assert (fix test) ## Code After: require 'test_helper' class SpaminatorPlugin::ReportTest < ActiveSupport::TestCase should 'must belong to an environment' do report = SpaminatorPlugin::Report.new report.valid? assert report.errors.include?(:environment) report.environment = Environment.default report.valid? refute report.errors.include?(:environment) end should 'have scope of all reports from an environment' do environment = Environment.default r1 = SpaminatorPlugin::Report.create(:environment => environment) r2 = SpaminatorPlugin::Report.create(:environment => environment) r3 = SpaminatorPlugin::Report.create(:environment => environment) r4 = SpaminatorPlugin::Report.create(:environment => fast_create(Environment)) reports = SpaminatorPlugin::Report.from_environment(environment) assert_includes reports, r1 assert_includes reports, r2 assert_includes reports, r3 assert_not_includes reports, r4 end should 'initialize failed hash' do report = SpaminatorPlugin::Report.new assert report.failed.kind_of?(Hash) assert report.failed.has_key?(:people) assert report.failed.has_key?(:comments) assert_equal [], report.failed[:people] assert_equal [], report.failed[:comments] end end
5f998678d32ff40faa7dbd31af50f1354a5895b0
src/clj/my_money/routes/upload.clj
src/clj/my_money/routes/upload.clj
(ns my-money.routes.upload (:require [my-money.op-csv :refer :all] [compojure.core :refer [defroutes POST]] [ring.util.http-response :as response])) (defroutes upload-routes (POST "/upload" [file] (let [data (read-csv (slurp (:tempfile file)))] (-> (response/ok (-> data (remove-column-by-name "Arkistointitunnus")))))))
(ns my-money.routes.upload (:require [my-money.op-csv :refer :all] [compojure.core :refer [defroutes POST]] [ring.util.http-response :as response])) (defroutes upload-routes (POST "/upload" [file] (let [data (read-csv (slurp (:tempfile file) :encoding "ISO-8859-1"))] (-> (response/ok (-> data (remove-column-by-name "Arvopäivä") (remove-column-by-name "Laji") (remove-column-by-name "Arkistointitunnus")))))))
Fix character encodings for the data read from the csv. Remove columns from the response.
Fix character encodings for the data read from the csv. Remove columns from the response.
Clojure
mit
Juholei/my-money,Juholei/my-money
clojure
## Code Before: (ns my-money.routes.upload (:require [my-money.op-csv :refer :all] [compojure.core :refer [defroutes POST]] [ring.util.http-response :as response])) (defroutes upload-routes (POST "/upload" [file] (let [data (read-csv (slurp (:tempfile file)))] (-> (response/ok (-> data (remove-column-by-name "Arkistointitunnus"))))))) ## Instruction: Fix character encodings for the data read from the csv. Remove columns from the response. ## Code After: (ns my-money.routes.upload (:require [my-money.op-csv :refer :all] [compojure.core :refer [defroutes POST]] [ring.util.http-response :as response])) (defroutes upload-routes (POST "/upload" [file] (let [data (read-csv (slurp (:tempfile file) :encoding "ISO-8859-1"))] (-> (response/ok (-> data (remove-column-by-name "Arvopäivä") (remove-column-by-name "Laji") (remove-column-by-name "Arkistointitunnus")))))))
233e74abcc4a70f573e199074f5184b30bdfe1d2
seam/__init__.py
seam/__init__.py
__author__ = 'Scott Burns <[email protected]>' __copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved' __version__ = '0.0' import freesurfer
__author__ = 'Scott Burns <[email protected]>' __copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved' __version__ = '0.0' from . import freesurfer __all__ = ['freesurfer', ]
Fix py3k relative import error
Fix py3k relative import error
Python
mit
VUIIS/seam,VUIIS/seam
python
## Code Before: __author__ = 'Scott Burns <[email protected]>' __copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved' __version__ = '0.0' import freesurfer ## Instruction: Fix py3k relative import error ## Code After: __author__ = 'Scott Burns <[email protected]>' __copyright__ = 'Copyright 2014 Vanderbilt University. All Rights Reserved' __version__ = '0.0' from . import freesurfer __all__ = ['freesurfer', ]
5d63a2f4eed4b7c3ae50784905aa73fc9008d9a0
META6.json
META6.json
{ "perl" : "6.c", "name" : "Inline::Brainfuck", "license" : "Artistic-2.0", "version" : "1.001001", "description" : "Use Brainfuck language in your Perl 6 programs", "depends" : [ "Term::termios" ], "test-depends" : [ "Test", "Test::Output" ], "provides" : { "Inline::Brainfuck" : "lib/Inline/Brainfuck.pm6" }, "authors" : [ "Zoffix Znet" ], "support" : {"source" : "git://github.com/zoffixznet/perl6-Inline-Brainfuck.git"} }
{ "perl" : "6.c", "name" : "Inline::Brainfuck", "license" : "Artistic-2.0", "version" : "1.001001", "description" : "Use Brainfuck language in your Raku programs", "depends" : [ "Term::termios" ], "test-depends" : [ "Test", "Test::Output" ], "provides" : { "Inline::Brainfuck" : "lib/Inline/Brainfuck.pm6" }, "authors" : [ "Zoffix Znet" ], "support" : {"source" : "git://github.com/raku-community-modules/Inline-Brainfuck.git"} }
Update source URL and s/Perl6/Raku
Update source URL and s/Perl6/Raku
JSON
artistic-2.0
zoffixznet/perl6-Inline-Brainfuck
json
## Code Before: { "perl" : "6.c", "name" : "Inline::Brainfuck", "license" : "Artistic-2.0", "version" : "1.001001", "description" : "Use Brainfuck language in your Perl 6 programs", "depends" : [ "Term::termios" ], "test-depends" : [ "Test", "Test::Output" ], "provides" : { "Inline::Brainfuck" : "lib/Inline/Brainfuck.pm6" }, "authors" : [ "Zoffix Znet" ], "support" : {"source" : "git://github.com/zoffixznet/perl6-Inline-Brainfuck.git"} } ## Instruction: Update source URL and s/Perl6/Raku ## Code After: { "perl" : "6.c", "name" : "Inline::Brainfuck", "license" : "Artistic-2.0", "version" : "1.001001", "description" : "Use Brainfuck language in your Raku programs", "depends" : [ "Term::termios" ], "test-depends" : [ "Test", "Test::Output" ], "provides" : { "Inline::Brainfuck" : "lib/Inline/Brainfuck.pm6" }, "authors" : [ "Zoffix Znet" ], "support" : {"source" : "git://github.com/raku-community-modules/Inline-Brainfuck.git"} }
fa776fc0d3c568bda7d84ccd9b345e34c3fcf312
ideascube/mediacenter/tests/factories.py
ideascube/mediacenter/tests/factories.py
from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileField() credits = "Document credits" package_id = "" @factory.post_generation def tags(self, create, extracted, **kwargs): if extracted: self.tags.add(*extracted) class Meta: model = Document
from django.conf import settings import factory from ..models import Document class EmptyFileField(factory.django.FileField): DEFAULT_FILENAME = None class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileField() preview = EmptyFileField() credits = "Document credits" package_id = "" @factory.post_generation def tags(self, create, extracted, **kwargs): if extracted: self.tags.add(*extracted) class Meta: model = Document
Allow DocumentFactory to handle preview field.
Allow DocumentFactory to handle preview field. The factory.django.FileField.DEFAULT_FILENAME == 'example.dat'. It means that by default a FileField created by factoryboy is considered as a True value. Before this commit, we were not defining a Document.preview field in the factory so factoryboy created a empty FileField. To not break the API for other tests, we need to create a "False" FileField by default. To do so, we need to change the DEFAULT_FILENAME to None.
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
python
## Code Before: from django.conf import settings import factory from ..models import Document class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileField() credits = "Document credits" package_id = "" @factory.post_generation def tags(self, create, extracted, **kwargs): if extracted: self.tags.add(*extracted) class Meta: model = Document ## Instruction: Allow DocumentFactory to handle preview field. The factory.django.FileField.DEFAULT_FILENAME == 'example.dat'. It means that by default a FileField created by factoryboy is considered as a True value. Before this commit, we were not defining a Document.preview field in the factory so factoryboy created a empty FileField. To not break the API for other tests, we need to create a "False" FileField by default. To do so, we need to change the DEFAULT_FILENAME to None. ## Code After: from django.conf import settings import factory from ..models import Document class EmptyFileField(factory.django.FileField): DEFAULT_FILENAME = None class DocumentFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test document {0}".format(n)) summary = "This is a test summary" lang = settings.LANGUAGE_CODE original = factory.django.FileField() preview = EmptyFileField() credits = "Document credits" package_id = "" @factory.post_generation def tags(self, create, extracted, **kwargs): if extracted: self.tags.add(*extracted) class Meta: model = Document
fb370cf64b78a8438128ba6a6e40ee155049570c
themes/mytheme/assetManager/mytheme.js
themes/mytheme/assetManager/mytheme.js
module.exports = { __module: { provides: { use_scripts: {}, use_stylesheets: {}, register_assets_dir: {after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus']}, register_views_dir: {after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus']} } }, register_assets_dir: function() { return __dirname + "/../assets"; }, register_views_dir: function() { return __dirname + "/../views"; }, use_scripts: function() { return {}; }, use_stylesheets: function() { return {}; } };
module.exports = { __module: { provides: { "assetManager/use_scripts": {}, "assetManager/use_stylesheets": {}, "assetManager/register_assets_dir": { after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus'] }, "assetManager/register_views_dir": { after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus'] } } }, register_assets_dir: function() { return __dirname + "/../assets"; }, register_views_dir: function() { return __dirname + "/../views"; }, use_scripts: function() { return {}; }, use_stylesheets: function() { return {}; } };
Update services to use full namespace (Scatter 0.7)
Update services to use full namespace (Scatter 0.7)
JavaScript
mit
hadronjs/hadron-seed,VenturaStudios/Blog
javascript
## Code Before: module.exports = { __module: { provides: { use_scripts: {}, use_stylesheets: {}, register_assets_dir: {after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus']}, register_views_dir: {after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus']} } }, register_assets_dir: function() { return __dirname + "/../assets"; }, register_views_dir: function() { return __dirname + "/../views"; }, use_scripts: function() { return {}; }, use_stylesheets: function() { return {}; } }; ## Instruction: Update services to use full namespace (Scatter 0.7) ## Code After: module.exports = { __module: { provides: { "assetManager/use_scripts": {}, "assetManager/use_stylesheets": {}, "assetManager/register_assets_dir": { after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus'] }, "assetManager/register_views_dir": { after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus'] } } }, register_assets_dir: function() { return __dirname + "/../assets"; }, register_views_dir: function() { return __dirname + "/../views"; }, use_scripts: function() { return {}; }, use_stylesheets: function() { return {}; } };
232f2dd9edda4408bdb1ad8c00425110cd2d9976
deploySamples.sh
deploySamples.sh
ROOT=$PWD BRANCH=$(git symbolic-ref -q HEAD) BRANCH=${BRANCH##refs/heads/} BRANCH=${BRANCH:-HEAD} SAMPLES=( builder errai gin templates ) if ! git diff --no-ext-diff --quiet --exit-code; then echo "Cannot deploy to gh-pages. You have uncommitted changes in the current branch." exit -1 fi # Building elemento mvn install # Building samples cd samples mvn clean install cd ${ROOT} # Publishing to gh-pages rm -rf /tmp/samples mkdir /tmp/samples for SAMPLE in "${SAMPLES[@]}" do mv ${SAMPLE}/target/${SAMPLE}-sample-*/${SAMPLE} /tmp/samples/ done git checkout gh-pages > /dev/null 2>&1 git reset --hard origin/gh-pages > /dev/null 2>&1 for SAMPLE in "${SAMPLES[@]}" do rm -rf ${SAMPLE} mv /tmp/samples/${SAMPLE}/ . done date > .build git add --all > /dev/null 2>&1 git commit -am "Update samples" > /dev/null 2>&1 git push -f origin gh-pages > /dev/null 2>&1 git checkout ${BRANCH} > /dev/null 2>&1 echo echo echo "+--------------------------------------------------------------+" echo "| |" echo "| Elemento samples successfully build, deployed and published. |" echo "| |" echo "+--------------------------------------------------------------+" echo
ROOT=$PWD BRANCH=$(git symbolic-ref -q HEAD) BRANCH=${BRANCH##refs/heads/} BRANCH=${BRANCH:-HEAD} SAMPLES=( builder errai gin templates ) if ! git diff --no-ext-diff --quiet --exit-code; then echo "Cannot deploy to gh-pages. You have uncommitted changes in the current branch." exit -1 fi # Building elemento w/ samples mvn install -P samples # Publishing to gh-pages rm -rf /tmp/elemento cd /tmp/ git clone -b gh-pages --single-branch [email protected]:hal/elemento.git cd elemento for SAMPLE in "${SAMPLES[@]}" do rm -rf ${SAMPLE} cp -R ${ROOT}/samples/${SAMPLE}/target/${SAMPLE}-sample-*/${SAMPLE} . done date > .build git add --all git commit -am "Update samples" git push -f origin gh-pages cd ${ROOT} echo echo echo "+--------------------------------------------------------------+" echo "| |" echo "| Elemento samples successfully build, deployed and published. |" echo "| |" echo "+--------------------------------------------------------------+" echo
Update script to build and publish samples
Update script to build and publish samples
Shell
apache-2.0
hal/elemento,hal/elemento
shell
## Code Before: ROOT=$PWD BRANCH=$(git symbolic-ref -q HEAD) BRANCH=${BRANCH##refs/heads/} BRANCH=${BRANCH:-HEAD} SAMPLES=( builder errai gin templates ) if ! git diff --no-ext-diff --quiet --exit-code; then echo "Cannot deploy to gh-pages. You have uncommitted changes in the current branch." exit -1 fi # Building elemento mvn install # Building samples cd samples mvn clean install cd ${ROOT} # Publishing to gh-pages rm -rf /tmp/samples mkdir /tmp/samples for SAMPLE in "${SAMPLES[@]}" do mv ${SAMPLE}/target/${SAMPLE}-sample-*/${SAMPLE} /tmp/samples/ done git checkout gh-pages > /dev/null 2>&1 git reset --hard origin/gh-pages > /dev/null 2>&1 for SAMPLE in "${SAMPLES[@]}" do rm -rf ${SAMPLE} mv /tmp/samples/${SAMPLE}/ . done date > .build git add --all > /dev/null 2>&1 git commit -am "Update samples" > /dev/null 2>&1 git push -f origin gh-pages > /dev/null 2>&1 git checkout ${BRANCH} > /dev/null 2>&1 echo echo echo "+--------------------------------------------------------------+" echo "| |" echo "| Elemento samples successfully build, deployed and published. |" echo "| |" echo "+--------------------------------------------------------------+" echo ## Instruction: Update script to build and publish samples ## Code After: ROOT=$PWD BRANCH=$(git symbolic-ref -q HEAD) BRANCH=${BRANCH##refs/heads/} BRANCH=${BRANCH:-HEAD} SAMPLES=( builder errai gin templates ) if ! git diff --no-ext-diff --quiet --exit-code; then echo "Cannot deploy to gh-pages. You have uncommitted changes in the current branch." exit -1 fi # Building elemento w/ samples mvn install -P samples # Publishing to gh-pages rm -rf /tmp/elemento cd /tmp/ git clone -b gh-pages --single-branch [email protected]:hal/elemento.git cd elemento for SAMPLE in "${SAMPLES[@]}" do rm -rf ${SAMPLE} cp -R ${ROOT}/samples/${SAMPLE}/target/${SAMPLE}-sample-*/${SAMPLE} . done date > .build git add --all git commit -am "Update samples" git push -f origin gh-pages cd ${ROOT} echo echo echo "+--------------------------------------------------------------+" echo "| |" echo "| Elemento samples successfully build, deployed and published. |" echo "| |" echo "+--------------------------------------------------------------+" echo
f541872a64d76bf5f5af83b52c6e97e60e424a69
packages/ai/airtable-api.yaml
packages/ai/airtable-api.yaml
homepage: https://github.com/ooblahman/airtable-api changelog-type: '' hash: ceb93fea0a23ab87bd8503a7fec421311e2cf387049f48a29c6b052dc3e2f485 test-bench-deps: base: -any airtable-api: -any maintainer: Anand Srinivasan synopsis: Requesting and introspecting Tables within an Airtable project. changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any wreq: -any lens: -any hashable: -any aeson: -any all-versions: - '0.1.0.0' author: Anand Srinivasan latest: '0.1.0.0' description-type: markdown description: ! '## The Airtable API for Haskell Provides a high-level interface to requesting and introspecting Tables within an Airtable project. ' license-name: BSD3
homepage: https://github.com/ooblahman/airtable-api changelog-type: '' hash: 5a02a8ebc6766ac7334ca61342bbc8b4581178db6a5491702bc79f33c49749b4 test-bench-deps: base: -any airtable-api: -any maintainer: Anand Srinivasan synopsis: Requesting and introspecting Tables within an Airtable project. changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any wreq: -any lens: -any hashable: -any aeson: -any all-versions: - '0.1.0.0' - '0.1.0.1' author: Anand Srinivasan latest: '0.1.0.1' description-type: markdown description: ! '## The Airtable API for Haskell Provides a high-level interface to requesting and introspecting Tables within an Airtable project. ' license-name: BSD3
Update from Hackage at 2017-02-07T22:24:45Z
Update from Hackage at 2017-02-07T22:24:45Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/ooblahman/airtable-api changelog-type: '' hash: ceb93fea0a23ab87bd8503a7fec421311e2cf387049f48a29c6b052dc3e2f485 test-bench-deps: base: -any airtable-api: -any maintainer: Anand Srinivasan synopsis: Requesting and introspecting Tables within an Airtable project. changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any wreq: -any lens: -any hashable: -any aeson: -any all-versions: - '0.1.0.0' author: Anand Srinivasan latest: '0.1.0.0' description-type: markdown description: ! '## The Airtable API for Haskell Provides a high-level interface to requesting and introspecting Tables within an Airtable project. ' license-name: BSD3 ## Instruction: Update from Hackage at 2017-02-07T22:24:45Z ## Code After: homepage: https://github.com/ooblahman/airtable-api changelog-type: '' hash: 5a02a8ebc6766ac7334ca61342bbc8b4581178db6a5491702bc79f33c49749b4 test-bench-deps: base: -any airtable-api: -any maintainer: Anand Srinivasan synopsis: Requesting and introspecting Tables within an Airtable project. changelog: '' basic-deps: bytestring: -any base: ! '>=4.7 && <5' unordered-containers: -any text: -any wreq: -any lens: -any hashable: -any aeson: -any all-versions: - '0.1.0.0' - '0.1.0.1' author: Anand Srinivasan latest: '0.1.0.1' description-type: markdown description: ! '## The Airtable API for Haskell Provides a high-level interface to requesting and introspecting Tables within an Airtable project. ' license-name: BSD3
8315bffbfb49d9691c94512b3d7a72969dd9fdfd
metadata/agrigolo.chubbyclick.yml
metadata/agrigolo.chubbyclick.yml
Categories: - Multimedia License: GPL-3.0-or-later WebSite: https://codeberg.org/agrigolo/chubby-click SourceCode: https://codeberg.org/agrigolo/chubby-click IssueTracker: https://codeberg.org/agrigolo/chubby-click/issues AutoName: Chubby Click RepoType: git Repo: https://codeberg.org/agrigolo/chubby-click.git Builds: - versionName: v1.3 versionCode: 6 commit: v1.3 subdir: app gradle: - yes - versionName: v1.5 versionCode: 9 commit: v1.5 subdir: app gradle: - yes - versionName: v1.6 versionCode: 10 commit: v1.6 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v1.6 CurrentVersionCode: 10
Categories: - Multimedia License: GPL-3.0-or-later WebSite: https://codeberg.org/agrigolo/chubby-click SourceCode: https://codeberg.org/agrigolo/chubby-click IssueTracker: https://codeberg.org/agrigolo/chubby-click/issues AutoName: Chubby Click RepoType: git Repo: https://codeberg.org/agrigolo/chubby-click.git Builds: - versionName: v1.3 versionCode: 6 commit: v1.3 subdir: app gradle: - yes - versionName: v1.5 versionCode: 9 commit: v1.5 subdir: app gradle: - yes - versionName: v1.6 versionCode: 10 commit: v1.6 subdir: app gradle: - yes - versionName: v1.7 versionCode: 11 commit: v1.7 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v1.7 CurrentVersionCode: 11
Update Chubby Click to v1.7 (11)
Update Chubby Click to v1.7 (11)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Multimedia License: GPL-3.0-or-later WebSite: https://codeberg.org/agrigolo/chubby-click SourceCode: https://codeberg.org/agrigolo/chubby-click IssueTracker: https://codeberg.org/agrigolo/chubby-click/issues AutoName: Chubby Click RepoType: git Repo: https://codeberg.org/agrigolo/chubby-click.git Builds: - versionName: v1.3 versionCode: 6 commit: v1.3 subdir: app gradle: - yes - versionName: v1.5 versionCode: 9 commit: v1.5 subdir: app gradle: - yes - versionName: v1.6 versionCode: 10 commit: v1.6 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v1.6 CurrentVersionCode: 10 ## Instruction: Update Chubby Click to v1.7 (11) ## Code After: Categories: - Multimedia License: GPL-3.0-or-later WebSite: https://codeberg.org/agrigolo/chubby-click SourceCode: https://codeberg.org/agrigolo/chubby-click IssueTracker: https://codeberg.org/agrigolo/chubby-click/issues AutoName: Chubby Click RepoType: git Repo: https://codeberg.org/agrigolo/chubby-click.git Builds: - versionName: v1.3 versionCode: 6 commit: v1.3 subdir: app gradle: - yes - versionName: v1.5 versionCode: 9 commit: v1.5 subdir: app gradle: - yes - versionName: v1.6 versionCode: 10 commit: v1.6 subdir: app gradle: - yes - versionName: v1.7 versionCode: 11 commit: v1.7 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: v1.7 CurrentVersionCode: 11
be2f32046e16f794dfc5076b5d4bfb5fd3f203bf
README.md
README.md
Welcome to the Lone Star PHP 2015 website, based on [Sculpin](http://sculpin.io/)! Definitely check up on the Sculpin documentation to learn more about working with Sculpin ## Getting Started To get started developing on the website: 1. Run `composer install` 2. Run `vendor/bin/sculpin generate --watch --server` 3. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! Optionally you can: 1. Run `pip install fabric` 2. Run `composer install` 3. Run `fab develop` 4. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! ## License This project is licensed under the MIT license. However, we respectfully ask a few things if you use our site as a base: 1. Let us know what project you're using it for *(We're curious is all)* 2. Do not re-use our stylesheets *(This one should be obvious)*
Welcome to the Lone Star PHP 2015 website, based on [Sculpin](http://sculpin.io/)! Definitely check up on the Sculpin documentation to learn more about working with Sculpin ## Getting Started To edit/parse the CSS 1. Run `gem install sass` 2. Run `npm install` 3. Run `gulp` 4. Now when you save any SCSS file, it will automatically parse and minify it to CSS To get started developing on the website: 1. Run `composer install` 2. Run `vendor/bin/sculpin generate --watch --server` 3. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! Optionally you can: 1. Run `pip install fabric` 2. Run `composer install` 3. Run `fab develop` 4. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! ## License This project is licensed under the MIT license. However, we respectfully ask a few things if you use our site as a base: 1. Let us know what project you're using it for *(We're curious is all)* 2. Do not re-use our stylesheets *(This one should be obvious)*
Add instructions for installing and using sass/gulp
Add instructions for installing and using sass/gulp
Markdown
mit
DallasPHP/lonestarphp2015,DallasPHP/lonestarphp2015,DallasPHP/lonestarphp2015,DallasPHP/lonestarphp2015
markdown
## Code Before: Welcome to the Lone Star PHP 2015 website, based on [Sculpin](http://sculpin.io/)! Definitely check up on the Sculpin documentation to learn more about working with Sculpin ## Getting Started To get started developing on the website: 1. Run `composer install` 2. Run `vendor/bin/sculpin generate --watch --server` 3. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! Optionally you can: 1. Run `pip install fabric` 2. Run `composer install` 3. Run `fab develop` 4. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! ## License This project is licensed under the MIT license. However, we respectfully ask a few things if you use our site as a base: 1. Let us know what project you're using it for *(We're curious is all)* 2. Do not re-use our stylesheets *(This one should be obvious)* ## Instruction: Add instructions for installing and using sass/gulp ## Code After: Welcome to the Lone Star PHP 2015 website, based on [Sculpin](http://sculpin.io/)! Definitely check up on the Sculpin documentation to learn more about working with Sculpin ## Getting Started To edit/parse the CSS 1. Run `gem install sass` 2. Run `npm install` 3. Run `gulp` 4. Now when you save any SCSS file, it will automatically parse and minify it to CSS To get started developing on the website: 1. Run `composer install` 2. Run `vendor/bin/sculpin generate --watch --server` 3. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! Optionally you can: 1. Run `pip install fabric` 2. Run `composer install` 3. Run `fab develop` 4. Open [http://localhost:8000/](http://localhost:8000/) in your browser, et voila! ## License This project is licensed under the MIT license. However, we respectfully ask a few things if you use our site as a base: 1. Let us know what project you're using it for *(We're curious is all)* 2. Do not re-use our stylesheets *(This one should be obvious)*
e25e8a3c3e5742fc9c311136f39aeae2f7e79815
packages/react-submit/README.md
packages/react-submit/README.md
Redux Form compatible submit button which sets a form value to `true`. This means that a form can have multiple submit buttons with different `name` attributes. ## Usage ```jsx import SubmitButton from 'react-submit' import { Field } from 'redux-form' import { handleFoo, handleBar } from './api' export default FormComponent({ handleSubmit }) { return ( <form onSubmit={ handleSubmit(values => { if (values.foo === true) { handleFoo(values) } else if (values.bar === true) { handleBar(values) } }) } > <p> <Field component={SubmitButton} name="foo">Foo</Field> <Field component={SubmitButton} name="bar">Foo</Field> </p> </form> ) } ``` ## Legal Copyright © 2017, 2018 Reidar Djupvik Licensed under the MIT license. See the `LICENSE` file for details.
React Final Form compatible submit button which sets a form value to `true`. This means that a form can have multiple submit buttons with different `name` attributes. ## Usage ```jsx import SubmitButton from 'react-submit' import { Field, Form } from 'react-final-form' import { handleFoo, handleBar } from './api' export default FormComponent() { return ( <Form onSubmit={ values => { if (values.foo === true) { handleFoo(values) } else if (values.bar === true) { handleBar(values) } } } > {({ handleSubmit }) => ( <form onSubmit={handleSubmit}> <p> <Field component={SubmitButton} name="foo">Foo</Field> <Field component={SubmitButton} name="bar">Foo</Field> </p> </form> ) } </Form> ) } ``` ## Legal Copyright © 2017, 2018 Reidar Djupvik Licensed under the MIT license. See the `LICENSE` file for details.
Change to React Final Form
Change to React Final Form
Markdown
mit
thirdhand/components,thirdhand/components
markdown
## Code Before: Redux Form compatible submit button which sets a form value to `true`. This means that a form can have multiple submit buttons with different `name` attributes. ## Usage ```jsx import SubmitButton from 'react-submit' import { Field } from 'redux-form' import { handleFoo, handleBar } from './api' export default FormComponent({ handleSubmit }) { return ( <form onSubmit={ handleSubmit(values => { if (values.foo === true) { handleFoo(values) } else if (values.bar === true) { handleBar(values) } }) } > <p> <Field component={SubmitButton} name="foo">Foo</Field> <Field component={SubmitButton} name="bar">Foo</Field> </p> </form> ) } ``` ## Legal Copyright © 2017, 2018 Reidar Djupvik Licensed under the MIT license. See the `LICENSE` file for details. ## Instruction: Change to React Final Form ## Code After: React Final Form compatible submit button which sets a form value to `true`. This means that a form can have multiple submit buttons with different `name` attributes. ## Usage ```jsx import SubmitButton from 'react-submit' import { Field, Form } from 'react-final-form' import { handleFoo, handleBar } from './api' export default FormComponent() { return ( <Form onSubmit={ values => { if (values.foo === true) { handleFoo(values) } else if (values.bar === true) { handleBar(values) } } } > {({ handleSubmit }) => ( <form onSubmit={handleSubmit}> <p> <Field component={SubmitButton} name="foo">Foo</Field> <Field component={SubmitButton} name="bar">Foo</Field> </p> </form> ) } </Form> ) } ``` ## Legal Copyright © 2017, 2018 Reidar Djupvik Licensed under the MIT license. See the `LICENSE` file for details.
17b2723d589572b9717577a2306a629f750f357b
bin/import_all_country_data.sh
bin/import_all_country_data.sh
echo 'Started. See import_all_country.log for progres...' truncate -s 0 data/logs/all.log time find data/cache/country_data -type f -name '*_12.xlsm' ! -name '~$*' -print -exec date --iso-8601=seconds \; -exec php htdocs/index.php import jmp {} \; &> import_all_country.log
echo 'Started. See data/logs/import_all_country.log for progress...' truncate -s 0 data/logs/all.log time find data/cache/country_data -type f -name '*_12.xlsm' ! -name '~$*' -print -exec date --iso-8601=seconds \; -exec php htdocs/index.php import jmp {} \; &> data/logs/import_all_country.log
Save log in appropriate folder
Save log in appropriate folder
Shell
mit
Ecodev/gims,Ecodev/gims,Ecodev/gims,Ecodev/gims,Ecodev/gims
shell
## Code Before: echo 'Started. See import_all_country.log for progres...' truncate -s 0 data/logs/all.log time find data/cache/country_data -type f -name '*_12.xlsm' ! -name '~$*' -print -exec date --iso-8601=seconds \; -exec php htdocs/index.php import jmp {} \; &> import_all_country.log ## Instruction: Save log in appropriate folder ## Code After: echo 'Started. See data/logs/import_all_country.log for progress...' truncate -s 0 data/logs/all.log time find data/cache/country_data -type f -name '*_12.xlsm' ! -name '~$*' -print -exec date --iso-8601=seconds \; -exec php htdocs/index.php import jmp {} \; &> data/logs/import_all_country.log
6700c4197f934ec9236a0addd1d277e67c1bc4d0
README.md
README.md
Get weather information using OpenWeatherMap for Hubot. ## Installation In the Hubot project repo, run: `npm install hubot-open-weather-map --save` Then add **hubot-open-weather-map** to your `external-scripts.json`: ``json ["hubot-open-weather-map"] ``` ## Sample Interaction `` user1>> hubot weather Savannah, GA hubot>> It is currently 54.81°F in Savannah. ```
Get weather information using OpenWeatherMap for Hubot. ## Installation In the Hubot project repo, run: `npm install hubot-open-weather-map --save` Then add **hubot-open-weather-map** to your `external-scripts.json`: ``json ["hubot-open-weather-map"] ``` ## Configuration * HUBOT_OPEN_WEATHER_MAP_URL - An alternative OpenWeatherMap URL * HUBOT_OPEN_WEATHER_MAP_DEFAULT_CITIES - A `;` delimited list of default cities. ## Sample Interaction `` TrevorS> hubot weather Savannah, GA hubot> It is currently 54.81°F in Savannah. TrevorS> hubot weather hubot> It is currently 59.36°F in Norcross. hubot> It is currently 80.60°F in Georgetown. hubot> It is currently 54.81°F in Savannah. ```
Add configuration info and interaction examples.
Add configuration info and interaction examples.
Markdown
mit
TrevorS/hubot-open-weather-map
markdown
## Code Before: Get weather information using OpenWeatherMap for Hubot. ## Installation In the Hubot project repo, run: `npm install hubot-open-weather-map --save` Then add **hubot-open-weather-map** to your `external-scripts.json`: ``json ["hubot-open-weather-map"] ``` ## Sample Interaction `` user1>> hubot weather Savannah, GA hubot>> It is currently 54.81°F in Savannah. ``` ## Instruction: Add configuration info and interaction examples. ## Code After: Get weather information using OpenWeatherMap for Hubot. ## Installation In the Hubot project repo, run: `npm install hubot-open-weather-map --save` Then add **hubot-open-weather-map** to your `external-scripts.json`: ``json ["hubot-open-weather-map"] ``` ## Configuration * HUBOT_OPEN_WEATHER_MAP_URL - An alternative OpenWeatherMap URL * HUBOT_OPEN_WEATHER_MAP_DEFAULT_CITIES - A `;` delimited list of default cities. ## Sample Interaction `` TrevorS> hubot weather Savannah, GA hubot> It is currently 54.81°F in Savannah. TrevorS> hubot weather hubot> It is currently 59.36°F in Norcross. hubot> It is currently 80.60°F in Georgetown. hubot> It is currently 54.81°F in Savannah. ```
d6025e50e3c0e7419847a2f4c45ea97a58da642a
lib/sprinkle/deployment.rb
lib/sprinkle/deployment.rb
module Sprinkle module Deployment def deployment(&block) @deployment = Deployment.new(&block) end class Deployment attr_accessor :style, :defaults def initialize(&block) @defaults = {} self.instance_eval(&block) raise 'No delivery mechanism defined' unless @style end def delivery(type, &block) @style = Actors.const_get(type.to_s.titleize).new &block end def source(&block) @defaults[:source] = block end def process POLICIES.each do |policy| policy.process(self) end end end end end
module Sprinkle module Deployment def deployment(&block) @deployment = Deployment.new(&block) end class Deployment attr_accessor :style, :defaults def initialize(&block) @defaults = {} self.instance_eval(&block) raise 'No delivery mechanism defined' unless @style end def delivery(type, &block) @style = Actors.const_get(type.to_s.titleize).new &block end def method_missing(sym, *args, &block) @defaults[sym] = block end def respond_to?(sym); !!@defaults[sym]; end def process POLICIES.each do |policy| policy.process(self) end end end end end
Support any installer type defaults via method missing
Support any installer type defaults via method missing
Ruby
mit
saimonmoore/sprinkle,enterprisecloud/sprinkle,sprinkle-tool/sprinkle,sprinkle-tool/sprinkle,auser/sprinkle,crafterm/sprinkle,joerichsen/sprinkle,jsierles/sprinkle,cpatil/sprinkle-cp
ruby
## Code Before: module Sprinkle module Deployment def deployment(&block) @deployment = Deployment.new(&block) end class Deployment attr_accessor :style, :defaults def initialize(&block) @defaults = {} self.instance_eval(&block) raise 'No delivery mechanism defined' unless @style end def delivery(type, &block) @style = Actors.const_get(type.to_s.titleize).new &block end def source(&block) @defaults[:source] = block end def process POLICIES.each do |policy| policy.process(self) end end end end end ## Instruction: Support any installer type defaults via method missing ## Code After: module Sprinkle module Deployment def deployment(&block) @deployment = Deployment.new(&block) end class Deployment attr_accessor :style, :defaults def initialize(&block) @defaults = {} self.instance_eval(&block) raise 'No delivery mechanism defined' unless @style end def delivery(type, &block) @style = Actors.const_get(type.to_s.titleize).new &block end def method_missing(sym, *args, &block) @defaults[sym] = block end def respond_to?(sym); !!@defaults[sym]; end def process POLICIES.each do |policy| policy.process(self) end end end end end
a3b71d0fb5e4b6fca0c45bc10d4771ba57d8adc8
spec/multiConf.js
spec/multiConf.js
var env = require('./environment.js'); // A small suite to make sure the cucumber framework works. exports.config = { seleniumAddress: env.seleniumAddress, framework: 'custom', frameworkPath: '../index.js', // Spec patterns are relative to this directory. specs: [ 'cucumber/*.feature' ], multiCapabilities: [ { browserName: 'chrome', version: 'ANY', cucumberOpts: { tags: '@dev', format: 'pretty' } } ], baseUrl: env.baseUrl, cucumberOpts: { require: 'cucumber/**/stepDefinitions.js', tags: '@failing', format: 'progress', profile: false, 'no-source': true } };
var env = require('./environment.js'); // A small suite to make sure the cucumber framework works. exports.config = { seleniumAddress: env.seleniumAddress, framework: 'custom', frameworkPath: '../index.js', // Spec patterns are relative to this directory. specs: [ 'cucumber/*.feature' ], multiCapabilities: [ { browserName: (process.env.TEST_BROWSER_NAME || 'chrome'), version: (process.env.TEST_BROWSER_VERSION || 'ANY'), cucumberOpts: { tags: '@dev', format: 'pretty' } } ], baseUrl: env.baseUrl, cucumberOpts: { require: 'cucumber/**/stepDefinitions.js', tags: '@failing', format: 'progress', profile: false, 'no-source': true } };
Fix browser conflicts for test suite
Fix browser conflicts for test suite
JavaScript
mit
protractor-cucumber-framework/protractor-cucumber-framework,protractor-cucumber-framework/protractor-cucumber-framework,mattfritz/protractor-cucumber-framework,mattfritz/protractor-cucumber-framework
javascript
## Code Before: var env = require('./environment.js'); // A small suite to make sure the cucumber framework works. exports.config = { seleniumAddress: env.seleniumAddress, framework: 'custom', frameworkPath: '../index.js', // Spec patterns are relative to this directory. specs: [ 'cucumber/*.feature' ], multiCapabilities: [ { browserName: 'chrome', version: 'ANY', cucumberOpts: { tags: '@dev', format: 'pretty' } } ], baseUrl: env.baseUrl, cucumberOpts: { require: 'cucumber/**/stepDefinitions.js', tags: '@failing', format: 'progress', profile: false, 'no-source': true } }; ## Instruction: Fix browser conflicts for test suite ## Code After: var env = require('./environment.js'); // A small suite to make sure the cucumber framework works. exports.config = { seleniumAddress: env.seleniumAddress, framework: 'custom', frameworkPath: '../index.js', // Spec patterns are relative to this directory. specs: [ 'cucumber/*.feature' ], multiCapabilities: [ { browserName: (process.env.TEST_BROWSER_NAME || 'chrome'), version: (process.env.TEST_BROWSER_VERSION || 'ANY'), cucumberOpts: { tags: '@dev', format: 'pretty' } } ], baseUrl: env.baseUrl, cucumberOpts: { require: 'cucumber/**/stepDefinitions.js', tags: '@failing', format: 'progress', profile: false, 'no-source': true } };
31dc71e433cb1d40839cbc6049930867e4a687ff
app/resources/api/v1/place_resource.rb
app/resources/api/v1/place_resource.rb
module API module V1 class PlaceResource < JSONAPI::Resource attributes :name, :place_type, :geometry def place_type @model.type end def geometry @model.to_geojson end end end end
module API module V1 class PlaceResource < JSONAPI::Resource attributes :name, :place_type, :geometry, :neighborhood_ids def place_type @model.type end def geometry @model.to_geojson end def neighborhood_ids return [] if @model.type == 'Neighborhood' @model.neighborhoods.pluck(:id) end end end end
Add neighborhood id collection so frontend can query municipality and all its neighborhoods as a filter
Add neighborhood id collection so frontend can query municipality and all its neighborhoods as a filter
Ruby
bsd-3-clause
MAPC/developmentdatabase,MAPC/developmentdatabase,MAPC/developmentdatabase,MAPC/developmentdatabase
ruby
## Code Before: module API module V1 class PlaceResource < JSONAPI::Resource attributes :name, :place_type, :geometry def place_type @model.type end def geometry @model.to_geojson end end end end ## Instruction: Add neighborhood id collection so frontend can query municipality and all its neighborhoods as a filter ## Code After: module API module V1 class PlaceResource < JSONAPI::Resource attributes :name, :place_type, :geometry, :neighborhood_ids def place_type @model.type end def geometry @model.to_geojson end def neighborhood_ids return [] if @model.type == 'Neighborhood' @model.neighborhoods.pluck(:id) end end end end
85bb2f831c3d6afc9b86f154c1c695b1d3854dae
packages/linux/linux_2.6.20.bb
packages/linux/linux_2.6.20.bb
DESCRIPTION = "Linux Kernel" SECTION = "kernel" LICENSE = "GPL" PR = "r3" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ file://defconfig" SRC_URI_append_progear = " \ file://progear_bl-r6.patch;patch=1 \ " SRC_URI_append_simpad = "\ file://linux-2.6.20.SIMpad.mq200.patch;patch=1 \ file://linux-2.6.20.SIMpad.ucb1x00-switches.patch;patch=1 \ " SRC_URI_append_n2100 = "\ file://n2100-r8169-parity.patch;patch=1 \ file://rtc-rs5c372-n2100.patch;patch=1 \ " inherit kernel KERNEL_IMAGETYPE = "bzImage" KERNEL_IMAGETYPE_simpad = "zImage" KERNEL_IMAGETYPE_n2100 = "zImage" do_configure_prepend() { install -m 0644 ${WORKDIR}/defconfig ${S}/.config }
DESCRIPTION = "Linux Kernel" SECTION = "kernel" LICENSE = "GPL" PR = "r3" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ file://defconfig" SRC_URI_append_progear = " \ file://progear_bl-r6.patch;patch=1 \ " SRC_URI_append_simpad = "\ file://linux-2.6.20.SIMpad.mq200.patch;patch=1 \ file://linux-2.6.20.SIMpad.ucb1x00-switches.patch;patch=1 \ " SRC_URI_append_n2100 = "\ file://n2100-r8169-parity.patch;patch=1 \ file://rtc-rs5c372-n2100.patch;patch=1 \ " inherit kernel KERNEL_IMAGETYPE = "bzImage" KERNEL_IMAGETYPE_simpad = "zImage" KERNEL_IMAGETYPE_n2100 = "zImage" do_configure_prepend() { install -m 0644 ${WORKDIR}/defconfig ${S}/.config } do_install_append_n2100() { install -m 0644 ${S}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME} }
Make sure to copy the finished kernel to deploy
linux: Make sure to copy the finished kernel to deploy
BitBake
mit
sentient-energy/emsw-oe-mirror,YtvwlD/od-oe,hulifox008/openembedded,John-NY/overo-oe,JrCs/opendreambox,JamesAng/oe,nvl1109/openembeded,popazerty/openembedded-cuberevo,openpli-arm/openembedded,KDAB/OpenEmbedded-Archos,bticino/openembedded,scottellis/overo-oe,nlebedenco/mini2440,SIFTeam/openembedded,demsey/openembedded,trini/openembedded,demsey/openenigma2,giobauermeister/openembedded,libo/openembedded,rascalmicro/openembedded-rascal,BlackPole/bp-openembedded,yyli/overo-oe,YtvwlD/od-oe,openembedded/openembedded,trini/openembedded,JrCs/opendreambox,yyli/overo-oe,BlackPole/bp-openembedded,mrchapp/arago-oe-dev,nvl1109/openembeded,trini/openembedded,yyli/overo-oe,nzjrs/overo-openembedded,KDAB/OpenEmbedded-Archos,John-NY/overo-oe,giobauermeister/openembedded,SIFTeam/openembedded,yyli/overo-oe,giobauermeister/openembedded,John-NY/overo-oe,demsey/openenigma2,sentient-energy/emsw-oe-mirror,xifengchuo/openembedded,nzjrs/overo-openembedded,openembedded/openembedded,yyli/overo-oe,crystalfontz/openembedded,libo/openembedded,SIFTeam/openembedded,openembedded/openembedded,dellysunnymtech/sakoman-oe,trini/openembedded,mrchapp/arago-oe-dev,thebohemian/openembedded,anguslees/openembedded-android,demsey/openembedded,sledz/oe,rascalmicro/openembedded-rascal,demsey/openenigma2,John-NY/overo-oe,buglabs/oe-buglabs,nzjrs/overo-openembedded,scottellis/overo-oe,philb/pbcl-oe-2010,JrCs/opendreambox,sutajiokousagi/openembedded,dave-billin/overo-ui-moos-auv,rascalmicro/openembedded-rascal,dellysunnymtech/sakoman-oe,dellysunnymtech/sakoman-oe,sentient-energy/emsw-oe-mirror,nx111/openembeded_openpli2.1_nx111,nlebedenco/mini2440,sutajiokousagi/openembedded,JamesAng/oe,anguslees/openembedded-android,trini/openembedded,dave-billin/overo-ui-moos-auv,troth/oe-ts7xxx,KDAB/OpenEmbedded-Archos,thebohemian/openembedded,popazerty/openembedded-cuberevo,JamesAng/oe,thebohemian/openembedded,John-NY/overo-oe,libo/openembedded,bticino/openembedded,YtvwlD/od-oe,xifengchuo/openembedded,SIFTeam/openembedded,rascalmicro/openembedded-rascal,xifengchuo/openembedded,BlackPole/bp-openembedded,Martix/Eonos,BlackPole/bp-openembedded,Martix/Eonos,giobauermeister/openembedded,xifengchuo/openembedded,popazerty/openembedded-cuberevo,dellysunnymtech/sakoman-oe,scottellis/overo-oe,openembedded/openembedded,openpli-arm/openembedded,openpli-arm/openembedded,demsey/openenigma2,dave-billin/overo-ui-moos-auv,buglabs/oe-buglabs,JamesAng/oe,thebohemian/openembedded,popazerty/openembedded-cuberevo,nvl1109/openembeded,bticino/openembedded,demsey/openenigma2,dellysunnymtech/sakoman-oe,philb/pbcl-oe-2010,crystalfontz/openembedded,bticino/openembedded,dave-billin/overo-ui-moos-auv,dellysunnymtech/sakoman-oe,nvl1109/openembeded,bticino/openembedded,mrchapp/arago-oe-dev,John-NY/overo-oe,sampov2/audio-openembedded,rascalmicro/openembedded-rascal,nzjrs/overo-openembedded,crystalfontz/openembedded,demsey/openembedded,sentient-energy/emsw-oe-mirror,nx111/openembeded_openpli2.1_nx111,nlebedenco/mini2440,JamesAng/goe,sampov2/audio-openembedded,SIFTeam/openembedded,nx111/openembeded_openpli2.1_nx111,openembedded/openembedded,popazerty/openembedded-cuberevo,trini/openembedded,libo/openembedded,rascalmicro/openembedded-rascal,hulifox008/openembedded,demsey/openembedded,nzjrs/overo-openembedded,JamesAng/goe,openpli-arm/openembedded,openpli-arm/openembedded,dave-billin/overo-ui-moos-auv,philb/pbcl-oe-2010,SIFTeam/openembedded,troth/oe-ts7xxx,rascalmicro/openembedded-rascal,YtvwlD/od-oe,YtvwlD/od-oe,JrCs/opendreambox,philb/pbcl-oe-2010,scottellis/overo-oe,BlackPole/bp-openembedded,sutajiokousagi/openembedded,KDAB/OpenEmbedded-Archos,thebohemian/openembedded,demsey/openenigma2,openembedded/openembedded,nlebedenco/mini2440,nx111/openembeded_openpli2.1_nx111,libo/openembedded,buglabs/oe-buglabs,mrchapp/arago-oe-dev,dave-billin/overo-ui-moos-auv,demsey/openenigma2,sutajiokousagi/openembedded,JrCs/opendreambox,JamesAng/goe,KDAB/OpenEmbedded-Archos,giobauermeister/openembedded,openembedded/openembedded,bticino/openembedded,philb/pbcl-oe-2010,nlebedenco/mini2440,sentient-energy/emsw-oe-mirror,nvl1109/openembeded,sledz/oe,yyli/overo-oe,Martix/Eonos,popazerty/openembedded-cuberevo,hulifox008/openembedded,JamesAng/goe,giobauermeister/openembedded,nx111/openembeded_openpli2.1_nx111,xifengchuo/openembedded,nzjrs/overo-openembedded,John-NY/overo-oe,troth/oe-ts7xxx,nx111/openembeded_openpli2.1_nx111,sampov2/audio-openembedded,popazerty/openembedded-cuberevo,sampov2/audio-openembedded,crystalfontz/openembedded,troth/oe-ts7xxx,Martix/Eonos,anguslees/openembedded-android,openembedded/openembedded,philb/pbcl-oe-2010,sutajiokousagi/openembedded,buglabs/oe-buglabs,JamesAng/oe,JamesAng/oe,anguslees/openembedded-android,giobauermeister/openembedded,sentient-energy/emsw-oe-mirror,giobauermeister/openembedded,hulifox008/openembedded,openpli-arm/openembedded,BlackPole/bp-openembedded,sampov2/audio-openembedded,anguslees/openembedded-android,sledz/oe,buglabs/oe-buglabs,troth/oe-ts7xxx,anguslees/openembedded-android,JrCs/opendreambox,thebohemian/openembedded,hulifox008/openembedded,demsey/openembedded,nvl1109/openembeded,sampov2/audio-openembedded,Martix/Eonos,crystalfontz/openembedded,nvl1109/openembeded,scottellis/overo-oe,xifengchuo/openembedded,giobauermeister/openembedded,yyli/overo-oe,dave-billin/overo-ui-moos-auv,popazerty/openembedded-cuberevo,JamesAng/goe,crystalfontz/openembedded,JrCs/opendreambox,troth/oe-ts7xxx,BlackPole/bp-openembedded,mrchapp/arago-oe-dev,dellysunnymtech/sakoman-oe,YtvwlD/od-oe,hulifox008/openembedded,sutajiokousagi/openembedded,thebohemian/openembedded,rascalmicro/openembedded-rascal,openembedded/openembedded,SIFTeam/openembedded,crystalfontz/openembedded,demsey/openembedded,nx111/openembeded_openpli2.1_nx111,Martix/Eonos,Martix/Eonos,sutajiokousagi/openembedded,openembedded/openembedded,YtvwlD/od-oe,KDAB/OpenEmbedded-Archos,nzjrs/overo-openembedded,JamesAng/oe,nx111/openembeded_openpli2.1_nx111,buglabs/oe-buglabs,xifengchuo/openembedded,JamesAng/goe,yyli/overo-oe,sledz/oe,libo/openembedded,JrCs/opendreambox,sampov2/audio-openembedded,KDAB/OpenEmbedded-Archos,trini/openembedded,troth/oe-ts7xxx,mrchapp/arago-oe-dev,scottellis/overo-oe,mrchapp/arago-oe-dev,dellysunnymtech/sakoman-oe,scottellis/overo-oe,YtvwlD/od-oe,sentient-energy/emsw-oe-mirror,libo/openembedded,sledz/oe,hulifox008/openembedded,anguslees/openembedded-android,dellysunnymtech/sakoman-oe,buglabs/oe-buglabs,nlebedenco/mini2440,JrCs/opendreambox,openpli-arm/openembedded,nlebedenco/mini2440,xifengchuo/openembedded,openembedded/openembedded,buglabs/oe-buglabs,JamesAng/goe,philb/pbcl-oe-2010,xifengchuo/openembedded,sledz/oe,bticino/openembedded,demsey/openembedded,sledz/oe
bitbake
## Code Before: DESCRIPTION = "Linux Kernel" SECTION = "kernel" LICENSE = "GPL" PR = "r3" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ file://defconfig" SRC_URI_append_progear = " \ file://progear_bl-r6.patch;patch=1 \ " SRC_URI_append_simpad = "\ file://linux-2.6.20.SIMpad.mq200.patch;patch=1 \ file://linux-2.6.20.SIMpad.ucb1x00-switches.patch;patch=1 \ " SRC_URI_append_n2100 = "\ file://n2100-r8169-parity.patch;patch=1 \ file://rtc-rs5c372-n2100.patch;patch=1 \ " inherit kernel KERNEL_IMAGETYPE = "bzImage" KERNEL_IMAGETYPE_simpad = "zImage" KERNEL_IMAGETYPE_n2100 = "zImage" do_configure_prepend() { install -m 0644 ${WORKDIR}/defconfig ${S}/.config } ## Instruction: linux: Make sure to copy the finished kernel to deploy ## Code After: DESCRIPTION = "Linux Kernel" SECTION = "kernel" LICENSE = "GPL" PR = "r3" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ file://defconfig" SRC_URI_append_progear = " \ file://progear_bl-r6.patch;patch=1 \ " SRC_URI_append_simpad = "\ file://linux-2.6.20.SIMpad.mq200.patch;patch=1 \ file://linux-2.6.20.SIMpad.ucb1x00-switches.patch;patch=1 \ " SRC_URI_append_n2100 = "\ file://n2100-r8169-parity.patch;patch=1 \ file://rtc-rs5c372-n2100.patch;patch=1 \ " inherit kernel KERNEL_IMAGETYPE = "bzImage" KERNEL_IMAGETYPE_simpad = "zImage" KERNEL_IMAGETYPE_n2100 = "zImage" do_configure_prepend() { install -m 0644 ${WORKDIR}/defconfig ${S}/.config } do_install_append_n2100() { install -m 0644 ${S}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME} }
48dd3873170848619a24ed52000b9b1db90561f5
.travis.yml
.travis.yml
language: go go: - 1.9 - 1.8 install: - go get github.com/golang/dep/cmd/dep - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - go get github.com/modocache/gover - dep ensure script: - go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | grep -v vendor/ | xargs -L 1 sh -c - $GOPATH/bin/gover - $GOPATH/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci
language: go go: - 1.9 - 1.8 install: - go get github.com/golang/dep/cmd/dep - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - go get github.com/modocache/gover - dep ensure script: - go list -f '"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | grep -v vendor/ | grep -v cmd/ | xargs -L 1 sh -c - $GOPATH/bin/gover - $GOPATH/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci
Include subpackages in coverage stats.
Include subpackages in coverage stats.
YAML
mit
jjeffery/hclconfig
yaml
## Code Before: language: go go: - 1.9 - 1.8 install: - go get github.com/golang/dep/cmd/dep - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - go get github.com/modocache/gover - dep ensure script: - go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | grep -v vendor/ | xargs -L 1 sh -c - $GOPATH/bin/gover - $GOPATH/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci ## Instruction: Include subpackages in coverage stats. ## Code After: language: go go: - 1.9 - 1.8 install: - go get github.com/golang/dep/cmd/dep - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls - go get github.com/modocache/gover - dep ensure script: - go list -f '"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | grep -v vendor/ | grep -v cmd/ | xargs -L 1 sh -c - $GOPATH/bin/gover - $GOPATH/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci
6904f13efdb684c14898bdeecef92925692283aa
gradle/wrapper/gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
Update gradle wrapper memory to fix Travis build.
Update gradle wrapper memory to fix Travis build.
INI
apache-2.0
andrei-heidelbacher/metanalysis,andrei-heidelbacher/metanalysis
ini
## Code Before: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists ## Instruction: Update gradle wrapper memory to fix Travis build. ## Code After: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
4cca8f46f5a48a436cab437ebd1e03a52809f482
Sources/Strix/Error/RunError.swift
Sources/Strix/Error/RunError.swift
import Foundation public struct RunError: LocalizedError, CustomStringConvertible { public var input: String public var position: String.Index public var underlyingErrors: [ParseError] public init(input: String, position: String.Index, underlyingErrors: [ParseError]) { self.input = input self.position = position self.underlyingErrors = underlyingErrors } public var errorDescription: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(input: input, position: position, errors: underlyingErrors) .write(to: &buffer) return buffer.text } public var failureReason: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(errors: underlyingErrors).write(to: &buffer) return buffer.text } public var description: String { return "line: \(textPosition.line), column: \(textPosition.column), " + "underlyingErrors: \(underlyingErrors)" } public var textPosition: TextPosition { return TextPosition(string: input, index: position) } }
import Foundation public struct RunError: LocalizedError, CustomStringConvertible { public var input: String public var position: String.Index public var underlyingErrors: [ParseError] public init(input: String, position: String.Index, underlyingErrors: [ParseError]) { self.input = input self.position = position self.underlyingErrors = underlyingErrors } public var errorDescription: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(input: input, position: position, errors: underlyingErrors) .write(to: &buffer) return buffer.text.trimmingCharacters(in: .newlines) } public var failureReason: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(errors: underlyingErrors).write(to: &buffer) return buffer.text.trimmingCharacters(in: .newlines) } public var description: String { return "line: \(textPosition.line), column: \(textPosition.column), " + "underlyingErrors: \(underlyingErrors)" } public var textPosition: TextPosition { return TextPosition(string: input, index: position) } }
Fix minor typo in error description
Fix minor typo in error description
Swift
mit
nearfri/Strix
swift
## Code Before: import Foundation public struct RunError: LocalizedError, CustomStringConvertible { public var input: String public var position: String.Index public var underlyingErrors: [ParseError] public init(input: String, position: String.Index, underlyingErrors: [ParseError]) { self.input = input self.position = position self.underlyingErrors = underlyingErrors } public var errorDescription: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(input: input, position: position, errors: underlyingErrors) .write(to: &buffer) return buffer.text } public var failureReason: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(errors: underlyingErrors).write(to: &buffer) return buffer.text } public var description: String { return "line: \(textPosition.line), column: \(textPosition.column), " + "underlyingErrors: \(underlyingErrors)" } public var textPosition: TextPosition { return TextPosition(string: input, index: position) } } ## Instruction: Fix minor typo in error description ## Code After: import Foundation public struct RunError: LocalizedError, CustomStringConvertible { public var input: String public var position: String.Index public var underlyingErrors: [ParseError] public init(input: String, position: String.Index, underlyingErrors: [ParseError]) { self.input = input self.position = position self.underlyingErrors = underlyingErrors } public var errorDescription: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(input: input, position: position, errors: underlyingErrors) .write(to: &buffer) return buffer.text.trimmingCharacters(in: .newlines) } public var failureReason: String? { var buffer = ErrorOutputBuffer() ErrorMessageWriter(errors: underlyingErrors).write(to: &buffer) return buffer.text.trimmingCharacters(in: .newlines) } public var description: String { return "line: \(textPosition.line), column: \(textPosition.column), " + "underlyingErrors: \(underlyingErrors)" } public var textPosition: TextPosition { return TextPosition(string: input, index: position) } }
7fee39d633af5b5719ac5d507ab84beae2a3c6bf
.github/workflows/ci.yml
.github/workflows/ci.yml
name: Continuous Integration on: [push] jobs: tests: runs-on: ubuntu-latest environment: sauce permissions: read-all env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} SAUCE_TUNNEL_ID: github-action-tunnel steps: - name: Setup sauce connect uses: saucelabs/sauce-connect-action@v2 with: username: ${{ secrets.SAUCE_USERNAME }} accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} tunnelIdentifier: github-action-tunnel scVersion: 4.7.1 - name: Checkout uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: 16 - name: Cache dependencies uses: actions/cache@v2 with: path: ~/.npm key: npm-${{ hashFiles('package-lock.json') }} restore-keys: npm- - name: Install packages run: npm ci - name: Lint code run: npm run lint - name: Run browser tests in Saucelabs run: npm run test-ci timeout-minutes: 5
name: Continuous Integration on: [push] jobs: tests: runs-on: ubuntu-latest environment: sauce permissions: read-all env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} SAUCE_TUNNEL_ID: github-action-tunnel steps: - name: Setup sauce connect uses: saucelabs/sauce-connect-action@v2 with: username: ${{ secrets.SAUCE_USERNAME }} accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} tunnelIdentifier: github-action-tunnel scVersion: 4.7.1 - name: Checkout uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: 16 - name: Cache dependencies uses: actions/cache@v2 with: path: ~/.npm key: npm-${{ hashFiles('package-lock.json') }} restore-keys: npm- - name: Install packages run: npm ci - name: Lint code run: npm run lint - name: Coveralls uses: coverallsapp/[email protected] with: github-token: ${{ secrets.github_token }} - name: Run browser tests in Saucelabs run: npm run test-ci timeout-minutes: 5
Fix coveralls integration with GitHub actions
Fix coveralls integration with GitHub actions
YAML
mit
stacktracejs/error-stack-parser
yaml
## Code Before: name: Continuous Integration on: [push] jobs: tests: runs-on: ubuntu-latest environment: sauce permissions: read-all env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} SAUCE_TUNNEL_ID: github-action-tunnel steps: - name: Setup sauce connect uses: saucelabs/sauce-connect-action@v2 with: username: ${{ secrets.SAUCE_USERNAME }} accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} tunnelIdentifier: github-action-tunnel scVersion: 4.7.1 - name: Checkout uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: 16 - name: Cache dependencies uses: actions/cache@v2 with: path: ~/.npm key: npm-${{ hashFiles('package-lock.json') }} restore-keys: npm- - name: Install packages run: npm ci - name: Lint code run: npm run lint - name: Run browser tests in Saucelabs run: npm run test-ci timeout-minutes: 5 ## Instruction: Fix coveralls integration with GitHub actions ## Code After: name: Continuous Integration on: [push] jobs: tests: runs-on: ubuntu-latest environment: sauce permissions: read-all env: SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} SAUCE_TUNNEL_ID: github-action-tunnel steps: - name: Setup sauce connect uses: saucelabs/sauce-connect-action@v2 with: username: ${{ secrets.SAUCE_USERNAME }} accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} tunnelIdentifier: github-action-tunnel scVersion: 4.7.1 - name: Checkout uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: 16 - name: Cache dependencies uses: actions/cache@v2 with: path: ~/.npm key: npm-${{ hashFiles('package-lock.json') }} restore-keys: npm- - name: Install packages run: npm ci - name: Lint code run: npm run lint - name: Coveralls uses: coverallsapp/[email protected] with: github-token: ${{ secrets.github_token }} - name: Run browser tests in Saucelabs run: npm run test-ci timeout-minutes: 5
bf4b2d3f0f9829c8333cb3344b72ffc2f115147d
docs/src/index.html
docs/src/index.html
<!DOCTYPE html> <html prefix="og: http://ogp.me/ns#"> <head> <title>React CSS Transition · Take Control of your CSS Transitions</title> <meta property="og:title" content="React CSS Transition" /> <meta property="og:description" content="Take Control of your CSS Transitions" /> <meta property="og:url" content="https://wikiwi.github.io/react-css-transition/" /> <meta property="og:image" content="https://wikiwi.github.io/react-css-transition/preview.png" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <meta name="mobile-web-app-capable" content="yes" /> <meta name="theme-color" content="#136a8a" /> <style> @import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Roboto+Slab'); </style> </head> <body> <div id="app" aria-role="application" onclick="void(0)"></div> <script src="app.js"></script> </body> </html>
<!DOCTYPE html> <html prefix="og: http://ogp.me/ns#"> <head> <title>React CSS Transition · Take Control of your CSS Transitions</title> <meta property="og:title" content="React CSS Transition" /> <meta property="og:description" content="Take Control of your CSS Transitions" /> <meta property="og:url" content="https://wikiwi.github.io/react-css-transition/" /> <meta property="og:image" content="https://wikiwi.github.io/react-css-transition/preview.png" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:creator" content="@wikiwi_io" /> <meta name="twitter:title" content="React CSS Transition" /> <meta name="twitter:description" content="Take Control of your CSS Transitions" /> <meta name="twitter:image" content="https://wikiwi.github.io/react-css-transition/preview.png" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <meta name="mobile-web-app-capable" content="yes" /> <meta name="theme-color" content="#136a8a" /> <style> @import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Roboto+Slab'); </style> </head> <body> <div id="app" aria-role="application" onclick="void(0)"></div> <script src="app.js"></script> </body> </html>
Add meta tags for twitter cards
Add meta tags for twitter cards
HTML
mit
wikiwi/react-css-transition,wikiwi/react-css-transition
html
## Code Before: <!DOCTYPE html> <html prefix="og: http://ogp.me/ns#"> <head> <title>React CSS Transition · Take Control of your CSS Transitions</title> <meta property="og:title" content="React CSS Transition" /> <meta property="og:description" content="Take Control of your CSS Transitions" /> <meta property="og:url" content="https://wikiwi.github.io/react-css-transition/" /> <meta property="og:image" content="https://wikiwi.github.io/react-css-transition/preview.png" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <meta name="mobile-web-app-capable" content="yes" /> <meta name="theme-color" content="#136a8a" /> <style> @import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Roboto+Slab'); </style> </head> <body> <div id="app" aria-role="application" onclick="void(0)"></div> <script src="app.js"></script> </body> </html> ## Instruction: Add meta tags for twitter cards ## Code After: <!DOCTYPE html> <html prefix="og: http://ogp.me/ns#"> <head> <title>React CSS Transition · Take Control of your CSS Transitions</title> <meta property="og:title" content="React CSS Transition" /> <meta property="og:description" content="Take Control of your CSS Transitions" /> <meta property="og:url" content="https://wikiwi.github.io/react-css-transition/" /> <meta property="og:image" content="https://wikiwi.github.io/react-css-transition/preview.png" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:creator" content="@wikiwi_io" /> <meta name="twitter:title" content="React CSS Transition" /> <meta name="twitter:description" content="Take Control of your CSS Transitions" /> <meta name="twitter:image" content="https://wikiwi.github.io/react-css-transition/preview.png" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <meta name="mobile-web-app-capable" content="yes" /> <meta name="theme-color" content="#136a8a" /> <style> @import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono|Roboto+Slab'); </style> </head> <body> <div id="app" aria-role="application" onclick="void(0)"></div> <script src="app.js"></script> </body> </html>
1750cd21f19a1a37e7d5b9336aa55f4bbcb83895
scripts/deploy.sh
scripts/deploy.sh
rsync -avz scripts/ [email protected]:/var/www/braindump/scripts/ rsync -avz etc/ [email protected]:/var/www/braindump/etc/ scp docker-compose.yml [email protected]:/var/www/braindump # Log into Production Server, Pull and Restart Docker ssh [email protected] 'cd /var/www/braindump && docker-compose pull' ssh [email protected] 'cd /var/www/braindump && docker-compose build' ssh [email protected] 'cd /var/www/braindump && source scripts/secrets.sh && docker-compose up -d'
rsync -avz scripts/ $PROD_SERVER:/var/www/braindump/scripts/ rsync -avz etc/ $PROD_SERVER:/var/www/braindump/etc/ scp docker-compose.yml $PROD_SERVER:/var/www/braindump # Log into Production Server, Pull and Restart Docker ssh $PROD_SERVER 'cd /var/www/braindump && docker-compose pull' ssh $PROD_SERVER 'cd /var/www/braindump && docker-compose build' ssh $PROD_SERVER 'cd /var/www/braindump && source scripts/secrets.sh && docker-compose up -d'
Switch to ENVAR for production server
Switch to ENVAR for production server
Shell
mit
levlaz/braindump,levlaz/braindump,levlaz/braindump,levlaz/braindump
shell
## Code Before: rsync -avz scripts/ [email protected]:/var/www/braindump/scripts/ rsync -avz etc/ [email protected]:/var/www/braindump/etc/ scp docker-compose.yml [email protected]:/var/www/braindump # Log into Production Server, Pull and Restart Docker ssh [email protected] 'cd /var/www/braindump && docker-compose pull' ssh [email protected] 'cd /var/www/braindump && docker-compose build' ssh [email protected] 'cd /var/www/braindump && source scripts/secrets.sh && docker-compose up -d' ## Instruction: Switch to ENVAR for production server ## Code After: rsync -avz scripts/ $PROD_SERVER:/var/www/braindump/scripts/ rsync -avz etc/ $PROD_SERVER:/var/www/braindump/etc/ scp docker-compose.yml $PROD_SERVER:/var/www/braindump # Log into Production Server, Pull and Restart Docker ssh $PROD_SERVER 'cd /var/www/braindump && docker-compose pull' ssh $PROD_SERVER 'cd /var/www/braindump && docker-compose build' ssh $PROD_SERVER 'cd /var/www/braindump && source scripts/secrets.sh && docker-compose up -d'
a3d011a33d7b7661cf09137e717b89ef8a0e327e
incubation-js/THM/README.md
incubation-js/THM/README.md
たいへんたいジェネレーター ================ 「た」「い」「へ」「ん」をランダムに連続表示して、「たいへん」か「へんたい」が出たら終了するプログラムです。 ---------------------------- 期待値的には、平均で 136 文字で終了します。 Working Copy: https://02f41be48d339da0cde243ece33c283e3f0c321e.googledrive.com/host/0B9f3hv6KkjXcS19ZMmxxdGE5bUE/THM/tht-gen.html 数式計算とか: [日本語記事][1] / [English Page][2] [1]: http://yybtcbk.blog13.fc2.com/blog-entry-95.html [2]: https://sites.google.com/site/yybtcbk2/apps/taihentai-generator
たいへんたいジェネレーター ================ 「た」「い」「へ」「ん」をランダムに連続表示して、「たいへん」か「へんたい」が出たら終了するプログラムです。 ---------------------------- 期待値的には、平均で 136 文字で終了します。 Working Copy: https://yk0242.github.io/incubation/incubation-js/THM/tht-gen.html 数式計算とか: [日本語記事][1] / [English Page][2] [1]: http://yybtcbk.blog13.fc2.com/blog-entry-95.html [2]: https://sites.google.com/site/yybtcbk2/apps/taihentai-generator
Update link to working copy in readme.md
Update link to working copy in readme.md
Markdown
mit
yk0242/incubation,yk0242/incubation,yk0242/incubation,yk0242/incubation,yk0242/incubation
markdown
## Code Before: たいへんたいジェネレーター ================ 「た」「い」「へ」「ん」をランダムに連続表示して、「たいへん」か「へんたい」が出たら終了するプログラムです。 ---------------------------- 期待値的には、平均で 136 文字で終了します。 Working Copy: https://02f41be48d339da0cde243ece33c283e3f0c321e.googledrive.com/host/0B9f3hv6KkjXcS19ZMmxxdGE5bUE/THM/tht-gen.html 数式計算とか: [日本語記事][1] / [English Page][2] [1]: http://yybtcbk.blog13.fc2.com/blog-entry-95.html [2]: https://sites.google.com/site/yybtcbk2/apps/taihentai-generator ## Instruction: Update link to working copy in readme.md ## Code After: たいへんたいジェネレーター ================ 「た」「い」「へ」「ん」をランダムに連続表示して、「たいへん」か「へんたい」が出たら終了するプログラムです。 ---------------------------- 期待値的には、平均で 136 文字で終了します。 Working Copy: https://yk0242.github.io/incubation/incubation-js/THM/tht-gen.html 数式計算とか: [日本語記事][1] / [English Page][2] [1]: http://yybtcbk.blog13.fc2.com/blog-entry-95.html [2]: https://sites.google.com/site/yybtcbk2/apps/taihentai-generator
1a166c9946cfa9a95db10277639c2a20aefb334d
package.json
package.json
{ "name": "shell", "version": "0.3.1", "description": "Full features and pretty console applications", "homepage": "http://localhost:4000/projects/node-shell", "author": "David Worms <[email protected]>", "contributors": [{ "name": "David Worms", "email": "[email protected]" },{ "name": "Tony", "email": "https://github.com/Zearin" },{ "name": "Russ Frank", "email": "https://github.com/russfrank" }], "engines": { "node": ">= 0.6.0" }, "dependencies": { "each": "latest", "pad": "latest", "optimist": "latest" }, "devDependencies": { "coffee-script": "latest", "mocha": "latest", "should": "latest" }, "keywords": ["cli", "console", "colors", "xterm"], "repository": { "type": "git", "url": "https://github.com/wdavidw/node-shell.git" }, "scripts": { "test": "make test" } }
{ "name": "shell", "version": "0.3.1", "description": "Full features and pretty console applications", "homepage": "http://www.adaltas.com/projects/node-shell", "author": "David Worms <[email protected]>", "contributors": [{ "name": "David Worms", "email": "[email protected]" },{ "name": "Tony", "email": "https://github.com/Zearin" },{ "name": "Russ Frank", "email": "https://github.com/russfrank" }], "engines": { "node": ">= 0.6.0" }, "dependencies": { "each": "latest", "pad": "latest", "optimist": "latest" }, "devDependencies": { "coffee-script": "latest", "mocha": "latest", "should": "latest" }, "keywords": ["cli", "console", "colors", "xterm", "args", "argument"], "repository": { "type": "git", "url": "https://github.com/wdavidw/node-shell.git" }, "scripts": { "test": "make test" } }
Update homepage and add args and argument keywords
Update homepage and add args and argument keywords
JSON
bsd-3-clause
wdavidw/node-shell
json
## Code Before: { "name": "shell", "version": "0.3.1", "description": "Full features and pretty console applications", "homepage": "http://localhost:4000/projects/node-shell", "author": "David Worms <[email protected]>", "contributors": [{ "name": "David Worms", "email": "[email protected]" },{ "name": "Tony", "email": "https://github.com/Zearin" },{ "name": "Russ Frank", "email": "https://github.com/russfrank" }], "engines": { "node": ">= 0.6.0" }, "dependencies": { "each": "latest", "pad": "latest", "optimist": "latest" }, "devDependencies": { "coffee-script": "latest", "mocha": "latest", "should": "latest" }, "keywords": ["cli", "console", "colors", "xterm"], "repository": { "type": "git", "url": "https://github.com/wdavidw/node-shell.git" }, "scripts": { "test": "make test" } } ## Instruction: Update homepage and add args and argument keywords ## Code After: { "name": "shell", "version": "0.3.1", "description": "Full features and pretty console applications", "homepage": "http://www.adaltas.com/projects/node-shell", "author": "David Worms <[email protected]>", "contributors": [{ "name": "David Worms", "email": "[email protected]" },{ "name": "Tony", "email": "https://github.com/Zearin" },{ "name": "Russ Frank", "email": "https://github.com/russfrank" }], "engines": { "node": ">= 0.6.0" }, "dependencies": { "each": "latest", "pad": "latest", "optimist": "latest" }, "devDependencies": { "coffee-script": "latest", "mocha": "latest", "should": "latest" }, "keywords": ["cli", "console", "colors", "xterm", "args", "argument"], "repository": { "type": "git", "url": "https://github.com/wdavidw/node-shell.git" }, "scripts": { "test": "make test" } }
d71a7457cf0b9b89e28168b67ffababddef29989
app/data/style.css
app/data/style.css
/* placeholder */ .repohead-details-container .public:after { display: block; visibility: hidden; content: "."; font-size: 12px; line-height: 12px; } /* remove placeholder */ .repohead-details-container .has-lovely-forks.public:after { display: none; } /* smoother integration */ .lovely-forks-addon { animation: fade-in 0.2s; } @keyframes fade-in { from { opacity: 0; } }
/* placeholder */ .repohead-details-container .public:after { display: block; visibility: hidden; content: "."; font-size: 12px; line-height: 12px; } /* remove placeholder */ .repohead-details-container .has-lovely-forks.public:after { display: none; } /* smoother integration, show hierarchy */ .lovely-forks-addon { animation: fade-in 0.2s; padding-left: 1em; } @keyframes fade-in { from { opacity: 0; } }
Indent the line containing the fork.
Indent the line containing the fork. Closes #30.
CSS
mpl-2.0
musically-ut/lovely-forks,musically-ut/lovely-forks,musically-ut/github-forks-addon
css
## Code Before: /* placeholder */ .repohead-details-container .public:after { display: block; visibility: hidden; content: "."; font-size: 12px; line-height: 12px; } /* remove placeholder */ .repohead-details-container .has-lovely-forks.public:after { display: none; } /* smoother integration */ .lovely-forks-addon { animation: fade-in 0.2s; } @keyframes fade-in { from { opacity: 0; } } ## Instruction: Indent the line containing the fork. Closes #30. ## Code After: /* placeholder */ .repohead-details-container .public:after { display: block; visibility: hidden; content: "."; font-size: 12px; line-height: 12px; } /* remove placeholder */ .repohead-details-container .has-lovely-forks.public:after { display: none; } /* smoother integration, show hierarchy */ .lovely-forks-addon { animation: fade-in 0.2s; padding-left: 1em; } @keyframes fade-in { from { opacity: 0; } }
67e51261831288d1790690bec471842011beca66
app/views/assets/_asset.html.erb
app/views/assets/_asset.html.erb
<% cache [asset] do %> <a class="deprecated-card" href="<%= asset.url %>"> <div class="deprecated-card-hero hover-toggle-wrapper" style="background-image:url(<%= firesize(asset.url, '426x284', 'g_center')%>)"> <% if signed_in? && (asset.product.core_team?(current_user) || current_user.staff?) %> <a href="<%= product_asset_path(asset.product, asset) %>" class="hover-toggle-target" data-method="DELETE" data-confirm="Are you sure you want to delete this asset?" style="position:relative; top: -25px; left: 90%; color: gray;"> <%= inline_react_component 'Icon', { icon: 'close' } %> </a> <% end %> </div> <div class="deprecated-card-body"> <div class="summary"> <div class="summary-target omega" style="font-size: 14px; min-height: 48px;"> <%= asset.name %> <% if asset.room %> <span class="gray-2" style="margin-top: 8px;">#<%= asset.room.number %></span> <% end %> </div> </div> </div> </a> <% end %>
<% cache [asset] do %> <span class="deprecated-card"> <div class="deprecated-card-hero hover-toggle-wrapper" style="background-image:url(<%= firesize(asset.url, '426x284', 'g_center')%>)"> <% if signed_in? && (asset.product.core_team?(current_user) || current_user.staff?) %> <a href="<%= product_asset_path(asset.product, asset) %>" class="hover-toggle-target" data-method="DELETE" data-confirm="Are you sure you want to delete this asset?" style="position: relative; top: 0; left: 90%; color: gray;"> <%= inline_react_component 'Icon', { icon: 'close' } %> </a> <% end %> </div> <div class="deprecated-card-body"> <a href="<%= asset.url %>"> <div class="summary"> <div class="summary-target omega" style="font-size: 14px; min-height: 48px;"> <%= asset.name %> <% if asset.room %> <span class="gray-2" style="margin-top: 8px;">#<%= asset.room.number %></span> <% end %> </div> </div> </a> </div> </span> <% end %>
Fix nested anchor tag issue on assets page
Fix nested anchor tag issue on assets page Browsers were interpreting the delete button differently and occasionally making it difficult to delete an asset (in Safari, for example)
HTML+ERB
agpl-3.0
lachlanjc/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta
html+erb
## Code Before: <% cache [asset] do %> <a class="deprecated-card" href="<%= asset.url %>"> <div class="deprecated-card-hero hover-toggle-wrapper" style="background-image:url(<%= firesize(asset.url, '426x284', 'g_center')%>)"> <% if signed_in? && (asset.product.core_team?(current_user) || current_user.staff?) %> <a href="<%= product_asset_path(asset.product, asset) %>" class="hover-toggle-target" data-method="DELETE" data-confirm="Are you sure you want to delete this asset?" style="position:relative; top: -25px; left: 90%; color: gray;"> <%= inline_react_component 'Icon', { icon: 'close' } %> </a> <% end %> </div> <div class="deprecated-card-body"> <div class="summary"> <div class="summary-target omega" style="font-size: 14px; min-height: 48px;"> <%= asset.name %> <% if asset.room %> <span class="gray-2" style="margin-top: 8px;">#<%= asset.room.number %></span> <% end %> </div> </div> </div> </a> <% end %> ## Instruction: Fix nested anchor tag issue on assets page Browsers were interpreting the delete button differently and occasionally making it difficult to delete an asset (in Safari, for example) ## Code After: <% cache [asset] do %> <span class="deprecated-card"> <div class="deprecated-card-hero hover-toggle-wrapper" style="background-image:url(<%= firesize(asset.url, '426x284', 'g_center')%>)"> <% if signed_in? && (asset.product.core_team?(current_user) || current_user.staff?) %> <a href="<%= product_asset_path(asset.product, asset) %>" class="hover-toggle-target" data-method="DELETE" data-confirm="Are you sure you want to delete this asset?" style="position: relative; top: 0; left: 90%; color: gray;"> <%= inline_react_component 'Icon', { icon: 'close' } %> </a> <% end %> </div> <div class="deprecated-card-body"> <a href="<%= asset.url %>"> <div class="summary"> <div class="summary-target omega" style="font-size: 14px; min-height: 48px;"> <%= asset.name %> <% if asset.room %> <span class="gray-2" style="margin-top: 8px;">#<%= asset.room.number %></span> <% end %> </div> </div> </a> </div> </span> <% end %>
fcfee82989f7134ed767105006b4b86fb80ae91c
requirements.txt
requirements.txt
lxml==4.3.5 # pyup: ignore fonttools[ufo,lxml]==3.44.0
lxml==4.4.1 fonttools[ufo,lxml]==3.44.0
Update lxml to v4.4.1 (and let pyup keep it up-to-date)
Update lxml to v4.4.1 (and let pyup keep it up-to-date)
Text
apache-2.0
khaledhosny/psautohint,khaledhosny/psautohint
text
## Code Before: lxml==4.3.5 # pyup: ignore fonttools[ufo,lxml]==3.44.0 ## Instruction: Update lxml to v4.4.1 (and let pyup keep it up-to-date) ## Code After: lxml==4.4.1 fonttools[ufo,lxml]==3.44.0
cc1c644edfcac2e88cbcd10c07fb9f49aa73be68
Magic/src/main/resources/defaults/mobs/base_npc.yml
Magic/src/main/resources/defaults/mobs/base_npc.yml
base_npc: type: villager ai: false invulnerable: true gravity: false persist: false interact_spell_target: none interact_spell_caster: false dialog_interval: 2000 dialog_range: 4
base_npc: type: villager ai: false invulnerable: true gravity: false persist: false interact_spell_target: none interact_spell_source: player interact_command_source: console dialog_interval: 2000 dialog_range: 4
Update NPC defaults for clarity
Update NPC defaults for clarity
YAML
mit
elBukkit/MagicPlugin,elBukkit/MagicPlugin,elBukkit/MagicPlugin
yaml
## Code Before: base_npc: type: villager ai: false invulnerable: true gravity: false persist: false interact_spell_target: none interact_spell_caster: false dialog_interval: 2000 dialog_range: 4 ## Instruction: Update NPC defaults for clarity ## Code After: base_npc: type: villager ai: false invulnerable: true gravity: false persist: false interact_spell_target: none interact_spell_source: player interact_command_source: console dialog_interval: 2000 dialog_range: 4
0bb6d9499b42be340d03106dd1360cb505625059
projects/OG-Language/ServiceTest/stdafx.cpp
projects/OG-Language/ServiceTest/stdafx.cpp
/** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ #include "stdafx.h" #ifndef __cplusplus_cli int main (int argc, char **argv) { CAbstractTest::Main (argc, argv); return 0; } #endif /* ifndef __cplusplus_cli */
/** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ #include "stdafx.h" #include "Service/Service.h" #ifndef __cplusplus_cli int main (int argc, char **argv) { if ((argc == 3) && !strcmp (argv[1], "jvm")) { return ServiceTestJVM (argv[2]) ? 0 : 1; } CAbstractTest::Main (argc, argv); return 0; } #endif /* ifndef __cplusplus_cli */
Verify JVM libraries found in the filesystem as being 1.7 or higher during tests.
[PLAT-3017] Verify JVM libraries found in the filesystem as being 1.7 or higher during tests.
C++
apache-2.0
ChinaQuants/OG-Platform,jeorme/OG-Platform,codeaudit/OG-Platform,DevStreet/FinanceAnalytics,DevStreet/FinanceAnalytics,nssales/OG-Platform,nssales/OG-Platform,jeorme/OG-Platform,ChinaQuants/OG-Platform,nssales/OG-Platform,jeorme/OG-Platform,jerome79/OG-Platform,jerome79/OG-Platform,codeaudit/OG-Platform,jeorme/OG-Platform,McLeodMoores/starling,codeaudit/OG-Platform,McLeodMoores/starling,nssales/OG-Platform,jerome79/OG-Platform,DevStreet/FinanceAnalytics,ChinaQuants/OG-Platform,McLeodMoores/starling,codeaudit/OG-Platform,DevStreet/FinanceAnalytics,McLeodMoores/starling,jerome79/OG-Platform,ChinaQuants/OG-Platform
c++
## Code Before: /** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ #include "stdafx.h" #ifndef __cplusplus_cli int main (int argc, char **argv) { CAbstractTest::Main (argc, argv); return 0; } #endif /* ifndef __cplusplus_cli */ ## Instruction: [PLAT-3017] Verify JVM libraries found in the filesystem as being 1.7 or higher during tests. ## Code After: /** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ #include "stdafx.h" #include "Service/Service.h" #ifndef __cplusplus_cli int main (int argc, char **argv) { if ((argc == 3) && !strcmp (argv[1], "jvm")) { return ServiceTestJVM (argv[2]) ? 0 : 1; } CAbstractTest::Main (argc, argv); return 0; } #endif /* ifndef __cplusplus_cli */
fea9b53e75be60500bc5a4de2e01eb4a090fe8cc
github-pages.gemspec
github-pages.gemspec
require File.expand_path('../lib/github-pages', __FILE__) Gem::Specification.new do |s| s.required_ruby_version = ">= 2.0.0" s.name = "github-pages" s.version = GitHubPages::VERSION s.summary = "Track GitHub Pages dependencies." s.description = "Bootstrap the GitHub Pages Jekyll environment locally." s.authors = "GitHub, Inc." s.email = "[email protected]" s.homepage = "https://github.com/github/pages-gem" s.license = "MIT" s.executables = ["github-pages"] s.files = ["lib/github-pages.rb"] GitHubPages.gems.each do |gem, version| s.add_dependency(gem, "= #{version}") end s.add_dependency('mercenary', "~> 0.3") s.add_dependency('terminal-table', "~> 1.4") s.add_development_dependency("rspec", "~> 3.3") end
require File.expand_path('../lib/github-pages', __FILE__) Gem::Specification.new do |s| s.required_ruby_version = ">= 2.0.0" s.name = "github-pages" s.version = GitHubPages::VERSION s.summary = "Track GitHub Pages dependencies." s.description = "Bootstrap the GitHub Pages Jekyll environment locally." s.authors = "GitHub, Inc." s.email = "[email protected]" s.homepage = "https://github.com/github/pages-gem" s.license = "MIT" s.executables = ["github-pages"] s.files = ["lib/github-pages.rb"] s.post_install_message = <<-msg --------------------------------------------------- Thank you for installing github-pages! GitHub Pages recently upgraded to Jekyll 3.0, which includes some breaking changes. More information: https://github.com/blog/2100-github-pages-jekyll-3 --------------------------------------------------- msg GitHubPages.gems.each do |gem, version| s.add_dependency(gem, "= #{version}") end s.add_dependency('mercenary', "~> 0.3") s.add_dependency('terminal-table', "~> 1.4") s.add_development_dependency("rspec", "~> 3.3") end
Add post-install message which informs users about Jekyll 3 upgrade
Add post-install message which informs users about Jekyll 3 upgrade
Ruby
mit
Stargator/pages-gem,Stargator/pages-gem,github/pages-gem,github/pages-gem,n060dyz/pages-gem,n060dyz/pages-gem
ruby
## Code Before: require File.expand_path('../lib/github-pages', __FILE__) Gem::Specification.new do |s| s.required_ruby_version = ">= 2.0.0" s.name = "github-pages" s.version = GitHubPages::VERSION s.summary = "Track GitHub Pages dependencies." s.description = "Bootstrap the GitHub Pages Jekyll environment locally." s.authors = "GitHub, Inc." s.email = "[email protected]" s.homepage = "https://github.com/github/pages-gem" s.license = "MIT" s.executables = ["github-pages"] s.files = ["lib/github-pages.rb"] GitHubPages.gems.each do |gem, version| s.add_dependency(gem, "= #{version}") end s.add_dependency('mercenary', "~> 0.3") s.add_dependency('terminal-table', "~> 1.4") s.add_development_dependency("rspec", "~> 3.3") end ## Instruction: Add post-install message which informs users about Jekyll 3 upgrade ## Code After: require File.expand_path('../lib/github-pages', __FILE__) Gem::Specification.new do |s| s.required_ruby_version = ">= 2.0.0" s.name = "github-pages" s.version = GitHubPages::VERSION s.summary = "Track GitHub Pages dependencies." s.description = "Bootstrap the GitHub Pages Jekyll environment locally." s.authors = "GitHub, Inc." s.email = "[email protected]" s.homepage = "https://github.com/github/pages-gem" s.license = "MIT" s.executables = ["github-pages"] s.files = ["lib/github-pages.rb"] s.post_install_message = <<-msg --------------------------------------------------- Thank you for installing github-pages! GitHub Pages recently upgraded to Jekyll 3.0, which includes some breaking changes. More information: https://github.com/blog/2100-github-pages-jekyll-3 --------------------------------------------------- msg GitHubPages.gems.each do |gem, version| s.add_dependency(gem, "= #{version}") end s.add_dependency('mercenary', "~> 0.3") s.add_dependency('terminal-table', "~> 1.4") s.add_development_dependency("rspec", "~> 3.3") end
999d243fbc9908255ae292186bf8b17eb67e42e8
planner/forms.py
planner/forms.py
from django import forms class LoginForm(forms.Form): email = forms.EmailField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-control', })) password = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Password', 'class': 'form-control', })) class SearchTrip(forms.Form): origin_id = forms.IntegerField() destination_id = forms.IntegerField() datetime = forms.DateTimeField()
from django.contrib.auth.forms import AuthenticationForm from django import forms class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-control', })) password = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Password', 'class': 'form-control', })) class SearchTrip(forms.Form): origin_id = forms.IntegerField() destination_id = forms.IntegerField() datetime = forms.DateTimeField()
Fix LoginForm to be conformant to builtin AuthenticationForm
Fix LoginForm to be conformant to builtin AuthenticationForm
Python
mit
livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride
python
## Code Before: from django import forms class LoginForm(forms.Form): email = forms.EmailField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-control', })) password = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Password', 'class': 'form-control', })) class SearchTrip(forms.Form): origin_id = forms.IntegerField() destination_id = forms.IntegerField() datetime = forms.DateTimeField() ## Instruction: Fix LoginForm to be conformant to builtin AuthenticationForm ## Code After: from django.contrib.auth.forms import AuthenticationForm from django import forms class LoginForm(AuthenticationForm): username = forms.CharField(widget=forms.EmailInput(attrs={'placeholder': 'Email', 'class': 'form-control', })) password = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Password', 'class': 'form-control', })) class SearchTrip(forms.Form): origin_id = forms.IntegerField() destination_id = forms.IntegerField() datetime = forms.DateTimeField()
329cf6e2972b09aec0f99498ce095ca6f310e59d
README.md
README.md
Attempt at above. Complete with own silly build system
Attempt at above. Complete with own silly build system Inspired by https://flowingdata.com/2015/06/16/reviving-the-statistical-atlas-of-the-united-states-with-new-data/
Add link to the original
Add link to the original
Markdown
mit
Mause/statistical_atlas_of_au
markdown
## Code Before: Attempt at above. Complete with own silly build system ## Instruction: Add link to the original ## Code After: Attempt at above. Complete with own silly build system Inspired by https://flowingdata.com/2015/06/16/reviving-the-statistical-atlas-of-the-united-states-with-new-data/
8f24d774227dca13500c0db0c10771d6b4ee7141
corehq/apps/domain/management/commands/find_secure_submission_image_domains.py
corehq/apps/domain/management/commands/find_secure_submission_image_domains.py
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: csv_writer = csv.writer( csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL ) csv_writer.writerow(['domain', 'app', 'domain_creator']) for domain in Domain.get_all(include_docs=True): if domain.secure_submissions: for app in domain.full_applications(include_builds=False): for module in app.modules: for form in module.forms: for question in form.get_questions(app.langs): if question['type'] == 'Image': csv_writer.writerow([ domain.name, app.name, domain.creating_user ])
from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def check_domain(self, domain, csv_writer): if domain.secure_submissions: for app in domain.full_applications(include_builds=False): for module in app.modules: for form in module.forms: for question in form.get_questions(app.langs): if question['type'] in ('Image', 'Audio', 'Video'): csv_writer.writerow([ domain.name, app.name, domain.creating_user ]) return def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: csv_writer = csv.writer( csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL ) csv_writer.writerow(['domain', 'app', 'domain_creator']) for domain in Domain.get_all(include_docs=True): self.check_domain(domain, csv_writer)
Add audio/video support and bail on findings
Add audio/video support and bail on findings
Python
bsd-3-clause
qedsoftware/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq
python
## Code Before: from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: csv_writer = csv.writer( csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL ) csv_writer.writerow(['domain', 'app', 'domain_creator']) for domain in Domain.get_all(include_docs=True): if domain.secure_submissions: for app in domain.full_applications(include_builds=False): for module in app.modules: for form in module.forms: for question in form.get_questions(app.langs): if question['type'] == 'Image': csv_writer.writerow([ domain.name, app.name, domain.creating_user ]) ## Instruction: Add audio/video support and bail on findings ## Code After: from django.core.management.base import BaseCommand from corehq.apps.domain.models import Domain import csv class Command(BaseCommand): help = 'Find domains with secure submissions and image questions' def check_domain(self, domain, csv_writer): if domain.secure_submissions: for app in domain.full_applications(include_builds=False): for module in app.modules: for form in module.forms: for question in form.get_questions(app.langs): if question['type'] in ('Image', 'Audio', 'Video'): csv_writer.writerow([ domain.name, app.name, domain.creating_user ]) return def handle(self, *args, **options): with open('domain_results.csv', 'wb+') as csvfile: csv_writer = csv.writer( csvfile, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL ) csv_writer.writerow(['domain', 'app', 'domain_creator']) for domain in Domain.get_all(include_docs=True): self.check_domain(domain, csv_writer)
d2f7499fc65d63769027f2498dccb5d9b4924fd6
pages/index.js
pages/index.js
import React from 'react' import Head from 'next/head' import {MDXProvider} from '@mdx-js/react' import IndexMDX from './index.mdx' import CodeBlock from '../doc-components/CodeBlock' const components = { pre: props => <div {...props} />, code: CodeBlock } export default () => ( <MDXProvider components={components}> <Head> <title> React Slidy 🍃 - a simple and minimal slider component for React </title> <meta name="description" content="A carousel component for React with the basics. It just works. For minimal setup and needs. Focused on performance ⚡" /> </Head> <IndexMDX /> <style jsx global> {` body { background-color: #fff; color: #000; font-family: system-ui, sans-serif; line-height: 1.5; margin: 0 auto; max-width: 1000px; padding: 16px; } pre { overflow: auto; max-width: 100%; } `} </style> </MDXProvider> )
import React from 'react' import Head from 'next/head' import {MDXProvider} from '@mdx-js/react' import IndexMDX from './index.mdx' import CodeBlock from '../doc-components/CodeBlock' const components = { pre: props => <div {...props} />, code: CodeBlock } export default () => ( <MDXProvider components={components}> <Head> <title> React Slidy 🍃 - a simple and minimal slider component for React </title> <meta name="description" content="A carousel component for React with the basics. It just works. For minimal setup and needs. Focused on performance ⚡" /> <link rel="canonical" href="https://react-slidy.midu.dev/" /> </Head> <IndexMDX /> <style jsx global> {` body { background-color: #fff; color: #000; font-family: system-ui, sans-serif; line-height: 1.5; margin: 0 auto; max-width: 1000px; padding: 16px; } pre { overflow: auto; max-width: 100%; } `} </style> </MDXProvider> )
Add canonical url for docs
Add canonical url for docs
JavaScript
mit
miduga/react-slidy
javascript
## Code Before: import React from 'react' import Head from 'next/head' import {MDXProvider} from '@mdx-js/react' import IndexMDX from './index.mdx' import CodeBlock from '../doc-components/CodeBlock' const components = { pre: props => <div {...props} />, code: CodeBlock } export default () => ( <MDXProvider components={components}> <Head> <title> React Slidy 🍃 - a simple and minimal slider component for React </title> <meta name="description" content="A carousel component for React with the basics. It just works. For minimal setup and needs. Focused on performance ⚡" /> </Head> <IndexMDX /> <style jsx global> {` body { background-color: #fff; color: #000; font-family: system-ui, sans-serif; line-height: 1.5; margin: 0 auto; max-width: 1000px; padding: 16px; } pre { overflow: auto; max-width: 100%; } `} </style> </MDXProvider> ) ## Instruction: Add canonical url for docs ## Code After: import React from 'react' import Head from 'next/head' import {MDXProvider} from '@mdx-js/react' import IndexMDX from './index.mdx' import CodeBlock from '../doc-components/CodeBlock' const components = { pre: props => <div {...props} />, code: CodeBlock } export default () => ( <MDXProvider components={components}> <Head> <title> React Slidy 🍃 - a simple and minimal slider component for React </title> <meta name="description" content="A carousel component for React with the basics. It just works. For minimal setup and needs. Focused on performance ⚡" /> <link rel="canonical" href="https://react-slidy.midu.dev/" /> </Head> <IndexMDX /> <style jsx global> {` body { background-color: #fff; color: #000; font-family: system-ui, sans-serif; line-height: 1.5; margin: 0 auto; max-width: 1000px; padding: 16px; } pre { overflow: auto; max-width: 100%; } `} </style> </MDXProvider> )
585d4c685596764e9f25a5dc988453f8d5197aaf
js/heartbeat.js
js/heartbeat.js
(function($, document, window) { "use strict" window.animationHeartBeat = function (steps) { var max = steps; var delay = 70; var current = 0; var interval; var beat; $(document).bind('animation.stop', function() { console.log('animation.stop event caught'); clearInterval(interval); }); $(document).bind('animation.start', function() { console.log('animation.start event caught'); if (current > max) { $(document).trigger('animation.reset'); } interval = setInterval(beat, delay); }); $(document).bind('animation.reset', function() { console.log('animation.reset event caught'); current = 0; }); beat = function () { $(document).trigger('animation.beat', [{'current': current, 'max': max}]); current++; if (current > max) { $(document).trigger('animation.stop'); } } } })(jQuery, document, window);
(function($, document, window) { "use strict" window.animationHeartBeat = function (steps) { var max = steps; var delay = 70; var current = 0; var interval; var beat; $(document).bind('animation.stop', function() { console.log('animation.stop event caught'); clearInterval(interval); }); $(document).bind('animation.start', function() { console.log('animation.start event caught'); if (current > max) { $(document).trigger('animation.reset'); } interval = setInterval(beat, delay); }); $(document).bind('animation.reset', function() { console.log('animation.reset event caught'); current = 0; }); $(document).bind('animation.beat', function(event, animation) { current = animation.current + 1; }); beat = function () { $(document).trigger('animation.beat', [{'current': current, 'max': max}]); if (current > max) { $(document).trigger('animation.stop'); } } } })(jQuery, document, window);
Allow current frame modifictation by event
[HeartBeat] Allow current frame modifictation by event
JavaScript
mit
marekkalnik/jquery-mdm-animatics
javascript
## Code Before: (function($, document, window) { "use strict" window.animationHeartBeat = function (steps) { var max = steps; var delay = 70; var current = 0; var interval; var beat; $(document).bind('animation.stop', function() { console.log('animation.stop event caught'); clearInterval(interval); }); $(document).bind('animation.start', function() { console.log('animation.start event caught'); if (current > max) { $(document).trigger('animation.reset'); } interval = setInterval(beat, delay); }); $(document).bind('animation.reset', function() { console.log('animation.reset event caught'); current = 0; }); beat = function () { $(document).trigger('animation.beat', [{'current': current, 'max': max}]); current++; if (current > max) { $(document).trigger('animation.stop'); } } } })(jQuery, document, window); ## Instruction: [HeartBeat] Allow current frame modifictation by event ## Code After: (function($, document, window) { "use strict" window.animationHeartBeat = function (steps) { var max = steps; var delay = 70; var current = 0; var interval; var beat; $(document).bind('animation.stop', function() { console.log('animation.stop event caught'); clearInterval(interval); }); $(document).bind('animation.start', function() { console.log('animation.start event caught'); if (current > max) { $(document).trigger('animation.reset'); } interval = setInterval(beat, delay); }); $(document).bind('animation.reset', function() { console.log('animation.reset event caught'); current = 0; }); $(document).bind('animation.beat', function(event, animation) { current = animation.current + 1; }); beat = function () { $(document).trigger('animation.beat', [{'current': current, 'max': max}]); if (current > max) { $(document).trigger('animation.stop'); } } } })(jQuery, document, window);
85a6eada9f3fb79e99a3bf856394c1fec0947c96
README.rst
README.rst
djorm-ext-pgarray ================= PostgreSQL array field for Django. .. image:: https://img.shields.io/travis/niwibe/djorm-ext-pgarray.svg?style=flat :target: https://travis-ci.org/niwibe/djorm-ext-pgarray .. image:: https://img.shields.io/pypi/v/djorm-ext-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-ext-pgarray .. image:: https://img.shields.io/pypi/dm/djorm-ext-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-ext-pgarray **Documentation:** http://niwibe.github.io/djorm-ext-pgarray/
djorm-ext-pgarray ================= PostgreSQL array field for Django. .. image:: https://img.shields.io/travis/niwibe/djorm-pgarray.svg?style=flat :target: https://travis-ci.org/niwibe/djorm-pgarray .. image:: https://img.shields.io/pypi/v/djorm-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-pgarray .. image:: https://img.shields.io/pypi/dm/djorm-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-pgarray **Documentation:** http://niwibe.github.io/djorm-pgarray/
Replace old name with new on readme.
Replace old name with new on readme.
reStructuredText
bsd-3-clause
niwinz/djorm-pgarray,natgeo/djorm-ext-pgarray,natgeo/djorm-ext-pgarray,niwinz/djorm-pgarray,Natgeoed/djorm-ext-pgarray,Natgeoed/djorm-ext-pgarray
restructuredtext
## Code Before: djorm-ext-pgarray ================= PostgreSQL array field for Django. .. image:: https://img.shields.io/travis/niwibe/djorm-ext-pgarray.svg?style=flat :target: https://travis-ci.org/niwibe/djorm-ext-pgarray .. image:: https://img.shields.io/pypi/v/djorm-ext-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-ext-pgarray .. image:: https://img.shields.io/pypi/dm/djorm-ext-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-ext-pgarray **Documentation:** http://niwibe.github.io/djorm-ext-pgarray/ ## Instruction: Replace old name with new on readme. ## Code After: djorm-ext-pgarray ================= PostgreSQL array field for Django. .. image:: https://img.shields.io/travis/niwibe/djorm-pgarray.svg?style=flat :target: https://travis-ci.org/niwibe/djorm-pgarray .. image:: https://img.shields.io/pypi/v/djorm-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-pgarray .. image:: https://img.shields.io/pypi/dm/djorm-pgarray.svg?style=flat :target: https://pypi.python.org/pypi/djorm-pgarray **Documentation:** http://niwibe.github.io/djorm-pgarray/