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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68e792d39b4883b79fab2ee489ee878131aeea09 | DiscTests/Helpers/MockingjayMatchers.swift | DiscTests/Helpers/MockingjayMatchers.swift | import Mockingjay
func api(method: HTTPMethod, _ uri: String, token: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
authorization = headers["Authorization"] where
authorization == "Bearer \(token)"
else {
return false
}
return api(method, uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
accept = headers["Accept"],
acceptEncoding = headers["Accept-Encoding"],
contentType = headers["Content-Type"] where
accept == "application/json" &&
contentType == "application/json" &&
acceptEncoding == "gzip;q=1.0,compress;q=0.5"
else {
return false
}
return http(method, uri: uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String, body: [String: AnyObject])(request: NSURLRequest) -> Bool {
let bodyJson = try? NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions())
guard bodyJson == request.HTTPBody else { return false }
return api(method, uri)(request: request)
}
| import Mockingjay
func api(method: HTTPMethod, _ uri: String, token: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
authorization = headers["Authorization"] where
authorization == "Bearer \(token)"
else {
return false
}
return api(method, uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
accept = headers["Accept"],
acceptEncoding = headers["Accept-Encoding"],
contentType = headers["Content-Type"] where
accept == "application/json" &&
contentType == "application/json" &&
acceptEncoding == "gzip;q=1.0,compress;q=0.5"
else {
return false
}
return http(method, uri: uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String, body: [String: AnyObject])(request: NSURLRequest) -> Bool {
guard let bodyStream = request.HTTPBodyStream else { return false }
bodyStream.open()
guard let bodyStreamJsonObject = try? NSJSONSerialization.JSONObjectWithStream(bodyStream, options: NSJSONReadingOptions()) else {
return false
}
let bodyStreamJsonData = try? NSJSONSerialization.dataWithJSONObject(bodyStreamJsonObject, options: NSJSONWritingOptions())
let bodyJsonData = try? NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions())
guard bodyStreamJsonData == bodyJsonData else { return false }
return api(method, uri)(request: request)
}
| Fix Mockingjay matcher to workaround issue with HTTPBody. | Fix Mockingjay matcher to workaround issue with HTTPBody.
| Swift | mit | the-grid/Disc,the-grid/Disc,the-grid/Disc | swift | ## Code Before:
import Mockingjay
func api(method: HTTPMethod, _ uri: String, token: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
authorization = headers["Authorization"] where
authorization == "Bearer \(token)"
else {
return false
}
return api(method, uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
accept = headers["Accept"],
acceptEncoding = headers["Accept-Encoding"],
contentType = headers["Content-Type"] where
accept == "application/json" &&
contentType == "application/json" &&
acceptEncoding == "gzip;q=1.0,compress;q=0.5"
else {
return false
}
return http(method, uri: uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String, body: [String: AnyObject])(request: NSURLRequest) -> Bool {
let bodyJson = try? NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions())
guard bodyJson == request.HTTPBody else { return false }
return api(method, uri)(request: request)
}
## Instruction:
Fix Mockingjay matcher to workaround issue with HTTPBody.
## Code After:
import Mockingjay
func api(method: HTTPMethod, _ uri: String, token: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
authorization = headers["Authorization"] where
authorization == "Bearer \(token)"
else {
return false
}
return api(method, uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
accept = headers["Accept"],
acceptEncoding = headers["Accept-Encoding"],
contentType = headers["Content-Type"] where
accept == "application/json" &&
contentType == "application/json" &&
acceptEncoding == "gzip;q=1.0,compress;q=0.5"
else {
return false
}
return http(method, uri: uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String, body: [String: AnyObject])(request: NSURLRequest) -> Bool {
guard let bodyStream = request.HTTPBodyStream else { return false }
bodyStream.open()
guard let bodyStreamJsonObject = try? NSJSONSerialization.JSONObjectWithStream(bodyStream, options: NSJSONReadingOptions()) else {
return false
}
let bodyStreamJsonData = try? NSJSONSerialization.dataWithJSONObject(bodyStreamJsonObject, options: NSJSONWritingOptions())
let bodyJsonData = try? NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions())
guard bodyStreamJsonData == bodyJsonData else { return false }
return api(method, uri)(request: request)
}
| import Mockingjay
func api(method: HTTPMethod, _ uri: String, token: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
authorization = headers["Authorization"] where
authorization == "Bearer \(token)"
else {
return false
}
return api(method, uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String)(request: NSURLRequest) -> Bool {
guard let headers = request.allHTTPHeaderFields,
accept = headers["Accept"],
acceptEncoding = headers["Accept-Encoding"],
contentType = headers["Content-Type"] where
accept == "application/json" &&
contentType == "application/json" &&
acceptEncoding == "gzip;q=1.0,compress;q=0.5"
else {
return false
}
return http(method, uri: uri)(request: request)
}
func api(method: HTTPMethod, _ uri: String, body: [String: AnyObject])(request: NSURLRequest) -> Bool {
+ guard let bodyStream = request.HTTPBodyStream else { return false }
+
+ bodyStream.open()
+
+ guard let bodyStreamJsonObject = try? NSJSONSerialization.JSONObjectWithStream(bodyStream, options: NSJSONReadingOptions()) else {
+ return false
+ }
+
+ let bodyStreamJsonData = try? NSJSONSerialization.dataWithJSONObject(bodyStreamJsonObject, options: NSJSONWritingOptions())
- let bodyJson = try? NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions())
+ let bodyJsonData = try? NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions())
? ++++
- guard bodyJson == request.HTTPBody else { return false }
+
+ guard bodyStreamJsonData == bodyJsonData else { return false }
+
return api(method, uri)(request: request)
} | 15 | 0.454545 | 13 | 2 |
07668a445da9944dccb12a36bbc012c639cba778 | docs/source/install/index.rst | docs/source/install/index.rst | Installation
============
To install and run |st2| on Ubuntu/Debian or RedHat/Fedora with all dependencies,
download and run the deployment script.
::
curl -q -k -O https://ops.stackstorm.net/releases/st2/scripts/st2_deploy.sh
chmod +x st2_deploy.sh
sudo ./st2_deploy.sh
This will download and install the stable release of |st2| (currently |release|).
If you want to install the latest bits, run ``sudo ./st2_deploy.sh latest``.
Installation should take about 5 min. Grab a coffee and watch :doc:`/video` while it is being installed.
.. include:: on_complete.rst
.. rubric:: More Installations
.. toctree::
:maxdepth: 1
Ubuntu / Debian <deb>
RedHat / Fedora <rpm>
config
Vagrant <vagrant>
Docker <docker>
deploy
sources
webui
.. note::
We compile, build and test on Fedora 20 and Ubuntu 14.04. The `st2_deploy.sh <https://github.com/StackStorm/st2sandbox/blob/master/scripts/deploy_stan.sh>`_ script should work for other versions, but if you find a problem, let us know. Fixes welcome :)
| Installation
============
.. note::
st2_deploy.sh script allows you to easily install and run |st2| with all the
dependencies on a single server. It's only intented to be used for testing,
evaluation and demonstration purposes (it doesn't use HTTPS, it uses flat file
htpasswd based authentication, etc.) - you should **not** use it for production
deployments.
For production deployments you follow deb / rpm installation methods linked
at the bottom of the page or use our puppet module.
To install and run |st2| on Ubuntu/Debian or RedHat/Fedora with all dependencies,
download and run the deployment script.
::
curl -q -k -O https://ops.stackstorm.net/releases/st2/scripts/st2_deploy.sh
chmod +x st2_deploy.sh
sudo ./st2_deploy.sh
This will download and install the stable release of |st2| (currently |release|).
If you want to install the latest development version, run ``sudo ./st2_deploy.sh latest``.
Installation should take about 5 min. Grab a coffee and watch :doc:`/video` while it is being installed.
.. include:: on_complete.rst
.. rubric:: More Installations
.. toctree::
:maxdepth: 1
Ubuntu / Debian <deb>
RedHat / Fedora <rpm>
config
Vagrant <vagrant>
Docker <docker>
deploy
sources
webui
.. note::
We compile, build and test on Fedora 20 and Ubuntu 14.04. The `st2_deploy.sh <https://github.com/StackStorm/st2sandbox/blob/master/scripts/deploy_stan.sh>`_ script should work for other versions, but if you find a problem, let us know. Fixes welcome :)
| Add a note which says that st2_deploy should NOT be used for production deployments. | Add a note which says that st2_deploy should NOT be used for production
deployments.
| reStructuredText | apache-2.0 | jtopjian/st2,Itxaka/st2,armab/st2,dennybaa/st2,StackStorm/st2,dennybaa/st2,lakshmi-kannan/st2,grengojbo/st2,nzlosh/st2,alfasin/st2,peak6/st2,armab/st2,tonybaloney/st2,emedvedev/st2,StackStorm/st2,Plexxi/st2,tonybaloney/st2,grengojbo/st2,StackStorm/st2,alfasin/st2,Itxaka/st2,emedvedev/st2,StackStorm/st2,Itxaka/st2,lakshmi-kannan/st2,Plexxi/st2,nzlosh/st2,dennybaa/st2,pinterb/st2,nzlosh/st2,punalpatel/st2,Plexxi/st2,peak6/st2,tonybaloney/st2,nzlosh/st2,Plexxi/st2,emedvedev/st2,lakshmi-kannan/st2,peak6/st2,pixelrebel/st2,jtopjian/st2,punalpatel/st2,armab/st2,pinterb/st2,pinterb/st2,alfasin/st2,grengojbo/st2,jtopjian/st2,pixelrebel/st2,punalpatel/st2,pixelrebel/st2 | restructuredtext | ## Code Before:
Installation
============
To install and run |st2| on Ubuntu/Debian or RedHat/Fedora with all dependencies,
download and run the deployment script.
::
curl -q -k -O https://ops.stackstorm.net/releases/st2/scripts/st2_deploy.sh
chmod +x st2_deploy.sh
sudo ./st2_deploy.sh
This will download and install the stable release of |st2| (currently |release|).
If you want to install the latest bits, run ``sudo ./st2_deploy.sh latest``.
Installation should take about 5 min. Grab a coffee and watch :doc:`/video` while it is being installed.
.. include:: on_complete.rst
.. rubric:: More Installations
.. toctree::
:maxdepth: 1
Ubuntu / Debian <deb>
RedHat / Fedora <rpm>
config
Vagrant <vagrant>
Docker <docker>
deploy
sources
webui
.. note::
We compile, build and test on Fedora 20 and Ubuntu 14.04. The `st2_deploy.sh <https://github.com/StackStorm/st2sandbox/blob/master/scripts/deploy_stan.sh>`_ script should work for other versions, but if you find a problem, let us know. Fixes welcome :)
## Instruction:
Add a note which says that st2_deploy should NOT be used for production
deployments.
## Code After:
Installation
============
.. note::
st2_deploy.sh script allows you to easily install and run |st2| with all the
dependencies on a single server. It's only intented to be used for testing,
evaluation and demonstration purposes (it doesn't use HTTPS, it uses flat file
htpasswd based authentication, etc.) - you should **not** use it for production
deployments.
For production deployments you follow deb / rpm installation methods linked
at the bottom of the page or use our puppet module.
To install and run |st2| on Ubuntu/Debian or RedHat/Fedora with all dependencies,
download and run the deployment script.
::
curl -q -k -O https://ops.stackstorm.net/releases/st2/scripts/st2_deploy.sh
chmod +x st2_deploy.sh
sudo ./st2_deploy.sh
This will download and install the stable release of |st2| (currently |release|).
If you want to install the latest development version, run ``sudo ./st2_deploy.sh latest``.
Installation should take about 5 min. Grab a coffee and watch :doc:`/video` while it is being installed.
.. include:: on_complete.rst
.. rubric:: More Installations
.. toctree::
:maxdepth: 1
Ubuntu / Debian <deb>
RedHat / Fedora <rpm>
config
Vagrant <vagrant>
Docker <docker>
deploy
sources
webui
.. note::
We compile, build and test on Fedora 20 and Ubuntu 14.04. The `st2_deploy.sh <https://github.com/StackStorm/st2sandbox/blob/master/scripts/deploy_stan.sh>`_ script should work for other versions, but if you find a problem, let us know. Fixes welcome :)
| Installation
============
+
+ .. note::
+
+ st2_deploy.sh script allows you to easily install and run |st2| with all the
+ dependencies on a single server. It's only intented to be used for testing,
+ evaluation and demonstration purposes (it doesn't use HTTPS, it uses flat file
+ htpasswd based authentication, etc.) - you should **not** use it for production
+ deployments.
+
+ For production deployments you follow deb / rpm installation methods linked
+ at the bottom of the page or use our puppet module.
To install and run |st2| on Ubuntu/Debian or RedHat/Fedora with all dependencies,
download and run the deployment script.
::
curl -q -k -O https://ops.stackstorm.net/releases/st2/scripts/st2_deploy.sh
chmod +x st2_deploy.sh
sudo ./st2_deploy.sh
This will download and install the stable release of |st2| (currently |release|).
- If you want to install the latest bits, run ``sudo ./st2_deploy.sh latest``.
? ^ ^^
+ If you want to install the latest development version, run ``sudo ./st2_deploy.sh latest``.
? ^^^^^^^^^^^^^^^^ ^^
Installation should take about 5 min. Grab a coffee and watch :doc:`/video` while it is being installed.
.. include:: on_complete.rst
.. rubric:: More Installations
.. toctree::
:maxdepth: 1
Ubuntu / Debian <deb>
RedHat / Fedora <rpm>
config
Vagrant <vagrant>
Docker <docker>
deploy
sources
webui
.. note::
We compile, build and test on Fedora 20 and Ubuntu 14.04. The `st2_deploy.sh <https://github.com/StackStorm/st2sandbox/blob/master/scripts/deploy_stan.sh>`_ script should work for other versions, but if you find a problem, let us know. Fixes welcome :) | 13 | 0.371429 | 12 | 1 |
ed177ac90aa13c4bafa48d419dc5121d609cbb9b | website/source/docs/vagrant-cloud/support.html.md | website/source/docs/vagrant-cloud/support.html.md | ---
layout: "docs"
page_title: "Vagrant Cloud Support"
sidebar_current: "vagrant-cloud-support"
---
# Contacting Support
All users of Vagrant Cloud are urged to email feedback, questions, and requests
to HashiCorp Support at
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
### Free Support
We do not currently publish support SLAs for free accounts, but endeavor to
respond as quickly as possible. We respond to most requests within less than 24
hours.
## HashiCorp Tools Support
It's often the case that Vagrant Cloud questions or feedback relates to
the HashiCorp tooling. We encourage all Vagrant Cloud users to search for
related issues and problems in the open source repositories and mailing lists
prior to contacting us to help make our support more efficient and to help
resolve problems faster.
Visit the updating tools section for a list of our tools and their project
websites.
## Documentation Feedback
Due to the dynamic nature of Vagrant Cloud and the broad set of features
it provides, there may be information lacking in the documentation.
In this case, we appreciate any feedback to be emailed to us so
we can make improvements. Please email feedback to
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
| ---
layout: "docs"
page_title: "Vagrant Cloud Support"
sidebar_current: "vagrant-cloud-support"
---
# Contacting Support
All users of Vagrant Cloud are urged to email feedback, questions, and requests
to HashiCorp Support at
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
### Free Support
We do not currently publish support SLAs for free accounts, but endeavor to
respond as quickly as possible. We respond to most requests within less than 24
hours.
## HashiCorp Tools Support
It's often the case that Vagrant Cloud questions or feedback relates to
the HashiCorp tooling. We encourage all Vagrant Cloud users to search for
related issues and problems in the open source repositories and mailing lists
prior to contacting us to help make our support more efficient and to help
resolve problems faster.
Visit the updating tools section for a list of our tools and their project
websites.
## Documentation Feedback
Due to the dynamic nature of Vagrant Cloud and the broad set of features
it provides, there may be information lacking in the documentation.
Vagrant Cloud documentation is open source.
If you'd like to improve or correct the documentation,
please submit a pull-request to the
[Vagrant project on GitHub](https://github.com/mitchellh/vagrant/tree/master/website/source/docs/vagrant-cloud/).
The Vagrant Cloud documentation can be found in the `/website/source/vagrant-cloud/` directory.
Otherwise, to make a suggestion or report an error in documentation, please
email feedback to
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
| Add link to Vagrant Cloud docs source | website: Add link to Vagrant Cloud docs source
| Markdown | mit | gitebra/vagrant,gitebra/vagrant,gitebra/vagrant,gitebra/vagrant | markdown | ## Code Before:
---
layout: "docs"
page_title: "Vagrant Cloud Support"
sidebar_current: "vagrant-cloud-support"
---
# Contacting Support
All users of Vagrant Cloud are urged to email feedback, questions, and requests
to HashiCorp Support at
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
### Free Support
We do not currently publish support SLAs for free accounts, but endeavor to
respond as quickly as possible. We respond to most requests within less than 24
hours.
## HashiCorp Tools Support
It's often the case that Vagrant Cloud questions or feedback relates to
the HashiCorp tooling. We encourage all Vagrant Cloud users to search for
related issues and problems in the open source repositories and mailing lists
prior to contacting us to help make our support more efficient and to help
resolve problems faster.
Visit the updating tools section for a list of our tools and their project
websites.
## Documentation Feedback
Due to the dynamic nature of Vagrant Cloud and the broad set of features
it provides, there may be information lacking in the documentation.
In this case, we appreciate any feedback to be emailed to us so
we can make improvements. Please email feedback to
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
## Instruction:
website: Add link to Vagrant Cloud docs source
## Code After:
---
layout: "docs"
page_title: "Vagrant Cloud Support"
sidebar_current: "vagrant-cloud-support"
---
# Contacting Support
All users of Vagrant Cloud are urged to email feedback, questions, and requests
to HashiCorp Support at
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
### Free Support
We do not currently publish support SLAs for free accounts, but endeavor to
respond as quickly as possible. We respond to most requests within less than 24
hours.
## HashiCorp Tools Support
It's often the case that Vagrant Cloud questions or feedback relates to
the HashiCorp tooling. We encourage all Vagrant Cloud users to search for
related issues and problems in the open source repositories and mailing lists
prior to contacting us to help make our support more efficient and to help
resolve problems faster.
Visit the updating tools section for a list of our tools and their project
websites.
## Documentation Feedback
Due to the dynamic nature of Vagrant Cloud and the broad set of features
it provides, there may be information lacking in the documentation.
Vagrant Cloud documentation is open source.
If you'd like to improve or correct the documentation,
please submit a pull-request to the
[Vagrant project on GitHub](https://github.com/mitchellh/vagrant/tree/master/website/source/docs/vagrant-cloud/).
The Vagrant Cloud documentation can be found in the `/website/source/vagrant-cloud/` directory.
Otherwise, to make a suggestion or report an error in documentation, please
email feedback to
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
| ---
layout: "docs"
page_title: "Vagrant Cloud Support"
sidebar_current: "vagrant-cloud-support"
---
# Contacting Support
All users of Vagrant Cloud are urged to email feedback, questions, and requests
to HashiCorp Support at
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>.
### Free Support
We do not currently publish support SLAs for free accounts, but endeavor to
respond as quickly as possible. We respond to most requests within less than 24
hours.
## HashiCorp Tools Support
It's often the case that Vagrant Cloud questions or feedback relates to
the HashiCorp tooling. We encourage all Vagrant Cloud users to search for
related issues and problems in the open source repositories and mailing lists
prior to contacting us to help make our support more efficient and to help
resolve problems faster.
Visit the updating tools section for a list of our tools and their project
websites.
## Documentation Feedback
Due to the dynamic nature of Vagrant Cloud and the broad set of features
it provides, there may be information lacking in the documentation.
- In this case, we appreciate any feedback to be emailed to us so
- we can make improvements. Please email feedback to
+ Vagrant Cloud documentation is open source.
+ If you'd like to improve or correct the documentation,
+ please submit a pull-request to the
+ [Vagrant project on GitHub](https://github.com/mitchellh/vagrant/tree/master/website/source/docs/vagrant-cloud/).
+ The Vagrant Cloud documentation can be found in the `/website/source/vagrant-cloud/` directory.
+
+ Otherwise, to make a suggestion or report an error in documentation, please
+ email feedback to
<a href="mailto:support+vagrantcloud@hashicorp.com">
support+vagrantcloud@hashicorp.com
</a>. | 10 | 0.243902 | 8 | 2 |
c7551624403eceee765c0abe4d3bc68230d2c17b | tests/dummy/app/templates/application.hbs | tests/dummy/app/templates/application.hbs | {{osf-navbar}}
<div id="main" class="container-fluid">
<div class="row">
<div class="col-md-12" role="main">
{{outlet}}
</div>
</div>
</div>
{{osf-footer}}
{{osf-copyright}}
{{osf-mode-footer}}
| {{osf-navbar}}
{{title "OSF"}}
<div id="main" class="container-fluid">
<div class="row">
<div class="col-md-12" role="main">
{{outlet}}
</div>
</div>
</div>
{{osf-footer}}
{{osf-copyright}}
{{osf-mode-footer}}
| Add OSF as first-level title. | Add OSF as first-level title.
| Handlebars | apache-2.0 | hmoco/ember-osf,jamescdavis/ember-osf,pattisdr/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,cwilli34/ember-osf,cwilli34/ember-osf,chrisseto/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,jamescdavis/ember-osf,pattisdr/ember-osf,chrisseto/ember-osf,crcresearch/ember-osf,crcresearch/ember-osf,binoculars/ember-osf,binoculars/ember-osf,hmoco/ember-osf | handlebars | ## Code Before:
{{osf-navbar}}
<div id="main" class="container-fluid">
<div class="row">
<div class="col-md-12" role="main">
{{outlet}}
</div>
</div>
</div>
{{osf-footer}}
{{osf-copyright}}
{{osf-mode-footer}}
## Instruction:
Add OSF as first-level title.
## Code After:
{{osf-navbar}}
{{title "OSF"}}
<div id="main" class="container-fluid">
<div class="row">
<div class="col-md-12" role="main">
{{outlet}}
</div>
</div>
</div>
{{osf-footer}}
{{osf-copyright}}
{{osf-mode-footer}}
| {{osf-navbar}}
+ {{title "OSF"}}
- <div id="main" class="container-fluid">
? ----
+ <div id="main" class="container-fluid">
<div class="row">
<div class="col-md-12" role="main">
{{outlet}}
</div>
</div>
</div>
{{osf-footer}}
{{osf-copyright}}
{{osf-mode-footer}} | 3 | 0.272727 | 2 | 1 |
4a6fe78fe066954d14e767cb24620308e1b08a8a | share/wlt/scaffolding/full/_layouts/post.haml | share/wlt/scaffolding/full/_layouts/post.haml | ---
layout: master
---
%article
%header
%h1= @scope.title
%h4
Par
= @scope.author
- if @contents.account? "twitter"
%a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
- if @contents.account? "gplus"
%a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
, le
= @scope.formated_date
dans
%ul.tags
- tags.each do |tag|
%li
%a.icon-tag{:href => link_to("tags/#{tag}")}
= tag
- if @scope.gravatar?
%img.pola{:src => @scope.gravatar, :alt => @scope.author}
%div(itemprop="articleBody")
= content
%footer
= render :partial => "twitter_share_account"
= render :partial => "gplus_share" | ---
layout: master
---
%article
%header
%h1= @scope.title
%h4
Par
= @scope.author
- if @contents.account? "twitter"
%a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
- if @contents.account? "gplus"
%a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
, le
= @scope.formated_date
dans
%ul.tags
- tags.each do |tag|
%li
%a.icon-tag{:href => link_to("tags/#{tag}")}
= tag
- if @scope.comments?
%h5
%a(href="#comments")
= "(#{@scope.comments.size} commentaire#{if @scope.comments.size > 1 then "s" end})"
- if @scope.gravatar?
%img.pola{:src => @scope.gravatar, :alt => @scope.author}
%div(itemprop="articleBody")
= content
- if @scope.comments?
%h2
%a#comments
Commentaires
- @scope.comments.each do |comment|
%article
%header
%h3= comment.title
%h4
Par
%a{:href => comment.website, :rel => "nofollow"}
= comment.author
, le
= comment.date
= comment.content
%footer
= render :partial => "twitter_share_account"
= render :partial => "gplus_share" | Add template to handle comments | Add template to handle comments
| Haml | bsd-2-clause | eunomie/wlt,eunomie/wlt | haml | ## Code Before:
---
layout: master
---
%article
%header
%h1= @scope.title
%h4
Par
= @scope.author
- if @contents.account? "twitter"
%a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
- if @contents.account? "gplus"
%a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
, le
= @scope.formated_date
dans
%ul.tags
- tags.each do |tag|
%li
%a.icon-tag{:href => link_to("tags/#{tag}")}
= tag
- if @scope.gravatar?
%img.pola{:src => @scope.gravatar, :alt => @scope.author}
%div(itemprop="articleBody")
= content
%footer
= render :partial => "twitter_share_account"
= render :partial => "gplus_share"
## Instruction:
Add template to handle comments
## Code After:
---
layout: master
---
%article
%header
%h1= @scope.title
%h4
Par
= @scope.author
- if @contents.account? "twitter"
%a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
- if @contents.account? "gplus"
%a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
, le
= @scope.formated_date
dans
%ul.tags
- tags.each do |tag|
%li
%a.icon-tag{:href => link_to("tags/#{tag}")}
= tag
- if @scope.comments?
%h5
%a(href="#comments")
= "(#{@scope.comments.size} commentaire#{if @scope.comments.size > 1 then "s" end})"
- if @scope.gravatar?
%img.pola{:src => @scope.gravatar, :alt => @scope.author}
%div(itemprop="articleBody")
= content
- if @scope.comments?
%h2
%a#comments
Commentaires
- @scope.comments.each do |comment|
%article
%header
%h3= comment.title
%h4
Par
%a{:href => comment.website, :rel => "nofollow"}
= comment.author
, le
= comment.date
= comment.content
%footer
= render :partial => "twitter_share_account"
= render :partial => "gplus_share" | ---
layout: master
---
%article
%header
%h1= @scope.title
%h4
Par
= @scope.author
- if @contents.account? "twitter"
%a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
- if @contents.account? "gplus"
%a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
, le
= @scope.formated_date
dans
%ul.tags
- tags.each do |tag|
%li
%a.icon-tag{:href => link_to("tags/#{tag}")}
= tag
+ - if @scope.comments?
+ %h5
+ %a(href="#comments")
+ = "(#{@scope.comments.size} commentaire#{if @scope.comments.size > 1 then "s" end})"
+
+
- if @scope.gravatar?
%img.pola{:src => @scope.gravatar, :alt => @scope.author}
%div(itemprop="articleBody")
= content
+ - if @scope.comments?
+ %h2
+ %a#comments
+ Commentaires
+ - @scope.comments.each do |comment|
+ %article
+ %header
+ %h3= comment.title
+ %h4
+ Par
+ %a{:href => comment.website, :rel => "nofollow"}
+ = comment.author
+ , le
+ = comment.date
+
+ = comment.content
+
%footer
= render :partial => "twitter_share_account"
= render :partial => "gplus_share" | 23 | 0.676471 | 23 | 0 |
e387275b1ffb4c5620b23e97256231a1dc24cc74 | src/app/components/feed/jh-feed.html | src/app/components/feed/jh-feed.html | <figure
ng-class="{'own-feed': vm.feed.isPublisher, sticky: vm.highlightedByUser}">
<div class="thumb"
ng-click="vm.toggleHighlightFn()">
<video
autoplay
class="face"
ng-class="{mirrored: vm.mirrored}"
poster="assets/images/placeholder.png"
ng-show="vm.thumbnailTag() === 'video'">
</video>
<img
src="{{vm.feed.getPicture()}}"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'picture'">
</img>
<img
ng-src="assets/images/placeholder.png"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'placeholder'">
</img>
</div>
<figcaption>
<span class="caption">{{ vm.feed.display }}</span>
<div class="buttons">
<jh-unpublish-button feed="vm.feed"></jh-unpublish-button>
<jh-video-button feed="vm.feed"></jh-video-button>
<jh-ignore-button feed="vm.feed"></jh-ignore-button>
<jh-audio-button feed="vm.feed"></jh-audio-button>
</div>
</figcaption>
</figure>
| <figure
ng-class="{'own-feed': vm.feed.isPublisher, sticky: vm.highlightedByUser}">
<div class="thumb"
ng-click="vm.toggleHighlightFn()">
<video
autoplay
class="face"
ng-class="{mirrored: vm.mirrored}"
poster="assets/images/placeholder.png"
ng-show="vm.thumbnailTag() === 'video'">
</video>
<img
src="{{vm.feed.getPicture()}}"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'picture'">
</img>
<img
ng-src="assets/images/placeholder.png"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'placeholder'">
</img>
<canvas
ng-show="false">
</canvas>
</div>
<figcaption>
<span class="caption">{{ vm.feed.display }}</span>
<div class="buttons">
<jh-unpublish-button feed="vm.feed"></jh-unpublish-button>
<jh-video-button feed="vm.feed"></jh-video-button>
<jh-ignore-button feed="vm.feed"></jh-ignore-button>
<jh-audio-button feed="vm.feed"></jh-audio-button>
</div>
</figcaption>
</figure>
| Fix error introduced when removed the pin button | Fix error introduced when removed the pin button
The canvas element is necessary to process the pictures
| HTML | mit | jangouts/jangouts,jangouts/jangouts,jangouts/jangouts,jangouts/jangouts | html | ## Code Before:
<figure
ng-class="{'own-feed': vm.feed.isPublisher, sticky: vm.highlightedByUser}">
<div class="thumb"
ng-click="vm.toggleHighlightFn()">
<video
autoplay
class="face"
ng-class="{mirrored: vm.mirrored}"
poster="assets/images/placeholder.png"
ng-show="vm.thumbnailTag() === 'video'">
</video>
<img
src="{{vm.feed.getPicture()}}"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'picture'">
</img>
<img
ng-src="assets/images/placeholder.png"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'placeholder'">
</img>
</div>
<figcaption>
<span class="caption">{{ vm.feed.display }}</span>
<div class="buttons">
<jh-unpublish-button feed="vm.feed"></jh-unpublish-button>
<jh-video-button feed="vm.feed"></jh-video-button>
<jh-ignore-button feed="vm.feed"></jh-ignore-button>
<jh-audio-button feed="vm.feed"></jh-audio-button>
</div>
</figcaption>
</figure>
## Instruction:
Fix error introduced when removed the pin button
The canvas element is necessary to process the pictures
## Code After:
<figure
ng-class="{'own-feed': vm.feed.isPublisher, sticky: vm.highlightedByUser}">
<div class="thumb"
ng-click="vm.toggleHighlightFn()">
<video
autoplay
class="face"
ng-class="{mirrored: vm.mirrored}"
poster="assets/images/placeholder.png"
ng-show="vm.thumbnailTag() === 'video'">
</video>
<img
src="{{vm.feed.getPicture()}}"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'picture'">
</img>
<img
ng-src="assets/images/placeholder.png"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'placeholder'">
</img>
<canvas
ng-show="false">
</canvas>
</div>
<figcaption>
<span class="caption">{{ vm.feed.display }}</span>
<div class="buttons">
<jh-unpublish-button feed="vm.feed"></jh-unpublish-button>
<jh-video-button feed="vm.feed"></jh-video-button>
<jh-ignore-button feed="vm.feed"></jh-ignore-button>
<jh-audio-button feed="vm.feed"></jh-audio-button>
</div>
</figcaption>
</figure>
| <figure
ng-class="{'own-feed': vm.feed.isPublisher, sticky: vm.highlightedByUser}">
<div class="thumb"
ng-click="vm.toggleHighlightFn()">
<video
autoplay
class="face"
ng-class="{mirrored: vm.mirrored}"
poster="assets/images/placeholder.png"
ng-show="vm.thumbnailTag() === 'video'">
</video>
<img
src="{{vm.feed.getPicture()}}"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'picture'">
</img>
<img
ng-src="assets/images/placeholder.png"
class="face"
ng-class="{mirrored: vm.mirrored}"
ng-show="vm.thumbnailTag() === 'placeholder'">
</img>
+ <canvas
+ ng-show="false">
+ </canvas>
</div>
<figcaption>
<span class="caption">{{ vm.feed.display }}</span>
<div class="buttons">
<jh-unpublish-button feed="vm.feed"></jh-unpublish-button>
<jh-video-button feed="vm.feed"></jh-video-button>
<jh-ignore-button feed="vm.feed"></jh-ignore-button>
<jh-audio-button feed="vm.feed"></jh-audio-button>
</div>
</figcaption>
</figure> | 3 | 0.088235 | 3 | 0 |
93c5f44a46d7f8384d622b3e3f32753fd6c0c72c | chef/lib/chef/run_list/versioned_recipe_list.rb | chef/lib/chef/run_list/versioned_recipe_list.rb |
class Chef
class RunList
class VersionedRecipeList < Array
def initialize
super
@versions = Hash.new
end
def add_recipe(name, version=nil)
if version && @versions.has_key?(name)
unless Gem::Version.new(@versions[name]) == Gem::Version.new(version)
raise Chef::Exceptions::RecipeVersionConflict, "Run list requires recipe #{name} at versions #{@versions[name]} and #{version}"
end
end
@versions[name] = version if version
self << name unless self.include?(name)
end
def with_versions
self.map {|i| {:name => i, :version => @versions[i]}}
end
end
end
end | require 'chef/version_class'
class Chef
class RunList
class VersionedRecipeList < Array
def initialize
super
@versions = Hash.new
end
def add_recipe(name, version=nil)
if version && @versions.has_key?(name)
unless Chef::Version.new(@versions[name]) == Chef::Version.new(version)
raise Chef::Exceptions::RecipeVersionConflict, "Run list requires recipe #{name} at versions #{@versions[name]} and #{version}"
end
end
@versions[name] = version if version
self << name unless self.include?(name)
end
def with_versions
self.map {|i| {:name => i, :version => @versions[i]}}
end
end
end
end
| Use Chef::Version in VersionedRecipeList CHEF-1818 | Use Chef::Version in VersionedRecipeList CHEF-1818
| Ruby | apache-2.0 | sekrett/chef,mikedodge04/chef,circleback/chef,bahamas10/chef,kaznishi/chef,antonifs/chef,jhulten/chef,sometimesfood/chef,acaiafa/chef,aaron-lane/chef,onlyhavecans/chef,josb/chef,jimmymccrory/chef,nsdavidson/chef,chef/chef,EasonYi/chef,acaiafa/chef,circleback/chef,custora/chef,sempervictus/chef,tbriggs-curse/chef,nellshamrell/chef,mio-g/chef,strangelittlemonkey/chef,andrewpsp/chef,sideci-sample/sideci-sample-chef,mattray/chef,kamaradclimber/chef,cgvarela/chef,askl56/chef,SUSE-Cloud/chef,sanditiffin/chef,onlyhavecans/chef,ShadySQL/chef-merged,ducthanh/chef,jordane/chef,legal90/chef,acaiafa/chef,smurawski/chef,Igorshp/chef,sideci-sample/sideci-sample-chef,MsysTechnologiesllc/chef,oclaussen/chef,natewalck/chef,pburkholder/chef,mikefaille/chef,gsaslis/chef,adamleff/chef,jmhardison/chef,nsdavidson/chef,clintoncwolfe/chef,clintoncwolfe/chef,jkerry/chef,jonlives/chef,mikedodge04/chef,tomdoherty/chef,martinb3/chef,danielsdeleo/seth,Ppjet6/chef,MichaelPereira/chef,sanditiffin/chef,Ppjet6/chef,h4ck3rm1k3/chef,permyakovsv/chef,nalingarg2/chef-1,faspl/chef,nvwls/chef,strangelittlemonkey/chef,ckaushik/chef,evan2645/chef,bahamas10/chef,grubernaut/chef,bahamas10/chef,jonlives/chef,BackSlasher/chef,erkolson/chef,nvwls/chef,davestarling/chef,tomdoherty/chef,jagdeesh109/chef,3dinfluence/chef,webframp/chef,Ppjet6/chef,mal/chef,BackSlasher/chef,permyakovsv/chef,danielsdeleo/seth,AndyBoucher/Chef-Testing,jordane/chef,swalberg/chef,aspiers/chef,OpSitters/chef,ekometti/chef,danielsdeleo/seth,sysbot/chef,permyakovsv/chef,mattray/chef,polamjag/chef,criteo-forks/chef,evan2645/chef,jblaine/chef,mikefaille/chef,EasonYi/chef,onlyhavecans/chef,paulmooring/chef,lamont-granquist/chef,smurawski/chef,martinisoft/chef,b002368/chef-repo,smurawski/chef,swalberg/chef,nicklv/chef,nathwill/chef,tbriggs-curse/chef,criteo-forks/chef,h4ck3rm1k3/chef,legal90/chef,ktpan/chef-play,ChaosCloud/chef,zuazo-forks/chef,OpSitters/chef,cmluciano/chef,someara/chef,chef/chef,BackSlasher/chef,malisettirammurthy/chef,docwhat/chef,sempervictus/chef,danielsdeleo/seth,adamleff/chef,h4ck3rm1k3/chef,nguyen-tien-mulodo/chef,Igorshp/chef,swalberg/chef,malisettirammurthy/chef,OpSitters/chef,danielsdeleo/seth,mal/chef,ccsplit/chef,ccope/chef,ranjib/chef,aaron-lane/chef,gene1wood/chef,strangelittlemonkey/chef,jordane/chef,sempervictus/chef,skmichaelson/chef,ducthanh/chef,gsaslis/chef,MsysTechnologiesllc/chef,paulmooring/chef,strangelittlemonkey/chef,malisettirammurthy/chef,jblaine/chef,sideci-sample/sideci-sample-chef,hfichter/chef,onlyhavecans/chef,robmul/chef,criteo-forks/chef,hfichter/chef,aaron-lane/chef,clintoncwolfe/chef,evan2645/chef,jk47/chef,youngjl1/chef,andrewpsp/chef,mio-g/chef,h4ck3rm1k3/chef,sometimesfood/chef,ShadySQL/chef-merged,gene1wood/chef,AndyBoucher/Chef-Testing,legal90/chef,ckaushik/chef,paulmooring/chef,gsaslis/chef,Tensibai/chef,someara/chef,mio-g/chef,sekrett/chef,nicklv/chef,faspl/chef,mio-g/chef,coderanger/chef,nsdavidson/chef,karthikrev/chef,webframp/chef,jordane/chef,jk47/chef,ChaosCloud/chef,circleback/chef,webframp/chef,oclaussen/chef,adamleff/chef,ckaushik/chef,circleback/chef,nvwls/chef,h4ck3rm1k3/chef,jblaine/chef,DeWaRs1206/chef,baberthal/chef,tas50/chef-1,nsdavidson/chef,ktpan/chef-play,tbunnyman/chef,cmluciano/chef,nicklv/chef,juliandunn/chef,kisoku/chef,jk47/chef,ccope/chef,acaiafa/chef,higanworks/chef,jordane/chef,aspiers/chef,nvwls/chef,webframp/chef,joyent/chef,josb/chef,jagdeesh109/chef,nguyen-tien-mulodo/chef,clintoncwolfe/chef,brettcave/chef,joyent/chef,sysbot/chef,patcon/chef,robmul/chef,andrewpsp/chef,grubernaut/chef,askl56/chef,cmluciano/chef,docwhat/chef,ktpan/chef-play,ranjib/chef,b002368/chef-repo,sempervictus/chef,permyakovsv/chef,hfichter/chef,DeWaRs1206/chef,mal/chef,OpSitters/chef,nathwill/chef,martinisoft/chef,smurawski/chef,mikefaille/chef,nicklv/chef,faspl/chef,joemiller/chef,askl56/chef,antonifs/chef,pburkholder/chef,Kast0rTr0y/chef,mikefaille/chef,MichaelPereira/chef,tas50/chef-1,renanvicente/chef,EasonYi/chef,jk47/chef,kisoku/chef,tomdoherty/chef,erkolson/chef,lamont-granquist/chef,kisoku/chef,joemiller/chef,kaznishi/chef,MichaelPereira/chef,jaymzh/chef,DeWaRs1206/chef,mio-g/chef,b002368/chef-repo,cgvarela/chef,mwrock/chef,SUSE-Cloud/chef,robmul/chef,mwrock/chef,mikefaille/chef,clintoncwolfe/chef,b002368/chef-repo,robmul/chef,davestarling/chef,brettcave/chef,jimmymccrory/chef,lamont-granquist/chef,GabKlein/chef-merged,adamleff/chef,karthikrev/chef,jaymzh/chef,clintoncwolfe/chef,ckaushik/chef,natewalck/chef,martinb3/chef,mattray/chef,nathwill/chef,criteo-forks/chef,robmul/chef,docwhat/chef,davestarling/chef,juliandunn/chef,cachamber/chef,Kast0rTr0y/chef,aspiers/chef,zshuo/chef,onlyhavecans/chef,martinisoft/chef,tbunnyman/chef,jblaine/chef,cachamber/chef,tas50/chef-1,MsysTechnologiesllc/chef,jagdeesh109/chef,jkerry/chef,GabKlein/chef-merged,ekometti/chef,renanvicente/chef,polamjag/chef,martinb3/chef,zshuo/chef,opsengine/chef,malisettirammurthy/chef,ShadySQL/chef-merged,faspl/chef,skmichaelson/chef,evan2645/chef,joemiller/chef,kamaradclimber/chef,andrewpsp/chef,erkolson/chef,custora/chef,jagdeesh109/chef,Ppjet6/chef,ranjib/chef,renanvicente/chef,sysbot/chef,patcon/chef,sysbot/chef,oclaussen/chef,coderanger/chef,zuazo-forks/chef,3dinfluence/chef,MichaelPereira/chef,ccsplit/chef,Igorshp/chef,baberthal/chef,sanditiffin/chef,jhulten/chef,mikedodge04/chef,joemiller/chef,jk47/chef,ranjib/chef,higanworks/chef,davestarling/chef,robmul/chef,martinb3/chef,swalberg/chef,grubernaut/chef,BackSlasher/chef,ktpan/chef-play,joyent/chef,Kast0rTr0y/chef,antonifs/chef,higanworks/chef,aaron-lane/chef,natewalck/chef,aaron-lane/chef,jaymzh/chef,zuazo-forks/chef,zshuo/chef,jmhardison/chef,tbunnyman/chef,natewalck/chef,Tensibai/chef,pburkholder/chef,gsaslis/chef,DeWaRs1206/chef,patcon/chef,mwrock/chef,SUSE-Cloud/chef,grubernaut/chef,karthikrev/chef,sometimesfood/chef,ktpan/chef-play,kisoku/chef,ranjib/chef,jonlives/chef,baberthal/chef,jimmymccrory/chef,coderanger/chef,cachamber/chef,docwhat/chef,askl56/chef,bahamas10/chef,skmichaelson/chef,cgvarela/chef,GabKlein/chef-merged,erkolson/chef,jmhardison/chef,skmichaelson/chef,legal90/chef,kisoku/chef,paulmooring/chef,ducthanh/chef,nicklv/chef,SUSE-Cloud/chef,h4ck3rm1k3/chef,zshuo/chef,hfichter/chef,renanvicente/chef,jmhardison/chef,BackSlasher/chef,joyent/chef,ekometti/chef,grubernaut/chef,coderanger/chef,tbunnyman/chef,hfichter/chef,someara/chef,kaznishi/chef,renanvicente/chef,tomdoherty/chef,strangelittlemonkey/chef,jkerry/chef,docwhat/chef,SUSE-Cloud/chef,askl56/chef,pburkholder/chef,ChaosCloud/chef,jblaine/chef,aaron-lane/chef,webframp/chef,baberthal/chef,andrewpsp/chef,jkerry/chef,youngjl1/chef,custora/chef,DeWaRs1206/chef,evan2645/chef,kaznishi/chef,opsengine/chef,cgvarela/chef,mattray/chef,cgvarela/chef,nalingarg2/chef-1,cachamber/chef,swalberg/chef,higanworks/chef,onlyhavecans/chef,martinb3/chef,pburkholder/chef,kamaradclimber/chef,chef/chef,Ppjet6/chef,Ppjet6/chef,karthikrev/chef,3dinfluence/chef,BackSlasher/chef,skmichaelson/chef,erkolson/chef,EasonYi/chef,OpSitters/chef,sanditiffin/chef,ChaosCloud/chef,zuazo-forks/chef,higanworks/chef,jk47/chef,cgvarela/chef,renanvicente/chef,erkolson/chef,nguyen-tien-mulodo/chef,nathwill/chef,MichaelPereira/chef,ktpan/chef-play,zuazo-forks/chef,SUSE-Cloud/chef,josb/chef,ShadySQL/chef-merged,gene1wood/chef,AndyBoucher/Chef-Testing,ekometti/chef,brettcave/chef,strangelittlemonkey/chef,sometimesfood/chef,opsengine/chef,someara/chef,circleback/chef,GabKlein/chef-merged,mal/chef,jagdeesh109/chef,Tensibai/chef,sysbot/chef,mikefaille/chef,cachamber/chef,brettcave/chef,paulmooring/chef,lamont-granquist/chef,custora/chef,adamleff/chef,3dinfluence/chef,gene1wood/chef,ccsplit/chef,mwrock/chef,cachamber/chef,aspiers/chef,mal/chef,ChaosCloud/chef,Igorshp/chef,jimmymccrory/chef,sideci-sample/sideci-sample-chef,youngjl1/chef,martinisoft/chef,sanditiffin/chef,sempervictus/chef,juliandunn/chef,EasonYi/chef,jkerry/chef,ccope/chef,3dinfluence/chef,nathwill/chef,polamjag/chef,karthikrev/chef,Kast0rTr0y/chef,natewalck/chef,sekrett/chef,tbunnyman/chef,polamjag/chef,joyent/chef,oclaussen/chef,paulmooring/chef,andrewpsp/chef,joemiller/chef,nalingarg2/chef-1,bahamas10/chef,legal90/chef,custora/chef,acaiafa/chef,ckaushik/chef,nsdavidson/chef,natewalck/chef,tbriggs-curse/chef,ducthanh/chef,smurawski/chef,jaymzh/chef,jhulten/chef,nsdavidson/chef,nguyen-tien-mulodo/chef,sekrett/chef,tomdoherty/chef,kamaradclimber/chef,3dinfluence/chef,faspl/chef,Igorshp/chef,grubernaut/chef,AndyBoucher/Chef-Testing,youngjl1/chef,nalingarg2/chef-1,zuazo-forks/chef,nguyen-tien-mulodo/chef,mikedodge04/chef,mattray/chef,jmhardison/chef,Tensibai/chef,ekometti/chef,pburkholder/chef,bahamas10/chef,mikedodge04/chef,patcon/chef,gsaslis/chef,polamjag/chef,aspiers/chef,b002368/chef-repo,sometimesfood/chef,permyakovsv/chef,ShadySQL/chef-merged,DeWaRs1206/chef,nellshamrell/chef,nellshamrell/chef,sekrett/chef,ccope/chef,docwhat/chef,opsengine/chef,karthikrev/chef,nellshamrell/chef,kaznishi/chef,tbriggs-curse/chef,kaznishi/chef,jkerry/chef,someara/chef,baberthal/chef,skmichaelson/chef,MichaelPereira/chef,chef/chef,criteo-forks/chef,nvwls/chef,swalberg/chef,acaiafa/chef,ranjib/chef,faspl/chef,cmluciano/chef,Igorshp/chef,zshuo/chef,malisettirammurthy/chef,sekrett/chef,sometimesfood/chef,Tensibai/chef,josb/chef,nellshamrell/chef,tas50/chef-1,tbunnyman/chef,antonifs/chef,nellshamrell/chef,OpSitters/chef,ekometti/chef,oclaussen/chef,EasonYi/chef,jimmymccrory/chef,AndyBoucher/Chef-Testing,jhulten/chef,smurawski/chef,davestarling/chef,cmluciano/chef,jmhardison/chef,circleback/chef,mal/chef,Kast0rTr0y/chef,patcon/chef,evan2645/chef,ducthanh/chef,askl56/chef,juliandunn/chef,jonlives/chef,youngjl1/chef,antonifs/chef,tbriggs-curse/chef,adamleff/chef,joemiller/chef,gsaslis/chef,nalingarg2/chef-1,youngjl1/chef,jblaine/chef,nalingarg2/chef-1,jonlives/chef,criteo-forks/chef,mio-g/chef,malisettirammurthy/chef,tbriggs-curse/chef,ducthanh/chef,permyakovsv/chef,custora/chef,josb/chef,someara/chef,baberthal/chef,ccope/chef,zshuo/chef,nicklv/chef,martinisoft/chef,juliandunn/chef,lamont-granquist/chef,MsysTechnologiesllc/chef,nvwls/chef,antonifs/chef,nathwill/chef,lamont-granquist/chef,ChaosCloud/chef,sanditiffin/chef,oclaussen/chef,patcon/chef,brettcave/chef,nguyen-tien-mulodo/chef,opsengine/chef,ccsplit/chef,AndyBoucher/Chef-Testing,mikedodge04/chef,Kast0rTr0y/chef,legal90/chef,jonlives/chef,ccsplit/chef,martinb3/chef,sempervictus/chef,brettcave/chef,josb/chef,b002368/chef-repo,jimmymccrory/chef,webframp/chef,jagdeesh109/chef,polamjag/chef,ccsplit/chef,sideci-sample/sideci-sample-chef,ckaushik/chef | ruby | ## Code Before:
class Chef
class RunList
class VersionedRecipeList < Array
def initialize
super
@versions = Hash.new
end
def add_recipe(name, version=nil)
if version && @versions.has_key?(name)
unless Gem::Version.new(@versions[name]) == Gem::Version.new(version)
raise Chef::Exceptions::RecipeVersionConflict, "Run list requires recipe #{name} at versions #{@versions[name]} and #{version}"
end
end
@versions[name] = version if version
self << name unless self.include?(name)
end
def with_versions
self.map {|i| {:name => i, :version => @versions[i]}}
end
end
end
end
## Instruction:
Use Chef::Version in VersionedRecipeList CHEF-1818
## Code After:
require 'chef/version_class'
class Chef
class RunList
class VersionedRecipeList < Array
def initialize
super
@versions = Hash.new
end
def add_recipe(name, version=nil)
if version && @versions.has_key?(name)
unless Chef::Version.new(@versions[name]) == Chef::Version.new(version)
raise Chef::Exceptions::RecipeVersionConflict, "Run list requires recipe #{name} at versions #{@versions[name]} and #{version}"
end
end
@versions[name] = version if version
self << name unless self.include?(name)
end
def with_versions
self.map {|i| {:name => i, :version => @versions[i]}}
end
end
end
end
| + require 'chef/version_class'
class Chef
class RunList
class VersionedRecipeList < Array
def initialize
super
@versions = Hash.new
end
def add_recipe(name, version=nil)
if version && @versions.has_key?(name)
- unless Gem::Version.new(@versions[name]) == Gem::Version.new(version)
? ^ ^ ^ ^
+ unless Chef::Version.new(@versions[name]) == Chef::Version.new(version)
? ^^ ^ ^^ ^
raise Chef::Exceptions::RecipeVersionConflict, "Run list requires recipe #{name} at versions #{@versions[name]} and #{version}"
end
end
@versions[name] = version if version
self << name unless self.include?(name)
end
def with_versions
self.map {|i| {:name => i, :version => @versions[i]}}
end
end
end
end | 3 | 0.115385 | 2 | 1 |
ed2f947f2083175ca5ab15cead874917ec61362d | test-common/src/test/java/com/gentics/mesh/test/docker/MeshDockerServerTest.java | test-common/src/test/java/com/gentics/mesh/test/docker/MeshDockerServerTest.java | package com.gentics.mesh.test.docker;
import static com.gentics.mesh.test.ClientHelper.call;
import static org.junit.Assert.assertEquals;
import org.junit.ClassRule;
import org.junit.Test;
import com.gentics.mesh.core.rest.user.UserListResponse;
import io.vertx.core.Vertx;
public class MeshDockerServerTest {
@ClassRule
public static MeshDockerServer server = new MeshDockerServer("gentics/mesh:0.10.0", "dummy", true, Vertx.vertx(), null, null);
@Test
public void testDockerImage() {
UserListResponse response = call(() -> server.getMeshClient().findUsers());
assertEquals(2, response.getData().size());
}
}
| package com.gentics.mesh.test.docker;
import static com.gentics.mesh.test.ClientHelper.call;
import static org.junit.Assert.assertEquals;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
import com.gentics.mesh.core.rest.user.UserListResponse;
import io.vertx.core.Vertx;
@Ignore
public class MeshDockerServerTest {
@ClassRule
public static MeshDockerServer server = new MeshDockerServer("gentics/mesh:0.10.0", "dummy", true, Vertx.vertx(), null, null);
@Test
public void testDockerImage() {
UserListResponse response = call(() -> server.getMeshClient().findUsers());
assertEquals(2, response.getData().size());
}
}
| Disable test which is not yet working on CI | Disable test which is not yet working on CI
| Java | apache-2.0 | gentics/mesh,gentics/mesh,gentics/mesh,gentics/mesh | java | ## Code Before:
package com.gentics.mesh.test.docker;
import static com.gentics.mesh.test.ClientHelper.call;
import static org.junit.Assert.assertEquals;
import org.junit.ClassRule;
import org.junit.Test;
import com.gentics.mesh.core.rest.user.UserListResponse;
import io.vertx.core.Vertx;
public class MeshDockerServerTest {
@ClassRule
public static MeshDockerServer server = new MeshDockerServer("gentics/mesh:0.10.0", "dummy", true, Vertx.vertx(), null, null);
@Test
public void testDockerImage() {
UserListResponse response = call(() -> server.getMeshClient().findUsers());
assertEquals(2, response.getData().size());
}
}
## Instruction:
Disable test which is not yet working on CI
## Code After:
package com.gentics.mesh.test.docker;
import static com.gentics.mesh.test.ClientHelper.call;
import static org.junit.Assert.assertEquals;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
import com.gentics.mesh.core.rest.user.UserListResponse;
import io.vertx.core.Vertx;
@Ignore
public class MeshDockerServerTest {
@ClassRule
public static MeshDockerServer server = new MeshDockerServer("gentics/mesh:0.10.0", "dummy", true, Vertx.vertx(), null, null);
@Test
public void testDockerImage() {
UserListResponse response = call(() -> server.getMeshClient().findUsers());
assertEquals(2, response.getData().size());
}
}
| package com.gentics.mesh.test.docker;
import static com.gentics.mesh.test.ClientHelper.call;
import static org.junit.Assert.assertEquals;
import org.junit.ClassRule;
+ import org.junit.Ignore;
import org.junit.Test;
import com.gentics.mesh.core.rest.user.UserListResponse;
import io.vertx.core.Vertx;
+ @Ignore
public class MeshDockerServerTest {
@ClassRule
public static MeshDockerServer server = new MeshDockerServer("gentics/mesh:0.10.0", "dummy", true, Vertx.vertx(), null, null);
@Test
public void testDockerImage() {
UserListResponse response = call(() -> server.getMeshClient().findUsers());
assertEquals(2, response.getData().size());
}
} | 2 | 0.083333 | 2 | 0 |
d4fe081f823b6d9096f716135fcacd4a3237cc77 | tfhub_dev/assets/silero/collections/silero-stt/1.md | tfhub_dev/assets/silero/collections/silero-stt/1.md | A set of compact enterprise-grade pre-trained STT Models for multiple languages in different formats.
<!-- module-type: audio-stt -->
## Overview
Silero Speech-To-Text models provide enterprise grade STT in a compact form-factor for several commonly spoken languages. Unlike conventional ASR models our models are robust to a variety of dialects, codecs, domains, noises, lower sampling rates (for simplicity audio should be resampled to 16 kHz). The models consume a normalized audio in the form of samples (i.e. without any pre-processing except for normalization to -1 … 1) and output frames with token probabilities. We provide a decoder utility for simplicity (we could include it into our model itself, but it is hard to do with ONNX for example).
We hope that our efforts with Open-STT and Silero Models will bring the ImageNet moment in speech closer.
## Modules
| |
|----------------------------------------------------------------|
| [silero/silero-stt/en](https://tfhub.dev/silero/silero-stt/en) |
|----------------------------------------------------------------| | A set of compact enterprise-grade pre-trained STT Models for multiple languages in different formats.
<!-- module-type: audio-stt -->
## Overview
Silero Speech-To-Text models provide enterprise grade STT in a compact form-factor for several commonly spoken languages. Unlike conventional ASR models our models are robust to a variety of dialects, codecs, domains, noises, lower sampling rates (for simplicity audio should be resampled to 16 kHz). The models consume a normalized audio in the form of samples (i.e. without any pre-processing except for normalization to -1 … 1) and output frames with token probabilities. We provide a decoder utility for simplicity (we could include it into our model itself, but it is hard to do with ONNX for example).
We hope that our efforts with Open-STT and Silero Models will bring the ImageNet moment in speech closer.
## Modules
| |
|----------------------------------------------------------------|
| [silero/silero-stt/en](https://tfhub.dev/silero/silero-stt/en) | | Improve rendering of the silero-stt collection table. | Improve rendering of the silero-stt collection table.
PiperOrigin-RevId: 335374429
| Markdown | apache-2.0 | tensorflow/hub,tensorflow/hub | markdown | ## Code Before:
A set of compact enterprise-grade pre-trained STT Models for multiple languages in different formats.
<!-- module-type: audio-stt -->
## Overview
Silero Speech-To-Text models provide enterprise grade STT in a compact form-factor for several commonly spoken languages. Unlike conventional ASR models our models are robust to a variety of dialects, codecs, domains, noises, lower sampling rates (for simplicity audio should be resampled to 16 kHz). The models consume a normalized audio in the form of samples (i.e. without any pre-processing except for normalization to -1 … 1) and output frames with token probabilities. We provide a decoder utility for simplicity (we could include it into our model itself, but it is hard to do with ONNX for example).
We hope that our efforts with Open-STT and Silero Models will bring the ImageNet moment in speech closer.
## Modules
| |
|----------------------------------------------------------------|
| [silero/silero-stt/en](https://tfhub.dev/silero/silero-stt/en) |
|----------------------------------------------------------------|
## Instruction:
Improve rendering of the silero-stt collection table.
PiperOrigin-RevId: 335374429
## Code After:
A set of compact enterprise-grade pre-trained STT Models for multiple languages in different formats.
<!-- module-type: audio-stt -->
## Overview
Silero Speech-To-Text models provide enterprise grade STT in a compact form-factor for several commonly spoken languages. Unlike conventional ASR models our models are robust to a variety of dialects, codecs, domains, noises, lower sampling rates (for simplicity audio should be resampled to 16 kHz). The models consume a normalized audio in the form of samples (i.e. without any pre-processing except for normalization to -1 … 1) and output frames with token probabilities. We provide a decoder utility for simplicity (we could include it into our model itself, but it is hard to do with ONNX for example).
We hope that our efforts with Open-STT and Silero Models will bring the ImageNet moment in speech closer.
## Modules
| |
|----------------------------------------------------------------|
| [silero/silero-stt/en](https://tfhub.dev/silero/silero-stt/en) | | A set of compact enterprise-grade pre-trained STT Models for multiple languages in different formats.
<!-- module-type: audio-stt -->
## Overview
Silero Speech-To-Text models provide enterprise grade STT in a compact form-factor for several commonly spoken languages. Unlike conventional ASR models our models are robust to a variety of dialects, codecs, domains, noises, lower sampling rates (for simplicity audio should be resampled to 16 kHz). The models consume a normalized audio in the form of samples (i.e. without any pre-processing except for normalization to -1 … 1) and output frames with token probabilities. We provide a decoder utility for simplicity (we could include it into our model itself, but it is hard to do with ONNX for example).
We hope that our efforts with Open-STT and Silero Models will bring the ImageNet moment in speech closer.
## Modules
| |
|----------------------------------------------------------------|
| [silero/silero-stt/en](https://tfhub.dev/silero/silero-stt/en) |
- |----------------------------------------------------------------| | 1 | 0.0625 | 0 | 1 |
000e4aa22fda2fac788196434baf8638d0df0dec | test/fixtures/generic-qunit.js | test/fixtures/generic-qunit.js | /* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);
return lints;
}
QUnit.test(window.location.pathname, function (assert) {
expect(1);
var lints = Array.prototype.slice.call(document.querySelectorAll('#bootlint>li'));
var expectedLintMsgs = lints.map(function (item) {
return item.dataset.lint;
});
var actualLintMsgs = lintCurrentDoc();
assert.deepEqual(actualLintMsgs, expectedLintMsgs);
});
})();
| /* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);
return lints;
}
QUnit.test(window.location.pathname, function (assert) {
// Remove checkboxes QUnit dynamically adds to the DOM as part of its UI
// because these checkboxes may not comply with some Bootlint checks.
$('#qunit-filter-pass, #qunit-urlconfig-noglobals, #qunit-urlconfig-notrycatch').remove();
expect(1);
var lints = Array.prototype.slice.call(document.querySelectorAll('#bootlint>li'));
var expectedLintMsgs = lints.map(function (item) {
return item.dataset.lint;
});
var actualLintMsgs = lintCurrentDoc();
assert.deepEqual(actualLintMsgs, expectedLintMsgs);
});
})();
| Remove QUnit UI's checkboxes from the DOM during tests to prevent false positives | Remove QUnit UI's checkboxes from the DOM during tests to prevent false positives
Refs #373
| JavaScript | mit | freezy-sk/bootlint,freezy-sk/bootlint,twbs/bootlint,chrismbarr/bootlint,twbs/bootlint,chrismbarr/bootlint,freezy-sk/bootlint,chrismbarr/bootlint | javascript | ## Code Before:
/* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);
return lints;
}
QUnit.test(window.location.pathname, function (assert) {
expect(1);
var lints = Array.prototype.slice.call(document.querySelectorAll('#bootlint>li'));
var expectedLintMsgs = lints.map(function (item) {
return item.dataset.lint;
});
var actualLintMsgs = lintCurrentDoc();
assert.deepEqual(actualLintMsgs, expectedLintMsgs);
});
})();
## Instruction:
Remove QUnit UI's checkboxes from the DOM during tests to prevent false positives
Refs #373
## Code After:
/* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);
return lints;
}
QUnit.test(window.location.pathname, function (assert) {
// Remove checkboxes QUnit dynamically adds to the DOM as part of its UI
// because these checkboxes may not comply with some Bootlint checks.
$('#qunit-filter-pass, #qunit-urlconfig-noglobals, #qunit-urlconfig-notrycatch').remove();
expect(1);
var lints = Array.prototype.slice.call(document.querySelectorAll('#bootlint>li'));
var expectedLintMsgs = lints.map(function (item) {
return item.dataset.lint;
});
var actualLintMsgs = lintCurrentDoc();
assert.deepEqual(actualLintMsgs, expectedLintMsgs);
});
})();
| /* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);
return lints;
}
QUnit.test(window.location.pathname, function (assert) {
+ // Remove checkboxes QUnit dynamically adds to the DOM as part of its UI
+ // because these checkboxes may not comply with some Bootlint checks.
+ $('#qunit-filter-pass, #qunit-urlconfig-noglobals, #qunit-urlconfig-notrycatch').remove();
+
expect(1);
var lints = Array.prototype.slice.call(document.querySelectorAll('#bootlint>li'));
var expectedLintMsgs = lints.map(function (item) {
return item.dataset.lint;
});
var actualLintMsgs = lintCurrentDoc();
assert.deepEqual(actualLintMsgs, expectedLintMsgs);
});
})(); | 4 | 0.153846 | 4 | 0 |
dd7711b4261c240f65dc9b56a5daaaa5d8d764ec | Casks/freecad.rb | Casks/freecad.rb | cask 'freecad' do
version '0.16-6705.acfe417'
sha256 '7ddd1dc718b9338bc3581f02f107a80d3dfe3dfe147f7dcd7c5d28af864654f9'
url "https://github.com/FreeCAD/FreeCAD/releases/download/0.16/FreeCAD_#{version}-OSX-x86_64.dmg"
appcast 'https://github.com/FreeCAD/FreeCAD/releases.atom',
checkpoint: 'ac051636765e99376ab15d484b3dd0f938f59f4fa48a627a367a97a44ca5ad86'
name 'FreeCAD'
homepage 'http://www.freecadweb.org'
license :gpl
app 'FreeCAD.app'
end
| cask 'freecad' do
version '0.16-6705.acfe417'
sha256 '7ddd1dc718b9338bc3581f02f107a80d3dfe3dfe147f7dcd7c5d28af864654f9'
# github.com/FreeCAD/FreeCAD was verified as official when first introduced to the cask
url "https://github.com/FreeCAD/FreeCAD/releases/download/0.16/FreeCAD_#{version}-OSX-x86_64.dmg"
appcast 'https://github.com/FreeCAD/FreeCAD/releases.atom',
checkpoint: 'ac051636765e99376ab15d484b3dd0f938f59f4fa48a627a367a97a44ca5ad86'
name 'FreeCAD'
homepage 'http://www.freecadweb.org'
license :gpl
app 'FreeCAD.app'
end
| Fix `url` stanza comment for FreeCAD. | Fix `url` stanza comment for FreeCAD.
| Ruby | bsd-2-clause | danielbayley/homebrew-cask,lukasbestle/homebrew-cask,xyb/homebrew-cask,stephenwade/homebrew-cask,mazehall/homebrew-cask,thii/homebrew-cask,samdoran/homebrew-cask,asins/homebrew-cask,bric3/homebrew-cask,markthetech/homebrew-cask,hovancik/homebrew-cask,xight/homebrew-cask,jellyfishcoder/homebrew-cask,stephenwade/homebrew-cask,deiga/homebrew-cask,rogeriopradoj/homebrew-cask,opsdev-ws/homebrew-cask,robertgzr/homebrew-cask,josa42/homebrew-cask,shoichiaizawa/homebrew-cask,bdhess/homebrew-cask,0xadada/homebrew-cask,kTitan/homebrew-cask,cobyism/homebrew-cask,samnung/homebrew-cask,antogg/homebrew-cask,winkelsdorf/homebrew-cask,asins/homebrew-cask,jacobbednarz/homebrew-cask,lucasmezencio/homebrew-cask,colindunn/homebrew-cask,blainesch/homebrew-cask,Ketouem/homebrew-cask,goxberry/homebrew-cask,klane/homebrew-cask,maxnordlund/homebrew-cask,Keloran/homebrew-cask,yurikoles/homebrew-cask,sscotth/homebrew-cask,ericbn/homebrew-cask,amatos/homebrew-cask,mahori/homebrew-cask,Amorymeltzer/homebrew-cask,arronmabrey/homebrew-cask,wickedsp1d3r/homebrew-cask,mattrobenolt/homebrew-cask,mjgardner/homebrew-cask,joshka/homebrew-cask,pkq/homebrew-cask,wickles/homebrew-cask,diguage/homebrew-cask,singingwolfboy/homebrew-cask,larseggert/homebrew-cask,sgnh/homebrew-cask,mathbunnyru/homebrew-cask,jasmas/homebrew-cask,mlocher/homebrew-cask,jmeridth/homebrew-cask,scribblemaniac/homebrew-cask,muan/homebrew-cask,dictcp/homebrew-cask,stonehippo/homebrew-cask,malob/homebrew-cask,franklouwers/homebrew-cask,shoichiaizawa/homebrew-cask,johndbritton/homebrew-cask,mjgardner/homebrew-cask,vigosan/homebrew-cask,maxnordlund/homebrew-cask,stonehippo/homebrew-cask,cfillion/homebrew-cask,Labutin/homebrew-cask,toonetown/homebrew-cask,kingthorin/homebrew-cask,sscotth/homebrew-cask,n0ts/homebrew-cask,inz/homebrew-cask,inta/homebrew-cask,lifepillar/homebrew-cask,neverfox/homebrew-cask,esebastian/homebrew-cask,paour/homebrew-cask,thehunmonkgroup/homebrew-cask,My2ndAngelic/homebrew-cask,syscrusher/homebrew-cask,mhubig/homebrew-cask,tyage/homebrew-cask,Amorymeltzer/homebrew-cask,jpmat296/homebrew-cask,cfillion/homebrew-cask,sanyer/homebrew-cask,ericbn/homebrew-cask,jiashuw/homebrew-cask,coeligena/homebrew-customized,doits/homebrew-cask,jconley/homebrew-cask,troyxmccall/homebrew-cask,vigosan/homebrew-cask,mchlrmrz/homebrew-cask,sohtsuka/homebrew-cask,shonjir/homebrew-cask,mrmachine/homebrew-cask,winkelsdorf/homebrew-cask,jgarber623/homebrew-cask,andyli/homebrew-cask,timsutton/homebrew-cask,optikfluffel/homebrew-cask,FinalDes/homebrew-cask,kassi/homebrew-cask,yuhki50/homebrew-cask,haha1903/homebrew-cask,winkelsdorf/homebrew-cask,nrlquaker/homebrew-cask,exherb/homebrew-cask,alexg0/homebrew-cask,blogabe/homebrew-cask,Ngrd/homebrew-cask,aguynamedryan/homebrew-cask,alebcay/homebrew-cask,giannitm/homebrew-cask,josa42/homebrew-cask,claui/homebrew-cask,lantrix/homebrew-cask,muan/homebrew-cask,boecko/homebrew-cask,bric3/homebrew-cask,ebraminio/homebrew-cask,decrement/homebrew-cask,shorshe/homebrew-cask,13k/homebrew-cask,hristozov/homebrew-cask,JacopKane/homebrew-cask,xyb/homebrew-cask,slack4u/homebrew-cask,lantrix/homebrew-cask,morganestes/homebrew-cask,sanyer/homebrew-cask,kpearson/homebrew-cask,jiashuw/homebrew-cask,hyuna917/homebrew-cask,forevergenin/homebrew-cask,n0ts/homebrew-cask,thii/homebrew-cask,exherb/homebrew-cask,bric3/homebrew-cask,janlugt/homebrew-cask,moogar0880/homebrew-cask,mishari/homebrew-cask,y00rb/homebrew-cask,jbeagley52/homebrew-cask,stonehippo/homebrew-cask,sohtsuka/homebrew-cask,hanxue/caskroom,xtian/homebrew-cask,devmynd/homebrew-cask,lucasmezencio/homebrew-cask,reitermarkus/homebrew-cask,MircoT/homebrew-cask,wmorin/homebrew-cask,lifepillar/homebrew-cask,chadcatlett/caskroom-homebrew-cask,chuanxd/homebrew-cask,michelegera/homebrew-cask,colindean/homebrew-cask,blogabe/homebrew-cask,colindunn/homebrew-cask,scottsuch/homebrew-cask,kongslund/homebrew-cask,rajiv/homebrew-cask,giannitm/homebrew-cask,jalaziz/homebrew-cask,ninjahoahong/homebrew-cask,patresi/homebrew-cask,m3nu/homebrew-cask,athrunsun/homebrew-cask,chrisfinazzo/homebrew-cask,robertgzr/homebrew-cask,renaudguerin/homebrew-cask,MoOx/homebrew-cask,skatsuta/homebrew-cask,wKovacs64/homebrew-cask,gerrypower/homebrew-cask,jawshooah/homebrew-cask,kamilboratynski/homebrew-cask,Labutin/homebrew-cask,tjt263/homebrew-cask,hakamadare/homebrew-cask,morganestes/homebrew-cask,cliffcotino/homebrew-cask,puffdad/homebrew-cask,okket/homebrew-cask,JacopKane/homebrew-cask,jalaziz/homebrew-cask,caskroom/homebrew-cask,janlugt/homebrew-cask,wKovacs64/homebrew-cask,scribblemaniac/homebrew-cask,mikem/homebrew-cask,a1russell/homebrew-cask,cprecioso/homebrew-cask,wmorin/homebrew-cask,ianyh/homebrew-cask,a1russell/homebrew-cask,hristozov/homebrew-cask,deanmorin/homebrew-cask,mauricerkelly/homebrew-cask,gyndav/homebrew-cask,pkq/homebrew-cask,danielbayley/homebrew-cask,reelsense/homebrew-cask,doits/homebrew-cask,joshka/homebrew-cask,victorpopkov/homebrew-cask,reitermarkus/homebrew-cask,franklouwers/homebrew-cask,ninjahoahong/homebrew-cask,JikkuJose/homebrew-cask,kkdd/homebrew-cask,nathancahill/homebrew-cask,gmkey/homebrew-cask,xight/homebrew-cask,lukasbestle/homebrew-cask,Saklad5/homebrew-cask,dvdoliveira/homebrew-cask,mchlrmrz/homebrew-cask,coeligena/homebrew-customized,SentinelWarren/homebrew-cask,pkq/homebrew-cask,jedahan/homebrew-cask,jangalinski/homebrew-cask,lumaxis/homebrew-cask,xyb/homebrew-cask,perfide/homebrew-cask,joschi/homebrew-cask,caskroom/homebrew-cask,tangestani/homebrew-cask,psibre/homebrew-cask,johnjelinek/homebrew-cask,claui/homebrew-cask,yutarody/homebrew-cask,andrewdisley/homebrew-cask,gyndav/homebrew-cask,tjnycum/homebrew-cask,mhubig/homebrew-cask,rajiv/homebrew-cask,claui/homebrew-cask,wmorin/homebrew-cask,scribblemaniac/homebrew-cask,MichaelPei/homebrew-cask,elyscape/homebrew-cask,jeroenj/homebrew-cask,mrmachine/homebrew-cask,ebraminio/homebrew-cask,RJHsiao/homebrew-cask,xtian/homebrew-cask,uetchy/homebrew-cask,kingthorin/homebrew-cask,okket/homebrew-cask,esebastian/homebrew-cask,jaredsampson/homebrew-cask,nrlquaker/homebrew-cask,riyad/homebrew-cask,FredLackeyOfficial/homebrew-cask,gilesdring/homebrew-cask,deanmorin/homebrew-cask,chrisfinazzo/homebrew-cask,kkdd/homebrew-cask,shonjir/homebrew-cask,Cottser/homebrew-cask,jellyfishcoder/homebrew-cask,andyli/homebrew-cask,JikkuJose/homebrew-cask,koenrh/homebrew-cask,timsutton/homebrew-cask,samnung/homebrew-cask,miccal/homebrew-cask,pacav69/homebrew-cask,elyscape/homebrew-cask,moimikey/homebrew-cask,dictcp/homebrew-cask,tedski/homebrew-cask,mikem/homebrew-cask,reelsense/homebrew-cask,adrianchia/homebrew-cask,xcezx/homebrew-cask,y00rb/homebrew-cask,blainesch/homebrew-cask,johnjelinek/homebrew-cask,mahori/homebrew-cask,jangalinski/homebrew-cask,0rax/homebrew-cask,Amorymeltzer/homebrew-cask,tangestani/homebrew-cask,julionc/homebrew-cask,sebcode/homebrew-cask,puffdad/homebrew-cask,arronmabrey/homebrew-cask,yuhki50/homebrew-cask,mlocher/homebrew-cask,inz/homebrew-cask,skatsuta/homebrew-cask,sanchezm/homebrew-cask,kesara/homebrew-cask,sjackman/homebrew-cask,malob/homebrew-cask,goxberry/homebrew-cask,dcondrey/homebrew-cask,diguage/homebrew-cask,gabrielizaias/homebrew-cask,flaviocamilo/homebrew-cask,optikfluffel/homebrew-cask,malford/homebrew-cask,leipert/homebrew-cask,Ephemera/homebrew-cask,wastrachan/homebrew-cask,imgarylai/homebrew-cask,tjnycum/homebrew-cask,joschi/homebrew-cask,antogg/homebrew-cask,ksylvan/homebrew-cask,usami-k/homebrew-cask,onlynone/homebrew-cask,AnastasiaSulyagina/homebrew-cask,jawshooah/homebrew-cask,vitorgalvao/homebrew-cask,joshka/homebrew-cask,johndbritton/homebrew-cask,jeroenj/homebrew-cask,BenjaminHCCarr/homebrew-cask,MircoT/homebrew-cask,kTitan/homebrew-cask,amatos/homebrew-cask,deiga/homebrew-cask,kassi/homebrew-cask,gerrypower/homebrew-cask,scottsuch/homebrew-cask,markthetech/homebrew-cask,0rax/homebrew-cask,sanchezm/homebrew-cask,alebcay/homebrew-cask,ptb/homebrew-cask,guerrero/homebrew-cask,sosedoff/homebrew-cask,sanyer/homebrew-cask,onlynone/homebrew-cask,singingwolfboy/homebrew-cask,MoOx/homebrew-cask,antogg/homebrew-cask,yurikoles/homebrew-cask,RJHsiao/homebrew-cask,jalaziz/homebrew-cask,lumaxis/homebrew-cask,jpmat296/homebrew-cask,AnastasiaSulyagina/homebrew-cask,jedahan/homebrew-cask,a1russell/homebrew-cask,gyndav/homebrew-cask,hellosky806/homebrew-cask,kesara/homebrew-cask,cliffcotino/homebrew-cask,phpwutz/homebrew-cask,seanzxx/homebrew-cask,BenjaminHCCarr/homebrew-cask,pacav69/homebrew-cask,rogeriopradoj/homebrew-cask,renaudguerin/homebrew-cask,alexg0/homebrew-cask,artdevjs/homebrew-cask,kronicd/homebrew-cask,paour/homebrew-cask,paour/homebrew-cask,ptb/homebrew-cask,tjt263/homebrew-cask,cblecker/homebrew-cask,My2ndAngelic/homebrew-cask,artdevjs/homebrew-cask,kronicd/homebrew-cask,vin047/homebrew-cask,koenrh/homebrew-cask,reitermarkus/homebrew-cask,squid314/homebrew-cask,cblecker/homebrew-cask,syscrusher/homebrew-cask,rogeriopradoj/homebrew-cask,bosr/homebrew-cask,shorshe/homebrew-cask,miccal/homebrew-cask,adrianchia/homebrew-cask,andrewdisley/homebrew-cask,cblecker/homebrew-cask,gabrielizaias/homebrew-cask,bosr/homebrew-cask,KosherBacon/homebrew-cask,miccal/homebrew-cask,tyage/homebrew-cask,optikfluffel/homebrew-cask,ericbn/homebrew-cask,malob/homebrew-cask,hanxue/caskroom,diogodamiani/homebrew-cask,larseggert/homebrew-cask,mauricerkelly/homebrew-cask,diogodamiani/homebrew-cask,moimikey/homebrew-cask,deiga/homebrew-cask,daften/homebrew-cask,schneidmaster/homebrew-cask,esebastian/homebrew-cask,patresi/homebrew-cask,wickles/homebrew-cask,FinalDes/homebrew-cask,malford/homebrew-cask,dvdoliveira/homebrew-cask,neverfox/homebrew-cask,MichaelPei/homebrew-cask,alebcay/homebrew-cask,coeligena/homebrew-customized,KosherBacon/homebrew-cask,haha1903/homebrew-cask,xcezx/homebrew-cask,nathanielvarona/homebrew-cask,flaviocamilo/homebrew-cask,andrewdisley/homebrew-cask,yurikoles/homebrew-cask,chuanxd/homebrew-cask,yumitsu/homebrew-cask,cobyism/homebrew-cask,perfide/homebrew-cask,m3nu/homebrew-cask,cobyism/homebrew-cask,blogabe/homebrew-cask,uetchy/homebrew-cask,FredLackeyOfficial/homebrew-cask,chrisfinazzo/homebrew-cask,mwean/homebrew-cask,tangestani/homebrew-cask,wastrachan/homebrew-cask,moogar0880/homebrew-cask,chadcatlett/caskroom-homebrew-cask,kpearson/homebrew-cask,schneidmaster/homebrew-cask,toonetown/homebrew-cask,mahori/homebrew-cask,troyxmccall/homebrew-cask,danielbayley/homebrew-cask,victorpopkov/homebrew-cask,riyad/homebrew-cask,JosephViolago/homebrew-cask,JosephViolago/homebrew-cask,psibre/homebrew-cask,hovancik/homebrew-cask,13k/homebrew-cask,sjackman/homebrew-cask,josa42/homebrew-cask,sgnh/homebrew-cask,BenjaminHCCarr/homebrew-cask,jasmas/homebrew-cask,kamilboratynski/homebrew-cask,tedski/homebrew-cask,singingwolfboy/homebrew-cask,m3nu/homebrew-cask,athrunsun/homebrew-cask,samdoran/homebrew-cask,boecko/homebrew-cask,Ephemera/homebrew-cask,ianyh/homebrew-cask,mathbunnyru/homebrew-cask,mishari/homebrew-cask,mazehall/homebrew-cask,nathancahill/homebrew-cask,0xadada/homebrew-cask,mattrobenolt/homebrew-cask,SentinelWarren/homebrew-cask,shoichiaizawa/homebrew-cask,nathanielvarona/homebrew-cask,sosedoff/homebrew-cask,mchlrmrz/homebrew-cask,jaredsampson/homebrew-cask,kongslund/homebrew-cask,nrlquaker/homebrew-cask,seanzxx/homebrew-cask,squid314/homebrew-cask,imgarylai/homebrew-cask,mjgardner/homebrew-cask,neverfox/homebrew-cask,guerrero/homebrew-cask,tjnycum/homebrew-cask,inta/homebrew-cask,yutarody/homebrew-cask,gmkey/homebrew-cask,kesara/homebrew-cask,wickedsp1d3r/homebrew-cask,vin047/homebrew-cask,JacopKane/homebrew-cask,jmeridth/homebrew-cask,Ketouem/homebrew-cask,kingthorin/homebrew-cask,jconley/homebrew-cask,klane/homebrew-cask,JosephViolago/homebrew-cask,mwean/homebrew-cask,cprecioso/homebrew-cask,gilesdring/homebrew-cask,dictcp/homebrew-cask,yumitsu/homebrew-cask,michelegera/homebrew-cask,imgarylai/homebrew-cask,vitorgalvao/homebrew-cask,scottsuch/homebrew-cask,jacobbednarz/homebrew-cask,moimikey/homebrew-cask,sebcode/homebrew-cask,Saklad5/homebrew-cask,ksylvan/homebrew-cask,xight/homebrew-cask,forevergenin/homebrew-cask,hanxue/caskroom,jbeagley52/homebrew-cask,mathbunnyru/homebrew-cask,nshemonsky/homebrew-cask,hellosky806/homebrew-cask,Ephemera/homebrew-cask,mattrobenolt/homebrew-cask,yutarody/homebrew-cask,thehunmonkgroup/homebrew-cask,aguynamedryan/homebrew-cask,nathanielvarona/homebrew-cask,timsutton/homebrew-cask,sscotth/homebrew-cask,julionc/homebrew-cask,colindean/homebrew-cask,joschi/homebrew-cask,Ngrd/homebrew-cask,rajiv/homebrew-cask,nshemonsky/homebrew-cask,shonjir/homebrew-cask,jgarber623/homebrew-cask,dcondrey/homebrew-cask,Keloran/homebrew-cask,alexg0/homebrew-cask,julionc/homebrew-cask,phpwutz/homebrew-cask,Cottser/homebrew-cask,usami-k/homebrew-cask,decrement/homebrew-cask,daften/homebrew-cask,stephenwade/homebrew-cask,uetchy/homebrew-cask,slack4u/homebrew-cask,bdhess/homebrew-cask,opsdev-ws/homebrew-cask,leipert/homebrew-cask,jgarber623/homebrew-cask,adrianchia/homebrew-cask,hyuna917/homebrew-cask,devmynd/homebrew-cask,hakamadare/homebrew-cask | ruby | ## Code Before:
cask 'freecad' do
version '0.16-6705.acfe417'
sha256 '7ddd1dc718b9338bc3581f02f107a80d3dfe3dfe147f7dcd7c5d28af864654f9'
url "https://github.com/FreeCAD/FreeCAD/releases/download/0.16/FreeCAD_#{version}-OSX-x86_64.dmg"
appcast 'https://github.com/FreeCAD/FreeCAD/releases.atom',
checkpoint: 'ac051636765e99376ab15d484b3dd0f938f59f4fa48a627a367a97a44ca5ad86'
name 'FreeCAD'
homepage 'http://www.freecadweb.org'
license :gpl
app 'FreeCAD.app'
end
## Instruction:
Fix `url` stanza comment for FreeCAD.
## Code After:
cask 'freecad' do
version '0.16-6705.acfe417'
sha256 '7ddd1dc718b9338bc3581f02f107a80d3dfe3dfe147f7dcd7c5d28af864654f9'
# github.com/FreeCAD/FreeCAD was verified as official when first introduced to the cask
url "https://github.com/FreeCAD/FreeCAD/releases/download/0.16/FreeCAD_#{version}-OSX-x86_64.dmg"
appcast 'https://github.com/FreeCAD/FreeCAD/releases.atom',
checkpoint: 'ac051636765e99376ab15d484b3dd0f938f59f4fa48a627a367a97a44ca5ad86'
name 'FreeCAD'
homepage 'http://www.freecadweb.org'
license :gpl
app 'FreeCAD.app'
end
| cask 'freecad' do
version '0.16-6705.acfe417'
sha256 '7ddd1dc718b9338bc3581f02f107a80d3dfe3dfe147f7dcd7c5d28af864654f9'
+ # github.com/FreeCAD/FreeCAD was verified as official when first introduced to the cask
url "https://github.com/FreeCAD/FreeCAD/releases/download/0.16/FreeCAD_#{version}-OSX-x86_64.dmg"
appcast 'https://github.com/FreeCAD/FreeCAD/releases.atom',
checkpoint: 'ac051636765e99376ab15d484b3dd0f938f59f4fa48a627a367a97a44ca5ad86'
name 'FreeCAD'
homepage 'http://www.freecadweb.org'
license :gpl
app 'FreeCAD.app'
end | 1 | 0.076923 | 1 | 0 |
5ea972b74f99efe2697b30a94d9d68c1280fce6b | common-core-open/src/main/java/com/bbn/bue/common/OrderingUtils.java | common-core-open/src/main/java/com/bbn/bue/common/OrderingUtils.java | package com.bbn.bue.common;
import com.google.common.base.Function;
import com.google.common.collect.Ordering;
public final class OrderingUtils {
private OrderingUtils() {
throw new UnsupportedOperationException();
}
/**
* Gets a function which maps any iterable to its minimum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such minimum exists for an input, it will throw an
* exception as specified in {@link Ordering#min(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> minFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.min(input);
}
};
}
/**
* Gets a function which maps any iterable to its maximum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such maximum exists for an input, it will throw an
* exception as specified in {@link Ordering#max(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> maxFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.max(input);
}
};
}
/**
* Orders Ts in some domain by their image under F using the onFunctionResultOrdering
*/
public static <T,V> Ordering<T> onResultOf(final Function<T, V> F, final Ordering<V> onFunctionResult) {
return new Ordering<T>() {
@Override
public int compare(final T t, final T t1) {
return onFunctionResult.compare(F.apply(t), F.apply(t1));
}
};
}
}
| package com.bbn.bue.common;
import com.google.common.base.Function;
import com.google.common.collect.Ordering;
public final class OrderingUtils {
private OrderingUtils() {
throw new UnsupportedOperationException();
}
/**
* Gets a function which maps any iterable to its minimum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such minimum exists for an input, it will throw an
* exception as specified in {@link Ordering#min(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> minFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.min(input);
}
};
}
/**
* Gets a function which maps any iterable to its maximum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such maximum exists for an input, it will throw an
* exception as specified in {@link Ordering#max(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> maxFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.max(input);
}
};
}
}
| Revert "add ability to order a domain D by the result of a function F and an Ordering O on the image of F" | Revert "add ability to order a domain D by the result of a function F and an Ordering O on the image of F"
Use guava
This reverts commit d39b479c87eef9ce0f17d45b1885994f1a9f7fa4.
| Java | mit | rgabbard-bbn/bue-common-open,BBN-E/bue-common-open,BBN-E/bue-common-open,rgabbard-bbn/bue-common-open | java | ## Code Before:
package com.bbn.bue.common;
import com.google.common.base.Function;
import com.google.common.collect.Ordering;
public final class OrderingUtils {
private OrderingUtils() {
throw new UnsupportedOperationException();
}
/**
* Gets a function which maps any iterable to its minimum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such minimum exists for an input, it will throw an
* exception as specified in {@link Ordering#min(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> minFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.min(input);
}
};
}
/**
* Gets a function which maps any iterable to its maximum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such maximum exists for an input, it will throw an
* exception as specified in {@link Ordering#max(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> maxFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.max(input);
}
};
}
/**
* Orders Ts in some domain by their image under F using the onFunctionResultOrdering
*/
public static <T,V> Ordering<T> onResultOf(final Function<T, V> F, final Ordering<V> onFunctionResult) {
return new Ordering<T>() {
@Override
public int compare(final T t, final T t1) {
return onFunctionResult.compare(F.apply(t), F.apply(t1));
}
};
}
}
## Instruction:
Revert "add ability to order a domain D by the result of a function F and an Ordering O on the image of F"
Use guava
This reverts commit d39b479c87eef9ce0f17d45b1885994f1a9f7fa4.
## Code After:
package com.bbn.bue.common;
import com.google.common.base.Function;
import com.google.common.collect.Ordering;
public final class OrderingUtils {
private OrderingUtils() {
throw new UnsupportedOperationException();
}
/**
* Gets a function which maps any iterable to its minimum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such minimum exists for an input, it will throw an
* exception as specified in {@link Ordering#min(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> minFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.min(input);
}
};
}
/**
* Gets a function which maps any iterable to its maximum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such maximum exists for an input, it will throw an
* exception as specified in {@link Ordering#max(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> maxFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.max(input);
}
};
}
}
| package com.bbn.bue.common;
import com.google.common.base.Function;
import com.google.common.collect.Ordering;
public final class OrderingUtils {
private OrderingUtils() {
throw new UnsupportedOperationException();
}
/**
* Gets a function which maps any iterable to its minimum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such minimum exists for an input, it will throw an
* exception as specified in {@link Ordering#min(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> minFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.min(input);
}
};
}
/**
* Gets a function which maps any iterable to its maximum according to the supplied {@link
* com.google.common.collect.Ordering}. If no such maximum exists for an input, it will throw an
* exception as specified in {@link Ordering#max(Iterable)}.
*/
public static <T> Function<Iterable<T>, T> maxFunction(final Ordering<T> ordering) {
return new Function<Iterable<T>, T>() {
@Override
public T apply(Iterable<T> input) {
return ordering.max(input);
}
};
}
-
- /**
- * Orders Ts in some domain by their image under F using the onFunctionResultOrdering
- */
- public static <T,V> Ordering<T> onResultOf(final Function<T, V> F, final Ordering<V> onFunctionResult) {
- return new Ordering<T>() {
- @Override
- public int compare(final T t, final T t1) {
- return onFunctionResult.compare(F.apply(t), F.apply(t1));
- }
- };
- }
} | 12 | 0.235294 | 0 | 12 |
db06cc16af9cb0eaa766603f2e56f490041665db | ui/gfx/transform_util_unittest.cc | ui/gfx/transform_util_unittest.cc | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/transform_util.h"
#include "ui/gfx/point.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(TransformUtilTest, GetScaleTransform) {
const gfx::Point kAnchor(20, 40);
const float kScale = 0.5f;
gfx::Transform scale = gfx::GetScaleTransform(kAnchor, kScale);
const int kOffset = 10;
for (int sign_x = -1; sign_x <= 1; ++sign_x) {
for (int sign_y = -1; sign_y <= 1; ++sign_y) {
gfx::Point test(kAnchor.x() + sign_x * kOffset,
kAnchor.y() + sign_y * kOffset);
scale.TransformPoint(test);
EXPECT_EQ(gfx::Point(kAnchor.x() + sign_x * kOffset * kScale,
kAnchor.y() + sign_y * kOffset * kScale),
test);
}
}
}
| // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/transform_util.h"
#include "ui/gfx/point.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gfx {
namespace {
TEST(TransformUtilTest, GetScaleTransform) {
const Point kAnchor(20, 40);
const float kScale = 0.5f;
Transform scale = GetScaleTransform(kAnchor, kScale);
const int kOffset = 10;
for (int sign_x = -1; sign_x <= 1; ++sign_x) {
for (int sign_y = -1; sign_y <= 1; ++sign_y) {
Point test(kAnchor.x() + sign_x * kOffset,
kAnchor.y() + sign_y * kOffset);
scale.TransformPoint(test);
EXPECT_EQ(Point(kAnchor.x() + sign_x * kOffset * kScale,
kAnchor.y() + sign_y * kOffset * kScale),
test);
}
}
}
} // namespace
} // namespace gfx
| Move transform_util unittest into gfx namespace. | ui/gfx: Move transform_util unittest into gfx namespace.
TEST=ui_unittests
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11369173
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@167060 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | pozdnyakov/chromium-crosswalk,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,hujiajie/pa-chromium,dushu1203/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,M4sse/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,Just-D/chromium-1,Just-D/chromium-1,Chilledheart/chromium,hgl888/chromium-crosswalk,hujiajie/pa-chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,ltilve/chromium,nacl-webkit/chrome_deps,patrickm/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,M4sse/chromium.src,Chilledheart/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,anirudhSK/chromium,hujiajie/pa-chromium,dednal/chromium.src,axinging/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,patrickm/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,ondra-novak/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,Just-D/chromium-1,Jonekee/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,littlstar/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,patrickm/chromium.src,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,littlstar/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,markYoungH/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,Just-D/chromium-1,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,dednal/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,hujiajie/pa-chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,jaruba/chromium.src,littlstar/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,ltilve/chromium,ChromiumWebApps/chromium,zcbenz/cefode-chromium,patrickm/chromium.src,ondra-novak/chromium.src | c++ | ## Code Before:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/transform_util.h"
#include "ui/gfx/point.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(TransformUtilTest, GetScaleTransform) {
const gfx::Point kAnchor(20, 40);
const float kScale = 0.5f;
gfx::Transform scale = gfx::GetScaleTransform(kAnchor, kScale);
const int kOffset = 10;
for (int sign_x = -1; sign_x <= 1; ++sign_x) {
for (int sign_y = -1; sign_y <= 1; ++sign_y) {
gfx::Point test(kAnchor.x() + sign_x * kOffset,
kAnchor.y() + sign_y * kOffset);
scale.TransformPoint(test);
EXPECT_EQ(gfx::Point(kAnchor.x() + sign_x * kOffset * kScale,
kAnchor.y() + sign_y * kOffset * kScale),
test);
}
}
}
## Instruction:
ui/gfx: Move transform_util unittest into gfx namespace.
TEST=ui_unittests
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11369173
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@167060 0039d316-1c4b-4281-b951-d872f2087c98
## Code After:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/transform_util.h"
#include "ui/gfx/point.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gfx {
namespace {
TEST(TransformUtilTest, GetScaleTransform) {
const Point kAnchor(20, 40);
const float kScale = 0.5f;
Transform scale = GetScaleTransform(kAnchor, kScale);
const int kOffset = 10;
for (int sign_x = -1; sign_x <= 1; ++sign_x) {
for (int sign_y = -1; sign_y <= 1; ++sign_y) {
Point test(kAnchor.x() + sign_x * kOffset,
kAnchor.y() + sign_y * kOffset);
scale.TransformPoint(test);
EXPECT_EQ(Point(kAnchor.x() + sign_x * kOffset * kScale,
kAnchor.y() + sign_y * kOffset * kScale),
test);
}
}
}
} // namespace
} // namespace gfx
| // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/transform_util.h"
#include "ui/gfx/point.h"
#include "testing/gtest/include/gtest/gtest.h"
+ namespace gfx {
+ namespace {
+
TEST(TransformUtilTest, GetScaleTransform) {
- const gfx::Point kAnchor(20, 40);
? -----
+ const Point kAnchor(20, 40);
const float kScale = 0.5f;
- gfx::Transform scale = gfx::GetScaleTransform(kAnchor, kScale);
? ----- -----
+ Transform scale = GetScaleTransform(kAnchor, kScale);
const int kOffset = 10;
for (int sign_x = -1; sign_x <= 1; ++sign_x) {
for (int sign_y = -1; sign_y <= 1; ++sign_y) {
- gfx::Point test(kAnchor.x() + sign_x * kOffset,
? -----
+ Point test(kAnchor.x() + sign_x * kOffset,
- kAnchor.y() + sign_y * kOffset);
? -----
+ kAnchor.y() + sign_y * kOffset);
scale.TransformPoint(test);
- EXPECT_EQ(gfx::Point(kAnchor.x() + sign_x * kOffset * kScale,
? -----
+ EXPECT_EQ(Point(kAnchor.x() + sign_x * kOffset * kScale,
- kAnchor.y() + sign_y * kOffset * kScale),
? -----
+ kAnchor.y() + sign_y * kOffset * kScale),
test);
}
}
}
+
+ } // namespace
+ } // namespace gfx | 18 | 0.642857 | 12 | 6 |
d4a09ff034c7c7ceda1a38054df98c430361df4b | commons/src/main/java/eu/itesla_project/commons/tools/Tool.java | commons/src/main/java/eu/itesla_project/commons/tools/Tool.java | /**
* Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package eu.itesla_project.commons.tools;
import org.apache.commons.cli.CommandLine;
/**
*
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface Tool {
/**
* Get the command of the tool.
*/
Command getCommand();
/**
* Run the tool.
*
* @param line the command line arguments
* @param context tool execution context
* @throws Exception if the command fails
*/
default void run(CommandLine line, ToolRunningContext context) throws Exception {
}
@Deprecated
default void run(CommandLine line) throws Exception {
run(line, new ToolRunningContext());
}
}
| /**
* Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package eu.itesla_project.commons.tools;
import org.apache.commons.cli.CommandLine;
/**
*
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface Tool {
/**
* Get the command of the tool.
*/
Command getCommand();
/**
* Run the tool.
*
* @param line the command line arguments
* @param context tool execution context
* @throws Exception if the command fails
*/
default void run(CommandLine line, ToolRunningContext context) throws Exception {
run(line);
}
@Deprecated
default void run(CommandLine line) throws Exception {
}
}
| Fix tool bug using old interface | Fix tool bug using old interface
| Java | mpl-2.0 | powsybl/powsybl-core,itesla/ipst-core,powsybl/powsybl-core,itesla/ipst-core,itesla/ipst-core,itesla/ipst-core,powsybl/powsybl-core | java | ## Code Before:
/**
* Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package eu.itesla_project.commons.tools;
import org.apache.commons.cli.CommandLine;
/**
*
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface Tool {
/**
* Get the command of the tool.
*/
Command getCommand();
/**
* Run the tool.
*
* @param line the command line arguments
* @param context tool execution context
* @throws Exception if the command fails
*/
default void run(CommandLine line, ToolRunningContext context) throws Exception {
}
@Deprecated
default void run(CommandLine line) throws Exception {
run(line, new ToolRunningContext());
}
}
## Instruction:
Fix tool bug using old interface
## Code After:
/**
* Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package eu.itesla_project.commons.tools;
import org.apache.commons.cli.CommandLine;
/**
*
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface Tool {
/**
* Get the command of the tool.
*/
Command getCommand();
/**
* Run the tool.
*
* @param line the command line arguments
* @param context tool execution context
* @throws Exception if the command fails
*/
default void run(CommandLine line, ToolRunningContext context) throws Exception {
run(line);
}
@Deprecated
default void run(CommandLine line) throws Exception {
}
}
| /**
* Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package eu.itesla_project.commons.tools;
import org.apache.commons.cli.CommandLine;
/**
*
* @author Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
*/
public interface Tool {
/**
* Get the command of the tool.
*/
Command getCommand();
/**
* Run the tool.
*
* @param line the command line arguments
* @param context tool execution context
* @throws Exception if the command fails
*/
default void run(CommandLine line, ToolRunningContext context) throws Exception {
+ run(line);
}
@Deprecated
default void run(CommandLine line) throws Exception {
- run(line, new ToolRunningContext());
}
} | 2 | 0.054054 | 1 | 1 |
8ffb5238e675814116d3ff177919ba816b0cb005 | .circleci/config.yml | .circleci/config.yml | version: 2
jobs:
gcc_5_python27:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python2.7
command: |
python ./waf configure
python ./waf --check
- run:
name: build with python2.7
command: |
python ./waf build
python ./waf install
gcc_5_python34:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python3.4
command: |
apt update -y
apt install -y python3
python3 ./waf configure
python3 ./waf --check
- run:
name: build with python3.4
command: |
python3 ./waf build
python3 ./waf install
workflows:
version: 2
build_and_test:
jobs:
- gcc_5_python27
- gcc_5_python34
| version: 2
jobs:
gcc5_python27:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python2.7
command: |
python ./waf configure
python ./waf --check
- run:
name: build with python2.7
command: |
python ./waf build
python ./waf install
gcc5_python34:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python3.4
command: |
apt update -y
apt install -y python3
python3 ./waf configure
python3 ./waf --check
- run:
name: build with python3.4
command: |
python3 ./waf build
python3 ./waf install
gcc5_full:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: build msgpack
command: |
wget https://github.com/msgpack/msgpack-c/releases/download/cpp-0.5.9/msgpack-0.5.9.tar.gz
tar zxvf msgpack-0.5.9.tar.gz && cd msgpack-0.5.9
./configure && make && make install
- run:
name: build fcgi
command: |
# apt update -y
# apt install git
# git clone https://github.com/toshic/libfcgi.git
# cd libfcgi && ./configure && make && make install
echo muri
- run:
name: build mysql
command: |
echo 'noop'
- run:
name: build postgresql
command: |
apt update -y
apt install -y postgresql postgresql-server-dev-all
- run:
name: build pficommon
command: |
CPPFLAGS="-I/usr/include/postgresql" ./waf configure --disable-fcgi
./waf build
./waf install
workflows:
version: 2
build_and_test:
jobs:
- gcc5_python27
- gcc5_python34
| Add the job for bulding pficommon with (almost) all extensions | Add the job for bulding pficommon with (almost) all extensions
| YAML | bsd-3-clause | retrieva/pficommon,retrieva/pficommon,retrieva/pficommon,pfi/pficommon,retrieva/pficommon,retrieva/pficommon,pfi/pficommon,pfi/pficommon,pfi/pficommon | yaml | ## Code Before:
version: 2
jobs:
gcc_5_python27:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python2.7
command: |
python ./waf configure
python ./waf --check
- run:
name: build with python2.7
command: |
python ./waf build
python ./waf install
gcc_5_python34:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python3.4
command: |
apt update -y
apt install -y python3
python3 ./waf configure
python3 ./waf --check
- run:
name: build with python3.4
command: |
python3 ./waf build
python3 ./waf install
workflows:
version: 2
build_and_test:
jobs:
- gcc_5_python27
- gcc_5_python34
## Instruction:
Add the job for bulding pficommon with (almost) all extensions
## Code After:
version: 2
jobs:
gcc5_python27:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python2.7
command: |
python ./waf configure
python ./waf --check
- run:
name: build with python2.7
command: |
python ./waf build
python ./waf install
gcc5_python34:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python3.4
command: |
apt update -y
apt install -y python3
python3 ./waf configure
python3 ./waf --check
- run:
name: build with python3.4
command: |
python3 ./waf build
python3 ./waf install
gcc5_full:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: build msgpack
command: |
wget https://github.com/msgpack/msgpack-c/releases/download/cpp-0.5.9/msgpack-0.5.9.tar.gz
tar zxvf msgpack-0.5.9.tar.gz && cd msgpack-0.5.9
./configure && make && make install
- run:
name: build fcgi
command: |
# apt update -y
# apt install git
# git clone https://github.com/toshic/libfcgi.git
# cd libfcgi && ./configure && make && make install
echo muri
- run:
name: build mysql
command: |
echo 'noop'
- run:
name: build postgresql
command: |
apt update -y
apt install -y postgresql postgresql-server-dev-all
- run:
name: build pficommon
command: |
CPPFLAGS="-I/usr/include/postgresql" ./waf configure --disable-fcgi
./waf build
./waf install
workflows:
version: 2
build_and_test:
jobs:
- gcc5_python27
- gcc5_python34
| version: 2
jobs:
- gcc_5_python27:
? -
+ gcc5_python27:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python2.7
command: |
python ./waf configure
python ./waf --check
- run:
name: build with python2.7
command: |
python ./waf build
python ./waf install
- gcc_5_python34:
? -
+ gcc5_python34:
docker:
- image: gcc:5
steps:
- checkout
- run:
name: test with python3.4
command: |
apt update -y
apt install -y python3
python3 ./waf configure
python3 ./waf --check
- run:
name: build with python3.4
command: |
python3 ./waf build
python3 ./waf install
+ gcc5_full:
+ docker:
+ - image: gcc:5
+ steps:
+ - checkout
+ - run:
+ name: build msgpack
+ command: |
+ wget https://github.com/msgpack/msgpack-c/releases/download/cpp-0.5.9/msgpack-0.5.9.tar.gz
+ tar zxvf msgpack-0.5.9.tar.gz && cd msgpack-0.5.9
+ ./configure && make && make install
+ - run:
+ name: build fcgi
+ command: |
+ # apt update -y
+ # apt install git
+ # git clone https://github.com/toshic/libfcgi.git
+ # cd libfcgi && ./configure && make && make install
+ echo muri
+ - run:
+ name: build mysql
+ command: |
+ echo 'noop'
+ - run:
+ name: build postgresql
+ command: |
+ apt update -y
+ apt install -y postgresql postgresql-server-dev-all
+ - run:
+ name: build pficommon
+ command: |
+ CPPFLAGS="-I/usr/include/postgresql" ./waf configure --disable-fcgi
+ ./waf build
+ ./waf install
workflows:
version: 2
build_and_test:
jobs:
- - gcc_5_python27
? -
+ - gcc5_python27
- - gcc_5_python34
? -
+ - gcc5_python34 | 42 | 1.02439 | 38 | 4 |
9815d4f3bf248bacbf43028dcc4f1b918de7e1a1 | .travis.yml | .travis.yml | language: node_js
node_js:
- "5.3"
- "5.4"
- "5.5"
git:
depth: 1
script:
- make check
- make lint
- make test
| language: node_js
node_js:
- '5.3'
- '5.4'
- '5.5'
git:
depth: 1
script:
- make check
- make lint
- make test
- make dist
| Build dist target and use single quotes for node versions | Build dist target and use single quotes for node versions
| YAML | mit | ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx | yaml | ## Code Before:
language: node_js
node_js:
- "5.3"
- "5.4"
- "5.5"
git:
depth: 1
script:
- make check
- make lint
- make test
## Instruction:
Build dist target and use single quotes for node versions
## Code After:
language: node_js
node_js:
- '5.3'
- '5.4'
- '5.5'
git:
depth: 1
script:
- make check
- make lint
- make test
- make dist
| language: node_js
node_js:
- - "5.3"
? ^ ^
+ - '5.3'
? ^ ^
- - "5.4"
? ^ ^
+ - '5.4'
? ^ ^
- - "5.5"
? ^ ^
+ - '5.5'
? ^ ^
git:
depth: 1
script:
- make check
- make lint
- make test
+ - make dist | 7 | 0.5 | 4 | 3 |
75a59409410a8f264e7d56ddd853002ffbb28600 | corehq/tests/noseplugins/patches.py | corehq/tests/noseplugins/patches.py | from nose.plugins import Plugin
from corehq.form_processor.tests.utils import patch_testcase_databases
from corehq.util.es.testing import patch_es_user_signals
from corehq.util.test_utils import patch_foreign_value_caches
class PatchesPlugin(Plugin):
"""Patches various things before tests are run"""
name = "patches"
enabled = True
def options(self, parser, env):
"""Do not call super (always enabled)"""
def begin(self):
patch_assertItemsEqual()
patch_testcase_databases()
fix_freezegun_bugs()
patch_es_user_signals()
patch_foreign_value_caches()
def patch_assertItemsEqual():
import unittest
unittest.TestCase.assertItemsEqual = unittest.TestCase.assertCountEqual
GLOBAL_FREEZEGUN_IGNORE_LIST = ["kafka."]
def fix_freezegun_bugs():
"""Fix error in freezegun.api.freeze_time
This error occurs in a background thread that is either triggered by
a test using freezegun or becomes active while freezegun patches are
in place.
More complete error details:
```
Exception in thread cchq-producer-network-thread:
Traceback (most recent call last):
...
freezegun/api.py", line 151, in _should_use_real_time
if not ignore_lists[-1]:
IndexError: list index out of range
```
"""
import freezegun.api as api
def freeze_time(*args, **kw):
kw["ignore"] = kw.get("ignore", []) + GLOBAL_FREEZEGUN_IGNORE_LIST
return real_freeze_time(*args, **kw)
# add base ignore list to avoid index error
assert not api.ignore_lists, f"expected empty list, got {api.ignore_lists}"
api.ignore_lists.append(tuple(GLOBAL_FREEZEGUN_IGNORE_LIST))
# patch freeze_time so it always ignores kafka
real_freeze_time = api.freeze_time
api.freeze_time = freeze_time
| from nose.plugins import Plugin
from corehq.form_processor.tests.utils import patch_testcase_databases
from corehq.util.es.testing import patch_es_user_signals
from corehq.util.test_utils import patch_foreign_value_caches
class PatchesPlugin(Plugin):
"""Patches various things before tests are run"""
name = "patches"
enabled = True
def options(self, parser, env):
"""Do not call super (always enabled)"""
def begin(self):
patch_assertItemsEqual()
patch_testcase_databases()
extend_freezegun_ignore_list()
patch_es_user_signals()
patch_foreign_value_caches()
def patch_assertItemsEqual():
import unittest
unittest.TestCase.assertItemsEqual = unittest.TestCase.assertCountEqual
GLOBAL_FREEZEGUN_IGNORE_LIST = ["kafka."]
def extend_freezegun_ignore_list():
"""Extend the freezegun ignore list"""
import freezegun
freezegun.configure(extend_ignore_list=GLOBAL_FREEZEGUN_IGNORE_LIST)
| Update freezegun ignore list patch | Update freezegun ignore list patch
As of v1.1.0, freezegun supports configuring the ignore list.
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | python | ## Code Before:
from nose.plugins import Plugin
from corehq.form_processor.tests.utils import patch_testcase_databases
from corehq.util.es.testing import patch_es_user_signals
from corehq.util.test_utils import patch_foreign_value_caches
class PatchesPlugin(Plugin):
"""Patches various things before tests are run"""
name = "patches"
enabled = True
def options(self, parser, env):
"""Do not call super (always enabled)"""
def begin(self):
patch_assertItemsEqual()
patch_testcase_databases()
fix_freezegun_bugs()
patch_es_user_signals()
patch_foreign_value_caches()
def patch_assertItemsEqual():
import unittest
unittest.TestCase.assertItemsEqual = unittest.TestCase.assertCountEqual
GLOBAL_FREEZEGUN_IGNORE_LIST = ["kafka."]
def fix_freezegun_bugs():
"""Fix error in freezegun.api.freeze_time
This error occurs in a background thread that is either triggered by
a test using freezegun or becomes active while freezegun patches are
in place.
More complete error details:
```
Exception in thread cchq-producer-network-thread:
Traceback (most recent call last):
...
freezegun/api.py", line 151, in _should_use_real_time
if not ignore_lists[-1]:
IndexError: list index out of range
```
"""
import freezegun.api as api
def freeze_time(*args, **kw):
kw["ignore"] = kw.get("ignore", []) + GLOBAL_FREEZEGUN_IGNORE_LIST
return real_freeze_time(*args, **kw)
# add base ignore list to avoid index error
assert not api.ignore_lists, f"expected empty list, got {api.ignore_lists}"
api.ignore_lists.append(tuple(GLOBAL_FREEZEGUN_IGNORE_LIST))
# patch freeze_time so it always ignores kafka
real_freeze_time = api.freeze_time
api.freeze_time = freeze_time
## Instruction:
Update freezegun ignore list patch
As of v1.1.0, freezegun supports configuring the ignore list.
## Code After:
from nose.plugins import Plugin
from corehq.form_processor.tests.utils import patch_testcase_databases
from corehq.util.es.testing import patch_es_user_signals
from corehq.util.test_utils import patch_foreign_value_caches
class PatchesPlugin(Plugin):
"""Patches various things before tests are run"""
name = "patches"
enabled = True
def options(self, parser, env):
"""Do not call super (always enabled)"""
def begin(self):
patch_assertItemsEqual()
patch_testcase_databases()
extend_freezegun_ignore_list()
patch_es_user_signals()
patch_foreign_value_caches()
def patch_assertItemsEqual():
import unittest
unittest.TestCase.assertItemsEqual = unittest.TestCase.assertCountEqual
GLOBAL_FREEZEGUN_IGNORE_LIST = ["kafka."]
def extend_freezegun_ignore_list():
"""Extend the freezegun ignore list"""
import freezegun
freezegun.configure(extend_ignore_list=GLOBAL_FREEZEGUN_IGNORE_LIST)
| from nose.plugins import Plugin
from corehq.form_processor.tests.utils import patch_testcase_databases
from corehq.util.es.testing import patch_es_user_signals
from corehq.util.test_utils import patch_foreign_value_caches
class PatchesPlugin(Plugin):
"""Patches various things before tests are run"""
name = "patches"
enabled = True
def options(self, parser, env):
"""Do not call super (always enabled)"""
def begin(self):
patch_assertItemsEqual()
patch_testcase_databases()
- fix_freezegun_bugs()
+ extend_freezegun_ignore_list()
patch_es_user_signals()
patch_foreign_value_caches()
def patch_assertItemsEqual():
import unittest
unittest.TestCase.assertItemsEqual = unittest.TestCase.assertCountEqual
GLOBAL_FREEZEGUN_IGNORE_LIST = ["kafka."]
- def fix_freezegun_bugs():
- """Fix error in freezegun.api.freeze_time
+ def extend_freezegun_ignore_list():
+ """Extend the freezegun ignore list"""
+ import freezegun
+ freezegun.configure(extend_ignore_list=GLOBAL_FREEZEGUN_IGNORE_LIST)
- This error occurs in a background thread that is either triggered by
- a test using freezegun or becomes active while freezegun patches are
- in place.
-
- More complete error details:
- ```
- Exception in thread cchq-producer-network-thread:
- Traceback (most recent call last):
- ...
- freezegun/api.py", line 151, in _should_use_real_time
- if not ignore_lists[-1]:
- IndexError: list index out of range
- ```
- """
- import freezegun.api as api
-
- def freeze_time(*args, **kw):
- kw["ignore"] = kw.get("ignore", []) + GLOBAL_FREEZEGUN_IGNORE_LIST
- return real_freeze_time(*args, **kw)
-
- # add base ignore list to avoid index error
- assert not api.ignore_lists, f"expected empty list, got {api.ignore_lists}"
- api.ignore_lists.append(tuple(GLOBAL_FREEZEGUN_IGNORE_LIST))
-
- # patch freeze_time so it always ignores kafka
- real_freeze_time = api.freeze_time
- api.freeze_time = freeze_time | 35 | 0.57377 | 5 | 30 |
cf3f837a15d9c5f242dd6c5bb29e503618c3c576 | app/pages/lab/field-guide/article-list-item.cjsx | app/pages/lab/field-guide/article-list-item.cjsx | React = require 'react'
createReactClass = require 'create-react-class'
CroppedImage = require '../../../components/cropped-image'
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article-button" onClick={@props.onClick}>
<CroppedImage className="field-guide-editor-article-button-icon" src={@props.icon} aspectRatio={1} width="3em" height="3em" style={borderRadius: '50%', verticalAlign: 'middle'} />{' '}
<span className="field-guide-editor-article-button-title">{@props.title}</span>
</button>
module.exports = ArticleListItem
| React = require 'react'
createReactClass = require 'create-react-class'
CroppedImage = require('../../../components/cropped-image').default
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article-button" onClick={@props.onClick}>
<CroppedImage className="field-guide-editor-article-button-icon" src={@props.icon} aspectRatio={1} width="3em" height="3em" style={borderRadius: '50%', verticalAlign: 'middle'} />{' '}
<span className="field-guide-editor-article-button-title">{@props.title}</span>
</button>
module.exports = ArticleListItem
| Fix CroppedImage require in ArticleListItem | Fix CroppedImage require in ArticleListItem
| CoffeeScript | apache-2.0 | amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End | coffeescript | ## Code Before:
React = require 'react'
createReactClass = require 'create-react-class'
CroppedImage = require '../../../components/cropped-image'
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article-button" onClick={@props.onClick}>
<CroppedImage className="field-guide-editor-article-button-icon" src={@props.icon} aspectRatio={1} width="3em" height="3em" style={borderRadius: '50%', verticalAlign: 'middle'} />{' '}
<span className="field-guide-editor-article-button-title">{@props.title}</span>
</button>
module.exports = ArticleListItem
## Instruction:
Fix CroppedImage require in ArticleListItem
## Code After:
React = require 'react'
createReactClass = require 'create-react-class'
CroppedImage = require('../../../components/cropped-image').default
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article-button" onClick={@props.onClick}>
<CroppedImage className="field-guide-editor-article-button-icon" src={@props.icon} aspectRatio={1} width="3em" height="3em" style={borderRadius: '50%', verticalAlign: 'middle'} />{' '}
<span className="field-guide-editor-article-button-title">{@props.title}</span>
</button>
module.exports = ArticleListItem
| React = require 'react'
createReactClass = require 'create-react-class'
- CroppedImage = require '../../../components/cropped-image'
? ^
+ CroppedImage = require('../../../components/cropped-image').default
? ^ +++++++++
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article-button" onClick={@props.onClick}>
<CroppedImage className="field-guide-editor-article-button-icon" src={@props.icon} aspectRatio={1} width="3em" height="3em" style={borderRadius: '50%', verticalAlign: 'middle'} />{' '}
<span className="field-guide-editor-article-button-title">{@props.title}</span>
</button>
module.exports = ArticleListItem | 2 | 0.117647 | 1 | 1 |
065792495e12cdee9ea358879387706cd8104f60 | README.md | README.md |
A platform optimized file-change watcher.
## Installation
$ gem install tidings
## Short example
```ruby
Tidings.watch('/Users/janice/Code') do |file_or_path, flags|
if flags.include(:dir)
puts "Change to directory: #{file_or_path}"
else
puts "Change to file: #{file_or_path}"
end
end
```
## Long example
```ruby
module MyFileWatcher
def self.call(file_or_path, flags)
puts "#{file_or_path.inspect}:#{flags.inspect}"
end
end
Tidings.watch('/Users/janice/Code', MyFileWatcher)
````
|
A platform optimized file-change watcher.
## Installation
$ gem install tidings
## Short example
```ruby
Tidings.watch('/Users/janice/Code') do |file_or_path, flags|
if flags.include(:dir)
puts "Change to directory: #{file_or_path}"
else
puts "Change to file: #{file_or_path}"
end
end
```
## Long example
```ruby
module MyFileWatcher
def self.call(file_or_path, flags)
puts "#{file_or_path.inspect}:#{flags.inspect}"
end
end
Tidings.watch('/Users/janice/Code', MyFileWatcher)
```
## Copyright
MIT license, see COPYING.
| Add details about copyright and fix syntax. | Add details about copyright and fix syntax.
| Markdown | mit | Manfred/Tidings,Manfred/Tidings | markdown | ## Code Before:
A platform optimized file-change watcher.
## Installation
$ gem install tidings
## Short example
```ruby
Tidings.watch('/Users/janice/Code') do |file_or_path, flags|
if flags.include(:dir)
puts "Change to directory: #{file_or_path}"
else
puts "Change to file: #{file_or_path}"
end
end
```
## Long example
```ruby
module MyFileWatcher
def self.call(file_or_path, flags)
puts "#{file_or_path.inspect}:#{flags.inspect}"
end
end
Tidings.watch('/Users/janice/Code', MyFileWatcher)
````
## Instruction:
Add details about copyright and fix syntax.
## Code After:
A platform optimized file-change watcher.
## Installation
$ gem install tidings
## Short example
```ruby
Tidings.watch('/Users/janice/Code') do |file_or_path, flags|
if flags.include(:dir)
puts "Change to directory: #{file_or_path}"
else
puts "Change to file: #{file_or_path}"
end
end
```
## Long example
```ruby
module MyFileWatcher
def self.call(file_or_path, flags)
puts "#{file_or_path.inspect}:#{flags.inspect}"
end
end
Tidings.watch('/Users/janice/Code', MyFileWatcher)
```
## Copyright
MIT license, see COPYING.
|
A platform optimized file-change watcher.
## Installation
- $ gem install tidings
+ $ gem install tidings
? ++
## Short example
```ruby
Tidings.watch('/Users/janice/Code') do |file_or_path, flags|
if flags.include(:dir)
puts "Change to directory: #{file_or_path}"
else
puts "Change to file: #{file_or_path}"
end
end
```
## Long example
```ruby
module MyFileWatcher
def self.call(file_or_path, flags)
puts "#{file_or_path.inspect}:#{flags.inspect}"
end
end
Tidings.watch('/Users/janice/Code', MyFileWatcher)
- ````
? -
+ ```
+
+ ## Copyright
+
+ MIT license, see COPYING. | 8 | 0.266667 | 6 | 2 |
b31fec72cb1a1252ebcd6b489fba17f466d46469 | README.md | README.md | GuerrillaMail
=============
A Simple Library for GuerrillaMail
Example Usage
=============
```php
$connection = new \GuerrillaMail\GuerrillaConnect\CurlConnection();
//The second parameter is the client IP.
//The third parameter is the client Browser Agent.
//The fourth parameter is the client's sid (optional)
$gm = new \GuerrillaMail\GuerrillaMail($connection, '127.0.0.1', 'GuerrillaMail_Library');
//Obtain an email address
$response = $gm->get_email_address();
//Fetch user's emails.
$emails = $gm->check_email($response['sid_token']);
```
Editing test | GuerrillaMail
=============
A Simple Library for GuerrillaMail
Example Usage
=============
```php
$connection = new \GuerrillaMail\GuerrillaConnect\CurlConnection();
//The second parameter is the client IP.
//The third parameter is the client Browser Agent.
//The fourth parameter is the client's sid (optional)
$gm = new \GuerrillaMail\GuerrillaMail($connection, '127.0.0.1', 'GuerrillaMail_Library');
//Obtain an email address
$response = $gm->get_email_address();
//Fetch user's emails.
$emails = $gm->check_email($response['sid_token']);
```
| Revert "This is a test commit for my wife" | Revert "This is a test commit for my wife"
This is a revert to show my wife how to use git-revert
This reverts commit adc38bc910c52864dca729846d10f9692452ce37.
| Markdown | mit | taion809/GuerrillaMail,Git-Host/GuerrillaMail | markdown | ## Code Before:
GuerrillaMail
=============
A Simple Library for GuerrillaMail
Example Usage
=============
```php
$connection = new \GuerrillaMail\GuerrillaConnect\CurlConnection();
//The second parameter is the client IP.
//The third parameter is the client Browser Agent.
//The fourth parameter is the client's sid (optional)
$gm = new \GuerrillaMail\GuerrillaMail($connection, '127.0.0.1', 'GuerrillaMail_Library');
//Obtain an email address
$response = $gm->get_email_address();
//Fetch user's emails.
$emails = $gm->check_email($response['sid_token']);
```
Editing test
## Instruction:
Revert "This is a test commit for my wife"
This is a revert to show my wife how to use git-revert
This reverts commit adc38bc910c52864dca729846d10f9692452ce37.
## Code After:
GuerrillaMail
=============
A Simple Library for GuerrillaMail
Example Usage
=============
```php
$connection = new \GuerrillaMail\GuerrillaConnect\CurlConnection();
//The second parameter is the client IP.
//The third parameter is the client Browser Agent.
//The fourth parameter is the client's sid (optional)
$gm = new \GuerrillaMail\GuerrillaMail($connection, '127.0.0.1', 'GuerrillaMail_Library');
//Obtain an email address
$response = $gm->get_email_address();
//Fetch user's emails.
$emails = $gm->check_email($response['sid_token']);
```
| GuerrillaMail
=============
A Simple Library for GuerrillaMail
Example Usage
=============
```php
$connection = new \GuerrillaMail\GuerrillaConnect\CurlConnection();
//The second parameter is the client IP.
//The third parameter is the client Browser Agent.
//The fourth parameter is the client's sid (optional)
$gm = new \GuerrillaMail\GuerrillaMail($connection, '127.0.0.1', 'GuerrillaMail_Library');
//Obtain an email address
$response = $gm->get_email_address();
//Fetch user's emails.
$emails = $gm->check_email($response['sid_token']);
```
-
-
- Editing test | 3 | 0.12 | 0 | 3 |
b34050b4abba3608dee95e223fde1cf4de54a994 | metadata/com.ero.kinoko.yml | metadata/com.ero.kinoko.yml | AntiFeatures:
- NonFreeNet
Categories:
- Graphics
- Reading
License: MIT
SourceCode: https://github.com/gsioteam/kinoko
IssueTracker: https://github.com/gsioteam/kinoko/issues
AutoName: Kinoko
Summary: Awesome manga reader
RepoType: git
Repo: https://github.com/gsioteam/kinoko.git
Builds:
- versionName: 2.0.2
versionCode: 44
commit: v2.0.2
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags v\d+\.\d+(\.\d+)?
UpdateCheckData: pubspec.yaml|version:\s.+\+(\d+)|.|version:\s(.+)\+
CurrentVersion: 2.0.2
CurrentVersionCode: 44
| AntiFeatures:
- NonFreeNet
Categories:
- Graphics
- Reading
License: MIT
SourceCode: https://github.com/gsioteam/kinoko
IssueTracker: https://github.com/gsioteam/kinoko/issues
AutoName: Kinoko
Summary: Awesome manga reader
RepoType: git
Repo: https://github.com/gsioteam/kinoko.git
Builds:
- versionName: 2.0.2
versionCode: 44
commit: v2.0.2
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
- versionName: 2.0.3
versionCode: 45
commit: 16d4e6e17b27f4d7a684998850a1b322d4ac1ded
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags v\d+\.\d+(\.\d+)?
UpdateCheckData: pubspec.yaml|version:\s.+\+(\d+)|.|version:\s(.+)\+
CurrentVersion: 2.0.3
CurrentVersionCode: 45
| Update Kinoko to 2.0.3 (45) | Update Kinoko to 2.0.3 (45)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
AntiFeatures:
- NonFreeNet
Categories:
- Graphics
- Reading
License: MIT
SourceCode: https://github.com/gsioteam/kinoko
IssueTracker: https://github.com/gsioteam/kinoko/issues
AutoName: Kinoko
Summary: Awesome manga reader
RepoType: git
Repo: https://github.com/gsioteam/kinoko.git
Builds:
- versionName: 2.0.2
versionCode: 44
commit: v2.0.2
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags v\d+\.\d+(\.\d+)?
UpdateCheckData: pubspec.yaml|version:\s.+\+(\d+)|.|version:\s(.+)\+
CurrentVersion: 2.0.2
CurrentVersionCode: 44
## Instruction:
Update Kinoko to 2.0.3 (45)
## Code After:
AntiFeatures:
- NonFreeNet
Categories:
- Graphics
- Reading
License: MIT
SourceCode: https://github.com/gsioteam/kinoko
IssueTracker: https://github.com/gsioteam/kinoko/issues
AutoName: Kinoko
Summary: Awesome manga reader
RepoType: git
Repo: https://github.com/gsioteam/kinoko.git
Builds:
- versionName: 2.0.2
versionCode: 44
commit: v2.0.2
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
- versionName: 2.0.3
versionCode: 45
commit: 16d4e6e17b27f4d7a684998850a1b322d4ac1ded
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags v\d+\.\d+(\.\d+)?
UpdateCheckData: pubspec.yaml|version:\s.+\+(\d+)|.|version:\s(.+)\+
CurrentVersion: 2.0.3
CurrentVersionCode: 45
| AntiFeatures:
- NonFreeNet
Categories:
- Graphics
- Reading
License: MIT
SourceCode: https://github.com/gsioteam/kinoko
IssueTracker: https://github.com/gsioteam/kinoko/issues
AutoName: Kinoko
Summary: Awesome manga reader
RepoType: git
Repo: https://github.com/gsioteam/kinoko.git
Builds:
- versionName: 2.0.2
versionCode: 44
commit: v2.0.2
output: build/app/outputs/flutter-apk/app-release.apk
srclibs:
- flutter@2.0.5
rm:
- ios
- plugins/glib/ios
- plugins/glib/example/ios
build:
- $$flutter$$/bin/flutter config --no-analytics
- $$flutter$$/bin/flutter build apk
ndk: r21e
+ - versionName: 2.0.3
+ versionCode: 45
+ commit: 16d4e6e17b27f4d7a684998850a1b322d4ac1ded
+ output: build/app/outputs/flutter-apk/app-release.apk
+ srclibs:
+ - flutter@2.0.5
+ rm:
+ - ios
+ - plugins/glib/ios
+ - plugins/glib/example/ios
+ build:
+ - $$flutter$$/bin/flutter config --no-analytics
+ - $$flutter$$/bin/flutter build apk
+ ndk: r21e
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags v\d+\.\d+(\.\d+)?
UpdateCheckData: pubspec.yaml|version:\s.+\+(\d+)|.|version:\s(.+)\+
- CurrentVersion: 2.0.2
? ^
+ CurrentVersion: 2.0.3
? ^
- CurrentVersionCode: 44
? ^
+ CurrentVersionCode: 45
? ^
| 19 | 0.527778 | 17 | 2 |
0e55ac049d8deb7ad32a50a55d3b64f591681a37 | lib/constantine/constant.rb | lib/constantine/constant.rb | module Constantine
class Constant
VALIDATORS = {
:float => Proc.new { |f|
begin
Float(f)
true
rescue
false
end
},
:string => Proc.new { |s| s.is_a? String },
:boolean => Proc.new { |s|
s == "true" || s == "false" || s.is_a?(TrueClass) || s.is_a?(FalseClass)
},
:integer => Proc.new { |s|
begin
Integer(s)
true
rescue
false
end
}
}
def self.valid_types
VALIDATORS.keys
end
attr_reader :name, :type, :value
def initialize(name, type, value)
@name = name
@type = type
@value = value
validate
end
def validate
validate_type
validate_value
end
def to_csv
"#{@name},#{@type},#{@value}"
end
def value=(new_value)
@value = new_value
validate
end
private
def validate_type
raise "invalid type #{@type}, valid types are #{self.class.valid_types.inspect}" unless self.class.valid_types.include? @type
end
def validate_value
raise "invalid value #{@value} for type #{@type}" unless VALIDATORS[@type].call(@value)
end
end
end
| module Constantine
class Constant
VALIDATORS = {
:float => Proc.new { |f|
begin
Float(f)
true
rescue
false
end
},
:string => Proc.new { |s| s.is_a? String },
:boolean => Proc.new { |s|
s == "true" || s == "false" || s.is_a?(TrueClass) || s.is_a?(FalseClass)
},
:integer => Proc.new { |s|
begin
Integer(s)
true
rescue
false
end
}
}
def self.valid_types
VALIDATORS.keys
end
attr_reader :name, :type, :value
def initialize(name, type, value)
@name = name
@type = type
@value = value
validate
end
def to_csv
"#{@name},#{@type},#{@value}"
end
def value=(new_value)
@value = new_value
validate
end
private
def validate
validate_type
validate_value
end
def validate_type
raise "invalid type #{@type}, valid types are #{self.class.valid_types.inspect}" unless self.class.valid_types.include? @type
end
def validate_value
raise "invalid value #{@value} for type #{@type}" unless VALIDATORS[@type].call(@value)
end
end
end
| Make validate a private method of Constant | Make validate a private method of Constant
This means we now have an invariant with Constants - that any
Constant visible to the rest of the system (that is, with Constant.new)
is valid since validation is performed during init.
| Ruby | mit | samphippen/constantine,samphippen/constantine | ruby | ## Code Before:
module Constantine
class Constant
VALIDATORS = {
:float => Proc.new { |f|
begin
Float(f)
true
rescue
false
end
},
:string => Proc.new { |s| s.is_a? String },
:boolean => Proc.new { |s|
s == "true" || s == "false" || s.is_a?(TrueClass) || s.is_a?(FalseClass)
},
:integer => Proc.new { |s|
begin
Integer(s)
true
rescue
false
end
}
}
def self.valid_types
VALIDATORS.keys
end
attr_reader :name, :type, :value
def initialize(name, type, value)
@name = name
@type = type
@value = value
validate
end
def validate
validate_type
validate_value
end
def to_csv
"#{@name},#{@type},#{@value}"
end
def value=(new_value)
@value = new_value
validate
end
private
def validate_type
raise "invalid type #{@type}, valid types are #{self.class.valid_types.inspect}" unless self.class.valid_types.include? @type
end
def validate_value
raise "invalid value #{@value} for type #{@type}" unless VALIDATORS[@type].call(@value)
end
end
end
## Instruction:
Make validate a private method of Constant
This means we now have an invariant with Constants - that any
Constant visible to the rest of the system (that is, with Constant.new)
is valid since validation is performed during init.
## Code After:
module Constantine
class Constant
VALIDATORS = {
:float => Proc.new { |f|
begin
Float(f)
true
rescue
false
end
},
:string => Proc.new { |s| s.is_a? String },
:boolean => Proc.new { |s|
s == "true" || s == "false" || s.is_a?(TrueClass) || s.is_a?(FalseClass)
},
:integer => Proc.new { |s|
begin
Integer(s)
true
rescue
false
end
}
}
def self.valid_types
VALIDATORS.keys
end
attr_reader :name, :type, :value
def initialize(name, type, value)
@name = name
@type = type
@value = value
validate
end
def to_csv
"#{@name},#{@type},#{@value}"
end
def value=(new_value)
@value = new_value
validate
end
private
def validate
validate_type
validate_value
end
def validate_type
raise "invalid type #{@type}, valid types are #{self.class.valid_types.inspect}" unless self.class.valid_types.include? @type
end
def validate_value
raise "invalid value #{@value} for type #{@type}" unless VALIDATORS[@type].call(@value)
end
end
end
| module Constantine
class Constant
VALIDATORS = {
:float => Proc.new { |f|
begin
Float(f)
true
rescue
false
end
},
:string => Proc.new { |s| s.is_a? String },
:boolean => Proc.new { |s|
s == "true" || s == "false" || s.is_a?(TrueClass) || s.is_a?(FalseClass)
},
:integer => Proc.new { |s|
begin
Integer(s)
true
rescue
false
end
}
}
def self.valid_types
VALIDATORS.keys
end
attr_reader :name, :type, :value
def initialize(name, type, value)
@name = name
@type = type
@value = value
validate
end
- def validate
- validate_type
- validate_value
- end
-
def to_csv
"#{@name},#{@type},#{@value}"
end
def value=(new_value)
@value = new_value
validate
end
private
+ def validate
+ validate_type
+ validate_value
+ end
+
+
def validate_type
raise "invalid type #{@type}, valid types are #{self.class.valid_types.inspect}" unless self.class.valid_types.include? @type
end
def validate_value
raise "invalid value #{@value} for type #{@type}" unless VALIDATORS[@type].call(@value)
end
end
end | 11 | 0.174603 | 6 | 5 |
7bb75492927b14473e383bb5b7492d08ab2fb6ce | Go/resources.md | Go/resources.md | Go
-------
### Reference ###
* [The Go Programming language](https://golang.org/)
* [The GO Tour](https://tour.golang.org/)
### Books ###
* [An Introduction To Programming In Go - Caleb Doxsey](http://www.amazon.in/Introduction-Programming-Go-Caleb-Doxsey/dp/1478355824)
* [Go Bootcamp](http://www.golangbootcamp.com/)
* Learning Go by Miek Gieben
### Online Resources ###
* [Go Wiki](https://github.com/golang/go/wiki/Learn)
* [Todd Mcleod](https://www.youtube.com/user/toddmcleod)
* [GOLANGBOT](https://golangbot.com)
* [Go by example](https://gobyexample.com)
| Go
-------
### Reference ###
* [The Go Programming language](https://golang.org/)
* [The GO Tour](https://tour.golang.org/)
### Books ###
* [An Introduction To Programming In Go - Caleb Doxsey](http://www.amazon.in/Introduction-Programming-Go-Caleb-Doxsey/dp/1478355824)
* [Go Bootcamp](http://www.golangbootcamp.com/)
* Learning Go by Miek Gieben
### Online Resources ###
* [Go Wiki](https://github.com/golang/go/wiki/Learn)
* [Todd Mcleod](https://www.youtube.com/user/toddmcleod)
* [GOLANGBOT](https://golangbot.com)
* [Go by example](https://gobyexample.com)
* [Let's Learn Algorithms](https://www.calhoun.io/lets-learn-algorithms/)
| Add Let's Learn Algorithms link | Add Let's Learn Algorithms link
Added a link to 'Let's Learn Algorithms' by Jon Calhoun | Markdown | mit | vicky002/AlgoWiki,vicky002/AlgoWiki | markdown | ## Code Before:
Go
-------
### Reference ###
* [The Go Programming language](https://golang.org/)
* [The GO Tour](https://tour.golang.org/)
### Books ###
* [An Introduction To Programming In Go - Caleb Doxsey](http://www.amazon.in/Introduction-Programming-Go-Caleb-Doxsey/dp/1478355824)
* [Go Bootcamp](http://www.golangbootcamp.com/)
* Learning Go by Miek Gieben
### Online Resources ###
* [Go Wiki](https://github.com/golang/go/wiki/Learn)
* [Todd Mcleod](https://www.youtube.com/user/toddmcleod)
* [GOLANGBOT](https://golangbot.com)
* [Go by example](https://gobyexample.com)
## Instruction:
Add Let's Learn Algorithms link
Added a link to 'Let's Learn Algorithms' by Jon Calhoun
## Code After:
Go
-------
### Reference ###
* [The Go Programming language](https://golang.org/)
* [The GO Tour](https://tour.golang.org/)
### Books ###
* [An Introduction To Programming In Go - Caleb Doxsey](http://www.amazon.in/Introduction-Programming-Go-Caleb-Doxsey/dp/1478355824)
* [Go Bootcamp](http://www.golangbootcamp.com/)
* Learning Go by Miek Gieben
### Online Resources ###
* [Go Wiki](https://github.com/golang/go/wiki/Learn)
* [Todd Mcleod](https://www.youtube.com/user/toddmcleod)
* [GOLANGBOT](https://golangbot.com)
* [Go by example](https://gobyexample.com)
* [Let's Learn Algorithms](https://www.calhoun.io/lets-learn-algorithms/)
| Go
-------
### Reference ###
* [The Go Programming language](https://golang.org/)
* [The GO Tour](https://tour.golang.org/)
### Books ###
* [An Introduction To Programming In Go - Caleb Doxsey](http://www.amazon.in/Introduction-Programming-Go-Caleb-Doxsey/dp/1478355824)
* [Go Bootcamp](http://www.golangbootcamp.com/)
* Learning Go by Miek Gieben
### Online Resources ###
* [Go Wiki](https://github.com/golang/go/wiki/Learn)
* [Todd Mcleod](https://www.youtube.com/user/toddmcleod)
* [GOLANGBOT](https://golangbot.com)
* [Go by example](https://gobyexample.com)
+ * [Let's Learn Algorithms](https://www.calhoun.io/lets-learn-algorithms/)
- | 2 | 0.074074 | 1 | 1 |
e63f9b640d158f71740123398740e1446123c344 | app/graphql/types/mutation_type.rb | app/graphql/types/mutation_type.rb | MutationType = GraphQL::ObjectType.define do
name 'Mutation'
description 'The mutation root of this schema for creating or changing data.'
field :UpdateDeveloper, field: UpdateDeveloper.field
field :UpdateEmployer, field: Employers::UpdateEmployer.field
field :EmployerFileUpload, field: Employers::FileUpload.field
end
| MutationType = GraphQL::ObjectType.define do
name 'Mutation'
description 'The mutation root of this schema for creating or changing data.'
field :UpdateDeveloper, field: UpdateDeveloper.field
field :UpdateEmployer, field: Employers::UpdateEmployer.field
field :ToggleFavourite, field: Developers::ToggleFavourite.field
field :EmployerFileUpload, field: Employers::FileUpload.field
end
| Add mutation to root mutation type | Add mutation to root mutation type
| Ruby | artistic-2.0 | gauravtiwari/hireables,gauravtiwari/hireables,Hireables/hireables,gauravtiwari/techhire,gauravtiwari/techhire,gauravtiwari/hireables,Hireables/hireables,gauravtiwari/techhire,Hireables/hireables | ruby | ## Code Before:
MutationType = GraphQL::ObjectType.define do
name 'Mutation'
description 'The mutation root of this schema for creating or changing data.'
field :UpdateDeveloper, field: UpdateDeveloper.field
field :UpdateEmployer, field: Employers::UpdateEmployer.field
field :EmployerFileUpload, field: Employers::FileUpload.field
end
## Instruction:
Add mutation to root mutation type
## Code After:
MutationType = GraphQL::ObjectType.define do
name 'Mutation'
description 'The mutation root of this schema for creating or changing data.'
field :UpdateDeveloper, field: UpdateDeveloper.field
field :UpdateEmployer, field: Employers::UpdateEmployer.field
field :ToggleFavourite, field: Developers::ToggleFavourite.field
field :EmployerFileUpload, field: Employers::FileUpload.field
end
| MutationType = GraphQL::ObjectType.define do
name 'Mutation'
description 'The mutation root of this schema for creating or changing data.'
field :UpdateDeveloper, field: UpdateDeveloper.field
field :UpdateEmployer, field: Employers::UpdateEmployer.field
+ field :ToggleFavourite, field: Developers::ToggleFavourite.field
field :EmployerFileUpload, field: Employers::FileUpload.field
end | 1 | 0.142857 | 1 | 0 |
f6ee60b87fa3075b1c2f1961ae062393f1fb875a | .travis.yml | .travis.yml | language: java
jdk:
- openjdk6
- oraclejdk7
- oraclejdk8
# No need to run tasks for dependencies
install:
- true
| language: java
jdk:
- oraclejdk7
- oraclejdk8
# No need to run tasks for dependencies
install:
- true
| Remove OpenJDK6 build - it doesn't work on new Travis CI :cry: | Remove OpenJDK6 build - it doesn't work on new Travis CI :cry:
| YAML | apache-2.0 | ultraq/thymeleaf-layout-dialect,zhanhb/thymeleaf-layout-dialect,zhanhb/thymeleaf-layout-dialect,ultraq/thymeleaf-layout-dialect,zhanhb/thymeleaf-layout-dialect | yaml | ## Code Before:
language: java
jdk:
- openjdk6
- oraclejdk7
- oraclejdk8
# No need to run tasks for dependencies
install:
- true
## Instruction:
Remove OpenJDK6 build - it doesn't work on new Travis CI :cry:
## Code After:
language: java
jdk:
- oraclejdk7
- oraclejdk8
# No need to run tasks for dependencies
install:
- true
| language: java
jdk:
- - openjdk6
- oraclejdk7
- oraclejdk8
# No need to run tasks for dependencies
install:
- true | 1 | 0.111111 | 0 | 1 |
b9143462c004af7d18a66fa92ad94585468751b9 | IndexedRedis/fields/classic.py | IndexedRedis/fields/classic.py |
from . import IRField, IR_NULL_STRINGS, irNull
from ..compat_str import tobytes
class IRClassicField(IRField):
'''
IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)
and have a default value of empty string.
'''
CAN_INDEX = True
def __init__(self, name='', hashIndex=False):
IRField.__init__(self, name=name, hashIndex=hashIndex, defaultValue='')
def __new__(self, name='', hashIndex=False):
return IRField.__new__(self, name)
# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :
|
from . import IRField, IR_NULL_STRINGS, irNull
from ..compat_str import tobytes, encoded_str_type
class IRClassicField(IRField):
'''
IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)
and have a default value of empty string.
'''
CAN_INDEX = True
def __init__(self, name='', hashIndex=False):
IRField.__init__(self, name=name, valueType=encoded_str_type, hashIndex=hashIndex, defaultValue='')
def __new__(self, name='', hashIndex=False):
return IRField.__new__(self, name)
# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :
| Change IRFieldClassic to use 'encoded_str_type' | Change IRFieldClassic to use 'encoded_str_type'
| Python | lgpl-2.1 | kata198/indexedredis,kata198/indexedredis | python | ## Code Before:
from . import IRField, IR_NULL_STRINGS, irNull
from ..compat_str import tobytes
class IRClassicField(IRField):
'''
IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)
and have a default value of empty string.
'''
CAN_INDEX = True
def __init__(self, name='', hashIndex=False):
IRField.__init__(self, name=name, hashIndex=hashIndex, defaultValue='')
def __new__(self, name='', hashIndex=False):
return IRField.__new__(self, name)
# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :
## Instruction:
Change IRFieldClassic to use 'encoded_str_type'
## Code After:
from . import IRField, IR_NULL_STRINGS, irNull
from ..compat_str import tobytes, encoded_str_type
class IRClassicField(IRField):
'''
IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)
and have a default value of empty string.
'''
CAN_INDEX = True
def __init__(self, name='', hashIndex=False):
IRField.__init__(self, name=name, valueType=encoded_str_type, hashIndex=hashIndex, defaultValue='')
def __new__(self, name='', hashIndex=False):
return IRField.__new__(self, name)
# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab :
|
from . import IRField, IR_NULL_STRINGS, irNull
- from ..compat_str import tobytes
+ from ..compat_str import tobytes, encoded_str_type
? ++++++++++++++++++
class IRClassicField(IRField):
'''
IRClassicField - The IRField type which behaves like the "classic" IndexedRedis string-named fields.
This will store and retrieve data encoding into the default encoding (@see IndexedRedis.compat_str.setDefaultIREncoding)
and have a default value of empty string.
'''
CAN_INDEX = True
def __init__(self, name='', hashIndex=False):
- IRField.__init__(self, name=name, hashIndex=hashIndex, defaultValue='')
+ IRField.__init__(self, name=name, valueType=encoded_str_type, hashIndex=hashIndex, defaultValue='')
? ++++++++++++++++++++++++++++
def __new__(self, name='', hashIndex=False):
return IRField.__new__(self, name)
# vim: set ts=8 shiftwidth=8 softtabstop=8 noexpandtab : | 4 | 0.16 | 2 | 2 |
3700b6c3a00ec7c543a9baf3ba3b8b26c4d81383 | .pre-commit-config.yaml | .pre-commit-config.yaml | ---
ci:
# https://pre-commit.ci/#configuration
autoupdate_schedule: weekly
autofix_prs: false
repos:
- repo: https://github.com/psf/black
# WARNING: rev should be the same as in `pyproject.toml`.
rev: 21.9b0
hooks:
- id: black
| ---
ci:
# https://pre-commit.ci/#configuration
autoupdate_schedule: weekly
autofix_prs: false
repos:
- repo: local
hooks:
# using a local hook for black because of an issue that arises when using
# pre-commit and setuptools-scm that results in version info being lost.
# For more info see https://github.com/psf/black/issues/2493
# Based on https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
# WARNING: version should be the same as in `pyproject.toml`.
additional_dependencies: [black==21.9b0]
# This is here to defer file selection to black which will do it based on
# black config.
pass_filenames: false
require_serial: true
args: ["."]
| Change to a local hook for black | Change to a local hook for black
This is to work around this issue: https://github.com/psf/black/issues/2493
Without doing this the pre-commit hook for black fails as it thinks it
got the wrong version.
| YAML | bsd-3-clause | RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib | yaml | ## Code Before:
---
ci:
# https://pre-commit.ci/#configuration
autoupdate_schedule: weekly
autofix_prs: false
repos:
- repo: https://github.com/psf/black
# WARNING: rev should be the same as in `pyproject.toml`.
rev: 21.9b0
hooks:
- id: black
## Instruction:
Change to a local hook for black
This is to work around this issue: https://github.com/psf/black/issues/2493
Without doing this the pre-commit hook for black fails as it thinks it
got the wrong version.
## Code After:
---
ci:
# https://pre-commit.ci/#configuration
autoupdate_schedule: weekly
autofix_prs: false
repos:
- repo: local
hooks:
# using a local hook for black because of an issue that arises when using
# pre-commit and setuptools-scm that results in version info being lost.
# For more info see https://github.com/psf/black/issues/2493
# Based on https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
# WARNING: version should be the same as in `pyproject.toml`.
additional_dependencies: [black==21.9b0]
# This is here to defer file selection to black which will do it based on
# black config.
pass_filenames: false
require_serial: true
args: ["."]
| ---
ci:
# https://pre-commit.ci/#configuration
autoupdate_schedule: weekly
autofix_prs: false
repos:
+ - repo: local
- - repo: https://github.com/psf/black
- # WARNING: rev should be the same as in `pyproject.toml`.
- rev: 21.9b0
hooks:
+ # using a local hook for black because of an issue that arises when using
+ # pre-commit and setuptools-scm that results in version info being lost.
+ # For more info see https://github.com/psf/black/issues/2493
+ # Based on https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
- - id: black
? --
+ - id: black
+ name: black
+ description: "Black: The uncompromising Python code formatter"
+ entry: black
+ language: python
+ # WARNING: version should be the same as in `pyproject.toml`.
+ additional_dependencies: [black==21.9b0]
+ # This is here to defer file selection to black which will do it based on
+ # black config.
+ pass_filenames: false
+ require_serial: true
+ args: ["."] | 21 | 1.75 | 17 | 4 |
78a5d56968de2d293671abab59430f55ae0675dc | app/controllers/doctors_controller.rb | app/controllers/doctors_controller.rb | class DoctorsController < RenalwareController
include Pageable
def index
@doctors = Doctor.page(@page).per(@per_page)
end
def new
@doctor = Doctor.new
end
def edit
@doctor = Doctor.find(params[:id])
end
def create
if service.update!(doctor_params)
redirect_to doctors_path
else
render :new, alert: 'Failed to create new Doctor'
end
end
def update
if service.update!(doctor_params)
redirect_to doctors_path
else
render :edit, alert: 'Failed to update Doctor'
end
end
def destroy
if Doctor.destroy(params[:id])
redirect_to doctors_path, notice: 'Doctor successfully deleted'
else
render :index, alert: 'Failed to delete Doctor'
end
end
private
def service
@doctor = Doctor.find_or_initialize_by(id: params[:id])
DoctorService.new(@doctor)
end
def doctor_params
params.require(:doctor).permit(
:first_name, :last_name, :email, :practitioner_type, :code, practice_ids: [],
address_attributes: [:id, :street_1, :street_2, :city, :county, :postcode])
end
end
| class DoctorsController < RenalwareController
include Pageable
def index
@doctors = Doctor.order(:last_name).page(@page).per(@per_page)
end
def new
@doctor = Doctor.new
end
def edit
@doctor = Doctor.find(params[:id])
end
def create
if service.update!(doctor_params)
redirect_to doctors_path
else
render :new, alert: 'Failed to create new Doctor'
end
end
def update
if service.update!(doctor_params)
redirect_to doctors_path
else
render :edit, alert: 'Failed to update Doctor'
end
end
def destroy
if Doctor.destroy(params[:id])
redirect_to doctors_path, notice: 'Doctor successfully deleted'
else
render :index, alert: 'Failed to delete Doctor'
end
end
private
def service
@doctor = Doctor.find_or_initialize_by(id: params[:id])
DoctorService.new(@doctor)
end
def doctor_params
params.require(:doctor).permit(
:first_name, :last_name, :email, :practitioner_type, :code, practice_ids: [],
address_attributes: [:id, :street_1, :street_2, :city, :county, :postcode])
end
end
| Order doctors by last name | Order doctors by last name
| Ruby | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | ruby | ## Code Before:
class DoctorsController < RenalwareController
include Pageable
def index
@doctors = Doctor.page(@page).per(@per_page)
end
def new
@doctor = Doctor.new
end
def edit
@doctor = Doctor.find(params[:id])
end
def create
if service.update!(doctor_params)
redirect_to doctors_path
else
render :new, alert: 'Failed to create new Doctor'
end
end
def update
if service.update!(doctor_params)
redirect_to doctors_path
else
render :edit, alert: 'Failed to update Doctor'
end
end
def destroy
if Doctor.destroy(params[:id])
redirect_to doctors_path, notice: 'Doctor successfully deleted'
else
render :index, alert: 'Failed to delete Doctor'
end
end
private
def service
@doctor = Doctor.find_or_initialize_by(id: params[:id])
DoctorService.new(@doctor)
end
def doctor_params
params.require(:doctor).permit(
:first_name, :last_name, :email, :practitioner_type, :code, practice_ids: [],
address_attributes: [:id, :street_1, :street_2, :city, :county, :postcode])
end
end
## Instruction:
Order doctors by last name
## Code After:
class DoctorsController < RenalwareController
include Pageable
def index
@doctors = Doctor.order(:last_name).page(@page).per(@per_page)
end
def new
@doctor = Doctor.new
end
def edit
@doctor = Doctor.find(params[:id])
end
def create
if service.update!(doctor_params)
redirect_to doctors_path
else
render :new, alert: 'Failed to create new Doctor'
end
end
def update
if service.update!(doctor_params)
redirect_to doctors_path
else
render :edit, alert: 'Failed to update Doctor'
end
end
def destroy
if Doctor.destroy(params[:id])
redirect_to doctors_path, notice: 'Doctor successfully deleted'
else
render :index, alert: 'Failed to delete Doctor'
end
end
private
def service
@doctor = Doctor.find_or_initialize_by(id: params[:id])
DoctorService.new(@doctor)
end
def doctor_params
params.require(:doctor).permit(
:first_name, :last_name, :email, :practitioner_type, :code, practice_ids: [],
address_attributes: [:id, :street_1, :street_2, :city, :county, :postcode])
end
end
| class DoctorsController < RenalwareController
include Pageable
def index
- @doctors = Doctor.page(@page).per(@per_page)
+ @doctors = Doctor.order(:last_name).page(@page).per(@per_page)
? ++++++++++++++++++
end
def new
@doctor = Doctor.new
end
def edit
@doctor = Doctor.find(params[:id])
end
def create
if service.update!(doctor_params)
redirect_to doctors_path
else
render :new, alert: 'Failed to create new Doctor'
end
end
def update
if service.update!(doctor_params)
redirect_to doctors_path
else
render :edit, alert: 'Failed to update Doctor'
end
end
def destroy
if Doctor.destroy(params[:id])
redirect_to doctors_path, notice: 'Doctor successfully deleted'
else
render :index, alert: 'Failed to delete Doctor'
end
end
private
def service
@doctor = Doctor.find_or_initialize_by(id: params[:id])
DoctorService.new(@doctor)
end
def doctor_params
params.require(:doctor).permit(
:first_name, :last_name, :email, :practitioner_type, :code, practice_ids: [],
address_attributes: [:id, :street_1, :street_2, :city, :county, :postcode])
end
end | 2 | 0.038462 | 1 | 1 |
0c3f72c04f6977a41b012d9c2b60c9f7077503f5 | recipes-core/init-ifupdown/init-ifupdown-1.0/wifi/pre_up.sh | recipes-core/init-ifupdown/init-ifupdown-1.0/wifi/pre_up.sh |
test -r /etc/network/wifi/defaults && source /etc/network/wifi/defaults
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant stop
if [ grep ${wifi_module} ${wifi_modprobe_loaded_path} ]; then
if [ $(lsmod | grep $wifi_module | wc -l) -eq 0 ]; then
modprobe $wifi_module
fi
else
exit 1
fi
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant start
|
test -r /etc/network/wifi/defaults && source /etc/network/wifi/defaults
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant stop
f [ -f /data/.shadow/.etc/wpa_supplicant.conf ] && grep -q ${wifi_module} ${wifi_modprobe_loaded_path}; then
if [ $(lsmod | grep $wifi_module | wc -l) -eq 0 ]; then
modprobe $wifi_module
fi
else
exit 1
fi
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant start
| Check if wpa_supplicant.conf exists in .shadow dir | Check if wpa_supplicant.conf exists in .shadow dir
| Shell | mit | mrabe89sigma/rdm-meta-jens,tobw/meta-jens,zeretztkeG/meta-jens,rdm-dev/meta-jens,vmoesker/meta-jens,rdm-dev/meta-jens,vmoesker/meta-jens,mrabe89sigma/rdm-meta-jens,mrabe89sigma/rdm-meta-jens,vmoesker/meta-jens,zeretztkeG/meta-jens,vmoesker/meta-jens,mrabe89sigma/meta-jens,zeretztkeG/meta-jens,rdm-dev/meta-jens,mrabe89sigma/meta-jens,tobw/meta-jens,zeretztkeG/meta-jens,mrabe89sigma/rdm-meta-jens,mrabe89sigma/meta-jens,tobw/meta-jens,mrabe89sigma/meta-jens,rdm-dev/meta-jens,tobw/meta-jens | shell | ## Code Before:
test -r /etc/network/wifi/defaults && source /etc/network/wifi/defaults
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant stop
if [ grep ${wifi_module} ${wifi_modprobe_loaded_path} ]; then
if [ $(lsmod | grep $wifi_module | wc -l) -eq 0 ]; then
modprobe $wifi_module
fi
else
exit 1
fi
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant start
## Instruction:
Check if wpa_supplicant.conf exists in .shadow dir
## Code After:
test -r /etc/network/wifi/defaults && source /etc/network/wifi/defaults
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant stop
f [ -f /data/.shadow/.etc/wpa_supplicant.conf ] && grep -q ${wifi_module} ${wifi_modprobe_loaded_path}; then
if [ $(lsmod | grep $wifi_module | wc -l) -eq 0 ]; then
modprobe $wifi_module
fi
else
exit 1
fi
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant start
|
test -r /etc/network/wifi/defaults && source /etc/network/wifi/defaults
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant stop
- if [ grep ${wifi_module} ${wifi_modprobe_loaded_path} ]; then
+ f [ -f /data/.shadow/.etc/wpa_supplicant.conf ] && grep -q ${wifi_module} ${wifi_modprobe_loaded_path}; then
if [ $(lsmod | grep $wifi_module | wc -l) -eq 0 ]; then
modprobe $wifi_module
fi
else
exit 1
fi
test -x /etc/network/if-pre-up.d/wpa-supplicant && /etc/network/if-pre-up.d/wpa-supplicant start | 2 | 0.142857 | 1 | 1 |
ef1f544967a35838a9e056bbfda93157ff031136 | test/fakeweb_helper.rb | test/fakeweb_helper.rb | require 'fakeweb'
FakeWeb.allow_net_connect = false
def fake(routes)
routes.map { |k, v|
# Ghetto globbing
if k[1].is_a?(String)
k[1].gsub!("*", "[^/]*")
k[1] = Regexp.new("^#{k[1]}$")
end
[k, v]
}.each do |url, filename|
file = File.join("test", "fixtures", "#{filename}.response")
FakeWeb.register_uri(url[0], url[1], :response => file)
end
end
| require 'fakeweb'
FakeWeb.allow_net_connect = %r[^https?://codeclimate.com/]
def fake(routes)
routes.map { |k, v|
# Ghetto globbing
if k[1].is_a?(String)
k[1].gsub!("*", "[^/]*")
k[1] = Regexp.new("^#{k[1]}$")
end
[k, v]
}.each do |url, filename|
file = File.join("test", "fixtures", "#{filename}.response")
FakeWeb.register_uri(url[0], url[1], :response => file)
end
end
| Allow FakeWeb to connection to CodeClimate. | Allow FakeWeb to connection to CodeClimate.
| Ruby | apache-2.0 | jcoady9/hummingbird,qgustavor/hummingbird,qgustavor/hummingbird,astraldragon/hummingbird,astraldragon/hummingbird,wlads/hummingbird,sidaga/hummingbird,MiLk/hummingbird,qgustavor/hummingbird,Snitzle/hummingbird,vevix/hummingbird,wlads/hummingbird,sidaga/hummingbird,paladique/hummingbird,sidaga/hummingbird,synthtech/hummingbird,wlads/hummingbird,astraldragon/hummingbird,jcoady9/hummingbird,hummingbird-me/hummingbird,NuckChorris/hummingbird,saintsantos/hummingbird,Snitzle/hummingbird,Snitzle/hummingbird,MiLk/hummingbird,sidaga/hummingbird,xhocquet/hummingbird,astraldragon/hummingbird,synthtech/hummingbird,NuckChorris/hummingbird,erengy/hummingbird,erengy/hummingbird,MiLk/hummingbird,saintsantos/hummingbird,erengy/hummingbird,NuckChorris/hummingbird,vevix/hummingbird,MiLk/hummingbird,xhocquet/hummingbird,wlads/hummingbird,paladique/hummingbird,xhocquet/hummingbird,xhocquet/hummingbird,paladique/hummingbird,erengy/hummingbird,Snitzle/hummingbird,cybrox/hummingbird,xhocquet/hummingbird,jcoady9/hummingbird,saintsantos/hummingbird,vevix/hummingbird,qgustavor/hummingbird,xhocquet/hummingbird,paladique/hummingbird,xhocquet/hummingbird,vevix/hummingbird,saintsantos/hummingbird,jcoady9/hummingbird,NuckChorris/hummingbird,hummingbird-me/hummingbird | ruby | ## Code Before:
require 'fakeweb'
FakeWeb.allow_net_connect = false
def fake(routes)
routes.map { |k, v|
# Ghetto globbing
if k[1].is_a?(String)
k[1].gsub!("*", "[^/]*")
k[1] = Regexp.new("^#{k[1]}$")
end
[k, v]
}.each do |url, filename|
file = File.join("test", "fixtures", "#{filename}.response")
FakeWeb.register_uri(url[0], url[1], :response => file)
end
end
## Instruction:
Allow FakeWeb to connection to CodeClimate.
## Code After:
require 'fakeweb'
FakeWeb.allow_net_connect = %r[^https?://codeclimate.com/]
def fake(routes)
routes.map { |k, v|
# Ghetto globbing
if k[1].is_a?(String)
k[1].gsub!("*", "[^/]*")
k[1] = Regexp.new("^#{k[1]}$")
end
[k, v]
}.each do |url, filename|
file = File.join("test", "fixtures", "#{filename}.response")
FakeWeb.register_uri(url[0], url[1], :response => file)
end
end
| require 'fakeweb'
- FakeWeb.allow_net_connect = false
+ FakeWeb.allow_net_connect = %r[^https?://codeclimate.com/]
def fake(routes)
routes.map { |k, v|
# Ghetto globbing
if k[1].is_a?(String)
k[1].gsub!("*", "[^/]*")
k[1] = Regexp.new("^#{k[1]}$")
end
[k, v]
}.each do |url, filename|
file = File.join("test", "fixtures", "#{filename}.response")
FakeWeb.register_uri(url[0], url[1], :response => file)
end
end | 2 | 0.117647 | 1 | 1 |
b2c7d6ac147c8b1a4bf1320b4da0c1c2c7633082 | app/models/revision.rb | app/models/revision.rb | class Revision < ActiveRecord::Base
has_many :revision_fields, inverse_of: :revision
has_many :revision_tags, inverse_of: :revision
belongs_to :tiddler, inverse_of: :revisions
validates_presence_of :title, :tiddler, :content_type
alias_method :tags, :revision_tags
alias_method :fields, :revision_fields
def read_only?
new_record? ? false : true
end
def add_tags new_tags
new_tags.each {|name| tags.build name: name }
new_tags
end
def add_fields new_fields
new_fields.each {|k, v| fields.build key: k, value: v }
new_fields
end
end
| class Revision < ActiveRecord::Base
has_many :revision_fields, inverse_of: :revision
has_many :revision_tags, inverse_of: :revision
belongs_to :tiddler, inverse_of: :revisions
validates_presence_of :title, :tiddler
before_save :set_defaults
alias_method :tags, :revision_tags
alias_method :fields, :revision_fields
def read_only?
new_record? ? false : true
end
def add_tags new_tags
new_tags.each {|name| tags.build name: name }
new_tags
end
def add_fields new_fields
new_fields.each {|k, v| fields.build key: k, value: v }
new_fields
end
protected
def set_defaults
self.content_type ||= 'text/x-markdown'
end
end
| Set default content type to markdown | Set default content type to markdown
| Ruby | bsd-3-clause | bengillies/federacy,bengillies/federacy | ruby | ## Code Before:
class Revision < ActiveRecord::Base
has_many :revision_fields, inverse_of: :revision
has_many :revision_tags, inverse_of: :revision
belongs_to :tiddler, inverse_of: :revisions
validates_presence_of :title, :tiddler, :content_type
alias_method :tags, :revision_tags
alias_method :fields, :revision_fields
def read_only?
new_record? ? false : true
end
def add_tags new_tags
new_tags.each {|name| tags.build name: name }
new_tags
end
def add_fields new_fields
new_fields.each {|k, v| fields.build key: k, value: v }
new_fields
end
end
## Instruction:
Set default content type to markdown
## Code After:
class Revision < ActiveRecord::Base
has_many :revision_fields, inverse_of: :revision
has_many :revision_tags, inverse_of: :revision
belongs_to :tiddler, inverse_of: :revisions
validates_presence_of :title, :tiddler
before_save :set_defaults
alias_method :tags, :revision_tags
alias_method :fields, :revision_fields
def read_only?
new_record? ? false : true
end
def add_tags new_tags
new_tags.each {|name| tags.build name: name }
new_tags
end
def add_fields new_fields
new_fields.each {|k, v| fields.build key: k, value: v }
new_fields
end
protected
def set_defaults
self.content_type ||= 'text/x-markdown'
end
end
| class Revision < ActiveRecord::Base
has_many :revision_fields, inverse_of: :revision
has_many :revision_tags, inverse_of: :revision
belongs_to :tiddler, inverse_of: :revisions
- validates_presence_of :title, :tiddler, :content_type
? ---------------
+ validates_presence_of :title, :tiddler
+
+ before_save :set_defaults
alias_method :tags, :revision_tags
alias_method :fields, :revision_fields
def read_only?
new_record? ? false : true
end
def add_tags new_tags
new_tags.each {|name| tags.build name: name }
new_tags
end
def add_fields new_fields
new_fields.each {|k, v| fields.build key: k, value: v }
new_fields
end
+
+ protected
+
+ def set_defaults
+ self.content_type ||= 'text/x-markdown'
+ end
+
end | 11 | 0.458333 | 10 | 1 |
29aca13ff3901b17d41aee6d5d0d18891c9c208f | app/assets/stylesheets/express_admin/shared/_panels.sass | app/assets/stylesheets/express_admin/shared/_panels.sass | .panel
display: block
p
clear: both
[data-gallery]
a.panel
margin-bottom: 0
@include clearfix
&:hover
@include panel-callout
a.callout:hover
cursor: default
| .panel
display: block
p
clear: both
[data-gallery]
a.panel
margin-bottom: 0
transition: background 0.2s ease
@include clearfix
i
transition: color 0.2s ease
&:hover
@include panel-callout
a.callout:hover
cursor: default
| Add transition property to module panel background color and icon color | Add transition property to module panel background color and icon color
| Sass | mit | aelogica/express_admin,aelogica/express_admin,aelogica/express_admin,aelogica/express_admin | sass | ## Code Before:
.panel
display: block
p
clear: both
[data-gallery]
a.panel
margin-bottom: 0
@include clearfix
&:hover
@include panel-callout
a.callout:hover
cursor: default
## Instruction:
Add transition property to module panel background color and icon color
## Code After:
.panel
display: block
p
clear: both
[data-gallery]
a.panel
margin-bottom: 0
transition: background 0.2s ease
@include clearfix
i
transition: color 0.2s ease
&:hover
@include panel-callout
a.callout:hover
cursor: default
| .panel
display: block
p
clear: both
[data-gallery]
a.panel
margin-bottom: 0
+ transition: background 0.2s ease
@include clearfix
+
+ i
+ transition: color 0.2s ease
&:hover
@include panel-callout
a.callout:hover
cursor: default | 4 | 0.25 | 4 | 0 |
8caa309f6a807555825f277e5f277007544b9957 | js/end_game.js | js/end_game.js | var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
return player.loseLife()
}
return false
}
function gameOver() {
console.log('game over!')
alert('Game Over!');
window.location.reload()
}
| var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
if (stillBricks(game.bricks)) {
winGame()
}
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
console.log("Lost Life")
return player.loseLife()
};
}
function gameOver() {
console.log('game over!')
alert('Game Over!');
window.location.reload()
}
function winGame() {
console.log("You Win!")
alert("You are the Winner")
window.location.reload()
}
var stillBricks = function (bricks) {
var counter = 0
for (var layer in bricks){
bricks[layer].map(function(brick){
if (brick == null){
counter += 1;
};
});
}
if (counter == 16){
return true
}
}
| Implement win game prompt after all bricks destroyed | Implement win game prompt after all bricks destroyed
| JavaScript | mit | theomarkkuspaul/Brick-Breaker,theomarkkuspaul/Brick-Breaker | javascript | ## Code Before:
var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
return player.loseLife()
}
return false
}
function gameOver() {
console.log('game over!')
alert('Game Over!');
window.location.reload()
}
## Instruction:
Implement win game prompt after all bricks destroyed
## Code After:
var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
if (stillBricks(game.bricks)) {
winGame()
}
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
console.log("Lost Life")
return player.loseLife()
};
}
function gameOver() {
console.log('game over!')
alert('Game Over!');
window.location.reload()
}
function winGame() {
console.log("You Win!")
alert("You are the Winner")
window.location.reload()
}
var stillBricks = function (bricks) {
var counter = 0
for (var layer in bricks){
bricks[layer].map(function(brick){
if (brick == null){
counter += 1;
};
});
}
if (counter == 16){
return true
}
}
| var endGame = function(game){
if (game.player.lives > 0) {
missBall(game.ball, game.player)
} else if (game.player.lives <= 0 ){
gameOver()
}
+ if (stillBricks(game.bricks)) {
+ winGame()
+ }
}
var missBall = function(ball, player){
if ( ball.bottomEdge().y == canvas.height){
+ console.log("Lost Life")
return player.loseLife()
- }
+ };
? +
- return false
}
function gameOver() {
console.log('game over!')
alert('Game Over!');
window.location.reload()
}
+
+ function winGame() {
+ console.log("You Win!")
+ alert("You are the Winner")
+ window.location.reload()
+ }
+
+ var stillBricks = function (bricks) {
+ var counter = 0
+ for (var layer in bricks){
+ bricks[layer].map(function(brick){
+ if (brick == null){
+ counter += 1;
+ };
+ });
+ }
+ if (counter == 16){
+ return true
+ }
+ } | 27 | 1.285714 | 25 | 2 |
71780c84c7fe2e7391e1f845899c19522c56b782 | db/views/trade_shipments_appendix_i_view/20180509135814.sql | db/views/trade_shipments_appendix_i_view/20180509135814.sql | SELECT DISTINCT ts.*
FROM trade_shipments_with_taxa_view ts
INNER JOIN trade_codes s ON ts.source_id = s.id
INNER JOIN trade_codes p ON ts.purpose_id = p.id
INNER JOIN listing_changes lc ON ts.taxon_concept_id = lc.taxon_concept_id
INNER JOIN species_listings sl ON lc.species_listing_id = sl.id
WHERE ts.appendix = 'I'
AND lc.is_current
AND ts.year >= to_char(lc.effective_at, 'YYYY')::int
AND p.type = 'Purpose'
AND p.code = 'T'
AND s.type = 'Source'
AND s.code = 'W'
| SELECT DISTINCT ts.*, s.code AS source, p.code AS purpose, t.code AS term, u.code AS unit, e.iso_code2 AS exporter, i.iso_code2 AS importer, o.iso_code2 AS origin
FROM trade_shipments_with_taxa_view ts
INNER JOIN trade_codes s ON ts.source_id = s.id
INNER JOIN trade_codes p ON ts.purpose_id = p.id
LEFT OUTER JOIN trade_codes t ON ts.term_id = t.id
LEFT OUTER JOIN trade_codes u ON ts.unit_id = u.id
LEFT OUTER JOIN geo_entities e ON ts.exporter_id = e.id
LEFT OUTER JOIN geo_entities i ON ts.importer_id = i.id
LEFT OUTER JOIN geo_entities o ON ts.country_of_origin_id = o.id
WHERE ts.appendix = 'I'
AND p.type = 'Purpose'
AND p.code = 'T'
AND s.type = 'Source'
AND s.code = 'W'
| Simplify query to only use shipments information | Simplify query to only use shipments information
| SQL | bsd-3-clause | unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI | sql | ## Code Before:
SELECT DISTINCT ts.*
FROM trade_shipments_with_taxa_view ts
INNER JOIN trade_codes s ON ts.source_id = s.id
INNER JOIN trade_codes p ON ts.purpose_id = p.id
INNER JOIN listing_changes lc ON ts.taxon_concept_id = lc.taxon_concept_id
INNER JOIN species_listings sl ON lc.species_listing_id = sl.id
WHERE ts.appendix = 'I'
AND lc.is_current
AND ts.year >= to_char(lc.effective_at, 'YYYY')::int
AND p.type = 'Purpose'
AND p.code = 'T'
AND s.type = 'Source'
AND s.code = 'W'
## Instruction:
Simplify query to only use shipments information
## Code After:
SELECT DISTINCT ts.*, s.code AS source, p.code AS purpose, t.code AS term, u.code AS unit, e.iso_code2 AS exporter, i.iso_code2 AS importer, o.iso_code2 AS origin
FROM trade_shipments_with_taxa_view ts
INNER JOIN trade_codes s ON ts.source_id = s.id
INNER JOIN trade_codes p ON ts.purpose_id = p.id
LEFT OUTER JOIN trade_codes t ON ts.term_id = t.id
LEFT OUTER JOIN trade_codes u ON ts.unit_id = u.id
LEFT OUTER JOIN geo_entities e ON ts.exporter_id = e.id
LEFT OUTER JOIN geo_entities i ON ts.importer_id = i.id
LEFT OUTER JOIN geo_entities o ON ts.country_of_origin_id = o.id
WHERE ts.appendix = 'I'
AND p.type = 'Purpose'
AND p.code = 'T'
AND s.type = 'Source'
AND s.code = 'W'
| - SELECT DISTINCT ts.*
+ SELECT DISTINCT ts.*, s.code AS source, p.code AS purpose, t.code AS term, u.code AS unit, e.iso_code2 AS exporter, i.iso_code2 AS importer, o.iso_code2 AS origin
FROM trade_shipments_with_taxa_view ts
INNER JOIN trade_codes s ON ts.source_id = s.id
INNER JOIN trade_codes p ON ts.purpose_id = p.id
- INNER JOIN listing_changes lc ON ts.taxon_concept_id = lc.taxon_concept_id
- INNER JOIN species_listings sl ON lc.species_listing_id = sl.id
+ LEFT OUTER JOIN trade_codes t ON ts.term_id = t.id
+ LEFT OUTER JOIN trade_codes u ON ts.unit_id = u.id
+ LEFT OUTER JOIN geo_entities e ON ts.exporter_id = e.id
+ LEFT OUTER JOIN geo_entities i ON ts.importer_id = i.id
+ LEFT OUTER JOIN geo_entities o ON ts.country_of_origin_id = o.id
WHERE ts.appendix = 'I'
- AND lc.is_current
- AND ts.year >= to_char(lc.effective_at, 'YYYY')::int
AND p.type = 'Purpose'
AND p.code = 'T'
AND s.type = 'Source'
AND s.code = 'W' | 11 | 0.846154 | 6 | 5 |
8c03f593dc9cb92f337fc64d9548435d1c41a963 | README.md | README.md | PythonForPi
===========
Python test code written for a four node Raspberry Pi cluster. CSCE Capstone Project - Spring 2014
| PythonForPi
===========
Our team building a four node Raspberry Pi cluster for out CSCE Capstone Project - Spring 2014. This repository is to hold all of our set up instructions test code, and actual project code for all to see, use and build off of.
| Update ReadMe with a more current project description. | Update ReadMe with a more current project description.
| Markdown | mit | BrennaBlackwell/PythonForPi,BrennaBlackwell/PythonForPi,BrennaBlackwell/PythonForPi | markdown | ## Code Before:
PythonForPi
===========
Python test code written for a four node Raspberry Pi cluster. CSCE Capstone Project - Spring 2014
## Instruction:
Update ReadMe with a more current project description.
## Code After:
PythonForPi
===========
Our team building a four node Raspberry Pi cluster for out CSCE Capstone Project - Spring 2014. This repository is to hold all of our set up instructions test code, and actual project code for all to see, use and build off of.
| PythonForPi
===========
- Python test code written for a four node Raspberry Pi cluster. CSCE Capstone Project - Spring 2014
+ Our team building a four node Raspberry Pi cluster for out CSCE Capstone Project - Spring 2014. This repository is to hold all of our set up instructions test code, and actual project code for all to see, use and build off of. | 2 | 0.5 | 1 | 1 |
aeb06f15645f9c447fe42833a890c72a7b80e6c2 | source/javascripts/main.js | source/javascripts/main.js | $(document).ready(function() {
// remove class if javascript is enabled
$("body").removeClass("no-js");
// to pop out videos so they play in the browser for users with js
$('.video').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1&controls=2&enablejsapi=1&modestbranding=1&rel=0&showinfo=0'
}
},
srcAction: 'iframe_src'
}
});
// For top express checkout
// Initialize top number input spinner for express checkout
// Uses jquery ui to make it look pretty
$("#spinner").spinner();
$('.ui-spinner').bind('keyup mouseup', function() {
$('#spinner').css("color", "#000000");
$('#spinner-bottom').css("color", "#000000");
var input_amount = $('#spinner').val();
});
// For bottom express checkout
// Initialize bottom number input spinner for express checkout
$("#spinner-bottom").spinner();
});
| $(document).ready(function() {
// remove class if javascript is enabled
$("body").removeClass("no-js");
// to pop out videos so they play in the browser for users with js
$('.video').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1&controls=2&enablejsapi=1&modestbranding=1&rel=0&showinfo=0'
}
},
srcAction: 'iframe_src'
}
});
});
| Remove the rest of the spinner js since no input | Remove the rest of the spinner js since no input
| JavaScript | mit | texastribune/donation-builder,texastribune/donation-builder,texastribune/donation-builder | javascript | ## Code Before:
$(document).ready(function() {
// remove class if javascript is enabled
$("body").removeClass("no-js");
// to pop out videos so they play in the browser for users with js
$('.video').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1&controls=2&enablejsapi=1&modestbranding=1&rel=0&showinfo=0'
}
},
srcAction: 'iframe_src'
}
});
// For top express checkout
// Initialize top number input spinner for express checkout
// Uses jquery ui to make it look pretty
$("#spinner").spinner();
$('.ui-spinner').bind('keyup mouseup', function() {
$('#spinner').css("color", "#000000");
$('#spinner-bottom').css("color", "#000000");
var input_amount = $('#spinner').val();
});
// For bottom express checkout
// Initialize bottom number input spinner for express checkout
$("#spinner-bottom").spinner();
});
## Instruction:
Remove the rest of the spinner js since no input
## Code After:
$(document).ready(function() {
// remove class if javascript is enabled
$("body").removeClass("no-js");
// to pop out videos so they play in the browser for users with js
$('.video').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1&controls=2&enablejsapi=1&modestbranding=1&rel=0&showinfo=0'
}
},
srcAction: 'iframe_src'
}
});
});
| $(document).ready(function() {
// remove class if javascript is enabled
$("body").removeClass("no-js");
// to pop out videos so they play in the browser for users with js
$('.video').magnificPopup({
type: 'iframe',
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1&controls=2&enablejsapi=1&modestbranding=1&rel=0&showinfo=0'
}
},
srcAction: 'iframe_src'
}
});
-
-
- // For top express checkout
-
- // Initialize top number input spinner for express checkout
- // Uses jquery ui to make it look pretty
- $("#spinner").spinner();
-
- $('.ui-spinner').bind('keyup mouseup', function() {
- $('#spinner').css("color", "#000000");
- $('#spinner-bottom').css("color", "#000000");
- var input_amount = $('#spinner').val();
- });
-
-
- // For bottom express checkout
-
- // Initialize bottom number input spinner for express checkout
- $("#spinner-bottom").spinner();
-
}); | 20 | 0.465116 | 0 | 20 |
23bca4acacabf3a2a741b9c3d38e7d517ce67f44 | unit-tests/ci/install_apc.sh | unit-tests/ci/install_apc.sh |
if [ "`php -r 'echo substr(PHP_VERSION, 0, 3);'`" = "5.3" ]; then
wget http://pecl.php.net/get/apc-3.1.9.tgz
tar -xzf apc-3.1.9.tgz
sh -c "cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install"
else
wget http://pecl.php.net/get/apc-3.1.13.tgz
tar -xzf apc-3.1.13.tgz
sh -c "cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install"
fi
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
echo "apc.enable_cli = On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
if [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.3" ]; then
wget http://pecl.php.net/get/apc-3.1.9.tgz
tar -xzf apc-3.1.9.tgz
( cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install )
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
elif [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.5" ]; then
wget http://pecl.php.net/get/apcu-4.0.1.tgz
tar xzf apcu-4.0.1.tgz
( cd apcu-4.0.1 && phpize && ./configure && make && sudo make install )
echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
else
wget http://pecl.php.net/get/apc-3.1.13.tgz
tar -xzf apc-3.1.13.tgz
( cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install )
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
fi
echo "apc.enable_cli = On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
| Use APCu for PHP 5.5 | Use APCu for PHP 5.5
| Shell | bsd-2-clause | unisys12/phalcon-hhvm,Zaszczyk/cphalcon,Zaszczyk/cphalcon,unisys12/phalcon-hhvm,unisys12/phalcon-hhvm,unisys12/phalcon-hhvm,Zaszczyk/cphalcon,unisys12/phalcon-hhvm,unisys12/phalcon-hhvm,Zaszczyk/cphalcon | shell | ## Code Before:
if [ "`php -r 'echo substr(PHP_VERSION, 0, 3);'`" = "5.3" ]; then
wget http://pecl.php.net/get/apc-3.1.9.tgz
tar -xzf apc-3.1.9.tgz
sh -c "cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install"
else
wget http://pecl.php.net/get/apc-3.1.13.tgz
tar -xzf apc-3.1.13.tgz
sh -c "cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install"
fi
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
echo "apc.enable_cli = On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
## Instruction:
Use APCu for PHP 5.5
## Code After:
if [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.3" ]; then
wget http://pecl.php.net/get/apc-3.1.9.tgz
tar -xzf apc-3.1.9.tgz
( cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install )
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
elif [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.5" ]; then
wget http://pecl.php.net/get/apcu-4.0.1.tgz
tar xzf apcu-4.0.1.tgz
( cd apcu-4.0.1 && phpize && ./configure && make && sudo make install )
echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
else
wget http://pecl.php.net/get/apc-3.1.13.tgz
tar -xzf apc-3.1.13.tgz
( cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install )
echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
fi
echo "apc.enable_cli = On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
- if [ "`php -r 'echo substr(PHP_VERSION, 0, 3);'`" = "5.3" ]; then
? ^ ^
+ if [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.3" ]; then
? ^^ ^
wget http://pecl.php.net/get/apc-3.1.9.tgz
tar -xzf apc-3.1.9.tgz
- sh -c "cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install"
? ^^ ---- ^
+ ( cd APC-3.1.9 && phpize && ./configure --enable-apc && make && sudo make install )
? ^ ^^
+ echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
+ elif [ "$(php -r 'echo substr(PHP_VERSION, 0, 3);')" = "5.5" ]; then
+ wget http://pecl.php.net/get/apcu-4.0.1.tgz
+ tar xzf apcu-4.0.1.tgz
+ ( cd apcu-4.0.1 && phpize && ./configure && make && sudo make install )
+ echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
else
wget http://pecl.php.net/get/apc-3.1.13.tgz
tar -xzf apc-3.1.13.tgz
- sh -c "cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install"
? ^^ ---- ^
+ ( cd APC-3.1.13 && phpize && ./configure --enable-apc && make && sudo make install )
? ^ ^^
+ echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
fi
- echo "extension=apc.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
echo "apc.enable_cli = On" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` | 14 | 1.076923 | 10 | 4 |
26dda81d16fdf8db413d1bf0dca793c94901671a | _posts/2020-06-24-fix-error-NU1101.md | _posts/2020-06-24-fix-error-NU1101.md | ---
layout: post
title: Fix error NU1101\: Unable to find package. No packages exist with this id in source(s)\: Microsoft Visual Studio Offline Packages
tags: Azure DevOps, DevOps
---
I use Azure DevOps as my build pipelines for a lot of projects, I have faced the following error recently:
> Unable to find package AutoFixture. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
I found that there are two easy ways to fix this error hence I am writing them here as self-reminder for the solutions.
## Option A: Add nuget.config
Add a nuget.config to the solution directory with resolve the issue
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
```
## Option B: Add Restore Packages step to the build pipeline
Add the following dotnet restore step to the build pipeline with `includeNuGetOrg: true` would resolve the issue
```yaml
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '$(serviceLocation)/**/*.csproj'
includeNuGetOrg: true
```
Remember to add the private package feeds if you are using any.
I hope that helps.
| ---
layout: post
title: Fix error NU1101: Unable to find package. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
tags: Azure DevOps, DevOps
---
I use Azure DevOps as my build pipelines for a lot of projects, I have faced the following error recently:
> Unable to find package AutoFixture. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
I found that there are two easy ways to fix this error hence I am writing them here as self-reminder for the solutions.
## Option A: Add nuget.config
Add a nuget.config to the solution directory with resolve the issue
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
```
## Option B: Add Restore Packages step to the build pipeline
Add the following dotnet restore step to the build pipeline with `includeNuGetOrg: true` would resolve the issue
```yaml
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '$(serviceLocation)/**/*.csproj'
includeNuGetOrg: true
```
Remember to add the private package feeds if you are using any.
I hope that helps.
| Update the colon in the title | Update the colon in the title | Markdown | mit | hossambarakat/hossambarakat.github.io,hossambarakat/hossambarakat.github.io,hossambarakat/hossambarakat.github.io | markdown | ## Code Before:
---
layout: post
title: Fix error NU1101\: Unable to find package. No packages exist with this id in source(s)\: Microsoft Visual Studio Offline Packages
tags: Azure DevOps, DevOps
---
I use Azure DevOps as my build pipelines for a lot of projects, I have faced the following error recently:
> Unable to find package AutoFixture. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
I found that there are two easy ways to fix this error hence I am writing them here as self-reminder for the solutions.
## Option A: Add nuget.config
Add a nuget.config to the solution directory with resolve the issue
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
```
## Option B: Add Restore Packages step to the build pipeline
Add the following dotnet restore step to the build pipeline with `includeNuGetOrg: true` would resolve the issue
```yaml
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '$(serviceLocation)/**/*.csproj'
includeNuGetOrg: true
```
Remember to add the private package feeds if you are using any.
I hope that helps.
## Instruction:
Update the colon in the title
## Code After:
---
layout: post
title: Fix error NU1101: Unable to find package. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
tags: Azure DevOps, DevOps
---
I use Azure DevOps as my build pipelines for a lot of projects, I have faced the following error recently:
> Unable to find package AutoFixture. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
I found that there are two easy ways to fix this error hence I am writing them here as self-reminder for the solutions.
## Option A: Add nuget.config
Add a nuget.config to the solution directory with resolve the issue
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
```
## Option B: Add Restore Packages step to the build pipeline
Add the following dotnet restore step to the build pipeline with `includeNuGetOrg: true` would resolve the issue
```yaml
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '$(serviceLocation)/**/*.csproj'
includeNuGetOrg: true
```
Remember to add the private package feeds if you are using any.
I hope that helps.
| ---
layout: post
- title: Fix error NU1101\: Unable to find package. No packages exist with this id in source(s)\: Microsoft Visual Studio Offline Packages
? ^^ ^^
+ title: Fix error NU1101: Unable to find package. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
? ^^^^^ ^^^^^
tags: Azure DevOps, DevOps
---
I use Azure DevOps as my build pipelines for a lot of projects, I have faced the following error recently:
> Unable to find package AutoFixture. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
I found that there are two easy ways to fix this error hence I am writing them here as self-reminder for the solutions.
## Option A: Add nuget.config
Add a nuget.config to the solution directory with resolve the issue
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
```
## Option B: Add Restore Packages step to the build pipeline
Add the following dotnet restore step to the build pipeline with `includeNuGetOrg: true` would resolve the issue
```yaml
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '$(serviceLocation)/**/*.csproj'
includeNuGetOrg: true
```
Remember to add the private package feeds if you are using any.
I hope that helps. | 2 | 0.05 | 1 | 1 |
360439e09e5f0bb014cf15a05b0824fcb8df3ce4 | tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy | tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/MiscTests.groovy | package org.apache.tapestry5.integration.app1
import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.apache.tapestry5.test.TapestryTestConfiguration
import org.testng.annotations.Test
@TapestryTestConfiguration(webAppFolder = "src/test/app1")
class MiscTests extends TapestryCoreTestCase {
@Test
void operation_tracking_via_annotation() {
openLinks "Operation Worker Demo", "throw exception"
assertTitle "Application Exception"
assertTextPresent "[Operation Description]"
}
@Test
void meta_tag_identifying_page_name_is_present()
{
openLinks "Zone Demo"
assertAttribute "//meta[@name='tapestry-page-name']/@content", "nested/ZoneDemo"
}
@Test
void ControlGroup_mixin() {
openLinks "Autocomplete Mixin Demo"
assertText "css=div.control-group > label", "Title"
// Using Geb, we could do a lot more. Sigh.
}
// TAP5-2045
@Test
void label_class_override()
{
openLinks "Override Label Class Demo"
assertSourcePresent "<label for=\"firstName\" class=\"control-label\">First Name</label>",
"<label for=\"lastName\" class=\"dummyClassName\">Last Name</label>"
}
}
| package org.apache.tapestry5.integration.app1
import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.apache.tapestry5.test.TapestryTestConfiguration
import org.testng.annotations.Test
@TapestryTestConfiguration(webAppFolder = "src/test/app1")
class MiscTests extends TapestryCoreTestCase {
@Test
void operation_tracking_via_annotation() {
openLinks "Operation Worker Demo", "throw exception"
assertTitle "Application Exception"
assertTextPresent "[Operation Description]"
}
@Test
void meta_tag_identifying_page_name_is_present()
{
openLinks "Zone Demo"
assertAttribute "//meta[@name='tapestry-page-name']/@content", "nested/ZoneDemo"
}
@Test
void FieldGroup_mixin() {
openLinks "Autocomplete Mixin Demo"
assertText "css=div.field-group > label", "Title"
// Using Geb, we could do a lot more. Sigh.
}
// TAP5-2045
@Test
void label_class_override()
{
openLinks "Override Label Class Demo"
assertSourcePresent "<label for=\"firstName\" class=\"control-label\">First Name</label>",
"<label for=\"lastName\" class=\"dummyClassName\">Last Name</label>"
}
}
| Correct test of FieldGroup mixin | Correct test of FieldGroup mixin
| Groovy | apache-2.0 | apache/tapestry-5,apache/tapestry-5,apache/tapestry-5,apache/tapestry-5,apache/tapestry-5 | groovy | ## Code Before:
package org.apache.tapestry5.integration.app1
import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.apache.tapestry5.test.TapestryTestConfiguration
import org.testng.annotations.Test
@TapestryTestConfiguration(webAppFolder = "src/test/app1")
class MiscTests extends TapestryCoreTestCase {
@Test
void operation_tracking_via_annotation() {
openLinks "Operation Worker Demo", "throw exception"
assertTitle "Application Exception"
assertTextPresent "[Operation Description]"
}
@Test
void meta_tag_identifying_page_name_is_present()
{
openLinks "Zone Demo"
assertAttribute "//meta[@name='tapestry-page-name']/@content", "nested/ZoneDemo"
}
@Test
void ControlGroup_mixin() {
openLinks "Autocomplete Mixin Demo"
assertText "css=div.control-group > label", "Title"
// Using Geb, we could do a lot more. Sigh.
}
// TAP5-2045
@Test
void label_class_override()
{
openLinks "Override Label Class Demo"
assertSourcePresent "<label for=\"firstName\" class=\"control-label\">First Name</label>",
"<label for=\"lastName\" class=\"dummyClassName\">Last Name</label>"
}
}
## Instruction:
Correct test of FieldGroup mixin
## Code After:
package org.apache.tapestry5.integration.app1
import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.apache.tapestry5.test.TapestryTestConfiguration
import org.testng.annotations.Test
@TapestryTestConfiguration(webAppFolder = "src/test/app1")
class MiscTests extends TapestryCoreTestCase {
@Test
void operation_tracking_via_annotation() {
openLinks "Operation Worker Demo", "throw exception"
assertTitle "Application Exception"
assertTextPresent "[Operation Description]"
}
@Test
void meta_tag_identifying_page_name_is_present()
{
openLinks "Zone Demo"
assertAttribute "//meta[@name='tapestry-page-name']/@content", "nested/ZoneDemo"
}
@Test
void FieldGroup_mixin() {
openLinks "Autocomplete Mixin Demo"
assertText "css=div.field-group > label", "Title"
// Using Geb, we could do a lot more. Sigh.
}
// TAP5-2045
@Test
void label_class_override()
{
openLinks "Override Label Class Demo"
assertSourcePresent "<label for=\"firstName\" class=\"control-label\">First Name</label>",
"<label for=\"lastName\" class=\"dummyClassName\">Last Name</label>"
}
}
| package org.apache.tapestry5.integration.app1
import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.apache.tapestry5.test.TapestryTestConfiguration
import org.testng.annotations.Test
@TapestryTestConfiguration(webAppFolder = "src/test/app1")
class MiscTests extends TapestryCoreTestCase {
@Test
void operation_tracking_via_annotation() {
openLinks "Operation Worker Demo", "throw exception"
assertTitle "Application Exception"
assertTextPresent "[Operation Description]"
}
@Test
void meta_tag_identifying_page_name_is_present()
{
openLinks "Zone Demo"
assertAttribute "//meta[@name='tapestry-page-name']/@content", "nested/ZoneDemo"
}
@Test
- void ControlGroup_mixin() {
? ^^^^^^
+ void FieldGroup_mixin() {
? ^^^ +
openLinks "Autocomplete Mixin Demo"
- assertText "css=div.control-group > label", "Title"
? ^^^^^^
+ assertText "css=div.field-group > label", "Title"
? ^^^ +
// Using Geb, we could do a lot more. Sigh.
}
// TAP5-2045
@Test
void label_class_override()
{
openLinks "Override Label Class Demo"
assertSourcePresent "<label for=\"firstName\" class=\"control-label\">First Name</label>",
"<label for=\"lastName\" class=\"dummyClassName\">Last Name</label>"
}
} | 4 | 0.083333 | 2 | 2 |
8891184b232879b80350fec7e2e7a6ce2f25c9fd | test/Lexer/digraph.c | test/Lexer/digraph.c | // RUN: clang -fsyntax-only %s
%:include <stdio.h>
%:ifndef BUFSIZE
%:define BUFSIZE 512
%:endif
void copy(char d<::>, const char s<::>, int len)
<%
while (len-- >= 0)
<%
d<:len:> = s<:len:>;
%>
%>
| // RUN: clang -fsyntax-only -verify < %s
%:include <stdio.h>
%:ifndef BUFSIZE
%:define BUFSIZE 512
%:endif
void copy(char d<::>, const char s<::>, int len)
<%
while (len-- >= 0)
<%
d<:len:> = s<:len:>;
%>
%>
| Fix the run line for this test. | Fix the run line for this test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@52169 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang | c | ## Code Before:
// RUN: clang -fsyntax-only %s
%:include <stdio.h>
%:ifndef BUFSIZE
%:define BUFSIZE 512
%:endif
void copy(char d<::>, const char s<::>, int len)
<%
while (len-- >= 0)
<%
d<:len:> = s<:len:>;
%>
%>
## Instruction:
Fix the run line for this test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@52169 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
// RUN: clang -fsyntax-only -verify < %s
%:include <stdio.h>
%:ifndef BUFSIZE
%:define BUFSIZE 512
%:endif
void copy(char d<::>, const char s<::>, int len)
<%
while (len-- >= 0)
<%
d<:len:> = s<:len:>;
%>
%>
| - // RUN: clang -fsyntax-only %s
+ // RUN: clang -fsyntax-only -verify < %s
? ++++++++++
%:include <stdio.h>
%:ifndef BUFSIZE
%:define BUFSIZE 512
%:endif
void copy(char d<::>, const char s<::>, int len)
<%
while (len-- >= 0)
<%
d<:len:> = s<:len:>;
%>
%> | 2 | 0.133333 | 1 | 1 |
b41922e8ab680a373e76a744ed8d9406cf2ab012 | lib/views/environment-header.less | lib/views/environment-header.less | .environment-header {
box-sizing: border-box;
position: absolute;
z-index: 600;
top: @navbar-height;
left: @bws-sidebar-width;
right: 0;
height: @environment-header-height;
ul {
.display-flex;
height: @environment-header-height - 1;
margin: 0;
list-style: none;
li {
@spacer: 20px;
.flex-basis(auto);
padding: 0 @spacer;
background-color: #fff;
border-width: 0 1px 1px 0;
border-style: solid;
border-right-color: #d9d9d9;
border-bottom-color: #cdcdcd;
line-height: @environment-header-height;
&:last-child {
border-right: none;
}
&.tab {
&.active {
&.services {
background-color: transparent;
border-bottom: none;
}
&.machines a {
background-color: #fff;
}
a {
height: @environment-header-height;
color: @text-colour;
}
}
}
&.spacer {
.flex(1);
}
a {
display: block;
margin: 0 (-@spacer);
padding: 0 @spacer;
}
}
}
}
body.state-sidebar-hidden .environment-header {
left: 0;
}
| .environment-header {
box-sizing: border-box;
position: absolute;
z-index: 600;
top: @navbar-height;
left: @bws-sidebar-width;
right: 0;
height: @environment-header-height;
ul {
.display-flex;
height: @environment-header-height - 1;
margin: 0;
list-style: none;
li {
@spacer: 20px;
.flex-basis(auto);
padding: 0 @spacer;
background-color: #fff;
border-width: 0 1px 1px 0;
border-style: solid;
border-right-color: #d9d9d9;
border-bottom-color: #cdcdcd;
line-height: @environment-header-height;
&:last-child {
border-right: none;
}
&.tab {
&.active {
&.services {
background-color: #f2f2f2;
border-bottom: none;
}
&.machines a {
background-color: #fff;
}
a {
height: @environment-header-height;
color: @text-colour;
}
}
}
&.spacer {
.flex(1);
}
a {
display: block;
margin: 0 (-@spacer);
padding: 0 @spacer;
}
}
}
}
body.state-sidebar-hidden .environment-header {
left: 0;
}
| Tweak service nav tab's background. | Tweak service nav tab's background.
Set the background to something that blends with the canvas, but won't
allow canvas elements (relations lines, services, etc.) to bleed
through.
| Less | agpl-3.0 | bac/juju-gui,bac/juju-gui,mitechie/juju-gui,mitechie/juju-gui,jrwren/juju-gui,mitechie/juju-gui,bac/juju-gui,mitechie/juju-gui,jrwren/juju-gui,jrwren/juju-gui,bac/juju-gui,jrwren/juju-gui | less | ## Code Before:
.environment-header {
box-sizing: border-box;
position: absolute;
z-index: 600;
top: @navbar-height;
left: @bws-sidebar-width;
right: 0;
height: @environment-header-height;
ul {
.display-flex;
height: @environment-header-height - 1;
margin: 0;
list-style: none;
li {
@spacer: 20px;
.flex-basis(auto);
padding: 0 @spacer;
background-color: #fff;
border-width: 0 1px 1px 0;
border-style: solid;
border-right-color: #d9d9d9;
border-bottom-color: #cdcdcd;
line-height: @environment-header-height;
&:last-child {
border-right: none;
}
&.tab {
&.active {
&.services {
background-color: transparent;
border-bottom: none;
}
&.machines a {
background-color: #fff;
}
a {
height: @environment-header-height;
color: @text-colour;
}
}
}
&.spacer {
.flex(1);
}
a {
display: block;
margin: 0 (-@spacer);
padding: 0 @spacer;
}
}
}
}
body.state-sidebar-hidden .environment-header {
left: 0;
}
## Instruction:
Tweak service nav tab's background.
Set the background to something that blends with the canvas, but won't
allow canvas elements (relations lines, services, etc.) to bleed
through.
## Code After:
.environment-header {
box-sizing: border-box;
position: absolute;
z-index: 600;
top: @navbar-height;
left: @bws-sidebar-width;
right: 0;
height: @environment-header-height;
ul {
.display-flex;
height: @environment-header-height - 1;
margin: 0;
list-style: none;
li {
@spacer: 20px;
.flex-basis(auto);
padding: 0 @spacer;
background-color: #fff;
border-width: 0 1px 1px 0;
border-style: solid;
border-right-color: #d9d9d9;
border-bottom-color: #cdcdcd;
line-height: @environment-header-height;
&:last-child {
border-right: none;
}
&.tab {
&.active {
&.services {
background-color: #f2f2f2;
border-bottom: none;
}
&.machines a {
background-color: #fff;
}
a {
height: @environment-header-height;
color: @text-colour;
}
}
}
&.spacer {
.flex(1);
}
a {
display: block;
margin: 0 (-@spacer);
padding: 0 @spacer;
}
}
}
}
body.state-sidebar-hidden .environment-header {
left: 0;
}
| .environment-header {
box-sizing: border-box;
position: absolute;
z-index: 600;
top: @navbar-height;
left: @bws-sidebar-width;
right: 0;
height: @environment-header-height;
ul {
.display-flex;
height: @environment-header-height - 1;
margin: 0;
list-style: none;
li {
@spacer: 20px;
.flex-basis(auto);
padding: 0 @spacer;
background-color: #fff;
border-width: 0 1px 1px 0;
border-style: solid;
border-right-color: #d9d9d9;
border-bottom-color: #cdcdcd;
line-height: @environment-header-height;
&:last-child {
border-right: none;
}
&.tab {
&.active {
&.services {
- background-color: transparent;
? ^^^^^^^^^^^
+ background-color: #f2f2f2;
? ^^^^^^^
border-bottom: none;
}
&.machines a {
background-color: #fff;
}
a {
height: @environment-header-height;
color: @text-colour;
}
}
}
&.spacer {
.flex(1);
}
a {
display: block;
margin: 0 (-@spacer);
padding: 0 @spacer;
}
}
}
}
body.state-sidebar-hidden .environment-header {
left: 0;
} | 2 | 0.033898 | 1 | 1 |
d47f99753b9971c1ba895de43698344a055e376d | app/views/static/_contributors.html.haml | app/views/static/_contributors.html.haml | %section
%h3=t("contributors.title")
.row
.col-md-12
#map{ :style => "width: 100%; height: 300px;" }
%p.text-muted=t("contributors.location_privacy")
#maps-data.hidden
= raw @map_markers.to_json
%hr
.row
- users.each_slice(6) do |row|
%ul.thumbnails.clearfix
- row.each do |user|
%li.collaborator.col-md-2
.thumbnail
= link_to image_tag(user.avatar_url(200), :width => 200, :height => 200, :alt => user.nickname).html_safe, user
.caption
%strong= link_to "@#{user.nickname}", user
= javascript_include_tag "//maps.google.com/maps/api/js?v=3.18&sensor=false&client=&key=&libraries=geometry&language=&hl=®ion="
= javascript_include_tag "//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"
= javascript_include_tag "maps"
| %section
%h3=t("contributors.title")
.row
.col-md-12
#map{ :style => "width: 100%; height: 300px;" }
%p.text-muted=t("contributors.location_privacy")
#maps-data.hidden
= raw @map_markers.to_json
%hr
.row
- users.each_slice(6) do |row|
%ul.thumbnails.clearfix
- row.each do |user|
%li.collaborator.col-md-2
.thumbnail
= link_to image_tag(user.avatar_url(200), :width => 200, :height => 200, :alt => user.nickname).html_safe, user
.caption
%strong= link_to "@#{user.nickname}", user
= javascript_include_tag "//maps.google.com/maps/api/js?v=3.18&sensor=false&client=&key=&libraries=geometry&language=&hl=®ion="
= javascript_include_tag "//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"
= javascript_include_tag asset_path('maps')
| Use asset_path when loading maps.js | Use asset_path when loading maps.js | Haml | mit | 24pullrequests/24pullrequests,tegon/24pullrequests,acrogenesis-lab/24pullrequests,jasnow/24pullrequests,acrogenesis-lab/24pullrequests,jasnow/24pullrequests5,jasnow/24pullrequests5,acrogenesis-lab/24pullrequests,24pullrequests/24pullrequests,arumoy-shome/24pullrequests,jasnow/24pullrequests5,arumoy-shome/24pullrequests,tegon/24pullrequests,tegon/24pullrequests,jasnow/24pullrequests,24pullrequests/24pullrequests,jasnow/24pullrequests5,tegon/24pullrequests,tarebyte/24pullrequests,jasnow/24pullrequests,arumoy-shome/24pullrequests,tarebyte/24pullrequests,arumoy-shome/24pullrequests,acrogenesis-lab/24pullrequests,pimterry/24pullrequests,pimterry/24pullrequests,24pullrequests/24pullrequests,pimterry/24pullrequests,pimterry/24pullrequests,tarebyte/24pullrequests,tarebyte/24pullrequests,jasnow/24pullrequests | haml | ## Code Before:
%section
%h3=t("contributors.title")
.row
.col-md-12
#map{ :style => "width: 100%; height: 300px;" }
%p.text-muted=t("contributors.location_privacy")
#maps-data.hidden
= raw @map_markers.to_json
%hr
.row
- users.each_slice(6) do |row|
%ul.thumbnails.clearfix
- row.each do |user|
%li.collaborator.col-md-2
.thumbnail
= link_to image_tag(user.avatar_url(200), :width => 200, :height => 200, :alt => user.nickname).html_safe, user
.caption
%strong= link_to "@#{user.nickname}", user
= javascript_include_tag "//maps.google.com/maps/api/js?v=3.18&sensor=false&client=&key=&libraries=geometry&language=&hl=®ion="
= javascript_include_tag "//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"
= javascript_include_tag "maps"
## Instruction:
Use asset_path when loading maps.js
## Code After:
%section
%h3=t("contributors.title")
.row
.col-md-12
#map{ :style => "width: 100%; height: 300px;" }
%p.text-muted=t("contributors.location_privacy")
#maps-data.hidden
= raw @map_markers.to_json
%hr
.row
- users.each_slice(6) do |row|
%ul.thumbnails.clearfix
- row.each do |user|
%li.collaborator.col-md-2
.thumbnail
= link_to image_tag(user.avatar_url(200), :width => 200, :height => 200, :alt => user.nickname).html_safe, user
.caption
%strong= link_to "@#{user.nickname}", user
= javascript_include_tag "//maps.google.com/maps/api/js?v=3.18&sensor=false&client=&key=&libraries=geometry&language=&hl=®ion="
= javascript_include_tag "//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"
= javascript_include_tag asset_path('maps')
| %section
%h3=t("contributors.title")
.row
.col-md-12
#map{ :style => "width: 100%; height: 300px;" }
%p.text-muted=t("contributors.location_privacy")
#maps-data.hidden
= raw @map_markers.to_json
%hr
.row
- users.each_slice(6) do |row|
%ul.thumbnails.clearfix
- row.each do |user|
%li.collaborator.col-md-2
.thumbnail
= link_to image_tag(user.avatar_url(200), :width => 200, :height => 200, :alt => user.nickname).html_safe, user
.caption
%strong= link_to "@#{user.nickname}", user
= javascript_include_tag "//maps.google.com/maps/api/js?v=3.18&sensor=false&client=&key=&libraries=geometry&language=&hl=®ion="
= javascript_include_tag "//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js"
- = javascript_include_tag "maps"
? ^ ^
+ = javascript_include_tag asset_path('maps')
? ^^^^^^^^^^^^ ^^
| 2 | 0.086957 | 1 | 1 |
59306dc9a6fc6faf299e404b075f8f0af68fd138 | core/spec/models/concerns/comable/cart_owner_spec.rb | core/spec/models/concerns/comable/cart_owner_spec.rb | class DummyUser
include ActiveModel::Validations
include Comable::CartOwner
end
describe Comable::CartOwner do
let(:quantity) { 2 }
let(:order_items) { build_list(:order_item, 5, quantity: quantity) }
subject { DummyUser.new }
before { allow(subject).to receive(:cart_items).and_return(order_items) }
it 'has cart items' do
expect(subject.cart.count).to eq(order_items.count * quantity)
end
context 'with errors' do
let(:stock) { create(:stock, :unstocked, :with_product) }
let(:cart_item) { subject.cart_items.first }
before { allow(cart_item).to receive(:stock).and_return(stock) }
before { cart_item.valid? }
it 'has cart with errors' do
expect(subject.cart.errors.full_messages.first).to include(stock.name)
end
end
end
| class DummyUser
include ActiveModel::Validations
include Comable::CartOwner
end
describe Comable::CartOwner do
let(:quantity) { 2 }
let(:order_items) { build_list(:order_item, 5, quantity: quantity) }
subject { DummyUser.new }
before { allow(subject).to receive(:cart_items).and_return(order_items) }
it 'has cart items' do
expect(subject.cart.count).to eq(order_items.count * quantity)
end
context 'with errors' do
let(:stock) { create(:stock, :unstocked, :with_product) }
let(:cart_item) { subject.cart_items.first }
before { allow(cart_item).to receive(:variant).and_return(stock.variant) }
before { cart_item.valid? }
it 'has cart with errors' do
expect(subject.cart.errors.full_messages.first).to include(stock.name)
end
end
end
| Fix a failed test case for CartOwner | Fix a failed test case for CartOwner
| Ruby | mit | hyoshida/comable,appirits/comable,appirits/comable,hyoshida/comable,appirits/comable,hyoshida/comable | ruby | ## Code Before:
class DummyUser
include ActiveModel::Validations
include Comable::CartOwner
end
describe Comable::CartOwner do
let(:quantity) { 2 }
let(:order_items) { build_list(:order_item, 5, quantity: quantity) }
subject { DummyUser.new }
before { allow(subject).to receive(:cart_items).and_return(order_items) }
it 'has cart items' do
expect(subject.cart.count).to eq(order_items.count * quantity)
end
context 'with errors' do
let(:stock) { create(:stock, :unstocked, :with_product) }
let(:cart_item) { subject.cart_items.first }
before { allow(cart_item).to receive(:stock).and_return(stock) }
before { cart_item.valid? }
it 'has cart with errors' do
expect(subject.cart.errors.full_messages.first).to include(stock.name)
end
end
end
## Instruction:
Fix a failed test case for CartOwner
## Code After:
class DummyUser
include ActiveModel::Validations
include Comable::CartOwner
end
describe Comable::CartOwner do
let(:quantity) { 2 }
let(:order_items) { build_list(:order_item, 5, quantity: quantity) }
subject { DummyUser.new }
before { allow(subject).to receive(:cart_items).and_return(order_items) }
it 'has cart items' do
expect(subject.cart.count).to eq(order_items.count * quantity)
end
context 'with errors' do
let(:stock) { create(:stock, :unstocked, :with_product) }
let(:cart_item) { subject.cart_items.first }
before { allow(cart_item).to receive(:variant).and_return(stock.variant) }
before { cart_item.valid? }
it 'has cart with errors' do
expect(subject.cart.errors.full_messages.first).to include(stock.name)
end
end
end
| class DummyUser
include ActiveModel::Validations
include Comable::CartOwner
end
describe Comable::CartOwner do
let(:quantity) { 2 }
let(:order_items) { build_list(:order_item, 5, quantity: quantity) }
subject { DummyUser.new }
before { allow(subject).to receive(:cart_items).and_return(order_items) }
it 'has cart items' do
expect(subject.cart.count).to eq(order_items.count * quantity)
end
context 'with errors' do
let(:stock) { create(:stock, :unstocked, :with_product) }
let(:cart_item) { subject.cart_items.first }
- before { allow(cart_item).to receive(:stock).and_return(stock) }
? ^ ---
+ before { allow(cart_item).to receive(:variant).and_return(stock.variant) }
? ^^^^^^ ++++++++
before { cart_item.valid? }
it 'has cart with errors' do
expect(subject.cart.errors.full_messages.first).to include(stock.name)
end
end
end | 2 | 0.068966 | 1 | 1 |
deafeca62f32c7ee538aa3d80a817d5387aa1a1f | helpers/url_helpers.rb | helpers/url_helpers.rb | module UrlHelpers
PAGES = %w{
clients
conversations
groups
posts
users
}
FRONT_PAGE_SECTIONS = %w{
authentication
errors
introduction
message_formats
representations
versioning
webhooks
}
PAGES.each do |page|
define_method "#{page}_path" do
"/#{page}.html"
end
end
FRONT_PAGE_SECTIONS.each do |section|
define_method "#{section}_path" do
"/##{section}"
end
end
end
| module UrlHelpers
PAGES = %w{
conversations
groups
posts
users
}
FRONT_PAGE_SECTIONS = %w{
authentication
errors
introduction
clients
message_formats
representations
versioning
webhooks
}
PAGES.each do |page|
define_method "#{page}_path" do
"/#{page}.html"
end
end
FRONT_PAGE_SECTIONS.each do |section|
define_method "#{section}_path" do
"/##{section}"
end
end
end
| Index page link to 'Clients' now works. | Index page link to 'Clients' now works.
Previously linked to non-existant '/clients.html'
| Ruby | mit | sitepoint/the86-docs,sitepoint/the86-docs | ruby | ## Code Before:
module UrlHelpers
PAGES = %w{
clients
conversations
groups
posts
users
}
FRONT_PAGE_SECTIONS = %w{
authentication
errors
introduction
message_formats
representations
versioning
webhooks
}
PAGES.each do |page|
define_method "#{page}_path" do
"/#{page}.html"
end
end
FRONT_PAGE_SECTIONS.each do |section|
define_method "#{section}_path" do
"/##{section}"
end
end
end
## Instruction:
Index page link to 'Clients' now works.
Previously linked to non-existant '/clients.html'
## Code After:
module UrlHelpers
PAGES = %w{
conversations
groups
posts
users
}
FRONT_PAGE_SECTIONS = %w{
authentication
errors
introduction
clients
message_formats
representations
versioning
webhooks
}
PAGES.each do |page|
define_method "#{page}_path" do
"/#{page}.html"
end
end
FRONT_PAGE_SECTIONS.each do |section|
define_method "#{section}_path" do
"/##{section}"
end
end
end
| module UrlHelpers
PAGES = %w{
- clients
conversations
groups
posts
users
}
FRONT_PAGE_SECTIONS = %w{
authentication
errors
introduction
+ clients
message_formats
representations
versioning
webhooks
}
PAGES.each do |page|
define_method "#{page}_path" do
"/#{page}.html"
end
end
FRONT_PAGE_SECTIONS.each do |section|
define_method "#{section}_path" do
"/##{section}"
end
end
end | 2 | 0.060606 | 1 | 1 |
f0ff17e85daaabc731b1084d210323b1ecc20b81 | packages/ya/yampa-canvas.yaml | packages/ya/yampa-canvas.yaml | homepage: ''
changelog-type: markdown
hash: cfddeb2156aadd75234b992554f877a65abebf78b6105aa036626d6dc311bea2
test-bench-deps: {}
maintainer: andygill@ku.edu
synopsis: blank-canvas frontend for Yampa
changelog: ! '## 0.2.2
* Allow building with `blank-canvas-0.6` and `Yampa-0.10`
## 0.2.1
* Allowed building with `base-4.8.0.0` and `time-1.5`
'
basic-deps:
Yampa: ! '>=0.9.6 && <0.12'
stm: ! '>=2.4 && <2.6'
base: ! '>=4.7 && <4.12'
time: ! '>=1.4 && <1.9'
text: ! '>=1.1 && <1.3'
blank-canvas: ! '>=0.5 && <0.7'
yampa-canvas: -any
all-versions:
- '0.2'
- '0.2.2'
author: Neil Sculthorpe
latest: '0.2.2'
description-type: markdown
description: ! 'yampa-canvas
============
Blank Canvas backend for Yampa
'
license-name: BSD3
| homepage: ''
changelog-type: markdown
hash: 40342318303cc5a26cd0089e2938f7e423942ac111f93957c891f8edea976e15
test-bench-deps: {}
maintainer: andygill@ku.edu
synopsis: blank-canvas frontend for Yampa
changelog: ! '## 0.2.2
* Allow building with `blank-canvas-0.6` and `Yampa-0.10`
## 0.2.1
* Allowed building with `base-4.8.0.0` and `time-1.5`
'
basic-deps:
Yampa: ! '>=0.9.6 && <0.12'
stm: ! '>=2.4 && <2.6'
base: ! '>=4.7 && <4.13'
time: ! '>=1.4 && <1.9'
text: ! '>=1.1 && <1.3'
blank-canvas: ! '>=0.5 && <0.7'
yampa-canvas: -any
all-versions:
- '0.2'
- '0.2.2'
author: Neil Sculthorpe
latest: '0.2.2'
description-type: markdown
description: ! 'yampa-canvas
============
Blank Canvas backend for Yampa
'
license-name: BSD3
| Update from Hackage at 2018-10-12T16:16:56Z | Update from Hackage at 2018-10-12T16:16:56Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: markdown
hash: cfddeb2156aadd75234b992554f877a65abebf78b6105aa036626d6dc311bea2
test-bench-deps: {}
maintainer: andygill@ku.edu
synopsis: blank-canvas frontend for Yampa
changelog: ! '## 0.2.2
* Allow building with `blank-canvas-0.6` and `Yampa-0.10`
## 0.2.1
* Allowed building with `base-4.8.0.0` and `time-1.5`
'
basic-deps:
Yampa: ! '>=0.9.6 && <0.12'
stm: ! '>=2.4 && <2.6'
base: ! '>=4.7 && <4.12'
time: ! '>=1.4 && <1.9'
text: ! '>=1.1 && <1.3'
blank-canvas: ! '>=0.5 && <0.7'
yampa-canvas: -any
all-versions:
- '0.2'
- '0.2.2'
author: Neil Sculthorpe
latest: '0.2.2'
description-type: markdown
description: ! 'yampa-canvas
============
Blank Canvas backend for Yampa
'
license-name: BSD3
## Instruction:
Update from Hackage at 2018-10-12T16:16:56Z
## Code After:
homepage: ''
changelog-type: markdown
hash: 40342318303cc5a26cd0089e2938f7e423942ac111f93957c891f8edea976e15
test-bench-deps: {}
maintainer: andygill@ku.edu
synopsis: blank-canvas frontend for Yampa
changelog: ! '## 0.2.2
* Allow building with `blank-canvas-0.6` and `Yampa-0.10`
## 0.2.1
* Allowed building with `base-4.8.0.0` and `time-1.5`
'
basic-deps:
Yampa: ! '>=0.9.6 && <0.12'
stm: ! '>=2.4 && <2.6'
base: ! '>=4.7 && <4.13'
time: ! '>=1.4 && <1.9'
text: ! '>=1.1 && <1.3'
blank-canvas: ! '>=0.5 && <0.7'
yampa-canvas: -any
all-versions:
- '0.2'
- '0.2.2'
author: Neil Sculthorpe
latest: '0.2.2'
description-type: markdown
description: ! 'yampa-canvas
============
Blank Canvas backend for Yampa
'
license-name: BSD3
| homepage: ''
changelog-type: markdown
- hash: cfddeb2156aadd75234b992554f877a65abebf78b6105aa036626d6dc311bea2
+ hash: 40342318303cc5a26cd0089e2938f7e423942ac111f93957c891f8edea976e15
test-bench-deps: {}
maintainer: andygill@ku.edu
synopsis: blank-canvas frontend for Yampa
changelog: ! '## 0.2.2
* Allow building with `blank-canvas-0.6` and `Yampa-0.10`
## 0.2.1
* Allowed building with `base-4.8.0.0` and `time-1.5`
'
basic-deps:
Yampa: ! '>=0.9.6 && <0.12'
stm: ! '>=2.4 && <2.6'
- base: ! '>=4.7 && <4.12'
? ^
+ base: ! '>=4.7 && <4.13'
? ^
time: ! '>=1.4 && <1.9'
text: ! '>=1.1 && <1.3'
blank-canvas: ! '>=0.5 && <0.7'
yampa-canvas: -any
all-versions:
- '0.2'
- '0.2.2'
author: Neil Sculthorpe
latest: '0.2.2'
description-type: markdown
description: ! 'yampa-canvas
============
Blank Canvas backend for Yampa
'
license-name: BSD3 | 4 | 0.102564 | 2 | 2 |
08922feeebe4add083fcab2e2c035ec15e405f8c | lib/omniauth/strategies/ravelry.rb | lib/omniauth/strategies/ravelry.rb | require 'omniauth-oauth'
module OmniAuth
module Strategies
class Ravelry < OmniAuth::Strategies::OAuth
option :name, 'ravelry'
option :client_options,
{ site: 'https://api.ravelry.com',
authorize_url: 'https://www.ravelry.com/oauth/authorize',
request_token_url: 'https://www.ravelry.com/oauth/request_token',
access_token_url: 'https://www.ravelry.com/oauth/access_token' }
uid{ request.params['username'] }
info do
{
:name => raw_info['name'],
:location => raw_info['city']
}
end
extra do
{
'raw_info' => raw_info
}
end
def raw_info
@raw_info ||= MultiJson.decode(access_token.get("/people/#{uid}.json").body)
end
end
end
end
| require 'omniauth-oauth'
module OmniAuth
module Strategies
class Ravelry < OmniAuth::Strategies::OAuth
option :name, 'ravelry'
option :client_options,
{ site: 'https://api.ravelry.com',
authorize_url: 'https://www.ravelry.com/oauth/authorize',
request_token_url: 'https://www.ravelry.com/oauth/request_token',
access_token_url: 'https://www.ravelry.com/oauth/access_token' }
uid{ request.params['username'] }
info do
{
'name' => raw_info['first_name'],
'location' => raw_info['location'],
'nickname' => raw_info['username'],
'first_name' => raw_info['first_name'],
'description' => raw_info['about_me'],
'image' => raw_info['small_photo_url']
}
end
extra do
{
'raw_info' => raw_info
}
end
def raw_info
@raw_info ||= MultiJson.decode(access_token.get("https://api.ravelry.com/people/#{uid}.json").body)['user']
end
end
end
end
| Update raw_info and info calls | Update raw_info and info calls
| Ruby | mit | duien/omniauth-ravelry | ruby | ## Code Before:
require 'omniauth-oauth'
module OmniAuth
module Strategies
class Ravelry < OmniAuth::Strategies::OAuth
option :name, 'ravelry'
option :client_options,
{ site: 'https://api.ravelry.com',
authorize_url: 'https://www.ravelry.com/oauth/authorize',
request_token_url: 'https://www.ravelry.com/oauth/request_token',
access_token_url: 'https://www.ravelry.com/oauth/access_token' }
uid{ request.params['username'] }
info do
{
:name => raw_info['name'],
:location => raw_info['city']
}
end
extra do
{
'raw_info' => raw_info
}
end
def raw_info
@raw_info ||= MultiJson.decode(access_token.get("/people/#{uid}.json").body)
end
end
end
end
## Instruction:
Update raw_info and info calls
## Code After:
require 'omniauth-oauth'
module OmniAuth
module Strategies
class Ravelry < OmniAuth::Strategies::OAuth
option :name, 'ravelry'
option :client_options,
{ site: 'https://api.ravelry.com',
authorize_url: 'https://www.ravelry.com/oauth/authorize',
request_token_url: 'https://www.ravelry.com/oauth/request_token',
access_token_url: 'https://www.ravelry.com/oauth/access_token' }
uid{ request.params['username'] }
info do
{
'name' => raw_info['first_name'],
'location' => raw_info['location'],
'nickname' => raw_info['username'],
'first_name' => raw_info['first_name'],
'description' => raw_info['about_me'],
'image' => raw_info['small_photo_url']
}
end
extra do
{
'raw_info' => raw_info
}
end
def raw_info
@raw_info ||= MultiJson.decode(access_token.get("https://api.ravelry.com/people/#{uid}.json").body)['user']
end
end
end
end
| require 'omniauth-oauth'
module OmniAuth
module Strategies
class Ravelry < OmniAuth::Strategies::OAuth
option :name, 'ravelry'
option :client_options,
{ site: 'https://api.ravelry.com',
authorize_url: 'https://www.ravelry.com/oauth/authorize',
request_token_url: 'https://www.ravelry.com/oauth/request_token',
access_token_url: 'https://www.ravelry.com/oauth/access_token' }
uid{ request.params['username'] }
info do
{
+ 'name' => raw_info['first_name'],
+ 'location' => raw_info['location'],
- :name => raw_info['name'],
? ^
+ 'nickname' => raw_info['username'],
? ^^^^^ ++++ ++++
- :location => raw_info['city']
+ 'first_name' => raw_info['first_name'],
+ 'description' => raw_info['about_me'],
+ 'image' => raw_info['small_photo_url']
}
end
extra do
{
'raw_info' => raw_info
}
end
def raw_info
- @raw_info ||= MultiJson.decode(access_token.get("/people/#{uid}.json").body)
+ @raw_info ||= MultiJson.decode(access_token.get("https://api.ravelry.com/people/#{uid}.json").body)['user']
? +++++++++++++++++++++++ ++++++++
end
end
end
end | 10 | 0.294118 | 7 | 3 |
18da96bf9c0699a07363e3e8946b9af531be84cb | res/values/strings.xml | res/values/strings.xml | <?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">MIS MEMORIAS DE LIMA</string>
<string name="action_settings">Configuraciones</string>
<string name="spinner_prompt">Selecciona el tipo de Panorama(Beta)</string>
<string-array name="panorama_types">
<item>Cubic</item>
<item>Spherical2</item>
<item>Spherical</item>
<item>Cylindrical</item>
</string-array>
</resources> | <?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mis Memorias de Lima</string>
<string name="action_settings">Configuraciones</string>
<string name="spinner_prompt">Selecciona el tipo de Panorama(Beta)</string>
<string-array name="panorama_types">
<item>Cubic</item>
<item>Spherical2</item>
<item>Spherical</item>
<item>Cylindrical</item>
</string-array>
</resources> | Update String title of the main App | Update String title of the main App
| XML | apache-2.0 | edutrul/mismemorias-lima-vr | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">MIS MEMORIAS DE LIMA</string>
<string name="action_settings">Configuraciones</string>
<string name="spinner_prompt">Selecciona el tipo de Panorama(Beta)</string>
<string-array name="panorama_types">
<item>Cubic</item>
<item>Spherical2</item>
<item>Spherical</item>
<item>Cylindrical</item>
</string-array>
</resources>
## Instruction:
Update String title of the main App
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mis Memorias de Lima</string>
<string name="action_settings">Configuraciones</string>
<string name="spinner_prompt">Selecciona el tipo de Panorama(Beta)</string>
<string-array name="panorama_types">
<item>Cubic</item>
<item>Spherical2</item>
<item>Spherical</item>
<item>Cylindrical</item>
</string-array>
</resources> | <?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">MIS MEMORIAS DE LIMA</string>
? ^^ ^^^^^^^ ^^ ^^^
+ <string name="app_name">Mis Memorias de Lima</string>
? ^^ ^^^^^^^ ^^ ^^^
<string name="action_settings">Configuraciones</string>
<string name="spinner_prompt">Selecciona el tipo de Panorama(Beta)</string>
<string-array name="panorama_types">
<item>Cubic</item>
<item>Spherical2</item>
<item>Spherical</item>
<item>Cylindrical</item>
</string-array>
</resources> | 2 | 0.142857 | 1 | 1 |
6f2d2ea1c10ea112aa21b72e9cde45993c30ed39 | dev.yml | dev.yml | ---
name: krane
up:
- ruby: 2.5.7 # Matches gemspec
- bundler
- homebrew:
- homebrew/cask/minikube
- custom:
name: Install the minikube fork of driver-hyperkit
met?: command -v docker-machine-driver-hyperkit
meet: curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ && rm ./docker-machine-driver-hyperkit
- custom:
name: Minikube Cluster
met?: test $(minikube status | grep Running | wc -l) -ge 2 && $(minikube status | grep -q 'Configured')
meet: minikube start --kubernetes-version=v1.11.10 --vm-driver=hyperkit
down: minikube stop
commands:
reset-minikube: minikube delete && rm -rf ~/.minikube
test:
run: bin/test
tophat:
run: PRINT_LOGS=1 bundle exec ruby -I test test/integration/krane_deploy_test.rb -n/${1}/
desc: Tophat a change by running a test scenario with logging output enabled.
syntax:
optional:
argument: TEST_REGEX
doc:
run: bundle exec yard doc
| ---
name: krane
up:
- ruby: 2.5.7 # Matches gemspec
- bundler
- homebrew:
- homebrew/cask/minikube
- hyperkit
- custom:
name: Install the minikube fork of driver-hyperkit
met?: command -v docker-machine-driver-hyperkit
meet: curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ && rm ./docker-machine-driver-hyperkit
- custom:
name: Minikube Cluster
met?: test $(minikube status | grep Running | wc -l) -ge 2 && $(minikube status | grep -q 'Configured')
meet: minikube start --kubernetes-version=v1.11.10 --vm-driver=hyperkit
down: minikube stop
commands:
reset-minikube: minikube delete && rm -rf ~/.minikube
test:
run: bin/test
tophat:
run: PRINT_LOGS=1 bundle exec ruby -I test test/integration/krane_deploy_test.rb -n/${1}/
desc: Tophat a change by running a test scenario with logging output enabled.
syntax:
optional:
argument: TEST_REGEX
doc:
run: bundle exec yard doc
| Add hyperkit to the list of dependencies | Add hyperkit to the list of dependencies | YAML | mit | Shopify/kubernetes-deploy,Shopify/kubernetes-deploy | yaml | ## Code Before:
---
name: krane
up:
- ruby: 2.5.7 # Matches gemspec
- bundler
- homebrew:
- homebrew/cask/minikube
- custom:
name: Install the minikube fork of driver-hyperkit
met?: command -v docker-machine-driver-hyperkit
meet: curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ && rm ./docker-machine-driver-hyperkit
- custom:
name: Minikube Cluster
met?: test $(minikube status | grep Running | wc -l) -ge 2 && $(minikube status | grep -q 'Configured')
meet: minikube start --kubernetes-version=v1.11.10 --vm-driver=hyperkit
down: minikube stop
commands:
reset-minikube: minikube delete && rm -rf ~/.minikube
test:
run: bin/test
tophat:
run: PRINT_LOGS=1 bundle exec ruby -I test test/integration/krane_deploy_test.rb -n/${1}/
desc: Tophat a change by running a test scenario with logging output enabled.
syntax:
optional:
argument: TEST_REGEX
doc:
run: bundle exec yard doc
## Instruction:
Add hyperkit to the list of dependencies
## Code After:
---
name: krane
up:
- ruby: 2.5.7 # Matches gemspec
- bundler
- homebrew:
- homebrew/cask/minikube
- hyperkit
- custom:
name: Install the minikube fork of driver-hyperkit
met?: command -v docker-machine-driver-hyperkit
meet: curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ && rm ./docker-machine-driver-hyperkit
- custom:
name: Minikube Cluster
met?: test $(minikube status | grep Running | wc -l) -ge 2 && $(minikube status | grep -q 'Configured')
meet: minikube start --kubernetes-version=v1.11.10 --vm-driver=hyperkit
down: minikube stop
commands:
reset-minikube: minikube delete && rm -rf ~/.minikube
test:
run: bin/test
tophat:
run: PRINT_LOGS=1 bundle exec ruby -I test test/integration/krane_deploy_test.rb -n/${1}/
desc: Tophat a change by running a test scenario with logging output enabled.
syntax:
optional:
argument: TEST_REGEX
doc:
run: bundle exec yard doc
| ---
name: krane
up:
- ruby: 2.5.7 # Matches gemspec
- bundler
- homebrew:
- homebrew/cask/minikube
+ - hyperkit
- custom:
name: Install the minikube fork of driver-hyperkit
met?: command -v docker-machine-driver-hyperkit
meet: curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ && rm ./docker-machine-driver-hyperkit
- custom:
name: Minikube Cluster
met?: test $(minikube status | grep Running | wc -l) -ge 2 && $(minikube status | grep -q 'Configured')
meet: minikube start --kubernetes-version=v1.11.10 --vm-driver=hyperkit
down: minikube stop
commands:
reset-minikube: minikube delete && rm -rf ~/.minikube
test:
run: bin/test
tophat:
run: PRINT_LOGS=1 bundle exec ruby -I test test/integration/krane_deploy_test.rb -n/${1}/
desc: Tophat a change by running a test scenario with logging output enabled.
syntax:
optional:
argument: TEST_REGEX
doc:
run: bundle exec yard doc | 1 | 0.035714 | 1 | 0 |
87810d0cc4510c795789ccb02f65e6eb473c9ba2 | README.md | README.md | dotfiles
========
## install
run this:
```sh
git clone https://github.com/azalea/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
```
Cloned from [.dotfiles](https://github.com/holman/dotfiles).
| dotfiles
========
## install
run this:
```sh
git clone https://github.com/azalea/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
```
In Terminal, change the default shell to zsh:
```
chsh -s /bin/zsh
```
Cloned from [.dotfiles](https://github.com/holman/dotfiles).
| Add instruction to change default shell to zsh | Add instruction to change default shell to zsh
| Markdown | mit | azalea/dotfiles,azalea/dotfiles | markdown | ## Code Before:
dotfiles
========
## install
run this:
```sh
git clone https://github.com/azalea/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
```
Cloned from [.dotfiles](https://github.com/holman/dotfiles).
## Instruction:
Add instruction to change default shell to zsh
## Code After:
dotfiles
========
## install
run this:
```sh
git clone https://github.com/azalea/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
```
In Terminal, change the default shell to zsh:
```
chsh -s /bin/zsh
```
Cloned from [.dotfiles](https://github.com/holman/dotfiles).
| dotfiles
========
## install
run this:
```sh
git clone https://github.com/azalea/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
```
+ In Terminal, change the default shell to zsh:
+ ```
+ chsh -s /bin/zsh
+ ```
+
Cloned from [.dotfiles](https://github.com/holman/dotfiles). | 5 | 0.357143 | 5 | 0 |
a4f0ef9e898417a51bcc7a92c1e81605b62df5ce | tests/features/api/02-import-json_spec.js | tests/features/api/02-import-json_spec.js | describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.stringify(IMPORT_API, null, 2)
const fileArray = file.split('\n')
const fileObject = new File(fileArray, 'import.json', { type: 'application/json' })
const dropEvent = {
dataTransfer: {
files: [
fileObject
]
}
}
// Execute File upload
cy.get('.uploader')
.trigger('drop', dropEvent).then(() => {
// Confirm upload
cy.get('.j-confirmation-container > .j-confirmation__buttons-group > .j-button--primary')
.click({ force: true })
.get('.j-confirmation__buttons-group > .j-button--primary')
.click()
// Validate that imported api endpoint is created
cy.loginVisit('/')
cy.get('.j-search-bar__input', { timeout: 100000 })
.type(IMPORT_API.name)
.get('.j-table__tbody')
.contains(IMPORT_API.name)
})
})
})
})
| describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.stringify(IMPORT_API, null, 2)
const fileArray = file.split('\n')
const fileObject = new File(fileArray, 'import.json', { type: 'application/json' })
const dropEvent = {
dataTransfer: {
files: [
fileObject
]
}
}
// Execute File upload
cy.get('.uploader')
.trigger('drop', dropEvent).then(() => {
// Wait until editor appears, indicating successful upload
cy.get('#gw-json-editor')
// Confirm upload
cy.get('.j-confirmation-container > .j-confirmation__buttons-group > .j-button--primary')
.click({ force: true })
.get('.j-confirmation__buttons-group > .j-button--primary')
.click()
// Validate that imported api endpoint is created
cy.loginVisit('/')
cy.get('.j-search-bar__input', { timeout: 100000 })
.type(IMPORT_API.name)
.get('.j-table__tbody')
.contains(IMPORT_API.name)
})
})
})
})
| Fix tests failing on cypress 3.1.0 | Fix tests failing on cypress 3.1.0
| JavaScript | mit | hellofresh/janus-dashboard,hellofresh/janus-dashboard | javascript | ## Code Before:
describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.stringify(IMPORT_API, null, 2)
const fileArray = file.split('\n')
const fileObject = new File(fileArray, 'import.json', { type: 'application/json' })
const dropEvent = {
dataTransfer: {
files: [
fileObject
]
}
}
// Execute File upload
cy.get('.uploader')
.trigger('drop', dropEvent).then(() => {
// Confirm upload
cy.get('.j-confirmation-container > .j-confirmation__buttons-group > .j-button--primary')
.click({ force: true })
.get('.j-confirmation__buttons-group > .j-button--primary')
.click()
// Validate that imported api endpoint is created
cy.loginVisit('/')
cy.get('.j-search-bar__input', { timeout: 100000 })
.type(IMPORT_API.name)
.get('.j-table__tbody')
.contains(IMPORT_API.name)
})
})
})
})
## Instruction:
Fix tests failing on cypress 3.1.0
## Code After:
describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.stringify(IMPORT_API, null, 2)
const fileArray = file.split('\n')
const fileObject = new File(fileArray, 'import.json', { type: 'application/json' })
const dropEvent = {
dataTransfer: {
files: [
fileObject
]
}
}
// Execute File upload
cy.get('.uploader')
.trigger('drop', dropEvent).then(() => {
// Wait until editor appears, indicating successful upload
cy.get('#gw-json-editor')
// Confirm upload
cy.get('.j-confirmation-container > .j-confirmation__buttons-group > .j-button--primary')
.click({ force: true })
.get('.j-confirmation__buttons-group > .j-button--primary')
.click()
// Validate that imported api endpoint is created
cy.loginVisit('/')
cy.get('.j-search-bar__input', { timeout: 100000 })
.type(IMPORT_API.name)
.get('.j-table__tbody')
.contains(IMPORT_API.name)
})
})
})
})
| describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.stringify(IMPORT_API, null, 2)
const fileArray = file.split('\n')
const fileObject = new File(fileArray, 'import.json', { type: 'application/json' })
const dropEvent = {
dataTransfer: {
files: [
fileObject
]
}
}
// Execute File upload
cy.get('.uploader')
.trigger('drop', dropEvent).then(() => {
+ // Wait until editor appears, indicating successful upload
+ cy.get('#gw-json-editor')
+
// Confirm upload
cy.get('.j-confirmation-container > .j-confirmation__buttons-group > .j-button--primary')
.click({ force: true })
.get('.j-confirmation__buttons-group > .j-button--primary')
.click()
// Validate that imported api endpoint is created
cy.loginVisit('/')
cy.get('.j-search-bar__input', { timeout: 100000 })
.type(IMPORT_API.name)
.get('.j-table__tbody')
.contains(IMPORT_API.name)
})
})
})
}) | 3 | 0.073171 | 3 | 0 |
43a4f9249d69bb783db78e41aa78b1ede6eb8af6 | README.md | README.md | Scripts for getting my linux environment set up from scratch
| Scripts for getting my linux environment set up from scratch.
This is focused on using zsh, Vim, Golang and Docker in Ubuntu Linux.
## Installation
+ Be sure curl is installed
```
sudo apt-get install curl
```
+ Run the install script
```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/mapitman/linux-setup/master/setup.sh)"
```
This will install [Zsh](http://www.zsh.org/), [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh), [Golang](http://golang.org/), setup your [Golang coding environment and workspace](http://golang.org/doc/code.html), configure [Vim](http://www.vim.org/) with some [nice settings for Golang development](https://github.com/fatih/vim-go) and install [Docker](https://www.docker.com/).
| Update readme with install instructions | Update readme with install instructions | Markdown | mit | mapitman/linux-setup | markdown | ## Code Before:
Scripts for getting my linux environment set up from scratch
## Instruction:
Update readme with install instructions
## Code After:
Scripts for getting my linux environment set up from scratch.
This is focused on using zsh, Vim, Golang and Docker in Ubuntu Linux.
## Installation
+ Be sure curl is installed
```
sudo apt-get install curl
```
+ Run the install script
```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/mapitman/linux-setup/master/setup.sh)"
```
This will install [Zsh](http://www.zsh.org/), [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh), [Golang](http://golang.org/), setup your [Golang coding environment and workspace](http://golang.org/doc/code.html), configure [Vim](http://www.vim.org/) with some [nice settings for Golang development](https://github.com/fatih/vim-go) and install [Docker](https://www.docker.com/).
| - Scripts for getting my linux environment set up from scratch
+ Scripts for getting my linux environment set up from scratch.
? +++
+ This is focused on using zsh, Vim, Golang and Docker in Ubuntu Linux.
+
+ ## Installation
+
+ + Be sure curl is installed
+ ```
+ sudo apt-get install curl
+ ```
+ + Run the install script
+ ```
+ sh -c "$(curl -fsSL https://raw.githubusercontent.com/mapitman/linux-setup/master/setup.sh)"
+ ```
+
+ This will install [Zsh](http://www.zsh.org/), [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh), [Golang](http://golang.org/), setup your [Golang coding environment and workspace](http://golang.org/doc/code.html), configure [Vim](http://www.vim.org/) with some [nice settings for Golang development](https://github.com/fatih/vim-go) and install [Docker](https://www.docker.com/). | 16 | 16 | 15 | 1 |
0da5820816187dd6b6d6ebbd554fc9646853e0fc | tests/git_code_debt/logic_test.py | tests/git_code_debt/logic_test.py |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_metric_mapping(self):
with self.db() as db:
ret = get_metric_mapping(db)
T.assert_equal(set(ret.keys()), set(get_metric_ids(get_metric_parsers())))
|
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from git_code_debt.logic import get_metric_values
from git_code_debt.logic import get_previous_sha
from git_code_debt.logic import insert_metric_values
from git_code_debt.repo_parser import Commit
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
sha = 'a' * 40
repo = 'git@github.com:asottile/git-code-debt'
def test_get_metric_mapping(self):
with self.db() as db:
ret = get_metric_mapping(db)
T.assert_equal(set(ret.keys()), set(get_metric_ids(get_metric_parsers())))
def test_get_previous_sha_no_previous_sha(self):
with self.db() as db:
ret = get_previous_sha(db, self.repo)
T.assert_is(ret, None)
def get_fake_metrics(self, metric_mapping):
return dict(
(metric_name, 1) for metric_name in metric_mapping.keys()
)
def get_fake_commit(self):
return Commit(self.sha, 1, 'foo')
def insert_fake_metrics(self, db):
metric_mapping = get_metric_mapping(db)
metric_values = self.get_fake_metrics(metric_mapping)
commit = self.get_fake_commit()
insert_metric_values(db, metric_values, metric_mapping, self.repo, commit)
def test_get_previous_sha_previous_existing_sha(self):
with self.db() as db:
self.insert_fake_metrics(db)
ret = get_previous_sha(db, self.repo)
T.assert_equal(ret, self.sha)
def test_insert_and_get_metric_values(self):
with self.db() as db:
fake_metrics = self.get_fake_metrics(get_metric_mapping(db))
fake_commit = self.get_fake_commit()
self.insert_fake_metrics(db)
T.assert_equal(fake_metrics, get_metric_values(db, fake_commit))
| Add more tests to logic test | Add more tests to logic test
| Python | mit | ucarion/git-code-debt,ucarion/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,ucarion/git-code-debt,Yelp/git-code-debt | python | ## Code Before:
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_metric_mapping(self):
with self.db() as db:
ret = get_metric_mapping(db)
T.assert_equal(set(ret.keys()), set(get_metric_ids(get_metric_parsers())))
## Instruction:
Add more tests to logic test
## Code After:
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from git_code_debt.logic import get_metric_values
from git_code_debt.logic import get_previous_sha
from git_code_debt.logic import insert_metric_values
from git_code_debt.repo_parser import Commit
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
sha = 'a' * 40
repo = 'git@github.com:asottile/git-code-debt'
def test_get_metric_mapping(self):
with self.db() as db:
ret = get_metric_mapping(db)
T.assert_equal(set(ret.keys()), set(get_metric_ids(get_metric_parsers())))
def test_get_previous_sha_no_previous_sha(self):
with self.db() as db:
ret = get_previous_sha(db, self.repo)
T.assert_is(ret, None)
def get_fake_metrics(self, metric_mapping):
return dict(
(metric_name, 1) for metric_name in metric_mapping.keys()
)
def get_fake_commit(self):
return Commit(self.sha, 1, 'foo')
def insert_fake_metrics(self, db):
metric_mapping = get_metric_mapping(db)
metric_values = self.get_fake_metrics(metric_mapping)
commit = self.get_fake_commit()
insert_metric_values(db, metric_values, metric_mapping, self.repo, commit)
def test_get_previous_sha_previous_existing_sha(self):
with self.db() as db:
self.insert_fake_metrics(db)
ret = get_previous_sha(db, self.repo)
T.assert_equal(ret, self.sha)
def test_insert_and_get_metric_values(self):
with self.db() as db:
fake_metrics = self.get_fake_metrics(get_metric_mapping(db))
fake_commit = self.get_fake_commit()
self.insert_fake_metrics(db)
T.assert_equal(fake_metrics, get_metric_values(db, fake_commit))
|
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
+ from git_code_debt.logic import get_metric_values
+ from git_code_debt.logic import get_previous_sha
+ from git_code_debt.logic import insert_metric_values
+ from git_code_debt.repo_parser import Commit
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
+
+ sha = 'a' * 40
+ repo = 'git@github.com:asottile/git-code-debt'
def test_get_metric_mapping(self):
with self.db() as db:
ret = get_metric_mapping(db)
T.assert_equal(set(ret.keys()), set(get_metric_ids(get_metric_parsers())))
+
+ def test_get_previous_sha_no_previous_sha(self):
+ with self.db() as db:
+ ret = get_previous_sha(db, self.repo)
+ T.assert_is(ret, None)
+
+ def get_fake_metrics(self, metric_mapping):
+ return dict(
+ (metric_name, 1) for metric_name in metric_mapping.keys()
+ )
+
+ def get_fake_commit(self):
+ return Commit(self.sha, 1, 'foo')
+
+ def insert_fake_metrics(self, db):
+ metric_mapping = get_metric_mapping(db)
+ metric_values = self.get_fake_metrics(metric_mapping)
+ commit = self.get_fake_commit()
+ insert_metric_values(db, metric_values, metric_mapping, self.repo, commit)
+
+ def test_get_previous_sha_previous_existing_sha(self):
+ with self.db() as db:
+ self.insert_fake_metrics(db)
+ ret = get_previous_sha(db, self.repo)
+ T.assert_equal(ret, self.sha)
+
+ def test_insert_and_get_metric_values(self):
+ with self.db() as db:
+ fake_metrics = self.get_fake_metrics(get_metric_mapping(db))
+ fake_commit = self.get_fake_commit()
+ self.insert_fake_metrics(db)
+ T.assert_equal(fake_metrics, get_metric_values(db, fake_commit)) | 39 | 2.4375 | 39 | 0 |
91c47cf405abb719456509c0eb27f6645218cf2c | .lando.yml | .lando.yml | name: doctrine-extensions
recipe: lemp
config:
php: 7.1
webroot: .
services:
appserver:
run_as_root:
- pecl install mongodb
- docker-php-ext-enable mongodb
overrides:
services:
# Environment variables for the PHP app server
environment:
# Use the PHP 7 Composer file for all Composer commands
COMPOSER: composer7.json
mongodb:
type: mongo:3.4
tooling:
mongo:
service: mongodb
| name: doctrine-extensions
recipe: lemp
config:
php: 7.1
webroot: .
services:
appserver:
run_as_root:
- pecl install mongodb
- docker-php-ext-enable mongodb
mongodb:
type: mongo
tooling:
mongo:
service: mongodb
| Use MongoDB 4 in Lando dev env | Use MongoDB 4 in Lando dev env
Also removes the need to switch Composer files based on the PHP version, since the new minimum in 3.0 is PHP >= 7.1
| YAML | mit | pmishev/DoctrineExtensions | yaml | ## Code Before:
name: doctrine-extensions
recipe: lemp
config:
php: 7.1
webroot: .
services:
appserver:
run_as_root:
- pecl install mongodb
- docker-php-ext-enable mongodb
overrides:
services:
# Environment variables for the PHP app server
environment:
# Use the PHP 7 Composer file for all Composer commands
COMPOSER: composer7.json
mongodb:
type: mongo:3.4
tooling:
mongo:
service: mongodb
## Instruction:
Use MongoDB 4 in Lando dev env
Also removes the need to switch Composer files based on the PHP version, since the new minimum in 3.0 is PHP >= 7.1
## Code After:
name: doctrine-extensions
recipe: lemp
config:
php: 7.1
webroot: .
services:
appserver:
run_as_root:
- pecl install mongodb
- docker-php-ext-enable mongodb
mongodb:
type: mongo
tooling:
mongo:
service: mongodb
| name: doctrine-extensions
recipe: lemp
config:
php: 7.1
webroot: .
services:
appserver:
run_as_root:
- pecl install mongodb
- docker-php-ext-enable mongodb
- overrides:
- services:
- # Environment variables for the PHP app server
- environment:
- # Use the PHP 7 Composer file for all Composer commands
- COMPOSER: composer7.json
mongodb:
- type: mongo:3.4
? ----
+ type: mongo
tooling:
mongo:
service: mongodb | 8 | 0.380952 | 1 | 7 |
27baf41ee3e31b4a3a118d14197667b0df5d0419 | strings.go | strings.go | package k
import (
"encoding/json"
"math/rand"
)
// StringArray is an alias for an array of strings
// which has common operations defined as methods.
type StringArray []string
// Contains returns true if the receiver array contains
// an element equivalent to needle.
func (s StringArray) Contains(needle string) bool {
for _, elem := range s {
if elem == needle {
return true
}
}
return false
}
// String returns the JSON representation of the array.
func (s StringArray) String() string {
a, _ := json.Marshal(s)
return string(a)
}
var (
alphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
)
// RandomString generates a random alpha-numeric string
// of length n
func RandomString(n int) string {
s := make([]byte, 0, n)
for i := 0; i < n; i++ {
s = append(s, alphaNum[rand.Int63n(int64(len(alphaNum)))])
}
return string(s)
}
| package k
import (
"encoding/json"
"math/rand"
"time"
)
// StringArray is an alias for an array of strings
// which has common operations defined as methods.
type StringArray []string
// Contains returns true if the receiver array contains
// an element equivalent to needle.
func (s StringArray) Contains(needle string) bool {
for _, elem := range s {
if elem == needle {
return true
}
}
return false
}
// String returns the JSON representation of the array.
func (s StringArray) String() string {
a, _ := json.Marshal(s)
return string(a)
}
var (
alphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
r = rand.New(rand.NewSource(time.Now().UnixNano()))
)
// RandomString generates a random alpha-numeric string
// of length n
func RandomString(n int) string {
s := make([]byte, 0, n)
for i := 0; i < n; i++ {
s = append(s, alphaNum[r.Int63n(int64(len(alphaNum)))])
}
return string(s)
}
| Use own seeded random generator for string generation | Use own seeded random generator for string generation
| Go | bsd-3-clause | voxelbrain/k | go | ## Code Before:
package k
import (
"encoding/json"
"math/rand"
)
// StringArray is an alias for an array of strings
// which has common operations defined as methods.
type StringArray []string
// Contains returns true if the receiver array contains
// an element equivalent to needle.
func (s StringArray) Contains(needle string) bool {
for _, elem := range s {
if elem == needle {
return true
}
}
return false
}
// String returns the JSON representation of the array.
func (s StringArray) String() string {
a, _ := json.Marshal(s)
return string(a)
}
var (
alphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
)
// RandomString generates a random alpha-numeric string
// of length n
func RandomString(n int) string {
s := make([]byte, 0, n)
for i := 0; i < n; i++ {
s = append(s, alphaNum[rand.Int63n(int64(len(alphaNum)))])
}
return string(s)
}
## Instruction:
Use own seeded random generator for string generation
## Code After:
package k
import (
"encoding/json"
"math/rand"
"time"
)
// StringArray is an alias for an array of strings
// which has common operations defined as methods.
type StringArray []string
// Contains returns true if the receiver array contains
// an element equivalent to needle.
func (s StringArray) Contains(needle string) bool {
for _, elem := range s {
if elem == needle {
return true
}
}
return false
}
// String returns the JSON representation of the array.
func (s StringArray) String() string {
a, _ := json.Marshal(s)
return string(a)
}
var (
alphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
r = rand.New(rand.NewSource(time.Now().UnixNano()))
)
// RandomString generates a random alpha-numeric string
// of length n
func RandomString(n int) string {
s := make([]byte, 0, n)
for i := 0; i < n; i++ {
s = append(s, alphaNum[r.Int63n(int64(len(alphaNum)))])
}
return string(s)
}
| package k
import (
"encoding/json"
"math/rand"
+ "time"
)
// StringArray is an alias for an array of strings
// which has common operations defined as methods.
type StringArray []string
// Contains returns true if the receiver array contains
// an element equivalent to needle.
func (s StringArray) Contains(needle string) bool {
for _, elem := range s {
if elem == needle {
return true
}
}
return false
}
// String returns the JSON representation of the array.
func (s StringArray) String() string {
a, _ := json.Marshal(s)
return string(a)
}
var (
alphaNum = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"
+ r = rand.New(rand.NewSource(time.Now().UnixNano()))
)
// RandomString generates a random alpha-numeric string
// of length n
func RandomString(n int) string {
s := make([]byte, 0, n)
for i := 0; i < n; i++ {
- s = append(s, alphaNum[rand.Int63n(int64(len(alphaNum)))])
? ---
+ s = append(s, alphaNum[r.Int63n(int64(len(alphaNum)))])
}
return string(s)
} | 4 | 0.097561 | 3 | 1 |
78093b0e496001fc1d76af8bf2e22310fb635cbe | app/views/shared/proposals/_tags_form.html.haml | app/views/shared/proposals/_tags_form.html.haml | .widget-header
%h3 Review Tags
.widget-content
%fieldset
= form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
.form-group
.tag-list
= f.select :review_tags,
options_for_select(event.review_tags, proposal.object.review_tags),
{}, { class: 'multiselect review-tags', multiple: true }
%button.pull-right.btn.btn-success{:type => "submit"} Update
| .widget-header
%h3 Review Tags
.widget-content
%fieldset
= form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
.form-group
.tag-list
= f.select :review_tags,
options_for_select(event.review_tags, proposal.object.review_tags),
{}, { class: 'multiselect review-tags', multiple: true }
.form-group
%button.btn.btn-success.pull-right{:type => "submit"} Update
| Move button to avoid collision with long tags list | Move button to avoid collision with long tags list | Haml | mit | rubycentral/cfp-app,ruby-no-kai/cfp-app,ruby-no-kai/cfp-app,ruby-no-kai/cfp-app,rubycentral/cfp-app,rubycentral/cfp-app | haml | ## Code Before:
.widget-header
%h3 Review Tags
.widget-content
%fieldset
= form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
.form-group
.tag-list
= f.select :review_tags,
options_for_select(event.review_tags, proposal.object.review_tags),
{}, { class: 'multiselect review-tags', multiple: true }
%button.pull-right.btn.btn-success{:type => "submit"} Update
## Instruction:
Move button to avoid collision with long tags list
## Code After:
.widget-header
%h3 Review Tags
.widget-content
%fieldset
= form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
.form-group
.tag-list
= f.select :review_tags,
options_for_select(event.review_tags, proposal.object.review_tags),
{}, { class: 'multiselect review-tags', multiple: true }
.form-group
%button.btn.btn-success.pull-right{:type => "submit"} Update
| .widget-header
%h3 Review Tags
.widget-content
%fieldset
= form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
.form-group
.tag-list
= f.select :review_tags,
options_for_select(event.review_tags, proposal.object.review_tags),
{}, { class: 'multiselect review-tags', multiple: true }
+ .form-group
- %button.pull-right.btn.btn-success{:type => "submit"} Update
? -- -----------
+ %button.btn.btn-success.pull-right{:type => "submit"} Update
? +++++++++++
| 3 | 0.272727 | 2 | 1 |
477987f5d3768880a90ecebdfb51702c469e66d0 | packages/storybook/examples/core/Icon/index.js | packages/storybook/examples/core/Icon/index.js | import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Icon from '@ichef/gypcrete/src/Icon';
import getPropTables from 'utils/getPropTables';
import BasicIconsSet from './BasicIcons';
import PaymentIconsSet from './PaymentIcons';
import CRMIconsSet from './CRMIcons';
import InventoryIconsSet from './InventoryIcons';
import MenuPageIconsSet from './MenuPageIcons';
import PaginationIconsSet from './PaginationIcons';
import InlineIconsSet from './InlineIcons';
import LargeIconExample from './LargeIcon';
import IconColorsExample from './IconColors';
storiesOf('@ichef/gypcrete|Icon', module)
.add('basic icons set', withInfo()(BasicIconsSet))
.add('payment icons set', withInfo()(PaymentIconsSet))
.add('CRM icons set', withInfo()(CRMIconsSet))
.add('Inventory icons set', withInfo()(InventoryIconsSet))
.add('Menu page icons set', withInfo()(MenuPageIconsSet))
.add('Pagination icons set', withInfo()(PaginationIconsSet))
.add('inline-sized icons set', withInfo()(InlineIconsSet))
.add('large size', withInfo()(LargeIconExample))
.add('color options', withInfo()(IconColorsExample))
// Props table
.add('props', getPropTables([Icon]));
| import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Icon from '@ichef/gypcrete/src/Icon';
import getPropTables from 'utils/getPropTables';
import BasicIconsSet from './BasicIcons';
import PaymentIconsSet from './PaymentIcons';
import CRMIconsSet from './CRMIcons';
import InventoryIconsSet from './InventoryIcons';
import MenuPageIconsSet from './MenuPageIcons';
import PaginationIconsSet from './PaginationIcons';
import InlineIconsSet from './InlineIcons';
import LargeIconExample from './LargeIcon';
import IconColorsExample from './IconColors';
storiesOf('@ichef/gypcrete|Icon', module)
.add('basic icons set', withInfo()(BasicIconsSet))
.add('payment icons set', withInfo()(PaymentIconsSet))
.add('CRM icons set', withInfo()(CRMIconsSet))
.add('Inventory icons set', withInfo()(InventoryIconsSet))
.add('Menu page icons set', withInfo()(MenuPageIconsSet))
.add('Pagination icons set', withInfo()(PaginationIconsSet))
.add('inline-sized icons set', withInfo()(InlineIconsSet))
.add('large size', withInfo()(LargeIconExample))
.add('color options', withInfo()(IconColorsExample))
// Props table
.add('props', getPropTables([Icon]), { info: { propTables: [Icon] } });
| Fix Icon props doc page. | Fix Icon props doc page.
| JavaScript | apache-2.0 | iCHEF/gypcrete,iCHEF/gypcrete | javascript | ## Code Before:
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Icon from '@ichef/gypcrete/src/Icon';
import getPropTables from 'utils/getPropTables';
import BasicIconsSet from './BasicIcons';
import PaymentIconsSet from './PaymentIcons';
import CRMIconsSet from './CRMIcons';
import InventoryIconsSet from './InventoryIcons';
import MenuPageIconsSet from './MenuPageIcons';
import PaginationIconsSet from './PaginationIcons';
import InlineIconsSet from './InlineIcons';
import LargeIconExample from './LargeIcon';
import IconColorsExample from './IconColors';
storiesOf('@ichef/gypcrete|Icon', module)
.add('basic icons set', withInfo()(BasicIconsSet))
.add('payment icons set', withInfo()(PaymentIconsSet))
.add('CRM icons set', withInfo()(CRMIconsSet))
.add('Inventory icons set', withInfo()(InventoryIconsSet))
.add('Menu page icons set', withInfo()(MenuPageIconsSet))
.add('Pagination icons set', withInfo()(PaginationIconsSet))
.add('inline-sized icons set', withInfo()(InlineIconsSet))
.add('large size', withInfo()(LargeIconExample))
.add('color options', withInfo()(IconColorsExample))
// Props table
.add('props', getPropTables([Icon]));
## Instruction:
Fix Icon props doc page.
## Code After:
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Icon from '@ichef/gypcrete/src/Icon';
import getPropTables from 'utils/getPropTables';
import BasicIconsSet from './BasicIcons';
import PaymentIconsSet from './PaymentIcons';
import CRMIconsSet from './CRMIcons';
import InventoryIconsSet from './InventoryIcons';
import MenuPageIconsSet from './MenuPageIcons';
import PaginationIconsSet from './PaginationIcons';
import InlineIconsSet from './InlineIcons';
import LargeIconExample from './LargeIcon';
import IconColorsExample from './IconColors';
storiesOf('@ichef/gypcrete|Icon', module)
.add('basic icons set', withInfo()(BasicIconsSet))
.add('payment icons set', withInfo()(PaymentIconsSet))
.add('CRM icons set', withInfo()(CRMIconsSet))
.add('Inventory icons set', withInfo()(InventoryIconsSet))
.add('Menu page icons set', withInfo()(MenuPageIconsSet))
.add('Pagination icons set', withInfo()(PaginationIconsSet))
.add('inline-sized icons set', withInfo()(InlineIconsSet))
.add('large size', withInfo()(LargeIconExample))
.add('color options', withInfo()(IconColorsExample))
// Props table
.add('props', getPropTables([Icon]), { info: { propTables: [Icon] } });
| import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import Icon from '@ichef/gypcrete/src/Icon';
import getPropTables from 'utils/getPropTables';
import BasicIconsSet from './BasicIcons';
import PaymentIconsSet from './PaymentIcons';
import CRMIconsSet from './CRMIcons';
import InventoryIconsSet from './InventoryIcons';
import MenuPageIconsSet from './MenuPageIcons';
import PaginationIconsSet from './PaginationIcons';
import InlineIconsSet from './InlineIcons';
import LargeIconExample from './LargeIcon';
import IconColorsExample from './IconColors';
storiesOf('@ichef/gypcrete|Icon', module)
.add('basic icons set', withInfo()(BasicIconsSet))
.add('payment icons set', withInfo()(PaymentIconsSet))
.add('CRM icons set', withInfo()(CRMIconsSet))
.add('Inventory icons set', withInfo()(InventoryIconsSet))
.add('Menu page icons set', withInfo()(MenuPageIconsSet))
.add('Pagination icons set', withInfo()(PaginationIconsSet))
.add('inline-sized icons set', withInfo()(InlineIconsSet))
.add('large size', withInfo()(LargeIconExample))
.add('color options', withInfo()(IconColorsExample))
// Props table
- .add('props', getPropTables([Icon]));
+ .add('props', getPropTables([Icon]), { info: { propTables: [Icon] } }); | 2 | 0.068966 | 1 | 1 |
c01db4f2262e4259add181ccec0f64c1a45b6dc9 | packages/si/sized.yaml | packages/si/sized.yaml | homepage: ''
changelog-type: ''
hash: ff1d1fff0b2d794cbaf2587020637a8003b3db98be467f5310a8b14b75c28931
test-bench-deps: {}
maintainer: konn.jinro_at_gmail.com
synopsis: Sized sequence data-types
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
equational-reasoning: ==0.*
constraints: ! '>=0.9.1'
monomorphic: ! '>=0.0.3.3'
containers: ! '>=0.5.7.1'
singletons: ! '>=2.0'
type-natural: ! '>=0.7.1.2'
lens: ! '>=0.14'
hashable: ! '>=1.2.6.1'
deepseq: ! '>=1.4.2.0'
mono-traversable: ! '>=0.10 && <1.1'
ListLike: ! '>=4.5.1'
vector: ! '>=0.12.0.1'
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.2.1.0'
- '0.2.1.1'
author: Hiromi ISHII
latest: '0.2.1.1'
description-type: haddock
description: A wrapper to make length-parametrized data-type from ListLike data-types.
license-name: BSD3
| homepage: ''
changelog-type: ''
hash: d723d3a44a0d3db7185e33d3513cf8c97625c557fcaf2241abfd8e2dbc7aa62a
test-bench-deps: {}
maintainer: konn.jinro_at_gmail.com
synopsis: Sized sequence data-types
changelog: ''
basic-deps:
base: ==4.*
equational-reasoning: ! '>=0.5'
constraints: ! '>=0.9'
containers: ! '>=0.5'
singletons: ! '>=2.0'
type-natural: ! '>=0.7.1.2'
lens: ! '>=0.14'
ghc-typelits-presburger: ! '>=0.2.0.0'
hashable: ! '>=1.2'
deepseq: ! '>=1.4'
mono-traversable: ! '>=0.10'
ListLike: ! '>=4.5'
vector: ! '>=0.12'
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.2.1.0'
- '0.2.1.1'
- '0.3.0.0'
author: Hiromi ISHII
latest: '0.3.0.0'
description-type: haddock
description: A wrapper to make length-parametrized data-type from ListLike data-types.
license-name: BSD3
| Update from Hackage at 2018-03-18T06:09:42Z | Update from Hackage at 2018-03-18T06:09:42Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: ff1d1fff0b2d794cbaf2587020637a8003b3db98be467f5310a8b14b75c28931
test-bench-deps: {}
maintainer: konn.jinro_at_gmail.com
synopsis: Sized sequence data-types
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
equational-reasoning: ==0.*
constraints: ! '>=0.9.1'
monomorphic: ! '>=0.0.3.3'
containers: ! '>=0.5.7.1'
singletons: ! '>=2.0'
type-natural: ! '>=0.7.1.2'
lens: ! '>=0.14'
hashable: ! '>=1.2.6.1'
deepseq: ! '>=1.4.2.0'
mono-traversable: ! '>=0.10 && <1.1'
ListLike: ! '>=4.5.1'
vector: ! '>=0.12.0.1'
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.2.1.0'
- '0.2.1.1'
author: Hiromi ISHII
latest: '0.2.1.1'
description-type: haddock
description: A wrapper to make length-parametrized data-type from ListLike data-types.
license-name: BSD3
## Instruction:
Update from Hackage at 2018-03-18T06:09:42Z
## Code After:
homepage: ''
changelog-type: ''
hash: d723d3a44a0d3db7185e33d3513cf8c97625c557fcaf2241abfd8e2dbc7aa62a
test-bench-deps: {}
maintainer: konn.jinro_at_gmail.com
synopsis: Sized sequence data-types
changelog: ''
basic-deps:
base: ==4.*
equational-reasoning: ! '>=0.5'
constraints: ! '>=0.9'
containers: ! '>=0.5'
singletons: ! '>=2.0'
type-natural: ! '>=0.7.1.2'
lens: ! '>=0.14'
ghc-typelits-presburger: ! '>=0.2.0.0'
hashable: ! '>=1.2'
deepseq: ! '>=1.4'
mono-traversable: ! '>=0.10'
ListLike: ! '>=4.5'
vector: ! '>=0.12'
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.2.1.0'
- '0.2.1.1'
- '0.3.0.0'
author: Hiromi ISHII
latest: '0.3.0.0'
description-type: haddock
description: A wrapper to make length-parametrized data-type from ListLike data-types.
license-name: BSD3
| homepage: ''
changelog-type: ''
- hash: ff1d1fff0b2d794cbaf2587020637a8003b3db98be467f5310a8b14b75c28931
+ hash: d723d3a44a0d3db7185e33d3513cf8c97625c557fcaf2241abfd8e2dbc7aa62a
test-bench-deps: {}
maintainer: konn.jinro_at_gmail.com
synopsis: Sized sequence data-types
changelog: ''
basic-deps:
- base: ! '>=4.7 && <5'
+ base: ==4.*
- equational-reasoning: ==0.*
? ^ ^
+ equational-reasoning: ! '>=0.5'
? ^^^^ ^^
- constraints: ! '>=0.9.1'
? --
+ constraints: ! '>=0.9'
- monomorphic: ! '>=0.0.3.3'
- containers: ! '>=0.5.7.1'
? ----
+ containers: ! '>=0.5'
singletons: ! '>=2.0'
type-natural: ! '>=0.7.1.2'
lens: ! '>=0.14'
+ ghc-typelits-presburger: ! '>=0.2.0.0'
- hashable: ! '>=1.2.6.1'
? ----
+ hashable: ! '>=1.2'
- deepseq: ! '>=1.4.2.0'
? ----
+ deepseq: ! '>=1.4'
- mono-traversable: ! '>=0.10 && <1.1'
? --------
+ mono-traversable: ! '>=0.10'
- ListLike: ! '>=4.5.1'
? --
+ ListLike: ! '>=4.5'
- vector: ! '>=0.12.0.1'
? ----
+ vector: ! '>=0.12'
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.2.1.0'
- '0.2.1.1'
+ - '0.3.0.0'
author: Hiromi ISHII
- latest: '0.2.1.1'
? ^ ^ ^
+ latest: '0.3.0.0'
? ^ ^ ^
description-type: haddock
description: A wrapper to make length-parametrized data-type from ListLike data-types.
license-name: BSD3 | 25 | 0.806452 | 13 | 12 |
52f32e75ff815191cbee65daa9c9433564ff84bd | tests/unit/TextUI/MigrationTest.php | tests/unit/TextUI/MigrationTest.php | <?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TextUI\XmlConfiguration;
use PHPUnit\Framework\TestCase;
final class MigrationTest extends TestCase
{
/**
* @testdox Migrates PHPUnit 9.2 configuration to PHPUnit 9.3
*/
public function testMigratesPhpUnit92ConfigurationToPhpUnit93(): void
{
$this->assertStringEqualsFile(
__DIR__ . '/../../_files/XmlConfigurationMigration/output-9.3.xml',
(new Migrator)->migrate(
__DIR__ . '/../../_files/XmlConfigurationMigration/input-9.2.xml'
)
);
}
}
| <?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TextUI\XmlConfiguration;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\Xml;
final class MigrationTest extends TestCase
{
/**
* @testdox Migrates PHPUnit 9.2 configuration to PHPUnit 9.3
*/
public function testMigratesPhpUnit92ConfigurationToPhpUnit93(): void
{
$this->assertEquals(
Xml::loadFile(__DIR__ . '/../../_files/XmlConfigurationMigration/output-9.3.xml'),
Xml::load(
(new Migrator)->migrate(
__DIR__ . '/../../_files/XmlConfigurationMigration/input-9.2.xml'
)
)
);
}
}
| Use assertEquals() instead of assertStringEqualsFile() in order to compare XML documents with C14N | Use assertEquals() instead of assertStringEqualsFile() in order to compare XML documents with C14N
| PHP | bsd-3-clause | sebastianbergmann/phpunit,Firehed/phpunit | php | ## Code Before:
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TextUI\XmlConfiguration;
use PHPUnit\Framework\TestCase;
final class MigrationTest extends TestCase
{
/**
* @testdox Migrates PHPUnit 9.2 configuration to PHPUnit 9.3
*/
public function testMigratesPhpUnit92ConfigurationToPhpUnit93(): void
{
$this->assertStringEqualsFile(
__DIR__ . '/../../_files/XmlConfigurationMigration/output-9.3.xml',
(new Migrator)->migrate(
__DIR__ . '/../../_files/XmlConfigurationMigration/input-9.2.xml'
)
);
}
}
## Instruction:
Use assertEquals() instead of assertStringEqualsFile() in order to compare XML documents with C14N
## Code After:
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TextUI\XmlConfiguration;
use PHPUnit\Framework\TestCase;
use PHPUnit\Util\Xml;
final class MigrationTest extends TestCase
{
/**
* @testdox Migrates PHPUnit 9.2 configuration to PHPUnit 9.3
*/
public function testMigratesPhpUnit92ConfigurationToPhpUnit93(): void
{
$this->assertEquals(
Xml::loadFile(__DIR__ . '/../../_files/XmlConfigurationMigration/output-9.3.xml'),
Xml::load(
(new Migrator)->migrate(
__DIR__ . '/../../_files/XmlConfigurationMigration/input-9.2.xml'
)
)
);
}
}
| <?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TextUI\XmlConfiguration;
use PHPUnit\Framework\TestCase;
+ use PHPUnit\Util\Xml;
final class MigrationTest extends TestCase
{
/**
* @testdox Migrates PHPUnit 9.2 configuration to PHPUnit 9.3
*/
public function testMigratesPhpUnit92ConfigurationToPhpUnit93(): void
{
- $this->assertStringEqualsFile(
? ------ ----
+ $this->assertEquals(
- __DIR__ . '/../../_files/XmlConfigurationMigration/output-9.3.xml',
+ Xml::loadFile(__DIR__ . '/../../_files/XmlConfigurationMigration/output-9.3.xml'),
? ++++++++++++++ +
+ Xml::load(
- (new Migrator)->migrate(
+ (new Migrator)->migrate(
? ++++
- __DIR__ . '/../../_files/XmlConfigurationMigration/input-9.2.xml'
+ __DIR__ . '/../../_files/XmlConfigurationMigration/input-9.2.xml'
? ++++
+ )
)
);
}
} | 11 | 0.392857 | 7 | 4 |
6b5461955e196ee4a12b708fb6f9bef750d468ad | testcontainers/oracle.py | testcontainers/oracle.py | from testcontainers.core.generic import DbContainer
class OracleDbContainer(DbContainer):
"""
Oracle database container.
Example
-------
::
with OracleDbContainer():
e = sqlalchemy.create_engine(oracle.get_connection_url())
result = e.execute("select 1 from dual")
"""
def __init__(self, image="wnameless/oracle-xe-11g-r2:latest"):
super(OracleDbContainer, self).__init__(image=image)
self.container_port = 1521
self.with_exposed_ports(self.container_port)
self.with_env("ORACLE_ALLOW_REMOTE", "true")
def get_connection_url(self):
return super()._create_connection_url(
dialect="oracle", username="system", password="oracle", port=self.container_port,
db_name="xe"
)
| from testcontainers.core.generic import DbContainer
class OracleDbContainer(DbContainer):
"""
Oracle database container.
Example
-------
::
with OracleDbContainer() as oracle:
e = sqlalchemy.create_engine(oracle.get_connection_url())
result = e.execute("select 1 from dual")
"""
def __init__(self, image="wnameless/oracle-xe-11g-r2:latest"):
super(OracleDbContainer, self).__init__(image=image)
self.container_port = 1521
self.with_exposed_ports(self.container_port)
self.with_env("ORACLE_ALLOW_REMOTE", "true")
def get_connection_url(self):
return super()._create_connection_url(
dialect="oracle", username="system", password="oracle", port=self.container_port,
db_name="xe"
)
def _configure(self):
pass
| Add missing _configure to OracleDbContainer | Add missing _configure to OracleDbContainer
Additionally, fix Oracle example.
| Python | apache-2.0 | SergeyPirogov/testcontainers-python | python | ## Code Before:
from testcontainers.core.generic import DbContainer
class OracleDbContainer(DbContainer):
"""
Oracle database container.
Example
-------
::
with OracleDbContainer():
e = sqlalchemy.create_engine(oracle.get_connection_url())
result = e.execute("select 1 from dual")
"""
def __init__(self, image="wnameless/oracle-xe-11g-r2:latest"):
super(OracleDbContainer, self).__init__(image=image)
self.container_port = 1521
self.with_exposed_ports(self.container_port)
self.with_env("ORACLE_ALLOW_REMOTE", "true")
def get_connection_url(self):
return super()._create_connection_url(
dialect="oracle", username="system", password="oracle", port=self.container_port,
db_name="xe"
)
## Instruction:
Add missing _configure to OracleDbContainer
Additionally, fix Oracle example.
## Code After:
from testcontainers.core.generic import DbContainer
class OracleDbContainer(DbContainer):
"""
Oracle database container.
Example
-------
::
with OracleDbContainer() as oracle:
e = sqlalchemy.create_engine(oracle.get_connection_url())
result = e.execute("select 1 from dual")
"""
def __init__(self, image="wnameless/oracle-xe-11g-r2:latest"):
super(OracleDbContainer, self).__init__(image=image)
self.container_port = 1521
self.with_exposed_ports(self.container_port)
self.with_env("ORACLE_ALLOW_REMOTE", "true")
def get_connection_url(self):
return super()._create_connection_url(
dialect="oracle", username="system", password="oracle", port=self.container_port,
db_name="xe"
)
def _configure(self):
pass
| from testcontainers.core.generic import DbContainer
class OracleDbContainer(DbContainer):
"""
Oracle database container.
Example
-------
::
- with OracleDbContainer():
+ with OracleDbContainer() as oracle:
? ++++++++++
e = sqlalchemy.create_engine(oracle.get_connection_url())
result = e.execute("select 1 from dual")
"""
def __init__(self, image="wnameless/oracle-xe-11g-r2:latest"):
super(OracleDbContainer, self).__init__(image=image)
self.container_port = 1521
self.with_exposed_ports(self.container_port)
self.with_env("ORACLE_ALLOW_REMOTE", "true")
def get_connection_url(self):
return super()._create_connection_url(
dialect="oracle", username="system", password="oracle", port=self.container_port,
db_name="xe"
)
+
+ def _configure(self):
+ pass | 5 | 0.192308 | 4 | 1 |
8f99371ae08e03b266d5bc1678c87ef1ba6d5a8d | {{cookiecutter.role_project_name}}/README.md | {{cookiecutter.role_project_name}}/README.md | [](https://travis-ci.org/FGtatsuro/{{ cookiecutter.role_project_name }})
{{ cookiecutter.role_project_name }}
====================================
Ansible role for {{ cookiecutter.role_name }}.
Requirements
------------
The dependencies on other softwares/librarys for this role.
Role Variables
--------------
The variables we can use in this role.
Role Dependencies
-----------------
The dependencies on other roles for this role.
Example Playbook
----------------
- hosts: all
roles:
- { role: {{ cookiecutter.author }}.{{ cookiecutter.role_name }} }
Test on local Docker host
-------------------------
This project run tests on Travis CI, but we can also run then on local Docker host.
Please check `install`, `before_script`, and `script` sections of `.travis.yml`.
We can use same steps of them for local Docker host.
Local requirements are as follows.
- Ansible (> 2.0.0)
- Docker (> 1.10.1)
License
-------
MIT
| [](https://travis-ci.org/FGtatsuro/{{ cookiecutter.role_project_name }})
{{ cookiecutter.role_project_name }}
====================================
Ansible role for {{ cookiecutter.role_name }}.
Requirements
------------
The dependencies on other softwares/librarys for this role.
- Debian/Ubuntu
- OSX
Role Variables
--------------
The variables we can use in this role.
Role Dependencies
-----------------
The dependencies on other roles for this role.
- FGtatsuro.python-requirements
Example Playbook
----------------
- hosts: all
roles:
- { role: {{ cookiecutter.author }}.{{ cookiecutter.role_name }} }
Test on local Docker host
-------------------------
This project run tests on Travis CI, but we can also run then on local Docker host.
Please check `install`, `before_script`, and `script` sections of `.travis.yml`.
We can use same steps of them for local Docker host.
Local requirements are as follows.
- Ansible (> 2.0.0)
- Docker (> 1.10.1)
License
-------
MIT
| Add default description of generated project. | Add default description of generated project.
| Markdown | mit | FGtatsuro/cookiecutter-ansible-role,FGtatsuro/cookiecutter-ansible-role | markdown | ## Code Before:
[](https://travis-ci.org/FGtatsuro/{{ cookiecutter.role_project_name }})
{{ cookiecutter.role_project_name }}
====================================
Ansible role for {{ cookiecutter.role_name }}.
Requirements
------------
The dependencies on other softwares/librarys for this role.
Role Variables
--------------
The variables we can use in this role.
Role Dependencies
-----------------
The dependencies on other roles for this role.
Example Playbook
----------------
- hosts: all
roles:
- { role: {{ cookiecutter.author }}.{{ cookiecutter.role_name }} }
Test on local Docker host
-------------------------
This project run tests on Travis CI, but we can also run then on local Docker host.
Please check `install`, `before_script`, and `script` sections of `.travis.yml`.
We can use same steps of them for local Docker host.
Local requirements are as follows.
- Ansible (> 2.0.0)
- Docker (> 1.10.1)
License
-------
MIT
## Instruction:
Add default description of generated project.
## Code After:
[](https://travis-ci.org/FGtatsuro/{{ cookiecutter.role_project_name }})
{{ cookiecutter.role_project_name }}
====================================
Ansible role for {{ cookiecutter.role_name }}.
Requirements
------------
The dependencies on other softwares/librarys for this role.
- Debian/Ubuntu
- OSX
Role Variables
--------------
The variables we can use in this role.
Role Dependencies
-----------------
The dependencies on other roles for this role.
- FGtatsuro.python-requirements
Example Playbook
----------------
- hosts: all
roles:
- { role: {{ cookiecutter.author }}.{{ cookiecutter.role_name }} }
Test on local Docker host
-------------------------
This project run tests on Travis CI, but we can also run then on local Docker host.
Please check `install`, `before_script`, and `script` sections of `.travis.yml`.
We can use same steps of them for local Docker host.
Local requirements are as follows.
- Ansible (> 2.0.0)
- Docker (> 1.10.1)
License
-------
MIT
| [](https://travis-ci.org/FGtatsuro/{{ cookiecutter.role_project_name }})
{{ cookiecutter.role_project_name }}
====================================
Ansible role for {{ cookiecutter.role_name }}.
Requirements
------------
The dependencies on other softwares/librarys for this role.
+ - Debian/Ubuntu
+ - OSX
+
Role Variables
--------------
The variables we can use in this role.
Role Dependencies
-----------------
The dependencies on other roles for this role.
+
+ - FGtatsuro.python-requirements
Example Playbook
----------------
- hosts: all
roles:
- { role: {{ cookiecutter.author }}.{{ cookiecutter.role_name }} }
Test on local Docker host
-------------------------
This project run tests on Travis CI, but we can also run then on local Docker host.
Please check `install`, `before_script`, and `script` sections of `.travis.yml`.
We can use same steps of them for local Docker host.
Local requirements are as follows.
- Ansible (> 2.0.0)
- Docker (> 1.10.1)
-
License
-------
MIT | 6 | 0.130435 | 5 | 1 |
692e17117998a843de24e22e4678376de4f987bc | Resources/docs/02_installation.md | Resources/docs/02_installation.md | ---
title: Installation
layout: default
---
# Installation
Prerequisites for this bundle are a Windows development machine with the Windows Azure SDK installed.
You can either install the SDK through [Web Platform Installer](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-automatically-with-the-microsoft-web-platform-installer) or all [dependencies manually](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-manually).
## Composer
The most simple way to use Azure Distribution Bundle is with [Composer](http://www.packagist.org)-based applications. Add this package to your composer.json and run `composer update`:
{
"require": {
"beberlei/azure-distribution-bundle": "*"
}
}
Also you have to add the bundle in your kernel, see the next section on this.
## Azure Kernel
The Azure kernel can be used to set the temporary and cache directories to `sys_get_tempdir()` on production. These are the only writable directories for the webserver on Azure.
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use WindowsAzure\DistributionBundle\HttpKernel\AzureKernel; // change use
class AppKernel extends AzureKernel // change kernel here
{
$bundles = array(
// ...
new WindowsAzure\DistributionBundle\WindowsAzureDistributionBundle();
// ...
);
// keep the old code here.
return $bundles;
}
| ---
title: Installation
layout: default
---
# Installation
Prerequisites for this bundle are a Windows development machine with the Windows Azure SDK installed.
You can either install the SDK through [Web Platform Installer](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-automatically-with-the-microsoft-web-platform-installer) or all [dependencies manually](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-manually).
## Composer
The most simple way to use Azure Distribution Bundle is with [Composer](http://www.packagist.org)-based applications. Add this package to your composer.json and run `composer update`:
{
"require": {
"beberlei/azure-distribution-bundle": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
}
Also you have to add the bundle in your kernel, see the next section on this.
## Azure Kernel
The Azure kernel can be used to set the temporary and cache directories to `sys_get_tempdir()` on production. These are the only writable directories for the webserver on Azure.
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use WindowsAzure\DistributionBundle\HttpKernel\AzureKernel; // change use
class AppKernel extends AzureKernel // change kernel here
{
$bundles = array(
// ...
new WindowsAzure\DistributionBundle\WindowsAzureDistributionBundle();
// ...
);
// keep the old code here.
return $bundles;
}
| Add repositories key in installation | Add repositories key in installation
| Markdown | mit | beberlei/AzureDistributionBundle,beberlei/AzureDistributionBundle | markdown | ## Code Before:
---
title: Installation
layout: default
---
# Installation
Prerequisites for this bundle are a Windows development machine with the Windows Azure SDK installed.
You can either install the SDK through [Web Platform Installer](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-automatically-with-the-microsoft-web-platform-installer) or all [dependencies manually](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-manually).
## Composer
The most simple way to use Azure Distribution Bundle is with [Composer](http://www.packagist.org)-based applications. Add this package to your composer.json and run `composer update`:
{
"require": {
"beberlei/azure-distribution-bundle": "*"
}
}
Also you have to add the bundle in your kernel, see the next section on this.
## Azure Kernel
The Azure kernel can be used to set the temporary and cache directories to `sys_get_tempdir()` on production. These are the only writable directories for the webserver on Azure.
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use WindowsAzure\DistributionBundle\HttpKernel\AzureKernel; // change use
class AppKernel extends AzureKernel // change kernel here
{
$bundles = array(
// ...
new WindowsAzure\DistributionBundle\WindowsAzureDistributionBundle();
// ...
);
// keep the old code here.
return $bundles;
}
## Instruction:
Add repositories key in installation
## Code After:
---
title: Installation
layout: default
---
# Installation
Prerequisites for this bundle are a Windows development machine with the Windows Azure SDK installed.
You can either install the SDK through [Web Platform Installer](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-automatically-with-the-microsoft-web-platform-installer) or all [dependencies manually](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-manually).
## Composer
The most simple way to use Azure Distribution Bundle is with [Composer](http://www.packagist.org)-based applications. Add this package to your composer.json and run `composer update`:
{
"require": {
"beberlei/azure-distribution-bundle": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
}
Also you have to add the bundle in your kernel, see the next section on this.
## Azure Kernel
The Azure kernel can be used to set the temporary and cache directories to `sys_get_tempdir()` on production. These are the only writable directories for the webserver on Azure.
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use WindowsAzure\DistributionBundle\HttpKernel\AzureKernel; // change use
class AppKernel extends AzureKernel // change kernel here
{
$bundles = array(
// ...
new WindowsAzure\DistributionBundle\WindowsAzureDistributionBundle();
// ...
);
// keep the old code here.
return $bundles;
}
| ---
title: Installation
layout: default
---
# Installation
Prerequisites for this bundle are a Windows development machine with the Windows Azure SDK installed.
You can either install the SDK through [Web Platform Installer](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-automatically-with-the-microsoft-web-platform-installer) or all [dependencies manually](http://azurephp.interoperabilitybridges.com/articles/setup-the-windows-azure-development-environment-manually).
## Composer
The most simple way to use Azure Distribution Bundle is with [Composer](http://www.packagist.org)-based applications. Add this package to your composer.json and run `composer update`:
{
"require": {
"beberlei/azure-distribution-bundle": "*"
- }
+ },
? +
+ "repositories": [
+ {
+ "type": "pear",
+ "url": "http://pear.php.net"
+ }
+ ],
}
Also you have to add the bundle in your kernel, see the next section on this.
## Azure Kernel
The Azure kernel can be used to set the temporary and cache directories to `sys_get_tempdir()` on production. These are the only writable directories for the webserver on Azure.
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use WindowsAzure\DistributionBundle\HttpKernel\AzureKernel; // change use
class AppKernel extends AzureKernel // change kernel here
{
$bundles = array(
// ...
new WindowsAzure\DistributionBundle\WindowsAzureDistributionBundle();
// ...
);
// keep the old code here.
return $bundles;
} | 8 | 0.177778 | 7 | 1 |
2dccf1d9368e28d651f7a0aed6dd50171d90a456 | api/app/views/spree/api/addresses/show.v1.rabl | api/app/views/spree/api/addresses/show.v1.rabl | object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes :id, :iso_name, :iso, :iso3, :name, :numcode
end
child(:state) do |address|
attributes :abbr, :country_id, :id, :name
end
| object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes *country_attributes
end
child(:state) do |address|
attributes *state_attributes
end
| Clean up addresses show rabl | Clean up addresses show rabl
| Ruby | bsd-3-clause | gautamsawhney/spree,lsirivong/spree,JuandGirald/spree,shioyama/spree,LBRapid/spree,surfdome/spree,builtbybuffalo/spree,JuandGirald/spree,brchristian/spree,pjmj777/spree,omarsar/spree,TrialGuides/spree,project-eutopia/spree,imella/spree,CiscoCloud/spree,Nevensoft/spree,reinaris/spree,karlitxo/spree,shekibobo/spree,priyank-gupta/spree,Ropeney/spree,DynamoMTL/spree,ahmetabdi/spree,Lostmyname/spree,HealthWave/spree,tomash/spree,siddharth28/spree,edgward/spree,yomishra/pce,bjornlinder/Spree,keatonrow/spree,trigrass2/spree,tancnle/spree,jimblesm/spree,odk211/spree,welitonfreitas/spree,rakibulislam/spree,biagidp/spree,wolfieorama/spree,ujai/spree,yomishra/pce,lsirivong/solidus,yiqing95/spree,ramkumar-kr/spree,jsurdilla/solidus,calvinl/spree,scottcrawford03/solidus,SadTreeFriends/spree,adaddeo/spree,imella/spree,sideci-sample/sideci-sample-spree,odk211/spree,dafontaine/spree,ayb/spree,lsirivong/solidus,Senjai/spree,hoanghiep90/spree,project-eutopia/spree,bjornlinder/Spree,dafontaine/spree,CJMrozek/spree,NerdsvilleCEO/spree,tancnle/spree,reinaris/spree,Hawaiideveloper/shoppingcart,rbngzlv/spree,dandanwei/spree,sfcgeorge/spree,jparr/spree,softr8/spree,alejandromangione/spree,pulkit21/spree,bonobos/solidus,reidblomquist/spree,Arpsara/solidus,Hates/spree,bonobos/solidus,priyank-gupta/spree,bonobos/solidus,Hawaiideveloper/shoppingcart,Kagetsuki/spree,tesserakt/clean_spree,lsirivong/spree,richardnuno/solidus,archSeer/spree,knuepwebdev/FloatTubeRodHolders,sliaquat/spree,jhawthorn/spree,rakibulislam/spree,madetech/spree,calvinl/spree,quentinuys/spree,welitonfreitas/spree,beni55/spree,NerdsvilleCEO/spree,LBRapid/spree,ahmetabdi/spree,reidblomquist/spree,alvinjean/spree,JDutil/spree,gautamsawhney/spree,joanblake/spree,surfdome/spree,DynamoMTL/spree,richardnuno/solidus,net2b/spree,moneyspyder/spree,SadTreeFriends/spree,locomotivapro/spree,assembledbrands/spree,ramkumar-kr/spree,jspizziri/spree,caiqinghua/spree,Hates/spree,builtbybuffalo/spree,alvinjean/spree,beni55/spree,joanblake/spree,yushine/spree,mindvolt/spree,KMikhaylovCTG/spree,richardnuno/solidus,project-eutopia/spree,abhishekjain16/spree,progsri/spree,robodisco/spree,ujai/spree,mindvolt/spree,Senjai/spree,project-eutopia/spree,patdec/spree,azclick/spree,shekibobo/spree,rajeevriitm/spree,azclick/spree,agient/agientstorefront,Nevensoft/spree,keatonrow/spree,athal7/solidus,zamiang/spree,scottcrawford03/solidus,pulkit21/spree,piousbox/spree,pervino/spree,caiqinghua/spree,quentinuys/spree,Antdesk/karpal-spree,berkes/spree,quentinuys/spree,urimikhli/spree,Kagetsuki/spree,archSeer/spree,pulkit21/spree,keatonrow/spree,jordan-brough/spree,Hawaiideveloper/shoppingcart,pjmj777/spree,builtbybuffalo/spree,jordan-brough/solidus,carlesjove/spree,raow/spree,ujai/spree,sunny2601/spree,knuepwebdev/FloatTubeRodHolders,madetech/spree,sunny2601/spree,Hates/spree,njerrywerry/spree,alepore/spree,dandanwei/spree,ayb/spree,abhishekjain16/spree,JDutil/spree,lsirivong/spree,scottcrawford03/solidus,watg/spree,softr8/spree,vinsol/spree,orenf/spree,Migweld/spree,priyank-gupta/spree,knuepwebdev/FloatTubeRodHolders,jspizziri/spree,Nevensoft/spree,vulk/spree,progsri/spree,bjornlinder/Spree,AgilTec/spree,tesserakt/clean_spree,delphsoft/spree-store-ballchair,shekibobo/spree,PhoenixTeam/spree_phoenix,piousbox/spree,kitwalker12/spree,alvinjean/spree,pervino/solidus,progsri/spree,bricesanchez/spree,cutefrank/spree,agient/agientstorefront,assembledbrands/spree,derekluo/spree,shaywood2/spree,camelmasa/spree,athal7/solidus,welitonfreitas/spree,tesserakt/clean_spree,DynamoMTL/spree,moneyspyder/spree,Ropeney/spree,CiscoCloud/spree,codesavvy/sandbox,APohio/spree,pervino/spree,RatioClothing/spree,mleglise/spree,vinsol/spree,TimurTarasenko/spree,gautamsawhney/spree,rbngzlv/spree,CiscoCloud/spree,softr8/spree,wolfieorama/spree,xuewenfei/solidus,vinsol/spree,miyazawatomoka/spree,StemboltHQ/spree,dafontaine/spree,omarsar/spree,jeffboulet/spree,robodisco/spree,forkata/solidus,shioyama/spree,njerrywerry/spree,alvinjean/spree,firman/spree,ckk-scratch/solidus,kewaunited/spree,forkata/solidus,codesavvy/sandbox,gautamsawhney/spree,reidblomquist/spree,moneyspyder/spree,quentinuys/spree,grzlus/solidus,Arpsara/solidus,LBRapid/spree,freerunningtech/spree,cutefrank/spree,thogg4/spree,APohio/spree,shaywood2/spree,berkes/spree,sfcgeorge/spree,xuewenfei/solidus,mleglise/spree,Engeltj/spree,adaddeo/spree,dafontaine/spree,Engeltj/spree,volpejoaquin/spree,nooysters/spree,pervino/solidus,degica/spree,omarsar/spree,devilcoders/solidus,vinsol/spree,keatonrow/spree,radarseesradar/spree,biagidp/spree,Kagetsuki/spree,brchristian/spree,camelmasa/spree,Boomkat/spree,jimblesm/spree,jordan-brough/solidus,gregoryrikson/spree-sample,Antdesk/karpal-spree,sfcgeorge/spree,RatioClothing/spree,Nevensoft/spree,rajeevriitm/spree,azranel/spree,adaddeo/spree,imella/spree,madetech/spree,zamiang/spree,trigrass2/spree,jsurdilla/solidus,PhoenixTeam/spree_phoenix,delphsoft/spree-store-ballchair,woboinc/spree,pjmj777/spree,mleglise/spree,derekluo/spree,odk211/spree,watg/spree,zamiang/spree,jeffboulet/spree,shioyama/spree,groundctrl/spree,Migweld/spree,ramkumar-kr/spree,volpejoaquin/spree,Kagetsuki/spree,Mayvenn/spree,yiqing95/spree,AgilTec/spree,ahmetabdi/spree,patdec/spree,shaywood2/spree,nooysters/spree,tancnle/spree,grzlus/spree,Senjai/solidus,pervino/spree,fahidnasir/spree,miyazawatomoka/spree,devilcoders/solidus,robodisco/spree,DarkoP/spree,codesavvy/sandbox,athal7/solidus,xuewenfei/solidus,jimblesm/spree,JDutil/spree,Mayvenn/spree,pulkit21/spree,Boomkat/spree,Lostmyname/spree,madetech/spree,patdec/spree,volpejoaquin/spree,agient/agientstorefront,shekibobo/spree,joanblake/spree,vcavallo/spree,tailic/spree,jparr/spree,forkata/solidus,urimikhli/spree,kitwalker12/spree,calvinl/spree,Senjai/solidus,jordan-brough/spree,locomotivapro/spree,JDutil/spree,SadTreeFriends/spree,forkata/solidus,lyzxsc/spree,sideci-sample/sideci-sample-spree,wolfieorama/spree,lsirivong/solidus,Machpowersystems/spree_mach,AgilTec/spree,yiqing95/spree,radarseesradar/spree,camelmasa/spree,NerdsvilleCEO/spree,azranel/spree,CJMrozek/spree,alepore/spree,Ropeney/spree,vulk/spree,grzlus/spree,gregoryrikson/spree-sample,FadliKun/spree,raow/spree,lsirivong/solidus,Boomkat/spree,azranel/spree,softr8/spree,raow/spree,devilcoders/solidus,grzlus/solidus,orenf/spree,zaeznet/spree,AgilTec/spree,sfcgeorge/spree,KMikhaylovCTG/spree,TimurTarasenko/spree,kitwalker12/spree,KMikhaylovCTG/spree,jspizziri/spree,yushine/spree,zaeznet/spree,jeffboulet/spree,lyzxsc/spree,shaywood2/spree,rbngzlv/spree,hifly/spree,miyazawatomoka/spree,karlitxo/spree,freerunningtech/spree,Migweld/spree,Mayvenn/spree,pervino/solidus,DarkoP/spree,brchristian/spree,sliaquat/spree,CJMrozek/spree,alejandromangione/spree,Mayvenn/spree,thogg4/spree,derekluo/spree,progsri/spree,ayb/spree,Antdesk/karpal-spree,groundctrl/spree,kewaunited/spree,JuandGirald/spree,vinayvinsol/spree,abhishekjain16/spree,ckk-scratch/solidus,Machpowersystems/spree_mach,lyzxsc/spree,jordan-brough/spree,cutefrank/spree,vulk/spree,assembledbrands/spree,Engeltj/spree,useiichi/spree,Hawaiideveloper/shoppingcart,richardnuno/solidus,Boomkat/spree,delphsoft/spree-store-ballchair,jasonfb/spree,carlesjove/spree,azclick/spree,vinayvinsol/spree,jhawthorn/spree,vinayvinsol/spree,groundctrl/spree,archSeer/spree,Lostmyname/spree,edgward/spree,HealthWave/spree,watg/spree,xuewenfei/solidus,grzlus/spree,firman/spree,siddharth28/spree,agient/agientstorefront,Hates/spree,azclick/spree,alejandromangione/spree,DarkoP/spree,APohio/spree,Senjai/spree,nooysters/spree,Migweld/spree,KMikhaylovCTG/spree,rakibulislam/spree,beni55/spree,moneyspyder/spree,fahidnasir/spree,useiichi/spree,zaeznet/spree,zamiang/spree,thogg4/spree,radarseesradar/spree,reinaris/spree,jordan-brough/solidus,hifly/spree,tomash/spree,jparr/spree,Arpsara/solidus,berkes/spree,dotandbo/spree,TrialGuides/spree,vulk/spree,trigrass2/spree,athal7/solidus,archSeer/spree,sunny2601/spree,orenf/spree,NerdsvilleCEO/spree,vmatekole/spree,woboinc/spree,jordan-brough/solidus,pervino/solidus,locomotivapro/spree,codesavvy/sandbox,tomash/spree,DynamoMTL/spree,adaddeo/spree,maybii/spree,PhoenixTeam/spree_phoenix,ahmetabdi/spree,firman/spree,groundctrl/spree,ckk-scratch/solidus,maybii/spree,jaspreet21anand/spree,biagidp/spree,reidblomquist/spree,jasonfb/spree,brchristian/spree,calvinl/spree,vcavallo/spree,maybii/spree,jasonfb/spree,nooysters/spree,camelmasa/spree,dandanwei/spree,SadTreeFriends/spree,kewaunited/spree,TimurTarasenko/spree,Machpowersystems/spree_mach,jsurdilla/solidus,Lostmyname/spree,zaeznet/spree,njerrywerry/spree,TrialGuides/spree,berkes/spree,gregoryrikson/spree-sample,njerrywerry/spree,Senjai/solidus,omarsar/spree,jspizziri/spree,dotandbo/spree,tancnle/spree,cutefrank/spree,lsirivong/spree,tomash/spree,jasonfb/spree,rajeevriitm/spree,scottcrawford03/solidus,PhoenixTeam/spree_phoenix,abhishekjain16/spree,CJMrozek/spree,wolfieorama/spree,surfdome/spree,hifly/spree,maybii/spree,alepore/spree,vmatekole/spree,Arpsara/solidus,tailic/spree,jaspreet21anand/spree,edgward/spree,yushine/spree,jaspreet21anand/spree,net2b/spree,karlitxo/spree,welitonfreitas/spree,rajeevriitm/spree,DarkoP/spree,CiscoCloud/spree,ramkumar-kr/spree,mindvolt/spree,joanblake/spree,carlesjove/spree,mindvolt/spree,reinaris/spree,yomishra/pce,HealthWave/spree,net2b/spree,grzlus/spree,vcavallo/spree,miyazawatomoka/spree,karlitxo/spree,bricesanchez/spree,piousbox/spree,useiichi/spree,derekluo/spree,vmatekole/spree,hoanghiep90/spree,pervino/spree,tesserakt/clean_spree,bonobos/solidus,net2b/spree,firman/spree,vcavallo/spree,tailic/spree,jhawthorn/spree,StemboltHQ/spree,hifly/spree,jparr/spree,piousbox/spree,hoanghiep90/spree,delphsoft/spree-store-ballchair,sideci-sample/sideci-sample-spree,dotandbo/spree,jsurdilla/solidus,rakibulislam/spree,bricesanchez/spree,radarseesradar/spree,hoanghiep90/spree,fahidnasir/spree,locomotivapro/spree,odk211/spree,Ropeney/spree,FadliKun/spree,surfdome/spree,thogg4/spree,urimikhli/spree,yushine/spree,sliaquat/spree,dandanwei/spree,raow/spree,builtbybuffalo/spree,FadliKun/spree,volpejoaquin/spree,siddharth28/spree,fahidnasir/spree,woboinc/spree,rbngzlv/spree,sunny2601/spree,yiqing95/spree,ckk-scratch/solidus,edgward/spree,APohio/spree,beni55/spree,sliaquat/spree,vmatekole/spree,gregoryrikson/spree-sample,StemboltHQ/spree,robodisco/spree,vinayvinsol/spree,trigrass2/spree,azranel/spree,caiqinghua/spree,TimurTarasenko/spree,devilcoders/solidus,TrialGuides/spree,grzlus/solidus,FadliKun/spree,ayb/spree,lyzxsc/spree,JuandGirald/spree,jaspreet21anand/spree,freerunningtech/spree,jimblesm/spree,caiqinghua/spree,degica/spree,Senjai/solidus,RatioClothing/spree,siddharth28/spree,dotandbo/spree,kewaunited/spree,degica/spree,priyank-gupta/spree,patdec/spree,useiichi/spree,grzlus/solidus,orenf/spree,jeffboulet/spree,carlesjove/spree,alejandromangione/spree,Engeltj/spree,mleglise/spree | ruby | ## Code Before:
object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes :id, :iso_name, :iso, :iso3, :name, :numcode
end
child(:state) do |address|
attributes :abbr, :country_id, :id, :name
end
## Instruction:
Clean up addresses show rabl
## Code After:
object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes *country_attributes
end
child(:state) do |address|
attributes *state_attributes
end
| object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
- attributes :id, :iso_name, :iso, :iso3, :name, :numcode
+ attributes *country_attributes
end
child(:state) do |address|
- attributes :abbr, :country_id, :id, :name
+ attributes *state_attributes
end | 4 | 0.363636 | 2 | 2 |
c627504b77b68b133ce2cde73d192e4c40f436a5 | TrailsKit/TrailsKit.h | TrailsKit/TrailsKit.h | //
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
#import "TKGPXPolylineMapper.h"
#import "TrailsKitUI.h"
#import "TrailsKitTypes.h"
#endif | //
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
#import "TrailsKitParsers.h"
#import "TrailsKitTypes.h"
#import "TrailsKitUI.h"
#endif | Add parsers header to root header | Add parsers header to root header
| C | mit | mmertsock/TrailsKit | c | ## Code Before:
//
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
#import "TKGPXPolylineMapper.h"
#import "TrailsKitUI.h"
#import "TrailsKitTypes.h"
#endif
## Instruction:
Add parsers header to root header
## Code After:
//
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
#import "TrailsKitParsers.h"
#import "TrailsKitTypes.h"
#import "TrailsKitUI.h"
#endif | //
// TrailsKit.h
// TrailsKit
//
// Created by Mike Mertsock on 1/1/13.
// Copyright (c) 2013 Esker Apps. All rights reserved.
//
#ifndef TrailsKit_TrailsKit_h
#define TrailsKit_TrailsKit_h
#import "TrailsKitGeometry.h"
- #import "TKGPXPolylineMapper.h"
+ #import "TrailsKitParsers.h"
+ #import "TrailsKitTypes.h"
#import "TrailsKitUI.h"
- #import "TrailsKitTypes.h"
#endif | 4 | 0.235294 | 2 | 2 |
f9dc4ef6d80b981d2711d113812b7c77d8dbb06b | src/applications/xhprof/controller/PhabricatorXHProfController.php | src/applications/xhprof/controller/PhabricatorXHProfController.php | <?php
abstract class PhabricatorXHProfController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->setApplicationName('XHProf');
$page->setBaseURI('/xhprof/');
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x98\x84");
$page->appendChild($view);
$response = new AphrontWebpageResponse();
if (isset($data['frame'])) {
$response->setFrameable(true);
$page->setFrameable(true);
$page->setShowChrome(false);
$page->setDisableConsole(true);
}
return $response->setContent($page->render());
}
}
| <?php
abstract class PhabricatorXHProfController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->setApplicationName('XHProf');
$page->setBaseURI('/xhprof/');
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x98\x84");
$page->appendChild($view);
$page->setDeviceReady(true);
$response = new AphrontWebpageResponse();
if (isset($data['frame'])) {
$response->setFrameable(true);
$page->setFrameable(true);
$page->setShowChrome(false);
$page->setDisableConsole(true);
}
return $response->setContent($page->render());
}
}
| Set device true on all XHProf pages | Set device true on all XHProf pages
Summary: Pass this as true when building XHProf pages
Test Plan: Verify setDeviceReady exists in class PhabricatorBarePageView
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11980
| PHP | apache-2.0 | eSpark/phabricator,Drooids/phabricator,codevlabs/phabricator,devurandom/phabricator,a20012251/phabricator,schlaile/phabricator,zhihu/phabricator,aswanderley/phabricator,Khan/phabricator,r4nt/phabricator,jwdeitch/phabricator,aik099/phabricator,wikimedia/phabricator,benchling/phabricator,freebsd/phabricator,jwdeitch/phabricator,uhd-urz/phabricator,Soluis/phabricator,aik099/phabricator,aswanderley/phabricator,matthewrez/phabricator,huangjimmy/phabricator-1,huangjimmy/phabricator-1,wangjun/phabricator,r4nt/phabricator,wangjun/phabricator,schlaile/phabricator,kanarip/phabricator,kwoun1982/phabricator,christopher-johnson/phabricator,huangjimmy/phabricator-1,wxstars/phabricator,phacility/phabricator,tanglu-org/tracker-phabricator,Drooids/phabricator,devurandom/phabricator,uhd-urz/phabricator,librewiki/phabricator,vinzent/phabricator,cjxgm/p.cjprods.org,denisdeejay/phabricator,leolujuyi/phabricator,benchling/phabricator,sharpwhisper/phabricator,kalbasit/phabricator,codevlabs/phabricator,phacility/phabricator,UNCC-OpenProjects/Phabricator,hach-que/phabricator,schlaile/phabricator,vinzent/phabricator,wikimedia/phabricator-phabricator,christopher-johnson/phabricator,ide/phabricator,ryancford/phabricator,r4nt/phabricator,freebsd/phabricator,librewiki/phabricator,shl3807/phabricator,tanglu-org/tracker-phabricator,Soluis/phabricator,zhihu/phabricator,christopher-johnson/phabricator,jwdeitch/phabricator,matthewrez/phabricator,aswanderley/phabricator,memsql/phabricator,codevlabs/phabricator,devurandom/phabricator,christopher-johnson/phabricator,ryancford/phabricator,wikimedia/phabricator-phabricator,kwoun1982/phabricator,shl3807/phabricator,devurandom/phabricator,hach-que/phabricator,NigelGreenway/phabricator,NigelGreenway/phabricator,NigelGreenway/phabricator,parksangkil/phabricator,zhihu/phabricator,phacility/phabricator,dannysu/phabricator,optimizely/phabricator,Drooids/phabricator,aik099/phabricator,Khan/phabricator,Automatic/phabricator,Automatic/phabricator,folsom-labs/phabricator,optimizely/phabricator,Symplicity/phabricator,r4nt/phabricator,matthewrez/phabricator,wusuoyongxin/phabricator,kanarip/phabricator,zhihu/phabricator,denisdeejay/phabricator,gsinkovskiy/phabricator,folsom-labs/phabricator,denisdeejay/phabricator,UNCC-OpenProjects/Phabricator,parksangkil/phabricator,MicroWorldwide/phabricator,uhd-urz/phabricator,memsql/phabricator,wusuoyongxin/phabricator,ide/phabricator,sharpwhisper/phabricator,hach-que/phabricator,shrimpma/phabricator,Khan/phabricator,zhihu/phabricator,shrimpma/phabricator,jwdeitch/phabricator,gsinkovskiy/phabricator,leolujuyi/phabricator,Symplicity/phabricator,optimizely/phabricator,wxstars/phabricator,leolujuyi/phabricator,cjxgm/p.cjprods.org,codevlabs/phabricator,kalbasit/phabricator,shl3807/phabricator,hach-que/phabricator,wxstars/phabricator,ryancford/phabricator,MicroWorldwide/phabricator,devurandom/phabricator,huangjimmy/phabricator-1,cjxgm/p.cjprods.org,eSpark/phabricator,optimizely/phabricator,r4nt/phabricator,MicroWorldwide/phabricator,librewiki/phabricator,gsinkovskiy/phabricator,wxstars/phabricator,Khan/phabricator,sharpwhisper/phabricator,wikimedia/phabricator,kwoun1982/phabricator,tanglu-org/tracker-phabricator,vinzent/phabricator,vuamitom/phabricator,vuamitom/phabricator,tanglu-org/tracker-phabricator,Automatic/phabricator,schlaile/phabricator,vuamitom/phabricator,benchling/phabricator,shl3807/phabricator,vuamitom/phabricator,aik099/phabricator,kanarip/phabricator,kalbasit/phabricator,aswanderley/phabricator,vuamitom/phabricator,cjxgm/p.cjprods.org,Soluis/phabricator,wikimedia/phabricator,NigelGreenway/phabricator,dannysu/phabricator,christopher-johnson/phabricator,denisdeejay/phabricator,MicroWorldwide/phabricator,benchling/phabricator,folsom-labs/phabricator,freebsd/phabricator,Symplicity/phabricator,gsinkovskiy/phabricator,wusuoyongxin/phabricator,a20012251/phabricator,ide/phabricator,Soluis/phabricator,a20012251/phabricator,kwoun1982/phabricator,UNCC-OpenProjects/Phabricator,UNCC-OpenProjects/Phabricator,wikimedia/phabricator-phabricator,wikimedia/phabricator-phabricator,dannysu/phabricator,optimizely/phabricator,eSpark/phabricator,uhd-urz/phabricator,memsql/phabricator,ryancford/phabricator,NigelGreenway/phabricator,leolujuyi/phabricator,vinzent/phabricator,aswanderley/phabricator,kanarip/phabricator,memsql/phabricator,Soluis/phabricator,shrimpma/phabricator,freebsd/phabricator,memsql/phabricator,devurandom/phabricator,cjxgm/p.cjprods.org,tanglu-org/tracker-phabricator,shrimpma/phabricator,phacility/phabricator,Drooids/phabricator,sharpwhisper/phabricator,wangjun/phabricator,codevlabs/phabricator,wusuoyongxin/phabricator,dannysu/phabricator,kalbasit/phabricator,a20012251/phabricator,librewiki/phabricator,matthewrez/phabricator,hach-que/phabricator,wangjun/phabricator,folsom-labs/phabricator,gsinkovskiy/phabricator,folsom-labs/phabricator,eSpark/phabricator,Symplicity/phabricator,dannysu/phabricator,wikimedia/phabricator-phabricator,parksangkil/phabricator,ide/phabricator,sharpwhisper/phabricator,eSpark/phabricator,kwoun1982/phabricator,uhd-urz/phabricator,parksangkil/phabricator,a20012251/phabricator,huangjimmy/phabricator-1,librewiki/phabricator,kanarip/phabricator,vinzent/phabricator,Automatic/phabricator,wikimedia/phabricator,zhihu/phabricator | php | ## Code Before:
<?php
abstract class PhabricatorXHProfController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->setApplicationName('XHProf');
$page->setBaseURI('/xhprof/');
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x98\x84");
$page->appendChild($view);
$response = new AphrontWebpageResponse();
if (isset($data['frame'])) {
$response->setFrameable(true);
$page->setFrameable(true);
$page->setShowChrome(false);
$page->setDisableConsole(true);
}
return $response->setContent($page->render());
}
}
## Instruction:
Set device true on all XHProf pages
Summary: Pass this as true when building XHProf pages
Test Plan: Verify setDeviceReady exists in class PhabricatorBarePageView
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11980
## Code After:
<?php
abstract class PhabricatorXHProfController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->setApplicationName('XHProf');
$page->setBaseURI('/xhprof/');
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x98\x84");
$page->appendChild($view);
$page->setDeviceReady(true);
$response = new AphrontWebpageResponse();
if (isset($data['frame'])) {
$response->setFrameable(true);
$page->setFrameable(true);
$page->setShowChrome(false);
$page->setDisableConsole(true);
}
return $response->setContent($page->render());
}
}
| <?php
abstract class PhabricatorXHProfController extends PhabricatorController {
public function buildStandardPageResponse($view, array $data) {
$page = $this->buildStandardPageView();
$page->setApplicationName('XHProf');
$page->setBaseURI('/xhprof/');
$page->setTitle(idx($data, 'title'));
$page->setGlyph("\xE2\x98\x84");
$page->appendChild($view);
+ $page->setDeviceReady(true);
$response = new AphrontWebpageResponse();
if (isset($data['frame'])) {
$response->setFrameable(true);
$page->setFrameable(true);
$page->setShowChrome(false);
$page->setDisableConsole(true);
}
return $response->setContent($page->render());
}
} | 1 | 0.038462 | 1 | 0 |
fb268b6837c7bcfc7cce77e16b58fe75746e1803 | test/fixtures/cookbooks/perl_test/recipes/default.rb | test/fixtures/cookbooks/perl_test/recipes/default.rb | apt_update 'update' if platform_family?('debian')
include_recipe 'perl::default'
unless platform?('windows')
include_recipe 'build-essential::default' # required to compile modules
cpan_module 'Test::MockModule' do
version '>= 0.05'
action [:install]
end
cpan_module 'Test::MockModule' do
action [:uninstall]
end
# cpan_module 'Test::MockModule' do
# version '>= 0.05'
# action [:install]
# end
end
| apt_update 'update'
include_recipe 'perl::default'
unless platform?('windows')
include_recipe 'build-essential::default' # required to compile modules
cpan_module 'Install test module' do
module 'Test::MockModule'
version '>= 0.05'
action [:install]
end
cpan_module 'Uninstall test module' do
module 'Test::MockModule'
action [:uninstall]
end
# cpan_module 'Test::MockModule' do
# version '>= 0.05'
# action [:install]
# end
end
| Resolve resource cloning in the test cookbook | Resolve resource cloning in the test cookbook
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
| Ruby | apache-2.0 | opscode-cookbooks/perl,chef-cookbooks/perl | ruby | ## Code Before:
apt_update 'update' if platform_family?('debian')
include_recipe 'perl::default'
unless platform?('windows')
include_recipe 'build-essential::default' # required to compile modules
cpan_module 'Test::MockModule' do
version '>= 0.05'
action [:install]
end
cpan_module 'Test::MockModule' do
action [:uninstall]
end
# cpan_module 'Test::MockModule' do
# version '>= 0.05'
# action [:install]
# end
end
## Instruction:
Resolve resource cloning in the test cookbook
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
## Code After:
apt_update 'update'
include_recipe 'perl::default'
unless platform?('windows')
include_recipe 'build-essential::default' # required to compile modules
cpan_module 'Install test module' do
module 'Test::MockModule'
version '>= 0.05'
action [:install]
end
cpan_module 'Uninstall test module' do
module 'Test::MockModule'
action [:uninstall]
end
# cpan_module 'Test::MockModule' do
# version '>= 0.05'
# action [:install]
# end
end
| - apt_update 'update' if platform_family?('debian')
+ apt_update 'update'
include_recipe 'perl::default'
unless platform?('windows')
include_recipe 'build-essential::default' # required to compile modules
+ cpan_module 'Install test module' do
- cpan_module 'Test::MockModule' do
? ^^^^^ ---
+ module 'Test::MockModule'
? ^^
version '>= 0.05'
action [:install]
end
+ cpan_module 'Uninstall test module' do
- cpan_module 'Test::MockModule' do
? ^^^^^ ---
+ module 'Test::MockModule'
? ^^
action [:uninstall]
end
# cpan_module 'Test::MockModule' do
# version '>= 0.05'
# action [:install]
# end
end | 8 | 0.380952 | 5 | 3 |
b66c5e58f13c790a8933117b0f8ba73ed37c1855 | client/src/app/header/header.component.scss | client/src/app/header/header.component.scss | @import '_variables';
@import '_mixins';
my-search-typeahead {
margin-right: 15px;
}
.upload-button {
@include peertube-button-link;
@include orange-button;
@include button-with-icon(22px, 3px, -1px);
color: var(--mainBackgroundColor) !important;
margin-right: 25px;
@media screen and (max-width: 600px) {
margin-right: 10px;
padding: 0 10px;
.icon.icon-upload {
margin-right: 0;
}
.upload-button-label {
display: none;
}
}
}
| @import '_variables';
@import '_mixins';
my-search-typeahead {
margin-right: 15px;
}
.upload-button {
@include peertube-button-link;
@include orange-button;
@include button-with-icon(22px, 3px, -1px);
margin-right: 25px;
@media screen and (max-width: 600px) {
margin-right: 10px;
padding: 0 10px;
.icon.icon-upload {
margin-right: 0;
}
.upload-button-label {
display: none;
}
}
}
| Fix upload button color in dark mode | Fix upload button color in dark mode
| SCSS | agpl-3.0 | Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube | scss | ## Code Before:
@import '_variables';
@import '_mixins';
my-search-typeahead {
margin-right: 15px;
}
.upload-button {
@include peertube-button-link;
@include orange-button;
@include button-with-icon(22px, 3px, -1px);
color: var(--mainBackgroundColor) !important;
margin-right: 25px;
@media screen and (max-width: 600px) {
margin-right: 10px;
padding: 0 10px;
.icon.icon-upload {
margin-right: 0;
}
.upload-button-label {
display: none;
}
}
}
## Instruction:
Fix upload button color in dark mode
## Code After:
@import '_variables';
@import '_mixins';
my-search-typeahead {
margin-right: 15px;
}
.upload-button {
@include peertube-button-link;
@include orange-button;
@include button-with-icon(22px, 3px, -1px);
margin-right: 25px;
@media screen and (max-width: 600px) {
margin-right: 10px;
padding: 0 10px;
.icon.icon-upload {
margin-right: 0;
}
.upload-button-label {
display: none;
}
}
}
| @import '_variables';
@import '_mixins';
my-search-typeahead {
margin-right: 15px;
}
.upload-button {
@include peertube-button-link;
@include orange-button;
@include button-with-icon(22px, 3px, -1px);
- color: var(--mainBackgroundColor) !important;
margin-right: 25px;
@media screen and (max-width: 600px) {
margin-right: 10px;
padding: 0 10px;
.icon.icon-upload {
margin-right: 0;
}
.upload-button-label {
display: none;
}
}
} | 1 | 0.035714 | 0 | 1 |
98e815f7d23114b6bc9e54e309f65efe1cc8d073 | DependencyInjection/Compiler/EnvironmentVariablesPass.php | DependencyInjection/Compiler/EnvironmentVariablesPass.php | <?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\SettingsBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
/**
* Environment variables pass, overrides default variables with environment ones.
*/
class EnvironmentVariablesPass implements CompilerPassInterface
{
/**
* Finds environment variables prefixed with ongr__ and changes default ones.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
foreach ($_SERVER as $key => $value) {
if (0 === strpos($key, 'ongr__')) {
$param = strtolower(str_replace('__', '.', substr($key, 6)));
$container->setParameter($param, $value);
}
}
}
}
| <?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\SettingsBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\HttpFoundation\Request;
/**
* Environment variables pass, overrides default variables with environment ones.
*/
class EnvironmentVariablesPass implements CompilerPassInterface
{
/**
* Finds environment variables prefixed with ongr__ and changes default ones.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
$request = Request::createFromGlobals();
foreach ($request->server as $key => $value) {
if (0 === strpos($key, 'ongr__')) {
$param = strtolower(str_replace('__', '.', substr($key, 6)));
$container->setParameter($param, $value);
}
}
}
}
| Use server value from request instead of super global variable | Use server value from request instead of super global variable
| PHP | mit | ongr-io/SettingsBundle,ongr-io/SettingsBundle,ongr-io/SettingsBundle | php | ## Code Before:
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\SettingsBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
/**
* Environment variables pass, overrides default variables with environment ones.
*/
class EnvironmentVariablesPass implements CompilerPassInterface
{
/**
* Finds environment variables prefixed with ongr__ and changes default ones.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
foreach ($_SERVER as $key => $value) {
if (0 === strpos($key, 'ongr__')) {
$param = strtolower(str_replace('__', '.', substr($key, 6)));
$container->setParameter($param, $value);
}
}
}
}
## Instruction:
Use server value from request instead of super global variable
## Code After:
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\SettingsBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\HttpFoundation\Request;
/**
* Environment variables pass, overrides default variables with environment ones.
*/
class EnvironmentVariablesPass implements CompilerPassInterface
{
/**
* Finds environment variables prefixed with ongr__ and changes default ones.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
$request = Request::createFromGlobals();
foreach ($request->server as $key => $value) {
if (0 === strpos($key, 'ongr__')) {
$param = strtolower(str_replace('__', '.', substr($key, 6)));
$container->setParameter($param, $value);
}
}
}
}
| <?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\SettingsBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+ use Symfony\Component\HttpFoundation\Request;
/**
* Environment variables pass, overrides default variables with environment ones.
*/
class EnvironmentVariablesPass implements CompilerPassInterface
{
/**
* Finds environment variables prefixed with ongr__ and changes default ones.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
+ $request = Request::createFromGlobals();
+
- foreach ($_SERVER as $key => $value) {
? ^^^^^^^
+ foreach ($request->server as $key => $value) {
? ^^^^^^^^^^^^^^^
if (0 === strpos($key, 'ongr__')) {
$param = strtolower(str_replace('__', '.', substr($key, 6)));
$container->setParameter($param, $value);
}
}
}
} | 5 | 0.138889 | 4 | 1 |
8545423373dee1f4b801375922b67bc2417cb426 | ooni/resources/update.py | ooni/resources/update.py | import os
from twisted.internet import reactor, defer, protocol
from twisted.web.client import RedirectAgent, Agent
from ooni.settings import config
from ooni.resources import inputs, geoip
agent = RedirectAgent(Agent(reactor))
class SaveToFile(protocol.Protocol):
def __init__(self, finished, filesize, filename):
self.finished = finished
self.remaining = filesize
self.outfile = open(filename, 'wb')
def dataReceived(self, bytes):
if self.remaining:
display = bytes[:self.remaining]
self.outfile.write(display)
self.remaining -= len(display)
else:
self.outfile.close()
def connectionLost(self, reason):
self.outfile.close()
self.finished.callback(None)
@defer.inlineCallbacks
def download_resource(resources):
for filename, resource in resources.items():
print "Downloading %s" % filename
filename = os.path.join(config.resources_directory, filename)
response = yield agent.request("GET", resource['url'])
finished = defer.Deferred()
response.deliverBody(SaveToFile(finished, response.length, filename))
yield finished
if resource['action'] is not None:
yield defer.maybeDeferred(resource['action'],
filename,
*resource['action_args'])
print "%s written." % filename
def download_inputs():
return download_resource(inputs)
def download_geoip():
return download_resource(geoip)
| import os
from twisted.internet import defer
from twisted.web.client import downloadPage
from ooni.settings import config
from ooni.resources import inputs, geoip
@defer.inlineCallbacks
def download_resource(resources):
for filename, resource in resources.items():
print "Downloading %s" % filename
filename = os.path.join(config.resources_directory, filename)
yield downloadPage(resource['url'], filename)
if resource['action'] is not None:
yield defer.maybeDeferred(resource['action'],
filename,
*resource['action_args'])
print "%s written." % filename
def download_inputs():
return download_resource(inputs)
def download_geoip():
return download_resource(geoip)
| Simplify the code for downloading resources. | Simplify the code for downloading resources.
Use downloadPage instead of our own class.
| Python | bsd-2-clause | 0xPoly/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe | python | ## Code Before:
import os
from twisted.internet import reactor, defer, protocol
from twisted.web.client import RedirectAgent, Agent
from ooni.settings import config
from ooni.resources import inputs, geoip
agent = RedirectAgent(Agent(reactor))
class SaveToFile(protocol.Protocol):
def __init__(self, finished, filesize, filename):
self.finished = finished
self.remaining = filesize
self.outfile = open(filename, 'wb')
def dataReceived(self, bytes):
if self.remaining:
display = bytes[:self.remaining]
self.outfile.write(display)
self.remaining -= len(display)
else:
self.outfile.close()
def connectionLost(self, reason):
self.outfile.close()
self.finished.callback(None)
@defer.inlineCallbacks
def download_resource(resources):
for filename, resource in resources.items():
print "Downloading %s" % filename
filename = os.path.join(config.resources_directory, filename)
response = yield agent.request("GET", resource['url'])
finished = defer.Deferred()
response.deliverBody(SaveToFile(finished, response.length, filename))
yield finished
if resource['action'] is not None:
yield defer.maybeDeferred(resource['action'],
filename,
*resource['action_args'])
print "%s written." % filename
def download_inputs():
return download_resource(inputs)
def download_geoip():
return download_resource(geoip)
## Instruction:
Simplify the code for downloading resources.
Use downloadPage instead of our own class.
## Code After:
import os
from twisted.internet import defer
from twisted.web.client import downloadPage
from ooni.settings import config
from ooni.resources import inputs, geoip
@defer.inlineCallbacks
def download_resource(resources):
for filename, resource in resources.items():
print "Downloading %s" % filename
filename = os.path.join(config.resources_directory, filename)
yield downloadPage(resource['url'], filename)
if resource['action'] is not None:
yield defer.maybeDeferred(resource['action'],
filename,
*resource['action_args'])
print "%s written." % filename
def download_inputs():
return download_resource(inputs)
def download_geoip():
return download_resource(geoip)
| import os
- from twisted.internet import reactor, defer, protocol
? --------- ----------
+ from twisted.internet import defer
- from twisted.web.client import RedirectAgent, Agent
+ from twisted.web.client import downloadPage
from ooni.settings import config
from ooni.resources import inputs, geoip
-
- agent = RedirectAgent(Agent(reactor))
-
-
- class SaveToFile(protocol.Protocol):
- def __init__(self, finished, filesize, filename):
- self.finished = finished
- self.remaining = filesize
- self.outfile = open(filename, 'wb')
-
- def dataReceived(self, bytes):
- if self.remaining:
- display = bytes[:self.remaining]
- self.outfile.write(display)
- self.remaining -= len(display)
- else:
- self.outfile.close()
-
- def connectionLost(self, reason):
- self.outfile.close()
- self.finished.callback(None)
@defer.inlineCallbacks
def download_resource(resources):
for filename, resource in resources.items():
print "Downloading %s" % filename
filename = os.path.join(config.resources_directory, filename)
+ yield downloadPage(resource['url'], filename)
- response = yield agent.request("GET", resource['url'])
- finished = defer.Deferred()
- response.deliverBody(SaveToFile(finished, response.length, filename))
- yield finished
if resource['action'] is not None:
yield defer.maybeDeferred(resource['action'],
filename,
*resource['action_args'])
print "%s written." % filename
def download_inputs():
return download_resource(inputs)
def download_geoip():
return download_resource(geoip) | 30 | 0.555556 | 3 | 27 |
eaa588dfaf02a9d14f339461bb7091b3b67d36a0 | packages.d/init-auto-complete.el | packages.d/init-auto-complete.el | (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
| (require 'auto-complete-config)
(ac-config-default)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
| Fix order issue for AC setup | Fix order issue for AC setup
| Emacs Lisp | mit | lstoll/dotfiles,lstoll/repo,lstoll/dotfiles,lstoll/dotfiles,lstoll/repo,lstoll/repo | emacs-lisp | ## Code Before:
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
## Instruction:
Fix order issue for AC setup
## Code After:
(require 'auto-complete-config)
(ac-config-default)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
| - (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
+ (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete) | 2 | 0.4 | 1 | 1 |
21b3584ac2b5d85323806ff1fa2d9224fca9f644 | Client/AbstractClient.php | Client/AbstractClient.php | <?php
namespace Markup\OEmbedBundle\Client;
use Markup\OEmbedBundle\Provider\ProviderInterface;
/**
* A superclass for client implementations.
*/
abstract class AbstractClient implements ClientInterface
{
/**
* Resolves the media ID and an oEmbed provider to a URL.
*
* @param ProviderInterface $provider
* @param string $mediaId
* @param array $parameters
* @return string
**/
protected function resolveOEmbedUrl(ProviderInterface $provider, $mediaId, array $parameters = array())
{
$mediaUrl = str_replace('$ID$', $mediaId, $provider->getUrlScheme());
$queryStringSuffix = (!empty($parameters)) ? '?' . http_build_query($parameters) : '';
return sprintf('%s?url=%s%s', $provider->getApiEndpoint(), $mediaUrl, rawurlencode($queryStringSuffix));
}
}
| <?php
namespace Markup\OEmbedBundle\Client;
use Markup\OEmbedBundle\Provider\ProviderInterface;
/**
* A superclass for client implementations.
*/
abstract class AbstractClient implements ClientInterface
{
/**
* Resolves the media ID and an oEmbed provider to a URL.
*
* @param ProviderInterface $provider
* @param string $mediaId
* @param array $parameters
* @return string
**/
protected function resolveOEmbedUrl(ProviderInterface $provider, $mediaId, array $parameters = array())
{
$mediaUrl = str_replace('$ID$', $mediaId, $provider->getUrlScheme());
$mediaUrlHasQueryString = (bool) parse_url($mediaUrl, PHP_URL_QUERY);
$queryStingPrefix = ($mediaUrlHasQueryString) ? '&' : '?';
$queryStringSuffix = (!empty($parameters)) ? $queryStingPrefix . http_build_query($parameters) : '';
return sprintf(
'%s?url=%s%s',
$provider->getApiEndpoint(),
$mediaUrl,
rawurlencode($queryStringSuffix)
);
}
}
| Fix url resolution with regards to querysting parameters. | Fix url resolution with regards to querysting parameters.
| PHP | mit | gsdevme/OEmbedBundle,usemarkup/OEmbedBundle | php | ## Code Before:
<?php
namespace Markup\OEmbedBundle\Client;
use Markup\OEmbedBundle\Provider\ProviderInterface;
/**
* A superclass for client implementations.
*/
abstract class AbstractClient implements ClientInterface
{
/**
* Resolves the media ID and an oEmbed provider to a URL.
*
* @param ProviderInterface $provider
* @param string $mediaId
* @param array $parameters
* @return string
**/
protected function resolveOEmbedUrl(ProviderInterface $provider, $mediaId, array $parameters = array())
{
$mediaUrl = str_replace('$ID$', $mediaId, $provider->getUrlScheme());
$queryStringSuffix = (!empty($parameters)) ? '?' . http_build_query($parameters) : '';
return sprintf('%s?url=%s%s', $provider->getApiEndpoint(), $mediaUrl, rawurlencode($queryStringSuffix));
}
}
## Instruction:
Fix url resolution with regards to querysting parameters.
## Code After:
<?php
namespace Markup\OEmbedBundle\Client;
use Markup\OEmbedBundle\Provider\ProviderInterface;
/**
* A superclass for client implementations.
*/
abstract class AbstractClient implements ClientInterface
{
/**
* Resolves the media ID and an oEmbed provider to a URL.
*
* @param ProviderInterface $provider
* @param string $mediaId
* @param array $parameters
* @return string
**/
protected function resolveOEmbedUrl(ProviderInterface $provider, $mediaId, array $parameters = array())
{
$mediaUrl = str_replace('$ID$', $mediaId, $provider->getUrlScheme());
$mediaUrlHasQueryString = (bool) parse_url($mediaUrl, PHP_URL_QUERY);
$queryStingPrefix = ($mediaUrlHasQueryString) ? '&' : '?';
$queryStringSuffix = (!empty($parameters)) ? $queryStingPrefix . http_build_query($parameters) : '';
return sprintf(
'%s?url=%s%s',
$provider->getApiEndpoint(),
$mediaUrl,
rawurlencode($queryStringSuffix)
);
}
}
| <?php
namespace Markup\OEmbedBundle\Client;
use Markup\OEmbedBundle\Provider\ProviderInterface;
/**
* A superclass for client implementations.
*/
abstract class AbstractClient implements ClientInterface
{
/**
* Resolves the media ID and an oEmbed provider to a URL.
*
* @param ProviderInterface $provider
* @param string $mediaId
* @param array $parameters
* @return string
**/
protected function resolveOEmbedUrl(ProviderInterface $provider, $mediaId, array $parameters = array())
{
$mediaUrl = str_replace('$ID$', $mediaId, $provider->getUrlScheme());
- $queryStringSuffix = (!empty($parameters)) ? '?' . http_build_query($parameters) : '';
- return sprintf('%s?url=%s%s', $provider->getApiEndpoint(), $mediaUrl, rawurlencode($queryStringSuffix));
+ $mediaUrlHasQueryString = (bool) parse_url($mediaUrl, PHP_URL_QUERY);
+ $queryStingPrefix = ($mediaUrlHasQueryString) ? '&' : '?';
+
+ $queryStringSuffix = (!empty($parameters)) ? $queryStingPrefix . http_build_query($parameters) : '';
+ return sprintf(
+ '%s?url=%s%s',
+ $provider->getApiEndpoint(),
+ $mediaUrl,
+ rawurlencode($queryStringSuffix)
+ );
}
} | 12 | 0.444444 | 10 | 2 |
571e9ab354ae607771e9ebe10ecdeb2ab6450bd1 | roles/symlink-dotfiles/tasks/main.yml | roles/symlink-dotfiles/tasks/main.yml | ---
- name: Create dotfiles symlinks
file: src=~/Dropbox/code/dotfiles/{{ item.dir }}{{ item.name }} dest=~/.{{ item.name }} state=link
with_items:
# Vim
- { dir: '', name: 'vim' }
- { dir: 'vim/', name: 'vimrc' }
# Bash
- { dir: '', name: 'bash' }
- { dir: 'bash/', name: 'bashrc' }
- { dir: 'bash/', name: 'bash_profile' }
# Git
- { dir: 'git/', name: 'gitconfig' }
- { dir: 'git/', name: 'gitignore_global' }
# Emacs
- { dir: '', name: 'emacs.d' }
# Mutt
- { dir: '', name: 'mutt' }
- { dir: 'mutt/', name: 'muttrc' }
# Newsboat
- { dir: '', name: 'newsboat' }
# Atom
- { dir: '', name: 'atom' }
# Misc
- { dir: '', name: 'inputrc' }
- { dir: '', name: 'octaverc' }
- { dir: '', name: 'pythonrc.py' }
tags:
- dotfiles
| ---
- name: Create dotfiles symlinks
file: src=~/Dropbox/code/dotfiles/{{ item.dir }}{{ item.name }} dest=~/.{{ item.name }} state=link
with_items:
# Vim
- { dir: '', name: 'vim' }
- { dir: 'vim/', name: 'vimrc' }
# Bash
- { dir: '', name: 'bash' }
- { dir: 'bash/', name: 'bashrc' }
- { dir: 'bash/', name: 'bash_profile' }
# Git
- { dir: 'git/', name: 'gitconfig' }
- { dir: 'git/', name: 'gitignore_global' }
# tmux
- { dir: '', name: 'tmux' }
- { dir: 'tmux/', name: 'tmux.conf' }
# Emacs
- { dir: '', name: 'emacs.d' }
# Mutt
- { dir: '', name: 'mutt' }
- { dir: 'mutt/', name: 'muttrc' }
# Newsboat
- { dir: '', name: 'newsboat' }
# Atom
- { dir: '', name: 'atom' }
# Misc
- { dir: '', name: 'czrc' }
- { dir: '', name: 'inputrc' }
- { dir: '', name: 'octaverc' }
- { dir: '', name: 'pythonrc.py' }
- { dir: '', name: 'tldrrc' }
- { dir: '', name: 'vrapperrc' }
tags:
- dotfiles
| Add instructions to create symlinks | Add instructions to create symlinks
Add instructions to create symlinks for the following items:
- tmux
- czrc
- tldrrc
- vrapperrc
| YAML | mit | shoichiaizawa/osx-bootstrap | yaml | ## Code Before:
---
- name: Create dotfiles symlinks
file: src=~/Dropbox/code/dotfiles/{{ item.dir }}{{ item.name }} dest=~/.{{ item.name }} state=link
with_items:
# Vim
- { dir: '', name: 'vim' }
- { dir: 'vim/', name: 'vimrc' }
# Bash
- { dir: '', name: 'bash' }
- { dir: 'bash/', name: 'bashrc' }
- { dir: 'bash/', name: 'bash_profile' }
# Git
- { dir: 'git/', name: 'gitconfig' }
- { dir: 'git/', name: 'gitignore_global' }
# Emacs
- { dir: '', name: 'emacs.d' }
# Mutt
- { dir: '', name: 'mutt' }
- { dir: 'mutt/', name: 'muttrc' }
# Newsboat
- { dir: '', name: 'newsboat' }
# Atom
- { dir: '', name: 'atom' }
# Misc
- { dir: '', name: 'inputrc' }
- { dir: '', name: 'octaverc' }
- { dir: '', name: 'pythonrc.py' }
tags:
- dotfiles
## Instruction:
Add instructions to create symlinks
Add instructions to create symlinks for the following items:
- tmux
- czrc
- tldrrc
- vrapperrc
## Code After:
---
- name: Create dotfiles symlinks
file: src=~/Dropbox/code/dotfiles/{{ item.dir }}{{ item.name }} dest=~/.{{ item.name }} state=link
with_items:
# Vim
- { dir: '', name: 'vim' }
- { dir: 'vim/', name: 'vimrc' }
# Bash
- { dir: '', name: 'bash' }
- { dir: 'bash/', name: 'bashrc' }
- { dir: 'bash/', name: 'bash_profile' }
# Git
- { dir: 'git/', name: 'gitconfig' }
- { dir: 'git/', name: 'gitignore_global' }
# tmux
- { dir: '', name: 'tmux' }
- { dir: 'tmux/', name: 'tmux.conf' }
# Emacs
- { dir: '', name: 'emacs.d' }
# Mutt
- { dir: '', name: 'mutt' }
- { dir: 'mutt/', name: 'muttrc' }
# Newsboat
- { dir: '', name: 'newsboat' }
# Atom
- { dir: '', name: 'atom' }
# Misc
- { dir: '', name: 'czrc' }
- { dir: '', name: 'inputrc' }
- { dir: '', name: 'octaverc' }
- { dir: '', name: 'pythonrc.py' }
- { dir: '', name: 'tldrrc' }
- { dir: '', name: 'vrapperrc' }
tags:
- dotfiles
| ---
- name: Create dotfiles symlinks
file: src=~/Dropbox/code/dotfiles/{{ item.dir }}{{ item.name }} dest=~/.{{ item.name }} state=link
with_items:
# Vim
- { dir: '', name: 'vim' }
- { dir: 'vim/', name: 'vimrc' }
# Bash
- { dir: '', name: 'bash' }
- { dir: 'bash/', name: 'bashrc' }
- { dir: 'bash/', name: 'bash_profile' }
# Git
- { dir: 'git/', name: 'gitconfig' }
- { dir: 'git/', name: 'gitignore_global' }
+ # tmux
+ - { dir: '', name: 'tmux' }
+ - { dir: 'tmux/', name: 'tmux.conf' }
+
# Emacs
- { dir: '', name: 'emacs.d' }
# Mutt
- { dir: '', name: 'mutt' }
- { dir: 'mutt/', name: 'muttrc' }
# Newsboat
- { dir: '', name: 'newsboat' }
# Atom
- { dir: '', name: 'atom' }
# Misc
+ - { dir: '', name: 'czrc' }
- { dir: '', name: 'inputrc' }
- { dir: '', name: 'octaverc' }
- { dir: '', name: 'pythonrc.py' }
+ - { dir: '', name: 'tldrrc' }
+ - { dir: '', name: 'vrapperrc' }
tags:
- dotfiles | 7 | 0.194444 | 7 | 0 |
56558fcd1162a110b226e2af2a71bdb02e254499 | lib/bubble-wrap/ext/motion_project_app.rb | lib/bubble-wrap/ext/motion_project_app.rb | module BubbleWrap
module Ext
module BuildTask
def self.extended(base)
base.instance_eval do
def setup_with_bubblewrap(&block)
bw_config = proc do |app|
app.files = ::BubbleWrap::Requirement.files
app.files_dependencies ::BubbleWrap::Requirement.files_dependencies
app.frameworks = ::BubbleWrap::Requirement.frameworks
block.call(app)
end
configs.each_value &bw_config
config.validate
end
alias :setup_without_bubblewrap :setup
alias :setup :setup_with_bubblewrap
end
end
end
end
end
Motion::Project::App.extend(BubbleWrap::Ext::BuildTask)
| module BubbleWrap
module Ext
module BuildTask
def self.extended(base)
base.instance_eval do
def setup_with_bubblewrap(&block)
bw_config = proc do |app|
app.files = ::BubbleWrap::Requirement.files + Dir.glob('app/**/*.rb')
app.files_dependencies ::BubbleWrap::Requirement.files_dependencies
app.frameworks = ::BubbleWrap::Requirement.frameworks
block.call(app)
end
configs.each_value &bw_config
config.validate
end
alias :setup_without_bubblewrap :setup
alias :setup :setup_with_bubblewrap
end
end
end
end
end
Motion::Project::App.extend(BubbleWrap::Ext::BuildTask)
| Make sure that app.files includes the local application if present. | Make sure that app.files includes the local application if present.
| Ruby | mit | earthrid/BubbleWrap,fandor/BubbleWrap,andersennl/BubbleWrap,dam13n/BubbleWrap,hboon/BubbleWrap,mattetti/BubbleWrap | ruby | ## Code Before:
module BubbleWrap
module Ext
module BuildTask
def self.extended(base)
base.instance_eval do
def setup_with_bubblewrap(&block)
bw_config = proc do |app|
app.files = ::BubbleWrap::Requirement.files
app.files_dependencies ::BubbleWrap::Requirement.files_dependencies
app.frameworks = ::BubbleWrap::Requirement.frameworks
block.call(app)
end
configs.each_value &bw_config
config.validate
end
alias :setup_without_bubblewrap :setup
alias :setup :setup_with_bubblewrap
end
end
end
end
end
Motion::Project::App.extend(BubbleWrap::Ext::BuildTask)
## Instruction:
Make sure that app.files includes the local application if present.
## Code After:
module BubbleWrap
module Ext
module BuildTask
def self.extended(base)
base.instance_eval do
def setup_with_bubblewrap(&block)
bw_config = proc do |app|
app.files = ::BubbleWrap::Requirement.files + Dir.glob('app/**/*.rb')
app.files_dependencies ::BubbleWrap::Requirement.files_dependencies
app.frameworks = ::BubbleWrap::Requirement.frameworks
block.call(app)
end
configs.each_value &bw_config
config.validate
end
alias :setup_without_bubblewrap :setup
alias :setup :setup_with_bubblewrap
end
end
end
end
end
Motion::Project::App.extend(BubbleWrap::Ext::BuildTask)
| module BubbleWrap
module Ext
module BuildTask
def self.extended(base)
base.instance_eval do
def setup_with_bubblewrap(&block)
bw_config = proc do |app|
- app.files = ::BubbleWrap::Requirement.files
+ app.files = ::BubbleWrap::Requirement.files + Dir.glob('app/**/*.rb')
? ++++++++++++++++++++++++++
app.files_dependencies ::BubbleWrap::Requirement.files_dependencies
app.frameworks = ::BubbleWrap::Requirement.frameworks
block.call(app)
end
configs.each_value &bw_config
config.validate
end
alias :setup_without_bubblewrap :setup
alias :setup :setup_with_bubblewrap
end
end
end
end
end
Motion::Project::App.extend(BubbleWrap::Ext::BuildTask) | 2 | 0.076923 | 1 | 1 |
42ba32400ed366d691f9293749d38ed53ed24109 | plugins/org.eclipse.xtext/src/org/eclipse/xtext/generator/OutputConfigurationProvider.java | plugins/org.eclipse.xtext/src/org/eclipse/xtext/generator/OutputConfigurationProvider.java | /*******************************************************************************
* Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.generator;
import static com.google.common.collect.Sets.*;
import java.util.Set;
import com.google.inject.Singleton;
/**
* @author Sven Efftinge - Initial contribution and API
* @since 2.1
*/
@Singleton
public class OutputConfigurationProvider implements IOutputConfigurationProvider {
private Set<OutputConfiguration> outputConfigurations;
/**
* @return a set of {@link OutputConfiguration} available for the generator
*/
public Set<OutputConfiguration> getOutputConfigurations() {
if (outputConfigurations == null) {
outputConfigurations = newHashSet();
OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
defaultOutput.setDescription("Output Folder");
defaultOutput.setOutputDirectory("./src-gen");
defaultOutput.setOverrideExistingResources(true);
defaultOutput.setCreateOutputDirectory(true);
defaultOutput.setCleanUpDerivedResources(true);
defaultOutput.setSetDerivedProperty(true);
outputConfigurations.add(defaultOutput);
}
return outputConfigurations;
}
/**
* @since 2.5
*/
public void setOutputConfigurations(Set<OutputConfiguration> outputConfigurations) {
this.outputConfigurations = outputConfigurations;
}
}
| /*******************************************************************************
* Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.generator;
import static com.google.common.collect.Sets.*;
import java.util.Set;
/**
* @author Sven Efftinge - Initial contribution and API
* @since 2.1
*/
public class OutputConfigurationProvider implements IOutputConfigurationProvider {
/**
* @return a set of {@link OutputConfiguration} available for the generator
*/
public Set<OutputConfiguration> getOutputConfigurations() {
OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
defaultOutput.setDescription("Output Folder");
defaultOutput.setOutputDirectory("./src-gen");
defaultOutput.setOverrideExistingResources(true);
defaultOutput.setCreateOutputDirectory(true);
defaultOutput.setCleanUpDerivedResources(true);
defaultOutput.setSetDerivedProperty(true);
return newHashSet(defaultOutput);
}
}
| Revert "[generator] allow overwriting default output configuration" | Revert "[generator] allow overwriting default output configuration"
This reverts commit 256b013e2cd00d0a51350f9aa18e118b6c72dfe8.
| Java | epl-1.0 | miklossy/xtext-core,miklossy/xtext-core | java | ## Code Before:
/*******************************************************************************
* Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.generator;
import static com.google.common.collect.Sets.*;
import java.util.Set;
import com.google.inject.Singleton;
/**
* @author Sven Efftinge - Initial contribution and API
* @since 2.1
*/
@Singleton
public class OutputConfigurationProvider implements IOutputConfigurationProvider {
private Set<OutputConfiguration> outputConfigurations;
/**
* @return a set of {@link OutputConfiguration} available for the generator
*/
public Set<OutputConfiguration> getOutputConfigurations() {
if (outputConfigurations == null) {
outputConfigurations = newHashSet();
OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
defaultOutput.setDescription("Output Folder");
defaultOutput.setOutputDirectory("./src-gen");
defaultOutput.setOverrideExistingResources(true);
defaultOutput.setCreateOutputDirectory(true);
defaultOutput.setCleanUpDerivedResources(true);
defaultOutput.setSetDerivedProperty(true);
outputConfigurations.add(defaultOutput);
}
return outputConfigurations;
}
/**
* @since 2.5
*/
public void setOutputConfigurations(Set<OutputConfiguration> outputConfigurations) {
this.outputConfigurations = outputConfigurations;
}
}
## Instruction:
Revert "[generator] allow overwriting default output configuration"
This reverts commit 256b013e2cd00d0a51350f9aa18e118b6c72dfe8.
## Code After:
/*******************************************************************************
* Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.generator;
import static com.google.common.collect.Sets.*;
import java.util.Set;
/**
* @author Sven Efftinge - Initial contribution and API
* @since 2.1
*/
public class OutputConfigurationProvider implements IOutputConfigurationProvider {
/**
* @return a set of {@link OutputConfiguration} available for the generator
*/
public Set<OutputConfiguration> getOutputConfigurations() {
OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
defaultOutput.setDescription("Output Folder");
defaultOutput.setOutputDirectory("./src-gen");
defaultOutput.setOverrideExistingResources(true);
defaultOutput.setCreateOutputDirectory(true);
defaultOutput.setCleanUpDerivedResources(true);
defaultOutput.setSetDerivedProperty(true);
return newHashSet(defaultOutput);
}
}
| /*******************************************************************************
* Copyright (c) 2011 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.generator;
import static com.google.common.collect.Sets.*;
import java.util.Set;
- import com.google.inject.Singleton;
-
/**
* @author Sven Efftinge - Initial contribution and API
* @since 2.1
*/
- @Singleton
public class OutputConfigurationProvider implements IOutputConfigurationProvider {
- private Set<OutputConfiguration> outputConfigurations;
/**
* @return a set of {@link OutputConfiguration} available for the generator
*/
public Set<OutputConfiguration> getOutputConfigurations() {
- if (outputConfigurations == null) {
- outputConfigurations = newHashSet();
- OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
? -
+ OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
- defaultOutput.setDescription("Output Folder");
? -
+ defaultOutput.setDescription("Output Folder");
- defaultOutput.setOutputDirectory("./src-gen");
? -
+ defaultOutput.setOutputDirectory("./src-gen");
- defaultOutput.setOverrideExistingResources(true);
? -
+ defaultOutput.setOverrideExistingResources(true);
- defaultOutput.setCreateOutputDirectory(true);
? -
+ defaultOutput.setCreateOutputDirectory(true);
- defaultOutput.setCleanUpDerivedResources(true);
? -
+ defaultOutput.setCleanUpDerivedResources(true);
- defaultOutput.setSetDerivedProperty(true);
? -
+ defaultOutput.setSetDerivedProperty(true);
+ return newHashSet(defaultOutput);
- outputConfigurations.add(defaultOutput);
- }
- return outputConfigurations;
- }
-
- /**
- * @since 2.5
- */
- public void setOutputConfigurations(Set<OutputConfiguration> outputConfigurations) {
- this.outputConfigurations = outputConfigurations;
}
} | 31 | 0.645833 | 8 | 23 |
d16bafc47adea8a9f49f28d55ddc4ea542e530b5 | topics/data-validation.md | topics/data-validation.md | ---
title: Data Validation - Symfony Certification Preparation List
---
[Back to index](../readme.md#table-of-contents)
# Data Validation
- [Validation - symfony.com](http://symfony.com/doc/3.0/validation.html)
## PHP object validation
- [The Basics of Validation - symfony.com](http://symfony.com/doc/3.0/validation.html#the-basics-of-validation)
## Built-in validation constraints
- [Supported Constraints - symfony.com](http://symfony.com/doc/3.0/validation.html#supported-constraints)
## Validation scopes
## Validation groups
- [How to Apply only a Subset of all Your Validation Constraints (Validation Groups) - symfony.com](http://symfony.com/doc/3.0/validation/groups.html)
## Group sequence
- [How to Sequentially Apply Validation Groups - symfony.com](http://symfony.com/doc/3.0/validation/sequence_provider.html)
## Custom callback validators
- [Callback Constraint - symfony.com](http://symfony.com/doc/3.0/reference/constraints/Callback.html)
## Violations builder
| ---
title: Data Validation - Symfony Certification Preparation List
---
[Back to index](../readme.md#table-of-contents)
# Data Validation
- [Validation - symfony.com](http://symfony.com/doc/3.0/validation.html)
## PHP object validation
- [The Basics of Validation - symfony.com](http://symfony.com/doc/3.0/validation.html#the-basics-of-validation)
## Built-in validation constraints
- [Supported Constraints - symfony.com](http://symfony.com/doc/3.0/validation.html#supported-constraints)
## Validation scopes
- [Constraint Targets - symfony.com](http://symfony.com/doc/3.0/validation.html#constraint-targets)
## Validation groups
- [How to Apply only a Subset of all Your Validation Constraints (Validation Groups) - symfony.com](http://symfony.com/doc/3.0/validation/groups.html)
## Group sequence
- [How to Sequentially Apply Validation Groups - symfony.com](http://symfony.com/doc/3.0/validation/sequence_provider.html)
## Custom callback validators
- [Callback Constraint - symfony.com](http://symfony.com/doc/3.0/reference/constraints/Callback.html)
## Violations builder
| Add link to "Validation scopes" | Add link to "Validation scopes" | Markdown | mit | ThomasBerends/symfony-certification-preparation-list | markdown | ## Code Before:
---
title: Data Validation - Symfony Certification Preparation List
---
[Back to index](../readme.md#table-of-contents)
# Data Validation
- [Validation - symfony.com](http://symfony.com/doc/3.0/validation.html)
## PHP object validation
- [The Basics of Validation - symfony.com](http://symfony.com/doc/3.0/validation.html#the-basics-of-validation)
## Built-in validation constraints
- [Supported Constraints - symfony.com](http://symfony.com/doc/3.0/validation.html#supported-constraints)
## Validation scopes
## Validation groups
- [How to Apply only a Subset of all Your Validation Constraints (Validation Groups) - symfony.com](http://symfony.com/doc/3.0/validation/groups.html)
## Group sequence
- [How to Sequentially Apply Validation Groups - symfony.com](http://symfony.com/doc/3.0/validation/sequence_provider.html)
## Custom callback validators
- [Callback Constraint - symfony.com](http://symfony.com/doc/3.0/reference/constraints/Callback.html)
## Violations builder
## Instruction:
Add link to "Validation scopes"
## Code After:
---
title: Data Validation - Symfony Certification Preparation List
---
[Back to index](../readme.md#table-of-contents)
# Data Validation
- [Validation - symfony.com](http://symfony.com/doc/3.0/validation.html)
## PHP object validation
- [The Basics of Validation - symfony.com](http://symfony.com/doc/3.0/validation.html#the-basics-of-validation)
## Built-in validation constraints
- [Supported Constraints - symfony.com](http://symfony.com/doc/3.0/validation.html#supported-constraints)
## Validation scopes
- [Constraint Targets - symfony.com](http://symfony.com/doc/3.0/validation.html#constraint-targets)
## Validation groups
- [How to Apply only a Subset of all Your Validation Constraints (Validation Groups) - symfony.com](http://symfony.com/doc/3.0/validation/groups.html)
## Group sequence
- [How to Sequentially Apply Validation Groups - symfony.com](http://symfony.com/doc/3.0/validation/sequence_provider.html)
## Custom callback validators
- [Callback Constraint - symfony.com](http://symfony.com/doc/3.0/reference/constraints/Callback.html)
## Violations builder
| ---
title: Data Validation - Symfony Certification Preparation List
---
[Back to index](../readme.md#table-of-contents)
# Data Validation
- [Validation - symfony.com](http://symfony.com/doc/3.0/validation.html)
## PHP object validation
- [The Basics of Validation - symfony.com](http://symfony.com/doc/3.0/validation.html#the-basics-of-validation)
## Built-in validation constraints
- [Supported Constraints - symfony.com](http://symfony.com/doc/3.0/validation.html#supported-constraints)
## Validation scopes
+ - [Constraint Targets - symfony.com](http://symfony.com/doc/3.0/validation.html#constraint-targets)
## Validation groups
- [How to Apply only a Subset of all Your Validation Constraints (Validation Groups) - symfony.com](http://symfony.com/doc/3.0/validation/groups.html)
## Group sequence
- [How to Sequentially Apply Validation Groups - symfony.com](http://symfony.com/doc/3.0/validation/sequence_provider.html)
## Custom callback validators
- [Callback Constraint - symfony.com](http://symfony.com/doc/3.0/reference/constraints/Callback.html)
## Violations builder | 1 | 0.038462 | 1 | 0 |
aa5948c80cccdf4e845c06cba41fe3ab6a65a6fe | Assets/Admin/admin.js | Assets/Admin/admin.js | (function () {
"use strict";
var app = angular.module('RbsChange');
app.config(['$provide', function ($provide)
{
$provide.decorator('RbsChange.UrlManager', ['$delegate', function ($delegate)
{
$delegate.model('Rbs_Plugins')
.route('Installed', 'Rbs/Plugins/Installed/', { 'templateUrl': 'Rbs/Plugins/installed-list.twig'})
.route('Registered', 'Rbs/Plugins/Registered/', { 'templateUrl': 'Rbs/Plugins/registered-list.twig'})
.route('New', 'Rbs/Plugins/New/', { 'templateUrl': 'Rbs/Plugins/new-list.twig'});
return $delegate;
}]);
}]);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
. when(
'/Rbs/Plugins/',
{
redirectTo : '/Rbs/Plugins/Installed/'
})
;
}]);
})(); | (function () {
"use strict";
var app = angular.module('RbsChange');
app.config(['$provide', function ($provide)
{
$provide.decorator('RbsChange.UrlManager', ['$delegate', function ($delegate)
{
$delegate.module('Rbs_Plugins')
.route('Installed', 'Rbs/Plugins/Installed/', { 'templateUrl': 'Rbs/Plugins/installed-list.twig'})
.route('Registered', 'Rbs/Plugins/Registered/', { 'templateUrl': 'Rbs/Plugins/registered-list.twig'})
.route('New', 'Rbs/Plugins/New/', { 'templateUrl': 'Rbs/Plugins/new-list.twig'});
return $delegate.module(null);
}]);
}]);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
. when(
'/Rbs/Plugins/',
{
redirectTo : '/Rbs/Plugins/Installed/'
})
;
}]);
})(); | Update breadcrumb to support localization | Update breadcrumb to support localization
| JavaScript | mpl-2.0 | RBSChange/module-plugins,RBSChange/module-plugins | javascript | ## Code Before:
(function () {
"use strict";
var app = angular.module('RbsChange');
app.config(['$provide', function ($provide)
{
$provide.decorator('RbsChange.UrlManager', ['$delegate', function ($delegate)
{
$delegate.model('Rbs_Plugins')
.route('Installed', 'Rbs/Plugins/Installed/', { 'templateUrl': 'Rbs/Plugins/installed-list.twig'})
.route('Registered', 'Rbs/Plugins/Registered/', { 'templateUrl': 'Rbs/Plugins/registered-list.twig'})
.route('New', 'Rbs/Plugins/New/', { 'templateUrl': 'Rbs/Plugins/new-list.twig'});
return $delegate;
}]);
}]);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
. when(
'/Rbs/Plugins/',
{
redirectTo : '/Rbs/Plugins/Installed/'
})
;
}]);
})();
## Instruction:
Update breadcrumb to support localization
## Code After:
(function () {
"use strict";
var app = angular.module('RbsChange');
app.config(['$provide', function ($provide)
{
$provide.decorator('RbsChange.UrlManager', ['$delegate', function ($delegate)
{
$delegate.module('Rbs_Plugins')
.route('Installed', 'Rbs/Plugins/Installed/', { 'templateUrl': 'Rbs/Plugins/installed-list.twig'})
.route('Registered', 'Rbs/Plugins/Registered/', { 'templateUrl': 'Rbs/Plugins/registered-list.twig'})
.route('New', 'Rbs/Plugins/New/', { 'templateUrl': 'Rbs/Plugins/new-list.twig'});
return $delegate.module(null);
}]);
}]);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
. when(
'/Rbs/Plugins/',
{
redirectTo : '/Rbs/Plugins/Installed/'
})
;
}]);
})(); | (function () {
"use strict";
var app = angular.module('RbsChange');
app.config(['$provide', function ($provide)
{
$provide.decorator('RbsChange.UrlManager', ['$delegate', function ($delegate)
{
- $delegate.model('Rbs_Plugins')
? -
+ $delegate.module('Rbs_Plugins')
? ++
.route('Installed', 'Rbs/Plugins/Installed/', { 'templateUrl': 'Rbs/Plugins/installed-list.twig'})
.route('Registered', 'Rbs/Plugins/Registered/', { 'templateUrl': 'Rbs/Plugins/registered-list.twig'})
.route('New', 'Rbs/Plugins/New/', { 'templateUrl': 'Rbs/Plugins/new-list.twig'});
- return $delegate;
+ return $delegate.module(null);
? +++++++++++++
}]);
}]);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
. when(
'/Rbs/Plugins/',
{
redirectTo : '/Rbs/Plugins/Installed/'
})
;
}]);
})(); | 4 | 0.137931 | 2 | 2 |
42591d60d430605e3dca84e7deee70ffc697c261 | djangomogo/templates/pages/index.html | djangomogo/templates/pages/index.html | {% extends "base.html" %}
{% block content %}
{% endblock %} | {% extends "base.html" %}
{% block content %}
<style>
li:not(:first-child) {padding-top:1em;}
</style>
<div class="title is-upspace-1">How to create pages</div>
<div class="is-leftspace-1">
<div class="subtitle">Use templates:</div>
<div class="content">
<ul>
<li>
Create files in the <b>templates/pages</b> folder. Example:
</li>
<li>
templates/pages/page1.html will be accessible at /page1
</li>
<li>
templates/pages/folder1/page1.html will be accessible at /folder1/page1
</li>
</ul>
</div>
</div>
{% endblock %} | Add a better default homepage | Add a better default homepage
| HTML | mit | synw/django-mogo,synw/django-allons,synw/django-allons,synw/django-mogo,synw/django-mogo,synw/django-allons,synw/django-mogo,synw/django-allons | html | ## Code Before:
{% extends "base.html" %}
{% block content %}
{% endblock %}
## Instruction:
Add a better default homepage
## Code After:
{% extends "base.html" %}
{% block content %}
<style>
li:not(:first-child) {padding-top:1em;}
</style>
<div class="title is-upspace-1">How to create pages</div>
<div class="is-leftspace-1">
<div class="subtitle">Use templates:</div>
<div class="content">
<ul>
<li>
Create files in the <b>templates/pages</b> folder. Example:
</li>
<li>
templates/pages/page1.html will be accessible at /page1
</li>
<li>
templates/pages/folder1/page1.html will be accessible at /folder1/page1
</li>
</ul>
</div>
</div>
{% endblock %} | {% extends "base.html" %}
{% block content %}
-
+ <style>
+ li:not(:first-child) {padding-top:1em;}
+ </style>
+ <div class="title is-upspace-1">How to create pages</div>
+ <div class="is-leftspace-1">
+ <div class="subtitle">Use templates:</div>
+ <div class="content">
+ <ul>
+ <li>
+ Create files in the <b>templates/pages</b> folder. Example:
+ </li>
+ <li>
+ templates/pages/page1.html will be accessible at /page1
+ </li>
+ <li>
+ templates/pages/folder1/page1.html will be accessible at /folder1/page1
+ </li>
+ </ul>
+ </div>
+ </div>
{% endblock %} | 21 | 4.2 | 20 | 1 |
d334c7084cec556fbab2843702e797142ad114c6 | _posts/2015-03-13-python-multiprocessing.md | _posts/2015-03-13-python-multiprocessing.md | ---
layout: post
title: Multi-processing in Python
author: Kalin Kiesling
category: upcoming
tags: meeting python multi-processing
---
## Attending
- <++>
## Kalin Kiesling
<+ speaker bio +>
## Multi-processing in Python
To be filled in here....
Code examples can be found [here][code].
## Lightning Talks
## <+ person +> : <+ topic +>
## <+ person +> : <+ topic +>
[code]: {{ site.github.repository_url }}/tree/master/topic
| ---
layout: post
title: Multi-processing in Python
author: Kalin Kiesling
category: upcoming
tags: meeting python multi-processing
---
## Attending
- <++>
## Kalin Kiesling
<+ speaker bio +>
## Multi-processing in Python
A discussion of using the `multiprocessing` module from Python
Code examples can be found [here][code].
## Lightning Talks
## <+ person +> : <+ topic +>
## <+ person +> : <+ topic +>
[code]: {{ site.github.repository_url }}/tree/master/topic
| Add a little more so that it is a good enough starting point. | Add a little more so that it is a good enough starting point.
| Markdown | bsd-3-clause | sstevens2/wisconsin,thehackerwithin/wisconsin,elliottbiondo/wisconsin,sstevens2/wisconsin,thehackerwithin/wisconsin,elliottbiondo/wisconsin | markdown | ## Code Before:
---
layout: post
title: Multi-processing in Python
author: Kalin Kiesling
category: upcoming
tags: meeting python multi-processing
---
## Attending
- <++>
## Kalin Kiesling
<+ speaker bio +>
## Multi-processing in Python
To be filled in here....
Code examples can be found [here][code].
## Lightning Talks
## <+ person +> : <+ topic +>
## <+ person +> : <+ topic +>
[code]: {{ site.github.repository_url }}/tree/master/topic
## Instruction:
Add a little more so that it is a good enough starting point.
## Code After:
---
layout: post
title: Multi-processing in Python
author: Kalin Kiesling
category: upcoming
tags: meeting python multi-processing
---
## Attending
- <++>
## Kalin Kiesling
<+ speaker bio +>
## Multi-processing in Python
A discussion of using the `multiprocessing` module from Python
Code examples can be found [here][code].
## Lightning Talks
## <+ person +> : <+ topic +>
## <+ person +> : <+ topic +>
[code]: {{ site.github.repository_url }}/tree/master/topic
| ---
layout: post
title: Multi-processing in Python
author: Kalin Kiesling
category: upcoming
tags: meeting python multi-processing
---
## Attending
- <++>
## Kalin Kiesling
<+ speaker bio +>
## Multi-processing in Python
- To be filled in here....
+ A discussion of using the `multiprocessing` module from Python
Code examples can be found [here][code].
## Lightning Talks
## <+ person +> : <+ topic +>
## <+ person +> : <+ topic +>
[code]: {{ site.github.repository_url }}/tree/master/topic | 2 | 0.0625 | 1 | 1 |
220d1e99988f29e69295c70ef8428fa2cb3aa6f6 | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='aacrgenie',
version='1.6.2',
description='Processing and validation for GENIE',
url='https://github.com/Sage-Bionetworks/Genie',
author='Thomas Yu',
author_email='thomasyu888@gmail.com',
license='MIT',
packages=find_packages(),
zip_safe=False,
data_files=[('genie',['genie/addFeatureType.sh','genie/createGTF.sh'])],
entry_points = {
'console_scripts': ['genie = genie.__main__:main']},
install_requires=[
'pandas>=0.20.0',
'synapseclient',
'httplib2',
'pycrypto'])
| from setuptools import setup, find_packages
setup(name='aacrgenie',
version='1.6.2',
description='Processing and validation for GENIE',
url='https://github.com/Sage-Bionetworks/Genie',
author='Thomas Yu',
author_email='thomasyu888@gmail.com',
license='MIT',
packages=find_packages(),
zip_safe=False,
data_files=[('genie',['genie/addFeatureType.sh','genie/createGTF.sh'])],
entry_points = {
'console_scripts': ['genie = genie.__main__:main']},
install_requires=[
'pandas>=0.20.0',
'synapseclient>=1.9',
'httplib2>=0.11.3',
'pycrypto>=2.6.1',
'yaml>=3.11'])
| Add yaml to installation requirements | Add yaml to installation requirements
| Python | mit | thomasyu888/Genie,thomasyu888/Genie,thomasyu888/Genie,thomasyu888/Genie | python | ## Code Before:
from setuptools import setup, find_packages
setup(name='aacrgenie',
version='1.6.2',
description='Processing and validation for GENIE',
url='https://github.com/Sage-Bionetworks/Genie',
author='Thomas Yu',
author_email='thomasyu888@gmail.com',
license='MIT',
packages=find_packages(),
zip_safe=False,
data_files=[('genie',['genie/addFeatureType.sh','genie/createGTF.sh'])],
entry_points = {
'console_scripts': ['genie = genie.__main__:main']},
install_requires=[
'pandas>=0.20.0',
'synapseclient',
'httplib2',
'pycrypto'])
## Instruction:
Add yaml to installation requirements
## Code After:
from setuptools import setup, find_packages
setup(name='aacrgenie',
version='1.6.2',
description='Processing and validation for GENIE',
url='https://github.com/Sage-Bionetworks/Genie',
author='Thomas Yu',
author_email='thomasyu888@gmail.com',
license='MIT',
packages=find_packages(),
zip_safe=False,
data_files=[('genie',['genie/addFeatureType.sh','genie/createGTF.sh'])],
entry_points = {
'console_scripts': ['genie = genie.__main__:main']},
install_requires=[
'pandas>=0.20.0',
'synapseclient>=1.9',
'httplib2>=0.11.3',
'pycrypto>=2.6.1',
'yaml>=3.11'])
| from setuptools import setup, find_packages
setup(name='aacrgenie',
version='1.6.2',
description='Processing and validation for GENIE',
url='https://github.com/Sage-Bionetworks/Genie',
author='Thomas Yu',
author_email='thomasyu888@gmail.com',
license='MIT',
packages=find_packages(),
zip_safe=False,
data_files=[('genie',['genie/addFeatureType.sh','genie/createGTF.sh'])],
entry_points = {
'console_scripts': ['genie = genie.__main__:main']},
install_requires=[
'pandas>=0.20.0',
- 'synapseclient',
+ 'synapseclient>=1.9',
? +++++
- 'httplib2',
+ 'httplib2>=0.11.3',
? ++++++++
- 'pycrypto'])
? ^^
+ 'pycrypto>=2.6.1',
? +++++++ ^
+ 'yaml>=3.11']) | 7 | 0.368421 | 4 | 3 |
77156a747fc534ac751679671f8cfba650bb35a1 | fish/config.fish | fish/config.fish | set -q XDG_CONFIG_HOME
or set -l XDG_CONFIG_HOME ~/.config
##### locale #####
set -gx LANG en_US.UTF-8
##### term #####
set -gx TERM xterm-256color
##### path #####
set -l local_paths /usr/local/{sbin,bin} /usr/{sbin,bin} /{sbin,bin}
# go
set -gx GOPATH $HOME/dev
set local_paths $GOPATH/bin $local_paths
# rust
set local_paths ~/.cargo/bin $local_paths
# pyenv
set local_paths ~/.pyenv/{bin,shims} $local_paths
# rbenv
set local_paths ~/.rbenv/{bin,shims} $local_paths
# update PATH via fish_user_paths
set -g fish_user_paths $local_paths
##### misc #####
set -gx GHQ_ROOT $GOPATH/src
set -gx TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
########## alias ##########
alias e 'emacsclient -nw -a ""'
alias ekill 'emacsclient -e "(kill-emacs)"'
alias g 'git'
alias fzf 'fzf-tmux'
########## plugins ##########
if not functions -q fisher
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
| set -q XDG_CONFIG_HOME
or set -l XDG_CONFIG_HOME ~/.config
##### path #####
set -l local_paths /usr/local/{sbin,bin} /usr/{sbin,bin} /{sbin,bin}
# go
set -gx GOPATH $HOME/dev
set local_paths $GOPATH/bin $local_paths
# rust
set local_paths ~/.cargo/bin $local_paths
# pyenv
set local_paths ~/.pyenv/{bin,shims} $local_paths
# rbenv
set local_paths ~/.rbenv/{bin,shims} $local_paths
# update PATH via fish_user_paths
set -g fish_user_paths $local_paths
##### misc #####
set -gx LANG en_US.UTF-8
set -gx TERM xterm-256color
set -gx GHQ_ROOT $GOPATH/src
set -gx TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
########## alias ##########
alias e 'emacsclient -nw -a ""'
alias ekill 'emacsclient -e "(kill-emacs)"'
alias g 'git'
alias fzf 'fzf-tmux'
########## plugins ##########
if not functions -q fisher
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
| Integrate `local` and `term` settings into `mics` | Integrate `local` and `term` settings into `mics`
| fish | mit | kuwata0037/dotfiles | fish | ## Code Before:
set -q XDG_CONFIG_HOME
or set -l XDG_CONFIG_HOME ~/.config
##### locale #####
set -gx LANG en_US.UTF-8
##### term #####
set -gx TERM xterm-256color
##### path #####
set -l local_paths /usr/local/{sbin,bin} /usr/{sbin,bin} /{sbin,bin}
# go
set -gx GOPATH $HOME/dev
set local_paths $GOPATH/bin $local_paths
# rust
set local_paths ~/.cargo/bin $local_paths
# pyenv
set local_paths ~/.pyenv/{bin,shims} $local_paths
# rbenv
set local_paths ~/.rbenv/{bin,shims} $local_paths
# update PATH via fish_user_paths
set -g fish_user_paths $local_paths
##### misc #####
set -gx GHQ_ROOT $GOPATH/src
set -gx TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
########## alias ##########
alias e 'emacsclient -nw -a ""'
alias ekill 'emacsclient -e "(kill-emacs)"'
alias g 'git'
alias fzf 'fzf-tmux'
########## plugins ##########
if not functions -q fisher
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
## Instruction:
Integrate `local` and `term` settings into `mics`
## Code After:
set -q XDG_CONFIG_HOME
or set -l XDG_CONFIG_HOME ~/.config
##### path #####
set -l local_paths /usr/local/{sbin,bin} /usr/{sbin,bin} /{sbin,bin}
# go
set -gx GOPATH $HOME/dev
set local_paths $GOPATH/bin $local_paths
# rust
set local_paths ~/.cargo/bin $local_paths
# pyenv
set local_paths ~/.pyenv/{bin,shims} $local_paths
# rbenv
set local_paths ~/.rbenv/{bin,shims} $local_paths
# update PATH via fish_user_paths
set -g fish_user_paths $local_paths
##### misc #####
set -gx LANG en_US.UTF-8
set -gx TERM xterm-256color
set -gx GHQ_ROOT $GOPATH/src
set -gx TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
########## alias ##########
alias e 'emacsclient -nw -a ""'
alias ekill 'emacsclient -e "(kill-emacs)"'
alias g 'git'
alias fzf 'fzf-tmux'
########## plugins ##########
if not functions -q fisher
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
| set -q XDG_CONFIG_HOME
or set -l XDG_CONFIG_HOME ~/.config
-
- ##### locale #####
- set -gx LANG en_US.UTF-8
-
- ##### term #####
- set -gx TERM xterm-256color
##### path #####
set -l local_paths /usr/local/{sbin,bin} /usr/{sbin,bin} /{sbin,bin}
# go
set -gx GOPATH $HOME/dev
set local_paths $GOPATH/bin $local_paths
# rust
set local_paths ~/.cargo/bin $local_paths
# pyenv
set local_paths ~/.pyenv/{bin,shims} $local_paths
# rbenv
set local_paths ~/.rbenv/{bin,shims} $local_paths
# update PATH via fish_user_paths
set -g fish_user_paths $local_paths
##### misc #####
+ set -gx LANG en_US.UTF-8
+ set -gx TERM xterm-256color
set -gx GHQ_ROOT $GOPATH/src
set -gx TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
########## alias ##########
alias e 'emacsclient -nw -a ""'
alias ekill 'emacsclient -e "(kill-emacs)"'
alias g 'git'
alias fzf 'fzf-tmux'
########## plugins ##########
if not functions -q fisher
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end | 8 | 0.170213 | 2 | 6 |
14fa575eec6ca320b99eb6ceaa6217712e5bb1c0 | packages/gr/groups.yaml | packages/gr/groups.yaml | homepage: ''
changelog-type: ''
hash: 99e7d617dfadb49f7d086d727dd7a40e6bbeb3c733942a97187a089587f719f8
test-bench-deps: {}
maintainer: nvd1234@gmail.com
synopsis: Haskell 98 groups
changelog: ''
basic-deps:
base: <5
all-versions:
- '0.1'
- '0.1.0.1'
- '0.2.0.0'
- '0.2.0.1'
- '0.3.0.0'
- '0.4.0.0'
author: Nathan "Taneb" van Doorn
latest: '0.4.0.0'
description-type: haddock
description: Haskell 98 groups. A group is a monoid with invertibility.
license-name: BSD3
| homepage: ''
changelog-type: ''
hash: 019c80b002e2df85e0f047206f6ab7a409f92e8fd0b9ba8150ed4c463585b6e7
test-bench-deps: {}
maintainer: nvd1234@gmail.com
synopsis: Haskell 98 groups
changelog: ''
basic-deps:
base: <5
all-versions:
- '0.1'
- '0.1.0.1'
- '0.2.0.0'
- '0.2.0.1'
- '0.3.0.0'
- '0.4.0.0'
- '0.4.1.0'
author: Nathan "Taneb" van Doorn
latest: '0.4.1.0'
description-type: haddock
description: Haskell 98 groups. A group is a monoid with invertibility.
license-name: BSD3
| Update from Hackage at 2017-11-22T22:12:43Z | Update from Hackage at 2017-11-22T22:12:43Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: 99e7d617dfadb49f7d086d727dd7a40e6bbeb3c733942a97187a089587f719f8
test-bench-deps: {}
maintainer: nvd1234@gmail.com
synopsis: Haskell 98 groups
changelog: ''
basic-deps:
base: <5
all-versions:
- '0.1'
- '0.1.0.1'
- '0.2.0.0'
- '0.2.0.1'
- '0.3.0.0'
- '0.4.0.0'
author: Nathan "Taneb" van Doorn
latest: '0.4.0.0'
description-type: haddock
description: Haskell 98 groups. A group is a monoid with invertibility.
license-name: BSD3
## Instruction:
Update from Hackage at 2017-11-22T22:12:43Z
## Code After:
homepage: ''
changelog-type: ''
hash: 019c80b002e2df85e0f047206f6ab7a409f92e8fd0b9ba8150ed4c463585b6e7
test-bench-deps: {}
maintainer: nvd1234@gmail.com
synopsis: Haskell 98 groups
changelog: ''
basic-deps:
base: <5
all-versions:
- '0.1'
- '0.1.0.1'
- '0.2.0.0'
- '0.2.0.1'
- '0.3.0.0'
- '0.4.0.0'
- '0.4.1.0'
author: Nathan "Taneb" van Doorn
latest: '0.4.1.0'
description-type: haddock
description: Haskell 98 groups. A group is a monoid with invertibility.
license-name: BSD3
| homepage: ''
changelog-type: ''
- hash: 99e7d617dfadb49f7d086d727dd7a40e6bbeb3c733942a97187a089587f719f8
+ hash: 019c80b002e2df85e0f047206f6ab7a409f92e8fd0b9ba8150ed4c463585b6e7
test-bench-deps: {}
maintainer: nvd1234@gmail.com
synopsis: Haskell 98 groups
changelog: ''
basic-deps:
base: <5
all-versions:
- '0.1'
- '0.1.0.1'
- '0.2.0.0'
- '0.2.0.1'
- '0.3.0.0'
- '0.4.0.0'
+ - '0.4.1.0'
author: Nathan "Taneb" van Doorn
- latest: '0.4.0.0'
? ^
+ latest: '0.4.1.0'
? ^
description-type: haddock
description: Haskell 98 groups. A group is a monoid with invertibility.
license-name: BSD3 | 5 | 0.238095 | 3 | 2 |
0db9a9e40e2299bbf2fcc97b16f2dd2469edc58d | force/error.go | force/error.go | package force
import (
"fmt"
)
// Custom Error to handle salesforce api responses.
type ApiErrors []*ApiError
type ApiError struct {
Fields []string `json:"fields,omitempty" force:"fields,omitempty"`
Message string `json:"message,omitempty" force:"message,omitempty"`
ErrorCode string `json:"errorCode,omitempty" force:"errorCode,omitempty"`
ErrorName string `json:"error,omitempty" force:"error,omitempty"`
ErrorDescription string `json:"error_description,omitempty" force:"error_description,omitempty"`
}
func (e ApiErrors) Error() string {
return fmt.Sprintf("%#v", e.Errors())
}
func (e ApiErrors) Errors() []string {
eArr := make([]string, len(e))
for i, err := range e {
eArr[i] = err.Error()
}
return eArr
}
func (e ApiErrors) Validate() bool {
if len(e) != 0 {
return true
}
return false
}
func (e ApiError) Error() string {
return fmt.Sprintf("%#v", e)
}
func (e ApiError) Validate() bool {
if len(e.Fields) != 0 || len(e.Message) != 0 || len(e.ErrorCode) != 0 || len(e.ErrorName) != 0 || len(e.ErrorDescription) != 0 {
return true
}
return false
}
| package force
import (
"fmt"
"strings"
)
// Custom Error to handle salesforce api responses.
type ApiErrors []*ApiError
type ApiError struct {
Fields []string `json:"fields,omitempty" force:"fields,omitempty"`
Message string `json:"message,omitempty" force:"message,omitempty"`
ErrorCode string `json:"errorCode,omitempty" force:"errorCode,omitempty"`
ErrorName string `json:"error,omitempty" force:"error,omitempty"`
ErrorDescription string `json:"error_description,omitempty" force:"error_description,omitempty"`
}
func (e ApiErrors) Error() string {
return e.String()
}
func (e ApiErrors) String() string {
s := make([]string, len(e))
for i, err := range e {
s[i] = err.String()
}
return strings.Join(s, "\n")
}
func (e ApiErrors) Validate() bool {
if len(e) != 0 {
return true
}
return false
}
func (e ApiError) Error() string {
return e.String()
}
func (e ApiError) String() string {
return fmt.Sprintf("%#v", e)
}
func (e ApiError) Validate() bool {
if len(e.Fields) != 0 || len(e.Message) != 0 || len(e.ErrorCode) != 0 || len(e.ErrorName) != 0 || len(e.ErrorDescription) != 0 {
return true
}
return false
}
| Use Stringer interface for ApiErrors and ApiError. | Use Stringer interface for ApiErrors and ApiError.
| Go | mit | sarahyablok/go-force,coreos/go-force,nimajalali/go-force,omniprojects/go-force,ecnahc515/go-force,egtann/go-force | go | ## Code Before:
package force
import (
"fmt"
)
// Custom Error to handle salesforce api responses.
type ApiErrors []*ApiError
type ApiError struct {
Fields []string `json:"fields,omitempty" force:"fields,omitempty"`
Message string `json:"message,omitempty" force:"message,omitempty"`
ErrorCode string `json:"errorCode,omitempty" force:"errorCode,omitempty"`
ErrorName string `json:"error,omitempty" force:"error,omitempty"`
ErrorDescription string `json:"error_description,omitempty" force:"error_description,omitempty"`
}
func (e ApiErrors) Error() string {
return fmt.Sprintf("%#v", e.Errors())
}
func (e ApiErrors) Errors() []string {
eArr := make([]string, len(e))
for i, err := range e {
eArr[i] = err.Error()
}
return eArr
}
func (e ApiErrors) Validate() bool {
if len(e) != 0 {
return true
}
return false
}
func (e ApiError) Error() string {
return fmt.Sprintf("%#v", e)
}
func (e ApiError) Validate() bool {
if len(e.Fields) != 0 || len(e.Message) != 0 || len(e.ErrorCode) != 0 || len(e.ErrorName) != 0 || len(e.ErrorDescription) != 0 {
return true
}
return false
}
## Instruction:
Use Stringer interface for ApiErrors and ApiError.
## Code After:
package force
import (
"fmt"
"strings"
)
// Custom Error to handle salesforce api responses.
type ApiErrors []*ApiError
type ApiError struct {
Fields []string `json:"fields,omitempty" force:"fields,omitempty"`
Message string `json:"message,omitempty" force:"message,omitempty"`
ErrorCode string `json:"errorCode,omitempty" force:"errorCode,omitempty"`
ErrorName string `json:"error,omitempty" force:"error,omitempty"`
ErrorDescription string `json:"error_description,omitempty" force:"error_description,omitempty"`
}
func (e ApiErrors) Error() string {
return e.String()
}
func (e ApiErrors) String() string {
s := make([]string, len(e))
for i, err := range e {
s[i] = err.String()
}
return strings.Join(s, "\n")
}
func (e ApiErrors) Validate() bool {
if len(e) != 0 {
return true
}
return false
}
func (e ApiError) Error() string {
return e.String()
}
func (e ApiError) String() string {
return fmt.Sprintf("%#v", e)
}
func (e ApiError) Validate() bool {
if len(e.Fields) != 0 || len(e.Message) != 0 || len(e.ErrorCode) != 0 || len(e.ErrorName) != 0 || len(e.ErrorDescription) != 0 {
return true
}
return false
}
| package force
import (
"fmt"
+ "strings"
)
// Custom Error to handle salesforce api responses.
type ApiErrors []*ApiError
type ApiError struct {
Fields []string `json:"fields,omitempty" force:"fields,omitempty"`
Message string `json:"message,omitempty" force:"message,omitempty"`
ErrorCode string `json:"errorCode,omitempty" force:"errorCode,omitempty"`
ErrorName string `json:"error,omitempty" force:"error,omitempty"`
ErrorDescription string `json:"error_description,omitempty" force:"error_description,omitempty"`
}
func (e ApiErrors) Error() string {
- return fmt.Sprintf("%#v", e.Errors())
+ return e.String()
}
- func (e ApiErrors) Errors() []string {
? ^ ^^^^ --
+ func (e ApiErrors) String() string {
? ^^ ^^^
- eArr := make([]string, len(e))
? ^^^^
+ s := make([]string, len(e))
? ^
for i, err := range e {
- eArr[i] = err.Error()
+ s[i] = err.String()
}
- return eArr
+
+ return strings.Join(s, "\n")
}
func (e ApiErrors) Validate() bool {
if len(e) != 0 {
return true
}
return false
}
func (e ApiError) Error() string {
+ return e.String()
+ }
+
+ func (e ApiError) String() string {
return fmt.Sprintf("%#v", e)
}
func (e ApiError) Validate() bool {
if len(e.Fields) != 0 || len(e.Message) != 0 || len(e.ErrorCode) != 0 || len(e.ErrorName) != 0 || len(e.ErrorDescription) != 0 {
return true
}
return false
} | 16 | 0.333333 | 11 | 5 |
48851cab6c10e0fd7c5b40c0e296f6ada5a442b0 | spec/spec_helper.rb | spec/spec_helper.rb | require "rspec"
require "ar_protobuf_store"
require "active_record"
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Schema.verbose = false
def setup_db(&block)
# ActiveRecord caches columns options like defaults etc. Clear them!
ActiveRecord::Base.connection.schema_cache.clear!
ActiveRecord::Schema.define(version: 1, &block)
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
| require "rspec"
require "ar_protobuf_store"
require "active_record"
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
ActiveRecord::Schema.verbose = false
def setup_db(&block)
# ActiveRecord caches columns options like defaults etc. Clear them!
ActiveRecord::Base.connection.schema_cache.clear!
ActiveRecord::Schema.define(:version => 1, &block)
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
| Use 1.8 syntax for hashes | Use 1.8 syntax for hashes
| Ruby | mit | hfwang/ar_protobuf_store | ruby | ## Code Before:
require "rspec"
require "ar_protobuf_store"
require "active_record"
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Schema.verbose = false
def setup_db(&block)
# ActiveRecord caches columns options like defaults etc. Clear them!
ActiveRecord::Base.connection.schema_cache.clear!
ActiveRecord::Schema.define(version: 1, &block)
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
## Instruction:
Use 1.8 syntax for hashes
## Code After:
require "rspec"
require "ar_protobuf_store"
require "active_record"
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
ActiveRecord::Schema.verbose = false
def setup_db(&block)
# ActiveRecord caches columns options like defaults etc. Clear them!
ActiveRecord::Base.connection.schema_cache.clear!
ActiveRecord::Schema.define(:version => 1, &block)
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
| require "rspec"
require "ar_protobuf_store"
require "active_record"
- ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
? ^ ^
+ ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
? + ^^^ + ^^^
ActiveRecord::Schema.verbose = false
def setup_db(&block)
# ActiveRecord caches columns options like defaults etc. Clear them!
ActiveRecord::Base.connection.schema_cache.clear!
- ActiveRecord::Schema.define(version: 1, &block)
? ^
+ ActiveRecord::Schema.define(:version => 1, &block)
? + ^^^
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end | 4 | 0.210526 | 2 | 2 |
17db477c32955006c685bc70e663e230a8b44765 | bin/pino-cloudwatch.js | bin/pino-cloudwatch.js | var yargs = require('yargs');
var argv = yargs
.usage('Sends pino logs to AWS CloudWatch Logs.\nUsage: node index.js | pino-cloudwatch [options]')
.describe('aws_access_key_id', 'AWS Access Key ID')
.describe('aws_secret_access_key', 'AWS Secret Access Key')
.describe('aws_region', 'AWS Region')
.describe('group', 'AWS CloudWatch log group name')
.describe('prefix', 'AWS CloudWatch log stream name prefix')
.describe('interval', 'The maxmimum interval (in ms) before flushing the log queue.')
.demand('group')
.default('interval', 1000)
.wrap(140)
.argv;
require('../index')(argv);
| var yargs = require('yargs');
var pump = require('pump');
var split = require('split2');
var argv = yargs
.usage('Sends pino logs to AWS CloudWatch Logs.\nUsage: node index.js | pino-cloudwatch [options]')
.describe('aws_access_key_id', 'AWS Access Key ID')
.describe('aws_secret_access_key', 'AWS Secret Access Key')
.describe('aws_region', 'AWS Region')
.describe('group', 'AWS CloudWatch log group name')
.describe('prefix', 'AWS CloudWatch log stream name prefix')
.describe('interval', 'The maxmimum interval (in ms) before flushing the log queue.')
.demand('group')
.default('interval', 1000)
.wrap(140)
.argv;
pump(process.stdin, split(), require('../index')(argv));
| Move piping from stdin to the cli | Move piping from stdin to the cli
| JavaScript | mit | dbhowell/pino-cloudwatch | javascript | ## Code Before:
var yargs = require('yargs');
var argv = yargs
.usage('Sends pino logs to AWS CloudWatch Logs.\nUsage: node index.js | pino-cloudwatch [options]')
.describe('aws_access_key_id', 'AWS Access Key ID')
.describe('aws_secret_access_key', 'AWS Secret Access Key')
.describe('aws_region', 'AWS Region')
.describe('group', 'AWS CloudWatch log group name')
.describe('prefix', 'AWS CloudWatch log stream name prefix')
.describe('interval', 'The maxmimum interval (in ms) before flushing the log queue.')
.demand('group')
.default('interval', 1000)
.wrap(140)
.argv;
require('../index')(argv);
## Instruction:
Move piping from stdin to the cli
## Code After:
var yargs = require('yargs');
var pump = require('pump');
var split = require('split2');
var argv = yargs
.usage('Sends pino logs to AWS CloudWatch Logs.\nUsage: node index.js | pino-cloudwatch [options]')
.describe('aws_access_key_id', 'AWS Access Key ID')
.describe('aws_secret_access_key', 'AWS Secret Access Key')
.describe('aws_region', 'AWS Region')
.describe('group', 'AWS CloudWatch log group name')
.describe('prefix', 'AWS CloudWatch log stream name prefix')
.describe('interval', 'The maxmimum interval (in ms) before flushing the log queue.')
.demand('group')
.default('interval', 1000)
.wrap(140)
.argv;
pump(process.stdin, split(), require('../index')(argv));
| var yargs = require('yargs');
+ var pump = require('pump');
+ var split = require('split2');
var argv = yargs
.usage('Sends pino logs to AWS CloudWatch Logs.\nUsage: node index.js | pino-cloudwatch [options]')
.describe('aws_access_key_id', 'AWS Access Key ID')
.describe('aws_secret_access_key', 'AWS Secret Access Key')
.describe('aws_region', 'AWS Region')
.describe('group', 'AWS CloudWatch log group name')
.describe('prefix', 'AWS CloudWatch log stream name prefix')
.describe('interval', 'The maxmimum interval (in ms) before flushing the log queue.')
.demand('group')
.default('interval', 1000)
.wrap(140)
.argv;
- require('../index')(argv);
+ pump(process.stdin, split(), require('../index')(argv)); | 4 | 0.25 | 3 | 1 |
8d5ea01c20eff5dcb344e51cfc422236c95ad789 | test/integration/ripple_transactions.js | test/integration/ripple_transactions.js | var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
it.skip('should create a payment to a ripple account', function(){
// POST /payments
done();
});
it.skip('should not be able to send a payment to the gateway', function(){
// POST /payments
done();
});
it.skip('should list all payments made to or from a user', function(){
// GET /payments
done();
});
});
describe('on behalf of an admin', function(){
it.skip('should create payment to a ripple account', function(){
// POST /payments
done();
});
it.skip('should list payments sent to or from a hosted wallet', function(){
// GET /payments
done();
});
it.skip('should list all payments made to or from all hosted wallets', function(){
// GET /payments
done();
});
});
});
| var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
before(function(done){
client = new RippleGateway.Client({
api: 'https://localhost:4000'
});
client.user = rand();
client.secret = rand();
client.createUser({}, function(err, resp){
if (err) { throw new Error(err); }
user = resp;
done();
});
});
it('should create a payment to a ripple account', function(done){
var paymentOptions = {
to_account: 'rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a',
from_account: 'rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a',
from_tag: '2',
amount: '1',
currency: 'USD'
};
client.sendPayment(paymentOptions, function(err, payment){
console.log(err, payment);
assert(!err);
assert(payment.id > 0);
done();
});
});
it('should not be able to send a payment to the gateway', function(done){
// POST /payments
assert(true);
done();
});
it.skip('should list all payments made to or from a user', function(done){
// GET /payments
done();
});
});
describe('on behalf of an admin', function(){
it.skip('should create payment to a ripple account', function(done){
// POST /payments
done();
});
it.skip('should list payments sent to or from a hosted wallet', function(done){
// GET /payments
done();
});
it.skip('should list all payments made to or from all hosted wallets', function(done){
// GET /payments
done();
});
});
});
| Add example test for sending payment. | [TEST] Add example test for sending payment.
| JavaScript | isc | crazyquark/gatewayd,xdv/gatewayd,zealord/gatewayd,xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd | javascript | ## Code Before:
var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
it.skip('should create a payment to a ripple account', function(){
// POST /payments
done();
});
it.skip('should not be able to send a payment to the gateway', function(){
// POST /payments
done();
});
it.skip('should list all payments made to or from a user', function(){
// GET /payments
done();
});
});
describe('on behalf of an admin', function(){
it.skip('should create payment to a ripple account', function(){
// POST /payments
done();
});
it.skip('should list payments sent to or from a hosted wallet', function(){
// GET /payments
done();
});
it.skip('should list all payments made to or from all hosted wallets', function(){
// GET /payments
done();
});
});
});
## Instruction:
[TEST] Add example test for sending payment.
## Code After:
var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
before(function(done){
client = new RippleGateway.Client({
api: 'https://localhost:4000'
});
client.user = rand();
client.secret = rand();
client.createUser({}, function(err, resp){
if (err) { throw new Error(err); }
user = resp;
done();
});
});
it('should create a payment to a ripple account', function(done){
var paymentOptions = {
to_account: 'rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a',
from_account: 'rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a',
from_tag: '2',
amount: '1',
currency: 'USD'
};
client.sendPayment(paymentOptions, function(err, payment){
console.log(err, payment);
assert(!err);
assert(payment.id > 0);
done();
});
});
it('should not be able to send a payment to the gateway', function(done){
// POST /payments
assert(true);
done();
});
it.skip('should list all payments made to or from a user', function(done){
// GET /payments
done();
});
});
describe('on behalf of an admin', function(){
it.skip('should create payment to a ripple account', function(done){
// POST /payments
done();
});
it.skip('should list payments sent to or from a hosted wallet', function(done){
// GET /payments
done();
});
it.skip('should list all payments made to or from all hosted wallets', function(done){
// GET /payments
done();
});
});
});
| var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
+ before(function(done){
+ client = new RippleGateway.Client({
+ api: 'https://localhost:4000'
+ });
+ client.user = rand();
+ client.secret = rand();
+ client.createUser({}, function(err, resp){
+ if (err) { throw new Error(err); }
+ user = resp;
+ done();
+ });
+ });
+
- it.skip('should create a payment to a ripple account', function(){
? -----
+ it('should create a payment to a ripple account', function(done){
? ++++
+ var paymentOptions = {
+ to_account: 'rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a',
+ from_account: 'rNeSkJhcxDaqzZCAvSfQrxwPJ2Kjddrj4a',
+ from_tag: '2',
+ amount: '1',
+ currency: 'USD'
+ };
+ client.sendPayment(paymentOptions, function(err, payment){
+ console.log(err, payment);
+ assert(!err);
+ assert(payment.id > 0);
+ done();
+ });
+ });
+
+ it('should not be able to send a payment to the gateway', function(done){
// POST /payments
+ assert(true);
done();
});
- it.skip('should not be able to send a payment to the gateway', function(){
- // POST /payments
- done();
- });
-
- it.skip('should list all payments made to or from a user', function(){
+ it.skip('should list all payments made to or from a user', function(done){
? ++++
// GET /payments
done();
});
});
describe('on behalf of an admin', function(){
- it.skip('should create payment to a ripple account', function(){
+ it.skip('should create payment to a ripple account', function(done){
? ++++
// POST /payments
done();
});
- it.skip('should list payments sent to or from a hosted wallet', function(){
+ it.skip('should list payments sent to or from a hosted wallet', function(done){
? ++++
// GET /payments
done();
});
- it.skip('should list all payments made to or from all hosted wallets', function(){
+ it.skip('should list all payments made to or from all hosted wallets', function(done){
? ++++
// GET /payments
done();
});
});
});
| 45 | 0.957447 | 35 | 10 |
0e3613bf0ff7ec583382fdeb12c6a08c75a8b870 | Tests/ViewInspectorTests/SwiftUI/TreeViewTests.swift | Tests/ViewInspectorTests/SwiftUI/TreeViewTests.swift | import XCTest
import SwiftUI
@testable import ViewInspector
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class TreeViewTests: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testEnclosedView() throws {
let sut = Text("Test").contextMenu(ContextMenu(menuItems: { Text("Menu") }))
let text = try sut.inspect().text().string()
XCTAssertEqual(text, "Test")
}
@available(watchOS, deprecated: 7.0)
func testRetainsModifiers() throws {
let view = Text("Test")
.padding()
.contextMenu(ContextMenu(menuItems: { Text("Menu") }))
.padding().padding()
let sut = try view.inspect().text()
XCTAssertEqual(sut.content.medium.viewModifiers.count, 3)
}
}
// MARK: - View Modifiers
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class GlobalModifiersForTreeView: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testContextMenu() throws {
let sut = EmptyView().contextMenu(ContextMenu(menuItems: { Text("") }))
XCTAssertNoThrow(try sut.inspect().emptyView())
}
}
| import XCTest
import SwiftUI
@testable import ViewInspector
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class TreeViewTests: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testEnclosedView() throws {
let sut = Text("Test").contextMenu(ContextMenu(menuItems: { Text("Menu") }))
let text = try sut.inspect().text().string()
XCTAssertEqual(text, "Test")
}
@available(watchOS, deprecated: 7.0)
func testRetainsModifiers() throws {
let view = Text("Test")
.padding()
.contextMenu(ContextMenu(menuItems: { Text("Menu") }))
.padding().padding()
let sut = try view.inspect().text()
let count: Int
if #available(iOS 15.3, macOS 12.3, *) {
count = 4
} else {
count = 3
}
XCTAssertEqual(sut.content.medium.viewModifiers.count, count)
}
}
// MARK: - View Modifiers
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class GlobalModifiersForTreeView: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testContextMenu() throws {
let sut = EmptyView().contextMenu(ContextMenu(menuItems: { Text("") }))
XCTAssertNoThrow(try sut.inspect().emptyView())
}
}
| Fix a failing test in iOS 15.5 | Fix a failing test in iOS 15.5
| Swift | mit | nalexn/ViewInspector,nalexn/ViewInspector | swift | ## Code Before:
import XCTest
import SwiftUI
@testable import ViewInspector
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class TreeViewTests: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testEnclosedView() throws {
let sut = Text("Test").contextMenu(ContextMenu(menuItems: { Text("Menu") }))
let text = try sut.inspect().text().string()
XCTAssertEqual(text, "Test")
}
@available(watchOS, deprecated: 7.0)
func testRetainsModifiers() throws {
let view = Text("Test")
.padding()
.contextMenu(ContextMenu(menuItems: { Text("Menu") }))
.padding().padding()
let sut = try view.inspect().text()
XCTAssertEqual(sut.content.medium.viewModifiers.count, 3)
}
}
// MARK: - View Modifiers
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class GlobalModifiersForTreeView: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testContextMenu() throws {
let sut = EmptyView().contextMenu(ContextMenu(menuItems: { Text("") }))
XCTAssertNoThrow(try sut.inspect().emptyView())
}
}
## Instruction:
Fix a failing test in iOS 15.5
## Code After:
import XCTest
import SwiftUI
@testable import ViewInspector
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class TreeViewTests: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testEnclosedView() throws {
let sut = Text("Test").contextMenu(ContextMenu(menuItems: { Text("Menu") }))
let text = try sut.inspect().text().string()
XCTAssertEqual(text, "Test")
}
@available(watchOS, deprecated: 7.0)
func testRetainsModifiers() throws {
let view = Text("Test")
.padding()
.contextMenu(ContextMenu(menuItems: { Text("Menu") }))
.padding().padding()
let sut = try view.inspect().text()
let count: Int
if #available(iOS 15.3, macOS 12.3, *) {
count = 4
} else {
count = 3
}
XCTAssertEqual(sut.content.medium.viewModifiers.count, count)
}
}
// MARK: - View Modifiers
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class GlobalModifiersForTreeView: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testContextMenu() throws {
let sut = EmptyView().contextMenu(ContextMenu(menuItems: { Text("") }))
XCTAssertNoThrow(try sut.inspect().emptyView())
}
}
| import XCTest
import SwiftUI
@testable import ViewInspector
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class TreeViewTests: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testEnclosedView() throws {
let sut = Text("Test").contextMenu(ContextMenu(menuItems: { Text("Menu") }))
let text = try sut.inspect().text().string()
XCTAssertEqual(text, "Test")
}
@available(watchOS, deprecated: 7.0)
func testRetainsModifiers() throws {
let view = Text("Test")
.padding()
.contextMenu(ContextMenu(menuItems: { Text("Menu") }))
.padding().padding()
let sut = try view.inspect().text()
+ let count: Int
+ if #available(iOS 15.3, macOS 12.3, *) {
+ count = 4
+ } else {
+ count = 3
+ }
- XCTAssertEqual(sut.content.medium.viewModifiers.count, 3)
? ^
+ XCTAssertEqual(sut.content.medium.viewModifiers.count, count)
? ^^^^^
}
}
// MARK: - View Modifiers
@available(iOS 13.0, macOS 10.15, *)
@available(tvOS, unavailable)
final class GlobalModifiersForTreeView: XCTestCase {
@available(watchOS, deprecated: 7.0)
func testContextMenu() throws {
let sut = EmptyView().contextMenu(ContextMenu(menuItems: { Text("") }))
XCTAssertNoThrow(try sut.inspect().emptyView())
}
} | 8 | 0.210526 | 7 | 1 |
a5a429e2d0450b03043384f7fa5757254ccd47f9 | cfgov/jinja2/v1/_includes/templates/upcoming-events.html | cfgov/jinja2/v1/_includes/templates/upcoming-events.html | <div class="upcoming-events">
<h2 class="header-slug">
<span class="header-slug_inner">
Upcoming events
</span>
</h2>
<div class="demo-placeholder">
placeholder
</div>
</div>
| <div class="upcoming-events">
<h2 class="header-slug">
<span class="header-slug_inner">
Upcoming events
</span>
</h2>
<p>Check out our upcoming events.</p>
<a class="btn" href="/events/">Find out more</a>
</div>
| Add a link to event page | Add a link to event page
| HTML | cc0-1.0 | kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh,kave/cfgov-refresh | html | ## Code Before:
<div class="upcoming-events">
<h2 class="header-slug">
<span class="header-slug_inner">
Upcoming events
</span>
</h2>
<div class="demo-placeholder">
placeholder
</div>
</div>
## Instruction:
Add a link to event page
## Code After:
<div class="upcoming-events">
<h2 class="header-slug">
<span class="header-slug_inner">
Upcoming events
</span>
</h2>
<p>Check out our upcoming events.</p>
<a class="btn" href="/events/">Find out more</a>
</div>
| <div class="upcoming-events">
<h2 class="header-slug">
<span class="header-slug_inner">
Upcoming events
</span>
</h2>
+ <p>Check out our upcoming events.</p>
+ <a class="btn" href="/events/">Find out more</a>
- <div class="demo-placeholder">
- placeholder
- </div>
</div> | 5 | 0.5 | 2 | 3 |
2068fa2cd309dcaaa33681a3148344422dd46b07 | app/helpers/application_helper.rb | app/helpers/application_helper.rb | module ApplicationHelper
def custom_error_messages
{ :header_message => "", :message => "The following problems occurred:" }
end
def active_if(options)
if options[:action]
options[:action].each do |action|
return "active" if params[:action] == action
end
elsif options[:controller]
options[:controller].each do |controller|
return "active" if params[:controller] == controller
end
else
end
return ""
end
def show_flash_message
message = ""
flash.each do |name, msg|
message += content_tag :div, msg, :id => "flash_#{name}"
end
message
end
def source_field(options)
if options[:collection]
return nil if @source.send(options[:attribute]).empty?
else
return nil unless @source.send(options[:attribute])
end
content_tag(:dt, (options[:label] || options[:attribute].to_s.humanize)) +
content_tag(:dd, (options[:url] ? link_to(options[:value], options[:url]) : options[:value]))
end
def gravatar_for(user)
gravatar_image_tag(user.email, :alt => user.display_name, :title => user.display_name, :class => "avatar")
end
def markdownize(text)
RDiscount.new(text).to_html
end
end
| module ApplicationHelper
def custom_error_messages
{ :header_message => "", :message => "The following problems occurred:" }
end
def active_if(options)
if options[:action]
options[:action].each do |action|
return "active" if params[:action] == action
end
elsif options[:controller]
options[:controller].each do |controller|
return "active" if params[:controller] == controller
end
else
end
return ""
end
def show_flash_message
message = ""
flash.each do |name, msg|
message += content_tag :div, msg, :id => "flash_#{name}"
end
message
end
def source_field(options)
if options[:collection]
return nil if @source.send(options[:attribute]).empty?
else
return nil unless @source.send(options[:attribute])
end
content_tag(:dt, (options[:label] || options[:attribute].to_s.humanize)) +
content_tag(:dd, (options[:url] ? link_to(options[:value], options[:url]) : options[:value]))
end
def gravatar_for(user, options)
options.reverse_merge!(:class => "avatar", :size => 64)
gravatar_image_tag(user.email, :alt => user.display_name,
:title => user.display_name,
:class => options[:class],
:width => options[:size],
:height => options[:size],
:gravatar => { :size => options[:size] })
end
def markdownize(text)
RDiscount.new(text).to_html
end
end
| Create a helper for displaying gravatars. | Create a helper for displaying gravatars. [Story1567591] | Ruby | bsd-3-clause | afomi/datacatalog-web,afomi/datacatalog-web | ruby | ## Code Before:
module ApplicationHelper
def custom_error_messages
{ :header_message => "", :message => "The following problems occurred:" }
end
def active_if(options)
if options[:action]
options[:action].each do |action|
return "active" if params[:action] == action
end
elsif options[:controller]
options[:controller].each do |controller|
return "active" if params[:controller] == controller
end
else
end
return ""
end
def show_flash_message
message = ""
flash.each do |name, msg|
message += content_tag :div, msg, :id => "flash_#{name}"
end
message
end
def source_field(options)
if options[:collection]
return nil if @source.send(options[:attribute]).empty?
else
return nil unless @source.send(options[:attribute])
end
content_tag(:dt, (options[:label] || options[:attribute].to_s.humanize)) +
content_tag(:dd, (options[:url] ? link_to(options[:value], options[:url]) : options[:value]))
end
def gravatar_for(user)
gravatar_image_tag(user.email, :alt => user.display_name, :title => user.display_name, :class => "avatar")
end
def markdownize(text)
RDiscount.new(text).to_html
end
end
## Instruction:
Create a helper for displaying gravatars. [Story1567591]
## Code After:
module ApplicationHelper
def custom_error_messages
{ :header_message => "", :message => "The following problems occurred:" }
end
def active_if(options)
if options[:action]
options[:action].each do |action|
return "active" if params[:action] == action
end
elsif options[:controller]
options[:controller].each do |controller|
return "active" if params[:controller] == controller
end
else
end
return ""
end
def show_flash_message
message = ""
flash.each do |name, msg|
message += content_tag :div, msg, :id => "flash_#{name}"
end
message
end
def source_field(options)
if options[:collection]
return nil if @source.send(options[:attribute]).empty?
else
return nil unless @source.send(options[:attribute])
end
content_tag(:dt, (options[:label] || options[:attribute].to_s.humanize)) +
content_tag(:dd, (options[:url] ? link_to(options[:value], options[:url]) : options[:value]))
end
def gravatar_for(user, options)
options.reverse_merge!(:class => "avatar", :size => 64)
gravatar_image_tag(user.email, :alt => user.display_name,
:title => user.display_name,
:class => options[:class],
:width => options[:size],
:height => options[:size],
:gravatar => { :size => options[:size] })
end
def markdownize(text)
RDiscount.new(text).to_html
end
end
| module ApplicationHelper
def custom_error_messages
{ :header_message => "", :message => "The following problems occurred:" }
end
def active_if(options)
if options[:action]
options[:action].each do |action|
return "active" if params[:action] == action
end
elsif options[:controller]
options[:controller].each do |controller|
return "active" if params[:controller] == controller
end
else
end
return ""
end
def show_flash_message
message = ""
flash.each do |name, msg|
message += content_tag :div, msg, :id => "flash_#{name}"
end
message
end
def source_field(options)
if options[:collection]
return nil if @source.send(options[:attribute]).empty?
else
return nil unless @source.send(options[:attribute])
end
content_tag(:dt, (options[:label] || options[:attribute].to_s.humanize)) +
content_tag(:dd, (options[:url] ? link_to(options[:value], options[:url]) : options[:value]))
end
- def gravatar_for(user)
+ def gravatar_for(user, options)
? +++++++++
- gravatar_image_tag(user.email, :alt => user.display_name, :title => user.display_name, :class => "avatar")
+ options.reverse_merge!(:class => "avatar", :size => 64)
+ gravatar_image_tag(user.email, :alt => user.display_name,
+ :title => user.display_name,
+ :class => options[:class],
+ :width => options[:size],
+ :height => options[:size],
+ :gravatar => { :size => options[:size] })
end
def markdownize(text)
RDiscount.new(text).to_html
end
end | 10 | 0.204082 | 8 | 2 |
071c736627bf739f69355209d369a86954a06b70 | vim/env.zsh | vim/env.zsh | export FZF_DEFAULT_COMMAND='rg --files --hidden --follow '
| export FZF_DEFAULT_COMMAND='ag -l --path-to-ignore ~/.ignore --nocolor --hidden -g ""'
# To install useful keybindings and fuzzy completion:
# $(brew --prefix)/opt/fzf/install
| Make fzf search with ag | Make fzf search with ag
| Shell | mit | conf/dotfiles,conf/dotfiles | shell | ## Code Before:
export FZF_DEFAULT_COMMAND='rg --files --hidden --follow '
## Instruction:
Make fzf search with ag
## Code After:
export FZF_DEFAULT_COMMAND='ag -l --path-to-ignore ~/.ignore --nocolor --hidden -g ""'
# To install useful keybindings and fuzzy completion:
# $(brew --prefix)/opt/fzf/install
| - export FZF_DEFAULT_COMMAND='rg --files --hidden --follow '
+ export FZF_DEFAULT_COMMAND='ag -l --path-to-ignore ~/.ignore --nocolor --hidden -g ""'
+ # To install useful keybindings and fuzzy completion:
+ # $(brew --prefix)/opt/fzf/install
| 4 | 2 | 3 | 1 |
59ec54bbe49013826d2c15ce2162c2e0e335bd57 | modules/module_urlsize.py | modules/module_urlsize.py | """Warns about large files"""
def handle_url(bot, user, channel, url, msg):
if channel == "#wow": return
# inform about large files (over 5MB)
size = getUrl(url).getSize()
contentType = getUrl(url).getHeaders()['content-type']
if not size: return
size = size / 1024
if size > 5:
bot.say(channel, "File size: %s MB - Content-Type: %s" % (size, contentType))
| """Warns about large files"""
def handle_url(bot, user, channel, url, msg):
if channel == "#wow": return
# inform about large files (over 5MB)
size = getUrl(url).getSize()
headers = getUrl(url).getHeaders()['content-type']
if 'content-type' in headers:
contentType = headers['content-type']
else:
contentType = "Unknown"
if not size: return
size = size / 1024
if size > 5:
bot.say(channel, "File size: %s MB - Content-Type: %s" % (size, contentType))
| Handle cases where the server doesn't return content-type | Handle cases where the server doesn't return content-type
git-svn-id: 056f9092885898c4775d98c479d2d33d00273e45@120 dda364a1-ef19-0410-af65-756c83048fb2
| Python | bsd-3-clause | rnyberg/pyfibot,lepinkainen/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,EArmour/pyfibot,nigeljonez/newpyfibot,aapa/pyfibot,huqa/pyfibot,huqa/pyfibot,aapa/pyfibot,EArmour/pyfibot | python | ## Code Before:
"""Warns about large files"""
def handle_url(bot, user, channel, url, msg):
if channel == "#wow": return
# inform about large files (over 5MB)
size = getUrl(url).getSize()
contentType = getUrl(url).getHeaders()['content-type']
if not size: return
size = size / 1024
if size > 5:
bot.say(channel, "File size: %s MB - Content-Type: %s" % (size, contentType))
## Instruction:
Handle cases where the server doesn't return content-type
git-svn-id: 056f9092885898c4775d98c479d2d33d00273e45@120 dda364a1-ef19-0410-af65-756c83048fb2
## Code After:
"""Warns about large files"""
def handle_url(bot, user, channel, url, msg):
if channel == "#wow": return
# inform about large files (over 5MB)
size = getUrl(url).getSize()
headers = getUrl(url).getHeaders()['content-type']
if 'content-type' in headers:
contentType = headers['content-type']
else:
contentType = "Unknown"
if not size: return
size = size / 1024
if size > 5:
bot.say(channel, "File size: %s MB - Content-Type: %s" % (size, contentType))
| """Warns about large files"""
def handle_url(bot, user, channel, url, msg):
if channel == "#wow": return
# inform about large files (over 5MB)
size = getUrl(url).getSize()
- contentType = getUrl(url).getHeaders()['content-type']
? ^^^^ ^^^^^
+ headers = getUrl(url).getHeaders()['content-type']
? ^ ^^ ++
+ if 'content-type' in headers:
+ contentType = headers['content-type']
+ else:
+ contentType = "Unknown"
if not size: return
size = size / 1024
if size > 5:
bot.say(channel, "File size: %s MB - Content-Type: %s" % (size, contentType)) | 6 | 0.4 | 5 | 1 |
76d385139e36b3b685d73ba209e2f52ad89ebd01 | client/apps/user_tool/actions/application.js | client/apps/user_tool/actions/application.js | import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FOR_ACCOUNT_USERS', 'GET_ACCOUNT_USER', 'UPDATE_ACCOUNT_USER'];
export const Constants = wrapper(actions, requests);
export const searchForAccountUsers = (searchTerm, page) => ({
type: Constants.SEARCH_FOR_ACCOUNT_USERS,
method: Network.GET,
url: 'api/canvas_account_users',
params: {
search_term: searchTerm,
page,
},
});
export const getAccountUser = userId => ({
type: Constants.GET_ACCOUNT_USER,
method: Network.GET,
url: `api/canvas_account_users/${userId}`,
});
export const updateAccountUser = (userId, userAttributes) => ({
type: Constants.UPDATE_ACCOUNT_USER,
method: Network.PUT,
url: `api/canvas_account_users/${userId}`,
body: {
user: {
name: userAttributes.name,
login_id: userAttributes.loginId,
sis_user_id: userAttributes.sisUserId,
email: userAttributes.email,
},
},
});
| import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
// Increasing timeout to accomodate slow environments. Default is 20_000.
Network.TIMEOUT = 60_000;
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FOR_ACCOUNT_USERS', 'GET_ACCOUNT_USER', 'UPDATE_ACCOUNT_USER'];
export const Constants = wrapper(actions, requests);
export const searchForAccountUsers = (searchTerm, page) => ({
type: Constants.SEARCH_FOR_ACCOUNT_USERS,
method: Network.GET,
url: 'api/canvas_account_users',
params: {
search_term: searchTerm,
page,
},
});
export const getAccountUser = userId => ({
type: Constants.GET_ACCOUNT_USER,
method: Network.GET,
url: `api/canvas_account_users/${userId}`,
});
export const updateAccountUser = (userId, userAttributes) => ({
type: Constants.UPDATE_ACCOUNT_USER,
method: Network.PUT,
url: `api/canvas_account_users/${userId}`,
body: {
user: {
name: userAttributes.name,
login_id: userAttributes.loginId,
sis_user_id: userAttributes.sisUserId,
email: userAttributes.email,
},
},
});
| Increase client-side network timeout from 20 seconds to 60 | fix: Increase client-side network timeout from 20 seconds to 60
We're having problems in the staging environment where requests
are taking longer than 20 seconds and are timing out so the user can't
perform certain actions. Increasing the timeout to 60 seconds won't
improve the slow performance obviously, but it will at least prevent
requests from timing out and will allow the user to use the application
normally (albeit slowly).
| JavaScript | mit | atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion | javascript | ## Code Before:
import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FOR_ACCOUNT_USERS', 'GET_ACCOUNT_USER', 'UPDATE_ACCOUNT_USER'];
export const Constants = wrapper(actions, requests);
export const searchForAccountUsers = (searchTerm, page) => ({
type: Constants.SEARCH_FOR_ACCOUNT_USERS,
method: Network.GET,
url: 'api/canvas_account_users',
params: {
search_term: searchTerm,
page,
},
});
export const getAccountUser = userId => ({
type: Constants.GET_ACCOUNT_USER,
method: Network.GET,
url: `api/canvas_account_users/${userId}`,
});
export const updateAccountUser = (userId, userAttributes) => ({
type: Constants.UPDATE_ACCOUNT_USER,
method: Network.PUT,
url: `api/canvas_account_users/${userId}`,
body: {
user: {
name: userAttributes.name,
login_id: userAttributes.loginId,
sis_user_id: userAttributes.sisUserId,
email: userAttributes.email,
},
},
});
## Instruction:
fix: Increase client-side network timeout from 20 seconds to 60
We're having problems in the staging environment where requests
are taking longer than 20 seconds and are timing out so the user can't
perform certain actions. Increasing the timeout to 60 seconds won't
improve the slow performance obviously, but it will at least prevent
requests from timing out and will allow the user to use the application
normally (albeit slowly).
## Code After:
import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
// Increasing timeout to accomodate slow environments. Default is 20_000.
Network.TIMEOUT = 60_000;
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FOR_ACCOUNT_USERS', 'GET_ACCOUNT_USER', 'UPDATE_ACCOUNT_USER'];
export const Constants = wrapper(actions, requests);
export const searchForAccountUsers = (searchTerm, page) => ({
type: Constants.SEARCH_FOR_ACCOUNT_USERS,
method: Network.GET,
url: 'api/canvas_account_users',
params: {
search_term: searchTerm,
page,
},
});
export const getAccountUser = userId => ({
type: Constants.GET_ACCOUNT_USER,
method: Network.GET,
url: `api/canvas_account_users/${userId}`,
});
export const updateAccountUser = (userId, userAttributes) => ({
type: Constants.UPDATE_ACCOUNT_USER,
method: Network.PUT,
url: `api/canvas_account_users/${userId}`,
body: {
user: {
name: userAttributes.name,
login_id: userAttributes.loginId,
sis_user_id: userAttributes.sisUserId,
email: userAttributes.email,
},
},
});
| import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
+
+ // Increasing timeout to accomodate slow environments. Default is 20_000.
+ Network.TIMEOUT = 60_000;
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FOR_ACCOUNT_USERS', 'GET_ACCOUNT_USER', 'UPDATE_ACCOUNT_USER'];
export const Constants = wrapper(actions, requests);
export const searchForAccountUsers = (searchTerm, page) => ({
type: Constants.SEARCH_FOR_ACCOUNT_USERS,
method: Network.GET,
url: 'api/canvas_account_users',
params: {
search_term: searchTerm,
page,
},
});
export const getAccountUser = userId => ({
type: Constants.GET_ACCOUNT_USER,
method: Network.GET,
url: `api/canvas_account_users/${userId}`,
});
export const updateAccountUser = (userId, userAttributes) => ({
type: Constants.UPDATE_ACCOUNT_USER,
method: Network.PUT,
url: `api/canvas_account_users/${userId}`,
body: {
user: {
name: userAttributes.name,
login_id: userAttributes.loginId,
sis_user_id: userAttributes.sisUserId,
email: userAttributes.email,
},
},
}); | 3 | 0.075 | 3 | 0 |
f4b2ec17526db8327841f413cc77ebf7593ed28b | polyfills/Event/detect.js | polyfills/Event/detect.js | (function(){
if(!'Event' in window) return false;
if(typeof window.Event === 'function') return true;
var result = true;
try{
new Event('click');
}catch(e){
result = false;
}
return result;
}())
| (function(){
if(!'Event' in window) return false;
if(typeof window.Event === 'function') return true;
try{
new Event('click');
return true;
}catch(e){
return false;
}
}());
| Add missing semicolon, avoid var assignment | Add missing semicolon, avoid var assignment | JavaScript | mit | JakeChampion/polyfill-service,JakeChampion/polyfill-service,kdzwinel/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,mcshaz/polyfill-service,mcshaz/polyfill-service | javascript | ## Code Before:
(function(){
if(!'Event' in window) return false;
if(typeof window.Event === 'function') return true;
var result = true;
try{
new Event('click');
}catch(e){
result = false;
}
return result;
}())
## Instruction:
Add missing semicolon, avoid var assignment
## Code After:
(function(){
if(!'Event' in window) return false;
if(typeof window.Event === 'function') return true;
try{
new Event('click');
return true;
}catch(e){
return false;
}
}());
| (function(){
if(!'Event' in window) return false;
if(typeof window.Event === 'function') return true;
- var result = true;
try{
new Event('click');
+ return true;
}catch(e){
- result = false;
? ^ ^^^^
+ return false;
? ^ ^^
}
-
- return result;
- }())
+ }());
? +
| 8 | 0.571429 | 3 | 5 |
cc2921a8561f2c4df0d0a27d81fea7a97f11646c | examples/typescript-weather-app/package.json | examples/typescript-weather-app/package.json | {
"title": "TypeScript Weather App",
"category": "Small Apps",
"description": "An example of a weather app written in TypeScript",
"main": "./dist/app.js",
"scripts": {
"build": "tsc -p ."
},
"dependencies": {
"tabris": "^1.8.0"
},
"devDependencies": {
"typescript": "^1.8.10"
}
}
| {
"main": "./dist/app.js",
"scripts": {
"build": "tsc -p ."
},
"dependencies": {
"tabris": "^1.8.0"
},
"devDependencies": {
"typescript": "^1.8.10"
}
}
| Revert "Include weather app in examples" | Revert "Include weather app in examples"
We currently can't include a typescript app in the examples since
the build does not run the typescript compiler.
Including the typescript app requires a change in the custom grunt
task in `grunt-copy-examples.js`.
This reverts commit 84be916f71a7b9e80a367568ccaf5190f4c69e96.
Change-Id: I919dff6c924e6ad7b16ee1c5554d06d8bfe8f446
| JSON | bsd-3-clause | eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js | json | ## Code Before:
{
"title": "TypeScript Weather App",
"category": "Small Apps",
"description": "An example of a weather app written in TypeScript",
"main": "./dist/app.js",
"scripts": {
"build": "tsc -p ."
},
"dependencies": {
"tabris": "^1.8.0"
},
"devDependencies": {
"typescript": "^1.8.10"
}
}
## Instruction:
Revert "Include weather app in examples"
We currently can't include a typescript app in the examples since
the build does not run the typescript compiler.
Including the typescript app requires a change in the custom grunt
task in `grunt-copy-examples.js`.
This reverts commit 84be916f71a7b9e80a367568ccaf5190f4c69e96.
Change-Id: I919dff6c924e6ad7b16ee1c5554d06d8bfe8f446
## Code After:
{
"main": "./dist/app.js",
"scripts": {
"build": "tsc -p ."
},
"dependencies": {
"tabris": "^1.8.0"
},
"devDependencies": {
"typescript": "^1.8.10"
}
}
| {
- "title": "TypeScript Weather App",
- "category": "Small Apps",
- "description": "An example of a weather app written in TypeScript",
"main": "./dist/app.js",
"scripts": {
"build": "tsc -p ."
},
"dependencies": {
"tabris": "^1.8.0"
},
"devDependencies": {
"typescript": "^1.8.10"
}
} | 3 | 0.2 | 0 | 3 |
0776592da66da7067237bab0cfb60bf234e0d3f2 | .travis.yml | .travis.yml | sudo: false
language: python
python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
before_install:
- sudo apt-get -qq update
install:
- sudo apt-get install python-dbus
- pip install -U coverage==4.3 pytest pytest-mock
- pip install codeclimate-test-reporter
- pip install i3-py Pillow Babel DateTime python-dateutil
- pip install docker feedparser i3ipc
- pip install netifaces power
- pip install psutil pytz
- pip install requests simplejson
- pip install suntime
- pip install tzlocal
script:
- coverage run --source=. -m pytest tests -v
- CODECLIMATE_REPO_TOKEN=40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf codeclimate-test-reporter
addons:
code_climate:
repo_token: 40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf
| sudo: false
language: python
python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
before_install:
- sudo apt-get -qq update
install:
- sudo apt-get install python-dbus
- pip install -U coverage==4.3 pytest pytest-mock freezegun
- pip install codeclimate-test-reporter
- pip install i3-py Pillow Babel DateTime python-dateutil
- pip install docker feedparser i3ipc
- pip install netifaces power
- pip install psutil pytz
- pip install requests simplejson
- pip install suntime
- pip install tzlocal
script:
- coverage run --source=. -m pytest tests -v
- CODECLIMATE_REPO_TOKEN=40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf codeclimate-test-reporter
addons:
code_climate:
repo_token: 40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf
| Add freezegun to Travis dependencies | Add freezegun to Travis dependencies
| YAML | mit | tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status | yaml | ## Code Before:
sudo: false
language: python
python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
before_install:
- sudo apt-get -qq update
install:
- sudo apt-get install python-dbus
- pip install -U coverage==4.3 pytest pytest-mock
- pip install codeclimate-test-reporter
- pip install i3-py Pillow Babel DateTime python-dateutil
- pip install docker feedparser i3ipc
- pip install netifaces power
- pip install psutil pytz
- pip install requests simplejson
- pip install suntime
- pip install tzlocal
script:
- coverage run --source=. -m pytest tests -v
- CODECLIMATE_REPO_TOKEN=40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf codeclimate-test-reporter
addons:
code_climate:
repo_token: 40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf
## Instruction:
Add freezegun to Travis dependencies
## Code After:
sudo: false
language: python
python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
before_install:
- sudo apt-get -qq update
install:
- sudo apt-get install python-dbus
- pip install -U coverage==4.3 pytest pytest-mock freezegun
- pip install codeclimate-test-reporter
- pip install i3-py Pillow Babel DateTime python-dateutil
- pip install docker feedparser i3ipc
- pip install netifaces power
- pip install psutil pytz
- pip install requests simplejson
- pip install suntime
- pip install tzlocal
script:
- coverage run --source=. -m pytest tests -v
- CODECLIMATE_REPO_TOKEN=40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf codeclimate-test-reporter
addons:
code_climate:
repo_token: 40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf
| sudo: false
language: python
python:
- "3.4"
- "3.5"
- "3.6"
- "3.7"
before_install:
- sudo apt-get -qq update
install:
- sudo apt-get install python-dbus
- - pip install -U coverage==4.3 pytest pytest-mock
+ - pip install -U coverage==4.3 pytest pytest-mock freezegun
? ++++++++++
- pip install codeclimate-test-reporter
- pip install i3-py Pillow Babel DateTime python-dateutil
- pip install docker feedparser i3ipc
- pip install netifaces power
- pip install psutil pytz
- pip install requests simplejson
- pip install suntime
- pip install tzlocal
script:
- coverage run --source=. -m pytest tests -v
- CODECLIMATE_REPO_TOKEN=40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf codeclimate-test-reporter
addons:
code_climate:
repo_token: 40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf | 2 | 0.076923 | 1 | 1 |
840b0d4150ed54e53fb6db8a0c7aebf2c47e8a89 | docs/reduction_examples.rst | docs/reduction_examples.rst | Reduction examples
==================
Here are some examples and different repositories using `ccdproc`.
* `ipython notebook`_
* `WHT basic reductions`_
* `pyhrs`_
* `reduceccd`_
* `astrolib`_
* `mont4k_reduction`_ *Processes multi-image-extension FITS files*
.. _ipython notebook: http://nbviewer.ipython.org/gist/mwcraig/06060d789cc298bbb08e
.. _WHT basic reductions: https://github.com/crawfordsm/wht_reduction_scripts/blob/master/wht_basic_reductions.py
.. _pyhrs: https://github.com/saltastro/pyhrs
.. _reduceccd: https://github.com/rgbIAA/reduceccd
.. _astrolib: https://github.com/yucelkilic/astrolib
.. _mont4k_reduction: https://github.com/bjweiner/ARTN/tree/master/mont4k_pipeline
| Reduction examples and tutorial
===============================
Here are some examples and different repositories using `ccdproc`.
* `Extended guide to image calibration using ccdproc`_
* `ipython notebook`_
* `WHT basic reductions`_
* `pyhrs`_
* `reduceccd`_
* `astrolib`_
* `mont4k_reduction`_ *Processes multi-image-extension FITS files*
.. _Extended guide to image calibration using ccdproc: https://mwcraig.github.io/ccd-as-book/00-00-Preface
.. _ipython notebook: http://nbviewer.ipython.org/gist/mwcraig/06060d789cc298bbb08e
.. _WHT basic reductions: https://github.com/crawfordsm/wht_reduction_scripts/blob/master/wht_basic_reductions.py
.. _pyhrs: https://github.com/saltastro/pyhrs
.. _reduceccd: https://github.com/rgbIAA/reduceccd
.. _astrolib: https://github.com/yucelkilic/astrolib
.. _mont4k_reduction: https://github.com/bjweiner/ARTN/tree/master/mont4k_pipeline
| Add link the CCD reduction guide | Add link the CCD reduction guide
| reStructuredText | bsd-3-clause | mwcraig/ccdproc,astropy/ccdproc | restructuredtext | ## Code Before:
Reduction examples
==================
Here are some examples and different repositories using `ccdproc`.
* `ipython notebook`_
* `WHT basic reductions`_
* `pyhrs`_
* `reduceccd`_
* `astrolib`_
* `mont4k_reduction`_ *Processes multi-image-extension FITS files*
.. _ipython notebook: http://nbviewer.ipython.org/gist/mwcraig/06060d789cc298bbb08e
.. _WHT basic reductions: https://github.com/crawfordsm/wht_reduction_scripts/blob/master/wht_basic_reductions.py
.. _pyhrs: https://github.com/saltastro/pyhrs
.. _reduceccd: https://github.com/rgbIAA/reduceccd
.. _astrolib: https://github.com/yucelkilic/astrolib
.. _mont4k_reduction: https://github.com/bjweiner/ARTN/tree/master/mont4k_pipeline
## Instruction:
Add link the CCD reduction guide
## Code After:
Reduction examples and tutorial
===============================
Here are some examples and different repositories using `ccdproc`.
* `Extended guide to image calibration using ccdproc`_
* `ipython notebook`_
* `WHT basic reductions`_
* `pyhrs`_
* `reduceccd`_
* `astrolib`_
* `mont4k_reduction`_ *Processes multi-image-extension FITS files*
.. _Extended guide to image calibration using ccdproc: https://mwcraig.github.io/ccd-as-book/00-00-Preface
.. _ipython notebook: http://nbviewer.ipython.org/gist/mwcraig/06060d789cc298bbb08e
.. _WHT basic reductions: https://github.com/crawfordsm/wht_reduction_scripts/blob/master/wht_basic_reductions.py
.. _pyhrs: https://github.com/saltastro/pyhrs
.. _reduceccd: https://github.com/rgbIAA/reduceccd
.. _astrolib: https://github.com/yucelkilic/astrolib
.. _mont4k_reduction: https://github.com/bjweiner/ARTN/tree/master/mont4k_pipeline
| - Reduction examples
- ==================
+ Reduction examples and tutorial
+ ===============================
Here are some examples and different repositories using `ccdproc`.
+ * `Extended guide to image calibration using ccdproc`_
* `ipython notebook`_
* `WHT basic reductions`_
* `pyhrs`_
* `reduceccd`_
* `astrolib`_
* `mont4k_reduction`_ *Processes multi-image-extension FITS files*
-
+ .. _Extended guide to image calibration using ccdproc: https://mwcraig.github.io/ccd-as-book/00-00-Preface
.. _ipython notebook: http://nbviewer.ipython.org/gist/mwcraig/06060d789cc298bbb08e
.. _WHT basic reductions: https://github.com/crawfordsm/wht_reduction_scripts/blob/master/wht_basic_reductions.py
.. _pyhrs: https://github.com/saltastro/pyhrs
.. _reduceccd: https://github.com/rgbIAA/reduceccd
.. _astrolib: https://github.com/yucelkilic/astrolib
.. _mont4k_reduction: https://github.com/bjweiner/ARTN/tree/master/mont4k_pipeline
| 7 | 0.35 | 4 | 3 |
c840336de569a011a068e577d29877f12bb286ea | .forestry/front_matter/templates/posts.yml | .forestry/front_matter/templates/posts.yml | ---
hide_body: false
is_partial: false
fields:
- type: text
default: default
label: Template
name: template
- type: textarea
name: description
label: Description
- type: tag_list
name: tags
label: Tags
- type: datetime
name: date
label: Date
- type: file
name: file_upload
label: File Upload
pages:
- _posts/test.md
| ---
hide_body: false
is_partial: false
fields:
- type: text
default: default
label: Layout
name: layout
- type: tag_list
name: tags
label: Tags
- type: datetime
name: date
label: Date
pages:
- _posts/test.md
| Update from Forestry.io - Updated Forestry configuration | Update from Forestry.io - Updated Forestry configuration | YAML | mit | boobo94/boobo94.github.io,boobo94/boobo94.github.io | yaml | ## Code Before:
---
hide_body: false
is_partial: false
fields:
- type: text
default: default
label: Template
name: template
- type: textarea
name: description
label: Description
- type: tag_list
name: tags
label: Tags
- type: datetime
name: date
label: Date
- type: file
name: file_upload
label: File Upload
pages:
- _posts/test.md
## Instruction:
Update from Forestry.io - Updated Forestry configuration
## Code After:
---
hide_body: false
is_partial: false
fields:
- type: text
default: default
label: Layout
name: layout
- type: tag_list
name: tags
label: Tags
- type: datetime
name: date
label: Date
pages:
- _posts/test.md
| ---
hide_body: false
is_partial: false
fields:
- type: text
default: default
+ label: Layout
+ name: layout
- label: Template
- name: template
- - type: textarea
- name: description
- label: Description
- type: tag_list
name: tags
label: Tags
- type: datetime
name: date
label: Date
- - type: file
- name: file_upload
- label: File Upload
pages:
- _posts/test.md | 10 | 0.454545 | 2 | 8 |
d1fecc21db3bea37ae544a9fd82fb8913e8a9919 | app/controllers/concerns/setup_request_params.rb | app/controllers/concerns/setup_request_params.rb | module SetupRequestParams
extend ActiveSupport::Concern
included do
before_action :request_params
before_action :set_hireable, if: :empty_params?
end
# Setup request param
def request_params
Github::Params.new(member_params).set
end
private
def empty_params?
member_params.empty?
end
def set_hireable
params.merge!(hireable: true)
end
# Whitelist the params for our controller
def member_params
params.permit(:q, :page)
end
end
| module SetupRequestParams
extend ActiveSupport::Concern
included do
before_action :request_params
end
# Setup request param
def request_params
Github::Params.new(member_params).set
end
private
# Whitelist the params for our controller
def member_params
params.permit(:q, :page)
end
end
| Revert "Setup default hireable option for homepage" | Revert "Setup default hireable option for homepage"
This reverts commit aece357df0a17c485608728f2fe790493418bb13.
| Ruby | artistic-2.0 | Hireables/hireables,gauravtiwari/hireables,gauravtiwari/hireables,gauravtiwari/techhire,Hireables/hireables,gauravtiwari/techhire,gauravtiwari/hireables,gauravtiwari/techhire,Hireables/hireables | ruby | ## Code Before:
module SetupRequestParams
extend ActiveSupport::Concern
included do
before_action :request_params
before_action :set_hireable, if: :empty_params?
end
# Setup request param
def request_params
Github::Params.new(member_params).set
end
private
def empty_params?
member_params.empty?
end
def set_hireable
params.merge!(hireable: true)
end
# Whitelist the params for our controller
def member_params
params.permit(:q, :page)
end
end
## Instruction:
Revert "Setup default hireable option for homepage"
This reverts commit aece357df0a17c485608728f2fe790493418bb13.
## Code After:
module SetupRequestParams
extend ActiveSupport::Concern
included do
before_action :request_params
end
# Setup request param
def request_params
Github::Params.new(member_params).set
end
private
# Whitelist the params for our controller
def member_params
params.permit(:q, :page)
end
end
| module SetupRequestParams
extend ActiveSupport::Concern
included do
before_action :request_params
- before_action :set_hireable, if: :empty_params?
end
# Setup request param
def request_params
Github::Params.new(member_params).set
end
private
- def empty_params?
- member_params.empty?
- end
-
- def set_hireable
- params.merge!(hireable: true)
- end
-
# Whitelist the params for our controller
def member_params
params.permit(:q, :page)
end
end | 9 | 0.321429 | 0 | 9 |
78dbafff8848f843c3c9fc00df87c73a954dd64b | app/views/profiles/_register.html.erb | app/views/profiles/_register.html.erb | <div class="col-sm-6 col-md-4 col-lg-3 my-3 profile-box register">
<div class="outer fit-height">
<div class="photo--grey border border-primary stretch outer">
<div class="stretch top">
<div class="profile-subtitle"><b>We need more women on stages</b></div>
</div>
<div class="middle">
<p>If you are a professional speaker in any topic, register here, quick and free</p>
</div>
<div class="stretch bottom">
<%= link_to "Register as a speaker", sign_up_path, class: "btn btn-primary" %>
</div>
</div>
<div class="bottom-padding"></div>
<div class="bottom-padding"></div>
</div>
</div>
| <div class="col-sm-6 col-md-4 col-lg-3 my-3 profile-box register">
<div class="outer fit-height">
<div class="border border-primary stretch outer">
<div class="stretch top">
<div class="profile-subtitle"><b>We need more women on stages</b></div>
</div>
<div class="middle">
<p>If you are a professional speaker in any topic, register here, quick and free</p>
</div>
<div class="stretch bottom">
<%= link_to "Register as a speaker", sign_up_path, class: "btn btn-primary" %>
</div>
</div>
<div class="bottom-padding"></div>
<div class="bottom-padding"></div>
</div>
</div>
| Make 'Register as a speaker' box green without hover | Make 'Register as a speaker' box green without hover
| HTML+ERB | mit | rubymonsters/speakerinnen_liste,rubymonsters/speakerinnen_liste,rubymonsters/speakerinnen_liste | html+erb | ## Code Before:
<div class="col-sm-6 col-md-4 col-lg-3 my-3 profile-box register">
<div class="outer fit-height">
<div class="photo--grey border border-primary stretch outer">
<div class="stretch top">
<div class="profile-subtitle"><b>We need more women on stages</b></div>
</div>
<div class="middle">
<p>If you are a professional speaker in any topic, register here, quick and free</p>
</div>
<div class="stretch bottom">
<%= link_to "Register as a speaker", sign_up_path, class: "btn btn-primary" %>
</div>
</div>
<div class="bottom-padding"></div>
<div class="bottom-padding"></div>
</div>
</div>
## Instruction:
Make 'Register as a speaker' box green without hover
## Code After:
<div class="col-sm-6 col-md-4 col-lg-3 my-3 profile-box register">
<div class="outer fit-height">
<div class="border border-primary stretch outer">
<div class="stretch top">
<div class="profile-subtitle"><b>We need more women on stages</b></div>
</div>
<div class="middle">
<p>If you are a professional speaker in any topic, register here, quick and free</p>
</div>
<div class="stretch bottom">
<%= link_to "Register as a speaker", sign_up_path, class: "btn btn-primary" %>
</div>
</div>
<div class="bottom-padding"></div>
<div class="bottom-padding"></div>
</div>
</div>
| <div class="col-sm-6 col-md-4 col-lg-3 my-3 profile-box register">
<div class="outer fit-height">
- <div class="photo--grey border border-primary stretch outer">
? ------------
+ <div class="border border-primary stretch outer">
<div class="stretch top">
<div class="profile-subtitle"><b>We need more women on stages</b></div>
</div>
<div class="middle">
<p>If you are a professional speaker in any topic, register here, quick and free</p>
</div>
<div class="stretch bottom">
<%= link_to "Register as a speaker", sign_up_path, class: "btn btn-primary" %>
</div>
</div>
<div class="bottom-padding"></div>
<div class="bottom-padding"></div>
</div>
</div> | 2 | 0.117647 | 1 | 1 |
5a7bc087fbd96981723c240a564c53443d9780c2 | app/models/spree/payment_decorator.rb | app/models/spree/payment_decorator.rb | module Spree
module PaymentDecorator
def handle_response(response, success_state, failure_state)
self.intent_client_key = response.params['client_secret'] if response.params['client_secret'] && response.success?
super
end
def verify!(**options)
process_verification(options)
end
private
def process_verification(**options)
protect_from_connection_error do
response = payment_method.verify(source, options)
record_response(response)
if response.success?
unless response.authorization.nil?
self.response_code = response.authorization
source.update(status: response.params['status'])
end
else
gateway_error(response)
end
end
end
end
end
Spree::Payment.prepend(Spree::PaymentDecorator)
| module Spree
module PaymentDecorator
def handle_response(response, success_state, failure_state)
if response.success? && response.respond_to?(:params)
self.intent_client_key = response.params['client_secret'] if response.params['client_secret']
end
super
end
def verify!(**options)
process_verification(options)
end
private
def process_verification(**options)
protect_from_connection_error do
response = payment_method.verify(source, options)
record_response(response)
if response.success?
unless response.authorization.nil?
self.response_code = response.authorization
source.update(status: response.params['status'])
end
else
gateway_error(response)
end
end
end
end
end
Spree::Payment.prepend(Spree::PaymentDecorator)
| Verify the response from the payment provider responds to params | Verify the response from the payment provider responds to params
| Ruby | bsd-3-clause | spree/spree_gateway,spree/spree_gateway | ruby | ## Code Before:
module Spree
module PaymentDecorator
def handle_response(response, success_state, failure_state)
self.intent_client_key = response.params['client_secret'] if response.params['client_secret'] && response.success?
super
end
def verify!(**options)
process_verification(options)
end
private
def process_verification(**options)
protect_from_connection_error do
response = payment_method.verify(source, options)
record_response(response)
if response.success?
unless response.authorization.nil?
self.response_code = response.authorization
source.update(status: response.params['status'])
end
else
gateway_error(response)
end
end
end
end
end
Spree::Payment.prepend(Spree::PaymentDecorator)
## Instruction:
Verify the response from the payment provider responds to params
## Code After:
module Spree
module PaymentDecorator
def handle_response(response, success_state, failure_state)
if response.success? && response.respond_to?(:params)
self.intent_client_key = response.params['client_secret'] if response.params['client_secret']
end
super
end
def verify!(**options)
process_verification(options)
end
private
def process_verification(**options)
protect_from_connection_error do
response = payment_method.verify(source, options)
record_response(response)
if response.success?
unless response.authorization.nil?
self.response_code = response.authorization
source.update(status: response.params['status'])
end
else
gateway_error(response)
end
end
end
end
end
Spree::Payment.prepend(Spree::PaymentDecorator)
| module Spree
module PaymentDecorator
def handle_response(response, success_state, failure_state)
+ if response.success? && response.respond_to?(:params)
- self.intent_client_key = response.params['client_secret'] if response.params['client_secret'] && response.success?
? ---------------------
+ self.intent_client_key = response.params['client_secret'] if response.params['client_secret']
? ++
+ end
super
end
def verify!(**options)
process_verification(options)
end
private
def process_verification(**options)
protect_from_connection_error do
response = payment_method.verify(source, options)
record_response(response)
if response.success?
unless response.authorization.nil?
self.response_code = response.authorization
source.update(status: response.params['status'])
end
else
gateway_error(response)
end
end
end
end
end
Spree::Payment.prepend(Spree::PaymentDecorator) | 4 | 0.117647 | 3 | 1 |
a4d2d4c4520dfffc1c5501db671805760933b126 | setup.py | setup.py | from setuptools import setup, find_packages
from annotator import __version__, __license__, __author__
setup(
name = 'annotator',
version = __version__,
packages = find_packages(),
install_requires = [
'Flask==0.8',
'Flask-WTF==0.5.2',
'Flask-SQLAlchemy==0.15',
'SQLAlchemy==0.7.4',
'pyes==0.16.0',
'nose==1.0.0',
'iso8601==0.1.4'
],
# metadata for upload to PyPI
author = __author__,
author_email = 'annotator@okfn.org',
description = 'Inline web annotation application and middleware using javascript and WSGI',
long_description = """Inline javascript-based web annotation library. \
Package includeds a database-backed annotation store \
with RESTFul (WSGI-powered) web-interface.""",
license = __license__,
keywords = 'annotation web javascript',
url = 'http://okfnlabs.org/annotator/',
download_url = 'https://github.com/okfn/annotator-store',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
)
| from setuptools import setup, find_packages
from annotator import __version__, __license__, __author__
setup(
name = 'annotator',
version = __version__,
packages = find_packages(),
install_requires = [
'Flask==0.8',
'Flask-WTF==0.5.2',
'Flask-SQLAlchemy==0.15',
'SQLAlchemy==0.7.4',
'pyes==0.16.0',
'nose==1.0.0',
'mock==0.7.4',
'iso8601==0.1.4'
],
# metadata for upload to PyPI
author = __author__,
author_email = 'annotator@okfn.org',
description = 'Inline web annotation application and middleware using javascript and WSGI',
long_description = """Inline javascript-based web annotation library. \
Package includeds a database-backed annotation store \
with RESTFul (WSGI-powered) web-interface.""",
license = __license__,
keywords = 'annotation web javascript',
url = 'http://okfnlabs.org/annotator/',
download_url = 'https://github.com/okfn/annotator-store',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
)
| Add forgotten dependency on mock | Add forgotten dependency on mock
| Python | mit | nobita-isc/annotator-store,nobita-isc/annotator-store,ningyifan/annotator-store,openannotation/annotator-store,nobita-isc/annotator-store,happybelly/annotator-store,nobita-isc/annotator-store | python | ## Code Before:
from setuptools import setup, find_packages
from annotator import __version__, __license__, __author__
setup(
name = 'annotator',
version = __version__,
packages = find_packages(),
install_requires = [
'Flask==0.8',
'Flask-WTF==0.5.2',
'Flask-SQLAlchemy==0.15',
'SQLAlchemy==0.7.4',
'pyes==0.16.0',
'nose==1.0.0',
'iso8601==0.1.4'
],
# metadata for upload to PyPI
author = __author__,
author_email = 'annotator@okfn.org',
description = 'Inline web annotation application and middleware using javascript and WSGI',
long_description = """Inline javascript-based web annotation library. \
Package includeds a database-backed annotation store \
with RESTFul (WSGI-powered) web-interface.""",
license = __license__,
keywords = 'annotation web javascript',
url = 'http://okfnlabs.org/annotator/',
download_url = 'https://github.com/okfn/annotator-store',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
)
## Instruction:
Add forgotten dependency on mock
## Code After:
from setuptools import setup, find_packages
from annotator import __version__, __license__, __author__
setup(
name = 'annotator',
version = __version__,
packages = find_packages(),
install_requires = [
'Flask==0.8',
'Flask-WTF==0.5.2',
'Flask-SQLAlchemy==0.15',
'SQLAlchemy==0.7.4',
'pyes==0.16.0',
'nose==1.0.0',
'mock==0.7.4',
'iso8601==0.1.4'
],
# metadata for upload to PyPI
author = __author__,
author_email = 'annotator@okfn.org',
description = 'Inline web annotation application and middleware using javascript and WSGI',
long_description = """Inline javascript-based web annotation library. \
Package includeds a database-backed annotation store \
with RESTFul (WSGI-powered) web-interface.""",
license = __license__,
keywords = 'annotation web javascript',
url = 'http://okfnlabs.org/annotator/',
download_url = 'https://github.com/okfn/annotator-store',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
)
| from setuptools import setup, find_packages
from annotator import __version__, __license__, __author__
setup(
name = 'annotator',
version = __version__,
packages = find_packages(),
install_requires = [
'Flask==0.8',
'Flask-WTF==0.5.2',
'Flask-SQLAlchemy==0.15',
'SQLAlchemy==0.7.4',
'pyes==0.16.0',
'nose==1.0.0',
+ 'mock==0.7.4',
'iso8601==0.1.4'
],
# metadata for upload to PyPI
author = __author__,
author_email = 'annotator@okfn.org',
description = 'Inline web annotation application and middleware using javascript and WSGI',
long_description = """Inline javascript-based web annotation library. \
Package includeds a database-backed annotation store \
with RESTFul (WSGI-powered) web-interface.""",
license = __license__,
keywords = 'annotation web javascript',
url = 'http://okfnlabs.org/annotator/',
download_url = 'https://github.com/okfn/annotator-store',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python'
],
) | 1 | 0.025 | 1 | 0 |
bbccc57b735bebe4082c6452d1eced3ad7c3fac7 | .travis.yml | .travis.yml | language: python
python:
- "2.6"
- "2.7"
- "pypy"
env:
- DJANGO=1.2.7 DB=sqlite
- DJANGO=1.2.7 DB=mysql
- DJANGO=1.2.7 DB=postgres
- DJANGO=1.3.1 DB=sqlite
- DJANGO=1.3.1 DB=mysql
- DJANGO=1.3.1 DB=postgres
before_script:
- mysql -e 'create database sentry;'
- psql -c 'create database sentry;' -U postgres
install:
- pip install mysql-python
- pip install psycopg2
- pip install -q Django==$DJANGO --use-mirrors
- pip install pep8 --use-mirrors
- pip install https://github.com/dcramer/pyflakes/tarball/master
- pip install -q -e . --use-mirrors
script:
- make test
notifications:
irc:
channels: "irc.freenode.org#sentry"
on_success: change
on_failure: change | language: python
python:
- "2.6"
- "2.7"
env:
- DJANGO=1.2.7 DB=sqlite
- DJANGO=1.2.7 DB=mysql
- DJANGO=1.2.7 DB=postgres
- DJANGO=1.3.1 DB=sqlite
- DJANGO=1.3.1 DB=mysql
- DJANGO=1.3.1 DB=postgres
before_script:
- mysql -e 'create database sentry;'
- psql -c 'create database sentry;' -U postgres
install:
- pip install mysql-python
- pip install psycopg2
- pip install -q Django==$DJANGO --use-mirrors
- pip install pep8 --use-mirrors
- pip install https://github.com/dcramer/pyflakes/tarball/master
- pip install -q -e . --use-mirrors
script:
- make test
notifications:
irc:
channels: "irc.freenode.org#sentry"
on_success: change
on_failure: change | Revert "Add pypy to Travis" | Revert "Add pypy to Travis"
This reverts commit b278765c12eee81ff2d74f76bef1be702616ffc2.
| YAML | bsd-3-clause | Kryz/sentry,hongliang5623/sentry,nicholasserra/sentry,chayapan/django-sentry,Kryz/sentry,beeftornado/sentry,mvaled/sentry,BayanGroup/sentry,imankulov/sentry,SilentCircle/sentry,ewdurbin/sentry,wong2/sentry,pauloschilling/sentry,JackDanger/sentry,BayanGroup/sentry,hongliang5623/sentry,jean/sentry,looker/sentry,ngonzalvez/sentry,zenefits/sentry,1tush/sentry,BayanGroup/sentry,drcapulet/sentry,nicholasserra/sentry,felixbuenemann/sentry,drcapulet/sentry,songyi199111/sentry,llonchj/sentry,Natim/sentry,jokey2k/sentry,ifduyue/sentry,NickPresta/sentry,BuildingLink/sentry,jokey2k/sentry,1tush/sentry,fotinakis/sentry,gencer/sentry,camilonova/sentry,ifduyue/sentry,imankulov/sentry,llonchj/sentry,kevinlondon/sentry,ewdurbin/sentry,daevaorn/sentry,gg7/sentry,rdio/sentry,vperron/sentry,ngonzalvez/sentry,rdio/sentry,BuildingLink/sentry,looker/sentry,mitsuhiko/sentry,kevinlondon/sentry,jean/sentry,SilentCircle/sentry,Natim/sentry,mvaled/sentry,JamesMura/sentry,rdio/sentry,felixbuenemann/sentry,fuziontech/sentry,beeftornado/sentry,JamesMura/sentry,gg7/sentry,JamesMura/sentry,TedaLIEz/sentry,fotinakis/sentry,camilonova/sentry,mvaled/sentry,korealerts1/sentry,mitsuhiko/sentry,felixbuenemann/sentry,ewdurbin/sentry,zenefits/sentry,chayapan/django-sentry,alexm92/sentry,looker/sentry,JamesMura/sentry,SilentCircle/sentry,JTCunning/sentry,kevinlondon/sentry,mvaled/sentry,wujuguang/sentry,zenefits/sentry,argonemyth/sentry,vperron/sentry,wujuguang/sentry,BuildingLink/sentry,korealerts1/sentry,daevaorn/sentry,rdio/sentry,boneyao/sentry,gencer/sentry,NickPresta/sentry,pauloschilling/sentry,chayapan/django-sentry,korealerts1/sentry,beni55/sentry,kevinastone/sentry,JTCunning/sentry,wujuguang/sentry,BuildingLink/sentry,jean/sentry,daevaorn/sentry,fotinakis/sentry,wong2/sentry,gencer/sentry,songyi199111/sentry,SilentCircle/sentry,NickPresta/sentry,alex/sentry,kevinastone/sentry,ifduyue/sentry,gencer/sentry,JTCunning/sentry,beni55/sentry,jokey2k/sentry,ifduyue/sentry,looker/sentry,pauloschilling/sentry,jean/sentry,wong2/sentry,hongliang5623/sentry,fuziontech/sentry,Kryz/sentry,zenefits/sentry,gencer/sentry,mvaled/sentry,NickPresta/sentry,imankulov/sentry,alex/sentry,beni55/sentry,BuildingLink/sentry,llonchj/sentry,beeftornado/sentry,gg7/sentry,jean/sentry,alexm92/sentry,alex/sentry,mvaled/sentry,fotinakis/sentry,zenefits/sentry,argonemyth/sentry,JackDanger/sentry,JackDanger/sentry,argonemyth/sentry,alexm92/sentry,vperron/sentry,songyi199111/sentry,JamesMura/sentry,ngonzalvez/sentry,nicholasserra/sentry,boneyao/sentry,ifduyue/sentry,camilonova/sentry,Natim/sentry,drcapulet/sentry,daevaorn/sentry,fuziontech/sentry,looker/sentry,1tush/sentry,kevinastone/sentry,TedaLIEz/sentry,boneyao/sentry,TedaLIEz/sentry | yaml | ## Code Before:
language: python
python:
- "2.6"
- "2.7"
- "pypy"
env:
- DJANGO=1.2.7 DB=sqlite
- DJANGO=1.2.7 DB=mysql
- DJANGO=1.2.7 DB=postgres
- DJANGO=1.3.1 DB=sqlite
- DJANGO=1.3.1 DB=mysql
- DJANGO=1.3.1 DB=postgres
before_script:
- mysql -e 'create database sentry;'
- psql -c 'create database sentry;' -U postgres
install:
- pip install mysql-python
- pip install psycopg2
- pip install -q Django==$DJANGO --use-mirrors
- pip install pep8 --use-mirrors
- pip install https://github.com/dcramer/pyflakes/tarball/master
- pip install -q -e . --use-mirrors
script:
- make test
notifications:
irc:
channels: "irc.freenode.org#sentry"
on_success: change
on_failure: change
## Instruction:
Revert "Add pypy to Travis"
This reverts commit b278765c12eee81ff2d74f76bef1be702616ffc2.
## Code After:
language: python
python:
- "2.6"
- "2.7"
env:
- DJANGO=1.2.7 DB=sqlite
- DJANGO=1.2.7 DB=mysql
- DJANGO=1.2.7 DB=postgres
- DJANGO=1.3.1 DB=sqlite
- DJANGO=1.3.1 DB=mysql
- DJANGO=1.3.1 DB=postgres
before_script:
- mysql -e 'create database sentry;'
- psql -c 'create database sentry;' -U postgres
install:
- pip install mysql-python
- pip install psycopg2
- pip install -q Django==$DJANGO --use-mirrors
- pip install pep8 --use-mirrors
- pip install https://github.com/dcramer/pyflakes/tarball/master
- pip install -q -e . --use-mirrors
script:
- make test
notifications:
irc:
channels: "irc.freenode.org#sentry"
on_success: change
on_failure: change | language: python
python:
- "2.6"
- "2.7"
- - "pypy"
env:
- DJANGO=1.2.7 DB=sqlite
- DJANGO=1.2.7 DB=mysql
- DJANGO=1.2.7 DB=postgres
- DJANGO=1.3.1 DB=sqlite
- DJANGO=1.3.1 DB=mysql
- DJANGO=1.3.1 DB=postgres
before_script:
- mysql -e 'create database sentry;'
- psql -c 'create database sentry;' -U postgres
install:
- pip install mysql-python
- pip install psycopg2
- pip install -q Django==$DJANGO --use-mirrors
- pip install pep8 --use-mirrors
- pip install https://github.com/dcramer/pyflakes/tarball/master
- pip install -q -e . --use-mirrors
script:
- make test
notifications:
irc:
channels: "irc.freenode.org#sentry"
on_success: change
on_failure: change | 1 | 0.034483 | 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.