commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
9b18e2ff2e8e3d870be12843649c93cea5bacb29
Package.swift
Package.swift
import PackageDescription let package = Package( name: "fabric-sdk-swift", targets: [ Target(name: "Hfc", dependencies: ["Protos"]) ], dependencies: [ .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,27)), .Package(url: "https://github.com/grpc/grpc-swift.git", Version(0,1,10)) ] )
import PackageDescription let package = Package( name: "fabric-sdk-swift", targets: [ Target(name: "Hfc", dependencies: ["Protos"]) ], dependencies: [ .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,27)), .Package(url: "https://github.com/grpc/grpc-swift.git", Version(0,1,10)) ] ) products.append( Product( name: "SwiftHFC", type: .Library(.Dynamic), modules: [ "Hfc", "Protos" ] ) )
Build a dynamic library libSwiftHFC.dylib
Build a dynamic library libSwiftHFC.dylib
Swift
apache-2.0
juslee/fabric-sdk-swift,juslee/fabric-sdk-swift
swift
## Code Before: import PackageDescription let package = Package( name: "fabric-sdk-swift", targets: [ Target(name: "Hfc", dependencies: ["Protos"]) ], dependencies: [ .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,27)), .Package(url: "https://github.com/grpc/grpc-swift.git", Version(0,1,10)) ] ) ## Instruction: Build a dynamic library libSwiftHFC.dylib ## Code After: import PackageDescription let package = Package( name: "fabric-sdk-swift", targets: [ Target(name: "Hfc", dependencies: ["Protos"]) ], dependencies: [ .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,27)), .Package(url: "https://github.com/grpc/grpc-swift.git", Version(0,1,10)) ] ) products.append( Product( name: "SwiftHFC", type: .Library(.Dynamic), modules: [ "Hfc", "Protos" ] ) )
import PackageDescription let package = Package( name: "fabric-sdk-swift", targets: [ Target(name: "Hfc", dependencies: ["Protos"]) ], dependencies: [ .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,27)), .Package(url: "https://github.com/grpc/grpc-swift.git", Version(0,1,10)) ] ) + + products.append( + Product( + name: "SwiftHFC", + type: .Library(.Dynamic), + modules: [ + "Hfc", + "Protos" + ] + ) + )
11
0.846154
11
0
8410a52dbd626f0c35ec4674a42ba7fce645c06b
cla_public/templates/outgoings.html
cla_public/templates/outgoings.html
{% extends "base.html" %} {% import "macros/element.html" as Element %} {% import "macros/form.html" as Form %} {% block page_heading %} {% if session.has_partner %} You and your partner’s outgoings {% else %} Your outgoings {% endif %} {% endblock %} {% block inner_content %} <p>We only need to know about certain things you pay for, to work out if you may be able to get legal aid.</p> <form method="POST" action="{{ url_for('.outgoings') }}"> {{ form.csrf_token }} {{ Form.handle_errors(form) }} {{ Form.money_interval_field(form.rent) }} {{ Form.money_interval_field(form.maintenance) }} {{ Form.text_field(form.income_contribution, prefix="£") }} {{ Form.money_interval_field(form.childcare, not session.has_children) }} {{ Element.call_me_back_link() }} {{ Form.honeypot(form) }} {{ Form.actions('Submit') }} </form> {% endblock %}
{% extends "base.html" %} {% import "macros/element.html" as Element %} {% import "macros/form.html" as Form %} {% block page_heading %} {% if session.has_partner %} You and your partner’s outgoings {% else %} Your outgoings {% endif %} {% endblock %} {% block inner_content %} <p>We only need to know about certain things you pay for, to work out if you may be able to get legal aid.</p> <form method="POST" action="{{ url_for('.outgoings') }}"> {{ form.csrf_token }} {{ Form.handle_errors(form) }} {{ Form.money_interval_field(form.rent) }} {{ Form.money_interval_field(form.maintenance) }} {{ Form.text_field(form.income_contribution, prefix="£", class_='m-small') }} {{ Form.money_interval_field(form.childcare, not session.has_children) }} {{ Element.call_me_back_link() }} {{ Form.honeypot(form) }} {{ Form.actions('Submit') }} </form> {% endblock %}
Make Income Contributions field smaller
FE: Make Income Contributions field smaller
HTML
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
html
## Code Before: {% extends "base.html" %} {% import "macros/element.html" as Element %} {% import "macros/form.html" as Form %} {% block page_heading %} {% if session.has_partner %} You and your partner’s outgoings {% else %} Your outgoings {% endif %} {% endblock %} {% block inner_content %} <p>We only need to know about certain things you pay for, to work out if you may be able to get legal aid.</p> <form method="POST" action="{{ url_for('.outgoings') }}"> {{ form.csrf_token }} {{ Form.handle_errors(form) }} {{ Form.money_interval_field(form.rent) }} {{ Form.money_interval_field(form.maintenance) }} {{ Form.text_field(form.income_contribution, prefix="£") }} {{ Form.money_interval_field(form.childcare, not session.has_children) }} {{ Element.call_me_back_link() }} {{ Form.honeypot(form) }} {{ Form.actions('Submit') }} </form> {% endblock %} ## Instruction: FE: Make Income Contributions field smaller ## Code After: {% extends "base.html" %} {% import "macros/element.html" as Element %} {% import "macros/form.html" as Form %} {% block page_heading %} {% if session.has_partner %} You and your partner’s outgoings {% else %} Your outgoings {% endif %} {% endblock %} {% block inner_content %} <p>We only need to know about certain things you pay for, to work out if you may be able to get legal aid.</p> <form method="POST" action="{{ url_for('.outgoings') }}"> {{ form.csrf_token }} {{ Form.handle_errors(form) }} {{ Form.money_interval_field(form.rent) }} {{ Form.money_interval_field(form.maintenance) }} {{ Form.text_field(form.income_contribution, prefix="£", class_='m-small') }} {{ Form.money_interval_field(form.childcare, not session.has_children) }} {{ Element.call_me_back_link() }} {{ Form.honeypot(form) }} {{ Form.actions('Submit') }} </form> {% endblock %}
{% extends "base.html" %} {% import "macros/element.html" as Element %} {% import "macros/form.html" as Form %} {% block page_heading %} {% if session.has_partner %} You and your partner’s outgoings {% else %} Your outgoings {% endif %} {% endblock %} {% block inner_content %} <p>We only need to know about certain things you pay for, to work out if you may be able to get legal aid.</p> <form method="POST" action="{{ url_for('.outgoings') }}"> {{ form.csrf_token }} {{ Form.handle_errors(form) }} {{ Form.money_interval_field(form.rent) }} {{ Form.money_interval_field(form.maintenance) }} - {{ Form.text_field(form.income_contribution, prefix="£") }} + {{ Form.text_field(form.income_contribution, prefix="£", class_='m-small') }} ? ++++++++++++++++++ {{ Form.money_interval_field(form.childcare, not session.has_children) }} {{ Element.call_me_back_link() }} {{ Form.honeypot(form) }} {{ Form.actions('Submit') }} </form> {% endblock %}
2
0.0625
1
1
63c88fe17280e7b8f75b0444f09a521c79e05250
lib/udp2sqs_client.rb
lib/udp2sqs_client.rb
require_relative "udp2sqs_client/version" require_relative "udp2sqs_client/client" module Udp2sqsClient # Your code goes here... end
require_relative "udp2sqs_client/version" require_relative "udp2sqs_client/client"
Delete the generated place-holder code.
Delete the generated place-holder code.
Ruby
agpl-3.0
meducation/udp2sqs-client
ruby
## Code Before: require_relative "udp2sqs_client/version" require_relative "udp2sqs_client/client" module Udp2sqsClient # Your code goes here... end ## Instruction: Delete the generated place-holder code. ## Code After: require_relative "udp2sqs_client/version" require_relative "udp2sqs_client/client"
require_relative "udp2sqs_client/version" require_relative "udp2sqs_client/client" - - module Udp2sqsClient - # Your code goes here... - end
4
0.666667
0
4
5e5ef229fc97f4676dacb51e75178445405173c3
UnitTests/Model/Home/Strategy/TMHomeStrategyFactory.swift
UnitTests/Model/Home/Strategy/TMHomeStrategyFactory.swift
import XCTest class TMHomeStrategyFactory:XCTestCase { }
import XCTest @testable import gattaca class TMHomeStrategyFactory:XCTestCase { private var controller:CHome? private var session:MSession? override func setUp() { super.setUp() let session:MSession = MSession() self.session = session controller = CHome(session:session) } //MARK: internal func testInit() { XCTAssertNotNil( session, "failed to create session") XCTAssertNotNil( controller, "failed to create controller") } func testFactoryStrategyNew() { guard let controller:CHome = self.controller else { return } session?.status = MSession.Status.new let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy( controller:controller) let strategyNew:MHomeStrategyNew? = strategy as? MHomeStrategyNew XCTAssertNotNil( strategyNew, "failed loading strategy for status new") } }
Add test for status new
Add test for status new
Swift
mit
turingcorp/gattaca,turingcorp/gattaca
swift
## Code Before: import XCTest class TMHomeStrategyFactory:XCTestCase { } ## Instruction: Add test for status new ## Code After: import XCTest @testable import gattaca class TMHomeStrategyFactory:XCTestCase { private var controller:CHome? private var session:MSession? override func setUp() { super.setUp() let session:MSession = MSession() self.session = session controller = CHome(session:session) } //MARK: internal func testInit() { XCTAssertNotNil( session, "failed to create session") XCTAssertNotNil( controller, "failed to create controller") } func testFactoryStrategyNew() { guard let controller:CHome = self.controller else { return } session?.status = MSession.Status.new let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy( controller:controller) let strategyNew:MHomeStrategyNew? = strategy as? MHomeStrategyNew XCTAssertNotNil( strategyNew, "failed loading strategy for status new") } }
import XCTest + @testable import gattaca class TMHomeStrategyFactory:XCTestCase { + private var controller:CHome? + private var session:MSession? + + override func setUp() + { + super.setUp() + + let session:MSession = MSession() + self.session = session + + controller = CHome(session:session) + } + + //MARK: internal + + func testInit() + { + XCTAssertNotNil( + session, + "failed to create session") + + XCTAssertNotNil( + controller, + "failed to create controller") + } + + func testFactoryStrategyNew() + { + guard + + let controller:CHome = self.controller + + else + { + return + } + + session?.status = MSession.Status.new + + let strategy:MHomeStrategy? = MHomeStrategy.factoryStrategy( + controller:controller) + let strategyNew:MHomeStrategyNew? = strategy as? MHomeStrategyNew + + XCTAssertNotNil( + strategyNew, + "failed loading strategy for status new") + } }
48
9.6
48
0
345234d94dc0e4d9e0911909689e99726c58932f
wazimap_za/templates/homepage_youth.html
wazimap_za/templates/homepage_youth.html
<div class="content-container clearfix tan-stripe callouts"> <article class="wrapper"> <section> <div class="column-third callout with-icon"> <h3> <i class="fa fa-search"></i> Explore </h3> <p>Type in the name of an area in the top right-hand bar or click on an area in the map</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-bar-chart-o"></i> Visualise </h3> <p>Scroll down to view statistics and charts about young people and the context in which they live</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-refresh"></i> Compare </h3> <p>Compare any two areas by typing a second area in the bar below the map</p> </div> </section> <section class="column-full clearfix"> <div id="slippy-map"></div> </section> </article> </div> <div class="content-container clearfix"> <article id="explore" class="clearfix wrapper"> {% include "data/_blocks/_youth_data_query_builder.html" %} </article> </div>
<div class="content-container clearfix tan-stripe callouts"> <article class="wrapper"> <section class="column-full clearfix"> <div id="slippy-map"></div> </section> <section class="column-full clearfix"> <div class="column-third callout with-icon"> <h3> <i class="fa fa-search"></i> Explore </h3> <p>Type in the name of an area in the top right-hand bar or click on an area in the map</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-bar-chart-o"></i> Visualise </h3> <p>Scroll down to view statistics and charts about young people and the context in which they live</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-refresh"></i> Compare </h3> <p>Compare any two areas by typing a second area in the bar below the map</p> </div> </section> </article> </div> <div class="content-container clearfix"> <article id="explore" class="clearfix wrapper"> {% include "data/_blocks/_youth_data_query_builder.html" %} </article> </div>
Move map up the page
Move map up the page
HTML
mit
Code4SA/wazimap-za,Code4SA/wazimap-za,Code4SA/wazimap-za
html
## Code Before: <div class="content-container clearfix tan-stripe callouts"> <article class="wrapper"> <section> <div class="column-third callout with-icon"> <h3> <i class="fa fa-search"></i> Explore </h3> <p>Type in the name of an area in the top right-hand bar or click on an area in the map</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-bar-chart-o"></i> Visualise </h3> <p>Scroll down to view statistics and charts about young people and the context in which they live</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-refresh"></i> Compare </h3> <p>Compare any two areas by typing a second area in the bar below the map</p> </div> </section> <section class="column-full clearfix"> <div id="slippy-map"></div> </section> </article> </div> <div class="content-container clearfix"> <article id="explore" class="clearfix wrapper"> {% include "data/_blocks/_youth_data_query_builder.html" %} </article> </div> ## Instruction: Move map up the page ## Code After: <div class="content-container clearfix tan-stripe callouts"> <article class="wrapper"> <section class="column-full clearfix"> <div id="slippy-map"></div> </section> <section class="column-full clearfix"> <div class="column-third callout with-icon"> <h3> <i class="fa fa-search"></i> Explore </h3> <p>Type in the name of an area in the top right-hand bar or click on an area in the map</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-bar-chart-o"></i> Visualise </h3> <p>Scroll down to view statistics and charts about young people and the context in which they live</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-refresh"></i> Compare </h3> <p>Compare any two areas by typing a second area in the bar below the map</p> </div> </section> </article> </div> <div class="content-container clearfix"> <article id="explore" class="clearfix wrapper"> {% include "data/_blocks/_youth_data_query_builder.html" %} </article> </div>
<div class="content-container clearfix tan-stripe callouts"> <article class="wrapper"> + <section class="column-full clearfix"> + <div id="slippy-map"></div> - <section> + </section> ? + + <section class="column-full clearfix"> <div class="column-third callout with-icon"> <h3> <i class="fa fa-search"></i> Explore </h3> <p>Type in the name of an area in the top right-hand bar or click on an area in the map</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-bar-chart-o"></i> Visualise </h3> <p>Scroll down to view statistics and charts about young people and the context in which they live</p> </div> <div class="column-third callout with-icon"> <h3> <i class="fa fa-refresh"></i> Compare </h3> <p>Compare any two areas by typing a second area in the bar below the map</p> </div> </section> - <section class="column-full clearfix"> - <div id="slippy-map"></div> - </section> </article> </div> <div class="content-container clearfix"> <article id="explore" class="clearfix wrapper"> {% include "data/_blocks/_youth_data_query_builder.html" %} </article> </div>
8
0.222222
4
4
bf8117a6d79ba2effa71dee1d24520b75380b666
.travis.yml
.travis.yml
language: c sudo: required services: - rabbitmq install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh script: bash -ex .travis-opam.sh env: matrix: - OCAML_VERSION=4.03 - OCAML_VERSION=4.04 - OCAML_VERSION=4.05 - OCAML_VERSION=4.06 global: - PACKAGE=amqp-client - DEPOPTS="*" - TESTS=true - PRE_INSTALL_HOOK="opam remove amqp-client || true" - POST_INSTALL_HOOK="opam install async lwt --yes; make integration" - DEPOPTS="*" os: - linux - osx #cache: # directories: # - $HOME/.opam
language: c sudo: required services: - rabbitmq install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh script: bash -ex .travis-opam.sh env: matrix: - OCAML_VERSION=4.03 - OCAML_VERSION=4.04 - OCAML_VERSION=4.05 - OCAML_VERSION=4.06 global: - PACKAGE=amqp-client - DEPOPTS="*" - TESTS=true - PRE_INSTALL_HOOK="opam remove amqp-client || true" - POST_INSTALL_HOOK="opam install async lwt --yes; make integration" os: - linux
Remove build on osx as rabbutmq server does not seem to work
Remove build on osx as rabbutmq server does not seem to work
YAML
bsd-3-clause
andersfugmann/amqp-client,andersfugmann/amqp-client
yaml
## Code Before: language: c sudo: required services: - rabbitmq install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh script: bash -ex .travis-opam.sh env: matrix: - OCAML_VERSION=4.03 - OCAML_VERSION=4.04 - OCAML_VERSION=4.05 - OCAML_VERSION=4.06 global: - PACKAGE=amqp-client - DEPOPTS="*" - TESTS=true - PRE_INSTALL_HOOK="opam remove amqp-client || true" - POST_INSTALL_HOOK="opam install async lwt --yes; make integration" - DEPOPTS="*" os: - linux - osx #cache: # directories: # - $HOME/.opam ## Instruction: Remove build on osx as rabbutmq server does not seem to work ## Code After: language: c sudo: required services: - rabbitmq install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh script: bash -ex .travis-opam.sh env: matrix: - OCAML_VERSION=4.03 - OCAML_VERSION=4.04 - OCAML_VERSION=4.05 - OCAML_VERSION=4.06 global: - PACKAGE=amqp-client - DEPOPTS="*" - TESTS=true - PRE_INSTALL_HOOK="opam remove amqp-client || true" - POST_INSTALL_HOOK="opam install async lwt --yes; make integration" os: - linux
language: c sudo: required services: - rabbitmq install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh script: bash -ex .travis-opam.sh env: matrix: - OCAML_VERSION=4.03 - OCAML_VERSION=4.04 - OCAML_VERSION=4.05 - OCAML_VERSION=4.06 global: - PACKAGE=amqp-client - DEPOPTS="*" - TESTS=true - PRE_INSTALL_HOOK="opam remove amqp-client || true" - POST_INSTALL_HOOK="opam install async lwt --yes; make integration" - - DEPOPTS="*" os: - linux - - osx - - #cache: - # directories: - # - $HOME/.opam
6
0.214286
0
6
fbf44c26b13fe843de0a807e313e57f8349acf60
db/scheme.sql
db/scheme.sql
CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, name VARCHAR(32) NOT NULL UNIQUE, twitter_id INT NOT NULL UNIQUE, joined_at TIMESTAMP NOT NULL ); /* CREATE INDEX has no IF NOT EXISTS */ CREATE INDEX users_twitter_id_index ON users (twitter_id); CREATE TABLE IF NOT EXISTS wishlists ( id SERIAL PRIMARY KEY, url VARCHAR(64) NOT NULL UNIQUE, title VARCHAR(64) NOT NULL, memo VARCHAR(255), created_at TIMESTAMP NOT NULL, updatd_at TIMESTAMP NOT NULL );
CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, name VARCHAR(32) NOT NULL UNIQUE, twitter_id INT NOT NULL UNIQUE, joined_at TIMESTAMP NOT NULL ); /* CREATE INDEX has no IF NOT EXISTS */ CREATE INDEX users_twitter_id_index ON users (twitter_id); CREATE TABLE IF NOT EXISTS wishlists ( id SERIAL PRIMARY KEY, url VARCHAR(64) NOT NULL UNIQUE, title VARCHAR(64) NOT NULL, memo VARCHAR(255), user_id INT NOT NULL, created_at TIMESTAMP NOT NULL, updatd_at TIMESTAMP NOT NULL );
Add user_id column to list table;
Add user_id column to list table;
SQL
mit
Sixeight/iwai,Sixeight/iwai,Sixeight/iwai
sql
## Code Before: CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, name VARCHAR(32) NOT NULL UNIQUE, twitter_id INT NOT NULL UNIQUE, joined_at TIMESTAMP NOT NULL ); /* CREATE INDEX has no IF NOT EXISTS */ CREATE INDEX users_twitter_id_index ON users (twitter_id); CREATE TABLE IF NOT EXISTS wishlists ( id SERIAL PRIMARY KEY, url VARCHAR(64) NOT NULL UNIQUE, title VARCHAR(64) NOT NULL, memo VARCHAR(255), created_at TIMESTAMP NOT NULL, updatd_at TIMESTAMP NOT NULL ); ## Instruction: Add user_id column to list table; ## Code After: CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, name VARCHAR(32) NOT NULL UNIQUE, twitter_id INT NOT NULL UNIQUE, joined_at TIMESTAMP NOT NULL ); /* CREATE INDEX has no IF NOT EXISTS */ CREATE INDEX users_twitter_id_index ON users (twitter_id); CREATE TABLE IF NOT EXISTS wishlists ( id SERIAL PRIMARY KEY, url VARCHAR(64) NOT NULL UNIQUE, title VARCHAR(64) NOT NULL, memo VARCHAR(255), user_id INT NOT NULL, created_at TIMESTAMP NOT NULL, updatd_at TIMESTAMP NOT NULL );
CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, name VARCHAR(32) NOT NULL UNIQUE, twitter_id INT NOT NULL UNIQUE, joined_at TIMESTAMP NOT NULL ); /* CREATE INDEX has no IF NOT EXISTS */ CREATE INDEX users_twitter_id_index ON users (twitter_id); CREATE TABLE IF NOT EXISTS wishlists ( id SERIAL PRIMARY KEY, url VARCHAR(64) NOT NULL UNIQUE, title VARCHAR(64) NOT NULL, memo VARCHAR(255), + user_id INT NOT NULL, created_at TIMESTAMP NOT NULL, updatd_at TIMESTAMP NOT NULL );
1
0.055556
1
0
021e58bf8ed0ef17a2b03bfb9267350f70c4a121
lib/util/getEntryOutputPathFromStats.js
lib/util/getEntryOutputPathFromStats.js
const {resolve} = require('path') function getEntryOutputPathFromStats (stats, assetName) { if (!assetName) { assetName = Object.keys(stats.compilation.assets)[0] } if (assetName) { return resolve(stats.compilation.compiler.options.output.path, assetName) } } module.exports = getEntryOutputPathFromStats
const {join} = require('path') function getEntryOutputPathFromStats (stats, options = {}) { if (typeof options === 'string') { options = {entryName: options} } let { entryName, outputPath } = options let entryFiles let entryOutputPath if (stats.compilation) { const {entrypoints} = stats.compilation const entry = entryName ? entrypoints[entryName] : entrypoints.main || entrypoints.index if (!outputPath) { outputPath = stats.compilation.outputOptions.path } if (entry) { entryChunk = entry.chunks.find((chunk) => chunk.name === entry.name) if (entryChunk) { entryFiles = entryChunk.files } } } if (!entryFiles && stats.chunks && stats.entrypoints) { const { chunks, entrypoints } = stats if (!entryName) { entryName = entrypoints.main ? 'main' : entrypoints.index ? 'index' : undefined } const entry = entrypoints[entryName] if (entry) { entryFiles = entry.chunks .map((chunkId) => chunks.find((chunk) => chunk.id === chunkId)) .filter((chunk) => chunk && chunk.names && ~chunk.names.indexOf(entryName)) .reduce((acc, chunk) => acc.concat(chunk.files || []), []) } } if (!entryFiles && stats.assetsByChunkName && stats.chunks) { const {assetsByChunkName} = stats entryFiles = entryName ? assetsByChunkName[entryName] : assetsByChunkName.main || assetsByChunkName.index } if (!entryFiles && stats.assets) { const {assets} = stats entryFiles = [] .concat(entryName || ['main', 'index']) .map((chunkName) => assets.filter((asset) => ~asset.chunkNames.indexOf(chunkName))) .reduce((acc, value) => value.map((asset) => asset.name), []) } if (entryFiles) { entryOutputPath = entryFiles.find((file) => file.endsWith('.js')) } if (entryOutputPath && outputPath) { entryOutputPath = join(outputPath, entryOutputPath) } return entryOutputPath } module.exports = getEntryOutputPathFromStats
Enhance entry output path resolution from stats and json stats
Enhance entry output path resolution from stats and json stats
JavaScript
mit
enten/udk,enten/udk
javascript
## Code Before: const {resolve} = require('path') function getEntryOutputPathFromStats (stats, assetName) { if (!assetName) { assetName = Object.keys(stats.compilation.assets)[0] } if (assetName) { return resolve(stats.compilation.compiler.options.output.path, assetName) } } module.exports = getEntryOutputPathFromStats ## Instruction: Enhance entry output path resolution from stats and json stats ## Code After: const {join} = require('path') function getEntryOutputPathFromStats (stats, options = {}) { if (typeof options === 'string') { options = {entryName: options} } let { entryName, outputPath } = options let entryFiles let entryOutputPath if (stats.compilation) { const {entrypoints} = stats.compilation const entry = entryName ? entrypoints[entryName] : entrypoints.main || entrypoints.index if (!outputPath) { outputPath = stats.compilation.outputOptions.path } if (entry) { entryChunk = entry.chunks.find((chunk) => chunk.name === entry.name) if (entryChunk) { entryFiles = entryChunk.files } } } if (!entryFiles && stats.chunks && stats.entrypoints) { const { chunks, entrypoints } = stats if (!entryName) { entryName = entrypoints.main ? 'main' : entrypoints.index ? 'index' : undefined } const entry = entrypoints[entryName] if (entry) { entryFiles = entry.chunks .map((chunkId) => chunks.find((chunk) => chunk.id === chunkId)) .filter((chunk) => chunk && chunk.names && ~chunk.names.indexOf(entryName)) .reduce((acc, chunk) => acc.concat(chunk.files || []), []) } } if (!entryFiles && stats.assetsByChunkName && stats.chunks) { const {assetsByChunkName} = stats entryFiles = entryName ? assetsByChunkName[entryName] : assetsByChunkName.main || assetsByChunkName.index } if (!entryFiles && stats.assets) { const {assets} = stats entryFiles = [] .concat(entryName || ['main', 'index']) .map((chunkName) => assets.filter((asset) => ~asset.chunkNames.indexOf(chunkName))) .reduce((acc, value) => value.map((asset) => asset.name), []) } if (entryFiles) { entryOutputPath = entryFiles.find((file) => file.endsWith('.js')) } if (entryOutputPath && outputPath) { entryOutputPath = join(outputPath, entryOutputPath) } return entryOutputPath } module.exports = getEntryOutputPathFromStats
- const {resolve} = require('path') ? ^^^ ^^^ + const {join} = require('path') ? ^ ^^ - function getEntryOutputPathFromStats (stats, assetName) { ? ^ ^^^^^^^ + function getEntryOutputPathFromStats (stats, options = {}) { ? ^^^^^^ ^^^^^ - if (!assetName) { - assetName = Object.keys(stats.compilation.assets)[0] + if (typeof options === 'string') { + options = {entryName: options} } - if (assetName) { - return resolve(stats.compilation.compiler.options.output.path, assetName) + let { + entryName, + outputPath + } = options + + let entryFiles + let entryOutputPath + + if (stats.compilation) { + const {entrypoints} = stats.compilation + const entry = entryName ? entrypoints[entryName] : entrypoints.main || entrypoints.index + + if (!outputPath) { + outputPath = stats.compilation.outputOptions.path + } + + if (entry) { + entryChunk = entry.chunks.find((chunk) => chunk.name === entry.name) + + if (entryChunk) { + entryFiles = entryChunk.files + } + } } + + if (!entryFiles && stats.chunks && stats.entrypoints) { + const { + chunks, + entrypoints + } = stats + + if (!entryName) { + entryName = entrypoints.main ? 'main' : entrypoints.index ? 'index' : undefined + } + + const entry = entrypoints[entryName] + + if (entry) { + entryFiles = entry.chunks + .map((chunkId) => chunks.find((chunk) => chunk.id === chunkId)) + .filter((chunk) => chunk && chunk.names && ~chunk.names.indexOf(entryName)) + .reduce((acc, chunk) => acc.concat(chunk.files || []), []) + } + } + + if (!entryFiles && stats.assetsByChunkName && stats.chunks) { + const {assetsByChunkName} = stats + + entryFiles = entryName ? assetsByChunkName[entryName] : assetsByChunkName.main || assetsByChunkName.index + } + + if (!entryFiles && stats.assets) { + const {assets} = stats + + entryFiles = [] + .concat(entryName || ['main', 'index']) + .map((chunkName) => assets.filter((asset) => ~asset.chunkNames.indexOf(chunkName))) + .reduce((acc, value) => value.map((asset) => asset.name), []) + } + + if (entryFiles) { + entryOutputPath = entryFiles.find((file) => file.endsWith('.js')) + } + + if (entryOutputPath && outputPath) { + entryOutputPath = join(outputPath, entryOutputPath) + } + + return entryOutputPath } module.exports = getEntryOutputPathFromStats
78
6
72
6
07c63b9f8b956e1c8524b21d92be1496c578cdd5
app/views/cms/resources/index/_boolean.html.haml
app/views/cms/resources/index/_boolean.html.haml
- if !!(value) %label.c-input.c-checkbox %input{ :type => :checkbox, :checked => true, :disabled => true } %span.c-indicator
- if !!(value) %i.fa.fa-check
Fix boolean checkbox with icon
Fix boolean checkbox with icon
Haml
mit
droptheplot/adminable,droptheplot/adminable,droptheplot/adminable
haml
## Code Before: - if !!(value) %label.c-input.c-checkbox %input{ :type => :checkbox, :checked => true, :disabled => true } %span.c-indicator ## Instruction: Fix boolean checkbox with icon ## Code After: - if !!(value) %i.fa.fa-check
- if !!(value) + %i.fa.fa-check - %label.c-input.c-checkbox - %input{ :type => :checkbox, :checked => true, :disabled => true } - %span.c-indicator
4
1
1
3
62b3ca4e56c606d0a01542c656aedb037772f319
source/stylesheets/org-chart.css.scss
source/stylesheets/org-chart.css.scss
@import "variables"; .org-chart-container { overflow-x: scroll; padding-top: 50px; padding-bottom: 0; .employee-title { color: $color-red; font-style: italic; } }
@import "variables"; // Fixes Bootstrap 3 issue: // http://stackoverflow.com/questions/35398705/why-is-chrome-showing-extra-line-when-using-google-org-chart table.google-visualization-orgchart-table { border-collapse: separate; } .org-chart-container { overflow-x: scroll; padding-top: 50px; padding-bottom: 0; .employee-title { color: $color-red; font-style: italic; } }
Fix Chrome issue when Bootstrap 3 used with Google OrgChart
Fix Chrome issue when Bootstrap 3 used with Google OrgChart
SCSS
mit
damianhakert/damianhakert.github.io
scss
## Code Before: @import "variables"; .org-chart-container { overflow-x: scroll; padding-top: 50px; padding-bottom: 0; .employee-title { color: $color-red; font-style: italic; } } ## Instruction: Fix Chrome issue when Bootstrap 3 used with Google OrgChart ## Code After: @import "variables"; // Fixes Bootstrap 3 issue: // http://stackoverflow.com/questions/35398705/why-is-chrome-showing-extra-line-when-using-google-org-chart table.google-visualization-orgchart-table { border-collapse: separate; } .org-chart-container { overflow-x: scroll; padding-top: 50px; padding-bottom: 0; .employee-title { color: $color-red; font-style: italic; } }
@import "variables"; + + // Fixes Bootstrap 3 issue: + // http://stackoverflow.com/questions/35398705/why-is-chrome-showing-extra-line-when-using-google-org-chart + table.google-visualization-orgchart-table { + border-collapse: separate; + } .org-chart-container { overflow-x: scroll; padding-top: 50px; padding-bottom: 0; .employee-title { color: $color-red; font-style: italic; } }
6
0.5
6
0
bcd4c37d4dd4dd7ff81a68bdaed66afc6f340642
tests/testsUnsupportedOnARM32.txt
tests/testsUnsupportedOnARM32.txt
JIT/Directed/tailcall/tailcall/tailcall.sh JIT/Methodical/tailcall_v4/hijacking/hijacking.sh JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh
JIT/Directed/tailcall/tailcall/tailcall.sh JIT/Methodical/tailcall_v4/hijacking/hijacking.sh JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof/_il_dbgsizeof.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32/_il_dbgsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64/_il_dbgsizeof64.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof/_il_relsizeof.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof32/_il_relsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof64/_il_relsizeof64.sh
Exclude six sizeof related tests from ARM
Exclude six sizeof related tests from ARM We decided to exclude following six tests after discussion in issue #6680. JIT/Methodical/xxobj/sizeof/_il_dbgsizeof/_il_dbgsizeof.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32/_il_dbgsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64/_il_dbgsizeof64.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof/_il_relsizeof.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof32/_il_relsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof64/_il_relsizeof64.sh Signed-off-by: Hyung-Kyu Choi <b24f6a1d8ab6a697998e8a2c60eb031a02db5070@samsung.com>
Text
mit
yizhang82/coreclr,AlexGhiondea/coreclr,hseok-oh/coreclr,krk/coreclr,pgavlin/coreclr,pgavlin/coreclr,alexperovich/coreclr,krk/coreclr,mmitche/coreclr,wtgodbe/coreclr,poizan42/coreclr,qiudesong/coreclr,tijoytom/coreclr,cshung/coreclr,cshung/coreclr,krytarowski/coreclr,dpodder/coreclr,neurospeech/coreclr,krytarowski/coreclr,gkhanna79/coreclr,alexperovich/coreclr,mskvortsov/coreclr,russellhadley/coreclr,mmitche/coreclr,alexperovich/coreclr,dpodder/coreclr,sagood/coreclr,krytarowski/coreclr,tijoytom/coreclr,russellhadley/coreclr,sagood/coreclr,cmckinsey/coreclr,ragmani/coreclr,yizhang82/coreclr,qiudesong/coreclr,JonHanna/coreclr,cydhaselton/coreclr,yeaicc/coreclr,krk/coreclr,sjsinju/coreclr,ruben-ayrapetyan/coreclr,cmckinsey/coreclr,ragmani/coreclr,qiudesong/coreclr,dpodder/coreclr,poizan42/coreclr,rartemev/coreclr,yeaicc/coreclr,JonHanna/coreclr,botaberg/coreclr,hseok-oh/coreclr,botaberg/coreclr,James-Ko/coreclr,botaberg/coreclr,rartemev/coreclr,mskvortsov/coreclr,JonHanna/coreclr,hseok-oh/coreclr,YongseopKim/coreclr,yizhang82/coreclr,krytarowski/coreclr,ruben-ayrapetyan/coreclr,JosephTremoulet/coreclr,alexperovich/coreclr,cshung/coreclr,AlexGhiondea/coreclr,alexperovich/coreclr,cydhaselton/coreclr,wtgodbe/coreclr,botaberg/coreclr,gkhanna79/coreclr,sjsinju/coreclr,JonHanna/coreclr,gkhanna79/coreclr,poizan42/coreclr,JosephTremoulet/coreclr,JonHanna/coreclr,wtgodbe/coreclr,wateret/coreclr,gkhanna79/coreclr,alexperovich/coreclr,ruben-ayrapetyan/coreclr,pgavlin/coreclr,qiudesong/coreclr,ragmani/coreclr,ruben-ayrapetyan/coreclr,JosephTremoulet/coreclr,wateret/coreclr,cmckinsey/coreclr,krk/coreclr,yizhang82/coreclr,dpodder/coreclr,JonHanna/coreclr,cmckinsey/coreclr,wateret/coreclr,mmitche/coreclr,cydhaselton/coreclr,qiudesong/coreclr,krk/coreclr,qiudesong/coreclr,parjong/coreclr,kyulee1/coreclr,sagood/coreclr,kyulee1/coreclr,wtgodbe/coreclr,hseok-oh/coreclr,cmckinsey/coreclr,russellhadley/coreclr,jamesqo/coreclr,yizhang82/coreclr,neurospeech/coreclr,sjsinju/coreclr,pgavlin/coreclr,yeaicc/coreclr,rartemev/coreclr,dpodder/coreclr,cshung/coreclr,sjsinju/coreclr,sjsinju/coreclr,mskvortsov/coreclr,James-Ko/coreclr,yeaicc/coreclr,YongseopKim/coreclr,cshung/coreclr,rartemev/coreclr,neurospeech/coreclr,russellhadley/coreclr,YongseopKim/coreclr,hseok-oh/coreclr,AlexGhiondea/coreclr,tijoytom/coreclr,James-Ko/coreclr,jamesqo/coreclr,sagood/coreclr,sjsinju/coreclr,botaberg/coreclr,jamesqo/coreclr,ragmani/coreclr,ragmani/coreclr,botaberg/coreclr,poizan42/coreclr,cydhaselton/coreclr,YongseopKim/coreclr,JosephTremoulet/coreclr,neurospeech/coreclr,neurospeech/coreclr,YongseopKim/coreclr,tijoytom/coreclr,cmckinsey/coreclr,wtgodbe/coreclr,yeaicc/coreclr,gkhanna79/coreclr,pgavlin/coreclr,kyulee1/coreclr,cmckinsey/coreclr,krk/coreclr,gkhanna79/coreclr,poizan42/coreclr,yeaicc/coreclr,hseok-oh/coreclr,russellhadley/coreclr,kyulee1/coreclr,JosephTremoulet/coreclr,russellhadley/coreclr,wateret/coreclr,tijoytom/coreclr,AlexGhiondea/coreclr,krytarowski/coreclr,sagood/coreclr,sagood/coreclr,parjong/coreclr,jamesqo/coreclr,wtgodbe/coreclr,AlexGhiondea/coreclr,rartemev/coreclr,krytarowski/coreclr,jamesqo/coreclr,tijoytom/coreclr,parjong/coreclr,mmitche/coreclr,mskvortsov/coreclr,rartemev/coreclr,neurospeech/coreclr,AlexGhiondea/coreclr,mmitche/coreclr,James-Ko/coreclr,mskvortsov/coreclr,YongseopKim/coreclr,jamesqo/coreclr,JosephTremoulet/coreclr,cydhaselton/coreclr,wateret/coreclr,yizhang82/coreclr,kyulee1/coreclr,ragmani/coreclr,pgavlin/coreclr,parjong/coreclr,ruben-ayrapetyan/coreclr,yeaicc/coreclr,kyulee1/coreclr,mskvortsov/coreclr,poizan42/coreclr,dpodder/coreclr,wateret/coreclr,cshung/coreclr,cydhaselton/coreclr,James-Ko/coreclr,James-Ko/coreclr,ruben-ayrapetyan/coreclr,parjong/coreclr,parjong/coreclr,mmitche/coreclr
text
## Code Before: JIT/Directed/tailcall/tailcall/tailcall.sh JIT/Methodical/tailcall_v4/hijacking/hijacking.sh JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh ## Instruction: Exclude six sizeof related tests from ARM We decided to exclude following six tests after discussion in issue #6680. JIT/Methodical/xxobj/sizeof/_il_dbgsizeof/_il_dbgsizeof.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32/_il_dbgsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64/_il_dbgsizeof64.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof/_il_relsizeof.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof32/_il_relsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof64/_il_relsizeof64.sh Signed-off-by: Hyung-Kyu Choi <b24f6a1d8ab6a697998e8a2c60eb031a02db5070@samsung.com> ## Code After: JIT/Directed/tailcall/tailcall/tailcall.sh JIT/Methodical/tailcall_v4/hijacking/hijacking.sh JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof/_il_dbgsizeof.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32/_il_dbgsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64/_il_dbgsizeof64.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof/_il_relsizeof.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof32/_il_relsizeof32.sh JIT/Methodical/xxobj/sizeof/_il_relsizeof64/_il_relsizeof64.sh
JIT/Directed/tailcall/tailcall/tailcall.sh JIT/Methodical/tailcall_v4/hijacking/hijacking.sh JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh JIT/jit64/opt/cse/HugeArray1/HugeArray1.sh + JIT/Methodical/xxobj/sizeof/_il_dbgsizeof/_il_dbgsizeof.sh + JIT/Methodical/xxobj/sizeof/_il_dbgsizeof32/_il_dbgsizeof32.sh + JIT/Methodical/xxobj/sizeof/_il_dbgsizeof64/_il_dbgsizeof64.sh + JIT/Methodical/xxobj/sizeof/_il_relsizeof/_il_relsizeof.sh + JIT/Methodical/xxobj/sizeof/_il_relsizeof32/_il_relsizeof32.sh + JIT/Methodical/xxobj/sizeof/_il_relsizeof64/_il_relsizeof64.sh
6
1.2
6
0
def5c0b555b7f2b812c8047cb930a659fd2b4532
README.md
README.md
This gem provides a basic Ruby wrapper for the [Hexillion Whois API](http://hexillion.com/whois/). It is largely based on the [Quova gem](http://github.com/d11wtq/quova/) by Chris Corbyn. ## Installation gem install hexillion ## Usage The core class is `Hexillion::Client`. Create a new instance, passing in your Hexillion API username and password: hex = Hexillion::Client.new(:username => 'MYUSERNAME', :password => 'MYPASSWORD') Then, use the `whois` method on the instance to query Whois records for a given domain: hex.whois('example.com') The return value is a hash with all the Whois data returned by the API. ## Resources - [Source](https://github.com/flippa/hexillion) - [Issues](https://github.com/flippa/hexillion/issues) ## Disclaimer The official maintainer of this Gem, Flippa.com is no way affiliated with, nor representative of Hexillion. This code is provided free of charge and shall be used at your own risk. Copyright (c) 2011 Flippa.com Pty. Ltd.
[![Build Status](https://travis-ci.org/flippa/hexillion.svg?branch=master)](https://travis-ci.org/flippa/hexillion) This gem provides a basic Ruby wrapper for the [Hexillion Whois API](http://hexillion.com/whois/). It is largely based on the [Quova gem](http://github.com/d11wtq/quova/) by Chris Corbyn. ## Installation gem install hexillion ## Usage The core class is `Hexillion::Client`. Create a new instance, passing in your Hexillion API username and password: hex = Hexillion::Client.new(:username => 'MYUSERNAME', :password => 'MYPASSWORD') Then, use the `whois` method on the instance to query Whois records for a given domain: hex.whois('example.com') The return value is a hash with all the Whois data returned by the API. ## Resources - [Source](https://github.com/flippa/hexillion) - [Issues](https://github.com/flippa/hexillion/issues) ## Disclaimer The official maintainer of this Gem, Flippa.com is no way affiliated with, nor representative of Hexillion. This code is provided free of charge and shall be used at your own risk. Copyright (c) 2011 Flippa.com Pty. Ltd.
Add TravisCI build status badge.
Add TravisCI build status badge.
Markdown
mit
flippa/hexillion
markdown
## Code Before: This gem provides a basic Ruby wrapper for the [Hexillion Whois API](http://hexillion.com/whois/). It is largely based on the [Quova gem](http://github.com/d11wtq/quova/) by Chris Corbyn. ## Installation gem install hexillion ## Usage The core class is `Hexillion::Client`. Create a new instance, passing in your Hexillion API username and password: hex = Hexillion::Client.new(:username => 'MYUSERNAME', :password => 'MYPASSWORD') Then, use the `whois` method on the instance to query Whois records for a given domain: hex.whois('example.com') The return value is a hash with all the Whois data returned by the API. ## Resources - [Source](https://github.com/flippa/hexillion) - [Issues](https://github.com/flippa/hexillion/issues) ## Disclaimer The official maintainer of this Gem, Flippa.com is no way affiliated with, nor representative of Hexillion. This code is provided free of charge and shall be used at your own risk. Copyright (c) 2011 Flippa.com Pty. Ltd. ## Instruction: Add TravisCI build status badge. ## Code After: [![Build Status](https://travis-ci.org/flippa/hexillion.svg?branch=master)](https://travis-ci.org/flippa/hexillion) This gem provides a basic Ruby wrapper for the [Hexillion Whois API](http://hexillion.com/whois/). It is largely based on the [Quova gem](http://github.com/d11wtq/quova/) by Chris Corbyn. ## Installation gem install hexillion ## Usage The core class is `Hexillion::Client`. Create a new instance, passing in your Hexillion API username and password: hex = Hexillion::Client.new(:username => 'MYUSERNAME', :password => 'MYPASSWORD') Then, use the `whois` method on the instance to query Whois records for a given domain: hex.whois('example.com') The return value is a hash with all the Whois data returned by the API. ## Resources - [Source](https://github.com/flippa/hexillion) - [Issues](https://github.com/flippa/hexillion/issues) ## Disclaimer The official maintainer of this Gem, Flippa.com is no way affiliated with, nor representative of Hexillion. This code is provided free of charge and shall be used at your own risk. Copyright (c) 2011 Flippa.com Pty. Ltd.
+ + [![Build Status](https://travis-ci.org/flippa/hexillion.svg?branch=master)](https://travis-ci.org/flippa/hexillion) This gem provides a basic Ruby wrapper for the [Hexillion Whois API](http://hexillion.com/whois/). It is largely based on the [Quova gem](http://github.com/d11wtq/quova/) by Chris Corbyn. ## Installation gem install hexillion ## Usage The core class is `Hexillion::Client`. Create a new instance, passing in your Hexillion API username and password: hex = Hexillion::Client.new(:username => 'MYUSERNAME', :password => 'MYPASSWORD') Then, use the `whois` method on the instance to query Whois records for a given domain: hex.whois('example.com') The return value is a hash with all the Whois data returned by the API. ## Resources - [Source](https://github.com/flippa/hexillion) - [Issues](https://github.com/flippa/hexillion/issues) ## Disclaimer The official maintainer of this Gem, Flippa.com is no way affiliated with, nor representative of Hexillion. This code is provided free of charge and shall be used at your own risk. Copyright (c) 2011 Flippa.com Pty. Ltd.
2
0.058824
2
0
f087d08119a454558ee1f08697dc1e9d3f7bed11
README.md
README.md
PDFA3 ===== Some samples how to create PDF/A3 files and PDF/A3 files with embedded files using Apache PDFBox and the source code for the [Mustang project](http://www.mustangproject.org/). License ----- Subject to the Apache license http://www.apache.org/licenses/LICENSE-2.0.html Running ----- Requires Maven to run. Use "mvn test" to generate the output for the test PDF file attachments, chdir to mustang and use "mvn package" to build the Mustang JAR (more info in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)). Contact ----- Developers: Thomas Chojecki and Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de
PDFA3 ===== Some samples how to create PDF/A3 files and PDF/A3 files with embedded files using Apache PDFBox and the source code for the [Mustang project](http://www.mustangproject.org/). License ----- Subject to the Apache license http://www.apache.org/licenses/LICENSE-2.0.html Running ----- This project requires Maven to run. Build project with "mvn clean install". This will build the project, test it and install the artifacts to local cache. After that the mustang jar can be used. More informations in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)). Contact ----- Developer: Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de
Correct the Running chapter in the readme
Correct the Running chapter in the readme
Markdown
apache-2.0
ZUGFeRD/mustangproject,ZUGFeRD/mustangproject,ZUGFeRD/mustangproject,yankee42/mustangproject
markdown
## Code Before: PDFA3 ===== Some samples how to create PDF/A3 files and PDF/A3 files with embedded files using Apache PDFBox and the source code for the [Mustang project](http://www.mustangproject.org/). License ----- Subject to the Apache license http://www.apache.org/licenses/LICENSE-2.0.html Running ----- Requires Maven to run. Use "mvn test" to generate the output for the test PDF file attachments, chdir to mustang and use "mvn package" to build the Mustang JAR (more info in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)). Contact ----- Developers: Thomas Chojecki and Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de ## Instruction: Correct the Running chapter in the readme ## Code After: PDFA3 ===== Some samples how to create PDF/A3 files and PDF/A3 files with embedded files using Apache PDFBox and the source code for the [Mustang project](http://www.mustangproject.org/). License ----- Subject to the Apache license http://www.apache.org/licenses/LICENSE-2.0.html Running ----- This project requires Maven to run. Build project with "mvn clean install". This will build the project, test it and install the artifacts to local cache. After that the mustang jar can be used. More informations in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)). Contact ----- Developer: Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de
PDFA3 ===== Some samples how to create PDF/A3 files and PDF/A3 files with embedded files using Apache PDFBox and the source code for the [Mustang project](http://www.mustangproject.org/). License ----- Subject to the Apache license http://www.apache.org/licenses/LICENSE-2.0.html Running ----- - Requires Maven to run. Use "mvn test" to generate the output for the test PDF file attachments, + This project requires Maven to run. Build project with "mvn clean install". This will build the project, test it and install the artifacts to local cache. After that the mustang jar can be used. + - chdir to mustang and use "mvn package" to build the Mustang JAR (more info in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)). ? ---------------------------------------------------- ------------- + More informations in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)). ? ++++++++ Contact ----- - Developers: Thomas Chojecki and Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de ? - -------------------- + Developer: Jochen Stärk. For questions please contact Jochen at jstaerk [at] usegroup.de +
8
0.363636
5
3
ea364c58cd954d6b076c4e30bb283f33381a1246
.github/workflows/publish_pricing_to_s3.yml
.github/workflows/publish_pricing_to_s3.yml
name: Publish pricing.json to S3 bucket on: schedule: - cron: '0 13 * * *' - cron: '0 2 * * *' jobs: generate_and_publish_pricing_data: name: Generate and Publish Pricing file to S3 runs-on: ubuntu-latest strategy: matrix: python_version: [3.7] steps: - name: Print Environment Info id: printenv run: | printenv | sort - uses: actions/checkout@master with: fetch-depth: 1 - name: Use Python ${{ matrix.python_version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} - name: Install Python Dependencies run: | pip install "tox==3.20.1" - name: Generate and publish pricing data env: GCE_API_KEY: ${{ secrets.GCE_API_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }} run: | script -e -c "tox -escrape-and-publish-provider-prices"
name: Publish pricing.json to S3 bucket on: schedule: - cron: '0 13 * * *' - cron: '0 2 * * *' jobs: generate_and_publish_pricing_data: name: Generate and Publish Pricing file to S3 runs-on: ubuntu-latest strategy: matrix: python_version: [3.7] steps: - name: Print Environment Info id: printenv run: | printenv | sort - uses: actions/checkout@master with: fetch-depth: 1 - name: Use Python ${{ matrix.python_version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} - name: Install Python Dependencies run: | pip install "tox==3.20.1" - name: Generate and publish pricing data env: GCE_API_KEY: ${{ secrets.GCE_API_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }} run: | script -e -c "tox -escrape-and-publish-provider-prices" - name: Verify files can be downloaded # Verify that the permissions are correct and files can be downloaded publicly run: | curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json.sha256 curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json.sha512
Update nightly workflow to fail if bucket / pricing file permissions are not correct.
Update nightly workflow to fail if bucket / pricing file permissions are not correct.
YAML
apache-2.0
mistio/libcloud,apache/libcloud,Kami/libcloud,mistio/libcloud,mistio/libcloud,Kami/libcloud,apache/libcloud,apache/libcloud,Kami/libcloud
yaml
## Code Before: name: Publish pricing.json to S3 bucket on: schedule: - cron: '0 13 * * *' - cron: '0 2 * * *' jobs: generate_and_publish_pricing_data: name: Generate and Publish Pricing file to S3 runs-on: ubuntu-latest strategy: matrix: python_version: [3.7] steps: - name: Print Environment Info id: printenv run: | printenv | sort - uses: actions/checkout@master with: fetch-depth: 1 - name: Use Python ${{ matrix.python_version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} - name: Install Python Dependencies run: | pip install "tox==3.20.1" - name: Generate and publish pricing data env: GCE_API_KEY: ${{ secrets.GCE_API_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }} run: | script -e -c "tox -escrape-and-publish-provider-prices" ## Instruction: Update nightly workflow to fail if bucket / pricing file permissions are not correct. ## Code After: name: Publish pricing.json to S3 bucket on: schedule: - cron: '0 13 * * *' - cron: '0 2 * * *' jobs: generate_and_publish_pricing_data: name: Generate and Publish Pricing file to S3 runs-on: ubuntu-latest strategy: matrix: python_version: [3.7] steps: - name: Print Environment Info id: printenv run: | printenv | sort - uses: actions/checkout@master with: fetch-depth: 1 - name: Use Python ${{ matrix.python_version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} - name: Install Python Dependencies run: | pip install "tox==3.20.1" - name: Generate and publish pricing data env: GCE_API_KEY: ${{ secrets.GCE_API_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }} run: | script -e -c "tox -escrape-and-publish-provider-prices" - name: Verify files can be downloaded # Verify that the permissions are correct and files can be downloaded publicly run: | curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json.sha256 curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json.sha512
name: Publish pricing.json to S3 bucket on: schedule: - cron: '0 13 * * *' - cron: '0 2 * * *' jobs: generate_and_publish_pricing_data: name: Generate and Publish Pricing file to S3 runs-on: ubuntu-latest strategy: matrix: python_version: [3.7] steps: - name: Print Environment Info id: printenv run: | printenv | sort - uses: actions/checkout@master with: fetch-depth: 1 - name: Use Python ${{ matrix.python_version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python_version }} - name: Install Python Dependencies run: | pip install "tox==3.20.1" - name: Generate and publish pricing data env: GCE_API_KEY: ${{ secrets.GCE_API_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }} run: | script -e -c "tox -escrape-and-publish-provider-prices" + + - name: Verify files can be downloaded + # Verify that the permissions are correct and files can be downloaded publicly + run: | + curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json + curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json.sha256 + curl --fail https://libcloud-pricing-data.s3.amazonaws.com/pricing.json.sha512
7
0.166667
7
0
cd1149008598b1f748b996ade452b2b4bab459a7
alias.sh
alias.sh
alias psgr="ps aux | grep -i" # Search running processes for string alias cpp="rsync --progress " # Copy with progress bar, using RSYNC
alias psgr="ps aux | grep -i" # Search running processes for string alias cpp="rsync --progress " # Copy with progress bar, using RSYNC alias ssh="ssh -v " # Make ssh more talkative by default
Make ssh verbose by default
Make ssh verbose by default
Shell
mit
andrewhowdencom/bashrc
shell
## Code Before: alias psgr="ps aux | grep -i" # Search running processes for string alias cpp="rsync --progress " # Copy with progress bar, using RSYNC ## Instruction: Make ssh verbose by default ## Code After: alias psgr="ps aux | grep -i" # Search running processes for string alias cpp="rsync --progress " # Copy with progress bar, using RSYNC alias ssh="ssh -v " # Make ssh more talkative by default
alias psgr="ps aux | grep -i" # Search running processes for string alias cpp="rsync --progress " # Copy with progress bar, using RSYNC + alias ssh="ssh -v " # Make ssh more talkative by default
1
0.5
1
0
279b058752770d44dbd3875b3fb04a549e63708e
setup.cfg
setup.cfg
[bdist_wheel] universal = 1 [metadata] description_file = README.rst
[bdist_wheel] universal = 1 [metadata] description_file = README.rst license = Apache License 2.0
Add License to PyPi metadata
Add License to PyPi metadata Signed-off-by: Scott Miller <625600233cb3bcab32268c17610882e0fdaed295@millergeek.xyz>
INI
apache-2.0
dimaspivak/docker-py,docker/docker-py,kaiyou/docker-py,kaiyou/docker-py,youhong316/docker-py,vpetersson/docker-py,dimaspivak/docker-py,vpetersson/docker-py,youhong316/docker-py,funkyfuture/docker-py,docker/docker-py,funkyfuture/docker-py,vdemeester/docker-py,vdemeester/docker-py
ini
## Code Before: [bdist_wheel] universal = 1 [metadata] description_file = README.rst ## Instruction: Add License to PyPi metadata Signed-off-by: Scott Miller <625600233cb3bcab32268c17610882e0fdaed295@millergeek.xyz> ## Code After: [bdist_wheel] universal = 1 [metadata] description_file = README.rst license = Apache License 2.0
[bdist_wheel] universal = 1 [metadata] description_file = README.rst + license = Apache License 2.0
1
0.2
1
0
e59cb614c55cfc387915cc5356a4b2d5803a6230
app/src/main/java/io/akessler/elixircounter/MainActivity.java
app/src/main/java/io/akessler/elixircounter/MainActivity.java
package io.akessler.elixircounter; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent overlayService = new Intent(this, OverlayService.class); startService(overlayService); finish(); } }
package io.akessler.elixircounter; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { /* Used to handle permission request */ private static final int PERMISSIONS_REQUEST_RECORD_AUDIO = 1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Check if user has given permission to record audio int permissionCheck = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.RECORD_AUDIO); if (permissionCheck != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, PERMISSIONS_REQUEST_RECORD_AUDIO); return; } startOverlayService(); } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (requestCode == PERMISSIONS_REQUEST_RECORD_AUDIO) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { startOverlayService(); } else { finish(); } } } private void startOverlayService() { Intent overlayService = new Intent(this, OverlayService.class); startService(overlayService); finish(); } }
Add permissions check to allow recording audio with mic
Add permissions check to allow recording audio with mic
Java
mit
akkessler/ElixirCounter
java
## Code Before: package io.akessler.elixircounter; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent overlayService = new Intent(this, OverlayService.class); startService(overlayService); finish(); } } ## Instruction: Add permissions check to allow recording audio with mic ## Code After: package io.akessler.elixircounter; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { /* Used to handle permission request */ private static final int PERMISSIONS_REQUEST_RECORD_AUDIO = 1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Check if user has given permission to record audio int permissionCheck = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.RECORD_AUDIO); if (permissionCheck != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, PERMISSIONS_REQUEST_RECORD_AUDIO); return; } startOverlayService(); } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (requestCode == PERMISSIONS_REQUEST_RECORD_AUDIO) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { startOverlayService(); } else { finish(); } } } private void startOverlayService() { Intent overlayService = new Intent(this, OverlayService.class); startService(overlayService); finish(); } }
package io.akessler.elixircounter; + import android.Manifest; import android.content.Intent; + import android.content.pm.PackageManager; import android.os.Bundle; + import android.support.v4.app.ActivityCompat; + import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { + /* Used to handle permission request */ + private static final int PERMISSIONS_REQUEST_RECORD_AUDIO = 1; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + // Check if user has given permission to record audio + int permissionCheck = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.RECORD_AUDIO); + if (permissionCheck != PackageManager.PERMISSION_GRANTED) { + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, PERMISSIONS_REQUEST_RECORD_AUDIO); + return; + } + + startOverlayService(); + } + + @Override + public void onRequestPermissionsResult(int requestCode, + String[] permissions, int[] grantResults) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + + if (requestCode == PERMISSIONS_REQUEST_RECORD_AUDIO) { + if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + startOverlayService(); + } else { + finish(); + } + } + } + + private void startOverlayService() { Intent overlayService = new Intent(this, OverlayService.class); startService(overlayService); finish(); } }
33
2.0625
33
0
509230715bcdbf096c8ae1ef492f0046decce2bc
end-to-end-tests/specs/studyview.spec.js
end-to-end-tests/specs/studyview.spec.js
var assert = require('assert'); var expect = require('chai').expect; var waitForOncoprint = require('./specUtils').waitForOncoprint; var goToUrlAndSetLocalStorage = require('./specUtils').goToUrlAndSetLocalStorage; var waitForNetworkQuiet = require('./specUtils').waitForNetworkQuiet; var assertScreenShotMatch = require('../lib/testUtils').assertScreenShotMatch; const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ""); describe('new study view screenshot test', function(){ before(function(){ var url = `${CBIOPORTAL_URL}/study?id=laml_tcga`; goToUrlAndSetLocalStorage(url); }); it('new study view laml_tcga', function() { browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); it('new study view laml_tcga clinical data clicked', function() { browser.click('.tabAnchor_clinicalData'); browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); });
var assert = require('assert'); var expect = require('chai').expect; var waitForOncoprint = require('./specUtils').waitForOncoprint; var goToUrlAndSetLocalStorage = require('./specUtils').goToUrlAndSetLocalStorage; var waitForNetworkQuiet = require('./specUtils').waitForNetworkQuiet; var assertScreenShotMatch = require('../lib/testUtils').assertScreenShotMatch; const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ""); describe('study view screenshot test', function(){ before(function(){ var url = `${CBIOPORTAL_URL}/study?id=laml_tcga`; goToUrlAndSetLocalStorage(url); }); it('study view laml_tcga', function() { browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); it('study view laml_tcga clinical data clicked', function() { browser.click('.tabAnchor_clinicalData'); browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); });
Include study view screenshot references
Include study view screenshot references Former-commit-id: e016cb052abecda7dc1c0cd1391edac077634e2a
JavaScript
agpl-3.0
cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend
javascript
## Code Before: var assert = require('assert'); var expect = require('chai').expect; var waitForOncoprint = require('./specUtils').waitForOncoprint; var goToUrlAndSetLocalStorage = require('./specUtils').goToUrlAndSetLocalStorage; var waitForNetworkQuiet = require('./specUtils').waitForNetworkQuiet; var assertScreenShotMatch = require('../lib/testUtils').assertScreenShotMatch; const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ""); describe('new study view screenshot test', function(){ before(function(){ var url = `${CBIOPORTAL_URL}/study?id=laml_tcga`; goToUrlAndSetLocalStorage(url); }); it('new study view laml_tcga', function() { browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); it('new study view laml_tcga clinical data clicked', function() { browser.click('.tabAnchor_clinicalData'); browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); }); ## Instruction: Include study view screenshot references Former-commit-id: e016cb052abecda7dc1c0cd1391edac077634e2a ## Code After: var assert = require('assert'); var expect = require('chai').expect; var waitForOncoprint = require('./specUtils').waitForOncoprint; var goToUrlAndSetLocalStorage = require('./specUtils').goToUrlAndSetLocalStorage; var waitForNetworkQuiet = require('./specUtils').waitForNetworkQuiet; var assertScreenShotMatch = require('../lib/testUtils').assertScreenShotMatch; const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ""); describe('study view screenshot test', function(){ before(function(){ var url = `${CBIOPORTAL_URL}/study?id=laml_tcga`; goToUrlAndSetLocalStorage(url); }); it('study view laml_tcga', function() { browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); it('study view laml_tcga clinical data clicked', function() { browser.click('.tabAnchor_clinicalData'); browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); });
var assert = require('assert'); var expect = require('chai').expect; var waitForOncoprint = require('./specUtils').waitForOncoprint; var goToUrlAndSetLocalStorage = require('./specUtils').goToUrlAndSetLocalStorage; var waitForNetworkQuiet = require('./specUtils').waitForNetworkQuiet; var assertScreenShotMatch = require('../lib/testUtils').assertScreenShotMatch; const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, ""); - describe('new study view screenshot test', function(){ ? ---- + describe('study view screenshot test', function(){ before(function(){ var url = `${CBIOPORTAL_URL}/study?id=laml_tcga`; goToUrlAndSetLocalStorage(url); }); - it('new study view laml_tcga', function() { ? ---- + it('study view laml_tcga', function() { browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); - it('new study view laml_tcga clinical data clicked', function() { ? ---- + it('study view laml_tcga clinical data clicked', function() { browser.click('.tabAnchor_clinicalData'); browser.waitForVisible('#mainColumn',10000); waitForNetworkQuiet(); var res = browser.checkElement('#mainColumn', {hide:['.qtip', '#footer-span-version'] }); assertScreenShotMatch(res); }); });
6
0.214286
3
3
a0f9275912d3dfd9edd4e8d0377f04972c919338
lino_book/projects/team/try_people_api.py
lino_book/projects/team/try_people_api.py
import requests from apiclient.discovery import build from lino.api import rt user = rt.models.users.User.objects.get(username='luc') social = user.social_auth.get(provider='google-plus') print(social.provider) response = requests.get( 'https://www.googleapis.com/plus/v1/people/me/people/collection', # 'https://www.googleapis.com/plus/v1/people/me/people/visible', params={'access_token': social.extra_data['access_token']} ) friends = response.json()['items'] print(friends) people_service = build(serviceName='people', version='v1', http=http)
from apiclient.discovery import build from oauth2client.client import OAuth2Credentials from django.conf import settings from datetime import datetime import httplib2 from lino.api import rt user = rt.models.users.User.objects.get(username='8618a3571d8b4237a3e60d25671d8f') social = user.social_auth.get(provider='google-plus') print(social.provider) print (social.extra_data) # response = requests.get( # 'https://www.googleapis.com/plus/v1/people/me/people/collection', # 'https://www.googleapis.com/plus/v1/people/me/people/visible', # params={'access_token': social.extra_data['access_token']} # ) # friends = response.json()['items'] # print(friends) revoke_uri = None user_agent = 'PythonSocialAuth' credentials = OAuth2Credentials( social.extra_data['access_token'], settings.SOCIAL_AUTH_GOOGLE_PLUS_KEY, settings.SOCIAL_AUTH_GOOGLE_PLUS_SECRET, '', datetime.fromtimestamp(social.extra_data['auth_time']), revoke_uri, user_agent, scopes=settings.SOCIAL_AUTH_GOOGLE_PLUS_SCOPE ) http = httplib2.Http() http = credentials.authorize(http) people_service = build(serviceName='people', version='v1', http=http) connections = people_service.people().connections().list( resourceName='people/me', pageSize=10, personFields='names,emailAddresses').execute() # contactToUpdate = people_service.people().get(resourceName=social.extra_data['user_id'],personFields='names,emailAddresses').execute() print (connections)
Make the sample work by retrieving all contacts.
Make the sample work by retrieving all contacts.
Python
unknown
lsaffre/lino_book,khchine5/book,lino-framework/book,lsaffre/lino_book,lino-framework/book,lino-framework/book,lino-framework/book,khchine5/book,khchine5/book,lsaffre/lino_book
python
## Code Before: import requests from apiclient.discovery import build from lino.api import rt user = rt.models.users.User.objects.get(username='luc') social = user.social_auth.get(provider='google-plus') print(social.provider) response = requests.get( 'https://www.googleapis.com/plus/v1/people/me/people/collection', # 'https://www.googleapis.com/plus/v1/people/me/people/visible', params={'access_token': social.extra_data['access_token']} ) friends = response.json()['items'] print(friends) people_service = build(serviceName='people', version='v1', http=http) ## Instruction: Make the sample work by retrieving all contacts. ## Code After: from apiclient.discovery import build from oauth2client.client import OAuth2Credentials from django.conf import settings from datetime import datetime import httplib2 from lino.api import rt user = rt.models.users.User.objects.get(username='8618a3571d8b4237a3e60d25671d8f') social = user.social_auth.get(provider='google-plus') print(social.provider) print (social.extra_data) # response = requests.get( # 'https://www.googleapis.com/plus/v1/people/me/people/collection', # 'https://www.googleapis.com/plus/v1/people/me/people/visible', # params={'access_token': social.extra_data['access_token']} # ) # friends = response.json()['items'] # print(friends) revoke_uri = None user_agent = 'PythonSocialAuth' credentials = OAuth2Credentials( social.extra_data['access_token'], settings.SOCIAL_AUTH_GOOGLE_PLUS_KEY, settings.SOCIAL_AUTH_GOOGLE_PLUS_SECRET, '', datetime.fromtimestamp(social.extra_data['auth_time']), revoke_uri, user_agent, scopes=settings.SOCIAL_AUTH_GOOGLE_PLUS_SCOPE ) http = httplib2.Http() http = credentials.authorize(http) people_service = build(serviceName='people', version='v1', http=http) connections = people_service.people().connections().list( resourceName='people/me', pageSize=10, personFields='names,emailAddresses').execute() # contactToUpdate = people_service.people().get(resourceName=social.extra_data['user_id'],personFields='names,emailAddresses').execute() print (connections)
- import requests from apiclient.discovery import build - + from oauth2client.client import OAuth2Credentials + from django.conf import settings + from datetime import datetime + import httplib2 from lino.api import rt - user = rt.models.users.User.objects.get(username='luc') ? ^^^ + user = rt.models.users.User.objects.get(username='8618a3571d8b4237a3e60d25671d8f') ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ social = user.social_auth.get(provider='google-plus') print(social.provider) + print (social.extra_data) - response = requests.get( + # response = requests.get( ? ++ - 'https://www.googleapis.com/plus/v1/people/me/people/collection', + # 'https://www.googleapis.com/plus/v1/people/me/people/collection', ? ++ - # 'https://www.googleapis.com/plus/v1/people/me/people/visible', ? ---- + # 'https://www.googleapis.com/plus/v1/people/me/people/visible', - params={'access_token': social.extra_data['access_token']} ? ^^^ + # params={'access_token': social.extra_data['access_token']} ? ^ + # ) + # friends = response.json()['items'] + # print(friends) + revoke_uri = None + user_agent = 'PythonSocialAuth' + + credentials = OAuth2Credentials( + social.extra_data['access_token'], + settings.SOCIAL_AUTH_GOOGLE_PLUS_KEY, + settings.SOCIAL_AUTH_GOOGLE_PLUS_SECRET, + '', + datetime.fromtimestamp(social.extra_data['auth_time']), + revoke_uri, + user_agent, + scopes=settings.SOCIAL_AUTH_GOOGLE_PLUS_SCOPE ) - friends = response.json()['items'] - print(friends) + + http = httplib2.Http() + http = credentials.authorize(http) people_service = build(serviceName='people', version='v1', http=http) + connections = people_service.people().connections().list( + resourceName='people/me', + pageSize=10, + personFields='names,emailAddresses').execute() + + # contactToUpdate = people_service.people().get(resourceName=social.extra_data['user_id'],personFields='names,emailAddresses').execute() + print (connections)
44
2.444444
35
9
8581ff969fe31c9b1ed25bf1aaf9f56fc2d764d5
.travis/release.sh
.travis/release.sh
REPO="rollbar/rollbar-java" BRANCH="master" set -ev if [[ "$TRAVIS_REPO_SLUG" != "$REPO" ]]; then echo "Skipping release: wrong repository. Expected '$REPO' but was '$TRAVIS_REPO_SLUG'." elif [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Skipping release. It was pull request." elif [[ "$TRAVIS_BRANCH" != "$BRANCH" ]]; then echo "Skipping release. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." else echo "Doing release..." ./gradlew publish echo "Release done!" fi
REPO="rollbar/rollbar-java" BRANCH="master" set -ev if [[ "$TRAVIS_REPO_SLUG" != "$REPO" ]]; then echo "Skipping release: wrong repository. Expected '$REPO' but was '$TRAVIS_REPO_SLUG'." elif [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Skipping release. It was pull request." elif [[ "$TRAVIS_BRANCH" != "$BRANCH" ]]; then echo "Skipping release. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." else echo "Doing release..." ./gradlew -Dorg.gradle.internal.http.socketTimeout=300000 -Dorg.gradle.internal.http.connectionTimeout=300000 publish echo "Release done!" fi
Increase gradle http.timeouts to avoid errors when publishing
Increase gradle http.timeouts to avoid errors when publishing
Shell
mit
rollbar/rollbar-java,rollbar/rollbar-java,rollbar/rollbar-java
shell
## Code Before: REPO="rollbar/rollbar-java" BRANCH="master" set -ev if [[ "$TRAVIS_REPO_SLUG" != "$REPO" ]]; then echo "Skipping release: wrong repository. Expected '$REPO' but was '$TRAVIS_REPO_SLUG'." elif [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Skipping release. It was pull request." elif [[ "$TRAVIS_BRANCH" != "$BRANCH" ]]; then echo "Skipping release. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." else echo "Doing release..." ./gradlew publish echo "Release done!" fi ## Instruction: Increase gradle http.timeouts to avoid errors when publishing ## Code After: REPO="rollbar/rollbar-java" BRANCH="master" set -ev if [[ "$TRAVIS_REPO_SLUG" != "$REPO" ]]; then echo "Skipping release: wrong repository. Expected '$REPO' but was '$TRAVIS_REPO_SLUG'." elif [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Skipping release. It was pull request." elif [[ "$TRAVIS_BRANCH" != "$BRANCH" ]]; then echo "Skipping release. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." else echo "Doing release..." ./gradlew -Dorg.gradle.internal.http.socketTimeout=300000 -Dorg.gradle.internal.http.connectionTimeout=300000 publish echo "Release done!" fi
REPO="rollbar/rollbar-java" BRANCH="master" set -ev if [[ "$TRAVIS_REPO_SLUG" != "$REPO" ]]; then echo "Skipping release: wrong repository. Expected '$REPO' but was '$TRAVIS_REPO_SLUG'." elif [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then echo "Skipping release. It was pull request." elif [[ "$TRAVIS_BRANCH" != "$BRANCH" ]]; then echo "Skipping release. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." else echo "Doing release..." - ./gradlew publish + ./gradlew -Dorg.gradle.internal.http.socketTimeout=300000 -Dorg.gradle.internal.http.connectionTimeout=300000 publish echo "Release done!" fi
2
0.117647
1
1
fa2aa6448ced4389348ca8b485b86f17dd0dffca
src/scene.js
src/scene.js
/** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__map = map; } get id() { "use strict"; return this._id; } get name() { "use strict"; return this._name; } get map() { "use strict"; return this.__map; } *filter(predicate) { "use strict"; for (let entity of this.entities) { if (predicate(entity)) { yield entity; } } } get entities() { "use strict"; return this.__entities; } addEntity(e) { "use strict"; this.__entities[e.id] = e; } removeEntity(e_id) { "use strict"; delete this.__entities[e_id]; } each(cb, lock, thisArg) { "use strict"; let entities = this.filter((e) => e.has(lock)); let e = entities.next(); while (!e.done) { if (thisArg) { cb.call(thisArg, e.value); } else { cb(e.value); } e = entities.next(); } } }
/** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__map = map; } get id() { "use strict"; return this._id; } get name() { "use strict"; return this._name; } get map() { "use strict"; return this.__map; } *filter(predicate) { "use strict"; for (let entity of this.entities) { if (predicate(entity)) { yield entity; } } } get entities() { "use strict"; return this.__entities; } addEntity(e) { "use strict"; this.__entities[e.id] = e; } removeEntity(e_id) { "use strict"; delete this.__entities[e_id]; } each(cb, lock_or_filter, thisArg) { "use strict"; let filter = (typeof lock_or_filter === 'function') ? lock_or_filter : (e) => e.has(lock_or_filter), entities = this.filter(filter), e = entities.next(); while (!e.done) { if (thisArg) { cb.call(thisArg, e.value); } else { cb(e.value); } e = entities.next(); } } }
Add more flexible entity filter function
Add more flexible entity filter function
JavaScript
mit
FaideWW/thealien,FaideWW/thealien
javascript
## Code Before: /** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__map = map; } get id() { "use strict"; return this._id; } get name() { "use strict"; return this._name; } get map() { "use strict"; return this.__map; } *filter(predicate) { "use strict"; for (let entity of this.entities) { if (predicate(entity)) { yield entity; } } } get entities() { "use strict"; return this.__entities; } addEntity(e) { "use strict"; this.__entities[e.id] = e; } removeEntity(e_id) { "use strict"; delete this.__entities[e_id]; } each(cb, lock, thisArg) { "use strict"; let entities = this.filter((e) => e.has(lock)); let e = entities.next(); while (!e.done) { if (thisArg) { cb.call(thisArg, e.value); } else { cb(e.value); } e = entities.next(); } } } ## Instruction: Add more flexible entity filter function ## Code After: /** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__map = map; } get id() { "use strict"; return this._id; } get name() { "use strict"; return this._name; } get map() { "use strict"; return this.__map; } *filter(predicate) { "use strict"; for (let entity of this.entities) { if (predicate(entity)) { yield entity; } } } get entities() { "use strict"; return this.__entities; } addEntity(e) { "use strict"; this.__entities[e.id] = e; } removeEntity(e_id) { "use strict"; delete this.__entities[e_id]; } each(cb, lock_or_filter, thisArg) { "use strict"; let filter = (typeof lock_or_filter === 'function') ? lock_or_filter : (e) => e.has(lock_or_filter), entities = this.filter(filter), e = entities.next(); while (!e.done) { if (thisArg) { cb.call(thisArg, e.value); } else { cb(e.value); } e = entities.next(); } } }
/** * Created by faide on 4/21/2015. */ export default class Scene { constructor(id = `scene_${Date.now().toString()}`, entities = [], map = null) { "use strict"; this._name = id; this._id = Symbol(this.name); this.__entities = entities; this.__map = map; } get id() { "use strict"; return this._id; } get name() { "use strict"; return this._name; } get map() { "use strict"; return this.__map; } *filter(predicate) { "use strict"; for (let entity of this.entities) { if (predicate(entity)) { yield entity; } } } get entities() { "use strict"; return this.__entities; } addEntity(e) { "use strict"; this.__entities[e.id] = e; } removeEntity(e_id) { "use strict"; delete this.__entities[e_id]; } - each(cb, lock, thisArg) { + each(cb, lock_or_filter, thisArg) { ? ++++++++++ "use strict"; - let entities = this.filter((e) => e.has(lock)); + let filter = (typeof lock_or_filter === 'function') ? lock_or_filter : (e) => e.has(lock_or_filter), + entities = this.filter(filter), - let e = entities.next(); ? ^^^ + e = entities.next(); ? ^^^ while (!e.done) { if (thisArg) { cb.call(thisArg, e.value); } else { cb(e.value); } e = entities.next(); } } }
7
0.097222
4
3
75fbb90e8a2df775d9a33b8147ac10d80f2f8e2d
packages/localstorage/package.js
packages/localstorage/package.js
Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", internal: true }); Package.on_use(function (api) { api.use('jquery', 'client'); // XXX only used for browser detection. remove. api.use('random', 'client'); api.add_files('localstorage.js', 'client'); }); Package.on_test(function (api) { api.use('localstorage', 'client'); api.use('tinytest'); api.add_files('localstorage_tests.js', 'client'); });
Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", internal: true }); Package.on_use(function (api) { api.use('random', 'client'); api.add_files('localstorage.js', 'client'); }); Package.on_test(function (api) { api.use('localstorage', 'client'); api.use('tinytest'); api.add_files('localstorage_tests.js', 'client'); });
Remove localstorage -> jquery dependency
Remove localstorage -> jquery dependency We no longer use jquery for browser detection here.
JavaScript
mit
Profab/meteor,chasertech/meteor,calvintychan/meteor,DCKT/meteor,GrimDerp/meteor,jrudio/meteor,vjau/meteor,bhargav175/meteor,aldeed/meteor,karlito40/meteor,daltonrenaldo/meteor,jrudio/meteor,guazipi/meteor,DAB0mB/meteor,stevenliuit/meteor,ericterpstra/meteor,qscripter/meteor,modulexcite/meteor,cog-64/meteor,jenalgit/meteor,akintoey/meteor,lieuwex/meteor,GrimDerp/meteor,somallg/meteor,steedos/meteor,PatrickMcGuinness/meteor,steedos/meteor,ashwathgovind/meteor,TechplexEngineer/meteor,sunny-g/meteor,ashwathgovind/meteor,calvintychan/meteor,tdamsma/meteor,newswim/meteor,Ken-Liu/meteor,shmiko/meteor,michielvanoeffelen/meteor,mauricionr/meteor,Puena/meteor,yiliaofan/meteor,jeblister/meteor,hristaki/meteor,dev-bobsong/meteor,aramk/meteor,alexbeletsky/meteor,evilemon/meteor,shadedprofit/meteor,JesseQin/meteor,lieuwex/meteor,ericterpstra/meteor,allanalexandre/meteor,neotim/meteor,dboyliao/meteor,yyx990803/meteor,DAB0mB/meteor,benjamn/meteor,Theviajerock/meteor,yonglehou/meteor,nuvipannu/meteor,brettle/meteor,baiyunping333/meteor,codedogfish/meteor,Paulyoufu/meteor-1,tdamsma/meteor,Hansoft/meteor,chinasb/meteor,h200863057/meteor,judsonbsilva/meteor,emmerge/meteor,dandv/meteor,arunoda/meteor,shmiko/meteor,lieuwex/meteor,sclausen/meteor,vacjaliu/meteor,chinasb/meteor,sitexa/meteor,daslicht/meteor,youprofit/meteor,baysao/meteor,sitexa/meteor,wmkcc/meteor,AnjirHossain/meteor,tdamsma/meteor,jeblister/meteor,wmkcc/meteor,mjmasn/meteor,qscripter/meteor,SeanOceanHu/meteor,shrop/meteor,cbonami/meteor,allanalexandre/meteor,skarekrow/meteor,wmkcc/meteor,imanmafi/meteor,kengchau/meteor,PatrickMcGuinness/meteor,chmac/meteor,servel333/meteor,AnthonyAstige/meteor,yyx990803/meteor,lawrenceAIO/meteor,emmerge/meteor,hristaki/meteor,allanalexandre/meteor,juansgaitan/meteor,yinhe007/meteor,karlito40/meteor,hristaki/meteor,Paulyoufu/meteor-1,qscripter/meteor,codingang/meteor,AnthonyAstige/meteor,sclausen/meteor,johnthepink/meteor,cherbst/meteor,dfischer/meteor,zdd910/meteor,DCKT/meteor,brdtrpp/meteor,cbonami/meteor,yonglehou/meteor,HugoRLopes/meteor,chmac/meteor,jenalgit/meteor,zdd910/meteor,skarekrow/meteor,vacjaliu/meteor,vjau/meteor,TribeMedia/meteor,meonkeys/meteor,benjamn/meteor,planet-training/meteor,shrop/meteor,fashionsun/meteor,planet-training/meteor,sclausen/meteor,ljack/meteor,TribeMedia/meteor,chiefninew/meteor,judsonbsilva/meteor,youprofit/meteor,allanalexandre/meteor,williambr/meteor,esteedqueen/meteor,D1no/meteor,mjmasn/meteor,johnthepink/meteor,paul-barry-kenzan/meteor,elkingtonmcb/meteor,devgrok/meteor,dandv/meteor,youprofit/meteor,Puena/meteor,newswim/meteor,cog-64/meteor,yinhe007/meteor,skarekrow/meteor,TechplexEngineer/meteor,Prithvi-A/meteor,Jeremy017/meteor,shrop/meteor,jdivy/meteor,AnthonyAstige/meteor,pandeysoni/meteor,aldeed/meteor,oceanzou123/meteor,chengxiaole/meteor,ljack/meteor,deanius/meteor,saisai/meteor,henrypan/meteor,DAB0mB/meteor,4commerce-technologies-AG/meteor,sitexa/meteor,lawrenceAIO/meteor,lieuwex/meteor,yonas/meteor-freebsd,meonkeys/meteor,brdtrpp/meteor,mauricionr/meteor,yanisIk/meteor,TechplexEngineer/meteor,mirstan/meteor,neotim/meteor,codingang/meteor,rabbyalone/meteor,meonkeys/meteor,qscripter/meteor,alphanso/meteor,TribeMedia/meteor,benstoltz/meteor,juansgaitan/meteor,deanius/meteor,planet-training/meteor,AnjirHossain/meteor,lassombra/meteor,pandeysoni/meteor,mubassirhayat/meteor,mjmasn/meteor,nuvipannu/meteor,rozzzly/meteor,mirstan/meteor,neotim/meteor,Quicksteve/meteor,yonas/meteor-freebsd,lieuwex/meteor,aramk/meteor,sdeveloper/meteor,deanius/meteor,michielvanoeffelen/meteor,katopz/meteor,evilemon/meteor,dev-bobsong/meteor,devgrok/meteor,ericterpstra/meteor,kidaa/meteor,yiliaofan/meteor,lassombra/meteor,IveWong/meteor,brdtrpp/meteor,Quicksteve/meteor,dboyliao/meteor,pjump/meteor,Urigo/meteor,aramk/meteor,queso/meteor,kengchau/meteor,katopz/meteor,SeanOceanHu/meteor,juansgaitan/meteor,pjump/meteor,sunny-g/meteor,dfischer/meteor,msavin/meteor,baysao/meteor,servel333/meteor,nuvipannu/meteor,yonglehou/meteor,yyx990803/meteor,Profab/meteor,dboyliao/meteor,sitexa/meteor,benjamn/meteor,cog-64/meteor,chinasb/meteor,jdivy/meteor,alphanso/meteor,chengxiaole/meteor,aleclarson/meteor,esteedqueen/meteor,jenalgit/meteor,servel333/meteor,paul-barry-kenzan/meteor,alexbeletsky/meteor,codedogfish/meteor,yanisIk/meteor,AnthonyAstige/meteor,jdivy/meteor,tdamsma/meteor,johnthepink/meteor,shadedprofit/meteor,AnjirHossain/meteor,codedogfish/meteor,AlexR1712/meteor,Theviajerock/meteor,elkingtonmcb/meteor,Quicksteve/meteor,IveWong/meteor,jenalgit/meteor,vacjaliu/meteor,cherbst/meteor,youprofit/meteor,sdeveloper/meteor,tdamsma/meteor,vacjaliu/meteor,queso/meteor,chiefninew/meteor,DAB0mB/meteor,modulexcite/meteor,jirengu/meteor,modulexcite/meteor,jeblister/meteor,mubassirhayat/meteor,rabbyalone/meteor,EduShareOntario/meteor,msavin/meteor,namho102/meteor,guazipi/meteor,saisai/meteor,SeanOceanHu/meteor,bhargav175/meteor,jagi/meteor,Jeremy017/meteor,jg3526/meteor,sdeveloper/meteor,williambr/meteor,shadedprofit/meteor,baiyunping333/meteor,Eynaliyev/meteor,dfischer/meteor,eluck/meteor,Jeremy017/meteor,shadedprofit/meteor,esteedqueen/meteor,msavin/meteor,LWHTarena/meteor,AnjirHossain/meteor,baiyunping333/meteor,chasertech/meteor,juansgaitan/meteor,chengxiaole/meteor,sunny-g/meteor,justintung/meteor,JesseQin/meteor,queso/meteor,calvintychan/meteor,karlito40/meteor,pandeysoni/meteor,judsonbsilva/meteor,lawrenceAIO/meteor,justintung/meteor,mirstan/meteor,aldeed/meteor,tdamsma/meteor,4commerce-technologies-AG/meteor,shadedprofit/meteor,cbonami/meteor,LWHTarena/meteor,Paulyoufu/meteor-1,yanisIk/meteor,daslicht/meteor,oceanzou123/meteor,mirstan/meteor,aramk/meteor,servel333/meteor,DAB0mB/meteor,sclausen/meteor,ashwathgovind/meteor,AnthonyAstige/meteor,benstoltz/meteor,neotim/meteor,HugoRLopes/meteor,calvintychan/meteor,colinligertwood/meteor,baysao/meteor,whip112/meteor,HugoRLopes/meteor,Urigo/meteor,skarekrow/meteor,sitexa/meteor,sdeveloper/meteor,chmac/meteor,Quicksteve/meteor,sclausen/meteor,lpinto93/meteor,ericterpstra/meteor,shmiko/meteor,ericterpstra/meteor,l0rd0fwar/meteor,pjump/meteor,elkingtonmcb/meteor,Eynaliyev/meteor,baiyunping333/meteor,GrimDerp/meteor,colinligertwood/meteor,planet-training/meteor,somallg/meteor,udhayam/meteor,arunoda/meteor,dev-bobsong/meteor,AlexR1712/meteor,joannekoong/meteor,chiefninew/meteor,Jonekee/meteor,modulexcite/meteor,stevenliuit/meteor,colinligertwood/meteor,emmerge/meteor,saisai/meteor,Jonekee/meteor,esteedqueen/meteor,brettle/meteor,wmkcc/meteor,allanalexandre/meteor,D1no/meteor,sclausen/meteor,mubassirhayat/meteor,karlito40/meteor,devgrok/meteor,dboyliao/meteor,chmac/meteor,emmerge/meteor,imanmafi/meteor,cog-64/meteor,JesseQin/meteor,benstoltz/meteor,colinligertwood/meteor,cherbst/meteor,JesseQin/meteor,yonglehou/meteor,yalexx/meteor,lassombra/meteor,justintung/meteor,chinasb/meteor,devgrok/meteor,stevenliuit/meteor,yonas/meteor-freebsd,Hansoft/meteor,Quicksteve/meteor,TribeMedia/meteor,pjump/meteor,mubassirhayat/meteor,IveWong/meteor,oceanzou123/meteor,GrimDerp/meteor,fashionsun/meteor,Theviajerock/meteor,vacjaliu/meteor,stevenliuit/meteor,TribeMedia/meteor,alexbeletsky/meteor,D1no/meteor,calvintychan/meteor,judsonbsilva/meteor,alphanso/meteor,AnjirHossain/meteor,framewr/meteor,Jeremy017/meteor,karlito40/meteor,chengxiaole/meteor,newswim/meteor,henrypan/meteor,D1no/meteor,Ken-Liu/meteor,Ken-Liu/meteor,chengxiaole/meteor,daltonrenaldo/meteor,framewr/meteor,jeblister/meteor,rozzzly/meteor,ndarilek/meteor,meteor-velocity/meteor,deanius/meteor,h200863057/meteor,jrudio/meteor,arunoda/meteor,Quicksteve/meteor,shmiko/meteor,dfischer/meteor,oceanzou123/meteor,cbonami/meteor,luohuazju/meteor,akintoey/meteor,vjau/meteor,arunoda/meteor,luohuazju/meteor,ashwathgovind/meteor,yonglehou/meteor,lorensr/meteor,zdd910/meteor,elkingtonmcb/meteor,LWHTarena/meteor,justintung/meteor,Hansoft/meteor,allanalexandre/meteor,newswim/meteor,stevenliuit/meteor,dandv/meteor,TribeMedia/meteor,chmac/meteor,Puena/meteor,Prithvi-A/meteor,chiefninew/meteor,imanmafi/meteor,colinligertwood/meteor,codingang/meteor,katopz/meteor,chasertech/meteor,HugoRLopes/meteor,PatrickMcGuinness/meteor,kencheung/meteor,lawrenceAIO/meteor,ndarilek/meteor,aldeed/meteor,AnthonyAstige/meteor,somallg/meteor,Prithvi-A/meteor,dandv/meteor,jagi/meteor,meteor-velocity/meteor,johnthepink/meteor,lpinto93/meteor,alexbeletsky/meteor,rabbyalone/meteor,iman-mafi/meteor,evilemon/meteor,alexbeletsky/meteor,yonas/meteor-freebsd,hristaki/meteor,framewr/meteor,luohuazju/meteor,daslicht/meteor,meonkeys/meteor,zdd910/meteor,shrop/meteor,kengchau/meteor,michielvanoeffelen/meteor,Eynaliyev/meteor,chinasb/meteor,skarekrow/meteor,katopz/meteor,steedos/meteor,youprofit/meteor,LWHTarena/meteor,D1no/meteor,iman-mafi/meteor,codingang/meteor,jg3526/meteor,msavin/meteor,daslicht/meteor,Urigo/meteor,akintoey/meteor,servel333/meteor,juansgaitan/meteor,imanmafi/meteor,oceanzou123/meteor,codingang/meteor,jrudio/meteor,lassombra/meteor,michielvanoeffelen/meteor,papimomi/meteor,neotim/meteor,sunny-g/meteor,yinhe007/meteor,dboyliao/meteor,chengxiaole/meteor,daltonrenaldo/meteor,jirengu/meteor,yyx990803/meteor,ndarilek/meteor,stevenliuit/meteor,D1no/meteor,jg3526/meteor,jg3526/meteor,fashionsun/meteor,mubassirhayat/meteor,ericterpstra/meteor,arunoda/meteor,Paulyoufu/meteor-1,Prithvi-A/meteor,somallg/meteor,henrypan/meteor,evilemon/meteor,jagi/meteor,steedos/meteor,AlexR1712/meteor,lawrenceAIO/meteor,udhayam/meteor,henrypan/meteor,elkingtonmcb/meteor,brdtrpp/meteor,alphanso/meteor,Theviajerock/meteor,joannekoong/meteor,dandv/meteor,mubassirhayat/meteor,whip112/meteor,rabbyalone/meteor,baysao/meteor,ljack/meteor,brdtrpp/meteor,skarekrow/meteor,planet-training/meteor,bhargav175/meteor,guazipi/meteor,vjau/meteor,DCKT/meteor,chmac/meteor,Paulyoufu/meteor-1,planet-training/meteor,meteor-velocity/meteor,namho102/meteor,jeblister/meteor,eluck/meteor,AlexR1712/meteor,D1no/meteor,emmerge/meteor,newswim/meteor,daltonrenaldo/meteor,rozzzly/meteor,dev-bobsong/meteor,papimomi/meteor,emmerge/meteor,imanmafi/meteor,baiyunping333/meteor,codingang/meteor,esteedqueen/meteor,kengchau/meteor,lieuwex/meteor,saisai/meteor,l0rd0fwar/meteor,evilemon/meteor,namho102/meteor,arunoda/meteor,Ken-Liu/meteor,PatrickMcGuinness/meteor,h200863057/meteor,kidaa/meteor,GrimDerp/meteor,benjamn/meteor,yonas/meteor-freebsd,saisai/meteor,jg3526/meteor,cbonami/meteor,jagi/meteor,bhargav175/meteor,lawrenceAIO/meteor,pandeysoni/meteor,Paulyoufu/meteor-1,devgrok/meteor,Prithvi-A/meteor,baiyunping333/meteor,h200863057/meteor,zdd910/meteor,papimomi/meteor,akintoey/meteor,elkingtonmcb/meteor,youprofit/meteor,evilemon/meteor,l0rd0fwar/meteor,colinligertwood/meteor,cherbst/meteor,yinhe007/meteor,aleclarson/meteor,AnthonyAstige/meteor,alexbeletsky/meteor,akintoey/meteor,mauricionr/meteor,chengxiaole/meteor,nuvipannu/meteor,servel333/meteor,vjau/meteor,Jonekee/meteor,TechplexEngineer/meteor,lpinto93/meteor,vacjaliu/meteor,benstoltz/meteor,luohuazju/meteor,meonkeys/meteor,yanisIk/meteor,shrop/meteor,benjamn/meteor,kidaa/meteor,devgrok/meteor,cherbst/meteor,DCKT/meteor,l0rd0fwar/meteor,jagi/meteor,ljack/meteor,Profab/meteor,chiefninew/meteor,dev-bobsong/meteor,sdeveloper/meteor,Eynaliyev/meteor,codedogfish/meteor,cbonami/meteor,Jeremy017/meteor,williambr/meteor,paul-barry-kenzan/meteor,ndarilek/meteor,Jonekee/meteor,newswim/meteor,ndarilek/meteor,meteor-velocity/meteor,aramk/meteor,whip112/meteor,sclausen/meteor,lorensr/meteor,cog-64/meteor,jirengu/meteor,hristaki/meteor,HugoRLopes/meteor,jagi/meteor,zdd910/meteor,baysao/meteor,ljack/meteor,chiefninew/meteor,brettle/meteor,williambr/meteor,benjamn/meteor,paul-barry-kenzan/meteor,chasertech/meteor,yalexx/meteor,AlexR1712/meteor,PatrickMcGuinness/meteor,namho102/meteor,steedos/meteor,bhargav175/meteor,eluck/meteor,sunny-g/meteor,l0rd0fwar/meteor,ljack/meteor,pjump/meteor,aldeed/meteor,pjump/meteor,DCKT/meteor,queso/meteor,Eynaliyev/meteor,williambr/meteor,chasertech/meteor,namho102/meteor,yinhe007/meteor,tdamsma/meteor,jenalgit/meteor,deanius/meteor,yiliaofan/meteor,SeanOceanHu/meteor,brdtrpp/meteor,mirstan/meteor,udhayam/meteor,IveWong/meteor,yiliaofan/meteor,DAB0mB/meteor,justintung/meteor,TechplexEngineer/meteor,4commerce-technologies-AG/meteor,somallg/meteor,Theviajerock/meteor,daltonrenaldo/meteor,saisai/meteor,jeblister/meteor,yonas/meteor-freebsd,calvintychan/meteor,yanisIk/meteor,Urigo/meteor,Ken-Liu/meteor,AnjirHossain/meteor,kencheung/meteor,4commerce-technologies-AG/meteor,queso/meteor,yalexx/meteor,Ken-Liu/meteor,dfischer/meteor,TribeMedia/meteor,queso/meteor,yinhe007/meteor,msavin/meteor,deanius/meteor,eluck/meteor,guazipi/meteor,oceanzou123/meteor,chinasb/meteor,Profab/meteor,planet-training/meteor,evilemon/meteor,mjmasn/meteor,mjmasn/meteor,IveWong/meteor,rozzzly/meteor,yanisIk/meteor,Jonekee/meteor,yalexx/meteor,daslicht/meteor,jg3526/meteor,henrypan/meteor,mauricionr/meteor,jrudio/meteor,Ken-Liu/meteor,lieuwex/meteor,udhayam/meteor,esteedqueen/meteor,dboyliao/meteor,yinhe007/meteor,fashionsun/meteor,udhayam/meteor,Profab/meteor,qscripter/meteor,yyx990803/meteor,judsonbsilva/meteor,aleclarson/meteor,daslicht/meteor,paul-barry-kenzan/meteor,katopz/meteor,luohuazju/meteor,somallg/meteor,zdd910/meteor,ashwathgovind/meteor,karlito40/meteor,dfischer/meteor,PatrickMcGuinness/meteor,Urigo/meteor,rozzzly/meteor,jg3526/meteor,meteor-velocity/meteor,l0rd0fwar/meteor,yonglehou/meteor,brettle/meteor,baiyunping333/meteor,shmiko/meteor,arunoda/meteor,rozzzly/meteor,brettle/meteor,EduShareOntario/meteor,benjamn/meteor,michielvanoeffelen/meteor,jdivy/meteor,iman-mafi/meteor,wmkcc/meteor,pjump/meteor,4commerce-technologies-AG/meteor,EduShareOntario/meteor,eluck/meteor,lpinto93/meteor,codedogfish/meteor,allanalexandre/meteor,Theviajerock/meteor,kidaa/meteor,Eynaliyev/meteor,kengchau/meteor,PatrickMcGuinness/meteor,guazipi/meteor,kencheung/meteor,alexbeletsky/meteor,yalexx/meteor,cog-64/meteor,DAB0mB/meteor,GrimDerp/meteor,udhayam/meteor,fashionsun/meteor,AnthonyAstige/meteor,williambr/meteor,qscripter/meteor,kencheung/meteor,chasertech/meteor,servel333/meteor,l0rd0fwar/meteor,meonkeys/meteor,Puena/meteor,skarekrow/meteor,ndarilek/meteor,AlexR1712/meteor,kidaa/meteor,codedogfish/meteor,SeanOceanHu/meteor,servel333/meteor,EduShareOntario/meteor,msavin/meteor,lorensr/meteor,yiliaofan/meteor,SeanOceanHu/meteor,vjau/meteor,IveWong/meteor,papimomi/meteor,lorensr/meteor,pandeysoni/meteor,framewr/meteor,papimomi/meteor,benstoltz/meteor,williambr/meteor,ndarilek/meteor,joannekoong/meteor,Theviajerock/meteor,chiefninew/meteor,neotim/meteor,HugoRLopes/meteor,JesseQin/meteor,baysao/meteor,namho102/meteor,yanisIk/meteor,mauricionr/meteor,kencheung/meteor,cherbst/meteor,chinasb/meteor,shmiko/meteor,neotim/meteor,EduShareOntario/meteor,jirengu/meteor,codedogfish/meteor,mubassirhayat/meteor,SeanOceanHu/meteor,lorensr/meteor,lassombra/meteor,lawrenceAIO/meteor,michielvanoeffelen/meteor,ashwathgovind/meteor,steedos/meteor,jagi/meteor,yalexx/meteor,jdivy/meteor,mirstan/meteor,TechplexEngineer/meteor,ljack/meteor,Urigo/meteor,daltonrenaldo/meteor,aldeed/meteor,codingang/meteor,iman-mafi/meteor,papimomi/meteor,newswim/meteor,chmac/meteor,SeanOceanHu/meteor,allanalexandre/meteor,brettle/meteor,cog-64/meteor,aramk/meteor,4commerce-technologies-AG/meteor,Profab/meteor,pandeysoni/meteor,stevenliuit/meteor,lassombra/meteor,henrypan/meteor,benstoltz/meteor,juansgaitan/meteor,oceanzou123/meteor,dfischer/meteor,yyx990803/meteor,pandeysoni/meteor,aldeed/meteor,hristaki/meteor,baysao/meteor,jdivy/meteor,dboyliao/meteor,johnthepink/meteor,modulexcite/meteor,LWHTarena/meteor,h200863057/meteor,judsonbsilva/meteor,alphanso/meteor,mauricionr/meteor,rabbyalone/meteor,esteedqueen/meteor,kencheung/meteor,udhayam/meteor,colinligertwood/meteor,Prithvi-A/meteor,LWHTarena/meteor,queso/meteor,daltonrenaldo/meteor,juansgaitan/meteor,GrimDerp/meteor,vjau/meteor,brdtrpp/meteor,HugoRLopes/meteor,lpinto93/meteor,lpinto93/meteor,youprofit/meteor,ericterpstra/meteor,cbonami/meteor,Hansoft/meteor,whip112/meteor,rabbyalone/meteor,sunny-g/meteor,yiliaofan/meteor,h200863057/meteor,emmerge/meteor,dandv/meteor,lassombra/meteor,henrypan/meteor,ljack/meteor,Profab/meteor,Jonekee/meteor,Puena/meteor,alphanso/meteor,judsonbsilva/meteor,iman-mafi/meteor,Hansoft/meteor,Paulyoufu/meteor-1,iman-mafi/meteor,jenalgit/meteor,steedos/meteor,jirengu/meteor,Puena/meteor,DCKT/meteor,msavin/meteor,chasertech/meteor,joannekoong/meteor,guazipi/meteor,dev-bobsong/meteor,justintung/meteor,Puena/meteor,lorensr/meteor,meonkeys/meteor,wmkcc/meteor,whip112/meteor,4commerce-technologies-AG/meteor,somallg/meteor,deanius/meteor,DCKT/meteor,johnthepink/meteor,kengchau/meteor,meteor-velocity/meteor,justintung/meteor,eluck/meteor,modulexcite/meteor,shrop/meteor,JesseQin/meteor,mjmasn/meteor,kengchau/meteor,daslicht/meteor,tdamsma/meteor,wmkcc/meteor,mauricionr/meteor,jirengu/meteor,brettle/meteor,jeblister/meteor,sunny-g/meteor,luohuazju/meteor,Eynaliyev/meteor,hristaki/meteor,dev-bobsong/meteor,D1no/meteor,sitexa/meteor,jenalgit/meteor,qscripter/meteor,yiliaofan/meteor,Eynaliyev/meteor,dboyliao/meteor,TechplexEngineer/meteor,rabbyalone/meteor,Prithvi-A/meteor,eluck/meteor,yyx990803/meteor,shrop/meteor,michielvanoeffelen/meteor,iman-mafi/meteor,ashwathgovind/meteor,saisai/meteor,modulexcite/meteor,benstoltz/meteor,fashionsun/meteor,papimomi/meteor,elkingtonmcb/meteor,mjmasn/meteor,devgrok/meteor,kidaa/meteor,planet-training/meteor,guazipi/meteor,yonglehou/meteor,paul-barry-kenzan/meteor,JesseQin/meteor,h200863057/meteor,EduShareOntario/meteor,Quicksteve/meteor,daltonrenaldo/meteor,LWHTarena/meteor,sdeveloper/meteor,sitexa/meteor,mubassirhayat/meteor,Hansoft/meteor,aramk/meteor,HugoRLopes/meteor,Jonekee/meteor,whip112/meteor,sdeveloper/meteor,paul-barry-kenzan/meteor,yalexx/meteor,AlexR1712/meteor,chiefninew/meteor,jirengu/meteor,bhargav175/meteor,Hansoft/meteor,AnjirHossain/meteor,calvintychan/meteor,bhargav175/meteor,lorensr/meteor,joannekoong/meteor,IveWong/meteor,rozzzly/meteor,Urigo/meteor,akintoey/meteor,lpinto93/meteor,alexbeletsky/meteor,akintoey/meteor,johnthepink/meteor,nuvipannu/meteor,framewr/meteor,fashionsun/meteor,Jeremy017/meteor,joannekoong/meteor,katopz/meteor,framewr/meteor,yonas/meteor-freebsd,yanisIk/meteor,namho102/meteor,eluck/meteor,dandv/meteor,joannekoong/meteor,imanmafi/meteor,katopz/meteor,karlito40/meteor,alphanso/meteor,nuvipannu/meteor,karlito40/meteor,sunny-g/meteor,somallg/meteor,shadedprofit/meteor,ndarilek/meteor,meteor-velocity/meteor,nuvipannu/meteor,whip112/meteor,jrudio/meteor,framewr/meteor,Jeremy017/meteor,mirstan/meteor,EduShareOntario/meteor,cherbst/meteor,imanmafi/meteor,kencheung/meteor,brdtrpp/meteor,jdivy/meteor,luohuazju/meteor,vacjaliu/meteor,shadedprofit/meteor,shmiko/meteor,kidaa/meteor
javascript
## Code Before: Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", internal: true }); Package.on_use(function (api) { api.use('jquery', 'client'); // XXX only used for browser detection. remove. api.use('random', 'client'); api.add_files('localstorage.js', 'client'); }); Package.on_test(function (api) { api.use('localstorage', 'client'); api.use('tinytest'); api.add_files('localstorage_tests.js', 'client'); }); ## Instruction: Remove localstorage -> jquery dependency We no longer use jquery for browser detection here. ## Code After: Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", internal: true }); Package.on_use(function (api) { api.use('random', 'client'); api.add_files('localstorage.js', 'client'); }); Package.on_test(function (api) { api.use('localstorage', 'client'); api.use('tinytest'); api.add_files('localstorage_tests.js', 'client'); });
Package.describe({ summary: "Simulates local storage on IE 6,7 using userData", internal: true }); Package.on_use(function (api) { - api.use('jquery', 'client'); // XXX only used for browser detection. remove. api.use('random', 'client'); api.add_files('localstorage.js', 'client'); }); Package.on_test(function (api) { api.use('localstorage', 'client'); api.use('tinytest'); api.add_files('localstorage_tests.js', 'client'); });
1
0.055556
0
1
5cea3e576dfc2a0d01a44b647bbd1c14a202d9e3
spec/requests/atom/dashboard_spec.rb
spec/requests/atom/dashboard_spec.rb
require 'spec_helper' describe "Dashboard Feed" do describe "GET /" do let!(:user) { Factory :user } context "projects atom feed via private token" do it "should render projects atom feed" do visit dashboard_path(:atom, private_token: user.private_token) page.body.should have_selector("feed title") end end context "projects page via private token" do it "should redirect to login page" do visit dashboard_path(private_token: user.private_token) current_path.should == new_user_session_path end end end end
require 'spec_helper' describe "Dashboard Feed" do describe "GET /" do let!(:user) { Factory :user } context "projects atom feed via private token" do it "should render projects atom feed" do visit dashboard_path(:atom, private_token: user.private_token) page.body.should have_selector("feed title") end end end end
Remove atom Dashboard spec that no longer applies
Remove atom Dashboard spec that no longer applies
Ruby
mit
bigsurge/gitlabhq,SkyWei/gitlabhq,DanielZhangQingLong/gitlabhq,fgbreel/gitlabhq,revaret/gitlabhq,ArthurHoaro/Public-GitLab,whluwit/gitlabhq,Burick/gitlabhq,adaiguoguo/gitlab_globalserarch,yfaizal/gitlabhq,fantasywind/gitlabhq,Datacom/gitlabhq,jairzh/gitlabhq-sfdc,mente/gitlabhq,Soullivaneuh/gitlabhq,copystudy/gitlabhq,folpindo/gitlabhq,dyon/gitlab,MauriceMohlek/gitlabhq,k4zzk/gitlabhq,axilleas/gitlabhq,Keystion/gitlabhq,riyad/gitlabhq,bbodenmiller/gitlabhq,lbt/gitlabhq,revaret/gitlabhq,kotaro-dev/gitlab-6-9,bozaro/gitlabhq,louahola/gitlabhq,martijnvermaat/gitlabhq,rfeese/gitlab-ce,flashbuckets/gitlabhq,allysonbarros/gitlabhq,shinexiao/gitlabhq,MauriceMohlek/gitlabhq,theodi/gitlabhq,8thcolor/rubyconfau2015-sadr,zrbsprite/gitlabhq,ikappas/gitlabhq,H3Chief/gitlabhq,sakishum/gitlabhq,bigsurge/gitlabhq,mr-dxdy/gitlabhq,LytayTOUCH/gitlabhq,Kambda/mobbr-gitlabhq,ayufan/gitlabhq,manfer/gitlabhq,pkallberg/tjenare,stanhu/gitlabhq,MauriceMohlek/gitlabhq,luzhongyang/gitlabhq,vjustov/gitlabhq,Telekom-PD/gitlabhq,kemenaran/gitlabhq,yonglehou/gitlabhq,martijnvermaat/gitlabhq,bozaro/gitlabhq,screenpages/gitlabhq,nguyen-tien-mulodo/gitlabhq,WSDC-NITWarangal/gitlabhq,sue445/gitlabhq,pulkit21/gitlabhq,yfaizal/gitlabhq,hzy001/gitlabhq,michaKFromParis/sparkslab,Kambda/Mobbr,Tyrael/gitlabhq,ibiart/gitlabhq,ttasanen/gitlabhq,chadyred/gitlabhq,yulchitaj/TEST3,jaepyoung/gitlabhq,chrrrles/nodeflab,nuecho/gitlabhq,NARKOZ/gitlabhq,mmkassem/gitlabhq,stellamiranda/mobbr-gitlabhq,chenrui2014/gitlabhq,Telekom-PD/gitlabhq,michaKFromParis/sparkslab,johnmyqin/gitlabhq,dwrensha/gitlabhq,liyakun/gitlabhq,ayufan/gitlabhq,michaKFromParis/gitlabhq,per-garden/gitlabhq,pkallberg/tjenare,pupaxxo/gitlabhq,initiummedia/gitlabhq,SVArago/gitlabhq,atomaka/gitlabhq,neiljbrookes/glab,aaronsnyder/gitlabhq,sekcheong/gitlabhq,yulchitaj/TEST3,fscherwi/gitlabhq,chadyred/gitlabhq,yuyue2013/ss,wangcan2014/gitlabhq,stoplightio/gitlabhq,bigsurge/gitlabhq,copystudy/gitlabhq,sonalkr132/gitlabhq,nuecho/gitlabhq,screenpages/gitlabhq,LytayTOUCH/gitlabhq,iiet/iiet-git,theodi/gitlabhq,Exeia/gitlabhq,sideci-sample/sideci-sample-gitlabhq,chadyred/gitlabhq,pkgr/gitlabhq,jirutka/gitlabhq,jrjang/gitlab-ce,yatish27/gitlabhq,aaronsnyder/gitlabhq,jaepyoung/gitlabhq,fantasywind/gitlabhq,rhels/gitlabhq,Kambda/Mobbr,stanhu/gitlabhq,fearenales/gitlabhq,jirutka/gitlabhq,jrjang/gitlabhq,tim-hoff/gitlabhq,nuecho/gitlabhq,darkrasid/gitlabhq,WSDC-NITWarangal/gitlabhq,sue445/gitlabhq,since2014/gitlabhq,sue445/gitlabhq,riyad/gitlabhq,daiyu/gitlab-zh,jvanbaarsen/gitlabhq,yama07/gitlabhq,dukex/gitlabhq,icedwater/gitlabhq,cinderblock/gitlabhq,iiet/iiet-git,Kambda/Mobbr,youprofit/gitlabhq,mavimo/gitlabhq,H3Chief/gitlabhq,mrb/gitlabhq,stanhu/gitlabhq,SkyWei/gitlabhq,folpindo/gitlabhq,rfeese/gitlab-ce,theonlydoo/gitlabhq,rebecamendez/gitlabhq,initiummedia/gitlabhq,yfaizal/gitlabhq,theodi/gitlabhq,Burick/gitlabhq,dyon/gitlab,ngpestelos/gitlabhq,stoplightio/gitlabhq,childbamboo/gitlabhq,jairzh/gitlabhq-sfdc,OtkurBiz/gitlabhq,Datacom/gitlabhq,Exeia/gitlabhq,liyakun/gitlabhq,michaKFromParis/gitlabhqold,yuyue2013/ss,k4zzk/gitlabhq,1ed/gitlabhq,8thcolor/eurucamp2014-htdsadr,LUMC/gitlabhq,kemenaran/gitlabhq,windymid/test2,jvanbaarsen/gitlabhq,zBMNForks/gitlabhq,salipro4ever/gitlabhq,ngpestelos/gitlabhq,dvrylc/gitlabhq,Soullivaneuh/gitlabhq,cui-liqiang/gitlab-ce,chenrui2014/gitlabhq,stoplightio/gitlabhq,tempbottle/gitlabhq,screenpages/gitlabhq,cui-liqiang/gitlab-ce,dvrylc/gitlabhq,fendoudeqingchunhh/gitlabhq,ayufan/gitlabhq,fpgentil/gitlabhq,ksoichiro/gitlabhq,theonlydoo/gitlabhq,ferdinandrosario/gitlabhq,it33/gitlabhq,Devin001/gitlabhq,cinderblock/gitlabhq,jairzh/gitlabhq-sfdc,yfaizal/gitlabhq,pjknkda/gitlabhq,mente/gitlabhq,k4zzk/gitlabhq,darkrasid/gitlabhq,julianengel/gitlabhq,openwide-java/gitlabhq,Soullivaneuh/gitlabhq,mente/gitlabhq,yatish27/gitlabhq,rebecamendez/gitlabhq,koreamic/gitlabhq,jaepyoung/gitlabhq,fendoudeqingchunhh/gitlabhq,WSDC-NITWarangal/gitlabhq,dplarson/gitlabhq,t-zuehlsdorff/gitlabhq,0x20h/gitlabhq,inetfuture/gitlab-tweak,fantasywind/gitlabhq,flashbuckets/gitlabhq,hacsoc/gitlabhq,fpgentil/gitlabhq,tim-hoff/gitlabhq,OtkurBiz/gitlabhq,adaiguoguo/gitlab_globalserarch,nmav/gitlabhq,flashbuckets/gitlabhq,flashbuckets/gitlabhq,t-zuehlsdorff/gitlabhq,mr-dxdy/gitlabhq,ngpestelos/gitlabhq,bozaro/gitlabhq,luzhongyang/gitlabhq,cncodog/gitlab,jrjang/gitlabhq,mmkassem/gitlabhq,8thcolor/testing-public-gitlabhq,daiyu/gitlab-zh,pulkit21/gitlabhq,LytayTOUCH/gitlabhq,mrb/gitlabhq,szechyjs/gitlabhq,sekcheong/gitlabhq,hzy001/gitlabhq,openwide-java/gitlabhq,fendoudeqingchunhh/gitlabhq,LytayTOUCH/gitlabhq,kitech/gitlabhq,yonglehou/gitlabhq,cinderblock/gitlabhq,pupaxxo/gitlabhq,mrb/gitlabhq,allistera/gitlabhq,copystudy/gitlabhq,luzhongyang/gitlabhq,dyon/gitlab,iiet/iiet-git,koreamic/gitlabhq,LUMC/gitlabhq,Telekom-PD/gitlabhq,allysonbarros/gitlabhq,ordiychen/gitlabhq,lvfeng1130/gitlabhq,Soullivaneuh/gitlabhq,sekcheong/gitlabhq,NARKOZ/gitlabhq,since2014/gitlabhq,NuLL3rr0r/gitlabhq,fscherwi/gitlabhq,revaret/gitlabhq,hacsoc/gitlabhq,jrjang/gitlabhq,icedwater/gitlabhq,sekcheong/gitlabhq,rumpelsepp/gitlabhq,larryli/gitlabhq,rumpelsepp/gitlabhq,mavimo/gitlabhq,ferdinandrosario/gitlabhq,SVArago/gitlabhq,delkyd/gitlabhq,rfeese/gitlab-ce,nguyen-tien-mulodo/gitlabhq,bbodenmiller/gitlabhq,ksoichiro/gitlabhq,it33/gitlabhq,jirutka/gitlabhq,vjustov/gitlabhq,NuLL3rr0r/gitlabhq,lvfeng1130/gitlabhq,whluwit/gitlabhq,kotaro-dev/gitlab-6-9,childbamboo/gitlabhq,mente/gitlabhq,fgbreel/gitlabhq,folpindo/gitlabhq,0x20h/gitlabhq,k4zzk/gitlabhq,mathstuf/gitlabhq,liyakun/gitlabhq,betabot7/gitlabhq,youprofit/gitlabhq,sakishum/gitlabhq,bladealslayer/gitlabhq,ordiychen/gitlabhq,cncodog/gitlab,pjknkda/gitlabhq,ibiart/gitlabhq,michaKFromParis/gitlabhq,atomaka/gitlabhq,yama07/gitlabhq,daiyu/gitlab-zh,OtkurBiz/gitlabhq,akumetsuv/gitlab,8thcolor/eurucamp2014-htdsadr,123Haynes/gitlabhq,salipro4ever/gitlabhq,gorgee/gitlabhq,WSDC-NITWarangal/gitlabhq,ikappas/gitlabhq,martijnvermaat/gitlabhq,OlegGirko/gitlab-ce,manfer/gitlabhq,martinma4/gitlabhq,NuLL3rr0r/gitlabhq,fscherwi/gitlabhq,duduribeiro/gitlabhq,rfeese/gitlab-ce,ArthurHoaro/Public-GitLab,yama07/gitlabhq,bbodenmiller/gitlabhq,kitech/gitlabhq,martinma4/gitlabhq,OlegGirko/gitlab-ce,joalmeid/gitlabhq,sonalkr132/gitlabhq,dukex/gitlabhq,1ed/gitlabhq,mavimo/gitlabhq,larryli/gitlabhq,michaKFromParis/gitlabhqold,TheWatcher/gitlabhq,betabot7/gitlabhq,yuyue2013/ss,joalmeid/gitlabhq,MauriceMohlek/gitlabhq,cncodog/gitlab,michaKFromParis/gitlabhq,zBMNForks/gitlabhq,Burick/gitlabhq,per-garden/gitlabhq,folpindo/gitlabhq,ksoichiro/gitlabhq,louahola/gitlabhq,DanielZhangQingLong/gitlabhq,htve/GitlabForChinese,wangcan2014/gitlabhq,fearenales/gitlabhq,pjknkda/gitlabhq,achako/gitlabhq,bladealslayer/gitlabhq,theodi/gitlabhq,mathstuf/gitlabhq,ayufan/gitlabhq,julianengel/gitlabhq,dplarson/gitlabhq,duduribeiro/gitlabhq,daiyu/gitlab-zh,NARKOZ/gitlabhq,ZeoAlliance/gitlabhq,NKMR6194/gitlabhq,0x20h/gitlabhq,nguyen-tien-mulodo/gitlabhq,pkallberg/tjenare,ZeoAlliance/gitlabhq,cui-liqiang/gitlab-ce,stanhu/gitlabhq,NKMR6194/gitlabhq,sue445/gitlabhq,robbkidd/gitlabhq,NKMR6194/gitlabhq,neiljbrookes/glab,ibiart/gitlabhq,yulchitaj/TEST3,hq804116393/gitlabhq,cncodog/gitlab,dplarson/gitlabhq,fscherwi/gitlabhq,tempbottle/gitlabhq,pulkit21/gitlabhq,Tyrael/gitlabhq,sakishum/gitlabhq,dreampet/gitlab,wangcan2014/gitlabhq,chenrui2014/gitlabhq,delkyd/gitlabhq,since2014/gitlabhq,H3Chief/gitlabhq,williamherry/gitlabhq,sakishum/gitlabhq,hq804116393/gitlabhq,ferdinandrosario/gitlabhq,akumetsuv/gitlab,tempbottle/gitlabhq,michaKFromParis/gitlabhqold,yatish27/gitlabhq,revaret/gitlabhq,123Haynes/gitlabhq,aaronsnyder/gitlabhq,larryli/gitlabhq,childbamboo/gitlabhq,dplarson/gitlabhq,darkrasid/gitlabhq,htve/GitlabForChinese,Razer6/gitlabhq,salipro4ever/gitlabhq,tk23/gitlabhq,allistera/gitlabhq,williamherry/gitlabhq,robbkidd/gitlabhq,dvrylc/gitlabhq,duduribeiro/gitlabhq,liyakun/gitlabhq,mmkassem/gitlabhq,123Haynes/gitlabhq,SVArago/gitlabhq,SkyWei/gitlabhq,LUMC/gitlabhq,joalmeid/gitlabhq,shinexiao/gitlabhq,bozaro/gitlabhq,htve/GitlabForChinese,gorgee/gitlabhq,gopeter/gitlabhq,mathstuf/gitlabhq,ikappas/gitlabhq,8thcolor/eurucamp2014-htdsadr,8thcolor/rubyconfau2015-sadr,Kambda/mobbr-gitlabhq,since2014/gitlabhq,openwide-java/gitlabhq,8thcolor/testing-public-gitlabhq,8thcolor/testing-public-gitlabhq,wangcan2014/gitlabhq,fearenales/gitlabhq,neiljbrookes/glab,szechyjs/gitlabhq,koreamic/gitlabhq,inetfuture/gitlab-tweak,icedwater/gitlabhq,phinfonet/mobbr-gitlabhq,windymid/test2,tim-hoff/gitlabhq,ttasanen/gitlabhq,manfer/gitlabhq,hzy001/gitlabhq,stoplightio/gitlabhq,stellamiranda/mobbr-gitlabhq,TheWatcher/gitlabhq,jvanbaarsen/gitlabhq,sonalkr132/gitlabhq,zBMNForks/gitlabhq,CodeCantor/gitlabhq,chrrrles/nodeflab,icedwater/gitlabhq,tempbottle/gitlabhq,allistera/gitlabhq,louahola/gitlabhq,DanielZhangQingLong/gitlabhq,hq804116393/gitlabhq,kitech/gitlabhq,ngpestelos/gitlabhq,eliasp/gitlabhq,dukex/gitlabhq,delkyd/gitlabhq,initiummedia/gitlabhq,bladealslayer/gitlabhq,DanielZhangQingLong/gitlabhq,zrbsprite/gitlabhq,mavimo/gitlabhq,ttasanen/gitlabhq,TheWatcher/gitlabhq,zrbsprite/gitlabhq,OlegGirko/gitlab-ce,martinma4/gitlabhq,bigsurge/gitlabhq,williamherry/gitlabhq,allysonbarros/gitlabhq,htve/GitlabForChinese,darkrasid/gitlabhq,fpgentil/gitlabhq,rumpelsepp/gitlabhq,it33/gitlabhq,jrjang/gitlab-ce,bbodenmiller/gitlabhq,LUMC/gitlabhq,Datacom/gitlabhq,chadyred/gitlabhq,stellamiranda/mobbr-gitlabhq,CodeCantor/gitlabhq,martijnvermaat/gitlabhq,ordiychen/gitlabhq,dreampet/gitlab,fgbreel/gitlabhq,mr-dxdy/gitlabhq,pjknkda/gitlabhq,dukex/gitlabhq,Keystion/gitlabhq,louahola/gitlabhq,kotaro-dev/gitlab-6-9,phinfonet/mobbr-gitlabhq,jrjang/gitlab-ce,Keystion/gitlabhq,yama07/gitlabhq,Razer6/gitlabhq,chrrrles/nodeflab,mrb/gitlabhq,shinexiao/gitlabhq,allysonbarros/gitlabhq,axilleas/gitlabhq,ttasanen/gitlabhq,Datacom/gitlabhq,delkyd/gitlabhq,szechyjs/gitlabhq,lbt/gitlabhq,sideci-sample/sideci-sample-gitlabhq,zrbsprite/gitlabhq,goeun/myRepo,mmkassem/gitlabhq,NKMR6194/gitlabhq,Razer6/gitlabhq,Exeia/gitlabhq,fendoudeqingchunhh/gitlabhq,fearenales/gitlabhq,chenrui2014/gitlabhq,michaKFromParis/gitlabhq,ferdinandrosario/gitlabhq,nmav/gitlabhq,Devin001/gitlabhq,xuvw/gitlabhq,jrjang/gitlabhq,Burick/gitlabhq,allistera/gitlabhq,akumetsuv/gitlab,tim-hoff/gitlabhq,tk23/gitlabhq,johnmyqin/gitlabhq,atomaka/gitlabhq,joalmeid/gitlabhq,goeun/myRepo,rhels/gitlabhq,johnmyqin/gitlabhq,whluwit/gitlabhq,Razer6/gitlabhq,vjustov/gitlabhq,eliasp/gitlabhq,sideci-sample/sideci-sample-gitlabhq,youprofit/gitlabhq,cinderblock/gitlabhq,per-garden/gitlabhq,johnmyqin/gitlabhq,pkgr/gitlabhq,hzy001/gitlabhq,axilleas/gitlabhq,michaKFromParis/gitlabhqold,lvfeng1130/gitlabhq,per-garden/gitlabhq,Devin001/gitlabhq,koreamic/gitlabhq,gopeter/gitlabhq,fantasywind/gitlabhq,windymid/test2,iiet/iiet-git,adaiguoguo/gitlab_globalserarch,CodeCantor/gitlabhq,t-zuehlsdorff/gitlabhq,eliasp/gitlabhq,shinexiao/gitlabhq,screenpages/gitlabhq,tk23/gitlabhq,michaKFromParis/sparkslab,childbamboo/gitlabhq,lbt/gitlabhq,hq804116393/gitlabhq,achako/gitlabhq,nmav/gitlabhq,manfer/gitlabhq,jvanbaarsen/gitlabhq,ArthurHoaro/Public-GitLab,rebecamendez/gitlabhq,achako/gitlabhq,Devin001/gitlabhq,gorgee/gitlabhq,martinma4/gitlabhq,ZeoAlliance/gitlabhq,rhels/gitlabhq,H3Chief/gitlabhq,ikappas/gitlabhq,julianengel/gitlabhq,gorgee/gitlabhq,duduribeiro/gitlabhq,robbkidd/gitlabhq,ordiychen/gitlabhq,mathstuf/gitlabhq,rebecamendez/gitlabhq,fgbreel/gitlabhq,copystudy/gitlabhq,adaiguoguo/gitlab_globalserarch,cui-liqiang/gitlab-ce,phinfonet/mobbr-gitlabhq,yatish27/gitlabhq,rumpelsepp/gitlabhq,axilleas/gitlabhq,szechyjs/gitlabhq,openwide-java/gitlabhq,jaepyoung/gitlabhq,yulchitaj/TEST3,ksoichiro/gitlabhq,gopeter/gitlabhq,theonlydoo/gitlabhq,dwrensha/gitlabhq,Telekom-PD/gitlabhq,nmav/gitlabhq,dreampet/gitlab,hacsoc/gitlabhq,Tyrael/gitlabhq,mr-dxdy/gitlabhq,t-zuehlsdorff/gitlabhq,1ed/gitlabhq,initiummedia/gitlabhq,eliasp/gitlabhq,SVArago/gitlabhq,luzhongyang/gitlabhq,TheWatcher/gitlabhq,Exeia/gitlabhq,youprofit/gitlabhq,tk23/gitlabhq,goeun/myRepo,hacsoc/gitlabhq,williamherry/gitlabhq,inetfuture/gitlab-tweak,dvrylc/gitlabhq,yonglehou/gitlabhq,sonalkr132/gitlabhq,pupaxxo/gitlabhq,OtkurBiz/gitlabhq,betabot7/gitlabhq,vjustov/gitlabhq,SkyWei/gitlabhq,jrjang/gitlab-ce,dwrensha/gitlabhq,nguyen-tien-mulodo/gitlabhq,zBMNForks/gitlabhq,pkgr/gitlabhq,yonglehou/gitlabhq,8thcolor/rubyconfau2015-sadr,pulkit21/gitlabhq,Keystion/gitlabhq,NARKOZ/gitlabhq,julianengel/gitlabhq,jairzh/gitlabhq-sfdc,Tyrael/gitlabhq,theonlydoo/gitlabhq,Kambda/mobbr-gitlabhq,rhels/gitlabhq,larryli/gitlabhq,gopeter/gitlabhq,dwrensha/gitlabhq,kitech/gitlabhq,jirutka/gitlabhq,xuvw/gitlabhq,whluwit/gitlabhq,riyad/gitlabhq,salipro4ever/gitlabhq,kemenaran/gitlabhq,michaKFromParis/sparkslab,it33/gitlabhq,xuvw/gitlabhq,kemenaran/gitlabhq,OlegGirko/gitlab-ce,fpgentil/gitlabhq,yuyue2013/ss,aaronsnyder/gitlabhq,lvfeng1130/gitlabhq,dreampet/gitlab
ruby
## Code Before: require 'spec_helper' describe "Dashboard Feed" do describe "GET /" do let!(:user) { Factory :user } context "projects atom feed via private token" do it "should render projects atom feed" do visit dashboard_path(:atom, private_token: user.private_token) page.body.should have_selector("feed title") end end context "projects page via private token" do it "should redirect to login page" do visit dashboard_path(private_token: user.private_token) current_path.should == new_user_session_path end end end end ## Instruction: Remove atom Dashboard spec that no longer applies ## Code After: require 'spec_helper' describe "Dashboard Feed" do describe "GET /" do let!(:user) { Factory :user } context "projects atom feed via private token" do it "should render projects atom feed" do visit dashboard_path(:atom, private_token: user.private_token) page.body.should have_selector("feed title") end end end end
require 'spec_helper' describe "Dashboard Feed" do describe "GET /" do let!(:user) { Factory :user } context "projects atom feed via private token" do it "should render projects atom feed" do visit dashboard_path(:atom, private_token: user.private_token) page.body.should have_selector("feed title") end end - - context "projects page via private token" do - it "should redirect to login page" do - visit dashboard_path(private_token: user.private_token) - current_path.should == new_user_session_path - end - end end end
7
0.333333
0
7
2beafbd2a940aa0ccc611cd8d8d915c90a6784ab
Casks/franz.rb
Casks/franz.rb
cask 'franz' do version '3.1.0' sha256 '1789fb44c47fd25db123c8ad6142e24007901fa07a8494263c312dbab7708eb9' url "https://github.com/imprecision/franz-app/releases/download/#{version}/Franz-darwin-x64-#{version}.dmg" appcast 'https://github.com/imprecision/franz-app/releases.atom', checkpoint: '481bc974abafc69025c5907056373df7a8e5f795544a7a1949e58c3e5858de1b' name 'Franz' homepage 'http://meetfranz.com' license :gratis app 'Franz.app' end
cask 'franz' do version '3.1.0' sha256 '1789fb44c47fd25db123c8ad6142e24007901fa07a8494263c312dbab7708eb9' # github.com/imprecision/franz-app was verified as official when first introduced to the cask url "https://github.com/imprecision/franz-app/releases/download/#{version}/Franz-darwin-x64-#{version}.dmg" appcast 'https://github.com/imprecision/franz-app/releases.atom', checkpoint: '481bc974abafc69025c5907056373df7a8e5f795544a7a1949e58c3e5858de1b' name 'Franz' homepage 'http://meetfranz.com' license :gratis app 'Franz.app' end
Fix `url` stanza comment for Franz.
Fix `url` stanza comment for Franz.
Ruby
bsd-2-clause
jalaziz/homebrew-cask,caskroom/homebrew-cask,patresi/homebrew-cask,amatos/homebrew-cask,josa42/homebrew-cask,reitermarkus/homebrew-cask,mazehall/homebrew-cask,mattrobenolt/homebrew-cask,tangestani/homebrew-cask,chadcatlett/caskroom-homebrew-cask,chuanxd/homebrew-cask,yuhki50/homebrew-cask,rogeriopradoj/homebrew-cask,schneidmaster/homebrew-cask,Cottser/homebrew-cask,lumaxis/homebrew-cask,sebcode/homebrew-cask,uetchy/homebrew-cask,cprecioso/homebrew-cask,moogar0880/homebrew-cask,skatsuta/homebrew-cask,vin047/homebrew-cask,mjgardner/homebrew-cask,miccal/homebrew-cask,guerrero/homebrew-cask,kassi/homebrew-cask,optikfluffel/homebrew-cask,riyad/homebrew-cask,leipert/homebrew-cask,SentinelWarren/homebrew-cask,hanxue/caskroom,sanchezm/homebrew-cask,phpwutz/homebrew-cask,julionc/homebrew-cask,JacopKane/homebrew-cask,hanxue/caskroom,okket/homebrew-cask,mishari/homebrew-cask,gilesdring/homebrew-cask,winkelsdorf/homebrew-cask,bosr/homebrew-cask,KosherBacon/homebrew-cask,jacobbednarz/homebrew-cask,vitorgalvao/homebrew-cask,decrement/homebrew-cask,yutarody/homebrew-cask,timsutton/homebrew-cask,mattrobenolt/homebrew-cask,renaudguerin/homebrew-cask,chuanxd/homebrew-cask,pkq/homebrew-cask,ptb/homebrew-cask,tjnycum/homebrew-cask,hellosky806/homebrew-cask,wmorin/homebrew-cask,dcondrey/homebrew-cask,koenrh/homebrew-cask,wickles/homebrew-cask,colindunn/homebrew-cask,ianyh/homebrew-cask,jawshooah/homebrew-cask,malford/homebrew-cask,syscrusher/homebrew-cask,klane/homebrew-cask,lifepillar/homebrew-cask,robertgzr/homebrew-cask,deiga/homebrew-cask,MichaelPei/homebrew-cask,FredLackeyOfficial/homebrew-cask,cobyism/homebrew-cask,hakamadare/homebrew-cask,esebastian/homebrew-cask,cblecker/homebrew-cask,mahori/homebrew-cask,mhubig/homebrew-cask,singingwolfboy/homebrew-cask,xtian/homebrew-cask,gmkey/homebrew-cask,mchlrmrz/homebrew-cask,reitermarkus/homebrew-cask,claui/homebrew-cask,mwean/homebrew-cask,uetchy/homebrew-cask,morganestes/homebrew-cask,decrement/homebrew-cask,bdhess/homebrew-cask,michelegera/homebrew-cask,gabrielizaias/homebrew-cask,haha1903/homebrew-cask,mjgardner/homebrew-cask,Keloran/homebrew-cask,gilesdring/homebrew-cask,Saklad5/homebrew-cask,lifepillar/homebrew-cask,troyxmccall/homebrew-cask,deanmorin/homebrew-cask,kamilboratynski/homebrew-cask,cliffcotino/homebrew-cask,miccal/homebrew-cask,alebcay/homebrew-cask,jiashuw/homebrew-cask,bric3/homebrew-cask,haha1903/homebrew-cask,singingwolfboy/homebrew-cask,nathancahill/homebrew-cask,stonehippo/homebrew-cask,gerrypower/homebrew-cask,scottsuch/homebrew-cask,xyb/homebrew-cask,opsdev-ws/homebrew-cask,maxnordlund/homebrew-cask,tedski/homebrew-cask,alebcay/homebrew-cask,xyb/homebrew-cask,kesara/homebrew-cask,chrisfinazzo/homebrew-cask,janlugt/homebrew-cask,nrlquaker/homebrew-cask,wKovacs64/homebrew-cask,yurikoles/homebrew-cask,blainesch/homebrew-cask,yuhki50/homebrew-cask,yutarody/homebrew-cask,JikkuJose/homebrew-cask,jpmat296/homebrew-cask,jalaziz/homebrew-cask,neverfox/homebrew-cask,okket/homebrew-cask,kronicd/homebrew-cask,squid314/homebrew-cask,larseggert/homebrew-cask,JacopKane/homebrew-cask,jgarber623/homebrew-cask,FinalDes/homebrew-cask,opsdev-ws/homebrew-cask,nathanielvarona/homebrew-cask,cliffcotino/homebrew-cask,ericbn/homebrew-cask,diguage/homebrew-cask,lucasmezencio/homebrew-cask,ebraminio/homebrew-cask,xcezx/homebrew-cask,paour/homebrew-cask,imgarylai/homebrew-cask,blogabe/homebrew-cask,neverfox/homebrew-cask,stephenwade/homebrew-cask,onlynone/homebrew-cask,antogg/homebrew-cask,timsutton/homebrew-cask,dictcp/homebrew-cask,blogabe/homebrew-cask,0xadada/homebrew-cask,shoichiaizawa/homebrew-cask,bdhess/homebrew-cask,samdoran/homebrew-cask,BenjaminHCCarr/homebrew-cask,mlocher/homebrew-cask,josa42/homebrew-cask,samdoran/homebrew-cask,moogar0880/homebrew-cask,AnastasiaSulyagina/homebrew-cask,sohtsuka/homebrew-cask,xcezx/homebrew-cask,sjackman/homebrew-cask,nrlquaker/homebrew-cask,moimikey/homebrew-cask,maxnordlund/homebrew-cask,kkdd/homebrew-cask,jpmat296/homebrew-cask,shorshe/homebrew-cask,moimikey/homebrew-cask,deiga/homebrew-cask,inta/homebrew-cask,optikfluffel/homebrew-cask,ericbn/homebrew-cask,yurikoles/homebrew-cask,sebcode/homebrew-cask,wastrachan/homebrew-cask,malford/homebrew-cask,mchlrmrz/homebrew-cask,joshka/homebrew-cask,Saklad5/homebrew-cask,athrunsun/homebrew-cask,gmkey/homebrew-cask,hyuna917/homebrew-cask,daften/homebrew-cask,troyxmccall/homebrew-cask,devmynd/homebrew-cask,hellosky806/homebrew-cask,jellyfishcoder/homebrew-cask,kTitan/homebrew-cask,amatos/homebrew-cask,RJHsiao/homebrew-cask,jedahan/homebrew-cask,nrlquaker/homebrew-cask,dictcp/homebrew-cask,yurikoles/homebrew-cask,xight/homebrew-cask,mattrobenolt/homebrew-cask,julionc/homebrew-cask,johndbritton/homebrew-cask,shoichiaizawa/homebrew-cask,m3nu/homebrew-cask,esebastian/homebrew-cask,kingthorin/homebrew-cask,deiga/homebrew-cask,nshemonsky/homebrew-cask,danielbayley/homebrew-cask,forevergenin/homebrew-cask,hristozov/homebrew-cask,winkelsdorf/homebrew-cask,tyage/homebrew-cask,leipert/homebrew-cask,usami-k/homebrew-cask,riyad/homebrew-cask,diogodamiani/homebrew-cask,sgnh/homebrew-cask,lukasbestle/homebrew-cask,pacav69/homebrew-cask,flaviocamilo/homebrew-cask,Amorymeltzer/homebrew-cask,stonehippo/homebrew-cask,malob/homebrew-cask,mathbunnyru/homebrew-cask,imgarylai/homebrew-cask,13k/homebrew-cask,stonehippo/homebrew-cask,AnastasiaSulyagina/homebrew-cask,inz/homebrew-cask,seanzxx/homebrew-cask,0rax/homebrew-cask,paour/homebrew-cask,n0ts/homebrew-cask,julionc/homebrew-cask,timsutton/homebrew-cask,hristozov/homebrew-cask,mrmachine/homebrew-cask,andrewdisley/homebrew-cask,kingthorin/homebrew-cask,renaudguerin/homebrew-cask,nathanielvarona/homebrew-cask,paour/homebrew-cask,reitermarkus/homebrew-cask,reelsense/homebrew-cask,ptb/homebrew-cask,gerrypower/homebrew-cask,wKovacs64/homebrew-cask,hyuna917/homebrew-cask,a1russell/homebrew-cask,vigosan/homebrew-cask,dictcp/homebrew-cask,malob/homebrew-cask,koenrh/homebrew-cask,franklouwers/homebrew-cask,lucasmezencio/homebrew-cask,hakamadare/homebrew-cask,muan/homebrew-cask,gabrielizaias/homebrew-cask,nathanielvarona/homebrew-cask,jgarber623/homebrew-cask,onlynone/homebrew-cask,jacobbednarz/homebrew-cask,sgnh/homebrew-cask,sscotth/homebrew-cask,larseggert/homebrew-cask,JosephViolago/homebrew-cask,mrmachine/homebrew-cask,athrunsun/homebrew-cask,sohtsuka/homebrew-cask,thii/homebrew-cask,exherb/homebrew-cask,ksylvan/homebrew-cask,cblecker/homebrew-cask,sosedoff/homebrew-cask,sosedoff/homebrew-cask,diogodamiani/homebrew-cask,victorpopkov/homebrew-cask,tangestani/homebrew-cask,andrewdisley/homebrew-cask,mikem/homebrew-cask,winkelsdorf/homebrew-cask,mahori/homebrew-cask,arronmabrey/homebrew-cask,JosephViolago/homebrew-cask,tjnycum/homebrew-cask,imgarylai/homebrew-cask,MichaelPei/homebrew-cask,dvdoliveira/homebrew-cask,esebastian/homebrew-cask,gyndav/homebrew-cask,Ephemera/homebrew-cask,kesara/homebrew-cask,kkdd/homebrew-cask,exherb/homebrew-cask,squid314/homebrew-cask,coeligena/homebrew-customized,dvdoliveira/homebrew-cask,bosr/homebrew-cask,colindean/homebrew-cask,rajiv/homebrew-cask,neverfox/homebrew-cask,markthetech/homebrew-cask,wmorin/homebrew-cask,devmynd/homebrew-cask,JosephViolago/homebrew-cask,asins/homebrew-cask,jangalinski/homebrew-cask,BenjaminHCCarr/homebrew-cask,MircoT/homebrew-cask,johnjelinek/homebrew-cask,jalaziz/homebrew-cask,rogeriopradoj/homebrew-cask,cprecioso/homebrew-cask,chrisfinazzo/homebrew-cask,rajiv/homebrew-cask,elyscape/homebrew-cask,Amorymeltzer/homebrew-cask,kpearson/homebrew-cask,y00rb/homebrew-cask,Cottser/homebrew-cask,m3nu/homebrew-cask,stephenwade/homebrew-cask,doits/homebrew-cask,yumitsu/homebrew-cask,FinalDes/homebrew-cask,cblecker/homebrew-cask,claui/homebrew-cask,sanyer/homebrew-cask,perfide/homebrew-cask,hanxue/caskroom,andyli/homebrew-cask,blogabe/homebrew-cask,MircoT/homebrew-cask,hovancik/homebrew-cask,wastrachan/homebrew-cask,Ketouem/homebrew-cask,hovancik/homebrew-cask,jmeridth/homebrew-cask,Ngrd/homebrew-cask,jiashuw/homebrew-cask,alexg0/homebrew-cask,alexg0/homebrew-cask,wickedsp1d3r/homebrew-cask,jbeagley52/homebrew-cask,kronicd/homebrew-cask,JacopKane/homebrew-cask,tyage/homebrew-cask,mjgardner/homebrew-cask,boecko/homebrew-cask,tangestani/homebrew-cask,slack4u/homebrew-cask,lantrix/homebrew-cask,andyli/homebrew-cask,johnjelinek/homebrew-cask,singingwolfboy/homebrew-cask,deanmorin/homebrew-cask,xtian/homebrew-cask,FredLackeyOfficial/homebrew-cask,scribblemaniac/homebrew-cask,sanyer/homebrew-cask,uetchy/homebrew-cask,asins/homebrew-cask,blainesch/homebrew-cask,sscotth/homebrew-cask,joschi/homebrew-cask,jbeagley52/homebrew-cask,alexg0/homebrew-cask,syscrusher/homebrew-cask,claui/homebrew-cask,artdevjs/homebrew-cask,Ephemera/homebrew-cask,vitorgalvao/homebrew-cask,miccal/homebrew-cask,chadcatlett/caskroom-homebrew-cask,mchlrmrz/homebrew-cask,jawshooah/homebrew-cask,muan/homebrew-cask,BenjaminHCCarr/homebrew-cask,morganestes/homebrew-cask,sanyer/homebrew-cask,shonjir/homebrew-cask,optikfluffel/homebrew-cask,lantrix/homebrew-cask,arronmabrey/homebrew-cask,elyscape/homebrew-cask,flaviocamilo/homebrew-cask,Ngrd/homebrew-cask,0rax/homebrew-cask,tjnycum/homebrew-cask,cobyism/homebrew-cask,kTitan/homebrew-cask,jasmas/homebrew-cask,mathbunnyru/homebrew-cask,kongslund/homebrew-cask,nshemonsky/homebrew-cask,n0ts/homebrew-cask,colindunn/homebrew-cask,rajiv/homebrew-cask,jgarber623/homebrew-cask,xyb/homebrew-cask,goxberry/homebrew-cask,adrianchia/homebrew-cask,joshka/homebrew-cask,My2ndAngelic/homebrew-cask,m3nu/homebrew-cask,kamilboratynski/homebrew-cask,psibre/homebrew-cask,franklouwers/homebrew-cask,kpearson/homebrew-cask,y00rb/homebrew-cask,jmeridth/homebrew-cask,colindean/homebrew-cask,bric3/homebrew-cask,xight/homebrew-cask,wickedsp1d3r/homebrew-cask,diguage/homebrew-cask,forevergenin/homebrew-cask,josa42/homebrew-cask,kassi/homebrew-cask,danielbayley/homebrew-cask,0xadada/homebrew-cask,thii/homebrew-cask,dcondrey/homebrew-cask,Labutin/homebrew-cask,kongslund/homebrew-cask,cobyism/homebrew-cask,mwean/homebrew-cask,My2ndAngelic/homebrew-cask,rogeriopradoj/homebrew-cask,aguynamedryan/homebrew-cask,Ephemera/homebrew-cask,jeroenj/homebrew-cask,13k/homebrew-cask,jaredsampson/homebrew-cask,adrianchia/homebrew-cask,andrewdisley/homebrew-cask,pkq/homebrew-cask,slack4u/homebrew-cask,mathbunnyru/homebrew-cask,stephenwade/homebrew-cask,klane/homebrew-cask,joshka/homebrew-cask,boecko/homebrew-cask,Keloran/homebrew-cask,jconley/homebrew-cask,cfillion/homebrew-cask,sanchezm/homebrew-cask,jasmas/homebrew-cask,JikkuJose/homebrew-cask,inta/homebrew-cask,adrianchia/homebrew-cask,aguynamedryan/homebrew-cask,inz/homebrew-cask,puffdad/homebrew-cask,scribblemaniac/homebrew-cask,a1russell/homebrew-cask,jellyfishcoder/homebrew-cask,Labutin/homebrew-cask,toonetown/homebrew-cask,sjackman/homebrew-cask,jeroenj/homebrew-cask,shonjir/homebrew-cask,lumaxis/homebrew-cask,toonetown/homebrew-cask,johndbritton/homebrew-cask,shorshe/homebrew-cask,ninjahoahong/homebrew-cask,jedahan/homebrew-cask,Ketouem/homebrew-cask,psibre/homebrew-cask,mauricerkelly/homebrew-cask,lukasbestle/homebrew-cask,tjt263/homebrew-cask,pkq/homebrew-cask,MoOx/homebrew-cask,mahori/homebrew-cask,yutarody/homebrew-cask,mishari/homebrew-cask,a1russell/homebrew-cask,tjt263/homebrew-cask,scottsuch/homebrew-cask,ericbn/homebrew-cask,reelsense/homebrew-cask,antogg/homebrew-cask,ninjahoahong/homebrew-cask,wickles/homebrew-cask,shoichiaizawa/homebrew-cask,wmorin/homebrew-cask,jconley/homebrew-cask,janlugt/homebrew-cask,samnung/homebrew-cask,tedski/homebrew-cask,robertgzr/homebrew-cask,nathancahill/homebrew-cask,danielbayley/homebrew-cask,antogg/homebrew-cask,mazehall/homebrew-cask,giannitm/homebrew-cask,MoOx/homebrew-cask,gyndav/homebrew-cask,samnung/homebrew-cask,coeligena/homebrew-customized,thehunmonkgroup/homebrew-cask,ksylvan/homebrew-cask,seanzxx/homebrew-cask,thehunmonkgroup/homebrew-cask,skatsuta/homebrew-cask,yumitsu/homebrew-cask,chrisfinazzo/homebrew-cask,victorpopkov/homebrew-cask,KosherBacon/homebrew-cask,coeligena/homebrew-customized,mauricerkelly/homebrew-cask,shonjir/homebrew-cask,puffdad/homebrew-cask,goxberry/homebrew-cask,guerrero/homebrew-cask,RJHsiao/homebrew-cask,usami-k/homebrew-cask,scottsuch/homebrew-cask,moimikey/homebrew-cask,scribblemaniac/homebrew-cask,ianyh/homebrew-cask,xight/homebrew-cask,michelegera/homebrew-cask,phpwutz/homebrew-cask,mhubig/homebrew-cask,bric3/homebrew-cask,schneidmaster/homebrew-cask,patresi/homebrew-cask,markthetech/homebrew-cask,giannitm/homebrew-cask,caskroom/homebrew-cask,pacav69/homebrew-cask,vigosan/homebrew-cask,joschi/homebrew-cask,joschi/homebrew-cask,malob/homebrew-cask,vin047/homebrew-cask,cfillion/homebrew-cask,perfide/homebrew-cask,doits/homebrew-cask,jangalinski/homebrew-cask,Amorymeltzer/homebrew-cask,mlocher/homebrew-cask,artdevjs/homebrew-cask,ebraminio/homebrew-cask,sscotth/homebrew-cask,alebcay/homebrew-cask,SentinelWarren/homebrew-cask,mikem/homebrew-cask,gyndav/homebrew-cask,jaredsampson/homebrew-cask,kingthorin/homebrew-cask,kesara/homebrew-cask,daften/homebrew-cask
ruby
## Code Before: cask 'franz' do version '3.1.0' sha256 '1789fb44c47fd25db123c8ad6142e24007901fa07a8494263c312dbab7708eb9' url "https://github.com/imprecision/franz-app/releases/download/#{version}/Franz-darwin-x64-#{version}.dmg" appcast 'https://github.com/imprecision/franz-app/releases.atom', checkpoint: '481bc974abafc69025c5907056373df7a8e5f795544a7a1949e58c3e5858de1b' name 'Franz' homepage 'http://meetfranz.com' license :gratis app 'Franz.app' end ## Instruction: Fix `url` stanza comment for Franz. ## Code After: cask 'franz' do version '3.1.0' sha256 '1789fb44c47fd25db123c8ad6142e24007901fa07a8494263c312dbab7708eb9' # github.com/imprecision/franz-app was verified as official when first introduced to the cask url "https://github.com/imprecision/franz-app/releases/download/#{version}/Franz-darwin-x64-#{version}.dmg" appcast 'https://github.com/imprecision/franz-app/releases.atom', checkpoint: '481bc974abafc69025c5907056373df7a8e5f795544a7a1949e58c3e5858de1b' name 'Franz' homepage 'http://meetfranz.com' license :gratis app 'Franz.app' end
cask 'franz' do version '3.1.0' sha256 '1789fb44c47fd25db123c8ad6142e24007901fa07a8494263c312dbab7708eb9' + # github.com/imprecision/franz-app was verified as official when first introduced to the cask url "https://github.com/imprecision/franz-app/releases/download/#{version}/Franz-darwin-x64-#{version}.dmg" appcast 'https://github.com/imprecision/franz-app/releases.atom', checkpoint: '481bc974abafc69025c5907056373df7a8e5f795544a7a1949e58c3e5858de1b' name 'Franz' homepage 'http://meetfranz.com' license :gratis app 'Franz.app' end
1
0.076923
1
0
92576b75372a7f565bfeddd36b65e90bb18e37df
app/views/choose_a_certified_company/_idp_option.html.erb
app/views/choose_a_certified_company/_idp_option.html.erb
<div class="idp-choice"> <div class="company-logo"> <%= image_tag identity_provider.logo_path, alt: '' %> <p class="company-about"> <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %> </p> </div> <% button_class = recommended ? 'button' : 'button-link' %> <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %> <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name), class: button_class, name: identity_provider.simple_id, id: nil, type: 'submit', value: identity_provider.display_name %> <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %> <%= hidden_field_tag 'recommended-idp', recommended, id: nil %> <%= f.hidden_field :entity_id, id: nil %> <%= f.hidden_field :simple_id, id: nil %> <% end %> </div>
<div class="idp-choice"> <div class="company-logo"> <%= image_tag identity_provider.logo_path, alt: '' %> <p class="company-about"> <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %> </p> </div> <% button_class = recommended ? 'button' : 'button-link' %> <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %> <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name), class: button_class, role: 'link', name: identity_provider.simple_id, id: nil, type: 'submit', value: identity_provider.display_name %> <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %> <%= hidden_field_tag 'recommended-idp', recommended, id: nil %> <%= f.hidden_field :entity_id, id: nil %> <%= f.hidden_field :simple_id, id: nil %> <% end %> </div>
Add role=link to buttons styled as links
bau: Add role=link to buttons styled as links Solo: da39a3ee5e6b4b0d3255bfef95601890afd80709@richardtowers
HTML+ERB
mit
alphagov/verify-frontend,alphagov/verify-frontend,alphagov/verify-frontend,alphagov/verify-frontend
html+erb
## Code Before: <div class="idp-choice"> <div class="company-logo"> <%= image_tag identity_provider.logo_path, alt: '' %> <p class="company-about"> <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %> </p> </div> <% button_class = recommended ? 'button' : 'button-link' %> <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %> <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name), class: button_class, name: identity_provider.simple_id, id: nil, type: 'submit', value: identity_provider.display_name %> <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %> <%= hidden_field_tag 'recommended-idp', recommended, id: nil %> <%= f.hidden_field :entity_id, id: nil %> <%= f.hidden_field :simple_id, id: nil %> <% end %> </div> ## Instruction: bau: Add role=link to buttons styled as links Solo: da39a3ee5e6b4b0d3255bfef95601890afd80709@richardtowers ## Code After: <div class="idp-choice"> <div class="company-logo"> <%= image_tag identity_provider.logo_path, alt: '' %> <p class="company-about"> <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %> </p> </div> <% button_class = recommended ? 'button' : 'button-link' %> <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %> <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name), class: button_class, role: 'link', name: identity_provider.simple_id, id: nil, type: 'submit', value: identity_provider.display_name %> <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %> <%= hidden_field_tag 'recommended-idp', recommended, id: nil %> <%= f.hidden_field :entity_id, id: nil %> <%= f.hidden_field :simple_id, id: nil %> <% end %> </div>
<div class="idp-choice"> <div class="company-logo"> <%= image_tag identity_provider.logo_path, alt: '' %> <p class="company-about"> <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %> </p> </div> <% button_class = recommended ? 'button' : 'button-link' %> <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %> <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name), class: button_class, + role: 'link', name: identity_provider.simple_id, id: nil, type: 'submit', value: identity_provider.display_name %> <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %> <%= hidden_field_tag 'recommended-idp', recommended, id: nil %> <%= f.hidden_field :entity_id, id: nil %> <%= f.hidden_field :simple_id, id: nil %> <% end %> </div>
1
0.045455
1
0
a74df2e0294de9f58a3632468d55277804a2cd4b
config/initializers/omniauth.rb
config/initializers/omniauth.rb
OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'], { prompt: "select_account", image_aspect_ratio: "square", # we're displaying at 80 pixels, this is for high density ("Retina") displays image_size: 160 } end
OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'], { prompt: "select_account", image_aspect_ratio: "square", # we're displaying at 80 pixels, this is for high density ("Retina") displays image_size: 160, hd: ENV["OAUTH2_RESTRICTED_DOMAIN"] || "" } end
Allow restrictions to login by specific domain.
Allow restrictions to login by specific domain.
Ruby
mit
orientation/orientation,hashrocket/orientation,cmckni3/orientation,orientation/orientation,splicers/orientation,splicers/orientation,liufffan/orientation,robomc/orientation,splicers/orientation,cmckni3/orientation,twinn/orientation,robomc/orientation,liufffan/orientation,hashrocket/orientation,orientation/orientation,codeschool/orientation,twinn/orientation,IZEA/orientation,orientation/orientation,Scripted/orientation,Scripted/orientation,codeschool/orientation,cmckni3/orientation,codeschool/orientation,Scripted/orientation,IZEA/orientation
ruby
## Code Before: OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'], { prompt: "select_account", image_aspect_ratio: "square", # we're displaying at 80 pixels, this is for high density ("Retina") displays image_size: 160 } end ## Instruction: Allow restrictions to login by specific domain. ## Code After: OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'], { prompt: "select_account", image_aspect_ratio: "square", # we're displaying at 80 pixels, this is for high density ("Retina") displays image_size: 160, hd: ENV["OAUTH2_RESTRICTED_DOMAIN"] || "" } end
OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'], { prompt: "select_account", image_aspect_ratio: "square", # we're displaying at 80 pixels, this is for high density ("Retina") displays - image_size: 160 + image_size: 160, ? + + hd: ENV["OAUTH2_RESTRICTED_DOMAIN"] || "" } end
3
0.272727
2
1
a0bafa80534b86a01c7f64689a7cb69fa244c02f
docs/structure.json
docs/structure.json
[{ "title": "Introduction", "docs": [ "Installing", "Getting started", "Rendering", "Syntax", "Core tags", "Custom tags", "Components", "Server-side rendering" ] },{ "title": "Bundler Integrations", "docs": [ "Lasso", "Webpack", "Browserify", "Rollup" ] },{ "title": "Server Integrations", "docs": [ "Express", "Koa", "Hapi", "HTTP", "Huncwot" ] },{ "title": "Tooling", "docs": [ "Editor plugins" ] },{ "title": "Tutorials", "docs": [ "Color Picker" ] }]
[{ "title": "Introduction", "docs": [ "Installing", "Getting started", "Rendering", "Syntax", "Core tags", "Custom tags", "Components", "Server-side rendering" ] },{ "title": "Bundler Integrations", "docs": [ "Lasso", "Webpack", "Browserify", "Rollup" ] },{ "title": "Server Integrations", "docs": [ "Express", "Koa", "Hapi", "HTTP", { "title": "Other", "docs": [ "Huncwot" ] } ] },{ "title": "Tooling", "docs": [ "Editor plugins" ] },{ "title": "Tutorials", "docs": [ "Color Picker" ] }]
Move Huncowt to Other section.
Move Huncowt to Other section.
JSON
mit
marko-js/marko,marko-js/marko
json
## Code Before: [{ "title": "Introduction", "docs": [ "Installing", "Getting started", "Rendering", "Syntax", "Core tags", "Custom tags", "Components", "Server-side rendering" ] },{ "title": "Bundler Integrations", "docs": [ "Lasso", "Webpack", "Browserify", "Rollup" ] },{ "title": "Server Integrations", "docs": [ "Express", "Koa", "Hapi", "HTTP", "Huncwot" ] },{ "title": "Tooling", "docs": [ "Editor plugins" ] },{ "title": "Tutorials", "docs": [ "Color Picker" ] }] ## Instruction: Move Huncowt to Other section. ## Code After: [{ "title": "Introduction", "docs": [ "Installing", "Getting started", "Rendering", "Syntax", "Core tags", "Custom tags", "Components", "Server-side rendering" ] },{ "title": "Bundler Integrations", "docs": [ "Lasso", "Webpack", "Browserify", "Rollup" ] },{ "title": "Server Integrations", "docs": [ "Express", "Koa", "Hapi", "HTTP", { "title": "Other", "docs": [ "Huncwot" ] } ] },{ "title": "Tooling", "docs": [ "Editor plugins" ] },{ "title": "Tutorials", "docs": [ "Color Picker" ] }]
[{ "title": "Introduction", "docs": [ "Installing", "Getting started", "Rendering", "Syntax", "Core tags", "Custom tags", "Components", "Server-side rendering" ] },{ "title": "Bundler Integrations", "docs": [ "Lasso", "Webpack", "Browserify", "Rollup" ] },{ "title": "Server Integrations", "docs": [ "Express", "Koa", "Hapi", "HTTP", + { + "title": "Other", + "docs": [ - "Huncwot" + "Huncwot" ? ++++++++ + ] + } ] },{ "title": "Tooling", "docs": [ "Editor plugins" ] },{ "title": "Tutorials", "docs": [ "Color Picker" ] }]
7
0.175
6
1
903d8223c6e70ad6d7a94cc50e8656e4fd48ef23
src/Commands/EnvDeleteCommand.php
src/Commands/EnvDeleteCommand.php
<?php namespace Sven\FlexEnv\Commands; use Symfony\Component\Console\Input\InputArgument; class EnvDeleteCommand extends EnvCommand { /** @var string */ protected $name = 'env:delete'; /** @var string */ protected $description = 'Delete an entry from your .env file'; public function handle(): int { $config = $this->config(); $config->delete($key = $this->key()); $config->persist(); $this->comment("Successfully deleted the entry \"$key\" from your .env file."); return 0; } protected function getArguments() { return [ ['key', InputArgument::REQUIRED, 'The name of the environment variable to delete.'], ]; } }
<?php namespace Sven\FlexEnv\Commands; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; class EnvDeleteCommand extends EnvCommand { /** @var string */ protected $name = 'env:delete'; /** @var string */ protected $description = 'Delete an entry from your .env file'; public function handle(): int { $config = $this->config(); $config->delete($key = $this->key()); if ($this->option('force') || $this->confirm("Are you sure you want to delete \"$key\" from your .env file?")) { $config->persist(); $this->comment("Successfully deleted the entry \"$key\" from your .env file."); return 0; } $this->comment('Alright, no changes made.'); return 1; } protected function getArguments() { return [ ['key', InputArgument::REQUIRED, 'The name of the environment variable to delete.'], ]; } protected function getOptions() { return [ [ 'force', null, InputOption::VALUE_NONE, 'Do not ask for confirmation before deleting the key from the environment file.', ], ]; } }
Add '--force' option to env:delete command
Add '--force' option to env:delete command
PHP
mit
svenluijten/flex-env
php
## Code Before: <?php namespace Sven\FlexEnv\Commands; use Symfony\Component\Console\Input\InputArgument; class EnvDeleteCommand extends EnvCommand { /** @var string */ protected $name = 'env:delete'; /** @var string */ protected $description = 'Delete an entry from your .env file'; public function handle(): int { $config = $this->config(); $config->delete($key = $this->key()); $config->persist(); $this->comment("Successfully deleted the entry \"$key\" from your .env file."); return 0; } protected function getArguments() { return [ ['key', InputArgument::REQUIRED, 'The name of the environment variable to delete.'], ]; } } ## Instruction: Add '--force' option to env:delete command ## Code After: <?php namespace Sven\FlexEnv\Commands; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; class EnvDeleteCommand extends EnvCommand { /** @var string */ protected $name = 'env:delete'; /** @var string */ protected $description = 'Delete an entry from your .env file'; public function handle(): int { $config = $this->config(); $config->delete($key = $this->key()); if ($this->option('force') || $this->confirm("Are you sure you want to delete \"$key\" from your .env file?")) { $config->persist(); $this->comment("Successfully deleted the entry \"$key\" from your .env file."); return 0; } $this->comment('Alright, no changes made.'); return 1; } protected function getArguments() { return [ ['key', InputArgument::REQUIRED, 'The name of the environment variable to delete.'], ]; } protected function getOptions() { return [ [ 'force', null, InputOption::VALUE_NONE, 'Do not ask for confirmation before deleting the key from the environment file.', ], ]; } }
<?php namespace Sven\FlexEnv\Commands; use Symfony\Component\Console\Input\InputArgument; + use Symfony\Component\Console\Input\InputOption; class EnvDeleteCommand extends EnvCommand { /** @var string */ protected $name = 'env:delete'; /** @var string */ protected $description = 'Delete an entry from your .env file'; public function handle(): int { $config = $this->config(); $config->delete($key = $this->key()); - $config->persist(); - $this->comment("Successfully deleted the entry \"$key\" from your .env file."); + if ($this->option('force') || $this->confirm("Are you sure you want to delete \"$key\" from your .env file?")) { + $config->persist(); + $this->comment("Successfully deleted the entry \"$key\" from your .env file."); + + return 0; + } + + $this->comment('Alright, no changes made.'); + - return 0; ? ^ + return 1; ? ^ } protected function getArguments() { return [ ['key', InputArgument::REQUIRED, 'The name of the environment variable to delete.'], ]; } + + protected function getOptions() + { + return [ + [ + 'force', + null, + InputOption::VALUE_NONE, + 'Do not ask for confirmation before deleting the key from the environment file.', + ], + ]; + } }
26
0.787879
23
3
7a04bb7692b4838e0abe9ba586fc4748ed9cd5d4
tests/integration/blueprints/site/test_homepage.py
tests/integration/blueprints/site/test_homepage.py
import pytest from tests.helpers import http_client def test_homepage(site_app, site): with http_client(site_app) as client: response = client.get('/') # By default, nothing is mounted on `/`, but at least check that # the application boots up and doesn't return a server error. assert response.status_code == 404
import pytest from tests.helpers import http_client def test_homepage(site_app, site): with http_client(site_app) as client: response = client.get('/') # By default, nothing is mounted on `/`, but at least check that # the application boots up and doesn't return a server error. assert response.status_code == 404 assert response.location is None def test_homepage_with_root_redirect(make_site_app, site): site_app = make_site_app(ROOT_REDIRECT_TARGET='welcome') with http_client(site_app) as client: response = client.get('/') assert response.status_code == 307 assert response.location == 'http://www.acmecon.test/welcome'
Test custom root path redirect
Test custom root path redirect
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
python
## Code Before: import pytest from tests.helpers import http_client def test_homepage(site_app, site): with http_client(site_app) as client: response = client.get('/') # By default, nothing is mounted on `/`, but at least check that # the application boots up and doesn't return a server error. assert response.status_code == 404 ## Instruction: Test custom root path redirect ## Code After: import pytest from tests.helpers import http_client def test_homepage(site_app, site): with http_client(site_app) as client: response = client.get('/') # By default, nothing is mounted on `/`, but at least check that # the application boots up and doesn't return a server error. assert response.status_code == 404 assert response.location is None def test_homepage_with_root_redirect(make_site_app, site): site_app = make_site_app(ROOT_REDIRECT_TARGET='welcome') with http_client(site_app) as client: response = client.get('/') assert response.status_code == 307 assert response.location == 'http://www.acmecon.test/welcome'
import pytest from tests.helpers import http_client def test_homepage(site_app, site): with http_client(site_app) as client: response = client.get('/') # By default, nothing is mounted on `/`, but at least check that # the application boots up and doesn't return a server error. assert response.status_code == 404 + assert response.location is None + + + def test_homepage_with_root_redirect(make_site_app, site): + site_app = make_site_app(ROOT_REDIRECT_TARGET='welcome') + + with http_client(site_app) as client: + response = client.get('/') + + assert response.status_code == 307 + assert response.location == 'http://www.acmecon.test/welcome'
11
0.846154
11
0
d0f5d5c6f5195432324a2f4d7a8a5747876f0c71
.travis.yml
.travis.yml
os: - linux language: java jdk: - oraclejdk8 - oraclejdk11 # whitelist branches: only: - master after_success: - mvn jacoco:report coveralls:report -pl jctools-core
os: - linux language: java jdk: - openjdk8 - oraclejdk11 - oraclejdk17 # whitelist branches: only: - master after_success: - mvn jacoco:report coveralls:report -pl jctools-core
Increase test matrix to cover 17
Increase test matrix to cover 17
YAML
apache-2.0
JCTools/JCTools
yaml
## Code Before: os: - linux language: java jdk: - oraclejdk8 - oraclejdk11 # whitelist branches: only: - master after_success: - mvn jacoco:report coveralls:report -pl jctools-core ## Instruction: Increase test matrix to cover 17 ## Code After: os: - linux language: java jdk: - openjdk8 - oraclejdk11 - oraclejdk17 # whitelist branches: only: - master after_success: - mvn jacoco:report coveralls:report -pl jctools-core
os: - linux language: java jdk: - - oraclejdk8 ? ^^^^ + - openjdk8 ? ^ + - oraclejdk11 + - oraclejdk17 # whitelist branches: only: - master after_success: - mvn jacoco:report coveralls:report -pl jctools-core
3
0.214286
2
1
92f3170bf07444163a0a5929e5707b003351e317
src/wasm.rs
src/wasm.rs
use std::path::Path; use std::{fs, io}; use FileTime; pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { unimplemented!() } pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { unimplemented!() } pub fn from_last_modification_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_last_access_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> { unimplemented!() }
use std::path::Path; use std::{fs, io}; use FileTime; pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { Err(io::Error::new(io::ErrorKind::Other, "Wasm not implemented")) } pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { Err(io::Error::new(io::ErrorKind::Other, "Wasm not implemented")) } pub fn from_last_modification_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_last_access_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> { unimplemented!() }
Return an Err instead of panicking
Return an Err instead of panicking
Rust
apache-2.0
alexcrichton/filetime
rust
## Code Before: use std::path::Path; use std::{fs, io}; use FileTime; pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { unimplemented!() } pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { unimplemented!() } pub fn from_last_modification_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_last_access_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> { unimplemented!() } ## Instruction: Return an Err instead of panicking ## Code After: use std::path::Path; use std::{fs, io}; use FileTime; pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { Err(io::Error::new(io::ErrorKind::Other, "Wasm not implemented")) } pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { Err(io::Error::new(io::ErrorKind::Other, "Wasm not implemented")) } pub fn from_last_modification_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_last_access_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> { unimplemented!() }
use std::path::Path; use std::{fs, io}; use FileTime; pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { - unimplemented!() + Err(io::Error::new(io::ErrorKind::Other, "Wasm not implemented")) } pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> { - unimplemented!() + Err(io::Error::new(io::ErrorKind::Other, "Wasm not implemented")) } pub fn from_last_modification_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_last_access_time(meta: &fs::Metadata) -> FileTime { unimplemented!() } pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> { unimplemented!() }
4
0.166667
2
2
18ad6cbe012204880c0f0154049583e8ddd00daa
manager-client/app/helpers/fmt-commit.js
manager-client/app/helpers/fmt-commit.js
import Ember from 'ember'; export default Ember.Handlebars.makeBoundHelper(function(sha1, url, branch) { if (Ember.isNone(url)) { return; } if (Ember.isNone(branch)) { return new Ember.Handlebars.SafeString("(<a href='" + url + "'>" + sha1 + "</a>)"); } var _url = url.substr(0, url.indexOf('.git')); var _branch = (branch.indexOf('/') !== -1) ? branch.split('/')[1] : branch; return new Ember.Handlebars.SafeString("(<a href='" + _url + "/compare/" + sha1 + "..." + _branch + "'>" + sha1 + "</a>)"); });
import Ember from 'ember'; export default Ember.Handlebars.makeBoundHelper(function(sha1, url, branch) { if (Ember.isNone(url)) { return; } if (Ember.isNone(branch)) { return new Ember.Handlebars.SafeString("(<a href='" + url + "'>" + sha1 + "</a>)"); } var _url = url.substr(0, url.search(/(\.git)?$/)); var _branch = (branch.indexOf('/') !== -1) ? branch.split('/')[1] : branch; return new Ember.Handlebars.SafeString("(<a href='" + _url + "/compare/" + sha1 + "..." + _branch + "'>" + sha1 + "</a>)"); });
Support git URLs without a .git extension
FIX: Support git URLs without a .git extension
JavaScript
mit
discourse/docker_manager,discourse/docker_manager,discourse/docker_manager,discourse/docker_manager
javascript
## Code Before: import Ember from 'ember'; export default Ember.Handlebars.makeBoundHelper(function(sha1, url, branch) { if (Ember.isNone(url)) { return; } if (Ember.isNone(branch)) { return new Ember.Handlebars.SafeString("(<a href='" + url + "'>" + sha1 + "</a>)"); } var _url = url.substr(0, url.indexOf('.git')); var _branch = (branch.indexOf('/') !== -1) ? branch.split('/')[1] : branch; return new Ember.Handlebars.SafeString("(<a href='" + _url + "/compare/" + sha1 + "..." + _branch + "'>" + sha1 + "</a>)"); }); ## Instruction: FIX: Support git URLs without a .git extension ## Code After: import Ember from 'ember'; export default Ember.Handlebars.makeBoundHelper(function(sha1, url, branch) { if (Ember.isNone(url)) { return; } if (Ember.isNone(branch)) { return new Ember.Handlebars.SafeString("(<a href='" + url + "'>" + sha1 + "</a>)"); } var _url = url.substr(0, url.search(/(\.git)?$/)); var _branch = (branch.indexOf('/') !== -1) ? branch.split('/')[1] : branch; return new Ember.Handlebars.SafeString("(<a href='" + _url + "/compare/" + sha1 + "..." + _branch + "'>" + sha1 + "</a>)"); });
import Ember from 'ember'; export default Ember.Handlebars.makeBoundHelper(function(sha1, url, branch) { if (Ember.isNone(url)) { return; } if (Ember.isNone(branch)) { return new Ember.Handlebars.SafeString("(<a href='" + url + "'>" + sha1 + "</a>)"); } - var _url = url.substr(0, url.indexOf('.git')); ? ^^^ ^^^ ^ ^ + var _url = url.substr(0, url.search(/(\.git)?$/)); ? ^ ^^^^ ^^^ ^^^^ var _branch = (branch.indexOf('/') !== -1) ? branch.split('/')[1] : branch; return new Ember.Handlebars.SafeString("(<a href='" + _url + "/compare/" + sha1 + "..." + _branch + "'>" + sha1 + "</a>)"); });
2
0.166667
1
1
58a1842cb292d30f0d9ba1ff72caac82454f8823
postcss.config.js
postcss.config.js
// @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Local modules. import { config } from './package.json'; // Constants. const INPUT_DIRECTORY = config.input; // const INTERMEDIATE_DIRECTORY = config.intermediate; // const OUTPUT_DIRECTORY = config.output; const PRODUCTION = process.env.NODE_ENV === 'production'; // Helpers. const isTruthy = x => !!x; // Exports. export default { plugins: [ stylelint(), PRODUCTION && purgecss({ content: [ joinPath(INPUT_DIRECTORY, '**/*.njk') ], fontFace: true, keyframes: true }), autoprefixer(), reporter({ clearReportedMessages: true }) ].filter(isTruthy) };
// @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Local modules. import { config } from './package.json'; // Constants. const INPUT_DIRECTORY = config.input; // const INTERMEDIATE_DIRECTORY = config.intermediate; // const OUTPUT_DIRECTORY = config.output; const PRODUCTION = process.env.NODE_ENV === 'production'; // @see https://www.11ty.io/docs/languages/ const ELEVENTY_TEMPLATE_LANGUAGES = [ 'html', 'md', '11ty.js', 'liquid', 'njk', 'hbs', 'mustache', 'ejs', 'haml', 'pug', 'jstl' ].join(','); // Helpers. const isTruthy = x => !!x; // Exports. export default { plugins: [ stylelint(), PRODUCTION && purgecss({ // Purge using templates rather than the full output. content: [ joinPath(INPUT_DIRECTORY, `**/*.{${ELEVENTY_TEMPLATE_LANGUAGES}}`) ], fontFace: true, keyframes: true }), autoprefixer(), reporter({ clearReportedMessages: true }) ].filter(isTruthy) };
Purge from all 11ty template languages.
Purge from all 11ty template languages.
JavaScript
mit
vseventer/vseventer.github.io
javascript
## Code Before: // @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Local modules. import { config } from './package.json'; // Constants. const INPUT_DIRECTORY = config.input; // const INTERMEDIATE_DIRECTORY = config.intermediate; // const OUTPUT_DIRECTORY = config.output; const PRODUCTION = process.env.NODE_ENV === 'production'; // Helpers. const isTruthy = x => !!x; // Exports. export default { plugins: [ stylelint(), PRODUCTION && purgecss({ content: [ joinPath(INPUT_DIRECTORY, '**/*.njk') ], fontFace: true, keyframes: true }), autoprefixer(), reporter({ clearReportedMessages: true }) ].filter(isTruthy) }; ## Instruction: Purge from all 11ty template languages. ## Code After: // @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Local modules. import { config } from './package.json'; // Constants. const INPUT_DIRECTORY = config.input; // const INTERMEDIATE_DIRECTORY = config.intermediate; // const OUTPUT_DIRECTORY = config.output; const PRODUCTION = process.env.NODE_ENV === 'production'; // @see https://www.11ty.io/docs/languages/ const ELEVENTY_TEMPLATE_LANGUAGES = [ 'html', 'md', '11ty.js', 'liquid', 'njk', 'hbs', 'mustache', 'ejs', 'haml', 'pug', 'jstl' ].join(','); // Helpers. const isTruthy = x => !!x; // Exports. export default { plugins: [ stylelint(), PRODUCTION && purgecss({ // Purge using templates rather than the full output. content: [ joinPath(INPUT_DIRECTORY, `**/*.{${ELEVENTY_TEMPLATE_LANGUAGES}}`) ], fontFace: true, keyframes: true }), autoprefixer(), reporter({ clearReportedMessages: true }) ].filter(isTruthy) };
// @see https://github.com/postcss/postcss-loader#configuration // Standard lib. import { join as joinPath } from 'path'; // Package modules. import autoprefixer from 'autoprefixer'; import purgecss from '@fullhuman/postcss-purgecss'; import reporter from 'postcss-reporter'; import stylelint from 'stylelint'; // Local modules. import { config } from './package.json'; // Constants. const INPUT_DIRECTORY = config.input; // const INTERMEDIATE_DIRECTORY = config.intermediate; // const OUTPUT_DIRECTORY = config.output; const PRODUCTION = process.env.NODE_ENV === 'production'; + // @see https://www.11ty.io/docs/languages/ + const ELEVENTY_TEMPLATE_LANGUAGES = [ + 'html', 'md', '11ty.js', 'liquid', 'njk', 'hbs', 'mustache', 'ejs', 'haml', 'pug', 'jstl' + ].join(','); + // Helpers. const isTruthy = x => !!x; // Exports. export default { plugins: [ stylelint(), PRODUCTION && purgecss({ - content: [ joinPath(INPUT_DIRECTORY, '**/*.njk') ], + // Purge using templates rather than the full output. + content: [ joinPath(INPUT_DIRECTORY, `**/*.{${ELEVENTY_TEMPLATE_LANGUAGES}}`) ], fontFace: true, keyframes: true }), autoprefixer(), reporter({ clearReportedMessages: true }) ].filter(isTruthy) };
8
0.222222
7
1
3372240131ea7fabda27ffbe431e5f93366d6050
core/src/plugins/log.syslog/manifest.xml
core/src/plugins/log.syslog/manifest.xml
<?xml version="1.0" encoding="UTF-8"?> <logdriver name="syslog" label="CONF_MESSAGE[Syslog logger]" description="CONF_MESSAGE[Send the logs to the system syslog]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd"> <plugin_info> <plugin_author>Charles du Jeu</plugin_author> <core_relation packaged="true" tested_version="4.2.0"/> </plugin_info> <class_definition filename="plugins/log.syslog/class.sysLogDriver.php" classname="sysLogDriver"/> <client_settings> <resources> <i18n namespace="syslog_logger" path="plugins/log.syslog/i18n"/> </resources> </client_settings> <server_settings> <param name="IDENTIFIER" type="string" description="CONF_MESSAGE[How the logs will be identified in the system logs]" label="CONF_MESSAGE[Identifier]" /> </server_settings> <dependencies> <pluginClass pluginName="log.text"/> </dependencies> </logdriver>
<?xml version="1.0" encoding="UTF-8"?> <logdriver name="syslog" label="CONF_MESSAGE[Syslog logger]" description="CONF_MESSAGE[Send the logs to the system syslog]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd"> <plugin_info> <plugin_author>Charles du Jeu</plugin_author> <core_relation packaged="true" tested_version="4.2.0"/> </plugin_info> <class_definition filename="plugins/log.syslog/class.sysLogDriver.php" classname="sysLogDriver"/> <client_settings> <resources> <i18n namespace="syslog_logger" path="plugins/log.syslog/i18n"/> </resources> </client_settings> <server_settings> <param name="IDENTIFIER" type="string" description="CONF_MESSAGE[How the logs will be identified in the system logs]" label="CONF_MESSAGE[Identifier]" default="pydio" /> </server_settings> <dependencies> <pluginClass pluginName="log.text"/> </dependencies> </logdriver>
Add "pydio" as default identifier for log.syslog
Add "pydio" as default identifier for log.syslog Signed-off-by: Etienne CHAMPETIER <d24370f93c848f9b9e9043ebb082d433901eaa60@fiducial.net>
XML
agpl-3.0
snw35/pydio-core,sespivak/pydio-core,pydio/pydio-core,ChuckDaniels87/pydio-core,sespivak/pydio-core,snw35/pydio-core,ChuckDaniels87/pydio-core,huzergackl/pydio-core,snw35/pydio-core,huzergackl/pydio-core,pydio/pydio-core,sespivak/pydio-core,pydio/pydio-core,sespivak/pydio-core,FredPassos/pydio-core,ChuckDaniels87/pydio-core,sespivak/pydio-core,FredPassos/pydio-core,huzergackl/pydio-core,FredPassos/pydio-core,pydio/pydio-core,snw35/pydio-core,FredPassos/pydio-core,FredPassos/pydio-core,ChuckDaniels87/pydio-core,huzergackl/pydio-core,pydio/pydio-core,snw35/pydio-core,sespivak/pydio-core,sespivak/pydio-core,ChuckDaniels87/pydio-core,huzergackl/pydio-core,snw35/pydio-core,FredPassos/pydio-core,FredPassos/pydio-core,snw35/pydio-core
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <logdriver name="syslog" label="CONF_MESSAGE[Syslog logger]" description="CONF_MESSAGE[Send the logs to the system syslog]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd"> <plugin_info> <plugin_author>Charles du Jeu</plugin_author> <core_relation packaged="true" tested_version="4.2.0"/> </plugin_info> <class_definition filename="plugins/log.syslog/class.sysLogDriver.php" classname="sysLogDriver"/> <client_settings> <resources> <i18n namespace="syslog_logger" path="plugins/log.syslog/i18n"/> </resources> </client_settings> <server_settings> <param name="IDENTIFIER" type="string" description="CONF_MESSAGE[How the logs will be identified in the system logs]" label="CONF_MESSAGE[Identifier]" /> </server_settings> <dependencies> <pluginClass pluginName="log.text"/> </dependencies> </logdriver> ## Instruction: Add "pydio" as default identifier for log.syslog Signed-off-by: Etienne CHAMPETIER <d24370f93c848f9b9e9043ebb082d433901eaa60@fiducial.net> ## Code After: <?xml version="1.0" encoding="UTF-8"?> <logdriver name="syslog" label="CONF_MESSAGE[Syslog logger]" description="CONF_MESSAGE[Send the logs to the system syslog]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd"> <plugin_info> <plugin_author>Charles du Jeu</plugin_author> <core_relation packaged="true" tested_version="4.2.0"/> </plugin_info> <class_definition filename="plugins/log.syslog/class.sysLogDriver.php" classname="sysLogDriver"/> <client_settings> <resources> <i18n namespace="syslog_logger" path="plugins/log.syslog/i18n"/> </resources> </client_settings> <server_settings> <param name="IDENTIFIER" type="string" description="CONF_MESSAGE[How the logs will be identified in the system logs]" label="CONF_MESSAGE[Identifier]" default="pydio" /> </server_settings> <dependencies> <pluginClass pluginName="log.text"/> </dependencies> </logdriver>
<?xml version="1.0" encoding="UTF-8"?> <logdriver name="syslog" label="CONF_MESSAGE[Syslog logger]" description="CONF_MESSAGE[Send the logs to the system syslog]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd"> <plugin_info> <plugin_author>Charles du Jeu</plugin_author> <core_relation packaged="true" tested_version="4.2.0"/> </plugin_info> <class_definition filename="plugins/log.syslog/class.sysLogDriver.php" classname="sysLogDriver"/> <client_settings> <resources> <i18n namespace="syslog_logger" path="plugins/log.syslog/i18n"/> </resources> </client_settings> <server_settings> - <param name="IDENTIFIER" type="string" description="CONF_MESSAGE[How the logs will be identified in the system logs]" label="CONF_MESSAGE[Identifier]" /> + <param name="IDENTIFIER" type="string" description="CONF_MESSAGE[How the logs will be identified in the system logs]" label="CONF_MESSAGE[Identifier]" default="pydio" /> ? ++++++++++++++++ </server_settings> <dependencies> <pluginClass pluginName="log.text"/> </dependencies> </logdriver>
2
0.105263
1
1
a308ad4aa2509e63af7c0e0b56a29c303bdb1267
lib/tic_tac_toe.rb
lib/tic_tac_toe.rb
require "tic_tac_toe/version" module TicTacToe # Your code goes here... class Board def pos coords " " end def move coords, mark end end end
require "tic_tac_toe/version" module TicTacToe # Your code goes here... class Board def pos index " " end def move index, mark end end end
Change variable name passed to methods
Change variable name passed to methods
Ruby
mit
RadicalZephyr/tic_tac_toe,RadicalZephyr/tic_tac_toe
ruby
## Code Before: require "tic_tac_toe/version" module TicTacToe # Your code goes here... class Board def pos coords " " end def move coords, mark end end end ## Instruction: Change variable name passed to methods ## Code After: require "tic_tac_toe/version" module TicTacToe # Your code goes here... class Board def pos index " " end def move index, mark end end end
require "tic_tac_toe/version" module TicTacToe # Your code goes here... class Board - def pos coords + def pos index " " end - def move coords, mark ? ^^^^ ^ + def move index, mark ? ^^ ^^ end end end
4
0.285714
2
2
ee3ca03fc5b9e7f4549d7bbac8d3d00e2f872c19
recipes/libbacktrace/meta.yaml
recipes/libbacktrace/meta.yaml
{% set version = "1.0" %} package: name: backtrace version: {{ version }} source: url: https://github.com/ianlancetaylor/libbacktrace/archive/177940370e4a6b2509e92a0aaa9749184e64af43.zip sha256: 21ac9a4209f7aeef766c482be53a7fa365063c031c7077e2070b491202983b31 build: number: 0 skip: true # [win] requirements: build: - zlib 1.2.11 # [linux] run: - zlib 1.2.11 # [linux] test: commands: - test -f ${PREFIX}/lib/libbacktrace.a - test -f ${PREFIX}/lib/libbacktrace.so # [linux] - test -f ${PREFIX}/lib/libbacktrace.dylib # [osx] - test -f ${PREFIX}/include/backtrace.h about: home: https://github.com/ianlancetaylor/libbacktrace license: BSD 3-clause summary: A C library that may be linked into a C/C++ program to produce symbolic backtraces license_file: LICENSE extra: recipe-maintainers: - bluescarni
{% set version = "1.0" %} package: name: backtrace version: {{ version }} source: url: https://github.com/ianlancetaylor/libbacktrace/archive/177940370e4a6b2509e92a0aaa9749184e64af43.zip sha256: 21ac9a4209f7aeef766c482be53a7fa365063c031c7077e2070b491202983b31 build: number: 0 skip: true # [win and osx] requirements: build: - zlib 1.2.11 run: - zlib 1.2.11 test: commands: - test -f ${PREFIX}/lib/libbacktrace.a - test -f ${PREFIX}/lib/libbacktrace.so - test -f ${PREFIX}/include/backtrace.h about: home: https://github.com/ianlancetaylor/libbacktrace license: BSD 3-clause summary: A C library that may be linked into a C/C++ program to produce symbolic backtraces license_file: LICENSE extra: recipe-maintainers: - bluescarni
Disable the OSX build altogether.
Disable the OSX build altogether.
YAML
bsd-3-clause
ocefpaf/staged-recipes,rvalieris/staged-recipes,ocefpaf/staged-recipes,SylvainCorlay/staged-recipes,kwilcox/staged-recipes,jakirkham/staged-recipes,conda-forge/staged-recipes,sodre/staged-recipes,petrushy/staged-recipes,kwilcox/staged-recipes,cpaulik/staged-recipes,ceholden/staged-recipes,jakirkham/staged-recipes,sodre/staged-recipes,SylvainCorlay/staged-recipes,cpaulik/staged-recipes,goanpeca/staged-recipes,pmlandwehr/staged-recipes,barkls/staged-recipes,stuertz/staged-recipes,hadim/staged-recipes,Juanlu001/staged-recipes,shadowwalkersb/staged-recipes,rvalieris/staged-recipes,rmcgibbo/staged-recipes,chrisburr/staged-recipes,patricksnape/staged-recipes,shadowwalkersb/staged-recipes,guillochon/staged-recipes,Cashalow/staged-recipes,ceholden/staged-recipes,mcs07/staged-recipes,ReimarBauer/staged-recipes,jochym/staged-recipes,igortg/staged-recipes,pmlandwehr/staged-recipes,stuertz/staged-recipes,synapticarbors/staged-recipes,basnijholt/staged-recipes,patricksnape/staged-recipes,birdsarah/staged-recipes,birdsarah/staged-recipes,glemaitre/staged-recipes,isuruf/staged-recipes,jochym/staged-recipes,barkls/staged-recipes,mcs07/staged-recipes,NOAA-ORR-ERD/staged-recipes,synapticarbors/staged-recipes,guillochon/staged-recipes,scopatz/staged-recipes,rmcgibbo/staged-recipes,glemaitre/staged-recipes,mariusvniekerk/staged-recipes,sodre/staged-recipes,isuruf/staged-recipes,hadim/staged-recipes,Cashalow/staged-recipes,conda-forge/staged-recipes,jjhelmus/staged-recipes,asmeurer/staged-recipes,NOAA-ORR-ERD/staged-recipes,dschreij/staged-recipes,johanneskoester/staged-recipes,igortg/staged-recipes,Juanlu001/staged-recipes,goanpeca/staged-recipes,dschreij/staged-recipes,petrushy/staged-recipes,johanneskoester/staged-recipes,chrisburr/staged-recipes,basnijholt/staged-recipes,scopatz/staged-recipes,jjhelmus/staged-recipes,mariusvniekerk/staged-recipes,ReimarBauer/staged-recipes,asmeurer/staged-recipes
yaml
## Code Before: {% set version = "1.0" %} package: name: backtrace version: {{ version }} source: url: https://github.com/ianlancetaylor/libbacktrace/archive/177940370e4a6b2509e92a0aaa9749184e64af43.zip sha256: 21ac9a4209f7aeef766c482be53a7fa365063c031c7077e2070b491202983b31 build: number: 0 skip: true # [win] requirements: build: - zlib 1.2.11 # [linux] run: - zlib 1.2.11 # [linux] test: commands: - test -f ${PREFIX}/lib/libbacktrace.a - test -f ${PREFIX}/lib/libbacktrace.so # [linux] - test -f ${PREFIX}/lib/libbacktrace.dylib # [osx] - test -f ${PREFIX}/include/backtrace.h about: home: https://github.com/ianlancetaylor/libbacktrace license: BSD 3-clause summary: A C library that may be linked into a C/C++ program to produce symbolic backtraces license_file: LICENSE extra: recipe-maintainers: - bluescarni ## Instruction: Disable the OSX build altogether. ## Code After: {% set version = "1.0" %} package: name: backtrace version: {{ version }} source: url: https://github.com/ianlancetaylor/libbacktrace/archive/177940370e4a6b2509e92a0aaa9749184e64af43.zip sha256: 21ac9a4209f7aeef766c482be53a7fa365063c031c7077e2070b491202983b31 build: number: 0 skip: true # [win and osx] requirements: build: - zlib 1.2.11 run: - zlib 1.2.11 test: commands: - test -f ${PREFIX}/lib/libbacktrace.a - test -f ${PREFIX}/lib/libbacktrace.so - test -f ${PREFIX}/include/backtrace.h about: home: https://github.com/ianlancetaylor/libbacktrace license: BSD 3-clause summary: A C library that may be linked into a C/C++ program to produce symbolic backtraces license_file: LICENSE extra: recipe-maintainers: - bluescarni
{% set version = "1.0" %} package: name: backtrace version: {{ version }} source: url: https://github.com/ianlancetaylor/libbacktrace/archive/177940370e4a6b2509e92a0aaa9749184e64af43.zip sha256: 21ac9a4209f7aeef766c482be53a7fa365063c031c7077e2070b491202983b31 build: number: 0 - skip: true # [win] + skip: true # [win and osx] ? ++++++++ requirements: build: - - zlib 1.2.11 # [linux] ? ----------- + - zlib 1.2.11 run: - - zlib 1.2.11 # [linux] ? ----------- + - zlib 1.2.11 test: commands: - test -f ${PREFIX}/lib/libbacktrace.a - - test -f ${PREFIX}/lib/libbacktrace.so # [linux] ? -------------- + - test -f ${PREFIX}/lib/libbacktrace.so - - test -f ${PREFIX}/lib/libbacktrace.dylib # [osx] - test -f ${PREFIX}/include/backtrace.h about: home: https://github.com/ianlancetaylor/libbacktrace license: BSD 3-clause summary: A C library that may be linked into a C/C++ program to produce symbolic backtraces license_file: LICENSE extra: recipe-maintainers: - bluescarni
9
0.25
4
5
7182074fbf5d6c5892c33a25137dc0981b699d27
c2corg_ui/static/partials/advancedsearch.html
c2corg_ui/static/partials/advancedsearch.html
<div class="list"> <div class="list-item" ng-class="[searchCtrl.doctype]" ng-repeat="doc in searchCtrl.documents"> <app-card app-card-doc="doc"></app-card> </div> </div>
<div class="list" app-loading> <div class="list-item" ng-class="[searchCtrl.doctype]" ng-repeat="doc in searchCtrl.documents"> <app-card app-card-doc="doc"></app-card> </div> </div>
Add missing loading indicator in the advanced search
Add missing loading indicator in the advanced search
HTML
agpl-3.0
c2corg/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui,olaurendeau/v6_ui,c2corg/v6_ui,olaurendeau/v6_ui,Courgetteandratatouille/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui,c2corg/v6_ui,c2corg/v6_ui,Courgetteandratatouille/v6_ui
html
## Code Before: <div class="list"> <div class="list-item" ng-class="[searchCtrl.doctype]" ng-repeat="doc in searchCtrl.documents"> <app-card app-card-doc="doc"></app-card> </div> </div> ## Instruction: Add missing loading indicator in the advanced search ## Code After: <div class="list" app-loading> <div class="list-item" ng-class="[searchCtrl.doctype]" ng-repeat="doc in searchCtrl.documents"> <app-card app-card-doc="doc"></app-card> </div> </div>
- <div class="list"> + <div class="list" app-loading> ? ++++++++++++ <div class="list-item" ng-class="[searchCtrl.doctype]" ng-repeat="doc in searchCtrl.documents"> <app-card app-card-doc="doc"></app-card> </div> </div>
2
0.4
1
1
cd40c0762f5e2343a0deb766a5dc585223e9588c
core/spec-unit/interactors/queries/activities/graph_user_ids_following_fact_spec.rb
core/spec-unit/interactors/queries/activities/graph_user_ids_following_fact_spec.rb
require_relative '../../../../app/interactors/queries/activities/graph_user_ids_following_fact' require 'pavlov_helper' describe Queries::Activities::GraphUserIdsFollowingFact do include PavlovSupport describe '#execute' do it 'returns a unique list of ids' do creator_ids = [1, 2] opinionated_users_ids = [2, 3] evidence_followers_ids = [3, 4] query = described_class.new mock query.should_receive(:creator_ids) .and_return(creator_ids) query.should_receive(:opinionated_users_ids) .and_return(opinionated_users_ids) query.should_receive(:evidence_followers_ids) .and_return(evidence_followers_ids) expect(query.execute).to eq [1, 2, 3, 4] end end describe '#creator_ids' do it 'returns the Facts creator id' do fact = mock created_by_id = 1 fact.should_receive(:created_by_id).and_return(created_by_id) query = described_class.new fact expect(query.creator_ids).to eq [created_by_id] end end end
require_relative '../../../../app/interactors/queries/activities/graph_user_ids_following_fact' require 'pavlov_helper' describe Queries::Activities::GraphUserIdsFollowingFact do include PavlovSupport describe '#call' do it 'returns a unique list of ids' do creator_ids = [1, 2] opinionated_users_ids = [2, 3] evidence_followers_ids = [3, 4] query = described_class.new mock query.should_receive(:creator_ids) .and_return(creator_ids) query.should_receive(:opinionated_users_ids) .and_return(opinionated_users_ids) query.should_receive(:evidence_followers_ids) .and_return(evidence_followers_ids) expect(query.call).to eq [1, 2, 3, 4] end end describe '#creator_ids' do it 'returns the Facts creator id' do fact = mock created_by_id = 1 fact.should_receive(:created_by_id).and_return(created_by_id) query = described_class.new fact expect(query.creator_ids).to eq [created_by_id] end end end
Use .call instead of .execute
Use .call instead of .execute
Ruby
mit
daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core
ruby
## Code Before: require_relative '../../../../app/interactors/queries/activities/graph_user_ids_following_fact' require 'pavlov_helper' describe Queries::Activities::GraphUserIdsFollowingFact do include PavlovSupport describe '#execute' do it 'returns a unique list of ids' do creator_ids = [1, 2] opinionated_users_ids = [2, 3] evidence_followers_ids = [3, 4] query = described_class.new mock query.should_receive(:creator_ids) .and_return(creator_ids) query.should_receive(:opinionated_users_ids) .and_return(opinionated_users_ids) query.should_receive(:evidence_followers_ids) .and_return(evidence_followers_ids) expect(query.execute).to eq [1, 2, 3, 4] end end describe '#creator_ids' do it 'returns the Facts creator id' do fact = mock created_by_id = 1 fact.should_receive(:created_by_id).and_return(created_by_id) query = described_class.new fact expect(query.creator_ids).to eq [created_by_id] end end end ## Instruction: Use .call instead of .execute ## Code After: require_relative '../../../../app/interactors/queries/activities/graph_user_ids_following_fact' require 'pavlov_helper' describe Queries::Activities::GraphUserIdsFollowingFact do include PavlovSupport describe '#call' do it 'returns a unique list of ids' do creator_ids = [1, 2] opinionated_users_ids = [2, 3] evidence_followers_ids = [3, 4] query = described_class.new mock query.should_receive(:creator_ids) .and_return(creator_ids) query.should_receive(:opinionated_users_ids) .and_return(opinionated_users_ids) query.should_receive(:evidence_followers_ids) .and_return(evidence_followers_ids) expect(query.call).to eq [1, 2, 3, 4] end end describe '#creator_ids' do it 'returns the Facts creator id' do fact = mock created_by_id = 1 fact.should_receive(:created_by_id).and_return(created_by_id) query = described_class.new fact expect(query.creator_ids).to eq [created_by_id] end end end
require_relative '../../../../app/interactors/queries/activities/graph_user_ids_following_fact' require 'pavlov_helper' describe Queries::Activities::GraphUserIdsFollowingFact do include PavlovSupport - describe '#execute' do ? --- ^^^ + describe '#call' do ? ^^^ it 'returns a unique list of ids' do creator_ids = [1, 2] opinionated_users_ids = [2, 3] evidence_followers_ids = [3, 4] query = described_class.new mock query.should_receive(:creator_ids) .and_return(creator_ids) query.should_receive(:opinionated_users_ids) .and_return(opinionated_users_ids) query.should_receive(:evidence_followers_ids) .and_return(evidence_followers_ids) - expect(query.execute).to eq [1, 2, 3, 4] ? --- ^^^ + expect(query.call).to eq [1, 2, 3, 4] ? ^^^ end end describe '#creator_ids' do it 'returns the Facts creator id' do fact = mock created_by_id = 1 fact.should_receive(:created_by_id).and_return(created_by_id) query = described_class.new fact expect(query.creator_ids).to eq [created_by_id] end end end
4
0.102564
2
2
b990c8741af5876bf3388688cd826bd55326796e
helm/kube-prometheus/README.md
helm/kube-prometheus/README.md
This is the helm chart equivalent of `contrib/kube-prometheus`. # Prerequisites Requires helm >= 2.5.0
This is the helm chart equivalent of `contrib/kube-prometheus`. # Prerequisites Requires helm >= 2.5.0 # Installing on GKE/EKS/AKS Since the controlplane is managed in these solutions, make sure you tell prometheus to not monitor the scheduler or controller-manager: ``` deployKubeScheduler: False deployKubeControllerManager: False ``` Then install your custom values (for example): ``` helm upgrade --install kube-prometheus coreos/kube-prometheus --namespace monitoring -f /root/.helm/kube-prometheus-values.yml" ```
Add documentation bit about ignoring controlplane targets on managed controlplane solutions
Add documentation bit about ignoring controlplane targets on managed controlplane solutions
Markdown
apache-2.0
jescarri/prometheus-operator,jescarri/prometheus-operator,coreos/prometheus-operator,coreos/prometheus-operator
markdown
## Code Before: This is the helm chart equivalent of `contrib/kube-prometheus`. # Prerequisites Requires helm >= 2.5.0 ## Instruction: Add documentation bit about ignoring controlplane targets on managed controlplane solutions ## Code After: This is the helm chart equivalent of `contrib/kube-prometheus`. # Prerequisites Requires helm >= 2.5.0 # Installing on GKE/EKS/AKS Since the controlplane is managed in these solutions, make sure you tell prometheus to not monitor the scheduler or controller-manager: ``` deployKubeScheduler: False deployKubeControllerManager: False ``` Then install your custom values (for example): ``` helm upgrade --install kube-prometheus coreos/kube-prometheus --namespace monitoring -f /root/.helm/kube-prometheus-values.yml" ```
This is the helm chart equivalent of `contrib/kube-prometheus`. # Prerequisites Requires helm >= 2.5.0 + + # Installing on GKE/EKS/AKS + + Since the controlplane is managed in these solutions, make sure you tell prometheus to not monitor the scheduler or controller-manager: + + ``` + deployKubeScheduler: False + deployKubeControllerManager: False + ``` + + Then install your custom values (for example): + + ``` + helm upgrade --install kube-prometheus coreos/kube-prometheus --namespace monitoring -f /root/.helm/kube-prometheus-values.yml" + ```
15
2.5
15
0
cb6fa6b54ca3e1908037a1b1a3399d8bd4b1be58
djoser/compat.py
djoser/compat.py
from djoser.conf import settings try: from django.contrib.auth.password_validation import validate_password except ImportError: from password_validation import validate_password __all__ = ['settings', 'validate_password'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: # Assume we are Django >= 1.11 return user.get_email_field_name() except AttributeError: # we are using Django < 1.11 return settings.USER_EMAIL_FIELD_NAME
from djoser.conf import settings try: from django.contrib.auth.password_validation import validate_password except ImportError: # pragma: no cover from password_validation import validate_password __all__ = ['settings', 'validate_password'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: # Assume we are Django >= 1.11 return user.get_email_field_name() except AttributeError: # we are using Django < 1.11 return settings.USER_EMAIL_FIELD_NAME
Fix invalid fallback leading to circular calls
Fix invalid fallback leading to circular calls Remove redundant finally
Python
mit
sunscrapers/djoser,akalipetis/djoser,sunscrapers/djoser,sunscrapers/djoser,akalipetis/djoser
python
## Code Before: from djoser.conf import settings try: from django.contrib.auth.password_validation import validate_password except ImportError: from password_validation import validate_password __all__ = ['settings', 'validate_password'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: # Assume we are Django >= 1.11 return user.get_email_field_name() except AttributeError: # we are using Django < 1.11 return settings.USER_EMAIL_FIELD_NAME ## Instruction: Fix invalid fallback leading to circular calls Remove redundant finally ## Code After: from djoser.conf import settings try: from django.contrib.auth.password_validation import validate_password except ImportError: # pragma: no cover from password_validation import validate_password __all__ = ['settings', 'validate_password'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: # Assume we are Django >= 1.11 return user.get_email_field_name() except AttributeError: # we are using Django < 1.11 return settings.USER_EMAIL_FIELD_NAME
from djoser.conf import settings try: from django.contrib.auth.password_validation import validate_password - except ImportError: + except ImportError: # pragma: no cover from password_validation import validate_password __all__ = ['settings', 'validate_password'] def get_user_email(user): email_field_name = get_user_email_field_name(user) return getattr(user, email_field_name, None) def get_user_email_field_name(user): try: # Assume we are Django >= 1.11 return user.get_email_field_name() except AttributeError: # we are using Django < 1.11 return settings.USER_EMAIL_FIELD_NAME
2
0.1
1
1
4114a4b7bcb79f3c3f213b338365ad258d88bdbe
README.md
README.md
Sets of material design components built with web technologies ## Summary Slup was created by our desire for a performing UI framework following Material Design Guidelines. So we started developing it with three core concepts in mind: * High Performance * Meticulousness * Modularity ## Getting Started Slup is divided in **packages**, which are basically Material Design Components: this means that you can rather install the entire framework or just the components that you'd like to use ### Installation Slup can be installed whit **npm** ``` npm install --save @slup ``` or whit **yarn** ( We highly reccomend using it because it's much faster ) ``` yarn add --dev @slup ``` ## Built with * [Inferno.js](https://infernojs.org/) - The React-like library used for creating components * [Styled Components](https://www.styled-components.com/) - The tool used for styling our components * [Lerna.js](https://lernajs.io/) - The tool used for managing our multi-package framework ## Authors * LucaT * Gejsi ## License This project is licensed under the MIT License
<h1 align='center'> <img src='http://svgshare.com/i/343.svg' width='65%' /> <h5 align='center'>Sets of material design components built with web technologies</h5> </h1> ## Summary Slup was created by our desire for a performing UI framework following Material Design Guidelines. So we started developing it with three core concepts in mind: * High Performance * Meticulousness * Modularity ## Getting Started Slup is divided in **packages**, which are basically Material Design Components: this means that you can rather install the entire framework or just the components that you'd like to use ### Installation Slup can be installed whit **npm** ``` npm install --save @slup ``` or whit **yarn** ( We highly reccomend using it because it's much faster ) ``` yarn add --dev @slup ``` ## Built with * [Inferno.js](https://infernojs.org/) - The React-like library used for creating components * [Styled Components](https://www.styled-components.com/) - The tool used for styling our components * [Lerna.js](https://lernajs.io/) - The tool used for managing our multi-package framework ## Authors * LucaT * Gejsi ## License This project is licensed under the MIT License
Insert the logo in the readme
:memo: Insert the logo in the readme
Markdown
mit
slupjs/slup,slupjs/slup
markdown
## Code Before: Sets of material design components built with web technologies ## Summary Slup was created by our desire for a performing UI framework following Material Design Guidelines. So we started developing it with three core concepts in mind: * High Performance * Meticulousness * Modularity ## Getting Started Slup is divided in **packages**, which are basically Material Design Components: this means that you can rather install the entire framework or just the components that you'd like to use ### Installation Slup can be installed whit **npm** ``` npm install --save @slup ``` or whit **yarn** ( We highly reccomend using it because it's much faster ) ``` yarn add --dev @slup ``` ## Built with * [Inferno.js](https://infernojs.org/) - The React-like library used for creating components * [Styled Components](https://www.styled-components.com/) - The tool used for styling our components * [Lerna.js](https://lernajs.io/) - The tool used for managing our multi-package framework ## Authors * LucaT * Gejsi ## License This project is licensed under the MIT License ## Instruction: :memo: Insert the logo in the readme ## Code After: <h1 align='center'> <img src='http://svgshare.com/i/343.svg' width='65%' /> <h5 align='center'>Sets of material design components built with web technologies</h5> </h1> ## Summary Slup was created by our desire for a performing UI framework following Material Design Guidelines. So we started developing it with three core concepts in mind: * High Performance * Meticulousness * Modularity ## Getting Started Slup is divided in **packages**, which are basically Material Design Components: this means that you can rather install the entire framework or just the components that you'd like to use ### Installation Slup can be installed whit **npm** ``` npm install --save @slup ``` or whit **yarn** ( We highly reccomend using it because it's much faster ) ``` yarn add --dev @slup ``` ## Built with * [Inferno.js](https://infernojs.org/) - The React-like library used for creating components * [Styled Components](https://www.styled-components.com/) - The tool used for styling our components * [Lerna.js](https://lernajs.io/) - The tool used for managing our multi-package framework ## Authors * LucaT * Gejsi ## License This project is licensed under the MIT License
- + <h1 align='center'> + <img src='http://svgshare.com/i/343.svg' width='65%' /> + - Sets of material design components built with web technologies + <h5 align='center'>Sets of material design components built with web technologies</h5> ? +++++++++++++++++++++ +++++ + </h1> ## Summary Slup was created by our desire for a performing UI framework following Material Design Guidelines. So we started developing it with three core concepts in mind: * High Performance * Meticulousness * Modularity ## Getting Started Slup is divided in **packages**, which are basically Material Design Components: this means that you can rather install the entire framework or just the components that you'd like to use ### Installation Slup can be installed whit **npm** ``` npm install --save @slup ``` or whit **yarn** ( We highly reccomend using it because it's much faster ) ``` yarn add --dev @slup ``` ## Built with * [Inferno.js](https://infernojs.org/) - The React-like library used for creating components * [Styled Components](https://www.styled-components.com/) - The tool used for styling our components * [Lerna.js](https://lernajs.io/) - The tool used for managing our multi-package framework ## Authors * LucaT * Gejsi ## License This project is licensed under the MIT License
7
0.166667
5
2
7596d4615c145b8c938fddf5bcfa37a0f7c7a727
app/helpers/config_helper.rb
app/helpers/config_helper.rb
module ConfigHelper def global_config { env: Rails.env.to_s, default_currency: Settings.default_currency, facebook: Settings.facebook.to_hash.slice(:pixel_id), recaptcha3: Settings.recaptcha3.to_hash.slice(:site_key), recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key), eoy_thermometer: eoy_thermometer_config }.transform_keys! do |key| key.to_s.camelize(:lower) end end def eoy_thermometer_config start_date = Date.new(2019, 11, 1) end_date = Date.new(2019, 12, 31) # end of year goal in cents eoy_goal = 60_000_000 total_donations = TransactionService.totals(start_date...end_date) goals = TransactionService.goals(eoy_goal) { meta: { start: start_date.to_s, end: end_date.to_s }, data: { active: true, total_donations: total_donations, goals: goals, offset: 0, title: '', percentage: goals[:USD].zero? ? 0 : (total_donations[:USD] / goals[:USD] * 100) } } end end
module ConfigHelper def global_config { env: Rails.env.to_s, default_currency: Settings.default_currency, facebook: Settings.facebook.to_hash.slice(:pixel_id), recaptcha3: Settings.recaptcha3.to_hash.slice(:site_key), recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key) }.deep_transform_keys! do |key| key.to_s.camelize(:lower) end.merge( eoyThermometer: eoy_thermometer_config ) end def eoy_thermometer_config start_date = Date.new(2019, 11, 1) end_date = Date.new(2019, 12, 31) # end of year goal in cents eoy_goal = 60_000_000 total_donations = TransactionService.totals(start_date...end_date) goals = TransactionService.goals(eoy_goal) { meta: { start: start_date.to_s, end: end_date.to_s }, data: { active: true, total_donations: total_donations, goals: goals, offset: 0, title: '', percentage: goals[:USD].zero? ? 0 : (total_donations[:USD] / goals[:USD] * 100) } } end end
Return to deep_transform_keys so that site_key is camelized
Return to deep_transform_keys so that site_key is camelized
Ruby
mit
SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign
ruby
## Code Before: module ConfigHelper def global_config { env: Rails.env.to_s, default_currency: Settings.default_currency, facebook: Settings.facebook.to_hash.slice(:pixel_id), recaptcha3: Settings.recaptcha3.to_hash.slice(:site_key), recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key), eoy_thermometer: eoy_thermometer_config }.transform_keys! do |key| key.to_s.camelize(:lower) end end def eoy_thermometer_config start_date = Date.new(2019, 11, 1) end_date = Date.new(2019, 12, 31) # end of year goal in cents eoy_goal = 60_000_000 total_donations = TransactionService.totals(start_date...end_date) goals = TransactionService.goals(eoy_goal) { meta: { start: start_date.to_s, end: end_date.to_s }, data: { active: true, total_donations: total_donations, goals: goals, offset: 0, title: '', percentage: goals[:USD].zero? ? 0 : (total_donations[:USD] / goals[:USD] * 100) } } end end ## Instruction: Return to deep_transform_keys so that site_key is camelized ## Code After: module ConfigHelper def global_config { env: Rails.env.to_s, default_currency: Settings.default_currency, facebook: Settings.facebook.to_hash.slice(:pixel_id), recaptcha3: Settings.recaptcha3.to_hash.slice(:site_key), recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key) }.deep_transform_keys! do |key| key.to_s.camelize(:lower) end.merge( eoyThermometer: eoy_thermometer_config ) end def eoy_thermometer_config start_date = Date.new(2019, 11, 1) end_date = Date.new(2019, 12, 31) # end of year goal in cents eoy_goal = 60_000_000 total_donations = TransactionService.totals(start_date...end_date) goals = TransactionService.goals(eoy_goal) { meta: { start: start_date.to_s, end: end_date.to_s }, data: { active: true, total_donations: total_donations, goals: goals, offset: 0, title: '', percentage: goals[:USD].zero? ? 0 : (total_donations[:USD] / goals[:USD] * 100) } } end end
module ConfigHelper def global_config { env: Rails.env.to_s, default_currency: Settings.default_currency, facebook: Settings.facebook.to_hash.slice(:pixel_id), recaptcha3: Settings.recaptcha3.to_hash.slice(:site_key), - recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key), ? - + recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key) - eoy_thermometer: eoy_thermometer_config - }.transform_keys! do |key| + }.deep_transform_keys! do |key| ? +++++ key.to_s.camelize(:lower) - end + end.merge( + eoyThermometer: eoy_thermometer_config + ) end def eoy_thermometer_config start_date = Date.new(2019, 11, 1) end_date = Date.new(2019, 12, 31) # end of year goal in cents eoy_goal = 60_000_000 total_donations = TransactionService.totals(start_date...end_date) goals = TransactionService.goals(eoy_goal) { meta: { start: start_date.to_s, end: end_date.to_s }, data: { active: true, total_donations: total_donations, goals: goals, offset: 0, title: '', percentage: goals[:USD].zero? ? 0 : (total_donations[:USD] / goals[:USD] * 100) } } end end
9
0.257143
5
4
81ea1101839059cbb57011f0d1af5b06ebe3d458
setup.py
setup.py
from setuptools import setup setup( name='lektor-root-relative-path', author=u'Atsushi Suga', author_email='a2csuga@users.noreply.github.com', version='0.1', url='http://github.com/a2csuga/lektor-root-relative-path', license='MIT', packages=['lektor_root_relative_path'], description='Root relative path plugin for Lektor', entry_points={ 'lektor.plugins': [ 'root-relative-path = lektor_root_relative_path:RootRelativePathPlugin', ] } )
from setuptools import setup setup( name='lektor-root-relative-path', author=u'Atsushi Suga', author_email='a2csuga@users.noreply.github.com', version='0.1', url='http://github.com/a2csuga/lektor-root-relative-path', license='MIT', install_requires=open('requirements.txt').read(), packages=['lektor_root_relative_path'], description='Root relative path plugin for Lektor', entry_points={ 'lektor.plugins': [ 'root-relative-path = lektor_root_relative_path:RootRelativePathPlugin', ] } )
Add dependency, so it gets auto installed when installing the plugin.
Add dependency, so it gets auto installed when installing the plugin.
Python
mit
a2csuga/lektor-root-relative-path
python
## Code Before: from setuptools import setup setup( name='lektor-root-relative-path', author=u'Atsushi Suga', author_email='a2csuga@users.noreply.github.com', version='0.1', url='http://github.com/a2csuga/lektor-root-relative-path', license='MIT', packages=['lektor_root_relative_path'], description='Root relative path plugin for Lektor', entry_points={ 'lektor.plugins': [ 'root-relative-path = lektor_root_relative_path:RootRelativePathPlugin', ] } ) ## Instruction: Add dependency, so it gets auto installed when installing the plugin. ## Code After: from setuptools import setup setup( name='lektor-root-relative-path', author=u'Atsushi Suga', author_email='a2csuga@users.noreply.github.com', version='0.1', url='http://github.com/a2csuga/lektor-root-relative-path', license='MIT', install_requires=open('requirements.txt').read(), packages=['lektor_root_relative_path'], description='Root relative path plugin for Lektor', entry_points={ 'lektor.plugins': [ 'root-relative-path = lektor_root_relative_path:RootRelativePathPlugin', ] } )
from setuptools import setup setup( name='lektor-root-relative-path', author=u'Atsushi Suga', author_email='a2csuga@users.noreply.github.com', version='0.1', url='http://github.com/a2csuga/lektor-root-relative-path', license='MIT', + install_requires=open('requirements.txt').read(), packages=['lektor_root_relative_path'], description='Root relative path plugin for Lektor', entry_points={ 'lektor.plugins': [ 'root-relative-path = lektor_root_relative_path:RootRelativePathPlugin', ] } )
1
0.058824
1
0
ce7ce170fc981bc221e329bc5621f60e5ba50f70
build.sbt
build.sbt
name := "debiki-tck-dao" organization := "com.debiki" version := "0.0.2-SNAPSHOT" scalaVersion := "2.10.0-RC1" libraryDependencies ++= Seq( "junit" % "junit" % "4.7", //"org.specs2" %% "specs2" % "1.12.2" —> unresolved dependency: //"org.specs2#specs2_2.10;1.12.2: not found" "org.specs2" % "specs2_2.10.0-RC1" % "1.12.2" ) // See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0 ideaPackagePrefix := None // vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list
name := "debiki-tck-dao" organization := "com.debiki" version := "0.0.2-SNAPSHOT" scalaVersion := "2.10.0" libraryDependencies ++= Seq( "junit" % "junit" % "4.7", "org.specs2" %% "specs2" % "1.14" ) // See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0 ideaPackagePrefix := None // vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list
Update from Scala 2.10.0-RC1 to 2.10.0.
Update from Scala 2.10.0-RC1 to 2.10.0.
Scala
agpl-3.0
debiki/debiki-server-old,debiki/debiki-server-old,debiki/debiki-server-old,debiki/debiki-server-old
scala
## Code Before: name := "debiki-tck-dao" organization := "com.debiki" version := "0.0.2-SNAPSHOT" scalaVersion := "2.10.0-RC1" libraryDependencies ++= Seq( "junit" % "junit" % "4.7", //"org.specs2" %% "specs2" % "1.12.2" —> unresolved dependency: //"org.specs2#specs2_2.10;1.12.2: not found" "org.specs2" % "specs2_2.10.0-RC1" % "1.12.2" ) // See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0 ideaPackagePrefix := None // vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list ## Instruction: Update from Scala 2.10.0-RC1 to 2.10.0. ## Code After: name := "debiki-tck-dao" organization := "com.debiki" version := "0.0.2-SNAPSHOT" scalaVersion := "2.10.0" libraryDependencies ++= Seq( "junit" % "junit" % "4.7", "org.specs2" %% "specs2" % "1.14" ) // See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0 ideaPackagePrefix := None // vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list
name := "debiki-tck-dao" organization := "com.debiki" version := "0.0.2-SNAPSHOT" - scalaVersion := "2.10.0-RC1" ? ---- + scalaVersion := "2.10.0" libraryDependencies ++= Seq( "junit" % "junit" % "4.7", - //"org.specs2" %% "specs2" % "1.12.2" —> unresolved dependency: //"org.specs2#specs2_2.10;1.12.2: not found" - "org.specs2" % "specs2_2.10.0-RC1" % "1.12.2" ? ----------- ^^^ + "org.specs2" %% "specs2" % "1.14" ? + ^ ) // See: https://groups.google.com/forum/?fromgroups=#!topic/simple-build-tool/bkF1IDZj4L0 ideaPackagePrefix := None // vim: fdm=marker et ts=2 sw=2 tw=80 fo=tcqwn list
5
0.277778
2
3
001c955ffe8aef9ea3f0c6c5bcf8a857c3c10aeb
securethenews/sites/wagtail_hooks.py
securethenews/sites/wagtail_hooks.py
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False list_display = ('name', 'domain', 'score') def score(self, obj): return '{} / 100'.format(obj.scans.latest().score) score.short_description = 'Score' search_fields = ('name', 'domain') modeladmin_register(SiteAdmin)
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False list_display = ('name', 'domain', 'score', 'grade') def score(self, obj): return '{} / 100'.format(obj.scans.latest().score) score.short_description = 'Score' def grade(self, obj): return obj.scans.latest().grade['grade'] grade.short_description = 'Grade' search_fields = ('name', 'domain') modeladmin_register(SiteAdmin)
Add grade to list display for News Sites
Add grade to list display for News Sites
Python
agpl-3.0
freedomofpress/securethenews,DNSUsher/securethenews,freedomofpress/securethenews,DNSUsher/securethenews,freedomofpress/securethenews,freedomofpress/securethenews,DNSUsher/securethenews
python
## Code Before: from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False list_display = ('name', 'domain', 'score') def score(self, obj): return '{} / 100'.format(obj.scans.latest().score) score.short_description = 'Score' search_fields = ('name', 'domain') modeladmin_register(SiteAdmin) ## Instruction: Add grade to list display for News Sites ## Code After: from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False list_display = ('name', 'domain', 'score', 'grade') def score(self, obj): return '{} / 100'.format(obj.scans.latest().score) score.short_description = 'Score' def grade(self, obj): return obj.scans.latest().grade['grade'] grade.short_description = 'Grade' search_fields = ('name', 'domain') modeladmin_register(SiteAdmin)
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from .models import Site class SiteAdmin(ModelAdmin): model = Site menu_label = 'News Sites' menu_icon = 'site' add_to_settings_menu = False - list_display = ('name', 'domain', 'score') + list_display = ('name', 'domain', 'score', 'grade') ? +++++++++ def score(self, obj): return '{} / 100'.format(obj.scans.latest().score) score.short_description = 'Score' + def grade(self, obj): + return obj.scans.latest().grade['grade'] + grade.short_description = 'Grade' + search_fields = ('name', 'domain') modeladmin_register(SiteAdmin)
6
0.285714
5
1
18c0fdc7f6d21c9be2e91847c8441ce311a3af6a
bikepath/AddressGeocoderFactory.h
bikepath/AddressGeocoderFactory.h
// // AddressGeocoderFactory.h // bikepath // // Created by Farheen Malik on 8/19/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <Foundation/Foundation.h> #import "SPGooglePlacesAutocomplete.h" #import <UIKit/UIKit.h> #import "GeocodeItem.h" @interface AddressGeocoderFactory : NSObject //+ (GeocodeItem*) translateAddressToGeocodeObject:(NSString*)addressString; + (NSString*)translateAddresstoUrl:(NSString*)addressString; // + (GeocodeItem*)translateUrlToGeocodedObject:(NSString*)url; @end
// // AddressGeocoderFactory.h // bikepath // // Created by Farheen Malik on 8/19/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <Foundation/Foundation.h> #import "SPGooglePlacesAutocomplete.h" #import <UIKit/UIKit.h> #import "GeocodeItem.h" @interface AddressGeocoderFactory : NSObject //+ (GeocodeItem*) translateAddressToGeocodeObject:(NSString*)addressString; + (NSString*)translateAddresstoUrl:(NSString*)addressString; // + (NSMutableDictionary*)translateUrlToGeocodedObject:(NSString*)url; @end
Modify methods according to new names in implementation file
Modify methods according to new names in implementation file
C
apache-2.0
hushifei/bike-path,red-spotted-newts-2014/bike-path,red-spotted-newts-2014/bike-path
c
## Code Before: // // AddressGeocoderFactory.h // bikepath // // Created by Farheen Malik on 8/19/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <Foundation/Foundation.h> #import "SPGooglePlacesAutocomplete.h" #import <UIKit/UIKit.h> #import "GeocodeItem.h" @interface AddressGeocoderFactory : NSObject //+ (GeocodeItem*) translateAddressToGeocodeObject:(NSString*)addressString; + (NSString*)translateAddresstoUrl:(NSString*)addressString; // + (GeocodeItem*)translateUrlToGeocodedObject:(NSString*)url; @end ## Instruction: Modify methods according to new names in implementation file ## Code After: // // AddressGeocoderFactory.h // bikepath // // Created by Farheen Malik on 8/19/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <Foundation/Foundation.h> #import "SPGooglePlacesAutocomplete.h" #import <UIKit/UIKit.h> #import "GeocodeItem.h" @interface AddressGeocoderFactory : NSObject //+ (GeocodeItem*) translateAddressToGeocodeObject:(NSString*)addressString; + (NSString*)translateAddresstoUrl:(NSString*)addressString; // + (NSMutableDictionary*)translateUrlToGeocodedObject:(NSString*)url; @end
// // AddressGeocoderFactory.h // bikepath // // Created by Farheen Malik on 8/19/14. // Copyright (c) 2014 Bike Path. All rights reserved. // #import <Foundation/Foundation.h> #import "SPGooglePlacesAutocomplete.h" #import <UIKit/UIKit.h> #import "GeocodeItem.h" @interface AddressGeocoderFactory : NSObject //+ (GeocodeItem*) translateAddressToGeocodeObject:(NSString*)addressString; + (NSString*)translateAddresstoUrl:(NSString*)addressString; // - + (GeocodeItem*)translateUrlToGeocodedObject:(NSString*)url; ? ^ ^^^^^^^^ + + (NSMutableDictionary*)translateUrlToGeocodedObject:(NSString*)url; ? ^^^^^^^^ +++++ ^^^^ @end
2
0.090909
1
1
72f827e84ba5e696d0bacdb8b900018c7a51dc55
main-process/native-ui/dialogs/open-file.js
main-process/native-ui/dialogs/open-file.js
var ipc = require('electron').ipcMain; var dialog = require('electron').dialog; module.exports.setup = function () { ipc.on('open-file-dialog', function (event) { var files = dialog.showOpenDialog({properties: ['openFile', 'openDirectory']}); if (files) { event.sender.send('selected-directory', files); } }); };
var ipc = require('electron').ipcMain; var dialog = require('electron').dialog; module.exports.setup = function () { ipc.on('open-file-dialog', function (event) { dialog.showOpenDialog({properties: ['openFile', 'openDirectory']}, function (files) { if (files) { event.sender.send('selected-directory', files); } }); }); };
Use callback for dialog API
Use callback for dialog API
JavaScript
mit
PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,PanCheng111/XDF_Personal_Analysis
javascript
## Code Before: var ipc = require('electron').ipcMain; var dialog = require('electron').dialog; module.exports.setup = function () { ipc.on('open-file-dialog', function (event) { var files = dialog.showOpenDialog({properties: ['openFile', 'openDirectory']}); if (files) { event.sender.send('selected-directory', files); } }); }; ## Instruction: Use callback for dialog API ## Code After: var ipc = require('electron').ipcMain; var dialog = require('electron').dialog; module.exports.setup = function () { ipc.on('open-file-dialog', function (event) { dialog.showOpenDialog({properties: ['openFile', 'openDirectory']}, function (files) { if (files) { event.sender.send('selected-directory', files); } }); }); };
var ipc = require('electron').ipcMain; var dialog = require('electron').dialog; module.exports.setup = function () { ipc.on('open-file-dialog', function (event) { - var files = dialog.showOpenDialog({properties: ['openFile', 'openDirectory']}); ? ------------ ^ + dialog.showOpenDialog({properties: ['openFile', 'openDirectory']}, function (files) { ? +++++++++++++++++ ^^ - if (files) { event.sender.send('selected-directory', files); } + if (files) { event.sender.send('selected-directory', files); } ? ++ + }); }); };
5
0.555556
3
2
508ccd9730866d444953f97404025869e8edb11e
index.php
index.php
<?php $path = 'sample-dir'; function getPathType($path) { if ( is_file($path)) { return 'file'; } else if (is_link($path)) { return 'link'; } else if (is_dir($path)) { return 'dir'; } return "Unknown"; } function directoryToArray( $path, $fullPath, &$parentArray ) { $parentArray[$path] = []; $parentArray[$path]['-type'] = getPathType($fullPath); $parentArray[$path]['-path'] = $fullPath; // If it was a file, put the contents if (is_file($fullPath)) { $parentArray[$path]['content'] = file_get_contents($fullPath); } $handle = opendir($fullPath); while($content = readdir($handle)) { if ( $content == '.' || $content == '..') { continue; } directoryToArray($content, $fullPath . '/' .$content, $parentArray[$path]); }; } $array = []; directoryToArray($path, $path, $array); echo "<pre>"; print_r($array);
<?php $path = 'sample-dir'; function getPathType($path) { if ( is_file($path)) { return 'file'; } else if (is_link($path)) { return 'link'; } else if (is_dir($path)) { return 'dir'; } return "Unknown"; } function directoryToArray( $path, $fullPath, &$parentArray ) { $parentArray[$path] = []; $parentArray[$path]['-name'] = $path; $parentArray[$path]['-type'] = getPathType($fullPath); $parentArray[$path]['-path'] = $fullPath; $parentArray[$path]['-filesize'] = filesize($fullPath); $parentArray[$path]['-mode'] = substr(sprintf('%o', fileperms($fullPath)), -4); $parentArray[$path]['-owner'] = posix_getpwuid(fileowner($fullPath)); $parentArray[$path]['-last_modified'] = date('Y-m-d H:i:s', filemtime($fullPath)); $parentArray[$path]['-group'] = posix_getgrgid(filegroup($fullPath)); // If it was a file, put the contents if (is_file($fullPath)) { $parentArray[$path]['content'] = file_get_contents($fullPath); } $handle = opendir($fullPath); while($content = readdir($handle)) { if ( $content == '.' || $content == '..') { continue; } directoryToArray($content, $fullPath . '/' .$content, $parentArray[$path]); }; } $array = []; directoryToArray($path, $path, $array); echo "<pre>"; print_r($array);
Add more details to the directory
Add more details to the directory
PHP
mit
kamranahmedse/smasher
php
## Code Before: <?php $path = 'sample-dir'; function getPathType($path) { if ( is_file($path)) { return 'file'; } else if (is_link($path)) { return 'link'; } else if (is_dir($path)) { return 'dir'; } return "Unknown"; } function directoryToArray( $path, $fullPath, &$parentArray ) { $parentArray[$path] = []; $parentArray[$path]['-type'] = getPathType($fullPath); $parentArray[$path]['-path'] = $fullPath; // If it was a file, put the contents if (is_file($fullPath)) { $parentArray[$path]['content'] = file_get_contents($fullPath); } $handle = opendir($fullPath); while($content = readdir($handle)) { if ( $content == '.' || $content == '..') { continue; } directoryToArray($content, $fullPath . '/' .$content, $parentArray[$path]); }; } $array = []; directoryToArray($path, $path, $array); echo "<pre>"; print_r($array); ## Instruction: Add more details to the directory ## Code After: <?php $path = 'sample-dir'; function getPathType($path) { if ( is_file($path)) { return 'file'; } else if (is_link($path)) { return 'link'; } else if (is_dir($path)) { return 'dir'; } return "Unknown"; } function directoryToArray( $path, $fullPath, &$parentArray ) { $parentArray[$path] = []; $parentArray[$path]['-name'] = $path; $parentArray[$path]['-type'] = getPathType($fullPath); $parentArray[$path]['-path'] = $fullPath; $parentArray[$path]['-filesize'] = filesize($fullPath); $parentArray[$path]['-mode'] = substr(sprintf('%o', fileperms($fullPath)), -4); $parentArray[$path]['-owner'] = posix_getpwuid(fileowner($fullPath)); $parentArray[$path]['-last_modified'] = date('Y-m-d H:i:s', filemtime($fullPath)); $parentArray[$path]['-group'] = posix_getgrgid(filegroup($fullPath)); // If it was a file, put the contents if (is_file($fullPath)) { $parentArray[$path]['content'] = file_get_contents($fullPath); } $handle = opendir($fullPath); while($content = readdir($handle)) { if ( $content == '.' || $content == '..') { continue; } directoryToArray($content, $fullPath . '/' .$content, $parentArray[$path]); }; } $array = []; directoryToArray($path, $path, $array); echo "<pre>"; print_r($array);
<?php $path = 'sample-dir'; function getPathType($path) { if ( is_file($path)) { return 'file'; } else if (is_link($path)) { return 'link'; } else if (is_dir($path)) { return 'dir'; } return "Unknown"; } function directoryToArray( $path, $fullPath, &$parentArray ) { $parentArray[$path] = []; + $parentArray[$path]['-name'] = $path; $parentArray[$path]['-type'] = getPathType($fullPath); $parentArray[$path]['-path'] = $fullPath; + $parentArray[$path]['-filesize'] = filesize($fullPath); + $parentArray[$path]['-mode'] = substr(sprintf('%o', fileperms($fullPath)), -4); + $parentArray[$path]['-owner'] = posix_getpwuid(fileowner($fullPath)); + $parentArray[$path]['-last_modified'] = date('Y-m-d H:i:s', filemtime($fullPath)); + $parentArray[$path]['-group'] = posix_getgrgid(filegroup($fullPath)); // If it was a file, put the contents if (is_file($fullPath)) { $parentArray[$path]['content'] = file_get_contents($fullPath); } $handle = opendir($fullPath); while($content = readdir($handle)) { if ( $content == '.' || $content == '..') { continue; } directoryToArray($content, $fullPath . '/' .$content, $parentArray[$path]); }; } $array = []; directoryToArray($path, $path, $array); echo "<pre>"; print_r($array);
6
0.133333
6
0
87af2168eede26024c5d67275973ca975876e1ab
desktop/ansible/roles/ruby/tasks/main.yml
desktop/ansible/roles/ruby/tasks/main.yml
- name: "install ruby-build dependencies" apt: name="{{ item }}" state="present" update_cache="yes" cache_valid_time="7200" with_items: - autoconf - bison - build-essential - libssl-dev - libyaml-dev - libreadline6-dev - zlib1g-dev - libncurses5-dev - libffi-dev - libgdbm3 - libgdbm-dev - name: "add asdf's ruby plugin" become: false command: "asdf plugin-add ruby" args: creates: "~/.asdf/plugins/ruby/LICENSE" - name: "install ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf install ruby {{ ruby_version }}" args: creates: "~/.asdf/installs/ruby/{{ ruby_version }}/bin/ruby" - name: "use global ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf global ruby {{ ruby_version }}" changed_when: false
- name: "install ruby-build dependencies" apt: name="{{ item }}" state="present" update_cache="yes" cache_valid_time="7200" with_items: - autoconf - bison - build-essential - ruby-dev - libssl-dev - libyaml-dev - libreadline6-dev - zlib1g-dev - libncurses5-dev - libffi-dev - libgdbm3 - libgdbm-dev - name: "add asdf's ruby plugin" become: false command: "asdf plugin-add ruby" args: creates: "~/.asdf/plugins/ruby/LICENSE" - name: "install ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf install ruby {{ ruby_version }}" args: creates: "~/.asdf/installs/ruby/{{ ruby_version }}/bin/ruby" - name: "use global ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf global ruby {{ ruby_version }}" changed_when: false
Add `ruby-dev`, which includes build deps for ruby
Add `ruby-dev`, which includes build deps for ruby
YAML
unlicense
rranelli/linuxsetup,rranelli/linuxsetup,rranelli/linuxsetup
yaml
## Code Before: - name: "install ruby-build dependencies" apt: name="{{ item }}" state="present" update_cache="yes" cache_valid_time="7200" with_items: - autoconf - bison - build-essential - libssl-dev - libyaml-dev - libreadline6-dev - zlib1g-dev - libncurses5-dev - libffi-dev - libgdbm3 - libgdbm-dev - name: "add asdf's ruby plugin" become: false command: "asdf plugin-add ruby" args: creates: "~/.asdf/plugins/ruby/LICENSE" - name: "install ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf install ruby {{ ruby_version }}" args: creates: "~/.asdf/installs/ruby/{{ ruby_version }}/bin/ruby" - name: "use global ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf global ruby {{ ruby_version }}" changed_when: false ## Instruction: Add `ruby-dev`, which includes build deps for ruby ## Code After: - name: "install ruby-build dependencies" apt: name="{{ item }}" state="present" update_cache="yes" cache_valid_time="7200" with_items: - autoconf - bison - build-essential - ruby-dev - libssl-dev - libyaml-dev - libreadline6-dev - zlib1g-dev - libncurses5-dev - libffi-dev - libgdbm3 - libgdbm-dev - name: "add asdf's ruby plugin" become: false command: "asdf plugin-add ruby" args: creates: "~/.asdf/plugins/ruby/LICENSE" - name: "install ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf install ruby {{ ruby_version }}" args: creates: "~/.asdf/installs/ruby/{{ ruby_version }}/bin/ruby" - name: "use global ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf global ruby {{ ruby_version }}" changed_when: false
- name: "install ruby-build dependencies" apt: name="{{ item }}" state="present" update_cache="yes" cache_valid_time="7200" with_items: - autoconf - bison - build-essential + - ruby-dev - libssl-dev - libyaml-dev - libreadline6-dev - zlib1g-dev - libncurses5-dev - libffi-dev - libgdbm3 - libgdbm-dev - name: "add asdf's ruby plugin" become: false command: "asdf plugin-add ruby" args: creates: "~/.asdf/plugins/ruby/LICENSE" - name: "install ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf install ruby {{ ruby_version }}" args: creates: "~/.asdf/installs/ruby/{{ ruby_version }}/bin/ruby" - name: "use global ruby {{ ruby_version }}" become: false command: "~/.asdf/bin/asdf global ruby {{ ruby_version }}" changed_when: false
1
0.028571
1
0
91aece7c049ccb5897a1b05b4901f1d212c2c2a9
spec/support/expect_violation.rb
spec/support/expect_violation.rb
module ExpectViolation def expect_violation(source) expectation = RuboCop::Devtools::Expectation.new(source) inspect_source(cop, expectation.source) offenses = cop.offenses.map(&method(:to_assertion)).sort expect(offenses).to eq(expectation.assertions.sort) end private def to_assertion(offense) RuboCop::Devtools::Expectation::Assertion.new( message: offense.message, line_number: offense.location.line, column_range: offense.location.column_range ) end end # ExpectViolation
module ExpectViolation DEFAULT_FILENAME = 'example.rb' def expect_violation(source, filename: DEFAULT_FILENAME) expectation = RuboCop::Devtools::Expectation.new(source) inspect_source(cop, expectation.source, filename) offenses = cop.offenses.map(&method(:to_assertion)).sort expect(offenses).to eq(expectation.assertions.sort) end private def to_assertion(offense) RuboCop::Devtools::Expectation::Assertion.new( message: offense.message, line_number: offense.location.line, column_range: offense.location.column_range ) end end # ExpectViolation
Add filename specification in ExpectViolation
Add filename specification in ExpectViolation
Ruby
mit
backus/rubocop-devtools
ruby
## Code Before: module ExpectViolation def expect_violation(source) expectation = RuboCop::Devtools::Expectation.new(source) inspect_source(cop, expectation.source) offenses = cop.offenses.map(&method(:to_assertion)).sort expect(offenses).to eq(expectation.assertions.sort) end private def to_assertion(offense) RuboCop::Devtools::Expectation::Assertion.new( message: offense.message, line_number: offense.location.line, column_range: offense.location.column_range ) end end # ExpectViolation ## Instruction: Add filename specification in ExpectViolation ## Code After: module ExpectViolation DEFAULT_FILENAME = 'example.rb' def expect_violation(source, filename: DEFAULT_FILENAME) expectation = RuboCop::Devtools::Expectation.new(source) inspect_source(cop, expectation.source, filename) offenses = cop.offenses.map(&method(:to_assertion)).sort expect(offenses).to eq(expectation.assertions.sort) end private def to_assertion(offense) RuboCop::Devtools::Expectation::Assertion.new( message: offense.message, line_number: offense.location.line, column_range: offense.location.column_range ) end end # ExpectViolation
module ExpectViolation - def expect_violation(source) + DEFAULT_FILENAME = 'example.rb' + + def expect_violation(source, filename: DEFAULT_FILENAME) expectation = RuboCop::Devtools::Expectation.new(source) + - inspect_source(cop, expectation.source) + inspect_source(cop, expectation.source, filename) ? ++++++++++ offenses = cop.offenses.map(&method(:to_assertion)).sort expect(offenses).to eq(expectation.assertions.sort) end private def to_assertion(offense) RuboCop::Devtools::Expectation::Assertion.new( message: offense.message, line_number: offense.location.line, column_range: offense.location.column_range ) end end # ExpectViolation
7
0.333333
5
2
df4bd8201c7c3651fe045b69b1ef8772829b811d
kegweb/kegweb/forms.py
kegweb/kegweb/forms.py
from django import forms from registration.models import RegistrationProfile from registration.forms import RegistrationForm from pykeg.core.models import UserProfile class KegbotRegistrationForm(RegistrationForm): gender = forms.CharField() weight = forms.IntegerField() def save(self, profile_callback=None): new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], password=self.cleaned_data['password1'], email=self.cleaned_data['email'], send_email=False, profile_callback=profile_callback) new_user.is_active = True new_user.save() new_profile = UserProfile.objects.create(user=new_user, gender=self.cleaned_data['gender'], weight=self.cleaned_data['weight']) new_profile.save() return new_user class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ('gender', 'weight')
from django import forms from registration.models import RegistrationProfile from registration.forms import RegistrationForm from pykeg.core.models import UserProfile class KegbotRegistrationForm(RegistrationForm): gender = forms.CharField() weight = forms.IntegerField() def save(self, profile_callback=None): new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], password=self.cleaned_data['password1'], email=self.cleaned_data['email'], send_email=False, profile_callback=profile_callback) new_user.is_active = True new_user.save() new_profile, is_new = UserProfile.objects.get_or_create(user=new_user) new_profile.gender = self.cleaned_data['gender'] new_profile.weight = self.cleaned_data['weight'] new_profile.save() return new_user class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ('gender', 'weight')
Fix error on new user registration.
Fix error on new user registration.
Python
mit
Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server
python
## Code Before: from django import forms from registration.models import RegistrationProfile from registration.forms import RegistrationForm from pykeg.core.models import UserProfile class KegbotRegistrationForm(RegistrationForm): gender = forms.CharField() weight = forms.IntegerField() def save(self, profile_callback=None): new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], password=self.cleaned_data['password1'], email=self.cleaned_data['email'], send_email=False, profile_callback=profile_callback) new_user.is_active = True new_user.save() new_profile = UserProfile.objects.create(user=new_user, gender=self.cleaned_data['gender'], weight=self.cleaned_data['weight']) new_profile.save() return new_user class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ('gender', 'weight') ## Instruction: Fix error on new user registration. ## Code After: from django import forms from registration.models import RegistrationProfile from registration.forms import RegistrationForm from pykeg.core.models import UserProfile class KegbotRegistrationForm(RegistrationForm): gender = forms.CharField() weight = forms.IntegerField() def save(self, profile_callback=None): new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], password=self.cleaned_data['password1'], email=self.cleaned_data['email'], send_email=False, profile_callback=profile_callback) new_user.is_active = True new_user.save() new_profile, is_new = UserProfile.objects.get_or_create(user=new_user) new_profile.gender = self.cleaned_data['gender'] new_profile.weight = self.cleaned_data['weight'] new_profile.save() return new_user class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ('gender', 'weight')
from django import forms from registration.models import RegistrationProfile from registration.forms import RegistrationForm from pykeg.core.models import UserProfile class KegbotRegistrationForm(RegistrationForm): gender = forms.CharField() weight = forms.IntegerField() def save(self, profile_callback=None): new_user = RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'], password=self.cleaned_data['password1'], email=self.cleaned_data['email'], send_email=False, profile_callback=profile_callback) new_user.is_active = True new_user.save() - new_profile = UserProfile.objects.create(user=new_user, ? ^ + new_profile, is_new = UserProfile.objects.get_or_create(user=new_user) ? ++++++++ +++++++ ^ - gender=self.cleaned_data['gender'], ? ^^ - + new_profile.gender = self.cleaned_data['gender'] ? ^^^^^^^^^^^^ + + - weight=self.cleaned_data['weight']) ? ^^ - + new_profile.weight = self.cleaned_data['weight'] ? ^^^^^^^^^^^^ + + new_profile.save() return new_user class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ('gender', 'weight')
6
0.193548
3
3
af75542795f861dd5ea452a4041d74676213d6e4
app/views/site/key.html.erb
app/views/site/key.html.erb
<div id="mapkey"> <h3><%= t "site.key.table.heading", :zoom_level => params[:zoom] %></h3> <table class="mapkey-table"> <% YAML.load_file("#{RAILS_ROOT}/config/key.yml").each do |name,data| %> <% if params[:layer] == name %> <% data.each do |entry| %> <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %> <tr> <td class="mapkey-table-key" align="center"> <%= image_tag "key/#{name}/#{entry['image']}" %> </td> <td class="mapkey-table-value"> <%= t "site.key.table.entry.#{entry['name']}" %> </td> </tr> <% end %> <% end %> <% end %> <% end %> </table> </div>
<div id="mapkey"> <h3><%= t "site.key.table.heading", :zoom_level => params[:zoom] %></h3> <table class="mapkey-table"> <% YAML.load_file("#{RAILS_ROOT}/config/key.yml").each do |name,data| %> <% if params[:layer] == name %> <% data.each do |entry| %> <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %> <tr> <td class="mapkey-table-key" align="center"> <%= image_tag "key/#{name}/#{entry['image']}" %> </td> <td class="mapkey-table-value"> <%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %> </td> </tr> <% end %> <% end %> <% end %> <% end %> </table> </div>
Call .to_sentence on site.key.table.entry. Translations are free to take advantage of this or ignore it completely
Call .to_sentence on site.key.table.entry. Translations are free to take advantage of this or ignore it completely
HTML+ERB
agpl-3.0
tillmo/do-roam,tillmo/do-roam,tillmo/do-roam,tillmo/do-roam,tillmo/do-roam,tillmo/do-roam
html+erb
## Code Before: <div id="mapkey"> <h3><%= t "site.key.table.heading", :zoom_level => params[:zoom] %></h3> <table class="mapkey-table"> <% YAML.load_file("#{RAILS_ROOT}/config/key.yml").each do |name,data| %> <% if params[:layer] == name %> <% data.each do |entry| %> <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %> <tr> <td class="mapkey-table-key" align="center"> <%= image_tag "key/#{name}/#{entry['image']}" %> </td> <td class="mapkey-table-value"> <%= t "site.key.table.entry.#{entry['name']}" %> </td> </tr> <% end %> <% end %> <% end %> <% end %> </table> </div> ## Instruction: Call .to_sentence on site.key.table.entry. Translations are free to take advantage of this or ignore it completely ## Code After: <div id="mapkey"> <h3><%= t "site.key.table.heading", :zoom_level => params[:zoom] %></h3> <table class="mapkey-table"> <% YAML.load_file("#{RAILS_ROOT}/config/key.yml").each do |name,data| %> <% if params[:layer] == name %> <% data.each do |entry| %> <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %> <tr> <td class="mapkey-table-key" align="center"> <%= image_tag "key/#{name}/#{entry['image']}" %> </td> <td class="mapkey-table-value"> <%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %> </td> </tr> <% end %> <% end %> <% end %> <% end %> </table> </div>
<div id="mapkey"> <h3><%= t "site.key.table.heading", :zoom_level => params[:zoom] %></h3> <table class="mapkey-table"> <% YAML.load_file("#{RAILS_ROOT}/config/key.yml").each do |name,data| %> <% if params[:layer] == name %> <% data.each do |entry| %> <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %> <tr> <td class="mapkey-table-key" align="center"> <%= image_tag "key/#{name}/#{entry['image']}" %> </td> <td class="mapkey-table-value"> - <%= t "site.key.table.entry.#{entry['name']}" %> ? ^ + <%= [*t("site.key.table.entry.#{entry['name']}")].to_sentence %> ? ++ ^ ++++++++++++++ </td> </tr> <% end %> <% end %> <% end %> <% end %> </table> </div>
2
0.095238
1
1
b074fa879716c8d9870c8079208e8fb9ed2bd3da
app/views/excursions/_excursion_global_search.html.erb
app/views/excursions/_excursion_global_search.html.erb
<div class="model_with_details span4 inline-block box-result"> <ul class="thumbnails span4"> <li class="span1"> <%= link_to thumb_for(excursion, 130), excursion, :class => "container" %> <div class='number_pages'><%= excursion.slide_count %></div> </li> <li class="span"> <div class="caption "> <h4><%= link_to truncate_name(excursion.title, :length => 40), excursion %></h4> <h5 class="blue-opacity"><%=type_excursion%></h5> <h5><%=t('follow.followers')%>: <span class="dark-gray"><%=num_followers%></span></h5> <p><%= image_tag('star.png') %></p> </div> </li> </ul> </div>
<div class="model_with_details span4 inline-block box-result"> <ul class="thumbnails span4"> <li class="span1"> <%= link_to thumb_for(excursion, 130), excursion, :class => "container" %> <div class='number_pages'><%= excursion.slide_count %></div> </li> <li class="span"> <div class="caption "> <h4><%= link_to truncate_name(excursion.title, :length => 40), excursion %></h4> <h5><%=t('follow.followers')%>: <span class="dark-gray"><%=num_followers%></span></h5> <p><%= image_tag('star.png') %></p> </div> </li> </ul> </div>
Remove type_excursion causing view to crash
Remove type_excursion causing view to crash
HTML+ERB
agpl-3.0
ging/vish_orange,agordillo/vish,agordillo/vish,rogervaas/vish,suec78/vish_storyrobin,nathanV38/vishTst,ging/vish,ging/vish_orange,rogervaas/vish,rogervaas/vish,agordillo/vish,suec78/vish_storyrobin,ging/vish,agordillo/vish,ging/vish,ging/vish,nathanV38/vishTst,ging/vish,ging/vish_orange,ging/vish_orange,rogervaas/vish,suec78/vish_storyrobin,suec78/vish_storyrobin,ging/vish_orange
html+erb
## Code Before: <div class="model_with_details span4 inline-block box-result"> <ul class="thumbnails span4"> <li class="span1"> <%= link_to thumb_for(excursion, 130), excursion, :class => "container" %> <div class='number_pages'><%= excursion.slide_count %></div> </li> <li class="span"> <div class="caption "> <h4><%= link_to truncate_name(excursion.title, :length => 40), excursion %></h4> <h5 class="blue-opacity"><%=type_excursion%></h5> <h5><%=t('follow.followers')%>: <span class="dark-gray"><%=num_followers%></span></h5> <p><%= image_tag('star.png') %></p> </div> </li> </ul> </div> ## Instruction: Remove type_excursion causing view to crash ## Code After: <div class="model_with_details span4 inline-block box-result"> <ul class="thumbnails span4"> <li class="span1"> <%= link_to thumb_for(excursion, 130), excursion, :class => "container" %> <div class='number_pages'><%= excursion.slide_count %></div> </li> <li class="span"> <div class="caption "> <h4><%= link_to truncate_name(excursion.title, :length => 40), excursion %></h4> <h5><%=t('follow.followers')%>: <span class="dark-gray"><%=num_followers%></span></h5> <p><%= image_tag('star.png') %></p> </div> </li> </ul> </div>
<div class="model_with_details span4 inline-block box-result"> <ul class="thumbnails span4"> <li class="span1"> <%= link_to thumb_for(excursion, 130), excursion, :class => "container" %> <div class='number_pages'><%= excursion.slide_count %></div> </li> <li class="span"> <div class="caption "> <h4><%= link_to truncate_name(excursion.title, :length => 40), excursion %></h4> - <h5 class="blue-opacity"><%=type_excursion%></h5> <h5><%=t('follow.followers')%>: <span class="dark-gray"><%=num_followers%></span></h5> <p><%= image_tag('star.png') %></p> </div> </li> </ul> </div>
1
0.055556
0
1
48604d9a866f4a8d3e736c8fa401885d0fafa81c
_includes/search/profiles/algolia-template-hits-empty.html
_includes/search/profiles/algolia-template-hits-empty.html
<div id="no-results-ctas" class="hits-empty"> <div class="card"> <div class="card-content"> {% raw %} <p>No results found for your query <strong>"<span>{{ query }}</span>"</strong></p> {% endraw %} </div> </div> <div class="card"> <div class="card-content"> <p>You conducted a Profiles Search across organization names, EINs, and location</p> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title">Not looking for a specific funder?</div> {% raw %} <p>Try your query using a <a href="/search/grants/?query={{ query }}" data-ga="Grants Search">Grants Search</a></p> {% endraw %} <!--<p class="hide-on-med-and-down">Understand the limits of Grantmakers.io by reading the sidebar on the right</p>--> <!-- <p>Profiles Search is best when you're looking for a particular funder</p> <p>Grants Search is best when you're looking for new funders</p> --> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title"> Get to know Grantmakers.io </div> <p>Learn more about the <a href="#modal-tips" class="modal-trigger" data-ga="Search Types Modal">two types of searches</a></p> </div> </div> </div>
<div id="no-results-ctas" class="hits-empty"> <div class="card"> <div class="card-content"> {% raw %} <p>No results found for your query <strong>"<span>{{ query }}</span>"</strong></p> {% endraw %} </div> </div> <div class="card"> <div class="card-content"> <p>You conducted a Profiles Search across organization names, EINs, and location</p> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title">Not looking for a specific funder?</div> {% raw %} <p>Try your query using a <a href="{{ site.baseurl }}/search/grants/?query={{ query }}" data-ga="Grants Search">Grants Search</a></p> {% endraw %} </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title"> Get to know Grantmakers.io </div> <p><a href="{{ site.baseurl }}/about/tips-and-tricks/" data-ga="Get to know link">Tips and tricks</a> to get the most out of your searches</p> </div> </div> </div>
Update no results template for profiles search
Update no results template for profiles search
HTML
mit
grantmakers/grantmakers.github.io,grantmakers/grantmakers.github.io,grantmakers/grantmakers.github.io
html
## Code Before: <div id="no-results-ctas" class="hits-empty"> <div class="card"> <div class="card-content"> {% raw %} <p>No results found for your query <strong>"<span>{{ query }}</span>"</strong></p> {% endraw %} </div> </div> <div class="card"> <div class="card-content"> <p>You conducted a Profiles Search across organization names, EINs, and location</p> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title">Not looking for a specific funder?</div> {% raw %} <p>Try your query using a <a href="/search/grants/?query={{ query }}" data-ga="Grants Search">Grants Search</a></p> {% endraw %} <!--<p class="hide-on-med-and-down">Understand the limits of Grantmakers.io by reading the sidebar on the right</p>--> <!-- <p>Profiles Search is best when you're looking for a particular funder</p> <p>Grants Search is best when you're looking for new funders</p> --> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title"> Get to know Grantmakers.io </div> <p>Learn more about the <a href="#modal-tips" class="modal-trigger" data-ga="Search Types Modal">two types of searches</a></p> </div> </div> </div> ## Instruction: Update no results template for profiles search ## Code After: <div id="no-results-ctas" class="hits-empty"> <div class="card"> <div class="card-content"> {% raw %} <p>No results found for your query <strong>"<span>{{ query }}</span>"</strong></p> {% endraw %} </div> </div> <div class="card"> <div class="card-content"> <p>You conducted a Profiles Search across organization names, EINs, and location</p> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title">Not looking for a specific funder?</div> {% raw %} <p>Try your query using a <a href="{{ site.baseurl }}/search/grants/?query={{ query }}" data-ga="Grants Search">Grants Search</a></p> {% endraw %} </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title"> Get to know Grantmakers.io </div> <p><a href="{{ site.baseurl }}/about/tips-and-tricks/" data-ga="Get to know link">Tips and tricks</a> to get the most out of your searches</p> </div> </div> </div>
<div id="no-results-ctas" class="hits-empty"> <div class="card"> <div class="card-content"> {% raw %} <p>No results found for your query <strong>"<span>{{ query }}</span>"</strong></p> {% endraw %} </div> </div> <div class="card"> <div class="card-content"> <p>You conducted a Profiles Search across organization names, EINs, and location</p> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title">Not looking for a specific funder?</div> {% raw %} - <p>Try your query using a <a href="/search/grants/?query={{ query }}" data-ga="Grants Search">Grants Search</a></p> + <p>Try your query using a <a href="{{ site.baseurl }}/search/grants/?query={{ query }}" data-ga="Grants Search">Grants Search</a></p> ? ++++++++++++++++++ {% endraw %} - <!--<p class="hide-on-med-and-down">Understand the limits of Grantmakers.io by reading the sidebar on the right</p>--> - <!-- - <p>Profiles Search is best when you're looking for a particular funder</p> - <p>Grants Search is best when you're looking for new funders</p> - --> </div> </div> <div class="card z-depth-0 grey lighten-4"> <div class="card-content"> <div class="card-title"> Get to know Grantmakers.io </div> - <p>Learn more about the <a href="#modal-tips" class="modal-trigger" data-ga="Search Types Modal">two types of searches</a></p> + <p><a href="{{ site.baseurl }}/about/tips-and-tricks/" data-ga="Get to know link">Tips and tricks</a> to get the most out of your searches</p> </div> </div> </div>
9
0.257143
2
7
5a8c87a96d9aeb63b68b1f93bcff99347913a81b
.github/workflows/test-lang-c++.yml
.github/workflows/test-lang-c++.yml
name: Test C++ on: workflow_dispatch: push: branches: [ master ] pull_request: branches: [ master ] paths: - '.github/workflows/test-lang-c\+\+.yml' - 'lang/c\+\+/**' defaults: run: working-directory: lang/c++ jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Dependencies run: sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake - name: Clean run: ./build.sh clean - name: Lint run: ./build.sh lint - name: Test run: ./build.sh test
name: Test C++ on: workflow_dispatch: push: branches: [ master ] pull_request: branches: [ master ] paths: - '.github/workflows/test-lang-c\+\+.yml' - 'lang/c\+\+/**' defaults: run: working-directory: lang/c++ jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Dependencies run: sudo apt update && sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake - name: Clean run: ./build.sh clean - name: Lint run: ./build.sh lint - name: Test run: ./build.sh test
Update from the Ubuntu repositories before installing the dependencies
Update from the Ubuntu repositories before installing the dependencies Try to fix: Run sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/n/nvidia-settings/libxnvctrl0_470.57.01-0ubuntu0.20.04.2_amd64.deb 404 Not Found [IP: 52.250.76.244 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The problem is that there is no .deb for 20.04.2, but only for 20.04.1 and 20.04.3 see https://github.com/apache/avro/runs/5279907468?check_suite_focus=true Signed-off-by: Martin Tzvetanov Grigorov <467ed6115092226a07ff6116d483984b94cf27b9@apache.org>
YAML
apache-2.0
apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro,apache/avro
yaml
## Code Before: name: Test C++ on: workflow_dispatch: push: branches: [ master ] pull_request: branches: [ master ] paths: - '.github/workflows/test-lang-c\+\+.yml' - 'lang/c\+\+/**' defaults: run: working-directory: lang/c++ jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Dependencies run: sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake - name: Clean run: ./build.sh clean - name: Lint run: ./build.sh lint - name: Test run: ./build.sh test ## Instruction: Update from the Ubuntu repositories before installing the dependencies Try to fix: Run sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/n/nvidia-settings/libxnvctrl0_470.57.01-0ubuntu0.20.04.2_amd64.deb 404 Not Found [IP: 52.250.76.244 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The problem is that there is no .deb for 20.04.2, but only for 20.04.1 and 20.04.3 see https://github.com/apache/avro/runs/5279907468?check_suite_focus=true Signed-off-by: Martin Tzvetanov Grigorov <467ed6115092226a07ff6116d483984b94cf27b9@apache.org> ## Code After: name: Test C++ on: workflow_dispatch: push: branches: [ master ] pull_request: branches: [ master ] paths: - '.github/workflows/test-lang-c\+\+.yml' - 'lang/c\+\+/**' defaults: run: working-directory: lang/c++ jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Dependencies run: sudo apt update && sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake - name: Clean run: ./build.sh clean - name: Lint run: ./build.sh lint - name: Test run: ./build.sh test
name: Test C++ on: workflow_dispatch: push: branches: [ master ] pull_request: branches: [ master ] paths: - '.github/workflows/test-lang-c\+\+.yml' - 'lang/c\+\+/**' defaults: run: working-directory: lang/c++ jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Dependencies - run: sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake + run: sudo apt update && sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev cmake ? +++++++++++++++++++ - name: Clean run: ./build.sh clean - name: Lint run: ./build.sh lint - name: Test run: ./build.sh test
2
0.060606
1
1
fa4c60c517f1a7ab29d0c0eccca29af8c3e4e547
app/models/glimage.rb
app/models/glimage.rb
class Glimage < ActiveRecord::Base belongs_to :project attr_accessible :file, :filetype validates :file, :presence => true def is_svg? filetype == 'image/svg+xml' end def build_parents if @project.nil? @project = Project.find(project_id) end if @repo.nil? @repo = Repo.find(@project.repo_id) end end def filepath build_parents File.join @repo.path, @project.name, file end def imagepath build_parents reponame = @repo.path.split(File::SEPARATOR).pop File.join 'repos', reponame, @project.name, file end # Returns thumbnail path # path type is file or image def thumbnail(pathtype) filename = file.delete "." path = File.dirname(send(pathtype)) File.join path, "#{filename}_thumb.png" end end
class Glimage < ActiveRecord::Base belongs_to :project has_many :comments attr_accessible :file, :filetype validates :file, :presence => true def is_svg? filetype == 'image/svg+xml' end def build_parents if @project.nil? @project = Project.find(project_id) end if @repo.nil? @repo = Repo.find(@project.repo_id) end end def filepath build_parents File.join(@repo.path, @project.name, file) end def imagepath build_parents reponame = @repo.path.split(File::SEPARATOR).pop File::SEPARATOR + File.join('repos', reponame, @project.name, file) end # Returns thumbnail path # path type is file or image def thumbnail(pathtype) filename = file.delete "." path = File.dirname(send(pathtype)) File.join path, "#{filename}_thumb.png" end end
Add file separator to front of imagepath so that we can use it directly in html tags
Add file separator to front of imagepath so that we can use it directly in html tags
Ruby
mit
glittergallery/GlitterGallery,glittergallery/GlitterGallery,glittergallery/GlitterGallery,glittergallery/GlitterGallery
ruby
## Code Before: class Glimage < ActiveRecord::Base belongs_to :project attr_accessible :file, :filetype validates :file, :presence => true def is_svg? filetype == 'image/svg+xml' end def build_parents if @project.nil? @project = Project.find(project_id) end if @repo.nil? @repo = Repo.find(@project.repo_id) end end def filepath build_parents File.join @repo.path, @project.name, file end def imagepath build_parents reponame = @repo.path.split(File::SEPARATOR).pop File.join 'repos', reponame, @project.name, file end # Returns thumbnail path # path type is file or image def thumbnail(pathtype) filename = file.delete "." path = File.dirname(send(pathtype)) File.join path, "#{filename}_thumb.png" end end ## Instruction: Add file separator to front of imagepath so that we can use it directly in html tags ## Code After: class Glimage < ActiveRecord::Base belongs_to :project has_many :comments attr_accessible :file, :filetype validates :file, :presence => true def is_svg? filetype == 'image/svg+xml' end def build_parents if @project.nil? @project = Project.find(project_id) end if @repo.nil? @repo = Repo.find(@project.repo_id) end end def filepath build_parents File.join(@repo.path, @project.name, file) end def imagepath build_parents reponame = @repo.path.split(File::SEPARATOR).pop File::SEPARATOR + File.join('repos', reponame, @project.name, file) end # Returns thumbnail path # path type is file or image def thumbnail(pathtype) filename = file.delete "." path = File.dirname(send(pathtype)) File.join path, "#{filename}_thumb.png" end end
class Glimage < ActiveRecord::Base belongs_to :project + has_many :comments attr_accessible :file, :filetype validates :file, :presence => true def is_svg? filetype == 'image/svg+xml' end def build_parents if @project.nil? @project = Project.find(project_id) end if @repo.nil? @repo = Repo.find(@project.repo_id) end end def filepath build_parents - File.join @repo.path, @project.name, file ? ^ + File.join(@repo.path, @project.name, file) ? ^ + end def imagepath build_parents reponame = @repo.path.split(File::SEPARATOR).pop - File.join 'repos', reponame, @project.name, file ? ^ + File::SEPARATOR + File.join('repos', reponame, @project.name, file) ? ++++++++++++++++++ ^ + end # Returns thumbnail path # path type is file or image def thumbnail(pathtype) filename = file.delete "." path = File.dirname(send(pathtype)) File.join path, "#{filename}_thumb.png" end end
5
0.121951
3
2
c82bd0e348fa651a6198e1c0bfd01a10c64107db
inc/fatal.inc.php
inc/fatal.inc.php
<?php /* * This file is part of SplashSync Project. * * Copyright (C) 2015-2019 Splash Sync <www.splashsync.com> * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Splash\Core\SplashCore as Splash; /** * @abstract Declare fatal Error Handler => Called in case of Script Exceptions */ function fatal_handler() { //====================================================================// // Read Last Error $error = error_get_last(); if (!$error) { return; } //====================================================================// // Fatal Error if (E_ERROR == $error["type"]) { //====================================================================// // Parse Error in Response. Splash::com()->fault($error); //====================================================================// // Process methods & Return the results. Splash::com()->handle(); //====================================================================// // Non Fatal Error } else { Splash::log()->war($error["message"]." on File ".$error["file"]." Line ".$error["line"]); } }
<?php /* * This file is part of SplashSync Project. * * Copyright (C) 2015-2019 Splash Sync <www.splashsync.com> * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Splash\Core\SplashCore as Splash; /** * Declare fatal Error Handler => Called in case of Script Exceptions */ function fatal_handler() { //====================================================================// // Read Last Error $error = error_get_last(); if (!$error) { return; } //====================================================================// // Fatal Error if (E_ERROR == $error["type"]) { //====================================================================// // Parse Error in Response. Splash::com()->fault($error); //====================================================================// // Process methods & Return the results. Splash::com()->handle(); //====================================================================// // Non Fatal Error } else { Splash::log()->war($error["message"]." on File ".$error["file"]." Line ".$error["line"]); } }
Upgrade to Splash V2 Standards
WIP: Upgrade to Splash V2 Standards
PHP
mit
SplashSync/Php-Core,SplashSync/Php-Core
php
## Code Before: <?php /* * This file is part of SplashSync Project. * * Copyright (C) 2015-2019 Splash Sync <www.splashsync.com> * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Splash\Core\SplashCore as Splash; /** * @abstract Declare fatal Error Handler => Called in case of Script Exceptions */ function fatal_handler() { //====================================================================// // Read Last Error $error = error_get_last(); if (!$error) { return; } //====================================================================// // Fatal Error if (E_ERROR == $error["type"]) { //====================================================================// // Parse Error in Response. Splash::com()->fault($error); //====================================================================// // Process methods & Return the results. Splash::com()->handle(); //====================================================================// // Non Fatal Error } else { Splash::log()->war($error["message"]." on File ".$error["file"]." Line ".$error["line"]); } } ## Instruction: WIP: Upgrade to Splash V2 Standards ## Code After: <?php /* * This file is part of SplashSync Project. * * Copyright (C) 2015-2019 Splash Sync <www.splashsync.com> * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Splash\Core\SplashCore as Splash; /** * Declare fatal Error Handler => Called in case of Script Exceptions */ function fatal_handler() { //====================================================================// // Read Last Error $error = error_get_last(); if (!$error) { return; } //====================================================================// // Fatal Error if (E_ERROR == $error["type"]) { //====================================================================// // Parse Error in Response. Splash::com()->fault($error); //====================================================================// // Process methods & Return the results. Splash::com()->handle(); //====================================================================// // Non Fatal Error } else { Splash::log()->war($error["message"]." on File ".$error["file"]." Line ".$error["line"]); } }
<?php /* * This file is part of SplashSync Project. * * Copyright (C) 2015-2019 Splash Sync <www.splashsync.com> * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Splash\Core\SplashCore as Splash; /** - * @abstract Declare fatal Error Handler => Called in case of Script Exceptions ? ------------ + * Declare fatal Error Handler => Called in case of Script Exceptions */ function fatal_handler() { //====================================================================// // Read Last Error $error = error_get_last(); if (!$error) { return; } //====================================================================// // Fatal Error if (E_ERROR == $error["type"]) { //====================================================================// // Parse Error in Response. Splash::com()->fault($error); //====================================================================// // Process methods & Return the results. Splash::com()->handle(); //====================================================================// // Non Fatal Error } else { Splash::log()->war($error["message"]." on File ".$error["file"]." Line ".$error["line"]); } }
2
0.046512
1
1
9cd825d3d5d40c69e1929597be62d2ee4c839737
config/initializers/jellyfish_core.rb
config/initializers/jellyfish_core.rb
begin init_settings = Setting.table_exists? if init_settings Dir[Rails.root.join 'app', 'models', 'setting', '*.rb'].each do |setting_model| require_dependency setting_model end Setting.descendants.each(&:load_defaults) end rescue false end begin init_product_types = ProductType.table_exists? if init_product_types Dir[Rails.root.join 'app', 'models', 'product_type', '*.rb'].each do |product_type_model| require_dependency product_type_model end ProductType.descendants.each(&:load_product_types) end rescue false end # Include demo support code in development if Rails.env.development? Dir[Rails.root.join 'app', 'models', 'null', '*.rb'].each do |null_model| require_dependency null_model end require 'jellyfish/demo' end
begin init_settings = Setting.table_exists? if init_settings Dir[Rails.root.join 'app', 'models', 'setting', '*.rb'].each do |setting_model| require_dependency setting_model end Setting.descendants.each(&:load_defaults) end rescue false end begin init_product_types = ProductType.table_exists? if init_product_types Dir[Rails.root.join 'app', 'models', 'product_type', '*.rb'].each do |product_type_model| require_dependency product_type_model end ProductType.descendants.each(&:load_product_types) end rescue false end begin init_registered_providers = RegisteredProvider.table_exists? if init_registered_providers Dir[Rails.root.join 'app', 'models', 'registered_provider', '*.rb'].each do |registered_provider_model| require_dependency registered_provider_model end RegisteredProvider.descendants.each(&:load_registered_providers) end rescue false end # Include demo support code in development if Rails.env.development? Dir[Rails.root.join 'app', 'models', 'null', '*.rb'].each do |null_model| require_dependency null_model end require 'jellyfish/demo' end
Add RegisteredProvider to extension support
Add RegisteredProvider to extension support
Ruby
apache-2.0
adderall/api,AllenBW/api,boozallen/projectjellyfish,stackus/api,boozallen/projectjellyfish,boozallen/projectjellyfish,sonejah21/api,AllenBW/api,sreekantch/JellyFish,sreekantch/JellyFish,AllenBW/api,sonejah21/api,boozallen/projectjellyfish,mafernando/api,projectjellyfish/api,mafernando/api,projectjellyfish/api,projectjellyfish/api,stackus/api,adderall/api,adderall/api,sreekantch/JellyFish,mafernando/api,stackus/api,sonejah21/api
ruby
## Code Before: begin init_settings = Setting.table_exists? if init_settings Dir[Rails.root.join 'app', 'models', 'setting', '*.rb'].each do |setting_model| require_dependency setting_model end Setting.descendants.each(&:load_defaults) end rescue false end begin init_product_types = ProductType.table_exists? if init_product_types Dir[Rails.root.join 'app', 'models', 'product_type', '*.rb'].each do |product_type_model| require_dependency product_type_model end ProductType.descendants.each(&:load_product_types) end rescue false end # Include demo support code in development if Rails.env.development? Dir[Rails.root.join 'app', 'models', 'null', '*.rb'].each do |null_model| require_dependency null_model end require 'jellyfish/demo' end ## Instruction: Add RegisteredProvider to extension support ## Code After: begin init_settings = Setting.table_exists? if init_settings Dir[Rails.root.join 'app', 'models', 'setting', '*.rb'].each do |setting_model| require_dependency setting_model end Setting.descendants.each(&:load_defaults) end rescue false end begin init_product_types = ProductType.table_exists? if init_product_types Dir[Rails.root.join 'app', 'models', 'product_type', '*.rb'].each do |product_type_model| require_dependency product_type_model end ProductType.descendants.each(&:load_product_types) end rescue false end begin init_registered_providers = RegisteredProvider.table_exists? if init_registered_providers Dir[Rails.root.join 'app', 'models', 'registered_provider', '*.rb'].each do |registered_provider_model| require_dependency registered_provider_model end RegisteredProvider.descendants.each(&:load_registered_providers) end rescue false end # Include demo support code in development if Rails.env.development? Dir[Rails.root.join 'app', 'models', 'null', '*.rb'].each do |null_model| require_dependency null_model end require 'jellyfish/demo' end
begin init_settings = Setting.table_exists? if init_settings Dir[Rails.root.join 'app', 'models', 'setting', '*.rb'].each do |setting_model| require_dependency setting_model end Setting.descendants.each(&:load_defaults) end rescue false end begin init_product_types = ProductType.table_exists? if init_product_types Dir[Rails.root.join 'app', 'models', 'product_type', '*.rb'].each do |product_type_model| require_dependency product_type_model end ProductType.descendants.each(&:load_product_types) end rescue false end + begin + init_registered_providers = RegisteredProvider.table_exists? + if init_registered_providers + Dir[Rails.root.join 'app', 'models', 'registered_provider', '*.rb'].each do |registered_provider_model| + require_dependency registered_provider_model + end + RegisteredProvider.descendants.each(&:load_registered_providers) + end + rescue + false + end + + # Include demo support code in development if Rails.env.development? Dir[Rails.root.join 'app', 'models', 'null', '*.rb'].each do |null_model| require_dependency null_model end require 'jellyfish/demo' end
13
0.40625
13
0
9f0c572bff06b72c7fdfbfa499743afe2db48d13
twigg-app/lib/twigg-app/app/quips.rb
twigg-app/lib/twigg-app/app/quips.rb
require 'yaml' module Twigg module App module Quips QUIPS = YAML.load_file(Twigg::App.root + 'data' + 'quips.yml') def self.random QUIPS[rand(QUIPS.size)] end end end end
require 'yaml' module Twigg module App module Quips QUIPS = YAML.load_file(App.root + 'data' + 'quips.yml') def self.random QUIPS.sample end end end end
Apply minor tweaks to Quips module
Apply minor tweaks to Quips module We don't need a fully qualified namespace to access the App root, so trim it. Likewise, we can use Array#sample to achieve the same effects, while avoiding getting our hands dirty with the random numbers. Change-Id: I8909540e85477118cf2042a74e2517bb41f42c42 Reviewed-on: https://gerrit.causes.com/26198 Reviewed-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@causes.com> Tested-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@causes.com>
Ruby
mit
causes/twigg,causes/twigg
ruby
## Code Before: require 'yaml' module Twigg module App module Quips QUIPS = YAML.load_file(Twigg::App.root + 'data' + 'quips.yml') def self.random QUIPS[rand(QUIPS.size)] end end end end ## Instruction: Apply minor tweaks to Quips module We don't need a fully qualified namespace to access the App root, so trim it. Likewise, we can use Array#sample to achieve the same effects, while avoiding getting our hands dirty with the random numbers. Change-Id: I8909540e85477118cf2042a74e2517bb41f42c42 Reviewed-on: https://gerrit.causes.com/26198 Reviewed-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@causes.com> Tested-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@causes.com> ## Code After: require 'yaml' module Twigg module App module Quips QUIPS = YAML.load_file(App.root + 'data' + 'quips.yml') def self.random QUIPS.sample end end end end
require 'yaml' module Twigg module App module Quips - QUIPS = YAML.load_file(Twigg::App.root + 'data' + 'quips.yml') ? ------- + QUIPS = YAML.load_file(App.root + 'data' + 'quips.yml') def self.random - QUIPS[rand(QUIPS.size)] + QUIPS.sample end end end end
4
0.307692
2
2
eea8946f80c9189cab049c5ac294ecd11ad40b37
packages/cli-core/src/cli.ts
packages/cli-core/src/cli.ts
import { commands } from "./commands"; import { configure, Logger, getLogger } from "log4js"; import { loggerConfig } from "./defaults"; import { configController } from "./config"; export const initiate = async (process: NodeJS.Process): Promise<void> => { const cliConfig = await configController.composeCliConfig(process); configure(loggerConfig); const logger: Logger = getLogger(cliConfig.logging); logger.trace(`CLI started with parsed configuration: ${JSON.stringify(cliConfig, null, 2)}`); return commands .find((command) => command.name === cliConfig.command) .action(cliConfig, logger); };
import { commands } from "./commands"; import { configure, Logger, getLogger } from "log4js"; import { loggerConfig } from "./defaults"; import { configController } from "./config"; export const initiate = async (process: NodeJS.Process): Promise<void> => { const cliConfig = await configController.composeCliConfig(process); configure(loggerConfig); const logger: Logger = getLogger(cliConfig.logging); logger.trace(`CLI started with parsed configuration: ${JSON.stringify(cliConfig, null, 2)}`); // Handle a case where the node process hangs on MacOS. const isMacOS = process.platform === "darwin"; if (isMacOS) { process.on("SIGHUP", () => process.exit(0)); } return commands .find((command) => command.name === cliConfig.command) .action(cliConfig, logger); };
Fix a bug where the node process hangs on MacOS 🐛
fix: Fix a bug where the node process hangs on MacOS 🐛 Signed-off-by: Georgi Georgiev <37121d6a39c9149491e77436b3bbc4b8d12a00b9@gmail.com>
TypeScript
apache-2.0
StBozov/Core
typescript
## Code Before: import { commands } from "./commands"; import { configure, Logger, getLogger } from "log4js"; import { loggerConfig } from "./defaults"; import { configController } from "./config"; export const initiate = async (process: NodeJS.Process): Promise<void> => { const cliConfig = await configController.composeCliConfig(process); configure(loggerConfig); const logger: Logger = getLogger(cliConfig.logging); logger.trace(`CLI started with parsed configuration: ${JSON.stringify(cliConfig, null, 2)}`); return commands .find((command) => command.name === cliConfig.command) .action(cliConfig, logger); }; ## Instruction: fix: Fix a bug where the node process hangs on MacOS 🐛 Signed-off-by: Georgi Georgiev <37121d6a39c9149491e77436b3bbc4b8d12a00b9@gmail.com> ## Code After: import { commands } from "./commands"; import { configure, Logger, getLogger } from "log4js"; import { loggerConfig } from "./defaults"; import { configController } from "./config"; export const initiate = async (process: NodeJS.Process): Promise<void> => { const cliConfig = await configController.composeCliConfig(process); configure(loggerConfig); const logger: Logger = getLogger(cliConfig.logging); logger.trace(`CLI started with parsed configuration: ${JSON.stringify(cliConfig, null, 2)}`); // Handle a case where the node process hangs on MacOS. const isMacOS = process.platform === "darwin"; if (isMacOS) { process.on("SIGHUP", () => process.exit(0)); } return commands .find((command) => command.name === cliConfig.command) .action(cliConfig, logger); };
import { commands } from "./commands"; import { configure, Logger, getLogger } from "log4js"; import { loggerConfig } from "./defaults"; import { configController } from "./config"; export const initiate = async (process: NodeJS.Process): Promise<void> => { const cliConfig = await configController.composeCliConfig(process); configure(loggerConfig); const logger: Logger = getLogger(cliConfig.logging); logger.trace(`CLI started with parsed configuration: ${JSON.stringify(cliConfig, null, 2)}`); + // Handle a case where the node process hangs on MacOS. + const isMacOS = process.platform === "darwin"; + if (isMacOS) { + process.on("SIGHUP", () => process.exit(0)); + } + return commands .find((command) => command.name === cliConfig.command) .action(cliConfig, logger); };
6
0.352941
6
0
3a596d8b4c61fab7b432eb47de7ec614e5c972cb
README.md
README.md
![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/WebContent/img/ryougi_logo.png) ## LICENSE - This project is license by [Apache License](LICENSE). - The ownership of this project is owned by the [author](https://github.com/RyougiChan). At the same time, it **cannot be used for commercial purposes**. In accordance with our narrow understanding (Additional subsidiary terms), **All activities that are profitable are of commercial use**. ## DEMO IMAGE * **Content Manage System index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/CMS.png "CMS index page") * **Website Index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/index.png "Website index page") * **Admin login page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/login.png "Admin login page") * **News reading page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/news.png "News reading page")
![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/WebContent/img/ryougi_logo.png) ## ABSTRACT - The project provides a JAVA implement of management for artical, including ADD/DELETE/MODIFY operation. - Further, this project will be a module of my own independent website. ## TECHNICAL USED * **Spring4** + **Hibernate4** + **Struts2** * **JAVA** (With jdk version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b15)) * **JavaScript/JQuery** * **HTML/JSP + CSS** ## LICENSE - This project is license by [Apache License](LICENSE). - The ownership of this project is owned by the [author](https://github.com/RyougiChan). At the same time, it **cannot be used for commercial purposes**. In accordance with our narrow understanding (Additional subsidiary terms), **All activities that are profitable are of commercial use**. ## DEMO IMAGE * **Content Manage System index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/CMS.png "CMS index page") * **Website Index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/index.png "Website index page") * **Admin login page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/login.png "Admin login page") * **News reading page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/news.png "News reading page")
Add ABSTRACT and TECHNICAL USED
Add ABSTRACT and TECHNICAL USED
Markdown
apache-2.0
RyougiChan/NewsSystem,RyougiChan/NewsSystem,RyougiChan/NewsSystem
markdown
## Code Before: ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/WebContent/img/ryougi_logo.png) ## LICENSE - This project is license by [Apache License](LICENSE). - The ownership of this project is owned by the [author](https://github.com/RyougiChan). At the same time, it **cannot be used for commercial purposes**. In accordance with our narrow understanding (Additional subsidiary terms), **All activities that are profitable are of commercial use**. ## DEMO IMAGE * **Content Manage System index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/CMS.png "CMS index page") * **Website Index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/index.png "Website index page") * **Admin login page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/login.png "Admin login page") * **News reading page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/news.png "News reading page") ## Instruction: Add ABSTRACT and TECHNICAL USED ## Code After: ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/WebContent/img/ryougi_logo.png) ## ABSTRACT - The project provides a JAVA implement of management for artical, including ADD/DELETE/MODIFY operation. - Further, this project will be a module of my own independent website. ## TECHNICAL USED * **Spring4** + **Hibernate4** + **Struts2** * **JAVA** (With jdk version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b15)) * **JavaScript/JQuery** * **HTML/JSP + CSS** ## LICENSE - This project is license by [Apache License](LICENSE). - The ownership of this project is owned by the [author](https://github.com/RyougiChan). At the same time, it **cannot be used for commercial purposes**. In accordance with our narrow understanding (Additional subsidiary terms), **All activities that are profitable are of commercial use**. ## DEMO IMAGE * **Content Manage System index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/CMS.png "CMS index page") * **Website Index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/index.png "Website index page") * **Admin login page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/login.png "Admin login page") * **News reading page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/news.png "News reading page")
![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/WebContent/img/ryougi_logo.png) + ## ABSTRACT + - The project provides a JAVA implement of management for artical, including ADD/DELETE/MODIFY operation. + - Further, this project will be a module of my own independent website. + + ## TECHNICAL USED + * **Spring4** + **Hibernate4** + **Struts2** + * **JAVA** (With jdk version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b15)) + * **JavaScript/JQuery** + * **HTML/JSP + CSS** ## LICENSE - This project is license by [Apache License](LICENSE). - The ownership of this project is owned by the [author](https://github.com/RyougiChan). At the same time, it **cannot be used for commercial purposes**. In accordance with our narrow understanding (Additional subsidiary terms), **All activities that are profitable are of commercial use**. ## DEMO IMAGE * **Content Manage System index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/CMS.png "CMS index page") * **Website Index page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/index.png "Website index page") * **Admin login page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/login.png "Admin login page") * **News reading page** ![ryougi](https://github.com/RyougiChan/NewsSystem/blob/master/demo_png/news.png "News reading page")
9
0.5625
9
0
1c6f607821615442a1998a76f64e309403affc30
lib/smart_answer_flows/student-finance-forms/outcomes/_when_you_can_apply.govspeak.erb
lib/smart_answer_flows/student-finance-forms/outcomes/_when_you_can_apply.govspeak.erb
^The deadline is 9 months after the first day of the month that your course started. This would be 31 May if your course started on 20 September.^
^The deadline is 9 months after the first day of the course's academic year. Academic years begin on 1 September, 1 January, 1 April and 1 July. Ask someone who runs your course if you don't know which one applies.^
Update outcome copy in `student-finance-forms`
Update outcome copy in `student-finance-forms` The copy in the outcome `when-you-can-apply` must mention the academic year.
HTML+ERB
mit
stwalsh/smart-answers,alphagov/smart-answers,stwalsh/smart-answers,stwalsh/smart-answers,aledelcueto/smart-answers,stwalsh/smart-answers,alphagov/smart-answers,aledelcueto/smart-answers,aledelcueto/smart-answers,alphagov/smart-answers,aledelcueto/smart-answers,alphagov/smart-answers
html+erb
## Code Before: ^The deadline is 9 months after the first day of the month that your course started. This would be 31 May if your course started on 20 September.^ ## Instruction: Update outcome copy in `student-finance-forms` The copy in the outcome `when-you-can-apply` must mention the academic year. ## Code After: ^The deadline is 9 months after the first day of the course's academic year. Academic years begin on 1 September, 1 January, 1 April and 1 July. Ask someone who runs your course if you don't know which one applies.^
- ^The deadline is 9 months after the first day of the month that your course started. This would be 31 May if your course started on 20 September.^ + ^The deadline is 9 months after the first day of the course's academic year. Academic years begin on 1 September, 1 January, 1 April and 1 July. Ask someone who runs your course if you don't know which one applies.^
2
2
1
1
e96290f23632312a2b1a7d2e61ff3b453e5ea9b6
week-4/variable-methods.rb
week-4/variable-methods.rb
puts "What is your first name?" first = gets.chomp puts "What is your middle name?" middle = gets.chomp puts "What is your last name?" last = gets.chomp puts "Hello " + first + " " + middle + " " + last +"! It is very nice to meet you!" # Bigger, Better Favorite Number puts "What is your favorite number?" fav = gets.chomp better = fav.to_i + 1 puts "How about the bigger, better number of " + better.to_s + "?"
puts "What is your first name?" first = gets.chomp puts "What is your middle name?" middle = gets.chomp puts "What is your last name?" last = gets.chomp puts "Hello " + first + " " + middle + " " + last +"! It is very nice to meet you!" # Bigger, Better Favorite Number puts "What is your favorite number?" fav = gets.chomp better = fav.to_i + 1 puts "How about the bigger, better number of " + better.to_s + "?" =begin * How did you define a local variable? You can define a local varible by naming the variable and following it with an "=" sign and then a value. * How do you define a method? You can define a method with "def <method name>". You should be sure to complete the Ruby method by using the "end" keyword. * What is the difference between a local variable and a method? A local variable stores a value whereas a method is an executable piece of code. * How do you run a ruby program from the command line? You can run a ruby program from the command line using the command "ruby <file.rb>". * How do you run an RSpec file from the command line? You can RSpec file from the command line using the command "rspec <RSpec.rb>". * What was confusing about the material? What made sense? Having to convert integer/floats to strings for output was confusing at first. This is different than in Python (a language I've had experience with) where numbers are automatically converted to strings in the proper context. =end
Add reflection section to ruby file.
Add reflection section to ruby file.
Ruby
mit
kmark1625/phase-0,kmark1625/phase-0,kmark1625/phase-0
ruby
## Code Before: puts "What is your first name?" first = gets.chomp puts "What is your middle name?" middle = gets.chomp puts "What is your last name?" last = gets.chomp puts "Hello " + first + " " + middle + " " + last +"! It is very nice to meet you!" # Bigger, Better Favorite Number puts "What is your favorite number?" fav = gets.chomp better = fav.to_i + 1 puts "How about the bigger, better number of " + better.to_s + "?" ## Instruction: Add reflection section to ruby file. ## Code After: puts "What is your first name?" first = gets.chomp puts "What is your middle name?" middle = gets.chomp puts "What is your last name?" last = gets.chomp puts "Hello " + first + " " + middle + " " + last +"! It is very nice to meet you!" # Bigger, Better Favorite Number puts "What is your favorite number?" fav = gets.chomp better = fav.to_i + 1 puts "How about the bigger, better number of " + better.to_s + "?" =begin * How did you define a local variable? You can define a local varible by naming the variable and following it with an "=" sign and then a value. * How do you define a method? You can define a method with "def <method name>". You should be sure to complete the Ruby method by using the "end" keyword. * What is the difference between a local variable and a method? A local variable stores a value whereas a method is an executable piece of code. * How do you run a ruby program from the command line? You can run a ruby program from the command line using the command "ruby <file.rb>". * How do you run an RSpec file from the command line? You can RSpec file from the command line using the command "rspec <RSpec.rb>". * What was confusing about the material? What made sense? Having to convert integer/floats to strings for output was confusing at first. This is different than in Python (a language I've had experience with) where numbers are automatically converted to strings in the proper context. =end
puts "What is your first name?" first = gets.chomp puts "What is your middle name?" middle = gets.chomp puts "What is your last name?" last = gets.chomp puts "Hello " + first + " " + middle + " " + last +"! It is very nice to meet you!" # Bigger, Better Favorite Number puts "What is your favorite number?" fav = gets.chomp better = fav.to_i + 1 puts "How about the bigger, better number of " + better.to_s + "?" + + =begin + * How did you define a local variable? + You can define a local varible by naming the variable and following it with an "=" sign and then a value. + * How do you define a method? + You can define a method with "def <method name>". You should be sure to complete the Ruby method by using the "end" keyword. + * What is the difference between a local variable and a method? + A local variable stores a value whereas a method is an executable piece of code. + * How do you run a ruby program from the command line? + You can run a ruby program from the command line using the command "ruby <file.rb>". + * How do you run an RSpec file from the command line? + You can RSpec file from the command line using the command "rspec <RSpec.rb>". + * What was confusing about the material? What made sense? + Having to convert integer/floats to strings for output was confusing at first. This is different than in Python (a language I've had experience with) where numbers are automatically converted to strings in the proper context. + =end
15
1.153846
15
0
29bf3b2414e2a611ee98fda86b9256016a908fa1
rethinkdb/rethinkdb-tests.ts
rethinkdb/rethinkdb-tests.ts
/// <reference path="rethinkdb.d.ts" /> import r = require("rethinkdb") r.connect({host:"localhost", port: 28015}, function(err, conn) { console.log("HI", err, conn) var testDb = r.db('test') testDb.tableCreate('users').run(conn, function(err, stuff) { var users = testDb.table('users') users.insert({name: "bob"}).run(conn, function() {}) users.filter(function(doc?) { return doc("henry").eq("bob") }) .between("james", "beth") .limit(4) .run(conn, function(err, cursor) { cursor.toArray().then(rows => { console.log(rows); }); }) }) }) // use promises instead of callbacks r.connect({host:"localhost", port: 28015}).then(function(conn) { console.log("HI", conn) var testDb = r.db('test') testDb.tableCreate('users').run(conn).then(function(stuff) { var users = testDb.table('users') users.insert({name: "bob"}).run(conn, function() {}) users.filter(function(doc?) { return doc("henry").eq("bob") }) .between("james", "beth") .limit(4) .run(conn); }) })
/// <reference path="rethinkdb.d.ts" /> import r = require("rethinkdb"); r.connect({ host: "localhost", port: 28015 }, function(err, conn) { console.log("HI", err, conn); const testDb = r.db("test"); testDb.tableCreate("users").run(conn, function(err, stuff) { const users = testDb.table("users"); users.insert({ name: "bob" }).run(conn, function() { }); users.filter(function(doc?) { return doc("henry").eq("bob"); }) .between("james", "beth") .limit(4) .run(conn, function(err, cursor) { cursor.toArray().then(rows => { console.log(rows); }); }); }); }); // use promises instead of callbacks r.connect({ host: "localhost", port: 28015 }).then(function(conn) { console.log("HI", conn); const testDb = r.db("test"); testDb.tableCreate("users").run(conn).then(function(stuff) { const users = testDb.table("users"); users.insert({ name: "bob" }).run(conn, function() { }); users.filter(function(doc?) { return doc("henry").eq("bob"); }) .between("james", "beth") .limit(4) .run(conn); }); });
Clean up the listing issues in the test
[rethinkdb] Clean up the listing issues in the test
TypeScript
mit
alexdresko/DefinitelyTyped,use-strict/DefinitelyTyped,YousefED/DefinitelyTyped,borisyankov/DefinitelyTyped,isman-usoh/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,slavomirvojacek/DefinitelyTyped,rolandzwaga/DefinitelyTyped,jimthedev/DefinitelyTyped,damianog/DefinitelyTyped,HPFOD/DefinitelyTyped,ashwinr/DefinitelyTyped,hellopao/DefinitelyTyped,QuatroCode/DefinitelyTyped,scriby/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,yuit/DefinitelyTyped,subash-a/DefinitelyTyped,rcchen/DefinitelyTyped,benliddicott/DefinitelyTyped,aciccarello/DefinitelyTyped,AgentME/DefinitelyTyped,subash-a/DefinitelyTyped,psnider/DefinitelyTyped,jimthedev/DefinitelyTyped,georgemarshall/DefinitelyTyped,damianog/DefinitelyTyped,pocesar/DefinitelyTyped,zuzusik/DefinitelyTyped,ashwinr/DefinitelyTyped,markogresak/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,laurentiustamate94/DefinitelyTyped,smrq/DefinitelyTyped,yuit/DefinitelyTyped,micurs/DefinitelyTyped,chrismbarr/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,schmuli/DefinitelyTyped,use-strict/DefinitelyTyped,psnider/DefinitelyTyped,magny/DefinitelyTyped,shlomiassaf/DefinitelyTyped,QuatroCode/DefinitelyTyped,AgentME/DefinitelyTyped,alexdresko/DefinitelyTyped,AgentME/DefinitelyTyped,arusakov/DefinitelyTyped,borisyankov/DefinitelyTyped,amir-arad/DefinitelyTyped,danfma/DefinitelyTyped,aciccarello/DefinitelyTyped,danfma/DefinitelyTyped,rcchen/DefinitelyTyped,slavomirvojacek/DefinitelyTyped,sledorze/DefinitelyTyped,pocesar/DefinitelyTyped,nycdotnet/DefinitelyTyped,alvarorahul/DefinitelyTyped,magny/DefinitelyTyped,arusakov/DefinitelyTyped,nycdotnet/DefinitelyTyped,one-pieces/DefinitelyTyped,johan-gorter/DefinitelyTyped,zuzusik/DefinitelyTyped,arusakov/DefinitelyTyped,hellopao/DefinitelyTyped,martinduparc/DefinitelyTyped,pocesar/DefinitelyTyped,HPFOD/DefinitelyTyped,mcrawshaw/DefinitelyTyped,minodisk/DefinitelyTyped,zuzusik/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,psnider/DefinitelyTyped,benishouga/DefinitelyTyped,dsebastien/DefinitelyTyped,sledorze/DefinitelyTyped,johan-gorter/DefinitelyTyped,martinduparc/DefinitelyTyped,smrq/DefinitelyTyped,daptiv/DefinitelyTyped,syuilo/DefinitelyTyped,mcliment/DefinitelyTyped,georgemarshall/DefinitelyTyped,isman-usoh/DefinitelyTyped,schmuli/DefinitelyTyped,chrismbarr/DefinitelyTyped,minodisk/DefinitelyTyped,abbasmhd/DefinitelyTyped,abbasmhd/DefinitelyTyped,chrootsu/DefinitelyTyped,scriby/DefinitelyTyped,jimthedev/DefinitelyTyped,rolandzwaga/DefinitelyTyped,shlomiassaf/DefinitelyTyped,hellopao/DefinitelyTyped,mcrawshaw/DefinitelyTyped,benishouga/DefinitelyTyped,aciccarello/DefinitelyTyped,YousefED/DefinitelyTyped,dsebastien/DefinitelyTyped,syuilo/DefinitelyTyped,martinduparc/DefinitelyTyped,progre/DefinitelyTyped,benishouga/DefinitelyTyped,chrootsu/DefinitelyTyped,progre/DefinitelyTyped,georgemarshall/DefinitelyTyped,alvarorahul/DefinitelyTyped,schmuli/DefinitelyTyped
typescript
## Code Before: /// <reference path="rethinkdb.d.ts" /> import r = require("rethinkdb") r.connect({host:"localhost", port: 28015}, function(err, conn) { console.log("HI", err, conn) var testDb = r.db('test') testDb.tableCreate('users').run(conn, function(err, stuff) { var users = testDb.table('users') users.insert({name: "bob"}).run(conn, function() {}) users.filter(function(doc?) { return doc("henry").eq("bob") }) .between("james", "beth") .limit(4) .run(conn, function(err, cursor) { cursor.toArray().then(rows => { console.log(rows); }); }) }) }) // use promises instead of callbacks r.connect({host:"localhost", port: 28015}).then(function(conn) { console.log("HI", conn) var testDb = r.db('test') testDb.tableCreate('users').run(conn).then(function(stuff) { var users = testDb.table('users') users.insert({name: "bob"}).run(conn, function() {}) users.filter(function(doc?) { return doc("henry").eq("bob") }) .between("james", "beth") .limit(4) .run(conn); }) }) ## Instruction: [rethinkdb] Clean up the listing issues in the test ## Code After: /// <reference path="rethinkdb.d.ts" /> import r = require("rethinkdb"); r.connect({ host: "localhost", port: 28015 }, function(err, conn) { console.log("HI", err, conn); const testDb = r.db("test"); testDb.tableCreate("users").run(conn, function(err, stuff) { const users = testDb.table("users"); users.insert({ name: "bob" }).run(conn, function() { }); users.filter(function(doc?) { return doc("henry").eq("bob"); }) .between("james", "beth") .limit(4) .run(conn, function(err, cursor) { cursor.toArray().then(rows => { console.log(rows); }); }); }); }); // use promises instead of callbacks r.connect({ host: "localhost", port: 28015 }).then(function(conn) { console.log("HI", conn); const testDb = r.db("test"); testDb.tableCreate("users").run(conn).then(function(stuff) { const users = testDb.table("users"); users.insert({ name: "bob" }).run(conn, function() { }); users.filter(function(doc?) { return doc("henry").eq("bob"); }) .between("james", "beth") .limit(4) .run(conn); }); });
/// <reference path="rethinkdb.d.ts" /> - import r = require("rethinkdb") + import r = require("rethinkdb"); ? + - r.connect({host:"localhost", port: 28015}, function(err, conn) { + r.connect({ host: "localhost", port: 28015 }, function(err, conn) { ? + + + - console.log("HI", err, conn) + console.log("HI", err, conn); ? + - var testDb = r.db('test') - testDb.tableCreate('users').run(conn, function(err, stuff) { - var users = testDb.table('users') + const testDb = r.db("test"); + + testDb.tableCreate("users").run(conn, function(err, stuff) { + const users = testDb.table("users"); + - users.insert({name: "bob"}).run(conn, function() {}) ? -- + users.insert({ name: "bob" }).run(conn, function() { ? + + + }); users.filter(function(doc?) { - return doc("henry").eq("bob") + return doc("henry").eq("bob"); ? + }) .between("james", "beth") .limit(4) .run(conn, function(err, cursor) { cursor.toArray().then(rows => { console.log(rows); }); - }) + }); ? + - - }) + }); ? + - }) + }); ? + // use promises instead of callbacks - r.connect({host:"localhost", port: 28015}).then(function(conn) { + r.connect({ host: "localhost", port: 28015 }).then(function(conn) { ? + + + - console.log("HI", conn) + console.log("HI", conn); ? + - var testDb = r.db('test') - testDb.tableCreate('users').run(conn).then(function(stuff) { - var users = testDb.table('users') + const testDb = r.db("test"); + + testDb.tableCreate("users").run(conn).then(function(stuff) { + const users = testDb.table("users"); + - users.insert({name: "bob"}).run(conn, function() {}) ? -- + users.insert({ name: "bob" }).run(conn, function() { ? + + + }); users.filter(function(doc?) { - return doc("henry").eq("bob") + return doc("henry").eq("bob"); ? + }) .between("james", "beth") .limit(4) .run(conn); - - }) + }); ? + - }) + }); ? +
48
1.090909
26
22
ea09470ebdd69af2fa1d7d07d7b04fe3ff857987
raffle.py
raffle.py
from random import randint class Raffle(object): """ Raffle contains a list of action objects, one of which will be chosen and shown to the player. """ def __init__(self): self.options = dict() # Maps options to weights def add(self, option, weight=1): """ """ if option in self.options: self.options[option] += weight else: self.options[option] = weight def get(self): """ chooses one action from the bag and returns it. """ total_weights = 0 for weight in self.options.values(): total_weights += weight roll = randint(0, total_weights) for option, weight in self.options.items(): if roll <= weight: return option else: roll -= weight def merge(self, other): """ Merge the contents of another Raffle with this Raffle. """ for option, weight in other.options.items(): self.add(option, weight)
from random import randint class Raffle(object): """ Raffle contains a list of action objects, one of which will be chosen and shown to the player. """ def __init__(self): self.options = dict() # Maps options to weights def add(self, option, weight=1): """ """ if option in self.options: self.options[option] += weight else: self.options[option] = weight def get(self): """ chooses one action from the bag and returns it. """ total_weights = 0 for weight in self.options.values(): total_weights += weight roll = randint(0, total_weights) for option, weight in self.options.items(): if roll <= weight: return option else: roll -= weight def merge(self, other): """ Merge the contents of another Raffle with this Raffle. """ for option, weight in other.options.items(): self.add(option, weight) def __len__(self): """ Return the combined weight of all options in the Raffle. """ total = 0 for _, weight in self.options.items(): total += weight return total
Add length method to Raffle
Add length method to Raffle
Python
apache-2.0
SageBerg/St.GeorgeGame,SageBerg/St.GeorgeGame,SageBerg/St.GeorgeGame,SageBerg/St.GeorgeGame
python
## Code Before: from random import randint class Raffle(object): """ Raffle contains a list of action objects, one of which will be chosen and shown to the player. """ def __init__(self): self.options = dict() # Maps options to weights def add(self, option, weight=1): """ """ if option in self.options: self.options[option] += weight else: self.options[option] = weight def get(self): """ chooses one action from the bag and returns it. """ total_weights = 0 for weight in self.options.values(): total_weights += weight roll = randint(0, total_weights) for option, weight in self.options.items(): if roll <= weight: return option else: roll -= weight def merge(self, other): """ Merge the contents of another Raffle with this Raffle. """ for option, weight in other.options.items(): self.add(option, weight) ## Instruction: Add length method to Raffle ## Code After: from random import randint class Raffle(object): """ Raffle contains a list of action objects, one of which will be chosen and shown to the player. """ def __init__(self): self.options = dict() # Maps options to weights def add(self, option, weight=1): """ """ if option in self.options: self.options[option] += weight else: self.options[option] = weight def get(self): """ chooses one action from the bag and returns it. """ total_weights = 0 for weight in self.options.values(): total_weights += weight roll = randint(0, total_weights) for option, weight in self.options.items(): if roll <= weight: return option else: roll -= weight def merge(self, other): """ Merge the contents of another Raffle with this Raffle. """ for option, weight in other.options.items(): self.add(option, weight) def __len__(self): """ Return the combined weight of all options in the Raffle. """ total = 0 for _, weight in self.options.items(): total += weight return total
from random import randint class Raffle(object): """ Raffle contains a list of action objects, one of which will be chosen and shown to the player. """ def __init__(self): self.options = dict() # Maps options to weights def add(self, option, weight=1): """ """ if option in self.options: self.options[option] += weight else: self.options[option] = weight def get(self): """ chooses one action from the bag and returns it. """ total_weights = 0 for weight in self.options.values(): total_weights += weight roll = randint(0, total_weights) for option, weight in self.options.items(): if roll <= weight: return option else: roll -= weight def merge(self, other): """ Merge the contents of another Raffle with this Raffle. """ for option, weight in other.options.items(): self.add(option, weight) + + def __len__(self): + """ + Return the combined weight of all options in the Raffle. + """ + total = 0 + for _, weight in self.options.items(): + total += weight + return total
9
0.219512
9
0
afd278e162a297fcc41744d0a949a613f1b2ca31
packages/pr/prim-instances.yaml
packages/pr/prim-instances.yaml
homepage: https://github.com/chessai/prim-instances.git changelog-type: markdown hash: b3585721bf35ea8aeca44d832834992e006e121bb76da8b3e3d510f7dadd403c test-bench-deps: base: ! '>=4.7 && <4.12' quickcheck-classes: ! '>=0.4.11.1' base-orphans: -any quickcheck-instances: -any tasty-quickcheck: -any tasty: -any QuickCheck: -any primitive: ! '>=0.6.4.0' prim-instances: -any maintainer: chessai1996@gmail.com synopsis: prim typeclass instances changelog: ! '# Revision history for prim-instances ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.7 && <4.13' primitive: ! '>=0.6.4.0' all-versions: - 0.1.0.0 author: chessai latest: 0.1.0.0 description-type: haddock description: ! 'orphan instances for primitive''s ''Prim'' typeclass. Types which abstract over a single primitive type have trivially lawful and sometimes useful instances.' license-name: BSD-3-Clause
homepage: https://github.com/chessai/prim-instances.git changelog-type: markdown hash: 0bedee812919e2d9b346a8177b16926f8caa56273a5daeadf179d929186aa139 test-bench-deps: base: -any quickcheck-classes: -any QuickCheck: -any prim-instances: -any maintainer: chessai <chessai1996@gmail.com> synopsis: Prim typeclass instances changelog: | # Revision history for prim-instances ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world. basic-deps: base: ! '>=4.7 && <4.14' primitive: ! '>=0.6.4 && <0.8' all-versions: - 0.1.0.0 - '0.2' author: chessai latest: '0.2' description-type: haddock description: |- orphan instances for primitive's 'Prim' typeclass. Types which abstract over a single primitive type (i.e. are well-aligned) have trivially lawful and sometimes useful instances. license-name: BSD-3-Clause
Update from Hackage at 2019-06-26T15:06:05Z
Update from Hackage at 2019-06-26T15:06:05Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/chessai/prim-instances.git changelog-type: markdown hash: b3585721bf35ea8aeca44d832834992e006e121bb76da8b3e3d510f7dadd403c test-bench-deps: base: ! '>=4.7 && <4.12' quickcheck-classes: ! '>=0.4.11.1' base-orphans: -any quickcheck-instances: -any tasty-quickcheck: -any tasty: -any QuickCheck: -any primitive: ! '>=0.6.4.0' prim-instances: -any maintainer: chessai1996@gmail.com synopsis: prim typeclass instances changelog: ! '# Revision history for prim-instances ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.7 && <4.13' primitive: ! '>=0.6.4.0' all-versions: - 0.1.0.0 author: chessai latest: 0.1.0.0 description-type: haddock description: ! 'orphan instances for primitive''s ''Prim'' typeclass. Types which abstract over a single primitive type have trivially lawful and sometimes useful instances.' license-name: BSD-3-Clause ## Instruction: Update from Hackage at 2019-06-26T15:06:05Z ## Code After: homepage: https://github.com/chessai/prim-instances.git changelog-type: markdown hash: 0bedee812919e2d9b346a8177b16926f8caa56273a5daeadf179d929186aa139 test-bench-deps: base: -any quickcheck-classes: -any QuickCheck: -any prim-instances: -any maintainer: chessai <chessai1996@gmail.com> synopsis: Prim typeclass instances changelog: | # Revision history for prim-instances ## 0.1.0.0 -- YYYY-mm-dd * First version. Released on an unsuspecting world. basic-deps: base: ! '>=4.7 && <4.14' primitive: ! '>=0.6.4 && <0.8' all-versions: - 0.1.0.0 - '0.2' author: chessai latest: '0.2' description-type: haddock description: |- orphan instances for primitive's 'Prim' typeclass. Types which abstract over a single primitive type (i.e. are well-aligned) have trivially lawful and sometimes useful instances. license-name: BSD-3-Clause
homepage: https://github.com/chessai/prim-instances.git changelog-type: markdown - hash: b3585721bf35ea8aeca44d832834992e006e121bb76da8b3e3d510f7dadd403c + hash: 0bedee812919e2d9b346a8177b16926f8caa56273a5daeadf179d929186aa139 test-bench-deps: - base: ! '>=4.7 && <4.12' - quickcheck-classes: ! '>=0.4.11.1' - base-orphans: -any ? -------- + base: -any - quickcheck-instances: -any ? ^^ ^^^^ + quickcheck-classes: -any ? ^^^ ^ - tasty-quickcheck: -any - tasty: -any QuickCheck: -any - primitive: ! '>=0.6.4.0' prim-instances: -any - maintainer: chessai1996@gmail.com + maintainer: chessai <chessai1996@gmail.com> ? +++++++++ + - synopsis: prim typeclass instances ? ^ + synopsis: Prim typeclass instances ? ^ + changelog: | - changelog: ! '# Revision history for prim-instances ? ---------- - - + # Revision history for prim-instances - ## 0.1.0.0 -- YYYY-mm-dd - * First version. Released on an unsuspecting world. - - ' basic-deps: - base: ! '>=4.7 && <4.13' ? ^ + base: ! '>=4.7 && <4.14' ? ^ - primitive: ! '>=0.6.4.0' ? ^ + primitive: ! '>=0.6.4 && <0.8' ? ++++++ ^ all-versions: - 0.1.0.0 + - '0.2' author: chessai - latest: 0.1.0.0 + latest: '0.2' description-type: haddock + description: |- - description: ! 'orphan instances for primitive''s ''Prim'' typeclass. ? ------------ - - - - - + orphan instances for primitive's 'Prim' typeclass. - Types which abstract over a single primitive type - - have trivially lawful and sometimes useful instances.' + (i.e. are well-aligned) have trivially lawful and + sometimes useful instances. license-name: BSD-3-Clause
37
0.973684
15
22
8d668d7bdd9ed814e25128ef01d8c3e647d4cf0f
README.md
README.md
Vulk is a 3d engine aimed to provide the best graphical experience with Vulkan API. It is written in Python with C binding and is based on SDL2. ## What is the project goal ? - Easy to use: you don't need to understand Vulkan to use VULK. - Modular: every single part of the api must be modular. - Full: you shouldn't need to customize core code, it should suits everyone needs. ## Why this project ? Currently it's just a hobby project but it could become something big one day. ## Architecture ``` vulk/ graphic/ renderer/ vulkan/ webgl/ opengl/ d3/ material/ core/ d2/ ``` ## How it works It's similar to LibGDX because I like their 3D API. ``` scene = Scene() camera = PerspectiveCamera() renderer = VulkanRenderer() renderer.render(scene, camera) ```
[![Build Status](https://travis-ci.org/js78/vulk.svg?branch=master)](https://travis-ci.org/js78/vulk) ## What is it ? Vulk is a 3d engine aimed to provide the best graphical experience with Vulkan API. It is written in Python with C binding and is based on SDL2. ## What is the project goal ? - Easy to use: you don't need to understand Vulkan to use VULK. - Modular: every single part of the api must be modular. - Full: you shouldn't need to customize core code, it should suits everyone needs. ## Why this project ? Currently it's just a hobby project but it could become something big one day. ## Architecture ``` vulk/ graphic/ renderer/ vulkan/ webgl/ opengl/ d3/ material/ core/ d2/ ``` ## How it works It's similar to LibGDX because I like their 3D API. ``` scene = Scene() camera = PerspectiveCamera() renderer = VulkanRenderer() renderer.render(scene, camera) ```
Add build status badge to readme
Add build status badge to readme
Markdown
apache-2.0
realitix/vulk,realitix/vulk,Echelon9/vulk,Echelon9/vulk
markdown
## Code Before: Vulk is a 3d engine aimed to provide the best graphical experience with Vulkan API. It is written in Python with C binding and is based on SDL2. ## What is the project goal ? - Easy to use: you don't need to understand Vulkan to use VULK. - Modular: every single part of the api must be modular. - Full: you shouldn't need to customize core code, it should suits everyone needs. ## Why this project ? Currently it's just a hobby project but it could become something big one day. ## Architecture ``` vulk/ graphic/ renderer/ vulkan/ webgl/ opengl/ d3/ material/ core/ d2/ ``` ## How it works It's similar to LibGDX because I like their 3D API. ``` scene = Scene() camera = PerspectiveCamera() renderer = VulkanRenderer() renderer.render(scene, camera) ``` ## Instruction: Add build status badge to readme ## Code After: [![Build Status](https://travis-ci.org/js78/vulk.svg?branch=master)](https://travis-ci.org/js78/vulk) ## What is it ? Vulk is a 3d engine aimed to provide the best graphical experience with Vulkan API. It is written in Python with C binding and is based on SDL2. ## What is the project goal ? - Easy to use: you don't need to understand Vulkan to use VULK. - Modular: every single part of the api must be modular. - Full: you shouldn't need to customize core code, it should suits everyone needs. ## Why this project ? Currently it's just a hobby project but it could become something big one day. ## Architecture ``` vulk/ graphic/ renderer/ vulkan/ webgl/ opengl/ d3/ material/ core/ d2/ ``` ## How it works It's similar to LibGDX because I like their 3D API. ``` scene = Scene() camera = PerspectiveCamera() renderer = VulkanRenderer() renderer.render(scene, camera) ```
+ + [![Build Status](https://travis-ci.org/js78/vulk.svg?branch=master)](https://travis-ci.org/js78/vulk) + + ## What is it ? Vulk is a 3d engine aimed to provide the best graphical experience with Vulkan API. It is written in Python with C binding and is based on SDL2. ## What is the project goal ? - Easy to use: you don't need to understand Vulkan to use VULK. - Modular: every single part of the api must be modular. - Full: you shouldn't need to customize core code, it should suits everyone needs. ## Why this project ? Currently it's just a hobby project but it could become something big one day. ## Architecture ``` vulk/ graphic/ renderer/ vulkan/ webgl/ opengl/ d3/ material/ core/ d2/ ``` ## How it works It's similar to LibGDX because I like their 3D API. ``` scene = Scene() camera = PerspectiveCamera() renderer = VulkanRenderer() renderer.render(scene, camera) ```
4
0.1
4
0
c77a63483ca7e3e626b9a9c6aa57b6504b01e80f
client/components/auth/router.decorator.js
client/components/auth/router.decorator.js
'use strict'; (function() { angular.module('impactApp.auth') .run(function($rootScope, $state, Auth) { // Redirect to login if route requires auth and the user is not logged in, or doesn't have required role $rootScope.$on('$stateChangeStart', function(event, next, nextParams) { if (!next.authenticate) { return; } if (typeof next.redirectTo !== 'undefined') { event.preventDefault(); if (typeof next.redirectTo === 'string') { $state.go(next.redirectTo, nextParams); } else { var params = _.assign(nextParams, next.redirectTo.params); $state.go(next.redirectTo.url, params); } return; } if (typeof next.authenticate === 'string') { Auth.hasRole(next.authenticate, _.noop).then(has => { if (has) { return; } event.preventDefault(); return Auth.isLoggedIn(_.noop).then(is => { $state.go(is ? 'departement' : 'login'); }); }); } else { Auth.isLoggedIn(_.noop).then(is => { if (is) { return; } event.preventDefault(); $state.go('departement'); }); } }); }); })();
'use strict'; (function() { angular.module('impactApp.auth') .run(function($rootScope, $state, Auth) { // Redirect to login if route requires auth and the user is not logged in, or doesn't have required role $rootScope.$on('$stateChangeStart', function(event, next, nextParams) { if (typeof next.authenticate !== 'undefined') { Auth.isLoggedIn(_.noop).then(is => { if (is) { return; } event.preventDefault(); $state.go('login'); }); return; } if (typeof next.redirectTo !== 'undefined') { event.preventDefault(); if (typeof next.redirectTo === 'string') { $state.go(next.redirectTo, nextParams); } else { var params = _.assign(nextParams, next.redirectTo.params); $state.go(next.redirectTo.url, params); } return; } }); }); })();
Resolve redirectTo even if state doesn't need auth
Resolve redirectTo even if state doesn't need auth
JavaScript
agpl-3.0
sgmap/impact,sgmap/impact
javascript
## Code Before: 'use strict'; (function() { angular.module('impactApp.auth') .run(function($rootScope, $state, Auth) { // Redirect to login if route requires auth and the user is not logged in, or doesn't have required role $rootScope.$on('$stateChangeStart', function(event, next, nextParams) { if (!next.authenticate) { return; } if (typeof next.redirectTo !== 'undefined') { event.preventDefault(); if (typeof next.redirectTo === 'string') { $state.go(next.redirectTo, nextParams); } else { var params = _.assign(nextParams, next.redirectTo.params); $state.go(next.redirectTo.url, params); } return; } if (typeof next.authenticate === 'string') { Auth.hasRole(next.authenticate, _.noop).then(has => { if (has) { return; } event.preventDefault(); return Auth.isLoggedIn(_.noop).then(is => { $state.go(is ? 'departement' : 'login'); }); }); } else { Auth.isLoggedIn(_.noop).then(is => { if (is) { return; } event.preventDefault(); $state.go('departement'); }); } }); }); })(); ## Instruction: Resolve redirectTo even if state doesn't need auth ## Code After: 'use strict'; (function() { angular.module('impactApp.auth') .run(function($rootScope, $state, Auth) { // Redirect to login if route requires auth and the user is not logged in, or doesn't have required role $rootScope.$on('$stateChangeStart', function(event, next, nextParams) { if (typeof next.authenticate !== 'undefined') { Auth.isLoggedIn(_.noop).then(is => { if (is) { return; } event.preventDefault(); $state.go('login'); }); return; } if (typeof next.redirectTo !== 'undefined') { event.preventDefault(); if (typeof next.redirectTo === 'string') { $state.go(next.redirectTo, nextParams); } else { var params = _.assign(nextParams, next.redirectTo.params); $state.go(next.redirectTo.url, params); } return; } }); }); })();
'use strict'; (function() { angular.module('impactApp.auth') .run(function($rootScope, $state, Auth) { // Redirect to login if route requires auth and the user is not logged in, or doesn't have required role $rootScope.$on('$stateChangeStart', function(event, next, nextParams) { - if (!next.authenticate) { + if (typeof next.authenticate !== 'undefined') { + Auth.isLoggedIn(_.noop).then(is => { + if (is) { + return; + } + + event.preventDefault(); + $state.go('login'); + }); + return; } if (typeof next.redirectTo !== 'undefined') { event.preventDefault(); if (typeof next.redirectTo === 'string') { - $state.go(next.redirectTo, nextParams); } else { var params = _.assign(nextParams, next.redirectTo.params); $state.go(next.redirectTo.url, params); } return; } - - if (typeof next.authenticate === 'string') { - Auth.hasRole(next.authenticate, _.noop).then(has => { - if (has) { - return; - } - - event.preventDefault(); - return Auth.isLoggedIn(_.noop).then(is => { - $state.go(is ? 'departement' : 'login'); - }); - }); - } else { - Auth.isLoggedIn(_.noop).then(is => { - if (is) { - return; - } - - event.preventDefault(); - $state.go('departement'); - }); - } }); }); })();
34
0.693878
10
24
f43f9fad45f2a1830b40645a651027a0324e2de4
docs/basic-usage/artisan.md
docs/basic-usage/artisan.md
--- title: Using artisan commands weight: 7 --- You can create a role or permission from a console with artisan commands. ```bash php artisan permission:create-role writer ``` ```bash php artisan permission:create-permission "edit articles" ``` When creating permissions/roles for specific guards you can specify the guard names as a second argument: ```bash php artisan permission:create-role writer web ``` ```bash php artisan permission:create-permission "edit articles" web ``` When creating roles you can also create and link permissions at the same time: ```bash php artisan permission:create-role writer web "create articles|edit articles" ```
--- title: Using artisan commands weight: 7 --- ## Creating roles and permissions with Artisan Commands You can create a role or permission from the console with artisan commands. ```bash php artisan permission:create-role writer ``` ```bash php artisan permission:create-permission "edit articles" ``` When creating permissions/roles for specific guards you can specify the guard names as a second argument: ```bash php artisan permission:create-role writer web ``` ```bash php artisan permission:create-permission "edit articles" web ``` When creating roles you can also create and link permissions at the same time: ```bash php artisan permission:create-role writer web "create articles|edit articles" ``` ## Displaying roles and permissions in the console There is also a `show` command to show a table of roles and permissions per guard: ```bash php artisan permission:show ``` ## Resetting the Cache When you use the built-in functions for manipulating roles and permissions, the cache is automatically reset for you, and relations are automatically reloaded for the current model record. See the Advanced-Usage/Cache section of these docs for detailed specifics. If you need to manually reset the cache for this package, you may use the following artisan command: ```bash php artisan permission:cache-reset ``` Again, it is more efficient to use the API provided by this package, instead of manually clearing the cache.
Add clarity to the Artisan docs
Add clarity to the Artisan docs
Markdown
mit
drbyte/laravel-permission,spatie/laravel-permission,drbyte/laravel-permission
markdown
## Code Before: --- title: Using artisan commands weight: 7 --- You can create a role or permission from a console with artisan commands. ```bash php artisan permission:create-role writer ``` ```bash php artisan permission:create-permission "edit articles" ``` When creating permissions/roles for specific guards you can specify the guard names as a second argument: ```bash php artisan permission:create-role writer web ``` ```bash php artisan permission:create-permission "edit articles" web ``` When creating roles you can also create and link permissions at the same time: ```bash php artisan permission:create-role writer web "create articles|edit articles" ``` ## Instruction: Add clarity to the Artisan docs ## Code After: --- title: Using artisan commands weight: 7 --- ## Creating roles and permissions with Artisan Commands You can create a role or permission from the console with artisan commands. ```bash php artisan permission:create-role writer ``` ```bash php artisan permission:create-permission "edit articles" ``` When creating permissions/roles for specific guards you can specify the guard names as a second argument: ```bash php artisan permission:create-role writer web ``` ```bash php artisan permission:create-permission "edit articles" web ``` When creating roles you can also create and link permissions at the same time: ```bash php artisan permission:create-role writer web "create articles|edit articles" ``` ## Displaying roles and permissions in the console There is also a `show` command to show a table of roles and permissions per guard: ```bash php artisan permission:show ``` ## Resetting the Cache When you use the built-in functions for manipulating roles and permissions, the cache is automatically reset for you, and relations are automatically reloaded for the current model record. See the Advanced-Usage/Cache section of these docs for detailed specifics. If you need to manually reset the cache for this package, you may use the following artisan command: ```bash php artisan permission:cache-reset ``` Again, it is more efficient to use the API provided by this package, instead of manually clearing the cache.
--- title: Using artisan commands weight: 7 --- + ## Creating roles and permissions with Artisan Commands + - You can create a role or permission from a console with artisan commands. ? ^ + You can create a role or permission from the console with artisan commands. ? ^^^ ```bash php artisan permission:create-role writer ``` ```bash php artisan permission:create-permission "edit articles" ``` When creating permissions/roles for specific guards you can specify the guard names as a second argument: ```bash php artisan permission:create-role writer web ``` ```bash php artisan permission:create-permission "edit articles" web ``` When creating roles you can also create and link permissions at the same time: ```bash php artisan permission:create-role writer web "create articles|edit articles" ``` + + ## Displaying roles and permissions in the console + + There is also a `show` command to show a table of roles and permissions per guard: + + ```bash + php artisan permission:show + ``` + + ## Resetting the Cache + + When you use the built-in functions for manipulating roles and permissions, the cache is automatically reset for you, and relations are automatically reloaded for the current model record. + + See the Advanced-Usage/Cache section of these docs for detailed specifics. + + If you need to manually reset the cache for this package, you may use the following artisan command: + + ```bash + php artisan permission:cache-reset + ``` + + Again, it is more efficient to use the API provided by this package, instead of manually clearing the cache.
26
0.866667
25
1
b56520c10c0e10ab8cf7bb5eda437eb0b22f8079
src/static/components/navbar/navbar.html
src/static/components/navbar/navbar.html
<nav class="navbar navbar-static-top navbar-inverse" ng-controller="NavbarCtrl"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="/"> <span class="glyphicon glyphicon-home"></span> {{'LABEL_INTRO_HOME_TITLE' | translate:translationData}} </a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav"> <li><a ng-href="http://dbflute.seasar.org/ja/manual/function/helper/intro/index.html">Intro's Document Page</a></li> <li><a ng-href="http://github.com/dbflute/dbflute-intro">Intro's Github Page</a></li> <li><a ng-href="http://dbflute.seasar.org/">DBFlute Top</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <a href="" ng-click="changeLanguage('en')">{{'BUTTON_LANG_EN' | translate:translationData}}</a> <a href="" ng-click="changeLanguage('ja')">{{'BUTTON_LANG_JA' | translate:translationData}}</a> </ul> </div> </div> </nav>
<nav class="navbar navbar-static-top navbar-inverse" ng-controller="NavbarCtrl"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="/"> <span class="glyphicon glyphicon-home"></span> {{'LABEL_INTRO_HOME_TITLE' | translate:translationData}} </a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav"> <li><a ng-href="http://dbflute.seasar.org/ja/manual/function/helper/intro/index.html" target="_blank">Intro's Document Page</a></li> <li><a ng-href="http://github.com/dbflute/dbflute-intro" target="_blank">Intro's Github Page</a></li> <li><a ng-href="http://dbflute.seasar.org/" target="_blank">DBFlute Top</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <a href="" ng-click="changeLanguage('en')">{{'BUTTON_LANG_EN' | translate:translationData}}</a> <a href="" ng-click="changeLanguage('ja')">{{'BUTTON_LANG_JA' | translate:translationData}}</a> </ul> </div> </div> </nav>
Add `target="_blank" to navigation link of external resources`
Add `target="_blank" to navigation link of external resources`
HTML
apache-2.0
dbflute/dbflute-intro,dbflute/dbflute-intro,dbflute/dbflute-intro,dbflute/dbflute-intro,dbflute/dbflute-intro,dbflute/dbflute-intro,dbflute/dbflute-intro
html
## Code Before: <nav class="navbar navbar-static-top navbar-inverse" ng-controller="NavbarCtrl"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="/"> <span class="glyphicon glyphicon-home"></span> {{'LABEL_INTRO_HOME_TITLE' | translate:translationData}} </a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav"> <li><a ng-href="http://dbflute.seasar.org/ja/manual/function/helper/intro/index.html">Intro's Document Page</a></li> <li><a ng-href="http://github.com/dbflute/dbflute-intro">Intro's Github Page</a></li> <li><a ng-href="http://dbflute.seasar.org/">DBFlute Top</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <a href="" ng-click="changeLanguage('en')">{{'BUTTON_LANG_EN' | translate:translationData}}</a> <a href="" ng-click="changeLanguage('ja')">{{'BUTTON_LANG_JA' | translate:translationData}}</a> </ul> </div> </div> </nav> ## Instruction: Add `target="_blank" to navigation link of external resources` ## Code After: <nav class="navbar navbar-static-top navbar-inverse" ng-controller="NavbarCtrl"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="/"> <span class="glyphicon glyphicon-home"></span> {{'LABEL_INTRO_HOME_TITLE' | translate:translationData}} </a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav"> <li><a ng-href="http://dbflute.seasar.org/ja/manual/function/helper/intro/index.html" target="_blank">Intro's Document Page</a></li> <li><a ng-href="http://github.com/dbflute/dbflute-intro" target="_blank">Intro's Github Page</a></li> <li><a ng-href="http://dbflute.seasar.org/" target="_blank">DBFlute Top</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <a href="" ng-click="changeLanguage('en')">{{'BUTTON_LANG_EN' | translate:translationData}}</a> <a href="" ng-click="changeLanguage('ja')">{{'BUTTON_LANG_JA' | translate:translationData}}</a> </ul> </div> </div> </nav>
<nav class="navbar navbar-static-top navbar-inverse" ng-controller="NavbarCtrl"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="/"> <span class="glyphicon glyphicon-home"></span> {{'LABEL_INTRO_HOME_TITLE' | translate:translationData}} </a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav"> - <li><a ng-href="http://dbflute.seasar.org/ja/manual/function/helper/intro/index.html">Intro's Document Page</a></li> + <li><a ng-href="http://dbflute.seasar.org/ja/manual/function/helper/intro/index.html" target="_blank">Intro's Document Page</a></li> ? ++++++++++++++++ - <li><a ng-href="http://github.com/dbflute/dbflute-intro">Intro's Github Page</a></li> + <li><a ng-href="http://github.com/dbflute/dbflute-intro" target="_blank">Intro's Github Page</a></li> ? ++++++++++++++++ - <li><a ng-href="http://dbflute.seasar.org/">DBFlute Top</a></li> + <li><a ng-href="http://dbflute.seasar.org/" target="_blank">DBFlute Top</a></li> ? ++++++++++++++++ </ul> <ul class="nav navbar-nav navbar-right"> <a href="" ng-click="changeLanguage('en')">{{'BUTTON_LANG_EN' | translate:translationData}}</a> <a href="" ng-click="changeLanguage('ja')">{{'BUTTON_LANG_JA' | translate:translationData}}</a> </ul> </div> </div> </nav>
6
0.272727
3
3
e4594662b73173fae86d3ad64351828421aae962
src/palettes/nearest.js
src/palettes/nearest.js
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { levels: number } = defaults ): ColorRGBA => { const step = 255 / (options.levels - 1); // $FlowFixMe return color.map(c => { const bucket = Math.round(c / step); return Math.round(bucket * step); }); }; export default { name: "nearest", getColor, options: defaults, optionTypes, defaults };
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { levels: number } = defaults ): ColorRGBA => { if (options.levels >= 256) { return color; } const step = 255 / (options.levels - 1); // $FlowFixMe return color.map(c => { const bucket = Math.round(c / step); return Math.round(bucket * step); }); }; export default { name: "nearest", getColor, options: defaults, optionTypes, defaults };
Return early if full colour
Nearest: Return early if full colour
JavaScript
mit
gyng/ditherer,gyng/ditherer,gyng/ditherer
javascript
## Code Before: // @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { levels: number } = defaults ): ColorRGBA => { const step = 255 / (options.levels - 1); // $FlowFixMe return color.map(c => { const bucket = Math.round(c / step); return Math.round(bucket * step); }); }; export default { name: "nearest", getColor, options: defaults, optionTypes, defaults }; ## Instruction: Nearest: Return early if full colour ## Code After: // @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { levels: number } = defaults ): ColorRGBA => { if (options.levels >= 256) { return color; } const step = 255 / (options.levels - 1); // $FlowFixMe return color.map(c => { const bucket = Math.round(c / step); return Math.round(bucket * step); }); }; export default { name: "nearest", getColor, options: defaults, optionTypes, defaults };
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { levels: number } = defaults ): ColorRGBA => { + if (options.levels >= 256) { + return color; + } + const step = 255 / (options.levels - 1); // $FlowFixMe return color.map(c => { const bucket = Math.round(c / step); return Math.round(bucket * step); }); }; export default { name: "nearest", getColor, options: defaults, optionTypes, defaults };
4
0.114286
4
0
9273a34486b1907c08afc5543dfe36a8771a0de8
requirements-tests.txt
requirements-tests.txt
pep8>=1.7.0,<1.8 flake8==3.7.9 astroid==2.3.3 pylint==2.4.4 mock==3.0.5 codecov==2.1.10 coverage==4.5.4 requests requests_mock # 5.3.2 is latest version which still supports Python 3.5, >= 6.2.5 is needed for Python 3.10 pytest==5.3.2; python_version <= '3.5' pytest==6.2.5; python_version >= '3.6' cryptography==3.2.1 # NOTE: Only needed by nttcis loadbalancer driver pyopenssl==19.1.0
pep8>=1.7.0,<1.8 flake8==3.7.9 astroid==2.3.3 pylint==2.4.4 mock==3.0.5 codecov==2.1.10 coverage==4.5.4 requests requests_mock # 5.3.2 is latest version which still supports Python 3.5, >= 6.2.5 is needed for Python 3.10 pytest==5.3.2; python_version <= '3.5' pytest==6.2.5; python_version >= '3.6' cryptography==3.2.1; python_version <= '3.5' cryptography==35.0.0; python_version >= '3.6' # NOTE: Only needed by nttcis loadbalancer driver pyopenssl==19.1.0
Use newer version of cryptography under Python >= 3.6.
Use newer version of cryptography under Python >= 3.6.
Text
apache-2.0
Kami/libcloud,apache/libcloud,Kami/libcloud,mistio/libcloud,Kami/libcloud,mistio/libcloud,apache/libcloud,apache/libcloud,mistio/libcloud
text
## Code Before: pep8>=1.7.0,<1.8 flake8==3.7.9 astroid==2.3.3 pylint==2.4.4 mock==3.0.5 codecov==2.1.10 coverage==4.5.4 requests requests_mock # 5.3.2 is latest version which still supports Python 3.5, >= 6.2.5 is needed for Python 3.10 pytest==5.3.2; python_version <= '3.5' pytest==6.2.5; python_version >= '3.6' cryptography==3.2.1 # NOTE: Only needed by nttcis loadbalancer driver pyopenssl==19.1.0 ## Instruction: Use newer version of cryptography under Python >= 3.6. ## Code After: pep8>=1.7.0,<1.8 flake8==3.7.9 astroid==2.3.3 pylint==2.4.4 mock==3.0.5 codecov==2.1.10 coverage==4.5.4 requests requests_mock # 5.3.2 is latest version which still supports Python 3.5, >= 6.2.5 is needed for Python 3.10 pytest==5.3.2; python_version <= '3.5' pytest==6.2.5; python_version >= '3.6' cryptography==3.2.1; python_version <= '3.5' cryptography==35.0.0; python_version >= '3.6' # NOTE: Only needed by nttcis loadbalancer driver pyopenssl==19.1.0
pep8>=1.7.0,<1.8 flake8==3.7.9 astroid==2.3.3 pylint==2.4.4 mock==3.0.5 codecov==2.1.10 coverage==4.5.4 requests requests_mock # 5.3.2 is latest version which still supports Python 3.5, >= 6.2.5 is needed for Python 3.10 pytest==5.3.2; python_version <= '3.5' pytest==6.2.5; python_version >= '3.6' - cryptography==3.2.1 + cryptography==3.2.1; python_version <= '3.5' + cryptography==35.0.0; python_version >= '3.6' # NOTE: Only needed by nttcis loadbalancer driver pyopenssl==19.1.0
3
0.2
2
1
3de756f361c96960d038cc47fed1384c50854823
.scrutinizer.yml
.scrutinizer.yml
imports: - javascript - php filter: excluded_paths: [3rdparty/*, js/vendor/*, js/public/app.js, tests/] tools: external_code_coverage: timeout: 600 # Timeout in seconds. 10 minutes runs: 2 # Scrutinizer waits for the first 2 coverage submissions (unit & integration) build: nodes: analysis: tests: override: - php-scrutinizer-run
imports: - javascript - php filter: excluded_paths: [3rdparty/*, js/vendor/*, js/public/app.js, tests/] dependency_paths: - vendor/christophwurst/nextcloud tools: external_code_coverage: timeout: 300 # Timeout in seconds, 5 minutes runs: 2 # Scrutinizer waits for the first 2 coverage submissions (unit & integration) build: nodes: analysis: dependencies: before: - composer require --dev "christophwurst/nextcloud ^12.0.0" tests: override: - php-scrutinizer-run
Install core dependencies when Scrutinizer is run
Install core dependencies when Scrutinizer is run This will make the Scrutinizer results greatly more useful, as we get rid of the vast amount of false positives on "type not found" which got reported every time we import some class from the Nextcloud/ownCloud core. Also, timeout the wait for code coverage data already after 5 minutes. This should speed up the process on the private clone of owncloud/music repository where there is no-one posting the coverage data.
YAML
agpl-3.0
paulijar/music,owncloud/music,owncloud/music,paulijar/music,paulijar/music,paulijar/music,owncloud/music,owncloud/music,paulijar/music,owncloud/music
yaml
## Code Before: imports: - javascript - php filter: excluded_paths: [3rdparty/*, js/vendor/*, js/public/app.js, tests/] tools: external_code_coverage: timeout: 600 # Timeout in seconds. 10 minutes runs: 2 # Scrutinizer waits for the first 2 coverage submissions (unit & integration) build: nodes: analysis: tests: override: - php-scrutinizer-run ## Instruction: Install core dependencies when Scrutinizer is run This will make the Scrutinizer results greatly more useful, as we get rid of the vast amount of false positives on "type not found" which got reported every time we import some class from the Nextcloud/ownCloud core. Also, timeout the wait for code coverage data already after 5 minutes. This should speed up the process on the private clone of owncloud/music repository where there is no-one posting the coverage data. ## Code After: imports: - javascript - php filter: excluded_paths: [3rdparty/*, js/vendor/*, js/public/app.js, tests/] dependency_paths: - vendor/christophwurst/nextcloud tools: external_code_coverage: timeout: 300 # Timeout in seconds, 5 minutes runs: 2 # Scrutinizer waits for the first 2 coverage submissions (unit & integration) build: nodes: analysis: dependencies: before: - composer require --dev "christophwurst/nextcloud ^12.0.0" tests: override: - php-scrutinizer-run
imports: - javascript - php filter: excluded_paths: [3rdparty/*, js/vendor/*, js/public/app.js, tests/] + dependency_paths: + - vendor/christophwurst/nextcloud tools: external_code_coverage: - timeout: 600 # Timeout in seconds. 10 minutes ? ^ ^ ^^ + timeout: 300 # Timeout in seconds, 5 minutes ? ^ ^ ^ runs: 2 # Scrutinizer waits for the first 2 coverage submissions (unit & integration) build: nodes: - analysis: + analysis: ? ++ + dependencies: + before: + - composer require --dev "christophwurst/nextcloud ^12.0.0" - tests: + tests: ? ++ - override: + override: ? ++ - - php-scrutinizer-run + - php-scrutinizer-run ? ++
15
0.833333
10
5
b380b250b9c3b3fc6887cb578f8a6d4af08af831
inspection/Default.xml
inspection/Default.xml
<?xml version="1.0" encoding="UTF-8"?> <inspections profile_name="Default" version="1.0" is_locked="false"> <option name="myName" value="Default" /> <option name="myLocal" value="true" /> <inspection_tool class="CssMissingSemicolon" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LossyEncoding" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpMissingDocCommentInspection" enabled="true" level="WARNING" enabled_by_default="true"> <option name="CHECK_CLASS" value="false" /> <option name="CHECK_FIELD" value="true" /> </inspection_tool> <inspection_tool class="PhpMultipleClassesDeclarationsInOneFile" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpRedundantClosingTagInspection" enabled="true" level="WARNING" enabled_by_default="true" /> </inspections>
<?xml version="1.0" encoding="UTF-8"?> <inspections profile_name="Default" version="1.0" is_locked="false"> <option name="myName" value="Default" /> <option name="myLocal" value="true" /> <inspection_tool class="CssMissingSemicolon" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LossyEncoding" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpIllegalPsrClassPathInspection" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpMissingDocCommentInspection" enabled="true" level="WARNING" enabled_by_default="true"> <option name="CHECK_CLASS" value="false" /> <option name="CHECK_FIELD" value="true" /> </inspection_tool> <inspection_tool class="PhpMultipleClassesDeclarationsInOneFile" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpRedundantClosingTagInspection" enabled="true" level="WARNING" enabled_by_default="true" /> </inspections>
Add inspection for PSR-0/PSR-4 class name / path mismatch
Add inspection for PSR-0/PSR-4 class name / path mismatch
XML
mit
nicwortel/phpstorm-ide-config
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <inspections profile_name="Default" version="1.0" is_locked="false"> <option name="myName" value="Default" /> <option name="myLocal" value="true" /> <inspection_tool class="CssMissingSemicolon" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LossyEncoding" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpMissingDocCommentInspection" enabled="true" level="WARNING" enabled_by_default="true"> <option name="CHECK_CLASS" value="false" /> <option name="CHECK_FIELD" value="true" /> </inspection_tool> <inspection_tool class="PhpMultipleClassesDeclarationsInOneFile" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpRedundantClosingTagInspection" enabled="true" level="WARNING" enabled_by_default="true" /> </inspections> ## Instruction: Add inspection for PSR-0/PSR-4 class name / path mismatch ## Code After: <?xml version="1.0" encoding="UTF-8"?> <inspections profile_name="Default" version="1.0" is_locked="false"> <option name="myName" value="Default" /> <option name="myLocal" value="true" /> <inspection_tool class="CssMissingSemicolon" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LossyEncoding" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpIllegalPsrClassPathInspection" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpMissingDocCommentInspection" enabled="true" level="WARNING" enabled_by_default="true"> <option name="CHECK_CLASS" value="false" /> <option name="CHECK_FIELD" value="true" /> </inspection_tool> <inspection_tool class="PhpMultipleClassesDeclarationsInOneFile" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpRedundantClosingTagInspection" enabled="true" level="WARNING" enabled_by_default="true" /> </inspections>
<?xml version="1.0" encoding="UTF-8"?> <inspections profile_name="Default" version="1.0" is_locked="false"> <option name="myName" value="Default" /> <option name="myLocal" value="true" /> <inspection_tool class="CssMissingSemicolon" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="LossyEncoding" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="PhpIllegalPsrClassPathInspection" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpMissingDocCommentInspection" enabled="true" level="WARNING" enabled_by_default="true"> <option name="CHECK_CLASS" value="false" /> <option name="CHECK_FIELD" value="true" /> </inspection_tool> <inspection_tool class="PhpMultipleClassesDeclarationsInOneFile" enabled="true" level="WARNING" enabled_by_default="true" /> <inspection_tool class="PhpRedundantClosingTagInspection" enabled="true" level="WARNING" enabled_by_default="true" /> </inspections>
1
0.066667
1
0
b91cd0d0fd37546114f5883ec1d6a36b1d72a6bb
android/src/main/AndroidManifest.xml
android/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pilloxa.backgroundjob"> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <application> <service android:name=".BackgroundJob" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/> <service android:name=".ReactNativeEventStarter$MyHeadlessJsTaskService" android:enabled="true"/> </application> </manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pilloxa.backgroundjob"> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <application> <service android:name=".BackgroundJob" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/> <service android:name=".ReactNativeEventStarter$MyHeadlessJsTaskService" android:enabled="true"/> <service android:name=".ForegroundJobService" android:enabled="true"/> </application> </manifest>
Add missing service to manifest
Add missing service to manifest
XML
mit
vikeri/react-native-background-job,vikeri/react-native-background-job,vikeri/react-native-background-job,vikeri/react-native-background-job
xml
## Code Before: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pilloxa.backgroundjob"> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <application> <service android:name=".BackgroundJob" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/> <service android:name=".ReactNativeEventStarter$MyHeadlessJsTaskService" android:enabled="true"/> </application> </manifest> ## Instruction: Add missing service to manifest ## Code After: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pilloxa.backgroundjob"> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <application> <service android:name=".BackgroundJob" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/> <service android:name=".ReactNativeEventStarter$MyHeadlessJsTaskService" android:enabled="true"/> <service android:name=".ForegroundJobService" android:enabled="true"/> </application> </manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.pilloxa.backgroundjob"> <uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <application> <service android:name=".BackgroundJob" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/> <service android:name=".ReactNativeEventStarter$MyHeadlessJsTaskService" android:enabled="true"/> + <service android:name=".ForegroundJobService" + android:enabled="true"/> </application> </manifest>
2
0.166667
2
0
788e1dc690660a714185e687244e4e59862e50df
core/app/models/concerns/spree/adjustment_source.rb
core/app/models/concerns/spree/adjustment_source.rb
module Spree module AdjustmentSource extend ActiveSupport::Concern included do def deals_with_adjustments_for_deleted_source adjustment_scope = self.adjustments.includes(:order).references(:spree_orders) # For incomplete orders, remove the adjustment completely. adjustment_scope.where("spree_orders.completed_at IS NULL").destroy_all # For complete orders, the source will be invalid. # Therefore we nullify the source_id, leaving the adjustment in place. # This would mean that the order's total is not altered at all. adjustment_scope.where("spree_orders.completed_at IS NOT NULL").each do |adjustment| adjustment.update_columns( source_id: nil, updated_at: Time.now, ) end end end end end
module Spree module AdjustmentSource extend ActiveSupport::Concern included do def deals_with_adjustments_for_deleted_source adjustment_scope = self.adjustments.joins(:order) # For incomplete orders, remove the adjustment completely. adjustment_scope.where(spree_orders: { completed_at: nil }).destroy_all # For complete orders, the source will be invalid. # Therefore we nullify the source_id, leaving the adjustment in place. # This would mean that the order's total is not altered at all. attrs = { source_id: nil, updated_at: Time.now } adjustment_scope.where.not(spree_orders: { completed_at: nil }).update_all(attrs) end end end end
Move all calculations to DB in AdjustmentSource
Move all calculations to DB in AdjustmentSource Closes #364
Ruby
bsd-3-clause
grzlus/solidus,scottcrawford03/solidus,Arpsara/solidus,pervino/solidus,bonobos/solidus,bonobos/solidus,richardnuno/solidus,bonobos/solidus,pervino/solidus,lsirivong/solidus,Arpsara/solidus,devilcoders/solidus,devilcoders/solidus,scottcrawford03/solidus,scottcrawford03/solidus,Arpsara/solidus,scottcrawford03/solidus,jordan-brough/solidus,devilcoders/solidus,devilcoders/solidus,richardnuno/solidus,richardnuno/solidus,lsirivong/solidus,grzlus/solidus,lsirivong/solidus,grzlus/solidus,lsirivong/solidus,forkata/solidus,forkata/solidus,jordan-brough/solidus,richardnuno/solidus,Arpsara/solidus,jordan-brough/solidus,forkata/solidus,jordan-brough/solidus,pervino/solidus,bonobos/solidus,pervino/solidus,forkata/solidus,grzlus/solidus
ruby
## Code Before: module Spree module AdjustmentSource extend ActiveSupport::Concern included do def deals_with_adjustments_for_deleted_source adjustment_scope = self.adjustments.includes(:order).references(:spree_orders) # For incomplete orders, remove the adjustment completely. adjustment_scope.where("spree_orders.completed_at IS NULL").destroy_all # For complete orders, the source will be invalid. # Therefore we nullify the source_id, leaving the adjustment in place. # This would mean that the order's total is not altered at all. adjustment_scope.where("spree_orders.completed_at IS NOT NULL").each do |adjustment| adjustment.update_columns( source_id: nil, updated_at: Time.now, ) end end end end end ## Instruction: Move all calculations to DB in AdjustmentSource Closes #364 ## Code After: module Spree module AdjustmentSource extend ActiveSupport::Concern included do def deals_with_adjustments_for_deleted_source adjustment_scope = self.adjustments.joins(:order) # For incomplete orders, remove the adjustment completely. adjustment_scope.where(spree_orders: { completed_at: nil }).destroy_all # For complete orders, the source will be invalid. # Therefore we nullify the source_id, leaving the adjustment in place. # This would mean that the order's total is not altered at all. attrs = { source_id: nil, updated_at: Time.now } adjustment_scope.where.not(spree_orders: { completed_at: nil }).update_all(attrs) end end end end
module Spree module AdjustmentSource extend ActiveSupport::Concern included do def deals_with_adjustments_for_deleted_source - adjustment_scope = self.adjustments.includes(:order).references(:spree_orders) ? ----- -------------------------- + adjustment_scope = self.adjustments.joins(:order) ? ++ # For incomplete orders, remove the adjustment completely. - adjustment_scope.where("spree_orders.completed_at IS NULL").destroy_all ? - ^ ^^ ^^^^^ + adjustment_scope.where(spree_orders: { completed_at: nil }).destroy_all ? ^^^^ + ^^^ ^ # For complete orders, the source will be invalid. # Therefore we nullify the source_id, leaving the adjustment in place. # This would mean that the order's total is not altered at all. + attrs = { - adjustment_scope.where("spree_orders.completed_at IS NOT NULL").each do |adjustment| - adjustment.update_columns( - source_id: nil, ? -- + source_id: nil, - updated_at: Time.now, ? -- - + updated_at: Time.now - ) ? ^^^ + } ? ^ - end + adjustment_scope.where.not(spree_orders: { completed_at: nil }).update_all(attrs) end end end end
15
0.625
7
8
f7287f6f3e0d2406364e4f3366eb6d3883697558
src/main/resources/META-INF/mods.toml
src/main/resources/META-INF/mods.toml
modLoader="javafml" loaderVersion="[41,)" issueTrackerURL="https://github.com/MC-U-Team/U-Team-Core/issues" license="Apache-2.0 License" [[mods]] modId="uteamcore" version="${file.jarVersion}" displayName="U Team Core" displayURL="https://u-team.info/mods/uteamcore" updateJSONURL="https://api.u-team.info/update/uteamcore.json" logoFile="logo.png" credits="Team U-Team" authors="HyCraftHD, MrTroble" description="Join our discord server here: https://discord.u-team.info\n\nThis library contains many useful modding stuff!" [[dependencies.uteamcore]] modId="forge" mandatory=true versionRange="[41.0.63,)" ordering="NONE" side="BOTH" [[dependencies.uteamcore]] modId="minecraft" mandatory=true versionRange="[1.19]" ordering="NONE" side="BOTH"
modLoader="javafml" loaderVersion="[41,)" issueTrackerURL="https://github.com/MC-U-Team/U-Team-Core/issues" license="Apache-2.0 License" [[mods]] modId="uteamcore" version="${file.jarVersion}" displayName="U Team Core" displayURL="https://u-team.info/mods/uteamcore" updateJSONURL="https://api.u-team.info/update/uteamcore.json" logoFile="logo.png" credits="Team U-Team" authors="HyCraftHD, MrTroble" description="Join our discord server here: https://discord.hycrafthd.net\n\nThis library contains many useful modding stuff!" [[dependencies.uteamcore]] modId="forge" mandatory=true versionRange="[41.0.63,)" ordering="NONE" side="BOTH" [[dependencies.uteamcore]] modId="minecraft" mandatory=true versionRange="[1.19]" ordering="NONE" side="BOTH"
Replace discord url with hycrafthd.net url
Replace discord url with hycrafthd.net url
TOML
apache-2.0
MC-U-Team/U-Team-Core,MC-U-Team/U-Team-Core
toml
## Code Before: modLoader="javafml" loaderVersion="[41,)" issueTrackerURL="https://github.com/MC-U-Team/U-Team-Core/issues" license="Apache-2.0 License" [[mods]] modId="uteamcore" version="${file.jarVersion}" displayName="U Team Core" displayURL="https://u-team.info/mods/uteamcore" updateJSONURL="https://api.u-team.info/update/uteamcore.json" logoFile="logo.png" credits="Team U-Team" authors="HyCraftHD, MrTroble" description="Join our discord server here: https://discord.u-team.info\n\nThis library contains many useful modding stuff!" [[dependencies.uteamcore]] modId="forge" mandatory=true versionRange="[41.0.63,)" ordering="NONE" side="BOTH" [[dependencies.uteamcore]] modId="minecraft" mandatory=true versionRange="[1.19]" ordering="NONE" side="BOTH" ## Instruction: Replace discord url with hycrafthd.net url ## Code After: modLoader="javafml" loaderVersion="[41,)" issueTrackerURL="https://github.com/MC-U-Team/U-Team-Core/issues" license="Apache-2.0 License" [[mods]] modId="uteamcore" version="${file.jarVersion}" displayName="U Team Core" displayURL="https://u-team.info/mods/uteamcore" updateJSONURL="https://api.u-team.info/update/uteamcore.json" logoFile="logo.png" credits="Team U-Team" authors="HyCraftHD, MrTroble" description="Join our discord server here: https://discord.hycrafthd.net\n\nThis library contains many useful modding stuff!" [[dependencies.uteamcore]] modId="forge" mandatory=true versionRange="[41.0.63,)" ordering="NONE" side="BOTH" [[dependencies.uteamcore]] modId="minecraft" mandatory=true versionRange="[1.19]" ordering="NONE" side="BOTH"
modLoader="javafml" loaderVersion="[41,)" issueTrackerURL="https://github.com/MC-U-Team/U-Team-Core/issues" license="Apache-2.0 License" [[mods]] modId="uteamcore" version="${file.jarVersion}" displayName="U Team Core" displayURL="https://u-team.info/mods/uteamcore" updateJSONURL="https://api.u-team.info/update/uteamcore.json" logoFile="logo.png" credits="Team U-Team" authors="HyCraftHD, MrTroble" - description="Join our discord server here: https://discord.u-team.info\n\nThis library contains many useful modding stuff!" ? ^^ ^^^^^^^ + description="Join our discord server here: https://discord.hycrafthd.net\n\nThis library contains many useful modding stuff!" ? ^^^^^^ ++++ ^ [[dependencies.uteamcore]] modId="forge" mandatory=true versionRange="[41.0.63,)" ordering="NONE" side="BOTH" [[dependencies.uteamcore]] modId="minecraft" mandatory=true versionRange="[1.19]" ordering="NONE" side="BOTH"
2
0.068966
1
1
75396f18dc333aa8940aaee55493490cd276f375
web/ctf_gameserver/web/registration/templates/registration.html
web/ctf_gameserver/web/registration/templates/registration.html
{% extends 'base.html' %} {% load i18n %} {% load form_as_div %} {% block content %} <div class="page-header"> <h1>{% block title %}{% trans 'Registration' %}{% endblock %}</h1> </div> <p class="lead"> {% blocktrans %} Want to register a team for {{ COMPETITION_NAME }}? There you go: {% endblocktrans %} </p> <form action="." method="post"> {% csrf_token %} {{ user_form|as_div }} {{ team_form|as_div }} <button type="submit" class="btn btn-primary">{% trans 'Register' %}</button> </form> {% endblock %}
{% extends 'base.html' %} {% load i18n %} {% load form_as_div %} {% block content %} <div class="page-header"> <h1>{% block title %}{% trans 'Registration' %}{% endblock %}</h1> </div> <p class="lead"> {% blocktrans %} Want to register a team for {{ COMPETITION_NAME }}? There you go: {% endblocktrans %} </p> <form method="post"> {% csrf_token %} {{ user_form|as_div }} {{ team_form|as_div }} <button type="submit" class="btn btn-primary">{% trans 'Register' %}</button> </form> {% endblock %}
Remove 'action' attribute from HTML form element
Remove 'action' attribute from HTML form element Omitting it entirely is the safest option when posting to the current site according to https://stackoverflow.com/a/1132015.
HTML
isc
fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver,fausecteam/ctf-gameserver
html
## Code Before: {% extends 'base.html' %} {% load i18n %} {% load form_as_div %} {% block content %} <div class="page-header"> <h1>{% block title %}{% trans 'Registration' %}{% endblock %}</h1> </div> <p class="lead"> {% blocktrans %} Want to register a team for {{ COMPETITION_NAME }}? There you go: {% endblocktrans %} </p> <form action="." method="post"> {% csrf_token %} {{ user_form|as_div }} {{ team_form|as_div }} <button type="submit" class="btn btn-primary">{% trans 'Register' %}</button> </form> {% endblock %} ## Instruction: Remove 'action' attribute from HTML form element Omitting it entirely is the safest option when posting to the current site according to https://stackoverflow.com/a/1132015. ## Code After: {% extends 'base.html' %} {% load i18n %} {% load form_as_div %} {% block content %} <div class="page-header"> <h1>{% block title %}{% trans 'Registration' %}{% endblock %}</h1> </div> <p class="lead"> {% blocktrans %} Want to register a team for {{ COMPETITION_NAME }}? There you go: {% endblocktrans %} </p> <form method="post"> {% csrf_token %} {{ user_form|as_div }} {{ team_form|as_div }} <button type="submit" class="btn btn-primary">{% trans 'Register' %}</button> </form> {% endblock %}
{% extends 'base.html' %} {% load i18n %} {% load form_as_div %} {% block content %} <div class="page-header"> <h1>{% block title %}{% trans 'Registration' %}{% endblock %}</h1> </div> <p class="lead"> {% blocktrans %} Want to register a team for {{ COMPETITION_NAME }}? There you go: {% endblocktrans %} </p> - <form action="." method="post"> ? ----------- + <form method="post"> {% csrf_token %} {{ user_form|as_div }} {{ team_form|as_div }} <button type="submit" class="btn btn-primary">{% trans 'Register' %}</button> </form> {% endblock %}
2
0.083333
1
1
07d7eb0f3b6b75710cc2d021bd26680b280e199c
src/widgets/SwitchDimmer.css
src/widgets/SwitchDimmer.css
.slider, .bar, .dimmerContainer, .dimmerProgress, .dimmerProgressContent { position: absolute; width: 100%; height: 100%; overflow: hidden; transition: transform .3s ease-out; } .slider { opacity: 0; } .bar, .dimmerProgress { margin-left: -100%; } .bar { box-sizing: border-box; border-right: 5px solid rgba(255, 255, 255, 0.8); transition: transform .3s ease-out; } .dimmerContainer, .dimmerProgressContent { display: flex; justify-content: center; align-items: center; } .dimmerContainer { background: #eee; font-size: 20px; font-weight: lighter; color: #808080; } .dimmerProgressContent { position: relative; background: #ffbc00; color: white; } .dimmerContainer p { font-weight: lighter; }
.slider, .bar, .dimmerContainer, .dimmerProgress, .dimmerProgressContent { position: absolute; top: 0; left: 0; margin: 0; width: 100%; height: 100%; overflow: hidden; transition: transform .3s ease-out; } .slider { opacity: 0; } .bar, .dimmerProgress { margin-left: -100%; } .bar { box-sizing: border-box; border-right: 5px solid rgba(255, 255, 255, 0.8); transition: transform .3s ease-out; } .dimmerContainer, .dimmerProgressContent { display: flex; justify-content: center; align-items: center; } .dimmerContainer { background: #eee; font-size: 20px; font-weight: lighter; color: #808080; } .dimmerProgressContent { position: relative; background: #ffbc00; color: white; } .dimmerContainer p { font-weight: lighter; }
Fix css glitch on dimmers in Safari
Fix css glitch on dimmers in Safari
CSS
apache-2.0
domoticz/Reacticz,domoticz/Reacticz
css
## Code Before: .slider, .bar, .dimmerContainer, .dimmerProgress, .dimmerProgressContent { position: absolute; width: 100%; height: 100%; overflow: hidden; transition: transform .3s ease-out; } .slider { opacity: 0; } .bar, .dimmerProgress { margin-left: -100%; } .bar { box-sizing: border-box; border-right: 5px solid rgba(255, 255, 255, 0.8); transition: transform .3s ease-out; } .dimmerContainer, .dimmerProgressContent { display: flex; justify-content: center; align-items: center; } .dimmerContainer { background: #eee; font-size: 20px; font-weight: lighter; color: #808080; } .dimmerProgressContent { position: relative; background: #ffbc00; color: white; } .dimmerContainer p { font-weight: lighter; } ## Instruction: Fix css glitch on dimmers in Safari ## Code After: .slider, .bar, .dimmerContainer, .dimmerProgress, .dimmerProgressContent { position: absolute; top: 0; left: 0; margin: 0; width: 100%; height: 100%; overflow: hidden; transition: transform .3s ease-out; } .slider { opacity: 0; } .bar, .dimmerProgress { margin-left: -100%; } .bar { box-sizing: border-box; border-right: 5px solid rgba(255, 255, 255, 0.8); transition: transform .3s ease-out; } .dimmerContainer, .dimmerProgressContent { display: flex; justify-content: center; align-items: center; } .dimmerContainer { background: #eee; font-size: 20px; font-weight: lighter; color: #808080; } .dimmerProgressContent { position: relative; background: #ffbc00; color: white; } .dimmerContainer p { font-weight: lighter; }
.slider, .bar, .dimmerContainer, .dimmerProgress, .dimmerProgressContent { position: absolute; + top: 0; + left: 0; + margin: 0; width: 100%; height: 100%; overflow: hidden; transition: transform .3s ease-out; } .slider { opacity: 0; } .bar, .dimmerProgress { margin-left: -100%; } .bar { box-sizing: border-box; border-right: 5px solid rgba(255, 255, 255, 0.8); transition: transform .3s ease-out; } .dimmerContainer, .dimmerProgressContent { display: flex; justify-content: center; align-items: center; } .dimmerContainer { background: #eee; font-size: 20px; font-weight: lighter; color: #808080; } .dimmerProgressContent { position: relative; background: #ffbc00; color: white; } .dimmerContainer p { font-weight: lighter; }
3
0.068182
3
0
0e04fd332fae5cbaae34a91bb1117390016a91ad
lib/tasks/certificate_factory.rake
lib/tasks/certificate_factory.rake
require File.join(Rails.root, 'lib/extra/certificate_factory.rb') ENV['REDIS_URL'] = ENV['ODC_REDIS_SERVER_URL'] task :certificate do ENV['JURISDICTION'] ||= "gb" if ENV['URL'] && ENV['USER_ID'] cert = CertificateFactory::Certificate.new(ENV['URL'], ENV['USER_ID'], jurisdiction: ENV['JURISDICTION']) gen = cert.generate else puts "You must specifiy the Certificate URL and User ID" end end task :certificates do url = ENV['URL'] csv = ENV['CSV'] user = User.find(ENV.fetch('USER_ID')) options = { user_id: user.id, limit: ENV['LIMIT'], jurisdiction: ENV['JURISDICTION'] || 'gb' } if campaign_name = ENV['CAMPAIGN'] campaign = user.certification_campaigns.where(name: campaign_name).first_or_create(url: url) options[:campaign_id] = campaign.id end if url CertificateFactory::FactoryRunner.perform_async(options.merge(feed: url)) else CertificateFactory::CSVFactoryRunner.perform_async(options.merge(file: csv)) end end
require File.join(Rails.root, 'lib/extra/certificate_factory.rb') ENV['REDIS_URL'] = ENV['ODC_REDIS_SERVER_URL'] task :certificate do ENV['JURISDICTION'] ||= "gb" if ENV['URL'] && ENV['USER_ID'] cert = CertificateFactory::Certificate.new(ENV['URL'], ENV['USER_ID'], jurisdiction: ENV['JURISDICTION']) gen = cert.generate else puts "You must specifiy the Certificate URL and User ID" end end task :certificates do url = ENV['URL'] csv = ENV['CSV'] user = User.find(ENV.fetch('USER_ID')) options = { user_id: user.id, limit: ENV['LIMIT'], jurisdiction: ENV.fetch('JURISDICTION'], 'gb') } if campaign_name = ENV['CAMPAIGN'] campaign = user.certification_campaigns.where(name: campaign_name).first_or_create(url: url) options[:campaign_id] = campaign.id end if url CertificateFactory::FactoryRunner.perform_async(options.merge(feed: url)) else CertificateFactory::CSVFactoryRunner.perform_async(options.merge(file: csv)) end end
Use fetch to set default
Use fetch to set default
Ruby
mit
zoul/open-data-certificate,Motejl/open-data-certificate,theodi/open-data-certificate,ahmadassaf/open-data-certificate,Motejl/open-data-certificate,zoul/open-data-certificate,ahmadassaf/open-data-certificate,theodi/open-data-certificate,theodi/open-data-certificate,Motejl/open-data-certificate,ahmadassaf/open-data-certificate,zoul/open-data-certificate,theodi/open-data-certificate,ahmadassaf/open-data-certificate,Motejl/open-data-certificate,zoul/open-data-certificate
ruby
## Code Before: require File.join(Rails.root, 'lib/extra/certificate_factory.rb') ENV['REDIS_URL'] = ENV['ODC_REDIS_SERVER_URL'] task :certificate do ENV['JURISDICTION'] ||= "gb" if ENV['URL'] && ENV['USER_ID'] cert = CertificateFactory::Certificate.new(ENV['URL'], ENV['USER_ID'], jurisdiction: ENV['JURISDICTION']) gen = cert.generate else puts "You must specifiy the Certificate URL and User ID" end end task :certificates do url = ENV['URL'] csv = ENV['CSV'] user = User.find(ENV.fetch('USER_ID')) options = { user_id: user.id, limit: ENV['LIMIT'], jurisdiction: ENV['JURISDICTION'] || 'gb' } if campaign_name = ENV['CAMPAIGN'] campaign = user.certification_campaigns.where(name: campaign_name).first_or_create(url: url) options[:campaign_id] = campaign.id end if url CertificateFactory::FactoryRunner.perform_async(options.merge(feed: url)) else CertificateFactory::CSVFactoryRunner.perform_async(options.merge(file: csv)) end end ## Instruction: Use fetch to set default ## Code After: require File.join(Rails.root, 'lib/extra/certificate_factory.rb') ENV['REDIS_URL'] = ENV['ODC_REDIS_SERVER_URL'] task :certificate do ENV['JURISDICTION'] ||= "gb" if ENV['URL'] && ENV['USER_ID'] cert = CertificateFactory::Certificate.new(ENV['URL'], ENV['USER_ID'], jurisdiction: ENV['JURISDICTION']) gen = cert.generate else puts "You must specifiy the Certificate URL and User ID" end end task :certificates do url = ENV['URL'] csv = ENV['CSV'] user = User.find(ENV.fetch('USER_ID')) options = { user_id: user.id, limit: ENV['LIMIT'], jurisdiction: ENV.fetch('JURISDICTION'], 'gb') } if campaign_name = ENV['CAMPAIGN'] campaign = user.certification_campaigns.where(name: campaign_name).first_or_create(url: url) options[:campaign_id] = campaign.id end if url CertificateFactory::FactoryRunner.perform_async(options.merge(feed: url)) else CertificateFactory::CSVFactoryRunner.perform_async(options.merge(file: csv)) end end
require File.join(Rails.root, 'lib/extra/certificate_factory.rb') ENV['REDIS_URL'] = ENV['ODC_REDIS_SERVER_URL'] task :certificate do ENV['JURISDICTION'] ||= "gb" if ENV['URL'] && ENV['USER_ID'] cert = CertificateFactory::Certificate.new(ENV['URL'], ENV['USER_ID'], jurisdiction: ENV['JURISDICTION']) gen = cert.generate else puts "You must specifiy the Certificate URL and User ID" end end task :certificates do url = ENV['URL'] csv = ENV['CSV'] user = User.find(ENV.fetch('USER_ID')) options = { user_id: user.id, limit: ENV['LIMIT'], - jurisdiction: ENV['JURISDICTION'] || 'gb' ? ^ ^^^ + jurisdiction: ENV.fetch('JURISDICTION'], 'gb') ? ^^^^^^^ ^ + } if campaign_name = ENV['CAMPAIGN'] campaign = user.certification_campaigns.where(name: campaign_name).first_or_create(url: url) options[:campaign_id] = campaign.id end if url CertificateFactory::FactoryRunner.perform_async(options.merge(feed: url)) else CertificateFactory::CSVFactoryRunner.perform_async(options.merge(file: csv)) end end
2
0.0625
1
1
999ab1b620985589cf342972da8ca820da710cce
src/sass/_custom.scss
src/sass/_custom.scss
// Bulma fiddles with a whole lot of styles so reset them to fix it // https://github.com/jgthms/bulma/issues/1708 .content .tag, .content .number { display: inline; padding: inherit; font-size: inherit; line-height: inherit; text-align: inherit; vertical-align: inherit; border-radius: inherit; font-weight: inherit; white-space: inherit; background: inherit; margin: inherit; }
// Bulma fiddles with a whole lot of styles so reset them to fix it // https://github.com/jgthms/bulma/issues/1708 .content .tag, .content .number { display: inline; padding: inherit; font-size: inherit; line-height: inherit; text-align: inherit; vertical-align: inherit; border-radius: inherit; font-weight: inherit; white-space: inherit; background: inherit; margin: inherit; } // Override selection colour ::selection { text-shadow: none; background: #D6EDFF; } ::-moz-selection { text-shadow: none; background: #D6EDFF; }
Add in custom selection colour
Add in custom selection colour
SCSS
mit
jloh/geojs-io,jloh/geojs-io
scss
## Code Before: // Bulma fiddles with a whole lot of styles so reset them to fix it // https://github.com/jgthms/bulma/issues/1708 .content .tag, .content .number { display: inline; padding: inherit; font-size: inherit; line-height: inherit; text-align: inherit; vertical-align: inherit; border-radius: inherit; font-weight: inherit; white-space: inherit; background: inherit; margin: inherit; } ## Instruction: Add in custom selection colour ## Code After: // Bulma fiddles with a whole lot of styles so reset them to fix it // https://github.com/jgthms/bulma/issues/1708 .content .tag, .content .number { display: inline; padding: inherit; font-size: inherit; line-height: inherit; text-align: inherit; vertical-align: inherit; border-radius: inherit; font-weight: inherit; white-space: inherit; background: inherit; margin: inherit; } // Override selection colour ::selection { text-shadow: none; background: #D6EDFF; } ::-moz-selection { text-shadow: none; background: #D6EDFF; }
// Bulma fiddles with a whole lot of styles so reset them to fix it // https://github.com/jgthms/bulma/issues/1708 - .content .tag, .content .number { + .content .tag, + .content .number { display: inline; padding: inherit; font-size: inherit; line-height: inherit; text-align: inherit; vertical-align: inherit; border-radius: inherit; font-weight: inherit; white-space: inherit; background: inherit; margin: inherit; } + + // Override selection colour + ::selection { + text-shadow: none; + background: #D6EDFF; + } + + ::-moz-selection { + text-shadow: none; + background: #D6EDFF; + }
14
0.933333
13
1
e6fa631bdd12a9917187b25122001e40f45117f4
CMakeLists.txt
CMakeLists.txt
project(ITKIOOpenSlide) set(ITKIOOpenSlide_LIBRARIES ITKIOOpenSlide) set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} ) find_package( OpenSlide REQUIRED ) if( NOT OPENSLIDE_FOUND ) message( FATAL_ERROR "Please specify OPENSLIDE_LIBRARY and OPENSLIDE_INCLUDE_DIR.") endif() itk_module_impl()
cmake_minimum_required(VERSION 2.8.9) project(ITKIOOpenSlide) set(ITKIOOpenSlide_LIBRARIES ITKIOOpenSlide) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) find_package( OpenSlide REQUIRED ) if(NOT OPENSLIDE_FOUND) message(FATAL_ERROR "Please specify OPENSLIDE_LIBRARY and OPENSLIDE_INCLUDE_DIR.") endif() if(NOT ITK_SOURCE_DIR) find_package(ITK 4.9 REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) include(ITKModuleExternal) else() itk_module_impl() endif()
Make it possible to build the module externally against ITK.
ENH: Make it possible to build the module externally against ITK. See: https://www.kitware.com/blog/home/post/997
Text
apache-2.0
InsightSoftwareConsortium/ITKIOOpenSlide,InsightSoftwareConsortium/ITKIOOpenSlide,InsightSoftwareConsortium/ITKIOOpenSlide
text
## Code Before: project(ITKIOOpenSlide) set(ITKIOOpenSlide_LIBRARIES ITKIOOpenSlide) set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} ) find_package( OpenSlide REQUIRED ) if( NOT OPENSLIDE_FOUND ) message( FATAL_ERROR "Please specify OPENSLIDE_LIBRARY and OPENSLIDE_INCLUDE_DIR.") endif() itk_module_impl() ## Instruction: ENH: Make it possible to build the module externally against ITK. See: https://www.kitware.com/blog/home/post/997 ## Code After: cmake_minimum_required(VERSION 2.8.9) project(ITKIOOpenSlide) set(ITKIOOpenSlide_LIBRARIES ITKIOOpenSlide) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) find_package( OpenSlide REQUIRED ) if(NOT OPENSLIDE_FOUND) message(FATAL_ERROR "Please specify OPENSLIDE_LIBRARY and OPENSLIDE_INCLUDE_DIR.") endif() if(NOT ITK_SOURCE_DIR) find_package(ITK 4.9 REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) include(ITKModuleExternal) else() itk_module_impl() endif()
+ cmake_minimum_required(VERSION 2.8.9) project(ITKIOOpenSlide) set(ITKIOOpenSlide_LIBRARIES ITKIOOpenSlide) - set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} ) ? - - + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) find_package( OpenSlide REQUIRED ) - if( NOT OPENSLIDE_FOUND ) ? - - + if(NOT OPENSLIDE_FOUND) - message( FATAL_ERROR - "Please specify OPENSLIDE_LIBRARY and OPENSLIDE_INCLUDE_DIR.") ? ^ + message(FATAL_ERROR "Please specify OPENSLIDE_LIBRARY and OPENSLIDE_INCLUDE_DIR.") ? ^^^^^^^^^^^^^^^^^^^ endif() + if(NOT ITK_SOURCE_DIR) + find_package(ITK 4.9 REQUIRED) + list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) + include(ITKModuleExternal) + else() - itk_module_impl() + itk_module_impl() ? ++ + endif()
16
1.454545
11
5
e40205d22da931739a9822f5fa2930c372d2f6fe
src/bootstrap.php
src/bootstrap.php
<?php require_once __DIR__ . '/../vendor/autoload.php'; use Camspiers\StatisticalClassifier\Config\Config; use Camspiers\StatisticalClassifier\Console\Command\GenerateContainerCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; if (!file_exists(Config::getConfigOption('container_dir') . '/StatisticalClassifierServiceContainer.php')) { $command = new GenerateContainerCommand(); $command->run( new ArrayInput(array()), new NullOutput() ); }
<?php $files = array( __DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php' ); $loader = false; foreach ($files as $file) { if (file_exists($file)) { $loader = require_once $file; break; } } if (!$loader instanceof \Composer\Autoload\ClassLoader) { echo 'You must first install the vendors using composer.' . PHP_EOL; exit(1); } use Camspiers\StatisticalClassifier\Config\Config; use Camspiers\StatisticalClassifier\Console\Command\GenerateContainerCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; if (!file_exists(Config::getConfigOption('container_dir') . '/StatisticalClassifierServiceContainer.php')) { $command = new GenerateContainerCommand(); $command->run( new ArrayInput(array()), new NullOutput() ); }
Support installation as a vendor
UPDATE: Support installation as a vendor
PHP
mit
camspiers/statistical-classifier
php
## Code Before: <?php require_once __DIR__ . '/../vendor/autoload.php'; use Camspiers\StatisticalClassifier\Config\Config; use Camspiers\StatisticalClassifier\Console\Command\GenerateContainerCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; if (!file_exists(Config::getConfigOption('container_dir') . '/StatisticalClassifierServiceContainer.php')) { $command = new GenerateContainerCommand(); $command->run( new ArrayInput(array()), new NullOutput() ); } ## Instruction: UPDATE: Support installation as a vendor ## Code After: <?php $files = array( __DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php' ); $loader = false; foreach ($files as $file) { if (file_exists($file)) { $loader = require_once $file; break; } } if (!$loader instanceof \Composer\Autoload\ClassLoader) { echo 'You must first install the vendors using composer.' . PHP_EOL; exit(1); } use Camspiers\StatisticalClassifier\Config\Config; use Camspiers\StatisticalClassifier\Console\Command\GenerateContainerCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; if (!file_exists(Config::getConfigOption('container_dir') . '/StatisticalClassifierServiceContainer.php')) { $command = new GenerateContainerCommand(); $command->run( new ArrayInput(array()), new NullOutput() ); }
<?php + $files = array( - require_once __DIR__ . '/../vendor/autoload.php'; ? ^^^^^^^^^^^^ ^ + __DIR__ . '/../vendor/autoload.php', ? ^^^ ^ + __DIR__ . '/../../../autoload.php' + ); + + $loader = false; + + foreach ($files as $file) { + if (file_exists($file)) { + $loader = require_once $file; + break; + } + } + + if (!$loader instanceof \Composer\Autoload\ClassLoader) { + echo 'You must first install the vendors using composer.' . PHP_EOL; + exit(1); + } use Camspiers\StatisticalClassifier\Config\Config; use Camspiers\StatisticalClassifier\Console\Command\GenerateContainerCommand; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; if (!file_exists(Config::getConfigOption('container_dir') . '/StatisticalClassifierServiceContainer.php')) { $command = new GenerateContainerCommand(); $command->run( new ArrayInput(array()), new NullOutput() ); }
19
1.1875
18
1
83bc0dd92d68660b6f17aecc06d9d7b3f8c4d2a3
examples/js/main.js
examples/js/main.js
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode.classList.add('active'); //Hide all the element //Todo: simplify. Array.prototype.forEach.call(document.querySelectorAll("div[data-ex]"), function(elt) { elt.hidden = true; }); /*Select the active part.*/ var selector = "div[data-ex='" + event.target.getAttribute('data-ex') + "']"; document.querySelector(selector).hidden = false; });
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode.classList.add('active'); //Hide all the element //Todo: simplify. Array.prototype.forEach.call(document.querySelectorAll("div[data-ex]"), function(elt) { elt.hidden = true; }); /*Select the active part.*/ var selector = "div[data-ex='" + event.target.getAttribute('data-ex') + "']"; document.querySelector(selector).hidden = false; }); //Global name space. Demo = {}; (function(NS) { var ajax = function(e) { console.log(e); }; NS.ajax = ajax; return ajax; })(Demo); Demo.ajax('Papa', 'Singe');
Add the module pattern for the code exampl.
Add the module pattern for the code exampl.
JavaScript
mit
pierr/prez-js,pierr/prez-js
javascript
## Code Before: /*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode.classList.add('active'); //Hide all the element //Todo: simplify. Array.prototype.forEach.call(document.querySelectorAll("div[data-ex]"), function(elt) { elt.hidden = true; }); /*Select the active part.*/ var selector = "div[data-ex='" + event.target.getAttribute('data-ex') + "']"; document.querySelector(selector).hidden = false; }); ## Instruction: Add the module pattern for the code exampl. ## Code After: /*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode.classList.add('active'); //Hide all the element //Todo: simplify. Array.prototype.forEach.call(document.querySelectorAll("div[data-ex]"), function(elt) { elt.hidden = true; }); /*Select the active part.*/ var selector = "div[data-ex='" + event.target.getAttribute('data-ex') + "']"; document.querySelector(selector).hidden = false; }); //Global name space. Demo = {}; (function(NS) { var ajax = function(e) { console.log(e); }; NS.ajax = ajax; return ajax; })(Demo); Demo.ajax('Papa', 'Singe');
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode.classList.add('active'); - //Hide all the element //Todo: simplify. ? ^^^ + //Hide all the element //Todo: simplify. ? ^ Array.prototype.forEach.call(document.querySelectorAll("div[data-ex]"), function(elt) { elt.hidden = true; }); /*Select the active part.*/ var selector = "div[data-ex='" + event.target.getAttribute('data-ex') + "']"; document.querySelector(selector).hidden = false; }); + //Global name space. + Demo = {}; + + (function(NS) { + var ajax = function(e) { + console.log(e); + }; + NS.ajax = ajax; + return ajax; + })(Demo); + + Demo.ajax('Papa', 'Singe');
14
0.933333
13
1
4d3dbba644d5ed951e1a81ff23a462f8d4e6c17b
Library/Contributions/cmd/brew-which.rb
Library/Contributions/cmd/brew-which.rb
require 'extend/pathname' module Homebrew extend self def which_versions which_brews=nil brew_links = Array.new version_map = Hash.new real_cellar = HOMEBREW_CELLAR.realpath paths=%w[bin sbin lib].collect {|d| HOMEBREW_PREFIX+d} paths.each do |path| path.find do |path| next unless path.symlink? && path.resolved_path_exists? brew_links << Pathname.new(path.realpath) end end brew_links = brew_links.collect{|p|p.relative_path_from(real_cellar).to_s}.reject{|p|p.start_with?("../")} brew_links.each do |p| parts = p.split("/") next if parts.count < 2 # Shouldn't happen for normally installed brews brew = parts.shift version = parts.shift next unless which_brews.include? brew if which_brews versions = version_map[brew] || [] versions << version unless versions.include? version version_map[brew] = versions end return version_map end def which which_brews = ARGV.named.empty? ? nil : ARGV.named brews = which_versions which_brews brews.keys.sort.each do |b| puts "#{b}: #{brews[b].sort*' '}" end puts end end Homebrew.which
require 'extend/pathname' module Homebrew extend self def which_versions which_brews=nil brew_links = Array.new version_map = Hash.new real_cellar = HOMEBREW_CELLAR.realpath (HOMEBREW_PREFIX/'opt').subdirs.each do |path| next unless path.symlink? && path.resolved_path_exists? brew_links << Pathname.new(path.realpath) end brew_links = brew_links.collect{|p|p.relative_path_from(real_cellar).to_s}.reject{|p|p.start_with?("../")} brew_links.each do |p| parts = p.split("/") next if parts.count < 2 # Shouldn't happen for normally installed brews brew = parts.shift version = parts.shift next unless which_brews.include? brew if which_brews versions = version_map[brew] || [] versions << version unless versions.include? version version_map[brew] = versions end return version_map end def which which_brews = ARGV.named.empty? ? nil : ARGV.named brews = which_versions which_brews brews.keys.sort.each do |b| puts "#{b}: #{brews[b].sort*' '}" end puts end end Homebrew.which
Use HOMEBREW_PREFIX/opt to find installs instead of symlinks in bin, lib, sbin.
Use HOMEBREW_PREFIX/opt to find installs instead of symlinks in bin, lib, sbin. Closes Homebrew/homebrew#25868. Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>
Ruby
bsd-2-clause
mgrimes/brew,gregory-nisbet/brew,gordonmcshane/homebrew,pseudocody/brew,mgrimes/brew,JCount/brew,ilovezfs/brew,mahori/brew,toonetown/homebrew,amar-laksh/brew_sudo,mahori/brew,zmwangx/brew,bfontaine/brew,AnastasiaSulyagina/brew,MikeMcQuaid/brew,amar-laksh/brew_sudo,MikeMcQuaid/brew,pseudocody/brew,staticfloat/brew,sjackman/homebrew,EricFromCanada/brew,AnastasiaSulyagina/brew,JCount/brew,sjackman/homebrew,amar-laksh/brew_sudo,tonyg/homebrew,tonyg/homebrew,claui/brew,JCount/brew,rwhogg/brew,mistydemeo/homebrew,gordonmcshane/homebrew,mistydemeo/homebrew,muellermartin/dist,vitorgalvao/brew,DomT4/brew,alyssais/brew,pseudocody/brew,JCount/brew,reitermarkus/brew,reitermarkus/brew,nandub/brew,mahori/brew,reitermarkus/brew,bfontaine/brew,hanxue/linuxbrew,rwhogg/brew,Homebrew/brew,reelsense/brew,hanxue/linuxbrew,maxim-belkin/brew,alyssais/brew,AnastasiaSulyagina/brew,nandub/brew,sjackman/homebrew,nandub/brew,reelsense/brew,ilovezfs/brew,MikeMcQuaid/brew,ilovezfs/brew,konqui/brew,claui/brew,jmsundar/brew,staticfloat/brew,vitorgalvao/brew,mgrimes/brew,konqui/brew,gregory-nisbet/brew,sjackman/homebrew,jmsundar/brew,gordonmcshane/homebrew,konqui/brew,aw1621107/brew,mistydemeo/homebrew,muellermartin/dist,hanxue/linuxbrew,nandub/brew,staticfloat/brew,Linuxbrew/brew,vitorgalvao/brew,Homebrew/brew,claui/brew,alyssais/brew,jmsundar/brew,palxex/brew,Homebrew/brew,mahori/brew,Linuxbrew/brew,EricFromCanada/brew,tonyg/homebrew,maxim-belkin/brew,palxex/brew,DomT4/brew,rwhogg/brew,toonetown/homebrew,reelsense/brew,EricFromCanada/brew,aw1621107/brew,reitermarkus/brew,vitorgalvao/brew,muellermartin/dist,toonetown/homebrew,Homebrew/brew,claui/brew,zmwangx/brew,gregory-nisbet/brew,DomT4/brew,Linuxbrew/brew,zmwangx/brew,EricFromCanada/brew,palxex/brew,aw1621107/brew,MikeMcQuaid/brew,DomT4/brew,maxim-belkin/brew,Linuxbrew/brew,bfontaine/brew,konqui/brew
ruby
## Code Before: require 'extend/pathname' module Homebrew extend self def which_versions which_brews=nil brew_links = Array.new version_map = Hash.new real_cellar = HOMEBREW_CELLAR.realpath paths=%w[bin sbin lib].collect {|d| HOMEBREW_PREFIX+d} paths.each do |path| path.find do |path| next unless path.symlink? && path.resolved_path_exists? brew_links << Pathname.new(path.realpath) end end brew_links = brew_links.collect{|p|p.relative_path_from(real_cellar).to_s}.reject{|p|p.start_with?("../")} brew_links.each do |p| parts = p.split("/") next if parts.count < 2 # Shouldn't happen for normally installed brews brew = parts.shift version = parts.shift next unless which_brews.include? brew if which_brews versions = version_map[brew] || [] versions << version unless versions.include? version version_map[brew] = versions end return version_map end def which which_brews = ARGV.named.empty? ? nil : ARGV.named brews = which_versions which_brews brews.keys.sort.each do |b| puts "#{b}: #{brews[b].sort*' '}" end puts end end Homebrew.which ## Instruction: Use HOMEBREW_PREFIX/opt to find installs instead of symlinks in bin, lib, sbin. Closes Homebrew/homebrew#25868. Signed-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com> ## Code After: require 'extend/pathname' module Homebrew extend self def which_versions which_brews=nil brew_links = Array.new version_map = Hash.new real_cellar = HOMEBREW_CELLAR.realpath (HOMEBREW_PREFIX/'opt').subdirs.each do |path| next unless path.symlink? && path.resolved_path_exists? brew_links << Pathname.new(path.realpath) end brew_links = brew_links.collect{|p|p.relative_path_from(real_cellar).to_s}.reject{|p|p.start_with?("../")} brew_links.each do |p| parts = p.split("/") next if parts.count < 2 # Shouldn't happen for normally installed brews brew = parts.shift version = parts.shift next unless which_brews.include? brew if which_brews versions = version_map[brew] || [] versions << version unless versions.include? version version_map[brew] = versions end return version_map end def which which_brews = ARGV.named.empty? ? nil : ARGV.named brews = which_versions which_brews brews.keys.sort.each do |b| puts "#{b}: #{brews[b].sort*' '}" end puts end end Homebrew.which
require 'extend/pathname' module Homebrew extend self def which_versions which_brews=nil brew_links = Array.new version_map = Hash.new real_cellar = HOMEBREW_CELLAR.realpath + (HOMEBREW_PREFIX/'opt').subdirs.each do |path| - paths=%w[bin sbin lib].collect {|d| HOMEBREW_PREFIX+d} - - paths.each do |path| - path.find do |path| - next unless path.symlink? && path.resolved_path_exists? ? -- + next unless path.symlink? && path.resolved_path_exists? - brew_links << Pathname.new(path.realpath) ? -- + brew_links << Pathname.new(path.realpath) - end end brew_links = brew_links.collect{|p|p.relative_path_from(real_cellar).to_s}.reject{|p|p.start_with?("../")} brew_links.each do |p| parts = p.split("/") next if parts.count < 2 # Shouldn't happen for normally installed brews brew = parts.shift version = parts.shift next unless which_brews.include? brew if which_brews versions = version_map[brew] || [] versions << version unless versions.include? version version_map[brew] = versions end return version_map end def which which_brews = ARGV.named.empty? ? nil : ARGV.named brews = which_versions which_brews brews.keys.sort.each do |b| puts "#{b}: #{brews[b].sort*' '}" end puts end end Homebrew.which
10
0.204082
3
7
03573faf19da56206f57ef91fd8a1dd95e8f8d17
examples/pion-to-pion/README.md
examples/pion-to-pion/README.md
pion-to-pion is an example of two pion instances communicating directly! To see an example of `pion-to-pion` that uses Trickle ICE see `pion-to-pion-trickle`. This may connect faster (and will eventually become the default API) but requires more code. The SDP offer and answer are exchanged automatically over HTTP. The `answer` side acts like a HTTP server and should therefore be ran first. ## Instructions First run `answer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/answer answer ``` Next, run `offer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/offer offer ``` You should see them connect and start to exchange messages. ## You can use Docker-compose to start this example: ```sh docker-compose up -d ``` Now, you can see message exchanging, using `docker logs`.
pion-to-pion is an example of two pion instances communicating directly! The SDP offer and answer are exchanged automatically over HTTP. The `answer` side acts like a HTTP server and should therefore be ran first. ## Instructions First run `answer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/answer answer ``` Next, run `offer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/offer offer ``` You should see them connect and start to exchange messages. ## You can use Docker-compose to start this example: ```sh docker-compose up -d ``` Now, you can see message exchanging, using `docker logs`.
Remove note about trickle ICE
Remove note about trickle ICE On by default in /v3
Markdown
mit
pion/webrtc,pion/webrtc,pion/webrtc,pion/webrtc
markdown
## Code Before: pion-to-pion is an example of two pion instances communicating directly! To see an example of `pion-to-pion` that uses Trickle ICE see `pion-to-pion-trickle`. This may connect faster (and will eventually become the default API) but requires more code. The SDP offer and answer are exchanged automatically over HTTP. The `answer` side acts like a HTTP server and should therefore be ran first. ## Instructions First run `answer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/answer answer ``` Next, run `offer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/offer offer ``` You should see them connect and start to exchange messages. ## You can use Docker-compose to start this example: ```sh docker-compose up -d ``` Now, you can see message exchanging, using `docker logs`. ## Instruction: Remove note about trickle ICE On by default in /v3 ## Code After: pion-to-pion is an example of two pion instances communicating directly! The SDP offer and answer are exchanged automatically over HTTP. The `answer` side acts like a HTTP server and should therefore be ran first. ## Instructions First run `answer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/answer answer ``` Next, run `offer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/offer offer ``` You should see them connect and start to exchange messages. ## You can use Docker-compose to start this example: ```sh docker-compose up -d ``` Now, you can see message exchanging, using `docker logs`.
pion-to-pion is an example of two pion instances communicating directly! - - To see an example of `pion-to-pion` that uses Trickle ICE see `pion-to-pion-trickle`. - This may connect faster (and will eventually become the default API) but requires - more code. The SDP offer and answer are exchanged automatically over HTTP. The `answer` side acts like a HTTP server and should therefore be ran first. ## Instructions First run `answer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/answer answer ``` Next, run `offer`: ```sh go install github.com/pion/webrtc/v3/examples/pion-to-pion/offer offer ``` You should see them connect and start to exchange messages. ## You can use Docker-compose to start this example: ```sh docker-compose up -d ``` Now, you can see message exchanging, using `docker logs`.
4
0.137931
0
4
1a37734ceaecd0ab43f93b4f4383a9e7504889f3
docker-compose.yml
docker-compose.yml
version: "3.6" services: cpputest: build: . volumes: - ./:/home/src
version: "3.6" services: cpputest: build: . image: cpputest_test_runner volumes: - ./:/home/src
Add image name cpputest_test_runner in yml file
Add image name cpputest_test_runner in yml file
YAML
mit
jwgrenning/cpputest-starter-project,jwgrenning/cpputest-starter-project,jwgrenning/cpputest-starter-project
yaml
## Code Before: version: "3.6" services: cpputest: build: . volumes: - ./:/home/src ## Instruction: Add image name cpputest_test_runner in yml file ## Code After: version: "3.6" services: cpputest: build: . image: cpputest_test_runner volumes: - ./:/home/src
version: "3.6" services: cpputest: build: . + image: cpputest_test_runner volumes: - ./:/home/src
1
0.166667
1
0
cbc04f09b1de988942f644514abd0cbd0c6c7f5f
_data/events.yml
_data/events.yml
churchwide: - date: 2015-10-23 name: Ladies' Pumpkin Decorating and Chili Supper grades-6-12:
churchwide: - date: 2015-11-08 name: Baptism grades-6-12:
Remove ladies event and add baptism
Remove ladies event and add baptism
YAML
mit
Mountainview-WebDesign/lifestonechurch,Mountainview-WebDesign/lifestonechurch,Mountainview-WebDesign/lifestonechurch
yaml
## Code Before: churchwide: - date: 2015-10-23 name: Ladies' Pumpkin Decorating and Chili Supper grades-6-12: ## Instruction: Remove ladies event and add baptism ## Code After: churchwide: - date: 2015-11-08 name: Baptism grades-6-12:
churchwide: - - date: 2015-10-23 ? ^^^ + date: 2015-11-08 ? ++ ^ - name: Ladies' Pumpkin Decorating and Chili Supper + name: Baptism grades-6-12:
4
0.8
2
2
c9d8833d59ae4858cfba69e44c1e8aaa5dd07df9
tests/test_create_template.py
tests/test_create_template.py
import os import pip import pytest import shutil import subprocess TEMPLATE = os.path.realpath('.') @pytest.fixture(autouse=True) def clean_tmp_dir(tmpdir, request): """ Remove the project directory that is created by cookiecutter during the tests. """ tmp_cwd = tmpdir.mkdir('cookiecutter_out') os.chdir(str(tmp_cwd)) def remove_project_dir(): if os.path.isdir('pytest-foobar'): shutil.rmtree('pytest-foobar') request.addfinalizer(remove_project_dir) def test_run_cookiecutter_and_plugin_tests(testdir): try: subprocess.check_call(['cookiecutter', '--no-input', TEMPLATE]) except subprocess.CalledProcessError as e: pytest.fail(e) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin')
import os import pip import pytest import shutil import subprocess from cookiecutter.main import cookiecutter TEMPLATE = os.path.realpath('.') @pytest.fixture(autouse=True) def clean_tmp_dir(tmpdir, request): """ Remove the project directory that is created by cookiecutter during the tests. """ tmp_cwd = tmpdir.mkdir('cookiecutter_out') os.chdir(str(tmp_cwd)) def remove_project_dir(): if os.path.isdir('pytest-foobar'): shutil.rmtree('pytest-foobar') request.addfinalizer(remove_project_dir) def test_run_cookiecutter_cli_and_plugin_tests(testdir): try: subprocess.check_call(['cookiecutter', '--no-input', TEMPLATE]) except subprocess.CalledProcessError as e: pytest.fail(e) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin') def test_run_cookiecutter_and_plugin_tests(testdir): cookiecutter(TEMPLATE, no_input=True) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin')
Add a test that uses the cookiecutter python API
Add a test that uses the cookiecutter python API
Python
mit
luzfcb/cookiecutter-pytest-plugin,pytest-dev/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin
python
## Code Before: import os import pip import pytest import shutil import subprocess TEMPLATE = os.path.realpath('.') @pytest.fixture(autouse=True) def clean_tmp_dir(tmpdir, request): """ Remove the project directory that is created by cookiecutter during the tests. """ tmp_cwd = tmpdir.mkdir('cookiecutter_out') os.chdir(str(tmp_cwd)) def remove_project_dir(): if os.path.isdir('pytest-foobar'): shutil.rmtree('pytest-foobar') request.addfinalizer(remove_project_dir) def test_run_cookiecutter_and_plugin_tests(testdir): try: subprocess.check_call(['cookiecutter', '--no-input', TEMPLATE]) except subprocess.CalledProcessError as e: pytest.fail(e) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin') ## Instruction: Add a test that uses the cookiecutter python API ## Code After: import os import pip import pytest import shutil import subprocess from cookiecutter.main import cookiecutter TEMPLATE = os.path.realpath('.') @pytest.fixture(autouse=True) def clean_tmp_dir(tmpdir, request): """ Remove the project directory that is created by cookiecutter during the tests. """ tmp_cwd = tmpdir.mkdir('cookiecutter_out') os.chdir(str(tmp_cwd)) def remove_project_dir(): if os.path.isdir('pytest-foobar'): shutil.rmtree('pytest-foobar') request.addfinalizer(remove_project_dir) def test_run_cookiecutter_cli_and_plugin_tests(testdir): try: subprocess.check_call(['cookiecutter', '--no-input', TEMPLATE]) except subprocess.CalledProcessError as e: pytest.fail(e) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin') def test_run_cookiecutter_and_plugin_tests(testdir): cookiecutter(TEMPLATE, no_input=True) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin')
import os import pip import pytest import shutil import subprocess + + from cookiecutter.main import cookiecutter + TEMPLATE = os.path.realpath('.') @pytest.fixture(autouse=True) def clean_tmp_dir(tmpdir, request): """ Remove the project directory that is created by cookiecutter during the tests. """ tmp_cwd = tmpdir.mkdir('cookiecutter_out') os.chdir(str(tmp_cwd)) def remove_project_dir(): if os.path.isdir('pytest-foobar'): shutil.rmtree('pytest-foobar') request.addfinalizer(remove_project_dir) - def test_run_cookiecutter_and_plugin_tests(testdir): + def test_run_cookiecutter_cli_and_plugin_tests(testdir): ? ++++ try: subprocess.check_call(['cookiecutter', '--no-input', TEMPLATE]) except subprocess.CalledProcessError as e: pytest.fail(e) project_root = 'pytest-foobar' assert os.path.isdir(project_root) os.chdir(str(project_root)) pip.main(['install', '.']) if testdir.runpytest().ret != 0: pytest.fail('Error running the tests of the newly generated plugin') + + + def test_run_cookiecutter_and_plugin_tests(testdir): + cookiecutter(TEMPLATE, no_input=True) + + project_root = 'pytest-foobar' + assert os.path.isdir(project_root) + + os.chdir(str(project_root)) + pip.main(['install', '.']) + + if testdir.runpytest().ret != 0: + pytest.fail('Error running the tests of the newly generated plugin')
18
0.45
17
1
903ac300e34e9de03eec4aafb6c44bd556ca9f68
.travis.yml
.travis.yml
notifications: email: on_success: never on_failure: never language: php php: - 7.2 - 7.1 before_script: - echo Start travis - echo Current dir is `pwd` - echo Home dir is `echo ~` - wget https://scrutinizer-ci.com/ocular.phar - cd .. - git clone git://github.com/squizlabs/PHP_CodeSniffer.git - php PHP_CodeSniffer/bin/phpcs -h - php PHP_CodeSniffer/bin/phpcbf -h - phpenv rehash script: - php PHP_CodeSniffer/bin/phpcs -i - php PHP_CodeSniffer/bin/phpcs --standard=/home/travis/build/thulin82/innebandybokning/.phpcs.xml - cd innebandybokning - phpunit after_script: - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
notifications: email: on_success: never on_failure: never language: php php: - 7.2 - 7.1 before_script: - echo Start travis - wget https://scrutinizer-ci.com/ocular.phar - make composer-install - phpenv rehash script: - make test after_script: - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Use Makefile when building/testing on Travis
Use Makefile when building/testing on Travis
YAML
mit
thulin82/innebandybokning,thulin82/innebandybokning
yaml
## Code Before: notifications: email: on_success: never on_failure: never language: php php: - 7.2 - 7.1 before_script: - echo Start travis - echo Current dir is `pwd` - echo Home dir is `echo ~` - wget https://scrutinizer-ci.com/ocular.phar - cd .. - git clone git://github.com/squizlabs/PHP_CodeSniffer.git - php PHP_CodeSniffer/bin/phpcs -h - php PHP_CodeSniffer/bin/phpcbf -h - phpenv rehash script: - php PHP_CodeSniffer/bin/phpcs -i - php PHP_CodeSniffer/bin/phpcs --standard=/home/travis/build/thulin82/innebandybokning/.phpcs.xml - cd innebandybokning - phpunit after_script: - php ocular.phar code-coverage:upload --format=php-clover coverage.clover ## Instruction: Use Makefile when building/testing on Travis ## Code After: notifications: email: on_success: never on_failure: never language: php php: - 7.2 - 7.1 before_script: - echo Start travis - wget https://scrutinizer-ci.com/ocular.phar - make composer-install - phpenv rehash script: - make test after_script: - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
notifications: email: on_success: never on_failure: never language: php php: - 7.2 - 7.1 before_script: - echo Start travis - - echo Current dir is `pwd` - - echo Home dir is `echo ~` - wget https://scrutinizer-ci.com/ocular.phar + - make composer-install - - cd .. - - git clone git://github.com/squizlabs/PHP_CodeSniffer.git - - php PHP_CodeSniffer/bin/phpcs -h - - php PHP_CodeSniffer/bin/phpcbf -h - phpenv rehash script: + - make test - - php PHP_CodeSniffer/bin/phpcs -i - - php PHP_CodeSniffer/bin/phpcs --standard=/home/travis/build/thulin82/innebandybokning/.phpcs.xml - - cd innebandybokning - - phpunit after_script: - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
12
0.413793
2
10
ebf2f58306a8662dc1c081e8bdfe135b9d4a6bf8
packages/truffle/test/scenarios/typescript_testing/typescriptTests.js
packages/truffle/test/scenarios/typescript_testing/typescriptTests.js
const Box = require("@truffle/box"); const MemoryLogger = require("../memorylogger"); const CommandRunner = require("../commandrunner"); const assert = require("assert"); const Reporter = require("../reporter"); const Server = require("../server"); describe("Typescript Tests", () => { const logger = new MemoryLogger(); let config; let options; before(done => Server.start(done)); after(done => Server.stop(done)); before("set up sandbox", async function() { options = { name: "default#typescript", force: true }; config = await Box.sandbox(options); config.logger = logger; config.network = "development"; config.mocha = { reporter: new Reporter(logger) }; }); describe("testing contract behavior", () => { it("will run .ts tests and have the correct behavior", async () => { await CommandRunner.run("test test/metacoin.ts", config); const output = logger.contents(); assert(output.includes("3 passing")); }).timeout(70000); it("will detect and run .sol, .ts, & .js test files", async () => { await CommandRunner.run("test", config); const output = logger.contents(); assert(output.includes("8 passing")); }).timeout(70000); }); }).timeout(10000);
const Box = require("@truffle/box"); const MemoryLogger = require("../memorylogger"); const CommandRunner = require("../commandrunner"); const assert = require("assert"); const Reporter = require("../reporter"); const Server = require("../server"); describe("Typescript Tests", () => { const logger = new MemoryLogger(); let config; let options; before(done => Server.start(done)); after(done => Server.stop(done)); before("set up sandbox", async function () { options = { name: "default#typescript", force: true }; config = await Box.sandbox(options); config.logger = logger; config.network = "development"; config.mocha = { reporter: new Reporter(logger) }; }); describe("testing contract behavior", () => { it("will run .ts tests and have the correct behavior", async () => { try { await CommandRunner.run("test test/metacoin.ts", config); const output = logger.contents(); assert(output.includes("3 passing")); } catch (error) { assert.fail(`there was an error -- ${error}`); } }).timeout(70000); it("will detect and run .sol, .ts, & .js test files", async () => { try { await CommandRunner.run("test", config); const output = logger.contents(); assert(output.includes("8 passing")); } catch (error) { assert.fail(`there was an error -- ${error}`); } }).timeout(70000); }); }).timeout(10000);
Update tests to log the error when it fails
Update tests to log the error when it fails
JavaScript
mit
ConsenSys/truffle
javascript
## Code Before: const Box = require("@truffle/box"); const MemoryLogger = require("../memorylogger"); const CommandRunner = require("../commandrunner"); const assert = require("assert"); const Reporter = require("../reporter"); const Server = require("../server"); describe("Typescript Tests", () => { const logger = new MemoryLogger(); let config; let options; before(done => Server.start(done)); after(done => Server.stop(done)); before("set up sandbox", async function() { options = { name: "default#typescript", force: true }; config = await Box.sandbox(options); config.logger = logger; config.network = "development"; config.mocha = { reporter: new Reporter(logger) }; }); describe("testing contract behavior", () => { it("will run .ts tests and have the correct behavior", async () => { await CommandRunner.run("test test/metacoin.ts", config); const output = logger.contents(); assert(output.includes("3 passing")); }).timeout(70000); it("will detect and run .sol, .ts, & .js test files", async () => { await CommandRunner.run("test", config); const output = logger.contents(); assert(output.includes("8 passing")); }).timeout(70000); }); }).timeout(10000); ## Instruction: Update tests to log the error when it fails ## Code After: const Box = require("@truffle/box"); const MemoryLogger = require("../memorylogger"); const CommandRunner = require("../commandrunner"); const assert = require("assert"); const Reporter = require("../reporter"); const Server = require("../server"); describe("Typescript Tests", () => { const logger = new MemoryLogger(); let config; let options; before(done => Server.start(done)); after(done => Server.stop(done)); before("set up sandbox", async function () { options = { name: "default#typescript", force: true }; config = await Box.sandbox(options); config.logger = logger; config.network = "development"; config.mocha = { reporter: new Reporter(logger) }; }); describe("testing contract behavior", () => { it("will run .ts tests and have the correct behavior", async () => { try { await CommandRunner.run("test test/metacoin.ts", config); const output = logger.contents(); assert(output.includes("3 passing")); } catch (error) { assert.fail(`there was an error -- ${error}`); } }).timeout(70000); it("will detect and run .sol, .ts, & .js test files", async () => { try { await CommandRunner.run("test", config); const output = logger.contents(); assert(output.includes("8 passing")); } catch (error) { assert.fail(`there was an error -- ${error}`); } }).timeout(70000); }); }).timeout(10000);
const Box = require("@truffle/box"); const MemoryLogger = require("../memorylogger"); const CommandRunner = require("../commandrunner"); const assert = require("assert"); const Reporter = require("../reporter"); const Server = require("../server"); describe("Typescript Tests", () => { const logger = new MemoryLogger(); let config; let options; before(done => Server.start(done)); after(done => Server.stop(done)); - before("set up sandbox", async function() { + before("set up sandbox", async function () { ? + options = { name: "default#typescript", force: true }; config = await Box.sandbox(options); config.logger = logger; config.network = "development"; config.mocha = { reporter: new Reporter(logger) }; }); describe("testing contract behavior", () => { it("will run .ts tests and have the correct behavior", async () => { + try { - await CommandRunner.run("test test/metacoin.ts", config); + await CommandRunner.run("test test/metacoin.ts", config); ? ++ - const output = logger.contents(); + const output = logger.contents(); ? ++ - assert(output.includes("3 passing")); + assert(output.includes("3 passing")); ? ++ + } catch (error) { + assert.fail(`there was an error -- ${error}`); + } }).timeout(70000); it("will detect and run .sol, .ts, & .js test files", async () => { + try { - await CommandRunner.run("test", config); + await CommandRunner.run("test", config); ? ++ - const output = logger.contents(); + const output = logger.contents(); ? ++ - assert(output.includes("8 passing")); + assert(output.includes("8 passing")); ? ++ + } catch (error) { + assert.fail(`there was an error -- ${error}`); + } }).timeout(70000); }); }).timeout(10000);
22
0.564103
15
7
121b9d0490bae264805f60a3eb98ccd641125b8c
.travis.yml
.travis.yml
language: perl perl: - "5.20" - "5.18" - "5.16" - "5.14" - "5.12" - "5.10" install: - "cpanm -n Test::Fatal Test::Pod" - "cpanm -n --installdeps ." sudo: false
language: perl perl: - "5.20-thr" - "5.18-thr" - "5.16-thr" - "5.14-thr" - "5.12-thr" - "5.10-thr" install: - "cpanm -n Test::Fatal Test::Pod" - "cpanm -n --installdeps ." sudo: false
Enable threading in Travis-CI Perls
Enable threading in Travis-CI Perls t/packet_sending.t requires threads.
YAML
artistic-2.0
Robertof/perl-net-telnet-netgear
yaml
## Code Before: language: perl perl: - "5.20" - "5.18" - "5.16" - "5.14" - "5.12" - "5.10" install: - "cpanm -n Test::Fatal Test::Pod" - "cpanm -n --installdeps ." sudo: false ## Instruction: Enable threading in Travis-CI Perls t/packet_sending.t requires threads. ## Code After: language: perl perl: - "5.20-thr" - "5.18-thr" - "5.16-thr" - "5.14-thr" - "5.12-thr" - "5.10-thr" install: - "cpanm -n Test::Fatal Test::Pod" - "cpanm -n --installdeps ." sudo: false
language: perl perl: - - "5.20" + - "5.20-thr" ? ++++ - - "5.18" + - "5.18-thr" ? ++++ - - "5.16" + - "5.16-thr" ? ++++ - - "5.14" + - "5.14-thr" ? ++++ - - "5.12" + - "5.12-thr" ? ++++ - - "5.10" + - "5.10-thr" ? ++++ install: - "cpanm -n Test::Fatal Test::Pod" - "cpanm -n --installdeps ." sudo: false
12
1
6
6
f0c9841d97c893731ecac31ee7f64a76121317e8
javascripts/plus_extension.js
javascripts/plus_extension.js
(function($) { var params = (function() { var url_tokens = document.URL.replace(document.baseURI.concat('?'), '').split(/&/g), params = {}; for(piece in url_tokens) { var slice = url_tokens[piece].split(/=/); params[slice[0]] = decodeURIComponent(slice[1]); } return params; })(); $(function() { $(".n-Nd").trigger('click'); var reloader = function() { var div = $("div.n-Ob div[contenteditable]"); if ( !div.length ) { setTimeout(reloader, 200); } else { var text = params['title'].replace(/\+/g, ' ') + ': ' + params['href']; div.text(text); } }; setTimeout(reloader, 200); }); })(jQuery);
(function($) { var params = (function() { var url_tokens = ('' + document.location.search).replace(/\?/, '').split(/&/g), params = {}; for(piece in url_tokens) { var slice = url_tokens[piece].split(/=/); params[slice[0]] = decodeURIComponent(slice[1]); } return params; })(); $(function() { $("#contentPane div:first div:eq(1)").trigger('click'); var reloader = function() { var div = $("#contentPane div[contenteditable]"); if ( !div.length ) { setTimeout(reloader, 200); } else { var text = params['title'].replace(/\+/g, ' ') + ': ' + params['href']; div.text(text); } }; setTimeout(reloader, 200); }); })(jQuery);
Fix problems with element identification
Fix problems with element identification
JavaScript
mit
felipeelias/reader_to_plus
javascript
## Code Before: (function($) { var params = (function() { var url_tokens = document.URL.replace(document.baseURI.concat('?'), '').split(/&/g), params = {}; for(piece in url_tokens) { var slice = url_tokens[piece].split(/=/); params[slice[0]] = decodeURIComponent(slice[1]); } return params; })(); $(function() { $(".n-Nd").trigger('click'); var reloader = function() { var div = $("div.n-Ob div[contenteditable]"); if ( !div.length ) { setTimeout(reloader, 200); } else { var text = params['title'].replace(/\+/g, ' ') + ': ' + params['href']; div.text(text); } }; setTimeout(reloader, 200); }); })(jQuery); ## Instruction: Fix problems with element identification ## Code After: (function($) { var params = (function() { var url_tokens = ('' + document.location.search).replace(/\?/, '').split(/&/g), params = {}; for(piece in url_tokens) { var slice = url_tokens[piece].split(/=/); params[slice[0]] = decodeURIComponent(slice[1]); } return params; })(); $(function() { $("#contentPane div:first div:eq(1)").trigger('click'); var reloader = function() { var div = $("#contentPane div[contenteditable]"); if ( !div.length ) { setTimeout(reloader, 200); } else { var text = params['title'].replace(/\+/g, ' ') + ': ' + params['href']; div.text(text); } }; setTimeout(reloader, 200); }); })(jQuery);
(function($) { var params = (function() { - var url_tokens = document.URL.replace(document.baseURI.concat('?'), '').split(/&/g), + var url_tokens = ('' + document.location.search).replace(/\?/, '').split(/&/g), params = {}; for(piece in url_tokens) { var slice = url_tokens[piece].split(/=/); params[slice[0]] = decodeURIComponent(slice[1]); } return params; })(); $(function() { - $(".n-Nd").trigger('click'); + $("#contentPane div:first div:eq(1)").trigger('click'); var reloader = function() { - var div = $("div.n-Ob div[contenteditable]"); ? ^^^^ ^^^ + var div = $("#contentPane div[contenteditable]"); ? ^^^ ^^^^^^^^ if ( !div.length ) { setTimeout(reloader, 200); } else { var text = params['title'].replace(/\+/g, ' ') + ': ' + params['href']; div.text(text); } }; setTimeout(reloader, 200); }); })(jQuery);
6
0.2
3
3
dc85188ca2137d6e330f0e44b0335ce90a9ebaac
upload/library/SV/NoticeTime/Listener.php
upload/library/SV/NoticeTime/Listener.php
<?php class SV_NoticeTime_Listener { public static function notices_prepare(array &$noticeList, array &$noticeTokens, XenForo_Template_Abstract $template, array $containerData) { } }
<?php class SV_NoticeTime_Listener { public static function getRelativeDate(DateTime $now, DateTime $other) { $interval = $other->diff($now); $format = array(); if ($interval->y) { $format[] = '%y years'; } if ($interval->m) { $format[] = '%m months'; } if ($interval->d) { $format[] = '%d days'; } if ($interval->h) { $format[] = '%h hours'; } if ($interval->i) { $format[] = '%i minutes'; } $format[] = '%s seconds'; return $interval->format(join(', ', $format)); } public static function notices_prepare(array &$noticeList, array &$noticeTokens, XenForo_Template_Abstract $template, array $containerData) { $now = new DateTime(); $user = XenForo_Visitor::getInstance()->toArray(); foreach ($noticeList AS $noticeId => &$notice) { $tokens = array(); foreach ($notice['user_criteria'] AS &$criteria) { switch($criteria['rule']) { case 'before': $data = $criteria['data']; $datetime = new DateTime("$data[ymd] $data[hh]:$data[mm]",new DateTimeZone(($data['user_tz'] ? $user['timezone'] : $data['timezone']))); $time = XenForo_Locale::dateTime($datetime->getTimestamp(), 'separate'); $tokens['{time_end:absolute}'] = $time['date'] . ' ' . $time['time']; $tokens['{time_end:relative}'] = self::getRelativeDate($now, $datetime); $tokens['{time_end}'] = $tokens['{time_end:relative}']; break; case 'after': $data = $criteria['data']; $datetime = new DateTime("$data[ymd] $data[hh]:$data[mm]",new DateTimeZone(($data['user_tz'] ? $user['timezone'] : $data['timezone']))); $time = XenForo_Locale::dateTime($datetime->getTimestamp(), 'separate'); $tokens['{time_start:absolute}'] = $time['date'] . ' ' . $time['time']; $tokens['{time_start:relative}'] = self::getRelativeDate($now, $datetime); $tokens['{time_start}'] = $tokens['{time_start:relative}']; break; } } if ($tokens) { $notice['message'] = str_replace(array_keys($tokens), $tokens, $notice['message']); } } } }
Implement replacables: {time_end:absolute}, {time_end:relative}, {time_start:absolute} and {time_start:relative}.
Implement replacables: {time_end:absolute}, {time_end:relative}, {time_start:absolute} and {time_start:relative}.
PHP
mit
Xon/XenForo-NoticeTimeReplacable
php
## Code Before: <?php class SV_NoticeTime_Listener { public static function notices_prepare(array &$noticeList, array &$noticeTokens, XenForo_Template_Abstract $template, array $containerData) { } } ## Instruction: Implement replacables: {time_end:absolute}, {time_end:relative}, {time_start:absolute} and {time_start:relative}. ## Code After: <?php class SV_NoticeTime_Listener { public static function getRelativeDate(DateTime $now, DateTime $other) { $interval = $other->diff($now); $format = array(); if ($interval->y) { $format[] = '%y years'; } if ($interval->m) { $format[] = '%m months'; } if ($interval->d) { $format[] = '%d days'; } if ($interval->h) { $format[] = '%h hours'; } if ($interval->i) { $format[] = '%i minutes'; } $format[] = '%s seconds'; return $interval->format(join(', ', $format)); } public static function notices_prepare(array &$noticeList, array &$noticeTokens, XenForo_Template_Abstract $template, array $containerData) { $now = new DateTime(); $user = XenForo_Visitor::getInstance()->toArray(); foreach ($noticeList AS $noticeId => &$notice) { $tokens = array(); foreach ($notice['user_criteria'] AS &$criteria) { switch($criteria['rule']) { case 'before': $data = $criteria['data']; $datetime = new DateTime("$data[ymd] $data[hh]:$data[mm]",new DateTimeZone(($data['user_tz'] ? $user['timezone'] : $data['timezone']))); $time = XenForo_Locale::dateTime($datetime->getTimestamp(), 'separate'); $tokens['{time_end:absolute}'] = $time['date'] . ' ' . $time['time']; $tokens['{time_end:relative}'] = self::getRelativeDate($now, $datetime); $tokens['{time_end}'] = $tokens['{time_end:relative}']; break; case 'after': $data = $criteria['data']; $datetime = new DateTime("$data[ymd] $data[hh]:$data[mm]",new DateTimeZone(($data['user_tz'] ? $user['timezone'] : $data['timezone']))); $time = XenForo_Locale::dateTime($datetime->getTimestamp(), 'separate'); $tokens['{time_start:absolute}'] = $time['date'] . ' ' . $time['time']; $tokens['{time_start:relative}'] = self::getRelativeDate($now, $datetime); $tokens['{time_start}'] = $tokens['{time_start:relative}']; break; } } if ($tokens) { $notice['message'] = str_replace(array_keys($tokens), $tokens, $notice['message']); } } } }
<?php class SV_NoticeTime_Listener { + public static function getRelativeDate(DateTime $now, DateTime $other) + { + $interval = $other->diff($now); + $format = array(); + if ($interval->y) + { + $format[] = '%y years'; + } + if ($interval->m) + { + $format[] = '%m months'; + } + if ($interval->d) + { + $format[] = '%d days'; + } + if ($interval->h) + { + $format[] = '%h hours'; + } + if ($interval->i) + { + $format[] = '%i minutes'; + } + $format[] = '%s seconds'; + return $interval->format(join(', ', $format)); + } + public static function notices_prepare(array &$noticeList, array &$noticeTokens, XenForo_Template_Abstract $template, array $containerData) { + $now = new DateTime(); + $user = XenForo_Visitor::getInstance()->toArray(); + foreach ($noticeList AS $noticeId => &$notice) + { + $tokens = array(); + foreach ($notice['user_criteria'] AS &$criteria) + { + switch($criteria['rule']) + { + case 'before': + $data = $criteria['data']; + $datetime = new DateTime("$data[ymd] $data[hh]:$data[mm]",new DateTimeZone(($data['user_tz'] ? $user['timezone'] : $data['timezone']))); + $time = XenForo_Locale::dateTime($datetime->getTimestamp(), 'separate'); + $tokens['{time_end:absolute}'] = $time['date'] . ' ' . $time['time']; + $tokens['{time_end:relative}'] = self::getRelativeDate($now, $datetime); + $tokens['{time_end}'] = $tokens['{time_end:relative}']; + break; + case 'after': + $data = $criteria['data']; + $datetime = new DateTime("$data[ymd] $data[hh]:$data[mm]",new DateTimeZone(($data['user_tz'] ? $user['timezone'] : $data['timezone']))); + $time = XenForo_Locale::dateTime($datetime->getTimestamp(), 'separate'); + $tokens['{time_start:absolute}'] = $time['date'] . ' ' . $time['time']; + $tokens['{time_start:relative}'] = self::getRelativeDate($now, $datetime); + $tokens['{time_start}'] = $tokens['{time_start:relative}']; + break; + } + } + if ($tokens) + { + $notice['message'] = str_replace(array_keys($tokens), $tokens, $notice['message']); + } + } } }
60
6.666667
60
0
5974654530d9ad3f27f01ebdb666881bb5001ce5
features/step_definitions/profile_steps.rb
features/step_definitions/profile_steps.rb
When(/^I view my profile page$/) do profile_page.load(locale: 'en') end Then(/^I see my name$/) do expect(profile_page.heading.text).to include(User.first.first_name) end Then(/^I see my goal and goal date is blank$/) do expect(profile_page.goal_statement.value).to eql('') expect(profile_page.goal_deadline.value).to eql('') end When(/^I set a new goal and goal date$/) do profile_page.goal_statement.set 'reduce unnecessary expense items' profile_page.goal_deadline.set 'this time next year' profile_page.goal_save.click end And(/^I see my goal and goal date$/) do expect(profile_page.goal_statement.value).to eql(User.first.goal_statement) expect(profile_page.goal_deadline.value).to eql(User.first.goal_deadline) end
When(/^I view my profile page$/) do profile_page.load(locale: 'en') end Then(/^I see my name$/) do expect(profile_page.heading.text).to include(User.first.first_name) end Then(/^I see my goal and goal date is blank$/) do expect(profile_page.goal_statement.value).to be_empty expect(profile_page.goal_deadline.value).to be_empty end When(/^I set a new goal and goal date$/) do profile_page.goal_statement.set 'reduce unnecessary expense items' profile_page.goal_deadline.set 'this time next year' profile_page.goal_save.click end And(/^I see my goal and goal date$/) do expect(profile_page.goal_statement.value).to eql(User.first.goal_statement) expect(profile_page.goal_deadline.value).to eql(User.first.goal_deadline) end
Use `be_empty` instead of `eql('')`.
Use `be_empty` instead of `eql('')`.
Ruby
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
ruby
## Code Before: When(/^I view my profile page$/) do profile_page.load(locale: 'en') end Then(/^I see my name$/) do expect(profile_page.heading.text).to include(User.first.first_name) end Then(/^I see my goal and goal date is blank$/) do expect(profile_page.goal_statement.value).to eql('') expect(profile_page.goal_deadline.value).to eql('') end When(/^I set a new goal and goal date$/) do profile_page.goal_statement.set 'reduce unnecessary expense items' profile_page.goal_deadline.set 'this time next year' profile_page.goal_save.click end And(/^I see my goal and goal date$/) do expect(profile_page.goal_statement.value).to eql(User.first.goal_statement) expect(profile_page.goal_deadline.value).to eql(User.first.goal_deadline) end ## Instruction: Use `be_empty` instead of `eql('')`. ## Code After: When(/^I view my profile page$/) do profile_page.load(locale: 'en') end Then(/^I see my name$/) do expect(profile_page.heading.text).to include(User.first.first_name) end Then(/^I see my goal and goal date is blank$/) do expect(profile_page.goal_statement.value).to be_empty expect(profile_page.goal_deadline.value).to be_empty end When(/^I set a new goal and goal date$/) do profile_page.goal_statement.set 'reduce unnecessary expense items' profile_page.goal_deadline.set 'this time next year' profile_page.goal_save.click end And(/^I see my goal and goal date$/) do expect(profile_page.goal_statement.value).to eql(User.first.goal_statement) expect(profile_page.goal_deadline.value).to eql(User.first.goal_deadline) end
When(/^I view my profile page$/) do profile_page.load(locale: 'en') end Then(/^I see my name$/) do expect(profile_page.heading.text).to include(User.first.first_name) end Then(/^I see my goal and goal date is blank$/) do - expect(profile_page.goal_statement.value).to eql('') ? ^^^^^^ + expect(profile_page.goal_statement.value).to be_empty ? + ^^^^^^ - expect(profile_page.goal_deadline.value).to eql('') ? ^^^^^^ + expect(profile_page.goal_deadline.value).to be_empty ? + ^^^^^^ end When(/^I set a new goal and goal date$/) do profile_page.goal_statement.set 'reduce unnecessary expense items' profile_page.goal_deadline.set 'this time next year' profile_page.goal_save.click end And(/^I see my goal and goal date$/) do expect(profile_page.goal_statement.value).to eql(User.first.goal_statement) expect(profile_page.goal_deadline.value).to eql(User.first.goal_deadline) end
4
0.173913
2
2
4efcbf2f31485878055e97c165eff59dd51db297
src/programs/robotDevastation/CMakeLists.txt
src/programs/robotDevastation/CMakeLists.txt
if(ENABLE_robotDevastation) # Find YARP. Point the YARP_DIR environment variable at your build. find_package(YARP REQUIRED) add_executable(robotDevastation main.cpp RobotDevastation.hpp RobotDevastation.cpp) target_include_directories(robotDevastation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${YARP_INCLUDE_DIRS}) target_link_libraries(robotDevastation YARP::YARP_OS UtilsLib MusicLib MentalMapLib InputLib NetworkLib RobotLib StateMachineLib ImageLib UserInterfaceLib GameStatesLib) install(TARGETS robotDevastation DESTINATION bin) endif()
if(ENABLE_robotDevastation) # Find YARP. Point the YARP_DIR environment variable at your build. find_package(YARP REQUIRED) add_executable(robotDevastation main.cpp RobotDevastation.hpp RobotDevastation.cpp) target_include_directories(robotDevastation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${YARP_INCLUDE_DIRS}) target_link_libraries(robotDevastation YARP::YARP_OS UtilsLib MusicLib MentalMapLib InputLib NetworkLib RobotLib StateMachineLib ImageLib UserInterfaceLib GameStatesLib) target_compile_definitions(robotDevastation PUBLIC SDL_MAIN_HANDLED) install(TARGETS robotDevastation DESTINATION bin) endif()
Add SDL_MAIN_HANDLED definition to last RD program
Add SDL_MAIN_HANDLED definition to last RD program
Text
lgpl-2.1
asrob-uc3m/robotDevastation,asrob-uc3m/robotDevastation
text
## Code Before: if(ENABLE_robotDevastation) # Find YARP. Point the YARP_DIR environment variable at your build. find_package(YARP REQUIRED) add_executable(robotDevastation main.cpp RobotDevastation.hpp RobotDevastation.cpp) target_include_directories(robotDevastation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${YARP_INCLUDE_DIRS}) target_link_libraries(robotDevastation YARP::YARP_OS UtilsLib MusicLib MentalMapLib InputLib NetworkLib RobotLib StateMachineLib ImageLib UserInterfaceLib GameStatesLib) install(TARGETS robotDevastation DESTINATION bin) endif() ## Instruction: Add SDL_MAIN_HANDLED definition to last RD program ## Code After: if(ENABLE_robotDevastation) # Find YARP. Point the YARP_DIR environment variable at your build. find_package(YARP REQUIRED) add_executable(robotDevastation main.cpp RobotDevastation.hpp RobotDevastation.cpp) target_include_directories(robotDevastation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${YARP_INCLUDE_DIRS}) target_link_libraries(robotDevastation YARP::YARP_OS UtilsLib MusicLib MentalMapLib InputLib NetworkLib RobotLib StateMachineLib ImageLib UserInterfaceLib GameStatesLib) target_compile_definitions(robotDevastation PUBLIC SDL_MAIN_HANDLED) install(TARGETS robotDevastation DESTINATION bin) endif()
if(ENABLE_robotDevastation) # Find YARP. Point the YARP_DIR environment variable at your build. find_package(YARP REQUIRED) add_executable(robotDevastation main.cpp RobotDevastation.hpp RobotDevastation.cpp) target_include_directories(robotDevastation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${YARP_INCLUDE_DIRS}) target_link_libraries(robotDevastation YARP::YARP_OS UtilsLib MusicLib MentalMapLib InputLib NetworkLib RobotLib StateMachineLib ImageLib UserInterfaceLib GameStatesLib) + target_compile_definitions(robotDevastation PUBLIC SDL_MAIN_HANDLED) + install(TARGETS robotDevastation DESTINATION bin) endif()
2
0.071429
2
0
4bc7e359bcf22c9b2bb76a453cd7e5784af83482
docs/howto_use_ppl.rst
docs/howto_use_ppl.rst
HowTos ======== .. toctree:: :caption: HowTos examples/howto_use_aesara.md examples/howto_use_numpyro.md examples/howto_use_pymc.md examples/howto_use_tfp.md
Use the model I built with X? ============================= .. toctree:: :maxdepth: 1 examples/howto_use_aesara.md examples/howto_use_numpyro.md examples/howto_use_pymc.md examples/howto_use_tfp.md
Change how HOWTOs are displayed in the navigation bar
Change how HOWTOs are displayed in the navigation bar
reStructuredText
apache-2.0
blackjax-devs/blackjax
restructuredtext
## Code Before: HowTos ======== .. toctree:: :caption: HowTos examples/howto_use_aesara.md examples/howto_use_numpyro.md examples/howto_use_pymc.md examples/howto_use_tfp.md ## Instruction: Change how HOWTOs are displayed in the navigation bar ## Code After: Use the model I built with X? ============================= .. toctree:: :maxdepth: 1 examples/howto_use_aesara.md examples/howto_use_numpyro.md examples/howto_use_pymc.md examples/howto_use_tfp.md
- HowTos - ======== + Use the model I built with X? + ============================= .. toctree:: - :caption: HowTos + :maxdepth: 1 examples/howto_use_aesara.md examples/howto_use_numpyro.md examples/howto_use_pymc.md examples/howto_use_tfp.md
6
0.6
3
3
04231ac2eaee28ae8cfb4fbaff8180f621e53cc2
README.md
README.md
Tron ==== A JavaScript Cron expression builder and parser for both Node.js and browser.
Tron ==== [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] A JavaScript Cron expression builder and parser for both Node.js and browser. # License [MIT License](http://en.wikipedia.org/wiki/MIT_License) [npm-url]: https://npmjs.org/package/Tron [npm-image]: https://badge.fury.io/js/Tron.png [travis-url]: https://travis-ci.org/danilo-valente/Tron [travis-image]: https://travis-ci.org/danilo-valente/Tron.svg?branch=master
Add NPM and Travis CI badges
Add NPM and Travis CI badges
Markdown
mit
danilo-valente/Tron
markdown
## Code Before: Tron ==== A JavaScript Cron expression builder and parser for both Node.js and browser. ## Instruction: Add NPM and Travis CI badges ## Code After: Tron ==== [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] A JavaScript Cron expression builder and parser for both Node.js and browser. # License [MIT License](http://en.wikipedia.org/wiki/MIT_License) [npm-url]: https://npmjs.org/package/Tron [npm-image]: https://badge.fury.io/js/Tron.png [travis-url]: https://travis-ci.org/danilo-valente/Tron [travis-image]: https://travis-ci.org/danilo-valente/Tron.svg?branch=master
Tron ==== + [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] A JavaScript Cron expression builder and parser for both Node.js and browser. + + # License + + [MIT License](http://en.wikipedia.org/wiki/MIT_License) + + [npm-url]: https://npmjs.org/package/Tron + [npm-image]: https://badge.fury.io/js/Tron.png + + [travis-url]: https://travis-ci.org/danilo-valente/Tron + [travis-image]: https://travis-ci.org/danilo-valente/Tron.svg?branch=master
11
2.75
11
0
2ee1e8046323e2632c8cd8c8d88e3c313caabe1e
kobo/hub/forms.py
kobo/hub/forms.py
import django.forms as forms from django.db.models import Q class TaskSearchForm(forms.Form): search = forms.CharField(required=False) my = forms.BooleanField(required=False) def get_query(self, request): self.is_valid() search = self.cleaned_data["search"] my = self.cleaned_data["my"] query = Q() if search: query |= Q(method__icontains=search) query |= Q(owner__username__icontains=search) if my and request.user.is_authenticated(): query &= Q(owner=request.user) return query
import django.forms as forms from django.db.models import Q class TaskSearchForm(forms.Form): search = forms.CharField(required=False) my = forms.BooleanField(required=False) def get_query(self, request): self.is_valid() search = self.cleaned_data["search"] my = self.cleaned_data["my"] query = Q() if search: query |= Q(method__icontains=search) query |= Q(owner__username__icontains=search) query |= Q(label__icontains=search) if my and request.user.is_authenticated(): query &= Q(owner=request.user) return query
Enable searching in task list by label.
Enable searching in task list by label.
Python
lgpl-2.1
pombredanne/https-git.fedorahosted.org-git-kobo,release-engineering/kobo,release-engineering/kobo,release-engineering/kobo,pombredanne/https-git.fedorahosted.org-git-kobo,release-engineering/kobo,pombredanne/https-git.fedorahosted.org-git-kobo,pombredanne/https-git.fedorahosted.org-git-kobo
python
## Code Before: import django.forms as forms from django.db.models import Q class TaskSearchForm(forms.Form): search = forms.CharField(required=False) my = forms.BooleanField(required=False) def get_query(self, request): self.is_valid() search = self.cleaned_data["search"] my = self.cleaned_data["my"] query = Q() if search: query |= Q(method__icontains=search) query |= Q(owner__username__icontains=search) if my and request.user.is_authenticated(): query &= Q(owner=request.user) return query ## Instruction: Enable searching in task list by label. ## Code After: import django.forms as forms from django.db.models import Q class TaskSearchForm(forms.Form): search = forms.CharField(required=False) my = forms.BooleanField(required=False) def get_query(self, request): self.is_valid() search = self.cleaned_data["search"] my = self.cleaned_data["my"] query = Q() if search: query |= Q(method__icontains=search) query |= Q(owner__username__icontains=search) query |= Q(label__icontains=search) if my and request.user.is_authenticated(): query &= Q(owner=request.user) return query
import django.forms as forms from django.db.models import Q class TaskSearchForm(forms.Form): search = forms.CharField(required=False) my = forms.BooleanField(required=False) def get_query(self, request): self.is_valid() search = self.cleaned_data["search"] my = self.cleaned_data["my"] query = Q() if search: query |= Q(method__icontains=search) query |= Q(owner__username__icontains=search) + query |= Q(label__icontains=search) if my and request.user.is_authenticated(): query &= Q(owner=request.user) return query
1
0.04
1
0
b344b32c5febb8939e18058fe46f557bb24c4d9c
README.md
README.md
It's my dotfiles. Open to any suggestions and comments.
[![Build Status](https://travis-ci.org/ikuwow/dotfiles.svg?branch=master)](https://travis-ci.org/ikuwow/dotfiles) It's my dotfiles. Open to any suggestions and comments.
Add travis badge to Readme
Add travis badge to Readme
Markdown
mit
ikuwow/dotfiles,ikuwow/dotfiles,ikuwow/dotfiles
markdown
## Code Before: It's my dotfiles. Open to any suggestions and comments. ## Instruction: Add travis badge to Readme ## Code After: [![Build Status](https://travis-ci.org/ikuwow/dotfiles.svg?branch=master)](https://travis-ci.org/ikuwow/dotfiles) It's my dotfiles. Open to any suggestions and comments.
+ + [![Build Status](https://travis-ci.org/ikuwow/dotfiles.svg?branch=master)](https://travis-ci.org/ikuwow/dotfiles) + It's my dotfiles. Open to any suggestions and comments.
3
1.5
3
0