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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
aa533d0a43dc1b8c30d6ed83127fbd37f83536ed | Parkinson/TasksAndSteps/FilenameTranslation.json | Parkinson/TasksAndSteps/FilenameTranslation.json | {
"audio_countdown" : "audio_countdown.m4a",
"audio_audio" : "audio_audio.m4a",
"accelerometer_tapping.right" : "accel_tapping_right.json",
"accelerometer_tapping.left" : "accel_tapping_left.json",
"tapping.right" : "tapping_right.json",
"tapping.left" : "tapping_left.json",
"pedometer_walking.outbound" : "pedometer_walking_outbound.json",
"accelerometer_walking.outbound" : "accel_walking_outbound.json",
"deviceMotion_walking.outbound" : "deviceMotion_walking_outbound.json",
"accelerometer_walking.rest" : "accelerometer_walking.rest",
"deviceMotion_walking.rest" : "deviceMotion_walking.rest",
"momentInDayFormat" : "momentInDayFormat.json"
} | {
"audio_countdown" : "audio_countdown.m4a",
"audio_audio" : "audio_audio.m4a",
"accelerometer_tapping.right" : "accel_tapping_right.json",
"accelerometer_tapping.left" : "accel_tapping_left.json",
"tapping.right" : "tapping_right.json",
"tapping.left" : "tapping_left.json",
"cognitive.memory.spatialspan" : "MemoryGameResults.json"
"pedometer_walking.outbound" : "pedometer_walking_outbound.json",
"accelerometer_walking.outbound" : "accel_walking_outbound.json",
"deviceMotion_walking.outbound" : "deviceMotion_walking_outbound.json",
"accelerometer_walking.rest" : "accelerometer_walking.rest",
"deviceMotion_walking.rest" : "deviceMotion_walking.rest",
"momentInDayFormat" : "momentInDayFormat.json"
} | Add memory test result to filemap for archived data | Add memory test result to filemap for archived data
| JSON | bsd-3-clause | Erin-Mounts/mPowerSDK,Sage-Bionetworks/mPowerSDK,syoung-smallwisdom/mPower,Erin-Mounts/mPowerSDK,Sage-Bionetworks/mPowerSDK,Sage-Bionetworks/mPower | json | ## Code Before:
{
"audio_countdown" : "audio_countdown.m4a",
"audio_audio" : "audio_audio.m4a",
"accelerometer_tapping.right" : "accel_tapping_right.json",
"accelerometer_tapping.left" : "accel_tapping_left.json",
"tapping.right" : "tapping_right.json",
"tapping.left" : "tapping_left.json",
"pedometer_walking.outbound" : "pedometer_walking_outbound.json",
"accelerometer_walking.outbound" : "accel_walking_outbound.json",
"deviceMotion_walking.outbound" : "deviceMotion_walking_outbound.json",
"accelerometer_walking.rest" : "accelerometer_walking.rest",
"deviceMotion_walking.rest" : "deviceMotion_walking.rest",
"momentInDayFormat" : "momentInDayFormat.json"
}
## Instruction:
Add memory test result to filemap for archived data
## Code After:
{
"audio_countdown" : "audio_countdown.m4a",
"audio_audio" : "audio_audio.m4a",
"accelerometer_tapping.right" : "accel_tapping_right.json",
"accelerometer_tapping.left" : "accel_tapping_left.json",
"tapping.right" : "tapping_right.json",
"tapping.left" : "tapping_left.json",
"cognitive.memory.spatialspan" : "MemoryGameResults.json"
"pedometer_walking.outbound" : "pedometer_walking_outbound.json",
"accelerometer_walking.outbound" : "accel_walking_outbound.json",
"deviceMotion_walking.outbound" : "deviceMotion_walking_outbound.json",
"accelerometer_walking.rest" : "accelerometer_walking.rest",
"deviceMotion_walking.rest" : "deviceMotion_walking.rest",
"momentInDayFormat" : "momentInDayFormat.json"
} |
571cde8c975e1374ab9fcc95ceb805bcc9b27d40 | lib/core/ratelimiting/ChainedBucket.js | lib/core/ratelimiting/ChainedBucket.js | "use strict";
const Bucket = require("./Bucket");
class ChainedBucket extends Bucket {
constructor(size, duration, name, parent) {
super(size, duration);
this.parent = parent || null;
this.name = name || null;
}
refillByName(name) {
if (this.parent) this.parent.refillByName(name);
if (this.name && this.name.indexOf(name) === 0) this.refill();
}
get waitingBucket() {
if (this.parent && this.parent.waitTime > 0)
return this.parent;
if (this.waitTime > 0)
return this;
return null;
}
get waitTime() {
const waitTimeParent = this.parent && this.parent.waitTime;
const waitTimeSelf = super.waitTime;
if (this.parent && waitTimeParent < waitTimeSelf)
return waitTimeParent;
return waitTimeSelf;
}
get available() {
// this getter triggers refill
const availableParent = this.parent && this.parent.available;
const availableSelf = super.available;
if (this.parent && availableParent <= 0)
return availableParent;
return availableSelf;
}
consume(n) {
// this triggers 'available' getter which triggers refill
if (this.parent) {
return super.consume(n) && this.parent.consume(n);
}
return super.consume(n);
}
}
module.exports = ChainedBucket; | "use strict";
const Bucket = require("./Bucket");
class ChainedBucket extends Bucket {
constructor(size, duration, name, parent) {
super(size, duration);
this.parent = parent || null;
this.name = name || null;
}
refillByName(name) {
if (this.parent) this.parent.refillByName(name);
if (this.name && this.name.indexOf(name) === 0) this.refill();
}
get waitingBucket() {
if (this.parent && this.parent.available <= 0)
return this.parent;
if (this.available <= 0)
return this;
return null;
}
get available() {
// this getter triggers refill
const availableParent = this.parent && this.parent.available;
const availableSelf = super.available;
if (this.parent && availableParent <= 0)
return availableParent;
return availableSelf;
}
consume(n) {
// this triggers 'available' getter which triggers refill
if (this.parent) {
return super.consume(n) && this.parent.consume(n);
}
return super.consume(n);
}
}
module.exports = ChainedBucket; | Allow buckets to be out of sync | Allow buckets to be out of sync
| JavaScript | bsd-2-clause | qeled/discordie | javascript | ## Code Before:
"use strict";
const Bucket = require("./Bucket");
class ChainedBucket extends Bucket {
constructor(size, duration, name, parent) {
super(size, duration);
this.parent = parent || null;
this.name = name || null;
}
refillByName(name) {
if (this.parent) this.parent.refillByName(name);
if (this.name && this.name.indexOf(name) === 0) this.refill();
}
get waitingBucket() {
if (this.parent && this.parent.waitTime > 0)
return this.parent;
if (this.waitTime > 0)
return this;
return null;
}
get waitTime() {
const waitTimeParent = this.parent && this.parent.waitTime;
const waitTimeSelf = super.waitTime;
if (this.parent && waitTimeParent < waitTimeSelf)
return waitTimeParent;
return waitTimeSelf;
}
get available() {
// this getter triggers refill
const availableParent = this.parent && this.parent.available;
const availableSelf = super.available;
if (this.parent && availableParent <= 0)
return availableParent;
return availableSelf;
}
consume(n) {
// this triggers 'available' getter which triggers refill
if (this.parent) {
return super.consume(n) && this.parent.consume(n);
}
return super.consume(n);
}
}
module.exports = ChainedBucket;
## Instruction:
Allow buckets to be out of sync
## Code After:
"use strict";
const Bucket = require("./Bucket");
class ChainedBucket extends Bucket {
constructor(size, duration, name, parent) {
super(size, duration);
this.parent = parent || null;
this.name = name || null;
}
refillByName(name) {
if (this.parent) this.parent.refillByName(name);
if (this.name && this.name.indexOf(name) === 0) this.refill();
}
get waitingBucket() {
if (this.parent && this.parent.available <= 0)
return this.parent;
if (this.available <= 0)
return this;
return null;
}
get available() {
// this getter triggers refill
const availableParent = this.parent && this.parent.available;
const availableSelf = super.available;
if (this.parent && availableParent <= 0)
return availableParent;
return availableSelf;
}
consume(n) {
// this triggers 'available' getter which triggers refill
if (this.parent) {
return super.consume(n) && this.parent.consume(n);
}
return super.consume(n);
}
}
module.exports = ChainedBucket; |
e39d7eb9a3e4a10148c09c2a59a23f916c9cec6a | CONTRIBUTING.md | CONTRIBUTING.md |
The master branch is the current stable released version.
### `develop` branch
The develop branch is the current edge of development.
## Pull requests
* https://github.com/heavywater/sfn/pulls
Please base all pull requests off the `develop` branch. Merges to
`master` only occur through the `develop` branch. Pull requests
based on `master` will likely be cherry picked.
## Tests
Add a test to your changes.
Tests can be run with bundler:
```
bundle
bundle exec rake
```
## Issues
Need to report an issue? Use the github issues:
* https://github.com/heavywater/sfn/issues
|
The master branch is the current stable released version.
### `develop` branch
The develop branch is the current edge of development.
## Pull requests
* https://github.com/sparkleformation/sfn/pulls
Please base all pull requests off the `develop` branch. Merges to
`master` only occur through the `develop` branch. Pull requests
based on `master` will likely be cherry picked.
## Tests
Add a test to your changes.
Tests can be run with bundler:
```
bundle
bundle exec rake
```
## Issues
Need to report an issue? Use the github issues:
* https://github.com/sparkleformation/sfn/issues
| Update locations in contrib doc | Update locations in contrib doc
| Markdown | apache-2.0 | sparkleformation/sfn | markdown | ## Code Before:
The master branch is the current stable released version.
### `develop` branch
The develop branch is the current edge of development.
## Pull requests
* https://github.com/heavywater/sfn/pulls
Please base all pull requests off the `develop` branch. Merges to
`master` only occur through the `develop` branch. Pull requests
based on `master` will likely be cherry picked.
## Tests
Add a test to your changes.
Tests can be run with bundler:
```
bundle
bundle exec rake
```
## Issues
Need to report an issue? Use the github issues:
* https://github.com/heavywater/sfn/issues
## Instruction:
Update locations in contrib doc
## Code After:
The master branch is the current stable released version.
### `develop` branch
The develop branch is the current edge of development.
## Pull requests
* https://github.com/sparkleformation/sfn/pulls
Please base all pull requests off the `develop` branch. Merges to
`master` only occur through the `develop` branch. Pull requests
based on `master` will likely be cherry picked.
## Tests
Add a test to your changes.
Tests can be run with bundler:
```
bundle
bundle exec rake
```
## Issues
Need to report an issue? Use the github issues:
* https://github.com/sparkleformation/sfn/issues
|
19c9ad30143a106ecff8eceb1e03d1b0dc68a208 | packages/redis/index.js | packages/redis/index.js | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
if (typeof arguments[2] === 'number') {
arguments[3] = parseInt(arguments[2]);
arguments[2] = 'EX';
}
return await redis.set.apply(redis, arguments);
}
redis.getJSON = async key => {
const value = await redis.get(key);
if (value) {
return JSON.parse(value);
}
return value;
}
return redis;
};
| const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
if (typeof arguments[2] === 'number') {
arguments[3] = parseInt(arguments[2]);
arguments[2] = 'EX';
}
if (typeof arguments[2] === 'undefined') {
arguments = [arguments[0], arguments[1]];
}
return await redis.set.apply(redis, arguments);
}
redis.getJSON = async key => {
const value = await redis.get(key);
if (value) {
return JSON.parse(value);
}
return value;
}
return redis;
};
| Fix redis syntax error if third argument is undefined | Fix redis syntax error if third argument is undefined
| JavaScript | mit | maxdome/maxdome-node,maxdome/maxdome-node | javascript | ## Code Before:
const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
if (typeof arguments[2] === 'number') {
arguments[3] = parseInt(arguments[2]);
arguments[2] = 'EX';
}
return await redis.set.apply(redis, arguments);
}
redis.getJSON = async key => {
const value = await redis.get(key);
if (value) {
return JSON.parse(value);
}
return value;
}
return redis;
};
## Instruction:
Fix redis syntax error if third argument is undefined
## Code After:
const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
if (typeof arguments[2] === 'number') {
arguments[3] = parseInt(arguments[2]);
arguments[2] = 'EX';
}
if (typeof arguments[2] === 'undefined') {
arguments = [arguments[0], arguments[1]];
}
return await redis.set.apply(redis, arguments);
}
redis.getJSON = async key => {
const value = await redis.get(key);
if (value) {
return JSON.parse(value);
}
return value;
}
return redis;
};
|
253529d42c1ef9b7aed7b2754c77bc8a246d892e | repeat.js | repeat.js | /*! http://mths.be/repeat v0.1.0 by @mathias */
if (!String.prototype.repeat) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var repeat = function(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
// `ToInteger`
var n = count ? Number(count) : 0;
if (n != n) { // better `isNaN`
n = 0;
}
// Account for out-of-bounds indices
if (n < 0 || n == Infinity) {
throw RangeError();
}
if (n == 0) {
return '';
}
var result = '';
while (n--) {
result += string;
}
return result;
};
if (Object.defineProperty) {
Object.defineProperty(String.prototype, 'repeat', {
'value': repeat,
'configurable': true,
'writable': true
});
} else {
String.prototype.repeat = repeat;
}
}());
}
| /*! http://mths.be/repeat v0.1.0 by @mathias */
if (!String.prototype.repeat) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var repeat = function(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
// `ToInteger`
var n = count ? Number(count) : 0;
if (n != n) { // better `isNaN`
n = 0;
}
// Account for out-of-bounds indices
if (n < 0 || n == Infinity) {
throw RangeError();
}
var result = '';
while (n--) {
result += string;
}
return result;
};
if (Object.defineProperty) {
Object.defineProperty(String.prototype, 'repeat', {
'value': repeat,
'configurable': true,
'writable': true
});
} else {
String.prototype.repeat = repeat;
}
}());
}
| Remove unnecessary check for `n == 0` | Remove unnecessary check for `n == 0`
The `while` loop below handles this case anyway. The only ‘overhead’ the check avoided was a single `n--` and a `ToBoolean(0)` — so this was definitely a micro-optimization.
Closes #3.
| JavaScript | mit | mathiasbynens/String.prototype.repeat | javascript | ## Code Before:
/*! http://mths.be/repeat v0.1.0 by @mathias */
if (!String.prototype.repeat) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var repeat = function(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
// `ToInteger`
var n = count ? Number(count) : 0;
if (n != n) { // better `isNaN`
n = 0;
}
// Account for out-of-bounds indices
if (n < 0 || n == Infinity) {
throw RangeError();
}
if (n == 0) {
return '';
}
var result = '';
while (n--) {
result += string;
}
return result;
};
if (Object.defineProperty) {
Object.defineProperty(String.prototype, 'repeat', {
'value': repeat,
'configurable': true,
'writable': true
});
} else {
String.prototype.repeat = repeat;
}
}());
}
## Instruction:
Remove unnecessary check for `n == 0`
The `while` loop below handles this case anyway. The only ‘overhead’ the check avoided was a single `n--` and a `ToBoolean(0)` — so this was definitely a micro-optimization.
Closes #3.
## Code After:
/*! http://mths.be/repeat v0.1.0 by @mathias */
if (!String.prototype.repeat) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var repeat = function(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
// `ToInteger`
var n = count ? Number(count) : 0;
if (n != n) { // better `isNaN`
n = 0;
}
// Account for out-of-bounds indices
if (n < 0 || n == Infinity) {
throw RangeError();
}
var result = '';
while (n--) {
result += string;
}
return result;
};
if (Object.defineProperty) {
Object.defineProperty(String.prototype, 'repeat', {
'value': repeat,
'configurable': true,
'writable': true
});
} else {
String.prototype.repeat = repeat;
}
}());
}
|
1f65142b754478570a3733f4c0abbf3ef24d9c7e | photutils/utils/_optional_deps.py | photutils/utils/_optional_deps.py | import importlib
# This list is a duplicate of the dependencies in setup.cfg "all".
optional_deps = ['scipy', 'matplotlib', 'scikit-image', 'scikit-learn',
'gwcs']
deps = {key.upper(): key for key in optional_deps}
__all__ = [f'HAS_{pkg}' for pkg in deps]
def __getattr__(name):
if name in __all__:
try:
importlib.import_module(deps[name[4:]])
except (ImportError, ModuleNotFoundError):
return False
return True
raise AttributeError(f'Module {__name__!r} has no attribute {name!r}.')
| import importlib
# This list is a duplicate of the dependencies in setup.cfg "all".
# Note that in some cases the package names are different from the
# pip-install name (e.g.k scikit-image -> skimage).
optional_deps = ['scipy', 'matplotlib', 'skimage', 'sklearn', 'gwcs']
deps = {key.upper(): key for key in optional_deps}
__all__ = [f'HAS_{pkg}' for pkg in deps]
def __getattr__(name):
if name in __all__:
try:
importlib.import_module(deps[name[4:]])
except (ImportError, ModuleNotFoundError):
return False
return True
raise AttributeError(f'Module {__name__!r} has no attribute {name!r}.')
| Fix for package name differences | Fix for package name differences
| Python | bsd-3-clause | larrybradley/photutils,astropy/photutils | python | ## Code Before:
import importlib
# This list is a duplicate of the dependencies in setup.cfg "all".
optional_deps = ['scipy', 'matplotlib', 'scikit-image', 'scikit-learn',
'gwcs']
deps = {key.upper(): key for key in optional_deps}
__all__ = [f'HAS_{pkg}' for pkg in deps]
def __getattr__(name):
if name in __all__:
try:
importlib.import_module(deps[name[4:]])
except (ImportError, ModuleNotFoundError):
return False
return True
raise AttributeError(f'Module {__name__!r} has no attribute {name!r}.')
## Instruction:
Fix for package name differences
## Code After:
import importlib
# This list is a duplicate of the dependencies in setup.cfg "all".
# Note that in some cases the package names are different from the
# pip-install name (e.g.k scikit-image -> skimage).
optional_deps = ['scipy', 'matplotlib', 'skimage', 'sklearn', 'gwcs']
deps = {key.upper(): key for key in optional_deps}
__all__ = [f'HAS_{pkg}' for pkg in deps]
def __getattr__(name):
if name in __all__:
try:
importlib.import_module(deps[name[4:]])
except (ImportError, ModuleNotFoundError):
return False
return True
raise AttributeError(f'Module {__name__!r} has no attribute {name!r}.')
|
58ee51b44d0beed4597304cfbf0b08429adb5a03 | src/main/resources/templates/fragments/footer.html | src/main/resources/templates/fragments/footer.html | <!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<div th:fragment="footer">
</div>
</html> | <!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<div th:fragment="footer">
<script type="text/javascript" id="cookieinfo"
src="//cookieinfoscript.com/js/cookieinfo.min.js"
data-message="Ta strona korzysta z ciasteczek (cookies)"
data-linkmsg="Więcej informacji"
data-moreinfo="https://pl.wikipedia.org/wiki/HTTP_cookie">
</script>
</div>
</html> | Add customized cookie info script. | Add customized cookie info script.
| HTML | apache-2.0 | sebastiansokolowski/ReservationSystem-BJ,sebastiansokolowski/ReservationSystem-BJ | html | ## Code Before:
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<div th:fragment="footer">
</div>
</html>
## Instruction:
Add customized cookie info script.
## Code After:
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<div th:fragment="footer">
<script type="text/javascript" id="cookieinfo"
src="//cookieinfoscript.com/js/cookieinfo.min.js"
data-message="Ta strona korzysta z ciasteczek (cookies)"
data-linkmsg="Więcej informacji"
data-moreinfo="https://pl.wikipedia.org/wiki/HTTP_cookie">
</script>
</div>
</html> |
76fda1f3b1fd4028f03bb726cd15823804493dd3 | skin-deep.d.ts | skin-deep.d.ts | import { ReactElement, ComponentClass } from 'react';
export type Selector = string | ComponentClass<{}>;
export type Matcher = any;
export interface Tree<P, C> {
type: ComponentClass<P> | string;
props: P;
reRender(props: P, context?: C): void;
getMountedInstance(): Object;
subTree(query: Selector, predicate?: Matcher): Tree<any, any>;
everySubTree(query: Selector, predicate?: Matcher): Tree<any, any>[];
dive(paths: Selector[]): Tree<any, {}>;
dive<C>(paths: Selector[], context: C): Tree<any, C>;
text(): string;
getRenderOutput(): ReactElement<P>;
toString(): string;
}
export function shallowRender<P>(element: ReactElement<P>|JSX.Element): Tree<P, {}>;
export function shallowRender<P, C>(element: ReactElement<P>|JSX.Element, context: C): Tree<P, C>;
export function hasClass(node: JSX.Element, cls: string): boolean;
| import { ReactElement, ComponentClass } from 'react';
export type Selector = string | ComponentClass<{}>;
export type Matcher = any;
export interface Tree<P, C> {
type: ComponentClass<P> | string;
props: P;
reRender(props: P, context?: C): void;
getMountedInstance(): any;
subTree(query: Selector, predicate?: Matcher): Tree<any, C>;
everySubTree(query: Selector, predicate?: Matcher): Tree<any, C>[];
dive(paths: Selector[]): Tree<any, {}>;
dive<C>(paths: Selector[], context: C): Tree<any, C>;
text(): string;
getRenderOutput(): ReactElement<P>;
toString(): string;
}
export function shallowRender<P>(element: ReactElement<P>|JSX.Element): Tree<P, {}>;
export function shallowRender<P, C>(element: ReactElement<P>|JSX.Element, context: C): Tree<P, C>;
export function hasClass(node: JSX.Element, cls: string): boolean;
| Improve sub tree context type | Improve sub tree context type
| TypeScript | mit | glenjamin/skin-deep,glenjamin/skin-deep | typescript | ## Code Before:
import { ReactElement, ComponentClass } from 'react';
export type Selector = string | ComponentClass<{}>;
export type Matcher = any;
export interface Tree<P, C> {
type: ComponentClass<P> | string;
props: P;
reRender(props: P, context?: C): void;
getMountedInstance(): Object;
subTree(query: Selector, predicate?: Matcher): Tree<any, any>;
everySubTree(query: Selector, predicate?: Matcher): Tree<any, any>[];
dive(paths: Selector[]): Tree<any, {}>;
dive<C>(paths: Selector[], context: C): Tree<any, C>;
text(): string;
getRenderOutput(): ReactElement<P>;
toString(): string;
}
export function shallowRender<P>(element: ReactElement<P>|JSX.Element): Tree<P, {}>;
export function shallowRender<P, C>(element: ReactElement<P>|JSX.Element, context: C): Tree<P, C>;
export function hasClass(node: JSX.Element, cls: string): boolean;
## Instruction:
Improve sub tree context type
## Code After:
import { ReactElement, ComponentClass } from 'react';
export type Selector = string | ComponentClass<{}>;
export type Matcher = any;
export interface Tree<P, C> {
type: ComponentClass<P> | string;
props: P;
reRender(props: P, context?: C): void;
getMountedInstance(): any;
subTree(query: Selector, predicate?: Matcher): Tree<any, C>;
everySubTree(query: Selector, predicate?: Matcher): Tree<any, C>[];
dive(paths: Selector[]): Tree<any, {}>;
dive<C>(paths: Selector[], context: C): Tree<any, C>;
text(): string;
getRenderOutput(): ReactElement<P>;
toString(): string;
}
export function shallowRender<P>(element: ReactElement<P>|JSX.Element): Tree<P, {}>;
export function shallowRender<P, C>(element: ReactElement<P>|JSX.Element, context: C): Tree<P, C>;
export function hasClass(node: JSX.Element, cls: string): boolean;
|
bdd2a57dfd237c488c52908d956c3df6ffffb041 | os/os_x/change_default_bash_version.sh | os/os_x/change_default_bash_version.sh |
cd "$(dirname "${BASH_SOURCE}")" && source "../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
main() {
local HOMEBREW_PREFIX=""
# Check if `brew` is installed
if [ $(cmd_exists "brew") -eq 1 ]; then
print_error "Brew is required, please install it!\n"
exit 1
fi
# Check is `bash` is installed
if [ $(brew list bash &> /dev/null; printf $?) -ne 0 ]; then
print_error "Bash is required, please install it!\n"
exit 1
fi
HOMEBREW_PREFIX="$(brew --prefix)"
# Make OS X use the bash version installed through homebrew
[ -z "$(cat /etc/shells | grep "$HOMEBREW_PREFIX")" ] \
&& sudo sh -c 'printf "$HOMEBREW_PREFIX/bin/bash" >> /etc/shells'
chsh -s "$HOMEBREW_PREFIX/bin/bash" &> /dev/null
print_result $? "Use latest version of Bash"
}
main
|
cd "$(dirname "${BASH_SOURCE}")" && source "../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
main() {
local HOMEBREW_PREFIX=""
# Check if `brew` is installed
if [ $(cmd_exists "brew") -eq 1 ]; then
print_error "Brew is required, please install it!\n"
exit 1
fi
# Check is `bash` is installed
if [ $(brew list bash &> /dev/null; printf $?) -ne 0 ]; then
print_error "Bash is required, please install it!\n"
exit 1
fi
HOMEBREW_PREFIX="$(brew --prefix)"
# Add the path of the bash version installed through Homebrew
# to the list of login shells from the `/etc/shells` file.
#
# This needs to be done because applications use this file to
# determine whether a shell is valid (e.g.: `chsh` consults the
# `/etc/shells` to determine whether an unprivileged user may
# change the login shell for her own account).
#
# http://www.linuxfromscratch.org/blfs/view/7.4/postlfs/etcshells.html
if [ -z "$(cat /etc/shells | grep "$HOMEBREW_PREFIX")" ]; then
sudo sh -c 'printf "$HOMEBREW_PREFIX/bin/bash" >> /etc/shells'
print_result $? "Add \`$HOMEBREW_PREFIX/bin/bash\` in \`/etc/shells\`"
fi
# Make OS X use the bash version installed through Homebrew
#
# https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/chsh.1.html
chsh -s "$HOMEBREW_PREFIX/bin/bash" &> /dev/null
print_result $? "Use latest version of Bash"
}
main
| Make minor comments related additions | [osx] Make minor comments related additions
| Shell | mit | oddlord/dotfiles,wingy3181/dotfiles,wingy3181/dotfiles,EDiLD/dotfiles,pbrooks/dotfiles,mickael83/ubuntu-dotfiles,makabde/dotfiles,b-boogaard/dotfiles,sophatvathana/dotfiles,makabde/dotfiles,girishramnani/dotfiles,newtonne/dotfiles,AlbertoElias/dotfiles,newtonne/dotfiles,khornberg/dotfiles,wingy3181/dotfiles,girishramnani/dotfiles,mickael83/ubuntu-dotfiles,christophermoura/dotfiles,zlot/dotfiles,christophermoura/dotfiles,AlbertoElias/dotfiles,zlot/dotfiles,EDiLD/dotfiles | shell | ## Code Before:
cd "$(dirname "${BASH_SOURCE}")" && source "../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
main() {
local HOMEBREW_PREFIX=""
# Check if `brew` is installed
if [ $(cmd_exists "brew") -eq 1 ]; then
print_error "Brew is required, please install it!\n"
exit 1
fi
# Check is `bash` is installed
if [ $(brew list bash &> /dev/null; printf $?) -ne 0 ]; then
print_error "Bash is required, please install it!\n"
exit 1
fi
HOMEBREW_PREFIX="$(brew --prefix)"
# Make OS X use the bash version installed through homebrew
[ -z "$(cat /etc/shells | grep "$HOMEBREW_PREFIX")" ] \
&& sudo sh -c 'printf "$HOMEBREW_PREFIX/bin/bash" >> /etc/shells'
chsh -s "$HOMEBREW_PREFIX/bin/bash" &> /dev/null
print_result $? "Use latest version of Bash"
}
main
## Instruction:
[osx] Make minor comments related additions
## Code After:
cd "$(dirname "${BASH_SOURCE}")" && source "../utils.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
main() {
local HOMEBREW_PREFIX=""
# Check if `brew` is installed
if [ $(cmd_exists "brew") -eq 1 ]; then
print_error "Brew is required, please install it!\n"
exit 1
fi
# Check is `bash` is installed
if [ $(brew list bash &> /dev/null; printf $?) -ne 0 ]; then
print_error "Bash is required, please install it!\n"
exit 1
fi
HOMEBREW_PREFIX="$(brew --prefix)"
# Add the path of the bash version installed through Homebrew
# to the list of login shells from the `/etc/shells` file.
#
# This needs to be done because applications use this file to
# determine whether a shell is valid (e.g.: `chsh` consults the
# `/etc/shells` to determine whether an unprivileged user may
# change the login shell for her own account).
#
# http://www.linuxfromscratch.org/blfs/view/7.4/postlfs/etcshells.html
if [ -z "$(cat /etc/shells | grep "$HOMEBREW_PREFIX")" ]; then
sudo sh -c 'printf "$HOMEBREW_PREFIX/bin/bash" >> /etc/shells'
print_result $? "Add \`$HOMEBREW_PREFIX/bin/bash\` in \`/etc/shells\`"
fi
# Make OS X use the bash version installed through Homebrew
#
# https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/chsh.1.html
chsh -s "$HOMEBREW_PREFIX/bin/bash" &> /dev/null
print_result $? "Use latest version of Bash"
}
main
|
aa05b1827dee119da573b2245b1f9fc7e39c7782 | README.md | README.md | SOLUTIONS to the 2016 Advent of code in Perl6
|
SOLUTIONS to the 2016 Advent of code (http://adventofcode.com/) in Perl6
| Add advent of code link to readme | Add advent of code link to readme
| Markdown | mit | duelafn/advent-of-code-2016-in-perl6,duelafn/advent-of-code-2016-in-perl6 | markdown | ## Code Before:
SOLUTIONS to the 2016 Advent of code in Perl6
## Instruction:
Add advent of code link to readme
## Code After:
SOLUTIONS to the 2016 Advent of code (http://adventofcode.com/) in Perl6
|
956e0035205c0c379df304a33ca3305239a6d422 | lib/StyleUtil.js | lib/StyleUtil.js | /*
* Copyright 2015 the Mimu Authors (Dan Bornstein et alia).
* Licensed AS IS and WITHOUT WARRANTY under the Apache License,
* Version 2.0. Details: <http://www.apache.org/licenses/LICENSE-2.0>
*/
"use strict";
// The `DOMImplementation` instance to use. Relies on there being a global
// `document` to poke at.
var domImpl = document.implementation;
// Utilities for interacting with styles. Instances are constructed with
// a node from which to get the "original" CSS style. From there, you can
// modify properties of the instance and then extract the modified properties,
// including computed properties.
class StyleUtil {
// Clones the computed style of the given node. The result can be modified
// freely without affecting the original.
static cloneComputedStyle(orig) {
// We make a fresh element in a fresh document, apply the original's
// style to it by using the text representation (which seems to be the
// simplest way to achieve that), and then return the style object.
var doc = domImpl.createHTMLDocument();
var node = doc.createElement("span");
node.style.cssText =
orig.ownerDocument.defaultView.getComputedStyle(orig).cssText;
return node.style;
}
}
| /*
* Copyright 2015 the Mimu Authors (Dan Bornstein et alia).
* Licensed AS IS and WITHOUT WARRANTY under the Apache License,
* Version 2.0. Details: <http://www.apache.org/licenses/LICENSE-2.0>
*/
"use strict";
// The `DOMImplementation` instance to use. Relies on there being a global
// `document` to poke at.
var domImpl = document.implementation;
// Utilities for interacting with styles.
class StyleUtil {
// Clones the computed style of the given node. The result can be modified
// freely without affecting the original.
static cloneComputedStyle(orig) {
// We make a fresh element in a fresh document, apply the original's
// style to it by using the text representation (which seems to be the
// simplest way to achieve that), and then return the style object.
var doc = domImpl.createHTMLDocument();
var node = doc.createElement("span");
node.style.cssText =
orig.ownerDocument.defaultView.getComputedStyle(orig).cssText;
return node.style;
}
}
| Remove a bunch of text. | Remove a bunch of text.
This referred to an earlier (never checked in) implementation.
| JavaScript | apache-2.0 | danfuzz/mimu,danfuzz/mimu,danfuzz/mimu | javascript | ## Code Before:
/*
* Copyright 2015 the Mimu Authors (Dan Bornstein et alia).
* Licensed AS IS and WITHOUT WARRANTY under the Apache License,
* Version 2.0. Details: <http://www.apache.org/licenses/LICENSE-2.0>
*/
"use strict";
// The `DOMImplementation` instance to use. Relies on there being a global
// `document` to poke at.
var domImpl = document.implementation;
// Utilities for interacting with styles. Instances are constructed with
// a node from which to get the "original" CSS style. From there, you can
// modify properties of the instance and then extract the modified properties,
// including computed properties.
class StyleUtil {
// Clones the computed style of the given node. The result can be modified
// freely without affecting the original.
static cloneComputedStyle(orig) {
// We make a fresh element in a fresh document, apply the original's
// style to it by using the text representation (which seems to be the
// simplest way to achieve that), and then return the style object.
var doc = domImpl.createHTMLDocument();
var node = doc.createElement("span");
node.style.cssText =
orig.ownerDocument.defaultView.getComputedStyle(orig).cssText;
return node.style;
}
}
## Instruction:
Remove a bunch of text.
This referred to an earlier (never checked in) implementation.
## Code After:
/*
* Copyright 2015 the Mimu Authors (Dan Bornstein et alia).
* Licensed AS IS and WITHOUT WARRANTY under the Apache License,
* Version 2.0. Details: <http://www.apache.org/licenses/LICENSE-2.0>
*/
"use strict";
// The `DOMImplementation` instance to use. Relies on there being a global
// `document` to poke at.
var domImpl = document.implementation;
// Utilities for interacting with styles.
class StyleUtil {
// Clones the computed style of the given node. The result can be modified
// freely without affecting the original.
static cloneComputedStyle(orig) {
// We make a fresh element in a fresh document, apply the original's
// style to it by using the text representation (which seems to be the
// simplest way to achieve that), and then return the style object.
var doc = domImpl.createHTMLDocument();
var node = doc.createElement("span");
node.style.cssText =
orig.ownerDocument.defaultView.getComputedStyle(orig).cssText;
return node.style;
}
}
|
eb625baeb49f1e09d1b244ec5700dd6182785deb | features/users.feature | features/users.feature | @api
Feature: Users
Through the api:
Logged in users access there own account information
Logged in users access other peoples public account information
Logged in users cannot access other peoples non-public account information
Logged in users access other team members non-public team information
Not logged in users can access other peoples public account information
Not logged in users can not access other peoples non-public account information
Scenario: Get current user
Given that the user @testpublic is logged in
When I visit "/user/current"
Then I should receive a valid user object
And the user.username should equal testpublic
Scenario: Get specific user
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should receive a valid user object
And the user.username should equal testprivate
Scenario: Get non-existing user
Given that the user @testpublic is logged in
When I visit "/user/@nothere"
Then I should receive the json "{\n \"error\": \"Not found\"\n}"
Scenario: Get user without having privileges
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should receive the json "{\n \"error\": \"Forbidden\"\n}"
| @api
Feature: Users
Through the api:
Logged in users access there own account information
Logged in users access other peoples public account information
Logged in users cannot access other peoples non-public account information
Logged in users access other team members non-public team information
Not logged in users can access other peoples public account information
Not logged in users can not access other peoples non-public account information
Scenario: Get current user
Given that the user @testpublic is logged in
When I visit "/user/current"
Then I should receive a valid user object
And the user.username should equal testpublic
Scenario: Get specific user
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should receive a valid user object
And the user.username should equal testprivate
Scenario: Get non-existing user
Given that the user @testpublic is logged in
When I visit "/user/@nothere"
Then I should a json error with "Not found" as the body
Scenario: Get user without having privileges
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should a json error with "Forbidden" as the body
| Change how user features detect errors | Change how user features detect errors
| Cucumber | mit | deangiberson/myWakatimeApi,deangiberson/myWakatimeApi | cucumber | ## Code Before:
@api
Feature: Users
Through the api:
Logged in users access there own account information
Logged in users access other peoples public account information
Logged in users cannot access other peoples non-public account information
Logged in users access other team members non-public team information
Not logged in users can access other peoples public account information
Not logged in users can not access other peoples non-public account information
Scenario: Get current user
Given that the user @testpublic is logged in
When I visit "/user/current"
Then I should receive a valid user object
And the user.username should equal testpublic
Scenario: Get specific user
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should receive a valid user object
And the user.username should equal testprivate
Scenario: Get non-existing user
Given that the user @testpublic is logged in
When I visit "/user/@nothere"
Then I should receive the json "{\n \"error\": \"Not found\"\n}"
Scenario: Get user without having privileges
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should receive the json "{\n \"error\": \"Forbidden\"\n}"
## Instruction:
Change how user features detect errors
## Code After:
@api
Feature: Users
Through the api:
Logged in users access there own account information
Logged in users access other peoples public account information
Logged in users cannot access other peoples non-public account information
Logged in users access other team members non-public team information
Not logged in users can access other peoples public account information
Not logged in users can not access other peoples non-public account information
Scenario: Get current user
Given that the user @testpublic is logged in
When I visit "/user/current"
Then I should receive a valid user object
And the user.username should equal testpublic
Scenario: Get specific user
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should receive a valid user object
And the user.username should equal testprivate
Scenario: Get non-existing user
Given that the user @testpublic is logged in
When I visit "/user/@nothere"
Then I should a json error with "Not found" as the body
Scenario: Get user without having privileges
Given that the user @testpublic is logged in
When I visit "/user/@testprivate"
Then I should a json error with "Forbidden" as the body
|
5ed9e43ec451aca9bdca4391bd35934e5fe4aea3 | huts/management/commands/dumphutsjson.py | huts/management/commands/dumphutsjson.py | from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
| from optparse import make_option
from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
'--file',
help='Write to file instead of stdout'
),
)
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
out = options['file'] or self.stdout
out.write(export.db_as_json().encode('utf-8'))
| Update command to take file argument | Update command to take file argument
| Python | mit | dylanfprice/hutmap,dylanfprice/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap,dylanfprice/hutmap,muescha/hutmap,muescha/hutmap | python | ## Code Before:
from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
args = ''
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
print(export.db_as_json().encode('utf-8'))
## Instruction:
Update command to take file argument
## Code After:
from optparse import make_option
from django.core.management.base import BaseCommand
from huts.utils import export
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
'--file',
help='Write to file instead of stdout'
),
)
help = 'Dumps the huts, agencies, and regions in the json api format.'
def handle(self, *args, **options):
out = options['file'] or self.stdout
out.write(export.db_as_json().encode('utf-8'))
|
f12120dd9a7660277b52cd25f8cfa48b3783eece | rest_framework_friendly_errors/handlers.py | rest_framework_friendly_errors/handlers.py | from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not response and settings.CATCH_ALL_EXCEPTIONS:
response = exception_handler(APIException(exc), context)
if response is not None:
if is_pretty(response):
return response
error_message = response.data['detail']
error_code = settings.FRIENDLY_EXCEPTION_DICT.get(
exc.__class__.__name__)
response.data.pop('detail', {})
response.data['code'] = error_code
response.data['message'] = error_message
response.data['status_code'] = response.status_code
# response.data['exception'] = exc.__class__.__name__
return response
| from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not response and settings.CATCH_ALL_EXCEPTIONS:
exc = APIException(exc)
response = exception_handler(exc, context)
if response is not None:
if is_pretty(response):
return response
error_message = response.data['detail']
error_code = settings.FRIENDLY_EXCEPTION_DICT.get(
exc.__class__.__name__)
response.data.pop('detail', {})
response.data['code'] = error_code
response.data['message'] = error_message
response.data['status_code'] = response.status_code
# response.data['exception'] = exc.__class__.__name__
return response
| Create new exception to catch APIException | Create new exception to catch APIException
| Python | mit | oasiswork/drf-friendly-errors,FutureMind/drf-friendly-errors | python | ## Code Before:
from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not response and settings.CATCH_ALL_EXCEPTIONS:
response = exception_handler(APIException(exc), context)
if response is not None:
if is_pretty(response):
return response
error_message = response.data['detail']
error_code = settings.FRIENDLY_EXCEPTION_DICT.get(
exc.__class__.__name__)
response.data.pop('detail', {})
response.data['code'] = error_code
response.data['message'] = error_message
response.data['status_code'] = response.status_code
# response.data['exception'] = exc.__class__.__name__
return response
## Instruction:
Create new exception to catch APIException
## Code After:
from rest_framework.views import exception_handler
from rest_framework.exceptions import APIException
from rest_framework_friendly_errors import settings
from rest_framework_friendly_errors.utils import is_pretty
def friendly_exception_handler(exc, context):
response = exception_handler(exc, context)
if not response and settings.CATCH_ALL_EXCEPTIONS:
exc = APIException(exc)
response = exception_handler(exc, context)
if response is not None:
if is_pretty(response):
return response
error_message = response.data['detail']
error_code = settings.FRIENDLY_EXCEPTION_DICT.get(
exc.__class__.__name__)
response.data.pop('detail', {})
response.data['code'] = error_code
response.data['message'] = error_message
response.data['status_code'] = response.status_code
# response.data['exception'] = exc.__class__.__name__
return response
|
c391b10a27e0cb5537dabdbb2f579c523ccba885 | lib/services/deploy_hq.rb | lib/services/deploy_hq.rb | class Service::DeployHq < Service
string :deploy_hook_url
boolean :email_pusher
url "http://www.deployhq.com/"
logo_url "http://www.deployhq.com/images/deploy/logo.png"
maintained_by :github => 'darkphnx'
supported_by :web => 'http://support.deployhq.com/', :email => 'support@deployhq.com'
def receive_push
unless data['deploy_hook_url'].to_s =~ /^https:\/\/[a-z0-9\-\_]+\.deployhq.com\/deploy\/[a-z0-9\-\_]+\/to\/[a-z0-9\-\_]+\/[a-z0-9]+$/i
raise_config_error "Deploy Hook invalid"
end
email_pusher = config_boolean_true?('email_pusher')
http.url_prefix = data['deploy_hook_url']
http.headers['content-type'] = 'application/x-www-form-urlencoded'
body = Faraday::Utils.build_nested_query(http.params.merge(:payload => generate_json(payload), :notify => email_pusher))
http_post data['deploy_hook_url'], body
end
end
| class Service::DeployHq < Service
string :deploy_hook_url
boolean :email_pusher
url "http://www.deployhq.com/"
logo_url "http://www.deployhq.com/images/deploy/logo.png"
maintained_by :github => 'darkphnx'
supported_by :web => 'http://support.deployhq.com/', :email => 'support@deployhq.com'
def receive_push
unless data['deploy_hook_url'].to_s =~ /^https:\/\/[a-z0-9\-\_]+\.deployhq.com\/deploy\/[a-z0-9\-\_]+\/to\/[a-z0-9\-\_]+\/[a-z0-9]+$/i
raise_config_error "Deploy Hook invalid"
end
email_pusher = config_boolean_true?('email_pusher')
http.url_prefix = data['deploy_hook_url']
http.headers['content-type'] = 'application/x-www-form-urlencoded'
http.headers['X-Github-Event'] = 'push'
body = Faraday::Utils.build_nested_query(http.params.merge(:payload => generate_json(payload), :notify => email_pusher))
http_post data['deploy_hook_url'], body
end
end
| Add an X-Github-Event header to DeployHQ service. | Add an X-Github-Event header to DeployHQ service.
To make DeployHQ more compatible with Github webooks (now the reccomended way
of integrating), Deploy now expects an X-Github-Event push header to be present.
| Ruby | mit | VladRassokhin/github-services,Zarthus/github-services,galeksandrp/github-services,github/github-services,VladRassokhin/github-services,galeksandrp/github-services,github/github-services,Zarthus/github-services | ruby | ## Code Before:
class Service::DeployHq < Service
string :deploy_hook_url
boolean :email_pusher
url "http://www.deployhq.com/"
logo_url "http://www.deployhq.com/images/deploy/logo.png"
maintained_by :github => 'darkphnx'
supported_by :web => 'http://support.deployhq.com/', :email => 'support@deployhq.com'
def receive_push
unless data['deploy_hook_url'].to_s =~ /^https:\/\/[a-z0-9\-\_]+\.deployhq.com\/deploy\/[a-z0-9\-\_]+\/to\/[a-z0-9\-\_]+\/[a-z0-9]+$/i
raise_config_error "Deploy Hook invalid"
end
email_pusher = config_boolean_true?('email_pusher')
http.url_prefix = data['deploy_hook_url']
http.headers['content-type'] = 'application/x-www-form-urlencoded'
body = Faraday::Utils.build_nested_query(http.params.merge(:payload => generate_json(payload), :notify => email_pusher))
http_post data['deploy_hook_url'], body
end
end
## Instruction:
Add an X-Github-Event header to DeployHQ service.
To make DeployHQ more compatible with Github webooks (now the reccomended way
of integrating), Deploy now expects an X-Github-Event push header to be present.
## Code After:
class Service::DeployHq < Service
string :deploy_hook_url
boolean :email_pusher
url "http://www.deployhq.com/"
logo_url "http://www.deployhq.com/images/deploy/logo.png"
maintained_by :github => 'darkphnx'
supported_by :web => 'http://support.deployhq.com/', :email => 'support@deployhq.com'
def receive_push
unless data['deploy_hook_url'].to_s =~ /^https:\/\/[a-z0-9\-\_]+\.deployhq.com\/deploy\/[a-z0-9\-\_]+\/to\/[a-z0-9\-\_]+\/[a-z0-9]+$/i
raise_config_error "Deploy Hook invalid"
end
email_pusher = config_boolean_true?('email_pusher')
http.url_prefix = data['deploy_hook_url']
http.headers['content-type'] = 'application/x-www-form-urlencoded'
http.headers['X-Github-Event'] = 'push'
body = Faraday::Utils.build_nested_query(http.params.merge(:payload => generate_json(payload), :notify => email_pusher))
http_post data['deploy_hook_url'], body
end
end
|
ab7755cd9e7f7c3268933da4f8a5200085d3ff84 | lib/calculation.rb | lib/calculation.rb | module CalcJSON
class Calculation
def initialize(model,options)
@model = model
options.each do |key,value|
definition = @model.definitions.find {|definition| definition.label == key.to_s}
self.instance_variable_set("@#{key.to_s}".to_sym, Value.new(value,definition))
end
end
def method_missing(method,*args,&block)
if self.instance_variables.include?("@#{method.to_s}".to_sym)
self.instance_variable_get("@#{method.to_s}".to_sym)
else
super
end
end
end
end | module CalcJSON
class Calculation
def initialize(model,options)
@model = model
options.each do |key,value|
definition = @model.definitions.find {|definition| definition.label == key.to_s}
self.instance_variable_set("@#{key.to_s}".to_sym, Value.new(value,definition))
end
end
def outputs
@model.definitions.select{|definition| definition.role == 'output'}.map{|definition| self.send(definition.label.to_sym)}
end
def method_missing(method,*args,&block)
if self.instance_variables.include?("@#{method.to_s}".to_sym)
self.instance_variable_get("@#{method.to_s}".to_sym)
else
super
end
end
end
end | Add outputs accessor to allow iteration | Add outputs accessor to allow iteration
| Ruby | agpl-3.0 | spatchcock/calc-json-ruby,spatchcock/calc-json-ruby | ruby | ## Code Before:
module CalcJSON
class Calculation
def initialize(model,options)
@model = model
options.each do |key,value|
definition = @model.definitions.find {|definition| definition.label == key.to_s}
self.instance_variable_set("@#{key.to_s}".to_sym, Value.new(value,definition))
end
end
def method_missing(method,*args,&block)
if self.instance_variables.include?("@#{method.to_s}".to_sym)
self.instance_variable_get("@#{method.to_s}".to_sym)
else
super
end
end
end
end
## Instruction:
Add outputs accessor to allow iteration
## Code After:
module CalcJSON
class Calculation
def initialize(model,options)
@model = model
options.each do |key,value|
definition = @model.definitions.find {|definition| definition.label == key.to_s}
self.instance_variable_set("@#{key.to_s}".to_sym, Value.new(value,definition))
end
end
def outputs
@model.definitions.select{|definition| definition.role == 'output'}.map{|definition| self.send(definition.label.to_sym)}
end
def method_missing(method,*args,&block)
if self.instance_variables.include?("@#{method.to_s}".to_sym)
self.instance_variable_get("@#{method.to_s}".to_sym)
else
super
end
end
end
end |
13a68b18ce4357fb02318067f93d2db65dc2e001 | tests/sandbox.html | tests/sandbox.html | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0">
<title>sandbox</title>
<link rel="stylesheet" href="style.css"/>
<script>
function printResults(txt, style) {
var d = document.createElement('div')
d.innerHTML = txt
d.className = style
document.getElementById('out').appendChild(d)
}
document.cookie = 'seajs-nocache=1'
</script>
<script src="../dist/sea.js"></script>
<script>
seajs.use('./' +
decodeURIComponent((location.search || '?')
.substring(1))
.replace(/&t=\d+/, ''), function() {
document.cookie = 'seajs-nocache=; expires=' + new Date(0)
})
</script>
</head>
<body>
<div id="out"></div>
</body>
</html> | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0">
<title>sandbox</title>
<link rel="stylesheet" href="style.css"/>
<script>
function printResults(txt, style) {
var d = document.createElement('div')
d.innerHTML = txt
d.className = style
document.getElementById('out').appendChild(d)
}
document.cookie = 'seajs-nocache=1'
</script>
<script src="../dist/sea.js"></script>
<script>
seajs.use('./' + decodeURIComponent(location.search)
.replace(/&t=\d+/, '').substring(1), function() {
document.cookie = 'seajs-nocache=; expires=' + new Date(0)
})
</script>
</head>
<body>
<div id="out"></div>
</body>
</html> | Improve code logic for parsing id | Improve code logic for parsing id
| HTML | mit | miusuncle/seajs,coolyhx/seajs,imcys/seajs,imcys/seajs,yern/seajs,baiduoduo/seajs,tonny-zhang/seajs,treejames/seajs,kaijiemo/seajs,zaoli/seajs,treejames/seajs,judastree/seajs,Gatsbyy/seajs,evilemon/seajs,sheldonzf/seajs,zwh6611/seajs,JeffLi1993/seajs,yern/seajs,lovelykobe/seajs,judastree/seajs,wenber/seajs,PUSEN/seajs,miusuncle/seajs,jishichang/seajs,PUSEN/seajs,ysxlinux/seajs,moccen/seajs,121595113/seajs,zwh6611/seajs,JeffLi1993/seajs,Lyfme/seajs,lianggaolin/seajs,treejames/seajs,baiduoduo/seajs,lovelykobe/seajs,13693100472/seajs,mosoft521/seajs,ysxlinux/seajs,LzhElite/seajs,liupeng110112/seajs,sheldonzf/seajs,seajs/seajs,moccen/seajs,imcys/seajs,eleanors/SeaJS,lianggaolin/seajs,longze/seajs,lovelykobe/seajs,lee-my/seajs,tonny-zhang/seajs,moccen/seajs,FrankElean/SeaJS,yuhualingfeng/seajs,liupeng110112/seajs,chinakids/seajs,FrankElean/SeaJS,wenber/seajs,Gatsbyy/seajs,evilemon/seajs,coolyhx/seajs,uestcNaldo/seajs,mosoft521/seajs,hbdrawn/seajs,FrankElean/SeaJS,LzhElite/seajs,angelLYK/seajs,chinakids/seajs,seajs/seajs,lee-my/seajs,twoubt/seajs,miusuncle/seajs,MrZhengliang/seajs,LzhElite/seajs,121595113/seajs,coolyhx/seajs,AlvinWei1024/seajs,kaijiemo/seajs,twoubt/seajs,zaoli/seajs,tonny-zhang/seajs,eleanors/SeaJS,twoubt/seajs,kuier/seajs,wenber/seajs,angelLYK/seajs,hbdrawn/seajs,MrZhengliang/seajs,uestcNaldo/seajs,evilemon/seajs,AlvinWei1024/seajs,yuhualingfeng/seajs,longze/seajs,zaoli/seajs,yuhualingfeng/seajs,eleanors/SeaJS,ysxlinux/seajs,13693100472/seajs,mosoft521/seajs,zwh6611/seajs,uestcNaldo/seajs,yern/seajs,Lyfme/seajs,angelLYK/seajs,longze/seajs,JeffLi1993/seajs,lee-my/seajs,kaijiemo/seajs,baiduoduo/seajs,jishichang/seajs,kuier/seajs,judastree/seajs,Lyfme/seajs,MrZhengliang/seajs,Gatsbyy/seajs,lianggaolin/seajs,liupeng110112/seajs,kuier/seajs,AlvinWei1024/seajs,PUSEN/seajs,seajs/seajs,jishichang/seajs,sheldonzf/seajs | html | ## Code Before:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0">
<title>sandbox</title>
<link rel="stylesheet" href="style.css"/>
<script>
function printResults(txt, style) {
var d = document.createElement('div')
d.innerHTML = txt
d.className = style
document.getElementById('out').appendChild(d)
}
document.cookie = 'seajs-nocache=1'
</script>
<script src="../dist/sea.js"></script>
<script>
seajs.use('./' +
decodeURIComponent((location.search || '?')
.substring(1))
.replace(/&t=\d+/, ''), function() {
document.cookie = 'seajs-nocache=; expires=' + new Date(0)
})
</script>
</head>
<body>
<div id="out"></div>
</body>
</html>
## Instruction:
Improve code logic for parsing id
## Code After:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=0">
<title>sandbox</title>
<link rel="stylesheet" href="style.css"/>
<script>
function printResults(txt, style) {
var d = document.createElement('div')
d.innerHTML = txt
d.className = style
document.getElementById('out').appendChild(d)
}
document.cookie = 'seajs-nocache=1'
</script>
<script src="../dist/sea.js"></script>
<script>
seajs.use('./' + decodeURIComponent(location.search)
.replace(/&t=\d+/, '').substring(1), function() {
document.cookie = 'seajs-nocache=; expires=' + new Date(0)
})
</script>
</head>
<body>
<div id="out"></div>
</body>
</html> |
c8807a422a9054e1b87719e5773d29d1f2b5f4b6 | _projects/boxfromthefuture.md | _projects/boxfromthefuture.md | ---
layout: project
name: The Box from the Future
description: A design prompt generator for creating speculative design and design fiction
---
The box from the future is a design prompt generator for creating speculative design and design fiction.
Inspired from The Thing From The Future card game and uses the same set of categories and words.
By building it into a physical box it is possible to use it in workshops and redesign it's shape and/or re-tell it's origin so it can act as a more elaborate narrative element in the workshop.
I have added toggle switches which enables both the workshop facilitator, the participants or even just the lone user of the box to customize the categories to fit a theme or another set of constraints. This means that you can en- or disable elements of the prompts just to your liking. Say that you already have a particular future in mind for your setting you might choose to disable the two arc elements and the mood allowing your participants to fully focus on your central vision.
The box was built to help facilitate workshops which use design fiction at the digital design education at Aarhus University. It has already been part of several workshops.
| ---
layout: project
name: The Box from the Future
description: A design prompt generator for creating speculative design and design fiction
---
The Box from the Future is a design prompt generator for creating speculative design and design fiction. It was built to help facilitate workshops which use design fiction at the digital design education at Aarhus University and has already been part of several workshops. The Box is inspired by [The Thing From The Future card game](http://situationlab.org/projects/the-thing-from-the-future/) and uses the same sets of categories and words.
By building it into a physical box it is possible to use it in workshops and redesign it's shape and/or re-tell it's origin so it can act as a more elaborate narrative element in the workshop.
I have added toggle switches which enables both the workshop facilitator, the participants or even just the lone user of the box to customize the categories to fit a theme or another set of constraints. This means that you can en- or disable elements of the prompts just to your liking. Say that you already have a particular future in mind for your setting you might choose to disable the two arc elements and the mood allowing your participants to fully focus on your central vision.
| Switch content around in first block of text and add attribution to original project | Switch content around in first block of text and add attribution to original project
| Markdown | mit | ncmikkelsen/ncmikkelsen.github.io,ncmikkelsen/ncmikkelsen.github.io | markdown | ## Code Before:
---
layout: project
name: The Box from the Future
description: A design prompt generator for creating speculative design and design fiction
---
The box from the future is a design prompt generator for creating speculative design and design fiction.
Inspired from The Thing From The Future card game and uses the same set of categories and words.
By building it into a physical box it is possible to use it in workshops and redesign it's shape and/or re-tell it's origin so it can act as a more elaborate narrative element in the workshop.
I have added toggle switches which enables both the workshop facilitator, the participants or even just the lone user of the box to customize the categories to fit a theme or another set of constraints. This means that you can en- or disable elements of the prompts just to your liking. Say that you already have a particular future in mind for your setting you might choose to disable the two arc elements and the mood allowing your participants to fully focus on your central vision.
The box was built to help facilitate workshops which use design fiction at the digital design education at Aarhus University. It has already been part of several workshops.
## Instruction:
Switch content around in first block of text and add attribution to original project
## Code After:
---
layout: project
name: The Box from the Future
description: A design prompt generator for creating speculative design and design fiction
---
The Box from the Future is a design prompt generator for creating speculative design and design fiction. It was built to help facilitate workshops which use design fiction at the digital design education at Aarhus University and has already been part of several workshops. The Box is inspired by [The Thing From The Future card game](http://situationlab.org/projects/the-thing-from-the-future/) and uses the same sets of categories and words.
By building it into a physical box it is possible to use it in workshops and redesign it's shape and/or re-tell it's origin so it can act as a more elaborate narrative element in the workshop.
I have added toggle switches which enables both the workshop facilitator, the participants or even just the lone user of the box to customize the categories to fit a theme or another set of constraints. This means that you can en- or disable elements of the prompts just to your liking. Say that you already have a particular future in mind for your setting you might choose to disable the two arc elements and the mood allowing your participants to fully focus on your central vision.
|
22dda855ace428c2795a846e5af1aedde027f74f | Source/Umbraco/Plugin/config/disallowedFieldTypes.html | Source/Umbraco/Plugin/config/disallowedFieldTypes.html | <div class="form-editor-config" ng-controller="FormEditor.Config.DisallowedFieldTypesController">
<div>
<select ng-model="model.selectedFieldType" ng-change="addFieldType(model.selectedFieldType);model.selectedFieldType=null;" ng-options="fieldType.prettyName for fieldType in availableFieldTypes() | orderBy: 'prettyName'">
<option value="">Select...</option>
</select>
</div>
<div ng-if="model.value.length > 0">
<br />
<ul>
<li class="disallowedField" ng-repeat="fieldType in disallowedFieldTypes() | orderBy: 'prettyName'">
{{fieldType.prettyName}}
<i class="icon icon-delete dimmed" ng-click="removeFieldType(fieldType)">
<small>remove</small>
</i>
</li>
</ul>
</div>
</div>
| <div class="form-editor-config" ng-controller="FormEditor.Config.DisallowedFieldTypesController">
<div class="alert">
<h5>This will be obsoleted soon</h5>
<p>
The disallowed field types will be made obsolete in an upcoming release. Please use field type groups instead.
</p>
</div>
<div>
<select ng-model="model.selectedFieldType" ng-change="addFieldType(model.selectedFieldType);model.selectedFieldType=null;" ng-options="fieldType.prettyName for fieldType in availableFieldTypes() | orderBy: 'prettyName'">
<option value="">Select...</option>
</select>
</div>
<div ng-if="model.value.length > 0">
<br />
<ul>
<li class="disallowedField" ng-repeat="fieldType in disallowedFieldTypes() | orderBy: 'prettyName'">
{{fieldType.prettyName}}
<i class="icon icon-delete dimmed" ng-click="removeFieldType(fieldType)">
<small>remove</small>
</i>
</li>
</ul>
</div>
</div>
| Add obsolete warning to disallowed field types | Add obsolete warning to disallowed field types
| HTML | mit | kjac/FormEditor,kjac/FormEditor,kjac/FormEditor | html | ## Code Before:
<div class="form-editor-config" ng-controller="FormEditor.Config.DisallowedFieldTypesController">
<div>
<select ng-model="model.selectedFieldType" ng-change="addFieldType(model.selectedFieldType);model.selectedFieldType=null;" ng-options="fieldType.prettyName for fieldType in availableFieldTypes() | orderBy: 'prettyName'">
<option value="">Select...</option>
</select>
</div>
<div ng-if="model.value.length > 0">
<br />
<ul>
<li class="disallowedField" ng-repeat="fieldType in disallowedFieldTypes() | orderBy: 'prettyName'">
{{fieldType.prettyName}}
<i class="icon icon-delete dimmed" ng-click="removeFieldType(fieldType)">
<small>remove</small>
</i>
</li>
</ul>
</div>
</div>
## Instruction:
Add obsolete warning to disallowed field types
## Code After:
<div class="form-editor-config" ng-controller="FormEditor.Config.DisallowedFieldTypesController">
<div class="alert">
<h5>This will be obsoleted soon</h5>
<p>
The disallowed field types will be made obsolete in an upcoming release. Please use field type groups instead.
</p>
</div>
<div>
<select ng-model="model.selectedFieldType" ng-change="addFieldType(model.selectedFieldType);model.selectedFieldType=null;" ng-options="fieldType.prettyName for fieldType in availableFieldTypes() | orderBy: 'prettyName'">
<option value="">Select...</option>
</select>
</div>
<div ng-if="model.value.length > 0">
<br />
<ul>
<li class="disallowedField" ng-repeat="fieldType in disallowedFieldTypes() | orderBy: 'prettyName'">
{{fieldType.prettyName}}
<i class="icon icon-delete dimmed" ng-click="removeFieldType(fieldType)">
<small>remove</small>
</i>
</li>
</ul>
</div>
</div>
|
f3965963fc6844bd131de3a3be065af02784e2ce | app/api/entities/task_entity.rb | app/api/entities/task_entity.rb | module Api
module Entities
class TaskEntity < Grape::Entity
expose :id
expose :project_id
expose :task_definition_id
expose :status
expose :due_date
expose :extensions
expose :submission_date
expose :completion_date
expose :times_assessed
expose :grade
expose :quality_pts
expose :include_in_portfolio
expose :pct_similar, unless: :update_only
expose :similar_to_count, unless: :update_only
expose :similar_to_dismissed_count, unless: :update_only
expose :num_new_comments, unless: :update_only
expose :other_projects, if: :include_other_projects do |task, options|
return nil unless task.group_task? && !task.group.nil?
grp = task.group
grp.projects.select { |p| p.id != task.project_id }.map { |p| { id: p.id, new_stats: p.task_stats } }
end
end
end
end
| module Api
module Entities
class TaskEntity < Grape::Entity
expose :id
expose :project_id
expose :task_definition_id
expose :status
expose :due_date
expose :extensions
expose :submission_date
expose :completion_date
expose :times_assessed
expose :grade
expose :quality_pts
expose :include_in_portfolio
expose :pct_similar, unless: :update_only
expose :similar_to_count, unless: :update_only
expose :similar_to_dismissed_count, unless: :update_only
expose :num_new_comments, unless: :update_only
expose :other_projects, if: :include_other_projects do |task, options|
if task.group_task? && !task.group.nil?
grp = task.group
grp.projects.select { |p| p.id != task.project_id }.map { |p| { id: p.id, new_stats: p.task_stats } }
end
end
end
end
end
| Remove return from TaskEntity other projects | FIX: Remove return from TaskEntity other projects
| Ruby | agpl-3.0 | jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api | ruby | ## Code Before:
module Api
module Entities
class TaskEntity < Grape::Entity
expose :id
expose :project_id
expose :task_definition_id
expose :status
expose :due_date
expose :extensions
expose :submission_date
expose :completion_date
expose :times_assessed
expose :grade
expose :quality_pts
expose :include_in_portfolio
expose :pct_similar, unless: :update_only
expose :similar_to_count, unless: :update_only
expose :similar_to_dismissed_count, unless: :update_only
expose :num_new_comments, unless: :update_only
expose :other_projects, if: :include_other_projects do |task, options|
return nil unless task.group_task? && !task.group.nil?
grp = task.group
grp.projects.select { |p| p.id != task.project_id }.map { |p| { id: p.id, new_stats: p.task_stats } }
end
end
end
end
## Instruction:
FIX: Remove return from TaskEntity other projects
## Code After:
module Api
module Entities
class TaskEntity < Grape::Entity
expose :id
expose :project_id
expose :task_definition_id
expose :status
expose :due_date
expose :extensions
expose :submission_date
expose :completion_date
expose :times_assessed
expose :grade
expose :quality_pts
expose :include_in_portfolio
expose :pct_similar, unless: :update_only
expose :similar_to_count, unless: :update_only
expose :similar_to_dismissed_count, unless: :update_only
expose :num_new_comments, unless: :update_only
expose :other_projects, if: :include_other_projects do |task, options|
if task.group_task? && !task.group.nil?
grp = task.group
grp.projects.select { |p| p.id != task.project_id }.map { |p| { id: p.id, new_stats: p.task_stats } }
end
end
end
end
end
|
d3ef7ac0a2689aa86e301bb27c4b8bafa432168f | views/templates/navigation-browse.jade | views/templates/navigation-browse.jade | span.icon.icon-icon-browse
h3.text=t('sidebar.browse')
span.short-text=t('sidebar.browse_short')
span.action-button.close-button(type="button")
span.icon-icon-close
| span.icon.icon-icon-browse
h3.text=t('sidebar.browse')
span(aria-hidden='true').short-text=t('sidebar.browse_short')
span.action-button.close-button(type="button")
span.icon-icon-close
| Hide redundant text from AT. | Hide redundant text from AT.
| Jade | agpl-3.0 | Zeukkari/servicemap,Zeukkari/servicemap,City-of-Helsinki/servicemap,City-of-Helsinki/servicemap,vaaralav/servicemap,vaaralav/servicemap,vaaralav/servicemap,City-of-Helsinki/servicemap | jade | ## Code Before:
span.icon.icon-icon-browse
h3.text=t('sidebar.browse')
span.short-text=t('sidebar.browse_short')
span.action-button.close-button(type="button")
span.icon-icon-close
## Instruction:
Hide redundant text from AT.
## Code After:
span.icon.icon-icon-browse
h3.text=t('sidebar.browse')
span(aria-hidden='true').short-text=t('sidebar.browse_short')
span.action-button.close-button(type="button")
span.icon-icon-close
|
918d5801fcbfaac44d0430ef9782f2442494b38e | README.md | README.md |
`loopback-connector-saphana` is the SAP HANA connector module for [loopback-datasource-juggler](https://github.com/strongloop/loopback-datasource-juggler/).
|
`loopback-connector-saphana` is the [SAP HANA](www.saphana.com) connector module for [loopback-datasource-juggler](https://github.com/strongloop/loopback-datasource-juggler/).
| Add link to SAP HANA site in readme | Add link to SAP HANA site in readme
| Markdown | apache-2.0 | jensonzhao/loopback-connector-saphana | markdown | ## Code Before:
`loopback-connector-saphana` is the SAP HANA connector module for [loopback-datasource-juggler](https://github.com/strongloop/loopback-datasource-juggler/).
## Instruction:
Add link to SAP HANA site in readme
## Code After:
`loopback-connector-saphana` is the [SAP HANA](www.saphana.com) connector module for [loopback-datasource-juggler](https://github.com/strongloop/loopback-datasource-juggler/).
|
dedfd16f760a7a410d502b6a9a93637bb8c6aad2 | templates/web/zurich/admin/reports.html | templates/web/zurich/admin/reports.html | [% PROCESS 'admin/header.html' title=loc('Search Reports') %]
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]">
</form>
[% IF problems.size %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Description') %]</th>
[% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
<th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
[% END %]
<th class='edit'>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html' %]
</table>
[% INCLUDE 'pagination.html', admin = 1, param = 'p' IF pager %]
[% END %]
[% INCLUDE 'admin/list_updates.html' %]
[% INCLUDE 'admin/footer.html' %]
| [% PROCESS 'admin/header.html' title=loc('Search Reports') %]
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]">
</form>
[% IF problems.size %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Description') %]</th>
[% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
<th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
[% END %]
<th>[% loc('Photo') %]</th>
<th class='edit'>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html' %]
</table>
[% INCLUDE 'pagination.html', admin = 1, param = 'p' IF pager %]
[% END %]
[% INCLUDE 'admin/list_updates.html' %]
[% INCLUDE 'admin/footer.html' %]
| Add missing column title for superusers | [Zurich] Add missing column title for superusers
| HTML | agpl-3.0 | datauy/fixmystreet,antoinepemeja/fixmystreet,dracos/fixmystreet,appstud/fixmystreet,rbgdigital/fixmystreet,ciudadanointeligente/barriosenaccion,otmezger/fixmystreet,alearce88/fixmystreet,antoinepemeja/fixmystreet,nditech/fixmystreet,nditech/fixmystreet,ciudadanointeligente/barriosenaccion,otmezger/fixmystreet,altinukshini/lokalizo,appstud/fixmystreet,appstud/fixmystreet,antoinepemeja/fixmystreet,nditech/fixmystreet,datauy/fixmystreet,appstud/fixmystreet,opencorato/barriosenaccion,nditech/fixmystreet,opencorato/barriosenaccion,dracos/fixmystreet,otmezger/fixmystreet,rbgdigital/fixmystreet,eBay-Opportunity-Hack-Chennai-2014/Chennai_Street_Fix,altinukshini/lokalizo,eBay-Opportunity-Hack-Chennai-2014/Chennai_Street_Fix,alearce88/fixmystreet,opencorato/barriosenaccion,antoinepemeja/fixmystreet,otmezger/fixmystreet,alearce88/fixmystreet,otmezger/fixmystreet,nditech/fixmystreet,ciudadanointeligente/barriosenaccion,rbgdigital/fixmystreet,mhalden/fixmystreet,mhalden/fixmystreet,alearce88/fixmystreet,dracos/fixmystreet,ciudadanointeligente/barriosenaccion,alearce88/fixmystreet,datauy/fixmystreet,antoinepemeja/fixmystreet,alearce88/fixmystreet,eBay-Opportunity-Hack-Chennai-2014/Chennai_Street_Fix,opencorato/barriosenaccion,mhalden/fixmystreet,dracos/fixmystreet,nditech/fixmystreet,alearce88/fixmystreet,altinukshini/lokalizo,alearce88/fixmystreet,mhalden/fixmystreet,antoinepemeja/fixmystreet,appstud/fixmystreet,altinukshini/lokalizo,datauy/fixmystreet,dracos/fixmystreet,nditech/fixmystreet,opencorato/barriosenaccion,opencorato/barriosenaccion,datauy/fixmystreet,ciudadanointeligente/barriosenaccion,rbgdigital/fixmystreet,ciudadanointeligente/barriosenaccion,appstud/fixmystreet,eBay-Opportunity-Hack-Chennai-2014/Chennai_Street_Fix,ciudadanointeligente/barriosenaccion,rbgdigital/fixmystreet,mhalden/fixmystreet,otmezger/fixmystreet,otmezger/fixmystreet,altinukshini/lokalizo,datauy/fixmystreet,altinukshini/lokalizo,opencorato/barriosenaccion,dracos/fixmystreet,rbgdigital/fixmystreet,eBay-Opportunity-Hack-Chennai-2014/Chennai_Street_Fix,mhalden/fixmystreet,appstud/fixmystreet,antoinepemeja/fixmystreet,datauy/fixmystreet | html | ## Code Before:
[% PROCESS 'admin/header.html' title=loc('Search Reports') %]
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]">
</form>
[% IF problems.size %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Description') %]</th>
[% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
<th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
[% END %]
<th class='edit'>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html' %]
</table>
[% INCLUDE 'pagination.html', admin = 1, param = 'p' IF pager %]
[% END %]
[% INCLUDE 'admin/list_updates.html' %]
[% INCLUDE 'admin/footer.html' %]
## Instruction:
[Zurich] Add missing column title for superusers
## Code After:
[% PROCESS 'admin/header.html' title=loc('Search Reports') %]
[% PROCESS 'admin/report_blocks.html' %]
<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]">
</form>
[% IF problems.size %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Description') %]</th>
[% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %]
<th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th>
[% END %]
<th>[% loc('Photo') %]</th>
<th class='edit'>*</th>
</tr>
[% INCLUDE 'admin/problem_row.html' %]
</table>
[% INCLUDE 'pagination.html', admin = 1, param = 'p' IF pager %]
[% END %]
[% INCLUDE 'admin/list_updates.html' %]
[% INCLUDE 'admin/footer.html' %]
|
ee840f4a060b0fbb2430f6d0e7b23666148ae566 | init-python-mode.el | init-python-mode.el |
(autoload 'doctest-mode "doctest-mode" "Python doctest editing mode." t)
(setq auto-mode-alist
(append '(("SConstruct\\'" . python-mode)
("SConscript\\'" . python-mode))
auto-mode-alist))
;;----------------------------------------------------------------------------
;; On-the-fly syntax checking via flymake
;;----------------------------------------------------------------------------
(require-package 'flymake-python-pyflakes)
(add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
(provide 'init-python-mode)
| (setq auto-mode-alist
(append '(("SConstruct\\'" . python-mode)
("SConscript\\'" . python-mode))
auto-mode-alist))
;;----------------------------------------------------------------------------
;; On-the-fly syntax checking via flymake
;;----------------------------------------------------------------------------
(require-package 'flymake-python-pyflakes)
(add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
(provide 'init-python-mode)
| Remove defunct autoload for doctest-mode | Remove defunct autoload for doctest-mode
| Emacs Lisp | bsd-2-clause | blueseason/emacs.d | emacs-lisp | ## Code Before:
(autoload 'doctest-mode "doctest-mode" "Python doctest editing mode." t)
(setq auto-mode-alist
(append '(("SConstruct\\'" . python-mode)
("SConscript\\'" . python-mode))
auto-mode-alist))
;;----------------------------------------------------------------------------
;; On-the-fly syntax checking via flymake
;;----------------------------------------------------------------------------
(require-package 'flymake-python-pyflakes)
(add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
(provide 'init-python-mode)
## Instruction:
Remove defunct autoload for doctest-mode
## Code After:
(setq auto-mode-alist
(append '(("SConstruct\\'" . python-mode)
("SConscript\\'" . python-mode))
auto-mode-alist))
;;----------------------------------------------------------------------------
;; On-the-fly syntax checking via flymake
;;----------------------------------------------------------------------------
(require-package 'flymake-python-pyflakes)
(add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
(provide 'init-python-mode)
|
bbb2ba2c0ead08fca18c28be5bdefb3759c41a70 | README.md | README.md | CBF (Cloud Babel Fish)
======================
A library for converting various cloud deployment formats.
Usage
-----
require 'cbf'
List all the supported input formats:
CBF.parsers
List all the suported output formats:
CBF.generators
Convert from the Aeolus Deployable XML format to Amazon CloudFormation:
CBF.generate(:cloud_formation, CBF.parse(:aeolus, open("wordpress.xml")))
License
-------
All the files outside of the `spec/samples` directory are licensed under the Apache License Version 2.
The full text of the license can be found at: <http://www.apache.org/licenses/LICENSE-2.0>. It is also included in the attached `COPYING` file. | CBF (Cloud Babel Fish)
======================
A library for converting various cloud deployment formats.
Usage
-----
require 'cbf'
List all the supported input formats:
CBF.parsers
List all the suported output formats:
CBF.generators
Convert from the Aeolus Deployable XML format to Amazon CloudFormation:
CBF.generate(:cloud_formation, CBF.parse(:aeolus, open("wordpress.xml")))
How it works
------------
When CBF reads an input format, it converts its contents into an internal representation that contains all the information and is the same for all the formats.
The generator for the output format receives this internal structure and converts it to the desired output.
If you want to add supports for new formats, you will need work with this internal resource format.
The specification is here:
<https://github.com/tomassedovic/cbf/wiki/Internal-resource-format>
Short-term Roadmap
------------------
* Fully document the internal resource format
* Add more extensive tests
* Publish to Rubygems
License
-------
All the files outside of the `spec/samples` directory are licensed under the Apache License Version 2.
The full text of the license can be found at: <http://www.apache.org/licenses/LICENSE-2.0>. It is also included in the attached `COPYING` file. | Update readme with roadmap and how-it-works | Update readme with roadmap and how-it-works
Signed-off-by: Tomas Sedovic <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@sedovic.cz>
| Markdown | apache-2.0 | tomassedovic/cbf | markdown | ## Code Before:
CBF (Cloud Babel Fish)
======================
A library for converting various cloud deployment formats.
Usage
-----
require 'cbf'
List all the supported input formats:
CBF.parsers
List all the suported output formats:
CBF.generators
Convert from the Aeolus Deployable XML format to Amazon CloudFormation:
CBF.generate(:cloud_formation, CBF.parse(:aeolus, open("wordpress.xml")))
License
-------
All the files outside of the `spec/samples` directory are licensed under the Apache License Version 2.
The full text of the license can be found at: <http://www.apache.org/licenses/LICENSE-2.0>. It is also included in the attached `COPYING` file.
## Instruction:
Update readme with roadmap and how-it-works
Signed-off-by: Tomas Sedovic <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@sedovic.cz>
## Code After:
CBF (Cloud Babel Fish)
======================
A library for converting various cloud deployment formats.
Usage
-----
require 'cbf'
List all the supported input formats:
CBF.parsers
List all the suported output formats:
CBF.generators
Convert from the Aeolus Deployable XML format to Amazon CloudFormation:
CBF.generate(:cloud_formation, CBF.parse(:aeolus, open("wordpress.xml")))
How it works
------------
When CBF reads an input format, it converts its contents into an internal representation that contains all the information and is the same for all the formats.
The generator for the output format receives this internal structure and converts it to the desired output.
If you want to add supports for new formats, you will need work with this internal resource format.
The specification is here:
<https://github.com/tomassedovic/cbf/wiki/Internal-resource-format>
Short-term Roadmap
------------------
* Fully document the internal resource format
* Add more extensive tests
* Publish to Rubygems
License
-------
All the files outside of the `spec/samples` directory are licensed under the Apache License Version 2.
The full text of the license can be found at: <http://www.apache.org/licenses/LICENSE-2.0>. It is also included in the attached `COPYING` file. |
f0b153e48a3e7221b7dc41efbde8470e4d5d81ff | src/components/shared/StackSettings.css | src/components/shared/StackSettings.css | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.stackSettings {
display: flex;
height: 25px;
flex-flow: row nowrap;
padding: 0;
line-height: 25px;
white-space: nowrap;
}
.stackSettingsList {
display: block;
display: flex;
flex: 1;
align-items: flex-start;
padding: 0;
margin: 0;
list-style: none;
}
.stackSettingsListItem {
padding: 0;
margin: 0 5px;
}
.stackSettingsLabel {
height: 25px;
align-items: center;
padding: 0;
}
.stackSettingsFilter {
padding-right: 10px;
border-right: 1px solid var(--grey-20);
}
.stackSettingsFilterLabel {
align-items: center;
padding: 0 5px 0 0;
}
.stackSettingsSelect {
height: 24px;
font-size: inherit;
}
| /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.stackSettings {
display: flex;
height: 25px;
flex-flow: row nowrap;
padding: 0;
line-height: 25px;
white-space: nowrap;
}
.stackSettingsList {
display: block;
display: flex;
flex: 1;
align-items: flex-start;
padding: 0;
margin: 0;
list-style: none;
}
.stackSettingsListItem {
padding: 0;
margin: 0 5px;
}
.stackSettingsLabel {
height: 25px;
align-items: center;
padding: 0;
}
.stackSettingsFilter {
padding-right: 10px;
border-right: 1px solid var(--grey-20);
}
.stackSettingsFilterLabel {
align-items: center;
padding: 0 5px 0 0;
}
.stackSettingsSelect {
/* Create a new stacking context for the select using a position:relative. This way
* the focus ring around the select breaks out of its surrounding container. */
position: relative;
height: 24px;
font-size: inherit;
}
| Create a stacking context for the select's focus ring | Create a stacking context for the select's focus ring
| CSS | mpl-2.0 | devtools-html/perf.html,mstange/cleopatra,mstange/cleopatra,devtools-html/perf.html | css | ## Code Before:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.stackSettings {
display: flex;
height: 25px;
flex-flow: row nowrap;
padding: 0;
line-height: 25px;
white-space: nowrap;
}
.stackSettingsList {
display: block;
display: flex;
flex: 1;
align-items: flex-start;
padding: 0;
margin: 0;
list-style: none;
}
.stackSettingsListItem {
padding: 0;
margin: 0 5px;
}
.stackSettingsLabel {
height: 25px;
align-items: center;
padding: 0;
}
.stackSettingsFilter {
padding-right: 10px;
border-right: 1px solid var(--grey-20);
}
.stackSettingsFilterLabel {
align-items: center;
padding: 0 5px 0 0;
}
.stackSettingsSelect {
height: 24px;
font-size: inherit;
}
## Instruction:
Create a stacking context for the select's focus ring
## Code After:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.stackSettings {
display: flex;
height: 25px;
flex-flow: row nowrap;
padding: 0;
line-height: 25px;
white-space: nowrap;
}
.stackSettingsList {
display: block;
display: flex;
flex: 1;
align-items: flex-start;
padding: 0;
margin: 0;
list-style: none;
}
.stackSettingsListItem {
padding: 0;
margin: 0 5px;
}
.stackSettingsLabel {
height: 25px;
align-items: center;
padding: 0;
}
.stackSettingsFilter {
padding-right: 10px;
border-right: 1px solid var(--grey-20);
}
.stackSettingsFilterLabel {
align-items: center;
padding: 0 5px 0 0;
}
.stackSettingsSelect {
/* Create a new stacking context for the select using a position:relative. This way
* the focus ring around the select breaks out of its surrounding container. */
position: relative;
height: 24px;
font-size: inherit;
}
|
e956aa34030a5649d8d5477cdbf4681645d52c1c | src/util/gatewayFormatter.js | src/util/gatewayFormatter.js | export const errorFormatter = error => {
if (error && error.response.data.error) {
const response = { config: error.config, ...error.response, ...error.response.data };
// delete data to avoid confusion
delete response.data;
return response;
}
return error;
};
export const responseFormatter = response => {
if (response.data.data) {
return { ...response, ...response.data };
}
return response;
};
| export const errorFormatter = error => {
if (error && error.response.data.error) {
const response = { config: error.config, ...error.response, ...error.response.data };
// delete data to avoid confusion
delete response.data;
return response;
}
return error;
};
export const responseFormatter = response => {
if (response && response.data && typeof response.data.data !== 'undefined') {
return { ...response, ...response.data };
}
return response;
};
| Fix gateway response formatter for falsy data | Fix gateway response formatter for falsy data
Sometimes the data response from the API is falsy. For example when
asking for a count, the count could be 0. This makes sure the data
is still formatted properly
| JavaScript | mit | hjeti/vue-skeleton,hjeti/vue-skeleton,hjeti/vue-skeleton | javascript | ## Code Before:
export const errorFormatter = error => {
if (error && error.response.data.error) {
const response = { config: error.config, ...error.response, ...error.response.data };
// delete data to avoid confusion
delete response.data;
return response;
}
return error;
};
export const responseFormatter = response => {
if (response.data.data) {
return { ...response, ...response.data };
}
return response;
};
## Instruction:
Fix gateway response formatter for falsy data
Sometimes the data response from the API is falsy. For example when
asking for a count, the count could be 0. This makes sure the data
is still formatted properly
## Code After:
export const errorFormatter = error => {
if (error && error.response.data.error) {
const response = { config: error.config, ...error.response, ...error.response.data };
// delete data to avoid confusion
delete response.data;
return response;
}
return error;
};
export const responseFormatter = response => {
if (response && response.data && typeof response.data.data !== 'undefined') {
return { ...response, ...response.data };
}
return response;
};
|
48f0263aae7145bedc5e1d2016b670ad94fbca0e | spec/json_schema/artesano_spec.rb | spec/json_schema/artesano_spec.rb | require 'spec_helper'
RSpec.describe JsonSchema::Artesano do
end
| require 'spec_helper'
RSpec.describe JsonSchema::Artesano do
let(:sketch) { support_sketch('schema') }
let(:expected_null) do
{"@type"=>nil, "id"=>nil, "uuid"=>nil, "@poll_type"=>nil, "title"=>nil, "image"=>{"@type"=>nil, "cloudinary_id"=>nil, "caption"=>nil, "height"=>nil, "width"=>nil, "original_format"=>nil}, "answers"=>[{"id"=>nil, "uuid"=>nil, "title"=>nil, "correct"=>nil, "un_enum"=>nil}]}
end
let(:expected_data_type) do
{"@type"=>"enum[string]", "id"=>"integer", "uuid"=>"string", "@poll_type"=>"enum[string]", "title"=>"string", "image"=>{"@type"=>"enum[string]", "cloudinary_id"=>"string", "caption"=>"string", "height"=>"integer", "width"=>"integer", "original_format"=>"enum[string]"}, "answers"=>[{"id"=>"integer", "uuid"=>"string", "title"=>"string", "correct"=>"boolean", "un_enum"=>"enum"}]}
end
subject { JsonSchema::Artesano::Hand.new(tool: tool).mold(sketch) }
describe 'tools' do
context 'Tools::Null' do
let(:tool) { JsonSchema::Artesano::Tools::Null }
it 'works' do
expect { subject }.not_to raise_error
end
end
context 'Tools::DataType' do
let(:tool) { JsonSchema::Artesano::Tools::DataType }
it 'works' do
expect { subject }.not_to raise_error
end
end
end
end
| Add test case for current existing strategies | Add test case for current existing strategies
| Ruby | mit | ammancilla/json_schema-artesano,ammancilla/json_schema-artesano | ruby | ## Code Before:
require 'spec_helper'
RSpec.describe JsonSchema::Artesano do
end
## Instruction:
Add test case for current existing strategies
## Code After:
require 'spec_helper'
RSpec.describe JsonSchema::Artesano do
let(:sketch) { support_sketch('schema') }
let(:expected_null) do
{"@type"=>nil, "id"=>nil, "uuid"=>nil, "@poll_type"=>nil, "title"=>nil, "image"=>{"@type"=>nil, "cloudinary_id"=>nil, "caption"=>nil, "height"=>nil, "width"=>nil, "original_format"=>nil}, "answers"=>[{"id"=>nil, "uuid"=>nil, "title"=>nil, "correct"=>nil, "un_enum"=>nil}]}
end
let(:expected_data_type) do
{"@type"=>"enum[string]", "id"=>"integer", "uuid"=>"string", "@poll_type"=>"enum[string]", "title"=>"string", "image"=>{"@type"=>"enum[string]", "cloudinary_id"=>"string", "caption"=>"string", "height"=>"integer", "width"=>"integer", "original_format"=>"enum[string]"}, "answers"=>[{"id"=>"integer", "uuid"=>"string", "title"=>"string", "correct"=>"boolean", "un_enum"=>"enum"}]}
end
subject { JsonSchema::Artesano::Hand.new(tool: tool).mold(sketch) }
describe 'tools' do
context 'Tools::Null' do
let(:tool) { JsonSchema::Artesano::Tools::Null }
it 'works' do
expect { subject }.not_to raise_error
end
end
context 'Tools::DataType' do
let(:tool) { JsonSchema::Artesano::Tools::DataType }
it 'works' do
expect { subject }.not_to raise_error
end
end
end
end
|
913c25e5b8a81965d60db97c67dedcedf7ad0df7 | README.md | README.md |
**ruma-client** is a [Matrix](https://matrix.org/) client library for [Rust](https://www.rust-lang.org/).
## License
[MIT](http://opensource.org/licenses/MIT)
|
**ruma-client** is a [Matrix](https://matrix.org/) client library for [Rust](https://www.rust-lang.org/).
## Minimum Rust version
ruma-client requires Rust 1.34 or later.
## License
[MIT](http://opensource.org/licenses/MIT)
| Add note about minimum Rust version. | Add note about minimum Rust version.
| Markdown | mit | ruma/ruma | markdown | ## Code Before:
**ruma-client** is a [Matrix](https://matrix.org/) client library for [Rust](https://www.rust-lang.org/).
## License
[MIT](http://opensource.org/licenses/MIT)
## Instruction:
Add note about minimum Rust version.
## Code After:
**ruma-client** is a [Matrix](https://matrix.org/) client library for [Rust](https://www.rust-lang.org/).
## Minimum Rust version
ruma-client requires Rust 1.34 or later.
## License
[MIT](http://opensource.org/licenses/MIT)
|
f19743bf6751a1b64205ce6bf94edbe71ac2fc6a | test/CMakeLists.txt | test/CMakeLists.txt | enable_language(Fortran)
# Set up some common env variable for the transformation flow
set(CLAWFC ${CMAKE_SOURCE_DIR}/driver/clawfc_test)
set(BUILD_TEST_TARGET transformation)
set(CLEAN_TEST_TARGET clean-transformation)
add_custom_target(${BUILD_TEST_TARGET})
add_custom_target(${CLEAN_TEST_TARGET})
# Define some test case sets
add_custom_target(${BUILD_TEST_TARGET}-claw-directive)
add_custom_target(${CLEAN_TEST_TARGET}-claw-directive)
add_custom_target(${BUILD_TEST_TARGET}-claw-abstraction)
add_custom_target(${CLEAN_TEST_TARGET}-claw-abstraction)
add_custom_target(${BUILD_TEST_TARGET}-driver)
add_custom_target(${CLEAN_TEST_TARGET}-driver)
add_custom_target(${BUILD_TEST_TARGET}-loops)
add_custom_target(${CLEAN_TEST_TARGET}-loops)
add_custom_target(${BUILD_TEST_TARGET}-openacc)
add_custom_target(${CLEAN_TEST_TARGET}-openacc)
add_custom_target(${BUILD_TEST_TARGET}-openmp)
add_custom_target(${CLEAN_TEST_TARGET}-openmp)
add_custom_target(${BUILD_TEST_TARGET}-utilities)
add_custom_target(${CLEAN_TEST_TARGET}-utilities)
# List of test directories
add_subdirectory(claw)
add_subdirectory(driver)
add_subdirectory(loops)
add_subdirectory(utilities)
add_subdirectory(openacc)
add_subdirectory(openmp)
# Custom target to run the full transformation test suite
add_custom_target(test-suite
COMMAND ${CMAKE_MAKE_PROGRAM} ${CLEAN_TEST_TARGET} ${BUILD_TEST_TARGET} test
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
| enable_language(Fortran)
# Set up some common env variable for the transformation flow
set(CLAWFC ${CMAKE_SOURCE_DIR}/driver/clawfc_test)
set(BUILD_TEST_TARGET transformation)
set(CLEAN_TEST_TARGET clean-transformation)
add_custom_target(${BUILD_TEST_TARGET})
add_custom_target(${CLEAN_TEST_TARGET})
# Define some test case sets
foreach(TCSET claw-directive claw-abstraction driver loops openacc openmp utilities)
add_custom_target(${BUILD_TEST_TARGET}-${TCSET})
add_custom_target(${CLEAN_TEST_TARGET}-${TCSET})
endforeach()
# List of test directories
add_subdirectory(claw)
add_subdirectory(driver)
add_subdirectory(loops)
add_subdirectory(utilities)
add_subdirectory(openacc)
add_subdirectory(openmp)
# Custom target to run the full transformation test suite
add_custom_target(test-suite
COMMAND ${CMAKE_MAKE_PROGRAM} ${CLEAN_TEST_TARGET} ${BUILD_TEST_TARGET} test
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
| Create sets targets with a foreach | Create sets targets with a foreach
| Text | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler | text | ## Code Before:
enable_language(Fortran)
# Set up some common env variable for the transformation flow
set(CLAWFC ${CMAKE_SOURCE_DIR}/driver/clawfc_test)
set(BUILD_TEST_TARGET transformation)
set(CLEAN_TEST_TARGET clean-transformation)
add_custom_target(${BUILD_TEST_TARGET})
add_custom_target(${CLEAN_TEST_TARGET})
# Define some test case sets
add_custom_target(${BUILD_TEST_TARGET}-claw-directive)
add_custom_target(${CLEAN_TEST_TARGET}-claw-directive)
add_custom_target(${BUILD_TEST_TARGET}-claw-abstraction)
add_custom_target(${CLEAN_TEST_TARGET}-claw-abstraction)
add_custom_target(${BUILD_TEST_TARGET}-driver)
add_custom_target(${CLEAN_TEST_TARGET}-driver)
add_custom_target(${BUILD_TEST_TARGET}-loops)
add_custom_target(${CLEAN_TEST_TARGET}-loops)
add_custom_target(${BUILD_TEST_TARGET}-openacc)
add_custom_target(${CLEAN_TEST_TARGET}-openacc)
add_custom_target(${BUILD_TEST_TARGET}-openmp)
add_custom_target(${CLEAN_TEST_TARGET}-openmp)
add_custom_target(${BUILD_TEST_TARGET}-utilities)
add_custom_target(${CLEAN_TEST_TARGET}-utilities)
# List of test directories
add_subdirectory(claw)
add_subdirectory(driver)
add_subdirectory(loops)
add_subdirectory(utilities)
add_subdirectory(openacc)
add_subdirectory(openmp)
# Custom target to run the full transformation test suite
add_custom_target(test-suite
COMMAND ${CMAKE_MAKE_PROGRAM} ${CLEAN_TEST_TARGET} ${BUILD_TEST_TARGET} test
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
## Instruction:
Create sets targets with a foreach
## Code After:
enable_language(Fortran)
# Set up some common env variable for the transformation flow
set(CLAWFC ${CMAKE_SOURCE_DIR}/driver/clawfc_test)
set(BUILD_TEST_TARGET transformation)
set(CLEAN_TEST_TARGET clean-transformation)
add_custom_target(${BUILD_TEST_TARGET})
add_custom_target(${CLEAN_TEST_TARGET})
# Define some test case sets
foreach(TCSET claw-directive claw-abstraction driver loops openacc openmp utilities)
add_custom_target(${BUILD_TEST_TARGET}-${TCSET})
add_custom_target(${CLEAN_TEST_TARGET}-${TCSET})
endforeach()
# List of test directories
add_subdirectory(claw)
add_subdirectory(driver)
add_subdirectory(loops)
add_subdirectory(utilities)
add_subdirectory(openacc)
add_subdirectory(openmp)
# Custom target to run the full transformation test suite
add_custom_target(test-suite
COMMAND ${CMAKE_MAKE_PROGRAM} ${CLEAN_TEST_TARGET} ${BUILD_TEST_TARGET} test
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
|
be89b2d9617fd5b837695e4322a2c98e4d4346cc | semillas_backend/users/serializers.py | semillas_backend/users/serializers.py | from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from semillas_backend.users.serializers import UserSerializer
JSONRenderer().render(UserSerializer(user_instance).data)
"""
location = PointField()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login')
class UpdateUserSerializer(serializers.ModelSerializer):
name = serializers.CharField(required=False)
#phone = PhoneNumberField(required=False)
email = serializers.CharField(required=False)
picture = serializers.ImageField(required=False)
uuid = serializers.CharField(read_only=True)
class Meta:
model = User
fields = ('name', 'picture', 'phone', 'email', 'uuid')
from wallet.serializers import WalletSerializer
class FullUserSerializer(UserSerializer):
wallet = WalletSerializer()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login', 'wallet', 'email', 'phone')
| from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from semillas_backend.users.serializers import UserSerializer
JSONRenderer().render(UserSerializer(user_instance).data)
"""
location = PointField()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login', 'email', 'phone')
class UpdateUserSerializer(serializers.ModelSerializer):
name = serializers.CharField(required=False)
#phone = PhoneNumberField(required=False)
email = serializers.CharField(required=False)
picture = serializers.ImageField(required=False)
uuid = serializers.CharField(read_only=True)
class Meta:
model = User
fields = ('name', 'picture', 'phone', 'email', 'uuid')
from wallet.serializers import WalletSerializer
class FullUserSerializer(UserSerializer):
wallet = WalletSerializer()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login', 'wallet', 'email', 'phone')
| Add phone and email to user serializer | Add phone and email to user serializer
| Python | mit | Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform | python | ## Code Before:
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from semillas_backend.users.serializers import UserSerializer
JSONRenderer().render(UserSerializer(user_instance).data)
"""
location = PointField()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login')
class UpdateUserSerializer(serializers.ModelSerializer):
name = serializers.CharField(required=False)
#phone = PhoneNumberField(required=False)
email = serializers.CharField(required=False)
picture = serializers.ImageField(required=False)
uuid = serializers.CharField(read_only=True)
class Meta:
model = User
fields = ('name', 'picture', 'phone', 'email', 'uuid')
from wallet.serializers import WalletSerializer
class FullUserSerializer(UserSerializer):
wallet = WalletSerializer()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login', 'wallet', 'email', 'phone')
## Instruction:
Add phone and email to user serializer
## Code After:
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from semillas_backend.users.serializers import UserSerializer
JSONRenderer().render(UserSerializer(user_instance).data)
"""
location = PointField()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login', 'email', 'phone')
class UpdateUserSerializer(serializers.ModelSerializer):
name = serializers.CharField(required=False)
#phone = PhoneNumberField(required=False)
email = serializers.CharField(required=False)
picture = serializers.ImageField(required=False)
uuid = serializers.CharField(read_only=True)
class Meta:
model = User
fields = ('name', 'picture', 'phone', 'email', 'uuid')
from wallet.serializers import WalletSerializer
class FullUserSerializer(UserSerializer):
wallet = WalletSerializer()
class Meta:
model = User
fields = ('uuid', 'name', 'picture', 'location', 'username', 'last_login', 'wallet', 'email', 'phone')
|
8bb32136b29837113c1e74ae037bc01e60c0c3e1 | core/src/test/java/de/otto/jlineup/image/LABTest.java | core/src/test/java/de/otto/jlineup/image/LABTest.java | package de.otto.jlineup.image;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
public class LABTest {
@Test
public void shouldCalculateCIEDE2000() {
LAB lab1 = LAB.fromRGB(55,44,33, 0);
LAB lab2 = LAB.fromRGB(66,55,44, 0);
double v = LAB.ciede2000(lab1, lab2);
assertThat(v, is(3.533443206558854d));
}
} | package de.otto.jlineup.image;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
public class LABTest {
@Test
public void shouldCalculateCIEDE2000() {
LAB lab1 = LAB.fromRGB(55,44,33, 0);
LAB lab2 = LAB.fromRGB(66,55,44, 0);
double v = Math.round(LAB.ciede2000(lab1, lab2) * Math.pow(10, 12)) / Math.pow(10, 12);
assertThat(v, is(3.533443206559));
}
} | Fix precision issue on MacOS | Fix precision issue on MacOS
Co-authored-by: Marco Geweke <8bae85dbfa00ce59d1b81e4121747343f331087b@otto.de>
| Java | apache-2.0 | otto-de/jlineup,otto-de/jlineup,otto-de/jlineup | java | ## Code Before:
package de.otto.jlineup.image;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
public class LABTest {
@Test
public void shouldCalculateCIEDE2000() {
LAB lab1 = LAB.fromRGB(55,44,33, 0);
LAB lab2 = LAB.fromRGB(66,55,44, 0);
double v = LAB.ciede2000(lab1, lab2);
assertThat(v, is(3.533443206558854d));
}
}
## Instruction:
Fix precision issue on MacOS
Co-authored-by: Marco Geweke <8bae85dbfa00ce59d1b81e4121747343f331087b@otto.de>
## Code After:
package de.otto.jlineup.image;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
public class LABTest {
@Test
public void shouldCalculateCIEDE2000() {
LAB lab1 = LAB.fromRGB(55,44,33, 0);
LAB lab2 = LAB.fromRGB(66,55,44, 0);
double v = Math.round(LAB.ciede2000(lab1, lab2) * Math.pow(10, 12)) / Math.pow(10, 12);
assertThat(v, is(3.533443206559));
}
} |
62d7c94968d70564839b32375fac6608720c2a67 | backend/pycon/urls.py | backend/pycon/urls.py | from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.urls")),
path("", include("social_django.urls", namespace="social")),
path("", include("payments.urls")),
]
| from api.views import GraphQLView
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.urls")),
path("", include("social_django.urls", namespace="social")),
path("", include("payments.urls")),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
| Add media url when running in debug mode | Add media url when running in debug mode
| Python | mit | patrick91/pycon,patrick91/pycon | python | ## Code Before:
from api.views import GraphQLView
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.urls")),
path("", include("social_django.urls", namespace="social")),
path("", include("payments.urls")),
]
## Instruction:
Add media url when running in debug mode
## Code After:
from api.views import GraphQLView
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
urlpatterns = [
path("admin/", admin.site.urls),
path("graphql", csrf_exempt(GraphQLView.as_view()), name="graphql"),
path("user/", include("users.urls")),
path("", include("social_django.urls", namespace="social")),
path("", include("payments.urls")),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
0eaa7c9c5d8fc2087c4ecde68c8f79104120a462 | src/Checkers/FilesystemChecker.php | src/Checkers/FilesystemChecker.php | <?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
unlink($file);
});
return $file;
}
}
| <?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
if (! file_exists($file)) {
return $this->makeResult(false, sprintf(config('health.error-messages.tempfile'), $file));
}
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
if (file_exists($file)) {
unlink($file);
}
});
return $file;
}
}
| Fix checker for console calls | Fix checker for console calls
| PHP | bsd-3-clause | antonioribeiro/health,antonioribeiro/health | php | ## Code Before:
<?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
unlink($file);
});
return $file;
}
}
## Instruction:
Fix checker for console calls
## Code After:
<?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
if (! file_exists($file)) {
return $this->makeResult(false, sprintf(config('health.error-messages.tempfile'), $file));
}
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
if (file_exists($file)) {
unlink($file);
}
});
return $file;
}
}
|
b52ba07e8c40823719e0058bd97a076fdf259d24 | .travis.yml | .travis.yml | language: java
script: "mvn install -DskipTests=true -B"
| language: java
script: "[ ${TRAVIS_PULL_REQUEST} = 'false' ] && mvn clean deploy --settings settings.xml -B || mvn clean verify --settings settings.xml -B"
| Enable Travis to publish artifacts | Enable Travis to publish artifacts
| YAML | apache-2.0 | subclipse/svnclientadapter | yaml | ## Code Before:
language: java
script: "mvn install -DskipTests=true -B"
## Instruction:
Enable Travis to publish artifacts
## Code After:
language: java
script: "[ ${TRAVIS_PULL_REQUEST} = 'false' ] && mvn clean deploy --settings settings.xml -B || mvn clean verify --settings settings.xml -B"
|
309f1bd80a5f732ac83d706505fc978d91b881fb | test/ringo/subprocess_test.js | test/ringo/subprocess_test.js | var assert = require('assert');
var subprocess = require('ringo/subprocess');
var fs = require('fs');
const RINGO_HOME = system.prefix;
function isWindows() /win/i.test(java.lang.System.getProperty('os.name'));
exports.testCwdSensibleness = function () {
fs.changeWorkingDirectory(RINGO_HOME);
var cmd = isWindows() ? 'cd' : '/bin/pwd';
var out = subprocess.command(cmd).replace(/\n/, '').replace(/\\/g, '/');
var pwd = /\/$/.test(out) ? out : out + '/';
assert.strictEqual(fs.workingDirectory(), RINGO_HOME);
assert.strictEqual(pwd, isWindows() ?
RINGO_HOME.replace(/\\/g, '/') : RINGO_HOME);
};
| var assert = require('assert');
var subprocess = require('ringo/subprocess');
var fs = require('fs');
const RINGO_HOME = system.prefix;
function isWindows() /win/i.test(java.lang.System.getProperty('os.name'));
exports.testCwdSensibleness = function () {
fs.changeWorkingDirectory(RINGO_HOME);
var cmd = isWindows() ? 'cmd /c cd' : '/bin/pwd';
var out = subprocess.command(cmd)
.replace(/\n/, '')
.replace(/\\/g, '/');
var pwd = /\/$/.test(out) ? out : out + '/';
assert.strictEqual(fs.workingDirectory(), RINGO_HOME);
assert.strictEqual(pwd, isWindows() ?
RINGO_HOME.replace(/\\/g, '/') : RINGO_HOME);
};
| Make `ringo/subprocess` test actually work & pass as expected on Windows. | Make `ringo/subprocess` test actually work & pass
as expected on Windows. | JavaScript | apache-2.0 | ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ringo/ringojs,ringo/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,oberhamsi/ringojs | javascript | ## Code Before:
var assert = require('assert');
var subprocess = require('ringo/subprocess');
var fs = require('fs');
const RINGO_HOME = system.prefix;
function isWindows() /win/i.test(java.lang.System.getProperty('os.name'));
exports.testCwdSensibleness = function () {
fs.changeWorkingDirectory(RINGO_HOME);
var cmd = isWindows() ? 'cd' : '/bin/pwd';
var out = subprocess.command(cmd).replace(/\n/, '').replace(/\\/g, '/');
var pwd = /\/$/.test(out) ? out : out + '/';
assert.strictEqual(fs.workingDirectory(), RINGO_HOME);
assert.strictEqual(pwd, isWindows() ?
RINGO_HOME.replace(/\\/g, '/') : RINGO_HOME);
};
## Instruction:
Make `ringo/subprocess` test actually work & pass
as expected on Windows.
## Code After:
var assert = require('assert');
var subprocess = require('ringo/subprocess');
var fs = require('fs');
const RINGO_HOME = system.prefix;
function isWindows() /win/i.test(java.lang.System.getProperty('os.name'));
exports.testCwdSensibleness = function () {
fs.changeWorkingDirectory(RINGO_HOME);
var cmd = isWindows() ? 'cmd /c cd' : '/bin/pwd';
var out = subprocess.command(cmd)
.replace(/\n/, '')
.replace(/\\/g, '/');
var pwd = /\/$/.test(out) ? out : out + '/';
assert.strictEqual(fs.workingDirectory(), RINGO_HOME);
assert.strictEqual(pwd, isWindows() ?
RINGO_HOME.replace(/\\/g, '/') : RINGO_HOME);
};
|
ac78692b90f5e6eaea245045f3dd197e303af7bc | src/main/exploration/utils/ExplorationParameter.scala | src/main/exploration/utils/ExplorationParameter.scala | package exploration.utils
import org.clapper.argot.{FlagOption, SingleValueOption}
/**
* Created by bastian on 6/19/17.
*/
object ExplorationParameter {
def getValue[T](option: SingleValueOption[T], config: Option[T], default: T) = {
if (option.value.isDefined && config.isDefined && config.get != default && config.get != option.value.get)
println("[ExplorationParameter] Warning: Command line arg overrides existing config file arg")
option.value.getOrElse(config.getOrElse(default))
}
def getValue[T](option: FlagOption[T], config: Option[T], default: T) = {
if (option.value.isDefined && config.isDefined && config.get != default && config.get != option.value.get)
println("[ExplorationParameter] Warning: Command line arg overrides existing config file arg")
option.value.getOrElse(config.getOrElse(default))
}
}
| package exploration.utils
import org.clapper.argot.{FlagOption, SingleValueOption}
object ExplorationParameter {
def getValue[T](option: SingleValueOption[T], config: Option[T], default: T): T =
getValue(option.value, config, default)
def getValue[T](option: FlagOption[T], config: Option[T], default: T): T =
getValue(option.value, config, default)
def getValue[T](option: Option[T], config: Option[T], default: T): T = {
if (option.isDefined && config.isDefined && config.get != option.get)
println("[ExplorationParameter] Warning: Command line arg overrides existing config file arg")
option.getOrElse(config.getOrElse(default))
}
}
| Remove automatically generated javadoc, extract method | Remove automatically generated javadoc, extract method
| Scala | mit | lift-project/lift,lift-project/lift,lift-project/lift,lift-project/lift,lift-project/lift | scala | ## Code Before:
package exploration.utils
import org.clapper.argot.{FlagOption, SingleValueOption}
/**
* Created by bastian on 6/19/17.
*/
object ExplorationParameter {
def getValue[T](option: SingleValueOption[T], config: Option[T], default: T) = {
if (option.value.isDefined && config.isDefined && config.get != default && config.get != option.value.get)
println("[ExplorationParameter] Warning: Command line arg overrides existing config file arg")
option.value.getOrElse(config.getOrElse(default))
}
def getValue[T](option: FlagOption[T], config: Option[T], default: T) = {
if (option.value.isDefined && config.isDefined && config.get != default && config.get != option.value.get)
println("[ExplorationParameter] Warning: Command line arg overrides existing config file arg")
option.value.getOrElse(config.getOrElse(default))
}
}
## Instruction:
Remove automatically generated javadoc, extract method
## Code After:
package exploration.utils
import org.clapper.argot.{FlagOption, SingleValueOption}
object ExplorationParameter {
def getValue[T](option: SingleValueOption[T], config: Option[T], default: T): T =
getValue(option.value, config, default)
def getValue[T](option: FlagOption[T], config: Option[T], default: T): T =
getValue(option.value, config, default)
def getValue[T](option: Option[T], config: Option[T], default: T): T = {
if (option.isDefined && config.isDefined && config.get != option.get)
println("[ExplorationParameter] Warning: Command line arg overrides existing config file arg")
option.getOrElse(config.getOrElse(default))
}
}
|
4a62214f0c9e8789b8453a48c0a880c4ac6236cb | saleor/product/migrations/0123_auto_20200904_1251.py | saleor/product/migrations/0123_auto_20200904_1251.py |
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("product", "0122_auto_20200828_1135"),
]
operations = [
migrations.AlterUniqueTogether(
name="variantimage", unique_together={("variant", "image")},
),
]
|
from django.db import migrations
from django.db.models import Count
def remove_variant_image_duplicates(apps, schema_editor):
ProductImage = apps.get_model("product", "ProductImage")
VariantImage = apps.get_model("product", "VariantImage")
duplicated_images = (
ProductImage.objects.values("pk", "variant_images__variant")
.annotate(variant_count=Count("variant_images__variant"))
.filter(variant_count__gte=2)
)
variant_image_ids_to_remove = []
for image_data in duplicated_images:
ids = VariantImage.objects.filter(
variant=image_data["variant_images__variant"], image__pk=image_data["pk"],
)[1:].values_list("pk", flat=True)
variant_image_ids_to_remove += ids
VariantImage.objects.filter(pk__in=variant_image_ids_to_remove).delete()
class Migration(migrations.Migration):
dependencies = [
("product", "0122_auto_20200828_1135"),
]
operations = [
migrations.RunPython(
remove_variant_image_duplicates, migrations.RunPython.noop
),
migrations.AlterUniqueTogether(
name="variantimage", unique_together={("variant", "image")},
),
]
| Drop duplicated VariantImages before migration to unique together | Drop duplicated VariantImages before migration to unique together
| Python | bsd-3-clause | mociepka/saleor,mociepka/saleor,mociepka/saleor | python | ## Code Before:
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("product", "0122_auto_20200828_1135"),
]
operations = [
migrations.AlterUniqueTogether(
name="variantimage", unique_together={("variant", "image")},
),
]
## Instruction:
Drop duplicated VariantImages before migration to unique together
## Code After:
from django.db import migrations
from django.db.models import Count
def remove_variant_image_duplicates(apps, schema_editor):
ProductImage = apps.get_model("product", "ProductImage")
VariantImage = apps.get_model("product", "VariantImage")
duplicated_images = (
ProductImage.objects.values("pk", "variant_images__variant")
.annotate(variant_count=Count("variant_images__variant"))
.filter(variant_count__gte=2)
)
variant_image_ids_to_remove = []
for image_data in duplicated_images:
ids = VariantImage.objects.filter(
variant=image_data["variant_images__variant"], image__pk=image_data["pk"],
)[1:].values_list("pk", flat=True)
variant_image_ids_to_remove += ids
VariantImage.objects.filter(pk__in=variant_image_ids_to_remove).delete()
class Migration(migrations.Migration):
dependencies = [
("product", "0122_auto_20200828_1135"),
]
operations = [
migrations.RunPython(
remove_variant_image_duplicates, migrations.RunPython.noop
),
migrations.AlterUniqueTogether(
name="variantimage", unique_together={("variant", "image")},
),
]
|
fc9a443c3dffe7eabc70596f0f173c013ae90a6f | lib/shore/client/uuid_helpers.rb | lib/shore/client/uuid_helpers.rb | module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
| module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
| Fix formatting in UUID helper | Fix formatting in UUID helper
| Ruby | mit | shore-gmbh/shore-ruby-client,shore-gmbh/shore-ruby-client | ruby | ## Code Before:
module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
## Instruction:
Fix formatting in UUID helper
## Code After:
module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
|
20c18da06a96ba7e5f0eef284e44c177fd500d94 | meta/main.yml | meta/main.yml | ---
galaxy_info:
author: Gaëtan Trellu (goldyfruit)
namespace: uoi
role_name: haproxy
description: Install and configure HAproxy
company: InCloudUs
issue_tracker_url: https://github.com/uoi-io/ansible-haproxy/issues
license: Apache
min_ansible_version: 2.8
github_branch: master
platforms:
- name: EL
versions:
- 7
- name: Fedora
versions:
- 32
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags:
- cloud
- system
- network
- loadbalancer
- openstack
- haproxy
- listener
dependencies: []
| ---
galaxy_info:
author: Gaëtan Trellu (goldyfruit)
namespace: uoi
role_name: haproxy
description: Install and configure HAproxy
company: InCloudUs
issue_tracker_url: https://github.com/uoi-io/ansible-haproxy/issues
license: Apache
min_ansible_version: 2.8
github_branch: master
platforms:
- name: EL
versions:
- 7
- 8
- name: Fedora
versions:
- 32
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags:
- cloud
- system
- network
- loadbalancer
- openstack
- haproxy
- listener
dependencies: []
| Add EL 8 like distributions | [meta] Add EL 8 like distributions
| YAML | apache-2.0 | uoi-io/ansible-haproxy,uoi-io/ansible-haproxy | yaml | ## Code Before:
---
galaxy_info:
author: Gaëtan Trellu (goldyfruit)
namespace: uoi
role_name: haproxy
description: Install and configure HAproxy
company: InCloudUs
issue_tracker_url: https://github.com/uoi-io/ansible-haproxy/issues
license: Apache
min_ansible_version: 2.8
github_branch: master
platforms:
- name: EL
versions:
- 7
- name: Fedora
versions:
- 32
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags:
- cloud
- system
- network
- loadbalancer
- openstack
- haproxy
- listener
dependencies: []
## Instruction:
[meta] Add EL 8 like distributions
## Code After:
---
galaxy_info:
author: Gaëtan Trellu (goldyfruit)
namespace: uoi
role_name: haproxy
description: Install and configure HAproxy
company: InCloudUs
issue_tracker_url: https://github.com/uoi-io/ansible-haproxy/issues
license: Apache
min_ansible_version: 2.8
github_branch: master
platforms:
- name: EL
versions:
- 7
- 8
- name: Fedora
versions:
- 32
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags:
- cloud
- system
- network
- loadbalancer
- openstack
- haproxy
- listener
dependencies: []
|
44edeb7f4b5de3ad9395abf9201f2ec53f643ad2 | templates/javascript/App.js | templates/javascript/App.js | 'use strict';
import React from 'react/addons';
const ReactTransitionGroup = React.addons.TransitionGroup;
// CSS
require('../../styles/normalize.css');
require('../../styles/main.css');
const imageURL = require('../../images/yeoman.png');
const <%= scriptAppName %> = React.createClass({
render: function() {
return (
<div className='main'>
<ReactTransitionGroup transitionName="fade">
<img src={imageURL} />
</ReactTransitionGroup>
</div>
);
}
});
<% if (!reactRouter) {
%>React.render(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
<% } %>
export default <%= scriptAppName %>;
| 'use strict';
import React from 'react/addons';
const ReactTransitionGroup = React.addons.TransitionGroup;
// CSS
require('styles/normalize.css');
require('styles/main.css');
const imageURL = require('../../images/yeoman.png');
const <%= scriptAppName %> = React.createClass({
render: function() {
return (
<div className='main'>
<ReactTransitionGroup transitionName="fade">
<img src={imageURL} />
</ReactTransitionGroup>
</div>
);
}
});
<% if (!reactRouter) {
%>React.render(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
<% } %>
export default <%= scriptAppName %>;
| Use the styles alias for CSS files | Use the styles alias for CSS files
| JavaScript | mit | ties/generator-react-reflux-webpack,ties/generator-react-reflux-webpack | javascript | ## Code Before:
'use strict';
import React from 'react/addons';
const ReactTransitionGroup = React.addons.TransitionGroup;
// CSS
require('../../styles/normalize.css');
require('../../styles/main.css');
const imageURL = require('../../images/yeoman.png');
const <%= scriptAppName %> = React.createClass({
render: function() {
return (
<div className='main'>
<ReactTransitionGroup transitionName="fade">
<img src={imageURL} />
</ReactTransitionGroup>
</div>
);
}
});
<% if (!reactRouter) {
%>React.render(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
<% } %>
export default <%= scriptAppName %>;
## Instruction:
Use the styles alias for CSS files
## Code After:
'use strict';
import React from 'react/addons';
const ReactTransitionGroup = React.addons.TransitionGroup;
// CSS
require('styles/normalize.css');
require('styles/main.css');
const imageURL = require('../../images/yeoman.png');
const <%= scriptAppName %> = React.createClass({
render: function() {
return (
<div className='main'>
<ReactTransitionGroup transitionName="fade">
<img src={imageURL} />
</ReactTransitionGroup>
</div>
);
}
});
<% if (!reactRouter) {
%>React.render(<<%= scriptAppName %> />, document.getElementById('content')); // jshint ignore:line
<% } %>
export default <%= scriptAppName %>;
|
2aac8cafc0675d38cabcc137d063de0119b3ff3d | game.py | game.py | import pygame, sys
"""
A simple four in a row game.
Author: Isaac Arvestad
"""
class Game:
def __init__(self):
def update(self):
"Handle input."
for event in pygame.event.get():
if event.type == pygame.QUIT:
return False
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
return False
def render(self):
"Starts the game."
def start(self):
while True:
if not self.update():
break
self.render()
pygame.display.update()
self.exit()
def exit(self):
pygame.quit()
sys.exit()
| import pygame, sys
from board import Board
"""
A simple four in a row game.
Author: Isaac Arvestad
"""
class Game:
def __init__(self):
pygame.init()
self.screen = pygame.display.set_mode((600,600))
self.background = pygame.Surface(self.screen.get_size())
self.background.fill((255,255,255))
self.background = self.background.convert()
self.screen.blit(self.background, (0,0))
self.screenWidth = self.screen.get_size()[0]
self.screenHeight = self.screen.get_size()[1]
self.board = Board(7, 7)
self.pieceWidth = 50
self.pieceHeight = 50
def update(self):
"Handle input."
for event in pygame.event.get():
if event.type == pygame.QUIT:
return False
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
return False
return True
def render(self, screen):
for x in range(self.board.columns):
for y in range(self.board.rows):
pygame.draw.rect(screen, (0,0,0), (x*self.pieceWidth, y*self.pieceHeight, self.pieceWidth, self.pieceHeight))
"Starts the game."
def start(self):
while True:
if not self.update():
break
self.render(self.screen)
pygame.display.update()
self.exit()
def exit(self):
pygame.quit()
sys.exit()
game = Game()
game.start()
| Create screen and draw board to screen. | Create screen and draw board to screen.
| Python | mit | isaacarvestad/four-in-a-row | python | ## Code Before:
import pygame, sys
"""
A simple four in a row game.
Author: Isaac Arvestad
"""
class Game:
def __init__(self):
def update(self):
"Handle input."
for event in pygame.event.get():
if event.type == pygame.QUIT:
return False
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
return False
def render(self):
"Starts the game."
def start(self):
while True:
if not self.update():
break
self.render()
pygame.display.update()
self.exit()
def exit(self):
pygame.quit()
sys.exit()
## Instruction:
Create screen and draw board to screen.
## Code After:
import pygame, sys
from board import Board
"""
A simple four in a row game.
Author: Isaac Arvestad
"""
class Game:
def __init__(self):
pygame.init()
self.screen = pygame.display.set_mode((600,600))
self.background = pygame.Surface(self.screen.get_size())
self.background.fill((255,255,255))
self.background = self.background.convert()
self.screen.blit(self.background, (0,0))
self.screenWidth = self.screen.get_size()[0]
self.screenHeight = self.screen.get_size()[1]
self.board = Board(7, 7)
self.pieceWidth = 50
self.pieceHeight = 50
def update(self):
"Handle input."
for event in pygame.event.get():
if event.type == pygame.QUIT:
return False
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
return False
return True
def render(self, screen):
for x in range(self.board.columns):
for y in range(self.board.rows):
pygame.draw.rect(screen, (0,0,0), (x*self.pieceWidth, y*self.pieceHeight, self.pieceWidth, self.pieceHeight))
"Starts the game."
def start(self):
while True:
if not self.update():
break
self.render(self.screen)
pygame.display.update()
self.exit()
def exit(self):
pygame.quit()
sys.exit()
game = Game()
game.start()
|
7aa12a5804dd49c0d07ec693312a6bc17fe9309e | index.js | index.js | var promise = require('promises-a');
var emitter = require('emitter');
module.exports = imgur;
function imgur(apiKey) {
function upload(file) {
var def = promise();
emitter(def.promise);
if (!file || !file.type.match(/image.*/))
throw new Error('Invalid file type, imgur only accepts images.');
var fd = new FormData();
fd.append("image", file); // Append the file
fd.append("key", apiKey);
// Get your own key: http://api.imgur.com/
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://api.imgur.com/2/upload.json"); // Boooom!
xhr.onload = function () {
try {
def.fulfill(JSON.parse(xhr.responseText));
} catch (ex) {
def.reject(ex);
}
}
xhr.onerror = def.reject;
xhr.upload.onprogress = function (e) {
e.perecent = e.loaded / e.total * 100;
def.promise.emit('progress', e);
}
def.promise.abort = function () {
xhr.abort();
};
xhr.send(fd);
return def.promise;
}
return {upload: upload};
} | var promise = require('promises-a');
var emitter = require('emitter');
// Get your own key: http://api.imgur.com/
module.exports = imgur;
function imgur(apiKey) {
function upload(file) {
var def = promise();
emitter(def.promise);
try {
if (!file || !file.type.match(/image.*/)) {
var err = new Error('Invalid file type, imgur only accepts images.');
err.code = 'InvalidFileType';
throw err;
}
var fd = new FormData();
fd.append("image", file); // Append the file
fd.append("key", apiKey);
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://api.imgur.com/2/upload.json"); // Boooom!
xhr.onload = function () {
try {
def.fulfill(JSON.parse(xhr.responseText).upload);
} catch (ex) {
def.reject(ex);
}
}
xhr.onerror = def.reject;
xhr.upload.onprogress = function (e) {
e.perecent = e.loaded / e.total * 100;
def.promise.emit('progress', e);
}
def.promise.abort = function () {
xhr.abort();
};
xhr.send(fd);
} catch (ex) {
def.reject(ex);
}
return def.promise;
}
return {upload: upload};
} | Make all errors live in the promise | Make all errors live in the promise
| JavaScript | mit | ForbesLindesay/imsave,ForbesLindesay/imsave | javascript | ## Code Before:
var promise = require('promises-a');
var emitter = require('emitter');
module.exports = imgur;
function imgur(apiKey) {
function upload(file) {
var def = promise();
emitter(def.promise);
if (!file || !file.type.match(/image.*/))
throw new Error('Invalid file type, imgur only accepts images.');
var fd = new FormData();
fd.append("image", file); // Append the file
fd.append("key", apiKey);
// Get your own key: http://api.imgur.com/
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://api.imgur.com/2/upload.json"); // Boooom!
xhr.onload = function () {
try {
def.fulfill(JSON.parse(xhr.responseText));
} catch (ex) {
def.reject(ex);
}
}
xhr.onerror = def.reject;
xhr.upload.onprogress = function (e) {
e.perecent = e.loaded / e.total * 100;
def.promise.emit('progress', e);
}
def.promise.abort = function () {
xhr.abort();
};
xhr.send(fd);
return def.promise;
}
return {upload: upload};
}
## Instruction:
Make all errors live in the promise
## Code After:
var promise = require('promises-a');
var emitter = require('emitter');
// Get your own key: http://api.imgur.com/
module.exports = imgur;
function imgur(apiKey) {
function upload(file) {
var def = promise();
emitter(def.promise);
try {
if (!file || !file.type.match(/image.*/)) {
var err = new Error('Invalid file type, imgur only accepts images.');
err.code = 'InvalidFileType';
throw err;
}
var fd = new FormData();
fd.append("image", file); // Append the file
fd.append("key", apiKey);
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://api.imgur.com/2/upload.json"); // Boooom!
xhr.onload = function () {
try {
def.fulfill(JSON.parse(xhr.responseText).upload);
} catch (ex) {
def.reject(ex);
}
}
xhr.onerror = def.reject;
xhr.upload.onprogress = function (e) {
e.perecent = e.loaded / e.total * 100;
def.promise.emit('progress', e);
}
def.promise.abort = function () {
xhr.abort();
};
xhr.send(fd);
} catch (ex) {
def.reject(ex);
}
return def.promise;
}
return {upload: upload};
} |
c7d9f18125ce346d9513fa187c24b22b34d2278c | Source/build_dmg.sh | Source/build_dmg.sh |
set -e # fail on any error
SRC_PRODUCT="$1"
SRC_PRODUCT_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}.app"
SRC_PRODUCT_CONTENTS="${SRC_PRODUCT_PATH}/Contents"
SRC_PRODUCT_RESOURCES="${SRC_PRODUCT_CONTENTS}/Resources"
SRC_PRODUCT_VERSION=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "${SRC_PRODUCT_CONTENTS}/Info.plist"`
echo "Building DMG for ${SRC_PRODUCT} ${SRC_PRODUCT_VERSION}"
DMG_DST_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}.dmg"
DMG_SRC_DIR="${CONFIGURATION_TEMP_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}"
if [ -e "$DMG_DST_PATH" ] ; then
rm -rf "$DMG_DST_PATH" || exit 1
fi
mkdir -p "${DMG_SRC_DIR}"
cp -LR "${SRC_PRODUCT_PATH}" "${DMG_SRC_DIR}"
cp "${SRC_PRODUCT_PATH}/Contents/Resources/README.html" "${DMG_SRC_DIR}"
hdiutil create -layout NONE -srcfolder "${DMG_SRC_DIR}" "$DMG_DST_PATH"
hdiutil verify "$DMG_DST_PATH" || exit 1
rm -r "${DMG_SRC_DIR}" |
set -e # fail on any error
SRC_PRODUCT="$1"
SRC_PRODUCT_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}.app"
SRC_PRODUCT_CONTENTS="${SRC_PRODUCT_PATH}/Contents"
SRC_PRODUCT_RESOURCES="${SRC_PRODUCT_CONTENTS}/Resources"
SRC_PRODUCT_VERSION=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "${SRC_PRODUCT_CONTENTS}/Info.plist"`
echo "Building DMG for ${SRC_PRODUCT} ${SRC_PRODUCT_VERSION}"
DMG_DST_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}.dmg"
DMG_SRC_DIR="${CONFIGURATION_TEMP_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}"
if [ -e "$DMG_DST_PATH" ] ; then
rm -rf "$DMG_DST_PATH"
fi
mkdir -p "${DMG_SRC_DIR}"
cp -LR "${SRC_PRODUCT_PATH}" "${DMG_SRC_DIR}"
cp "${SRC_PRODUCT_PATH}/Contents/Resources/README.html" "${DMG_SRC_DIR}"
hdiutil create -layout NONE -srcfolder "${DMG_SRC_DIR}" "$DMG_DST_PATH"
hdiutil verify "$DMG_DST_PATH"
rm -r "${DMG_SRC_DIR}" | Remove unnecessary exists since "set -e" is used | Remove unnecessary exists since "set -e" is used
| Shell | bsd-3-clause | aburgh/Disk-Arbitrator,aburgh/Disk-Arbitrator,aburgh/Disk-Arbitrator,aburgh/Disk-Arbitrator | shell | ## Code Before:
set -e # fail on any error
SRC_PRODUCT="$1"
SRC_PRODUCT_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}.app"
SRC_PRODUCT_CONTENTS="${SRC_PRODUCT_PATH}/Contents"
SRC_PRODUCT_RESOURCES="${SRC_PRODUCT_CONTENTS}/Resources"
SRC_PRODUCT_VERSION=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "${SRC_PRODUCT_CONTENTS}/Info.plist"`
echo "Building DMG for ${SRC_PRODUCT} ${SRC_PRODUCT_VERSION}"
DMG_DST_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}.dmg"
DMG_SRC_DIR="${CONFIGURATION_TEMP_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}"
if [ -e "$DMG_DST_PATH" ] ; then
rm -rf "$DMG_DST_PATH" || exit 1
fi
mkdir -p "${DMG_SRC_DIR}"
cp -LR "${SRC_PRODUCT_PATH}" "${DMG_SRC_DIR}"
cp "${SRC_PRODUCT_PATH}/Contents/Resources/README.html" "${DMG_SRC_DIR}"
hdiutil create -layout NONE -srcfolder "${DMG_SRC_DIR}" "$DMG_DST_PATH"
hdiutil verify "$DMG_DST_PATH" || exit 1
rm -r "${DMG_SRC_DIR}"
## Instruction:
Remove unnecessary exists since "set -e" is used
## Code After:
set -e # fail on any error
SRC_PRODUCT="$1"
SRC_PRODUCT_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}.app"
SRC_PRODUCT_CONTENTS="${SRC_PRODUCT_PATH}/Contents"
SRC_PRODUCT_RESOURCES="${SRC_PRODUCT_CONTENTS}/Resources"
SRC_PRODUCT_VERSION=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "${SRC_PRODUCT_CONTENTS}/Info.plist"`
echo "Building DMG for ${SRC_PRODUCT} ${SRC_PRODUCT_VERSION}"
DMG_DST_PATH="${BUILT_PRODUCTS_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}.dmg"
DMG_SRC_DIR="${CONFIGURATION_TEMP_DIR}/${SRC_PRODUCT}-${SRC_PRODUCT_VERSION}"
if [ -e "$DMG_DST_PATH" ] ; then
rm -rf "$DMG_DST_PATH"
fi
mkdir -p "${DMG_SRC_DIR}"
cp -LR "${SRC_PRODUCT_PATH}" "${DMG_SRC_DIR}"
cp "${SRC_PRODUCT_PATH}/Contents/Resources/README.html" "${DMG_SRC_DIR}"
hdiutil create -layout NONE -srcfolder "${DMG_SRC_DIR}" "$DMG_DST_PATH"
hdiutil verify "$DMG_DST_PATH"
rm -r "${DMG_SRC_DIR}" |
a096b4d565db8d713c1bdb78ad3bc881f5817b10 | gulp/tasks/webpack.js | gulp/tasks/webpack.js | import gulp from 'gulp';
import gulpWebpack from 'webpack-stream';
import webpack from 'webpack';
import config from '../config';
let app = './src/main.js';
gulp.task('webpack', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
devtool: 'inline-source-map',
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin()
],
module: {
loaders: [
{
loaders: ['ng-annotate', 'babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
gulp.task('webpack-build', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: {
except: ['goog', 'gapi', 'angular']
}
})
],
module: {
loaders: [
{
loaders: ['ng-annotate', 'babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
| import gulp from 'gulp';
import gulpWebpack from 'webpack-stream';
import webpack from 'webpack';
import config from '../config';
let app = './src/main.js';
gulp.task('webpack', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
devtool: 'inline-source-map',
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin()
],
module: {
loaders: [
{
loaders: ['babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
gulp.task('webpack-build', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: {
except: ['goog', 'gapi', 'angular']
}
})
],
module: {
loaders: [
{
loaders: ['ng-annotate', 'babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
| Remove annotate from default task | Remove annotate from default task
| JavaScript | mit | marcosmoura/angular-material-steppers,marcosmoura/angular-material-steppers | javascript | ## Code Before:
import gulp from 'gulp';
import gulpWebpack from 'webpack-stream';
import webpack from 'webpack';
import config from '../config';
let app = './src/main.js';
gulp.task('webpack', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
devtool: 'inline-source-map',
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin()
],
module: {
loaders: [
{
loaders: ['ng-annotate', 'babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
gulp.task('webpack-build', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: {
except: ['goog', 'gapi', 'angular']
}
})
],
module: {
loaders: [
{
loaders: ['ng-annotate', 'babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
## Instruction:
Remove annotate from default task
## Code After:
import gulp from 'gulp';
import gulpWebpack from 'webpack-stream';
import webpack from 'webpack';
import config from '../config';
let app = './src/main.js';
gulp.task('webpack', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
devtool: 'inline-source-map',
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin()
],
module: {
loaders: [
{
loaders: ['babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
gulp.task('webpack-build', () => {
return gulp.src(app)
.pipe(gulpWebpack({
output: {
filename: config.mainFile + '.js'
},
plugins: [
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: {
except: ['goog', 'gapi', 'angular']
}
})
],
module: {
loaders: [
{
loaders: ['ng-annotate', 'babel-loader']
}
]
}
}, webpack, () => 'done'))
.pipe(gulp.dest(config.destFolder));
});
|
ee314b526879e1761bb264b1675d9732202cd17f | src/main/web/florence/js/functions/_loadCreator.js | src/main/web/florence/js/functions/_loadCreator.js | function loadCreator (collectionId) {
var pageType, releaseDate;
getCollection(collectionId,
success = function (response) {
if (!response.publishDate) {
releaseDate = null;
} else {
releaseDate = response.publishDate;
}
},
error = function (response) {
handleApiError(response);
}
);
$('select').off().change(function () {
pageType = $(this).val();
//var parentUrl = localStorage.getItem("pageurl");
var parentUrl = Florence.globalVars.pagePath;
if (pageType === 'bulletin' || pageType === 'article') {
$('.edition').empty();
loadT4Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/compendium_.+/)) {
$('.edition').empty();
loadT6Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/static_.+/)) {
$('.edition').empty();
loadT7Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'reference_tables' || pageType === 'dataset') {
$('.edition').empty();
loadT8Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'release') {
$('.edition').empty();
loadT16Creator(collectionId, releaseDate, pageType, parentUrl);
}
});
}
| function loadCreator (collectionId) {
var pageType, releaseDate;
getCollection(collectionId,
success = function (response) {
if (!response.publishDate) {
releaseDate = null;
} else {
releaseDate = response.publishDate;
}
},
error = function (response) {
handleApiError(response);
}
);
$('select').off().change(function () {
pageType = $(this).val();
//var parentUrl = localStorage.getItem("pageurl");
var parentUrl = Florence.globalVars.pagePath;
$('.edition').empty();
if (pageType === 'bulletin' || pageType === 'article') {
loadT4Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/compendium_.+/)) {
loadT6Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/static_.+/)) {
loadT7Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'reference_tables' || pageType === 'dataset') {
loadT8Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'release') {
loadT16Creator(collectionId, releaseDate, pageType, parentUrl);
}
});
}
| Solve bug when creating new pages | Solve bug when creating new pages
Former-commit-id: 99f6349b33753887e39e44262e4259a3f209d4d1 | JavaScript | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | javascript | ## Code Before:
function loadCreator (collectionId) {
var pageType, releaseDate;
getCollection(collectionId,
success = function (response) {
if (!response.publishDate) {
releaseDate = null;
} else {
releaseDate = response.publishDate;
}
},
error = function (response) {
handleApiError(response);
}
);
$('select').off().change(function () {
pageType = $(this).val();
//var parentUrl = localStorage.getItem("pageurl");
var parentUrl = Florence.globalVars.pagePath;
if (pageType === 'bulletin' || pageType === 'article') {
$('.edition').empty();
loadT4Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/compendium_.+/)) {
$('.edition').empty();
loadT6Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/static_.+/)) {
$('.edition').empty();
loadT7Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'reference_tables' || pageType === 'dataset') {
$('.edition').empty();
loadT8Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'release') {
$('.edition').empty();
loadT16Creator(collectionId, releaseDate, pageType, parentUrl);
}
});
}
## Instruction:
Solve bug when creating new pages
Former-commit-id: 99f6349b33753887e39e44262e4259a3f209d4d1
## Code After:
function loadCreator (collectionId) {
var pageType, releaseDate;
getCollection(collectionId,
success = function (response) {
if (!response.publishDate) {
releaseDate = null;
} else {
releaseDate = response.publishDate;
}
},
error = function (response) {
handleApiError(response);
}
);
$('select').off().change(function () {
pageType = $(this).val();
//var parentUrl = localStorage.getItem("pageurl");
var parentUrl = Florence.globalVars.pagePath;
$('.edition').empty();
if (pageType === 'bulletin' || pageType === 'article') {
loadT4Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/compendium_.+/)) {
loadT6Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType.match(/static_.+/)) {
loadT7Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'reference_tables' || pageType === 'dataset') {
loadT8Creator(collectionId, releaseDate, pageType, parentUrl);
}
else if (pageType === 'release') {
loadT16Creator(collectionId, releaseDate, pageType, parentUrl);
}
});
}
|
c5496fddccffd2f16c0b4a140506b9d577d50b61 | eventlog/models.py | eventlog/models.py | from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
)
timestamp = models.DateTimeField(default=timezone.now, db_index=True)
action = models.CharField(max_length=50, db_index=True)
extra = jsonfield.JSONField()
class Meta:
ordering = ["-timestamp"]
def log(user, action, extra=None):
if (user is not None and not user.is_authenticated()):
user = None
if extra is None:
extra = {}
event = Log.objects.create(user=user, action=action, extra=extra)
event_logged.send(sender=Log, event=event)
return event
| from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
)
timestamp = models.DateTimeField(default=timezone.now, db_index=True)
action = models.CharField(max_length=50, db_index=True)
extra = jsonfield.JSONField()
@property
def template_fragment_name(self):
return "eventlog/{}.html".format(self.action.lower())
class Meta:
ordering = ["-timestamp"]
def log(user, action, extra=None):
if (user is not None and not user.is_authenticated()):
user = None
if extra is None:
extra = {}
event = Log.objects.create(user=user, action=action, extra=extra)
event_logged.send(sender=Log, event=event)
return event
| Add property to provide template fragment name | Add property to provide template fragment name
| Python | mit | jawed123/pinax-eventlog,pinax/pinax-eventlog,KleeTaurus/pinax-eventlog,rosscdh/pinax-eventlog | python | ## Code Before:
from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
)
timestamp = models.DateTimeField(default=timezone.now, db_index=True)
action = models.CharField(max_length=50, db_index=True)
extra = jsonfield.JSONField()
class Meta:
ordering = ["-timestamp"]
def log(user, action, extra=None):
if (user is not None and not user.is_authenticated()):
user = None
if extra is None:
extra = {}
event = Log.objects.create(user=user, action=action, extra=extra)
event_logged.send(sender=Log, event=event)
return event
## Instruction:
Add property to provide template fragment name
## Code After:
from django.conf import settings
from django.db import models
from django.utils import timezone
import jsonfield
from .signals import event_logged
class Log(models.Model):
user = models.ForeignKey(
getattr(settings, "AUTH_USER_MODEL", "auth.User"),
null=True,
on_delete=models.SET_NULL
)
timestamp = models.DateTimeField(default=timezone.now, db_index=True)
action = models.CharField(max_length=50, db_index=True)
extra = jsonfield.JSONField()
@property
def template_fragment_name(self):
return "eventlog/{}.html".format(self.action.lower())
class Meta:
ordering = ["-timestamp"]
def log(user, action, extra=None):
if (user is not None and not user.is_authenticated()):
user = None
if extra is None:
extra = {}
event = Log.objects.create(user=user, action=action, extra=extra)
event_logged.send(sender=Log, event=event)
return event
|
3d68f70bc395cdccb90f202b3fcde00f02404160 | spec/controllers/tasks_controller_spec.rb | spec/controllers/tasks_controller_spec.rb | require 'spec_helper'
describe TasksController do
describe "logged in user with can_only_see_watched permission" do
before(:each) do
session[:user_id]=Factory(:user)
cu
end
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should include only watched tasks"
end
end
describe "logged in user without can_only_see_watched permission" do
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should inlcude all tasks"
end
end
end
| require 'spec_helper'
describe TasksController do
describe "logged in user with can_only_see_watched permission" do
before(:each) do
end
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should include only watched tasks"
end
end
describe "logged in user without can_only_see_watched permission" do
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should inlcude all tasks"
end
end
end
| Clean up tasks controller spec | Clean up tasks controller spec
| Ruby | agpl-3.0 | ari/jobsworth,xuewenfei/jobsworth,ari/jobsworth,ari/jobsworth,webstream-io/jobsworth,digitalnatives/jobsworth,rafaspinola/jobsworth,evinoca/clockingit,xuewenfei/jobsworth,evinoca/clockingit,rafaspinola/jobsworth,webstream-io/jobsworth,digitalnatives/jobsworth,webstream-io/jobsworth,evinoca/clockingit,evinoca/clockingit,arunagw/clockingit,xuewenfei/jobsworth,ari/jobsworth,rafaspinola/jobsworth,digitalnatives/jobsworth,rafaspinola/jobsworth,digitalnatives/jobsworth,arunagw/clockingit,arunagw/clockingit,webstream-io/jobsworth,digitalnatives/jobsworth,xuewenfei/jobsworth | ruby | ## Code Before:
require 'spec_helper'
describe TasksController do
describe "logged in user with can_only_see_watched permission" do
before(:each) do
session[:user_id]=Factory(:user)
cu
end
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should include only watched tasks"
end
end
describe "logged in user without can_only_see_watched permission" do
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should inlcude all tasks"
end
end
end
## Instruction:
Clean up tasks controller spec
## Code After:
require 'spec_helper'
describe TasksController do
describe "logged in user with can_only_see_watched permission" do
before(:each) do
end
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should include only watched tasks"
end
end
describe "logged in user without can_only_see_watched permission" do
describe "GET list.xml" do
before(:each) do
get :list, :format=>'xml'
end
it "should inlcude all tasks"
end
end
end
|
4de4f95a011c0b01780658591d97409a840b2f14 | windows/README.txt | windows/README.txt | Build instructions for h5py on Windows:
Build h5py in the normal fashion, except you are required to provide
both the --hdf5 and --hdf5-version arguments to setup.py.
Build HDF5 for distribution with a single command, using the pavement
file in this directory. You will need to install paver first.
To build HDF5 with Visual Studio 2008 (required for Python 2.6 and 2.7):
paver build_2008
To build with Visual Studio 2010 (required for Python 3.2 and 3.3):
paver build_2010
These commands will each produce a zip file containing the appropriate
build of HDF5. Unpack them and supply the appropriate directory to --hdf5.
Check pavement.py for the current HDF5 version to pass to --hdf5-version. | Build instructions for h5py on Windows:
Build h5py in the normal fashion, except you are required to provide
both the --hdf5 and --hdf5-version arguments to setup.py.
Build HDF5 for distribution with a single command, using the pavement
file in this directory. You will need to install paver first.
To build HDF5 with Visual Studio 2008 (required for Python 2.6, 2.7 and 3.2):
paver build_2008
To build with Visual Studio 2010 (required for Python 3.3):
paver build_2010
These commands will each produce a zip file containing the appropriate
build of HDF5. Unpack them and supply the appropriate directory to --hdf5.
Check pavement.py for the current HDF5 version to pass to --hdf5-version. | Fix typo in windows readme | Fix typo in windows readme
| Text | bsd-3-clause | h5py/h5py,h5py/h5py,h5py/h5py | text | ## Code Before:
Build instructions for h5py on Windows:
Build h5py in the normal fashion, except you are required to provide
both the --hdf5 and --hdf5-version arguments to setup.py.
Build HDF5 for distribution with a single command, using the pavement
file in this directory. You will need to install paver first.
To build HDF5 with Visual Studio 2008 (required for Python 2.6 and 2.7):
paver build_2008
To build with Visual Studio 2010 (required for Python 3.2 and 3.3):
paver build_2010
These commands will each produce a zip file containing the appropriate
build of HDF5. Unpack them and supply the appropriate directory to --hdf5.
Check pavement.py for the current HDF5 version to pass to --hdf5-version.
## Instruction:
Fix typo in windows readme
## Code After:
Build instructions for h5py on Windows:
Build h5py in the normal fashion, except you are required to provide
both the --hdf5 and --hdf5-version arguments to setup.py.
Build HDF5 for distribution with a single command, using the pavement
file in this directory. You will need to install paver first.
To build HDF5 with Visual Studio 2008 (required for Python 2.6, 2.7 and 3.2):
paver build_2008
To build with Visual Studio 2010 (required for Python 3.3):
paver build_2010
These commands will each produce a zip file containing the appropriate
build of HDF5. Unpack them and supply the appropriate directory to --hdf5.
Check pavement.py for the current HDF5 version to pass to --hdf5-version. |
cfe8356196f6dc2497f23f51d18478e9510cc2d7 | Casks/plex-home-theater.rb | Casks/plex-home-theater.rb | class PlexHomeTheater < Cask
version '1.0.9.180'
sha256 'f7c51b212febafbca77e0af193819c7d7035a38600d65550db1362edadee31b7'
url 'http://downloads.plexapp.com/plex-home-theater/1.0.9.180-bde1e61d/PlexHomeTheater-1.0.9.180-bde1e61d-macosx-i386.zip'
homepage 'https://plex.tv'
link 'Plex Home Theater.app'
end
| class PlexHomeTheater < Cask
version '1.2.1.314'
if MacOS.prefer_64_bit?
sha256 '0e243ca7112cccd11f75bf799ff21a69413dc1eca6652f934ed456ac54fab5ae'
url 'http://downloads.plexapp.com/plex-home-theater/1.2.1.314-7cb0133e/PlexHomeTheater-1.2.1.314-7cb0133e-macosx-x86_64.zip'
else
sha256 '87954578b4aa1ec93876115967b0da61d6fa47f3f1125743a55f688366d56860'
url 'http://downloads.plexapp.com/plex-home-theater/1.2.1.314-7cb0133e/PlexHomeTheater-1.2.1.314-7cb0133e-macosx-i386.zip'
end
homepage 'https://plex.tv'
link 'Plex Home Theater.app'
end
| Upgrade Plex Home Theater to v1.2.1.314 and add 64bits version | Upgrade Plex Home Theater to v1.2.1.314 and add 64bits version
| Ruby | bsd-2-clause | dustinblackman/homebrew-cask,hanxue/caskroom,13k/homebrew-cask,pacav69/homebrew-cask,schneidmaster/homebrew-cask,fharbe/homebrew-cask,AnastasiaSulyagina/homebrew-cask,inta/homebrew-cask,usami-k/homebrew-cask,wuman/homebrew-cask,mahori/homebrew-cask,dcondrey/homebrew-cask,kingthorin/homebrew-cask,asbachb/homebrew-cask,ywfwj2008/homebrew-cask,BenjaminHCCarr/homebrew-cask,caskroom/homebrew-cask,neverfox/homebrew-cask,codeurge/homebrew-cask,yuhki50/homebrew-cask,mfpierre/homebrew-cask,codeurge/homebrew-cask,jellyfishcoder/homebrew-cask,rcuza/homebrew-cask,ayohrling/homebrew-cask,ashishb/homebrew-cask,sysbot/homebrew-cask,Ibuprofen/homebrew-cask,leipert/homebrew-cask,theoriginalgri/homebrew-cask,scribblemaniac/homebrew-cask,bric3/homebrew-cask,robertgzr/homebrew-cask,freeslugs/homebrew-cask,cliffcotino/homebrew-cask,Cottser/homebrew-cask,inta/homebrew-cask,cprecioso/homebrew-cask,deiga/homebrew-cask,Nitecon/homebrew-cask,m3nu/homebrew-cask,morganestes/homebrew-cask,ebraminio/homebrew-cask,paulombcosta/homebrew-cask,sysbot/homebrew-cask,gustavoavellar/homebrew-cask,franklouwers/homebrew-cask,jacobdam/homebrew-cask,skatsuta/homebrew-cask,chrisfinazzo/homebrew-cask,wayou/homebrew-cask,jbeagley52/homebrew-cask,phpwutz/homebrew-cask,mlocher/homebrew-cask,perfide/homebrew-cask,mikem/homebrew-cask,cfillion/homebrew-cask,carlmod/homebrew-cask,jamesmlees/homebrew-cask,coneman/homebrew-cask,seanorama/homebrew-cask,AnastasiaSulyagina/homebrew-cask,crzrcn/homebrew-cask,djakarta-trap/homebrew-myCask,dwihn0r/homebrew-cask,mAAdhaTTah/homebrew-cask,lifepillar/homebrew-cask,FranklinChen/homebrew-cask,Nitecon/homebrew-cask,paulbreslin/homebrew-cask,xalep/homebrew-cask,jasmas/homebrew-cask,prime8/homebrew-cask,6uclz1/homebrew-cask,dspeckhard/homebrew-cask,artdevjs/homebrew-cask,andrewschleifer/homebrew-cask,artdevjs/homebrew-cask,scw/homebrew-cask,axodys/homebrew-cask,okket/homebrew-cask,caskroom/homebrew-cask,samnung/homebrew-cask,ianyh/homebrew-cask,dictcp/homebrew-cask,kolomiichenko/homebrew-cask,FinalDes/homebrew-cask,jppelteret/homebrew-cask,sanyer/homebrew-cask,Bombenleger/homebrew-cask,patresi/homebrew-cask,jgarber623/homebrew-cask,rogeriopradoj/homebrew-cask,aguynamedryan/homebrew-cask,fkrone/homebrew-cask,otzy007/homebrew-cask,onlynone/homebrew-cask,julienlavergne/homebrew-cask,andrewschleifer/homebrew-cask,SentinelWarren/homebrew-cask,alexg0/homebrew-cask,a1russell/homebrew-cask,vigosan/homebrew-cask,jhowtan/homebrew-cask,kuno/homebrew-cask,joschi/homebrew-cask,robbiethegeek/homebrew-cask,Hywan/homebrew-cask,elseym/homebrew-cask,csmith-palantir/homebrew-cask,Whoaa512/homebrew-cask,fly19890211/homebrew-cask,usami-k/homebrew-cask,larseggert/homebrew-cask,afdnlw/homebrew-cask,lumaxis/homebrew-cask,j13k/homebrew-cask,ingorichter/homebrew-cask,nysthee/homebrew-cask,prime8/homebrew-cask,akiomik/homebrew-cask,forevergenin/homebrew-cask,crzrcn/homebrew-cask,vin047/homebrew-cask,jangalinski/homebrew-cask,julionc/homebrew-cask,mwilmer/homebrew-cask,renard/homebrew-cask,lolgear/homebrew-cask,rhendric/homebrew-cask,klane/homebrew-cask,sohtsuka/homebrew-cask,mhubig/homebrew-cask,pgr0ss/homebrew-cask,corbt/homebrew-cask,Amorymeltzer/homebrew-cask,ahvigil/homebrew-cask,y00rb/homebrew-cask,jspahrsummers/homebrew-cask,jhowtan/homebrew-cask,toonetown/homebrew-cask,mkozjak/homebrew-cask,samdoran/homebrew-cask,slnovak/homebrew-cask,aktau/homebrew-cask,nightscape/homebrew-cask,exherb/homebrew-cask,albertico/homebrew-cask,tarwich/homebrew-cask,d/homebrew-cask,delphinus35/homebrew-cask,elnappo/homebrew-cask,gibsjose/homebrew-cask,gguillotte/homebrew-cask,opsdev-ws/homebrew-cask,ninjahoahong/homebrew-cask,jonathanwiesel/homebrew-cask,christophermanning/homebrew-cask,rogeriopradoj/homebrew-cask,seanzxx/homebrew-cask,mazehall/homebrew-cask,RickWong/homebrew-cask,JikkuJose/homebrew-cask,dcondrey/homebrew-cask,dlovitch/homebrew-cask,bcaceiro/homebrew-cask,mchlrmrz/homebrew-cask,CameronGarrett/homebrew-cask,sparrc/homebrew-cask,mahori/homebrew-cask,sosedoff/homebrew-cask,chuanxd/homebrew-cask,Fedalto/homebrew-cask,frapposelli/homebrew-cask,dwihn0r/homebrew-cask,kronicd/homebrew-cask,moogar0880/homebrew-cask,jeroenj/homebrew-cask,jacobdam/homebrew-cask,Whoaa512/homebrew-cask,psibre/homebrew-cask,crmne/homebrew-cask,MicTech/homebrew-cask,mazehall/homebrew-cask,diogodamiani/homebrew-cask,englishm/homebrew-cask,hellosky806/homebrew-cask,stephenwade/homebrew-cask,ddm/homebrew-cask,hristozov/homebrew-cask,andersonba/homebrew-cask,gmkey/homebrew-cask,kingthorin/homebrew-cask,slack4u/homebrew-cask,My2ndAngelic/homebrew-cask,williamboman/homebrew-cask,wmorin/homebrew-cask,joshka/homebrew-cask,Saklad5/homebrew-cask,Gasol/homebrew-cask,segiddins/homebrew-cask,aki77/homebrew-cask,syscrusher/homebrew-cask,nivanchikov/homebrew-cask,Ngrd/homebrew-cask,nickpellant/homebrew-cask,kongslund/homebrew-cask,ahundt/homebrew-cask,catap/homebrew-cask,stevehedrick/homebrew-cask,ptb/homebrew-cask,RogerThiede/homebrew-cask,elseym/homebrew-cask,dvdoliveira/homebrew-cask,xcezx/homebrew-cask,dictcp/homebrew-cask,lucasmezencio/homebrew-cask,muan/homebrew-cask,deizel/homebrew-cask,danielgomezrico/homebrew-cask,johnjelinek/homebrew-cask,KosherBacon/homebrew-cask,yumitsu/homebrew-cask,shonjir/homebrew-cask,0rax/homebrew-cask,zeusdeux/homebrew-cask,otaran/homebrew-cask,mlocher/homebrew-cask,bkono/homebrew-cask,malford/homebrew-cask,nathancahill/homebrew-cask,csmith-palantir/homebrew-cask,lucasmezencio/homebrew-cask,gilesdring/homebrew-cask,arronmabrey/homebrew-cask,tsparber/homebrew-cask,lcasey001/homebrew-cask,phpwutz/homebrew-cask,zerrot/homebrew-cask,ctrevino/homebrew-cask,paulombcosta/homebrew-cask,josa42/homebrew-cask,nelsonjchen/homebrew-cask,sscotth/homebrew-cask,colindunn/homebrew-cask,kassi/homebrew-cask,stephenwade/homebrew-cask,scottsuch/homebrew-cask,mariusbutuc/homebrew-cask,lauantai/homebrew-cask,samshadwell/homebrew-cask,L2G/homebrew-cask,johan/homebrew-cask,jconley/homebrew-cask,lukasbestle/homebrew-cask,ayohrling/homebrew-cask,bgandon/homebrew-cask,bric3/homebrew-cask,boydj/homebrew-cask,fanquake/homebrew-cask,gerrymiller/homebrew-cask,mchlrmrz/homebrew-cask,Labutin/homebrew-cask,zhuzihhhh/homebrew-cask,vuquoctuan/homebrew-cask,puffdad/homebrew-cask,barravi/homebrew-cask,inz/homebrew-cask,epardee/homebrew-cask,ch3n2k/homebrew-cask,daften/homebrew-cask,mokagio/homebrew-cask,joaoponceleao/homebrew-cask,atsuyim/homebrew-cask,lvicentesanchez/homebrew-cask,ninjahoahong/homebrew-cask,christophermanning/homebrew-cask,ajbw/homebrew-cask,reitermarkus/homebrew-cask,mgryszko/homebrew-cask,JosephViolago/homebrew-cask,blainesch/homebrew-cask,franklouwers/homebrew-cask,robertgzr/homebrew-cask,michelegera/homebrew-cask,tangestani/homebrew-cask,MatzFan/homebrew-cask,mikem/homebrew-cask,AndreTheHunter/homebrew-cask,MisumiRize/homebrew-cask,mishari/homebrew-cask,My2ndAngelic/homebrew-cask,kpearson/homebrew-cask,nysthee/homebrew-cask,kirikiriyamama/homebrew-cask,ahvigil/homebrew-cask,stephenwade/homebrew-cask,cohei/homebrew-cask,devmynd/homebrew-cask,jmeridth/homebrew-cask,AndreTheHunter/homebrew-cask,githubutilities/homebrew-cask,xiongchiamiov/homebrew-cask,jpodlech/homebrew-cask,johndbritton/homebrew-cask,yutarody/homebrew-cask,kTitan/homebrew-cask,drostron/homebrew-cask,kei-yamazaki/homebrew-cask,gyndav/homebrew-cask,morganestes/homebrew-cask,schneidmaster/homebrew-cask,feniix/homebrew-cask,vuquoctuan/homebrew-cask,feigaochn/homebrew-cask,catap/homebrew-cask,BahtiyarB/homebrew-cask,zmwangx/homebrew-cask,kongslund/homebrew-cask,adriweb/homebrew-cask,kamilboratynski/homebrew-cask,jmeridth/homebrew-cask,freeslugs/homebrew-cask,FredLackeyOfficial/homebrew-cask,deiga/homebrew-cask,mjgardner/homebrew-cask,jgarber623/homebrew-cask,sgnh/homebrew-cask,MerelyAPseudonym/homebrew-cask,KosherBacon/homebrew-cask,FranklinChen/homebrew-cask,otaran/homebrew-cask,shoichiaizawa/homebrew-cask,tolbkni/homebrew-cask,dunn/homebrew-cask,gregkare/homebrew-cask,mishari/homebrew-cask,dlackty/homebrew-cask,renaudguerin/homebrew-cask,inz/homebrew-cask,danielbayley/homebrew-cask,sosedoff/homebrew-cask,joaoponceleao/homebrew-cask,antogg/homebrew-cask,giannitm/homebrew-cask,boecko/homebrew-cask,lantrix/homebrew-cask,RJHsiao/homebrew-cask,doits/homebrew-cask,bosr/homebrew-cask,kevyau/homebrew-cask,dictcp/homebrew-cask,cliffcotino/homebrew-cask,optikfluffel/homebrew-cask,corbt/homebrew-cask,gyugyu/homebrew-cask,Keloran/homebrew-cask,rogeriopradoj/homebrew-cask,arranubels/homebrew-cask,reitermarkus/homebrew-cask,adrianchia/homebrew-cask,wickles/homebrew-cask,guerrero/homebrew-cask,bric3/homebrew-cask,kostasdizas/homebrew-cask,paulbreslin/homebrew-cask,jpmat296/homebrew-cask,donbobka/homebrew-cask,ptb/homebrew-cask,dvdoliveira/homebrew-cask,gibsjose/homebrew-cask,gguillotte/homebrew-cask,tjt263/homebrew-cask,mAAdhaTTah/homebrew-cask,thehunmonkgroup/homebrew-cask,englishm/homebrew-cask,kkdd/homebrew-cask,ky0615/homebrew-cask-1,farmerchris/homebrew-cask,LaurentFough/homebrew-cask,stigkj/homebrew-caskroom-cask,tjnycum/homebrew-cask,esebastian/homebrew-cask,kteru/homebrew-cask,mrmachine/homebrew-cask,johnste/homebrew-cask,singingwolfboy/homebrew-cask,imgarylai/homebrew-cask,gwaldo/homebrew-cask,gurghet/homebrew-cask,malob/homebrew-cask,moimikey/homebrew-cask,sachin21/homebrew-cask,iAmGhost/homebrew-cask,julienlavergne/homebrew-cask,mkozjak/homebrew-cask,josa42/homebrew-cask,SamiHiltunen/homebrew-cask,CameronGarrett/homebrew-cask,scottsuch/homebrew-cask,gustavoavellar/homebrew-cask,zorosteven/homebrew-cask,axodys/homebrew-cask,epmatsw/homebrew-cask,illusionfield/homebrew-cask,neverfox/homebrew-cask,MircoT/homebrew-cask,j13k/homebrew-cask,williamboman/homebrew-cask,claui/homebrew-cask,xiongchiamiov/homebrew-cask,goxberry/homebrew-cask,shoichiaizawa/homebrew-cask,royalwang/homebrew-cask,sanyer/homebrew-cask,ksato9700/homebrew-cask,adelinofaria/homebrew-cask,wmorin/homebrew-cask,robbiethegeek/homebrew-cask,qnm/homebrew-cask,jamesmlees/homebrew-cask,Saklad5/homebrew-cask,nathanielvarona/homebrew-cask,coeligena/homebrew-customized,MichaelPei/homebrew-cask,theoriginalgri/homebrew-cask,hovancik/homebrew-cask,brianshumate/homebrew-cask,rkJun/homebrew-cask,AdamCmiel/homebrew-cask,sebcode/homebrew-cask,alebcay/homebrew-cask,xight/homebrew-cask,spruceb/homebrew-cask,colindean/homebrew-cask,aktau/homebrew-cask,rajiv/homebrew-cask,arronmabrey/homebrew-cask,buo/homebrew-cask,koenrh/homebrew-cask,feniix/homebrew-cask,tan9/homebrew-cask,norio-nomura/homebrew-cask,miccal/homebrew-cask,mathbunnyru/homebrew-cask,jasmas/homebrew-cask,bchatard/homebrew-cask,ftiff/homebrew-cask,sirodoht/homebrew-cask,RJHsiao/homebrew-cask,cohei/homebrew-cask,n8henrie/homebrew-cask,michelegera/homebrew-cask,johntrandall/homebrew-cask,napaxton/homebrew-cask,jangalinski/homebrew-cask,andrewdisley/homebrew-cask,renard/homebrew-cask,jeroenseegers/homebrew-cask,buo/homebrew-cask,MicTech/homebrew-cask,markhuber/homebrew-cask,lalyos/homebrew-cask,fharbe/homebrew-cask,lifepillar/homebrew-cask,nathanielvarona/homebrew-cask,a1russell/homebrew-cask,thii/homebrew-cask,alebcay/homebrew-cask,seanzxx/homebrew-cask,Ephemera/homebrew-cask,joshka/homebrew-cask,m3nu/homebrew-cask,af/homebrew-cask,aki77/homebrew-cask,johntrandall/homebrew-cask,wmorin/homebrew-cask,coeligena/homebrew-customized,dieterdemeyer/homebrew-cask,afh/homebrew-cask,kuno/homebrew-cask,kievechua/homebrew-cask,adrianchia/homebrew-cask,riyad/homebrew-cask,haha1903/homebrew-cask,3van/homebrew-cask,fanquake/homebrew-cask,ksato9700/homebrew-cask,sparrc/homebrew-cask,zchee/homebrew-cask,athrunsun/homebrew-cask,supriyantomaftuh/homebrew-cask,gilesdring/homebrew-cask,MoOx/homebrew-cask,bchatard/homebrew-cask,iAmGhost/homebrew-cask,elnappo/homebrew-cask,bdhess/homebrew-cask,tjt263/homebrew-cask,drostron/homebrew-cask,stonehippo/homebrew-cask,githubutilities/homebrew-cask,scribblemaniac/homebrew-cask,vin047/homebrew-cask,rkJun/homebrew-cask,spruceb/homebrew-cask,kryhear/homebrew-cask,RogerThiede/homebrew-cask,afh/homebrew-cask,mwek/homebrew-cask,tedski/homebrew-cask,nickpellant/homebrew-cask,colindean/homebrew-cask,blogabe/homebrew-cask,jayshao/homebrew-cask,asins/homebrew-cask,reelsense/homebrew-cask,a1russell/homebrew-cask,a-x-/homebrew-cask,uetchy/homebrew-cask,dspeckhard/homebrew-cask,chrisfinazzo/homebrew-cask,6uclz1/homebrew-cask,jaredsampson/homebrew-cask,n8henrie/homebrew-cask,bcomnes/homebrew-cask,norio-nomura/homebrew-cask,mathbunnyru/homebrew-cask,klane/homebrew-cask,kolomiichenko/homebrew-cask,Dremora/homebrew-cask,vitorgalvao/homebrew-cask,djakarta-trap/homebrew-myCask,gwaldo/homebrew-cask,deanmorin/homebrew-cask,daften/homebrew-cask,Amorymeltzer/homebrew-cask,mathbunnyru/homebrew-cask,cobyism/homebrew-cask,jrwesolo/homebrew-cask,lumaxis/homebrew-cask,garborg/homebrew-cask,tdsmith/homebrew-cask,illusionfield/homebrew-cask,jeanregisser/homebrew-cask,iamso/homebrew-cask,vmrob/homebrew-cask,samdoran/homebrew-cask,jacobbednarz/homebrew-cask,lolgear/homebrew-cask,gerrymiller/homebrew-cask,chuanxd/homebrew-cask,jonathanwiesel/homebrew-cask,antogg/homebrew-cask,nathansgreen/homebrew-cask,hovancik/homebrew-cask,haha1903/homebrew-cask,wastrachan/homebrew-cask,flaviocamilo/homebrew-cask,Keloran/homebrew-cask,mattfelsen/homebrew-cask,neil-ca-moore/homebrew-cask,farmerchris/homebrew-cask,mchlrmrz/homebrew-cask,bcomnes/homebrew-cask,neverfox/homebrew-cask,Ephemera/homebrew-cask,gyndav/homebrew-cask,ctrevino/homebrew-cask,bcaceiro/homebrew-cask,13k/homebrew-cask,fwiesel/homebrew-cask,samshadwell/homebrew-cask,victorpopkov/homebrew-cask,qnm/homebrew-cask,joaocc/homebrew-cask,tangestani/homebrew-cask,tjnycum/homebrew-cask,gurghet/homebrew-cask,jtriley/homebrew-cask,xtian/homebrew-cask,esebastian/homebrew-cask,wizonesolutions/homebrew-cask,ponychicken/homebrew-customcask,miguelfrde/homebrew-cask,deanmorin/homebrew-cask,af/homebrew-cask,crmne/homebrew-cask,ldong/homebrew-cask,maxnordlund/homebrew-cask,hackhandslabs/homebrew-cask,opsdev-ws/homebrew-cask,ch3n2k/homebrew-cask,coeligena/homebrew-customized,jiashuw/homebrew-cask,andrewdisley/homebrew-cask,remko/homebrew-cask,djmonta/homebrew-cask,JacopKane/homebrew-cask,enriclluelles/homebrew-cask,nicolas-brousse/homebrew-cask,singingwolfboy/homebrew-cask,onlynone/homebrew-cask,kievechua/homebrew-cask,wizonesolutions/homebrew-cask,lvicentesanchez/homebrew-cask,dezon/homebrew-cask,jawshooah/homebrew-cask,timsutton/homebrew-cask,djmonta/homebrew-cask,winkelsdorf/homebrew-cask,MerelyAPseudonym/homebrew-cask,royalwang/homebrew-cask,amatos/homebrew-cask,devmynd/homebrew-cask,fwiesel/homebrew-cask,helloIAmPau/homebrew-cask,flada-auxv/homebrew-cask,muan/homebrew-cask,giannitm/homebrew-cask,kiliankoe/homebrew-cask,zmwangx/homebrew-cask,zchee/homebrew-cask,guerrero/homebrew-cask,tmoreira2020/homebrew,flaviocamilo/homebrew-cask,vigosan/homebrew-cask,esebastian/homebrew-cask,kiliankoe/homebrew-cask,coneman/homebrew-cask,singingwolfboy/homebrew-cask,jalaziz/homebrew-cask,elyscape/homebrew-cask,3van/homebrew-cask,squid314/homebrew-cask,jawshooah/homebrew-cask,shonjir/homebrew-cask,mariusbutuc/homebrew-cask,santoshsahoo/homebrew-cask,gerrypower/homebrew-cask,andyshinn/homebrew-cask,wickedsp1d3r/homebrew-cask,tedbundyjr/homebrew-cask,0xadada/homebrew-cask,mwean/homebrew-cask,tdsmith/homebrew-cask,victorpopkov/homebrew-cask,vmrob/homebrew-cask,andyli/homebrew-cask,maxnordlund/homebrew-cask,brianshumate/homebrew-cask,bgandon/homebrew-cask,leonmachadowilcox/homebrew-cask,decrement/homebrew-cask,zeusdeux/homebrew-cask,mokagio/homebrew-cask,mattfelsen/homebrew-cask,troyxmccall/homebrew-cask,optikfluffel/homebrew-cask,iamso/homebrew-cask,cclauss/homebrew-cask,helloIAmPau/homebrew-cask,bdhess/homebrew-cask,jconley/homebrew-cask,pkq/homebrew-cask,cblecker/homebrew-cask,elyscape/homebrew-cask,wayou/homebrew-cask,kassi/homebrew-cask,pinut/homebrew-cask,xight/homebrew-cask,timsutton/homebrew-cask,alexg0/homebrew-cask,Fedalto/homebrew-cask,nshemonsky/homebrew-cask,frapposelli/homebrew-cask,chino/homebrew-cask,valepert/homebrew-cask,Amorymeltzer/homebrew-cask,underyx/homebrew-cask,retbrown/homebrew-cask,wolflee/homebrew-cask,morsdyce/homebrew-cask,diogodamiani/homebrew-cask,jeanregisser/homebrew-cask,danielbayley/homebrew-cask,wesen/homebrew-cask,xyb/homebrew-cask,markthetech/homebrew-cask,segiddins/homebrew-cask,andyshinn/homebrew-cask,mfpierre/homebrew-cask,dlovitch/homebrew-cask,y00rb/homebrew-cask,paour/homebrew-cask,cblecker/homebrew-cask,jeroenseegers/homebrew-cask,gord1anknot/homebrew-cask,lieuwex/homebrew-cask,gyndav/homebrew-cask,genewoo/homebrew-cask,kirikiriyamama/homebrew-cask,Gasol/homebrew-cask,xcezx/homebrew-cask,huanzhang/homebrew-cask,puffdad/homebrew-cask,donbobka/homebrew-cask,unasuke/homebrew-cask,BenjaminHCCarr/homebrew-cask,sanyer/homebrew-cask,yurikoles/homebrew-cask,faun/homebrew-cask,ohammersmith/homebrew-cask,cedwardsmedia/homebrew-cask,bsiddiqui/homebrew-cask,mwilmer/homebrew-cask,tyage/homebrew-cask,renaudguerin/homebrew-cask,thehunmonkgroup/homebrew-cask,lcasey001/homebrew-cask,xakraz/homebrew-cask,santoshsahoo/homebrew-cask,tedski/homebrew-cask,sgnh/homebrew-cask,linc01n/homebrew-cask,adrianchia/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,malob/homebrew-cask,amatos/homebrew-cask,winkelsdorf/homebrew-cask,kamilboratynski/homebrew-cask,lukeadams/homebrew-cask,jrwesolo/homebrew-cask,wesen/homebrew-cask,mattrobenolt/homebrew-cask,moonboots/homebrew-cask,nivanchikov/homebrew-cask,sjackman/homebrew-cask,yurrriq/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,petmoo/homebrew-cask,zhuzihhhh/homebrew-cask,blogabe/homebrew-cask,jtriley/homebrew-cask,mwean/homebrew-cask,kryhear/homebrew-cask,christer155/homebrew-cask,ahundt/homebrew-cask,d/homebrew-cask,tyage/homebrew-cask,rickychilcott/homebrew-cask,troyxmccall/homebrew-cask,lukeadams/homebrew-cask,chadcatlett/caskroom-homebrew-cask,johnste/homebrew-cask,hvisage/homebrew-cask,mattrobenolt/homebrew-cask,jspahrsummers/homebrew-cask,qbmiller/homebrew-cask,xight/homebrew-cask,adriweb/homebrew-cask,Hywan/homebrew-cask,alebcay/homebrew-cask,shanonvl/homebrew-cask,moogar0880/homebrew-cask,ksylvan/homebrew-cask,mingzhi22/homebrew-cask,faun/homebrew-cask,stevenmaguire/homebrew-cask,gyugyu/homebrew-cask,rubenerd/homebrew-cask,carlmod/homebrew-cask,yutarody/homebrew-cask,andersonba/homebrew-cask,cobyism/homebrew-cask,ianyh/homebrew-cask,uetchy/homebrew-cask,lukasbestle/homebrew-cask,lalyos/homebrew-cask,stonehippo/homebrew-cask,JoelLarson/homebrew-cask,Cottser/homebrew-cask,wKovacs64/homebrew-cask,danielgomezrico/homebrew-cask,jen20/homebrew-cask,thii/homebrew-cask,bendoerr/homebrew-cask,kei-yamazaki/homebrew-cask,cclauss/homebrew-cask,bsiddiqui/homebrew-cask,reitermarkus/homebrew-cask,diguage/homebrew-cask,ericbn/homebrew-cask,n0ts/homebrew-cask,ebraminio/homebrew-cask,BenjaminHCCarr/homebrew-cask,Ephemera/homebrew-cask,LaurentFough/homebrew-cask,hyuna917/homebrew-cask,valepert/homebrew-cask,mjdescy/homebrew-cask,taherio/homebrew-cask,kevyau/homebrew-cask,supriyantomaftuh/homebrew-cask,mjgardner/homebrew-cask,squid314/homebrew-cask,rajiv/homebrew-cask,xtian/homebrew-cask,jiashuw/homebrew-cask,huanzhang/homebrew-cask,Ibuprofen/homebrew-cask,mingzhi22/homebrew-cask,linc01n/homebrew-cask,jacobbednarz/homebrew-cask,chadcatlett/caskroom-homebrew-cask,nicolas-brousse/homebrew-cask,tedbundyjr/homebrew-cask,epmatsw/homebrew-cask,joaocc/homebrew-cask,mjdescy/homebrew-cask,a-x-/homebrew-cask,julionc/homebrew-cask,delphinus35/homebrew-cask,athrunsun/homebrew-cask,AdamCmiel/homebrew-cask,anbotero/homebrew-cask,jppelteret/homebrew-cask,toonetown/homebrew-cask,christer155/homebrew-cask,kteru/homebrew-cask,patresi/homebrew-cask,guylabs/homebrew-cask,MoOx/homebrew-cask,JoelLarson/homebrew-cask,otzy007/homebrew-cask,ajbw/homebrew-cask,stonehippo/homebrew-cask,kingthorin/homebrew-cask,yurikoles/homebrew-cask,katoquro/homebrew-cask,ashishb/homebrew-cask,JacopKane/homebrew-cask,JosephViolago/homebrew-cask,blogabe/homebrew-cask,imgarylai/homebrew-cask,johan/homebrew-cask,howie/homebrew-cask,moimikey/homebrew-cask,sirodoht/homebrew-cask,lauantai/homebrew-cask,moonboots/homebrew-cask,dunn/homebrew-cask,winkelsdorf/homebrew-cask,epardee/homebrew-cask,leonmachadowilcox/homebrew-cask,hackhandslabs/homebrew-cask,kTitan/homebrew-cask,alloy/homebrew-cask,jalaziz/homebrew-cask,ohammersmith/homebrew-cask,mattrobenolt/homebrew-cask,jayshao/homebrew-cask,askl56/homebrew-cask,0xadada/homebrew-cask,jalaziz/homebrew-cask,zorosteven/homebrew-cask,kostasdizas/homebrew-cask,yumitsu/homebrew-cask,pkq/homebrew-cask,stigkj/homebrew-caskroom-cask,fazo96/homebrew-cask,skatsuta/homebrew-cask,morsdyce/homebrew-cask,kesara/homebrew-cask,psibre/homebrew-cask,arranubels/homebrew-cask,astorije/homebrew-cask,Philosoft/homebrew-cask,wickles/homebrew-cask,yurikoles/homebrew-cask,xakraz/homebrew-cask,gord1anknot/homebrew-cask,thomanq/homebrew-cask,malford/homebrew-cask,sachin21/homebrew-cask,deizel/homebrew-cask,retbrown/homebrew-cask,wolflee/homebrew-cask,Labutin/homebrew-cask,fkrone/homebrew-cask,ftiff/homebrew-cask,kronicd/homebrew-cask,larseggert/homebrew-cask,alexg0/homebrew-cask,stevehedrick/homebrew-cask,zerrot/homebrew-cask,syscrusher/homebrew-cask,BahtiyarB/homebrew-cask,garborg/homebrew-cask,stevenmaguire/homebrew-cask,joshka/homebrew-cask,kpearson/homebrew-cask,Philosoft/homebrew-cask,Bombenleger/homebrew-cask,xyb/homebrew-cask,shorshe/homebrew-cask,jedahan/homebrew-cask,hyuna917/homebrew-cask,vitorgalvao/homebrew-cask,tarwich/homebrew-cask,bendoerr/homebrew-cask,rcuza/homebrew-cask,jellyfishcoder/homebrew-cask,pinut/homebrew-cask,barravi/homebrew-cask,paour/homebrew-cask,wickedsp1d3r/homebrew-cask,greg5green/homebrew-cask,unasuke/homebrew-cask,tan9/homebrew-cask,slnovak/homebrew-cask,claui/homebrew-cask,hanxue/caskroom,genewoo/homebrew-cask,andyli/homebrew-cask,joschi/homebrew-cask,skyyuan/homebrew-cask,hanxue/caskroom,chrisfinazzo/homebrew-cask,miccal/homebrew-cask,ky0615/homebrew-cask-1,cfillion/homebrew-cask,sjackman/homebrew-cask,ericbn/homebrew-cask,pablote/homebrew-cask,rickychilcott/homebrew-cask,sebcode/homebrew-cask,lieuwex/homebrew-cask,dlackty/homebrew-cask,riyad/homebrew-cask,wuman/homebrew-cask,retrography/homebrew-cask,dustinblackman/homebrew-cask,cedwardsmedia/homebrew-cask,fazo96/homebrew-cask,jbeagley52/homebrew-cask,asins/homebrew-cask,markhuber/homebrew-cask,ericbn/homebrew-cask,mhubig/homebrew-cask,miguelfrde/homebrew-cask,janlugt/homebrew-cask,tsparber/homebrew-cask,alloy/homebrew-cask,josa42/homebrew-cask,johndbritton/homebrew-cask,taherio/homebrew-cask,chrisRidgers/homebrew-cask,anbotero/homebrew-cask,sanchezm/homebrew-cask,bosr/homebrew-cask,diguage/homebrew-cask,pacav69/homebrew-cask,hvisage/homebrew-cask,jpmat296/homebrew-cask,chino/homebrew-cask,aguynamedryan/homebrew-cask,chrisRidgers/homebrew-cask,miccal/homebrew-cask,xalep/homebrew-cask,miku/homebrew-cask,scottsuch/homebrew-cask,albertico/homebrew-cask,bkono/homebrew-cask,shanonvl/homebrew-cask,jedahan/homebrew-cask,hakamadare/homebrew-cask,ponychicken/homebrew-customcask,kkdd/homebrew-cask,mindriot101/homebrew-cask,enriclluelles/homebrew-cask,qbmiller/homebrew-cask,nightscape/homebrew-cask,tmoreira2020/homebrew,L2G/homebrew-cask,scribblemaniac/homebrew-cask,mrmachine/homebrew-cask,fly19890211/homebrew-cask,ingorichter/homebrew-cask,Ngrd/homebrew-cask,sscotth/homebrew-cask,samnung/homebrew-cask,xyb/homebrew-cask,Ketouem/homebrew-cask,atsuyim/homebrew-cask,yuhki50/homebrew-cask,mahori/homebrew-cask,nathansgreen/homebrew-cask,napaxton/homebrew-cask,seanorama/homebrew-cask,nrlquaker/homebrew-cask,jpodlech/homebrew-cask,forevergenin/homebrew-cask,casidiablo/homebrew-cask,casidiablo/homebrew-cask,shorshe/homebrew-cask,nrlquaker/homebrew-cask,mauricerkelly/homebrew-cask,jeroenj/homebrew-cask,shonjir/homebrew-cask,jaredsampson/homebrew-cask,shishi/homebrew-cask,skyyuan/homebrew-cask,mindriot101/homebrew-cask,asbachb/homebrew-cask,markthetech/homebrew-cask,Dremora/homebrew-cask,boecko/homebrew-cask,deiga/homebrew-cask,JosephViolago/homebrew-cask,jen20/homebrew-cask,rhendric/homebrew-cask,mjgardner/homebrew-cask,imgarylai/homebrew-cask,kesara/homebrew-cask,retrography/homebrew-cask,FredLackeyOfficial/homebrew-cask,ksylvan/homebrew-cask,dezon/homebrew-cask,optikfluffel/homebrew-cask,goxberry/homebrew-cask,okket/homebrew-cask,antogg/homebrew-cask,yutarody/homebrew-cask,moimikey/homebrew-cask,MichaelPei/homebrew-cask,Ketouem/homebrew-cask,pablote/homebrew-cask,tranc99/homebrew-cask,hristozov/homebrew-cask,koenrh/homebrew-cask,SamiHiltunen/homebrew-cask,uetchy/homebrew-cask,paour/homebrew-cask,feigaochn/homebrew-cask,m3nu/homebrew-cask,tolbkni/homebrew-cask,RickWong/homebrew-cask,lantrix/homebrew-cask,guylabs/homebrew-cask,n0ts/homebrew-cask,colindunn/homebrew-cask,0rax/homebrew-cask,cprecioso/homebrew-cask,gabrielizaias/homebrew-cask,shoichiaizawa/homebrew-cask,MircoT/homebrew-cask,johnjelinek/homebrew-cask,hakamadare/homebrew-cask,scw/homebrew-cask,perfide/homebrew-cask,cblecker/homebrew-cask,hellosky806/homebrew-cask,rubenerd/homebrew-cask,gerrypower/homebrew-cask,pgr0ss/homebrew-cask,tranc99/homebrew-cask,flada-auxv/homebrew-cask,yurrriq/homebrew-cask,afdnlw/homebrew-cask,neil-ca-moore/homebrew-cask,JikkuJose/homebrew-cask,tjnycum/homebrew-cask,dieterdemeyer/homebrew-cask,doits/homebrew-cask,thomanq/homebrew-cask,askl56/homebrew-cask,gregkare/homebrew-cask,greg5green/homebrew-cask,joschi/homebrew-cask,jgarber623/homebrew-cask,nelsonjchen/homebrew-cask,ywfwj2008/homebrew-cask,howie/homebrew-cask,mwek/homebrew-cask,claui/homebrew-cask,dwkns/homebrew-cask,reelsense/homebrew-cask,sanchezm/homebrew-cask,sohtsuka/homebrew-cask,kesara/homebrew-cask,akiomik/homebrew-cask,janlugt/homebrew-cask,remko/homebrew-cask,FinalDes/homebrew-cask,ldong/homebrew-cask,underyx/homebrew-cask,shishi/homebrew-cask,tangestani/homebrew-cask,MatzFan/homebrew-cask,miku/homebrew-cask,slack4u/homebrew-cask,pkq/homebrew-cask,gabrielizaias/homebrew-cask,nathanielvarona/homebrew-cask,gmkey/homebrew-cask,katoquro/homebrew-cask,JacopKane/homebrew-cask,wKovacs64/homebrew-cask,timsutton/homebrew-cask,danielbayley/homebrew-cask,decrement/homebrew-cask,julionc/homebrew-cask,malob/homebrew-cask,rajiv/homebrew-cask,boydj/homebrew-cask,cobyism/homebrew-cask,blainesch/homebrew-cask,SentinelWarren/homebrew-cask,adelinofaria/homebrew-cask,MisumiRize/homebrew-cask,dwkns/homebrew-cask,exherb/homebrew-cask,nrlquaker/homebrew-cask,leipert/homebrew-cask,andrewdisley/homebrew-cask,ddm/homebrew-cask,mauricerkelly/homebrew-cask,nshemonsky/homebrew-cask,mgryszko/homebrew-cask,sscotth/homebrew-cask,nathancahill/homebrew-cask,petmoo/homebrew-cask,astorije/homebrew-cask,wastrachan/homebrew-cask | ruby | ## Code Before:
class PlexHomeTheater < Cask
version '1.0.9.180'
sha256 'f7c51b212febafbca77e0af193819c7d7035a38600d65550db1362edadee31b7'
url 'http://downloads.plexapp.com/plex-home-theater/1.0.9.180-bde1e61d/PlexHomeTheater-1.0.9.180-bde1e61d-macosx-i386.zip'
homepage 'https://plex.tv'
link 'Plex Home Theater.app'
end
## Instruction:
Upgrade Plex Home Theater to v1.2.1.314 and add 64bits version
## Code After:
class PlexHomeTheater < Cask
version '1.2.1.314'
if MacOS.prefer_64_bit?
sha256 '0e243ca7112cccd11f75bf799ff21a69413dc1eca6652f934ed456ac54fab5ae'
url 'http://downloads.plexapp.com/plex-home-theater/1.2.1.314-7cb0133e/PlexHomeTheater-1.2.1.314-7cb0133e-macosx-x86_64.zip'
else
sha256 '87954578b4aa1ec93876115967b0da61d6fa47f3f1125743a55f688366d56860'
url 'http://downloads.plexapp.com/plex-home-theater/1.2.1.314-7cb0133e/PlexHomeTheater-1.2.1.314-7cb0133e-macosx-i386.zip'
end
homepage 'https://plex.tv'
link 'Plex Home Theater.app'
end
|
b1d4344bbc4b98df9b469c2dcaff3c9991db74a0 | aws-sdk-core/lib/aws-sdk-core/plugins/sqs_queue_urls.rb | aws-sdk-core/lib/aws-sdk-core/plugins/sqs_queue_urls.rb | module Aws
module Plugins
# @api private
class SQSQueueUrls < Seahorse::Client::Plugin
class Handler < Seahorse::Client::Handler
def call(context)
if url = context.params[:queue_url]
update_region(context, url)
update_endpoint(context, url)
end
@handler.call(context)
end
def update_endpoint(context, url)
context.http_request.endpoint = url
end
def update_region(context, url)
if region = url.to_s.split('.')[1]
context.config = context.config.dup
context.config.region = region
context.config.sigv4_region = region
else
raise ArgumentError, "invalid queue url `#{url}'"
end
end
end
handler(Handler)
end
end
end
| module Aws
module Plugins
# @api private
class SQSQueueUrls < Seahorse::Client::Plugin
class Handler < Seahorse::Client::Handler
def call(context)
if url = context.params[:queue_url]
update_region(context, url)
update_endpoint(context, url)
end
@handler.call(context)
end
def update_endpoint(context, url)
context.http_request.endpoint = url
end
def update_region(context, url)
if region = url.to_s.split('.')[1]
context.config = context.config.dup
context.config.region = region
context.config.sigv4_region = region
end
end
end
handler(Handler)
end
end
end
| Allow local, fake SQS implementations | Allow local, fake SQS implementations
| Ruby | apache-2.0 | llooker/aws-sdk-ruby,llooker/aws-sdk-ruby,aws/aws-sdk-ruby,takeyuweb/aws-sdk-ruby,cjyclaire/aws-sdk-ruby,hamadata/aws-sdk-ruby,hamadata/aws-sdk-ruby,hamadata/aws-sdk-ruby,takeyuweb/aws-sdk-ruby,takeyuweb/aws-sdk-ruby,cjyclaire/aws-sdk-ruby,cjyclaire/aws-sdk-ruby,aws/aws-sdk-ruby,llooker/aws-sdk-ruby,aws/aws-sdk-ruby | ruby | ## Code Before:
module Aws
module Plugins
# @api private
class SQSQueueUrls < Seahorse::Client::Plugin
class Handler < Seahorse::Client::Handler
def call(context)
if url = context.params[:queue_url]
update_region(context, url)
update_endpoint(context, url)
end
@handler.call(context)
end
def update_endpoint(context, url)
context.http_request.endpoint = url
end
def update_region(context, url)
if region = url.to_s.split('.')[1]
context.config = context.config.dup
context.config.region = region
context.config.sigv4_region = region
else
raise ArgumentError, "invalid queue url `#{url}'"
end
end
end
handler(Handler)
end
end
end
## Instruction:
Allow local, fake SQS implementations
## Code After:
module Aws
module Plugins
# @api private
class SQSQueueUrls < Seahorse::Client::Plugin
class Handler < Seahorse::Client::Handler
def call(context)
if url = context.params[:queue_url]
update_region(context, url)
update_endpoint(context, url)
end
@handler.call(context)
end
def update_endpoint(context, url)
context.http_request.endpoint = url
end
def update_region(context, url)
if region = url.to_s.split('.')[1]
context.config = context.config.dup
context.config.region = region
context.config.sigv4_region = region
end
end
end
handler(Handler)
end
end
end
|
b0470d4d6b5eec088b1dce11f9058e9fd5dceed7 | routes.lisp | routes.lisp | (in-package #:saluto)
(defvar *providers* '()
"Variable, containing providers objects
Should be replaced when mounting module")
(defun parse-provider (provider-name)
(or (find provider-name (print *providers*) :key #'name :test #'string=)
(error "SALUTO: No such provider ~A" provider-name)))
(restas:define-route login-with ("goto/:provider/" :method :get)
; (:sift-variables (provider #'parse-provider))
(:additional-variables (redirect-uri (hunchentoot:parameter "redirect")))
;; This REDIRECT-URI means just target page after successful login
(let ((provider (parse-provider provider)))
(if (not (session))
(progn
(start-session)
(redirect
(make-goto-path provider
(session)
(or redirect-uri *main*)))
(redirect redirect-uri)))))
(restas:define-route receiver-route ("receiver/:provider/*states"
:method :get)
; (:sift-variables (provider #'parse-provider))
(:additional-variables
(state (hunchentoot:parameter "state"))
(code (hunchentoot:parameter "code"))
(error? (hunchentoot:parameter "error")))
(let ((provider (parse-provider provider)))
(receive provider
(or state (car states)) ;; It depends on provider, whether
;; it wants redirect URL to be
;; stable or uniq
code error?)))
(restas:define-route logout-route ("logout" :method :get)
(logout)
(redirect *main*)) | (in-package #:saluto)
(defvar *providers* '()
"Variable, containing providers objects
Should be replaced when mounting module")
(defun parse-provider (provider-name)
(or (find provider-name *providers* :key #'name :test #'string=)
(error "SALUTO: No such provider ~A" provider-name)))
(restas:define-route login-with ("goto/:provider/" :method :get)
(:sift-variables (provider #'parse-provider))
(:additional-variables (redirect-uri (hunchentoot:parameter "redirect")))
;; This REDIRECT-URI means just target page after successful login
(if (not (session))
(progn
(start-session)
(redirect
(make-goto-path provider
(session)
(or redirect-uri *main*)))
(redirect redirect-uri))))
(restas:define-route receiver-route ("receiver/:provider/*states"
:method :get)
(:sift-variables (provider #'parse-provider))
(:additional-variables
(state (hunchentoot:parameter "state"))
(code (hunchentoot:parameter "code"))
(error? (hunchentoot:parameter "error")))
(receive provider
(or state (car states)) ;; It depends on provider, whether
;; it wants redirect URL to be
;; stable or uniq
code error?))
(restas:define-route logout-route ("logout" :method :get)
(logout)
(redirect *main*)) | Synchronize with latest (warning!) RESTAS | Synchronize with latest (warning!) RESTAS
| Common Lisp | bsd-3-clause | dmitrys99/saluto | common-lisp | ## Code Before:
(in-package #:saluto)
(defvar *providers* '()
"Variable, containing providers objects
Should be replaced when mounting module")
(defun parse-provider (provider-name)
(or (find provider-name (print *providers*) :key #'name :test #'string=)
(error "SALUTO: No such provider ~A" provider-name)))
(restas:define-route login-with ("goto/:provider/" :method :get)
; (:sift-variables (provider #'parse-provider))
(:additional-variables (redirect-uri (hunchentoot:parameter "redirect")))
;; This REDIRECT-URI means just target page after successful login
(let ((provider (parse-provider provider)))
(if (not (session))
(progn
(start-session)
(redirect
(make-goto-path provider
(session)
(or redirect-uri *main*)))
(redirect redirect-uri)))))
(restas:define-route receiver-route ("receiver/:provider/*states"
:method :get)
; (:sift-variables (provider #'parse-provider))
(:additional-variables
(state (hunchentoot:parameter "state"))
(code (hunchentoot:parameter "code"))
(error? (hunchentoot:parameter "error")))
(let ((provider (parse-provider provider)))
(receive provider
(or state (car states)) ;; It depends on provider, whether
;; it wants redirect URL to be
;; stable or uniq
code error?)))
(restas:define-route logout-route ("logout" :method :get)
(logout)
(redirect *main*))
## Instruction:
Synchronize with latest (warning!) RESTAS
## Code After:
(in-package #:saluto)
(defvar *providers* '()
"Variable, containing providers objects
Should be replaced when mounting module")
(defun parse-provider (provider-name)
(or (find provider-name *providers* :key #'name :test #'string=)
(error "SALUTO: No such provider ~A" provider-name)))
(restas:define-route login-with ("goto/:provider/" :method :get)
(:sift-variables (provider #'parse-provider))
(:additional-variables (redirect-uri (hunchentoot:parameter "redirect")))
;; This REDIRECT-URI means just target page after successful login
(if (not (session))
(progn
(start-session)
(redirect
(make-goto-path provider
(session)
(or redirect-uri *main*)))
(redirect redirect-uri))))
(restas:define-route receiver-route ("receiver/:provider/*states"
:method :get)
(:sift-variables (provider #'parse-provider))
(:additional-variables
(state (hunchentoot:parameter "state"))
(code (hunchentoot:parameter "code"))
(error? (hunchentoot:parameter "error")))
(receive provider
(or state (car states)) ;; It depends on provider, whether
;; it wants redirect URL to be
;; stable or uniq
code error?))
(restas:define-route logout-route ("logout" :method :get)
(logout)
(redirect *main*)) |
5ad6e1ed1fd3a40dcc25187b168b15022184db38 | partials/site-nav.hbs | partials/site-nav.hbs | <nav class="site-nav">
<div class="site-nav-left">
{{^is "home"}}
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
{{/is}}
{{#if @blog.navigation}}
{{navigation}}
{{/if}}
</div>
<div class="site-nav-right">
<div class="social-links">
{{#if @blog.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @blog.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#if @labs.subscribers}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{else}}
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@blog.url}}/rss/" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/if}}
</div>
</nav>
| <nav class="site-nav">
<div class="site-nav-left">
{{^is "home"}}
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
{{/is}}
{{#if @blog.navigation}}
{{navigation}}
{{/if}}
</div>
<div class="site-nav-right">
<div class="social-links">
{{#if @blog.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @blog.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#if @labs.subscribers}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{else}}
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@blog.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/if}}
</div>
</nav>
| Add titles to icon links | Add titles to icon links | Handlebars | mit | alvareztech/Casper,sawilde/Casper,matitalatina/Casper,TryGhost/Casper,Inchdev/blog-theme,russmckendrick/Casper,alvareztech/Casper,matitalatina/Casper,jedidja/Casper,eduardochiaro/Casper-Light,ErisDS/Casper,Mr-Zer0/yansnote,Inchdev/blog-theme,dlecina/StayPuft,eduardochiaro/Casper-Light,jedidja/Casper,Mr-Zer0/yansnote,ImKcat/ImKcatCasper,dlew/Casper,sawilde/Casper,eidolem/casper,dlecina/StayPuft,ErisDS/Casper,eidolem/casper | handlebars | ## Code Before:
<nav class="site-nav">
<div class="site-nav-left">
{{^is "home"}}
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
{{/is}}
{{#if @blog.navigation}}
{{navigation}}
{{/if}}
</div>
<div class="site-nav-right">
<div class="social-links">
{{#if @blog.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @blog.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#if @labs.subscribers}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{else}}
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@blog.url}}/rss/" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/if}}
</div>
</nav>
## Instruction:
Add titles to icon links
## Code After:
<nav class="site-nav">
<div class="site-nav-left">
{{^is "home"}}
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
{{/is}}
{{#if @blog.navigation}}
{{navigation}}
{{/if}}
</div>
<div class="site-nav-right">
<div class="social-links">
{{#if @blog.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @blog.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#if @labs.subscribers}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{else}}
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@blog.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/if}}
</div>
</nav>
|
3f3166c5c51705d04da43b05a1ba90560a33f75a | net.sockets/namedb/file-monitor.lisp | net.sockets/namedb/file-monitor.lisp | ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
;;;
;;; file-monitor.lisp --- Monitor files on disk.
;;;
(in-package :net.sockets)
(defclass file-monitor ()
((file :initform (error "Must supply a file name")
:initarg :file :accessor file-of)
(timestamp :initarg :timestamp :accessor timestamp-of)
(update-fn :initarg :update-fn :accessor update-fn-of)
(lock :initarg :lock :accessor lock-of))
(:default-initargs :timestamp 0))
(defmethod print-object ((monitor file-monitor) stream)
(print-unreadable-object (monitor stream :type nil :identity nil)
(format stream "File monitor for ~S" (file-of monitor))))
(defun monitor-oldp (monitor)
(declare (type file-monitor monitor))
(let ((mtime (file-write-date (file-of monitor))))
(values (< (timestamp-of monitor) mtime)
mtime)))
(defgeneric update-monitor (monitor)
(:method ((monitor file-monitor))
(bt:with-lock-held ((lock-of monitor))
(multiple-value-bind (oldp mtime) (monitor-oldp monitor)
(when oldp
(funcall (update-fn-of monitor) (file-of monitor))
(multiple-value-prog1
(values (timestamp-of monitor) mtime)
(setf (timestamp-of monitor) mtime)))))))
| ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
;;;
;;; file-monitor.lisp --- Monitor files on disk.
;;;
(in-package :net.sockets)
(defclass file-monitor ()
((file :initform (error "Must supply a file name")
:initarg :file :accessor file-of)
(timestamp :initarg :timestamp :accessor timestamp-of)
(update-fn :initarg :update-fn :accessor update-fn-of)
(lock :initarg :lock :accessor lock-of))
(:default-initargs :timestamp 0
:lock (bt:make-lock)))
(defmethod print-object ((monitor file-monitor) stream)
(print-unreadable-object (monitor stream :type nil :identity nil)
(format stream "File monitor for ~S" (file-of monitor))))
(defun monitor-oldp (monitor)
(declare (type file-monitor monitor))
(let ((mtime (file-write-date (file-of monitor))))
(values (< (timestamp-of monitor) mtime)
mtime)))
(defgeneric update-monitor (monitor)
(:method ((monitor file-monitor))
(bt:with-lock-held ((lock-of monitor))
(multiple-value-bind (oldp mtime) (monitor-oldp monitor)
(when oldp
(funcall (update-fn-of monitor) (file-of monitor))
(multiple-value-prog1
(values (timestamp-of monitor) mtime)
(setf (timestamp-of monitor) mtime)))))))
| Add default initarg to :LOCK of FILE-MONITOR class. | Add default initarg to :LOCK of FILE-MONITOR class.
| Common Lisp | mit | deadtrickster/iolib,lispnik/iolib,sionescu/iolib,vsedach/iolib-simple-mux,attila-lendvai/iolib,lispnik/iolib,sionescu/iolib,deadtrickster/iolib,shamazmazum/iolib,dkochmanski/iolib,attila-lendvai/iolib,attila-lendvai/iolib,deadtrickster/iolib,tiago4orion/iolib,sionescu/iolib,dkochmanski/iolib,tiago4orion/iolib,vsedach/iolib-simple-mux,lispnik/iolib,shamazmazum/iolib,shamazmazum/iolib,tiago4orion/iolib,dkochmanski/iolib | common-lisp | ## Code Before:
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
;;;
;;; file-monitor.lisp --- Monitor files on disk.
;;;
(in-package :net.sockets)
(defclass file-monitor ()
((file :initform (error "Must supply a file name")
:initarg :file :accessor file-of)
(timestamp :initarg :timestamp :accessor timestamp-of)
(update-fn :initarg :update-fn :accessor update-fn-of)
(lock :initarg :lock :accessor lock-of))
(:default-initargs :timestamp 0))
(defmethod print-object ((monitor file-monitor) stream)
(print-unreadable-object (monitor stream :type nil :identity nil)
(format stream "File monitor for ~S" (file-of monitor))))
(defun monitor-oldp (monitor)
(declare (type file-monitor monitor))
(let ((mtime (file-write-date (file-of monitor))))
(values (< (timestamp-of monitor) mtime)
mtime)))
(defgeneric update-monitor (monitor)
(:method ((monitor file-monitor))
(bt:with-lock-held ((lock-of monitor))
(multiple-value-bind (oldp mtime) (monitor-oldp monitor)
(when oldp
(funcall (update-fn-of monitor) (file-of monitor))
(multiple-value-prog1
(values (timestamp-of monitor) mtime)
(setf (timestamp-of monitor) mtime)))))))
## Instruction:
Add default initarg to :LOCK of FILE-MONITOR class.
## Code After:
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
;;;
;;; file-monitor.lisp --- Monitor files on disk.
;;;
(in-package :net.sockets)
(defclass file-monitor ()
((file :initform (error "Must supply a file name")
:initarg :file :accessor file-of)
(timestamp :initarg :timestamp :accessor timestamp-of)
(update-fn :initarg :update-fn :accessor update-fn-of)
(lock :initarg :lock :accessor lock-of))
(:default-initargs :timestamp 0
:lock (bt:make-lock)))
(defmethod print-object ((monitor file-monitor) stream)
(print-unreadable-object (monitor stream :type nil :identity nil)
(format stream "File monitor for ~S" (file-of monitor))))
(defun monitor-oldp (monitor)
(declare (type file-monitor monitor))
(let ((mtime (file-write-date (file-of monitor))))
(values (< (timestamp-of monitor) mtime)
mtime)))
(defgeneric update-monitor (monitor)
(:method ((monitor file-monitor))
(bt:with-lock-held ((lock-of monitor))
(multiple-value-bind (oldp mtime) (monitor-oldp monitor)
(when oldp
(funcall (update-fn-of monitor) (file-of monitor))
(multiple-value-prog1
(values (timestamp-of monitor) mtime)
(setf (timestamp-of monitor) mtime)))))))
|
ef4f1c3eee7c2fcbbb308d5cdc78019efb1c599e | app/views/bookmarks/edit.html.erb | app/views/bookmarks/edit.html.erb | <h1>Editing bookmark</h1>
<%= form_for @bookmark, :action => 'update' do |f| %>
<p>
<%= label_tag 'Title' %><br/>
<%= f.text_field :title %><br/><br/>
<%= label_tag 'Url' %><br/>
<%= f.text_field :url %><br/><br/>
<%= label_tag 'Description' %><br/>
<%= f.text_area :description %><br/>
</p>
<p>
<%= f.submit 'Update' %> |
<%= link_to 'Back', :action => 'list', :id => @bookmark.topic_id %>
</p>
<% end %> | <h1>Editing bookmark</h1>
<%= form_for @bookmark, :action => 'update' do |f| %>
<p>
<%= label_tag 'Title' %><br/>
<%= f.text_field :title, :required => true %><br/><br/>
<%= label_tag 'Url' %><br/>
<%= f.text_field :url, :required => true %><br/><br/>
<%= label_tag 'Description' %><br/>
<%= f.text_area :description, :required => true %><br/>
</p>
<p>
<%= f.submit 'Update' %> |
<%= link_to 'Back', :action => 'list', :id => @bookmark.topic_id %>
</p>
<% end %> | Check if all fields when editing bookmark are present | Check if all fields when editing bookmark are present
| HTML+ERB | mit | expertiza/expertiza,expertiza/expertiza,expertiza/expertiza,expertiza/expertiza | html+erb | ## Code Before:
<h1>Editing bookmark</h1>
<%= form_for @bookmark, :action => 'update' do |f| %>
<p>
<%= label_tag 'Title' %><br/>
<%= f.text_field :title %><br/><br/>
<%= label_tag 'Url' %><br/>
<%= f.text_field :url %><br/><br/>
<%= label_tag 'Description' %><br/>
<%= f.text_area :description %><br/>
</p>
<p>
<%= f.submit 'Update' %> |
<%= link_to 'Back', :action => 'list', :id => @bookmark.topic_id %>
</p>
<% end %>
## Instruction:
Check if all fields when editing bookmark are present
## Code After:
<h1>Editing bookmark</h1>
<%= form_for @bookmark, :action => 'update' do |f| %>
<p>
<%= label_tag 'Title' %><br/>
<%= f.text_field :title, :required => true %><br/><br/>
<%= label_tag 'Url' %><br/>
<%= f.text_field :url, :required => true %><br/><br/>
<%= label_tag 'Description' %><br/>
<%= f.text_area :description, :required => true %><br/>
</p>
<p>
<%= f.submit 'Update' %> |
<%= link_to 'Back', :action => 'list', :id => @bookmark.topic_id %>
</p>
<% end %> |
132b24894a8408dcfb51bd561246d00d225b9b65 | Package.swift | Package.swift | import PackageDescription
let package = Package(name: "slox")
| // swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "slox",
targets: [
.target(
name: "slox",
path: "slox"
)
]
)
| Update SPM package to latest format | Update SPM package to latest format
| Swift | mit | hashemi/slox,hashemi/slox | swift | ## Code Before:
import PackageDescription
let package = Package(name: "slox")
## Instruction:
Update SPM package to latest format
## Code After:
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "slox",
targets: [
.target(
name: "slox",
path: "slox"
)
]
)
|
435e8b6f48d3875b1df867c2a62773ed0c06502a | nodejs/public/css/header.css | nodejs/public/css/header.css | background:data-url(/images/structure/top_back.png) repeat-x top left;
height:45px;
position:fixed;
top:0px;
right:0px;
left:0px;
}
#toplinks {
float:right;
margin:5px 5px 0 0;
color:rgba(255,255,255,0.7);
margin-top:10px;
font-size:0.9em;
}
#toplinks a{
color:white;
}
#top #logo{
float: left;
margin:5px 20px 0px 5px;
color: rgba(255,255,255,0.8);
font-size:1.6em;
font-weight:700;
}
#logo a{
background: data-url(/images/logo/white_30.png) no-repeat center left;
padding-left: 38px;
text-decoration:none;
color: rgba(255,255,255,0.5);
}
#logo a img{
border:0;
vertical-align: top;
margin-right:10px;
}
#top .room_name{
font-size: 1.3em;
}
| background:data-url(/images/structure/top_back.png) repeat-x top left;
height:45px;
position:fixed;
top:0px;
right:0px;
left:0px;
z-index:1;
}
#toplinks {
float:right;
margin:5px 5px 0 0;
color:rgba(255,255,255,0.7);
margin-top:10px;
font-size:0.9em;
}
#toplinks a{
color:white;
}
#top #logo{
float: left;
margin:5px 20px 0px 5px;
color: rgba(255,255,255,0.8);
font-size:1.6em;
font-weight:700;
}
#logo a{
background: data-url(/images/logo/white_30.png) no-repeat center left;
padding-left: 38px;
text-decoration:none;
color: rgba(255,255,255,0.5);
}
#logo a img{
border:0;
vertical-align: top;
margin-right:10px;
}
#top .room_name{
font-size: 1.3em;
}
| Make Header have a z-index above the rest of the doc. | Make Header have a z-index above the rest of the doc.
| CSS | mit | Wompt/wompt.com,Wompt/wompt.com,iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com | css | ## Code Before:
background:data-url(/images/structure/top_back.png) repeat-x top left;
height:45px;
position:fixed;
top:0px;
right:0px;
left:0px;
}
#toplinks {
float:right;
margin:5px 5px 0 0;
color:rgba(255,255,255,0.7);
margin-top:10px;
font-size:0.9em;
}
#toplinks a{
color:white;
}
#top #logo{
float: left;
margin:5px 20px 0px 5px;
color: rgba(255,255,255,0.8);
font-size:1.6em;
font-weight:700;
}
#logo a{
background: data-url(/images/logo/white_30.png) no-repeat center left;
padding-left: 38px;
text-decoration:none;
color: rgba(255,255,255,0.5);
}
#logo a img{
border:0;
vertical-align: top;
margin-right:10px;
}
#top .room_name{
font-size: 1.3em;
}
## Instruction:
Make Header have a z-index above the rest of the doc.
## Code After:
background:data-url(/images/structure/top_back.png) repeat-x top left;
height:45px;
position:fixed;
top:0px;
right:0px;
left:0px;
z-index:1;
}
#toplinks {
float:right;
margin:5px 5px 0 0;
color:rgba(255,255,255,0.7);
margin-top:10px;
font-size:0.9em;
}
#toplinks a{
color:white;
}
#top #logo{
float: left;
margin:5px 20px 0px 5px;
color: rgba(255,255,255,0.8);
font-size:1.6em;
font-weight:700;
}
#logo a{
background: data-url(/images/logo/white_30.png) no-repeat center left;
padding-left: 38px;
text-decoration:none;
color: rgba(255,255,255,0.5);
}
#logo a img{
border:0;
vertical-align: top;
margin-right:10px;
}
#top .room_name{
font-size: 1.3em;
}
|
22476ba2fcdded7e3ee7d3f1ed323229d9a308ce | setup.py | setup.py | try:
from setuptools import setup
from setuptools.extension import Extension
except ImportError:
from distutils.core import setup, Extension
def main():
module = Extension('rrdtool',
sources=['rrdtoolmodule.c'],
include_dirs=['/usr/local/include'],
library_dirs=['/usr/local/lib'],
libraries=['rrd'])
kwargs = dict(
name='rrdtool',
version='0.1.7',
description='Python bindings for rrdtool',
keywords=['rrdtool'],
author='Christian Kroeger, Hye-Shik Chang',
author_email='commx@commx.ws',
license='LGPL',
url='https://github.com/commx/python-rrdtool',
ext_modules=[module],
test_suite="tests"
)
setup(**kwargs)
if __name__ == '__main__':
main()
| try:
from setuptools import setup
from setuptools.extension import Extension
except ImportError:
from distutils.core import setup, Extension
def main():
module = Extension('rrdtool',
sources=['rrdtoolmodule.h', 'rrdtoolmodule.c'],
include_dirs=['/usr/local/include'],
library_dirs=['/usr/local/lib'],
libraries=['rrd'])
kwargs = dict(
name='rrdtool',
version='0.1.7',
description='Python bindings for rrdtool',
keywords=['rrdtool'],
author='Christian Kroeger, Hye-Shik Chang',
author_email='commx@commx.ws',
license='LGPL',
url='https://github.com/commx/python-rrdtool',
ext_modules=[module],
test_suite="tests"
)
setup(**kwargs)
if __name__ == '__main__':
main()
| Add missing header file to the list of sources | Add missing header file to the list of sources | Python | lgpl-2.1 | commx/python-rrdtool,commx/python-rrdtool | python | ## Code Before:
try:
from setuptools import setup
from setuptools.extension import Extension
except ImportError:
from distutils.core import setup, Extension
def main():
module = Extension('rrdtool',
sources=['rrdtoolmodule.c'],
include_dirs=['/usr/local/include'],
library_dirs=['/usr/local/lib'],
libraries=['rrd'])
kwargs = dict(
name='rrdtool',
version='0.1.7',
description='Python bindings for rrdtool',
keywords=['rrdtool'],
author='Christian Kroeger, Hye-Shik Chang',
author_email='commx@commx.ws',
license='LGPL',
url='https://github.com/commx/python-rrdtool',
ext_modules=[module],
test_suite="tests"
)
setup(**kwargs)
if __name__ == '__main__':
main()
## Instruction:
Add missing header file to the list of sources
## Code After:
try:
from setuptools import setup
from setuptools.extension import Extension
except ImportError:
from distutils.core import setup, Extension
def main():
module = Extension('rrdtool',
sources=['rrdtoolmodule.h', 'rrdtoolmodule.c'],
include_dirs=['/usr/local/include'],
library_dirs=['/usr/local/lib'],
libraries=['rrd'])
kwargs = dict(
name='rrdtool',
version='0.1.7',
description='Python bindings for rrdtool',
keywords=['rrdtool'],
author='Christian Kroeger, Hye-Shik Chang',
author_email='commx@commx.ws',
license='LGPL',
url='https://github.com/commx/python-rrdtool',
ext_modules=[module],
test_suite="tests"
)
setup(**kwargs)
if __name__ == '__main__':
main()
|
9dc4e7c955b0252f1e5b0a89f2dc1cfbaf030088 | lib/cartodb/middleware/context/db-conn-setup.js | lib/cartodb/middleware/context/db-conn-setup.js | const _ = require('underscore');
module.exports = function dbConnSetup (pgConnection) {
return function dbConnSetupMiddleware (req, res, next) {
const { user } = res.locals;
pgConnection.setDBConn(user, res.locals, (err) => {
req.profiler.done('setDBConn');
if (err) {
if (err.message && -1 !== err.message.indexOf('name not found')) {
err.http_status = 404;
}
return next(err);
}
_.defaults(res.locals, {
dbuser: global.environment.postgres.user,
dbpassword: global.environment.postgres.password,
dbhost: global.environment.postgres.host,
dbport: global.environment.postgres.port
});
res.set('X-Served-By-DB-Host', res.locals.dbhost);
next();
});
};
};
| const _ = require('underscore');
module.exports = function dbConnSetup (pgConnection) {
return function dbConnSetupMiddleware (req, res, next) {
const { user } = res.locals;
pgConnection.setDBConn(user, res.locals, (err) => {
req.profiler.done('dbConnSetup');
if (err) {
if (err.message && -1 !== err.message.indexOf('name not found')) {
err.http_status = 404;
}
return next(err);
}
_.defaults(res.locals, {
dbuser: global.environment.postgres.user,
dbpassword: global.environment.postgres.password,
dbhost: global.environment.postgres.host,
dbport: global.environment.postgres.port
});
res.set('X-Served-By-DB-Host', res.locals.dbhost);
next();
});
};
};
| Use the right step name for profiling | Use the right step name for profiling
| JavaScript | bsd-3-clause | CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb | javascript | ## Code Before:
const _ = require('underscore');
module.exports = function dbConnSetup (pgConnection) {
return function dbConnSetupMiddleware (req, res, next) {
const { user } = res.locals;
pgConnection.setDBConn(user, res.locals, (err) => {
req.profiler.done('setDBConn');
if (err) {
if (err.message && -1 !== err.message.indexOf('name not found')) {
err.http_status = 404;
}
return next(err);
}
_.defaults(res.locals, {
dbuser: global.environment.postgres.user,
dbpassword: global.environment.postgres.password,
dbhost: global.environment.postgres.host,
dbport: global.environment.postgres.port
});
res.set('X-Served-By-DB-Host', res.locals.dbhost);
next();
});
};
};
## Instruction:
Use the right step name for profiling
## Code After:
const _ = require('underscore');
module.exports = function dbConnSetup (pgConnection) {
return function dbConnSetupMiddleware (req, res, next) {
const { user } = res.locals;
pgConnection.setDBConn(user, res.locals, (err) => {
req.profiler.done('dbConnSetup');
if (err) {
if (err.message && -1 !== err.message.indexOf('name not found')) {
err.http_status = 404;
}
return next(err);
}
_.defaults(res.locals, {
dbuser: global.environment.postgres.user,
dbpassword: global.environment.postgres.password,
dbhost: global.environment.postgres.host,
dbport: global.environment.postgres.port
});
res.set('X-Served-By-DB-Host', res.locals.dbhost);
next();
});
};
};
|
19e3c1263e9cb284b60d9658280cd9b50fbb916e | src/main/java/nl/homesensors/sensortag/SensorCode.java | src/main/java/nl/homesensors/sensortag/SensorCode.java | package nl.homesensors.sensortag;
import java.util.Objects;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
@RequiredArgsConstructor
public final class SensorCode {
@Getter
private final String value;
public static SensorCode of(final String value) {
return new SensorCode(value);
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final SensorCode that = (SensorCode) o;
return Objects.equals(value, that.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
@Override
public String toString() {
return new ToStringBuilder(this).append("value", value)
.toString();
}
}
| package nl.homesensors.sensortag;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
@RequiredArgsConstructor
@ToString
@EqualsAndHashCode
public final class SensorCode {
@Getter
private final String value;
public static SensorCode of(final String value) {
return new SensorCode(value);
}
}
| Replace custom ToString, Equals And HashCode with Lombok annotations | Replace custom ToString, Equals And HashCode with Lombok annotations
| Java | mit | bassages/home-sensors,bassages/home-sensors | java | ## Code Before:
package nl.homesensors.sensortag;
import java.util.Objects;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
@RequiredArgsConstructor
public final class SensorCode {
@Getter
private final String value;
public static SensorCode of(final String value) {
return new SensorCode(value);
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final SensorCode that = (SensorCode) o;
return Objects.equals(value, that.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
@Override
public String toString() {
return new ToStringBuilder(this).append("value", value)
.toString();
}
}
## Instruction:
Replace custom ToString, Equals And HashCode with Lombok annotations
## Code After:
package nl.homesensors.sensortag;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
@RequiredArgsConstructor
@ToString
@EqualsAndHashCode
public final class SensorCode {
@Getter
private final String value;
public static SensorCode of(final String value) {
return new SensorCode(value);
}
}
|
095a442fd961193045bc194710598b0e9f959dc9 | src/send-email.js | src/send-email.js | 'use strict';
const handelbars = require('handlebars');
const fs = require('fs');
const path = require('path');
const nodemailer = require('nodemailer');
require('env2')(`${__dirname}/../.env`);
// create reusable transporter object using the default SMTP transport
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.EMAIL,
pass: process.env.PASS
}
});
function sendMail(emailAddress, emailContent, cb){
const emailTemplate = fs.readFileSync(path.join(__dirname, '..', 'public', 'views', 'email.hbs'), 'utf8');
const template = handelbars.compile(emailTemplate);
const emailBody = template(emailContent);
const mailOptions = {
from: '"CAMHS 😀" <welcome.to.cahms@hotmail.co.uk>',
subject: 'Getting to know you Questionnaire',
text: 'Questionnaire',
html: emailBody,
to: emailAddress
};
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return cb(error)
}
return cb(null, `Message ${info.messageId} sent: ${info.response}`)
});
}
module.exports = sendMail;
| 'use strict';
const handelbars = require('handlebars');
const fs = require('fs');
const path = require('path');
const nodemailer = require('nodemailer');
require('env2')(`${__dirname}/../.env`);
// create reusable transporter object using the default SMTP transport
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.EMAIL,
pass: process.env.PASS
}
});
function sendMail(emailAddress, emailContent, cb){
const emailTemplate = fs.readFileSync(path.join(__dirname, '..', 'src', 'templates' ,'views', 'email.hbs'), 'utf8');
const template = handelbars.compile(emailTemplate);
const emailBody = template(emailContent);
const mailOptions = {
from: '"CAMHS 😀" <welcome.to.cahms@hotmail.co.uk>',
subject: 'Getting to know you Questionnaire',
text: 'Questionnaire',
html: emailBody,
to: emailAddress
};
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return cb(error)
}
return cb(null, `Message ${info.messageId} sent: ${info.response}`)
});
}
module.exports = sendMail;
| Fix path to emial.hbs in second-emial.js | Fix path to emial.hbs in second-emial.js
related #143
| JavaScript | mit | CYPIAPT-LNDSE/welcome-to-camhs,CYPIAPT-LNDSE/welcome-to-camhs | javascript | ## Code Before:
'use strict';
const handelbars = require('handlebars');
const fs = require('fs');
const path = require('path');
const nodemailer = require('nodemailer');
require('env2')(`${__dirname}/../.env`);
// create reusable transporter object using the default SMTP transport
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.EMAIL,
pass: process.env.PASS
}
});
function sendMail(emailAddress, emailContent, cb){
const emailTemplate = fs.readFileSync(path.join(__dirname, '..', 'public', 'views', 'email.hbs'), 'utf8');
const template = handelbars.compile(emailTemplate);
const emailBody = template(emailContent);
const mailOptions = {
from: '"CAMHS 😀" <welcome.to.cahms@hotmail.co.uk>',
subject: 'Getting to know you Questionnaire',
text: 'Questionnaire',
html: emailBody,
to: emailAddress
};
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return cb(error)
}
return cb(null, `Message ${info.messageId} sent: ${info.response}`)
});
}
module.exports = sendMail;
## Instruction:
Fix path to emial.hbs in second-emial.js
related #143
## Code After:
'use strict';
const handelbars = require('handlebars');
const fs = require('fs');
const path = require('path');
const nodemailer = require('nodemailer');
require('env2')(`${__dirname}/../.env`);
// create reusable transporter object using the default SMTP transport
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.EMAIL,
pass: process.env.PASS
}
});
function sendMail(emailAddress, emailContent, cb){
const emailTemplate = fs.readFileSync(path.join(__dirname, '..', 'src', 'templates' ,'views', 'email.hbs'), 'utf8');
const template = handelbars.compile(emailTemplate);
const emailBody = template(emailContent);
const mailOptions = {
from: '"CAMHS 😀" <welcome.to.cahms@hotmail.co.uk>',
subject: 'Getting to know you Questionnaire',
text: 'Questionnaire',
html: emailBody,
to: emailAddress
};
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return cb(error)
}
return cb(null, `Message ${info.messageId} sent: ${info.response}`)
});
}
module.exports = sendMail;
|
0f5084813687ee6a0df9b5cf03b85639a9020aaa | packages/au/automotive-cse.yaml | packages/au/automotive-cse.yaml | homepage: ''
changelog-type: ''
hash: 2b86e1ce199caec364776d7d23ec9ee3cce7aa81d5e5b26e47460f06fa8cb00b
test-bench-deps:
bytestring: -any
base: <5
automotive-cse: -any
cryptonite: -any
quickcheck-simple: -any
maintainer: ex8k.hibino@gmail.com
synopsis: Automotive CSE emulation
changelog: ''
basic-deps:
cereal: -any
bytestring: -any
base: ! '>=4.6 && <5'
memory: -any
cryptonite: -any
all-versions:
- '0.0.1.0'
author: Kei Hibino
latest: '0.0.1.0'
description-type: haddock
description: ! 'This package includes Cryptography Security Engine (CSE)
codec emulation for automotive things.'
license-name: BSD3
| homepage: ''
changelog-type: ''
hash: f2504a753b87a8eb14ad04ab84a61b3c953568f734f1badc7fc9424aa55207bf
test-bench-deps:
bytestring: -any
base: <5
automotive-cse: -any
cryptonite: -any
quickcheck-simple: -any
maintainer: ex8k.hibino@gmail.com
synopsis: Automotive CSE emulation
changelog: ''
basic-deps:
cereal: -any
bytestring: -any
base: ! '>=4.6 && <5'
memory: -any
cryptonite: -any
all-versions:
- '0.0.1.0'
- '0.0.1.1'
author: Kei Hibino
latest: '0.0.1.1'
description-type: haddock
description: ! 'This package includes Cryptography Security Engine (CSE)
codec emulation for automotive things.
Porting logics from <https://github.com/naohaq/CSE_KeyGen/tree/master/Erlang>.
Reference documents:
<http://cache.freescale.com/files/32bit/doc/app_note/AN4234.pdf>
<http://cache.freescale.com/files/microcontrollers/doc/app_note/AN5178.pdf>
<http://www.st.com/web/en/resource/technical/document/application_note/DM00075575.pdf>'
license-name: BSD3
| Update from Hackage at 2016-04-12T02:41:04+0000 | Update from Hackage at 2016-04-12T02:41:04+0000
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: 2b86e1ce199caec364776d7d23ec9ee3cce7aa81d5e5b26e47460f06fa8cb00b
test-bench-deps:
bytestring: -any
base: <5
automotive-cse: -any
cryptonite: -any
quickcheck-simple: -any
maintainer: ex8k.hibino@gmail.com
synopsis: Automotive CSE emulation
changelog: ''
basic-deps:
cereal: -any
bytestring: -any
base: ! '>=4.6 && <5'
memory: -any
cryptonite: -any
all-versions:
- '0.0.1.0'
author: Kei Hibino
latest: '0.0.1.0'
description-type: haddock
description: ! 'This package includes Cryptography Security Engine (CSE)
codec emulation for automotive things.'
license-name: BSD3
## Instruction:
Update from Hackage at 2016-04-12T02:41:04+0000
## Code After:
homepage: ''
changelog-type: ''
hash: f2504a753b87a8eb14ad04ab84a61b3c953568f734f1badc7fc9424aa55207bf
test-bench-deps:
bytestring: -any
base: <5
automotive-cse: -any
cryptonite: -any
quickcheck-simple: -any
maintainer: ex8k.hibino@gmail.com
synopsis: Automotive CSE emulation
changelog: ''
basic-deps:
cereal: -any
bytestring: -any
base: ! '>=4.6 && <5'
memory: -any
cryptonite: -any
all-versions:
- '0.0.1.0'
- '0.0.1.1'
author: Kei Hibino
latest: '0.0.1.1'
description-type: haddock
description: ! 'This package includes Cryptography Security Engine (CSE)
codec emulation for automotive things.
Porting logics from <https://github.com/naohaq/CSE_KeyGen/tree/master/Erlang>.
Reference documents:
<http://cache.freescale.com/files/32bit/doc/app_note/AN4234.pdf>
<http://cache.freescale.com/files/microcontrollers/doc/app_note/AN5178.pdf>
<http://www.st.com/web/en/resource/technical/document/application_note/DM00075575.pdf>'
license-name: BSD3
|
dbd5d56fe2fa39c89d063bfbbf0f0fdfedae8168 | packages/lesswrong/server/mapsUtils.js | packages/lesswrong/server/mapsUtils.js | import { getSetting } from 'meteor/vulcan:core';
import googleMaps from '@google/maps'
const googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)
let googleMapsClient = null
if (googleMapsApiKey) {
googleMapsClient = googleMaps.createClient({
key: googleMapsApiKey,
Promise: Promise
});
} else {
// eslint-disable-next-line no-console
console.log("No Google maps API key provided, please provide one for proper geocoding")
}
export async function getLocalTime(time, googleLocation) {
try {
const { geometry: { location } } = googleLocation
const apiResponse = await googleMapsClient.timezone({location, timestamp: new Date(time)}).asPromise()
const { json: { dstOffset, rawOffset } } = apiResponse //dstOffset and rawOffset are in the unit of seconds
const localTimestamp = new Date(time).getTime() + ((dstOffset + rawOffset)*1000) // Translate seconds to milliseconds
return new Date(localTimestamp)
} catch(err) {
// eslint-disable-next-line no-console
console.error("Error in getting local time:", err)
throw err
}
}
| import { getSetting } from 'meteor/vulcan:core';
import googleMaps from '@google/maps'
const googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)
let googleMapsClient = null
if (googleMapsApiKey) {
googleMapsClient = googleMaps.createClient({
key: googleMapsApiKey,
Promise: Promise
});
} else {
// eslint-disable-next-line no-console
console.log("No Server-side Google maps API key provided, please provide one for proper timezone handling")
}
export async function getLocalTime(time, googleLocation) {
if (!googleMapsClient) {
// eslint-disable-next-line no-console
console.log("No Server-side Google Maps API key provided, can't resolve local time")
return null
}
try {
const { geometry: { location } } = googleLocation
const apiResponse = await googleMapsClient.timezone({location, timestamp: new Date(time)}).asPromise()
const { json: { dstOffset, rawOffset } } = apiResponse //dstOffset and rawOffset are in the unit of seconds
const localTimestamp = new Date(time).getTime() + ((dstOffset + rawOffset)*1000) // Translate seconds to milliseconds
return new Date(localTimestamp)
} catch(err) {
// eslint-disable-next-line no-console
console.error("Error in getting local time:", err)
throw err
}
}
| Improve error handling without API key | Improve error handling without API key
| JavaScript | mit | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope | javascript | ## Code Before:
import { getSetting } from 'meteor/vulcan:core';
import googleMaps from '@google/maps'
const googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)
let googleMapsClient = null
if (googleMapsApiKey) {
googleMapsClient = googleMaps.createClient({
key: googleMapsApiKey,
Promise: Promise
});
} else {
// eslint-disable-next-line no-console
console.log("No Google maps API key provided, please provide one for proper geocoding")
}
export async function getLocalTime(time, googleLocation) {
try {
const { geometry: { location } } = googleLocation
const apiResponse = await googleMapsClient.timezone({location, timestamp: new Date(time)}).asPromise()
const { json: { dstOffset, rawOffset } } = apiResponse //dstOffset and rawOffset are in the unit of seconds
const localTimestamp = new Date(time).getTime() + ((dstOffset + rawOffset)*1000) // Translate seconds to milliseconds
return new Date(localTimestamp)
} catch(err) {
// eslint-disable-next-line no-console
console.error("Error in getting local time:", err)
throw err
}
}
## Instruction:
Improve error handling without API key
## Code After:
import { getSetting } from 'meteor/vulcan:core';
import googleMaps from '@google/maps'
const googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)
let googleMapsClient = null
if (googleMapsApiKey) {
googleMapsClient = googleMaps.createClient({
key: googleMapsApiKey,
Promise: Promise
});
} else {
// eslint-disable-next-line no-console
console.log("No Server-side Google maps API key provided, please provide one for proper timezone handling")
}
export async function getLocalTime(time, googleLocation) {
if (!googleMapsClient) {
// eslint-disable-next-line no-console
console.log("No Server-side Google Maps API key provided, can't resolve local time")
return null
}
try {
const { geometry: { location } } = googleLocation
const apiResponse = await googleMapsClient.timezone({location, timestamp: new Date(time)}).asPromise()
const { json: { dstOffset, rawOffset } } = apiResponse //dstOffset and rawOffset are in the unit of seconds
const localTimestamp = new Date(time).getTime() + ((dstOffset + rawOffset)*1000) // Translate seconds to milliseconds
return new Date(localTimestamp)
} catch(err) {
// eslint-disable-next-line no-console
console.error("Error in getting local time:", err)
throw err
}
}
|
74358e3b0d30fd272ae892b97f852e62e65c3512 | docs/index.html | docs/index.html | <!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>Vue-resize-split-pane Live Demo</title>
<link href=./static/css/app.7ed936c5c5a943b1c248f98676e0dc8b.css rel=stylesheet>
</head>
<body>
<div id=app></div>
<script type=text/javascript src=./static/js/manifest.2ae2e69a05c33dfc65f8.js></script>
<script type=text/javascript src=./static/js/vendor.26bcacf8095df2aa5718.js></script>
<script type=text/javascript src=./static/js/app.904e58768218181808d8.js></script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>Vue-resize-split-pane live demo</title>
<link href=/static/css/app.409ed9599efef57ba1e76b462e5f6bb6.css rel=stylesheet>
</head>
<body>
<div id=app></div>
<script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script>
<script type=text/javascript src=/static/js/vendor.26bcacf8095df2aa5718.js></script>
<script type=text/javascript src=/static/js/app.14a5de66c01c60f80d01.js></script>
</body>
</html>
| Add some description and additional styles. | Add some description and additional styles. | HTML | mit | raven78/vue-resize-split-pane | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>Vue-resize-split-pane Live Demo</title>
<link href=./static/css/app.7ed936c5c5a943b1c248f98676e0dc8b.css rel=stylesheet>
</head>
<body>
<div id=app></div>
<script type=text/javascript src=./static/js/manifest.2ae2e69a05c33dfc65f8.js></script>
<script type=text/javascript src=./static/js/vendor.26bcacf8095df2aa5718.js></script>
<script type=text/javascript src=./static/js/app.904e58768218181808d8.js></script>
</body>
</html>
## Instruction:
Add some description and additional styles.
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width,initial-scale=1">
<title>Vue-resize-split-pane live demo</title>
<link href=/static/css/app.409ed9599efef57ba1e76b462e5f6bb6.css rel=stylesheet>
</head>
<body>
<div id=app></div>
<script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script>
<script type=text/javascript src=/static/js/vendor.26bcacf8095df2aa5718.js></script>
<script type=text/javascript src=/static/js/app.14a5de66c01c60f80d01.js></script>
</body>
</html>
|
e178bbff983597720b026ee2e660e9c8da53fda6 | README.md | README.md |
My configuration files
|

| Add screenshot of how it looks in arch with sway | Add screenshot of how it looks in arch with sway
Fixes #6 | Markdown | mit | caulagi/dotfiles,caulagi/dotfiles | markdown | ## Code Before:
My configuration files
## Instruction:
Add screenshot of how it looks in arch with sway
Fixes #6
## Code After:

|
812910a3916d73e4728bc483312bebe900b1d99c | lib/wrapper.js | lib/wrapper.js | 'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = new RegExp(/require\("angula[^']+"\)[,;]/g)
// , rexModule = new RegExp(/\(.*?\)/)
, requires = []
, self = this;
requires = requires.concat(buf.match(rexSingle));
requires = requires.concat(buf.match(rexDouble));
async.eachSeries(requires, function (req, callback) {
if (req === null) {
return callback();
}
var modVer = req
.replace('require(', '')
.replace(/\)[,;]/, '')
.replace(/\'|\"/g, '')
.split('@');
loader.getModule(modVer[0], modVer[1], function (err, module) {
// JavaScript String.replace gives unexpected result with $ chars
// replace these temporarily...
module = module.replace(/\$/g, '_');
// Insert angular
buf = buf.replace(req, module);
// Now insert the $ chars again...
buf = buf.replace(/_/, '$');
callback();
});
}, function (err) {
if (err) {
throw err;
}
self.queue(buf);
self.queue(null);
});
});
}
module.exports = angularify;
| 'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = new RegExp(/require\("angula[^']+"\)[,;]/g)
// , rexModule = new RegExp(/\(.*?\)/)
, requires = []
, self = this;
requires = requires.concat(buf.match(rexSingle));
requires = requires.concat(buf.match(rexDouble));
async.eachSeries(requires, function (req, callback) {
if (req === null) {
return callback();
}
var modVer = req
.replace('require(', '')
.replace(/\)[,;]/, '')
.replace(/\'|\"/g, '')
.split('@');
loader.getModule(modVer[0], modVer[1], function (err, module) {
module += 'module.exports = window.angular';
// JavaScript String.replace gives unexpected result with $ chars
// replace these temporarily...
module = module.replace(/\$/g, '_DOLLARBANG_');
// Insert angular
buf = buf.replace(req, module);
// Now insert the $ chars again...
buf = buf.replace(/_DOLLARBANG_/g, '$');
callback();
});
}, function (err) {
if (err) {
throw err;
}
self.queue(buf);
self.queue(null);
});
});
}
module.exports = angularify;
| Fix dollar sign issue in angular injection | Fix dollar sign issue in angular injection
| JavaScript | mit | evanshortiss/angularify | javascript | ## Code Before:
'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = new RegExp(/require\("angula[^']+"\)[,;]/g)
// , rexModule = new RegExp(/\(.*?\)/)
, requires = []
, self = this;
requires = requires.concat(buf.match(rexSingle));
requires = requires.concat(buf.match(rexDouble));
async.eachSeries(requires, function (req, callback) {
if (req === null) {
return callback();
}
var modVer = req
.replace('require(', '')
.replace(/\)[,;]/, '')
.replace(/\'|\"/g, '')
.split('@');
loader.getModule(modVer[0], modVer[1], function (err, module) {
// JavaScript String.replace gives unexpected result with $ chars
// replace these temporarily...
module = module.replace(/\$/g, '_');
// Insert angular
buf = buf.replace(req, module);
// Now insert the $ chars again...
buf = buf.replace(/_/, '$');
callback();
});
}, function (err) {
if (err) {
throw err;
}
self.queue(buf);
self.queue(null);
});
});
}
module.exports = angularify;
## Instruction:
Fix dollar sign issue in angular injection
## Code After:
'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = new RegExp(/require\("angula[^']+"\)[,;]/g)
// , rexModule = new RegExp(/\(.*?\)/)
, requires = []
, self = this;
requires = requires.concat(buf.match(rexSingle));
requires = requires.concat(buf.match(rexDouble));
async.eachSeries(requires, function (req, callback) {
if (req === null) {
return callback();
}
var modVer = req
.replace('require(', '')
.replace(/\)[,;]/, '')
.replace(/\'|\"/g, '')
.split('@');
loader.getModule(modVer[0], modVer[1], function (err, module) {
module += 'module.exports = window.angular';
// JavaScript String.replace gives unexpected result with $ chars
// replace these temporarily...
module = module.replace(/\$/g, '_DOLLARBANG_');
// Insert angular
buf = buf.replace(req, module);
// Now insert the $ chars again...
buf = buf.replace(/_DOLLARBANG_/g, '$');
callback();
});
}, function (err) {
if (err) {
throw err;
}
self.queue(buf);
self.queue(null);
});
});
}
module.exports = angularify;
|
17952255dba99cf2515b610be0bbd44df3892a57 | indico/modules/events/registration/templates/display/participant_list.html | indico/modules/events/registration/templates/display/participant_list.html | {% extends 'events/registration/display/_event_registration_base.html' %}
{% block title %}
{% trans %}Participant List{% endtrans %}
{% endblock %}
{% block content %}
<div class="registrations">
<table class="i-table tablesorter">
<thead>
<tr class="i-table">
<th class="i-table">{% trans %}Full name{% endtrans %}</th>
{% if show_affiliation %}
<th class="i-table">{% trans %}Affiliation{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for name, affiliation in registrations %}
<tr class="i-table">
<td class="i-table">{{ name }}</td>
{% if show_affiliation %}
<td class="i-table">{{ affiliation or '' }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
| {% extends 'events/registration/display/_event_registration_base.html' %}
{% block title %}
{% trans %}Participant List{% endtrans %}
{% endblock %}
{% block subtitle %}
{% set count = registrations | length %}
{% if count > 1 %}
{%- trans %}{{ count }} participants{% endtrans -%}
{% endif %}
{% endblock %}
{% block content %}
<div class="registrations">
<table class="i-table tablesorter">
<thead>
<tr class="i-table">
<th class="i-table">{% trans %}Full name{% endtrans %}</th>
{% if show_affiliation %}
<th class="i-table">{% trans %}Affiliation{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for name, affiliation in registrations %}
<tr class="i-table">
<td class="i-table">{{ name }}</td>
{% if show_affiliation %}
<td class="i-table">{{ affiliation or '' }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
| Add number of registrations in participants list | Add number of registrations in participants list
| HTML | mit | ThiefMaster/indico,pferreir/indico,indico/indico,pferreir/indico,pferreir/indico,ThiefMaster/indico,mic4ael/indico,OmeGak/indico,mvidalgarcia/indico,mic4ael/indico,pferreir/indico,DirkHoffmann/indico,DirkHoffmann/indico,mvidalgarcia/indico,DirkHoffmann/indico,OmeGak/indico,mic4ael/indico,OmeGak/indico,DirkHoffmann/indico,indico/indico,OmeGak/indico,mvidalgarcia/indico,ThiefMaster/indico,mvidalgarcia/indico,ThiefMaster/indico,mic4ael/indico,indico/indico,indico/indico | html | ## Code Before:
{% extends 'events/registration/display/_event_registration_base.html' %}
{% block title %}
{% trans %}Participant List{% endtrans %}
{% endblock %}
{% block content %}
<div class="registrations">
<table class="i-table tablesorter">
<thead>
<tr class="i-table">
<th class="i-table">{% trans %}Full name{% endtrans %}</th>
{% if show_affiliation %}
<th class="i-table">{% trans %}Affiliation{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for name, affiliation in registrations %}
<tr class="i-table">
<td class="i-table">{{ name }}</td>
{% if show_affiliation %}
<td class="i-table">{{ affiliation or '' }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
## Instruction:
Add number of registrations in participants list
## Code After:
{% extends 'events/registration/display/_event_registration_base.html' %}
{% block title %}
{% trans %}Participant List{% endtrans %}
{% endblock %}
{% block subtitle %}
{% set count = registrations | length %}
{% if count > 1 %}
{%- trans %}{{ count }} participants{% endtrans -%}
{% endif %}
{% endblock %}
{% block content %}
<div class="registrations">
<table class="i-table tablesorter">
<thead>
<tr class="i-table">
<th class="i-table">{% trans %}Full name{% endtrans %}</th>
{% if show_affiliation %}
<th class="i-table">{% trans %}Affiliation{% endtrans %}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for name, affiliation in registrations %}
<tr class="i-table">
<td class="i-table">{{ name }}</td>
{% if show_affiliation %}
<td class="i-table">{{ affiliation or '' }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
|
978d400530cb4d92c94c8a08b7fbd6ff3e6e30e7 | installer/frontend/components/tooltip.jsx | installer/frontend/components/tooltip.jsx | import React from 'react';
import _ from 'lodash';
export const Tooltip = ({children}) => <span className="tooltip">{children}</span>;
/**
* Component for injecting tooltips into anything. Can be used in two ways:
*
* 1:
* <WithTooltip>
* <button>
* Click me?
* <Tooltip>
* Click the button!
* </Tooltip>
* </button>
* </WithTooltip>
*
* and 2:
* <WithTooltip text="Click the button!">
* <button>
* Click me?
* </button>
* </WithTooltip>
*
* Both of these examples will produce the same effect. The first method is
* more generic and allows us to separate the hover area from the tooltip
* location.
*/
export const WithTooltip = props => {
const {children, shouldShow = true, generateText} = props;
const text = generateText ? generateText(props) : props.text;
const onlyChild = React.Children.only(children);
const nextProps = _.assign({}, _.omit(props, 'children', 'shouldShow', 'generateText', 'text'), onlyChild.props);
const newChild = React.cloneElement(onlyChild, nextProps);
// If there is no text, then assume the tooltip is already nested.
const tooltip = typeof text === 'string' && shouldShow && <Tooltip>{text}</Tooltip>;
// Use a wrapping div so that the tooltip will work even if the child
// element's pointer-events property is "none".
return <div className="withtooltip" style={{display: 'inline-block'}}>
{newChild}
{tooltip}
</div>;
};
| import React from 'react';
export const Tooltip = ({children}) => <span className="tooltip">{children}</span>;
/**
* Component for injecting tooltips into anything. Can be used in two ways:
*
* 1:
* <WithTooltip>
* <button>
* Click me?
* <Tooltip>
* Click the button!
* </Tooltip>
* </button>
* </WithTooltip>
*
* and 2:
* <WithTooltip text="Click the button!">
* <button>
* Click me?
* </button>
* </WithTooltip>
*
* Both of these examples will produce the same effect. The first method is
* more generic and allows us to separate the hover area from the tooltip
* location.
*/
export const WithTooltip = props => {
const {children, shouldShow = true, generateText} = props;
const text = generateText ? generateText(props) : props.text;
// If there is no text, then assume the tooltip is already nested.
const tooltip = typeof text === 'string' && shouldShow && <Tooltip>{text}</Tooltip>;
// Use a wrapping div so that the tooltip will work even if a child element's
// pointer-events property is "none".
return <div className="withtooltip" style={{display: 'inline-block'}}>
{children}
{tooltip}
</div>;
};
| Allow WithTooltip to have multiple children | frontend: Allow WithTooltip to have multiple children
| JSX | apache-2.0 | squat/tectonic-installer,lander2k2/tectonic-installer,hhoover/tectonic-installer,hhoover/tectonic-installer,squat/tectonic-installer,zbwright/tectonic-installer,AduroIdeja/tectonic-installer,s-urbaniak/tectonic-installer,coreos/tectonic-installer,erjohnso/tectonic-installer,bsiegel/tectonic-installer,joshrosso/tectonic-installer,rithujohn191/tectonic-installer,lander2k2/tectonic-installer,mxinden/tectonic-installer,yifan-gu/tectonic-installer,joshix/tectonic-installer,aknuds1/tectonic-installer,bsiegel/tectonic-installer,mrwacky42/tectonic-installer,everett-toews/tectonic-installer,colemickens/tectonic-installer,bsiegel/tectonic-installer,zbwright/tectonic-installer,derekhiggins/installer,hhoover/tectonic-installer,rithujohn191/tectonic-installer,coreos/tectonic-installer,yifan-gu/tectonic-installer,erjohnso/tectonic-installer,AduroIdeja/tectonic-installer,aknuds1/tectonic-installer,s-urbaniak/tectonic-installer,metral/tectonic-installer,mxinden/tectonic-installer,AduroIdeja/tectonic-installer,kyoto/tectonic-installer,mxinden/tectonic-installer,enxebre/tectonic-installer,yifan-gu/tectonic-installer,cpanato/tectonic-installer,justaugustus/tectonic-installer,metral/tectonic-installer,mrwacky42/tectonic-installer,bsiegel/tectonic-installer,colemickens/tectonic-installer,joshix/tectonic-installer,AduroIdeja/tectonic-installer,aknuds1/tectonic-installer,alexsomesan/tectonic-installer,joshix/tectonic-installer,yifan-gu/tectonic-installer,everett-toews/tectonic-installer,mxinden/tectonic-installer,zbwright/tectonic-installer,alexsomesan/tectonic-installer,rithujohn191/tectonic-installer,kyoto/tectonic-installer,metral/tectonic-installer,lander2k2/tectonic-installer,rithujohn191/tectonic-installer,alexsomesan/tectonic-installer,radhikapc/tectonic-installer,AduroIdeja/tectonic-installer,erjohnso/tectonic-installer,radhikapc/tectonic-installer,kalmog/tectonic-installer,enxebre/tectonic-installer,mrwacky42/tectonic-installer,zbwright/tectonic-installer,s-urbaniak/tectonic-installer,alexsomesan/tectonic-installer,everett-toews/tectonic-installer,s-urbaniak/tectonic-installer,justaugustus/tectonic-installer,justaugustus/tectonic-installer,metral/tectonic-installer,cpanato/tectonic-installer,hhoover/tectonic-installer,aknuds1/tectonic-installer,kyoto/tectonic-installer,mrwacky42/tectonic-installer,cpanato/tectonic-installer,zbwright/tectonic-installer,coreos/tectonic-installer,hhoover/tectonic-installer,alexsomesan/tectonic-installer,rithujohn191/tectonic-installer,enxebre/tectonic-installer,derekhiggins/installer,cpanato/tectonic-installer,mrwacky42/tectonic-installer,kalmog/tectonic-installer,kalmog/tectonic-installer,lander2k2/tectonic-installer,enxebre/tectonic-installer,joshrosso/tectonic-installer,kyoto/tectonic-installer,coreos/tectonic-installer,squat/tectonic-installer,joshix/tectonic-installer,joshix/tectonic-installer,enxebre/tectonic-installer,everett-toews/tectonic-installer,erjohnso/tectonic-installer,everett-toews/tectonic-installer,colemickens/tectonic-installer,coreos/tectonic-installer,kyoto/tectonic-installer,joshrosso/tectonic-installer,justaugustus/tectonic-installer,joshrosso/tectonic-installer,colemickens/tectonic-installer,radhikapc/tectonic-installer,squat/tectonic-installer,s-urbaniak/tectonic-installer,radhikapc/tectonic-installer,yifan-gu/tectonic-installer,metral/tectonic-installer,aknuds1/tectonic-installer,bsiegel/tectonic-installer,colemickens/tectonic-installer,joshrosso/tectonic-installer,justaugustus/tectonic-installer | jsx | ## Code Before:
import React from 'react';
import _ from 'lodash';
export const Tooltip = ({children}) => <span className="tooltip">{children}</span>;
/**
* Component for injecting tooltips into anything. Can be used in two ways:
*
* 1:
* <WithTooltip>
* <button>
* Click me?
* <Tooltip>
* Click the button!
* </Tooltip>
* </button>
* </WithTooltip>
*
* and 2:
* <WithTooltip text="Click the button!">
* <button>
* Click me?
* </button>
* </WithTooltip>
*
* Both of these examples will produce the same effect. The first method is
* more generic and allows us to separate the hover area from the tooltip
* location.
*/
export const WithTooltip = props => {
const {children, shouldShow = true, generateText} = props;
const text = generateText ? generateText(props) : props.text;
const onlyChild = React.Children.only(children);
const nextProps = _.assign({}, _.omit(props, 'children', 'shouldShow', 'generateText', 'text'), onlyChild.props);
const newChild = React.cloneElement(onlyChild, nextProps);
// If there is no text, then assume the tooltip is already nested.
const tooltip = typeof text === 'string' && shouldShow && <Tooltip>{text}</Tooltip>;
// Use a wrapping div so that the tooltip will work even if the child
// element's pointer-events property is "none".
return <div className="withtooltip" style={{display: 'inline-block'}}>
{newChild}
{tooltip}
</div>;
};
## Instruction:
frontend: Allow WithTooltip to have multiple children
## Code After:
import React from 'react';
export const Tooltip = ({children}) => <span className="tooltip">{children}</span>;
/**
* Component for injecting tooltips into anything. Can be used in two ways:
*
* 1:
* <WithTooltip>
* <button>
* Click me?
* <Tooltip>
* Click the button!
* </Tooltip>
* </button>
* </WithTooltip>
*
* and 2:
* <WithTooltip text="Click the button!">
* <button>
* Click me?
* </button>
* </WithTooltip>
*
* Both of these examples will produce the same effect. The first method is
* more generic and allows us to separate the hover area from the tooltip
* location.
*/
export const WithTooltip = props => {
const {children, shouldShow = true, generateText} = props;
const text = generateText ? generateText(props) : props.text;
// If there is no text, then assume the tooltip is already nested.
const tooltip = typeof text === 'string' && shouldShow && <Tooltip>{text}</Tooltip>;
// Use a wrapping div so that the tooltip will work even if a child element's
// pointer-events property is "none".
return <div className="withtooltip" style={{display: 'inline-block'}}>
{children}
{tooltip}
</div>;
};
|
7f9c9a27bed71df698480c936ebd058ead670a19 | app/models/User.php | app/models/User.php | <?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
class User extends Eloquent implements UserInterface{
// This is used for password authentication, recovery etc which we don't need.
// Only using this because Auth::login won't work otherwise.
use UserTrait;
protected $fillable = ['phid', 'username'];
public function setRememberToken($token) {
// Workaround: Auth::logout breaks with the default behavior since we're using OAuth.
}
}
| <?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Phragile\Providers\PhabricatorAPI;
class User extends Eloquent implements UserInterface {
// This is used for password authentication, recovery etc which we don't need.
// Only using this because Auth::login won't work otherwise.
use UserTrait;
protected $fillable = ['phid', 'username'];
public function setRememberToken($token) {
// Workaround: Auth::logout breaks with the default behavior since we're using OAuth.
}
public function certificateValid($certificate)
{
try
{
$phabricator = new PhabricatorAPI(new ConduitClient($_ENV['PHABRICATOR_URL']));
$phabricator->connect($this->username, $certificate);
} catch (ConduitClientException $e)
{
return false;
}
return true;
}
}
| Add method to check the validity of a conduit certificate. | Add method to check the validity of a conduit certificate.
| PHP | apache-2.0 | christopher-johnson/phabricator,christopher-johnson/phabricator,christopher-johnson/phabricator,christopher-johnson/phabricator,christopher-johnson/phabricator | php | ## Code Before:
<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
class User extends Eloquent implements UserInterface{
// This is used for password authentication, recovery etc which we don't need.
// Only using this because Auth::login won't work otherwise.
use UserTrait;
protected $fillable = ['phid', 'username'];
public function setRememberToken($token) {
// Workaround: Auth::logout breaks with the default behavior since we're using OAuth.
}
}
## Instruction:
Add method to check the validity of a conduit certificate.
## Code After:
<?php
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Phragile\Providers\PhabricatorAPI;
class User extends Eloquent implements UserInterface {
// This is used for password authentication, recovery etc which we don't need.
// Only using this because Auth::login won't work otherwise.
use UserTrait;
protected $fillable = ['phid', 'username'];
public function setRememberToken($token) {
// Workaround: Auth::logout breaks with the default behavior since we're using OAuth.
}
public function certificateValid($certificate)
{
try
{
$phabricator = new PhabricatorAPI(new ConduitClient($_ENV['PHABRICATOR_URL']));
$phabricator->connect($this->username, $certificate);
} catch (ConduitClientException $e)
{
return false;
}
return true;
}
}
|
f44a32ae5f106d8ba8751efe000b5bd180278ba2 | data/transition-sites/hca.yml | data/transition-sites/hca.yml | ---
site: hca
whitehall_slug: homes-and-communities-agency
title: Homes and Communities Agency
redirection_date: 1st July 2014
homepage: https://www.gov.uk/government/organisations/homes-and-communities-agency
tna_timestamp: 20140327123736
host: www.homesandcommunities.co.uk
furl: www.gov.uk/hca
aliases:
- homesandcommunities.co.uk
# options: --query-string qstring1:qstring2:qstring3 # This site has not had full query string parameter analysis
| ---
site: hca
whitehall_slug: homes-and-communities-agency
title: Homes and Communities Agency
redirection_date: 1st July 2014
homepage: https://www.gov.uk/government/organisations/homes-and-communities-agency
tna_timestamp: 20140327123736
host: www.homesandcommunities.co.uk
furl: www.gov.uk/hca
aliases:
- homesandcommunities.co.uk
options: --query-string page_id:page
| Add relevant query strings determined from arcl | Add relevant query strings determined from arcl
| YAML | mit | alphagov/transition-config,alphagov/transition-config | yaml | ## Code Before:
---
site: hca
whitehall_slug: homes-and-communities-agency
title: Homes and Communities Agency
redirection_date: 1st July 2014
homepage: https://www.gov.uk/government/organisations/homes-and-communities-agency
tna_timestamp: 20140327123736
host: www.homesandcommunities.co.uk
furl: www.gov.uk/hca
aliases:
- homesandcommunities.co.uk
# options: --query-string qstring1:qstring2:qstring3 # This site has not had full query string parameter analysis
## Instruction:
Add relevant query strings determined from arcl
## Code After:
---
site: hca
whitehall_slug: homes-and-communities-agency
title: Homes and Communities Agency
redirection_date: 1st July 2014
homepage: https://www.gov.uk/government/organisations/homes-and-communities-agency
tna_timestamp: 20140327123736
host: www.homesandcommunities.co.uk
furl: www.gov.uk/hca
aliases:
- homesandcommunities.co.uk
options: --query-string page_id:page
|
87f928396e789c8f7064e832ef42674a239b1d04 | utils/setup-client-query-handler.js | utils/setup-client-query-handler.js | // Handle search query states
// Listens for changes in query string, then ensures that provided values are coherent,
// and if all is fine emits valid query objects
// (which are usually consumed by list managers to update state of tables)
'use strict';
var ensureObject = require('es5-ext/object/valid-object')
, ensureString = require('es5-ext/object/validate-stringifiable-value')
, once = require('timers-ext/once')
, fixLocationQuery = require('./fix-location-query')
, QueryHandler = require('./query-handler');
module.exports = function (handlersList, appLocation, pathname) {
var queryHandler, update;
appLocation = ensureObject(appLocation);
pathname = ensureString(pathname);
queryHandler = new QueryHandler(handlersList);
queryHandler.update = update = once(function () {
if (pathname !== appLocation.pathname) return;
try {
queryHandler.resolve(appLocation.query);
} catch (e) {
if (!e.queryHandler) throw e;
console.error("Invalid query value: " + e.message);
fixLocationQuery(e.queryHandler.name, e.fixedQueryValue);
return;
}
});
queryHandler._handlers.forEach(function (handler) {
appLocation.query.get(handler.name).on('change', update);
});
appLocation.on('change', update);
update();
return queryHandler;
};
| // Handle search query states
// Listens for changes in query string, then ensures that provided values are coherent,
// and if all is fine emits valid query objects
// (which are usually consumed by list managers to update state of tables)
'use strict';
var ensureObject = require('es5-ext/object/valid-object')
, ensureString = require('es5-ext/object/validate-stringifiable-value')
, once = require('timers-ext/once')
, fixLocationQuery = require('./fix-location-query')
, QueryHandler = require('./query-handler');
module.exports = function (handlersList, appLocation, pathname) {
var queryHandler, update;
appLocation = ensureObject(appLocation);
pathname = ensureString(pathname);
queryHandler = new QueryHandler(handlersList);
queryHandler.update = update = once(function () {
if (pathname !== appLocation.pathname) return;
queryHandler.resolve(appLocation.query).catch(function (e) {
if (!e.queryHandler) throw e;
console.error("Invalid query value: " + e.message);
fixLocationQuery(e.queryHandler.name, e.fixedQueryValue);
return;
});
});
queryHandler._handlers.forEach(function (handler) {
appLocation.query.get(handler.name).on('change', update);
});
appLocation.on('change', update);
update();
return queryHandler;
};
| Update up to changes to QueryHandler | Update up to changes to QueryHandler
| JavaScript | mit | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations | javascript | ## Code Before:
// Handle search query states
// Listens for changes in query string, then ensures that provided values are coherent,
// and if all is fine emits valid query objects
// (which are usually consumed by list managers to update state of tables)
'use strict';
var ensureObject = require('es5-ext/object/valid-object')
, ensureString = require('es5-ext/object/validate-stringifiable-value')
, once = require('timers-ext/once')
, fixLocationQuery = require('./fix-location-query')
, QueryHandler = require('./query-handler');
module.exports = function (handlersList, appLocation, pathname) {
var queryHandler, update;
appLocation = ensureObject(appLocation);
pathname = ensureString(pathname);
queryHandler = new QueryHandler(handlersList);
queryHandler.update = update = once(function () {
if (pathname !== appLocation.pathname) return;
try {
queryHandler.resolve(appLocation.query);
} catch (e) {
if (!e.queryHandler) throw e;
console.error("Invalid query value: " + e.message);
fixLocationQuery(e.queryHandler.name, e.fixedQueryValue);
return;
}
});
queryHandler._handlers.forEach(function (handler) {
appLocation.query.get(handler.name).on('change', update);
});
appLocation.on('change', update);
update();
return queryHandler;
};
## Instruction:
Update up to changes to QueryHandler
## Code After:
// Handle search query states
// Listens for changes in query string, then ensures that provided values are coherent,
// and if all is fine emits valid query objects
// (which are usually consumed by list managers to update state of tables)
'use strict';
var ensureObject = require('es5-ext/object/valid-object')
, ensureString = require('es5-ext/object/validate-stringifiable-value')
, once = require('timers-ext/once')
, fixLocationQuery = require('./fix-location-query')
, QueryHandler = require('./query-handler');
module.exports = function (handlersList, appLocation, pathname) {
var queryHandler, update;
appLocation = ensureObject(appLocation);
pathname = ensureString(pathname);
queryHandler = new QueryHandler(handlersList);
queryHandler.update = update = once(function () {
if (pathname !== appLocation.pathname) return;
queryHandler.resolve(appLocation.query).catch(function (e) {
if (!e.queryHandler) throw e;
console.error("Invalid query value: " + e.message);
fixLocationQuery(e.queryHandler.name, e.fixedQueryValue);
return;
});
});
queryHandler._handlers.forEach(function (handler) {
appLocation.query.get(handler.name).on('change', update);
});
appLocation.on('change', update);
update();
return queryHandler;
};
|
5cb6806880ea87a9570a6f8520db1e9263753b61 | granite-text-classifier/src/main/java/org/granite/classification/model/TrainingText.java | granite-text-classifier/src/main/java/org/granite/classification/model/TrainingText.java | package org.granite.classification.model;
import java.util.TreeSet;
public class TrainingText implements Comparable<TrainingText> {
private int id;
private TreeSet<String> classifications = new TreeSet<>();
private TreeSet<String> wordBag = new TreeSet<>();
private String text;
TrainingText(){}
public TrainingText(final int id, final TreeSet<String> classifications, final String text) {
this.id = id;
this.classifications = classifications;
this.text = text;
}
public int getId() {
return id;
}
public TreeSet<String> getClassifications() {
return classifications;
}
public TreeSet<String> getWordBag() {
return wordBag;
}
public String getText() {
return text;
}
@Override
public int compareTo(TrainingText trainingText) {
return Integer.compare(id, trainingText.getId());
}
@Override
public boolean equals(Object obj) {
return obj instanceof TrainingText
&& getId() == ((TrainingText) obj).getId();
}
@Override
public int hashCode() {
return getId();
}
}
| package org.granite.classification.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.TreeSet;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TrainingText implements Comparable<TrainingText> {
private int id;
private TreeSet<String> classifications = new TreeSet<>();
private TreeSet<String> wordBag = new TreeSet<>();
private String text;
TrainingText(){}
public TrainingText(final int id, final TreeSet<String> classifications, final String text) {
this.id = id;
this.classifications = classifications;
this.text = text;
}
public int getId() {
return id;
}
public TreeSet<String> getClassifications() {
return classifications;
}
public TreeSet<String> getWordBag() {
return wordBag;
}
public String getText() {
return text;
}
@Override
public int compareTo(TrainingText trainingText) {
return Integer.compare(id, trainingText.getId());
}
@Override
public boolean equals(Object obj) {
return obj instanceof TrainingText
&& getId() == ((TrainingText) obj).getId();
}
@Override
public int hashCode() {
return getId();
}
}
| Add ignoreUnknown to training text type | Add ignoreUnknown to training text type
| Java | apache-2.0 | CBrophy/granite-classification | java | ## Code Before:
package org.granite.classification.model;
import java.util.TreeSet;
public class TrainingText implements Comparable<TrainingText> {
private int id;
private TreeSet<String> classifications = new TreeSet<>();
private TreeSet<String> wordBag = new TreeSet<>();
private String text;
TrainingText(){}
public TrainingText(final int id, final TreeSet<String> classifications, final String text) {
this.id = id;
this.classifications = classifications;
this.text = text;
}
public int getId() {
return id;
}
public TreeSet<String> getClassifications() {
return classifications;
}
public TreeSet<String> getWordBag() {
return wordBag;
}
public String getText() {
return text;
}
@Override
public int compareTo(TrainingText trainingText) {
return Integer.compare(id, trainingText.getId());
}
@Override
public boolean equals(Object obj) {
return obj instanceof TrainingText
&& getId() == ((TrainingText) obj).getId();
}
@Override
public int hashCode() {
return getId();
}
}
## Instruction:
Add ignoreUnknown to training text type
## Code After:
package org.granite.classification.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.TreeSet;
@JsonIgnoreProperties(ignoreUnknown = true)
public class TrainingText implements Comparable<TrainingText> {
private int id;
private TreeSet<String> classifications = new TreeSet<>();
private TreeSet<String> wordBag = new TreeSet<>();
private String text;
TrainingText(){}
public TrainingText(final int id, final TreeSet<String> classifications, final String text) {
this.id = id;
this.classifications = classifications;
this.text = text;
}
public int getId() {
return id;
}
public TreeSet<String> getClassifications() {
return classifications;
}
public TreeSet<String> getWordBag() {
return wordBag;
}
public String getText() {
return text;
}
@Override
public int compareTo(TrainingText trainingText) {
return Integer.compare(id, trainingText.getId());
}
@Override
public boolean equals(Object obj) {
return obj instanceof TrainingText
&& getId() == ((TrainingText) obj).getId();
}
@Override
public int hashCode() {
return getId();
}
}
|
2e71ab1fb8bb22958948fe677494e701883d50fb | init-slime.el | init-slime.el | (require 'slime-autoloads)
(global-set-key [f4] 'slime-selector)
(eval-after-load "slime"
'(progn
(add-to-list 'load-path (concat (directory-of-library "slime") "/contrib"))
(add-hook 'slime-mode-hook 'pretty-lambdas)
(add-hook 'slime-mode-hook 'enable-paredit-mode)
(add-hook 'slime-repl-mode-hook 'enable-paredit-mode)
(slime-setup '(slime-repl slime-fuzzy slime-highlight-edits))
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(require 'hippie-expand-slime)
(add-hook 'slime-mode-hook 'set-up-slime-hippie-expand)
(add-hook 'slime-repl-mode-hook 'set-up-slime-hippie-expand)))
(provide 'init-slime)
| (require 'slime-autoloads)
(global-set-key [f4] 'slime-selector)
(eval-after-load "slime"
'(progn
(add-to-list 'load-path (concat (directory-of-library "slime") "/contrib"))
(add-hook 'slime-mode-hook 'pretty-lambdas)
(add-hook 'slime-mode-hook 'enable-paredit-mode)
(add-hook 'slime-repl-mode-hook 'enable-paredit-mode)
(slime-setup '(slime-repl slime-fuzzy slime-highlight-edits))
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
;; Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
(defun override-slime-repl-bindings-with-paredit ()
(define-key slime-repl-mode-map (read-kbd-macro paredit-backward-delete-key) nil))
(add-hook 'slime-repl-mode-hook 'override-slime-repl-bindings-with-paredit)
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(require 'hippie-expand-slime)
(add-hook 'slime-mode-hook 'set-up-slime-hippie-expand)
(add-hook 'slime-repl-mode-hook 'set-up-slime-hippie-expand)))
(provide 'init-slime)
| Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '(' | Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
| Emacs Lisp | bsd-2-clause | zuoshifan/emacs.d,zuoshifan/emacs.d,ruiyang/emacs.d,blueabysm/emacs.d,whizzzkid/emacs.d,zuoshifan/emacs.d,jachinpy/emacs.d,alant/emacs.d,exclamaforte/emacs.d,dhanunjaya/emacs.d,kindoblue/emacs.d,shafayetkhan/emacs.d,zuoshifan/emacs.d,DarkThrone/emacs.d,dcorking/emacs.d,zuoshifan/emacs.d,krzysz00/emacs.d,emuio/emacs.d,zhaotai/.emacs.d,Togal/emacs.d,zuoshifan/emacs.d,zhuoyikang/emacs.d,haodaivshen/emacs.d,ernest-dzf/emacs.d,jachinpy/emacs.d,hophacker/emacs.d,ruiyang/emacs.d,baohaojun/emacs.d,farzadbekran/emacs.d,46do14/emacs.d,YangXin/emacs.d,me020523/emacs.d,zenith-john/emacs.d,modkzs/emcs.d,dongdonghu/.emacs.d,boblannon/emacs.d,pairyo/emacs.d,zuoshifan/emacs.d,mmqmzk/emacs.d,scorpionis/emacs.d,carlosliu/emacs.d,svenyurgensson/emacs.d,kongfy/emacs.d,Enzo-Liu/emacs.d,renatoriccio/emacs.d,purcell/emacs.d,roxolan/emacs.d,qinshulei/emacs.d,jkaessens/emacs.d,arthurl/emacs.d,lujianmei/emacs.d,qianwan/emacs.d,zuoshifan/emacs.d,farzadbekran/emacs.d,LittleLmp/emacs.d,cyjia/emacs.d,lust4life/emacs.d,jhpx/emacs.d,hkcqr/emacs.d,farzadbekran/emacs.d,ilove0518/emacs.d,braveoyster/emacs.d,sgarciac/emacs.d,Werewolflsp/emacs.d,YangXin/emacs.d,zuoshifan/emacs.d,Guoozz/emacs.d,farzadbekran/emacs.d,mpwang/emacs.d,cjqw/emacs.d,blueseason/emacs.d,Jadecity/PurcellEmacs.d,farzadbekran/emacs.d,jthetzel/emacs.d,atreeyang/emacs.d,caoyuanqi/emacs.d,wenpincui/emacs.d,Shanicky/emacs.d,LKI/emacs.d,lromang/emacs.d,wegatron/emacs.d,bibaijin/emacs.d,benkha/emacs.d,fengxl/emacs.d,danfengcao/emacs.d,gsmlg/emacs.d | emacs-lisp | ## Code Before:
(require 'slime-autoloads)
(global-set-key [f4] 'slime-selector)
(eval-after-load "slime"
'(progn
(add-to-list 'load-path (concat (directory-of-library "slime") "/contrib"))
(add-hook 'slime-mode-hook 'pretty-lambdas)
(add-hook 'slime-mode-hook 'enable-paredit-mode)
(add-hook 'slime-repl-mode-hook 'enable-paredit-mode)
(slime-setup '(slime-repl slime-fuzzy slime-highlight-edits))
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(require 'hippie-expand-slime)
(add-hook 'slime-mode-hook 'set-up-slime-hippie-expand)
(add-hook 'slime-repl-mode-hook 'set-up-slime-hippie-expand)))
(provide 'init-slime)
## Instruction:
Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
## Code After:
(require 'slime-autoloads)
(global-set-key [f4] 'slime-selector)
(eval-after-load "slime"
'(progn
(add-to-list 'load-path (concat (directory-of-library "slime") "/contrib"))
(add-hook 'slime-mode-hook 'pretty-lambdas)
(add-hook 'slime-mode-hook 'enable-paredit-mode)
(add-hook 'slime-repl-mode-hook 'enable-paredit-mode)
(slime-setup '(slime-repl slime-fuzzy slime-highlight-edits))
(setq slime-complete-symbol*-fancy t)
(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
;; Stop SLIME's REPL from grabbing DEL, which is annoying when backspacing over a '('
(defun override-slime-repl-bindings-with-paredit ()
(define-key slime-repl-mode-map (read-kbd-macro paredit-backward-delete-key) nil))
(add-hook 'slime-repl-mode-hook 'override-slime-repl-bindings-with-paredit)
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(require 'hippie-expand-slime)
(add-hook 'slime-mode-hook 'set-up-slime-hippie-expand)
(add-hook 'slime-repl-mode-hook 'set-up-slime-hippie-expand)))
(provide 'init-slime)
|
167be8a8a80a4690ec4b03c8b8c66decae8b0b02 | .travis.yml | .travis.yml | dist: xenial
sudo: required
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- pypy
- pypy3
install:
- pip install flake8
- pip install coverage
- pip install coveralls
- pip install mock
- pip install nose
script:
- make tests-coverage
- make lint
after_success:
- coveralls
| language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
- pypy3
install:
- pip install flake8
- pip install coverage
- pip install coveralls
- pip install mock
- pip install nose
script:
- make tests-coverage
- make lint
after_success:
- coveralls
| Revert "Another try to check with Python 3.7 in Travis CI." | Revert "Another try to check with Python 3.7 in Travis CI."
This reverts commit cd21b152e398ab955f56a959104b5e766bb668f8.
Also does not work (cannot install pypy and pypy3).
| YAML | mit | s3rvac/weechat-notify-send | yaml | ## Code Before:
dist: xenial
sudo: required
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- pypy
- pypy3
install:
- pip install flake8
- pip install coverage
- pip install coveralls
- pip install mock
- pip install nose
script:
- make tests-coverage
- make lint
after_success:
- coveralls
## Instruction:
Revert "Another try to check with Python 3.7 in Travis CI."
This reverts commit cd21b152e398ab955f56a959104b5e766bb668f8.
Also does not work (cannot install pypy and pypy3).
## Code After:
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
- pypy3
install:
- pip install flake8
- pip install coverage
- pip install coveralls
- pip install mock
- pip install nose
script:
- make tests-coverage
- make lint
after_success:
- coveralls
|
4082d3af5ba38d3eb865366f30875d21592d129e | middlewares/tls.js | middlewares/tls.js | var conf = require('../../conf');
/**
* Check whether Transport Layer Security (TLS) is forced in the config. If
* forceTLS option is set to true, redirect all unsecured HTTP traffic to HTTPS.
**/
module.exports = function forceTLS(req, res, next) {
if (conf.forceTLS && conf.securePort && !req.secure) {
return res.redirect(['https://', req.get('Host'), req.url].join(''));
}
next();
}
| var conf = require('../conf');
/**
* Check whether Transport Layer Security (TLS) is forced in the config. If
* forceTLS option is set to true, redirect all unsecured HTTP traffic to HTTPS.
**/
module.exports = function forceTLS(req, res, next) {
if (conf.forceTLS && conf.securePort && !req.secure) {
var redirectPath = ['https://', req.hostname];
if (conf.securePort != 443) {
redirectPath.push(':');
redirectPath.push(conf.securePort);
}
redirectPath.push(req.url);
return res.redirect(301, redirectPath.join(''));
}
next();
}
| Add custom port to the redirect path | Add custom port to the redirect path
| JavaScript | mit | pataquets/doorman,powershop/doorman,powershop/doorman,pataquets/doorman,movableink/doorman,meltwater/doorman,rbramwell/doorman,movableink/doorman,meltwater/doorman,kcrayon/doorman,rbramwell/doorman,kcrayon/doorman | javascript | ## Code Before:
var conf = require('../../conf');
/**
* Check whether Transport Layer Security (TLS) is forced in the config. If
* forceTLS option is set to true, redirect all unsecured HTTP traffic to HTTPS.
**/
module.exports = function forceTLS(req, res, next) {
if (conf.forceTLS && conf.securePort && !req.secure) {
return res.redirect(['https://', req.get('Host'), req.url].join(''));
}
next();
}
## Instruction:
Add custom port to the redirect path
## Code After:
var conf = require('../conf');
/**
* Check whether Transport Layer Security (TLS) is forced in the config. If
* forceTLS option is set to true, redirect all unsecured HTTP traffic to HTTPS.
**/
module.exports = function forceTLS(req, res, next) {
if (conf.forceTLS && conf.securePort && !req.secure) {
var redirectPath = ['https://', req.hostname];
if (conf.securePort != 443) {
redirectPath.push(':');
redirectPath.push(conf.securePort);
}
redirectPath.push(req.url);
return res.redirect(301, redirectPath.join(''));
}
next();
}
|
42dd2f2ee8dad155ec566fe8405980dea7b2196f | tests/Composer/Test/Util/ErrorHandlerTest.php | tests/Composer/Test/Util/ErrorHandlerTest.php | <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Test\Util;
use Composer\Util\ErrorHandler;
use Composer\TestCase;
/**
* ErrorHandler test case
*/
class ErrorHandlerTest extends TestCase
{
/**
* Test ErrorHandler handles notices
*/
public function testErrorHandlerCaptureNotice()
{
$this->setExpectedException('\ErrorException', 'Undefined index: baz');
ErrorHandler::register();
$array = array('foo' => 'bar');
$array['baz'];
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerCaptureWarning()
{
$this->setExpectedException('\ErrorException', 'array_merge(): Argument #2 is not an array');
ErrorHandler::register();
array_merge(array(), 'string');
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerRespectsAtOperator()
{
ErrorHandler::register();
@trigger_error('test', E_USER_NOTICE);
}
}
| <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Test\Util;
use Composer\Util\ErrorHandler;
use Composer\TestCase;
/**
* ErrorHandler test case
*/
class ErrorHandlerTest extends TestCase
{
/**
* Test ErrorHandler handles notices
*/
public function testErrorHandlerCaptureNotice()
{
$this->setExpectedException('\ErrorException', 'Undefined index: baz');
ErrorHandler::register();
$array = array('foo' => 'bar');
$array['baz'];
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerCaptureWarning()
{
$this->setExpectedException('\ErrorException', 'array_merge');
ErrorHandler::register();
array_merge(array(), 'string');
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerRespectsAtOperator()
{
ErrorHandler::register();
@trigger_error('test', E_USER_NOTICE);
}
}
| Check only part of the error message as it's different in hhvm | Check only part of the error message as it's different in hhvm
| PHP | mit | cs278/composer,Jericho25/composer,floverdevel/composer,sroze/composer,iamluc/composer,00F100/composer,bd808/composer,supriyantomaftuh/composer,curry684/composer,mickaelandrieu/composer,ryanaslett/composer,flaupretre/composer,SpacePossum/composer,slopjong/posedoc,phansys/composer,Risyandi/composer,stof/composer,aitboudad/composer,oxygen-cms/composer,1234-/composer,cgvarela/composer,mothership-ec/composer,GodLesZ/composer,naderman/composer,JBleijenberg/composer,till/composer,JeckoHeroOrg/composer,mikicaivosevic/composer,nater1067/composer,mrmark/composer,barkinet/composer,Seldaek/composer,melvis01/composer,remicollet/composer,DiceHoldingsInc/composer,marcuschia/composer,davidolrik/composer,universalsoftware/composer,Flyingmana/composer,alcohol/composer,zgj12306/composer,nicolas-grekas/composer,dymissy/composer,webberwu/composer,JeroenDeDauw/composer,Danack/composer,olvlvl/composer,ammmze/composer,PatidarWeb/composer,cesarmarinhorj/composer,erasys/composer,guillaumelecerf/composer,yaman-jain/composer,szeber/composer,gencer/composer,mauricionr/composer,nevvermind/composer,dzuelke/composer,localheinz/composer,pierredup/composer,yinhe007/composer,andrerom/composer,druid628/composer,thetaxman/composer,jreinke/composer,stefangr/composer,composer/composer,slbmeh/composer,zhaoyan158567/composer,Netmisa/composer,jmleroux/composer,hirak/composer,brighten01/composer,ncusoho/composer,shipci/composer,kocsismate/composer,jtanjung/composer,samdark/composer,vdm-io/composer,fabiang/composer,fh/composer,MoT3rror/composer,Nicofuma/composer,Teino1978-Corp/Teino1978-Corp-composer,andrewnicols/composer,staabm/composer,javihgil/composer,yched/composer,myPublicGit/composer,milleruk/composer,theiven70/composer,joshdifabio/composer,johnstevenson/composer,Zagorakiss/composer,legoktm/composer,Soullivaneuh/composer,AndBicScadMedia/composer,kidaa/composer,fabpot/composer,balbuf/composer,Ocramius/composer,gsdevme/composer,oligriffiths/composer,blacksun/composer,rednut/composer,kuczek/composer | php | ## Code Before:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Test\Util;
use Composer\Util\ErrorHandler;
use Composer\TestCase;
/**
* ErrorHandler test case
*/
class ErrorHandlerTest extends TestCase
{
/**
* Test ErrorHandler handles notices
*/
public function testErrorHandlerCaptureNotice()
{
$this->setExpectedException('\ErrorException', 'Undefined index: baz');
ErrorHandler::register();
$array = array('foo' => 'bar');
$array['baz'];
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerCaptureWarning()
{
$this->setExpectedException('\ErrorException', 'array_merge(): Argument #2 is not an array');
ErrorHandler::register();
array_merge(array(), 'string');
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerRespectsAtOperator()
{
ErrorHandler::register();
@trigger_error('test', E_USER_NOTICE);
}
}
## Instruction:
Check only part of the error message as it's different in hhvm
## Code After:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Test\Util;
use Composer\Util\ErrorHandler;
use Composer\TestCase;
/**
* ErrorHandler test case
*/
class ErrorHandlerTest extends TestCase
{
/**
* Test ErrorHandler handles notices
*/
public function testErrorHandlerCaptureNotice()
{
$this->setExpectedException('\ErrorException', 'Undefined index: baz');
ErrorHandler::register();
$array = array('foo' => 'bar');
$array['baz'];
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerCaptureWarning()
{
$this->setExpectedException('\ErrorException', 'array_merge');
ErrorHandler::register();
array_merge(array(), 'string');
}
/**
* Test ErrorHandler handles warnings
*/
public function testErrorHandlerRespectsAtOperator()
{
ErrorHandler::register();
@trigger_error('test', E_USER_NOTICE);
}
}
|
68d7e2ab3ba87845952f39cff217a5ceacfef6cf | config/sidekiq.yml | config/sidekiq.yml | ---
:queues:
- default
- mailers
- load_testing
- zendesk
| ---
:concurrency: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %>
:queues:
- default
- mailers
- load_testing
- zendesk
| Set Sidekiq pool to 'Rails Max Threads' | Set Sidekiq pool to 'Rails Max Threads'
| YAML | mit | ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2 | yaml | ## Code Before:
---
:queues:
- default
- mailers
- load_testing
- zendesk
## Instruction:
Set Sidekiq pool to 'Rails Max Threads'
## Code After:
---
:concurrency: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %>
:queues:
- default
- mailers
- load_testing
- zendesk
|
d2f7af8ab77ba5d2f75b3181b1c19143d5da7105 | README.md | README.md | wysiwyg component sample
# Demo
[https://andresin87.github.io/wysiwyg/](https://andresin87.github.io/wysiwyg/) | wysiwyg component sample
# Demo
[https://andresin87.github.io/wysiwyg/](https://andresin87.github.io/wysiwyg/)
# USE
start in localhost:
```
npm start
``` | ADD how to use/run to the readme file | ADD how to use/run to the readme file
| Markdown | mit | andresin87/wysiwyg | markdown | ## Code Before:
wysiwyg component sample
# Demo
[https://andresin87.github.io/wysiwyg/](https://andresin87.github.io/wysiwyg/)
## Instruction:
ADD how to use/run to the readme file
## Code After:
wysiwyg component sample
# Demo
[https://andresin87.github.io/wysiwyg/](https://andresin87.github.io/wysiwyg/)
# USE
start in localhost:
```
npm start
``` |
c68e95718bb9b7a5c42527e94745e65ae6e793fc | docs/.vuepress/config.js | docs/.vuepress/config.js | const path = require('path')
const material = path.resolve('node_modules/@material')
module.exports = {
title: 'Material Components Vue',
description: 'Material Design components for Vue.js',
base: '/material-components-vue/',
head: [
['link', { rel: 'icon', href: '/logo.png'}]
],
themeConfig: {
repo: 'matsp/material-components-vue',
nav: [
{ text: 'Guide', link: '/guide/' },
{ text: 'Components', link: '/components/' }
]
},
scss: {
includePaths: [material]
}
}
| const path = require('path')
const nodeModules = path.resolve('node_modules/')
module.exports = {
title: 'Material Components Vue',
description: 'Material Design components for Vue.js',
base: '/material-components-vue/',
head: [
['link', { rel: 'icon', href: '/logo.png'}]
],
themeConfig: {
repo: 'matsp/material-components-vue',
nav: [
{ text: 'Guide', link: '/guide/' },
{ text: 'Components', link: '/components/' }
]
},
scss: {
includePaths: [nodeModules]
}
}
| Fix import issue from node_modules | fix(docs): Fix import issue from node_modules
| JavaScript | mit | matsp/material-components-vue | javascript | ## Code Before:
const path = require('path')
const material = path.resolve('node_modules/@material')
module.exports = {
title: 'Material Components Vue',
description: 'Material Design components for Vue.js',
base: '/material-components-vue/',
head: [
['link', { rel: 'icon', href: '/logo.png'}]
],
themeConfig: {
repo: 'matsp/material-components-vue',
nav: [
{ text: 'Guide', link: '/guide/' },
{ text: 'Components', link: '/components/' }
]
},
scss: {
includePaths: [material]
}
}
## Instruction:
fix(docs): Fix import issue from node_modules
## Code After:
const path = require('path')
const nodeModules = path.resolve('node_modules/')
module.exports = {
title: 'Material Components Vue',
description: 'Material Design components for Vue.js',
base: '/material-components-vue/',
head: [
['link', { rel: 'icon', href: '/logo.png'}]
],
themeConfig: {
repo: 'matsp/material-components-vue',
nav: [
{ text: 'Guide', link: '/guide/' },
{ text: 'Components', link: '/components/' }
]
},
scss: {
includePaths: [nodeModules]
}
}
|
511089677e221813f628902fb5033c0f661a2f08 | .travis.yml | .travis.yml | language: ruby
bundler_args: --without development
before_install:
- gem update bundler
rvm:
- "1.9"
- "2.0"
- "2.1"
- "2.2"
- "2.3.3"
- "2.4.0"
- "jruby-19mode"
- "rbx"
script: bundle exec rspec
| language: ruby
bundler_args: --without development
before_install:
- gem update bundler
rvm:
- 2.4.1
- jruby-9.1.8.0
- 2.3.4
- 2.2.7
- 2.1.9
- 2.0.0
- 1.9.3
- jruby-9.0.5.0
- jruby-1.7.26
- ruby-head
- jruby-head
- rbx
jdk:
- oraclejdk8
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: 1.9.3
- rvm: rbx
env:
global:
- JAVA_OPTS=-Xmx1024m
script: RUBYOPT=-w bundle exec rspec
| Test on same ruby versions as concurrent-ruby | Test on same ruby versions as concurrent-ruby
| YAML | mit | sheerun/dataloader | yaml | ## Code Before:
language: ruby
bundler_args: --without development
before_install:
- gem update bundler
rvm:
- "1.9"
- "2.0"
- "2.1"
- "2.2"
- "2.3.3"
- "2.4.0"
- "jruby-19mode"
- "rbx"
script: bundle exec rspec
## Instruction:
Test on same ruby versions as concurrent-ruby
## Code After:
language: ruby
bundler_args: --without development
before_install:
- gem update bundler
rvm:
- 2.4.1
- jruby-9.1.8.0
- 2.3.4
- 2.2.7
- 2.1.9
- 2.0.0
- 1.9.3
- jruby-9.0.5.0
- jruby-1.7.26
- ruby-head
- jruby-head
- rbx
jdk:
- oraclejdk8
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: 1.9.3
- rvm: rbx
env:
global:
- JAVA_OPTS=-Xmx1024m
script: RUBYOPT=-w bundle exec rspec
|
a5a9807bb4c473442716201b6b220be62d764af4 | tailor/listeners/filelistener.py | tailor/listeners/filelistener.py | from tailor.utils.sourcefile import num_lines_in_file, file_too_long
class FileListener:
# pylint: disable=too-few-public-methods
def __init__(self, printer, filepath):
self.__printer = printer
self.__filepath = filepath
def verify(self, max_lines):
self.__verify_file_length(max_lines)
def __verify_file_length(self, max_lines):
if file_too_long(self.__filepath, max_lines):
self.__printer.error('File is over maximum line limit (' +
str(num_lines_in_file(self.__filepath)) +
'/' + str(max_lines) + ')',
loc=(max_lines + 1, 0))
| from tailor.types.location import Location
from tailor.utils.sourcefile import num_lines_in_file, file_too_long
class FileListener:
# pylint: disable=too-few-public-methods
def __init__(self, printer, filepath):
self.__printer = printer
self.__filepath = filepath
def verify(self, max_lines):
self.__verify_file_length(max_lines)
def __verify_file_length(self, max_lines):
if file_too_long(self.__filepath, max_lines):
self.__printer.error('File is over maximum line limit (' +
str(num_lines_in_file(self.__filepath)) +
'/' + str(max_lines) + ')',
loc=Location(max_lines, 1))
| Use Location namedtuple when calling printer | Use Location namedtuple when calling printer
| Python | mit | sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor,sleekbyte/tailor | python | ## Code Before:
from tailor.utils.sourcefile import num_lines_in_file, file_too_long
class FileListener:
# pylint: disable=too-few-public-methods
def __init__(self, printer, filepath):
self.__printer = printer
self.__filepath = filepath
def verify(self, max_lines):
self.__verify_file_length(max_lines)
def __verify_file_length(self, max_lines):
if file_too_long(self.__filepath, max_lines):
self.__printer.error('File is over maximum line limit (' +
str(num_lines_in_file(self.__filepath)) +
'/' + str(max_lines) + ')',
loc=(max_lines + 1, 0))
## Instruction:
Use Location namedtuple when calling printer
## Code After:
from tailor.types.location import Location
from tailor.utils.sourcefile import num_lines_in_file, file_too_long
class FileListener:
# pylint: disable=too-few-public-methods
def __init__(self, printer, filepath):
self.__printer = printer
self.__filepath = filepath
def verify(self, max_lines):
self.__verify_file_length(max_lines)
def __verify_file_length(self, max_lines):
if file_too_long(self.__filepath, max_lines):
self.__printer.error('File is over maximum line limit (' +
str(num_lines_in_file(self.__filepath)) +
'/' + str(max_lines) + ')',
loc=Location(max_lines, 1))
|
4517c56e896c75e5e783dede8637e9ca9fd558b2 | scripts/relish.sh | scripts/relish.sh |
set -e
gem install relish
echo "api_token: $RELISH_TOKEN" > ~/.relish
relish push
|
set -e
docker run \
--env RELISH_API_TOKEN=$RELISH_API_TOKEN \
--volume "$PWD":/src:ro \
--tty \
jcassee/relish \
relish push
| Use Docker for pushing to Relish | Use Docker for pushing to Relish
| Shell | mit | jcassee/registronavale,jcassee/registronavale | shell | ## Code Before:
set -e
gem install relish
echo "api_token: $RELISH_TOKEN" > ~/.relish
relish push
## Instruction:
Use Docker for pushing to Relish
## Code After:
set -e
docker run \
--env RELISH_API_TOKEN=$RELISH_API_TOKEN \
--volume "$PWD":/src:ro \
--tty \
jcassee/relish \
relish push
|
e9d5366509a05f6b66dc016ccdaa224f48fedf98 | .travis.yml | .travis.yml | language: java
sudo: false # faster builds
before_install:
- pip install --user codecov
after_success:
- codecov
| language: java
sudo: false # faster builds
before_install:
- pip install --user codecov
after_success:
- codecov
jdk:
- oraclejdk8
- openjdk8
| Use Java 1.8+ when testing. | Use Java 1.8+ when testing.
| YAML | apache-2.0 | OpenNMS/wsman | yaml | ## Code Before:
language: java
sudo: false # faster builds
before_install:
- pip install --user codecov
after_success:
- codecov
## Instruction:
Use Java 1.8+ when testing.
## Code After:
language: java
sudo: false # faster builds
before_install:
- pip install --user codecov
after_success:
- codecov
jdk:
- oraclejdk8
- openjdk8
|
5ad75b7bb7613aceb3554c8eb2e664f459deb1cb | README.md | README.md | BattleShip
==========
[![Build Status][build-status]][travis]
[![License][license]](LICENSE)
[license]: https://img.shields.io/badge/License-MIT-brightgreen.png
[travis]: https://travis-ci.org/Bjornkjohnson/BattleShipGame | BattleShip
==========
[![Build Status][build-status]][travis]
[![License][license]](LICENSE)
[license]: https://img.shields.io/badge/License-MIT-brightgreen.png
[travis]: https://travis-ci.org/Bjornkjohnson/BattleShipGame
[build-status]: https://travis-ci.org/Bjornkjohnson/BattleShipGame.png?branch=master | Add build status to readme | Add build status to readme
| Markdown | mit | Bjornkjohnson/BattleShipGame | markdown | ## Code Before:
BattleShip
==========
[![Build Status][build-status]][travis]
[![License][license]](LICENSE)
[license]: https://img.shields.io/badge/License-MIT-brightgreen.png
[travis]: https://travis-ci.org/Bjornkjohnson/BattleShipGame
## Instruction:
Add build status to readme
## Code After:
BattleShip
==========
[![Build Status][build-status]][travis]
[![License][license]](LICENSE)
[license]: https://img.shields.io/badge/License-MIT-brightgreen.png
[travis]: https://travis-ci.org/Bjornkjohnson/BattleShipGame
[build-status]: https://travis-ci.org/Bjornkjohnson/BattleShipGame.png?branch=master |
66a7d4fd5e2f00746f96c13c2a0a91f9dee2f54d | docker/common/sudo-as-user.sh | docker/common/sudo-as-user.sh |
USER_ID=${LOCAL_USER_ID:-9001}
echo "Starting with UID : $USER_ID"
useradd --shell /bin/bash -u $USER_ID -o user
sudo -u user "$@"
|
USER_ID=${LOCAL_USER_ID:-9001}
echo "Starting with UID : $USER_ID"
if [ "$USER_ID" -ne "0" ]; then
useradd --shell /bin/bash -u $USER_ID -o user
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sudo -u user "$@"
else
sudo -u root "$@"
fi
| Allow the "user" to be root in the container | Allow the "user" to be root in the container
| Shell | mit | samuel-phan/mssh-copy-id,samuel-phan/mssh-copy-id | shell | ## Code Before:
USER_ID=${LOCAL_USER_ID:-9001}
echo "Starting with UID : $USER_ID"
useradd --shell /bin/bash -u $USER_ID -o user
sudo -u user "$@"
## Instruction:
Allow the "user" to be root in the container
## Code After:
USER_ID=${LOCAL_USER_ID:-9001}
echo "Starting with UID : $USER_ID"
if [ "$USER_ID" -ne "0" ]; then
useradd --shell /bin/bash -u $USER_ID -o user
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sudo -u user "$@"
else
sudo -u root "$@"
fi
|
acb163778f30d79d30e42416db2c4968877adeed | server/methods/registerUser.coffee | server/methods/registerUser.coffee | Meteor.methods
registerUser: (formData) ->
check formData, Object
if RocketChat.settings.get('Accounts_RegistrationForm') is 'Disabled'
throw new Meteor.Error 'error-user-registration-disabled', 'User registration is disabled', { method: 'registerUser' }
else if RocketChat.settings.get('Accounts_RegistrationForm') is 'Secret URL' and (not formData.secretURL or formData.secretURL isnt RocketChat.settings.get('Accounts_RegistrationForm_SecretURL'))
throw new Meteor.Error 'error-user-registration-secret', 'User registration is only allowed via Secret URL', { method: 'registerUser' }
RocketChat.validateEmailDomain(formData.email);
userData =
email: s.trim(formData.email.toLowerCase())
password: formData.pass
userId = Accounts.createUser userData
RocketChat.models.Users.setName userId, s.trim(formData.name)
RocketChat.saveCustomFields(userId, formData)
try
if userData.email
Accounts.sendVerificationEmail(userId, userData.email);
catch error
# throw new Meteor.Error 'error-email-send-failed', 'Error trying to send email: ' + error.message, { method: 'registerUser', message: error.message }
return userId
| Meteor.methods
registerUser: (formData) ->
check formData, Object
if RocketChat.settings.get('Accounts_RegistrationForm') is 'Disabled'
throw new Meteor.Error 'error-user-registration-disabled', 'User registration is disabled', { method: 'registerUser' }
else if RocketChat.settings.get('Accounts_RegistrationForm') is 'Secret URL' and (not formData.secretURL or formData.secretURL isnt RocketChat.settings.get('Accounts_RegistrationForm_SecretURL'))
throw new Meteor.Error 'error-user-registration-secret', 'User registration is only allowed via Secret URL', { method: 'registerUser' }
RocketChat.validateEmailDomain(formData.email);
userData =
email: s.trim(formData.email.toLowerCase())
password: formData.pass
# Check if user has already been imported and never logged in. If so, set password and let it through
importedUser = RocketChat.models.Users.findOneByEmailAddress s.trim(formData.email.toLowerCase())
if importedUser?.importIds?.length and !importedUser.lastLogin
Accounts.setPassword(importedUser._id, userData.password)
userId = importedUser._id
else
userId = Accounts.createUser userData
RocketChat.models.Users.setName userId, s.trim(formData.name)
RocketChat.saveCustomFields(userId, formData)
try
if userData.email
Accounts.sendVerificationEmail(userId, userData.email);
catch error
# throw new Meteor.Error 'error-email-send-failed', 'Error trying to send email: ' + error.message, { method: 'registerUser', message: error.message }
return userId
| Allow imported users to register themselves | Allow imported users to register themselves
| CoffeeScript | mit | Achaikos/Rocket.Chat,AimenJoe/Rocket.Chat,wtsarchive/Rocket.Chat,flaviogrossi/Rocket.Chat,tntobias/Rocket.Chat,yuyixg/Rocket.Chat,wtsarchive/Rocket.Chat,yuyixg/Rocket.Chat,igorstajic/Rocket.Chat,marzieh312/Rocket.Chat,cnash/Rocket.Chat,NMandapaty/Rocket.Chat,snaiperskaya96/Rocket.Chat,marzieh312/Rocket.Chat,ziedmahdi/Rocket.Chat,karlprieb/Rocket.Chat,tntobias/Rocket.Chat,xasx/Rocket.Chat,galrotem1993/Rocket.Chat,abduljanjua/TheHub,mwharrison/Rocket.Chat,NMandapaty/Rocket.Chat,nishimaki10/Rocket.Chat,galrotem1993/Rocket.Chat,yuyixg/Rocket.Chat,4thParty/Rocket.Chat,Gudii/Rocket.Chat,ziedmahdi/Rocket.Chat,nishimaki10/Rocket.Chat,snaiperskaya96/Rocket.Chat,karlprieb/Rocket.Chat,flaviogrossi/Rocket.Chat,mwharrison/Rocket.Chat,mrinaldhar/Rocket.Chat,VoiSmart/Rocket.Chat,alexbrazier/Rocket.Chat,mrsimpson/Rocket.Chat,Gyubin/Rocket.Chat,subesokun/Rocket.Chat,marzieh312/Rocket.Chat,wtsarchive/Rocket.Chat,igorstajic/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,LearnersGuild/echo-chat,inoio/Rocket.Chat,karlprieb/Rocket.Chat,fatihwk/Rocket.Chat,inoxth/Rocket.Chat,matthewshirley/Rocket.Chat,igorstajic/Rocket.Chat,Movile/Rocket.Chat,pachox/Rocket.Chat,xasx/Rocket.Chat,LearnersGuild/Rocket.Chat,mrsimpson/Rocket.Chat,VoiSmart/Rocket.Chat,subesokun/Rocket.Chat,mwharrison/Rocket.Chat,cnash/Rocket.Chat,4thParty/Rocket.Chat,pkgodara/Rocket.Chat,cnash/Rocket.Chat,ealbers/Rocket.Chat,pachox/Rocket.Chat,mwharrison/Rocket.Chat,cnash/Rocket.Chat,ggazzo/Rocket.Chat,abduljanjua/TheHub,AimenJoe/Rocket.Chat,Achaikos/Rocket.Chat,Gyubin/Rocket.Chat,4thParty/Rocket.Chat,JamesHGreen/Rocket_API,Sing-Li/Rocket.Chat,mrsimpson/Rocket.Chat,ealbers/Rocket.Chat,Gudii/Rocket.Chat,marzieh312/Rocket.Chat,tntobias/Rocket.Chat,VoiSmart/Rocket.Chat,subesokun/Rocket.Chat,NMandapaty/Rocket.Chat,intelradoux/Rocket.Chat,galrotem1993/Rocket.Chat,subesokun/Rocket.Chat,ggazzo/Rocket.Chat,snaiperskaya96/Rocket.Chat,abduljanjua/TheHub,BorntraegerMarc/Rocket.Chat,inoxth/Rocket.Chat,igorstajic/Rocket.Chat,k0nsl/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,mrsimpson/Rocket.Chat,Movile/Rocket.Chat,pitamar/Rocket.Chat,NMandapaty/Rocket.Chat,k0nsl/Rocket.Chat,BorntraegerMarc/Rocket.Chat,Movile/Rocket.Chat,pitamar/Rocket.Chat,alexbrazier/Rocket.Chat,alexbrazier/Rocket.Chat,matthewshirley/Rocket.Chat,mrinaldhar/Rocket.Chat,matthewshirley/Rocket.Chat,k0nsl/Rocket.Chat,JamesHGreen/Rocket_API,Gyubin/Rocket.Chat,AlecTroemel/Rocket.Chat,AimenJoe/Rocket.Chat,snaiperskaya96/Rocket.Chat,ealbers/Rocket.Chat,wtsarchive/Rocket.Chat,danielbressan/Rocket.Chat,fatihwk/Rocket.Chat,danielbressan/Rocket.Chat,ziedmahdi/Rocket.Chat,fatihwk/Rocket.Chat,galrotem1993/Rocket.Chat,pkgodara/Rocket.Chat,BorntraegerMarc/Rocket.Chat,intelradoux/Rocket.Chat,Sing-Li/Rocket.Chat,Gyubin/Rocket.Chat,JamesHGreen/Rocket.Chat,pachox/Rocket.Chat,pachox/Rocket.Chat,Kiran-Rao/Rocket.Chat,pkgodara/Rocket.Chat,inoxth/Rocket.Chat,Achaikos/Rocket.Chat,LearnersGuild/Rocket.Chat,inoio/Rocket.Chat,JamesHGreen/Rocket.Chat,JamesHGreen/Rocket.Chat,ealbers/Rocket.Chat,matthewshirley/Rocket.Chat,Kiran-Rao/Rocket.Chat,LearnersGuild/echo-chat,nishimaki10/Rocket.Chat,tntobias/Rocket.Chat,Sing-Li/Rocket.Chat,mrinaldhar/Rocket.Chat,Gudii/Rocket.Chat,JamesHGreen/Rocket.Chat,Kiran-Rao/Rocket.Chat,inoio/Rocket.Chat,fatihwk/Rocket.Chat,ggazzo/Rocket.Chat,Kiran-Rao/Rocket.Chat,inoxth/Rocket.Chat,AlecTroemel/Rocket.Chat,alexbrazier/Rocket.Chat,AimenJoe/Rocket.Chat,AlecTroemel/Rocket.Chat,intelradoux/Rocket.Chat,karlprieb/Rocket.Chat,abduljanjua/TheHub,mrinaldhar/Rocket.Chat,k0nsl/Rocket.Chat,Gudii/Rocket.Chat,flaviogrossi/Rocket.Chat,BorntraegerMarc/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,AlecTroemel/Rocket.Chat,JamesHGreen/Rocket_API,Sing-Li/Rocket.Chat,intelradoux/Rocket.Chat,yuyixg/Rocket.Chat,Achaikos/Rocket.Chat,Movile/Rocket.Chat,xasx/Rocket.Chat,pitamar/Rocket.Chat,flaviogrossi/Rocket.Chat,danielbressan/Rocket.Chat,LearnersGuild/Rocket.Chat,LearnersGuild/echo-chat,ziedmahdi/Rocket.Chat,xasx/Rocket.Chat,LearnersGuild/echo-chat,pkgodara/Rocket.Chat,JamesHGreen/Rocket_API,LearnersGuild/Rocket.Chat,pitamar/Rocket.Chat,4thParty/Rocket.Chat,ggazzo/Rocket.Chat,danielbressan/Rocket.Chat,nishimaki10/Rocket.Chat,trt15-ssci-organization/Rocket.Chat | coffeescript | ## Code Before:
Meteor.methods
registerUser: (formData) ->
check formData, Object
if RocketChat.settings.get('Accounts_RegistrationForm') is 'Disabled'
throw new Meteor.Error 'error-user-registration-disabled', 'User registration is disabled', { method: 'registerUser' }
else if RocketChat.settings.get('Accounts_RegistrationForm') is 'Secret URL' and (not formData.secretURL or formData.secretURL isnt RocketChat.settings.get('Accounts_RegistrationForm_SecretURL'))
throw new Meteor.Error 'error-user-registration-secret', 'User registration is only allowed via Secret URL', { method: 'registerUser' }
RocketChat.validateEmailDomain(formData.email);
userData =
email: s.trim(formData.email.toLowerCase())
password: formData.pass
userId = Accounts.createUser userData
RocketChat.models.Users.setName userId, s.trim(formData.name)
RocketChat.saveCustomFields(userId, formData)
try
if userData.email
Accounts.sendVerificationEmail(userId, userData.email);
catch error
# throw new Meteor.Error 'error-email-send-failed', 'Error trying to send email: ' + error.message, { method: 'registerUser', message: error.message }
return userId
## Instruction:
Allow imported users to register themselves
## Code After:
Meteor.methods
registerUser: (formData) ->
check formData, Object
if RocketChat.settings.get('Accounts_RegistrationForm') is 'Disabled'
throw new Meteor.Error 'error-user-registration-disabled', 'User registration is disabled', { method: 'registerUser' }
else if RocketChat.settings.get('Accounts_RegistrationForm') is 'Secret URL' and (not formData.secretURL or formData.secretURL isnt RocketChat.settings.get('Accounts_RegistrationForm_SecretURL'))
throw new Meteor.Error 'error-user-registration-secret', 'User registration is only allowed via Secret URL', { method: 'registerUser' }
RocketChat.validateEmailDomain(formData.email);
userData =
email: s.trim(formData.email.toLowerCase())
password: formData.pass
# Check if user has already been imported and never logged in. If so, set password and let it through
importedUser = RocketChat.models.Users.findOneByEmailAddress s.trim(formData.email.toLowerCase())
if importedUser?.importIds?.length and !importedUser.lastLogin
Accounts.setPassword(importedUser._id, userData.password)
userId = importedUser._id
else
userId = Accounts.createUser userData
RocketChat.models.Users.setName userId, s.trim(formData.name)
RocketChat.saveCustomFields(userId, formData)
try
if userData.email
Accounts.sendVerificationEmail(userId, userData.email);
catch error
# throw new Meteor.Error 'error-email-send-failed', 'Error trying to send email: ' + error.message, { method: 'registerUser', message: error.message }
return userId
|
1711e0e9b2169c3833bbb832349e40b81c8d519a | .travis.yml | .travis.yml | language: ruby
env:
global:
- FORMATS=human,json
- HUMAN_OUTPUT=system_info.txt
- JSON_OUTPUT=system_info.json
- PATH=$HOME/bin:$PATH
matrix:
- COMMANDS_FILE=commands.yml
- COMMANDS_FILE=mini_commands.yml
before_script:
- mkdir -p ~/bin
- if ! jq --version ; then
curl -sLo ~/bin/jq 'http://stedolan.github.io/jq/download/linux64/jq' ;
chmod +x ~/bin/jq ;
fi
- if ! gimme --version ; then
curl -sLo ~/bin/gimme 'https://raw.githubusercontent.com/meatballhat/gimme/master/gimme' ;
chmod +x ~/bin/gimme ;
fi
script:
- bundle exec bin/system_info "$(curl https://api.github.com/repos/travis-ci/travis-cookbooks/git/refs/heads/master 2>/dev/null | awk -F\\\" '/sha/ {print $4}' | cut -c 1-7)"
- grep -A1 'Cookbooks Version' system_info.txt
- jq -r '.system_info.cookbooks_version.output' < system_info.json | grep travis-cookbooks
- cat system_info.txt
- jq . < system_info.json
| language: ruby
env:
global:
- FORMATS=human,json
- HUMAN_OUTPUT=system_info.txt
- JSON_OUTPUT=system_info.json
- PATH=$HOME/bin:$PATH
matrix:
- COMMANDS_FILE=commands.yml
- COMMANDS_FILE=mini_commands.yml
before_script:
- mkdir -p ~/bin
- if ! jq --version ; then
curl -sLo ~/bin/jq 'http://stedolan.github.io/jq/download/linux64/jq' ;
chmod +x ~/bin/jq ;
fi
- if ! gimme --version ; then
curl -sLo ~/bin/gimme 'https://raw.githubusercontent.com/meatballhat/gimme/master/gimme' ;
chmod +x ~/bin/gimme ;
fi
- gimme 1.4
script:
- bundle exec bin/system_info "$(curl https://api.github.com/repos/travis-ci/travis-cookbooks/git/refs/heads/master 2>/dev/null | awk -F\\\" '/sha/ {print $4}' | cut -c 1-7)"
- grep -A1 'Cookbooks Version' system_info.txt
- jq -r '.system_info.cookbooks_version.output' < system_info.json | grep travis-cookbooks
- cat system_info.txt
- jq . < system_info.json
| Install a go version via gimme prior to script | Install a go version via gimme prior to script
| YAML | mit | travis-ci/system_info,travis-ci/system_info,aprescott/travis-system_info,travis-ci/system-info,travis-ci/system-info | yaml | ## Code Before:
language: ruby
env:
global:
- FORMATS=human,json
- HUMAN_OUTPUT=system_info.txt
- JSON_OUTPUT=system_info.json
- PATH=$HOME/bin:$PATH
matrix:
- COMMANDS_FILE=commands.yml
- COMMANDS_FILE=mini_commands.yml
before_script:
- mkdir -p ~/bin
- if ! jq --version ; then
curl -sLo ~/bin/jq 'http://stedolan.github.io/jq/download/linux64/jq' ;
chmod +x ~/bin/jq ;
fi
- if ! gimme --version ; then
curl -sLo ~/bin/gimme 'https://raw.githubusercontent.com/meatballhat/gimme/master/gimme' ;
chmod +x ~/bin/gimme ;
fi
script:
- bundle exec bin/system_info "$(curl https://api.github.com/repos/travis-ci/travis-cookbooks/git/refs/heads/master 2>/dev/null | awk -F\\\" '/sha/ {print $4}' | cut -c 1-7)"
- grep -A1 'Cookbooks Version' system_info.txt
- jq -r '.system_info.cookbooks_version.output' < system_info.json | grep travis-cookbooks
- cat system_info.txt
- jq . < system_info.json
## Instruction:
Install a go version via gimme prior to script
## Code After:
language: ruby
env:
global:
- FORMATS=human,json
- HUMAN_OUTPUT=system_info.txt
- JSON_OUTPUT=system_info.json
- PATH=$HOME/bin:$PATH
matrix:
- COMMANDS_FILE=commands.yml
- COMMANDS_FILE=mini_commands.yml
before_script:
- mkdir -p ~/bin
- if ! jq --version ; then
curl -sLo ~/bin/jq 'http://stedolan.github.io/jq/download/linux64/jq' ;
chmod +x ~/bin/jq ;
fi
- if ! gimme --version ; then
curl -sLo ~/bin/gimme 'https://raw.githubusercontent.com/meatballhat/gimme/master/gimme' ;
chmod +x ~/bin/gimme ;
fi
- gimme 1.4
script:
- bundle exec bin/system_info "$(curl https://api.github.com/repos/travis-ci/travis-cookbooks/git/refs/heads/master 2>/dev/null | awk -F\\\" '/sha/ {print $4}' | cut -c 1-7)"
- grep -A1 'Cookbooks Version' system_info.txt
- jq -r '.system_info.cookbooks_version.output' < system_info.json | grep travis-cookbooks
- cat system_info.txt
- jq . < system_info.json
|
896d6cbe9e765aea1c161351a214649feea423dd | _config.yml | _config.yml | title: Microsoft Spot Market Team 1 Project Site
description: > # this means to ignore newlines until "baseurl:"
The project site for Microsoft Spot Market Team 1 made as part of COMP204P
Systems Engineering for University College London.
baseurl: "/2016/group5" # the subpath of your site, e.g. /blog
url: "http://students.cs.ucl.ac.uk" # the base hostname & protocol for your site, e.g. http://example.com
# Build settings
markdown: kramdown
highlighter: rouge
permalink: pretty
paginate: 5
exclude: ["less","node_modules","Gruntfile.js","package.json","README.md","Gemfile","Gemfile.lock","LICENSE"]
gems: [jekyll-paginate, jekyll-feed]
| title: Spot Market ChatBot
description: > # this means to ignore newlines until "baseurl:"
The project site for Microsoft Spot Market ChatBot made as part of COMP204P
Systems Engineering for University College London.
baseurl: "/2016/group5" # the subpath of your site, e.g. /blog
url: "http://students.cs.ucl.ac.uk" # the base hostname & protocol for your site, e.g. http://example.com
# Build settings
markdown: kramdown
highlighter: rouge
permalink: pretty
paginate: 5
exclude: ["less","node_modules","Gruntfile.js","package.json","README.md","Gemfile","Gemfile.lock","LICENSE"]
gems: [jekyll-paginate, jekyll-feed]
| Update site name and description | Update site name and description
| YAML | mit | Thalexander/sm1-site,Thalexander/sm1-site,Thalexander/sm1-site | yaml | ## Code Before:
title: Microsoft Spot Market Team 1 Project Site
description: > # this means to ignore newlines until "baseurl:"
The project site for Microsoft Spot Market Team 1 made as part of COMP204P
Systems Engineering for University College London.
baseurl: "/2016/group5" # the subpath of your site, e.g. /blog
url: "http://students.cs.ucl.ac.uk" # the base hostname & protocol for your site, e.g. http://example.com
# Build settings
markdown: kramdown
highlighter: rouge
permalink: pretty
paginate: 5
exclude: ["less","node_modules","Gruntfile.js","package.json","README.md","Gemfile","Gemfile.lock","LICENSE"]
gems: [jekyll-paginate, jekyll-feed]
## Instruction:
Update site name and description
## Code After:
title: Spot Market ChatBot
description: > # this means to ignore newlines until "baseurl:"
The project site for Microsoft Spot Market ChatBot made as part of COMP204P
Systems Engineering for University College London.
baseurl: "/2016/group5" # the subpath of your site, e.g. /blog
url: "http://students.cs.ucl.ac.uk" # the base hostname & protocol for your site, e.g. http://example.com
# Build settings
markdown: kramdown
highlighter: rouge
permalink: pretty
paginate: 5
exclude: ["less","node_modules","Gruntfile.js","package.json","README.md","Gemfile","Gemfile.lock","LICENSE"]
gems: [jekyll-paginate, jekyll-feed]
|
1c636ed67562bcf068b613aea8506e4d994ecfac | lib/facter/vmwaretools_version.rb | lib/facter/vmwaretools_version.rb |
require 'facter'
Facter.add(:vmwaretools_version) do
confine :virtual => :vmware
setcode do
if File::executable?("/usr/bin/vmware-toolbox-cmd")
result = Facter::Util::Resolution.exec("/usr/bin/vmware-toolbox-cmd -v")
if result
result.sub(%r{(\d*\.\d*\.\d*)\.\d*\s+\(build(-\d*)\)},'\1\2')
else
"not installed"
end
else
"not installed"
end
end
end
|
require 'facter'
Facter.add(:vmwaretools_version) do
confine :virtual => :vmware
setcode do
if File::executable?("/usr/bin/vmware-toolbox-cmd")
result = Facter::Util::Resolution.exec("/usr/bin/vmware-toolbox-cmd -v")
if result
version = result.sub(%r{(\d*\.\d*\.\d*)\.\d*\s+\(build(-\d*)\)},'\1\2')
if version.empty? or version.nil?
'0.unknown'
else
version
end
else
"not installed"
end
else
"not installed"
end
end
end
| Fix version detection for wrecked vmware-tools install | Fix version detection for wrecked vmware-tools install
I found a broken version of vmware-tools, basically the vmware-toolbox-cmd
returned nothing. Not for -v or --help.
The change allows the fact to say that a version is installed, but its unknown
which.
This should trigger a clean update (or reinstall).
| Ruby | apache-2.0 | craigwatson/puppet-vmwaretools,craigwatson/puppet-vmwaretools,esalberg/puppet-vmwaretools,esalberg/puppet-vmwaretools | ruby | ## Code Before:
require 'facter'
Facter.add(:vmwaretools_version) do
confine :virtual => :vmware
setcode do
if File::executable?("/usr/bin/vmware-toolbox-cmd")
result = Facter::Util::Resolution.exec("/usr/bin/vmware-toolbox-cmd -v")
if result
result.sub(%r{(\d*\.\d*\.\d*)\.\d*\s+\(build(-\d*)\)},'\1\2')
else
"not installed"
end
else
"not installed"
end
end
end
## Instruction:
Fix version detection for wrecked vmware-tools install
I found a broken version of vmware-tools, basically the vmware-toolbox-cmd
returned nothing. Not for -v or --help.
The change allows the fact to say that a version is installed, but its unknown
which.
This should trigger a clean update (or reinstall).
## Code After:
require 'facter'
Facter.add(:vmwaretools_version) do
confine :virtual => :vmware
setcode do
if File::executable?("/usr/bin/vmware-toolbox-cmd")
result = Facter::Util::Resolution.exec("/usr/bin/vmware-toolbox-cmd -v")
if result
version = result.sub(%r{(\d*\.\d*\.\d*)\.\d*\s+\(build(-\d*)\)},'\1\2')
if version.empty? or version.nil?
'0.unknown'
else
version
end
else
"not installed"
end
else
"not installed"
end
end
end
|
f17473893e37fa990702aefe5ea08b535553dd30 | docs/options/max-warnings.md | docs/options/max-warnings.md |
An error will be thrown if the total number of warnings exceeds the `max-warnings` setting.
## Examples
This can be set as a command-line option:
``` bash
$ sass-lint --max-warnings 50
```
In `.sass-lint.yml`:
``` yaml
options:
max-warnings: 50
```
Or inside a script:
``` javascript
var sassLint = require('sass-lint'),
config = {options: {'max-warnings': 50}};
results = sassLint.lintFiles('sass/**/*.scss', config)
sassLint.failOnError(results, config);
```
|
An error will be thrown if the total number of warnings exceeds the `max-warnings` setting.
> Please note, if you're using this option with the sass-lint CLI and you're specifying the `--no-exit / -q` option too, you will not see an error but an error code of 1 will still be thrown.
## Examples
This can be set as a command-line option:
``` bash
$ sass-lint --max-warnings 50
```
In `.sass-lint.yml`:
``` yaml
options:
max-warnings: 50
```
Or inside a script:
``` javascript
var sassLint = require('sass-lint'),
config = {options: {'max-warnings': 50}};
results = sassLint.lintFiles('sass/**/*.scss', config)
sassLint.failOnError(results, config);
```
| Add warning message to the docs | :mag: Add warning message to the docs
| Markdown | mit | sasstools/sass-lint,sasstools/sass-lint,srowhani/sass-lint,flacerdk/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,bgriffith/sass-lint | markdown | ## Code Before:
An error will be thrown if the total number of warnings exceeds the `max-warnings` setting.
## Examples
This can be set as a command-line option:
``` bash
$ sass-lint --max-warnings 50
```
In `.sass-lint.yml`:
``` yaml
options:
max-warnings: 50
```
Or inside a script:
``` javascript
var sassLint = require('sass-lint'),
config = {options: {'max-warnings': 50}};
results = sassLint.lintFiles('sass/**/*.scss', config)
sassLint.failOnError(results, config);
```
## Instruction:
:mag: Add warning message to the docs
## Code After:
An error will be thrown if the total number of warnings exceeds the `max-warnings` setting.
> Please note, if you're using this option with the sass-lint CLI and you're specifying the `--no-exit / -q` option too, you will not see an error but an error code of 1 will still be thrown.
## Examples
This can be set as a command-line option:
``` bash
$ sass-lint --max-warnings 50
```
In `.sass-lint.yml`:
``` yaml
options:
max-warnings: 50
```
Or inside a script:
``` javascript
var sassLint = require('sass-lint'),
config = {options: {'max-warnings': 50}};
results = sassLint.lintFiles('sass/**/*.scss', config)
sassLint.failOnError(results, config);
```
|
51c20a7c16cb82463c4073efee2c63e3b70e0e2d | README.md | README.md |
You'll find here materials that we have developed at [ENX](https://euranova.eu)
to facilitate [code retreat](http://coderetreat.org).
## Scaffolds
When you're not comfortable with a language, it might take you a lot of time
to scaffold the minimum and start right away. This is a pity!
We provide a scaffold allowing you to start to write code and practice Test
Driven Development quickly for the following programming languages:
* [Bash](scaffolds/bash/README.md)
* [Clojure](scaffolds/clojure/README.md)
* [Java](scaffolds/java/README.md)
* [JavaScript](scaffolds/javascript/README.md)
* [Python](scaffolds/python/README.md)
* [Ruby](scaffolds/ruby/README.md)
* [Rust](scaffolds/rust/README.md)
* [Swift](scaffolds/swift/README.md)
* [C#](scaffolds/csharp/README.md)
* [C++](scaffolds/cpp/README.md)
* [PHP](scaffolds/php/README.md)
## Contributors
* [Toch](https://github.com/toch)
* [jbruggem](https://github.com/jbruggem)
* [albar0n](https://github.com/albar0n)
|
You'll find here materials that we have developed at [ENX](https://euranova.eu)
to facilitate [code retreat](http://coderetreat.org).
## Scaffolds
When you're not comfortable with a language, it might take you a lot of time
to scaffold the minimum and start right away. This is a pity!
We provide a scaffold allowing you to start to write code and practice Test
Driven Development quickly for the following programming languages:
* [Bash](scaffolds/bash/README.md)
* [Clojure](scaffolds/clojure/README.md)
* [C++](scaffolds/cpp/README.md)
* [C#](scaffolds/csharp/README.md)
* [Java](scaffolds/java/README.md)
* [JavaScript](scaffolds/javascript/README.md)
* [PHP](scaffolds/php/README.md)
* [Python](scaffolds/python/README.md)
* [Ruby](scaffolds/ruby/README.md)
* [Rust](scaffolds/rust/README.md)
* [Scala](scaffolds/scala/README.md)
* [Swift](scaffolds/swift/README.md)
## Contributors
* [Toch](https://github.com/toch)
* [jbruggem](https://github.com/jbruggem)
* [albar0n](https://github.com/albar0n)
| Add scala to main readme and order alphabetically | Add scala to main readme and order alphabetically
| Markdown | mit | euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat,euranova/code_retreat | markdown | ## Code Before:
You'll find here materials that we have developed at [ENX](https://euranova.eu)
to facilitate [code retreat](http://coderetreat.org).
## Scaffolds
When you're not comfortable with a language, it might take you a lot of time
to scaffold the minimum and start right away. This is a pity!
We provide a scaffold allowing you to start to write code and practice Test
Driven Development quickly for the following programming languages:
* [Bash](scaffolds/bash/README.md)
* [Clojure](scaffolds/clojure/README.md)
* [Java](scaffolds/java/README.md)
* [JavaScript](scaffolds/javascript/README.md)
* [Python](scaffolds/python/README.md)
* [Ruby](scaffolds/ruby/README.md)
* [Rust](scaffolds/rust/README.md)
* [Swift](scaffolds/swift/README.md)
* [C#](scaffolds/csharp/README.md)
* [C++](scaffolds/cpp/README.md)
* [PHP](scaffolds/php/README.md)
## Contributors
* [Toch](https://github.com/toch)
* [jbruggem](https://github.com/jbruggem)
* [albar0n](https://github.com/albar0n)
## Instruction:
Add scala to main readme and order alphabetically
## Code After:
You'll find here materials that we have developed at [ENX](https://euranova.eu)
to facilitate [code retreat](http://coderetreat.org).
## Scaffolds
When you're not comfortable with a language, it might take you a lot of time
to scaffold the minimum and start right away. This is a pity!
We provide a scaffold allowing you to start to write code and practice Test
Driven Development quickly for the following programming languages:
* [Bash](scaffolds/bash/README.md)
* [Clojure](scaffolds/clojure/README.md)
* [C++](scaffolds/cpp/README.md)
* [C#](scaffolds/csharp/README.md)
* [Java](scaffolds/java/README.md)
* [JavaScript](scaffolds/javascript/README.md)
* [PHP](scaffolds/php/README.md)
* [Python](scaffolds/python/README.md)
* [Ruby](scaffolds/ruby/README.md)
* [Rust](scaffolds/rust/README.md)
* [Scala](scaffolds/scala/README.md)
* [Swift](scaffolds/swift/README.md)
## Contributors
* [Toch](https://github.com/toch)
* [jbruggem](https://github.com/jbruggem)
* [albar0n](https://github.com/albar0n)
|
f01881dc7821be3c1c76239678d459cc4919233a | README.md | README.md |
[PostCSS] plugin for writing Australian Stylesheets.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg
[ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets
## Australian syntax
```css
.foo {
border: yeah-nah;
box-sizing: fair-dinkum;
colour: true-blue !bloody-oath;
visibility: rack-off;
}
```
## CSS output
```css
.foo {
border: none;
box-sizing: border-box;
color: #0581C1 !important;
visibility: hidden;
}
```
## Usage
```js
postcss([ require('postcss-australian-stylesheets') ])
```
See [PostCSS] docs for examples for your environment.
## Thanks to
Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
|
[PostCSS] plugin for writing Australian Stylesheets.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg
[ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets
## Australian syntax
```css
.foo {
border-colour: vb-green;
background-colour: vegemite;
box-sizing: fair-dinkum;
colour: true-blue !bloody-oath;
display: yeah-nah;
text-align: centre;
text-indent: woop-woop;
visibility: rack-off;
}
```
## CSS output
```css
.foo {
border-color: #2D8249;
background-color: #461B00;
box-sizing: border-box;
color: #0581C1 !important;
display: none;
text-align: center;
text-indent: -9999px;
visibility: hidden;
}
```
## Usage
```js
postcss([ require('postcss-australian-stylesheets') ])
```
See [PostCSS] docs for examples for your environment.
## Thanks to
Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
| Update readme following recent additions | Update readme following recent additions
| Markdown | mit | dp-lewis/postcss-australian-stylesheets,lcpriest/postcss-singlish-stylesheets | markdown | ## Code Before:
[PostCSS] plugin for writing Australian Stylesheets.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg
[ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets
## Australian syntax
```css
.foo {
border: yeah-nah;
box-sizing: fair-dinkum;
colour: true-blue !bloody-oath;
visibility: rack-off;
}
```
## CSS output
```css
.foo {
border: none;
box-sizing: border-box;
color: #0581C1 !important;
visibility: hidden;
}
```
## Usage
```js
postcss([ require('postcss-australian-stylesheets') ])
```
See [PostCSS] docs for examples for your environment.
## Thanks to
Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
## Instruction:
Update readme following recent additions
## Code After:
[PostCSS] plugin for writing Australian Stylesheets.
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg
[ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets
## Australian syntax
```css
.foo {
border-colour: vb-green;
background-colour: vegemite;
box-sizing: fair-dinkum;
colour: true-blue !bloody-oath;
display: yeah-nah;
text-align: centre;
text-indent: woop-woop;
visibility: rack-off;
}
```
## CSS output
```css
.foo {
border-color: #2D8249;
background-color: #461B00;
box-sizing: border-box;
color: #0581C1 !important;
display: none;
text-align: center;
text-indent: -9999px;
visibility: hidden;
}
```
## Usage
```js
postcss([ require('postcss-australian-stylesheets') ])
```
See [PostCSS] docs for examples for your environment.
## Thanks to
Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
|
e5a9220d382f9ba0c03a71a238ce2683fe4c6e8d | android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/SdlArtworkTests.java | android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/SdlArtworkTests.java | package com.smartdevicelink.managers.file;
import com.smartdevicelink.AndroidTestCase2;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
import com.smartdevicelink.managers.file.filetypes.SdlFile;
import com.smartdevicelink.proxy.rpc.enums.StaticIconName;
import com.smartdevicelink.test.Test;
public class SdlArtworkTests extends AndroidTestCase2 {
public void testClone(){
SdlArtwork original = Test.GENERAL_ARTWORK;
SdlArtwork clone = original.clone();
assertNotNull(clone);
assertNotSame(original,clone);
assertEquals(original.getResourceId(), clone.getResourceId());
assertEquals(original.getFileData(), clone.getFileData());
assertNotNull(original.getImageRPC());
assertNotNull(clone.getImageRPC());
assertNotSame(original.getImageRPC(),clone.getImageRPC());
assertEquals(original.getImageRPC().getIsTemplate(), clone.getImageRPC().getIsTemplate());
assertEquals(original.getImageRPC().getValue(), clone.getImageRPC().getValue());
assertEquals(original.getImageRPC().getImageType(), clone.getImageRPC().getImageType());
SdlArtwork artwork = new SdlArtwork(StaticIconName.ALBUM);
assertNotNull(artwork);
SdlArtwork staticIconClone = artwork.clone();
assertNotNull(staticIconClone);
assertTrue(clone instanceof Cloneable);
assertTrue(artwork instanceof Cloneable);
}
}
| package com.smartdevicelink.managers.file;
import com.smartdevicelink.AndroidTestCase2;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
import com.smartdevicelink.managers.file.filetypes.SdlFile;
import com.smartdevicelink.proxy.rpc.enums.StaticIconName;
import com.smartdevicelink.test.Test;
public class SdlArtworkTests extends AndroidTestCase2 {
public void testClone(){
SdlArtwork original = Test.GENERAL_ARTWORK;
SdlArtwork clone = original.clone();
equalTest(original, clone);
SdlArtwork artwork = new SdlArtwork(StaticIconName.ALBUM);
assertNotNull(artwork);
SdlArtwork staticIconClone = artwork.clone();
assertNotNull(staticIconClone);
assertTrue(clone instanceof Cloneable);
assertTrue(artwork instanceof Cloneable);
}
public static boolean equalTest(SdlArtwork original, SdlArtwork clone){
assertNotNull(original);
assertNotNull(clone);
assertNotSame(original,clone);
assertEquals(original.getResourceId(), clone.getResourceId());
assertEquals(original.getFileData(), clone.getFileData());
assertNotNull(original.getImageRPC());
assertNotNull(clone.getImageRPC());
assertNotSame(original.getImageRPC(),clone.getImageRPC());
assertEquals(original.getImageRPC().getIsTemplate(), clone.getImageRPC().getIsTemplate());
assertEquals(original.getImageRPC().getValue(), clone.getImageRPC().getValue());
assertEquals(original.getImageRPC().getImageType(), clone.getImageRPC().getImageType());
return true;
}
}
| Update SdlArtwork test to have reusable equalTest | Update SdlArtwork test to have reusable equalTest
| Java | bsd-3-clause | smartdevicelink/sdl_android | java | ## Code Before:
package com.smartdevicelink.managers.file;
import com.smartdevicelink.AndroidTestCase2;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
import com.smartdevicelink.managers.file.filetypes.SdlFile;
import com.smartdevicelink.proxy.rpc.enums.StaticIconName;
import com.smartdevicelink.test.Test;
public class SdlArtworkTests extends AndroidTestCase2 {
public void testClone(){
SdlArtwork original = Test.GENERAL_ARTWORK;
SdlArtwork clone = original.clone();
assertNotNull(clone);
assertNotSame(original,clone);
assertEquals(original.getResourceId(), clone.getResourceId());
assertEquals(original.getFileData(), clone.getFileData());
assertNotNull(original.getImageRPC());
assertNotNull(clone.getImageRPC());
assertNotSame(original.getImageRPC(),clone.getImageRPC());
assertEquals(original.getImageRPC().getIsTemplate(), clone.getImageRPC().getIsTemplate());
assertEquals(original.getImageRPC().getValue(), clone.getImageRPC().getValue());
assertEquals(original.getImageRPC().getImageType(), clone.getImageRPC().getImageType());
SdlArtwork artwork = new SdlArtwork(StaticIconName.ALBUM);
assertNotNull(artwork);
SdlArtwork staticIconClone = artwork.clone();
assertNotNull(staticIconClone);
assertTrue(clone instanceof Cloneable);
assertTrue(artwork instanceof Cloneable);
}
}
## Instruction:
Update SdlArtwork test to have reusable equalTest
## Code After:
package com.smartdevicelink.managers.file;
import com.smartdevicelink.AndroidTestCase2;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
import com.smartdevicelink.managers.file.filetypes.SdlFile;
import com.smartdevicelink.proxy.rpc.enums.StaticIconName;
import com.smartdevicelink.test.Test;
public class SdlArtworkTests extends AndroidTestCase2 {
public void testClone(){
SdlArtwork original = Test.GENERAL_ARTWORK;
SdlArtwork clone = original.clone();
equalTest(original, clone);
SdlArtwork artwork = new SdlArtwork(StaticIconName.ALBUM);
assertNotNull(artwork);
SdlArtwork staticIconClone = artwork.clone();
assertNotNull(staticIconClone);
assertTrue(clone instanceof Cloneable);
assertTrue(artwork instanceof Cloneable);
}
public static boolean equalTest(SdlArtwork original, SdlArtwork clone){
assertNotNull(original);
assertNotNull(clone);
assertNotSame(original,clone);
assertEquals(original.getResourceId(), clone.getResourceId());
assertEquals(original.getFileData(), clone.getFileData());
assertNotNull(original.getImageRPC());
assertNotNull(clone.getImageRPC());
assertNotSame(original.getImageRPC(),clone.getImageRPC());
assertEquals(original.getImageRPC().getIsTemplate(), clone.getImageRPC().getIsTemplate());
assertEquals(original.getImageRPC().getValue(), clone.getImageRPC().getValue());
assertEquals(original.getImageRPC().getImageType(), clone.getImageRPC().getImageType());
return true;
}
}
|
a96dee7b1bff7fb409a798d52d283cd1b9c25175 | app/app/config/routes.jsx | app/app/config/routes.jsx | import React from 'react'
import Main from '../components/Main.jsx'
import CreateUser from '../components/CreateUser.jsx'
import CreateSerf from '../components/CreateSerf.jsx'
import Home from '../components/Home.jsx'
import {Route, IndexRoute} from 'react-router'
const routes = () =>
<Route path="/" component={Main}>
<Route path="users/new" component={CreateUser} />
<Route path="serfs/new" component={CreateSerf} />
<IndexRoute component={Home} />
</Route>
export default routes() | import React from 'react'
import Main from '../components/Main.jsx'
import CreateUser from '../components/user/CreateUser.jsx'
import Home from '../components/home/Home.jsx'
import Login from '../components/user/Login.jsx'
import {Route, IndexRoute} from 'react-router'
const CreateUserWrapper = () => <CreateUser myType={"users"} />
const CreateSerfWrapper = () => <CreateUser myType={"serfs"} />
const routes = () =>
<Route path="/" component={Main}>
<Route path="users/new" component={CreateUserWrapper} />
<Route path="serfs/new" component={CreateSerfWrapper} />
<Route path="sessions/new" component={Login} />
<IndexRoute component={Home} />
</Route>
export default routes() | Add new route for sessions | Add new route for sessions
| JSX | mit | taodav/MicroSerfs,taodav/MicroSerfs | jsx | ## Code Before:
import React from 'react'
import Main from '../components/Main.jsx'
import CreateUser from '../components/CreateUser.jsx'
import CreateSerf from '../components/CreateSerf.jsx'
import Home from '../components/Home.jsx'
import {Route, IndexRoute} from 'react-router'
const routes = () =>
<Route path="/" component={Main}>
<Route path="users/new" component={CreateUser} />
<Route path="serfs/new" component={CreateSerf} />
<IndexRoute component={Home} />
</Route>
export default routes()
## Instruction:
Add new route for sessions
## Code After:
import React from 'react'
import Main from '../components/Main.jsx'
import CreateUser from '../components/user/CreateUser.jsx'
import Home from '../components/home/Home.jsx'
import Login from '../components/user/Login.jsx'
import {Route, IndexRoute} from 'react-router'
const CreateUserWrapper = () => <CreateUser myType={"users"} />
const CreateSerfWrapper = () => <CreateUser myType={"serfs"} />
const routes = () =>
<Route path="/" component={Main}>
<Route path="users/new" component={CreateUserWrapper} />
<Route path="serfs/new" component={CreateSerfWrapper} />
<Route path="sessions/new" component={Login} />
<IndexRoute component={Home} />
</Route>
export default routes() |
0497effe18a9db99e5a9a3853b86825d4bbe8a49 | src/services/pouchdbService.js | src/services/pouchdbService.js | import store from '../store';
export const getInstance = () => {
return store.getState().pouchdb;
};
export const getDocument = async (dbName) => {
const { instance } = getInstance();
try {
const result = await instance.get(dbName);
return result;
} catch (e) {
throw e;
}
};
export const updateDocument = async (ebudgie) => {
const { instance } = getInstance();
try {
const result = await instance.put(ebudgie);
return result;
} catch (e) {
throw e;
}
};
| import store from '../store';
export const getInstance = () => {
return store.getState().pouchdb;
};
export const getDocument = async (docId) => {
const { instance } = getInstance();
try {
const result = await instance.get(docId);
return result;
} catch (e) {
throw e;
}
};
export const updateDocument = async (ebudgie) => {
const { instance } = getInstance();
try {
const result = await instance.put(ebudgie);
return result;
} catch (e) {
throw e;
}
};
| Fix naming for getting document from pouchdb | Fix naming for getting document from pouchdb
| JavaScript | mit | nikolay-radkov/EBudgie,nikolay-radkov/EBudgie,nikolay-radkov/EBudgie | javascript | ## Code Before:
import store from '../store';
export const getInstance = () => {
return store.getState().pouchdb;
};
export const getDocument = async (dbName) => {
const { instance } = getInstance();
try {
const result = await instance.get(dbName);
return result;
} catch (e) {
throw e;
}
};
export const updateDocument = async (ebudgie) => {
const { instance } = getInstance();
try {
const result = await instance.put(ebudgie);
return result;
} catch (e) {
throw e;
}
};
## Instruction:
Fix naming for getting document from pouchdb
## Code After:
import store from '../store';
export const getInstance = () => {
return store.getState().pouchdb;
};
export const getDocument = async (docId) => {
const { instance } = getInstance();
try {
const result = await instance.get(docId);
return result;
} catch (e) {
throw e;
}
};
export const updateDocument = async (ebudgie) => {
const { instance } = getInstance();
try {
const result = await instance.put(ebudgie);
return result;
} catch (e) {
throw e;
}
};
|
56122e9063bc91b34018fbee2e782a4f1c6a7043 | test/integration/git_http_cloning_test.rb | test/integration/git_http_cloning_test.rb | require File.join(File.dirname(__FILE__), "..", "test_helper")
class GitHttpCloningTest < ActionController::IntegrationTest
context 'Request with git clone' do
setup {@request_uri = '/johans-project/johansprojectrepos.git/HEAD'}
should 'set X-Sendfile headers for subdomains allowing HTTP cloning' do
['git.gitorious.org','git.gitorious.local','git.foo.com'].each do |host|
get @request_uri, {}, :host => host
assert_response :success
assert_not_nil(headers['X-Sendfile'])
end
end
should 'not set X-Sendfile for hosts that do not allow HTTP cloning' do
['gitorious.local','foo.local'].each do |host|
get @request_uri, {}, :host => host
assert_response 404
assert_nil(headers['X-Sendfile'])
end
end
end
end
| require File.join(File.dirname(__FILE__), "..", "test_helper")
class GitHttpCloningTest < ActionController::IntegrationTest
context 'Request with git clone' do
setup do
@repository = repositories(:johans)
@request_uri = '/johans-project/johansprojectrepos.git/HEAD'
end
should 'set X-Sendfile headers for subdomains allowing HTTP cloning' do
['git.gitorious.org','git.gitorious.local','git.foo.com'].each do |host|
get @request_uri, {}, :host => host
assert_response :success
assert_not_nil(headers['X-Sendfile'])
assert_equal(File.join(GitoriousConfig['repository_base_path'], @repository.real_gitdir, "HEAD"), headers['X-Sendfile'])
end
end
should 'not set X-Sendfile for hosts that do not allow HTTP cloning' do
['gitorious.local','foo.local'].each do |host|
get @request_uri, {}, :host => host
assert_response :not_found
assert_nil(headers['X-Sendfile'])
end
end
end
end
| Make the git cloning metal test check that the actual filename returned is correct - not only that it is set | Make the git cloning metal test check that the actual filename returned is correct - not only that it is set
| Ruby | agpl-3.0 | deld/gitorious,Gitorious-backup/mainline,SamuelMoraesF/Gitorious,cynipe/gitorious,water/mainline,gnufied/gitorious,balcom/gitorious,gitorious/mainline,vymiheev/Gitorious-OpenStack,ericbutters/eric-gitorious,vymiheev/Gitorious-OpenStack,Gitorious-backup/franklin-devs-phpbbhub,Gitorious-backup/base_uri-fixes,Gitorious-backup/yousource-features,adg29/asi.gitorious,SamuelMoraesF/Gitorious,ericbutters/eric-gitorious,Gitorious-backup/vsr-mainline,rae/gitorious-mainline,deld/gitorious,Gitorious-backup/mainline,elcom/gitorious,SamuelMoraesF/Gitorious,Gitorious-backup/yousource-features,Gitorious-backup/franklin-devs-phpbbhub,Gitorious-backup/yousource,gitorious/mainline,grjones/gitorious-submodule-dependencies,feniix/gitorious,altrair/gitorious-openstack,spencerwp/mainline,elcom/gitorious,njall/wel-gitorious,adg29/asi.gitorious,spencerwp/mainline,feniix/gitorious,fcoury/gitorious,rae/gitorious-mainline,crazycode/gitorious,spencerwp/mainline,Gitorious-backup/yousource-features,Gitorious-backup/vsr-mainline,njall/wel-gitorious,Gitorious-backup/franklin-devs-phpbbhub,cynipe/gitorious,fcoury/gitorious,feniix/gitorious,Gitorious-backup/vsr-mainline,Gitorious-backup/base_uri-fixes,SamuelMoraesF/Gitorious,elcom/gitorious,Gitorious-backup/krawek-gitorious-clone,water/mainline,Gitorious-backup/yousource,altrair/gitorious-openstack,Gitorious-backup/vsr-mainline,tigefa4u/gitorious-mainline,adg29/asi.gitorious,Gitorious-backup/base_uri-fixes,Gitorious-backup/krawek-gitorious-clone,altrair/gitorious-openstack,deld/gitorious,victori/gitorious-jruby,Gitorious-backup/base_uri-fixes,rae/gitorious-mainline,balcom/gitorious,njall/wel-gitorious,Gitorious-backup/mainline,gnufied/gitorious,victori/gitorious-jruby,Gitorious-backup/yousource,grjones/gitorious-submodule-dependencies,tigefa4u/gitorious-mainline,fcoury/gitorious,vymiheev/Gitorious-OpenStack,Gitorious-backup/krawek-gitorious-clone,victori/gitorious-jruby,Gitorious-backup/franklin-devs-phpbbhub,rae/gitorious-mainline,adg29/asi.gitorious,Gitorious-backup/krawek-gitorious-clone,ericbutters/eric-gitorious,Gitorious-backup/yousource,Gitorious-backup/yousource-features,gnufied/gitorious,crazycode/gitorious,cynipe/gitorious,tigefa4u/gitorious-mainline,gitorious/mainline,grjones/gitorious-submodule-dependencies,tigefa4u/gitorious-mainline,balcom/gitorious,spencerwp/mainline,water/mainline,elcom/gitorious,Gitorious-backup/mainline,crazycode/gitorious,gitorious/mainline | ruby | ## Code Before:
require File.join(File.dirname(__FILE__), "..", "test_helper")
class GitHttpCloningTest < ActionController::IntegrationTest
context 'Request with git clone' do
setup {@request_uri = '/johans-project/johansprojectrepos.git/HEAD'}
should 'set X-Sendfile headers for subdomains allowing HTTP cloning' do
['git.gitorious.org','git.gitorious.local','git.foo.com'].each do |host|
get @request_uri, {}, :host => host
assert_response :success
assert_not_nil(headers['X-Sendfile'])
end
end
should 'not set X-Sendfile for hosts that do not allow HTTP cloning' do
['gitorious.local','foo.local'].each do |host|
get @request_uri, {}, :host => host
assert_response 404
assert_nil(headers['X-Sendfile'])
end
end
end
end
## Instruction:
Make the git cloning metal test check that the actual filename returned is correct - not only that it is set
## Code After:
require File.join(File.dirname(__FILE__), "..", "test_helper")
class GitHttpCloningTest < ActionController::IntegrationTest
context 'Request with git clone' do
setup do
@repository = repositories(:johans)
@request_uri = '/johans-project/johansprojectrepos.git/HEAD'
end
should 'set X-Sendfile headers for subdomains allowing HTTP cloning' do
['git.gitorious.org','git.gitorious.local','git.foo.com'].each do |host|
get @request_uri, {}, :host => host
assert_response :success
assert_not_nil(headers['X-Sendfile'])
assert_equal(File.join(GitoriousConfig['repository_base_path'], @repository.real_gitdir, "HEAD"), headers['X-Sendfile'])
end
end
should 'not set X-Sendfile for hosts that do not allow HTTP cloning' do
['gitorious.local','foo.local'].each do |host|
get @request_uri, {}, :host => host
assert_response :not_found
assert_nil(headers['X-Sendfile'])
end
end
end
end
|
5a012182d9f05e155f8b6505b6cee20e9594bfed | scripts/generate-publish-script.js | scripts/generate-publish-script.js |
const path = require("path");
const fs = require("fs-extra");
const should = require("should");
const LATEST = "2";
function generateScript() {
return new Promise((resolve, reject) => {
const packages = [
"node-red-util",
"node-red-runtime",
"node-red-registry",
"node-red-nodes",
"node-red-editor-client",
"node-red-editor-api",
"node-red"
];
const rootPackage = require(path.join(__dirname,"..","package.json"));
const version = rootPackage.version;
const versionParts = version.split(".");
let tagArg = "";
if (versionParts[0] !== LATEST) {
tagArg = `--tag v${versionParts[0]}-maintenance`
} else if (/-/.test(version)) {
tagArg = "--tag next"
}
const lines = [];
packages.forEach(name => {
lines.push(`npm publish ${name}-${version}.tgz ${tagArg}\n`);
})
resolve(lines.join(""))
});
}
if (require.main === module) {
generateScript().then(output => {
console.log(output);
});
} else {
module.exports = generateScript;
}
|
const path = require("path");
const fs = require("fs-extra");
const should = require("should");
const LATEST = "2";
function generateScript() {
return new Promise((resolve, reject) => {
const packages = [
"@node-red/util",
"@node-red/runtime",
"@node-red/registry",
"@node-red/nodes",
"@node-red/editor-client",
"@node-red/editor-api",
"node-red"
];
const rootPackage = require(path.join(__dirname,"..","package.json"));
const version = rootPackage.version;
const versionParts = version.split(".");
let updateNextToLatest = false;
let tagArg = "";
if (versionParts[0] !== LATEST) {
tagArg = `--tag v${versionParts[0]}-maintenance`
} else if (/-/.test(version)) {
tagArg = "--tag next"
} else {
updateNextToLatest = true;
}
const lines = [];
packages.forEach(name => {
const tarName = name.replace(/@/,"").replace(/\//,"-")
lines.push(`npm publish ${tarName}-${version}.tgz ${tagArg}\n`);
if (updateNextToLatest) {
lines.push(`npm dist-tag add ${name}@${version} next\n`);
}
})
resolve(lines.join(""))
});
}
if (require.main === module) {
generateScript().then(output => {
console.log(output);
});
} else {
module.exports = generateScript;
}
| Update gen-publish script to update 'next' tag for main releases | Update gen-publish script to update 'next' tag for main releases
| JavaScript | apache-2.0 | mw75/node-red,node-red/node-red,node-red/node-red,mw75/node-red,mw75/node-red,mw75/node-red,node-red/node-red | javascript | ## Code Before:
const path = require("path");
const fs = require("fs-extra");
const should = require("should");
const LATEST = "2";
function generateScript() {
return new Promise((resolve, reject) => {
const packages = [
"node-red-util",
"node-red-runtime",
"node-red-registry",
"node-red-nodes",
"node-red-editor-client",
"node-red-editor-api",
"node-red"
];
const rootPackage = require(path.join(__dirname,"..","package.json"));
const version = rootPackage.version;
const versionParts = version.split(".");
let tagArg = "";
if (versionParts[0] !== LATEST) {
tagArg = `--tag v${versionParts[0]}-maintenance`
} else if (/-/.test(version)) {
tagArg = "--tag next"
}
const lines = [];
packages.forEach(name => {
lines.push(`npm publish ${name}-${version}.tgz ${tagArg}\n`);
})
resolve(lines.join(""))
});
}
if (require.main === module) {
generateScript().then(output => {
console.log(output);
});
} else {
module.exports = generateScript;
}
## Instruction:
Update gen-publish script to update 'next' tag for main releases
## Code After:
const path = require("path");
const fs = require("fs-extra");
const should = require("should");
const LATEST = "2";
function generateScript() {
return new Promise((resolve, reject) => {
const packages = [
"@node-red/util",
"@node-red/runtime",
"@node-red/registry",
"@node-red/nodes",
"@node-red/editor-client",
"@node-red/editor-api",
"node-red"
];
const rootPackage = require(path.join(__dirname,"..","package.json"));
const version = rootPackage.version;
const versionParts = version.split(".");
let updateNextToLatest = false;
let tagArg = "";
if (versionParts[0] !== LATEST) {
tagArg = `--tag v${versionParts[0]}-maintenance`
} else if (/-/.test(version)) {
tagArg = "--tag next"
} else {
updateNextToLatest = true;
}
const lines = [];
packages.forEach(name => {
const tarName = name.replace(/@/,"").replace(/\//,"-")
lines.push(`npm publish ${tarName}-${version}.tgz ${tagArg}\n`);
if (updateNextToLatest) {
lines.push(`npm dist-tag add ${name}@${version} next\n`);
}
})
resolve(lines.join(""))
});
}
if (require.main === module) {
generateScript().then(output => {
console.log(output);
});
} else {
module.exports = generateScript;
}
|
2aaa0798624fed0e0cb3cd4a51adf91d75db1437 | client/index.html | client/index.html | <!DOCTYPE html>
<html>
<head>
<title>Polyaxon</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/node_modules/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/public/css/global.css">
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Dosis:500&text=Polyaxon" rel="stylesheet" type="text/css">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<base href="/">
</head>
<body>
<header style="background: #485563; height: 45px; margin-bottom: 10px;"></header>
<div class="container layout" id="root"></div>
<!-- Dependencies -->
<script src="./node_modules/react/umd/react.production.min.js"></script>
<script src="./node_modules/react-dom/umd/react-dom.production.min.js"></script>
<!-- Main -->
<script src="./dist/bundle.js"></script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<title>Polyaxon</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/node_modules/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/public/css/global.css">
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Dosis:500&text=Polyaxon" rel="stylesheet" type="text/css">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<base href="/">
</head>
<body>
<header style="background: #485563; height: 45px; margin-bottom: 10px;"></header>
<div class="container layout" id="root"></div>
<!-- Dependencies -->
<script src="./node_modules/react/umd/react.development.js"></script>
<script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
<!-- Main -->
<script src="./dist/bundle.js"></script>
</body>
</html>
| Use dev version for npm dev server | Use dev version for npm dev server
| HTML | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<title>Polyaxon</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/node_modules/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/public/css/global.css">
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Dosis:500&text=Polyaxon" rel="stylesheet" type="text/css">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<base href="/">
</head>
<body>
<header style="background: #485563; height: 45px; margin-bottom: 10px;"></header>
<div class="container layout" id="root"></div>
<!-- Dependencies -->
<script src="./node_modules/react/umd/react.production.min.js"></script>
<script src="./node_modules/react-dom/umd/react-dom.production.min.js"></script>
<!-- Main -->
<script src="./dist/bundle.js"></script>
</body>
</html>
## Instruction:
Use dev version for npm dev server
## Code After:
<!DOCTYPE html>
<html>
<head>
<title>Polyaxon</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/node_modules/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/public/css/global.css">
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Dosis:500&text=Polyaxon" rel="stylesheet" type="text/css">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<base href="/">
</head>
<body>
<header style="background: #485563; height: 45px; margin-bottom: 10px;"></header>
<div class="container layout" id="root"></div>
<!-- Dependencies -->
<script src="./node_modules/react/umd/react.development.js"></script>
<script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
<!-- Main -->
<script src="./dist/bundle.js"></script>
</body>
</html>
|
992ca87157478697fdd06d7314ed8a3d5b801750 | Resources/config/Person-generator.yml | Resources/config/Person-generator.yml | generator: admingenerator.generator.doctrine
params:
model: Melody\UserBundle\Entity\Person
namespace_prefix: Melody\UserBundle
concurrency_lock: ~
bundle_name: MelodyUserBundle
pk_requirement: ~
fields: ~
object_actions:
delete: ~
batch_actions:
delete: ~
builders:
list:
params:
title: List for person
display: ~
actions:
new: ~
object_actions:
edit: ~
delete: ~
excel:
params: ~
filename: ~
filetype: ~
filters:
params:
display: ~
new:
params:
title: New object for person
display: ~
actions:
save: ~
list: ~
edit:
params:
title: "You're editing the object \"%object%\"|{ %object%: Person.title }|"
display: ~
actions:
save: ~
list: ~
show:
params:
title: "You're viewing the object \"%object%\"|{ %object%: Person.title }|"
display: ~
actions:
list: ~
new: ~
actions:
params:
object_actions:
delete: ~
batch_actions:
delete: ~
| generator: admingenerator.generator.doctrine
params:
model: Melody\UserBundle\Entity\Person
namespace_prefix: Melody\UserBundle
concurrency_lock: ~
bundle_name: MelodyUserBundle
pk_requirement: ~
fields: ~
object_actions:
delete: ~
batch_actions:
delete: ~
builders:
list:
params:
title: List for person
display: [given_name,family_name,email,enabled]
actions:
new: ~
object_actions:
edit: ~
delete: ~
excel:
params: ~
filename: ~
filetype: ~
filters:
params:
display: ~
new:
params:
title: New object for person
display: [username,email,enabled,plainPassword,given_name,family_name,gender,address,postal_code,city,country,birth_date,telephone,fax]
actions:
save: ~
list: ~
edit:
params:
title: "You're editing the object \"%object%\"|{ %object%: Person.title }|"
display: [username,email,enabled,plainPassword,given_name,family_name,gender,address,postal_code,city,country,birth_date,telephone,fax]
actions:
save: ~
list: ~
show:
params:
title: "You're viewing the object \"%object%\"|{ %object%: Person.title }|"
display: [username,email,enabled,given_name,family_name,gender,address,postal_code,city,country,birth_date,telephone,fax]
actions:
list: ~
new: ~
actions:
params:
object_actions:
delete: ~
batch_actions:
delete: ~
| Select user fields in admin generator | Select user fields in admin generator | YAML | mit | AlexandreBeaurain/MelodyUser,AlexandreBeaurain/MelodyUser | yaml | ## Code Before:
generator: admingenerator.generator.doctrine
params:
model: Melody\UserBundle\Entity\Person
namespace_prefix: Melody\UserBundle
concurrency_lock: ~
bundle_name: MelodyUserBundle
pk_requirement: ~
fields: ~
object_actions:
delete: ~
batch_actions:
delete: ~
builders:
list:
params:
title: List for person
display: ~
actions:
new: ~
object_actions:
edit: ~
delete: ~
excel:
params: ~
filename: ~
filetype: ~
filters:
params:
display: ~
new:
params:
title: New object for person
display: ~
actions:
save: ~
list: ~
edit:
params:
title: "You're editing the object \"%object%\"|{ %object%: Person.title }|"
display: ~
actions:
save: ~
list: ~
show:
params:
title: "You're viewing the object \"%object%\"|{ %object%: Person.title }|"
display: ~
actions:
list: ~
new: ~
actions:
params:
object_actions:
delete: ~
batch_actions:
delete: ~
## Instruction:
Select user fields in admin generator
## Code After:
generator: admingenerator.generator.doctrine
params:
model: Melody\UserBundle\Entity\Person
namespace_prefix: Melody\UserBundle
concurrency_lock: ~
bundle_name: MelodyUserBundle
pk_requirement: ~
fields: ~
object_actions:
delete: ~
batch_actions:
delete: ~
builders:
list:
params:
title: List for person
display: [given_name,family_name,email,enabled]
actions:
new: ~
object_actions:
edit: ~
delete: ~
excel:
params: ~
filename: ~
filetype: ~
filters:
params:
display: ~
new:
params:
title: New object for person
display: [username,email,enabled,plainPassword,given_name,family_name,gender,address,postal_code,city,country,birth_date,telephone,fax]
actions:
save: ~
list: ~
edit:
params:
title: "You're editing the object \"%object%\"|{ %object%: Person.title }|"
display: [username,email,enabled,plainPassword,given_name,family_name,gender,address,postal_code,city,country,birth_date,telephone,fax]
actions:
save: ~
list: ~
show:
params:
title: "You're viewing the object \"%object%\"|{ %object%: Person.title }|"
display: [username,email,enabled,given_name,family_name,gender,address,postal_code,city,country,birth_date,telephone,fax]
actions:
list: ~
new: ~
actions:
params:
object_actions:
delete: ~
batch_actions:
delete: ~
|
e6cb71bd6f57c96b40061c9e0818ac13702ef91a | .cloud66/install_postgresql_client.sh | .cloud66/install_postgresql_client.sh | add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
apt-get install postgresql-client-12 -y
| add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
apt-get install postgresql-client-13 -y
| Update PG client installer to use distro-specific repo | Update PG client installer to use distro-specific repo
| Shell | apache-2.0 | CredentialEngine/CredentialRegistry,CredentialEngine/CredentialRegistry,CredentialEngine/CredentialRegistry | shell | ## Code Before:
add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
apt-get install postgresql-client-12 -y
## Instruction:
Update PG client installer to use distro-specific repo
## Code After:
add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
apt-get install postgresql-client-13 -y
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.