commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 5
4.84k
| subject
stringlengths 15
778
| message
stringlengths 16
6.86k
| lang
stringlengths 1
30
| license
stringclasses 13
values | repos
stringlengths 5
116k
| config
stringlengths 1
30
| content
stringlengths 105
8.72k
|
---|---|---|---|---|---|---|---|---|---|---|---|
5f477e95180507b7b629a5d85d34855aad9bd38d | support/travis.sh | support/travis.sh |
set -e
set -x
CHROME_REVISION=142910
sh -e /etc/init.d/xvfb start && git submodule update --init
if [[ "$WATIR_WEBDRIVER_BROWSER" = "chrome" ]]; then
sudo apt-get install -y unzip libxss1
curl -L -O "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.zip"
unzip chrome-linux.zip
curl -L "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.test/chromedriver" > chrome-linux/chromedriver
chmod +x chrome-linux/chromedriver
fi
if [[ "$WATIR_WEBDRIVER_BROWSER" = "phantomjs" ]]; then
curl -L -O "http://phantomjs.googlecode.com/files/phantomjs-1.8.1-linux-i686.tar.bz2"
bzip2 -cd phantomjs-1.8.1-linux-i686.tar.bz2 | tar xvf -
chmod +x phantomjs-1.8.1-linux-i686/bin/phantomjs
sudo cp phantomjs-1.8.1-linux-i686/bin/phantomjs /usr/local/phantomjs/bin/phantomjs
phantomjs --version
fi
|
set -e
set -x
CHROME_REVISION=142910
sh -e /etc/init.d/xvfb start && git submodule update --init
if [[ "$WATIR_WEBDRIVER_BROWSER" = "chrome" ]]; then
sudo apt-get install -y unzip libxss1
curl -L -O "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.zip"
unzip chrome-linux.zip
curl -L "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.test/chromedriver" > chrome-linux/chromedriver
chmod +x chrome-linux/chromedriver
fi
if [[ "$WATIR_WEBDRIVER_BROWSER" = "phantomjs" ]]; then
curl -L -O "https://dl.dropbox.com/u/2731643/phantomjs/phantomjs-latest.tar.bz2"
mkdir phantomjs
tar -xvjf phantomjs-latest.tar.bz2 -C phantomjs
cat phantomjs/phantomjs.version
chmod +x phantomjs/phantomjs
sudo cp phantomjs/phantomjs /usr/local/phantomjs/bin/phantomjs
phantomjs --version
fi
| Add back "Use the latest PhantomJS precompiled binary." | Add back "Use the latest PhantomJS precompiled binary."
This reverts commit b0dae96667f485468b17f46d3784b1d557c0f480.
| Shell | mit | titusfortner/watir,titusfortner/watir,abotalov/watir-webdriver,sportngin/watir-webdriver,jkotests/watir-webdriver,abotalov/watir-webdriver,jkotests/watir,titusfortner/watir-webdriver,jkotests/watir-webdriver,abaird/watir-webdriver,jkotests/watir,watir/watir,abaird/watir-webdriver,jkotests/watir,titusfortner/watir,sportngin/watir-webdriver,watir/watir,sportngin/watir-webdriver,titusfortner/watir,watir/watir,abotalov/watir-webdriver,titusfortner/watir-webdriver,jkotests/watir,abotalov/watir-webdriver,munchery/watir-webdriver,munchery/watir-webdriver,munchery/watir-webdriver,watir/watir,abaird/watir-webdriver | shell | ## Code Before:
set -e
set -x
CHROME_REVISION=142910
sh -e /etc/init.d/xvfb start && git submodule update --init
if [[ "$WATIR_WEBDRIVER_BROWSER" = "chrome" ]]; then
sudo apt-get install -y unzip libxss1
curl -L -O "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.zip"
unzip chrome-linux.zip
curl -L "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.test/chromedriver" > chrome-linux/chromedriver
chmod +x chrome-linux/chromedriver
fi
if [[ "$WATIR_WEBDRIVER_BROWSER" = "phantomjs" ]]; then
curl -L -O "http://phantomjs.googlecode.com/files/phantomjs-1.8.1-linux-i686.tar.bz2"
bzip2 -cd phantomjs-1.8.1-linux-i686.tar.bz2 | tar xvf -
chmod +x phantomjs-1.8.1-linux-i686/bin/phantomjs
sudo cp phantomjs-1.8.1-linux-i686/bin/phantomjs /usr/local/phantomjs/bin/phantomjs
phantomjs --version
fi
## Instruction:
Add back "Use the latest PhantomJS precompiled binary."
This reverts commit b0dae96667f485468b17f46d3784b1d557c0f480.
## Code After:
set -e
set -x
CHROME_REVISION=142910
sh -e /etc/init.d/xvfb start && git submodule update --init
if [[ "$WATIR_WEBDRIVER_BROWSER" = "chrome" ]]; then
sudo apt-get install -y unzip libxss1
curl -L -O "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.zip"
unzip chrome-linux.zip
curl -L "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux/$CHROME_REVISION/chrome-linux.test/chromedriver" > chrome-linux/chromedriver
chmod +x chrome-linux/chromedriver
fi
if [[ "$WATIR_WEBDRIVER_BROWSER" = "phantomjs" ]]; then
curl -L -O "https://dl.dropbox.com/u/2731643/phantomjs/phantomjs-latest.tar.bz2"
mkdir phantomjs
tar -xvjf phantomjs-latest.tar.bz2 -C phantomjs
cat phantomjs/phantomjs.version
chmod +x phantomjs/phantomjs
sudo cp phantomjs/phantomjs /usr/local/phantomjs/bin/phantomjs
phantomjs --version
fi
|
4dfe8b84bd11b3d5758349c78cf543693768eaa4 | assets/javascripts/templates/profile.js.mustache.slim | assets/javascripts/templates/profile.js.mustache.slim | .row
.span2
.span8
| {{#profile}}
.page-header
.row
.span2
img.avatar-large.img-rounded src='{{avatar}}'
.span6.no-offset
h2.condensed
| {{^hasName}}
a href='{{{entity}}}' {{name}}
| {{/hasName}}
| {{#hasName}}
| {{name}}
| {{#guest_authenticated}}
form.pull-rght style='display:inline' data-view='ProfileFollowButton' method='POST'
input type='hidden' name='entity' value='{{entity}}'
input.btn.btn-success.pull-right type='submit' value='Follow'
| {{/guest_authenticated}}
br/
a href='{{{entity}}}'
small {{formatted.entity}}
| {{/hasName}}
| {{#bio}}
.span6.no-offset
p {{bio}}
| {{/bio}}
.row
.profile-stats
.span2
.span6.no-offset data-view='ProfileStats'
| {{/profile}}
.row
.span2
.span8
ul.unstyled.posts data-view='DomainPostsFeed'
| {{#posts}}
| {{> _post}}
| {{/posts}}
| .row
.span2
.span8
| {{#profile}}
.page-header
.row
.span2
img.avatar-large.img-rounded src='{{avatar}}'
.span6.no-offset
h2.condensed
| {{^hasName}}
a href='{{{entity}}}' {{name}}
| {{/hasName}}
| {{#hasName}}
| {{name}}
| {{/hasName}}
| {{#guest_authenticated}}
form.pull-rght style='display:inline' data-view='ProfileFollowButton' method='POST'
input type='hidden' name='entity' value='{{entity}}'
input.btn.btn-success.pull-right type='submit' value='Follow'
| {{/guest_authenticated}}
| {{#hasName}}
br/
a href='{{{entity}}}'
small {{formatted.entity}}
| {{/hasName}}
| {{#bio}}
.span6.no-offset
p {{bio}}
| {{/bio}}
.row
.profile-stats
.span2
.span6.no-offset data-view='ProfileStats'
| {{/profile}}
.row
.span2
.span8
ul.unstyled.posts data-view='DomainPostsFeed'
| {{#posts}}
| {{> _post}}
| {{/posts}}
| Fix follow button not showing up on profiles without name | Fix follow button not showing up on profiles without name
| Slim | bsd-3-clause | tent/tent-status,tent/tent-status | slim | ## Code Before:
.row
.span2
.span8
| {{#profile}}
.page-header
.row
.span2
img.avatar-large.img-rounded src='{{avatar}}'
.span6.no-offset
h2.condensed
| {{^hasName}}
a href='{{{entity}}}' {{name}}
| {{/hasName}}
| {{#hasName}}
| {{name}}
| {{#guest_authenticated}}
form.pull-rght style='display:inline' data-view='ProfileFollowButton' method='POST'
input type='hidden' name='entity' value='{{entity}}'
input.btn.btn-success.pull-right type='submit' value='Follow'
| {{/guest_authenticated}}
br/
a href='{{{entity}}}'
small {{formatted.entity}}
| {{/hasName}}
| {{#bio}}
.span6.no-offset
p {{bio}}
| {{/bio}}
.row
.profile-stats
.span2
.span6.no-offset data-view='ProfileStats'
| {{/profile}}
.row
.span2
.span8
ul.unstyled.posts data-view='DomainPostsFeed'
| {{#posts}}
| {{> _post}}
| {{/posts}}
## Instruction:
Fix follow button not showing up on profiles without name
## Code After:
.row
.span2
.span8
| {{#profile}}
.page-header
.row
.span2
img.avatar-large.img-rounded src='{{avatar}}'
.span6.no-offset
h2.condensed
| {{^hasName}}
a href='{{{entity}}}' {{name}}
| {{/hasName}}
| {{#hasName}}
| {{name}}
| {{/hasName}}
| {{#guest_authenticated}}
form.pull-rght style='display:inline' data-view='ProfileFollowButton' method='POST'
input type='hidden' name='entity' value='{{entity}}'
input.btn.btn-success.pull-right type='submit' value='Follow'
| {{/guest_authenticated}}
| {{#hasName}}
br/
a href='{{{entity}}}'
small {{formatted.entity}}
| {{/hasName}}
| {{#bio}}
.span6.no-offset
p {{bio}}
| {{/bio}}
.row
.profile-stats
.span2
.span6.no-offset data-view='ProfileStats'
| {{/profile}}
.row
.span2
.span8
ul.unstyled.posts data-view='DomainPostsFeed'
| {{#posts}}
| {{> _post}}
| {{/posts}}
|
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 :)
|
f80b98e1fd670a1b5f559add52bf9693627b5a97 | docs/readme.md | docs/readme.md |
- [How to install](./installation.md)
- [Basic usage](./basic-usage.md)
- [Slack notifications](./slack-notifications.md)
- [Desktop notifications](./desktop-notifications.md)
- [Filters](./filters.md)
- [Range restrictions](./range-restrictions.md)
- [Changing languages](./languages.md)
- [Support](./support.md)
|
- [How to install](./installation.md)
- [Basic usage](./basic-usage.md)
- [Slack notifications](./slack-notifications.md)
- [Desktop notifications](./desktop-notifications.md)
- [Filters](./filters.md)
- [Range restrictions](./range-restrictions.md)
- [Changing languages](./languages.md)
- [Support](./support.md)
- [Advanced usage](./advanced-usage.md)
| Add link to the advanced usage doc | Add link to the advanced usage doc
| Markdown | mit | jacobmarshall/pokevision-cli,jacobmarshall/pokevision-cli | markdown | ## Code Before:
- [How to install](./installation.md)
- [Basic usage](./basic-usage.md)
- [Slack notifications](./slack-notifications.md)
- [Desktop notifications](./desktop-notifications.md)
- [Filters](./filters.md)
- [Range restrictions](./range-restrictions.md)
- [Changing languages](./languages.md)
- [Support](./support.md)
## Instruction:
Add link to the advanced usage doc
## Code After:
- [How to install](./installation.md)
- [Basic usage](./basic-usage.md)
- [Slack notifications](./slack-notifications.md)
- [Desktop notifications](./desktop-notifications.md)
- [Filters](./filters.md)
- [Range restrictions](./range-restrictions.md)
- [Changing languages](./languages.md)
- [Support](./support.md)
- [Advanced usage](./advanced-usage.md)
|
61d0205d791b4d87347ceb6ff4d497fc50001e56 | README.md | README.md |
A Node library for working with environment variables.
---
- [**Installing**](#installing)
- [**Getting Started**](#getting-started)
---
## Installing
Install it using node package manager.
```
npm install --save thenv
```
## Getting Started
The simplest and the cleanest way.
```js
const thenv = require('thenv')('path/to/file')
```
|
A Node library for working with environment variables.
---
- [**Installing**](#installing)
- [**Getting Started**](#getting-started)
---
## Installing
Install it using node package manager.
```
npm install --save thenv
```
## Getting Started
The simplest and the cleanest way.
```js
const thenv = require('thenv')
```
You can also specify the file name.
```js
const thenv = require('thenv')('path/to/file')
```
| Add a second usage example in the readme file. | Add a second usage example in the readme file.
| Markdown | mit | rhberro/thenv | markdown | ## Code Before:
A Node library for working with environment variables.
---
- [**Installing**](#installing)
- [**Getting Started**](#getting-started)
---
## Installing
Install it using node package manager.
```
npm install --save thenv
```
## Getting Started
The simplest and the cleanest way.
```js
const thenv = require('thenv')('path/to/file')
```
## Instruction:
Add a second usage example in the readme file.
## Code After:
A Node library for working with environment variables.
---
- [**Installing**](#installing)
- [**Getting Started**](#getting-started)
---
## Installing
Install it using node package manager.
```
npm install --save thenv
```
## Getting Started
The simplest and the cleanest way.
```js
const thenv = require('thenv')
```
You can also specify the file name.
```js
const thenv = require('thenv')('path/to/file')
```
|
6b29703e158ea414bdd4fc6c5692730006a30cf8 | README.md | README.md | Ember-Memento
==============
A mixin for Ember.js which adds undo/redo functionality to `Ember.Object`'s.
Usage
-----
Add the mixin, located in `app/lib/memento.js` to your project.
Use it in your objects which shall offer the functionality:
```javascript
var myObj = Ember.Object.create(Ember.Memento, {
// properties which are "tracked"
mementoProperties: 'firstName age'.w(),
firstName: 'Buster',
age: 78
});
myObj.set('firstName', 'Michael');
myObj.set('age', 100);
myObj.undo(); // firstName = Buster, age = 100
myObj.undo(); // firstName = Buster, age 78
myObj.redo(); // firstName = Michael, age 78
myObj.redo(); // firstName = Michael, age 100
```
Test
----
You can test the mixin via:
$ bundle install
$ bundle exec rake test
This executes the tests by using [Phantom.JS](http://www.phantomjs.org/), which you need to have installed.
Or you can run the tests via:
$ bundle exec rackup
$ open http://localhost:9292/tests/index.html
Thanks
------
This project's layout is based on the fabulous [interline/ember-skelton](https://github.com/interline/ember-skeleton) | Ember-Memento [](http://travis-ci.org/pangratz/ember-memento)
==============
A mixin for Ember.js which adds undo/redo functionality to `Ember.Object`'s.
Usage
-----
Add the mixin, located in `app/lib/memento.js` to your project.
Use it in your objects which shall offer the functionality:
```javascript
var myObj = Ember.Object.create(Ember.Memento, {
// properties which are "tracked"
mementoProperties: 'firstName age'.w(),
firstName: 'Buster',
age: 78
});
myObj.set('firstName', 'Michael');
myObj.set('age', 100);
myObj.undo(); // firstName = Buster, age = 100
myObj.undo(); // firstName = Buster, age 78
myObj.redo(); // firstName = Michael, age 78
myObj.redo(); // firstName = Michael, age 100
```
Test
----
You can test the mixin via:
$ bundle install
$ bundle exec rake test
This executes the tests by using [Phantom.JS](http://www.phantomjs.org/), which you need to have installed.
Or you can run the tests via:
$ bundle exec rackup
$ open http://localhost:9292/tests/index.html
Thanks
------
This project's layout is based on the fabulous [interline/ember-skelton](https://github.com/interline/ember-skeleton) | Add Travis-CI build status image | Add Travis-CI build status image
| Markdown | isc | pangratz/ember-memento,greyhwndz/ember-memento,pangratz/ember-memento,greyhwndz/ember-memento,greyhwndz/ember-memento | markdown | ## Code Before:
Ember-Memento
==============
A mixin for Ember.js which adds undo/redo functionality to `Ember.Object`'s.
Usage
-----
Add the mixin, located in `app/lib/memento.js` to your project.
Use it in your objects which shall offer the functionality:
```javascript
var myObj = Ember.Object.create(Ember.Memento, {
// properties which are "tracked"
mementoProperties: 'firstName age'.w(),
firstName: 'Buster',
age: 78
});
myObj.set('firstName', 'Michael');
myObj.set('age', 100);
myObj.undo(); // firstName = Buster, age = 100
myObj.undo(); // firstName = Buster, age 78
myObj.redo(); // firstName = Michael, age 78
myObj.redo(); // firstName = Michael, age 100
```
Test
----
You can test the mixin via:
$ bundle install
$ bundle exec rake test
This executes the tests by using [Phantom.JS](http://www.phantomjs.org/), which you need to have installed.
Or you can run the tests via:
$ bundle exec rackup
$ open http://localhost:9292/tests/index.html
Thanks
------
This project's layout is based on the fabulous [interline/ember-skelton](https://github.com/interline/ember-skeleton)
## Instruction:
Add Travis-CI build status image
## Code After:
Ember-Memento [](http://travis-ci.org/pangratz/ember-memento)
==============
A mixin for Ember.js which adds undo/redo functionality to `Ember.Object`'s.
Usage
-----
Add the mixin, located in `app/lib/memento.js` to your project.
Use it in your objects which shall offer the functionality:
```javascript
var myObj = Ember.Object.create(Ember.Memento, {
// properties which are "tracked"
mementoProperties: 'firstName age'.w(),
firstName: 'Buster',
age: 78
});
myObj.set('firstName', 'Michael');
myObj.set('age', 100);
myObj.undo(); // firstName = Buster, age = 100
myObj.undo(); // firstName = Buster, age 78
myObj.redo(); // firstName = Michael, age 78
myObj.redo(); // firstName = Michael, age 100
```
Test
----
You can test the mixin via:
$ bundle install
$ bundle exec rake test
This executes the tests by using [Phantom.JS](http://www.phantomjs.org/), which you need to have installed.
Or you can run the tests via:
$ bundle exec rackup
$ open http://localhost:9292/tests/index.html
Thanks
------
This project's layout is based on the fabulous [interline/ember-skelton](https://github.com/interline/ember-skeleton) |
bd0485829c964df46810edda20b5b928866b899e | src/Introspection/MutationType.php | src/Introspection/MutationType.php | <?php
/**
* Date: 03.12.15
*
* @author Portey Vasil <[email protected]>
*/
namespace Youshido\GraphQL\Introspection;
use Youshido\GraphQL\Schema;
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
use Youshido\GraphQL\Type\Field\Field;
use Youshido\GraphQL\Type\Object\AbstractObjectType;
class MutationType extends QueryType
{
public function resolve($value = null, $args = [])
{
/** @var Schema|Field $value */
if ($value instanceof Schema) {
return $value->getMutationType();
}
return $value->getConfig()->getType();
}
} | <?php
/**
* Date: 03.12.15
*
* @author Portey Vasil <[email protected]>
*/
namespace Youshido\GraphQL\Introspection;
use Youshido\GraphQL\Schema;
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
use Youshido\GraphQL\Type\Field\Field;
use Youshido\GraphQL\Type\Object\AbstractObjectType;
use Youshido\GraphQL\Type\Object\ObjectType;
class MutationType extends QueryType
{
public function resolve($value = null, $args = [])
{
/** @var Schema|Field $value */
if ($value instanceof Schema) {
$mutationType = $value->getMutationType();
return $mutationType instanceof ObjectType ? null : $mutationType;
}
return $value->getConfig()->getType();
}
} | Fix bug when no mutation was declared for schema | Fix bug when no mutation was declared for schema
| PHP | mit | Youshido/GraphQL | php | ## Code Before:
<?php
/**
* Date: 03.12.15
*
* @author Portey Vasil <[email protected]>
*/
namespace Youshido\GraphQL\Introspection;
use Youshido\GraphQL\Schema;
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
use Youshido\GraphQL\Type\Field\Field;
use Youshido\GraphQL\Type\Object\AbstractObjectType;
class MutationType extends QueryType
{
public function resolve($value = null, $args = [])
{
/** @var Schema|Field $value */
if ($value instanceof Schema) {
return $value->getMutationType();
}
return $value->getConfig()->getType();
}
}
## Instruction:
Fix bug when no mutation was declared for schema
## Code After:
<?php
/**
* Date: 03.12.15
*
* @author Portey Vasil <[email protected]>
*/
namespace Youshido\GraphQL\Introspection;
use Youshido\GraphQL\Schema;
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
use Youshido\GraphQL\Type\Field\Field;
use Youshido\GraphQL\Type\Object\AbstractObjectType;
use Youshido\GraphQL\Type\Object\ObjectType;
class MutationType extends QueryType
{
public function resolve($value = null, $args = [])
{
/** @var Schema|Field $value */
if ($value instanceof Schema) {
$mutationType = $value->getMutationType();
return $mutationType instanceof ObjectType ? null : $mutationType;
}
return $value->getConfig()->getType();
}
} |
4b8b3303de3425bb99621ff9648a7b677bcfec2e | client/views/common/mobile_nav.html | client/views/common/mobile_nav.html | <template name="mobile_nav">
<div id="" class="mobile-nav">
<div>
<ul>
<li><a class="top" href="/top">Top</a></li>
<li><a class="new" href="/new">New</a></li>
<li><a class="digest" href="/digest">Digest</a></li>
{{#if currentUser.isAdmin}}
<li><a class="users" href="/users">Users</a></li>
<li><a class="settings" href="/settings">Settings</a></li>
<li><a class="admin" href="/admin">Admin</a></li>
{{/if}}
</ul>
</div>
</div>
</template> | <template name="mobile_nav">
<div id="" class="mobile-nav">
<div>
<ul>
<li><a class="top" href="/top">Top</a></li>
<li><a class="new" href="/new">New</a></li>
<li><a class="digest" href="/digest">Digest</a></li>
{{#if currentUser.isAdmin}}
<li><a class="users" href="/users">Users</a></li>
<li><a class="settings" href="/settings">Settings</a></li>
<li><a class="admin" href="/admin">Admin</a></li>
{{/if}}
{{#if canView}}
<li><a href="/submit">Post</a></li>
{{/if}}
</ul>
</div>
</div>
</template> | Add post button to mobile nav. | Add post button to mobile nav.
| HTML | mit | vlipco/startupcol-telescope,vlipco/startupcol-telescope | html | ## Code Before:
<template name="mobile_nav">
<div id="" class="mobile-nav">
<div>
<ul>
<li><a class="top" href="/top">Top</a></li>
<li><a class="new" href="/new">New</a></li>
<li><a class="digest" href="/digest">Digest</a></li>
{{#if currentUser.isAdmin}}
<li><a class="users" href="/users">Users</a></li>
<li><a class="settings" href="/settings">Settings</a></li>
<li><a class="admin" href="/admin">Admin</a></li>
{{/if}}
</ul>
</div>
</div>
</template>
## Instruction:
Add post button to mobile nav.
## Code After:
<template name="mobile_nav">
<div id="" class="mobile-nav">
<div>
<ul>
<li><a class="top" href="/top">Top</a></li>
<li><a class="new" href="/new">New</a></li>
<li><a class="digest" href="/digest">Digest</a></li>
{{#if currentUser.isAdmin}}
<li><a class="users" href="/users">Users</a></li>
<li><a class="settings" href="/settings">Settings</a></li>
<li><a class="admin" href="/admin">Admin</a></li>
{{/if}}
{{#if canView}}
<li><a href="/submit">Post</a></li>
{{/if}}
</ul>
</div>
</div>
</template> |
b496b6160d2e6922eeb5b913ad233698c3642ba3 | vim/ftplugin/javascript.vim | vim/ftplugin/javascript.vim | " let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
" let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')
| " let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
" let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')
fun! RunESlint(path)
" Clear terminal
execute '!clear'
" Run ESLint
execute '! ./node_modules/.bin/eslint ' . expand('%')
endfun
command! -nargs=* Lint call RunESlint('src')
| Add command to run local installation of ESLint | Add command to run local installation of ESLint
| VimL | mit | ruiafonsopereira/dotfiles,ruiafonsopereira/dotfiles | viml | ## Code Before:
" let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
" let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')
## Instruction:
Add command to run local installation of ESLint
## Code After:
" let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
" let b:syntastic_javascript_eslint_exec = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')
fun! RunESlint(path)
" Clear terminal
execute '!clear'
" Run ESLint
execute '! ./node_modules/.bin/eslint ' . expand('%')
endfun
command! -nargs=* Lint call RunESlint('src')
|
7b676b0fb507c4bf15dee761236839ea08f7abf9 | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.0.0
- 2.1.5
- 2.2.4
- 2.3.0
services:
- redis-server
script: bundle exec rspec spec
sudo: false
| language: ruby
rvm:
- 2.0.0
- 2.1.5
- 2.2.4
- 2.3.0
- 2.4
- 2.5
- 2.6
services:
- redis-server
script: bundle exec rspec spec
sudo: false
| Add 2.4/5/6 supported ruby versions | Add 2.4/5/6 supported ruby versions
| YAML | mit | tpitale/mail_room | yaml | ## Code Before:
language: ruby
rvm:
- 2.0.0
- 2.1.5
- 2.2.4
- 2.3.0
services:
- redis-server
script: bundle exec rspec spec
sudo: false
## Instruction:
Add 2.4/5/6 supported ruby versions
## Code After:
language: ruby
rvm:
- 2.0.0
- 2.1.5
- 2.2.4
- 2.3.0
- 2.4
- 2.5
- 2.6
services:
- redis-server
script: bundle exec rspec spec
sudo: false
|
e38bb0523ef073fd79fcf111b1e357427ce77d81 | packages/core/src/Rules/PatchSyncTeX.js | packages/core/src/Rules/PatchSyncTeX.js | /* @flow */
import Rule from '../Rule'
import type { Phase } from '../types'
function escapePath (filePath) {
return filePath.replace(/\\/g, '\\\\')
}
export default class PatchSyncTeX extends Rule {
static parameterTypes: Array<Set<string>> = [
new Set(['KnitrConcordance']),
new Set(['SyncTeX'])
]
static phases: Set<Phase> = new Set(['finalize'])
static description: string = 'Patches SyncTeX files if LaTeX document was generated by knitr so PDF reverse sync will work.'
constructCommand () {
const filePath = escapePath(this.filePath)
const synctexPath = escapePath(this.resolvePath('$OUTDIR/$JOB'))
const lines = [
'library(patchSynctex)',
`patchSynctex('${filePath}',syncfile='${synctexPath}')`]
return {
args: ['Rscript', '-e', lines.join(';')],
severity: 'warning'
}
}
}
| /* @flow */
import Rule from '../Rule'
import type { Phase } from '../types'
function escapePath (filePath) {
return filePath.replace(/\\/g, '\\\\')
}
export default class PatchSyncTeX extends Rule {
static parameterTypes: Array<Set<string>> = [
new Set(['Knitr']),
new Set(['SyncTeX']),
new Set(['KnitrConcordance'])
]
static phases: Set<Phase> = new Set(['finalize'])
static description: string = 'Patches SyncTeX files if LaTeX document was generated by knitr so PDF reverse sync will work.'
constructCommand () {
const filePath = escapePath(this.firstParameter.filePath)
const synctexPath = escapePath(this.secondParameter.filePath.replace(/\.synctex(\.gz)?$/i, ''))
const lines = [
'library(patchSynctex)',
`patchSynctex('${filePath}',syncfile='${synctexPath}')`]
return {
args: ['Rscript', '-e', lines.join(';')],
severity: 'warning'
}
}
}
| Use parameters for path resolution | Use parameters for path resolution
| JavaScript | mit | yitzchak/ouroboros,yitzchak/dicy,yitzchak/dicy,yitzchak/ouroboros,yitzchak/dicy | javascript | ## Code Before:
/* @flow */
import Rule from '../Rule'
import type { Phase } from '../types'
function escapePath (filePath) {
return filePath.replace(/\\/g, '\\\\')
}
export default class PatchSyncTeX extends Rule {
static parameterTypes: Array<Set<string>> = [
new Set(['KnitrConcordance']),
new Set(['SyncTeX'])
]
static phases: Set<Phase> = new Set(['finalize'])
static description: string = 'Patches SyncTeX files if LaTeX document was generated by knitr so PDF reverse sync will work.'
constructCommand () {
const filePath = escapePath(this.filePath)
const synctexPath = escapePath(this.resolvePath('$OUTDIR/$JOB'))
const lines = [
'library(patchSynctex)',
`patchSynctex('${filePath}',syncfile='${synctexPath}')`]
return {
args: ['Rscript', '-e', lines.join(';')],
severity: 'warning'
}
}
}
## Instruction:
Use parameters for path resolution
## Code After:
/* @flow */
import Rule from '../Rule'
import type { Phase } from '../types'
function escapePath (filePath) {
return filePath.replace(/\\/g, '\\\\')
}
export default class PatchSyncTeX extends Rule {
static parameterTypes: Array<Set<string>> = [
new Set(['Knitr']),
new Set(['SyncTeX']),
new Set(['KnitrConcordance'])
]
static phases: Set<Phase> = new Set(['finalize'])
static description: string = 'Patches SyncTeX files if LaTeX document was generated by knitr so PDF reverse sync will work.'
constructCommand () {
const filePath = escapePath(this.firstParameter.filePath)
const synctexPath = escapePath(this.secondParameter.filePath.replace(/\.synctex(\.gz)?$/i, ''))
const lines = [
'library(patchSynctex)',
`patchSynctex('${filePath}',syncfile='${synctexPath}')`]
return {
args: ['Rscript', '-e', lines.join(';')],
severity: 'warning'
}
}
}
|
861e37ad5969f764574722f4cfc0734511cbac7f | include/asm-arm/mach/flash.h | include/asm-arm/mach/flash.h | /*
* linux/include/asm-arm/mach/flash.h
*
* Copyright (C) 2003 Russell King, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H
struct mtd_partition;
/*
* map_name: the map probe function name
* name: flash device name (eg, as used with mtdparts=)
* width: width of mapped device
* init: method called at driver/device initialisation
* exit: method called at driver/device removal
* set_vpp: method called to enable or disable VPP
* parts: optional array of mtd_partitions for static partitioning
* nr_parts: number of mtd_partitions for static partitoning
*/
struct flash_platform_data {
const char *map_name;
const char *name;
unsigned int width;
int (*init)(void);
void (*exit)(void);
void (*set_vpp)(int on);
struct mtd_partition *parts;
unsigned int nr_parts;
};
#endif
| /*
* linux/include/asm-arm/mach/flash.h
*
* Copyright (C) 2003 Russell King, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H
struct mtd_partition;
struct mtd_info;
/*
* map_name: the map probe function name
* name: flash device name (eg, as used with mtdparts=)
* width: width of mapped device
* init: method called at driver/device initialisation
* exit: method called at driver/device removal
* set_vpp: method called to enable or disable VPP
* mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND
* parts: optional array of mtd_partitions for static partitioning
* nr_parts: number of mtd_partitions for static partitoning
*/
struct flash_platform_data {
const char *map_name;
const char *name;
unsigned int width;
int (*init)(void);
void (*exit)(void);
void (*set_vpp)(int on);
void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
struct mtd_partition *parts;
unsigned int nr_parts;
};
#endif
| Add memory control method to support OneNAND sync burst read | [ARM] 3057/1: Add memory control method to support OneNAND sync burst read
Patch from Kyungmin Park
This patch is required for OneNAND MTD to passing the OneNAND sync. burst read
Signed-off-by: Kyungmin Park
Signed-off-by: Russell King <[email protected]>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs | c | ## Code Before:
/*
* linux/include/asm-arm/mach/flash.h
*
* Copyright (C) 2003 Russell King, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H
struct mtd_partition;
/*
* map_name: the map probe function name
* name: flash device name (eg, as used with mtdparts=)
* width: width of mapped device
* init: method called at driver/device initialisation
* exit: method called at driver/device removal
* set_vpp: method called to enable or disable VPP
* parts: optional array of mtd_partitions for static partitioning
* nr_parts: number of mtd_partitions for static partitoning
*/
struct flash_platform_data {
const char *map_name;
const char *name;
unsigned int width;
int (*init)(void);
void (*exit)(void);
void (*set_vpp)(int on);
struct mtd_partition *parts;
unsigned int nr_parts;
};
#endif
## Instruction:
[ARM] 3057/1: Add memory control method to support OneNAND sync burst read
Patch from Kyungmin Park
This patch is required for OneNAND MTD to passing the OneNAND sync. burst read
Signed-off-by: Kyungmin Park
Signed-off-by: Russell King <[email protected]>
## Code After:
/*
* linux/include/asm-arm/mach/flash.h
*
* Copyright (C) 2003 Russell King, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H
struct mtd_partition;
struct mtd_info;
/*
* map_name: the map probe function name
* name: flash device name (eg, as used with mtdparts=)
* width: width of mapped device
* init: method called at driver/device initialisation
* exit: method called at driver/device removal
* set_vpp: method called to enable or disable VPP
* mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND
* parts: optional array of mtd_partitions for static partitioning
* nr_parts: number of mtd_partitions for static partitoning
*/
struct flash_platform_data {
const char *map_name;
const char *name;
unsigned int width;
int (*init)(void);
void (*exit)(void);
void (*set_vpp)(int on);
void (*mmcontrol)(struct mtd_info *mtd, int sync_read);
struct mtd_partition *parts;
unsigned int nr_parts;
};
#endif
|
6b9d90e12c436a6399d855b95e3161c673c782be | LinkedIdeas/CanvasView.swift | LinkedIdeas/CanvasView.swift | //
// CanvasView.swift
// LinkedIdeas
//
// Created by Felipe Espinoza Castillo on 02/11/15.
// Copyright © 2015 Felipe Espinoza Dev. All rights reserved.
//
import Cocoa
protocol CanvasViewDelegate {
// mouse events
func singleClick(event:NSEvent)
}
class CanvasView: NSView {
var delegate: CanvasViewDelegate?
var concepts = [Concept]() {
didSet {
needsDisplay = true
}
}
override func drawRect(dirtyRect: NSRect) {
super.drawRect(dirtyRect)
// Drawing code here.
NSColor.whiteColor().set()
NSBezierPath(rect: bounds).fill()
for concept in concepts {
if !concept.added {
Swift.print("add concept view")
let conceptView = ConceptView(frame: concept.rect)
conceptView.concept = concept
concept.added = true
addSubview(conceptView)
}
}
}
override func mouseDown(theEvent: NSEvent) {
delegate?.singleClick(theEvent)
}
}
| //
// CanvasView.swift
// LinkedIdeas
//
// Created by Felipe Espinoza Castillo on 02/11/15.
// Copyright © 2015 Felipe Espinoza Dev. All rights reserved.
//
import Cocoa
protocol CanvasViewDelegate {
// mouse events
func singleClick(event:NSEvent)
}
class CanvasView: NSView {
var delegate: CanvasViewDelegate?
var concepts = [Concept]() {
didSet {
needsDisplay = true
}
}
override func drawRect(dirtyRect: NSRect) {
super.drawRect(dirtyRect)
// Drawing code here.
NSColor.whiteColor().set()
NSBezierPath(rect: bounds).fill()
for concept in concepts {
if !concept.added {
Swift.print("add concept view")
let conceptView = ConceptView(frame: concept.rect)
conceptView.concept = concept
concept.added = true
addSubview(conceptView)
}
}
}
override func mouseDown(theEvent: NSEvent) {
delegate?.singleClick(theEvent)
}
extension NSView {
func sprint(message: String) {
Swift.print(message)
}
}
| Add NSView.sprintf function in extension | Add NSView.sprintf function in extension
| Swift | mit | fespinoza/linked-ideas-osx,fespinoza/linked-ideas-osx | swift | ## Code Before:
//
// CanvasView.swift
// LinkedIdeas
//
// Created by Felipe Espinoza Castillo on 02/11/15.
// Copyright © 2015 Felipe Espinoza Dev. All rights reserved.
//
import Cocoa
protocol CanvasViewDelegate {
// mouse events
func singleClick(event:NSEvent)
}
class CanvasView: NSView {
var delegate: CanvasViewDelegate?
var concepts = [Concept]() {
didSet {
needsDisplay = true
}
}
override func drawRect(dirtyRect: NSRect) {
super.drawRect(dirtyRect)
// Drawing code here.
NSColor.whiteColor().set()
NSBezierPath(rect: bounds).fill()
for concept in concepts {
if !concept.added {
Swift.print("add concept view")
let conceptView = ConceptView(frame: concept.rect)
conceptView.concept = concept
concept.added = true
addSubview(conceptView)
}
}
}
override func mouseDown(theEvent: NSEvent) {
delegate?.singleClick(theEvent)
}
}
## Instruction:
Add NSView.sprintf function in extension
## Code After:
//
// CanvasView.swift
// LinkedIdeas
//
// Created by Felipe Espinoza Castillo on 02/11/15.
// Copyright © 2015 Felipe Espinoza Dev. All rights reserved.
//
import Cocoa
protocol CanvasViewDelegate {
// mouse events
func singleClick(event:NSEvent)
}
class CanvasView: NSView {
var delegate: CanvasViewDelegate?
var concepts = [Concept]() {
didSet {
needsDisplay = true
}
}
override func drawRect(dirtyRect: NSRect) {
super.drawRect(dirtyRect)
// Drawing code here.
NSColor.whiteColor().set()
NSBezierPath(rect: bounds).fill()
for concept in concepts {
if !concept.added {
Swift.print("add concept view")
let conceptView = ConceptView(frame: concept.rect)
conceptView.concept = concept
concept.added = true
addSubview(conceptView)
}
}
}
override func mouseDown(theEvent: NSEvent) {
delegate?.singleClick(theEvent)
}
extension NSView {
func sprint(message: String) {
Swift.print(message)
}
}
|
20de9e04059337e59faf3aaa801c4f90527973e6 | test/powershell/Select-XML.Tests.ps1 | test/powershell/Select-XML.Tests.ps1 |
Describe "Select-XML DRT Unit Tests" -Tags DRT{
$tmpDirectory = $TestDrive
$testfilename = "testfile.xml"
$testfile = Join-Path -Path $tmpDirectory -ChildPath $testfilename
It "Select-XML should work"{
$xmlContent = @"
<?xml version ="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="CHILDREN">
<title lang="english">Harry Potter</title>
<price>30.00</price>
</book>
<book category="WEB">
<title lang="english">Learning XML</title>
<price>25.00</price>
</book>
</bookstore>
"@
$xmlContent >$testfile
try
{
$results=Select-XML -Path $testfile -XPath "/bookstore/book/title"
$results.Count | Should Be 2
$results[0].Node."#text" | Should Be "Harry Potter"
$results[1].Node."#text" | Should Be "Learning XML"
}
finally
{
rm $testfile
}
}
}
|
Describe "Select-XML DRT Unit Tests" -Tags DRT{
BeforeAll {
$testfile = Join-Path -Path $TestDrive -ChildPath "testfile.xml"
$xmlContent = @"
<?xml version ="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="CHILDREN">
<title lang="english">Harry Potter</title>
<price>30.00</price>
</book>
<book category="WEB">
<title lang="english">Learning XML</title>
<price>25.00</price>
</book>
</bookstore>
"@
$xmlContent >$testfile
}
AfterAll {
rm $testfile
}
It "Select-XML should work"{
$results = Select-XML -Path $testfile -XPath "/bookstore/book/title"
$results.Count | Should Be 2
$results[0].Node."#text" | Should Be "Harry Potter"
$results[1].Node."#text" | Should Be "Learning XML"
}
}
| Update fix based on comments for Select-XML Pester Test | Update fix based on comments for Select-XML Pester Test
| PowerShell | mit | bmanikm/PowerShell,JamesWTruher/PowerShell-1,kmosher/PowerShell,kmosher/PowerShell,bingbing8/PowerShell,bingbing8/PowerShell,bingbing8/PowerShell,JamesWTruher/PowerShell-1,bingbing8/PowerShell,bmanikm/PowerShell,kmosher/PowerShell,kmosher/PowerShell,KarolKaczmarek/PowerShell,daxian-dbw/PowerShell,jsoref/PowerShell,bmanikm/PowerShell,TravisEz13/PowerShell,jsoref/PowerShell,KarolKaczmarek/PowerShell,KarolKaczmarek/PowerShell,PaulHigin/PowerShell,TravisEz13/PowerShell,kmosher/PowerShell,daxian-dbw/PowerShell,KarolKaczmarek/PowerShell,JamesWTruher/PowerShell-1,jsoref/PowerShell,bmanikm/PowerShell,JamesWTruher/PowerShell-1,jsoref/PowerShell,PaulHigin/PowerShell,PaulHigin/PowerShell,daxian-dbw/PowerShell,daxian-dbw/PowerShell,TravisEz13/PowerShell,PaulHigin/PowerShell,bingbing8/PowerShell,TravisEz13/PowerShell,bmanikm/PowerShell,jsoref/PowerShell,KarolKaczmarek/PowerShell | powershell | ## Code Before:
Describe "Select-XML DRT Unit Tests" -Tags DRT{
$tmpDirectory = $TestDrive
$testfilename = "testfile.xml"
$testfile = Join-Path -Path $tmpDirectory -ChildPath $testfilename
It "Select-XML should work"{
$xmlContent = @"
<?xml version ="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="CHILDREN">
<title lang="english">Harry Potter</title>
<price>30.00</price>
</book>
<book category="WEB">
<title lang="english">Learning XML</title>
<price>25.00</price>
</book>
</bookstore>
"@
$xmlContent >$testfile
try
{
$results=Select-XML -Path $testfile -XPath "/bookstore/book/title"
$results.Count | Should Be 2
$results[0].Node."#text" | Should Be "Harry Potter"
$results[1].Node."#text" | Should Be "Learning XML"
}
finally
{
rm $testfile
}
}
}
## Instruction:
Update fix based on comments for Select-XML Pester Test
## Code After:
Describe "Select-XML DRT Unit Tests" -Tags DRT{
BeforeAll {
$testfile = Join-Path -Path $TestDrive -ChildPath "testfile.xml"
$xmlContent = @"
<?xml version ="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="CHILDREN">
<title lang="english">Harry Potter</title>
<price>30.00</price>
</book>
<book category="WEB">
<title lang="english">Learning XML</title>
<price>25.00</price>
</book>
</bookstore>
"@
$xmlContent >$testfile
}
AfterAll {
rm $testfile
}
It "Select-XML should work"{
$results = Select-XML -Path $testfile -XPath "/bookstore/book/title"
$results.Count | Should Be 2
$results[0].Node."#text" | Should Be "Harry Potter"
$results[1].Node."#text" | Should Be "Learning XML"
}
}
|
2536f5d41586ffa7465607acee1ed5768b76f3c3 | spec/cukeforker/vnc_server_pool_spec.rb | spec/cukeforker/vnc_server_pool_spec.rb | require File.expand_path("../../spec_helper", __FILE__)
module CukeForker
describe VncServerPool do
let(:pool) { VncServerPool.new(3, SpecHelper::FakeVnc) }
it "creates 3 instances of the given display class" do
SpecHelper::FakeVnc.should_receive(:new).exactly(3).times
pool = VncServerPool.new(3, SpecHelper::FakeVnc)
pool.size.should == 3
end
it "can fetch a server from the pool" do
pool.get.should be_kind_of(SpecHelper::FakeVnc)
pool.size.should == 2
end
it "can release a server" do
obj = pool.get
pool.size.should == 2
pool.release obj
end
it "raises a TooManyDisplaysError if the pool is over capacity" do
lambda { pool.release "foo" }.should raise_error(VncServerPool::TooManyDisplaysError)
end
it "raises a OutOfDisplaysError if the pool is empty" do
3.times { pool.get }
lambda { pool.get }.should raise_error(VncServerPool::OutOfDisplaysError)
end
end # DisplayPool
end # CukeForker
| require File.expand_path("../../spec_helper", __FILE__)
module CukeForker
describe VncServerPool do
let(:pool) { VncServerPool.new(3, SpecHelper::FakeVnc) }
it "creates 3 instances of the given display class" do
SpecHelper::FakeVnc.should_receive(:new).exactly(3).times
pool = VncServerPool.new(3, SpecHelper::FakeVnc)
pool.size.should == 3
end
it "launches the displays" do
servers = [mock("VncServer"), mock("VncServer"), mock("VncServer")]
SpecHelper::FakeVnc.should_receive(:new).exactly(3).times.and_return(*servers)
servers.each { |s| s.should_receive(:start) }
pool.launch
end
it "can fetch a server from the pool" do
pool.get.should be_kind_of(SpecHelper::FakeVnc)
pool.size.should == 2
end
it "can release a server" do
obj = pool.get
pool.size.should == 2
pool.release obj
end
it "raises a TooManyDisplaysError if the pool is over capacity" do
lambda { pool.release "foo" }.should raise_error(VncServerPool::TooManyDisplaysError)
end
it "raises a OutOfDisplaysError if the pool is empty" do
3.times { pool.get }
lambda { pool.get }.should raise_error(VncServerPool::OutOfDisplaysError)
end
end # DisplayPool
end # CukeForker
| Add spec for launching the VncServerPool | Add spec for launching the VncServerPool
| Ruby | mit | jesg/jcukeforker,jarib/cukeforker,Wallaceh/cukeforker | ruby | ## Code Before:
require File.expand_path("../../spec_helper", __FILE__)
module CukeForker
describe VncServerPool do
let(:pool) { VncServerPool.new(3, SpecHelper::FakeVnc) }
it "creates 3 instances of the given display class" do
SpecHelper::FakeVnc.should_receive(:new).exactly(3).times
pool = VncServerPool.new(3, SpecHelper::FakeVnc)
pool.size.should == 3
end
it "can fetch a server from the pool" do
pool.get.should be_kind_of(SpecHelper::FakeVnc)
pool.size.should == 2
end
it "can release a server" do
obj = pool.get
pool.size.should == 2
pool.release obj
end
it "raises a TooManyDisplaysError if the pool is over capacity" do
lambda { pool.release "foo" }.should raise_error(VncServerPool::TooManyDisplaysError)
end
it "raises a OutOfDisplaysError if the pool is empty" do
3.times { pool.get }
lambda { pool.get }.should raise_error(VncServerPool::OutOfDisplaysError)
end
end # DisplayPool
end # CukeForker
## Instruction:
Add spec for launching the VncServerPool
## Code After:
require File.expand_path("../../spec_helper", __FILE__)
module CukeForker
describe VncServerPool do
let(:pool) { VncServerPool.new(3, SpecHelper::FakeVnc) }
it "creates 3 instances of the given display class" do
SpecHelper::FakeVnc.should_receive(:new).exactly(3).times
pool = VncServerPool.new(3, SpecHelper::FakeVnc)
pool.size.should == 3
end
it "launches the displays" do
servers = [mock("VncServer"), mock("VncServer"), mock("VncServer")]
SpecHelper::FakeVnc.should_receive(:new).exactly(3).times.and_return(*servers)
servers.each { |s| s.should_receive(:start) }
pool.launch
end
it "can fetch a server from the pool" do
pool.get.should be_kind_of(SpecHelper::FakeVnc)
pool.size.should == 2
end
it "can release a server" do
obj = pool.get
pool.size.should == 2
pool.release obj
end
it "raises a TooManyDisplaysError if the pool is over capacity" do
lambda { pool.release "foo" }.should raise_error(VncServerPool::TooManyDisplaysError)
end
it "raises a OutOfDisplaysError if the pool is empty" do
3.times { pool.get }
lambda { pool.get }.should raise_error(VncServerPool::OutOfDisplaysError)
end
end # DisplayPool
end # CukeForker
|
403892ceed361b3951f056e4791e194b2d3e7665 | keymaps/keybinding-resolver.cson | keymaps/keybinding-resolver.cson | '.workspace .platform-darwin':
'cmd-.': 'key-binding-resolver:toggle'
'.workspace .platform-win32':
'ctrl-.': 'key-binding-resolver:toggle'
| '.workspace .platform-darwin':
'cmd-.': 'key-binding-resolver:toggle'
'.workspace .platform-win32':
'ctrl-.': 'key-binding-resolver:toggle'
'.workspace .platform-linux':
'ctrl-.': 'key-binding-resolver:toggle'
| Add ctrl-. keybinding on Linux | :penguin: Add ctrl-. keybinding on Linux
| CoffeeScript | mit | atom/keybinding-resolver | coffeescript | ## Code Before:
'.workspace .platform-darwin':
'cmd-.': 'key-binding-resolver:toggle'
'.workspace .platform-win32':
'ctrl-.': 'key-binding-resolver:toggle'
## Instruction:
:penguin: Add ctrl-. keybinding on Linux
## Code After:
'.workspace .platform-darwin':
'cmd-.': 'key-binding-resolver:toggle'
'.workspace .platform-win32':
'ctrl-.': 'key-binding-resolver:toggle'
'.workspace .platform-linux':
'ctrl-.': 'key-binding-resolver:toggle'
|
a07e5d643949833a32c17cdc8cf355d078403135 | .travis.yml | .travis.yml | language: php
php:
- 5.5
before_script:
- composer self-update
- composer --dev install
script:
- php ./vendor/bin/phpunit -c ./tests/.
| language: php
php:
- 5.5
before_script:
- echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
- composer self-update
- composer --dev install
script:
- php ./vendor/bin/phpunit -c ./tests/.
| Add mongo extension during before_script | Add mongo extension during before_script
| YAML | bsd-3-clause | gingerwfms/ginger-core | yaml | ## Code Before:
language: php
php:
- 5.5
before_script:
- composer self-update
- composer --dev install
script:
- php ./vendor/bin/phpunit -c ./tests/.
## Instruction:
Add mongo extension during before_script
## Code After:
language: php
php:
- 5.5
before_script:
- echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
- composer self-update
- composer --dev install
script:
- php ./vendor/bin/phpunit -c ./tests/.
|
61d8c049a9e91ff90f8665ed12ca40ae5bc94c4f | src/styles/Icons/_Sprite.js | src/styles/Icons/_Sprite.js | import React from "react";
import PropTypes from "prop-types";
import SVG from "./assets/_sprite.svg";
import s4e from "svg4everybody";
export default class Sprite extends React.Component {
static loaded = false;
static propTypes = {
id: PropTypes.string,
viewBox: PropTypes.string
};
state = {
ready: Sprite.loaded
};
req = typeof XMLHttpRequest !== "undefined" && new XMLHttpRequest();
componentWillMount() {
if (Sprite.loaded || !this.req) {
return;
}
Sprite.loaded = true;
this.req.open("GET", SVG, true);
this.req.send();
this.req.onload = () => {
const div = document.createElement("div");
div.innerHTML = this.req.responseText;
div.style.display = "none";
document.body.insertBefore(div, document.body.childNodes[0]);
this.setState({ ready: true }, s4e);
};
}
render() {
const { viewBox, id } = this.props;
const { ready } = this.state;
if (!ready) {
return <svg/>;
}
return (
<svg role="img" viewBox={viewBox} className="svg-sprite">
<use xlinkHref={"#" + id} />
</svg>
);
}
}
| import React from "react";
import PropTypes from "prop-types";
import SVG from "./assets/_sprite.svg";
import s4e from "svg4everybody";
export default class Sprite extends React.Component {
static loaded = false;
static propTypes = {
id: PropTypes.string,
viewBox: PropTypes.string
};
state = {
ready: Sprite.loaded
};
req = typeof XMLHttpRequest !== "undefined" && new XMLHttpRequest();
componentWillMount() {
if (Sprite.loaded || !this.req) {
return;
}
Sprite.loaded = true;
this.req.open("GET", SVG, true);
this.req.send();
this.req.onload = () => {
const div = document.createElement("div");
div.innerHTML = this.req.responseText;
div.style.display = "none";
document.body.insertBefore(div, document.body.childNodes[0]);
this.setState({ ready: true }, s4e);
};
}
render() {
const { viewBox, id } = this.props;
const { ready } = this.state;
if (!ready) {
return <svg viewBox={viewBox} className={"svg-sprite"}/>;
}
return (
<svg role="img" viewBox={viewBox} className="svg-sprite">
<use xlinkHref={"#" + id} />
</svg>
);
}
}
| Add viewbox to empty svg | Add viewbox to empty svg
| JavaScript | mit | tutti-ch/react-styleguide,tutti-ch/react-styleguide | javascript | ## Code Before:
import React from "react";
import PropTypes from "prop-types";
import SVG from "./assets/_sprite.svg";
import s4e from "svg4everybody";
export default class Sprite extends React.Component {
static loaded = false;
static propTypes = {
id: PropTypes.string,
viewBox: PropTypes.string
};
state = {
ready: Sprite.loaded
};
req = typeof XMLHttpRequest !== "undefined" && new XMLHttpRequest();
componentWillMount() {
if (Sprite.loaded || !this.req) {
return;
}
Sprite.loaded = true;
this.req.open("GET", SVG, true);
this.req.send();
this.req.onload = () => {
const div = document.createElement("div");
div.innerHTML = this.req.responseText;
div.style.display = "none";
document.body.insertBefore(div, document.body.childNodes[0]);
this.setState({ ready: true }, s4e);
};
}
render() {
const { viewBox, id } = this.props;
const { ready } = this.state;
if (!ready) {
return <svg/>;
}
return (
<svg role="img" viewBox={viewBox} className="svg-sprite">
<use xlinkHref={"#" + id} />
</svg>
);
}
}
## Instruction:
Add viewbox to empty svg
## Code After:
import React from "react";
import PropTypes from "prop-types";
import SVG from "./assets/_sprite.svg";
import s4e from "svg4everybody";
export default class Sprite extends React.Component {
static loaded = false;
static propTypes = {
id: PropTypes.string,
viewBox: PropTypes.string
};
state = {
ready: Sprite.loaded
};
req = typeof XMLHttpRequest !== "undefined" && new XMLHttpRequest();
componentWillMount() {
if (Sprite.loaded || !this.req) {
return;
}
Sprite.loaded = true;
this.req.open("GET", SVG, true);
this.req.send();
this.req.onload = () => {
const div = document.createElement("div");
div.innerHTML = this.req.responseText;
div.style.display = "none";
document.body.insertBefore(div, document.body.childNodes[0]);
this.setState({ ready: true }, s4e);
};
}
render() {
const { viewBox, id } = this.props;
const { ready } = this.state;
if (!ready) {
return <svg viewBox={viewBox} className={"svg-sprite"}/>;
}
return (
<svg role="img" viewBox={viewBox} className="svg-sprite">
<use xlinkHref={"#" + id} />
</svg>
);
}
}
|
6ca06d79156264123dc0dc962924326df32e7152 | mungegithub/submit-queue/deployment/community/configmap.yaml | mungegithub/submit-queue/deployment/community/configmap.yaml | http-cache-dir: /cache/httpcache
organization: kubernetes
project: community
# Make sure approval-handler and blunderbuss run before submit-queue.
# Otherwise it's going to take an extra-cycle to detect the label change.
# Run blunderbuss before approval-handler, so that we can suggest approvers
# based on assigned reviewer.
pr-mungers: blunderbuss, submit-queue, needs-rebase, sig-mention-handler, lgtm-after-commit, comment-deleter
state: open
token-file: /etc/secret-volume/token
period: 5m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
# status contexts options.
protected-branches-extra-contexts: "cla/linuxfoundation"
required-retest-contexts: ""
# submit-queue options.
protected-branches: "master"
nonblocking-jenkins-jobs: ""
do-not-merge-milestones: ""
admin-port: 9999
context-url: https://community.submit-queue.k8s.io
gate-cla: true
gate-approved: false
# munger specific options.
# label-file: "/gitrepos/community/labels.yaml"
use-reviewers: true
generated-files-config: .generated_files
| http-cache-dir: /cache/httpcache
organization: kubernetes
project: community
# Make sure approval-handler and blunderbuss run before submit-queue.
# Otherwise it's going to take an extra-cycle to detect the label change.
# Run blunderbuss before approval-handler, so that we can suggest approvers
# based on assigned reviewer.
pr-mungers: blunderbuss, submit-queue, needs-rebase, sig-mention-handler, lgtm-after-commit, comment-deleter, close-stale
state: open
token-file: /etc/secret-volume/token
period: 5m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
# status contexts options.
protected-branches-extra-contexts: "cla/linuxfoundation"
required-retest-contexts: ""
# submit-queue options.
protected-branches: "master"
nonblocking-jenkins-jobs: ""
do-not-merge-milestones: ""
admin-port: 9999
context-url: https://community.submit-queue.k8s.io
gate-cla: true
gate-approved: false
# munger specific options.
# label-file: "/gitrepos/community/labels.yaml"
use-reviewers: true
generated-files-config: .generated_files
| Enable `close-stable` munger on community repo | Enable `close-stable` munger on community repo | YAML | apache-2.0 | michelle192837/test-infra,krzyzacy/test-infra,kargakis/test-infra,monopole/test-infra,brahmaroutu/test-infra,ixdy/kubernetes-test-infra,shyamjvs/test-infra,kubernetes/test-infra,spxtr/test-infra,pwittrock/test-infra,mindprince/test-infra,brahmaroutu/test-infra,jessfraz/test-infra,dims/test-infra,spxtr/test-infra,brahmaroutu/test-infra,abgworrall/test-infra,krzyzacy/test-infra,lavalamp/test-infra,ixdy/kubernetes-test-infra,cblecker/test-infra,brahmaroutu/test-infra,kargakis/test-infra,pwittrock/test-infra,BenTheElder/test-infra,lavalamp/test-infra,krousey/test-infra,dims/test-infra,BenTheElder/test-infra,kubernetes/test-infra,foxish/test-infra,fejta/test-infra,jessfraz/test-infra,jlowdermilk/test-infra,mindprince/test-infra,kubernetes/test-infra,mindprince/test-infra,michelle192837/test-infra,ixdy/kubernetes-test-infra,lavalamp/test-infra,cblecker/test-infra,michelle192837/test-infra,jlowdermilk/test-infra,jessfraz/test-infra,shyamjvs/test-infra,jlowdermilk/test-infra,lavalamp/test-infra,ixdy/kubernetes-test-infra,spxtr/test-infra,kargakis/test-infra,fejta/test-infra,lavalamp/test-infra,fejta/test-infra,abgworrall/test-infra,fejta/test-infra,cblecker/test-infra,dims/test-infra,shyamjvs/test-infra,krzyzacy/test-infra,krousey/test-infra,dims/test-infra,spxtr/test-infra,lavalamp/test-infra,krzyzacy/test-infra,cblecker/test-infra,cjwagner/test-infra,foxish/test-infra,fejta/test-infra,BenTheElder/test-infra,cjwagner/test-infra,pwittrock/test-infra,cjwagner/test-infra,kargakis/test-infra,michelle192837/test-infra,shyamjvs/test-infra,brahmaroutu/test-infra,krzyzacy/test-infra,cblecker/test-infra,jessfraz/test-infra,krousey/test-infra,pwittrock/test-infra,foxish/test-infra,kubernetes/test-infra,monopole/test-infra,monopole/test-infra,jessfraz/test-infra,monopole/test-infra,brahmaroutu/test-infra,jlowdermilk/test-infra,mindprince/test-infra,jlowdermilk/test-infra,fejta/test-infra,dims/test-infra,kargakis/test-infra,cjwagner/test-infra,BenTheElder/test-infra,monopole/test-infra,foxish/test-infra,pwittrock/test-infra,michelle192837/test-infra,cjwagner/test-infra,shyamjvs/test-infra,mindprince/test-infra,kubernetes/test-infra,krousey/test-infra,BenTheElder/test-infra,krzyzacy/test-infra,abgworrall/test-infra,dims/test-infra,cjwagner/test-infra,abgworrall/test-infra,spxtr/test-infra,michelle192837/test-infra,ixdy/kubernetes-test-infra,kargakis/test-infra,krousey/test-infra,shyamjvs/test-infra,monopole/test-infra,kubernetes/test-infra,foxish/test-infra,cblecker/test-infra,abgworrall/test-infra,jlowdermilk/test-infra,BenTheElder/test-infra,jessfraz/test-infra | yaml | ## Code Before:
http-cache-dir: /cache/httpcache
organization: kubernetes
project: community
# Make sure approval-handler and blunderbuss run before submit-queue.
# Otherwise it's going to take an extra-cycle to detect the label change.
# Run blunderbuss before approval-handler, so that we can suggest approvers
# based on assigned reviewer.
pr-mungers: blunderbuss, submit-queue, needs-rebase, sig-mention-handler, lgtm-after-commit, comment-deleter
state: open
token-file: /etc/secret-volume/token
period: 5m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
# status contexts options.
protected-branches-extra-contexts: "cla/linuxfoundation"
required-retest-contexts: ""
# submit-queue options.
protected-branches: "master"
nonblocking-jenkins-jobs: ""
do-not-merge-milestones: ""
admin-port: 9999
context-url: https://community.submit-queue.k8s.io
gate-cla: true
gate-approved: false
# munger specific options.
# label-file: "/gitrepos/community/labels.yaml"
use-reviewers: true
generated-files-config: .generated_files
## Instruction:
Enable `close-stable` munger on community repo
## Code After:
http-cache-dir: /cache/httpcache
organization: kubernetes
project: community
# Make sure approval-handler and blunderbuss run before submit-queue.
# Otherwise it's going to take an extra-cycle to detect the label change.
# Run blunderbuss before approval-handler, so that we can suggest approvers
# based on assigned reviewer.
pr-mungers: blunderbuss, submit-queue, needs-rebase, sig-mention-handler, lgtm-after-commit, comment-deleter, close-stale
state: open
token-file: /etc/secret-volume/token
period: 5m
repo-dir: /gitrepos
github-key-file: /etc/hook-secret-volume/secret
# status contexts options.
protected-branches-extra-contexts: "cla/linuxfoundation"
required-retest-contexts: ""
# submit-queue options.
protected-branches: "master"
nonblocking-jenkins-jobs: ""
do-not-merge-milestones: ""
admin-port: 9999
context-url: https://community.submit-queue.k8s.io
gate-cla: true
gate-approved: false
# munger specific options.
# label-file: "/gitrepos/community/labels.yaml"
use-reviewers: true
generated-files-config: .generated_files
|
78610484bc84126df2012bd6f056ae50ea792d6a | services/backend/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml | services/backend/src/main/resources/org/apache/tika/mime/custom-mimetypes.xml | <?xml version="1.0" encoding="UTF-8"?>
<mime-info>
<mime-type type="application/x-kicad-schematic">
<glob pattern="*.sch"/>
<magic priority="60">
<match value="EESchema Schematic File Version 2" type="string" offset="0">
</match>
</magic>
</mime-type>
</mime-info>
| <?xml version="1.0" encoding="UTF-8"?>
<mime-info>
<mime-type type="application/x-kicad-schematic">
<glob pattern="*.sch"/>
<magic priority="60">
<match value="EESchema Schematic File Version 2" type="string" offset="0">
</match>
</magic>
</mime-type>
<mime-type type="application/x-kicad-pcb">
<glob pattern="*.kicad_pcb"/>
<magic priority="60">
<match value="(kicad_pcb " type="string" offset="0">
</match>
</magic>
</mime-type>
</mime-info>
| Add kicad pcb content type detection | Add kicad pcb content type detection
| XML | agpl-3.0 | MarSik/shelves,MarSik/shelves,MarSik/shelves,MarSik/shelves | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info>
<mime-type type="application/x-kicad-schematic">
<glob pattern="*.sch"/>
<magic priority="60">
<match value="EESchema Schematic File Version 2" type="string" offset="0">
</match>
</magic>
</mime-type>
</mime-info>
## Instruction:
Add kicad pcb content type detection
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info>
<mime-type type="application/x-kicad-schematic">
<glob pattern="*.sch"/>
<magic priority="60">
<match value="EESchema Schematic File Version 2" type="string" offset="0">
</match>
</magic>
</mime-type>
<mime-type type="application/x-kicad-pcb">
<glob pattern="*.kicad_pcb"/>
<magic priority="60">
<match value="(kicad_pcb " type="string" offset="0">
</match>
</magic>
</mime-type>
</mime-info>
|
97c0f23c676de7e726e938bf0b61087834cf9fd9 | netbox/tenancy/api/serializers.py | netbox/tenancy/api/serializers.py | from rest_framework import serializers
from extras.api.serializers import CustomFieldSerializer
from tenancy.models import Tenant, TenantGroup
#
# Tenant groups
#
class TenantGroupSerializer(serializers.ModelSerializer):
class Meta:
model = TenantGroup
fields = ['id', 'name', 'slug']
class TenantGroupNestedSerializer(TenantGroupSerializer):
class Meta(TenantGroupSerializer.Meta):
pass
#
# Tenants
#
class TenantSerializer(CustomFieldSerializer, serializers.ModelSerializer):
group = TenantGroupNestedSerializer()
class Meta:
model = Tenant
fields = ['id', 'name', 'slug', 'group', 'comments', 'custom_fields']
class TenantNestedSerializer(TenantSerializer):
class Meta(TenantSerializer.Meta):
fields = ['id', 'name', 'slug']
| from rest_framework import serializers
from extras.api.serializers import CustomFieldSerializer
from tenancy.models import Tenant, TenantGroup
#
# Tenant groups
#
class TenantGroupSerializer(serializers.ModelSerializer):
class Meta:
model = TenantGroup
fields = ['id', 'name', 'slug']
class TenantGroupNestedSerializer(TenantGroupSerializer):
class Meta(TenantGroupSerializer.Meta):
pass
#
# Tenants
#
class TenantSerializer(CustomFieldSerializer, serializers.ModelSerializer):
group = TenantGroupNestedSerializer()
class Meta:
model = Tenant
fields = ['id', 'name', 'slug', 'group', 'description', 'comments', 'custom_fields']
class TenantNestedSerializer(TenantSerializer):
class Meta(TenantSerializer.Meta):
fields = ['id', 'name', 'slug']
| Add description field to TenantSerializer | Add description field to TenantSerializer
This might be just an oversight. Other data models do include the description in their serialisers. The API produces the description field with this change. | Python | apache-2.0 | digitalocean/netbox,snazy2000/netbox,digitalocean/netbox,snazy2000/netbox,Alphalink/netbox,snazy2000/netbox,lampwins/netbox,Alphalink/netbox,snazy2000/netbox,Alphalink/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,Alphalink/netbox | python | ## Code Before:
from rest_framework import serializers
from extras.api.serializers import CustomFieldSerializer
from tenancy.models import Tenant, TenantGroup
#
# Tenant groups
#
class TenantGroupSerializer(serializers.ModelSerializer):
class Meta:
model = TenantGroup
fields = ['id', 'name', 'slug']
class TenantGroupNestedSerializer(TenantGroupSerializer):
class Meta(TenantGroupSerializer.Meta):
pass
#
# Tenants
#
class TenantSerializer(CustomFieldSerializer, serializers.ModelSerializer):
group = TenantGroupNestedSerializer()
class Meta:
model = Tenant
fields = ['id', 'name', 'slug', 'group', 'comments', 'custom_fields']
class TenantNestedSerializer(TenantSerializer):
class Meta(TenantSerializer.Meta):
fields = ['id', 'name', 'slug']
## Instruction:
Add description field to TenantSerializer
This might be just an oversight. Other data models do include the description in their serialisers. The API produces the description field with this change.
## Code After:
from rest_framework import serializers
from extras.api.serializers import CustomFieldSerializer
from tenancy.models import Tenant, TenantGroup
#
# Tenant groups
#
class TenantGroupSerializer(serializers.ModelSerializer):
class Meta:
model = TenantGroup
fields = ['id', 'name', 'slug']
class TenantGroupNestedSerializer(TenantGroupSerializer):
class Meta(TenantGroupSerializer.Meta):
pass
#
# Tenants
#
class TenantSerializer(CustomFieldSerializer, serializers.ModelSerializer):
group = TenantGroupNestedSerializer()
class Meta:
model = Tenant
fields = ['id', 'name', 'slug', 'group', 'description', 'comments', 'custom_fields']
class TenantNestedSerializer(TenantSerializer):
class Meta(TenantSerializer.Meta):
fields = ['id', 'name', 'slug']
|
6ca81fefbe3e175bd9d672faf7b2393afb764105 | app/views/users/show/_repositories.html.erb | app/views/users/show/_repositories.html.erb | <%= pull_box(t("views.site.dashboard.repositories")) do %>
<% if repositories.blank? %>
<% if is_current_user?(user) %>
You currently do not have any repository clones. You can clone a repository you wish to contribute to by going to a repository overview page and clicking the "Clone repository" button in the repository information box.
<% else %>
<p class="hint">
<%=h user.title %> currently does not have any repository clones.
</p>
<% end %>
<% else %>
<table class="table">
<% repositories.each do |repo| %>
<tr>
<td class="repository">
<%= link_to h(repo.url_path), [repo.project, repo] %>
</td>
</tr>
<% end %>
</table>
<% end %>
<% end %>
| <%= pull_box(t("views.site.dashboard.repositories"), :class => 'repositories-box') do %>
<% if repositories.blank? %>
<p class="hint muted">
<% if is_current_user?(user) %>
You currently do not have any repository clones. You can clone a repository you wish to contribute to by going to a repository overview page and clicking the "Clone repository" button in the repository information box.
<% else %>
<%=h user.title %> currently does not have any repository clones.
<% end %>
</p>
<% else %>
<table class="table">
<% repositories.each do |repo| %>
<tr>
<td class="repository">
<%= link_to h(repo.url_path), [repo.project, repo] %>
</td>
</tr>
<% end %>
</table>
<% end %>
<% end %>
| Add special class for repositories box | Add special class for repositories box
| HTML+ERB | agpl-3.0 | SamuelMoraesF/Gitorious,spencerwp/mainline,tigefa4u/gitorious-mainline,gitorious/mainline,rae/gitorious-mainline,gitorious/mainline,SamuelMoraesF/Gitorious,tigefa4u/gitorious-mainline,SamuelMoraesF/Gitorious,elcom/gitorious,Gitorious-backup/mainline,tigefa4u/gitorious-mainline,elcom/gitorious,rae/gitorious-mainline,elcom/gitorious,Gitorious-backup/mainline,gitorious/mainline,rae/gitorious-mainline,Gitorious-backup/mainline,SamuelMoraesF/Gitorious,gitorious/mainline,rae/gitorious-mainline,spencerwp/mainline,elcom/gitorious,Gitorious-backup/mainline,spencerwp/mainline,spencerwp/mainline,tigefa4u/gitorious-mainline | html+erb | ## Code Before:
<%= pull_box(t("views.site.dashboard.repositories")) do %>
<% if repositories.blank? %>
<% if is_current_user?(user) %>
You currently do not have any repository clones. You can clone a repository you wish to contribute to by going to a repository overview page and clicking the "Clone repository" button in the repository information box.
<% else %>
<p class="hint">
<%=h user.title %> currently does not have any repository clones.
</p>
<% end %>
<% else %>
<table class="table">
<% repositories.each do |repo| %>
<tr>
<td class="repository">
<%= link_to h(repo.url_path), [repo.project, repo] %>
</td>
</tr>
<% end %>
</table>
<% end %>
<% end %>
## Instruction:
Add special class for repositories box
## Code After:
<%= pull_box(t("views.site.dashboard.repositories"), :class => 'repositories-box') do %>
<% if repositories.blank? %>
<p class="hint muted">
<% if is_current_user?(user) %>
You currently do not have any repository clones. You can clone a repository you wish to contribute to by going to a repository overview page and clicking the "Clone repository" button in the repository information box.
<% else %>
<%=h user.title %> currently does not have any repository clones.
<% end %>
</p>
<% else %>
<table class="table">
<% repositories.each do |repo| %>
<tr>
<td class="repository">
<%= link_to h(repo.url_path), [repo.project, repo] %>
</td>
</tr>
<% end %>
</table>
<% end %>
<% end %>
|
e18925b21822f60d49dfef8a430b72c91d26627f | client/README.md | client/README.md | Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Fixtures
During development phase, server api are simulated.
Fixtures are in `src/app/in-memory-data.service.ts`
| Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Fixtures
During development phase, server api are simulated.
Fixtures are in `src/app/in-memory-data.service.ts`
### Server version vs In-memory-data
Server api can be activated by :
#### 1. in ```src/app/isari-data.service.ts```
* Change an uncomment ```dataUrl```, ```layoutUrl```, ```enumUrl```
* Uncomment / comment response handle in promise return of ```getPeople```, ```getEnum``` and ```getLayout``` methods
#### 2. in ```src/app/app.module.ts```
* Comment usage of ```InMemoryWebApiModule``` : import section of the module ```InMemoryWebApiModule.forRoot(InMemoryDataService)```
| Add information to set server api in front | Add information to set server api in front
| Markdown | agpl-3.0 | SciencesPo/isari,SciencesPo/isari,SciencesPo/isari,SciencesPo/isari | markdown | ## Code Before:
Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Fixtures
During development phase, server api are simulated.
Fixtures are in `src/app/in-memory-data.service.ts`
## Instruction:
Add information to set server api in front
## Code After:
Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Fixtures
During development phase, server api are simulated.
Fixtures are in `src/app/in-memory-data.service.ts`
### Server version vs In-memory-data
Server api can be activated by :
#### 1. in ```src/app/isari-data.service.ts```
* Change an uncomment ```dataUrl```, ```layoutUrl```, ```enumUrl```
* Uncomment / comment response handle in promise return of ```getPeople```, ```getEnum``` and ```getLayout``` methods
#### 2. in ```src/app/app.module.ts```
* Comment usage of ```InMemoryWebApiModule``` : import section of the module ```InMemoryWebApiModule.forRoot(InMemoryDataService)```
|
91e391e53ffb65d5be0659f25fcaafdc11f20695 | growsocial/common/methods/searchMethods.js | growsocial/common/methods/searchMethods.js | Meteor.methods({
addSearchSamplePeople: function() {
var first_names = [
"Ada",
"Grace",
"Marie",
"Carl",
"Nikola",
"Claude",
"Peter",
"Stefan",
"Stephen",
"Lisa",
"Christian",
"Barack"
];
var last_names = [
"Lovelace",
"Hopper",
"Curie",
"Tesla",
"Shannon",
"Muller",
"Meier",
"Miller",
"Gaga",
"Franklin"
];
var locations = ["Davie", "Fort Lauderdale", "Tampa"];
var addedList = [];
for (var i = 0; i < 3; i++) {
var person = {
'member_key': Random.id(),
firstname: Random.choice(first_names),
lastname: Random.choice(last_names),
about: "Random test user created for testing search.",
location: Random.choice(locations),
};
person.email = person.member_key + "@test.t";
person.fullname = person.firstname + ' ' + person.lastname;
addedList.push(person.fullname);
// console.log('for search, adding sample person:', person);
People.insert(person);
}
// console.log('method, addedList:', addedList);
return addedList; // passed through client callback
},
});
| Meteor.methods({
addSearchSamplePeople: function() {
var first_names = [
"Ada",
"Grace",
"Marie",
"Carl",
"Nikola",
"Claude",
"Peter",
"Stefan",
"Stephen",
"Lisa",
"Christian",
"Barack"
];
var last_names = [
"Lovelace",
"Hopper",
"Curie",
"Tesla",
"Shannon",
"Muller",
"Meier",
"Miller",
"Gaga",
"Franklin"
];
var locations = ["Davie", "Fort Lauderdale", "Tampa"];
var addedList = [];
for (var i = 0; i < 3; i++) {
var person = {
searchSamplePerson: true,
'member_key': Random.id(),
firstname: Random.choice(first_names),
lastname: Random.choice(last_names),
about: "Random test user created for testing search.",
location: Random.choice(locations),
};
person.email = person.member_key + "@test.t";
person.fullname = person.firstname + ' ' + person.lastname;
addedList.push(person.fullname);
// console.log('for search, adding sample person:', person);
People.insert(person);
}
// console.log('method, addedList:', addedList);
return addedList; // passed through client callback
},
removeSearchSamplePeople: function() {
People.remove({searchSamplePerson: true});
},
});
| Allow user to remove sample people | Allow user to remove sample people
| JavaScript | apache-2.0 | GrowSocial/pilot,GrowSocial/pilot | javascript | ## Code Before:
Meteor.methods({
addSearchSamplePeople: function() {
var first_names = [
"Ada",
"Grace",
"Marie",
"Carl",
"Nikola",
"Claude",
"Peter",
"Stefan",
"Stephen",
"Lisa",
"Christian",
"Barack"
];
var last_names = [
"Lovelace",
"Hopper",
"Curie",
"Tesla",
"Shannon",
"Muller",
"Meier",
"Miller",
"Gaga",
"Franklin"
];
var locations = ["Davie", "Fort Lauderdale", "Tampa"];
var addedList = [];
for (var i = 0; i < 3; i++) {
var person = {
'member_key': Random.id(),
firstname: Random.choice(first_names),
lastname: Random.choice(last_names),
about: "Random test user created for testing search.",
location: Random.choice(locations),
};
person.email = person.member_key + "@test.t";
person.fullname = person.firstname + ' ' + person.lastname;
addedList.push(person.fullname);
// console.log('for search, adding sample person:', person);
People.insert(person);
}
// console.log('method, addedList:', addedList);
return addedList; // passed through client callback
},
});
## Instruction:
Allow user to remove sample people
## Code After:
Meteor.methods({
addSearchSamplePeople: function() {
var first_names = [
"Ada",
"Grace",
"Marie",
"Carl",
"Nikola",
"Claude",
"Peter",
"Stefan",
"Stephen",
"Lisa",
"Christian",
"Barack"
];
var last_names = [
"Lovelace",
"Hopper",
"Curie",
"Tesla",
"Shannon",
"Muller",
"Meier",
"Miller",
"Gaga",
"Franklin"
];
var locations = ["Davie", "Fort Lauderdale", "Tampa"];
var addedList = [];
for (var i = 0; i < 3; i++) {
var person = {
searchSamplePerson: true,
'member_key': Random.id(),
firstname: Random.choice(first_names),
lastname: Random.choice(last_names),
about: "Random test user created for testing search.",
location: Random.choice(locations),
};
person.email = person.member_key + "@test.t";
person.fullname = person.firstname + ' ' + person.lastname;
addedList.push(person.fullname);
// console.log('for search, adding sample person:', person);
People.insert(person);
}
// console.log('method, addedList:', addedList);
return addedList; // passed through client callback
},
removeSearchSamplePeople: function() {
People.remove({searchSamplePerson: true});
},
});
|
fde45f94953cb73472737e86af015d376ca1b0f2 | build.sh | build.sh | export MUSL_VERSION=1.1.12
wget http://www.musl-libc.org/releases/musl-$MUSL_VERSION.tar.gz
tar -xvf musl-$MUSL_VERSION.tar.gz
cd musl-$MUSL_VERSION
CFLAGS="-O2" ./configure --prefix=/usr/local --disable-shared
make
sudo make install
cd ..
# Cleanup
rm -rf musl-$MUSL_VERSION
rm musl-$MUSL_VERSION.tar.gz
# Install dependencies
sudo apt-get -y install libssl-dev
# Get latest OpenLDAP version from http://www.openldap.org/software/download/
export OPENLDAP_VERSION=2.4.43
wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$OPENLDAP_VERSION.tgz
tar -xvf openldap-$OPENLDAP_VERSION.tgz
cd openldap-$OPENLDAP_VERSION
CC="musl-gcc" LDFLAGS="-static" ./configure --prefix=/usr/local --disable-shared --disable-slapd
make depend
make
# Create an archive with the tools
cd clients; find tools/ -executable -type f | tar -cvzf ../../openldap-tools-$OPENLDAP_VERSION-`uname -p`.tgz -T -; cd ../..
# Cleanup
rm -rf openldap-$OPENLDAP_VERSION
rm openldap-$OPENLDAP_VERSION.tgz
| sudo apt-get -y install libssl-dev
# Get latest Musl version from http://www.musl-libc.org/download.html
export musl_version=1.1.12
wget http://www.musl-libc.org/releases/musl-$musl_version.tar.gz
tar -xvf musl-$musl_version.tar.gz
cd musl-$musl_version
./configure --prefix=/usr/local --disable-shared
make
sudo make install
cd ..
# Cleanup
rm -rf musl-$musl_version
rm musl-$musl_version.tar.gz
# Get latest OpenLDAP version from http://www.openldap.org/software/download/
export openldap_version=2.4.43
wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$openldap_version.tgz
tar -xvf openldap-$openldap_version.tgz
cd openldap-$openldap_version
CC="musl-gcc" LDFLAGS="-static" ./configure --prefix=/usr/local --disable-shared --disable-slapd
make depend
make
# Create an archive with the tools
cd clients; find tools/ -executable -type f | tar -cvzf ../../openldap-tools-$openldap_version-`uname -p`.tgz -T -; cd ../..
# Cleanup
rm -rf openldap-$openldap_version
rm openldap-$openldap_version.tgz
| Use lower-case environment variables to avoid conflicts | Use lower-case environment variables to avoid conflicts
| Shell | mit | bmaupin/openldap-tools-static | shell | ## Code Before:
export MUSL_VERSION=1.1.12
wget http://www.musl-libc.org/releases/musl-$MUSL_VERSION.tar.gz
tar -xvf musl-$MUSL_VERSION.tar.gz
cd musl-$MUSL_VERSION
CFLAGS="-O2" ./configure --prefix=/usr/local --disable-shared
make
sudo make install
cd ..
# Cleanup
rm -rf musl-$MUSL_VERSION
rm musl-$MUSL_VERSION.tar.gz
# Install dependencies
sudo apt-get -y install libssl-dev
# Get latest OpenLDAP version from http://www.openldap.org/software/download/
export OPENLDAP_VERSION=2.4.43
wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$OPENLDAP_VERSION.tgz
tar -xvf openldap-$OPENLDAP_VERSION.tgz
cd openldap-$OPENLDAP_VERSION
CC="musl-gcc" LDFLAGS="-static" ./configure --prefix=/usr/local --disable-shared --disable-slapd
make depend
make
# Create an archive with the tools
cd clients; find tools/ -executable -type f | tar -cvzf ../../openldap-tools-$OPENLDAP_VERSION-`uname -p`.tgz -T -; cd ../..
# Cleanup
rm -rf openldap-$OPENLDAP_VERSION
rm openldap-$OPENLDAP_VERSION.tgz
## Instruction:
Use lower-case environment variables to avoid conflicts
## Code After:
sudo apt-get -y install libssl-dev
# Get latest Musl version from http://www.musl-libc.org/download.html
export musl_version=1.1.12
wget http://www.musl-libc.org/releases/musl-$musl_version.tar.gz
tar -xvf musl-$musl_version.tar.gz
cd musl-$musl_version
./configure --prefix=/usr/local --disable-shared
make
sudo make install
cd ..
# Cleanup
rm -rf musl-$musl_version
rm musl-$musl_version.tar.gz
# Get latest OpenLDAP version from http://www.openldap.org/software/download/
export openldap_version=2.4.43
wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-$openldap_version.tgz
tar -xvf openldap-$openldap_version.tgz
cd openldap-$openldap_version
CC="musl-gcc" LDFLAGS="-static" ./configure --prefix=/usr/local --disable-shared --disable-slapd
make depend
make
# Create an archive with the tools
cd clients; find tools/ -executable -type f | tar -cvzf ../../openldap-tools-$openldap_version-`uname -p`.tgz -T -; cd ../..
# Cleanup
rm -rf openldap-$openldap_version
rm openldap-$openldap_version.tgz
|
69d52f1cbac1c63a3a6f05aa32f8b8274cf4854f | src/open.js | src/open.js | function readSingleFile(e) {
var file = e.target.files[0];
if (!file) {
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var contents = e.target.result;
displayContents(contents);
$('#play-input').disabled = false;
};
reader.readAsText(file);
}
function TestCall(event, other) {
console.log(event);
console.log(other);
}
function displayContents(contents) {
var lines = contents.split("\n"),
output = [],
i;
output.push("<thead><tr><th scope=\"col\"><button>" +
lines[0].slice(0, -1).split(",").join("</button></th><th scope=\"col\"><button>") +
"</button></th></tr></thead>");
for (i = 1; i < lines.length; i++)
output.push("<tr><td>" +
lines[i].slice(0, -1).split(",").join("</td><td>") +
"</td></tr>");
output = "<table>" + output.join("") + "</table>";
var div = document.getElementById('file-content');
div.innerHTML = output;
var ths = document.getElementsByTagName("th");
console.log("ths " + ths);
for (var i = 0; i < ths.length; i++) {
ths[i].onclick = TestCall
}
// var element = $('#content');
// element.innerHTML = contents;
} | let csv = (function () {
let buildHeader = function (line) {
return "<thead><tr><th scope=\"col\"><button>"
+ line.slice(0, -1).split(",").join("</button></th><th scope=\"col\"><button>")
+ "</button></th></tr></thead>"
};
let buildAsHtml = function (lines) {
let output = [buildHeader(lines[0])];
for (let i = 1; i < lines.length; i++)
output.push("<tr><td>"
+ lines[i].slice(0, -1).split(",").join("</td><td>")
+ "</td></tr>");
return "<table>" + output.join("") + "</table>";
};
return {
buildAsHtml: buildAsHtml
};
})();
function readSingleFile(e) {
let file = e.target.files[0];
if (!file) {
return;
}
let reader = new FileReader();
reader.onload = function(e) {
let contents = e.target.result;
displayContents(contents);
$('#play-input').disabled = false;
};
reader.readAsText(file);
}
function TestCall(event, other) {
console.log(event);
console.log(other);
}
function displayContents(contents) {
var div = document.getElementById('file-content');
div.innerHTML = csv.buildAsHtml(contents.split("\n"));
var ths = document.getElementsByTagName("th");
console.log("ths " + ths);
for (var i = 0; i < ths.length; i++) {
ths[i].onclick = TestCall
}
// var element = $('#content');
// element.innerHTML = contents;
} | Move csv in a module | Move csv in a module
| JavaScript | mpl-2.0 | aloisdg/kanti,aloisdg/kanti | javascript | ## Code Before:
function readSingleFile(e) {
var file = e.target.files[0];
if (!file) {
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var contents = e.target.result;
displayContents(contents);
$('#play-input').disabled = false;
};
reader.readAsText(file);
}
function TestCall(event, other) {
console.log(event);
console.log(other);
}
function displayContents(contents) {
var lines = contents.split("\n"),
output = [],
i;
output.push("<thead><tr><th scope=\"col\"><button>" +
lines[0].slice(0, -1).split(",").join("</button></th><th scope=\"col\"><button>") +
"</button></th></tr></thead>");
for (i = 1; i < lines.length; i++)
output.push("<tr><td>" +
lines[i].slice(0, -1).split(",").join("</td><td>") +
"</td></tr>");
output = "<table>" + output.join("") + "</table>";
var div = document.getElementById('file-content');
div.innerHTML = output;
var ths = document.getElementsByTagName("th");
console.log("ths " + ths);
for (var i = 0; i < ths.length; i++) {
ths[i].onclick = TestCall
}
// var element = $('#content');
// element.innerHTML = contents;
}
## Instruction:
Move csv in a module
## Code After:
let csv = (function () {
let buildHeader = function (line) {
return "<thead><tr><th scope=\"col\"><button>"
+ line.slice(0, -1).split(",").join("</button></th><th scope=\"col\"><button>")
+ "</button></th></tr></thead>"
};
let buildAsHtml = function (lines) {
let output = [buildHeader(lines[0])];
for (let i = 1; i < lines.length; i++)
output.push("<tr><td>"
+ lines[i].slice(0, -1).split(",").join("</td><td>")
+ "</td></tr>");
return "<table>" + output.join("") + "</table>";
};
return {
buildAsHtml: buildAsHtml
};
})();
function readSingleFile(e) {
let file = e.target.files[0];
if (!file) {
return;
}
let reader = new FileReader();
reader.onload = function(e) {
let contents = e.target.result;
displayContents(contents);
$('#play-input').disabled = false;
};
reader.readAsText(file);
}
function TestCall(event, other) {
console.log(event);
console.log(other);
}
function displayContents(contents) {
var div = document.getElementById('file-content');
div.innerHTML = csv.buildAsHtml(contents.split("\n"));
var ths = document.getElementsByTagName("th");
console.log("ths " + ths);
for (var i = 0; i < ths.length; i++) {
ths[i].onclick = TestCall
}
// var element = $('#content');
// element.innerHTML = contents;
} |
0818fd8716af45da3c026c01bff667bcbc439e77 | context.go | context.go | // Copyright 2016 Marcel Gotsch. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package goserv
type Context struct {
store storage
}
func (c *Context) Set(key string, value interface{}) {
c.assureStorage()
c.store[key] = value
}
func (c *Context) Get(key string) interface{} {
c.assureStorage()
return c.store[key]
}
func (c *Context) assureStorage() {
if c.store != nil {
return
}
c.store = make(storage)
}
type storage map[string]interface{}
| // Copyright 2016 Marcel Gotsch. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package goserv
type Context struct {
store map[string]interface{}
}
func (c *Context) Set(key string, value interface{}) {
c.assureStorage()
c.store[key] = value
}
func (c *Context) Get(key string) interface{} {
if c.store == nil {
return nil
}
return c.store[key]
}
func (c *Context) Delete(key string) {
if c.store == nil {
return
}
delete(c.store, key)
}
func (c *Context) Exists(key string) bool {
if c.store == nil {
return false
}
_, exists := c.store[key]
return exists
}
func (c *Context) assureStorage() {
if c.store != nil {
return
}
c.store = make(map[string]interface{})
}
| Make Context even more lazy and add convenience functions | Make Context even more lazy and add convenience functions
| Go | bsd-3-clause | gotschmarcel/goserv | go | ## Code Before:
// Copyright 2016 Marcel Gotsch. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package goserv
type Context struct {
store storage
}
func (c *Context) Set(key string, value interface{}) {
c.assureStorage()
c.store[key] = value
}
func (c *Context) Get(key string) interface{} {
c.assureStorage()
return c.store[key]
}
func (c *Context) assureStorage() {
if c.store != nil {
return
}
c.store = make(storage)
}
type storage map[string]interface{}
## Instruction:
Make Context even more lazy and add convenience functions
## Code After:
// Copyright 2016 Marcel Gotsch. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package goserv
type Context struct {
store map[string]interface{}
}
func (c *Context) Set(key string, value interface{}) {
c.assureStorage()
c.store[key] = value
}
func (c *Context) Get(key string) interface{} {
if c.store == nil {
return nil
}
return c.store[key]
}
func (c *Context) Delete(key string) {
if c.store == nil {
return
}
delete(c.store, key)
}
func (c *Context) Exists(key string) bool {
if c.store == nil {
return false
}
_, exists := c.store[key]
return exists
}
func (c *Context) assureStorage() {
if c.store != nil {
return
}
c.store = make(map[string]interface{})
}
|
fb57f6a69a5f20fae48d70fb6a2eb1fafa42257b | README.md | README.md |
A small library to compare ImageData objects.
## Install
`npm install compare-image`
## API
The library exposes 2 functions at the moment.
```ts
isSame(a: ImageData, b: ImageData): boolean
```
```ts
isSubset(imageData: ImageData, subset: ImageData): boolean
```
## Example
```ts
import * as compareImage from 'compare-image'
const imageDataA = new ImageData(10, 10);
const imageDataB = new ImageData(10, 10);
compareImage.isSame(imageDataA, imageDataB); // true
const imageDataC = new ImageData(5, 5);
imageDataA.fill(255);
imageDataC.fill(255);
compareImage.isSubset(imageDataA, imageDataC); // true
```
Look at the tests for more examples.
|
A small library to compare ImageData objects.
## Install
`npm install compare-image-data`
## API
The library exposes 2 functions at the moment.
```ts
isSame(a: ImageData, b: ImageData): boolean
```
```ts
isSubset(imageData: ImageData, subset: ImageData): boolean
```
## Example
```ts
import * as compareImage from 'compare-image-data'
const imageDataA = new ImageData(10, 10);
const imageDataB = new ImageData(10, 10);
compareImage.isSame(imageDataA, imageDataB); // true
const imageDataC = new ImageData(5, 5);
imageDataA.fill(255);
imageDataC.fill(255);
compareImage.isSubset(imageDataA, imageDataC); // true
```
Look at the tests for more examples.
| Update readme with correct npm name | Update readme with correct npm name
| Markdown | mit | ulrikstrid/compare-image,ulrikstrid/compare-image | markdown | ## Code Before:
A small library to compare ImageData objects.
## Install
`npm install compare-image`
## API
The library exposes 2 functions at the moment.
```ts
isSame(a: ImageData, b: ImageData): boolean
```
```ts
isSubset(imageData: ImageData, subset: ImageData): boolean
```
## Example
```ts
import * as compareImage from 'compare-image'
const imageDataA = new ImageData(10, 10);
const imageDataB = new ImageData(10, 10);
compareImage.isSame(imageDataA, imageDataB); // true
const imageDataC = new ImageData(5, 5);
imageDataA.fill(255);
imageDataC.fill(255);
compareImage.isSubset(imageDataA, imageDataC); // true
```
Look at the tests for more examples.
## Instruction:
Update readme with correct npm name
## Code After:
A small library to compare ImageData objects.
## Install
`npm install compare-image-data`
## API
The library exposes 2 functions at the moment.
```ts
isSame(a: ImageData, b: ImageData): boolean
```
```ts
isSubset(imageData: ImageData, subset: ImageData): boolean
```
## Example
```ts
import * as compareImage from 'compare-image-data'
const imageDataA = new ImageData(10, 10);
const imageDataB = new ImageData(10, 10);
compareImage.isSame(imageDataA, imageDataB); // true
const imageDataC = new ImageData(5, 5);
imageDataA.fill(255);
imageDataC.fill(255);
compareImage.isSubset(imageDataA, imageDataC); // true
```
Look at the tests for more examples.
|
1816286463729e3090912af176bb506cd89186e4 | README.md | README.md | Flask-SimpleLDAP
================
[](https://travis-ci.org/admiralobvious/flask-simpleldap)
Flask-SimpleLDAP provides LDAP authentication for Flask.
Quickstart
----------
First, install Flask-SimpleLDAP:
$ pip install flask-simpleldap
Flask-SimpleLDAP depends, and will install for you, recent versions of Flask
(0.9 or later) and python-ldap. Flask-SimpleLDAP is compatible
with and tested on Python 2.6 and 2.7.
Next, add a ``LDAP`` instance to your code and at least the three
required configuration options:
from flask import Flask
from flask.ext.simpleldap import LDAP
app = Flask(__name__)
ldap = LDAP(app)
app.config['LDAP_BASE_DN'] = 'OU=users,dc=example,dc=org'
app.config['LDAP_USERNAME'] = 'CN=user,OU=Users,DC=example,DC=org'
app.config['LDAP_PASSWORD'] = 'password'
@app.route('/ldap')
@ldap.login_required
def ldap_protected():
return 'Success!'
Check the [examples](examples/) folder for a more complex example using LDAP groups.
Resources
---------
- [Documentation](http://flask-simpleldap.readthedocs.org/en/latest/)
- [PyPI](https://pypi.python.org/pypi/Flask-SimpleLDAP)
| Flask-SimpleLDAP
================
[](https://travis-ci.org/admiralobvious/flask-simpleldap)
Flask-SimpleLDAP provides LDAP authentication for Flask.
Quickstart
----------
First, install Flask-SimpleLDAP:
$ pip install flask-simpleldap
Flask-SimpleLDAP depends, and will install for you, recent versions of Flask
(0.9 or later) and python-ldap. Flask-SimpleLDAP is compatible
with and tested on Python 2.6 and 2.7.
Next, add a ``LDAP`` instance to your code and at least the three
required configuration options:
```python
from flask import Flask
from flask.ext.simpleldap import LDAP
app = Flask(__name__)
ldap = LDAP(app)
app.config['LDAP_BASE_DN'] = 'OU=users,dc=example,dc=org'
app.config['LDAP_USERNAME'] = 'CN=user,OU=Users,DC=example,DC=org'
app.config['LDAP_PASSWORD'] = 'password'
@app.route('/ldap')
@ldap.login_required
def ldap_protected():
return 'Success!'
```
Check the [examples](examples/) folder for a more complex example using LDAP groups.
Resources
---------
- [Documentation](http://flask-simpleldap.readthedocs.org/en/latest/)
- [PyPI](https://pypi.python.org/pypi/Flask-SimpleLDAP)
| Use a python code block for syntax rendering | Use a python code block for syntax rendering | Markdown | mit | admiralobvious/flask-simpleldap | markdown | ## Code Before:
Flask-SimpleLDAP
================
[](https://travis-ci.org/admiralobvious/flask-simpleldap)
Flask-SimpleLDAP provides LDAP authentication for Flask.
Quickstart
----------
First, install Flask-SimpleLDAP:
$ pip install flask-simpleldap
Flask-SimpleLDAP depends, and will install for you, recent versions of Flask
(0.9 or later) and python-ldap. Flask-SimpleLDAP is compatible
with and tested on Python 2.6 and 2.7.
Next, add a ``LDAP`` instance to your code and at least the three
required configuration options:
from flask import Flask
from flask.ext.simpleldap import LDAP
app = Flask(__name__)
ldap = LDAP(app)
app.config['LDAP_BASE_DN'] = 'OU=users,dc=example,dc=org'
app.config['LDAP_USERNAME'] = 'CN=user,OU=Users,DC=example,DC=org'
app.config['LDAP_PASSWORD'] = 'password'
@app.route('/ldap')
@ldap.login_required
def ldap_protected():
return 'Success!'
Check the [examples](examples/) folder for a more complex example using LDAP groups.
Resources
---------
- [Documentation](http://flask-simpleldap.readthedocs.org/en/latest/)
- [PyPI](https://pypi.python.org/pypi/Flask-SimpleLDAP)
## Instruction:
Use a python code block for syntax rendering
## Code After:
Flask-SimpleLDAP
================
[](https://travis-ci.org/admiralobvious/flask-simpleldap)
Flask-SimpleLDAP provides LDAP authentication for Flask.
Quickstart
----------
First, install Flask-SimpleLDAP:
$ pip install flask-simpleldap
Flask-SimpleLDAP depends, and will install for you, recent versions of Flask
(0.9 or later) and python-ldap. Flask-SimpleLDAP is compatible
with and tested on Python 2.6 and 2.7.
Next, add a ``LDAP`` instance to your code and at least the three
required configuration options:
```python
from flask import Flask
from flask.ext.simpleldap import LDAP
app = Flask(__name__)
ldap = LDAP(app)
app.config['LDAP_BASE_DN'] = 'OU=users,dc=example,dc=org'
app.config['LDAP_USERNAME'] = 'CN=user,OU=Users,DC=example,DC=org'
app.config['LDAP_PASSWORD'] = 'password'
@app.route('/ldap')
@ldap.login_required
def ldap_protected():
return 'Success!'
```
Check the [examples](examples/) folder for a more complex example using LDAP groups.
Resources
---------
- [Documentation](http://flask-simpleldap.readthedocs.org/en/latest/)
- [PyPI](https://pypi.python.org/pypi/Flask-SimpleLDAP)
|
457d8a8ed679301548e157b4468b2434cd00f4c7 | spec/shoes/image_spec.rb | spec/shoes/image_spec.rb | require 'shoes/spec_helper'
describe Shoes::Image do
describe "basic" do
let(:parent) { double("parent").as_null_object }
subject { Shoes::Image.new(parent, "../static/shoes-icon.png") }
it { should be_instance_of(Shoes::Image) }
it_behaves_like "movable object"
end
end
| require 'shoes/spec_helper'
describe Shoes::Image do
describe "basic" do
let(:parent) { double("parent").as_null_object }
let(:filename) { File.expand_path "../../../static/shoes-icon.png", __FILE__ }
subject { Shoes::Image.new(parent, filename) }
it { should be_instance_of(Shoes::Image) }
it_behaves_like "movable object"
end
end
| Update Image specs to run with Swt backend | Update Image specs to run with Swt backend
| Ruby | apache-2.0 | thescientician/lightning-timer,thescientician/lightning-timer,thescientician/lightning-timer | ruby | ## Code Before:
require 'shoes/spec_helper'
describe Shoes::Image do
describe "basic" do
let(:parent) { double("parent").as_null_object }
subject { Shoes::Image.new(parent, "../static/shoes-icon.png") }
it { should be_instance_of(Shoes::Image) }
it_behaves_like "movable object"
end
end
## Instruction:
Update Image specs to run with Swt backend
## Code After:
require 'shoes/spec_helper'
describe Shoes::Image do
describe "basic" do
let(:parent) { double("parent").as_null_object }
let(:filename) { File.expand_path "../../../static/shoes-icon.png", __FILE__ }
subject { Shoes::Image.new(parent, filename) }
it { should be_instance_of(Shoes::Image) }
it_behaves_like "movable object"
end
end
|
b237eb8f8fa52c43ffa947c7fb7c37c30d1ff693 | .travis.yml | .travis.yml | language: python
python:
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "nightly" # currently points to 3.6-dev
# command to install dependencies
# PyYAML is a test dependency but Travis doesn't read tests_require from setup.py
install:
- "python setup.py -q install"
- "pip install PyYAML"
- "pip install coverage"
- "pip install coveralls"
# command to run tests
script:
- "nosetests tests"
- "coverage run --source=exchangelib setup.py test"
after_success:
coveralls
| language: python
python:
- "3.4"
- "3.5"
- "3.6-dev" # 3.6 development branch
- "nightly"
# command to install dependencies
# PyYAML is a test dependency but Travis doesn't read tests_require from setup.py
install:
- "python setup.py -q install"
- "pip install PyYAML"
- "pip install coverage"
- "pip install coveralls"
# command to run tests
script:
- "nosetests tests"
- "coverage run --source=exchangelib setup.py test"
after_success:
coveralls
| Prepare for the Python 3.6 release | Prepare for the Python 3.6 release
| YAML | bsd-2-clause | ecederstrand/exchangelib | yaml | ## Code Before:
language: python
python:
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "nightly" # currently points to 3.6-dev
# command to install dependencies
# PyYAML is a test dependency but Travis doesn't read tests_require from setup.py
install:
- "python setup.py -q install"
- "pip install PyYAML"
- "pip install coverage"
- "pip install coveralls"
# command to run tests
script:
- "nosetests tests"
- "coverage run --source=exchangelib setup.py test"
after_success:
coveralls
## Instruction:
Prepare for the Python 3.6 release
## Code After:
language: python
python:
- "3.4"
- "3.5"
- "3.6-dev" # 3.6 development branch
- "nightly"
# command to install dependencies
# PyYAML is a test dependency but Travis doesn't read tests_require from setup.py
install:
- "python setup.py -q install"
- "pip install PyYAML"
- "pip install coverage"
- "pip install coveralls"
# command to run tests
script:
- "nosetests tests"
- "coverage run --source=exchangelib setup.py test"
after_success:
coveralls
|
8ef4f9968eecd08911c8352f6620d0eba99ca190 | mac/resources/open_MENU.js | mac/resources/open_MENU.js | define(['mac/roman'], function(macintoshRoman) {
'use strict';
return function(resource) {
var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);
resource.dataObject = {
id: dv.getUint16(0, false),
definitionProcedureResourceID: dv.getUint16(6, false),
enabledState: dv.getUint32(10, false),
title: macintoshRoman(resource.data, 15, resource.data[14]),
};
var pos = 15 + resource.data[14];
if (resource.dataObject.definitionProcedureResourceID === 0) {
delete resource.dataObject.definitionProcedureResourceID;
resource.dataObject.items = [];
while (pos < resource.data.length && resource.data[pos] !== 0) {
var text = macintoshRoman(resource.data, pos + 1, resource.data[pos]);
pos += 1 + text.length;
var item = {
text: text,
iconNumberOrScriptCode: resource.data[pos],
keyboardEquivalent: resource.data[pos + 1],
markingCharacterOrSubmenuID: resource.data[pos + 2],
style: resource.data[pos + 3],
};
resource.dataObject.items.push(item);
pos += 4;
}
}
else {
resource.dataObject.itemData = atob(String.fromCharCode.apply(null, resource.data.subarray(pos)));
}
};
});
| define(['mac/roman'], function(macintoshRoman) {
'use strict';
return function(item) {
return item.getBytes().then(function(bytes) {
var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
var dataObject = {
id: dv.getUint16(0, false),
definitionProcedureResourceID: dv.getUint16(6, false),
enabledState: dv.getUint32(10, false),
title: macintoshRoman(bytes, 15, bytes[14]),
};
var pos = 15 + bytes[14];
if (dataObject.definitionProcedureResourceID === 0) {
delete dataObject.definitionProcedureResourceID;
dataObject.items = [];
while (pos < bytes.length && bytes[pos] !== 0) {
var text = macintoshRoman(bytes, pos + 1, bytes[pos]);
pos += 1 + text.length;
var item = {
text: text,
iconNumberOrScriptCode: bytes[pos],
keyboardEquivalent: bytes[pos + 1],
markingCharacterOrSubmenuID: bytes[pos + 2],
style: bytes[pos + 3],
};
dataObject.items.push(item);
pos += 4;
}
}
else {
dataObject.itemData = atob(String.fromCharCode.apply(null, bytes.subarray(pos)));
}
item.setDataObject(dataObject);
});
};
});
| Change MENU to new loader format | Change MENU to new loader format | JavaScript | mit | radishengine/drowsy,radishengine/drowsy | javascript | ## Code Before:
define(['mac/roman'], function(macintoshRoman) {
'use strict';
return function(resource) {
var dv = new DataView(resource.data.buffer, resource.data.byteOffset, resource.data.byteLength);
resource.dataObject = {
id: dv.getUint16(0, false),
definitionProcedureResourceID: dv.getUint16(6, false),
enabledState: dv.getUint32(10, false),
title: macintoshRoman(resource.data, 15, resource.data[14]),
};
var pos = 15 + resource.data[14];
if (resource.dataObject.definitionProcedureResourceID === 0) {
delete resource.dataObject.definitionProcedureResourceID;
resource.dataObject.items = [];
while (pos < resource.data.length && resource.data[pos] !== 0) {
var text = macintoshRoman(resource.data, pos + 1, resource.data[pos]);
pos += 1 + text.length;
var item = {
text: text,
iconNumberOrScriptCode: resource.data[pos],
keyboardEquivalent: resource.data[pos + 1],
markingCharacterOrSubmenuID: resource.data[pos + 2],
style: resource.data[pos + 3],
};
resource.dataObject.items.push(item);
pos += 4;
}
}
else {
resource.dataObject.itemData = atob(String.fromCharCode.apply(null, resource.data.subarray(pos)));
}
};
});
## Instruction:
Change MENU to new loader format
## Code After:
define(['mac/roman'], function(macintoshRoman) {
'use strict';
return function(item) {
return item.getBytes().then(function(bytes) {
var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
var dataObject = {
id: dv.getUint16(0, false),
definitionProcedureResourceID: dv.getUint16(6, false),
enabledState: dv.getUint32(10, false),
title: macintoshRoman(bytes, 15, bytes[14]),
};
var pos = 15 + bytes[14];
if (dataObject.definitionProcedureResourceID === 0) {
delete dataObject.definitionProcedureResourceID;
dataObject.items = [];
while (pos < bytes.length && bytes[pos] !== 0) {
var text = macintoshRoman(bytes, pos + 1, bytes[pos]);
pos += 1 + text.length;
var item = {
text: text,
iconNumberOrScriptCode: bytes[pos],
keyboardEquivalent: bytes[pos + 1],
markingCharacterOrSubmenuID: bytes[pos + 2],
style: bytes[pos + 3],
};
dataObject.items.push(item);
pos += 4;
}
}
else {
dataObject.itemData = atob(String.fromCharCode.apply(null, bytes.subarray(pos)));
}
item.setDataObject(dataObject);
});
};
});
|
2edd866a046b66a631a9470f26a1da4c449573ba | templates/default/contacts.cfg.erb | templates/default/contacts.cfg.erb |
define contact {
contact_name root
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands service-notify-by-email
host_notification_commands host-notify-by-email
email root@localhost
}
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members <%= @members.join(',') %><%= ",pagerduty" unless node['nagios']['pagerduty_key'].empty? %>
}
define contactgroup {
contactgroup_name admins-sms
alias Sysadmin SMS
members <%= @members.join(',') %>
}
<% @admins.each do |a| -%>
define contact {
use default-contact
contact_name <%= a['id'] %>
<%= "email #{a['nagios']['email']}" unless a['nagios']['email'].nil? %>
}
<% end -%>
|
define contact {
contact_name root
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands service-notify-by-email
host_notification_commands host-notify-by-email
email root@localhost
}
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members <%= @members.join(',') %><%= ",pagerduty" unless node['nagios']['pagerduty_key'].empty? %>
}
define contactgroup {
contactgroup_name admins-sms
alias Sysadmin SMS
members <%= @members.join(',') %>
}
<% @admins.each do |a| -%>
define contact {
use default-contact
contact_name <%= a['id'] %>
<%= "email #{a['nagios']['email']}" unless a['nagios'].nil? || a['nagios']['email'].nil? %>
}
<% end -%>
| Check to make sure that not just a['nagios']['email'] exists, but also that a['nagios'] exists | Check to make sure that not just a['nagios']['email'] exists, but also that a['nagios'] exists
The previous check only worked if the nagios block existed, but not the
e-mail value. If the entire nagios block was missing an error would
still be thrown. I've tested this under both scenarios.
| HTML+ERB | apache-2.0 | Piousbox-cookbooks/nagios,aaronkvanmeerten/nagios,bitmonk/chef-nagios,spudnic/nagios,Tealium/nagios,polamjag/nagios,earzur/nagios,ovaistariq/nagios,mrlamroger/nagios,spudnic/nagios,Piousbox-cookbooks/nagios,jtimberman/nagios,cookbooks/oc-nagios,bitmonk/chef-nagios,OpenGov/nagios,mconf-cookbooks/nagios,caleb/nagios,CanaryTek/nagios,polamjag/nagios,firebase/nagios,firebase/nagios,mattupstate/nagios,cookbooks/mc-nagios,bitmonk/chef-nagios,firebase/nagios,ovaistariq/nagios,CanaryTek/nagios,JulianNL/nagios,CanaryTek/nagios,Tealium/nagios,hnakamur/nagios,earzur/nagios,aaronkvanmeerten/nagios,pierreozoux/nagios,mattupstate/nagios,mrlamroger/nagios,cookbooks/mc-nagios,polamjag/nagios,mrlamroger/nagios,JulianNL/nagios,aaronkvanmeerten/nagios,schubergphilis/nagios,JulianNL/nagios,ChrisLundquist/nagios,Tealium/nagios,Piousbox-cookbooks/nagios,cookbooks/mc-nagios,cookbooks/oc-nagios,ChrisLundquist/nagios,lusis/nagios,ChrisLundquist/nagios,Tealium/nagios,spudnic/nagios,ovaistariq/nagios,caleb/nagios,earzur/nagios,Tealium/nagios,OpenGov/nagios,bitmonk/chef-nagios,spudnic/nagios,Springest/nagios,schubergphilis/nagios,mconf-cookbooks/nagios,jtimberman/nagios,Tealium/nagios,schubergphilis/nagios,Piousbox-cookbooks/nagios,JulianNL/nagios,popsikle/nagios-5.3.5,OpenGov/nagios,mattupstate/nagios,firebase/nagios,jtimberman/nagios,cookbooks/oc-nagios,mconf-cookbooks/nagios,OpenGov/nagios,popsikle/nagios-5.3.5,mrlamroger/nagios | html+erb | ## Code Before:
define contact {
contact_name root
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands service-notify-by-email
host_notification_commands host-notify-by-email
email root@localhost
}
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members <%= @members.join(',') %><%= ",pagerduty" unless node['nagios']['pagerduty_key'].empty? %>
}
define contactgroup {
contactgroup_name admins-sms
alias Sysadmin SMS
members <%= @members.join(',') %>
}
<% @admins.each do |a| -%>
define contact {
use default-contact
contact_name <%= a['id'] %>
<%= "email #{a['nagios']['email']}" unless a['nagios']['email'].nil? %>
}
<% end -%>
## Instruction:
Check to make sure that not just a['nagios']['email'] exists, but also that a['nagios'] exists
The previous check only worked if the nagios block existed, but not the
e-mail value. If the entire nagios block was missing an error would
still be thrown. I've tested this under both scenarios.
## Code After:
define contact {
contact_name root
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands service-notify-by-email
host_notification_commands host-notify-by-email
email root@localhost
}
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members <%= @members.join(',') %><%= ",pagerduty" unless node['nagios']['pagerduty_key'].empty? %>
}
define contactgroup {
contactgroup_name admins-sms
alias Sysadmin SMS
members <%= @members.join(',') %>
}
<% @admins.each do |a| -%>
define contact {
use default-contact
contact_name <%= a['id'] %>
<%= "email #{a['nagios']['email']}" unless a['nagios'].nil? || a['nagios']['email'].nil? %>
}
<% end -%>
|
3ae2484cd088efe2476e591e7847efa7d646d47a | src/web/WEB-INF/web.xml | src/web/WEB-INF/web.xml | <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Jive Messenger</display-name>
<description>Open Source XMPP Server by Jive Software (jivesoftware.org)</description>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>messenger_i18n_en</param-value>
</context-param>
<!--@@STARTUP-SERVLET@@-->
<!--@@JSPC-SERVLETS@@-->
<taglib>
<taglib-uri>core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
</web-app>
| <?xmlTest version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Jive Messenger</display-name>
<description>Open Source XMPP Server by Jive Software (jivesoftware.org)</description>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>messenger_i18n_en</param-value>
</context-param>
<!--@@STARTUP-SERVLET@@-->
<!--@@JSPC-SERVLETS@@-->
<taglib>
<taglib-uri>core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>admin</taglib-uri>
<taglib-location>/WEB-INF/admin.tld</taglib-location>
</taglib>
</web-app>
| Add new tags for new UI | Add new tags for new UI
git-svn-id: 036f06d8526d2d198eab1b7c5596fd12295db076@255 b35dd754-fafc-0310-a699-88a17e54d16e
| XML | apache-2.0 | igniterealtime/Openfire,akrherz/Openfire,guusdk/Openfire,Gugli/Openfire,Gugli/Openfire,igniterealtime/Openfire,igniterealtime/Openfire,speedy01/Openfire,akrherz/Openfire,magnetsystems/message-openfire,GregDThomas/Openfire,speedy01/Openfire,magnetsystems/message-openfire,guusdk/Openfire,guusdk/Openfire,speedy01/Openfire,akrherz/Openfire,akrherz/Openfire,guusdk/Openfire,GregDThomas/Openfire,speedy01/Openfire,Gugli/Openfire,GregDThomas/Openfire,GregDThomas/Openfire,speedy01/Openfire,magnetsystems/message-openfire,Gugli/Openfire,akrherz/Openfire,igniterealtime/Openfire,magnetsystems/message-openfire,Gugli/Openfire,GregDThomas/Openfire,igniterealtime/Openfire,guusdk/Openfire,magnetsystems/message-openfire | xml | ## Code Before:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Jive Messenger</display-name>
<description>Open Source XMPP Server by Jive Software (jivesoftware.org)</description>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>messenger_i18n_en</param-value>
</context-param>
<!--@@STARTUP-SERVLET@@-->
<!--@@JSPC-SERVLETS@@-->
<taglib>
<taglib-uri>core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
</web-app>
## Instruction:
Add new tags for new UI
git-svn-id: 036f06d8526d2d198eab1b7c5596fd12295db076@255 b35dd754-fafc-0310-a699-88a17e54d16e
## Code After:
<?xmlTest version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Jive Messenger</display-name>
<description>Open Source XMPP Server by Jive Software (jivesoftware.org)</description>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>messenger_i18n_en</param-value>
</context-param>
<!--@@STARTUP-SERVLET@@-->
<!--@@JSPC-SERVLETS@@-->
<taglib>
<taglib-uri>core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>admin</taglib-uri>
<taglib-location>/WEB-INF/admin.tld</taglib-location>
</taglib>
</web-app>
|
9de0992f6dbfca92694c3af499a6ce2b003e2685 | Cargo.toml | Cargo.toml | [package]
name = "wiringpi"
version = "0.1.1"
authors = ["Erik Hedvall <[email protected]>"]
build = "build.rs"
exclude = ["scripts/*", "wiringPi/**/*.o"]
description = "An API wrapper for WiringPi, implementing the most important functions and provides a bit of type system convenience. See README.md for Raspberry Pi build instructions."
documentation = "http://ogeon.github.io/docs/rust-wiringpi/master/wiringpi/index.html"
repository = "https://github.com/Ogeon/rust-wiringpi"
readme = "README.md"
keywords = ["wiringpi", "wiring", "raspberry", "pi", "bindings"]
license = "MIT"
[features]
#Opt in to Rust-nightly features
nightly = []
#Don't build wiringPi C library.
#Useful when building documentation
noclib = []
[dependencies]
libc = "0.1" | [package]
name = "wiringpi"
version = "0.1.1"
authors = ["Erik Hedvall <[email protected]>"]
build = "build.rs"
exclude = ["scripts/*", "wiringPi/**/*.o", "wiringPi/examples/**", "examples/*"]
description = "An API wrapper for WiringPi, implementing the most important functions and provides a bit of type system convenience. See README.md for Raspberry Pi build instructions."
documentation = "http://ogeon.github.io/docs/rust-wiringpi/master/wiringpi/index.html"
repository = "https://github.com/Ogeon/rust-wiringpi"
readme = "README.md"
keywords = ["wiringpi", "wiring", "raspberry", "pi", "bindings"]
license = "MIT"
[features]
#Opt in to Rust-nightly features
nightly = []
#Don't build wiringPi C library.
#Useful when building documentation
noclib = []
[dependencies]
libc = "0.1" | Exclude examples from crates.io packages | Exclude examples from crates.io packages | TOML | mit | Ogeon/rust-wiringpi,lennartS/rust-wiringpi,Ogeon/rust-wiringpi,lennartS/rust-wiringpi | toml | ## Code Before:
[package]
name = "wiringpi"
version = "0.1.1"
authors = ["Erik Hedvall <[email protected]>"]
build = "build.rs"
exclude = ["scripts/*", "wiringPi/**/*.o"]
description = "An API wrapper for WiringPi, implementing the most important functions and provides a bit of type system convenience. See README.md for Raspberry Pi build instructions."
documentation = "http://ogeon.github.io/docs/rust-wiringpi/master/wiringpi/index.html"
repository = "https://github.com/Ogeon/rust-wiringpi"
readme = "README.md"
keywords = ["wiringpi", "wiring", "raspberry", "pi", "bindings"]
license = "MIT"
[features]
#Opt in to Rust-nightly features
nightly = []
#Don't build wiringPi C library.
#Useful when building documentation
noclib = []
[dependencies]
libc = "0.1"
## Instruction:
Exclude examples from crates.io packages
## Code After:
[package]
name = "wiringpi"
version = "0.1.1"
authors = ["Erik Hedvall <[email protected]>"]
build = "build.rs"
exclude = ["scripts/*", "wiringPi/**/*.o", "wiringPi/examples/**", "examples/*"]
description = "An API wrapper for WiringPi, implementing the most important functions and provides a bit of type system convenience. See README.md for Raspberry Pi build instructions."
documentation = "http://ogeon.github.io/docs/rust-wiringpi/master/wiringpi/index.html"
repository = "https://github.com/Ogeon/rust-wiringpi"
readme = "README.md"
keywords = ["wiringpi", "wiring", "raspberry", "pi", "bindings"]
license = "MIT"
[features]
#Opt in to Rust-nightly features
nightly = []
#Don't build wiringPi C library.
#Useful when building documentation
noclib = []
[dependencies]
libc = "0.1" |
695d21ace25cf9ddb6eabd82bbe39d35b34ae72f | mutt/urlhandler.sh | mutt/urlhandler.sh | frontmost() {
osascript <<EOF
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
end tell
EOF
}
before=$(frontmost)
open -g "$1"
sleep 0.1
after=$(frontmost)
if [ "$before" != "$after" ]; then
open -a "$before"
fi
|
open -g "$1"
| Revert "Fuck you google chrome" | Revert "Fuck you google chrome"
This reverts commit fea352cfbf274921bfaf18eeda9b5c40db7ef747.
This bug seems to have been fixed in Chrome
| Shell | mit | keith/dotfiles,keith/dotfiles,keith/dotfiles,keith/dotfiles,keith/dotfiles,keith/dotfiles | shell | ## Code Before:
frontmost() {
osascript <<EOF
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
end tell
EOF
}
before=$(frontmost)
open -g "$1"
sleep 0.1
after=$(frontmost)
if [ "$before" != "$after" ]; then
open -a "$before"
fi
## Instruction:
Revert "Fuck you google chrome"
This reverts commit fea352cfbf274921bfaf18eeda9b5c40db7ef747.
This bug seems to have been fixed in Chrome
## Code After:
open -g "$1"
|
e92b9eabecbb7fb90fc601f356d962fefe4f22c6 | _topics/topic-FAQ.md | _topics/topic-FAQ.md | ---
layout: topic
title: Frequently asked questions
author: Willy McAllister
comments: true
---
I get a questions about electrical engineering that are interesting but don't have a natural place to live. So they camp out here.
----
 [What's the difference between impedance and resistance?]({{ site.baseurl }}{% link _articles/difference-between-Z-and-R.md %})
 [Inductor - how it works]({{ site.baseurl }}{% link _articles/inductor-how-it-works.md %})
 [6 ways to generate voltage]({{ site.baseurl }}{% link _articles/six-ways-to-generate-voltage.md %})
| ---
layout: topic
title: Frequently asked questions
author: Willy McAllister
comments: true
---
I get a questions about electrical engineering that are interesting but don't have a natural place to live. So they camp out here for now.
----
 [What's the difference between impedance and resistance?]({{ site.baseurl }}{% link _articles/difference-between-Z-and-R.md %})
 [Inductor - how it works]({{ site.baseurl }}{% link _articles/inductor-how-it-works.md %})
 [6 ways to generate electricity]({{ site.baseurl }}{% link _articles/six-ways-to-generate-electricity.md %})
| Update link to 6 ways article. | Update link to 6 ways article.
| Markdown | mit | willymcallister/willymcallister.github.io,willymcallister/spinningnumbers,willymcallister/spinningnumbers,willymcallister/willymcallister.github.io,willymcallister/willymcallister.github.io,willymcallister/spinningnumbers | markdown | ## Code Before:
---
layout: topic
title: Frequently asked questions
author: Willy McAllister
comments: true
---
I get a questions about electrical engineering that are interesting but don't have a natural place to live. So they camp out here.
----
 [What's the difference between impedance and resistance?]({{ site.baseurl }}{% link _articles/difference-between-Z-and-R.md %})
 [Inductor - how it works]({{ site.baseurl }}{% link _articles/inductor-how-it-works.md %})
 [6 ways to generate voltage]({{ site.baseurl }}{% link _articles/six-ways-to-generate-voltage.md %})
## Instruction:
Update link to 6 ways article.
## Code After:
---
layout: topic
title: Frequently asked questions
author: Willy McAllister
comments: true
---
I get a questions about electrical engineering that are interesting but don't have a natural place to live. So they camp out here for now.
----
 [What's the difference between impedance and resistance?]({{ site.baseurl }}{% link _articles/difference-between-Z-and-R.md %})
 [Inductor - how it works]({{ site.baseurl }}{% link _articles/inductor-how-it-works.md %})
 [6 ways to generate electricity]({{ site.baseurl }}{% link _articles/six-ways-to-generate-electricity.md %})
|
b6d953acfa849c746899e107a66efc7b1e34ec95 | app/views/employees/_show.html.haml | app/views/employees/_show.html.haml | %ul.tabs
%li.active= link_to t_model, '#tab-contact'
%li= link_to t_model(Salary), '#tab-salaries'
%li= link_to t_title(:list, Invoice), '#tab-invoices'
%li= link_to t_title(:list, Activity), '#tab-activities' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:timesheet, Activity), '#tab-timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:list, Attachment), '#tab-attachments'
.tab-content
#tab-contact.active= render "form"
#tab-salaries= render 'show_salaries'
#tab-invoices= render 'show_invoices'
#tab-activities= render 'show_activities' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-timesheet= render 'show_timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-attachments= render 'show_attachments'
| %ul.tabs
%li.active= link_to t_model, '#tab-contact'
%li= link_to t_model(Salary), '#tab-salaries' if Bookyt::Engine.engines.include?('bookyt_salary')
%li= link_to t_title(:list, Invoice), '#tab-invoices'
%li= link_to t_title(:list, Activity), '#tab-activities' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:timesheet, Activity), '#tab-timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:list, Attachment), '#tab-attachments'
.tab-content
#tab-contact.active= render "form"
#tab-salaries= render 'show_salaries' if Bookyt::Engine.engines.include?('bookyt_salary')
#tab-invoices= render 'show_invoices'
#tab-activities= render 'show_activities' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-timesheet= render 'show_timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-attachments= render 'show_attachments'
| Include salary tab in employee view only if bookyt_salary is enabled. | Include salary tab in employee view only if bookyt_salary is enabled.
| Haml | agpl-3.0 | xuewenfei/bookyt,huerlisi/bookyt,silvermind/bookyt,wtag/bookyt,silvermind/bookyt,silvermind/bookyt,hauledev/bookyt,gaapt/bookyt,huerlisi/bookyt,gaapt/bookyt,huerlisi/bookyt,hauledev/bookyt,gaapt/bookyt,xuewenfei/bookyt,hauledev/bookyt,wtag/bookyt,hauledev/bookyt,silvermind/bookyt,wtag/bookyt,xuewenfei/bookyt,gaapt/bookyt | haml | ## Code Before:
%ul.tabs
%li.active= link_to t_model, '#tab-contact'
%li= link_to t_model(Salary), '#tab-salaries'
%li= link_to t_title(:list, Invoice), '#tab-invoices'
%li= link_to t_title(:list, Activity), '#tab-activities' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:timesheet, Activity), '#tab-timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:list, Attachment), '#tab-attachments'
.tab-content
#tab-contact.active= render "form"
#tab-salaries= render 'show_salaries'
#tab-invoices= render 'show_invoices'
#tab-activities= render 'show_activities' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-timesheet= render 'show_timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-attachments= render 'show_attachments'
## Instruction:
Include salary tab in employee view only if bookyt_salary is enabled.
## Code After:
%ul.tabs
%li.active= link_to t_model, '#tab-contact'
%li= link_to t_model(Salary), '#tab-salaries' if Bookyt::Engine.engines.include?('bookyt_salary')
%li= link_to t_title(:list, Invoice), '#tab-invoices'
%li= link_to t_title(:list, Activity), '#tab-activities' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:timesheet, Activity), '#tab-timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
%li= link_to t_title(:list, Attachment), '#tab-attachments'
.tab-content
#tab-contact.active= render "form"
#tab-salaries= render 'show_salaries' if Bookyt::Engine.engines.include?('bookyt_salary')
#tab-invoices= render 'show_invoices'
#tab-activities= render 'show_activities' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-timesheet= render 'show_timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
#tab-attachments= render 'show_attachments'
|
8a387d3e78c305f4fb861ee61f68943dd35c4c52 | .travis.yml | .travis.yml |
env:
global:
- secure: dIur06XYomBukvYR0aymt8D6YQpTGYvejZtInEmjOdnWziJJZmQ+HuTXMnXrrwFEFSC21uQfgBwhlItwcEzFu1ydx1LlxuUZh8sFjTFFrCWo3hRpyb4JGCAwoNvUZ1/d7MwHjGxjzFtMvnVPyo/wHlE2xgkWHZqmJfDgGkkpBuk=
language: rust
rust: nightly
script:
- cargo build
- cargo test
- cargo doc
- cd runtime; cargo test; cargo doc
|
env:
global:
- secure: dIur06XYomBukvYR0aymt8D6YQpTGYvejZtInEmjOdnWziJJZmQ+HuTXMnXrrwFEFSC21uQfgBwhlItwcEzFu1ydx1LlxuUZh8sFjTFFrCWo3hRpyb4JGCAwoNvUZ1/d7MwHjGxjzFtMvnVPyo/wHlE2xgkWHZqmJfDgGkkpBuk=
language: rust
rust: nightly
script:
- cargo build
- cargo test
- cargo doc
- cd runtime; cargo test; cargo doc; cd ..
- cd parsers; cargo test; cargo doc; cd ..
| Test parsers sub-crate with Travis. | [Architecture][Parsers] Test parsers sub-crate with Travis.
| YAML | apache-2.0 | ptal/Rust.peg,ptal/oak | yaml | ## Code Before:
env:
global:
- secure: dIur06XYomBukvYR0aymt8D6YQpTGYvejZtInEmjOdnWziJJZmQ+HuTXMnXrrwFEFSC21uQfgBwhlItwcEzFu1ydx1LlxuUZh8sFjTFFrCWo3hRpyb4JGCAwoNvUZ1/d7MwHjGxjzFtMvnVPyo/wHlE2xgkWHZqmJfDgGkkpBuk=
language: rust
rust: nightly
script:
- cargo build
- cargo test
- cargo doc
- cd runtime; cargo test; cargo doc
## Instruction:
[Architecture][Parsers] Test parsers sub-crate with Travis.
## Code After:
env:
global:
- secure: dIur06XYomBukvYR0aymt8D6YQpTGYvejZtInEmjOdnWziJJZmQ+HuTXMnXrrwFEFSC21uQfgBwhlItwcEzFu1ydx1LlxuUZh8sFjTFFrCWo3hRpyb4JGCAwoNvUZ1/d7MwHjGxjzFtMvnVPyo/wHlE2xgkWHZqmJfDgGkkpBuk=
language: rust
rust: nightly
script:
- cargo build
- cargo test
- cargo doc
- cd runtime; cargo test; cargo doc; cd ..
- cd parsers; cargo test; cargo doc; cd ..
|
3c839d23e4bee8d97486cdb26d27bfff9403d826 | themes/default/views/clearboard/partials/thread-userpane.blade.php | themes/default/views/clearboard/partials/thread-userpane.blade.php | <img src="{{ $post->poster()->first()->avatarUrl() }}" alt="" class="post-avatar">
<div class="post-username">{{ $post->poster()->first()->name }}</div>
<div class="post-badge">Admin</div> | <img src="{{ $post->poster()->first()->avatarUrl() }}" alt="" class="post-avatar">
<div class="post-username">{{ $post->poster()->first()->name }}</div> | Remove admin badge from displaying on every post | Remove admin badge from displaying on every post
| PHP | mit | clearboard/clearboard,clearboard/clearboard,mitchfizz05/clearboard,mitchfizz05/clearboard | php | ## Code Before:
<img src="{{ $post->poster()->first()->avatarUrl() }}" alt="" class="post-avatar">
<div class="post-username">{{ $post->poster()->first()->name }}</div>
<div class="post-badge">Admin</div>
## Instruction:
Remove admin badge from displaying on every post
## Code After:
<img src="{{ $post->poster()->first()->avatarUrl() }}" alt="" class="post-avatar">
<div class="post-username">{{ $post->poster()->first()->name }}</div> |
f97df9072f339b1a9e623b9b11715012e668b09e | addon/mixins/sweetalert-mixin.js | addon/mixins/sweetalert-mixin.js | import Ember from 'ember';
import sweetAlert from '../index';
const { Mixin } = Ember;
export default Mixin.create({
sweetAlert: sweetAlert
});
| import Ember from 'ember';
import sweetAlert from '../index';
const { Mixin } = Ember;
export default Mixin.create({
sweetAlert
});
| Fix enhanced object literal lint error | Fix enhanced object literal lint error
| JavaScript | mit | Tonkpils/ember-sweetalert,Tonkpils/ember-sweetalert | javascript | ## Code Before:
import Ember from 'ember';
import sweetAlert from '../index';
const { Mixin } = Ember;
export default Mixin.create({
sweetAlert: sweetAlert
});
## Instruction:
Fix enhanced object literal lint error
## Code After:
import Ember from 'ember';
import sweetAlert from '../index';
const { Mixin } = Ember;
export default Mixin.create({
sweetAlert
});
|
990dbd2a575660212d48b23fdea91731680cc8e5 | ghdocs/ROADMAP.md | ghdocs/ROADMAP.md |
Our roadmap used to be contained in a single markdown file, but has since been transferred to a nifty Trello board where you can view requests, add comments, or even vote so we know what folks need.
To view the Trello board (that includes old requests that used to be in this file) please see the [Office UI Fabric Core Requests board](https://trello.com/b/sPTXiMzG/office-ui-fabric-core-requests).
|
Our roadmap used to be contained in a single markdown file, but has since been transferred to a nifty Trello board where you can view requests, add comments, or even vote so we know what folks need.
To view the Trello board (that includes old requests that used to be in this file) please see the [Office UI Fabric Core Requests board](https://trello.com/b/sPTXiMzG/office-ui-fabric-core-requests). If you'd like to make a new request, please file an issue in [the Fabric Core's issue tracker](https://github.com/OfficeDev/office-ui-fabric-core/issues) so we can add it to the Trello board.
| Add line to roadmap about new requests | Add line to roadmap about new requests
| Markdown | mit | OfficeDev/Office-UI-Fabric,OfficeDev/Office-UI-Fabric | markdown | ## Code Before:
Our roadmap used to be contained in a single markdown file, but has since been transferred to a nifty Trello board where you can view requests, add comments, or even vote so we know what folks need.
To view the Trello board (that includes old requests that used to be in this file) please see the [Office UI Fabric Core Requests board](https://trello.com/b/sPTXiMzG/office-ui-fabric-core-requests).
## Instruction:
Add line to roadmap about new requests
## Code After:
Our roadmap used to be contained in a single markdown file, but has since been transferred to a nifty Trello board where you can view requests, add comments, or even vote so we know what folks need.
To view the Trello board (that includes old requests that used to be in this file) please see the [Office UI Fabric Core Requests board](https://trello.com/b/sPTXiMzG/office-ui-fabric-core-requests). If you'd like to make a new request, please file an issue in [the Fabric Core's issue tracker](https://github.com/OfficeDev/office-ui-fabric-core/issues) so we can add it to the Trello board.
|
aea8a3e0a9f9ba67261f62912c30e86beb05d3c3 | resources/views/admin/crud/index-search.blade.php | resources/views/admin/crud/index-search.blade.php | <div class="row">
<div class="small-12 medium-6 columns">
{!! Form::open(['url' => '/admin/' . $repository->getHandle() . '/search']) !!}
<div class="row collapse">
<div class="small-10 columns">
{!! Form::text('search', session('admin.' . $repository->getHandle() . '.search'), ['autofocus']) !!}
</div>
<div class="small-2 columns">
<button class="button postfix">
Search
</button>
</div>
</div>
{!! Form::close() !!}
</div>
</div> | <div class="row">
<div class="small-12 medium-6 columns">
{!! Form::open(['url' => '/admin/' . $repository->getHandle() . '/search']) !!}
<div class="input-group">
{!! Form::text('search', session('admin.' . $repository->getHandle() . '.search'), ['autofocus', 'class' => 'input-group-field']) !!}
<div class="input-group-button">
<input type="submit" class="button" value="Search" />
</div>
</div>
{!! Form::close() !!}
</div>
</div> | Fix search bar for crud indexes | Fix search bar for crud indexes
| PHP | mit | JVMartin/angel,JVMartin/angel5,JVMartin/angel5,JVMartin/angel,JVMartin/angel5,JVMartin/angel5,JVMartin/angel,JVMartin/angel | php | ## Code Before:
<div class="row">
<div class="small-12 medium-6 columns">
{!! Form::open(['url' => '/admin/' . $repository->getHandle() . '/search']) !!}
<div class="row collapse">
<div class="small-10 columns">
{!! Form::text('search', session('admin.' . $repository->getHandle() . '.search'), ['autofocus']) !!}
</div>
<div class="small-2 columns">
<button class="button postfix">
Search
</button>
</div>
</div>
{!! Form::close() !!}
</div>
</div>
## Instruction:
Fix search bar for crud indexes
## Code After:
<div class="row">
<div class="small-12 medium-6 columns">
{!! Form::open(['url' => '/admin/' . $repository->getHandle() . '/search']) !!}
<div class="input-group">
{!! Form::text('search', session('admin.' . $repository->getHandle() . '.search'), ['autofocus', 'class' => 'input-group-field']) !!}
<div class="input-group-button">
<input type="submit" class="button" value="Search" />
</div>
</div>
{!! Form::close() !!}
</div>
</div> |
d976e01015aea0860393e6da1b1e7c09c2c59952 | test/test_helper.js | test/test_helper.js | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from '../src/reducers';
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
const $ = _$(window);
chaiJquery(chai, chai.util, $);
function renderComponent(ComponentClass, props = {}, state = {}) {
const componentInstance = TestUtils.renderIntoDocument(
<Provider store={createStore(reducers, state)}>
<ComponentClass {...props} />
</Provider>
);
return $(ReactDOM.findDOMNode(componentInstance));
}
$.fn.simulate = function(eventName, value) {
if (value) {
this.val(value);
}
TestUtils.Simulate[eventName](this[0]);
};
export {renderComponent, expect};
| import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from '../src/reducers';
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
global.navigator = global.window.navigator;
const $ = _$(window);
chaiJquery(chai, chai.util, $);
function renderComponent(ComponentClass, props = {}, state = {}) {
const componentInstance = TestUtils.renderIntoDocument(
<Provider store={createStore(reducers, state)}>
<ComponentClass {...props} />
</Provider>
);
return $(ReactDOM.findDOMNode(componentInstance));
}
$.fn.simulate = function(eventName, value) {
if (value) {
this.val(value);
}
TestUtils.Simulate[eventName](this[0]);
};
export {renderComponent, expect};
| Add global navigator setting to modify the error, 'navigator is not defined', in testing with react-router link | Add global navigator setting to modify the error, 'navigator is not defined', in testing with react-router link
| JavaScript | mit | DeAnnHuang/ReduxSimpleStarter,zivolution921/ReduxSimpleStarter2,carlos-agu/BlogPosts,YacYac/ReduxSimpleStarter,sebasj/udemy-react-redux-blog,Bojan17/weatherApp,roelver/twotter,robertorb21/ReduxSimpleStarter,erlinis/ReduxSimpleStarter,josephcode773/reactYoutubeViewer,paulofabiano/react-redux-blog,allenyin55/reading_with_Annie,rcwlabs/yt-react,JAstbury/react-simple-game,raviwu/react-weather,gaspar-tovar-civitas/jobsityChallenge,LeoArouca/ReactRedux_Part4,gothbarbie/client-auth,vamsikoduri/udemy_next_level_redux,feineken/weather-redux,rahavMatan/react-phonecat,ASH-khan/ReduxMiddleware,ljones140/react_redux_weather_app,JosephLeon/redux-simple-starter-tutorial,kaloudiyi/VotePlexClient,MsZlets/Circles,camboio/ibis,hlgbls/ReduxSimpleStarter,SRosenshein/react-auth-client,dmichaelglenn/react_udemy,andrewdc92/react-crud-blog,nimibahar/reduxBlog,RaneWallin/FCCLeaderboard,DeAnnHuang/ReduxSimpleStarter,cynthiacd/capstone-factoring-app,IvanMigov/ReactAuthenticationClient,phirefly/react-redux-starter,TheeSweeney/ReactReview,bambery/udemy-react-booklist,AaronBDC/blogRRR,dakotahavel/weather-chart,angela-cheng/simpleBlog,ArashDai/portfolio,dushyant/ReactWeatherApp,ftoresan/react-redux-course,sebasj/udemy-react-redux-blog,johnnyvf24/hellochess-v2,finfort/TodoReactApp,giapiazze/react-redux-weather,hekgarcia/ReduxSimpleStarter,JunyuChen-0115/ReactWithRedux,nik149/react_test,carlos-agu/BlogPosts,alirezahi/ReminderPro,LeeLa-Jet/nick,erjin/ReduxSimpleStarter,alexkarevoll/ReduxSimpleTester,kevinsangnguyen/WeatherAPIReactRedux,bolivierjr/Weather-Chart-App,marktong11/blog,marktong11/blog,roelver/twotter,gsambrotta/weather-app-redux,ljones140/react_redux_weather_app,Jcook894/Blog_App,jetshoji/Asia_Trip,tpechacek/redux-blog,AdinoyiSadiq/back-office-tool,eandy5000/react_auth,hamholla/concentration,vikasv/ReactWithRedux,Alex-Windle/rijksmuseum_api,Fendoro/YouTubeVideoList,AdinoyiSadiq/back-office-tool,makxks/ReactBlog,TheeSweeney/ReactReview,OatsAndSquats25/React-redux-weather-app,dragonman225/TODO-React,seanrtaylor/ReactWeather,kprzybylowski/redux,nbreath/react-practice,Alex-Windle/rijksmuseum_api,ajdeleon/weather,mateusrdgs/ReactTraining,sohail87/ReduxWeather,Activesite/ReduxMiddleware,RichardDorn/mastermind-clone,rahavMatan/react-phonecat,lCavazzani/ReactReduxStarter,julianomoreira/ReduxSimpleStarter,periman2/DungeonRoller,vmandic/ReduxBlogEntries,milangupta511/react-todo-list,madi031/ReactRouterBlog,MaxwellKendall/Book-Project,shashankp250/Youtube_clone,CalinoviciPaul/react,juneshaw/ReactBlog,giapiazze/react-redux-weather,josebigio/PodCast,fifiteen82726/ReduxSimpleStarter,AnushaBalusu/ReactReduxStarterApp,puan0601/dronetube,walker808/exploreMapBoxHack,nimibahar/reduxBlog,izabelka/redux-simple-starter,mdunnegan/ReactFrontEndAuthentication,Legaspi21/react-redux,deinde/React_Higher_Order_Components,finfort/TodoReactApp,khanhhq2k/react-youtube-search-api,OatsAndSquats25/React-redux-weather-app,aloaiza/ReduxSimpleStarter,manuelescamilla/youtube-browser,Activesite/Middleware,vndeguzman/redux-exercise,arbianchi/familiestogether-react,arbianchi/familiestogether-react,eunbigo91/ReduxSimpleStarter,StephenGrider/ReduxSimpleStarter,harshattray/w_track,JAstbury/react-simple-game,huynhtastic/ReduxSimpleStarter,michaeldumalag/react-blog,rafaalb/BlogsReact,yonarbel/reactWeatherApp,Eleutherado/ReactBasicBlog,aquajach/react_redux_tutorial,Rickardkamel/React-Testing,mateusrdgs/ReactTraining,dustin520/ReduxSimpleStarter,tlantz77/ReactWeather,daveprochazka/ReduxSimpleStarter,danielnavram/React-youtube-api,dcporter44/tunefest-frontend,danielnavram/React-youtube-api,JenPhD/ReactYouTubeSearch,MrmRed/test,majalcmaj/ReactJSCourse,Karthik9321/ReduxSimpleStarter,paulofabiano/react-redux-blog,johnnyvf24/hellochess-v2,wongjenn/redux-weather-app,mdunnegan/ReactFrontEndAuthentication,vanessamuller/ReduxSimpleStarter,jocelio/meuclima,hollymhofer/ReduxForms,majalcmaj/ReactJSCourse,yonarbel/reactWeatherApp,alexkarevoll/ReduxSimpleTester,darknight1983/React_Youtube_searchSite,tuncatunc/react-blog,morthenn/ReduxSimpleStarter,RegOpz/RegOpzWebApp,tanimmahmud/React_youtube_search,harunawaizumi/weather_graph,kanokgan/ReduxSimpleStarter,iamwithnail/react-redux,ezetreezy/reactTesting,dpano/redux-d,iamwithnail/react-redux,spartanhooah/BlogApp,TheBitsDontByte/React_SimpleYoutube,Alex-Windle/redux_weather_API,unhommequidort/redux_blog,steeeeee/udemy-react-redux-blog,majalcmaj/ReactJSCourse,huynhtastic/ReduxSimpleStarter,Alex-Windle/redux_weather_API,jordanyryan/JDTube,erdgabios/react-youtube-search,alxDiaz/reactFirstProject,Jdraju/TelcoMNP,ajdeleon/weather,icartusacrimea/portfolio_reactredux,noframes/react-youtube-search,SupachaiChaipratum/ReduxSimpleStarter,OscarDeDios/cursoUdemyReact,D7Torres/react-forecastsparks,framirez224/youtube-search,matwej/IAmHungryFor,maorefaeli/BookList,makxks/ReactBlog,LawynnJana/weneedanidea,lCavazzani/ReactReduxStarter,christophertphillips/react-video-interface,polettoweb/ReactReduxStarter,nushicoco/books_rabbit,mchaelml/Atom-React,relaunched/book_list,ASH-khan/ReduxMiddleware,davidmferris/showhopper_v3_client,vamsikoduri/udemy_next_level_redux,jetshoji/Asia_Trip,fifiteen82726/ReduxSimpleStarter,MartinMattyZahradnik/Assignment,Schachte/React-Routes-Learning,reactjs-andru1989/blog,jordanyryan/JDTube,IvanMigov/ReactAuthenticationClient,ravindraranwala/countdowntimerapp,darknight1983/React_Youtube_searchSite,vominhhoang308/ReduxSimpleStarter,dcporter44/tunefest-frontend,ArashDai/portfolio,phirefly/react-redux-starter,lingyaomeng1/youtube-search,erjin/ReduxSimpleStarter,tgundavelli/React_Udemy,budaminof/scoreboard,venus-nautiyal/react_app,khanhhq2k/react-youtube-search-api,nimibahar/newReduxBlog,dukarc/lolchamps,SRosenshein/react-auth-client,bryanbuitrago/reactVideoApp,josebigio/PodCast,Ianpig/mobile-select,stewarea/React-Youtube,GuroKung/react-redux-starter,peterussell/udemy-4-redux-wx,camboio/ibis,tareq-rar/reduxReact,OscarDeDios/cursoUdemyReact,Rickardkamel/React-Testing,fahadqazi/react-redux,kanokgan/ReduxSimpleStarter,julianomoreira/ReduxSimpleStarter,JosephLeon/redux-simple-starter-tutorial,richgurney/ReduxBlogBoilerPlate,nik149/react_test,jeroenmies/WeatherForecast,morthenn/ReduxSimpleStarter,cynthiacd/capstone-factoring-app,LeeLa-Jet/nick,relaunched/book_list,michaeldumalag/react-blog,harshattray/w_track,CalinoviciPaul/react,gothbarbie/client-auth,laniywh/game-of-life,dakotahavel/weather-chart,ezetreezy/reactTesting,nicolasmsg/react-blog,kyrogue/ReactReduxStart,briceth/reactBlog,christophertphillips/react-video-interface,cgonul/MyReduxSimpleStarter,andreassiegel/react-redux,yingchen0706/ReduxForm,nfcortega89/nikkotoonaughty,hisastry/udemy-react,manjarb/ReduxSimpleStarter,JoshHarris85/React-Video-Player,benjaminboruff/CityWeather,ProstoBoris/ReactMemoryGame,IanY57/ReduxSimpleStarter,yingchen0706/ReduxForm,erdgabios/react-youtube-search,mustafashakeel/reduxexample-family,tareq-rar/reduxReact,periman2/DungeonRoller,ercekal/client-side-auth-react,nilvisa/LEK_react-with-redux,maorefaeli/BookList,raninho/learning-reactjs,simondate/Youtube-react-app,vikasv/ReactWithRedux,JunyuChen-0115/ReactWithRedux,natcreates/react-learning,kristingreenslit/react-redux-weather-browser,MartinMattyZahradnik/Assignment,zivolution921/ReduxSimpleStarter2,eandy5000/react_auth,sean1rose/WeatherApp,RegOpz/RegOpzWebApp,leventku/redux-idea-tiles,Bassov/Weather,dragonman225/TODO-React,jocelio/meuclima,simondate/Youtube-react-app,jeroenmies/WeatherForecast,edwardcroh/traveler,wongjenn/redux-weather-app,nsepehr/weatherApp,StephanYu/modern_redux_weather_forecast,kprzybylowski/redux,YacYac/ReduxSimpleStarter,oldirony/react-router-playground,pporche87/react-youtube-clone,raviwu/react-weather,pornarong/weather-redux,nilvisa/LEK_react-with-redux,liyan90s/react-redux-funtime,mustafashakeel/reduxexample-family,dpano/redux-d,andreassiegel/react-redux,mdunnegan/ReduxDrumApp,vominhhoang308/ReduxSimpleStarter,skywindzz/higher-order-component,IanY57/ReduxSimpleStarter,ckwong93/TailsFromTheCrypt,merry75/ReduxBookLibrary,dustin520/ReduxSimpleStarter,matwej/IAmHungryFor,kaloudiyi/VotePlexClient,natcreates/react-learning,vndeguzman/redux-exercise,pporche87/react-youtube-clone,Szalbik/reacttodos,albertchanged/YouTube-Topics,RegOpz/RegOpzWebApp,JenPhD/ReactYouTubeSearch,daveprochazka/ReduxSimpleStarter,AdinoyiSadiq/back-office-tool,Szalbik/reacttodos,blueeyess/redux-intermediate,merry75/ReduxBookLibrary,Fendoro/YouTubeVideoList,vtkamiji/react-aula4,richgurney/ReactTemperatureApp,hekgarcia/ReduxSimpleStarter,ravindraranwala/countdowntimerapp,manjarb/ReduxSimpleStarter,puan0601/dronetube,davidmferris/showhopper_v3_client,RichardDorn/mastermind-clone,KamillaKhabibrakhmanova/redux_blog,venus-nautiyal/react_app,ckwong93/TailsFromTheCrypt,bolivierjr/Weather-Chart-App,rickywid/micdb,framirez224/youtube-search,enuber/Redux_starter,ravindraranwala/piglatinconverterapp,nicolasmsg/react-blog,steeeeee/udemy-react-redux-blog,nimibahar/newReduxBlog,vtkamiji/react-aula4,eunbigo91/ReduxSimpleStarter,ravindraranwala/piglatinconverterapp,izabelka/redux-simple-starter,TheBitsDontByte/React_SimpleYoutube,Bojan17/weatherApp,kristingreenslit/react-redux-weather-browser,JeremyWeisener/Test,MrmRed/test,mlombard82/weatherApp,liyan90s/react-redux-funtime,mlombard82/weatherApp,vanessamuller/ReduxSimpleStarter,Legaspi21/react-redux,AnushaBalusu/ReactReduxStarterApp,dragonman225/TODO-React,tomdzi5/redux4,StephanYu/modern_redux_weather_forecast,AaronBDC/blogRRR,laniywh/game-of-life,oldirony/react-router-playground,vanpeta/react-reduct-blog,edwardcroh/traveler,nushicoco/books_rabbit,raninho/learning-reactjs,unhommequidort/redux_blog,walker808/exploreMapBoxHack,noframes/react-youtube-search,Activesite/ReduxMiddleware,milangupta511/react-todo-list,Funkycamel/Modern-React-with-Redux-React-Router-and-Redux-Form-Section-9,hlgbls/ReduxSimpleStarter,lingyaomeng1/youtube-search,vtkamiji/react-aula3,Jaime691/ReactTube,sohail87/ReduxWeather,laharidas/ReactReduxTesting,StephenGrider/ReduxSimpleStarter,cgonul/MyReduxSimpleStarter,icartusacrimea/portfolio_reactredux,andrewdc92/react-crud-blog,angela-cheng/simpleBlog,deinde/React_Higher_Order_Components,MaxwellKendall/Book-Project,tuncatunc/react-blog,JeremyWeisener/Test,SupachaiChaipratum/ReduxSimpleStarter,budaminof/scoreboard,asengardeon/react-video-player,flpelluz/weatherApp,Bentopi/React_Youtube_UI,rafaalb/BlogsReact,D7Torres/react-forecastsparks,tpechacek/redux-blog,Jdraju/TelcoMNP,eduarmreyes/ReactWeatherApp,Phani17/WeatherReport,yihan940211/WTFSIGTP,ProstoBoris/ReactMemoryGame,abramin/reduxStarter,erlinis/ReduxSimpleStarter,Funkycamel/Modern-React-with-Redux-React-Router-and-Redux-Form-Section-9,polettoweb/ReactReduxStarter,nsepehr/weatherApp,warniel08/React-MockTubeTut,josephcode773/reactYoutubeViewer,lukebergen/react-redux-reference,tlantz77/ReactWeather,reactjs-andru1989/blog,rickywid/micdb,allenyin55/reading_with_Annie,kyrogue/ReactReduxStart,eduarmreyes/ReactWeatherApp,dukarc/lolchamps,KaeyangTheG/react-chessboard,hisastry/udemy-react,dom-mages/reactTesting,josebigio/PodCast,tanimmahmud/React_youtube_search,RaulEscobarRivas/client,MarekTalpas/GL_hire,gabriellisboa/reduxStudies,blueeyess/redux-intermediate,manuelescamilla/youtube-browser,kevinsangnguyen/WeatherAPIReactRedux,robertorb21/ReduxSimpleStarter,fahadqazi/react-redux,scottjbarr/blinky,RaulEscobarRivas/client,gaspar-tovar-civitas/jobsityChallenge,enuber/Redux_starter,christat/react-redux,gabriellisboa/reduxStudies,Shohin93/ReactRedux,seanrtaylor/ReactWeather,MarekTalpas/GL_hire,ric9176/hoc,JoshHarris85/React-Video-Player,theoryNine/react-video-browser,ercekal/client-side-auth-react,Ianpig/mobile-select,stewarea/React-Youtube,feineken/weather-redux,Karthik9321/ReduxSimpleStarter,Schachte/React-Routes-Learning,pornarong/weather-redux,hamholla/concentration,yihan940211/WTFSIGTP,sean1rose/WeatherApp,leventku/redux-idea-tiles,richgurney/ReduxBlogBoilerPlate,Phani17/WeatherReport,briceth/reactBlog,bambery/udemy-react-booklist,juneshaw/ReactBlog,Shohin93/ReactRedux,harunawaizumi/weather_graph,rcwlabs/yt-react,tomdzi5/redux4,alirezahi/ReminderPro,aquajach/react_redux_tutorial,jstowers/ReduxBlogApp,Eleutherado/ReactBasicBlog,Jcook894/Blog_App,shashankp250/Youtube_clone,Jaime691/ReactTube,peterussell/udemy-4-redux-wx,MsZlets/Circles,vanpeta/react-reduct-blog,alxDiaz/reactFirstProject,vtkamiji/react-aula3,GuroKung/react-redux-starter,johnnyvf24/hellochess-v2,hollymhofer/ReduxForms,lukebergen/react-redux-reference,ric9176/hoc,gsambrotta/weather-app-redux,ftoresan/react-redux-course,RaneWallin/FCCLeaderboard,Activesite/Middleware,Bassov/Weather,benjaminboruff/CityWeather,jstowers/ReduxBlogApp,nbreath/react-practice,laharidas/ReactReduxTesting,tgundavelli/React_Udemy,RaneWallin/FCCLeaderboard,mchaelml/Atom-React,vmandic/ReduxBlogEntries,KamillaKhabibrakhmanova/redux_blog,theoryNine/react-video-browser,ryanmagoon/simple-blog,LawynnJana/weneedanidea,ryanmagoon/simple-blog,KaeyangTheG/react-chessboard,spartanhooah/BlogApp,mdunnegan/ReduxDrumApp,LeoArouca/ReactRedux_Part4,nfcortega89/nikkotoonaughty,madi031/ReactRouterBlog,christat/react-redux,albertchanged/YouTube-Topics,skywindzz/higher-order-component,Bentopi/React_Youtube_UI,abramin/reduxStarter,bryanbuitrago/reactVideoApp,dom-mages/reactTesting,dushyant/ReactWeatherApp,asengardeon/react-video-player,warniel08/React-MockTubeTut,hamholla/concentration,aloaiza/ReduxSimpleStarter,dmichaelglenn/react_udemy,scottjbarr/blinky,flpelluz/weatherApp | javascript | ## Code Before:
import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from '../src/reducers';
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
const $ = _$(window);
chaiJquery(chai, chai.util, $);
function renderComponent(ComponentClass, props = {}, state = {}) {
const componentInstance = TestUtils.renderIntoDocument(
<Provider store={createStore(reducers, state)}>
<ComponentClass {...props} />
</Provider>
);
return $(ReactDOM.findDOMNode(componentInstance));
}
$.fn.simulate = function(eventName, value) {
if (value) {
this.val(value);
}
TestUtils.Simulate[eventName](this[0]);
};
export {renderComponent, expect};
## Instruction:
Add global navigator setting to modify the error, 'navigator is not defined', in testing with react-router link
## Code After:
import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from '../src/reducers';
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
global.navigator = global.window.navigator;
const $ = _$(window);
chaiJquery(chai, chai.util, $);
function renderComponent(ComponentClass, props = {}, state = {}) {
const componentInstance = TestUtils.renderIntoDocument(
<Provider store={createStore(reducers, state)}>
<ComponentClass {...props} />
</Provider>
);
return $(ReactDOM.findDOMNode(componentInstance));
}
$.fn.simulate = function(eventName, value) {
if (value) {
this.val(value);
}
TestUtils.Simulate[eventName](this[0]);
};
export {renderComponent, expect};
|
1b2794d5488173de93ea6bdbd500eeeabff675a3 | src/main/resources/static/css/main.css | src/main/resources/static/css/main.css | body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1;
}
body > header, article {
margin-bottom: 1.75rem;
}
body > footer {
margin-top: 1.2rem;
padding-bottom: 1.4rem;
padding-top: 1.4rem;
}
main header {
margin-bottom: 0.6rem;
}
.navbar {
padding-left: 0;
}
.truncated {
display: inline-block;
vertical-align: bottom;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
| body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1;
}
body > header, article {
margin-bottom: 1.75rem;
}
body > footer {
margin-top: 1.2rem;
padding-bottom: 1.4rem;
padding-top: 1.4rem;
}
main header {
margin-bottom: 0.6rem;
}
.navbar {
padding-left: 0;
padding-right: 0;
}
.truncated {
display: inline-block;
vertical-align: bottom;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
| Set navbar left padding to 0 | Set navbar left padding to 0
| CSS | mit | piotr-rusin/yule,piotr-rusin/yule,piotr-rusin/yule,piotr-rusin/yule | css | ## Code Before:
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1;
}
body > header, article {
margin-bottom: 1.75rem;
}
body > footer {
margin-top: 1.2rem;
padding-bottom: 1.4rem;
padding-top: 1.4rem;
}
main header {
margin-bottom: 0.6rem;
}
.navbar {
padding-left: 0;
}
.truncated {
display: inline-block;
vertical-align: bottom;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
## Instruction:
Set navbar left padding to 0
## Code After:
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1;
}
body > header, article {
margin-bottom: 1.75rem;
}
body > footer {
margin-top: 1.2rem;
padding-bottom: 1.4rem;
padding-top: 1.4rem;
}
main header {
margin-bottom: 0.6rem;
}
.navbar {
padding-left: 0;
padding-right: 0;
}
.truncated {
display: inline-block;
vertical-align: bottom;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
|
79ebdc3c1c8befb4eb3d1f0713edf281ab6645da | spec/consolePresenter_spec.rb | spec/consolePresenter_spec.rb | require 'consolePresenter'
RSpec.describe ConsolePresenter do
context "With stubbed input and output" do
let(:input) { double("STDIN") }
let(:output) {
output = double("STDOUT")
printed = ""
allow(output).to receive(:print) { |text|
printed += text
}
flushed = ""
allow(output).to receive(:flush) {
flushed += printed
printed = ""
}
allow(output).to receive(:printed) { printed }
allow(output).to receive(:flushed) { flushed }
output
}
let (:io) { ConsoleIO.new(input: input, output: output) }
let (:word) { "pneumatic" }
let (:language) { Language.new } # Will always just do [[:langstringhere||:argshere]] syntax
let (:hangman) { Hangman.new(word: word) }
subject { ConsolePresenter.new(io: io) }
describe "Error handling" do
it "should displaying nothing when no error happend" do
subject.display_error
expect(output.printed).to be_empty
expect(output.flushed).to be_empty
end
end
end
end
| require 'consolePresenter'
RSpec.describe ConsolePresenter do
context "With stubbed input and output" do
let(:input) { double("STDIN") }
let(:output) {
output = double("STDOUT")
printed = ""
allow(output).to receive(:print) { |text|
printed += text
}
flushed = ""
allow(output).to receive(:flush) {
flushed += printed
printed = ""
}
allow(output).to receive(:printed) { printed }
allow(output).to receive(:flushed) { flushed }
output
}
let (:io) { ConsoleIO.new(input: input, output: output) }
let (:word) { "pneumatic" }
let (:language) { Language.new } # Will always just do [[:langstringhere||:argshere]] syntax, test langs seperately
let (:hangman) { Hangman.new(word: word) }
subject { ConsolePresenter.new(io: io) }
describe "Error handling" do
let(:error) { :testingerror}
it "should displaying nothing when no error happend" do
subject.display_error
expect(output.printed).to be_empty
expect(output.flushed).to be_empty
end
it "should not display the error after adding" do
subject.add_error(error)
expect(output.printed).to be_empty
expect(output.flushed).to be_empty
end
it "should display the error we add with a new line" do
subject.add_error(error)
subject.display_error
expect(output.printed).to be_empty
expect(output.flushed).to eq "[["+error.to_s+"]]\n"
end
end
end
end
| Test error display in presenter | Test error display in presenter
| Ruby | mit | hughdavenport/powershop_devtrain_hangman | ruby | ## Code Before:
require 'consolePresenter'
RSpec.describe ConsolePresenter do
context "With stubbed input and output" do
let(:input) { double("STDIN") }
let(:output) {
output = double("STDOUT")
printed = ""
allow(output).to receive(:print) { |text|
printed += text
}
flushed = ""
allow(output).to receive(:flush) {
flushed += printed
printed = ""
}
allow(output).to receive(:printed) { printed }
allow(output).to receive(:flushed) { flushed }
output
}
let (:io) { ConsoleIO.new(input: input, output: output) }
let (:word) { "pneumatic" }
let (:language) { Language.new } # Will always just do [[:langstringhere||:argshere]] syntax
let (:hangman) { Hangman.new(word: word) }
subject { ConsolePresenter.new(io: io) }
describe "Error handling" do
it "should displaying nothing when no error happend" do
subject.display_error
expect(output.printed).to be_empty
expect(output.flushed).to be_empty
end
end
end
end
## Instruction:
Test error display in presenter
## Code After:
require 'consolePresenter'
RSpec.describe ConsolePresenter do
context "With stubbed input and output" do
let(:input) { double("STDIN") }
let(:output) {
output = double("STDOUT")
printed = ""
allow(output).to receive(:print) { |text|
printed += text
}
flushed = ""
allow(output).to receive(:flush) {
flushed += printed
printed = ""
}
allow(output).to receive(:printed) { printed }
allow(output).to receive(:flushed) { flushed }
output
}
let (:io) { ConsoleIO.new(input: input, output: output) }
let (:word) { "pneumatic" }
let (:language) { Language.new } # Will always just do [[:langstringhere||:argshere]] syntax, test langs seperately
let (:hangman) { Hangman.new(word: word) }
subject { ConsolePresenter.new(io: io) }
describe "Error handling" do
let(:error) { :testingerror}
it "should displaying nothing when no error happend" do
subject.display_error
expect(output.printed).to be_empty
expect(output.flushed).to be_empty
end
it "should not display the error after adding" do
subject.add_error(error)
expect(output.printed).to be_empty
expect(output.flushed).to be_empty
end
it "should display the error we add with a new line" do
subject.add_error(error)
subject.display_error
expect(output.printed).to be_empty
expect(output.flushed).to eq "[["+error.to_s+"]]\n"
end
end
end
end
|
5642a543983979dcac27ab143b4c555c120d3f27 | app/templates/index.hbs | app/templates/index.hbs | <section class="input">
<img src="/logo-big.png">
<div class="cmd">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
<input type="text">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
</div>
</section>
<section class="output">
<div id="content">
<p>jkd v0.1</p>
<p>Author: Jake Harris <a href="mailto:[email protected]">([email protected])</a></p>
<p>Copyright 2014, under the Apache License.</p>
<p>`man javakat` or `help` for general help.</p>
<p>`man <member>` or `help <member>` for help about a particular collective member.</p>
<p>`<project name>` to launch a project.</p>
</div>
</section> | <section class="input">
<img src="/logo-big.png">
<div class="cmd">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
<input type="text">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
</div>
</section>
<section class="output">
<div id="content">
<p>jkd v0.1</p>
<p>Author: Jake Harris <a href="mailto:[email protected]">([email protected])</a></p>
<p>Copyright 2014, under the Apache License.</p>
<p>`man javakat` or `help` for general help.</p>
<p>`man <member>` or `help <member>` for help about a particular collective member.</p>
<p>`<project name>` to launch a project.</p>
<p> </p>
</div>
</section> | Add a newline after the default content | Add a newline after the default content
| Handlebars | apache-2.0 | javakat/javakat | handlebars | ## Code Before:
<section class="input">
<img src="/logo-big.png">
<div class="cmd">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
<input type="text">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
</div>
</section>
<section class="output">
<div id="content">
<p>jkd v0.1</p>
<p>Author: Jake Harris <a href="mailto:[email protected]">([email protected])</a></p>
<p>Copyright 2014, under the Apache License.</p>
<p>`man javakat` or `help` for general help.</p>
<p>`man <member>` or `help <member>` for help about a particular collective member.</p>
<p>`<project name>` to launch a project.</p>
</div>
</section>
## Instruction:
Add a newline after the default content
## Code After:
<section class="input">
<img src="/logo-big.png">
<div class="cmd">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
<input type="text">
<div class="cmd-frill"></div>
<div class="cmd-antifrill"></div>
</div>
</section>
<section class="output">
<div id="content">
<p>jkd v0.1</p>
<p>Author: Jake Harris <a href="mailto:[email protected]">([email protected])</a></p>
<p>Copyright 2014, under the Apache License.</p>
<p>`man javakat` or `help` for general help.</p>
<p>`man <member>` or `help <member>` for help about a particular collective member.</p>
<p>`<project name>` to launch a project.</p>
<p> </p>
</div>
</section> |
b5266eb9e1d295aa5e9660092afea64ea9f70841 | app/views/course/condition/assessments/_form.html.slim | app/views/course/condition/assessments/_form.html.slim | = simple_form_for [current_course, @conditional, @assessment_condition] do |f|
= f.error_notification
= f.association :assessment, collection: current_course.assessments
= f.input :minimum_grade_percentage, placeholder: t('.minimum_grade_placeholder')
= f.button :submit
| = simple_form_for [current_course, @conditional, @assessment_condition] do |f|
= f.error_notification
= f.association :assessment, collection: current_course.assessments.ordered_by_date_and_title
= f.input :minimum_grade_percentage, placeholder: t('.minimum_grade_placeholder')
= f.button :submit
| Sort assessment condition assessment dropdown by date and title | Sort assessment condition assessment dropdown by date and title
| Slim | mit | cysjonathan/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2 | slim | ## Code Before:
= simple_form_for [current_course, @conditional, @assessment_condition] do |f|
= f.error_notification
= f.association :assessment, collection: current_course.assessments
= f.input :minimum_grade_percentage, placeholder: t('.minimum_grade_placeholder')
= f.button :submit
## Instruction:
Sort assessment condition assessment dropdown by date and title
## Code After:
= simple_form_for [current_course, @conditional, @assessment_condition] do |f|
= f.error_notification
= f.association :assessment, collection: current_course.assessments.ordered_by_date_and_title
= f.input :minimum_grade_percentage, placeholder: t('.minimum_grade_placeholder')
= f.button :submit
|
d3e2cb92e475d4a3ca005186c2e3240b9fc881c2 | public/barovians.php | public/barovians.php | <?php
require_once dirname( __DIR__ ) .'/barovians.php';
$barovians = new Barovians();
$title = 'Names for all you meet in Barovia';
include dirname( __DIR__ ) . '/html/top.php';
echo str_replace('!', '', $barovians->generate('male') );
echo str_replace('!', '', $barovians->generate('female') );
include dirname( __DIR__ ) . '/html/bottom.php'; | <?php
require_once dirname( __DIR__ ) .'/barovians.php';
$barovians = new Barovians();
$title = 'Names for all you meet in Barovia';
include dirname( __DIR__ ) . '/html/top.php';
echo $barovians->generate('male');
echo $barovians->generate('female');
include dirname( __DIR__ ) . '/html/bottom.php'; | Revert "removed ! on barovian page" | Revert "removed ! on barovian page"
This reverts commit 241362cfd9c42b348014728379dcfed60f549570.
| PHP | mit | pwtyler/bardme | php | ## Code Before:
<?php
require_once dirname( __DIR__ ) .'/barovians.php';
$barovians = new Barovians();
$title = 'Names for all you meet in Barovia';
include dirname( __DIR__ ) . '/html/top.php';
echo str_replace('!', '', $barovians->generate('male') );
echo str_replace('!', '', $barovians->generate('female') );
include dirname( __DIR__ ) . '/html/bottom.php';
## Instruction:
Revert "removed ! on barovian page"
This reverts commit 241362cfd9c42b348014728379dcfed60f549570.
## Code After:
<?php
require_once dirname( __DIR__ ) .'/barovians.php';
$barovians = new Barovians();
$title = 'Names for all you meet in Barovia';
include dirname( __DIR__ ) . '/html/top.php';
echo $barovians->generate('male');
echo $barovians->generate('female');
include dirname( __DIR__ ) . '/html/bottom.php'; |
bf0a6c8fd91c8fec964cf498879bc75179be43b6 | .travis.yml | .travis.yml | language: python
python:
- "3.6"
install: pip install pipenv && pipenv install --dev
script: pipenv run pytest
| language: python
python:
- "3.6"
- "3.7-dev"
- "nightly"
install: pip install pipenv && pipenv install --dev
script: pipenv run pytest
| Update Python builds for CI | Update Python builds for CI
| YAML | mit | mattstibbs/blockbuster-server,mattstibbs/blockbuster-server | yaml | ## Code Before:
language: python
python:
- "3.6"
install: pip install pipenv && pipenv install --dev
script: pipenv run pytest
## Instruction:
Update Python builds for CI
## Code After:
language: python
python:
- "3.6"
- "3.7-dev"
- "nightly"
install: pip install pipenv && pipenv install --dev
script: pipenv run pytest
|
b5188aa96e87c0f41cf2071b27d55b7ff55c77ad | README.rst | README.rst | ==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
| ==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
Quick Start
===========
This assumes a debian-like system::
$ git checkout https://github.com/nejucomo/sgg
$ cd ./sgg
$ T="$HOME/virtualenvs/sgg-dev"
$ mkdir -p "$T"
$ virtualenv "$T"
$ source "$T/bin/activate"
$ ./setup.py develop
$ sudo apt-get install postgresql{,-doc,-client}
$ sudo -u postgres $(which sgg-create-db-user)
If all has gone well ``sgg-create-db-user`` should have given instructions
for how to edit ``pg_hba.conf``, so follow them::
$ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
$ sudo /etc/init.d/postgresql reload
This step is not yet implemented::
$ sgg-demiurge # Create a galaxy.
| Add quick start instructions, in case anyone else is interested. | Add quick start instructions, in case anyone else is interested.
| reStructuredText | agpl-3.0 | nejucomo/sgg,nejucomo/sgg,nejucomo/sgg | restructuredtext | ## Code Before:
==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
## Instruction:
Add quick start instructions, in case anyone else is interested.
## Code After:
==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
Quick Start
===========
This assumes a debian-like system::
$ git checkout https://github.com/nejucomo/sgg
$ cd ./sgg
$ T="$HOME/virtualenvs/sgg-dev"
$ mkdir -p "$T"
$ virtualenv "$T"
$ source "$T/bin/activate"
$ ./setup.py develop
$ sudo apt-get install postgresql{,-doc,-client}
$ sudo -u postgres $(which sgg-create-db-user)
If all has gone well ``sgg-create-db-user`` should have given instructions
for how to edit ``pg_hba.conf``, so follow them::
$ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
$ sudo /etc/init.d/postgresql reload
This step is not yet implemented::
$ sgg-demiurge # Create a galaxy.
|
215af999ca4c1cb5e8872e92e8df217a28f85d1e | modules/govuk_jenkins/templates/jobs/govuk_navigation_link_analysis.yaml.erb | modules/govuk_jenkins/templates/jobs/govuk_navigation_link_analysis.yaml.erb | ---
- scm:
name: govuk_tagging_monitor_for_nav
scm:
- git:
url: [email protected]:alphagov/govuk-tagging-monitor.git
basedir: govuk-tagging-monitor
branches:
- master
- job:
name: govuk_navigation_link_analysis
display-name: govuk-navigation-link-analysis
project-type: freestyle
description: |
Monthly analysis of links displayed in the new navigation pages. The output of
this is needed for Performance Analysts to produce reports on how the new
navigation is performing.
scm:
- govuk_tagging_monitor_for_nav
logrotate:
numToKeep: 10
triggers:
- timed: 'H 0 * * MON'
builders:
- shell: |
#!/bin/bash
set -eu
cd govuk-tagging-monitor
cp ../govuk-tagging-monitor-2f614b9b92c2.json .
export RATE_LIMIT_TOKEN="<%= @rate_limit_token -%>"
bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
bundle exec rake analyse:links
| ---
- scm:
name: govuk_tagging_monitor_for_nav
scm:
- git:
url: [email protected]:alphagov/govuk-tagging-monitor.git
basedir: govuk-tagging-monitor
branches:
- master
- job:
name: govuk_navigation_link_analysis
display-name: govuk-navigation-link-analysis
project-type: freestyle
description: |
Monthly analysis of links displayed in the new navigation pages. The output of
this is needed for Performance Analysts to produce reports on how the new
navigation is performing.
scm:
- govuk_tagging_monitor_for_nav
logrotate:
numToKeep: 10
triggers:
- timed: 'H 0 * * MON'
builders:
- shell: |
#!/bin/bash
set -eu
cd govuk-tagging-monitor
cp ../govuk-tagging-monitor-2f614b9b92c2.json .
export RATE_LIMIT_TOKEN="<%= @rate_limit_token -%>"
bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
bundle exec rake analyse:links['https://drive.google.com/drive/folders/0B6ekrNZ58HKUc3BqT3NoblRfOUE']
| Save navigation link analysis to a shared Google Drive | Save navigation link analysis to a shared Google Drive
| HTML+ERB | mit | alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet | html+erb | ## Code Before:
---
- scm:
name: govuk_tagging_monitor_for_nav
scm:
- git:
url: [email protected]:alphagov/govuk-tagging-monitor.git
basedir: govuk-tagging-monitor
branches:
- master
- job:
name: govuk_navigation_link_analysis
display-name: govuk-navigation-link-analysis
project-type: freestyle
description: |
Monthly analysis of links displayed in the new navigation pages. The output of
this is needed for Performance Analysts to produce reports on how the new
navigation is performing.
scm:
- govuk_tagging_monitor_for_nav
logrotate:
numToKeep: 10
triggers:
- timed: 'H 0 * * MON'
builders:
- shell: |
#!/bin/bash
set -eu
cd govuk-tagging-monitor
cp ../govuk-tagging-monitor-2f614b9b92c2.json .
export RATE_LIMIT_TOKEN="<%= @rate_limit_token -%>"
bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
bundle exec rake analyse:links
## Instruction:
Save navigation link analysis to a shared Google Drive
## Code After:
---
- scm:
name: govuk_tagging_monitor_for_nav
scm:
- git:
url: [email protected]:alphagov/govuk-tagging-monitor.git
basedir: govuk-tagging-monitor
branches:
- master
- job:
name: govuk_navigation_link_analysis
display-name: govuk-navigation-link-analysis
project-type: freestyle
description: |
Monthly analysis of links displayed in the new navigation pages. The output of
this is needed for Performance Analysts to produce reports on how the new
navigation is performing.
scm:
- govuk_tagging_monitor_for_nav
logrotate:
numToKeep: 10
triggers:
- timed: 'H 0 * * MON'
builders:
- shell: |
#!/bin/bash
set -eu
cd govuk-tagging-monitor
cp ../govuk-tagging-monitor-2f614b9b92c2.json .
export RATE_LIMIT_TOKEN="<%= @rate_limit_token -%>"
bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
bundle exec rake analyse:links['https://drive.google.com/drive/folders/0B6ekrNZ58HKUc3BqT3NoblRfOUE']
|
3ab25e30e26ba7edf2f732ff0d4fa42b1446f6dc | txampext/test/test_axiomtypes.py | txampext/test/test_axiomtypes.py | try:
from txampext import axiomtypes; axiomtypes
from axiom import attributes
except ImportError:
axiomtypes = None
from twisted.protocols import amp
from twisted.trial import unittest
class TypeForTests(unittest.TestCase):
skip = axiomtypes is None
def _test_typeFor(self, attr, expectedType, **kwargs):
asAMP = axiomtypes.typeFor(attr, **kwargs)
self.assertTrue(isinstance(asAMP, expectedType))
return asAMP
def test_optional(self):
asAMP = axiomtypes.typeFor(attributes.text(), optional=True)
self.assertTrue(asAMP.optional)
def test_text(self):
self._test_typeFor(attributes.text(), amp.Unicode)
def test_bytes(self):
self._test_typeFor(attributes.bytes(), amp.String)
def test_integer(self):
self._test_typeFor(attributes.integer(), amp.Integer)
def test_decimals(self):
for precision in range(1, 11):
attr = getattr(attributes, "point{}decimal".format(precision))
self._test_typeFor(attr(), amp.Decimal)
self._test_typeFor(attributes.money(), amp.Decimal)
def test_float(self):
self._test_typeFor(attributes.ieee754_double(), amp.Float)
def test_timestamp(self):
self._test_typeFor(attributes.timestamp(), amp.DateTime)
| try:
from txampext import axiomtypes; axiomtypes
from axiom import attributes
except ImportError: # pragma: no cover
axiomtypes = None
from twisted.protocols import amp
from twisted.trial import unittest
class TypeForTests(unittest.TestCase):
skip = axiomtypes is None
def _test_typeFor(self, attr, expectedType, **kwargs):
asAMP = axiomtypes.typeFor(attr, **kwargs)
self.assertTrue(isinstance(asAMP, expectedType))
return asAMP
def test_optional(self):
asAMP = axiomtypes.typeFor(attributes.text(), optional=True)
self.assertTrue(asAMP.optional)
def test_text(self):
self._test_typeFor(attributes.text(), amp.Unicode)
def test_bytes(self):
self._test_typeFor(attributes.bytes(), amp.String)
def test_integer(self):
self._test_typeFor(attributes.integer(), amp.Integer)
def test_decimals(self):
for precision in range(1, 11):
attr = getattr(attributes, "point{}decimal".format(precision))
self._test_typeFor(attr(), amp.Decimal)
self._test_typeFor(attributes.money(), amp.Decimal)
def test_float(self):
self._test_typeFor(attributes.ieee754_double(), amp.Float)
def test_timestamp(self):
self._test_typeFor(attributes.timestamp(), amp.DateTime)
| Add 'no cover' pragma to hide bogus missing code coverage | Add 'no cover' pragma to hide bogus missing code coverage
| Python | isc | lvh/txampext | python | ## Code Before:
try:
from txampext import axiomtypes; axiomtypes
from axiom import attributes
except ImportError:
axiomtypes = None
from twisted.protocols import amp
from twisted.trial import unittest
class TypeForTests(unittest.TestCase):
skip = axiomtypes is None
def _test_typeFor(self, attr, expectedType, **kwargs):
asAMP = axiomtypes.typeFor(attr, **kwargs)
self.assertTrue(isinstance(asAMP, expectedType))
return asAMP
def test_optional(self):
asAMP = axiomtypes.typeFor(attributes.text(), optional=True)
self.assertTrue(asAMP.optional)
def test_text(self):
self._test_typeFor(attributes.text(), amp.Unicode)
def test_bytes(self):
self._test_typeFor(attributes.bytes(), amp.String)
def test_integer(self):
self._test_typeFor(attributes.integer(), amp.Integer)
def test_decimals(self):
for precision in range(1, 11):
attr = getattr(attributes, "point{}decimal".format(precision))
self._test_typeFor(attr(), amp.Decimal)
self._test_typeFor(attributes.money(), amp.Decimal)
def test_float(self):
self._test_typeFor(attributes.ieee754_double(), amp.Float)
def test_timestamp(self):
self._test_typeFor(attributes.timestamp(), amp.DateTime)
## Instruction:
Add 'no cover' pragma to hide bogus missing code coverage
## Code After:
try:
from txampext import axiomtypes; axiomtypes
from axiom import attributes
except ImportError: # pragma: no cover
axiomtypes = None
from twisted.protocols import amp
from twisted.trial import unittest
class TypeForTests(unittest.TestCase):
skip = axiomtypes is None
def _test_typeFor(self, attr, expectedType, **kwargs):
asAMP = axiomtypes.typeFor(attr, **kwargs)
self.assertTrue(isinstance(asAMP, expectedType))
return asAMP
def test_optional(self):
asAMP = axiomtypes.typeFor(attributes.text(), optional=True)
self.assertTrue(asAMP.optional)
def test_text(self):
self._test_typeFor(attributes.text(), amp.Unicode)
def test_bytes(self):
self._test_typeFor(attributes.bytes(), amp.String)
def test_integer(self):
self._test_typeFor(attributes.integer(), amp.Integer)
def test_decimals(self):
for precision in range(1, 11):
attr = getattr(attributes, "point{}decimal".format(precision))
self._test_typeFor(attr(), amp.Decimal)
self._test_typeFor(attributes.money(), amp.Decimal)
def test_float(self):
self._test_typeFor(attributes.ieee754_double(), amp.Float)
def test_timestamp(self):
self._test_typeFor(attributes.timestamp(), amp.DateTime)
|
27a902012690221e42c5cad86e942bdae5e5e861 | app/views/shared/_navmenu.html.erb | app/views/shared/_navmenu.html.erb | <nav id="main-nav-menu" class="fade">
<div class="inner-box">
<%= link_to 'Room', rooms_path %>
<%= link_to 'Notes', notes_path %>
<%= link_to 'Pictures', pictures_path %>
<%= link_to 'Lists', lists_path %>
<%= link_to 'Polls', poll_lists_path %>
<%= link_to 'Bills', lists_path %>
<%= link_to 'Chores', lists_path %>
<%= link_to "Sign Out", :destroy_user_session, :method => :delete %>
</div>
</nav>
| <nav id="main-nav-menu" class="fade">
<div class="inner-box">
<%= link_to 'Room', rooms_path %>
<%= link_to 'Notes', notes_path %>
<%= link_to 'Pictures', pictures_path %>
<%= link_to 'Lists', check_lists_path %>
<%= link_to 'Polls', poll_lists_path %>
<%= link_to 'Bills', bill_lists_path %>
<%= link_to 'Chores', chore_lists_path %>
<%= link_to "Sign Out", :destroy_user_session, :method => :delete %>
</div>
</nav>
| Update navmenu for new lists | Update navmenu for new lists
| HTML+ERB | mit | dhahn/r13-team-45,dhahn/r13-team-45 | html+erb | ## Code Before:
<nav id="main-nav-menu" class="fade">
<div class="inner-box">
<%= link_to 'Room', rooms_path %>
<%= link_to 'Notes', notes_path %>
<%= link_to 'Pictures', pictures_path %>
<%= link_to 'Lists', lists_path %>
<%= link_to 'Polls', poll_lists_path %>
<%= link_to 'Bills', lists_path %>
<%= link_to 'Chores', lists_path %>
<%= link_to "Sign Out", :destroy_user_session, :method => :delete %>
</div>
</nav>
## Instruction:
Update navmenu for new lists
## Code After:
<nav id="main-nav-menu" class="fade">
<div class="inner-box">
<%= link_to 'Room', rooms_path %>
<%= link_to 'Notes', notes_path %>
<%= link_to 'Pictures', pictures_path %>
<%= link_to 'Lists', check_lists_path %>
<%= link_to 'Polls', poll_lists_path %>
<%= link_to 'Bills', bill_lists_path %>
<%= link_to 'Chores', chore_lists_path %>
<%= link_to "Sign Out", :destroy_user_session, :method => :delete %>
</div>
</nav>
|
9e27cb4670b8ef3b524055fb615fc65db682b48d | views/index.erb | views/index.erb | <!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
</head>
<body>
<p>Well, hello there!</p>
<p>We're going to now talk to the GitHub API. Ready? <a href="https://github.com/login/oauth/authorize?scope=user:email&client_id=<%= client_id %>">Click here</a> to begin!</a></p>
<p>If that link doesn't work, remember to provide your own <a href="http://developer.github.com/v3/oauth/#web-application-flow">Client ID</a>!</p>
</body>
</html> | <!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
</head>
<body>
<p>Well, hello there!</p>
<p>We're going to now talk to the GitHub API. Ready? <a href="https://github.com/login/oauth/authorize?scope=public_repo&client_id=<%= client_id %>">Click here</a> to begin!</a></p>
<p>If that link doesn't work, remember to provide your own <a href="http://developer.github.com/v3/oauth/#web-application-flow">Client ID</a>!</p>
</body>
</html> | Change scope for Github permissions | Change scope for Github permissions
In order to edit content inside the alpha site repository, we need
read/write access to public repositories.
| HTML+ERB | mit | nhsalpha/vidius,nhsalpha/vidius,nhsalpha/vidius | html+erb | ## Code Before:
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
</head>
<body>
<p>Well, hello there!</p>
<p>We're going to now talk to the GitHub API. Ready? <a href="https://github.com/login/oauth/authorize?scope=user:email&client_id=<%= client_id %>">Click here</a> to begin!</a></p>
<p>If that link doesn't work, remember to provide your own <a href="http://developer.github.com/v3/oauth/#web-application-flow">Client ID</a>!</p>
</body>
</html>
## Instruction:
Change scope for Github permissions
In order to edit content inside the alpha site repository, we need
read/write access to public repositories.
## Code After:
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
</head>
<body>
<p>Well, hello there!</p>
<p>We're going to now talk to the GitHub API. Ready? <a href="https://github.com/login/oauth/authorize?scope=public_repo&client_id=<%= client_id %>">Click here</a> to begin!</a></p>
<p>If that link doesn't work, remember to provide your own <a href="http://developer.github.com/v3/oauth/#web-application-flow">Client ID</a>!</p>
</body>
</html> |
df01d83a35c59ee2295b358d8eceeb842adb568d | listings/admin.py | listings/admin.py | from django.contrib import admin
from .models import Region, City, GatheringCenter, Resource
admin.site.register(Region)
admin.site.register(City)
class PublishMixin(object):
actions = ('publish', 'unpublish')
def publish(self, request, queryset):
queryset.update(published=True)
def unpublish(self, request, queryset):
queryset.update(published=False)
class GatheringCenterAdmin(PublishMixin, admin.ModelAdmin):
list_filter = ('published', 'city', 'created')
list_editable = ('published', )
list_display = ('location_name', 'created', 'published', 'author', 'city')
raw_id_fields = ('author', )
admin.site.register(GatheringCenter, GatheringCenterAdmin)
class ResourceAdmin(PublishMixin, admin.ModelAdmin):
list_filter = ('published', 'created')
list_editable = ('published', )
list_display = ('name', 'created', 'published', 'author', 'url', 'country')
raw_id_fields = ('author', )
admin.site.register(Resource, ResourceAdmin)
| from django.contrib import admin
from .models import Region, City, GatheringCenter, Resource
admin.site.register(Region)
admin.site.register(City)
class PublishMixin(object):
actions = ('publish', 'unpublish')
def publish(self, request, queryset):
queryset.update(published=True)
def unpublish(self, request, queryset):
queryset.update(published=False)
class GatheringCenterAdmin(PublishMixin, admin.ModelAdmin):
date_hierarchy = 'created'
list_filter = ('published', 'city', )
list_editable = ('published', )
list_display = ('location_name', 'created', 'published', 'author', 'city')
raw_id_fields = ('author', )
admin.site.register(GatheringCenter, GatheringCenterAdmin)
class ResourceAdmin(PublishMixin, admin.ModelAdmin):
date_hierarchy = 'created'
list_filter = ('published', )
list_editable = ('published', )
list_display = ('name', 'created', 'published', 'author', 'url', 'country')
raw_id_fields = ('author', )
admin.site.register(Resource, ResourceAdmin)
| Order by create, don't filter | Order by create, don't filter
| Python | apache-2.0 | pony-revolution/helpothers,pony-revolution/helpothers,pony-revolution/helpothers | python | ## Code Before:
from django.contrib import admin
from .models import Region, City, GatheringCenter, Resource
admin.site.register(Region)
admin.site.register(City)
class PublishMixin(object):
actions = ('publish', 'unpublish')
def publish(self, request, queryset):
queryset.update(published=True)
def unpublish(self, request, queryset):
queryset.update(published=False)
class GatheringCenterAdmin(PublishMixin, admin.ModelAdmin):
list_filter = ('published', 'city', 'created')
list_editable = ('published', )
list_display = ('location_name', 'created', 'published', 'author', 'city')
raw_id_fields = ('author', )
admin.site.register(GatheringCenter, GatheringCenterAdmin)
class ResourceAdmin(PublishMixin, admin.ModelAdmin):
list_filter = ('published', 'created')
list_editable = ('published', )
list_display = ('name', 'created', 'published', 'author', 'url', 'country')
raw_id_fields = ('author', )
admin.site.register(Resource, ResourceAdmin)
## Instruction:
Order by create, don't filter
## Code After:
from django.contrib import admin
from .models import Region, City, GatheringCenter, Resource
admin.site.register(Region)
admin.site.register(City)
class PublishMixin(object):
actions = ('publish', 'unpublish')
def publish(self, request, queryset):
queryset.update(published=True)
def unpublish(self, request, queryset):
queryset.update(published=False)
class GatheringCenterAdmin(PublishMixin, admin.ModelAdmin):
date_hierarchy = 'created'
list_filter = ('published', 'city', )
list_editable = ('published', )
list_display = ('location_name', 'created', 'published', 'author', 'city')
raw_id_fields = ('author', )
admin.site.register(GatheringCenter, GatheringCenterAdmin)
class ResourceAdmin(PublishMixin, admin.ModelAdmin):
date_hierarchy = 'created'
list_filter = ('published', )
list_editable = ('published', )
list_display = ('name', 'created', 'published', 'author', 'url', 'country')
raw_id_fields = ('author', )
admin.site.register(Resource, ResourceAdmin)
|
2b3f91e14212e4455d72c8cdae210a7b68b64c62 | lib/fakeBlockChain.js | lib/fakeBlockChain.js | const Buffer = require('safe-buffer').Buffer
const utils = require('ethereumjs-util')
module.exports = {
getBlock: function (n, cb) {
// FIXME: this will fail on block numbers >53 bits
var hash = utils.sha3(Buffer.from(utils.bufferToInt(n).toString(), 'utf8'))
var block = {
hash: function () {
return hash
}
}
cb(null, block)
},
delBlock: function (hash, cb) {
cb(null)
}
}
| const Buffer = require('safe-buffer').Buffer
const utils = require('ethereumjs-util')
module.exports = {
getBlock: function (blockTag, cb) {
var hash
if (Buffer.isBuffer(blockTag)) {
hash = utils.sha3(blockTag)
} else if (Number.isInteger(blockTag)) {
hash = utils.sha3(utils.toBuffer(blockTag).toString('hex'))
} else {
cb(new Error('Unknown blockTag type'))
}
var block = {
hash: function () {
return hash
}
}
cb(null, block)
},
delBlock: function (hash, cb) {
cb(null)
}
}
| Change fakeBlockchain.getBlock to match ethereumjs-blockchain | Change fakeBlockchain.getBlock to match ethereumjs-blockchain
| JavaScript | mpl-2.0 | ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereum/ethereumjs-vm | javascript | ## Code Before:
const Buffer = require('safe-buffer').Buffer
const utils = require('ethereumjs-util')
module.exports = {
getBlock: function (n, cb) {
// FIXME: this will fail on block numbers >53 bits
var hash = utils.sha3(Buffer.from(utils.bufferToInt(n).toString(), 'utf8'))
var block = {
hash: function () {
return hash
}
}
cb(null, block)
},
delBlock: function (hash, cb) {
cb(null)
}
}
## Instruction:
Change fakeBlockchain.getBlock to match ethereumjs-blockchain
## Code After:
const Buffer = require('safe-buffer').Buffer
const utils = require('ethereumjs-util')
module.exports = {
getBlock: function (blockTag, cb) {
var hash
if (Buffer.isBuffer(blockTag)) {
hash = utils.sha3(blockTag)
} else if (Number.isInteger(blockTag)) {
hash = utils.sha3(utils.toBuffer(blockTag).toString('hex'))
} else {
cb(new Error('Unknown blockTag type'))
}
var block = {
hash: function () {
return hash
}
}
cb(null, block)
},
delBlock: function (hash, cb) {
cb(null)
}
}
|
8e714f766930d8d23e5e1d987d6eb4c57ccf5307 | gradle.properties | gradle.properties | org.gradle.jvmargs=-XX:MaxPermSize=512m
mavenRepoUrl = https://api.bintray.com/maven/onedrive/Maven/onedrive-sdk-android
mavenGroupId = com.onedrive.sdk
mavenArtifactId = onedrive-sdk-android
mavenVersionCode = 010102
mavenVersion = 1.1.2
nightliesUrl = http://dl.bintray.com/onedrive/Maven
| org.gradle.jvmargs=-XX:MaxPermSize=512m
mavenRepoUrl = https://api.bintray.com/maven/onedrive/Maven/onedrive-sdk-android
mavenGroupId = com.onedrive.sdk
mavenArtifactId = onedrive-sdk-android
mavenVersionCode = 010102 #XXYYZZ is the padded format for the version code so for maven version 1.2.3 -> 01 + 02 + 03 is the number or 010203
mavenVersion = 1.1.2
nightliesUrl = http://dl.bintray.com/onedrive/Maven
| Add comment in the build script | Add comment in the build script
| INI | mit | daboxu/onedrive-sdk-android,OneDrive/onedrive-sdk-android | ini | ## Code Before:
org.gradle.jvmargs=-XX:MaxPermSize=512m
mavenRepoUrl = https://api.bintray.com/maven/onedrive/Maven/onedrive-sdk-android
mavenGroupId = com.onedrive.sdk
mavenArtifactId = onedrive-sdk-android
mavenVersionCode = 010102
mavenVersion = 1.1.2
nightliesUrl = http://dl.bintray.com/onedrive/Maven
## Instruction:
Add comment in the build script
## Code After:
org.gradle.jvmargs=-XX:MaxPermSize=512m
mavenRepoUrl = https://api.bintray.com/maven/onedrive/Maven/onedrive-sdk-android
mavenGroupId = com.onedrive.sdk
mavenArtifactId = onedrive-sdk-android
mavenVersionCode = 010102 #XXYYZZ is the padded format for the version code so for maven version 1.2.3 -> 01 + 02 + 03 is the number or 010203
mavenVersion = 1.1.2
nightliesUrl = http://dl.bintray.com/onedrive/Maven
|
f23fc65362df39dee871cde342eb068986987631 | lib/clamp/subcommand/execution.rb | lib/clamp/subcommand/execution.rb | module Clamp
class Subcommand
module Execution
protected
def execute_subcommand
signal_usage_error "no subcommand specified" unless subcommand_name
subcommand_class = find_subcommand_class(subcommand_name)
subcommand = subcommand_class.new("#{invocation_path} #{subcommand_name}", context)
self.class.declared_options.each do |option|
option_set = defined?(option.ivar_name)
if option_set && subcommand.respond_to?(option.write_method)
subcommand.send(option.write_method, self.send(option.read_method))
end
end
subcommand.run(subcommand_arguments)
end
private
def find_subcommand(name)
self.class.find_subcommand(name) ||
signal_usage_error("No such sub-command '#{name}'")
end
def find_subcommand_class(name)
subcommand = find_subcommand(name)
subcommand.subcommand_class if subcommand
end
end
end
end
| module Clamp
class Subcommand
module Execution
protected
def execute_subcommand
signal_usage_error "no subcommand specified" unless subcommand_name
subcommand_class = find_subcommand_class(subcommand_name)
subcommand = subcommand_class.new("#{invocation_path} #{subcommand_name}", context)
self.class.declared_options.each do |option|
option_set = instance_variable_defined?(option.ivar_name)
if option_set && subcommand.respond_to?(option.write_method)
subcommand.send(option.write_method, self.send(option.read_method))
end
end
subcommand.run(subcommand_arguments)
end
private
def find_subcommand(name)
self.class.find_subcommand(name) ||
signal_usage_error("No such sub-command '#{name}'")
end
def find_subcommand_class(name)
subcommand = find_subcommand(name)
subcommand.subcommand_class if subcommand
end
end
end
end
| Fix check for presence of explicitly set option. | Fix check for presence of explicitly set option.
| Ruby | mit | mdub/clamp,tstrachota/clamp | ruby | ## Code Before:
module Clamp
class Subcommand
module Execution
protected
def execute_subcommand
signal_usage_error "no subcommand specified" unless subcommand_name
subcommand_class = find_subcommand_class(subcommand_name)
subcommand = subcommand_class.new("#{invocation_path} #{subcommand_name}", context)
self.class.declared_options.each do |option|
option_set = defined?(option.ivar_name)
if option_set && subcommand.respond_to?(option.write_method)
subcommand.send(option.write_method, self.send(option.read_method))
end
end
subcommand.run(subcommand_arguments)
end
private
def find_subcommand(name)
self.class.find_subcommand(name) ||
signal_usage_error("No such sub-command '#{name}'")
end
def find_subcommand_class(name)
subcommand = find_subcommand(name)
subcommand.subcommand_class if subcommand
end
end
end
end
## Instruction:
Fix check for presence of explicitly set option.
## Code After:
module Clamp
class Subcommand
module Execution
protected
def execute_subcommand
signal_usage_error "no subcommand specified" unless subcommand_name
subcommand_class = find_subcommand_class(subcommand_name)
subcommand = subcommand_class.new("#{invocation_path} #{subcommand_name}", context)
self.class.declared_options.each do |option|
option_set = instance_variable_defined?(option.ivar_name)
if option_set && subcommand.respond_to?(option.write_method)
subcommand.send(option.write_method, self.send(option.read_method))
end
end
subcommand.run(subcommand_arguments)
end
private
def find_subcommand(name)
self.class.find_subcommand(name) ||
signal_usage_error("No such sub-command '#{name}'")
end
def find_subcommand_class(name)
subcommand = find_subcommand(name)
subcommand.subcommand_class if subcommand
end
end
end
end
|
713a48b7096939a1de6e61761b4a958c36752fbd | appveyor.yml | appveyor.yml | version: 2.0.0-alpha{build}
branches:
only:
- master
- develop
configuration: Release
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
nuget_user: dd4t
nuget_password:
secure: fcubeaS+/aDXFPSjbqgrQg==
install:
- nuget sources add -Name Incentro -Source http://developer.incentro.com/nexus/service/local/nuget/tridion.net/ -UserName %nuget_user% -Password %nuget_password%
- choco install msbuild.communitytasks -y
build:
project: build.msbuild
verbosity: normal
artifacts:
- path: build/package/**/*.nupkg
name: NuGet Package
- path: build/package/**/*.zip
name: Zip Archive
deploy:
- provider: NuGet
api_key:
secure: fnfp0KvYrSJ4VETGtf4WyajYJnyKVIQsde+8uzQ42ERjcSPpCfX9fYlqrK3kHEp5
artifact: 'build/package/**/*.nupkg' | version: 2.0.0-alpha{build}
branches:
only:
- master
- develop
configuration: Release
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
nuget_user: dd4t
nuget_password:
secure: fcubeaS+/aDXFPSjbqgrQg==
install:
- nuget sources add -Name Incentro -Source http://developer.incentro.com/nexus/service/local/nuget/tridion.net/ -UserName %nuget_user% -Password %nuget_password%
- choco install msbuild.communitytasks -y
build:
project: build.msbuild
verbosity: normal
artifacts:
- path: build/package/**/*.nupkg
name: NuGet Package
- path: build/package/**/*.zip
name: Zip Archive
deploy:
- provider: NuGet
api_key:
secure: fnfp0KvYrSJ4VETGtf4WyajYJnyKVIQsde+8uzQ42ERjcSPpCfX9fYlqrK3kHEp5
artifact: /.*\.nupkg/ | Fix for AppVeyor nuget package upload. | Fix for AppVeyor nuget package upload.
| YAML | apache-2.0 | Ei8htSe7en/dd4t-2-net,dd4t/dd4t-2-net,dd4t/DD4T.Core | yaml | ## Code Before:
version: 2.0.0-alpha{build}
branches:
only:
- master
- develop
configuration: Release
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
nuget_user: dd4t
nuget_password:
secure: fcubeaS+/aDXFPSjbqgrQg==
install:
- nuget sources add -Name Incentro -Source http://developer.incentro.com/nexus/service/local/nuget/tridion.net/ -UserName %nuget_user% -Password %nuget_password%
- choco install msbuild.communitytasks -y
build:
project: build.msbuild
verbosity: normal
artifacts:
- path: build/package/**/*.nupkg
name: NuGet Package
- path: build/package/**/*.zip
name: Zip Archive
deploy:
- provider: NuGet
api_key:
secure: fnfp0KvYrSJ4VETGtf4WyajYJnyKVIQsde+8uzQ42ERjcSPpCfX9fYlqrK3kHEp5
artifact: 'build/package/**/*.nupkg'
## Instruction:
Fix for AppVeyor nuget package upload.
## Code After:
version: 2.0.0-alpha{build}
branches:
only:
- master
- develop
configuration: Release
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
nuget_user: dd4t
nuget_password:
secure: fcubeaS+/aDXFPSjbqgrQg==
install:
- nuget sources add -Name Incentro -Source http://developer.incentro.com/nexus/service/local/nuget/tridion.net/ -UserName %nuget_user% -Password %nuget_password%
- choco install msbuild.communitytasks -y
build:
project: build.msbuild
verbosity: normal
artifacts:
- path: build/package/**/*.nupkg
name: NuGet Package
- path: build/package/**/*.zip
name: Zip Archive
deploy:
- provider: NuGet
api_key:
secure: fnfp0KvYrSJ4VETGtf4WyajYJnyKVIQsde+8uzQ42ERjcSPpCfX9fYlqrK3kHEp5
artifact: /.*\.nupkg/ |
35fd8271a7c09ed649f96106d56f198cc80795b8 | farmbot_os/lib/mix/tasks.farmbot/nerves_hub.ex | farmbot_os/lib/mix/tasks.farmbot/nerves_hub.ex | defmodule Mix.Tasks.Farmbot.NervesHub do
use Mix.Task
alias NimbleCSV.RFC4180, as: CSV
alias Mix.NervesHubCLI.Shell
def run([org]) do
Application.ensure_all_started(:nerves_hub_cli)
auth = Shell.request_auth()
case NervesHubUserAPI.Device.list(org, "farmbot", auth) do
{:ok, %{"data" => data}} ->
csv_data = to_csv_rows(data)
File.write!("#{org}-devices.csv", CSV.dump_to_iodata(csv_data))
{:error, reason} ->
Mix.raise(reason)
end
end
def to_csv_rows(
data,
acc \\ [
[
"identifier",
"status",
"version",
"tags",
"firmware_uuid",
"last_communication",
"platform"
]
]
)
def to_csv_rows([%{} = data | rest], acc) do
row = [
data["identifier"],
data["status"],
data["version"],
Enum.join(data["tags"], ", "),
data["firmware_metadata"]["uuid"],
data["last_communication"],
data["firmware_metadata"]["platform"]
]
to_csv_rows(rest, [row | acc])
end
def to_csv_rows([], acc), do: Enum.reverse(acc)
end
| defmodule Mix.Tasks.Farmbot.NervesHub do
use Mix.Task
alias NimbleCSV.RFC4180, as: CSV
alias Mix.NervesHubCLI.Shell
def run([org]) do
Application.ensure_all_started(:nerves_hub_cli)
auth = Shell.request_auth()
case NervesHubUserAPI.Device.list(org, "farmbot", auth) do
{:ok, %{"data" => data}} ->
csv_data = to_csv_rows(data)
File.write!("#{org}-devices.csv", CSV.dump_to_iodata(csv_data))
{:error, reason} ->
Mix.raise(reason)
end
end
def to_csv_rows(
data,
acc \\ [
[
"identifier",
"status",
"healthy",
"version",
"tags",
"firmware_uuid",
"last_communication",
"platform"
]
]
)
def to_csv_rows([%{} = data | rest], acc) do
row = [
data["identifier"],
data["status"],
data["healthy"],
data["version"],
Enum.join(data["tags"], ", "),
data["firmware_metadata"]["uuid"],
data["last_communication"],
data["firmware_metadata"]["platform"]
]
to_csv_rows(rest, [row | acc])
end
def to_csv_rows([], acc), do: Enum.reverse(acc)
end
| Update NervesHub device task to include healthy status | Update NervesHub device task to include healthy status
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os | elixir | ## Code Before:
defmodule Mix.Tasks.Farmbot.NervesHub do
use Mix.Task
alias NimbleCSV.RFC4180, as: CSV
alias Mix.NervesHubCLI.Shell
def run([org]) do
Application.ensure_all_started(:nerves_hub_cli)
auth = Shell.request_auth()
case NervesHubUserAPI.Device.list(org, "farmbot", auth) do
{:ok, %{"data" => data}} ->
csv_data = to_csv_rows(data)
File.write!("#{org}-devices.csv", CSV.dump_to_iodata(csv_data))
{:error, reason} ->
Mix.raise(reason)
end
end
def to_csv_rows(
data,
acc \\ [
[
"identifier",
"status",
"version",
"tags",
"firmware_uuid",
"last_communication",
"platform"
]
]
)
def to_csv_rows([%{} = data | rest], acc) do
row = [
data["identifier"],
data["status"],
data["version"],
Enum.join(data["tags"], ", "),
data["firmware_metadata"]["uuid"],
data["last_communication"],
data["firmware_metadata"]["platform"]
]
to_csv_rows(rest, [row | acc])
end
def to_csv_rows([], acc), do: Enum.reverse(acc)
end
## Instruction:
Update NervesHub device task to include healthy status
## Code After:
defmodule Mix.Tasks.Farmbot.NervesHub do
use Mix.Task
alias NimbleCSV.RFC4180, as: CSV
alias Mix.NervesHubCLI.Shell
def run([org]) do
Application.ensure_all_started(:nerves_hub_cli)
auth = Shell.request_auth()
case NervesHubUserAPI.Device.list(org, "farmbot", auth) do
{:ok, %{"data" => data}} ->
csv_data = to_csv_rows(data)
File.write!("#{org}-devices.csv", CSV.dump_to_iodata(csv_data))
{:error, reason} ->
Mix.raise(reason)
end
end
def to_csv_rows(
data,
acc \\ [
[
"identifier",
"status",
"healthy",
"version",
"tags",
"firmware_uuid",
"last_communication",
"platform"
]
]
)
def to_csv_rows([%{} = data | rest], acc) do
row = [
data["identifier"],
data["status"],
data["healthy"],
data["version"],
Enum.join(data["tags"], ", "),
data["firmware_metadata"]["uuid"],
data["last_communication"],
data["firmware_metadata"]["platform"]
]
to_csv_rows(rest, [row | acc])
end
def to_csv_rows([], acc), do: Enum.reverse(acc)
end
|
8c5c63628b420734b9021021c5b55ebc0433ff48 | .zuul.yaml | .zuul.yaml | - project:
templates:
- golang-jobs
check:
jobs:
- golang-lint:
voting: false
- kubemon-build-image
gate:
jobs:
- golang-lint:
voting: false
- kubemon-build-image
- job:
name: kubemon-build-image
parent: nuage-build-docker-image
vars:
go_task: make
go_context: nuagekubemon
go_makefile: scripts/Makefile
zuul_work_dir: "{{ ansible_user_dir }}/src/github.com/{{ zuul.project.name }}"
docker_images:
- context: nuagekubemon
dockerfile: Dockerfile
repository: nuage/kubemon
| - project:
templates:
- golang-jobs
check:
jobs:
- golang-lint
- kubemon-build-image
gate:
jobs:
- golang-lint
- kubemon-build-image
- job:
name: kubemon-build-image
parent: nuage-build-docker-image
vars:
zuul_work_dir: "{{ ansible_user_dir }}/src/github.com/{{ zuul.project.name }}"
container_command: docker
docker_images:
- context: nuagekubemon
dockerfile: Dockerfile
repository: nuage/kubemon
go_task: make
go_context: nuagekubemon
go_makefile: scripts/Makefile
| Move go vars to docker context | Move go vars to docker context
Change-Id: I14840e84eea3f0ffa02d95215db53e919133e2cb
| YAML | bsd-3-clause | nuagenetworks/nuage-kubernetes,nuagenetworks/nuage-kubernetes,nuagenetworks/nuage-kubernetes,nuagenetworks/nuage-kubernetes | yaml | ## Code Before:
- project:
templates:
- golang-jobs
check:
jobs:
- golang-lint:
voting: false
- kubemon-build-image
gate:
jobs:
- golang-lint:
voting: false
- kubemon-build-image
- job:
name: kubemon-build-image
parent: nuage-build-docker-image
vars:
go_task: make
go_context: nuagekubemon
go_makefile: scripts/Makefile
zuul_work_dir: "{{ ansible_user_dir }}/src/github.com/{{ zuul.project.name }}"
docker_images:
- context: nuagekubemon
dockerfile: Dockerfile
repository: nuage/kubemon
## Instruction:
Move go vars to docker context
Change-Id: I14840e84eea3f0ffa02d95215db53e919133e2cb
## Code After:
- project:
templates:
- golang-jobs
check:
jobs:
- golang-lint
- kubemon-build-image
gate:
jobs:
- golang-lint
- kubemon-build-image
- job:
name: kubemon-build-image
parent: nuage-build-docker-image
vars:
zuul_work_dir: "{{ ansible_user_dir }}/src/github.com/{{ zuul.project.name }}"
container_command: docker
docker_images:
- context: nuagekubemon
dockerfile: Dockerfile
repository: nuage/kubemon
go_task: make
go_context: nuagekubemon
go_makefile: scripts/Makefile
|
860d69cadedef0dec8ba6259ab5850691d3402e7 | src/tslib-private.h | src/tslib-private.h | /*
* tslib/src/tslib-private.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
*
* Internal touch screen library definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "tslib.h"
#include "tslib-filter.h"
#define DEBUG
struct tsdev {
int fd;
struct tslib_module_info *list;
struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads
come from. default is the position of the
ts_read_raw module. */
unsigned int res_x;
unsigned int res_y;
int rotation;
};
int __ts_attach(struct tsdev *ts, struct tslib_module_info *info);
int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info);
int ts_load_module(struct tsdev *dev, const char *module, const char *params);
int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params);
int ts_error(const char *fmt, ...);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _TSLIB_PRIVATE_H_ */
| /*
* tslib/src/tslib-private.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
*
* Internal touch screen library definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "tslib.h"
#include "tslib-filter.h"
struct tsdev {
int fd;
struct tslib_module_info *list;
struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads
come from. default is the position of the
ts_read_raw module. */
unsigned int res_x;
unsigned int res_y;
int rotation;
};
int __ts_attach(struct tsdev *ts, struct tslib_module_info *info);
int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info);
int ts_load_module(struct tsdev *dev, const char *module, const char *params);
int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params);
int ts_error(const char *fmt, ...);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _TSLIB_PRIVATE_H_ */
| Revert "Enable debug option for all components" | Revert "Enable debug option for all components"
This reverts commit 9c3742a8d8a829ec746e0a974aa30fb5dd0e3d1a.
| C | lgpl-2.1 | folkien/tslib,vpeter4/tslib,kergoth/tslib,etmatrix/tslib,lin2724/tslib,folkien/tslib,etmatrix/tslib,leighmurray/tslib,lin2724/tslib,vpeter4/tslib,kergoth/tslib,pssc/tslib,kobolabs/tslib,kergoth/tslib,leighmurray/tslib,pssc/tslib,kobolabs/tslib,etmatrix/tslib,pssc/tslib,jaretcantu/tslib,jaretcantu/tslib,kobolabs/tslib,kergoth/tslib | c | ## Code Before:
/*
* tslib/src/tslib-private.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
*
* Internal touch screen library definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "tslib.h"
#include "tslib-filter.h"
#define DEBUG
struct tsdev {
int fd;
struct tslib_module_info *list;
struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads
come from. default is the position of the
ts_read_raw module. */
unsigned int res_x;
unsigned int res_y;
int rotation;
};
int __ts_attach(struct tsdev *ts, struct tslib_module_info *info);
int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info);
int ts_load_module(struct tsdev *dev, const char *module, const char *params);
int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params);
int ts_error(const char *fmt, ...);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _TSLIB_PRIVATE_H_ */
## Instruction:
Revert "Enable debug option for all components"
This reverts commit 9c3742a8d8a829ec746e0a974aa30fb5dd0e3d1a.
## Code After:
/*
* tslib/src/tslib-private.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
*
* Internal touch screen library definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "tslib.h"
#include "tslib-filter.h"
struct tsdev {
int fd;
struct tslib_module_info *list;
struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads
come from. default is the position of the
ts_read_raw module. */
unsigned int res_x;
unsigned int res_y;
int rotation;
};
int __ts_attach(struct tsdev *ts, struct tslib_module_info *info);
int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info);
int ts_load_module(struct tsdev *dev, const char *module, const char *params);
int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params);
int ts_error(const char *fmt, ...);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _TSLIB_PRIVATE_H_ */
|
87f1801b04957a41c20afdc0af21ce1e94b36cf2 | app/workers/initial_tagging_import.rb | app/workers/initial_tagging_import.rb | class InitialTaggingImport
include Sidekiq::Worker
def perform(tagging_spreadsheet_id)
tagging_spreadsheet = TaggingSpreadsheet.find(tagging_spreadsheet_id)
errors = TagImporter::FetchRemoteData.new(tagging_spreadsheet).run
if errors.any?
tagging_spreadsheet.update_attributes!(state: "errored", error_message: errors.join("\n"))
else
tagging_spreadsheet.update_attributes!(state: "ready_to_import")
end
end
end
| class InitialTaggingImport
include Sidekiq::Worker
sidekiq_options retry: false
def perform(tagging_spreadsheet_id)
tagging_spreadsheet = TaggingSpreadsheet.find(tagging_spreadsheet_id)
errors = TagImporter::FetchRemoteData.new(tagging_spreadsheet).run
if errors.any?
tagging_spreadsheet.update_attributes!(state: "errored", error_message: errors.join("\n"))
else
tagging_spreadsheet.update_attributes!(state: "ready_to_import")
end
end
end
| Change sidekiq retry behaviour on InitialTaggingImport | Change sidekiq retry behaviour on InitialTaggingImport
This shouldn't really be retrying at all - we report errors back to the
user fairly comprehensively and manual retry controls are built into the
UI.
| Ruby | mit | alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger | ruby | ## Code Before:
class InitialTaggingImport
include Sidekiq::Worker
def perform(tagging_spreadsheet_id)
tagging_spreadsheet = TaggingSpreadsheet.find(tagging_spreadsheet_id)
errors = TagImporter::FetchRemoteData.new(tagging_spreadsheet).run
if errors.any?
tagging_spreadsheet.update_attributes!(state: "errored", error_message: errors.join("\n"))
else
tagging_spreadsheet.update_attributes!(state: "ready_to_import")
end
end
end
## Instruction:
Change sidekiq retry behaviour on InitialTaggingImport
This shouldn't really be retrying at all - we report errors back to the
user fairly comprehensively and manual retry controls are built into the
UI.
## Code After:
class InitialTaggingImport
include Sidekiq::Worker
sidekiq_options retry: false
def perform(tagging_spreadsheet_id)
tagging_spreadsheet = TaggingSpreadsheet.find(tagging_spreadsheet_id)
errors = TagImporter::FetchRemoteData.new(tagging_spreadsheet).run
if errors.any?
tagging_spreadsheet.update_attributes!(state: "errored", error_message: errors.join("\n"))
else
tagging_spreadsheet.update_attributes!(state: "ready_to_import")
end
end
end
|
6351981a6a5f0fd91ba4fb9fb6cfeab6e6c8ffb8 | src/dao/AmigoDataAccessObject.java | src/dao/AmigoDataAccessObject.java | package dao;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import model.Info;
import model.Nodo;
public interface AmigoDataAccessObject {
public int quantidadeAmigos();
public void comparaTabelas();
public List<Info> listaAmigosPorGenero(String sex);
public List<Nodo> listaRelacoes();
public int primeiroId(String nomeId, String nomeTabela);
public Map<BigInteger, BigInteger> mapeiaRelacoes();
} | package dao;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import model.Info;
import model.Vertice;
public interface AmigoDataAccessObject {
public int quantidadeAmigos();
public void comparaTabelas();
public List<Info> listaAmigosPorGenero(String sex);
public List<Vertice> listaRelacoes();
public int primeiroId(String nomeId, String nomeTabela);
public Map<BigInteger, BigInteger> mapeiaRelacoes();
} | Add public Map<BigInteger, BigInteger> mapeiaRelacoes() | Add public Map<BigInteger, BigInteger> mapeiaRelacoes() | Java | mit | tonussi/teia | java | ## Code Before:
package dao;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import model.Info;
import model.Nodo;
public interface AmigoDataAccessObject {
public int quantidadeAmigos();
public void comparaTabelas();
public List<Info> listaAmigosPorGenero(String sex);
public List<Nodo> listaRelacoes();
public int primeiroId(String nomeId, String nomeTabela);
public Map<BigInteger, BigInteger> mapeiaRelacoes();
}
## Instruction:
Add public Map<BigInteger, BigInteger> mapeiaRelacoes()
## Code After:
package dao;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import model.Info;
import model.Vertice;
public interface AmigoDataAccessObject {
public int quantidadeAmigos();
public void comparaTabelas();
public List<Info> listaAmigosPorGenero(String sex);
public List<Vertice> listaRelacoes();
public int primeiroId(String nomeId, String nomeTabela);
public Map<BigInteger, BigInteger> mapeiaRelacoes();
} |
98e6c2cd3c73ce7fb5661b691883428fc2ccfc39 | src/route_factories/presenter_route/pageable_data_layout_presenter.ts | src/route_factories/presenter_route/pageable_data_layout_presenter.ts | import { Presenter } from "./presenter";
export interface PagingEntity {
before?: string | null;
after?: string | null;
}
export interface PaginatedInput<DataInput> {
data: DataInput;
paging: PagingEntity;
}
export interface PaginatedOutput<DataOutput> {
data: DataOutput;
paging: PagingEntity;
}
// tslint:disable-next-line
export class PageableDataLayoutPresenter<DataInput, DataOutput> implements Presenter<PaginatedInput<DataInput>, PaginatedOutput<DataOutput>> {
private _outputJSONSchema = { // tslint:disable-line
type: "object",
properties: {
data: this.presenter.outputJSONSchema(),
paging: {
type: "object",
properties: {
before: {
type: "string",
description: "This field is nullable. Value can be null"
},
after: {
type: "string",
description: "This field is nullable. Value can be null"
},
},
},
},
};
constructor(
private presenter: Presenter<DataInput, DataOutput>,
) {}
public outputJSONSchema() {
return this._outputJSONSchema;
}
public async present(input: PaginatedInput<DataInput>) {
const dataOutput = await this.presenter.present(input.data);
return {
data: dataOutput,
paging: input.paging,
};
}
}
| import { Presenter } from "./presenter";
export interface PagingEntity {
before?: string;
after?: string;
}
export interface PaginatedInput<DataInput> {
data: DataInput;
paging: PagingEntity;
}
export interface PaginatedOutput<DataOutput> {
data: DataOutput;
paging: PagingEntity;
}
// tslint:disable-next-line
export class PageableDataLayoutPresenter<DataInput, DataOutput> implements Presenter<PaginatedInput<DataInput>, PaginatedOutput<DataOutput>> {
private _outputJSONSchema = { // tslint:disable-line
type: "object",
properties: {
data: this.presenter.outputJSONSchema(),
paging: {
type: "object",
properties: {
before: {
type: "string",
},
after: {
type: "string",
},
},
},
},
};
constructor(
private presenter: Presenter<DataInput, DataOutput>,
) {}
public outputJSONSchema() {
return this._outputJSONSchema;
}
public async present(input: PaginatedInput<DataInput>) {
const dataOutput = await this.presenter.present(input.data);
return {
data: dataOutput,
paging: input.paging,
};
}
}
| Revert "Update PagingEntity on PageableDataLayoutPresenter" | Revert "Update PagingEntity on PageableDataLayoutPresenter"
This reverts commit cddc1a357b525cb47253d238ac764e6b092cc578.
| TypeScript | mit | balmbees/corgi | typescript | ## Code Before:
import { Presenter } from "./presenter";
export interface PagingEntity {
before?: string | null;
after?: string | null;
}
export interface PaginatedInput<DataInput> {
data: DataInput;
paging: PagingEntity;
}
export interface PaginatedOutput<DataOutput> {
data: DataOutput;
paging: PagingEntity;
}
// tslint:disable-next-line
export class PageableDataLayoutPresenter<DataInput, DataOutput> implements Presenter<PaginatedInput<DataInput>, PaginatedOutput<DataOutput>> {
private _outputJSONSchema = { // tslint:disable-line
type: "object",
properties: {
data: this.presenter.outputJSONSchema(),
paging: {
type: "object",
properties: {
before: {
type: "string",
description: "This field is nullable. Value can be null"
},
after: {
type: "string",
description: "This field is nullable. Value can be null"
},
},
},
},
};
constructor(
private presenter: Presenter<DataInput, DataOutput>,
) {}
public outputJSONSchema() {
return this._outputJSONSchema;
}
public async present(input: PaginatedInput<DataInput>) {
const dataOutput = await this.presenter.present(input.data);
return {
data: dataOutput,
paging: input.paging,
};
}
}
## Instruction:
Revert "Update PagingEntity on PageableDataLayoutPresenter"
This reverts commit cddc1a357b525cb47253d238ac764e6b092cc578.
## Code After:
import { Presenter } from "./presenter";
export interface PagingEntity {
before?: string;
after?: string;
}
export interface PaginatedInput<DataInput> {
data: DataInput;
paging: PagingEntity;
}
export interface PaginatedOutput<DataOutput> {
data: DataOutput;
paging: PagingEntity;
}
// tslint:disable-next-line
export class PageableDataLayoutPresenter<DataInput, DataOutput> implements Presenter<PaginatedInput<DataInput>, PaginatedOutput<DataOutput>> {
private _outputJSONSchema = { // tslint:disable-line
type: "object",
properties: {
data: this.presenter.outputJSONSchema(),
paging: {
type: "object",
properties: {
before: {
type: "string",
},
after: {
type: "string",
},
},
},
},
};
constructor(
private presenter: Presenter<DataInput, DataOutput>,
) {}
public outputJSONSchema() {
return this._outputJSONSchema;
}
public async present(input: PaginatedInput<DataInput>) {
const dataOutput = await this.presenter.present(input.data);
return {
data: dataOutput,
paging: input.paging,
};
}
}
|
f24a33f38420f2bd86493dba2c40b7efec7c7ec4 | src/js/index.js | src/js/index.js | 'use strict'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App from './containers/app/index'
import configureStore from './store/configure-store'
import reducers from './reducers/index'
const store = configureStore({ reducers })
render(
<Provider store={store}>
<App />
</Provider>,
document.querySelector('[data-js="app"]')
)
| 'use strict'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App from './containers/app/index'
import configureStore from './store/configure-store'
import reducers from './reducers/index'
const store = configureStore({ reducers })
render(
<Provider store={store}>
<App />
</Provider>,
document.querySelector('[data-js="app"]')
)
store.subscribe(() => {
console.log(store.getState())
})
| Add subscribe to change redux events | Add subscribe to change redux events
| JavaScript | mit | campinas-front-end-meetup/institucional,campinas-front-end/institucional,campinas-front-end-meetup/institucional,frontendbr/eventos,campinas-front-end/institucional | javascript | ## Code Before:
'use strict'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App from './containers/app/index'
import configureStore from './store/configure-store'
import reducers from './reducers/index'
const store = configureStore({ reducers })
render(
<Provider store={store}>
<App />
</Provider>,
document.querySelector('[data-js="app"]')
)
## Instruction:
Add subscribe to change redux events
## Code After:
'use strict'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App from './containers/app/index'
import configureStore from './store/configure-store'
import reducers from './reducers/index'
const store = configureStore({ reducers })
render(
<Provider store={store}>
<App />
</Provider>,
document.querySelector('[data-js="app"]')
)
store.subscribe(() => {
console.log(store.getState())
})
|
af57a9fcebc08867bc29e1c241a0e9768a3da318 | .travis.yml | .travis.yml | language: ruby
notifications:
email: false
webhooks: https://getchef.slack.com/services/hooks/travis?token=ECftsW2P2itUaz1MhfiU6cS4
rvm:
- 2.0.0
before_script:
- psql -c 'create database supermarket_test;' -U postgres
- cp .env.example .env
- bundle exec rake db:schema:load
bundler_args: --without development
script: bundle exec rspec && bundle exec rake spec:javascripts
env:
global:
secure: 3FQQOyNDbi98izCrHovUld+Laj+y7ENcMraVlpgge4q12PysndHWz5zU/VrSo/3ZInE3u36Mn2dH95nnM+kXa8rfpXtDh23YjinW4vkA1FTnnt/yppdksvY1K+K7QePIvGfmVU/Y7kq6C3k4R3kB99cN+luf5oVdby9kePFkQHc=
| language: ruby
notifications:
email: false
webhooks: https://getchef.slack.com/services/hooks/travis?token=ECftsW2P2itUaz1MhfiU6cS4
rvm:
- 2.0.0
before_script:
- psql -c 'create database supermarket_test;' -U postgres
- cp .env.example .env
- bundle exec rake db:schema:load
bundler_args: --without development
script: bundle exec rspec && bundle exec rake spec:javascripts
services:
- redis-server
env:
global:
secure: "rzoy57s+oxvw27HStU1VNHN7fS525ocQo11bmASbwG5Ax6I4X/dwWofQCoZPoGrXisMw5RQaa7e3bHJpATZsMJC67Sf6gbfSOIYY7tISXuCFh9q/19YPGltdwZkP3OgawEpufA8zcMHzD5nvWNXq4c4TKRdtX6mHQVIAOJ9u6qY="
| Add redis and GitHub access token to Travis config | Add redis and GitHub access token to Travis config
Note: the GitHub access token is encrypted. B)
| YAML | apache-2.0 | nellshamrell/supermarket,jzohrab/supermarket,leftathome/supermarket,juliandunn/supermarket,nellshamrell/supermarket,robbkidd/supermarket,rafaelmagu/supermarket,jzohrab/supermarket,rafaelmagu/supermarket,tas50/supermarket,dpnl87/supermarket,chef/supermarket,chef/supermarket,nellshamrell/supermarket,leftathome/supermarket,chef/supermarket,robbkidd/supermarket,chef/supermarket,robbkidd/supermarket,tas50/supermarket,jzohrab/supermarket,robbkidd/supermarket,juliandunn/supermarket,chef/supermarket,jzohrab/supermarket,rafaelmagu/supermarket,nellshamrell/supermarket,juliandunn/supermarket,tas50/supermarket,dpnl87/supermarket,leftathome/supermarket,leftathome/supermarket,juliandunn/supermarket,dpnl87/supermarket,rafaelmagu/supermarket,dpnl87/supermarket,tas50/supermarket | yaml | ## Code Before:
language: ruby
notifications:
email: false
webhooks: https://getchef.slack.com/services/hooks/travis?token=ECftsW2P2itUaz1MhfiU6cS4
rvm:
- 2.0.0
before_script:
- psql -c 'create database supermarket_test;' -U postgres
- cp .env.example .env
- bundle exec rake db:schema:load
bundler_args: --without development
script: bundle exec rspec && bundle exec rake spec:javascripts
env:
global:
secure: 3FQQOyNDbi98izCrHovUld+Laj+y7ENcMraVlpgge4q12PysndHWz5zU/VrSo/3ZInE3u36Mn2dH95nnM+kXa8rfpXtDh23YjinW4vkA1FTnnt/yppdksvY1K+K7QePIvGfmVU/Y7kq6C3k4R3kB99cN+luf5oVdby9kePFkQHc=
## Instruction:
Add redis and GitHub access token to Travis config
Note: the GitHub access token is encrypted. B)
## Code After:
language: ruby
notifications:
email: false
webhooks: https://getchef.slack.com/services/hooks/travis?token=ECftsW2P2itUaz1MhfiU6cS4
rvm:
- 2.0.0
before_script:
- psql -c 'create database supermarket_test;' -U postgres
- cp .env.example .env
- bundle exec rake db:schema:load
bundler_args: --without development
script: bundle exec rspec && bundle exec rake spec:javascripts
services:
- redis-server
env:
global:
secure: "rzoy57s+oxvw27HStU1VNHN7fS525ocQo11bmASbwG5Ax6I4X/dwWofQCoZPoGrXisMw5RQaa7e3bHJpATZsMJC67Sf6gbfSOIYY7tISXuCFh9q/19YPGltdwZkP3OgawEpufA8zcMHzD5nvWNXq4c4TKRdtX6mHQVIAOJ9u6qY="
|
82fa664bf2c7f7ebbd3aa49a2de0f6fe8421c347 | src/main/java/seedu/address/logic/parser/NattyParser.java | src/main/java/seedu/address/logic/parser/NattyParser.java | //@@author A0114395E
package seedu.address.logic.parser;
import java.util.List;
import com.joestelmach.natty.DateGroup;
public class NattyParser {
private static NattyParser instance = null;
// Exists only to defeat instantiation.
protected NattyParser() {
}
// Returns the singleton instance
public static NattyParser getInstance() {
if (instance == null) {
instance = new NattyParser();
}
return instance;
}
/**
* Parses, analyses and converts 'rich text' into a timestamp
*
* @param String - e.g. 'Tomorrow'
* @return String - Timestamp
*/
public String parseNLPDate(String argsString) {
com.joestelmach.natty.Parser nParser = new com.joestelmach.natty.Parser();
List<DateGroup> groups = nParser.parse(argsString);
String output = "";
for (DateGroup group : groups) {
output = group.getDates().get(0).toString().replace("CST", "");
}
return output;
}
}
| //@@author A0114395E
package seedu.address.logic.parser;
import java.util.List;
import com.joestelmach.natty.DateGroup;
public class NattyParser {
private static NattyParser instance = null;
private static String emptyValue = "-";
// Exists only to defeat instantiation.
protected NattyParser() {
}
// Returns the singleton instance
public static NattyParser getInstance() {
if (instance == null) {
instance = new NattyParser();
}
return instance;
}
/**
* Parses, analyses and converts 'rich text' into a timestamp
*
* @param String - e.g. 'Tomorrow'
* @return String - Timestamp
*/
public String parseNLPDate(String argsString) {
if (argsString.trim().equals(emptyValue)) {
return emptyValue;
}
com.joestelmach.natty.Parser nParser = new com.joestelmach.natty.Parser();
List<DateGroup> groups = nParser.parse(argsString);
String output = "";
for (DateGroup group : groups) {
output = group.getDates().get(0).toString().replace("CST", "");
}
return output;
}
}
| Check for undo-ing delete commands of task without start or deadline | Check for undo-ing delete commands of task without start or deadline
| Java | mit | CS2103JAN2017-F12-B2/main,CS2103JAN2017-F12-B2/main | java | ## Code Before:
//@@author A0114395E
package seedu.address.logic.parser;
import java.util.List;
import com.joestelmach.natty.DateGroup;
public class NattyParser {
private static NattyParser instance = null;
// Exists only to defeat instantiation.
protected NattyParser() {
}
// Returns the singleton instance
public static NattyParser getInstance() {
if (instance == null) {
instance = new NattyParser();
}
return instance;
}
/**
* Parses, analyses and converts 'rich text' into a timestamp
*
* @param String - e.g. 'Tomorrow'
* @return String - Timestamp
*/
public String parseNLPDate(String argsString) {
com.joestelmach.natty.Parser nParser = new com.joestelmach.natty.Parser();
List<DateGroup> groups = nParser.parse(argsString);
String output = "";
for (DateGroup group : groups) {
output = group.getDates().get(0).toString().replace("CST", "");
}
return output;
}
}
## Instruction:
Check for undo-ing delete commands of task without start or deadline
## Code After:
//@@author A0114395E
package seedu.address.logic.parser;
import java.util.List;
import com.joestelmach.natty.DateGroup;
public class NattyParser {
private static NattyParser instance = null;
private static String emptyValue = "-";
// Exists only to defeat instantiation.
protected NattyParser() {
}
// Returns the singleton instance
public static NattyParser getInstance() {
if (instance == null) {
instance = new NattyParser();
}
return instance;
}
/**
* Parses, analyses and converts 'rich text' into a timestamp
*
* @param String - e.g. 'Tomorrow'
* @return String - Timestamp
*/
public String parseNLPDate(String argsString) {
if (argsString.trim().equals(emptyValue)) {
return emptyValue;
}
com.joestelmach.natty.Parser nParser = new com.joestelmach.natty.Parser();
List<DateGroup> groups = nParser.parse(argsString);
String output = "";
for (DateGroup group : groups) {
output = group.getDates().get(0).toString().replace("CST", "");
}
return output;
}
}
|
5b95fbfc150098d8297eb2ceb89fe2bed1d6f962 | README.md | README.md | Noda Time is an alternative date and time API for .NET. It helps you to
think about your data more clearly, and express operations on that data more
precisely.
Most enquiries about the project are best
* [Project web site](http://nodatime.org) - for documentation, installation, downloads etc
* [Group/mailing list](https://groups.google.com/group/noda-time) - for discussion of potential features
* [Project source and issue site](https://github.com/nodatime/nodatime)
* [Stack Overflow tag](http://stackoverflow.com/questions/tagged/nodatime) - for specific "How do I do X?" questions
The above links should be used for most interactions. The Gitter chat linked below is also available,
but as Noda Time is a small project, there are rarely people actively watching the chat - most concerns
are better handled on Stack Overflow, the mailing list, or as a GitHub issue.
* [Public chat room](https://gitter.im/nodatime/nodatime) [](https://gitter.im/nodatime/nodatime?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
| [](https://travis-ci.org/nodatime/nodatime)
Noda Time is an alternative date and time API for .NET. It helps you to
think about your data more clearly, and express operations on that data more
precisely.
Most enquiries about the project are best
* [Project web site](http://nodatime.org) - for documentation, installation, downloads etc
* [Group/mailing list](https://groups.google.com/group/noda-time) - for discussion of potential features
* [Project source and issue site](https://github.com/nodatime/nodatime)
* [Stack Overflow tag](http://stackoverflow.com/questions/tagged/nodatime) - for specific "How do I do X?" questions
The above links should be used for most interactions. The Gitter chat linked below is also available,
but as Noda Time is a small project, there are rarely people actively watching the chat - most concerns
are better handled on Stack Overflow, the mailing list, or as a GitHub issue.
* [Public chat room](https://gitter.im/nodatime/nodatime) [](https://gitter.im/nodatime/nodatime?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
| Add Travis badge for the front page readme | Add Travis badge for the front page readme
| Markdown | apache-2.0 | nodatime/nodatime,zaccharles/nodatime,zaccharles/nodatime,zaccharles/nodatime,zaccharles/nodatime,malcolmr/nodatime,malcolmr/nodatime,nodatime/nodatime,malcolmr/nodatime,jskeet/nodatime,jskeet/nodatime,zaccharles/nodatime,BenJenkinson/nodatime,BenJenkinson/nodatime,malcolmr/nodatime,zaccharles/nodatime | markdown | ## Code Before:
Noda Time is an alternative date and time API for .NET. It helps you to
think about your data more clearly, and express operations on that data more
precisely.
Most enquiries about the project are best
* [Project web site](http://nodatime.org) - for documentation, installation, downloads etc
* [Group/mailing list](https://groups.google.com/group/noda-time) - for discussion of potential features
* [Project source and issue site](https://github.com/nodatime/nodatime)
* [Stack Overflow tag](http://stackoverflow.com/questions/tagged/nodatime) - for specific "How do I do X?" questions
The above links should be used for most interactions. The Gitter chat linked below is also available,
but as Noda Time is a small project, there are rarely people actively watching the chat - most concerns
are better handled on Stack Overflow, the mailing list, or as a GitHub issue.
* [Public chat room](https://gitter.im/nodatime/nodatime) [](https://gitter.im/nodatime/nodatime?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
## Instruction:
Add Travis badge for the front page readme
## Code After:
[](https://travis-ci.org/nodatime/nodatime)
Noda Time is an alternative date and time API for .NET. It helps you to
think about your data more clearly, and express operations on that data more
precisely.
Most enquiries about the project are best
* [Project web site](http://nodatime.org) - for documentation, installation, downloads etc
* [Group/mailing list](https://groups.google.com/group/noda-time) - for discussion of potential features
* [Project source and issue site](https://github.com/nodatime/nodatime)
* [Stack Overflow tag](http://stackoverflow.com/questions/tagged/nodatime) - for specific "How do I do X?" questions
The above links should be used for most interactions. The Gitter chat linked below is also available,
but as Noda Time is a small project, there are rarely people actively watching the chat - most concerns
are better handled on Stack Overflow, the mailing list, or as a GitHub issue.
* [Public chat room](https://gitter.im/nodatime/nodatime) [](https://gitter.im/nodatime/nodatime?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
6dbbb8a945ae75d542f61ae00d58df14e306245f | src/il/GlobalArray.cpp | src/il/GlobalArray.cpp | //=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "il/GlobalArray.hpp"
#include "AssemblyFileWriter.hpp"
using namespace eddic;
GlobalArray::GlobalArray(std::string n, BaseType t, int s) : name(n), type(t), size(s) {}
void GlobalArray::write(AssemblyFileWriter& writer){
writer.stream() << "VA" << name << ":" <<std::endl;
writer.stream() << ".rept " << size << std::endl;
if(type == BaseType::INT){
writer.stream() << ".long 0" << std::endl;
} else if(type == BaseType::STRING){
writer.stream() << ".long S3" << std::endl;
writer.stream() << ".long 0" << std::endl;
}
writer.stream() << ".endr" << std::endl;
}
| //=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "il/GlobalArray.hpp"
#include "AssemblyFileWriter.hpp"
using namespace eddic;
GlobalArray::GlobalArray(std::string n, BaseType t, int s) : name(n), type(t), size(s) {}
void GlobalArray::write(AssemblyFileWriter& writer){
writer.stream() << "VA" << name << ":" <<std::endl;
writer.stream() << ".long " << size << std::endl;
writer.stream() << ".rept " << size << std::endl;
if(type == BaseType::INT){
writer.stream() << ".long 0" << std::endl;
} else if(type == BaseType::STRING){
writer.stream() << ".long S3" << std::endl;
writer.stream() << ".long 0" << std::endl;
}
writer.stream() << ".endr" << std::endl;
}
| Include the size of the array in the array memory layout | Include the size of the array in the array memory layout
| C++ | mit | wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic | c++ | ## Code Before:
//=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "il/GlobalArray.hpp"
#include "AssemblyFileWriter.hpp"
using namespace eddic;
GlobalArray::GlobalArray(std::string n, BaseType t, int s) : name(n), type(t), size(s) {}
void GlobalArray::write(AssemblyFileWriter& writer){
writer.stream() << "VA" << name << ":" <<std::endl;
writer.stream() << ".rept " << size << std::endl;
if(type == BaseType::INT){
writer.stream() << ".long 0" << std::endl;
} else if(type == BaseType::STRING){
writer.stream() << ".long S3" << std::endl;
writer.stream() << ".long 0" << std::endl;
}
writer.stream() << ".endr" << std::endl;
}
## Instruction:
Include the size of the array in the array memory layout
## Code After:
//=======================================================================
// Copyright Baptiste Wicht 2011.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//=======================================================================
#include "il/GlobalArray.hpp"
#include "AssemblyFileWriter.hpp"
using namespace eddic;
GlobalArray::GlobalArray(std::string n, BaseType t, int s) : name(n), type(t), size(s) {}
void GlobalArray::write(AssemblyFileWriter& writer){
writer.stream() << "VA" << name << ":" <<std::endl;
writer.stream() << ".long " << size << std::endl;
writer.stream() << ".rept " << size << std::endl;
if(type == BaseType::INT){
writer.stream() << ".long 0" << std::endl;
} else if(type == BaseType::STRING){
writer.stream() << ".long S3" << std::endl;
writer.stream() << ".long 0" << std::endl;
}
writer.stream() << ".endr" << std::endl;
}
|
d3134a6df1c89398b91f7b46f4c70270a72d1f68 | testing/test-vectors/prng-tests.lisp | testing/test-vectors/prng-tests.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
(in-package :crypto-tests)
(rtest:deftest :prng-fortuna (run-test-vector-file :prng *prng-tests*) t)
;; (random-data (make-prng :fortuna :seed (coerce #(0) 'simple-octet-vector)) 1) #(28))
| ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
(in-package :crypto-tests)
(rtest:deftest :prng-fortuna (run-test-vector-file :prng *prng-tests*) t)
(rtest:deftest :prng-fortuna-urandom (let ((prng (crypto:make-prng :fortuna :seed urandom)))
(= (length (crypto:random-data 16 prng))
16)) t)
;; (random-data (make-prng :fortuna :seed (coerce #(0) 'simple-octet-vector)) 1) #(28))
| Add test of (MAKE-PRNG :FORTUNA :SEED URANDOM) | Add test of (MAKE-PRNG :FORTUNA :SEED URANDOM)
| Common Lisp | bsd-3-clause | eadmund/ironclad,sharplispers/ironclad,glv2/ironclad | common-lisp | ## Code Before:
;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
(in-package :crypto-tests)
(rtest:deftest :prng-fortuna (run-test-vector-file :prng *prng-tests*) t)
;; (random-data (make-prng :fortuna :seed (coerce #(0) 'simple-octet-vector)) 1) #(28))
## Instruction:
Add test of (MAKE-PRNG :FORTUNA :SEED URANDOM)
## Code After:
;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
(in-package :crypto-tests)
(rtest:deftest :prng-fortuna (run-test-vector-file :prng *prng-tests*) t)
(rtest:deftest :prng-fortuna-urandom (let ((prng (crypto:make-prng :fortuna :seed urandom)))
(= (length (crypto:random-data 16 prng))
16)) t)
;; (random-data (make-prng :fortuna :seed (coerce #(0) 'simple-octet-vector)) 1) #(28))
|
86be0a7d8a08c2fbf3fd76964f53b54d990f90db | classes/sCache.php | classes/sCache.php | <?php
/**
* Singleton class to manage Sutra-specific cache.
*
* @copyright Copyright (c) 2011 Poluza.
* @author Andrew Udvare [au] <[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php
*
* @package Sutra
* @link http://www.example.com/
*
* @version 1.0
*/
class sCache extends fCache {
/**
* The current working directory.
*
* @var string
*/
private static $cwd = '';
/**
* Initialises the class.
*
* @return void
*/
private static function initialize() {
if (!self::$cwd) {
self::$cwd = getcwd();
}
}
/**
* Get a key unique to the site.
*
* @param string $key Key to use.
* @param string $class_prefix Class prefix to use. If not specified, sCache
* will be used.
* @return string Key that can be used for cache storage.
*/
public static function getSiteUniqueKey($key, $class_prefix = NULL) {
self::initialize();
if (is_null($class_prefix)) {
$class_prefix = __CLASS__;
}
return $class_prefix.'::'.self::$cwd.'::'.$key;
}
}
| <?php
/**
* Extension to sCache.
*
* @copyright Copyright (c) 2011 Poluza.
* @author Andrew Udvare [au] <[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php
*
* @package Sutra
* @link http://www.sutralib.com/
*
* @version 1.01
*/
class sCache extends fCache {
/**
* The current working directory.
*
* @var string
*/
private static $cwd = '';
/**
* Initialises the class.
*
* @return void
*/
private static function initialize() {
if (!self::$cwd) {
self::$cwd = getcwd();
}
}
/**
* Get a key unique to the site.
*
* @param string $key Key to use.
* @param string $prefix Class prefix to use. If not specified, 'sCache' will
* be used.
* @return string Key that can be used for cache storage.
*/
public static function getSiteUniqueKey($key, $prefix = NULL) {
self::initialize();
if (is_null($prefix)) {
$prefix = __CLASS__;
}
return $prefix.'::'.self::$cwd.'::'.$key;
}
}
| Update site URL; update documentation; simplify getSiteUniqueKey() | Update site URL; update documentation; simplify getSiteUniqueKey()
| PHP | mit | Tatsh/sutra | php | ## Code Before:
<?php
/**
* Singleton class to manage Sutra-specific cache.
*
* @copyright Copyright (c) 2011 Poluza.
* @author Andrew Udvare [au] <[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php
*
* @package Sutra
* @link http://www.example.com/
*
* @version 1.0
*/
class sCache extends fCache {
/**
* The current working directory.
*
* @var string
*/
private static $cwd = '';
/**
* Initialises the class.
*
* @return void
*/
private static function initialize() {
if (!self::$cwd) {
self::$cwd = getcwd();
}
}
/**
* Get a key unique to the site.
*
* @param string $key Key to use.
* @param string $class_prefix Class prefix to use. If not specified, sCache
* will be used.
* @return string Key that can be used for cache storage.
*/
public static function getSiteUniqueKey($key, $class_prefix = NULL) {
self::initialize();
if (is_null($class_prefix)) {
$class_prefix = __CLASS__;
}
return $class_prefix.'::'.self::$cwd.'::'.$key;
}
}
## Instruction:
Update site URL; update documentation; simplify getSiteUniqueKey()
## Code After:
<?php
/**
* Extension to sCache.
*
* @copyright Copyright (c) 2011 Poluza.
* @author Andrew Udvare [au] <[email protected]>
* @license http://www.opensource.org/licenses/mit-license.php
*
* @package Sutra
* @link http://www.sutralib.com/
*
* @version 1.01
*/
class sCache extends fCache {
/**
* The current working directory.
*
* @var string
*/
private static $cwd = '';
/**
* Initialises the class.
*
* @return void
*/
private static function initialize() {
if (!self::$cwd) {
self::$cwd = getcwd();
}
}
/**
* Get a key unique to the site.
*
* @param string $key Key to use.
* @param string $prefix Class prefix to use. If not specified, 'sCache' will
* be used.
* @return string Key that can be used for cache storage.
*/
public static function getSiteUniqueKey($key, $prefix = NULL) {
self::initialize();
if (is_null($prefix)) {
$prefix = __CLASS__;
}
return $prefix.'::'.self::$cwd.'::'.$key;
}
}
|
ef598274988bd92ad68fb98f0e15b64d3a885914 | .travis.yml | .travis.yml | language: objective-c
before_script:
- './setup.sh'
- 'cd Example'
| ---
language: objective-c
before_script:
- ./setup.sh
- cd Example
env:
global:
- secure: ! 'UYWpq1V/eF+4f23y3wzMRLIy7+nKXvqGm2p+NcN60c18VOwq5Dpcx5ahNzb4
85IFWFxtSUOAItDgJAHfBuHpPxNvwJgbfNnhHZEokuxP3shlLXD5lFZiBb5M
Du/fvpoccVxNPPfpIaQbpjwYAYXBs+68pRg/IM9+cz4x4x3FQqA='
| Add secure env var again | Add secure env var again
| YAML | mit | keith/KBSCloudAppAPI | yaml | ## Code Before:
language: objective-c
before_script:
- './setup.sh'
- 'cd Example'
## Instruction:
Add secure env var again
## Code After:
---
language: objective-c
before_script:
- ./setup.sh
- cd Example
env:
global:
- secure: ! 'UYWpq1V/eF+4f23y3wzMRLIy7+nKXvqGm2p+NcN60c18VOwq5Dpcx5ahNzb4
85IFWFxtSUOAItDgJAHfBuHpPxNvwJgbfNnhHZEokuxP3shlLXD5lFZiBb5M
Du/fvpoccVxNPPfpIaQbpjwYAYXBs+68pRg/IM9+cz4x4x3FQqA='
|
b6d3f2ee6b800106d8cc867aa164d6fe0c165915 | app/controllers/api/v1/nightbot_controller.rb | app/controllers/api/v1/nightbot_controller.rb | class Api::V1::NightbotController < ApplicationController
def execute
# Usage: !songs current/delete/list/playlist/next/request/skip/save/promote/volume/play/pause
case params[:q]
when 'current'
track = Play.where.not(played_at: nil).first.track
render text: format('Now playing: %s - %s', track.artist, track.name)
when 'playlist', 'request'
render text: 'TODO'
else
render text: 'Usage: !songs current|playlist|request'
end
end
end
| class Api::V1::NightbotController < ApplicationController
def execute
# Usage: !songs current/delete/list/playlist/next/request/skip/save/promote/volume/play/pause
case params[:q]
when 'current'
track = Play.where.not(played_at: nil).first.track
render text: format('Now playing: %s - %s', track.artist, track.name)
when 'playlist'
plays = Play.where(played_at: nil)
render text: plays.map { |play| play.track.name }.reverse.join(', ')
when /request\s+(?<name>.+)/
name = Regexp.last_match(:name)
track = Track.find_by(name: name)
if track
track.plays.create!
render text: format('Track name `%s\' successful requested', name)
else
render text: format('Track name `%s\' not found', name)
end
else
render text: 'Usage: !songs current|playlist|request'
end
end
end
| Add playlist and request support to Nightbot API | Add playlist and request support to Nightbot API
| Ruby | mit | denpaio/denpaio,denpaio/denpaio,denpaio/denpaio,denpaio/denpaio | ruby | ## Code Before:
class Api::V1::NightbotController < ApplicationController
def execute
# Usage: !songs current/delete/list/playlist/next/request/skip/save/promote/volume/play/pause
case params[:q]
when 'current'
track = Play.where.not(played_at: nil).first.track
render text: format('Now playing: %s - %s', track.artist, track.name)
when 'playlist', 'request'
render text: 'TODO'
else
render text: 'Usage: !songs current|playlist|request'
end
end
end
## Instruction:
Add playlist and request support to Nightbot API
## Code After:
class Api::V1::NightbotController < ApplicationController
def execute
# Usage: !songs current/delete/list/playlist/next/request/skip/save/promote/volume/play/pause
case params[:q]
when 'current'
track = Play.where.not(played_at: nil).first.track
render text: format('Now playing: %s - %s', track.artist, track.name)
when 'playlist'
plays = Play.where(played_at: nil)
render text: plays.map { |play| play.track.name }.reverse.join(', ')
when /request\s+(?<name>.+)/
name = Regexp.last_match(:name)
track = Track.find_by(name: name)
if track
track.plays.create!
render text: format('Track name `%s\' successful requested', name)
else
render text: format('Track name `%s\' not found', name)
end
else
render text: 'Usage: !songs current|playlist|request'
end
end
end
|
9ba786d645c4ccd398c15da0e240195d0250a2d2 | gulpfile.js | gulpfile.js | var git = require('gulp-git');
var gulp = require('gulp');
/**
* Release Tasks
*/
gulp.task('publish:tag', function(done) {
var pkg = JSON.parse(require('fs').readFileSync('./package.json'));
var v = 'v' + pkg.version;
var message = 'Release ' + v;
git.tag(v, message, function (err) {
if (err) throw err;
git.push('origin', v, function (err) {
if (err) throw err;
done();
});
});
});
gulp.task('publish:npm', function(done) {
require('child_process')
.spawn('npm', ['publish'], { stdio: 'inherit' })
.on('close', done);
});
gulp.task('release', ['publish:tag', 'publish:npm']); | var git = require('gulp-git');
var gulp = require('gulp');
/*
* Release Tasks
*/
// Git Tag
gulp.task('publish:tag', function(done) {
// get the version from package.json
var pkg = JSON.parse(require('fs').readFileSync('./package.json'));
// prepend the 'v'
var v = 'v' + pkg.version;
// Tag message
var message = 'Release ' + v;
// tag the current commit
git.tag(v, message, function (err) {
if (err) throw err;
// push to origin
git.push('origin', v, function (err) {
if (err) throw err;
done();
});
});
});
// NPM Publish
gulp.task('publish:npm', function(done) {
// get the npm child process
require('child_process')
// spawn another npm process with the command of publish
.spawn('npm', ['publish'], { stdio: 'inherit' })
.on('close', done);
});
// Expose a single command to git tag and npm publish
gulp.task('release', ['publish:tag', 'publish:npm']); | Add comments to gulp file | Add comments to gulp file
| JavaScript | mit | skellyjs/skellyjs,skellyjs/skellyjs | javascript | ## Code Before:
var git = require('gulp-git');
var gulp = require('gulp');
/**
* Release Tasks
*/
gulp.task('publish:tag', function(done) {
var pkg = JSON.parse(require('fs').readFileSync('./package.json'));
var v = 'v' + pkg.version;
var message = 'Release ' + v;
git.tag(v, message, function (err) {
if (err) throw err;
git.push('origin', v, function (err) {
if (err) throw err;
done();
});
});
});
gulp.task('publish:npm', function(done) {
require('child_process')
.spawn('npm', ['publish'], { stdio: 'inherit' })
.on('close', done);
});
gulp.task('release', ['publish:tag', 'publish:npm']);
## Instruction:
Add comments to gulp file
## Code After:
var git = require('gulp-git');
var gulp = require('gulp');
/*
* Release Tasks
*/
// Git Tag
gulp.task('publish:tag', function(done) {
// get the version from package.json
var pkg = JSON.parse(require('fs').readFileSync('./package.json'));
// prepend the 'v'
var v = 'v' + pkg.version;
// Tag message
var message = 'Release ' + v;
// tag the current commit
git.tag(v, message, function (err) {
if (err) throw err;
// push to origin
git.push('origin', v, function (err) {
if (err) throw err;
done();
});
});
});
// NPM Publish
gulp.task('publish:npm', function(done) {
// get the npm child process
require('child_process')
// spawn another npm process with the command of publish
.spawn('npm', ['publish'], { stdio: 'inherit' })
.on('close', done);
});
// Expose a single command to git tag and npm publish
gulp.task('release', ['publish:tag', 'publish:npm']); |
c63113965f58bc89e7cea9baa9e31a91f8a7ab75 | lib/puppet/parser/functions/api_fetch.rb | lib/puppet/parser/functions/api_fetch.rb |
require 'net/http'
require 'net/https'
require 'openssl'
module Puppet::Parser::Functions
newfunction(:api_fetch, :type => :rvalue) do |args|
raise(Puppet::ParseError, "api_fetch(): Wrong number of arguments given (#{args.size} for 2)") if args.size < 2
url = args[0]
token = args[1]
unless url.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
unless token.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
uri = URI.parse(url)
req = Net::HTTP::Get.new(uri.to_s)
req['Authorization'] = "Bearer #{token}"
req['Accept'] = 'text/plain'
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
https.open_timeout = 5
https.read_timeout = 5
begin
response = https.start() do |cx|
cx.request(req)
end
case response
when Net::HTTPSuccess
if response.body.length > 0
puts response.body.split("\n")
end
end
rescue Net::OpenTimeout, Net::ReadTimeout
return Array.new
end
return Array.new
end
end
|
require 'net/http'
require 'net/https'
require 'openssl'
module Puppet::Parser::Functions
newfunction(:api_fetch, :type => :rvalue) do |args|
raise(Puppet::ParseError, "api_fetch(): Wrong number of arguments given (#{args.size} for 2)") if args.size < 2
url = args[0]
token = args[1]
unless url.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
unless token.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
uri = URI.parse(url)
req = Net::HTTP::Get.new(uri.to_s)
req['Authorization'] = "Bearer #{token}"
req['Accept'] = 'text/plain'
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
https.open_timeout = 5
https.read_timeout = 5
begin
response = https.start() do |cx|
cx.request(req)
end
if response.kind_of? Net::HTTPSuccess and response.body.length > 0
puts response.body.split("\n")
end
rescue Net::OpenTimeout, Net::ReadTimeout
return Array.new
end
return Array.new
end
end
| Replace case statement with if | Replace case statement with if
| Ruby | apache-2.0 | Ericsson/puppet-module-vas,Phil-Friderici/puppet-module-vas,Phil-Friderici/puppet-module-vas,Ericsson/puppet-module-vas | ruby | ## Code Before:
require 'net/http'
require 'net/https'
require 'openssl'
module Puppet::Parser::Functions
newfunction(:api_fetch, :type => :rvalue) do |args|
raise(Puppet::ParseError, "api_fetch(): Wrong number of arguments given (#{args.size} for 2)") if args.size < 2
url = args[0]
token = args[1]
unless url.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
unless token.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
uri = URI.parse(url)
req = Net::HTTP::Get.new(uri.to_s)
req['Authorization'] = "Bearer #{token}"
req['Accept'] = 'text/plain'
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
https.open_timeout = 5
https.read_timeout = 5
begin
response = https.start() do |cx|
cx.request(req)
end
case response
when Net::HTTPSuccess
if response.body.length > 0
puts response.body.split("\n")
end
end
rescue Net::OpenTimeout, Net::ReadTimeout
return Array.new
end
return Array.new
end
end
## Instruction:
Replace case statement with if
## Code After:
require 'net/http'
require 'net/https'
require 'openssl'
module Puppet::Parser::Functions
newfunction(:api_fetch, :type => :rvalue) do |args|
raise(Puppet::ParseError, "api_fetch(): Wrong number of arguments given (#{args.size} for 2)") if args.size < 2
url = args[0]
token = args[1]
unless url.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
unless token.is_a?(String)
raise(Puppet::ParseError, 'api_fetch(): Argument must be a string')
end
uri = URI.parse(url)
req = Net::HTTP::Get.new(uri.to_s)
req['Authorization'] = "Bearer #{token}"
req['Accept'] = 'text/plain'
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
https.open_timeout = 5
https.read_timeout = 5
begin
response = https.start() do |cx|
cx.request(req)
end
if response.kind_of? Net::HTTPSuccess and response.body.length > 0
puts response.body.split("\n")
end
rescue Net::OpenTimeout, Net::ReadTimeout
return Array.new
end
return Array.new
end
end
|
09958c9b38b5dc14ee9c9470787594c0b9fd2d21 | .ci/travis-before-install.sh | .ci/travis-before-install.sh |
set -e -x
if [ -z "${PGVERSION}" ]; then
echo "Missing PGVERSION environment variable."
exit 1
fi
if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD}" == *wheels* ]]; then
sudo service postgresql stop ${PGVERSION}
echo "port = 5432" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
if [[ "${BUILD}" == *wheels* ]]; then
# Allow docker guests to connect to the database
echo "listen_addresses = '*'" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
echo "host all all 172.17.0.0/16 trust" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/pg_hba.conf
fi
sudo service postgresql start ${PGVERSION}
fi
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew update >/dev/null
brew upgrade pyenv
eval "$(pyenv init -)"
if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
pyenv install ${PYTHON_VERSION}
fi
pyenv global ${PYTHON_VERSION}
pyenv rehash
# Install PostgreSQL
if brew ls --versions postgresql > /dev/null; then
brew remove --force --ignore-dependencies postgresql
fi
brew install postgresql@${PGVERSION}
brew services start postgresql@${PGVERSION}
fi
|
set -e -x
if [ -z "${PGVERSION}" ]; then
echo "Missing PGVERSION environment variable."
exit 1
fi
if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD}" == *wheels* ]]; then
sudo service postgresql stop ${PGVERSION}
echo "port = 5432" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
if [[ "${BUILD}" == *wheels* ]]; then
# Allow docker guests to connect to the database
echo "listen_addresses = '*'" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
echo "host all all 172.17.0.0/16 trust" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/pg_hba.conf
if [ "${PGVERSION}" -ge "11" ]; then
# Disable JIT to avoid unpredictable timings in tests.
echo "jit = off" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
fi
fi
sudo service postgresql start ${PGVERSION}
fi
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew update >/dev/null
brew upgrade pyenv
eval "$(pyenv init -)"
if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
pyenv install ${PYTHON_VERSION}
fi
pyenv global ${PYTHON_VERSION}
pyenv rehash
# Install PostgreSQL
if brew ls --versions postgresql > /dev/null; then
brew remove --force --ignore-dependencies postgresql
fi
brew install postgresql@${PGVERSION}
brew services start postgresql@${PGVERSION}
fi
| Disable JIT on CI Postgres to make wheel tests predictable | Disable JIT on CI Postgres to make wheel tests predictable
| Shell | apache-2.0 | MagicStack/asyncpg,MagicStack/asyncpg | shell | ## Code Before:
set -e -x
if [ -z "${PGVERSION}" ]; then
echo "Missing PGVERSION environment variable."
exit 1
fi
if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD}" == *wheels* ]]; then
sudo service postgresql stop ${PGVERSION}
echo "port = 5432" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
if [[ "${BUILD}" == *wheels* ]]; then
# Allow docker guests to connect to the database
echo "listen_addresses = '*'" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
echo "host all all 172.17.0.0/16 trust" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/pg_hba.conf
fi
sudo service postgresql start ${PGVERSION}
fi
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew update >/dev/null
brew upgrade pyenv
eval "$(pyenv init -)"
if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
pyenv install ${PYTHON_VERSION}
fi
pyenv global ${PYTHON_VERSION}
pyenv rehash
# Install PostgreSQL
if brew ls --versions postgresql > /dev/null; then
brew remove --force --ignore-dependencies postgresql
fi
brew install postgresql@${PGVERSION}
brew services start postgresql@${PGVERSION}
fi
## Instruction:
Disable JIT on CI Postgres to make wheel tests predictable
## Code After:
set -e -x
if [ -z "${PGVERSION}" ]; then
echo "Missing PGVERSION environment variable."
exit 1
fi
if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD}" == *wheels* ]]; then
sudo service postgresql stop ${PGVERSION}
echo "port = 5432" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
if [[ "${BUILD}" == *wheels* ]]; then
# Allow docker guests to connect to the database
echo "listen_addresses = '*'" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
echo "host all all 172.17.0.0/16 trust" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/pg_hba.conf
if [ "${PGVERSION}" -ge "11" ]; then
# Disable JIT to avoid unpredictable timings in tests.
echo "jit = off" | \
sudo tee --append /etc/postgresql/${PGVERSION}/main/postgresql.conf
fi
fi
sudo service postgresql start ${PGVERSION}
fi
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
brew update >/dev/null
brew upgrade pyenv
eval "$(pyenv init -)"
if ! (pyenv versions | grep "${PYTHON_VERSION}$"); then
pyenv install ${PYTHON_VERSION}
fi
pyenv global ${PYTHON_VERSION}
pyenv rehash
# Install PostgreSQL
if brew ls --versions postgresql > /dev/null; then
brew remove --force --ignore-dependencies postgresql
fi
brew install postgresql@${PGVERSION}
brew services start postgresql@${PGVERSION}
fi
|
82b14ef16d3cb5c4d3a6b191ca3e91ef68343a2b | appveyor.yml | appveyor.yml |
version: 1.0.{build}
branches:
only:
- master
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
matrix:
fast_finish: true
os: Visual Studio 2017
platform:
- x86
configuration:
- Release
environment:
MONO_INSTALLER: mono-5.0.1.1-gtksharp-2.12.44-win32-0.msi
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
#---------------------------------#
# build scripts #
#---------------------------------#
init:
- git config --global core.autocrlf true
clone_script:
- cmd: git clone -q --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: git checkout -qf %APPVEYOR_REPO_COMMIT%
- cmd: git submodule update --init --recursive
install:
- cmd: appveyor DownloadFile https://download.mono-project.com/archive/5.0.1/windows-installer/%MONO_INSTALLER%
- cmd: msiexec /i %MONO_INSTALLER% /qn /norestart
build_script:
- ps: .\build.ps1 -t Generate-Android -v diagnostic
|
version: 1.0.{build}
branches:
only:
- master
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
matrix:
fast_finish: true
os: Visual Studio 2017
platform:
- x86
configuration:
- Release
environment:
MONO_INSTALLER: mono-5.0.1.1-gtksharp-2.12.44-win32-0.msi
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
#---------------------------------#
# build scripts #
#---------------------------------#
init:
- git config --global core.autocrlf true
install:
- cmd: appveyor DownloadFile https://download.mono-project.com/archive/5.0.1/windows-installer/%MONO_INSTALLER%
- cmd: msiexec /i %MONO_INSTALLER% /qn /norestart
build_script:
- cmd: git submodule update --init --recursive
- ps: .\build.ps1 -t Generate-Android -v diagnostic
| Use implicit Git clone and submodule init before building in AppVeyor. | [ci] Use implicit Git clone and submodule init before building in AppVeyor.
| YAML | mit | jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000,jonathanpeppers/Embeddinator-4000,mono/Embeddinator-4000 | yaml | ## Code Before:
version: 1.0.{build}
branches:
only:
- master
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
matrix:
fast_finish: true
os: Visual Studio 2017
platform:
- x86
configuration:
- Release
environment:
MONO_INSTALLER: mono-5.0.1.1-gtksharp-2.12.44-win32-0.msi
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
#---------------------------------#
# build scripts #
#---------------------------------#
init:
- git config --global core.autocrlf true
clone_script:
- cmd: git clone -q --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: git checkout -qf %APPVEYOR_REPO_COMMIT%
- cmd: git submodule update --init --recursive
install:
- cmd: appveyor DownloadFile https://download.mono-project.com/archive/5.0.1/windows-installer/%MONO_INSTALLER%
- cmd: msiexec /i %MONO_INSTALLER% /qn /norestart
build_script:
- ps: .\build.ps1 -t Generate-Android -v diagnostic
## Instruction:
[ci] Use implicit Git clone and submodule init before building in AppVeyor.
## Code After:
version: 1.0.{build}
branches:
only:
- master
except:
- gh-pages
#---------------------------------#
# environment configuration #
#---------------------------------#
matrix:
fast_finish: true
os: Visual Studio 2017
platform:
- x86
configuration:
- Release
environment:
MONO_INSTALLER: mono-5.0.1.1-gtksharp-2.12.44-win32-0.msi
JAVA_HOME: C:\Program Files\Java\jdk1.8.0
#---------------------------------#
# build scripts #
#---------------------------------#
init:
- git config --global core.autocrlf true
install:
- cmd: appveyor DownloadFile https://download.mono-project.com/archive/5.0.1/windows-installer/%MONO_INSTALLER%
- cmd: msiexec /i %MONO_INSTALLER% /qn /norestart
build_script:
- cmd: git submodule update --init --recursive
- ps: .\build.ps1 -t Generate-Android -v diagnostic
|
ec2940cc4b361923e7f898c2accab5a261713f19 | src/Oro/Bundle/SecurityBundle/Resources/config/entity_config.yml | src/Oro/Bundle/SecurityBundle/Resources/config/entity_config.yml | oro_entity_config:
security:
entity:
items:
type:
options:
default_value: 'ACL'
group_name: ~
| oro_entity_config:
security:
entity:
items:
type: ~
group_name: ~
| Remove Contact Address ACL resource and use Contact instead | BAP-1683: Remove Contact Address ACL resource and use Contact instead
| YAML | mit | hugeval/platform,orocrm/platform,geoffroycochard/platform,mszajner/platform,morontt/platform,mszajner/platform,trustify/oroplatform,hugeval/platform,akeneo/platform,ramunasd/platform,2ndkauboy/platform,hugeval/platform,morontt/platform,akeneo/platform,geoffroycochard/platform,Djamy/platform,orocrm/platform,2ndkauboy/platform,umpirsky/platform,northdakota/platform,geoffroycochard/platform,umpirsky/platform,northdakota/platform,akeneo/platform,morontt/platform,trustify/oroplatform,2ndkauboy/platform,Djamy/platform,northdakota/platform,ramunasd/platform,mszajner/platform,ramunasd/platform,trustify/oroplatform,Djamy/platform,orocrm/platform | yaml | ## Code Before:
oro_entity_config:
security:
entity:
items:
type:
options:
default_value: 'ACL'
group_name: ~
## Instruction:
BAP-1683: Remove Contact Address ACL resource and use Contact instead
## Code After:
oro_entity_config:
security:
entity:
items:
type: ~
group_name: ~
|
6711d7c798bb2aa0cc6305c157d8f8931cfb9eb8 | src/main/java/org/gbif/portal/struts/freemarker/GbifFreemarkerManager.java | src/main/java/org/gbif/portal/struts/freemarker/GbifFreemarkerManager.java | package org.gbif.portal.struts.freemarker;
import javax.servlet.ServletContext;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GbifFreemarkerManager extends FreemarkerManager {
private static final Logger LOG = LoggerFactory.getLogger(GbifFreemarkerManager.class);
@Override
public void init(ServletContext servletContext) throws TemplateException {
super.init(servletContext);
LOG.info("Init custom GBIF Freemarker Manager");
// custom ftl exception handling
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
// adding date rendering methods
config.setSharedVariable("niceDate", new NiceDateTemplateMethodModel());
}
}
| package org.gbif.portal.struts.freemarker;
import java.util.Locale;
import javax.servlet.ServletContext;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GbifFreemarkerManager extends FreemarkerManager {
private static final Logger LOG = LoggerFactory.getLogger(GbifFreemarkerManager.class);
@Override
public void init(ServletContext servletContext) throws TemplateException {
super.init(servletContext);
LOG.info("Init custom GBIF Freemarker Manager");
// custom ftl exception handling
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
// adding date rendering methods
config.setSharedVariable("niceDate", new NiceDateTemplateMethodModel());
// fixed locale, so we don't get dots as decimal separators or US "middle endian" dates.
// chose UK, as (from the constants available) that gives unambiguous short dates like "12-Jan-2016".
config.setLocale(Locale.UK);
}
}
| Fix FreeMarker locale, so we don't get . as a thousands separator. | Fix FreeMarker locale, so we don't get . as a thousands separator.
| Java | apache-2.0 | gbif/portal-web,gbif/portal-web,gbif/portal-web | java | ## Code Before:
package org.gbif.portal.struts.freemarker;
import javax.servlet.ServletContext;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GbifFreemarkerManager extends FreemarkerManager {
private static final Logger LOG = LoggerFactory.getLogger(GbifFreemarkerManager.class);
@Override
public void init(ServletContext servletContext) throws TemplateException {
super.init(servletContext);
LOG.info("Init custom GBIF Freemarker Manager");
// custom ftl exception handling
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
// adding date rendering methods
config.setSharedVariable("niceDate", new NiceDateTemplateMethodModel());
}
}
## Instruction:
Fix FreeMarker locale, so we don't get . as a thousands separator.
## Code After:
package org.gbif.portal.struts.freemarker;
import java.util.Locale;
import javax.servlet.ServletContext;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import org.apache.struts2.views.freemarker.FreemarkerManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class GbifFreemarkerManager extends FreemarkerManager {
private static final Logger LOG = LoggerFactory.getLogger(GbifFreemarkerManager.class);
@Override
public void init(ServletContext servletContext) throws TemplateException {
super.init(servletContext);
LOG.info("Init custom GBIF Freemarker Manager");
// custom ftl exception handling
config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
// adding date rendering methods
config.setSharedVariable("niceDate", new NiceDateTemplateMethodModel());
// fixed locale, so we don't get dots as decimal separators or US "middle endian" dates.
// chose UK, as (from the constants available) that gives unambiguous short dates like "12-Jan-2016".
config.setLocale(Locale.UK);
}
}
|
f9a6b71c11e0e2cf19eaf4ed96b1d5f9db4dc6f8 | css/app.css | css/app.css | html, body, input {
margin: 0;
padding: 0;
font-family: Helvetica, Tahoma;
color: #774422;
font-size: 13px;
}
a {
text-decoration: none;
color: #333;
outline: none;
}
a:hover {
background-color: #eee;
}
#view-templates { display: none; }
.clear { clear: both; } | html, body, input {
margin: 0;
padding: 0;
font-family: Helvetica, Tahoma;
color: #774422;
font-size: 13px;
overflow: hidden;
}
a {
text-decoration: none;
color: #333;
outline: none;
}
a:hover {
background-color: #eee;
}
#view-templates { display: none; }
.clear { clear: both; } | Make overflow on the body hidden, so that scroll bars never show | Make overflow on the body hidden, so that scroll bars never show
| CSS | mit | marcuswestin/fin | css | ## Code Before:
html, body, input {
margin: 0;
padding: 0;
font-family: Helvetica, Tahoma;
color: #774422;
font-size: 13px;
}
a {
text-decoration: none;
color: #333;
outline: none;
}
a:hover {
background-color: #eee;
}
#view-templates { display: none; }
.clear { clear: both; }
## Instruction:
Make overflow on the body hidden, so that scroll bars never show
## Code After:
html, body, input {
margin: 0;
padding: 0;
font-family: Helvetica, Tahoma;
color: #774422;
font-size: 13px;
overflow: hidden;
}
a {
text-decoration: none;
color: #333;
outline: none;
}
a:hover {
background-color: #eee;
}
#view-templates { display: none; }
.clear { clear: both; } |
c51d368e1e6131564d7d533f3df1b76b93818b6b | src/main/scala/gov/wicourts/json/formlet/package.scala | src/main/scala/gov/wicourts/json/formlet/package.scala | package gov.wicourts.json
import argonaut.Cursor
import scalaz.Id.Id
import scala.language.higherKinds
import scalaz.NonEmptyList
package object formlet {
type IdFieldFormlet[A] = Formlet[Id, Option[Cursor], NonEmptyList[String], A, FieldView]
type IdObjectFormlet[A] = Formlet[Id, Option[Cursor], ValidationErrors, A, JsonObjectBuilder]
type FieldFormlet[M[_], A] = Formlet[M, Option[Cursor], NonEmptyList[String], A, FieldView]
type ObjectFormlet[M[_], A] = Formlet[M, Option[Cursor], ValidationErrors, A, JsonObjectBuilder]
type JsonFormlet[M[_], E, A, V] = Formlet[M, Option[Cursor], E, A, V]
object syntax extends ToFieldFormletOps with ToObjectFormletOps
}
| package gov.wicourts.json
import argonaut.Cursor
import scalaz.Id.Id
import scala.language.higherKinds
import scalaz.NonEmptyList
package object formlet {
type JsonFormlet[M[_], E, A, V] = Formlet[M, Option[Cursor], E, A, V]
type FieldFormlet[M[_], A] = JsonFormlet[M, NonEmptyList[String], A, FieldView]
type ObjectFormlet[M[_], A] = JsonFormlet[M, ValidationErrors, A, JsonObjectBuilder]
type IdFieldFormlet[A] = FieldFormlet[Id, A]
type IdObjectFormlet[A] = ObjectFormlet[Id, A]
object syntax extends ToFieldFormletOps with ToObjectFormletOps
}
| Redefine the Formlet type aliases to make the relation between them clearer | Redefine the Formlet type aliases to make the relation between them clearer
| Scala | mit | ccap/json-formlets | scala | ## Code Before:
package gov.wicourts.json
import argonaut.Cursor
import scalaz.Id.Id
import scala.language.higherKinds
import scalaz.NonEmptyList
package object formlet {
type IdFieldFormlet[A] = Formlet[Id, Option[Cursor], NonEmptyList[String], A, FieldView]
type IdObjectFormlet[A] = Formlet[Id, Option[Cursor], ValidationErrors, A, JsonObjectBuilder]
type FieldFormlet[M[_], A] = Formlet[M, Option[Cursor], NonEmptyList[String], A, FieldView]
type ObjectFormlet[M[_], A] = Formlet[M, Option[Cursor], ValidationErrors, A, JsonObjectBuilder]
type JsonFormlet[M[_], E, A, V] = Formlet[M, Option[Cursor], E, A, V]
object syntax extends ToFieldFormletOps with ToObjectFormletOps
}
## Instruction:
Redefine the Formlet type aliases to make the relation between them clearer
## Code After:
package gov.wicourts.json
import argonaut.Cursor
import scalaz.Id.Id
import scala.language.higherKinds
import scalaz.NonEmptyList
package object formlet {
type JsonFormlet[M[_], E, A, V] = Formlet[M, Option[Cursor], E, A, V]
type FieldFormlet[M[_], A] = JsonFormlet[M, NonEmptyList[String], A, FieldView]
type ObjectFormlet[M[_], A] = JsonFormlet[M, ValidationErrors, A, JsonObjectBuilder]
type IdFieldFormlet[A] = FieldFormlet[Id, A]
type IdObjectFormlet[A] = ObjectFormlet[Id, A]
object syntax extends ToFieldFormletOps with ToObjectFormletOps
}
|
5fae8a0da7694777e40b2a5c0c1c4567ca140ec7 | vs/README.md | vs/README.md |
The following SDK are required to build Marian with GPU support
- [Cuda 9.2+](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal)
- Base installer
- Patches
- [CuDNN 7.1+](https://developer.nvidia.com/rdp/cudnn-download)
- Requires nVidia Developper account
- [MKL](https://software.intel.com/en-us/mkl)
## Configure
- Run configure.bat
## Build
- Run build.bat |
The following SDK are required to build Marian with GPU support
- [Cuda 9.2+](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal)
- Base installer
- Patches
- [CuDNN 7.1+](https://developer.nvidia.com/rdp/cudnn-download)
- Requires nVidia Developper account
- [MKL](https://software.intel.com/en-us/mkl)
## Patch some files
### CUDA: Unsupported Visual Studio Version Error
From [nVidia forum](https://devtalk.nvidia.com/default/topic/1022648/cuda-setup-and-installation/cuda-9-unsupported-visual-studio-version-error/4)
The latest versions of Visual Studio 2017 are not officially supported by CUDA. Two fixes are proposed:
- Downgrade Visual Studio to a supported version
- Edit the file `<CUDA install path>\include\crt\host_config.h` and change the line 131:
131 #if _MSC_VER < 1600 || _MSC_VER > 1914
into:
131 #if _MSC_VER < 1600 || _MSC_VER > 1915
## Configure
- Run configure.bat
## Build
- Run build.bat | Fix Cuda error : Unsupported Visual Studio Version Error | Fix Cuda error : Unsupported Visual Studio Version Error
| Markdown | mit | emjotde/amunmt,amunmt/marian,emjotde/amunn,emjotde/Marian,marian-nmt/marian-train,emjotde/amunmt,amunmt/marian,marian-nmt/marian-train,emjotde/amunmt,marian-nmt/marian-train,emjotde/Marian,emjotde/amunn,amunmt/marian,emjotde/amunn,marian-nmt/marian-train,emjotde/amunn,emjotde/amunmt,marian-nmt/marian-train | markdown | ## Code Before:
The following SDK are required to build Marian with GPU support
- [Cuda 9.2+](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal)
- Base installer
- Patches
- [CuDNN 7.1+](https://developer.nvidia.com/rdp/cudnn-download)
- Requires nVidia Developper account
- [MKL](https://software.intel.com/en-us/mkl)
## Configure
- Run configure.bat
## Build
- Run build.bat
## Instruction:
Fix Cuda error : Unsupported Visual Studio Version Error
## Code After:
The following SDK are required to build Marian with GPU support
- [Cuda 9.2+](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal)
- Base installer
- Patches
- [CuDNN 7.1+](https://developer.nvidia.com/rdp/cudnn-download)
- Requires nVidia Developper account
- [MKL](https://software.intel.com/en-us/mkl)
## Patch some files
### CUDA: Unsupported Visual Studio Version Error
From [nVidia forum](https://devtalk.nvidia.com/default/topic/1022648/cuda-setup-and-installation/cuda-9-unsupported-visual-studio-version-error/4)
The latest versions of Visual Studio 2017 are not officially supported by CUDA. Two fixes are proposed:
- Downgrade Visual Studio to a supported version
- Edit the file `<CUDA install path>\include\crt\host_config.h` and change the line 131:
131 #if _MSC_VER < 1600 || _MSC_VER > 1914
into:
131 #if _MSC_VER < 1600 || _MSC_VER > 1915
## Configure
- Run configure.bat
## Build
- Run build.bat |
59b3678bc8c0daf1b53285906ae101ecee359b4b | README.md | README.md | security-system
===============
| security-system
===============
The system was used in the SSE's Heist event in fall 2013. We used Node.js as a
simple server backend, with websockets that push events to pages that simulate
flickering lights and a rebooting securty system. This is all controlled by
another page with a few simple buttons on it that trigger the events, which are
run from a mobile phone.
| Add more info on how the repo was used | Add more info on how the repo was used | Markdown | mit | rit-sse/security-system | markdown | ## Code Before:
security-system
===============
## Instruction:
Add more info on how the repo was used
## Code After:
security-system
===============
The system was used in the SSE's Heist event in fall 2013. We used Node.js as a
simple server backend, with websockets that push events to pages that simulate
flickering lights and a rebooting securty system. This is all controlled by
another page with a few simple buttons on it that trigger the events, which are
run from a mobile phone.
|
fbaad92ba27e5882cf580171b1fa50976560bb55 | composer.json | composer.json | {
"name": "wisembly/amqp-bundle",
"description": "Alternative for SwarrotBundle to handle amqp in Symfony2 applications",
"type": "symfony-bundle",
"license": "MIT",
"require": {
"php": "^7.0",
"psr/log": "^1.0",
"swarrot/swarrot": "^2.0 || ^3.0",
"symfony/console": "^3.0",
"symfony/process": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"suggest": {
"pecl-amqp": "PHP AMQP extension",
"videlalvaro/php-amqplib": "If the pecl is not an option",
"odolbeau/rabbit-mq-admin-toolkit" : "Configuring automatically your queues, exchanges and bindings"
},
"authors": [
{
"name": "Baptiste Clavié",
"email": "[email protected]"
},
{
"name": "Wisembly",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Wisembly\\AmqpBundle\\": ["src", "tests"]
}
}
}
| {
"name": "wisembly/amqp-bundle",
"description": "Alternative for SwarrotBundle to handle amqp in Symfony2 applications",
"type": "symfony-bundle",
"license": "MIT",
"require": {
"php": "^7.0",
"psr/log": "^1.0",
"swarrot/swarrot": "^2.0 || ^3.0",
"symfony/console": "^3.0",
"symfony/process": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"suggest": {
"pecl-amqp": "PHP AMQP extension",
"videlalvaro/php-amqplib": "If the pecl is not an option",
"odolbeau/rabbit-mq-admin-toolkit" : "Configuring automatically your queues, exchanges and bindings"
},
"authors": [
{
"name": "Baptiste Clavié",
"email": "[email protected]"
},
{
"name": "Wisembly",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Wisembly\\AmqpBundle\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Wisembly\\AmqpBundle\\": "tests"
}
}
}
| Split autoload configuration for tests in autoload-dev | Split autoload configuration for tests in autoload-dev
| JSON | mit | Wisembly/AMQPBundle,Wisembly/AMQPBundle | json | ## Code Before:
{
"name": "wisembly/amqp-bundle",
"description": "Alternative for SwarrotBundle to handle amqp in Symfony2 applications",
"type": "symfony-bundle",
"license": "MIT",
"require": {
"php": "^7.0",
"psr/log": "^1.0",
"swarrot/swarrot": "^2.0 || ^3.0",
"symfony/console": "^3.0",
"symfony/process": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"suggest": {
"pecl-amqp": "PHP AMQP extension",
"videlalvaro/php-amqplib": "If the pecl is not an option",
"odolbeau/rabbit-mq-admin-toolkit" : "Configuring automatically your queues, exchanges and bindings"
},
"authors": [
{
"name": "Baptiste Clavié",
"email": "[email protected]"
},
{
"name": "Wisembly",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Wisembly\\AmqpBundle\\": ["src", "tests"]
}
}
}
## Instruction:
Split autoload configuration for tests in autoload-dev
## Code After:
{
"name": "wisembly/amqp-bundle",
"description": "Alternative for SwarrotBundle to handle amqp in Symfony2 applications",
"type": "symfony-bundle",
"license": "MIT",
"require": {
"php": "^7.0",
"psr/log": "^1.0",
"swarrot/swarrot": "^2.0 || ^3.0",
"symfony/console": "^3.0",
"symfony/process": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"suggest": {
"pecl-amqp": "PHP AMQP extension",
"videlalvaro/php-amqplib": "If the pecl is not an option",
"odolbeau/rabbit-mq-admin-toolkit" : "Configuring automatically your queues, exchanges and bindings"
},
"authors": [
{
"name": "Baptiste Clavié",
"email": "[email protected]"
},
{
"name": "Wisembly",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Wisembly\\AmqpBundle\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Wisembly\\AmqpBundle\\": "tests"
}
}
}
|
2fcc5a8d1d567275290b232adc255ffbc7b64e3e | app/assets/stylesheets/application.css.scss | app/assets/stylesheets/application.css.scss | /*
*= require_self
*= require vendor/bootstrap
*= require vendor/bootstrap-responsive
*/
body {
position: relative;
padding-top: 40px;
background-color: #fff;
background-repeat: repeat-x;
background-position: 0 40px;
}
table.table {
tr {
&.document pre {
background: none;
border: 0px;
display: inline;
}
th.actions {
min-width: 90px;
}
}
}
ul.nav.breadcrumbs {
a {
background-image: url("breadcrumb-separator.png");
background-repeat: no-repeat;
background-position: left center;
background-color: transparent;
}
}
| /*
*= require_self
*= require vendor/bootstrap
*/
body {
position: relative;
padding-top: 40px;
background-color: #fff;
background-repeat: repeat-x;
background-position: 0 40px;
}
table.table {
tr {
&.document pre {
background: none;
border: 0px;
display: inline;
}
th.actions {
min-width: 90px;
}
}
}
ul.nav.breadcrumbs {
a {
background-image: url("breadcrumb-separator.png");
background-repeat: no-repeat;
background-position: left center;
background-color: transparent;
}
}
| Fix issue with vertical scrollbar. | Fix issue with vertical scrollbar.
| SCSS | mit | lucassus/mongo_browser,lucassus/mongo_browser,lucassus/mongo_browser | scss | ## Code Before:
/*
*= require_self
*= require vendor/bootstrap
*= require vendor/bootstrap-responsive
*/
body {
position: relative;
padding-top: 40px;
background-color: #fff;
background-repeat: repeat-x;
background-position: 0 40px;
}
table.table {
tr {
&.document pre {
background: none;
border: 0px;
display: inline;
}
th.actions {
min-width: 90px;
}
}
}
ul.nav.breadcrumbs {
a {
background-image: url("breadcrumb-separator.png");
background-repeat: no-repeat;
background-position: left center;
background-color: transparent;
}
}
## Instruction:
Fix issue with vertical scrollbar.
## Code After:
/*
*= require_self
*= require vendor/bootstrap
*/
body {
position: relative;
padding-top: 40px;
background-color: #fff;
background-repeat: repeat-x;
background-position: 0 40px;
}
table.table {
tr {
&.document pre {
background: none;
border: 0px;
display: inline;
}
th.actions {
min-width: 90px;
}
}
}
ul.nav.breadcrumbs {
a {
background-image: url("breadcrumb-separator.png");
background-repeat: no-repeat;
background-position: left center;
background-color: transparent;
}
}
|
36e5c9fabb83074d6edac4f17704c4dec59c84c8 | spec/getaddrinfo_spec.rb | spec/getaddrinfo_spec.rb | require 'spec_helper'
describe Gethostname do
it 'has a version number' do
expect(Gethostname::VERSION).not_to be nil
end
it 'returns nil with a bunk address' do
expect(Gethostname.gethostname('a')).to be_empty
end
it 'gets the IP address' do
expect(Gethostname.gethostname('google.com')).to_not be_empty
end
end
| require 'spec_helper'
describe Gethostname do
it 'has a version number' do
expect(Gethostname::VERSION).not_to be nil
end
it 'returns nil with a bunk address' do
expect(Gethostname.gethostname('not a real host')).to be_empty
end
it 'gets the IP address' do
expect(Gethostname.gethostname('google.com')).to_not be_empty
expect(Gethostname.gethostname('apple.com')).to_not be_empty
expect(Gethostname.gethostname('kernel.org')).to_not be_empty
expect(Gethostname.gethostname('kernel.org')).to_not be_empty
expect(Gethostname.gethostname('ruby-lang.org')).to_not be_empty
end
end
| Add some more hosts to test | Add some more hosts to test
| Ruby | mit | ianks/gethostbyname-ruby,ianks/gethostbyname-ruby | ruby | ## Code Before:
require 'spec_helper'
describe Gethostname do
it 'has a version number' do
expect(Gethostname::VERSION).not_to be nil
end
it 'returns nil with a bunk address' do
expect(Gethostname.gethostname('a')).to be_empty
end
it 'gets the IP address' do
expect(Gethostname.gethostname('google.com')).to_not be_empty
end
end
## Instruction:
Add some more hosts to test
## Code After:
require 'spec_helper'
describe Gethostname do
it 'has a version number' do
expect(Gethostname::VERSION).not_to be nil
end
it 'returns nil with a bunk address' do
expect(Gethostname.gethostname('not a real host')).to be_empty
end
it 'gets the IP address' do
expect(Gethostname.gethostname('google.com')).to_not be_empty
expect(Gethostname.gethostname('apple.com')).to_not be_empty
expect(Gethostname.gethostname('kernel.org')).to_not be_empty
expect(Gethostname.gethostname('kernel.org')).to_not be_empty
expect(Gethostname.gethostname('ruby-lang.org')).to_not be_empty
end
end
|
e54045d492e50e91943f25b6567233230b88500a | hash_attribute_assignment.gemspec | hash_attribute_assignment.gemspec | $LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'hash_attribute_assignment/version'
Gem::Specification.new do |s|
s.name = 'hash_attribute_assignment'
s.summary = 'Instantiate objects with a hash of instance variables'
s.version = HashAttributeAssignment::VERSION
s.author = 'Corey Alexander'
s.email = '[email protected]'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ['lib']
s.license = 'MIT'
s.homepage = 'https://github.com/coreyja/hash_attribute_assignment'
s.required_ruby_version = '>= 2.1.0'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop'
end
| $LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'hash_attribute_assignment/version'
Gem::Specification.new do |s|
s.name = 'hash_attribute_assignment'
s.summary = 'Instantiate objects with a hash of instance variables'
s.version = HashAttributeAssignment::VERSION
s.author = 'Corey Alexander'
s.email = '[email protected]'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ['lib']
s.license = 'MIT'
s.homepage = 'https://github.com/coreyja/hash_attribute_assignment'
s.required_ruby_version = '>= 2.1.0'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'rubocop-junit-formatter'
end
| Add the rubocop junit formatter | Add the rubocop junit formatter
| Ruby | mit | coreyja/hash_attribute_assignment | ruby | ## Code Before:
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'hash_attribute_assignment/version'
Gem::Specification.new do |s|
s.name = 'hash_attribute_assignment'
s.summary = 'Instantiate objects with a hash of instance variables'
s.version = HashAttributeAssignment::VERSION
s.author = 'Corey Alexander'
s.email = '[email protected]'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ['lib']
s.license = 'MIT'
s.homepage = 'https://github.com/coreyja/hash_attribute_assignment'
s.required_ruby_version = '>= 2.1.0'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop'
end
## Instruction:
Add the rubocop junit formatter
## Code After:
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'hash_attribute_assignment/version'
Gem::Specification.new do |s|
s.name = 'hash_attribute_assignment'
s.summary = 'Instantiate objects with a hash of instance variables'
s.version = HashAttributeAssignment::VERSION
s.author = 'Corey Alexander'
s.email = '[email protected]'
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ['lib']
s.license = 'MIT'
s.homepage = 'https://github.com/coreyja/hash_attribute_assignment'
s.required_ruby_version = '>= 2.1.0'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'rubocop-junit-formatter'
end
|
8944b5ca4438abf58540dcbf62d4234f9ffe4895 | tasks/main.yml | tasks/main.yml | - name: setup tmux
yum: name=tmux state=present
- name: setup vim
yum: name=vim-enhanced state=present
- name: setup sysstat
yum: name=sysstat state=present
- name: setup wget
yum: name=wget state=present
| - name: setup tmux
yum: name=tmux state=present
- name: setup vim
yum: name=vim-enhanced state=present
- name: setup sysstat
yum: name=sysstat state=present
- name: setup wget
yum: name=wget state=present
- name: setup telnet
yum: name=telnet state=present
- name: setup unzip
yum: name=unzip state=present
- name: setup mailx
yum: name=mailx state=present
| Add telnet, unzip and mailx | Add telnet, unzip and mailx
| YAML | mit | gitinsky/ansible-role-common-utils | yaml | ## Code Before:
- name: setup tmux
yum: name=tmux state=present
- name: setup vim
yum: name=vim-enhanced state=present
- name: setup sysstat
yum: name=sysstat state=present
- name: setup wget
yum: name=wget state=present
## Instruction:
Add telnet, unzip and mailx
## Code After:
- name: setup tmux
yum: name=tmux state=present
- name: setup vim
yum: name=vim-enhanced state=present
- name: setup sysstat
yum: name=sysstat state=present
- name: setup wget
yum: name=wget state=present
- name: setup telnet
yum: name=telnet state=present
- name: setup unzip
yum: name=unzip state=present
- name: setup mailx
yum: name=mailx state=present
|
405e57ee7043fb733c2fc0e5d94551ee1c4ce1e4 | app/Resources/views/user/event_info.html.twig | app/Resources/views/user/event_info.html.twig | {% extends 'base.html.twig' %}
{% block body %}
<div class="container-fluid">
<table class="table table-striped">
<caption>Hosted events</caption>
<thead>
<tr>
<th>Pavadinimas</th>
<th>Bendra suma</th>
<th></th>
</tr>
</thead>
<tbody>
{% for hosted_event in hosted_events %}
<tr>
<td>{{ hosted_event.name }}</td>
<td>{{ hosted_event.getTotalPrice() }}</td>
<td><a class="btn btn-primary" href="{{ path('dashboard', { 'hash' : hosted_event.hash }) }}">Žiūrėti</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %} | {% extends 'base.html.twig' %}
{% block body %}
<div class="container-fluid">
<table class="table table-striped">
<caption>Hosted events</caption>
<thead>
<tr>
<th>Pavadinimas</th>
<th>Bendra suma</th>
<th>Bendra skola</th>
<th></th>
</tr>
</thead>
<tbody>
{% for hosted_event in hosted_events %}
<tr>
<td>{{ hosted_event.name }}</td>
<td>{{ hosted_event.totalPrice }}</td>
<td>{{ hosted_event.totalDebt }}</td>
<td><a class="btn btn-primary" href="{{ path('dashboard', { 'hash' : hosted_event.hash }) }}">Žiūrėti</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %} | Add totalDebt column to user info table. | Add totalDebt column to user info table.
| Twig | mit | nfqakademija/dydis-turi-reiksme,nfqakademija/dydis-turi-reiksme,nfqakademija/dydis-turi-reiksme,nfqakademija/dydis-turi-reiksme | twig | ## Code Before:
{% extends 'base.html.twig' %}
{% block body %}
<div class="container-fluid">
<table class="table table-striped">
<caption>Hosted events</caption>
<thead>
<tr>
<th>Pavadinimas</th>
<th>Bendra suma</th>
<th></th>
</tr>
</thead>
<tbody>
{% for hosted_event in hosted_events %}
<tr>
<td>{{ hosted_event.name }}</td>
<td>{{ hosted_event.getTotalPrice() }}</td>
<td><a class="btn btn-primary" href="{{ path('dashboard', { 'hash' : hosted_event.hash }) }}">Žiūrėti</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
## Instruction:
Add totalDebt column to user info table.
## Code After:
{% extends 'base.html.twig' %}
{% block body %}
<div class="container-fluid">
<table class="table table-striped">
<caption>Hosted events</caption>
<thead>
<tr>
<th>Pavadinimas</th>
<th>Bendra suma</th>
<th>Bendra skola</th>
<th></th>
</tr>
</thead>
<tbody>
{% for hosted_event in hosted_events %}
<tr>
<td>{{ hosted_event.name }}</td>
<td>{{ hosted_event.totalPrice }}</td>
<td>{{ hosted_event.totalDebt }}</td>
<td><a class="btn btn-primary" href="{{ path('dashboard', { 'hash' : hosted_event.hash }) }}">Žiūrėti</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %} |
0a9268ef06dc6c45ddfe601c6a1251fa9c2eddaf | HISTORY.rst | HISTORY.rst | =======
History
=======
0.1.1 (2016-07-14)
------------------
* Development status set to Stable, required new release level as PyPI
doesn't allow changing.
0.1.0 (2016-07-14)
------------------
* First release with complete documentation and pushed to PyPI.
* Fully implements decoding and encoding of generic records.
* Implements specific record decode/encode for NFC Forum Text, Uri,
Smartposter, Device Information, Handover Request, Handover Select,
Handover Mediation, Handover Initiate, and Handover Carrier Record.
* Tested to work with Python 2.7 and 3.5 with 100 % test coverage.
| =======
History
=======
0.2.0 (2016-11-16)
------------------
* Wi-Fi Simple Configuration (WSC) and P2P records and attributes
decode and encode added.
0.1.1 (2016-07-14)
------------------
* Development status set to Stable, required new release level as PyPI
doesn't allow changing.
0.1.0 (2016-07-14)
------------------
* First release with complete documentation and pushed to PyPI.
* Fully implements decoding and encoding of generic records.
* Implements specific record decode/encode for NFC Forum Text, Uri,
Smartposter, Device Information, Handover Request, Handover Select,
Handover Mediation, Handover Initiate, and Handover Carrier Record.
* Tested to work with Python 2.7 and 3.5 with 100 % test coverage.
| Add history entry for version 0.2.0 | Add history entry for version 0.2.0
| reStructuredText | isc | nfcpy/ndeflib | restructuredtext | ## Code Before:
=======
History
=======
0.1.1 (2016-07-14)
------------------
* Development status set to Stable, required new release level as PyPI
doesn't allow changing.
0.1.0 (2016-07-14)
------------------
* First release with complete documentation and pushed to PyPI.
* Fully implements decoding and encoding of generic records.
* Implements specific record decode/encode for NFC Forum Text, Uri,
Smartposter, Device Information, Handover Request, Handover Select,
Handover Mediation, Handover Initiate, and Handover Carrier Record.
* Tested to work with Python 2.7 and 3.5 with 100 % test coverage.
## Instruction:
Add history entry for version 0.2.0
## Code After:
=======
History
=======
0.2.0 (2016-11-16)
------------------
* Wi-Fi Simple Configuration (WSC) and P2P records and attributes
decode and encode added.
0.1.1 (2016-07-14)
------------------
* Development status set to Stable, required new release level as PyPI
doesn't allow changing.
0.1.0 (2016-07-14)
------------------
* First release with complete documentation and pushed to PyPI.
* Fully implements decoding and encoding of generic records.
* Implements specific record decode/encode for NFC Forum Text, Uri,
Smartposter, Device Information, Handover Request, Handover Select,
Handover Mediation, Handover Initiate, and Handover Carrier Record.
* Tested to work with Python 2.7 and 3.5 with 100 % test coverage.
|
b6632f1138b2006e869cfb2219e73e2c09c12d49 | setup.py | setup.py |
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
config = {
'name': "anytree",
'version': "1.0.1",
'author': 'c0fec0de',
'author_email': '[email protected]',
'description': "Powerful and Lightweight Python Tree Data Structure with various plugins.",
'url': "http://anytree.readthedocs.io",
'license': 'Apache 2.0',
'classifiers': [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
'keywords': 'tree, tree data, treelib, tree walk',
'packages': ['anytree'],
'install_requires': ['six'],
'extras_require': {
'dev': ['check-manifest'],
'test': ['coverage'],
},
'test_suite': 'nose.collector',
}
# Get the long description from the README file
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
config['long_description'] = f.read()
setup(**config)
|
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
config = {
'name': "anytree",
'version': "1.0.1",
'author': 'c0fec0de',
'author_email': '[email protected]',
'description': "Powerful and Lightweight Python Tree Data Structure with various plugins.",
'url': "https://github.com/c0fec0de/anytree",
'license': 'Apache 2.0',
'classifiers': [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
'keywords': 'tree, tree data, treelib, tree walk',
'packages': ['anytree'],
'install_requires': ['six'],
'extras_require': {
'dev': ['check-manifest'],
'test': ['coverage'],
},
'test_suite': 'nose.collector',
}
# Get the long description from the README file
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
config['long_description'] = f.read()
setup(**config)
| Use github URL instead of documentation. | Use github URL instead of documentation.
| Python | apache-2.0 | c0fec0de/anytree | python | ## Code Before:
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
config = {
'name': "anytree",
'version': "1.0.1",
'author': 'c0fec0de',
'author_email': '[email protected]',
'description': "Powerful and Lightweight Python Tree Data Structure with various plugins.",
'url': "http://anytree.readthedocs.io",
'license': 'Apache 2.0',
'classifiers': [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
'keywords': 'tree, tree data, treelib, tree walk',
'packages': ['anytree'],
'install_requires': ['six'],
'extras_require': {
'dev': ['check-manifest'],
'test': ['coverage'],
},
'test_suite': 'nose.collector',
}
# Get the long description from the README file
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
config['long_description'] = f.read()
setup(**config)
## Instruction:
Use github URL instead of documentation.
## Code After:
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
config = {
'name': "anytree",
'version': "1.0.1",
'author': 'c0fec0de',
'author_email': '[email protected]',
'description': "Powerful and Lightweight Python Tree Data Structure with various plugins.",
'url': "https://github.com/c0fec0de/anytree",
'license': 'Apache 2.0',
'classifiers': [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
'keywords': 'tree, tree data, treelib, tree walk',
'packages': ['anytree'],
'install_requires': ['six'],
'extras_require': {
'dev': ['check-manifest'],
'test': ['coverage'],
},
'test_suite': 'nose.collector',
}
# Get the long description from the README file
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
config['long_description'] = f.read()
setup(**config)
|
beee848a4c9ba1b40d82160ab414026b5a7f9f74 | CHANGELOG.md | CHANGELOG.md | 1.4.0
=====
* Fix error when disconnecting clients (missing argument for fs.close)
* Using `npm shrinkwrap` to fix dependency's versions
* Allow log level to be set with environment variable `LOGLEVEL`
* Adding timestamp to log output
* Kill server process if main.js (monitoring) gets killed.
This will **not work for** `SIGKILL`. When you forcefully kill the
server, make sure to kill it's child processes as well if intended.
* Improve logging
* Bug fixes:
* Crash on failing keyboard initialization
* Update dependencies
* Add physical gamepad support to the client
1.3.0
=====
* Introduced Changelog
* Improved documentation (e.g. explaining `config.json`)
* D-Pad supports analog stick behaviour by default
* Improved logging
* Using module `forever-monitor` to restart the server if it crashes
for some reason.
* Bug fixes
| 1.4.0
=====
* Fix error when disconnecting clients (missing argument for fs.close)
* Using npm lock file to fix dependencies' versions
* Allow log level to be set with environment variable `LOGLEVEL`
* Adding timestamp to log output
* Kill server process if main.js (monitoring) gets killed.
This will **not work for** `SIGKILL`. When you forcefully kill the
server, make sure to kill it's child processes as well if intended.
* Improve logging
* Bug fixes:
* Crash on failing keyboard initialization
* Update dependencies
* Add physical gamepad support to the client
1.3.0
=====
* Introduced Changelog
* Improved documentation (e.g. explaining `config.json`)
* D-Pad supports analog stick behaviour by default
* Improved logging
* Using module `forever-monitor` to restart the server if it crashes
for some reason.
* Bug fixes
| Fix changelog: npm lockfile used instead of shrinkwrap | Fix changelog: npm lockfile used instead of shrinkwrap
| Markdown | mit | miroof/node-virtual-gamepads,miroof/node-virtual-gamepads | markdown | ## Code Before:
1.4.0
=====
* Fix error when disconnecting clients (missing argument for fs.close)
* Using `npm shrinkwrap` to fix dependency's versions
* Allow log level to be set with environment variable `LOGLEVEL`
* Adding timestamp to log output
* Kill server process if main.js (monitoring) gets killed.
This will **not work for** `SIGKILL`. When you forcefully kill the
server, make sure to kill it's child processes as well if intended.
* Improve logging
* Bug fixes:
* Crash on failing keyboard initialization
* Update dependencies
* Add physical gamepad support to the client
1.3.0
=====
* Introduced Changelog
* Improved documentation (e.g. explaining `config.json`)
* D-Pad supports analog stick behaviour by default
* Improved logging
* Using module `forever-monitor` to restart the server if it crashes
for some reason.
* Bug fixes
## Instruction:
Fix changelog: npm lockfile used instead of shrinkwrap
## Code After:
1.4.0
=====
* Fix error when disconnecting clients (missing argument for fs.close)
* Using npm lock file to fix dependencies' versions
* Allow log level to be set with environment variable `LOGLEVEL`
* Adding timestamp to log output
* Kill server process if main.js (monitoring) gets killed.
This will **not work for** `SIGKILL`. When you forcefully kill the
server, make sure to kill it's child processes as well if intended.
* Improve logging
* Bug fixes:
* Crash on failing keyboard initialization
* Update dependencies
* Add physical gamepad support to the client
1.3.0
=====
* Introduced Changelog
* Improved documentation (e.g. explaining `config.json`)
* D-Pad supports analog stick behaviour by default
* Improved logging
* Using module `forever-monitor` to restart the server if it crashes
for some reason.
* Bug fixes
|
3f5c396820812f8a80e9ef9da33f7005af3393d7 | Cargo.toml | Cargo.toml | [package]
name = "ppapi"
version = "0.0.1"
authors = ["Richard Diamond"]
links = "helper"
build = "src/build.rs"
[lib]
name = "ppapi"
path = "src/lib/lib.rs"
[dependencies.http]
git = "https://github.com/chris-morgan/rust-http.git"
[dependencies.openssl]
git = "https://github.com/sfackler/rust-openssl.git"
[build-dependencies.pnacl-build-helper]
git = "https://github.com/DiamondLovesYou/cargo-pnacl-helper.git"
| [package]
name = "ppapi"
version = "0.0.1"
authors = ["Richard Diamond"]
links = "helper"
build = "src/build.rs"
[lib]
name = "ppapi"
path = "src/lib/lib.rs"
[dependencies.http]
git = "https://github.com/DiamondLovesYou/rust-http.git"
[dependencies.openssl]
git = "https://github.com/DiamondLovesYou/rust-openssl.git"
[build-dependencies.pnacl-build-helper]
git = "https://github.com/DiamondLovesYou/cargo-pnacl-helper.git"
| Revert "Revert to upstream repos of rust-http && rust-openssl now that" | Revert "Revert to upstream repos of rust-http && rust-openssl now that"
This reverts commit c7ea05f74f9fd033133cd093187c98d084ea464b.
| TOML | mpl-2.0 | DiamondLovesYou/rust-ppapi,DiamondLovesYou/rust-ppapi,DiamondLovesYou/rust-ppapi,DiamondLovesYou/rust-ppapi | toml | ## Code Before:
[package]
name = "ppapi"
version = "0.0.1"
authors = ["Richard Diamond"]
links = "helper"
build = "src/build.rs"
[lib]
name = "ppapi"
path = "src/lib/lib.rs"
[dependencies.http]
git = "https://github.com/chris-morgan/rust-http.git"
[dependencies.openssl]
git = "https://github.com/sfackler/rust-openssl.git"
[build-dependencies.pnacl-build-helper]
git = "https://github.com/DiamondLovesYou/cargo-pnacl-helper.git"
## Instruction:
Revert "Revert to upstream repos of rust-http && rust-openssl now that"
This reverts commit c7ea05f74f9fd033133cd093187c98d084ea464b.
## Code After:
[package]
name = "ppapi"
version = "0.0.1"
authors = ["Richard Diamond"]
links = "helper"
build = "src/build.rs"
[lib]
name = "ppapi"
path = "src/lib/lib.rs"
[dependencies.http]
git = "https://github.com/DiamondLovesYou/rust-http.git"
[dependencies.openssl]
git = "https://github.com/DiamondLovesYou/rust-openssl.git"
[build-dependencies.pnacl-build-helper]
git = "https://github.com/DiamondLovesYou/cargo-pnacl-helper.git"
|
ff500e8c4cc378509b2505db7db5e866df75a52f | app/controllers/contacts_controller.rb | app/controllers/contacts_controller.rb | class ContactsController < ApplicationController
before_filter :authenticate_user!
def new
@message = Message.new
@subject = default_subject
user = User.find_by_id(params[:user_id])
if user.nil?
redirect_to root_path and return
end
@user = user
end
def create
@user = User.find_by_id(params[:user_id])
@message = Message.new({
:body => params[:body].html_safe,
:subject => default_subject,
:recipient => @user,
:sender => current_user
})
if @message.valid?
UserMailer.send_mail_to_user(@message).deliver
flash[:success] = "Your message to #{@user.username} has been sent!"
redirect_to(user_path(@user))
else
flash.now[:error] = "Please fill out the message form"
render :new
end
end
def default_subject
"You have a new message from #{current_user.username} of The Odin Project"
end
end
| class ContactsController < ApplicationController
before_filter :authenticate_user!
def new
@message = Message.new
@subject = default_subject
@user = User.find params[:user_id]
redirect_to root_path if user.nil?
end
def create
@user = User.find_by_id(params[:user_id])
@message = Message.new({
:body => params[:body].html_safe,
:subject => default_subject,
:recipient => @user,
:sender => current_user
})
if @message.valid?
UserMailer.send_mail_to_user(@message).deliver
flash[:success] = "Your message to #{@user.username} has been sent!"
redirect_to(user_path(@user))
else
flash.now[:error] = "Please fill out the message form"
render :new
end
end
def default_subject
"You have a new message from #{current_user.username} of The Odin Project"
end
end
| Improve new method in Contacts Controller | [Refactor] Improve new method in Contacts Controller
| Ruby | mit | matouk1114/theodinproject,t-harps/theodinproject,twinlamp/theodinproject,TheOdinProject/theodinproject,kriox26/theodinproject,t-harps/theodinproject,FabioParaiso/theodinproject,willhayslett/theodinproject,laurennor/theodinproject,odinproject-challenges/theodinproject,laurennor/theodinproject,Powerade/theodinproject,rontejada1991/theodinproject,GemmaStiles/theodinproject,mamdouhweb/theodinproject,willhayslett/theodinproject,wiserfirst/theodinproject,Sw33tT00th/theodinproject,laurennor/theodinproject,ZmagoD/theodinproject,matouk1114/theodinproject,ZmagoD/theodinproject,racpa/theodinproject-1,FabioParaiso/theodinproject,twinlamp/theodinproject,Powerade/theodinproject,GemmaStiles/theodinproject,FabioParaiso/theodinproject,GemmaStiles/theodinproject,PiotrEjsmont/theodinproject,ZmagoD/theodinproject,TheOdinProject/theodinproject,logoso321/theodinproject,PiotrEjsmont/theodinproject,TheOdinProject/theodinproject,kriox26/theodinproject,racpa/theodinproject-1,mamdouhweb/theodinproject,twinlamp/theodinproject,rontejada1991/theodinproject,kriox26/theodinproject,TheOdinProject/theodinproject,racpa/theodinproject-1,Sw33tT00th/theodinproject,odinproject-challenges/theodinproject,logoso321/theodinproject,PiotrEjsmont/theodinproject,t-harps/theodinproject,Sw33tT00th/theodinproject,willhayslett/theodinproject,Powerade/theodinproject,wiserfirst/theodinproject,matouk1114/theodinproject,wiserfirst/theodinproject,mamdouhweb/theodinproject,odinproject-challenges/theodinproject,rontejada1991/theodinproject,logoso321/theodinproject | ruby | ## Code Before:
class ContactsController < ApplicationController
before_filter :authenticate_user!
def new
@message = Message.new
@subject = default_subject
user = User.find_by_id(params[:user_id])
if user.nil?
redirect_to root_path and return
end
@user = user
end
def create
@user = User.find_by_id(params[:user_id])
@message = Message.new({
:body => params[:body].html_safe,
:subject => default_subject,
:recipient => @user,
:sender => current_user
})
if @message.valid?
UserMailer.send_mail_to_user(@message).deliver
flash[:success] = "Your message to #{@user.username} has been sent!"
redirect_to(user_path(@user))
else
flash.now[:error] = "Please fill out the message form"
render :new
end
end
def default_subject
"You have a new message from #{current_user.username} of The Odin Project"
end
end
## Instruction:
[Refactor] Improve new method in Contacts Controller
## Code After:
class ContactsController < ApplicationController
before_filter :authenticate_user!
def new
@message = Message.new
@subject = default_subject
@user = User.find params[:user_id]
redirect_to root_path if user.nil?
end
def create
@user = User.find_by_id(params[:user_id])
@message = Message.new({
:body => params[:body].html_safe,
:subject => default_subject,
:recipient => @user,
:sender => current_user
})
if @message.valid?
UserMailer.send_mail_to_user(@message).deliver
flash[:success] = "Your message to #{@user.username} has been sent!"
redirect_to(user_path(@user))
else
flash.now[:error] = "Please fill out the message form"
render :new
end
end
def default_subject
"You have a new message from #{current_user.username} of The Odin Project"
end
end
|
0f4191318dd43f1e63965017a84d364134fbca38 | .travis.yml | .travis.yml | language: php
php: [5.3, 5.4]
before_script:
- app/Resources/mongo-php-driver-installer
- composer install
script: phpunit -c app
notifications:
email: [[email protected]]
| language: php
php: [5.3, 5.4]
before_script:
- app/Resources/mongo-php-driver-installer
- cp app/config/parameters.yml.dist app/config/parameters.yml
- composer install
script: phpunit -c app
notifications:
email: [[email protected]]
| Fix CI build: set up parameters.yml | Fix CI build: set up parameters.yml
| YAML | mit | meonkeys/symfony2-dual-auth,meonkeys/symfony2-dual-auth | yaml | ## Code Before:
language: php
php: [5.3, 5.4]
before_script:
- app/Resources/mongo-php-driver-installer
- composer install
script: phpunit -c app
notifications:
email: [[email protected]]
## Instruction:
Fix CI build: set up parameters.yml
## Code After:
language: php
php: [5.3, 5.4]
before_script:
- app/Resources/mongo-php-driver-installer
- cp app/config/parameters.yml.dist app/config/parameters.yml
- composer install
script: phpunit -c app
notifications:
email: [[email protected]]
|
07ac088dac65a2a51624317e9bdee138eae638b0 | utilities/vertical-alignment.less | utilities/vertical-alignment.less | /* ========================================================================== *\
Utilities -> Vertical Alignment ($utilities-vertical-alignment)
\* ========================================================================== */
//
// Vertical alignment
//
// va = vertical-align
// t = top
// b = bottom
// m = middle
//
.vat {
vertical-align: top !important;
}
.vab {
vertical-align: bottom !important;
}
.vam {
vertical-align: middle !important;
}
.screens({
.xs-vat {
vertical-align: top !important;
}
.xs-vab {
vertical-align: bottom !important;
}
.xs-vam {
vertical-align: middle !important;
}
},{
.sm-vat {
vertical-align: top !important;
}
.sm-vab {
vertical-align: bottom !important;
}
.sm-vam {
vertical-align: middle !important;
}
},{
.md-vat {
vertical-align: top !important;
}
.md-vab {
vertical-align: bottom !important;
}
.md-vam {
vertical-align: middle !important;
}
},{
.lg-vat {
vertical-align: top !important;
}
.lg-vab {
vertical-align: bottom !important;
}
.lg-vam {
vertical-align: middle !important;
}
},{
.xl-vat {
vertical-align: top !important;
}
.xl-vab {
vertical-align: bottom !important;
}
.xl-vam {
vertical-align: middle !important;
}
},{
.xxl-vat {
vertical-align: top !important;
}
.xxl-vab {
vertical-align: bottom !important;
}
.xxl-vam {
vertical-align: middle !important;
}
});
| /* ========================================================================== *\
Utilities -> Vertical Alignment ($utilities-vertical-alignment)
\* ========================================================================== */
//
// Vertical alignment
//
// va = vertical-align
// t = top
// b = bottom
// m = middle
//
.breakpoint-prefixes({
.@{breakpoint-prefix}vat {
vertical-align: top !important;
}
.@{breakpoint-prefix}vab {
vertical-align: bottom !important;
}
.@{breakpoint-prefix}vam {
vertical-align: middle !important;
}
});
| Use mixin to generate vertical alignment breakpoint classes | Use mixin to generate vertical alignment breakpoint classes
| Less | mit | cardinalcss/cardinalcss,cardinalcss/cardinalcss,cbracco/cardinal,cbracco/cardinal | less | ## Code Before:
/* ========================================================================== *\
Utilities -> Vertical Alignment ($utilities-vertical-alignment)
\* ========================================================================== */
//
// Vertical alignment
//
// va = vertical-align
// t = top
// b = bottom
// m = middle
//
.vat {
vertical-align: top !important;
}
.vab {
vertical-align: bottom !important;
}
.vam {
vertical-align: middle !important;
}
.screens({
.xs-vat {
vertical-align: top !important;
}
.xs-vab {
vertical-align: bottom !important;
}
.xs-vam {
vertical-align: middle !important;
}
},{
.sm-vat {
vertical-align: top !important;
}
.sm-vab {
vertical-align: bottom !important;
}
.sm-vam {
vertical-align: middle !important;
}
},{
.md-vat {
vertical-align: top !important;
}
.md-vab {
vertical-align: bottom !important;
}
.md-vam {
vertical-align: middle !important;
}
},{
.lg-vat {
vertical-align: top !important;
}
.lg-vab {
vertical-align: bottom !important;
}
.lg-vam {
vertical-align: middle !important;
}
},{
.xl-vat {
vertical-align: top !important;
}
.xl-vab {
vertical-align: bottom !important;
}
.xl-vam {
vertical-align: middle !important;
}
},{
.xxl-vat {
vertical-align: top !important;
}
.xxl-vab {
vertical-align: bottom !important;
}
.xxl-vam {
vertical-align: middle !important;
}
});
## Instruction:
Use mixin to generate vertical alignment breakpoint classes
## Code After:
/* ========================================================================== *\
Utilities -> Vertical Alignment ($utilities-vertical-alignment)
\* ========================================================================== */
//
// Vertical alignment
//
// va = vertical-align
// t = top
// b = bottom
// m = middle
//
.breakpoint-prefixes({
.@{breakpoint-prefix}vat {
vertical-align: top !important;
}
.@{breakpoint-prefix}vab {
vertical-align: bottom !important;
}
.@{breakpoint-prefix}vam {
vertical-align: middle !important;
}
});
|
781c41425b26ec196eb3857cbf4e5119ae6af139 | locales/hu/addon.properties | locales/hu/addon.properties | tooltip_play= Lejátszás
tooltip_pause= Szünet
tooltip_mute= Némítás
tooltip_unmute= Némítás ki
tooltip_send_to_tab= Küldés lapra
tooltip_minimize= Kis méret
tooltip_maximize= Teljes méret
tooltip_close= Bezárás
error_msg= Valami rosszul ment ezzel a videóval. Próbálkozzon később.
error_link= Megnyitás új lapon
# LOCALIZATION NOTE: placeholder is domain name
loading_msg= Videó betöltése innen: %s | tooltip_play= Lejátszás
tooltip_pause= Szünet
tooltip_mute= Némítás
tooltip_unmute= Némítás ki
tooltip_send_to_tab= Küldés lapra
tooltip_minimize= Kis méret
tooltip_maximize= Teljes méret
tooltip_close= Bezárás
error_msg= Hiba történt ezzel a videóval. Próbálkozzon később.
error_link= Megnyitás új lapon
# LOCALIZATION NOTE: placeholder is domain name
loading_msg= Videó betöltése innen: %s | Update Hungarian (hu) localization of Test Pilot: Min Vid | Pontoon: Update Hungarian (hu) localization of Test Pilot: Min Vid
Localization authors:
- Gabor Kelemen <[email protected]>
| INI | mpl-2.0 | meandavejustice/min-vid,meandavejustice/min-vid,meandavejustice/min-vid | ini | ## Code Before:
tooltip_play= Lejátszás
tooltip_pause= Szünet
tooltip_mute= Némítás
tooltip_unmute= Némítás ki
tooltip_send_to_tab= Küldés lapra
tooltip_minimize= Kis méret
tooltip_maximize= Teljes méret
tooltip_close= Bezárás
error_msg= Valami rosszul ment ezzel a videóval. Próbálkozzon később.
error_link= Megnyitás új lapon
# LOCALIZATION NOTE: placeholder is domain name
loading_msg= Videó betöltése innen: %s
## Instruction:
Pontoon: Update Hungarian (hu) localization of Test Pilot: Min Vid
Localization authors:
- Gabor Kelemen <[email protected]>
## Code After:
tooltip_play= Lejátszás
tooltip_pause= Szünet
tooltip_mute= Némítás
tooltip_unmute= Némítás ki
tooltip_send_to_tab= Küldés lapra
tooltip_minimize= Kis méret
tooltip_maximize= Teljes méret
tooltip_close= Bezárás
error_msg= Hiba történt ezzel a videóval. Próbálkozzon később.
error_link= Megnyitás új lapon
# LOCALIZATION NOTE: placeholder is domain name
loading_msg= Videó betöltése innen: %s |
82d2a78caa0eef964c8286025635676b6617c1a3 | test/small1/longBlock.ml | test/small1/longBlock.ml | open Cil
;;
initCIL ();
let variable = makeGlobalVar "value" intType in
let instructions = ref [] in
for loop = 1 to 25000 do
let instruction = Set(var variable, integer loop, locUnknown) in
instructions := instruction :: !instructions
done;
let statement = mkStmt (Instr !instructions) in
dumpStmt defaultCilPrinter stdout 0 statement
| open Cil
;;
initCIL ();
let variable = makeGlobalVar "value" intType in
let instructions = ref [] in
for loop = 1 to 25000 do
let instruction = Set(var variable, integer loop, locUnknown) in
instructions := instruction :: !instructions
done;
let statement = mkStmt (Instr !instructions) in
let sink = open_out "/dev/null" in
dumpStmt defaultCilPrinter sink 0 statement
| Revise the long statement block test to print the block into /dev/null instead of stdout. We don't really want 25,000 lines of C code to appear in the test log once this bug gets fixed. | Revise the long statement block test to print the block into /dev/null
instead of stdout. We don't really want 25,000 lines of C code to appear
in the test log once this bug gets fixed.
| OCaml | bsd-3-clause | samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c | ocaml | ## Code Before:
open Cil
;;
initCIL ();
let variable = makeGlobalVar "value" intType in
let instructions = ref [] in
for loop = 1 to 25000 do
let instruction = Set(var variable, integer loop, locUnknown) in
instructions := instruction :: !instructions
done;
let statement = mkStmt (Instr !instructions) in
dumpStmt defaultCilPrinter stdout 0 statement
## Instruction:
Revise the long statement block test to print the block into /dev/null
instead of stdout. We don't really want 25,000 lines of C code to appear
in the test log once this bug gets fixed.
## Code After:
open Cil
;;
initCIL ();
let variable = makeGlobalVar "value" intType in
let instructions = ref [] in
for loop = 1 to 25000 do
let instruction = Set(var variable, integer loop, locUnknown) in
instructions := instruction :: !instructions
done;
let statement = mkStmt (Instr !instructions) in
let sink = open_out "/dev/null" in
dumpStmt defaultCilPrinter sink 0 statement
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.