commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4036b9f7009c65aa1889b80ddbb81f2ad95dc873 | src/handler_adaptor.js | src/handler_adaptor.js | define(['lib/def', 'handler'], function(Def, Handler) {
var HandlerAdaptor = Def.type(Handler, function(handler) {
Handler.call(this);
this.def_prop('handler', handler);
});
HandlerAdaptor.def_method(function on_message(msg, cont) {
if (this.handler.match(msg))
return msg.respond(this.handler.execute(msg), cont);
return cont(msg);
});
return HandlerAdaptor;
});
| define(['lib/def', 'handler'], function(Def, Handler) {
var HandlerAdaptor = Def.type(Handler, function(handler) {
this.constructor.__super__.call(this);
this.def_prop('handler', handler);
});
HandlerAdaptor.def_method(function on_message(msg, cont) {
if (this.handler.match(msg))
return msg.respond(this.handler.execute(msg), cont);
return cont(msg);
});
return HandlerAdaptor;
});
| Refactor constructor to take advantage of __super__ member. | Refactor constructor to take advantage of __super__ member.
| JavaScript | mit | bassettmb/slack-bot-dev | javascript | ## Code Before:
define(['lib/def', 'handler'], function(Def, Handler) {
var HandlerAdaptor = Def.type(Handler, function(handler) {
Handler.call(this);
this.def_prop('handler', handler);
});
HandlerAdaptor.def_method(function on_message(msg, cont) {
if (this.handler.match(msg))
return msg.respond(this.handler.execute(msg), cont);
return cont(msg);
});
return HandlerAdaptor;
});
## Instruction:
Refactor constructor to take advantage of __super__ member.
## Code After:
define(['lib/def', 'handler'], function(Def, Handler) {
var HandlerAdaptor = Def.type(Handler, function(handler) {
this.constructor.__super__.call(this);
this.def_prop('handler', handler);
});
HandlerAdaptor.def_method(function on_message(msg, cont) {
if (this.handler.match(msg))
return msg.respond(this.handler.execute(msg), cont);
return cont(msg);
});
return HandlerAdaptor;
});
| define(['lib/def', 'handler'], function(Def, Handler) {
var HandlerAdaptor = Def.type(Handler, function(handler) {
- Handler.call(this);
+ this.constructor.__super__.call(this);
this.def_prop('handler', handler);
});
HandlerAdaptor.def_method(function on_message(msg, cont) {
if (this.handler.match(msg))
return msg.respond(this.handler.execute(msg), cont);
return cont(msg);
});
return HandlerAdaptor;
}); | 2 | 0.125 | 1 | 1 |
18c0d27d728a3246d59ab8b395ff75c26e11f1fc | website/data/alert-banner.js | website/data/alert-banner.js | export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'Announcing',
url: 'https://www.hashicorp.com/blog/announcing-cloud-platform',
text: 'HashiCorp Cloud Platform Now in Private Beta with HCP Consul on AWS',
}
| export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'Announcing',
url: 'https://www.hashicorp.com/blog/consul-service-on-azure-general-availability',
text: 'HashiCorp Consul Service on Azure General Availability',
}
| Update alert banner to HCS GA | Update alert banner to HCS GA
| JavaScript | mpl-2.0 | hashicorp/consul,hashicorp/consul,hashicorp/consul,hashicorp/consul | javascript | ## Code Before:
export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'Announcing',
url: 'https://www.hashicorp.com/blog/announcing-cloud-platform',
text: 'HashiCorp Cloud Platform Now in Private Beta with HCP Consul on AWS',
}
## Instruction:
Update alert banner to HCS GA
## Code After:
export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'Announcing',
url: 'https://www.hashicorp.com/blog/consul-service-on-azure-general-availability',
text: 'HashiCorp Consul Service on Azure General Availability',
}
| export const ALERT_BANNER_ACTIVE = true
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
export default {
tag: 'Announcing',
- url: 'https://www.hashicorp.com/blog/announcing-cloud-platform',
- text: 'HashiCorp Cloud Platform Now in Private Beta with HCP Consul on AWS',
+ url: 'https://www.hashicorp.com/blog/consul-service-on-azure-general-availability',
+ text: 'HashiCorp Consul Service on Azure General Availability',
} | 4 | 0.5 | 2 | 2 |
bef736ad7309b7a1e60b8d9935e546aced0c2531 | addons/options/src/preview/index.js | addons/options/src/preview/index.js | import addons from '@storybook/addons';
import { EVENT_ID } from '../shared';
// init function will be executed once when the storybook loads for the
// first time. This is a good place to add global listeners on channel.
export function init() {
// NOTE nothing to do here
}
function regExpStringify(exp) {
if (typeof exp === 'string') return exp;
if (Object.prototype.toString.call(exp) === '[object RegExp]') return exp.source;
return null;
}
// setOptions function will send Storybook UI options when the channel is
// ready. If called before, options will be cached until it can be sent.
export function setOptions(newOptions) {
const channel = addons.getChannel();
if (!channel) {
throw new Error(
'Failed to find addon channel. This may be due to https://github.com/storybooks/storybook/issues/1192.'
);
}
const options = {
...newOptions,
hierarchySeparator: regExpStringify(newOptions.hierarchySeparator),
};
channel.emit(EVENT_ID, { options });
}
| import addons from '@storybook/addons';
import { EVENT_ID } from '../shared';
// init function will be executed once when the storybook loads for the
// first time. This is a good place to add global listeners on channel.
export function init() {
// NOTE nothing to do here
}
function regExpStringify(exp) {
if (typeof exp === 'string') return exp;
if (Object.prototype.toString.call(exp) === '[object RegExp]') return exp.source;
return null;
}
// setOptions function will send Storybook UI options when the channel is
// ready. If called before, options will be cached until it can be sent.
export function setOptions(newOptions) {
const channel = addons.getChannel();
if (!channel) {
throw new Error(
'Failed to find addon channel. This may be due to https://github.com/storybooks/storybook/issues/1192.'
);
}
let options = newOptions;
// since 'undefined' and 'null' are the valid values we don't want to
// override the hierarchySeparator if the prop is missing
if (Object.prototype.hasOwnProperty.call(newOptions, 'hierarchySeparator')) {
options = {
...newOptions,
hierarchySeparator: regExpStringify(newOptions.hierarchySeparator),
};
}
channel.emit(EVENT_ID, { options });
}
| Check if hierarchySeparator presents in the options object | Check if hierarchySeparator presents in the options object
| JavaScript | mit | storybooks/storybook,kadirahq/react-storybook,rhalff/storybook,storybooks/react-storybook,rhalff/storybook,rhalff/storybook,rhalff/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,rhalff/storybook,rhalff/storybook,storybooks/react-storybook | javascript | ## Code Before:
import addons from '@storybook/addons';
import { EVENT_ID } from '../shared';
// init function will be executed once when the storybook loads for the
// first time. This is a good place to add global listeners on channel.
export function init() {
// NOTE nothing to do here
}
function regExpStringify(exp) {
if (typeof exp === 'string') return exp;
if (Object.prototype.toString.call(exp) === '[object RegExp]') return exp.source;
return null;
}
// setOptions function will send Storybook UI options when the channel is
// ready. If called before, options will be cached until it can be sent.
export function setOptions(newOptions) {
const channel = addons.getChannel();
if (!channel) {
throw new Error(
'Failed to find addon channel. This may be due to https://github.com/storybooks/storybook/issues/1192.'
);
}
const options = {
...newOptions,
hierarchySeparator: regExpStringify(newOptions.hierarchySeparator),
};
channel.emit(EVENT_ID, { options });
}
## Instruction:
Check if hierarchySeparator presents in the options object
## Code After:
import addons from '@storybook/addons';
import { EVENT_ID } from '../shared';
// init function will be executed once when the storybook loads for the
// first time. This is a good place to add global listeners on channel.
export function init() {
// NOTE nothing to do here
}
function regExpStringify(exp) {
if (typeof exp === 'string') return exp;
if (Object.prototype.toString.call(exp) === '[object RegExp]') return exp.source;
return null;
}
// setOptions function will send Storybook UI options when the channel is
// ready. If called before, options will be cached until it can be sent.
export function setOptions(newOptions) {
const channel = addons.getChannel();
if (!channel) {
throw new Error(
'Failed to find addon channel. This may be due to https://github.com/storybooks/storybook/issues/1192.'
);
}
let options = newOptions;
// since 'undefined' and 'null' are the valid values we don't want to
// override the hierarchySeparator if the prop is missing
if (Object.prototype.hasOwnProperty.call(newOptions, 'hierarchySeparator')) {
options = {
...newOptions,
hierarchySeparator: regExpStringify(newOptions.hierarchySeparator),
};
}
channel.emit(EVENT_ID, { options });
}
| import addons from '@storybook/addons';
import { EVENT_ID } from '../shared';
// init function will be executed once when the storybook loads for the
// first time. This is a good place to add global listeners on channel.
export function init() {
// NOTE nothing to do here
}
function regExpStringify(exp) {
if (typeof exp === 'string') return exp;
if (Object.prototype.toString.call(exp) === '[object RegExp]') return exp.source;
return null;
}
// setOptions function will send Storybook UI options when the channel is
// ready. If called before, options will be cached until it can be sent.
export function setOptions(newOptions) {
const channel = addons.getChannel();
if (!channel) {
throw new Error(
'Failed to find addon channel. This may be due to https://github.com/storybooks/storybook/issues/1192.'
);
}
+
+ let options = newOptions;
+
+ // since 'undefined' and 'null' are the valid values we don't want to
+ // override the hierarchySeparator if the prop is missing
+ if (Object.prototype.hasOwnProperty.call(newOptions, 'hierarchySeparator')) {
- const options = {
? ^^^^^
+ options = {
? ^
- ...newOptions,
+ ...newOptions,
? ++
- hierarchySeparator: regExpStringify(newOptions.hierarchySeparator),
+ hierarchySeparator: regExpStringify(newOptions.hierarchySeparator),
? ++
+ };
- };
? -
+ }
channel.emit(EVENT_ID, { options });
} | 15 | 0.483871 | 11 | 4 |
b6a6b3e35061790321038b83300f574ce4a7d3a3 | src/main/java/bio/terra/cli/command/config/getvalue/Logging.java | src/main/java/bio/terra/cli/command/config/getvalue/Logging.java | package bio.terra.cli.command.config.getvalue;
import bio.terra.cli.context.GlobalContext;
import java.util.concurrent.Callable;
import org.slf4j.LoggerFactory;
import picocli.CommandLine.Command;
/** This class corresponds to the fourth-level "terra config get-value logging" command. */
@Command(name = "logging", description = "Get the logging level.")
public class Logging implements Callable<Integer> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Logging.class);
@Override
public Integer call() {
GlobalContext globalContext = GlobalContext.readFromFile();
System.out.println(
"[console] logging level for printing directly to the terminal = "
+ globalContext.consoleLoggingLevel);
System.out.println(
"[file] logging level for writing to files in $HOME/.terra/logs/ = "
+ globalContext.fileLoggingLevel);
return 0;
}
}
| package bio.terra.cli.command.config.getvalue;
import bio.terra.cli.context.GlobalContext;
import java.util.concurrent.Callable;
import org.slf4j.LoggerFactory;
import picocli.CommandLine.Command;
/** This class corresponds to the fourth-level "terra config get-value logging" command. */
@Command(name = "logging", description = "Get the logging level.")
public class Logging implements Callable<Integer> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Logging.class);
@Override
public Integer call() {
GlobalContext globalContext = GlobalContext.readFromFile();
System.out.println(
"[console] logging level for printing directly to the terminal = "
+ globalContext.consoleLoggingLevel);
System.out.println(
"[file] logging level for writing to files in "
+ GlobalContext.getLogFile().getParent()
+ " = "
+ globalContext.fileLoggingLevel);
return 0;
}
}
| Use log dir from global context instead of hard-coded string. | Use log dir from global context instead of hard-coded string.
| Java | bsd-3-clause | DataBiosphere/terra-cli,DataBiosphere/terra-cli | java | ## Code Before:
package bio.terra.cli.command.config.getvalue;
import bio.terra.cli.context.GlobalContext;
import java.util.concurrent.Callable;
import org.slf4j.LoggerFactory;
import picocli.CommandLine.Command;
/** This class corresponds to the fourth-level "terra config get-value logging" command. */
@Command(name = "logging", description = "Get the logging level.")
public class Logging implements Callable<Integer> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Logging.class);
@Override
public Integer call() {
GlobalContext globalContext = GlobalContext.readFromFile();
System.out.println(
"[console] logging level for printing directly to the terminal = "
+ globalContext.consoleLoggingLevel);
System.out.println(
"[file] logging level for writing to files in $HOME/.terra/logs/ = "
+ globalContext.fileLoggingLevel);
return 0;
}
}
## Instruction:
Use log dir from global context instead of hard-coded string.
## Code After:
package bio.terra.cli.command.config.getvalue;
import bio.terra.cli.context.GlobalContext;
import java.util.concurrent.Callable;
import org.slf4j.LoggerFactory;
import picocli.CommandLine.Command;
/** This class corresponds to the fourth-level "terra config get-value logging" command. */
@Command(name = "logging", description = "Get the logging level.")
public class Logging implements Callable<Integer> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Logging.class);
@Override
public Integer call() {
GlobalContext globalContext = GlobalContext.readFromFile();
System.out.println(
"[console] logging level for printing directly to the terminal = "
+ globalContext.consoleLoggingLevel);
System.out.println(
"[file] logging level for writing to files in "
+ GlobalContext.getLogFile().getParent()
+ " = "
+ globalContext.fileLoggingLevel);
return 0;
}
}
| package bio.terra.cli.command.config.getvalue;
import bio.terra.cli.context.GlobalContext;
import java.util.concurrent.Callable;
import org.slf4j.LoggerFactory;
import picocli.CommandLine.Command;
/** This class corresponds to the fourth-level "terra config get-value logging" command. */
@Command(name = "logging", description = "Get the logging level.")
public class Logging implements Callable<Integer> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(Logging.class);
@Override
public Integer call() {
GlobalContext globalContext = GlobalContext.readFromFile();
System.out.println(
"[console] logging level for printing directly to the terminal = "
+ globalContext.consoleLoggingLevel);
System.out.println(
- "[file] logging level for writing to files in $HOME/.terra/logs/ = "
? ---------------------
+ "[file] logging level for writing to files in "
+ + GlobalContext.getLogFile().getParent()
+ + " = "
+ globalContext.fileLoggingLevel);
return 0;
}
} | 4 | 0.153846 | 3 | 1 |
5176f384a2d457453e0d722f133640987b4d792a | jsdoc_conf.json | jsdoc_conf.json | {
"tags": {
"allowUnknownTags": true
},
"source": {
"include": [ "index.js", "src" ],
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"package": "package.json",
"readme": "README.md"
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
}
}
| {
"tags": {
"allowUnknownTags": true
},
"source": {
"include": [ "src/node/index.js", "src/node/src" ],
"includePattern": "src/node/.+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"package": "package.json",
"readme": "src/node/README.md"
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
}
}
| Update Node API documentation generation configuration for move to repo root | Update Node API documentation generation configuration for move to repo root
| JSON | apache-2.0 | grpc/grpc-node,grpc/grpc-node,grpc/grpc-node,grpc/grpc-node | json | ## Code Before:
{
"tags": {
"allowUnknownTags": true
},
"source": {
"include": [ "index.js", "src" ],
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"package": "package.json",
"readme": "README.md"
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
}
}
## Instruction:
Update Node API documentation generation configuration for move to repo root
## Code After:
{
"tags": {
"allowUnknownTags": true
},
"source": {
"include": [ "src/node/index.js", "src/node/src" ],
"includePattern": "src/node/.+\\.js(doc)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"package": "package.json",
"readme": "src/node/README.md"
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
}
}
| {
"tags": {
"allowUnknownTags": true
},
"source": {
- "include": [ "index.js", "src" ],
+ "include": [ "src/node/index.js", "src/node/src" ],
? +++++++++ +++++++++
- "includePattern": ".+\\.js(doc)?$",
+ "includePattern": "src/node/.+\\.js(doc)?$",
? +++++++++
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"package": "package.json",
- "readme": "README.md"
+ "readme": "src/node/README.md"
? +++++++++
},
"plugins": [],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
}
} | 6 | 0.272727 | 3 | 3 |
88285aefe1f01132dfcb244f069dd08224f8d9a9 | README.md | README.md |
These are config files to set up a system the I like it. It uses
[Fish Shell](http://fishshell.com) and has only tested with Mac OS X.
## Installation
Run the following commands in your terminal. It will prompt you before it does anything destructive. Check out the [Rakefile](https://github.com/ryanb/dotfiles/blob/custom-bash-zsh/Rakefile) to see exactly what it does.
```terminal
git clone git://github.com/gshaw/dotfiles ~/.dotfiles
cd ~/.dotfiles
rake install
```
After installing, open a new terminal window to see the effects.
## Homebrew
Update Homebrew packages and casks using:
```
brew list | xargs -L1 > Brewfile
brew cask list | xargs -L1 > Caskfile
```
To restore packages:
```
cat Brewfile | xargs brew
cat Caskfile | xargs brew cask
```
## Features
* Greet each new terminal with a fortune. `brew install fortune`
* Custom Git prompt to detect branch and if branch is modified.
* Custom abbreviations for common actions

|
These are config files to set up a system the I like it. It uses
[Fish Shell](http://fishshell.com) and has only tested with Mac OS X.
## Installation
Run the following commands in your terminal. It will prompt you before it does anything destructive. Check out the [Rakefile](https://github.com/ryanb/dotfiles/blob/custom-bash-zsh/Rakefile) to see exactly what it does.
```terminal
git clone git://github.com/gshaw/dotfiles ~/.dotfiles
cd ~/.dotfiles
rake install
```
After installing, open a new terminal window to see the effects.
## Homebrew
Update Homebrew packages and casks using:
```
brew list > ~/.dotfiles/brew/Brewfile
brew cask list > ~/.dotfiles/brew/Caskfile
```
To restore packages:
```
cat Brewfile | xargs brew
cat Caskfile | xargs brew cask
```
## Features
* Greet each new terminal with a fortune. `brew install fortune`
* Custom Git prompt to detect branch and if branch is modified.
* Custom abbreviations for common actions

| Improve instructions for saving brews and casks | Improve instructions for saving brews and casks | Markdown | mit | gshaw/dotfiles,gshaw/dotfiles | markdown | ## Code Before:
These are config files to set up a system the I like it. It uses
[Fish Shell](http://fishshell.com) and has only tested with Mac OS X.
## Installation
Run the following commands in your terminal. It will prompt you before it does anything destructive. Check out the [Rakefile](https://github.com/ryanb/dotfiles/blob/custom-bash-zsh/Rakefile) to see exactly what it does.
```terminal
git clone git://github.com/gshaw/dotfiles ~/.dotfiles
cd ~/.dotfiles
rake install
```
After installing, open a new terminal window to see the effects.
## Homebrew
Update Homebrew packages and casks using:
```
brew list | xargs -L1 > Brewfile
brew cask list | xargs -L1 > Caskfile
```
To restore packages:
```
cat Brewfile | xargs brew
cat Caskfile | xargs brew cask
```
## Features
* Greet each new terminal with a fortune. `brew install fortune`
* Custom Git prompt to detect branch and if branch is modified.
* Custom abbreviations for common actions

## Instruction:
Improve instructions for saving brews and casks
## Code After:
These are config files to set up a system the I like it. It uses
[Fish Shell](http://fishshell.com) and has only tested with Mac OS X.
## Installation
Run the following commands in your terminal. It will prompt you before it does anything destructive. Check out the [Rakefile](https://github.com/ryanb/dotfiles/blob/custom-bash-zsh/Rakefile) to see exactly what it does.
```terminal
git clone git://github.com/gshaw/dotfiles ~/.dotfiles
cd ~/.dotfiles
rake install
```
After installing, open a new terminal window to see the effects.
## Homebrew
Update Homebrew packages and casks using:
```
brew list > ~/.dotfiles/brew/Brewfile
brew cask list > ~/.dotfiles/brew/Caskfile
```
To restore packages:
```
cat Brewfile | xargs brew
cat Caskfile | xargs brew cask
```
## Features
* Greet each new terminal with a fortune. `brew install fortune`
* Custom Git prompt to detect branch and if branch is modified.
* Custom abbreviations for common actions

|
These are config files to set up a system the I like it. It uses
[Fish Shell](http://fishshell.com) and has only tested with Mac OS X.
## Installation
Run the following commands in your terminal. It will prompt you before it does anything destructive. Check out the [Rakefile](https://github.com/ryanb/dotfiles/blob/custom-bash-zsh/Rakefile) to see exactly what it does.
```terminal
git clone git://github.com/gshaw/dotfiles ~/.dotfiles
cd ~/.dotfiles
rake install
```
After installing, open a new terminal window to see the effects.
## Homebrew
Update Homebrew packages and casks using:
```
- brew list | xargs -L1 > Brewfile
- brew cask list | xargs -L1 > Caskfile
+ brew list > ~/.dotfiles/brew/Brewfile
+ brew cask list > ~/.dotfiles/brew/Caskfile
```
To restore packages:
```
cat Brewfile | xargs brew
cat Caskfile | xargs brew cask
```
## Features
* Greet each new terminal with a fortune. `brew install fortune`
* Custom Git prompt to detect branch and if branch is modified.
* Custom abbreviations for common actions
 | 4 | 0.097561 | 2 | 2 |
f82c2f109514c2fbff8d65181885f5740036b1fc | README.md | README.md |
Wire up the [CodeMirror](http://codemirror.net/) assets for your Rails
applications.
## Getting Started
If you're using Bundler, you can add codemirror-rails to your Gemfile:
```ruby
gem 'codemirror-rails'
```
Or manually install the codemirror-rails gem:
```shell
gem install codemirror-rails
```
## CodeMirror for Rails 3.1
All of the assets from the most latest stable CodeMirror release are vendored
so that you can use them with the asset pipeline. At a minimum, you will
probably want the following in your application.js and application.css:
```js
//= require codemirror
```
### Adding a mode
Additional syntax modes can be added to your application.js:
```js
//= require codemirror/modes/ruby
```
### Adding a keymap
Additional keymap bindings can be added to your application.js:
```js
//= require codemirror/keymaps/vim
```
### Adding a theme
Additional CSS themes can be added to your application.css
```js
//= require codemirror/themes/night
```
## CodeMirror for Rails 3
You can use the generator included with this gem to copy the CodeMirror 2
assets into your Rails 3 public directory.
```shell
rails generate codemirror:install
```
|
Wire up the [CodeMirror](http://codemirror.net/) assets for your Rails
applications.
## Getting Started
If you're using Bundler, you can add codemirror-rails to your Gemfile:
```ruby
gem 'codemirror-rails'
```
Or manually install the codemirror-rails gem:
```shell
gem install codemirror-rails
```
## CodeMirror for Rails 3.1
All of the assets from the most latest stable CodeMirror release are vendored
so that you can use them with the asset pipeline. At a minimum, you will
probably want the following in your application.js and application.css:
```js
//= require codemirror
```
### Adding a mode
Additional syntax modes can be added to your application.js:
```js
//= require codemirror/modes/ruby
```
### Adding a util
Additional reusable util components can be added in your application.js:
```js
//= require codemirror/utils/dialog
```
### Adding a keymap
Additional keymap bindings can be added to your application.js:
```js
//= require codemirror/keymaps/vim
```
### Adding a theme
Additional CSS themes can be added to your application.css
```js
//= require codemirror/themes/night
```
## CodeMirror for Rails 3
You can use the generator included with this gem to copy the CodeMirror 2
assets into your Rails 3 public directory.
```shell
rails generate codemirror:install
```
| Add a note about utils | Add a note about utils
| Markdown | mit | fixlr/codemirror-rails,fixlr/codemirror-rails,reneklacan/codemirror-rails,reneklacan/codemirror-rails,fixlr/codemirror-rails,pwnall/codemirror-rails,pwnall/codemirror-rails,reneklacan/codemirror-rails,pwnall/codemirror-rails | markdown | ## Code Before:
Wire up the [CodeMirror](http://codemirror.net/) assets for your Rails
applications.
## Getting Started
If you're using Bundler, you can add codemirror-rails to your Gemfile:
```ruby
gem 'codemirror-rails'
```
Or manually install the codemirror-rails gem:
```shell
gem install codemirror-rails
```
## CodeMirror for Rails 3.1
All of the assets from the most latest stable CodeMirror release are vendored
so that you can use them with the asset pipeline. At a minimum, you will
probably want the following in your application.js and application.css:
```js
//= require codemirror
```
### Adding a mode
Additional syntax modes can be added to your application.js:
```js
//= require codemirror/modes/ruby
```
### Adding a keymap
Additional keymap bindings can be added to your application.js:
```js
//= require codemirror/keymaps/vim
```
### Adding a theme
Additional CSS themes can be added to your application.css
```js
//= require codemirror/themes/night
```
## CodeMirror for Rails 3
You can use the generator included with this gem to copy the CodeMirror 2
assets into your Rails 3 public directory.
```shell
rails generate codemirror:install
```
## Instruction:
Add a note about utils
## Code After:
Wire up the [CodeMirror](http://codemirror.net/) assets for your Rails
applications.
## Getting Started
If you're using Bundler, you can add codemirror-rails to your Gemfile:
```ruby
gem 'codemirror-rails'
```
Or manually install the codemirror-rails gem:
```shell
gem install codemirror-rails
```
## CodeMirror for Rails 3.1
All of the assets from the most latest stable CodeMirror release are vendored
so that you can use them with the asset pipeline. At a minimum, you will
probably want the following in your application.js and application.css:
```js
//= require codemirror
```
### Adding a mode
Additional syntax modes can be added to your application.js:
```js
//= require codemirror/modes/ruby
```
### Adding a util
Additional reusable util components can be added in your application.js:
```js
//= require codemirror/utils/dialog
```
### Adding a keymap
Additional keymap bindings can be added to your application.js:
```js
//= require codemirror/keymaps/vim
```
### Adding a theme
Additional CSS themes can be added to your application.css
```js
//= require codemirror/themes/night
```
## CodeMirror for Rails 3
You can use the generator included with this gem to copy the CodeMirror 2
assets into your Rails 3 public directory.
```shell
rails generate codemirror:install
```
|
Wire up the [CodeMirror](http://codemirror.net/) assets for your Rails
applications.
## Getting Started
If you're using Bundler, you can add codemirror-rails to your Gemfile:
```ruby
gem 'codemirror-rails'
```
Or manually install the codemirror-rails gem:
```shell
gem install codemirror-rails
```
## CodeMirror for Rails 3.1
All of the assets from the most latest stable CodeMirror release are vendored
so that you can use them with the asset pipeline. At a minimum, you will
probably want the following in your application.js and application.css:
```js
//= require codemirror
```
### Adding a mode
Additional syntax modes can be added to your application.js:
```js
//= require codemirror/modes/ruby
```
+ ### Adding a util
+
+ Additional reusable util components can be added in your application.js:
+
+ ```js
+ //= require codemirror/utils/dialog
+ ```
+
### Adding a keymap
Additional keymap bindings can be added to your application.js:
```js
//= require codemirror/keymaps/vim
```
### Adding a theme
Additional CSS themes can be added to your application.css
```js
//= require codemirror/themes/night
```
## CodeMirror for Rails 3
You can use the generator included with this gem to copy the CodeMirror 2
assets into your Rails 3 public directory.
```shell
rails generate codemirror:install
``` | 8 | 0.133333 | 8 | 0 |
d0efc7cc98f48ee38bbcefb0f3ded99b7b3ef4d7 | web/css/styles.css | web/css/styles.css | /* @copyright: 2013 Single D Software - All Rights Reserved
@summary: Cascading style sheet for the Light Maestro GUI */
* {
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
}
.ui-focus, .ui-btn:focus {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#fixture-layout .ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d {
text-align: center;
}
#fixture-layout .ui-checkbox-on, .ui-checkbox-off {
padding: 3px;
}
#fixture-layout .ui-checkbox .ui-btn-inner {
border: 1px solid black;
}
#control-buttons .ui-block-a, .ui-block-b {
text-align: center;
}
#white-palette .ui-btn, #color-palette .ui-btn {
margin: 5px;
}
div[data-role="footer"] {
text-align: center;
} | /* @copyright: 2013 Single D Software - All Rights Reserved
@summary: Cascading style sheet for the Light Maestro GUI */
* {
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
}
input[type="text"] {
-webkit-user-select: text !important;
}
.ui-focus, .ui-btn:focus {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#fixture-layout .ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d {
text-align: center;
}
#fixture-layout .ui-checkbox-on, .ui-checkbox-off {
padding: 3px;
}
#fixture-layout .ui-checkbox .ui-btn-inner {
border: 1px solid black;
}
#control-buttons .ui-block-a, .ui-block-b {
text-align: center;
}
#white-palette .ui-btn, #color-palette .ui-btn {
margin: 5px;
}
div[data-role="footer"] {
text-align: center;
} | Allow selection of text in a text box (but that's it). | Allow selection of text in a text box (but that's it).
| CSS | apache-2.0 | lordjabez/light-maestro,lordjabez/light-maestro,lordjabez/light-maestro,lordjabez/light-maestro | css | ## Code Before:
/* @copyright: 2013 Single D Software - All Rights Reserved
@summary: Cascading style sheet for the Light Maestro GUI */
* {
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
}
.ui-focus, .ui-btn:focus {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#fixture-layout .ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d {
text-align: center;
}
#fixture-layout .ui-checkbox-on, .ui-checkbox-off {
padding: 3px;
}
#fixture-layout .ui-checkbox .ui-btn-inner {
border: 1px solid black;
}
#control-buttons .ui-block-a, .ui-block-b {
text-align: center;
}
#white-palette .ui-btn, #color-palette .ui-btn {
margin: 5px;
}
div[data-role="footer"] {
text-align: center;
}
## Instruction:
Allow selection of text in a text box (but that's it).
## Code After:
/* @copyright: 2013 Single D Software - All Rights Reserved
@summary: Cascading style sheet for the Light Maestro GUI */
* {
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
}
input[type="text"] {
-webkit-user-select: text !important;
}
.ui-focus, .ui-btn:focus {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#fixture-layout .ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d {
text-align: center;
}
#fixture-layout .ui-checkbox-on, .ui-checkbox-off {
padding: 3px;
}
#fixture-layout .ui-checkbox .ui-btn-inner {
border: 1px solid black;
}
#control-buttons .ui-block-a, .ui-block-b {
text-align: center;
}
#white-palette .ui-btn, #color-palette .ui-btn {
margin: 5px;
}
div[data-role="footer"] {
text-align: center;
} | /* @copyright: 2013 Single D Software - All Rights Reserved
@summary: Cascading style sheet for the Light Maestro GUI */
* {
-webkit-touch-callout: none !important;
-webkit-user-select: none !important;
+ }
+
+ input[type="text"] {
+ -webkit-user-select: text !important;
}
.ui-focus, .ui-btn:focus {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#fixture-layout .ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d {
text-align: center;
}
#fixture-layout .ui-checkbox-on, .ui-checkbox-off {
padding: 3px;
}
#fixture-layout .ui-checkbox .ui-btn-inner {
border: 1px solid black;
}
#control-buttons .ui-block-a, .ui-block-b {
text-align: center;
}
#white-palette .ui-btn, #color-palette .ui-btn {
margin: 5px;
}
div[data-role="footer"] {
text-align: center;
} | 4 | 0.108108 | 4 | 0 |
7f46c364ac7cebcebeb781c7310f3ff214ffa8b0 | .github/workflows/test.yml | .github/workflows/test.yml | name: test suite
on:
push:
branches: [master]
pull_request:
jobs:
test-linux:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.10", "3.11-dev", "pypy-3.9"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start external services
run: docker compose up -d
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest
test-others:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
python-version: ["3.7", "3.9", "3.10"]
exclude:
- os: windows-latest
python-version: "3.10" # won't compile psycopg2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest -m "not external_service"
| name: test suite
on:
push:
branches: [master]
pull_request:
jobs:
test-linux:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.11", "pypy-3.9"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start external services
run: docker compose up -d
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest
test-others:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
python-version: ["3.7", "3.11"]
exclude:
- os: windows-latest
python-version: "3.11" # won't compile psycopg2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest -m "not external_service"
| Use Python 3.11 (final) as the high-end Python version | Use Python 3.11 (final) as the high-end Python version
| YAML | mit | agronholm/apscheduler | yaml | ## Code Before:
name: test suite
on:
push:
branches: [master]
pull_request:
jobs:
test-linux:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.10", "3.11-dev", "pypy-3.9"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start external services
run: docker compose up -d
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest
test-others:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
python-version: ["3.7", "3.9", "3.10"]
exclude:
- os: windows-latest
python-version: "3.10" # won't compile psycopg2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest -m "not external_service"
## Instruction:
Use Python 3.11 (final) as the high-end Python version
## Code After:
name: test suite
on:
push:
branches: [master]
pull_request:
jobs:
test-linux:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.11", "pypy-3.9"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start external services
run: docker compose up -d
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest
test-others:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
python-version: ["3.7", "3.11"]
exclude:
- os: windows-latest
python-version: "3.11" # won't compile psycopg2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest -m "not external_service"
| name: test suite
on:
push:
branches: [master]
pull_request:
jobs:
test-linux:
strategy:
fail-fast: false
matrix:
- python-version: ["3.7", "3.10", "3.11-dev", "pypy-3.9"]
? ------- -----
+ python-version: ["3.7", "3.11", "pypy-3.9"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Start external services
run: docker compose up -d
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest
test-others:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
- python-version: ["3.7", "3.9", "3.10"]
? ------- ^
+ python-version: ["3.7", "3.11"]
? ^
exclude:
- os: windows-latest
- python-version: "3.10" # won't compile psycopg2
? ^
+ python-version: "3.11" # won't compile psycopg2
? ^
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install the project and its dependencies
run: pip install -e .[test]
- name: Test with pytest
run: pytest -m "not external_service" | 6 | 0.12766 | 3 | 3 |
841f54b502419b1a961e849fb5703cdf1fdef6c0 | zsh/aliases.zsh | zsh/aliases.zsh | alias mvim='/Applications/MacVim.app/Contents/MacOS/MacVim'
alias reload!='. ~/.zshrc'
alias vim='/usr/local/Cellar/vim/8.0.0596/bin/vim'
alias nano='vim'
alias fix_drupal_perms='find . -type d -name files -exec chmod 777 {} \;'
alias updatedb='/usr/libexec/locate.updatedb'
alias dr='drush'
| alias mvim='/Applications/MacVim.app/Contents/MacOS/MacVim'
alias reload!='. ~/.zshrc'
alias vim='/usr/local/Cellar/vim/8.0.0596/bin/vim'
alias nano='vim'
alias fix_drupal_perms='find . -type d -name files -exec chmod 777 {} \;'
alias updatedb='/usr/libexec/locate.updatedb'
alias dr='drush'
alias vim='/usr/local/bin/vim'
| Update vim alias to point the brew vim install | Update vim alias to point the brew vim install
| Shell | mit | karschsp/dotfiles,karschsp/dotfiles | shell | ## Code Before:
alias mvim='/Applications/MacVim.app/Contents/MacOS/MacVim'
alias reload!='. ~/.zshrc'
alias vim='/usr/local/Cellar/vim/8.0.0596/bin/vim'
alias nano='vim'
alias fix_drupal_perms='find . -type d -name files -exec chmod 777 {} \;'
alias updatedb='/usr/libexec/locate.updatedb'
alias dr='drush'
## Instruction:
Update vim alias to point the brew vim install
## Code After:
alias mvim='/Applications/MacVim.app/Contents/MacOS/MacVim'
alias reload!='. ~/.zshrc'
alias vim='/usr/local/Cellar/vim/8.0.0596/bin/vim'
alias nano='vim'
alias fix_drupal_perms='find . -type d -name files -exec chmod 777 {} \;'
alias updatedb='/usr/libexec/locate.updatedb'
alias dr='drush'
alias vim='/usr/local/bin/vim'
| alias mvim='/Applications/MacVim.app/Contents/MacOS/MacVim'
alias reload!='. ~/.zshrc'
alias vim='/usr/local/Cellar/vim/8.0.0596/bin/vim'
alias nano='vim'
alias fix_drupal_perms='find . -type d -name files -exec chmod 777 {} \;'
alias updatedb='/usr/libexec/locate.updatedb'
alias dr='drush'
+ alias vim='/usr/local/bin/vim' | 1 | 0.142857 | 1 | 0 |
0825b7031e33edfd6d684118046bced28b0a2fd2 | src/index.js | src/index.js | import isFunction from 'lodash/isFunction';
import isObject from 'lodash/isObject';
import assign from 'lodash/assign';
import pick from 'lodash/pick';
import flatten from 'lodash/flatten';
import pickBy from 'lodash/pickBy';
import assignWith from 'lodash/assignWith';
import compose from './compose';
export const isDescriptor = isObject;
export const isStamp = obj => isFunction(obj) && isFunction(obj.compose) && isDescriptor(obj.compose);
export const isComposable = obj => isDescriptor(obj) || isStamp(obj);
export const init = (...functions) => compose({ initializers: flatten(functions) });
export const overrides = (...keys) => {
const flattenKeys = flatten(keys);
return compose({
initializers: [function (opt) {
assign(this, flattenKeys.length === 0 ? opt : pick(opt, flattenKeys));
}]
});
};
export const namespaced = (keyStampMap) => {
const keyStampMapClone = pickBy(keyStampMap, isStamp);
return compose({
initializers: [function (opt) {
const optClone = pickBy(opt, (value, key) => keyStampMapClone[key]);
assignWith(optClone, keyStampMapClone, (innerOpt, stamp) => stamp(innerOpt));
assign(this, optClone);
}]
});
};
| import {
isFunction, isObject,
assign, assignWith,
pick, pickBy,
flatten
} from 'lodash';
import compose from './compose';
export const isDescriptor = isObject;
export const isStamp = obj => isFunction(obj) && isFunction(obj.compose) && isDescriptor(obj.compose);
export const isComposable = obj => isDescriptor(obj) || isStamp(obj);
export const init = (...functions) => compose({ initializers: flatten(functions) });
export const overrides = (...keys) => {
const flattenKeys = flatten(keys);
return compose({
initializers: [function (opt) {
assign(this, flattenKeys.length === 0 ? opt : pick(opt, flattenKeys));
}]
});
};
export const namespaced = (keyStampMap) => {
const keyStampMapClone = pickBy(keyStampMap, isStamp);
return compose({
initializers: [function (opt) {
const optClone = pickBy(opt, (value, key) => keyStampMapClone[key]);
assignWith(optClone, keyStampMapClone, (innerOpt, stamp) => stamp(innerOpt));
assign(this, optClone);
}]
});
};
| Use single import of lodash | Use single import of lodash | JavaScript | mit | stampit-org/stamp-utils | javascript | ## Code Before:
import isFunction from 'lodash/isFunction';
import isObject from 'lodash/isObject';
import assign from 'lodash/assign';
import pick from 'lodash/pick';
import flatten from 'lodash/flatten';
import pickBy from 'lodash/pickBy';
import assignWith from 'lodash/assignWith';
import compose from './compose';
export const isDescriptor = isObject;
export const isStamp = obj => isFunction(obj) && isFunction(obj.compose) && isDescriptor(obj.compose);
export const isComposable = obj => isDescriptor(obj) || isStamp(obj);
export const init = (...functions) => compose({ initializers: flatten(functions) });
export const overrides = (...keys) => {
const flattenKeys = flatten(keys);
return compose({
initializers: [function (opt) {
assign(this, flattenKeys.length === 0 ? opt : pick(opt, flattenKeys));
}]
});
};
export const namespaced = (keyStampMap) => {
const keyStampMapClone = pickBy(keyStampMap, isStamp);
return compose({
initializers: [function (opt) {
const optClone = pickBy(opt, (value, key) => keyStampMapClone[key]);
assignWith(optClone, keyStampMapClone, (innerOpt, stamp) => stamp(innerOpt));
assign(this, optClone);
}]
});
};
## Instruction:
Use single import of lodash
## Code After:
import {
isFunction, isObject,
assign, assignWith,
pick, pickBy,
flatten
} from 'lodash';
import compose from './compose';
export const isDescriptor = isObject;
export const isStamp = obj => isFunction(obj) && isFunction(obj.compose) && isDescriptor(obj.compose);
export const isComposable = obj => isDescriptor(obj) || isStamp(obj);
export const init = (...functions) => compose({ initializers: flatten(functions) });
export const overrides = (...keys) => {
const flattenKeys = flatten(keys);
return compose({
initializers: [function (opt) {
assign(this, flattenKeys.length === 0 ? opt : pick(opt, flattenKeys));
}]
});
};
export const namespaced = (keyStampMap) => {
const keyStampMapClone = pickBy(keyStampMap, isStamp);
return compose({
initializers: [function (opt) {
const optClone = pickBy(opt, (value, key) => keyStampMapClone[key]);
assignWith(optClone, keyStampMapClone, (innerOpt, stamp) => stamp(innerOpt));
assign(this, optClone);
}]
});
};
| + import {
+ isFunction, isObject,
+ assign, assignWith,
+ pick, pickBy,
+ flatten
+ } from 'lodash';
- import isFunction from 'lodash/isFunction';
- import isObject from 'lodash/isObject';
- import assign from 'lodash/assign';
- import pick from 'lodash/pick';
- import flatten from 'lodash/flatten';
- import pickBy from 'lodash/pickBy';
- import assignWith from 'lodash/assignWith';
import compose from './compose';
export const isDescriptor = isObject;
export const isStamp = obj => isFunction(obj) && isFunction(obj.compose) && isDescriptor(obj.compose);
export const isComposable = obj => isDescriptor(obj) || isStamp(obj);
export const init = (...functions) => compose({ initializers: flatten(functions) });
export const overrides = (...keys) => {
const flattenKeys = flatten(keys);
return compose({
initializers: [function (opt) {
assign(this, flattenKeys.length === 0 ? opt : pick(opt, flattenKeys));
}]
});
};
export const namespaced = (keyStampMap) => {
const keyStampMapClone = pickBy(keyStampMap, isStamp);
return compose({
initializers: [function (opt) {
const optClone = pickBy(opt, (value, key) => keyStampMapClone[key]);
assignWith(optClone, keyStampMapClone, (innerOpt, stamp) => stamp(innerOpt));
assign(this, optClone);
}]
});
}; | 13 | 0.342105 | 6 | 7 |
badafb6a967cc8f0533af8926405eac395d4b4fa | README.md | README.md |
**`bindgen` automatically generates Rust FFI bindings to C and C++ libraries.**
For example, given the C header `doggo.h`:
```c
typedef struct Doggo {
int many;
char wow;
} Doggo;
void eleven_out_of_ten_majestic_af(Doggo* pupper);
```
`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
functions and use its types:
```rust
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct Doggo {
pub many: ::std::os::raw::c_int,
pub wow: ::std::os::raw::c_char,
}
extern "C" {
pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
}
```
## Users Guide
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang-nursery.github.io/rust-bindgen)
## API Reference
[API reference documentation is on docs.rs](https://docs.rs/bindgen)
## Contributing
[See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md)
|
[`impl period`](https://blog.rust-lang.org/2017/09/18/impl-future-for-rust.html) has been started! Join us at [Gitter.im](https://gitter.im/rust-impl-period/WG-dev-tools-bindgen).
**`bindgen` automatically generates Rust FFI bindings to C and C++ libraries.**
For example, given the C header `doggo.h`:
```c
typedef struct Doggo {
int many;
char wow;
} Doggo;
void eleven_out_of_ten_majestic_af(Doggo* pupper);
```
`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
functions and use its types:
```rust
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct Doggo {
pub many: ::std::os::raw::c_int,
pub wow: ::std::os::raw::c_char,
}
extern "C" {
pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
}
```
## Users Guide
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang-nursery.github.io/rust-bindgen)
## API Reference
[API reference documentation is on docs.rs](https://docs.rs/bindgen)
## Contributing
[See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md)
| Add links to `impl period` blog post and gitter.im | Add links to `impl period` blog post and gitter.im
| Markdown | bsd-3-clause | emilio/rust-bindgen,emilio/rust-bindgen,rust-lang/rust-bindgen,emilio/rust-bindgen,rust-lang/rust-bindgen,rust-lang/rust-bindgen,rust-lang/rust-bindgen,emilio/rust-bindgen,emilio/rust-bindgen | markdown | ## Code Before:
**`bindgen` automatically generates Rust FFI bindings to C and C++ libraries.**
For example, given the C header `doggo.h`:
```c
typedef struct Doggo {
int many;
char wow;
} Doggo;
void eleven_out_of_ten_majestic_af(Doggo* pupper);
```
`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
functions and use its types:
```rust
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct Doggo {
pub many: ::std::os::raw::c_int,
pub wow: ::std::os::raw::c_char,
}
extern "C" {
pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
}
```
## Users Guide
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang-nursery.github.io/rust-bindgen)
## API Reference
[API reference documentation is on docs.rs](https://docs.rs/bindgen)
## Contributing
[See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md)
## Instruction:
Add links to `impl period` blog post and gitter.im
## Code After:
[`impl period`](https://blog.rust-lang.org/2017/09/18/impl-future-for-rust.html) has been started! Join us at [Gitter.im](https://gitter.im/rust-impl-period/WG-dev-tools-bindgen).
**`bindgen` automatically generates Rust FFI bindings to C and C++ libraries.**
For example, given the C header `doggo.h`:
```c
typedef struct Doggo {
int many;
char wow;
} Doggo;
void eleven_out_of_ten_majestic_af(Doggo* pupper);
```
`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
functions and use its types:
```rust
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct Doggo {
pub many: ::std::os::raw::c_int,
pub wow: ::std::os::raw::c_char,
}
extern "C" {
pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
}
```
## Users Guide
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang-nursery.github.io/rust-bindgen)
## API Reference
[API reference documentation is on docs.rs](https://docs.rs/bindgen)
## Contributing
[See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md)
| +
+ [`impl period`](https://blog.rust-lang.org/2017/09/18/impl-future-for-rust.html) has been started! Join us at [Gitter.im](https://gitter.im/rust-impl-period/WG-dev-tools-bindgen).
**`bindgen` automatically generates Rust FFI bindings to C and C++ libraries.**
For example, given the C header `doggo.h`:
```c
typedef struct Doggo {
int many;
char wow;
} Doggo;
void eleven_out_of_ten_majestic_af(Doggo* pupper);
```
`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
functions and use its types:
```rust
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct Doggo {
pub many: ::std::os::raw::c_int,
pub wow: ::std::os::raw::c_char,
}
extern "C" {
pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
}
```
## Users Guide
[📚 Read the `bindgen` users guide here! 📚](https://rust-lang-nursery.github.io/rust-bindgen)
## API Reference
[API reference documentation is on docs.rs](https://docs.rs/bindgen)
## Contributing
[See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md) | 2 | 0.047619 | 2 | 0 |
a36c00338cbf5c66f257a75993cf3313e8d9247d | README.md | README.md |
An implementation of the Gradle Remote Cache that's backed by Google Cloud Storage buckets.
## Using the plugin
In your `settings.gradle.kts` file add the following
```kotlin
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache::class) {
projectId = "foo"
bucketName = "bar"
credentials = ExportedKeyGcpCredentials(File("path/to/credentials.json"))
isPush = inCi
}
}
```
- `projectId`, `bucketName` are required
- `credentials` defaults to `ApplicationDefaultGcpCredentials`, but can also be set to `ExportedKeyGcpCredentials`
- `isPush` defaults to `false`.
## Development
Set up the following environment variables for service account credentials to run all the test.
```bash
# Gradle Cache Service Account Path
export GRADLE_CACHE_SERVICE_ACCOUNT_PATH=$HOME/.gradle-cache/androidx-dev-prod-build-cache-writer.json
```
|
An implementation of the Gradle Remote Cache that's backed by Google Cloud Storage buckets.
## Using the plugin
In your `settings.gradle.kts` file add the following
```kotlin
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache::class) {
projectId = "foo"
bucketName = "bar"
credentials = ExportedKeyGcpCredentials(File("path/to/credentials.json"))
isPush = inCi
}
}
```
- `projectId`, `bucketName` are required
- `credentials` defaults to `ApplicationDefaultGcpCredentials`, but can also be set to `ExportedKeyGcpCredentials`
- `isPush` defaults to `false`.
---
If you are using Groovy, then you should do the following:
```groovy
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache) {
projectId = "projectName"
bucketName = "storageBucketName"
credentials = new ExportedKeyGcpCredentials(new File("path/to/credentials.json"))
push = inCi
}
}
```
| Add instructions for Groovy users. | Add instructions for Groovy users.
| Markdown | apache-2.0 | androidx/gcp-gradle-build-cache | markdown | ## Code Before:
An implementation of the Gradle Remote Cache that's backed by Google Cloud Storage buckets.
## Using the plugin
In your `settings.gradle.kts` file add the following
```kotlin
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache::class) {
projectId = "foo"
bucketName = "bar"
credentials = ExportedKeyGcpCredentials(File("path/to/credentials.json"))
isPush = inCi
}
}
```
- `projectId`, `bucketName` are required
- `credentials` defaults to `ApplicationDefaultGcpCredentials`, but can also be set to `ExportedKeyGcpCredentials`
- `isPush` defaults to `false`.
## Development
Set up the following environment variables for service account credentials to run all the test.
```bash
# Gradle Cache Service Account Path
export GRADLE_CACHE_SERVICE_ACCOUNT_PATH=$HOME/.gradle-cache/androidx-dev-prod-build-cache-writer.json
```
## Instruction:
Add instructions for Groovy users.
## Code After:
An implementation of the Gradle Remote Cache that's backed by Google Cloud Storage buckets.
## Using the plugin
In your `settings.gradle.kts` file add the following
```kotlin
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache::class) {
projectId = "foo"
bucketName = "bar"
credentials = ExportedKeyGcpCredentials(File("path/to/credentials.json"))
isPush = inCi
}
}
```
- `projectId`, `bucketName` are required
- `credentials` defaults to `ApplicationDefaultGcpCredentials`, but can also be set to `ExportedKeyGcpCredentials`
- `isPush` defaults to `false`.
---
If you are using Groovy, then you should do the following:
```groovy
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache) {
projectId = "projectName"
bucketName = "storageBucketName"
credentials = new ExportedKeyGcpCredentials(new File("path/to/credentials.json"))
push = inCi
}
}
```
|
An implementation of the Gradle Remote Cache that's backed by Google Cloud Storage buckets.
## Using the plugin
In your `settings.gradle.kts` file add the following
```kotlin
plugins {
id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
}
import androidx.build.gradle.gcpbuildcache.GcpBuildCache
import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
buildCache {
remote(GcpBuildCache::class) {
projectId = "foo"
bucketName = "bar"
credentials = ExportedKeyGcpCredentials(File("path/to/credentials.json"))
isPush = inCi
}
}
```
- `projectId`, `bucketName` are required
- `credentials` defaults to `ApplicationDefaultGcpCredentials`, but can also be set to `ExportedKeyGcpCredentials`
- `isPush` defaults to `false`.
- ## Development
+ ---
- Set up the following environment variables for service account credentials to run all the test.
+ If you are using Groovy, then you should do the following:
- ```bash
- # Gradle Cache Service Account Path
- export GRADLE_CACHE_SERVICE_ACCOUNT_PATH=$HOME/.gradle-cache/androidx-dev-prod-build-cache-writer.json
+ ```groovy
+ plugins {
+ id("androidx.build.gradle.gcpbuildcache") version "1.0.0-alpha01"
+ }
+
+ import androidx.build.gradle.gcpbuildcache.GcpBuildCache
+ import androidx.build.gradle.gcpbuildcache.ExportedKeyGcpCredentials
+
+ buildCache {
+ remote(GcpBuildCache) {
+ projectId = "projectName"
+ bucketName = "storageBucketName"
+ credentials = new ExportedKeyGcpCredentials(new File("path/to/credentials.json"))
+ push = inCi
+ }
+ }
``` | 23 | 0.621622 | 18 | 5 |
efeabd677c5aa9b486442ed64c19aa8b5a4fdbea | app/views/shared/_signin_blurb.haml | app/views/shared/_signin_blurb.haml | %h3
First Time Here?
%p
Sign up for access as:
%br
= link_to("Student", signup_portal_students_path, :class=>'more')
%br
%a{ :href=>"/portal/teachers/new", :class=>'more' }
Teacher
%h3
Just want to Try the Units?
%p
=link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'}
| %h3
First Time Here?
%p
Sign up for access as:
%br
= link_to("Student", signup_portal_students_path, :class=>'more')
%br
= link_to("Teacher", new_portal_teacher_path, :class=>'more')
%h3
Just want to Try the Units?
%p
=link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'}
| Fix teacher signup path to use route | Fix teacher signup path to use route | Haml | mit | concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse | haml | ## Code Before:
%h3
First Time Here?
%p
Sign up for access as:
%br
= link_to("Student", signup_portal_students_path, :class=>'more')
%br
%a{ :href=>"/portal/teachers/new", :class=>'more' }
Teacher
%h3
Just want to Try the Units?
%p
=link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'}
## Instruction:
Fix teacher signup path to use route
## Code After:
%h3
First Time Here?
%p
Sign up for access as:
%br
= link_to("Student", signup_portal_students_path, :class=>'more')
%br
= link_to("Teacher", new_portal_teacher_path, :class=>'more')
%h3
Just want to Try the Units?
%p
=link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'}
| %h3
First Time Here?
%p
Sign up for access as:
%br
= link_to("Student", signup_portal_students_path, :class=>'more')
%br
+ = link_to("Teacher", new_portal_teacher_path, :class=>'more')
- %a{ :href=>"/portal/teachers/new", :class=>'more' }
- Teacher
%h3
Just want to Try the Units?
%p
=link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'} | 3 | 0.230769 | 1 | 2 |
569173c413427e90cc1167d744bb07364bf4a1d8 | parity-fix/src/main/java/com/paritytrading/parity/fix/Orders.java | parity-fix/src/main/java/com/paritytrading/parity/fix/Orders.java | package com.paritytrading.parity.fix;
import java.util.ArrayList;
import java.util.List;
class Orders {
private List<Order> orders;
public Orders() {
orders = new ArrayList<>();
}
public void add(Order order) {
orders.add(order);
}
public Order findByClOrdID(String clOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getClOrdID().equals(clOrdId))
return order;
}
return null;
}
public Order findByOrigClOrdID(String origClOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getOrigClOrdID().equals(origClOrdId))
return order;
}
return null;
}
public Order findByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getOrderEntryID().equals(orderEntryId))
return order;
}
return null;
}
public void removeByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getOrderEntryID().equals(orderEntryId)) {
orders.remove(i);
break;
}
}
}
}
| package com.paritytrading.parity.fix;
import java.util.ArrayList;
import java.util.List;
class Orders {
private List<Order> orders;
public Orders() {
orders = new ArrayList<>();
}
public void add(Order order) {
orders.add(order);
}
public Order findByClOrdID(String clOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (clOrdId.equals(order.getClOrdID()))
return order;
}
return null;
}
public Order findByOrigClOrdID(String origClOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (origClOrdId.equals(order.getOrigClOrdID()))
return order;
}
return null;
}
public Order findByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (orderEntryId.equals(order.getOrderEntryID()))
return order;
}
return null;
}
public void removeByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (orderEntryId.equals(order.getOrderEntryID())) {
orders.remove(i);
break;
}
}
}
}
| Fix order cancellation in FIX gateway | Fix order cancellation in FIX gateway
All orders do not have an OrigClOrdID(41).
Thanks to Pekka Enberg for reporting the failure.
| Java | apache-2.0 | pmcs/parity,pmcs/parity,paritytrading/parity,paritytrading/parity | java | ## Code Before:
package com.paritytrading.parity.fix;
import java.util.ArrayList;
import java.util.List;
class Orders {
private List<Order> orders;
public Orders() {
orders = new ArrayList<>();
}
public void add(Order order) {
orders.add(order);
}
public Order findByClOrdID(String clOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getClOrdID().equals(clOrdId))
return order;
}
return null;
}
public Order findByOrigClOrdID(String origClOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getOrigClOrdID().equals(origClOrdId))
return order;
}
return null;
}
public Order findByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getOrderEntryID().equals(orderEntryId))
return order;
}
return null;
}
public void removeByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (order.getOrderEntryID().equals(orderEntryId)) {
orders.remove(i);
break;
}
}
}
}
## Instruction:
Fix order cancellation in FIX gateway
All orders do not have an OrigClOrdID(41).
Thanks to Pekka Enberg for reporting the failure.
## Code After:
package com.paritytrading.parity.fix;
import java.util.ArrayList;
import java.util.List;
class Orders {
private List<Order> orders;
public Orders() {
orders = new ArrayList<>();
}
public void add(Order order) {
orders.add(order);
}
public Order findByClOrdID(String clOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (clOrdId.equals(order.getClOrdID()))
return order;
}
return null;
}
public Order findByOrigClOrdID(String origClOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (origClOrdId.equals(order.getOrigClOrdID()))
return order;
}
return null;
}
public Order findByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (orderEntryId.equals(order.getOrderEntryID()))
return order;
}
return null;
}
public void removeByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
if (orderEntryId.equals(order.getOrderEntryID())) {
orders.remove(i);
break;
}
}
}
}
| package com.paritytrading.parity.fix;
import java.util.ArrayList;
import java.util.List;
class Orders {
private List<Order> orders;
public Orders() {
orders = new ArrayList<>();
}
public void add(Order order) {
orders.add(order);
}
public Order findByClOrdID(String clOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
- if (order.getClOrdID().equals(clOrdId))
+ if (clOrdId.equals(order.getClOrdID()))
return order;
}
return null;
}
public Order findByOrigClOrdID(String origClOrdId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
- if (order.getOrigClOrdID().equals(origClOrdId))
+ if (origClOrdId.equals(order.getOrigClOrdID()))
return order;
}
return null;
}
public Order findByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
- if (order.getOrderEntryID().equals(orderEntryId))
+ if (orderEntryId.equals(order.getOrderEntryID()))
return order;
}
return null;
}
public void removeByOrderEntryID(String orderEntryId) {
for (int i = 0; i < orders.size(); i++) {
Order order = orders.get(i);
- if (order.getOrderEntryID().equals(orderEntryId)) {
+ if (orderEntryId.equals(order.getOrderEntryID())) {
orders.remove(i);
break;
}
}
}
} | 8 | 0.129032 | 4 | 4 |
295d6c35ebf10e7901734086f723aad1954f25d0 | src/main/java/info/u_team/u_team_core/item/armor/ArmorSetCreator.java | src/main/java/info/u_team/u_team_core/item/armor/ArmorSetCreator.java | package info.u_team.u_team_core.item.armor;
import info.u_team.u_team_core.util.ItemProperties;
import net.minecraft.item.*;
import net.minecraft.item.Item.Properties;
public class ArmorSetCreator {
public static ArmorSet create(String name, Properties properties, IArmorMaterial material) {
return create(name, null, properties, material);
}
public static ArmorSet create(String name, ItemGroup group, Properties properties, IArmorMaterial material) {
return new ArmorSet(new UHelmetItem(name, group, new ItemProperties(properties), material), new UChestplateItem(name, group, new ItemProperties(properties), material), new ULeggingsItem(name, group, new ItemProperties(properties), material), new UBootsItem(name, group, new ItemProperties(properties), material));
}
}
| package info.u_team.u_team_core.item.armor;
import info.u_team.u_team_core.util.ItemProperties;
import net.minecraft.item.*;
import net.minecraft.item.Item.Properties;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
public class ArmorSetCreator {
public static ArmorSet create(DeferredRegister<Item> register, String name, Properties properties, IArmorMaterial material) {
return create(register, name, null, properties, material);
}
public static ArmorSet create(DeferredRegister<Item> register, String name, ItemGroup group, Properties properties, IArmorMaterial material) {
final RegistryObject<UHelmetItem> helmet = register.register(name + "_helmet", () -> new UHelmetItem(name, group, new ItemProperties(properties), material));
final RegistryObject<UChestplateItem> chestplate = register.register(name + "_chestplate", () -> new UChestplateItem(name, group, new ItemProperties(properties), material));
final RegistryObject<ULeggingsItem> leggings = register.register(name + "_leggings", () -> new ULeggingsItem(name, group, new ItemProperties(properties), material));
final RegistryObject<UBootsItem> boots = register.register(name + "_boots", () -> new UBootsItem(name, group, new ItemProperties(properties), material));
return new ArmorSet(helmet, chestplate, leggings, boots);
}
}
| Update armor set with new register | Update armor set with new register | Java | apache-2.0 | MC-U-Team/U-Team-Core,MC-U-Team/U-Team-Core | java | ## Code Before:
package info.u_team.u_team_core.item.armor;
import info.u_team.u_team_core.util.ItemProperties;
import net.minecraft.item.*;
import net.minecraft.item.Item.Properties;
public class ArmorSetCreator {
public static ArmorSet create(String name, Properties properties, IArmorMaterial material) {
return create(name, null, properties, material);
}
public static ArmorSet create(String name, ItemGroup group, Properties properties, IArmorMaterial material) {
return new ArmorSet(new UHelmetItem(name, group, new ItemProperties(properties), material), new UChestplateItem(name, group, new ItemProperties(properties), material), new ULeggingsItem(name, group, new ItemProperties(properties), material), new UBootsItem(name, group, new ItemProperties(properties), material));
}
}
## Instruction:
Update armor set with new register
## Code After:
package info.u_team.u_team_core.item.armor;
import info.u_team.u_team_core.util.ItemProperties;
import net.minecraft.item.*;
import net.minecraft.item.Item.Properties;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
public class ArmorSetCreator {
public static ArmorSet create(DeferredRegister<Item> register, String name, Properties properties, IArmorMaterial material) {
return create(register, name, null, properties, material);
}
public static ArmorSet create(DeferredRegister<Item> register, String name, ItemGroup group, Properties properties, IArmorMaterial material) {
final RegistryObject<UHelmetItem> helmet = register.register(name + "_helmet", () -> new UHelmetItem(name, group, new ItemProperties(properties), material));
final RegistryObject<UChestplateItem> chestplate = register.register(name + "_chestplate", () -> new UChestplateItem(name, group, new ItemProperties(properties), material));
final RegistryObject<ULeggingsItem> leggings = register.register(name + "_leggings", () -> new ULeggingsItem(name, group, new ItemProperties(properties), material));
final RegistryObject<UBootsItem> boots = register.register(name + "_boots", () -> new UBootsItem(name, group, new ItemProperties(properties), material));
return new ArmorSet(helmet, chestplate, leggings, boots);
}
}
| package info.u_team.u_team_core.item.armor;
import info.u_team.u_team_core.util.ItemProperties;
import net.minecraft.item.*;
import net.minecraft.item.Item.Properties;
+ import net.minecraftforge.fml.RegistryObject;
+ import net.minecraftforge.registries.DeferredRegister;
public class ArmorSetCreator {
- public static ArmorSet create(String name, Properties properties, IArmorMaterial material) {
+ public static ArmorSet create(DeferredRegister<Item> register, String name, Properties properties, IArmorMaterial material) {
? +++++++++++++++++++++++++++++++++
- return create(name, null, properties, material);
+ return create(register, name, null, properties, material);
? ++++++++++
}
- public static ArmorSet create(String name, ItemGroup group, Properties properties, IArmorMaterial material) {
+ public static ArmorSet create(DeferredRegister<Item> register, String name, ItemGroup group, Properties properties, IArmorMaterial material) {
? +++++++++++++++++++++++++++++++++
- return new ArmorSet(new UHelmetItem(name, group, new ItemProperties(properties), material), new UChestplateItem(name, group, new ItemProperties(properties), material), new ULeggingsItem(name, group, new ItemProperties(properties), material), new UBootsItem(name, group, new ItemProperties(properties), material));
+ final RegistryObject<UHelmetItem> helmet = register.register(name + "_helmet", () -> new UHelmetItem(name, group, new ItemProperties(properties), material));
+ final RegistryObject<UChestplateItem> chestplate = register.register(name + "_chestplate", () -> new UChestplateItem(name, group, new ItemProperties(properties), material));
+ final RegistryObject<ULeggingsItem> leggings = register.register(name + "_leggings", () -> new ULeggingsItem(name, group, new ItemProperties(properties), material));
+ final RegistryObject<UBootsItem> boots = register.register(name + "_boots", () -> new UBootsItem(name, group, new ItemProperties(properties), material));
+
+ return new ArmorSet(helmet, chestplate, leggings, boots);
}
} | 15 | 0.9375 | 11 | 4 |
2217ed60f3d28e1b6ca0eb9aab539538f9e4a909 | lib/twterm/list.rb | lib/twterm/list.rb | module Twterm
class List
attr_reader :id, :name, :slug, :full_name, :mode, :description, :member_count, :subscriber_count
@@instances = {}
def initialize(list)
@id = list.id
update!(list)
@@instances[@id] = self
self
end
def update!(list)
@name = list.name
@slug = list.slug
@full_name = list.full_name
@mode = list.mode
@description = list.description.is_a?(Twitter::NullObject) ? '' : list.description
@member_count = list.member_count
@subscriber_count = list.subscriber_count
self
end
def ==(other)
other.is_a?(self.class) && id == other.id
end
def self.new(list)
instance = find(list.id)
instance.nil? ? super : instance.update!(list)
end
def self.find(id)
@@instances[id]
end
def self.find_or_fetch(id)
instance = find(id)
(yield(instance) && return) if instance
Client.current.list(id) { |list| yield list }
end
def self.all
@@instances.values
end
end
end
| module Twterm
class List
attr_reader :id, :name, :slug, :full_name, :mode, :description, :member_count, :subscriber_count
@@instances = {}
def ==(other)
other.is_a?(self.class) && id == other.id
end
def initialize(list)
@id = list.id
update!(list)
@@instances[@id] = self
self
end
def update!(list)
@name = list.name
@slug = list.slug
@full_name = list.full_name
@mode = list.mode
@description = list.description.is_a?(Twitter::NullObject) ? '' : list.description
@member_count = list.member_count
@subscriber_count = list.subscriber_count
self
end
def self.all
@@instances.values
end
def self.find(id)
@@instances[id]
end
def self.find_or_fetch(id)
instance = find(id)
(yield(instance) && return) if instance
Client.current.list(id) { |list| yield list }
end
def self.new(list)
instance = find(list.id)
instance.nil? ? super : instance.update!(list)
end
end
end
| Sort methods of List class in alphabetical order | Sort methods of List class in alphabetical order
| Ruby | mit | ryota-ka/twterm | ruby | ## Code Before:
module Twterm
class List
attr_reader :id, :name, :slug, :full_name, :mode, :description, :member_count, :subscriber_count
@@instances = {}
def initialize(list)
@id = list.id
update!(list)
@@instances[@id] = self
self
end
def update!(list)
@name = list.name
@slug = list.slug
@full_name = list.full_name
@mode = list.mode
@description = list.description.is_a?(Twitter::NullObject) ? '' : list.description
@member_count = list.member_count
@subscriber_count = list.subscriber_count
self
end
def ==(other)
other.is_a?(self.class) && id == other.id
end
def self.new(list)
instance = find(list.id)
instance.nil? ? super : instance.update!(list)
end
def self.find(id)
@@instances[id]
end
def self.find_or_fetch(id)
instance = find(id)
(yield(instance) && return) if instance
Client.current.list(id) { |list| yield list }
end
def self.all
@@instances.values
end
end
end
## Instruction:
Sort methods of List class in alphabetical order
## Code After:
module Twterm
class List
attr_reader :id, :name, :slug, :full_name, :mode, :description, :member_count, :subscriber_count
@@instances = {}
def ==(other)
other.is_a?(self.class) && id == other.id
end
def initialize(list)
@id = list.id
update!(list)
@@instances[@id] = self
self
end
def update!(list)
@name = list.name
@slug = list.slug
@full_name = list.full_name
@mode = list.mode
@description = list.description.is_a?(Twitter::NullObject) ? '' : list.description
@member_count = list.member_count
@subscriber_count = list.subscriber_count
self
end
def self.all
@@instances.values
end
def self.find(id)
@@instances[id]
end
def self.find_or_fetch(id)
instance = find(id)
(yield(instance) && return) if instance
Client.current.list(id) { |list| yield list }
end
def self.new(list)
instance = find(list.id)
instance.nil? ? super : instance.update!(list)
end
end
end
| module Twterm
class List
attr_reader :id, :name, :slug, :full_name, :mode, :description, :member_count, :subscriber_count
@@instances = {}
+
+ def ==(other)
+ other.is_a?(self.class) && id == other.id
+ end
def initialize(list)
@id = list.id
update!(list)
@@instances[@id] = self
self
end
def update!(list)
@name = list.name
@slug = list.slug
@full_name = list.full_name
@mode = list.mode
@description = list.description.is_a?(Twitter::NullObject) ? '' : list.description
@member_count = list.member_count
@subscriber_count = list.subscriber_count
self
end
+ def self.all
+ @@instances.values
- def ==(other)
- other.is_a?(self.class) && id == other.id
- end
-
- def self.new(list)
- instance = find(list.id)
- instance.nil? ? super : instance.update!(list)
end
def self.find(id)
@@instances[id]
end
def self.find_or_fetch(id)
instance = find(id)
(yield(instance) && return) if instance
Client.current.list(id) { |list| yield list }
end
- def self.all
- @@instances.values
+ def self.new(list)
+ instance = find(list.id)
+ instance.nil? ? super : instance.update!(list)
end
end
end | 18 | 0.352941 | 9 | 9 |
5a5e820fa50377904e6fdd592fed5e883698c3f0 | tests/testapp/models/city.py | tests/testapp/models/city.py | from django.db import models
from binder.models import BinderModel
class City(BinderModel):
country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE)
name = models.TextField(unique=True, max_length=100)
class CityState(BinderModel):
"""
City states are like cities, but they can also decide that they do not belong to a country
"""
country = models.ForeignKey('Country', null=True, blank=True, related_name='city_states', on_delete=models.SET_NULL)
name = models.TextField(unique=True, max_length=100)
class PermanentCity(BinderModel):
"""
Some cities are indestrucable. Even if we delete them, they are not really deleted, and can be rerissen from their ashes
"""
country = models.ForeignKey('Country', null=False, blank=False, related_name='permanent_cities', on_delete=models.CASCADE)
name = models.TextField(unique=True, max_length=100)
deleted = models.BooleanField() | from django.db import models
from binder.models import BinderModel
class City(BinderModel):
country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE)
name = models.CharField(unique=True, max_length=100)
class CityState(BinderModel):
"""
City states are like cities, but they can also decide that they do not belong to a country
"""
country = models.ForeignKey('Country', null=True, blank=True, related_name='city_states', on_delete=models.SET_NULL)
name = models.CharField(unique=True, max_length=100)
class PermanentCity(BinderModel):
"""
Some cities are indestrucable. Even if we delete them, they are not really deleted, and can be rerissen from their ashes
"""
country = models.ForeignKey('Country', null=False, blank=False, related_name='permanent_cities', on_delete=models.CASCADE)
name = models.CharField(unique=True, max_length=100)
deleted = models.BooleanField() | Change text field to charfields, since those are indexable in mysql | Change text field to charfields, since those are indexable in mysql
| Python | mit | CodeYellowBV/django-binder | python | ## Code Before:
from django.db import models
from binder.models import BinderModel
class City(BinderModel):
country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE)
name = models.TextField(unique=True, max_length=100)
class CityState(BinderModel):
"""
City states are like cities, but they can also decide that they do not belong to a country
"""
country = models.ForeignKey('Country', null=True, blank=True, related_name='city_states', on_delete=models.SET_NULL)
name = models.TextField(unique=True, max_length=100)
class PermanentCity(BinderModel):
"""
Some cities are indestrucable. Even if we delete them, they are not really deleted, and can be rerissen from their ashes
"""
country = models.ForeignKey('Country', null=False, blank=False, related_name='permanent_cities', on_delete=models.CASCADE)
name = models.TextField(unique=True, max_length=100)
deleted = models.BooleanField()
## Instruction:
Change text field to charfields, since those are indexable in mysql
## Code After:
from django.db import models
from binder.models import BinderModel
class City(BinderModel):
country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE)
name = models.CharField(unique=True, max_length=100)
class CityState(BinderModel):
"""
City states are like cities, but they can also decide that they do not belong to a country
"""
country = models.ForeignKey('Country', null=True, blank=True, related_name='city_states', on_delete=models.SET_NULL)
name = models.CharField(unique=True, max_length=100)
class PermanentCity(BinderModel):
"""
Some cities are indestrucable. Even if we delete them, they are not really deleted, and can be rerissen from their ashes
"""
country = models.ForeignKey('Country', null=False, blank=False, related_name='permanent_cities', on_delete=models.CASCADE)
name = models.CharField(unique=True, max_length=100)
deleted = models.BooleanField() | from django.db import models
from binder.models import BinderModel
class City(BinderModel):
country = models.ForeignKey('Country', null=False, blank=False, related_name='cities', on_delete=models.CASCADE)
- name = models.TextField(unique=True, max_length=100)
? ^^^^
+ name = models.CharField(unique=True, max_length=100)
? ^^^^
class CityState(BinderModel):
"""
City states are like cities, but they can also decide that they do not belong to a country
"""
country = models.ForeignKey('Country', null=True, blank=True, related_name='city_states', on_delete=models.SET_NULL)
- name = models.TextField(unique=True, max_length=100)
? ^^^^
+ name = models.CharField(unique=True, max_length=100)
? ^^^^
class PermanentCity(BinderModel):
"""
Some cities are indestrucable. Even if we delete them, they are not really deleted, and can be rerissen from their ashes
"""
country = models.ForeignKey('Country', null=False, blank=False, related_name='permanent_cities', on_delete=models.CASCADE)
- name = models.TextField(unique=True, max_length=100)
? ^^^^
+ name = models.CharField(unique=True, max_length=100)
? ^^^^
deleted = models.BooleanField() | 6 | 0.25 | 3 | 3 |
8d0b9da511d55191609ffbd88a8b11afd6ff0367 | remedy/radremedy.py | remedy/radremedy.py | from flask import Flask, url_for, request, abort
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from rad.models import db, Resource
def create_app(config, models=()):
from remedyblueprint import remedy, url_for_other_page
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(remedy)
# searching configurations
app.jinja_env.trim_blocks = True
# Register the paging helper method with Jinja2
app.jinja_env.globals['url_for_other_page'] = url_for_other_page
db.init_app(app)
Migrate(app, db, directory=app.config['MIGRATIONS_DIR'])
manager = Manager(app)
manager.add_command('db', MigrateCommand)
# turning API off for now
# from api_manager import init_api_manager
# api_manager = init_api_manager(app, db)
# map(lambda m: api_manager.create_api(m), models)
return app, manager
if __name__ == '__main__':
app, manager = create_app('config.BaseConfig', (Resource, ))
with app.app_context():
manager.run()
| from flask import Flask, url_for, request, abort
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.login import current_user
from rad.models import db, Resource
def create_app(config, models=()):
app = Flask(__name__)
app.config.from_object(config)
from remedyblueprint import remedy, url_for_other_page
app.register_blueprint(remedy)
from auth.user_auth import auth, login_manager
app.register_blueprint(auth)
login_manager.init_app(app)
# searching configurations
app.jinja_env.trim_blocks = True
# Register the paging helper method with Jinja2
app.jinja_env.globals['url_for_other_page'] = url_for_other_page
app.jinja_env.globals['logged_in'] = lambda : not current_user.is_anonymous()
db.init_app(app)
Migrate(app, db, directory=app.config['MIGRATIONS_DIR'])
manager = Manager(app)
manager.add_command('db', MigrateCommand)
# turning API off for now
# from api_manager import init_api_manager
# api_manager = init_api_manager(app, db)
# map(lambda m: api_manager.create_api(m), models)
return app, manager
if __name__ == '__main__':
application, manager = create_app('config.BaseConfig', (Resource, ))
with application.app_context():
manager.run()
| Move around imports and not shadow app | Move around imports and not shadow app
| Python | mpl-2.0 | radioprotector/radremedy,radioprotector/radremedy,radioprotector/radremedy,AllieDeford/radremedy,AllieDeford/radremedy,radremedy/radremedy,radremedy/radremedy,radremedy/radremedy,AllieDeford/radremedy,radioprotector/radremedy,radremedy/radremedy | python | ## Code Before:
from flask import Flask, url_for, request, abort
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from rad.models import db, Resource
def create_app(config, models=()):
from remedyblueprint import remedy, url_for_other_page
app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(remedy)
# searching configurations
app.jinja_env.trim_blocks = True
# Register the paging helper method with Jinja2
app.jinja_env.globals['url_for_other_page'] = url_for_other_page
db.init_app(app)
Migrate(app, db, directory=app.config['MIGRATIONS_DIR'])
manager = Manager(app)
manager.add_command('db', MigrateCommand)
# turning API off for now
# from api_manager import init_api_manager
# api_manager = init_api_manager(app, db)
# map(lambda m: api_manager.create_api(m), models)
return app, manager
if __name__ == '__main__':
app, manager = create_app('config.BaseConfig', (Resource, ))
with app.app_context():
manager.run()
## Instruction:
Move around imports and not shadow app
## Code After:
from flask import Flask, url_for, request, abort
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.login import current_user
from rad.models import db, Resource
def create_app(config, models=()):
app = Flask(__name__)
app.config.from_object(config)
from remedyblueprint import remedy, url_for_other_page
app.register_blueprint(remedy)
from auth.user_auth import auth, login_manager
app.register_blueprint(auth)
login_manager.init_app(app)
# searching configurations
app.jinja_env.trim_blocks = True
# Register the paging helper method with Jinja2
app.jinja_env.globals['url_for_other_page'] = url_for_other_page
app.jinja_env.globals['logged_in'] = lambda : not current_user.is_anonymous()
db.init_app(app)
Migrate(app, db, directory=app.config['MIGRATIONS_DIR'])
manager = Manager(app)
manager.add_command('db', MigrateCommand)
# turning API off for now
# from api_manager import init_api_manager
# api_manager = init_api_manager(app, db)
# map(lambda m: api_manager.create_api(m), models)
return app, manager
if __name__ == '__main__':
application, manager = create_app('config.BaseConfig', (Resource, ))
with application.app_context():
manager.run()
| from flask import Flask, url_for, request, abort
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
+ from flask.ext.login import current_user
from rad.models import db, Resource
def create_app(config, models=()):
- from remedyblueprint import remedy, url_for_other_page
-
app = Flask(__name__)
app.config.from_object(config)
+ from remedyblueprint import remedy, url_for_other_page
app.register_blueprint(remedy)
+
+ from auth.user_auth import auth, login_manager
+ app.register_blueprint(auth)
+ login_manager.init_app(app)
# searching configurations
app.jinja_env.trim_blocks = True
# Register the paging helper method with Jinja2
app.jinja_env.globals['url_for_other_page'] = url_for_other_page
+ app.jinja_env.globals['logged_in'] = lambda : not current_user.is_anonymous()
db.init_app(app)
Migrate(app, db, directory=app.config['MIGRATIONS_DIR'])
manager = Manager(app)
manager.add_command('db', MigrateCommand)
# turning API off for now
# from api_manager import init_api_manager
# api_manager = init_api_manager(app, db)
# map(lambda m: api_manager.create_api(m), models)
return app, manager
if __name__ == '__main__':
- app, manager = create_app('config.BaseConfig', (Resource, ))
+ application, manager = create_app('config.BaseConfig', (Resource, ))
? ++++++++
- with app.app_context():
+ with application.app_context():
? ++++++++
manager.run() | 13 | 0.333333 | 9 | 4 |
cc1c757c9856c2a6a7815c32e5a5a106614b2d50 | app/controllers/users/registrations_controller.rb | app/controllers/users/registrations_controller.rb | class Users::RegistrationsController < ActiveAdmin::Devise::RegistrationsController
layout 'application'
before_action :permit_params
def permit_params
devise_parameter_sanitizer.for(:sign_up) do |u|
u.permit(:username, :email, :password, :password_confirmation)
end
end
end | class Users::RegistrationsController < ActiveAdmin::Devise::RegistrationsController
layout 'application'
before_action :permit_params
def permit_params
devise_parameter_sanitizer.permit(:sign_up, keys: [:username, :email, :password, :password_confirmation])
end
end
| Fix devise for method for new version | Fix devise for method for new version
| Ruby | mit | lfzawacki/musical-artifacts,lfzawacki/musical-artifacts,lfzawacki/musical-artifacts,lfzawacki/musical-artifacts | ruby | ## Code Before:
class Users::RegistrationsController < ActiveAdmin::Devise::RegistrationsController
layout 'application'
before_action :permit_params
def permit_params
devise_parameter_sanitizer.for(:sign_up) do |u|
u.permit(:username, :email, :password, :password_confirmation)
end
end
end
## Instruction:
Fix devise for method for new version
## Code After:
class Users::RegistrationsController < ActiveAdmin::Devise::RegistrationsController
layout 'application'
before_action :permit_params
def permit_params
devise_parameter_sanitizer.permit(:sign_up, keys: [:username, :email, :password, :password_confirmation])
end
end
| class Users::RegistrationsController < ActiveAdmin::Devise::RegistrationsController
layout 'application'
before_action :permit_params
def permit_params
+ devise_parameter_sanitizer.permit(:sign_up, keys: [:username, :email, :password, :password_confirmation])
- devise_parameter_sanitizer.for(:sign_up) do |u|
- u.permit(:username, :email, :password, :password_confirmation)
- end
end
end | 4 | 0.333333 | 1 | 3 |
a818a4ccdc80abb83e2d849a8e575525ac9ea5c3 | app/controllers/conventions_controller.rb | app/controllers/conventions_controller.rb | class ConventionsController < ApplicationController
# You should always be able to get a list of conventions
skip_authorization_check
def index
@upcoming_cons = []
@past_cons = []
@conventions = Convention.all
@conventions.each do |con|
if con.ended?
@past_cons << con
else
@upcoming_cons << con
end
end
end
def new
@convention = Convention.new
end
# Write the new convention to the database
def create
@convention = Convention.new(convention_params)
if @convention.save
redirect_to conventions_url
else
render 'new'
end
end
def show
@convention = Convention.find(params[:id])
authorize_action_for @convention
end
private
def convention_params
params.require(:convention).permit(:name, :domain)
end
end
| class ConventionsController < ApplicationController
load_and_authorize_resource
def index
@upcoming_cons = []
@past_cons = []
@conventions.each do |con|
if con.ended?
@past_cons << con
else
@upcoming_cons << con
end
end
end
def new
end
# Write the new convention to the database
def create
if @convention.save
redirect_to conventions_url
else
render 'new'
end
end
def edit
end
def update
if @convention.save
redirect_to conventions_url
else
render 'edit'
end
end
def destroy
@convention.destroy!
redirect_to conventions_url
end
private
def convention_params
params.require(:convention).permit(:name, :domain)
end
end
| Refactor ConventionsController to take advantage of CanCan's load_and_authorize_resource | Refactor ConventionsController to take advantage of CanCan's load_and_authorize_resource
| Ruby | mit | neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode | ruby | ## Code Before:
class ConventionsController < ApplicationController
# You should always be able to get a list of conventions
skip_authorization_check
def index
@upcoming_cons = []
@past_cons = []
@conventions = Convention.all
@conventions.each do |con|
if con.ended?
@past_cons << con
else
@upcoming_cons << con
end
end
end
def new
@convention = Convention.new
end
# Write the new convention to the database
def create
@convention = Convention.new(convention_params)
if @convention.save
redirect_to conventions_url
else
render 'new'
end
end
def show
@convention = Convention.find(params[:id])
authorize_action_for @convention
end
private
def convention_params
params.require(:convention).permit(:name, :domain)
end
end
## Instruction:
Refactor ConventionsController to take advantage of CanCan's load_and_authorize_resource
## Code After:
class ConventionsController < ApplicationController
load_and_authorize_resource
def index
@upcoming_cons = []
@past_cons = []
@conventions.each do |con|
if con.ended?
@past_cons << con
else
@upcoming_cons << con
end
end
end
def new
end
# Write the new convention to the database
def create
if @convention.save
redirect_to conventions_url
else
render 'new'
end
end
def edit
end
def update
if @convention.save
redirect_to conventions_url
else
render 'edit'
end
end
def destroy
@convention.destroy!
redirect_to conventions_url
end
private
def convention_params
params.require(:convention).permit(:name, :domain)
end
end
| class ConventionsController < ApplicationController
+ load_and_authorize_resource
- # You should always be able to get a list of conventions
- skip_authorization_check
def index
@upcoming_cons = []
@past_cons = []
-
- @conventions = Convention.all
@conventions.each do |con|
if con.ended?
@past_cons << con
else
@upcoming_cons << con
end
end
end
def new
- @convention = Convention.new
end
# Write the new convention to the database
def create
- @convention = Convention.new(convention_params)
if @convention.save
redirect_to conventions_url
else
render 'new'
end
end
+ def edit
- def show
- @convention = Convention.find(params[:id])
- authorize_action_for @convention
- end
? --
+ end
+
+ def update
+ if @convention.save
+ redirect_to conventions_url
+ else
+ render 'edit'
+ end
+ end
+
+ def destroy
+ @convention.destroy!
+ redirect_to conventions_url
+ end
private
def convention_params
params.require(:convention).permit(:name, :domain)
end
end | 26 | 0.604651 | 16 | 10 |
b969c2b458d08cbdd4839848f42e0294b6fe41b2 | lib/blumquist/errors/unsupported_type.rb | lib/blumquist/errors/unsupported_type.rb | class Blumquist
module Errors
class UnsupportedType < Blumquist::Error
def initialize(type)
super("Unsupported type '#{type.to_s}' (#{%w{null, boolean, number, string, array object}.to_json} are supported)")
end
end
end
end
| class Blumquist
module Errors
class UnsupportedType < Blumquist::Error
def initialize(type)
super("Unsupported type '#{type.to_s}' (#{Blumquist::PRIMITIVE_TYPES.to_json}) are supported)")
end
end
end
end
| Use Blumquist::PRIMITIVE_TYPES to display the supported primitive types | Use Blumquist::PRIMITIVE_TYPES to display the supported primitive types
| Ruby | mit | moviepilot/blumquist | ruby | ## Code Before:
class Blumquist
module Errors
class UnsupportedType < Blumquist::Error
def initialize(type)
super("Unsupported type '#{type.to_s}' (#{%w{null, boolean, number, string, array object}.to_json} are supported)")
end
end
end
end
## Instruction:
Use Blumquist::PRIMITIVE_TYPES to display the supported primitive types
## Code After:
class Blumquist
module Errors
class UnsupportedType < Blumquist::Error
def initialize(type)
super("Unsupported type '#{type.to_s}' (#{Blumquist::PRIMITIVE_TYPES.to_json}) are supported)")
end
end
end
end
| class Blumquist
module Errors
class UnsupportedType < Blumquist::Error
def initialize(type)
- super("Unsupported type '#{type.to_s}' (#{%w{null, boolean, number, string, array object}.to_json} are supported)")
+ super("Unsupported type '#{type.to_s}' (#{Blumquist::PRIMITIVE_TYPES.to_json}) are supported)")
end
end
end
end | 2 | 0.222222 | 1 | 1 |
50cec234ada9c7d905c8d73490cfb6546c49451e | config/nvim/coc-settings.json | config/nvim/coc-settings.json | {
"suggest.echodocSupport": true,
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"explorer": {
"width": 30,
"sources": [
{"name": "buffer", "expand": true},
{"name": "file", "expand": true}
],
"openAction.changeDirectory": false,
"icon.enableNerdfont": true,
"icon.enableVimDevions": false,
"file.showHiddenFiles": true
},
"suggest.noselect": false,
"snippets.autoTrigger": false,
"snippets.extends": {
"typescript": ["javascript"],
"typescriptreact": ["typescript", "javscriptreact"]
},
"tsserver.enableJavascript": true,
"typescript.updateImportsOnFileMove.enable": false,
"javascript.updateImportsOnFileMove.enable": false
}
| {
"suggest.echodocSupport": true,
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"explorer": {
"width": 30,
"sources": [
{"name": "file", "expand": true}
],
"keyMappings": {
"<cr>": ["expandable?", "expandOrCollapse", "open"]
},
"openAction.for.directory": "expandOrCollapse",
"icon.enableNerdfont": true,
"icon.enableVimDevions": false,
"file.showHiddenFiles": true
},
"suggest.noselect": false,
"snippets.autoTrigger": false,
"snippets.extends": {
"typescript": ["javascript"],
"typescriptreact": ["typescript", "javscriptreact"]
},
"tsserver.enableJavascript": true,
"typescript.updateImportsOnFileMove.enable": false,
"javascript.updateImportsOnFileMove.enable": false
}
| Make coc-explorer expand/collapse directories, not cd | nvim: Make coc-explorer expand/collapse directories, not cd
| JSON | mit | davezuko/dev-environment,davezuko/dev-environment | json | ## Code Before:
{
"suggest.echodocSupport": true,
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"explorer": {
"width": 30,
"sources": [
{"name": "buffer", "expand": true},
{"name": "file", "expand": true}
],
"openAction.changeDirectory": false,
"icon.enableNerdfont": true,
"icon.enableVimDevions": false,
"file.showHiddenFiles": true
},
"suggest.noselect": false,
"snippets.autoTrigger": false,
"snippets.extends": {
"typescript": ["javascript"],
"typescriptreact": ["typescript", "javscriptreact"]
},
"tsserver.enableJavascript": true,
"typescript.updateImportsOnFileMove.enable": false,
"javascript.updateImportsOnFileMove.enable": false
}
## Instruction:
nvim: Make coc-explorer expand/collapse directories, not cd
## Code After:
{
"suggest.echodocSupport": true,
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"explorer": {
"width": 30,
"sources": [
{"name": "file", "expand": true}
],
"keyMappings": {
"<cr>": ["expandable?", "expandOrCollapse", "open"]
},
"openAction.for.directory": "expandOrCollapse",
"icon.enableNerdfont": true,
"icon.enableVimDevions": false,
"file.showHiddenFiles": true
},
"suggest.noselect": false,
"snippets.autoTrigger": false,
"snippets.extends": {
"typescript": ["javascript"],
"typescriptreact": ["typescript", "javscriptreact"]
},
"tsserver.enableJavascript": true,
"typescript.updateImportsOnFileMove.enable": false,
"javascript.updateImportsOnFileMove.enable": false
}
| {
"suggest.echodocSupport": true,
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"explorer": {
"width": 30,
"sources": [
- {"name": "buffer", "expand": true},
{"name": "file", "expand": true}
],
- "openAction.changeDirectory": false,
+ "keyMappings": {
+ "<cr>": ["expandable?", "expandOrCollapse", "open"]
+ },
+ "openAction.for.directory": "expandOrCollapse",
"icon.enableNerdfont": true,
"icon.enableVimDevions": false,
"file.showHiddenFiles": true
},
"suggest.noselect": false,
"snippets.autoTrigger": false,
"snippets.extends": {
"typescript": ["javascript"],
"typescriptreact": ["typescript", "javscriptreact"]
},
"tsserver.enableJavascript": true,
"typescript.updateImportsOnFileMove.enable": false,
"javascript.updateImportsOnFileMove.enable": false
} | 6 | 0.2 | 4 | 2 |
2c02816c05f3863ef76b3a412ac5bad9eecfafdd | testrepository/tests/test_setup.py | testrepository/tests/test_setup.py |
"""Tests for setup.py."""
import doctest
import os
import subprocess
import sys
from testtools import (
TestCase,
)
from testtools.matchers import (
DocTestMatches,
)
class TestCanSetup(TestCase):
def test_bdist(self):
# Single smoke test to make sure we can build a package.
path = os.path.join(os.path.dirname(__file__), '..', '..', 'setup.py')
proc = subprocess.Popen([sys.executable, path, 'bdist'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output, _ = proc.communicate()
self.assertEqual(0, proc.returncode)
self.assertThat(output,
DocTestMatches("...running bdist...", doctest.ELLIPSIS))
|
"""Tests for setup.py."""
import doctest
import os
import subprocess
import sys
from testtools import (
TestCase,
)
from testtools.matchers import (
DocTestMatches,
)
class TestCanSetup(TestCase):
def test_bdist(self):
# Single smoke test to make sure we can build a package.
path = os.path.join(os.path.dirname(__file__), '..', '..', 'setup.py')
proc = subprocess.Popen([sys.executable, path, 'bdist'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, universal_newlines=True)
output, _ = proc.communicate()
self.assertEqual(0, proc.returncode)
self.assertThat(output, DocTestMatches("""...
running install_scripts
...
adding '...testr'
...""", doctest.ELLIPSIS))
| Make setup.py smoke test more specific again as requested in review | Make setup.py smoke test more specific again as requested in review | Python | apache-2.0 | masayukig/stestr,masayukig/stestr,mtreinish/stestr,mtreinish/stestr | python | ## Code Before:
"""Tests for setup.py."""
import doctest
import os
import subprocess
import sys
from testtools import (
TestCase,
)
from testtools.matchers import (
DocTestMatches,
)
class TestCanSetup(TestCase):
def test_bdist(self):
# Single smoke test to make sure we can build a package.
path = os.path.join(os.path.dirname(__file__), '..', '..', 'setup.py')
proc = subprocess.Popen([sys.executable, path, 'bdist'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output, _ = proc.communicate()
self.assertEqual(0, proc.returncode)
self.assertThat(output,
DocTestMatches("...running bdist...", doctest.ELLIPSIS))
## Instruction:
Make setup.py smoke test more specific again as requested in review
## Code After:
"""Tests for setup.py."""
import doctest
import os
import subprocess
import sys
from testtools import (
TestCase,
)
from testtools.matchers import (
DocTestMatches,
)
class TestCanSetup(TestCase):
def test_bdist(self):
# Single smoke test to make sure we can build a package.
path = os.path.join(os.path.dirname(__file__), '..', '..', 'setup.py')
proc = subprocess.Popen([sys.executable, path, 'bdist'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, universal_newlines=True)
output, _ = proc.communicate()
self.assertEqual(0, proc.returncode)
self.assertThat(output, DocTestMatches("""...
running install_scripts
...
adding '...testr'
...""", doctest.ELLIPSIS))
|
"""Tests for setup.py."""
import doctest
import os
import subprocess
import sys
from testtools import (
TestCase,
)
from testtools.matchers import (
DocTestMatches,
)
class TestCanSetup(TestCase):
def test_bdist(self):
# Single smoke test to make sure we can build a package.
path = os.path.join(os.path.dirname(__file__), '..', '..', 'setup.py')
proc = subprocess.Popen([sys.executable, path, 'bdist'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
+ stderr=subprocess.STDOUT, universal_newlines=True)
output, _ = proc.communicate()
self.assertEqual(0, proc.returncode)
- self.assertThat(output,
- DocTestMatches("...running bdist...", doctest.ELLIPSIS))
+ self.assertThat(output, DocTestMatches("""...
+ running install_scripts
+ ...
+ adding '...testr'
+ ...""", doctest.ELLIPSIS)) | 9 | 0.333333 | 6 | 3 |
f89187d998bf684c5fe39e35fe4286bbd5f2f04f | app/assets/javascripts/devtools.coffee | app/assets/javascripts/devtools.coffee | getResponse = -> Screensmart.store.getState().response
delay = (ms, func) -> setTimeout func, ms
window.autofill = ->
delay 20, ->
unless getResponse().loading
lastQuestion = getResponse().questions[getResponse().questions.length - 1]
# Pick random option
options = lastQuestion.answerOptionSet.answerOptions
option = options[Math.floor(Math.random() * options.length)]
Screensmart.store.dispatch(Screensmart.Actions.setAnswer(lastQuestion.id, option.id))
autofill() unless getResponse().finished
document.addEventListener 'keyup', (event) ->
if event.ctrlKey && event.keyCode == 220 # CTRL + \
autofill()
| getResponse = -> Screensmart.store.getState().response
delay = (ms, func) -> setTimeout func, ms
window.autofill = ->
delay 20, ->
autofill() unless getResponse().done
unless getResponse().loading
lastQuestion = getResponse().questions[getResponse().questions.length - 1]
# Pick random option
options = lastQuestion.answerOptionSet.answerOptions
option = options[Math.floor(Math.random() * options.length)]
Screensmart.store.dispatch(Screensmart.Actions.setAnswer(lastQuestion.id, option.id))
document.addEventListener 'keyup', (event) ->
if event.ctrlKey && event.keyCode == 220 # CTRL + \
autofill()
| Call next autofill iteration before it starts loading again | Call next autofill iteration before it starts loading again
| CoffeeScript | mit | roqua/screensmart,roqua/screensmart,roqua/screensmart | coffeescript | ## Code Before:
getResponse = -> Screensmart.store.getState().response
delay = (ms, func) -> setTimeout func, ms
window.autofill = ->
delay 20, ->
unless getResponse().loading
lastQuestion = getResponse().questions[getResponse().questions.length - 1]
# Pick random option
options = lastQuestion.answerOptionSet.answerOptions
option = options[Math.floor(Math.random() * options.length)]
Screensmart.store.dispatch(Screensmart.Actions.setAnswer(lastQuestion.id, option.id))
autofill() unless getResponse().finished
document.addEventListener 'keyup', (event) ->
if event.ctrlKey && event.keyCode == 220 # CTRL + \
autofill()
## Instruction:
Call next autofill iteration before it starts loading again
## Code After:
getResponse = -> Screensmart.store.getState().response
delay = (ms, func) -> setTimeout func, ms
window.autofill = ->
delay 20, ->
autofill() unless getResponse().done
unless getResponse().loading
lastQuestion = getResponse().questions[getResponse().questions.length - 1]
# Pick random option
options = lastQuestion.answerOptionSet.answerOptions
option = options[Math.floor(Math.random() * options.length)]
Screensmart.store.dispatch(Screensmart.Actions.setAnswer(lastQuestion.id, option.id))
document.addEventListener 'keyup', (event) ->
if event.ctrlKey && event.keyCode == 220 # CTRL + \
autofill()
| getResponse = -> Screensmart.store.getState().response
delay = (ms, func) -> setTimeout func, ms
window.autofill = ->
delay 20, ->
+ autofill() unless getResponse().done
unless getResponse().loading
lastQuestion = getResponse().questions[getResponse().questions.length - 1]
# Pick random option
options = lastQuestion.answerOptionSet.answerOptions
option = options[Math.floor(Math.random() * options.length)]
Screensmart.store.dispatch(Screensmart.Actions.setAnswer(lastQuestion.id, option.id))
- autofill() unless getResponse().finished
document.addEventListener 'keyup', (event) ->
if event.ctrlKey && event.keyCode == 220 # CTRL + \
autofill() | 2 | 0.111111 | 1 | 1 |
efcd82a112ae7302243e654111700f9068b250b2 | .travis.yml | .travis.yml | language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: 7.0
- php: nightly
- php: hhvm
before_install:
- sudo add-apt-repository -y ppa:moti-p/cc
- sudo apt-get update
- sudo apt-get -y --reinstall install imagemagick
- printf "\n" | pecl install imagick-beta
before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev
script: phpunit
| language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: 7.0
- php: nightly
- php: hhvm
before_install:
- sudo add-apt-repository -y ppa:moti-p/cc
- sudo apt-get update
- sudo apt-get -y --reinstall install imagemagick
- printf "\n" | pecl install imagick-beta
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.4" ]]; then echo "extension = imagick.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev
script: phpunit
| Enable imagick extension on PHP5.4 | Fix: Enable imagick extension on PHP5.4
| YAML | mit | Intervention/image | yaml | ## Code Before:
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: 7.0
- php: nightly
- php: hhvm
before_install:
- sudo add-apt-repository -y ppa:moti-p/cc
- sudo apt-get update
- sudo apt-get -y --reinstall install imagemagick
- printf "\n" | pecl install imagick-beta
before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev
script: phpunit
## Instruction:
Fix: Enable imagick extension on PHP5.4
## Code After:
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: 7.0
- php: nightly
- php: hhvm
before_install:
- sudo add-apt-repository -y ppa:moti-p/cc
- sudo apt-get update
- sudo apt-get -y --reinstall install imagemagick
- printf "\n" | pecl install imagick-beta
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.4" ]]; then echo "extension = imagick.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev
script: phpunit
| language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
- nightly
- hhvm
matrix:
allow_failures:
- php: 7.0
- php: nightly
- php: hhvm
before_install:
- sudo add-apt-repository -y ppa:moti-p/cc
- sudo apt-get update
- sudo apt-get -y --reinstall install imagemagick
- printf "\n" | pecl install imagick-beta
+ - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.4" ]]; then echo "extension = imagick.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev
script: phpunit | 1 | 0.037037 | 1 | 0 |
fe17a2b4115bdedd639b4c26a9a54ee33dbb5bf7 | addon/array-pager.js | addon/array-pager.js | import Em from 'ember';
import ArraySlice from 'array-slice';
var get = Em.get;
var set = Em.set;
var ArrayPager = ArraySlice.extend({
// 1-based
page: function (key, page) {
var limit = get(this, 'limit');
var offset;
// default value
if (arguments.length <= 1) {
offset = get(this, 'offset') || 0;
return Math.ceil(offset / limit) || 1;
}
// setter
// no negative pages
page = Math.max(page - 1, 0);
offset = (limit * page) || 0;
set(this, 'offset', offset);
return page + 1;
}.property('offset', 'limit'),
// 1-based
pages: function () {
var limit = get(this, 'limit');
var length = get(this, 'content.length');
var pages = Math.ceil(length / limit) || 1;
if (pages === Infinity) {
pages = 0;
}
return pages;
}.property('content.length', 'limit')
});
ArrayPager.computed = {
page: function (prop, page, limit) {
return Em.computed(prop, function () {
return ArrayPager.create({
content: get(this, prop),
page: page,
limit: limit
});
});
}
};
export default ArrayPager;
| import Em from 'ember';
import ArraySlice from 'array-slice';
var computed = Em.computed;
var get = Em.get;
var set = Em.set;
var ArrayPager = ArraySlice.extend({
// 1-based
page: computed('offset', 'limit', function (key, page) {
var limit = get(this, 'limit');
var offset;
// default value
if (arguments.length <= 1) {
offset = get(this, 'offset') || 0;
return Math.ceil(offset / limit) || 1;
}
// setter
// no negative pages
page = Math.max(page - 1, 0);
offset = (limit * page) || 0;
set(this, 'offset', offset);
return page + 1;
}),
// 1-based
pages: computed('content.length', 'limit', function () {
var limit = get(this, 'limit');
var length = get(this, 'content.length');
var pages = Math.ceil(length / limit) || 1;
if (pages === Infinity) {
pages = 0;
}
return pages;
})
});
ArrayPager.computed = {
page: function (prop, page, limit) {
return computed(function () {
return ArrayPager.create({
content: get(this, prop),
page: page,
limit: limit
});
});
}
};
export default ArrayPager;
| Use `Ember.computed` instead of `Function.prototype.property` | Use `Ember.computed` instead of `Function.prototype.property`
| JavaScript | mit | j-/ember-cli-array-pager,j-/ember-cli-array-pager | javascript | ## Code Before:
import Em from 'ember';
import ArraySlice from 'array-slice';
var get = Em.get;
var set = Em.set;
var ArrayPager = ArraySlice.extend({
// 1-based
page: function (key, page) {
var limit = get(this, 'limit');
var offset;
// default value
if (arguments.length <= 1) {
offset = get(this, 'offset') || 0;
return Math.ceil(offset / limit) || 1;
}
// setter
// no negative pages
page = Math.max(page - 1, 0);
offset = (limit * page) || 0;
set(this, 'offset', offset);
return page + 1;
}.property('offset', 'limit'),
// 1-based
pages: function () {
var limit = get(this, 'limit');
var length = get(this, 'content.length');
var pages = Math.ceil(length / limit) || 1;
if (pages === Infinity) {
pages = 0;
}
return pages;
}.property('content.length', 'limit')
});
ArrayPager.computed = {
page: function (prop, page, limit) {
return Em.computed(prop, function () {
return ArrayPager.create({
content: get(this, prop),
page: page,
limit: limit
});
});
}
};
export default ArrayPager;
## Instruction:
Use `Ember.computed` instead of `Function.prototype.property`
## Code After:
import Em from 'ember';
import ArraySlice from 'array-slice';
var computed = Em.computed;
var get = Em.get;
var set = Em.set;
var ArrayPager = ArraySlice.extend({
// 1-based
page: computed('offset', 'limit', function (key, page) {
var limit = get(this, 'limit');
var offset;
// default value
if (arguments.length <= 1) {
offset = get(this, 'offset') || 0;
return Math.ceil(offset / limit) || 1;
}
// setter
// no negative pages
page = Math.max(page - 1, 0);
offset = (limit * page) || 0;
set(this, 'offset', offset);
return page + 1;
}),
// 1-based
pages: computed('content.length', 'limit', function () {
var limit = get(this, 'limit');
var length = get(this, 'content.length');
var pages = Math.ceil(length / limit) || 1;
if (pages === Infinity) {
pages = 0;
}
return pages;
})
});
ArrayPager.computed = {
page: function (prop, page, limit) {
return computed(function () {
return ArrayPager.create({
content: get(this, prop),
page: page,
limit: limit
});
});
}
};
export default ArrayPager;
| import Em from 'ember';
import ArraySlice from 'array-slice';
+ var computed = Em.computed;
var get = Em.get;
var set = Em.set;
var ArrayPager = ArraySlice.extend({
// 1-based
- page: function (key, page) {
+ page: computed('offset', 'limit', function (key, page) {
var limit = get(this, 'limit');
var offset;
// default value
if (arguments.length <= 1) {
offset = get(this, 'offset') || 0;
return Math.ceil(offset / limit) || 1;
}
// setter
// no negative pages
page = Math.max(page - 1, 0);
offset = (limit * page) || 0;
set(this, 'offset', offset);
return page + 1;
- }.property('offset', 'limit'),
+ }),
// 1-based
- pages: function () {
+ pages: computed('content.length', 'limit', function () {
var limit = get(this, 'limit');
var length = get(this, 'content.length');
var pages = Math.ceil(length / limit) || 1;
if (pages === Infinity) {
pages = 0;
}
return pages;
- }.property('content.length', 'limit')
+ })
});
ArrayPager.computed = {
page: function (prop, page, limit) {
- return Em.computed(prop, function () {
? --- ------
+ return computed(function () {
return ArrayPager.create({
content: get(this, prop),
page: page,
limit: limit
});
});
}
};
export default ArrayPager; | 11 | 0.229167 | 6 | 5 |
2aa240f1e7f612c60863a4ab15fa6f5669d96190 | app/views/shared/dialogs/_reconfigure_dialog.html.haml | app/views/shared/dialogs/_reconfigure_dialog.html.haml | .row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"}
.spinner{'ng-show' => "!vm.dialogLoaded"}
.col-md-12.col-lg-12{'ng-if' => 'vm.dialog'}
%dialog-user{"dialog" =>"vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)"}
.clearfix
.pull-right.button-group{'ng-show' => "vm.dialogLoaded"}
%miq-button{:name => t = _("Submit"),
:title => t,
:alt => t,
:enabled => 'vm.saveable()',
'on-click' => "vm.submitButtonClicked()",
:primary => 'true'}
%miq-button{:name => t = _("Cancel"),
:title => t,
:alt => t,
:enabled => 'true',
'on-click' => "vm.cancelClicked($event)"}
:javascript
ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}');
ManageIQ.angular.app.value('targetId', '#{target_id}');
miq_bootstrap('.wrapper');
| .row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"}
.spinner{'ng-show' => "!vm.dialogLoaded"}
.col-md-12.col-lg-12{'ng-if' => 'vm.dialog'}
%dialog-user{"dialog" => "vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)", "reconfigure-mode" => true}
.clearfix
.pull-right.button-group{'ng-show' => "vm.dialogLoaded"}
%miq-button{:name => t = _("Submit"),
:title => t,
:alt => t,
:enabled => 'vm.saveable()',
'on-click' => "vm.submitButtonClicked()",
:primary => 'true'}
%miq-button{:name => t = _("Cancel"),
:title => t,
:alt => t,
:enabled => 'true',
'on-click' => "vm.cancelClicked($event)"}
:javascript
ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}');
ManageIQ.angular.app.value('targetId', '#{target_id}');
miq_bootstrap('.wrapper');
| Add reconfigureMode parameter to dialog-user | Add reconfigureMode parameter to dialog-user
https://bugzilla.redhat.com/show_bug.cgi?id=1837410
| Haml | apache-2.0 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | haml | ## Code Before:
.row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"}
.spinner{'ng-show' => "!vm.dialogLoaded"}
.col-md-12.col-lg-12{'ng-if' => 'vm.dialog'}
%dialog-user{"dialog" =>"vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)"}
.clearfix
.pull-right.button-group{'ng-show' => "vm.dialogLoaded"}
%miq-button{:name => t = _("Submit"),
:title => t,
:alt => t,
:enabled => 'vm.saveable()',
'on-click' => "vm.submitButtonClicked()",
:primary => 'true'}
%miq-button{:name => t = _("Cancel"),
:title => t,
:alt => t,
:enabled => 'true',
'on-click' => "vm.cancelClicked($event)"}
:javascript
ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}');
ManageIQ.angular.app.value('targetId', '#{target_id}');
miq_bootstrap('.wrapper');
## Instruction:
Add reconfigureMode parameter to dialog-user
https://bugzilla.redhat.com/show_bug.cgi?id=1837410
## Code After:
.row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"}
.spinner{'ng-show' => "!vm.dialogLoaded"}
.col-md-12.col-lg-12{'ng-if' => 'vm.dialog'}
%dialog-user{"dialog" => "vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)", "reconfigure-mode" => true}
.clearfix
.pull-right.button-group{'ng-show' => "vm.dialogLoaded"}
%miq-button{:name => t = _("Submit"),
:title => t,
:alt => t,
:enabled => 'vm.saveable()',
'on-click' => "vm.submitButtonClicked()",
:primary => 'true'}
%miq-button{:name => t = _("Cancel"),
:title => t,
:alt => t,
:enabled => 'true',
'on-click' => "vm.cancelClicked($event)"}
:javascript
ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}');
ManageIQ.angular.app.value('targetId', '#{target_id}');
miq_bootstrap('.wrapper');
| .row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"}
.spinner{'ng-show' => "!vm.dialogLoaded"}
.col-md-12.col-lg-12{'ng-if' => 'vm.dialog'}
- %dialog-user{"dialog" =>"vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)"}
+ %dialog-user{"dialog" => "vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)", "reconfigure-mode" => true}
? + ++++++++++++++++++++++++++++
.clearfix
.pull-right.button-group{'ng-show' => "vm.dialogLoaded"}
%miq-button{:name => t = _("Submit"),
:title => t,
:alt => t,
:enabled => 'vm.saveable()',
'on-click' => "vm.submitButtonClicked()",
:primary => 'true'}
%miq-button{:name => t = _("Cancel"),
:title => t,
:alt => t,
:enabled => 'true',
'on-click' => "vm.cancelClicked($event)"}
:javascript
ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}');
ManageIQ.angular.app.value('targetId', '#{target_id}');
miq_bootstrap('.wrapper'); | 2 | 0.083333 | 1 | 1 |
5efddf26176ac778556a3568bf97c2e70daac866 | anchorhub/settings/default_settings.py | anchorhub/settings/default_settings.py |
WRAPPER = "{ }"
INPUT = "."
OUTPUT = "out-anchorhub"
ARGPARSER = {
"description": "anchorhub parses through Markdown files and precompiles "
"links to specially formatted anchors."
}
ARGPARSE_INPUT = {
"help": "Path of directory tree to be parsed",
}
ARGPARSE_OUTPUT = {
"help": "Desired output location (default is \"" + OUTPUT + "\")",
"default": OUTPUT
}
ARGPARSE_OVERWRITE = {
"help": "Overwrite input files; ignore output location"
}
ARGPARSE_EXTENSION = {
"help": "Indicate which file extensions to search and run anchorhub on.",
"default": [".md"]
}
ARGPARSE_WRAPPER = {
"help": "Specify custom wrapper format (default is \"" + WRAPPER + "\")",
"default": WRAPPER
}
|
WRAPPER = '{ }'
INPUT = '.'
OUTPUT = 'out-anchorhub'
ARGPARSER = {
'description': "anchorhub parses through Markdown files and precompiles "
"links to specially formatted anchors."
}
ARGPARSE_INPUT = {
'help': "Path of directory tree to be parsed",
}
ARGPARSE_OUTPUT = {
'help': "Desired output location (default is \"" + OUTPUT + "\")",
'default': OUTPUT
}
ARGPARSE_OVERWRITE = {
'help': "Overwrite input files; ignore output location"
}
ARGPARSE_EXTENSION = {
'help': "Indicate which file extensions to search and run anchorhub on.",
'default': [".md"]
}
ARGPARSE_WRAPPER = {
'help': "Specify custom wrapper format (default is \"" + WRAPPER + "\")",
'default': WRAPPER
}
| Replace many double quotes with single quotes | Replace many double quotes with single quotes
| Python | apache-2.0 | samjabrahams/anchorhub | python | ## Code Before:
WRAPPER = "{ }"
INPUT = "."
OUTPUT = "out-anchorhub"
ARGPARSER = {
"description": "anchorhub parses through Markdown files and precompiles "
"links to specially formatted anchors."
}
ARGPARSE_INPUT = {
"help": "Path of directory tree to be parsed",
}
ARGPARSE_OUTPUT = {
"help": "Desired output location (default is \"" + OUTPUT + "\")",
"default": OUTPUT
}
ARGPARSE_OVERWRITE = {
"help": "Overwrite input files; ignore output location"
}
ARGPARSE_EXTENSION = {
"help": "Indicate which file extensions to search and run anchorhub on.",
"default": [".md"]
}
ARGPARSE_WRAPPER = {
"help": "Specify custom wrapper format (default is \"" + WRAPPER + "\")",
"default": WRAPPER
}
## Instruction:
Replace many double quotes with single quotes
## Code After:
WRAPPER = '{ }'
INPUT = '.'
OUTPUT = 'out-anchorhub'
ARGPARSER = {
'description': "anchorhub parses through Markdown files and precompiles "
"links to specially formatted anchors."
}
ARGPARSE_INPUT = {
'help': "Path of directory tree to be parsed",
}
ARGPARSE_OUTPUT = {
'help': "Desired output location (default is \"" + OUTPUT + "\")",
'default': OUTPUT
}
ARGPARSE_OVERWRITE = {
'help': "Overwrite input files; ignore output location"
}
ARGPARSE_EXTENSION = {
'help': "Indicate which file extensions to search and run anchorhub on.",
'default': [".md"]
}
ARGPARSE_WRAPPER = {
'help': "Specify custom wrapper format (default is \"" + WRAPPER + "\")",
'default': WRAPPER
}
|
- WRAPPER = "{ }"
? ^ ^
+ WRAPPER = '{ }'
? ^ ^
- INPUT = "."
? ^ ^
+ INPUT = '.'
? ^ ^
- OUTPUT = "out-anchorhub"
? ^ ^
+ OUTPUT = 'out-anchorhub'
? ^ ^
ARGPARSER = {
- "description": "anchorhub parses through Markdown files and precompiles "
? ^ ^
+ 'description': "anchorhub parses through Markdown files and precompiles "
? ^ ^
"links to specially formatted anchors."
}
ARGPARSE_INPUT = {
- "help": "Path of directory tree to be parsed",
? ^ ^
+ 'help': "Path of directory tree to be parsed",
? ^ ^
}
ARGPARSE_OUTPUT = {
- "help": "Desired output location (default is \"" + OUTPUT + "\")",
? ^ ^
+ 'help': "Desired output location (default is \"" + OUTPUT + "\")",
? ^ ^
- "default": OUTPUT
? ^ ^
+ 'default': OUTPUT
? ^ ^
}
ARGPARSE_OVERWRITE = {
- "help": "Overwrite input files; ignore output location"
? ^ ^
+ 'help': "Overwrite input files; ignore output location"
? ^ ^
}
ARGPARSE_EXTENSION = {
- "help": "Indicate which file extensions to search and run anchorhub on.",
? ^ ^
+ 'help': "Indicate which file extensions to search and run anchorhub on.",
? ^ ^
- "default": [".md"]
? ^ ^
+ 'default': [".md"]
? ^ ^
}
ARGPARSE_WRAPPER = {
- "help": "Specify custom wrapper format (default is \"" + WRAPPER + "\")",
? ^ ^
+ 'help': "Specify custom wrapper format (default is \"" + WRAPPER + "\")",
? ^ ^
- "default": WRAPPER
? ^ ^
+ 'default': WRAPPER
? ^ ^
} | 24 | 0.857143 | 12 | 12 |
21fc2b84f545c9e31003cef56415370cd3b3f597 | features/memberships/templates/memberships/_group_menu_groups.html | features/memberships/templates/memberships/_group_menu_groups.html | {% if user.gestalt.membership_set.exists %}
<li class="dropdown-header">Meine Gruppen</li>
{% endif %}
{% for membership in user.gestalt.membership_set.all %}
<li>
<a href="{{ membership.group.get_absolute_url }}">{{ membership.group }}</a>
</li>
{% empty %}
<li>
<a href="{% url 'group-index' %}">Gruppe finden</a>
</li>
{% endfor %}
| <li class="dropdown-header">
{% if user.gestalt.membership_set.exists %}Meine{% endif %} Gruppen
</li>
{% for membership in user.gestalt.membership_set.all %}
<li>
<a href="{{ membership.group.get_absolute_url }}">{{ membership.group }}</a>
</li>
{% empty %}
<li>
<a href="{% url 'group-index' %}">Gruppe finden</a>
</li>
{% endfor %}
| Fix group menu groups header | Fix group menu groups header
| HTML | agpl-3.0 | stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten | html | ## Code Before:
{% if user.gestalt.membership_set.exists %}
<li class="dropdown-header">Meine Gruppen</li>
{% endif %}
{% for membership in user.gestalt.membership_set.all %}
<li>
<a href="{{ membership.group.get_absolute_url }}">{{ membership.group }}</a>
</li>
{% empty %}
<li>
<a href="{% url 'group-index' %}">Gruppe finden</a>
</li>
{% endfor %}
## Instruction:
Fix group menu groups header
## Code After:
<li class="dropdown-header">
{% if user.gestalt.membership_set.exists %}Meine{% endif %} Gruppen
</li>
{% for membership in user.gestalt.membership_set.all %}
<li>
<a href="{{ membership.group.get_absolute_url }}">{{ membership.group }}</a>
</li>
{% empty %}
<li>
<a href="{% url 'group-index' %}">Gruppe finden</a>
</li>
{% endfor %}
| + <li class="dropdown-header">
- {% if user.gestalt.membership_set.exists %}
+ {% if user.gestalt.membership_set.exists %}Meine{% endif %} Gruppen
? ++++ ++++++++++++++++++++++++
+ </li>
- <li class="dropdown-header">Meine Gruppen</li>
- {% endif %}
{% for membership in user.gestalt.membership_set.all %}
<li>
<a href="{{ membership.group.get_absolute_url }}">{{ membership.group }}</a>
</li>
{% empty %}
<li>
<a href="{% url 'group-index' %}">Gruppe finden</a>
</li>
{% endfor %} | 6 | 0.461538 | 3 | 3 |
05f7622f3f57493e9ecf86be08e951c8f5390765 | assets/js/index.js | assets/js/index.js | var $ = require("jquery");
// Initialize player and register event handler
var Player = new MidiPlayer.Player();
var playTrack = function (filename, pk) {
// Load a MIDI file
MIDIjs.stop();
MIDIjs.play(filename);
$("#play-" + pk).hide();
$("pause-" + pk).show();
}
var pauseTrack = function (pk) {
MIDIjs.stop();
$("pause-" + pk).hide();
$("play-" + pk).show();
}
| var $ = require("jquery");
var playTrack = function (filename, pk) {
// Load a MIDI file
MIDIjs.stop();
MIDIjs.play(filename);
$("#play-" + pk).hide();
$("pause-" + pk).show();
}
var pauseTrack = function (pk) {
MIDIjs.stop();
$("pause-" + pk).hide();
$("play-" + pk).show();
}
export default {
playTrack: playTrack,
pauseTrack: pauseTrack
}; | Update midi player javascript file | Update midi player javascript file
| JavaScript | mit | adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc | javascript | ## Code Before:
var $ = require("jquery");
// Initialize player and register event handler
var Player = new MidiPlayer.Player();
var playTrack = function (filename, pk) {
// Load a MIDI file
MIDIjs.stop();
MIDIjs.play(filename);
$("#play-" + pk).hide();
$("pause-" + pk).show();
}
var pauseTrack = function (pk) {
MIDIjs.stop();
$("pause-" + pk).hide();
$("play-" + pk).show();
}
## Instruction:
Update midi player javascript file
## Code After:
var $ = require("jquery");
var playTrack = function (filename, pk) {
// Load a MIDI file
MIDIjs.stop();
MIDIjs.play(filename);
$("#play-" + pk).hide();
$("pause-" + pk).show();
}
var pauseTrack = function (pk) {
MIDIjs.stop();
$("pause-" + pk).hide();
$("play-" + pk).show();
}
export default {
playTrack: playTrack,
pauseTrack: pauseTrack
}; | var $ = require("jquery");
-
-
- // Initialize player and register event handler
- var Player = new MidiPlayer.Player();
var playTrack = function (filename, pk) {
// Load a MIDI file
MIDIjs.stop();
MIDIjs.play(filename);
$("#play-" + pk).hide();
$("pause-" + pk).show();
}
var pauseTrack = function (pk) {
MIDIjs.stop();
$("pause-" + pk).hide();
$("play-" + pk).show();
}
+ export default {
+ playTrack: playTrack,
+ pauseTrack: pauseTrack
+ }; | 8 | 0.4 | 4 | 4 |
ab79a5b656e0a251cb1ac17a6e0f2fd80fc212d0 | src/tools/TransformTool.js | src/tools/TransformTool.js | window.TransformTool = function(scene, camera, inputTarget)
{
this.block = null;
this.camera = camera;
this.control = new THREE.TransformControls(camera, inputTarget);
scene.add(this.control);
this.onClick = function(event)
{
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects(scene.children);
var found = false;
for (var i = 0; i < intersects.length; i++)
found = found || (intersects[i].object.transformable);
if(!found)
{
this.setBlock(null);
currentTool = Tools.defaultTool;
}
}
this.onMove = function(event)
{
}
this.setBlock = function(block)
{
if(block == null)
this.control.detach(this.block);
else
this.control.attach(block);
this.block = block;
document.querySelector("synth3d-inspector").block = block;
}
}; | window.TransformTool = function(scene, camera, inputTarget)
{
this.block = null;
this.camera = camera;
this.control = new THREE.TransformControls(camera, inputTarget);
scene.add(this.control);
this.onClick = function(event)
{
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects(scene.children);
var found = false;
for (var i = 0; i < intersects.length; i++)
{
if(intersects[i].object.transformable)
{
found = true;
this.setBlock(intersects[i].object);
}
}
if(!found)
{
this.setBlock(null);
currentTool = Tools.defaultTool;
}
}
this.onMove = function(event)
{
}
this.setBlock = function(block)
{
if(block == null)
this.control.detach(this.block);
else
this.control.attach(block);
this.block = block;
document.querySelector("synth3d-inspector").block = block;
}
}; | Allow to select another block when one is already selected | Allow to select another block when one is already selected
| JavaScript | mit | eolhing/synth3d,eolhing/synth3d | javascript | ## Code Before:
window.TransformTool = function(scene, camera, inputTarget)
{
this.block = null;
this.camera = camera;
this.control = new THREE.TransformControls(camera, inputTarget);
scene.add(this.control);
this.onClick = function(event)
{
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects(scene.children);
var found = false;
for (var i = 0; i < intersects.length; i++)
found = found || (intersects[i].object.transformable);
if(!found)
{
this.setBlock(null);
currentTool = Tools.defaultTool;
}
}
this.onMove = function(event)
{
}
this.setBlock = function(block)
{
if(block == null)
this.control.detach(this.block);
else
this.control.attach(block);
this.block = block;
document.querySelector("synth3d-inspector").block = block;
}
};
## Instruction:
Allow to select another block when one is already selected
## Code After:
window.TransformTool = function(scene, camera, inputTarget)
{
this.block = null;
this.camera = camera;
this.control = new THREE.TransformControls(camera, inputTarget);
scene.add(this.control);
this.onClick = function(event)
{
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects(scene.children);
var found = false;
for (var i = 0; i < intersects.length; i++)
{
if(intersects[i].object.transformable)
{
found = true;
this.setBlock(intersects[i].object);
}
}
if(!found)
{
this.setBlock(null);
currentTool = Tools.defaultTool;
}
}
this.onMove = function(event)
{
}
this.setBlock = function(block)
{
if(block == null)
this.control.detach(this.block);
else
this.control.attach(block);
this.block = block;
document.querySelector("synth3d-inspector").block = block;
}
}; | window.TransformTool = function(scene, camera, inputTarget)
{
this.block = null;
this.camera = camera;
this.control = new THREE.TransformControls(camera, inputTarget);
scene.add(this.control);
this.onClick = function(event)
{
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects(scene.children);
var found = false;
for (var i = 0; i < intersects.length; i++)
+ {
- found = found || (intersects[i].object.transformable);
? ---------------- -
+ if(intersects[i].object.transformable)
? +
+ {
+ found = true;
+ this.setBlock(intersects[i].object);
+ }
+ }
if(!found)
{
this.setBlock(null);
currentTool = Tools.defaultTool;
}
}
this.onMove = function(event)
{
}
this.setBlock = function(block)
{
if(block == null)
this.control.detach(this.block);
else
this.control.attach(block);
this.block = block;
document.querySelector("synth3d-inspector").block = block;
}
}; | 8 | 0.210526 | 7 | 1 |
59ed36a36791220af90851581bc912157e751805 | package.json | package.json | {
"name": "acquit",
"version": "1.1.0",
"description": "Parse BDD tests (Mocha, Jasmine) to generate documentation",
"homepage": "http://acquit.mongoosejs.io",
"main": "index.js",
"scripts": {
"static": "serve .",
"test": "mocha test/*.test.js",
"test-coverage": "nyc mocha -- -R spec ./test/*.test.js"
},
"author": "Valeri Karpov <val@karpov.io>",
"license": "Apache 2.0",
"keywords": [
"documentation",
"docs",
"bdd",
"tests",
"mocha"
],
"repository": {
"type": "git",
"url": "git://github.com/vkarpov15/acquit.git"
},
"dependencies": {
"esprima": "4.0.0"
},
"devDependencies": {
"acquit-ignore": "0.1.0",
"acquit-markdown": "0.1.0",
"acquit-require": "0.1.1",
"highlight.js": "9.12.0",
"marked": "^1.1.1",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"serve": "11.x"
}
}
| {
"name": "acquit",
"version": "1.1.0",
"description": "Parse BDD tests (Mocha, Jasmine) to generate documentation",
"homepage": "http://acquit.mongoosejs.io",
"main": "index.js",
"scripts": {
"static": "serve .",
"test": "mocha test/*.test.js",
"test-coverage": "nyc mocha -- -R spec ./test/*.test.js"
},
"author": "Valeri Karpov <val@karpov.io>",
"license": "Apache 2.0",
"keywords": [
"documentation",
"docs",
"bdd",
"tests",
"mocha"
],
"repository": {
"type": "git",
"url": "git://github.com/vkarpov15/acquit.git"
},
"dependencies": {
"esprima": "4.0.0",
"marked": "^1.1.1"
},
"devDependencies": {
"acquit-ignore": "0.1.0",
"acquit-markdown": "0.1.0",
"acquit-require": "0.1.1",
"highlight.js": "9.12.0",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"serve": "11.x"
}
}
| Move Marked back to Dependencies | Move Marked back to Dependencies
| JSON | apache-2.0 | vkarpov15/acquit,vkarpov15/acquit | json | ## Code Before:
{
"name": "acquit",
"version": "1.1.0",
"description": "Parse BDD tests (Mocha, Jasmine) to generate documentation",
"homepage": "http://acquit.mongoosejs.io",
"main": "index.js",
"scripts": {
"static": "serve .",
"test": "mocha test/*.test.js",
"test-coverage": "nyc mocha -- -R spec ./test/*.test.js"
},
"author": "Valeri Karpov <val@karpov.io>",
"license": "Apache 2.0",
"keywords": [
"documentation",
"docs",
"bdd",
"tests",
"mocha"
],
"repository": {
"type": "git",
"url": "git://github.com/vkarpov15/acquit.git"
},
"dependencies": {
"esprima": "4.0.0"
},
"devDependencies": {
"acquit-ignore": "0.1.0",
"acquit-markdown": "0.1.0",
"acquit-require": "0.1.1",
"highlight.js": "9.12.0",
"marked": "^1.1.1",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"serve": "11.x"
}
}
## Instruction:
Move Marked back to Dependencies
## Code After:
{
"name": "acquit",
"version": "1.1.0",
"description": "Parse BDD tests (Mocha, Jasmine) to generate documentation",
"homepage": "http://acquit.mongoosejs.io",
"main": "index.js",
"scripts": {
"static": "serve .",
"test": "mocha test/*.test.js",
"test-coverage": "nyc mocha -- -R spec ./test/*.test.js"
},
"author": "Valeri Karpov <val@karpov.io>",
"license": "Apache 2.0",
"keywords": [
"documentation",
"docs",
"bdd",
"tests",
"mocha"
],
"repository": {
"type": "git",
"url": "git://github.com/vkarpov15/acquit.git"
},
"dependencies": {
"esprima": "4.0.0",
"marked": "^1.1.1"
},
"devDependencies": {
"acquit-ignore": "0.1.0",
"acquit-markdown": "0.1.0",
"acquit-require": "0.1.1",
"highlight.js": "9.12.0",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"serve": "11.x"
}
}
| {
"name": "acquit",
"version": "1.1.0",
"description": "Parse BDD tests (Mocha, Jasmine) to generate documentation",
"homepage": "http://acquit.mongoosejs.io",
"main": "index.js",
"scripts": {
"static": "serve .",
"test": "mocha test/*.test.js",
"test-coverage": "nyc mocha -- -R spec ./test/*.test.js"
},
"author": "Valeri Karpov <val@karpov.io>",
"license": "Apache 2.0",
"keywords": [
"documentation",
"docs",
"bdd",
"tests",
"mocha"
],
"repository": {
"type": "git",
"url": "git://github.com/vkarpov15/acquit.git"
},
"dependencies": {
- "esprima": "4.0.0"
+ "esprima": "4.0.0",
? +
+ "marked": "^1.1.1"
},
"devDependencies": {
"acquit-ignore": "0.1.0",
"acquit-markdown": "0.1.0",
"acquit-require": "0.1.1",
"highlight.js": "9.12.0",
- "marked": "^1.1.1",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"serve": "11.x"
}
} | 4 | 0.105263 | 2 | 2 |
fe5cc3ac8d1831f057e39df751aea4d2c4eeaef5 | README.md | README.md |
Mobile app to register decease and treatment symptoms experienced. The app is used by patients and they can give doctors access to the data in the online and realtime database.
## Motivation
The app is invented during a common research project that is carried out by Business Academy Aarhus and Aarhus University.
## Installation
Download and run the app inside the Meteor development framework.
## API Reference
Data is stored in a Mongo database, https://www.mongodb.com/
Application interface is establised by the Meteor framework, https://www.meteor.com/
## Contributors
Contribution is welcome. You are free to use the existing code and/or improve it. Make a branch and a branch request to release your changes to the repository.
### Contact ###
For more info contact:
* Morten Mathiasen, Associate professor @ Business Academy Aarhus
* Torben Stamm Mikkelsen, Oncology doctor @ Aarhus University Hospital
## License
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
|
Mobile app to register decease and treatment symptoms experienced. The app is used by patients and they can give doctors access to the data in the online and realtime database.
## Motivation
The app is invented during a common research project that is carried out by Business Academy Aarhus and Aarhus University.
## Installation
Download and run the app inside the Meteor development framework.
## API Reference
Data is stored in a Mongo database, https://www.mongodb.com/
Application interface is establised by the Meteor framework, https://www.meteor.com/
## Contributors
Contribution is welcome. You are free to use the existing code and/or improve it. Fork the repository and make pull request to release your changes to the repository.
### Contact ###
For more info contact:
* Morten Mathiasen, Associate professor @ Business Academy Aarhus
* Torben Stamm Mikkelsen, Oncology doctor @ Aarhus University Hospital
## License
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
| Apply MIT license to the repository | Apply MIT license to the repository
| Markdown | mit | eaaajkb/teambuilding-app,LeukemiaResearch/How-R-you-App,LeukemiaResearch/How-R-you-App,eaaajkb/teambuilding-app | markdown | ## Code Before:
Mobile app to register decease and treatment symptoms experienced. The app is used by patients and they can give doctors access to the data in the online and realtime database.
## Motivation
The app is invented during a common research project that is carried out by Business Academy Aarhus and Aarhus University.
## Installation
Download and run the app inside the Meteor development framework.
## API Reference
Data is stored in a Mongo database, https://www.mongodb.com/
Application interface is establised by the Meteor framework, https://www.meteor.com/
## Contributors
Contribution is welcome. You are free to use the existing code and/or improve it. Make a branch and a branch request to release your changes to the repository.
### Contact ###
For more info contact:
* Morten Mathiasen, Associate professor @ Business Academy Aarhus
* Torben Stamm Mikkelsen, Oncology doctor @ Aarhus University Hospital
## License
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
## Instruction:
Apply MIT license to the repository
## Code After:
Mobile app to register decease and treatment symptoms experienced. The app is used by patients and they can give doctors access to the data in the online and realtime database.
## Motivation
The app is invented during a common research project that is carried out by Business Academy Aarhus and Aarhus University.
## Installation
Download and run the app inside the Meteor development framework.
## API Reference
Data is stored in a Mongo database, https://www.mongodb.com/
Application interface is establised by the Meteor framework, https://www.meteor.com/
## Contributors
Contribution is welcome. You are free to use the existing code and/or improve it. Fork the repository and make pull request to release your changes to the repository.
### Contact ###
For more info contact:
* Morten Mathiasen, Associate professor @ Business Academy Aarhus
* Torben Stamm Mikkelsen, Oncology doctor @ Aarhus University Hospital
## License
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).
|
Mobile app to register decease and treatment symptoms experienced. The app is used by patients and they can give doctors access to the data in the online and realtime database.
## Motivation
The app is invented during a common research project that is carried out by Business Academy Aarhus and Aarhus University.
## Installation
Download and run the app inside the Meteor development framework.
## API Reference
Data is stored in a Mongo database, https://www.mongodb.com/
Application interface is establised by the Meteor framework, https://www.meteor.com/
## Contributors
- Contribution is welcome. You are free to use the existing code and/or improve it. Make a branch and a branch request to release your changes to the repository.
? ^^ --- ^^^^ ^^^^^^
+ Contribution is welcome. You are free to use the existing code and/or improve it. Fork the repository and make pull request to release your changes to the repository.
? ^^^ +++ ^^^^^^^^^ + ++ ^^^^
### Contact ###
For more info contact:
* Morten Mathiasen, Associate professor @ Business Academy Aarhus
* Torben Stamm Mikkelsen, Oncology doctor @ Aarhus University Hospital
## License
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT). | 2 | 0.068966 | 1 | 1 |
c00acfba992250588eda71346afceac89bc7387b | mobile/src/test/java/com/alexstyl/specialdates/events/namedays/calendar/resource/NamedayJSONResourceProviderTest.java | mobile/src/test/java/com/alexstyl/specialdates/events/namedays/calendar/resource/NamedayJSONResourceProviderTest.java | package com.alexstyl.specialdates.events.namedays.calendar.resource;
import com.alexstyl.specialdates.events.namedays.NamedayLocale;
import org.junit.Before;
import org.junit.Test;
import static org.fest.assertions.api.Assertions.assertThat;
public class NamedayJSONResourceProviderTest {
private NamedayJSONResourceProvider provider;
@Before
public void setUp() throws Exception {
provider = new NamedayJSONResourceProvider(new JavaJSONResourceLoader());
}
@Test
public void namedaysAreNotEmpty() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.gr);
assertThat(namedays.getData()).isNotNull();
assertThat(namedays.getSpecial()).isNotNull();
}
}
| package com.alexstyl.specialdates.events.namedays.calendar.resource;
import com.alexstyl.specialdates.events.namedays.NamedayLocale;
import org.junit.Before;
import org.junit.Test;
import static org.fest.assertions.api.Assertions.assertThat;
public class NamedayJSONResourceProviderTest {
private NamedayJSONResourceProvider provider;
@Before
public void setUp() throws Exception {
provider = new NamedayJSONResourceProvider(new JavaJSONResourceLoader());
}
@Test
public void allLocalesHaveData() throws Exception {
for (NamedayLocale namedayLocale : NamedayLocale.values()) {
NamedayJSON namedays = provider.getNamedayJSONFor(namedayLocale);
assertThat(namedays.getData().length()).isNotZero();
}
}
@Test
public void grHasSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.gr);
hasSpecial(namedays);
}
@Test
public void roHasSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.ro);
hasSpecial(namedays);
}
@Test
public void ruHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.ru);
hasNoSpecial(namedays);
}
@Test
public void lvHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.lv);
hasNoSpecial(namedays);
}
@Test
public void csHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.cs);
hasNoSpecial(namedays);
}
@Test
public void skHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.sk);
hasNoSpecial(namedays);
}
private void hasSpecial(NamedayJSON namedays) {
assertThat(namedays.getSpecial().length()).isNotZero();
}
private void hasNoSpecial(NamedayJSON namedays) {
assertThat(namedays.getSpecial().length()).isZero();
}
}
| Add tests for all locals | Add tests for all locals
| Java | mit | pchrysa/Memento-Calendar,pchrysa/Memento-Calendar,pchrysa/Memento-Calendar | java | ## Code Before:
package com.alexstyl.specialdates.events.namedays.calendar.resource;
import com.alexstyl.specialdates.events.namedays.NamedayLocale;
import org.junit.Before;
import org.junit.Test;
import static org.fest.assertions.api.Assertions.assertThat;
public class NamedayJSONResourceProviderTest {
private NamedayJSONResourceProvider provider;
@Before
public void setUp() throws Exception {
provider = new NamedayJSONResourceProvider(new JavaJSONResourceLoader());
}
@Test
public void namedaysAreNotEmpty() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.gr);
assertThat(namedays.getData()).isNotNull();
assertThat(namedays.getSpecial()).isNotNull();
}
}
## Instruction:
Add tests for all locals
## Code After:
package com.alexstyl.specialdates.events.namedays.calendar.resource;
import com.alexstyl.specialdates.events.namedays.NamedayLocale;
import org.junit.Before;
import org.junit.Test;
import static org.fest.assertions.api.Assertions.assertThat;
public class NamedayJSONResourceProviderTest {
private NamedayJSONResourceProvider provider;
@Before
public void setUp() throws Exception {
provider = new NamedayJSONResourceProvider(new JavaJSONResourceLoader());
}
@Test
public void allLocalesHaveData() throws Exception {
for (NamedayLocale namedayLocale : NamedayLocale.values()) {
NamedayJSON namedays = provider.getNamedayJSONFor(namedayLocale);
assertThat(namedays.getData().length()).isNotZero();
}
}
@Test
public void grHasSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.gr);
hasSpecial(namedays);
}
@Test
public void roHasSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.ro);
hasSpecial(namedays);
}
@Test
public void ruHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.ru);
hasNoSpecial(namedays);
}
@Test
public void lvHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.lv);
hasNoSpecial(namedays);
}
@Test
public void csHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.cs);
hasNoSpecial(namedays);
}
@Test
public void skHasNoSpecial() throws Exception {
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.sk);
hasNoSpecial(namedays);
}
private void hasSpecial(NamedayJSON namedays) {
assertThat(namedays.getSpecial().length()).isNotZero();
}
private void hasNoSpecial(NamedayJSON namedays) {
assertThat(namedays.getSpecial().length()).isZero();
}
}
| package com.alexstyl.specialdates.events.namedays.calendar.resource;
import com.alexstyl.specialdates.events.namedays.NamedayLocale;
import org.junit.Before;
import org.junit.Test;
import static org.fest.assertions.api.Assertions.assertThat;
public class NamedayJSONResourceProviderTest {
private NamedayJSONResourceProvider provider;
@Before
public void setUp() throws Exception {
provider = new NamedayJSONResourceProvider(new JavaJSONResourceLoader());
}
@Test
+ public void allLocalesHaveData() throws Exception {
+ for (NamedayLocale namedayLocale : NamedayLocale.values()) {
+ NamedayJSON namedays = provider.getNamedayJSONFor(namedayLocale);
+ assertThat(namedays.getData().length()).isNotZero();
+ }
+ }
+
+ @Test
- public void namedaysAreNotEmpty() throws Exception {
? ^ ^ ^ ^^^^^^^^^^^^^
+ public void grHasSpecial() throws Exception {
? ^^^ ^^^ ^^ ^
NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.gr);
- assertThat(namedays.getData()).isNotNull();
+ hasSpecial(namedays);
+ }
+
+ @Test
+ public void roHasSpecial() throws Exception {
+ NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.ro);
+ hasSpecial(namedays);
+ }
+
+ @Test
+ public void ruHasNoSpecial() throws Exception {
+ NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.ru);
+ hasNoSpecial(namedays);
+ }
+
+ @Test
+ public void lvHasNoSpecial() throws Exception {
+ NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.lv);
+ hasNoSpecial(namedays);
+ }
+
+ @Test
+ public void csHasNoSpecial() throws Exception {
+ NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.cs);
+ hasNoSpecial(namedays);
+ }
+
+ @Test
+ public void skHasNoSpecial() throws Exception {
+ NamedayJSON namedays = provider.getNamedayJSONFor(NamedayLocale.sk);
+ hasNoSpecial(namedays);
+ }
+
+ private void hasSpecial(NamedayJSON namedays) {
- assertThat(namedays.getSpecial()).isNotNull();
? ^^^^
+ assertThat(namedays.getSpecial().length()).isNotZero();
? +++++++++ ^^^^
+ }
+
+ private void hasNoSpecial(NamedayJSON namedays) {
+ assertThat(namedays.getSpecial().length()).isZero();
}
} | 51 | 2.04 | 48 | 3 |
aba806537905818364c3f1e88b3c436e04844b28 | package.json | package.json | {
"name": "keen",
"version": "0.1.0",
"dependencies": {
"express": "3.1.0"
},
"engines": {
"node": "0.8.x"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.0"
}
}
| {
"name": "keen",
"version": "0.1.0",
"dependencies": {
"express": "3.1.0"
},
"engines": {
"node": "0.8.x"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.6",
"grunt-contrib-uglify": "~0.2.0"
}
}
| Add the grunt CLI - without it there's no grunt executable | Add the grunt CLI - without it there's no grunt executable
| JSON | mit | vebinua/keen-js,Acidburn0zzz/keen-js,Glathrop/keen-js,chrismoulton/keen-js,jbpionnier/keen-js,allanbrault/keen-js,lawitschka/keen-js,jbpionnier/keen-js,lawitschka/keen-js,Glathrop/keen-js,amplii/keen-js,Acidburn0zzz/keen-js,vebinua/keen-js,allanbrault/keen-js,treasure-data/td-js-sdk,andrehjr/keen-js,ruleant/keen-js,ipartola/keen-js,treasure-data/td-js-sdk,chrismoulton/keen-js,ipartola/keen-js,ruleant/keen-js,amplii/keen-js,andrehjr/keen-js | json | ## Code Before:
{
"name": "keen",
"version": "0.1.0",
"dependencies": {
"express": "3.1.0"
},
"engines": {
"node": "0.8.x"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.0"
}
}
## Instruction:
Add the grunt CLI - without it there's no grunt executable
## Code After:
{
"name": "keen",
"version": "0.1.0",
"dependencies": {
"express": "3.1.0"
},
"engines": {
"node": "0.8.x"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.6",
"grunt-contrib-uglify": "~0.2.0"
}
}
| {
"name": "keen",
"version": "0.1.0",
"dependencies": {
"express": "3.1.0"
},
"engines": {
"node": "0.8.x"
},
"devDependencies": {
"grunt": "~0.4.1",
+ "grunt-cli": "~0.1.6",
"grunt-contrib-uglify": "~0.2.0"
}
} | 1 | 0.071429 | 1 | 0 |
bb5e6eeb68e217243d7369f65cc554708ad090b2 | README.md | README.md |
An infinite runner game built with Phaser game engine
|
An infinite runner game built with the Phaser game engine.
Only one thing... click to jump and avoid obstacles!
Images created in Inkscape, audio created in Audacity.
| Add more to the readme | Add more to the readme | Markdown | mit | InsaneAboutTNT/RushOfTheCube,InsaneAboutTNT/RushOfTheCube | markdown | ## Code Before:
An infinite runner game built with Phaser game engine
## Instruction:
Add more to the readme
## Code After:
An infinite runner game built with the Phaser game engine.
Only one thing... click to jump and avoid obstacles!
Images created in Inkscape, audio created in Audacity.
|
- An infinite runner game built with Phaser game engine
+ An infinite runner game built with the Phaser game engine.
? ++++ +
+
+ Only one thing... click to jump and avoid obstacles!
+
+ Images created in Inkscape, audio created in Audacity. | 6 | 3 | 5 | 1 |
8acad77da26c64accf3952a42797a36147cecb79 | ecosystem/platform/server/app/views/layouts/_application.html.erb | ecosystem/platform/server/app/views/layouts/_application.html.erb | <!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<link rel="stylesheet" href="https://use.typekit.net/<%= ENV.fetch('TYPEKIT_CSS_ID') %>.css" />
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>
<body class="flex flex-col h-screen justify-between">
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>
<main class="flex-1">
<%= yield %>
</div>
</main>
<%= render "layouts/footer" %>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<link rel="stylesheet" href="https://use.typekit.net/<%= ENV.fetch('TYPEKIT_CSS_ID') %>.css" />
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>
<body class="flex flex-col h-screen justify-between" data-turbo="false">
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>
<main class="flex-1">
<%= yield %>
</div>
</main>
<%= render "layouts/footer" %>
</body>
</html>
| Disable turbolinks globally to fix recaptcha issues. | Disable turbolinks globally to fix recaptcha issues.
Closes: #990
| HTML+ERB | apache-2.0 | aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core,aptos-labs/aptos-core | html+erb | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<link rel="stylesheet" href="https://use.typekit.net/<%= ENV.fetch('TYPEKIT_CSS_ID') %>.css" />
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>
<body class="flex flex-col h-screen justify-between">
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>
<main class="flex-1">
<%= yield %>
</div>
</main>
<%= render "layouts/footer" %>
</body>
</html>
## Instruction:
Disable turbolinks globally to fix recaptcha issues.
Closes: #990
## Code After:
<!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<link rel="stylesheet" href="https://use.typekit.net/<%= ENV.fetch('TYPEKIT_CSS_ID') %>.css" />
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>
<body class="flex flex-col h-screen justify-between" data-turbo="false">
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>
<main class="flex-1">
<%= yield %>
</div>
</main>
<%= render "layouts/footer" %>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<title>Community Platform</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<link rel="stylesheet" href="https://use.typekit.net/<%= ENV.fetch('TYPEKIT_CSS_ID') %>.css" />
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= render 'layouts/google_analytics' %>
<%= javascript_importmap_tags %>
</head>
- <body class="flex flex-col h-screen justify-between">
+ <body class="flex flex-col h-screen justify-between" data-turbo="false">
? +++++++++++++++++++
<div class="flex flex-col flex-1">
<%= render "layouts/header" unless @hide_header %>
<main class="flex-1">
<%= yield %>
</div>
</main>
<%= render "layouts/footer" %>
</body>
</html> | 2 | 0.068966 | 1 | 1 |
8e898e8767e4a611d2aafdf16eb32f6f39431531 | project.clj | project.clj | (defproject clucy "0.4.0"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/weavejester/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}}
:codox {:src-dir-uri "http://github/weavejester/clucy/blob/master"
:src-linenum-anchor-prefix "L"})
| (defproject org.clojars.kostafey/clucy "0.5.3"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/kostafey/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
| Update fork version and url. | Update fork version and url.
| Clojure | epl-1.0 | kostafey/clucy | clojure | ## Code Before:
(defproject clucy "0.4.0"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/weavejester/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}}
:codox {:src-dir-uri "http://github/weavejester/clucy/blob/master"
:src-linenum-anchor-prefix "L"})
## Instruction:
Update fork version and url.
## Code After:
(defproject org.clojars.kostafey/clucy "0.5.3"
:description "A Clojure interface to the Lucene search engine"
:url "http://github/kostafey/clucy"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:profiles {:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
| - (defproject clucy "0.4.0"
+ (defproject org.clojars.kostafey/clucy "0.5.3"
:description "A Clojure interface to the Lucene search engine"
- :url "http://github/weavejester/clucy"
? ^^^^^^^ ^
+ :url "http://github/kostafey/clucy"
? ^^ ++ ^
:dependencies [[org.clojure/clojure "1.7.0"]
[org.apache.lucene/lucene-core "5.3.0"]
[org.apache.lucene/lucene-queryparser "5.3.0"]
[org.apache.lucene/lucene-analyzers-common "5.3.0"]
[org.apache.lucene/lucene-highlighter "5.3.0"]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
- :profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
? ^ ^
+ :profiles {:1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]}
? ^ ^
- :1.5 {:dependencies [[org.clojure/clojure "1.5.0"]]}
? ^ ^
+ :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}})
? ^ ^ ++
- :1.6 {:dependencies [[org.clojure/clojure "1.6.0-master-SNAPSHOT"]]}}
- :codox {:src-dir-uri "http://github/weavejester/clucy/blob/master"
- :src-linenum-anchor-prefix "L"}) | 11 | 0.733333 | 4 | 7 |
e02b397e2613f23a6d4b98b170e9e0329c189bef | docs/environment.yml | docs/environment.yml | name: pdspect-docs
channels:
- conda-forge
- defaults
dependencies:
- python=3
- ginga==2.6.0
- planetaryimage>=0.5.0
- matplotlib>=1.5.1
- qtpy>=1.2.1
- sphinx>=1.4
- sphinx_rtd_theme
- pip:
- planetary-test-data==0.3.3
- git+https://github.com/willingc/pdsspect
| name: pdsspect-docs
channels:
- conda-forge
- defaults
dependencies:
- python=3
- ginga==2.6.0
- planetaryimage>=0.5.0
- matplotlib>=1.5.1
- qtpy>=1.2.1
- sphinx>=1.4
- sphinx_rtd_theme
- pip:
- planetary-test-data==0.3.3
- git+https://github.com/planetarypy/pdsspect
| Correct link from my fork to upstream | Correct link from my fork to upstream
| YAML | bsd-3-clause | planetarypy/pdsspect | yaml | ## Code Before:
name: pdspect-docs
channels:
- conda-forge
- defaults
dependencies:
- python=3
- ginga==2.6.0
- planetaryimage>=0.5.0
- matplotlib>=1.5.1
- qtpy>=1.2.1
- sphinx>=1.4
- sphinx_rtd_theme
- pip:
- planetary-test-data==0.3.3
- git+https://github.com/willingc/pdsspect
## Instruction:
Correct link from my fork to upstream
## Code After:
name: pdsspect-docs
channels:
- conda-forge
- defaults
dependencies:
- python=3
- ginga==2.6.0
- planetaryimage>=0.5.0
- matplotlib>=1.5.1
- qtpy>=1.2.1
- sphinx>=1.4
- sphinx_rtd_theme
- pip:
- planetary-test-data==0.3.3
- git+https://github.com/planetarypy/pdsspect
| - name: pdspect-docs
+ name: pdsspect-docs
? +
channels:
- conda-forge
- defaults
dependencies:
- python=3
- ginga==2.6.0
- planetaryimage>=0.5.0
- matplotlib>=1.5.1
- qtpy>=1.2.1
- sphinx>=1.4
- sphinx_rtd_theme
- pip:
- planetary-test-data==0.3.3
- - git+https://github.com/willingc/pdsspect
? ^^ ^^ ^^
+ - git+https://github.com/planetarypy/pdsspect
? ^ ^ ^^^^^^^
| 4 | 0.266667 | 2 | 2 |
7d2d52ef90c86a59ef5df8de7dc0b2d0cdece0c9 | mleap-spring-boot/src/main/scala/ml/combust/mleap/springboot/ModelLoader.scala | mleap-spring-boot/src/main/scala/ml/combust/mleap/springboot/ModelLoader.scala | package ml.combust.mleap.springboot
import TypeConverters._
import javax.annotation.PostConstruct
import org.slf4j.LoggerFactory
import ml.combust.mleap.pb
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
import java.nio.file.{Paths, Files}
import scalapb.json4s.Parser
@Component
class ModelLoader {
@Value("${mleap.model.config:#{null}}")
private val modelConfigPath: String = null
private val logger = LoggerFactory.getLogger(classOf[ModelLoader])
private val jsonParser = new Parser()
private val timeout = 60000
@PostConstruct
def loadModel(): Unit = {
if (modelConfigPath == null) {
logger.info("Skipping loading model on startup")
return
}
val configPath = Paths.get(modelConfigPath)
if (!Files.exists(configPath)) {
logger.warn(s"Model path does not exist: $modelConfigPath")
return
}
logger.info(s"Loading model from $modelConfigPath")
val request = new String(Files.readAllBytes(configPath))
StarterConfiguration.getMleapExecutor
.loadModel(jsonParser.fromJsonString[pb.LoadModelRequest](request))(timeout)
}
}
| package ml.combust.mleap.springboot
import TypeConverters._
import javax.annotation.PostConstruct
import org.slf4j.LoggerFactory
import ml.combust.mleap.pb
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
import scala.collection.JavaConverters._
import java.nio.file.{Paths, Files, Path}
import scalapb.json4s.Parser
@Component
class ModelLoader {
@Value("${mleap.model.config:#{null}}")
private val modelConfigPath: String = null
private val logger = LoggerFactory.getLogger(classOf[ModelLoader])
private val jsonParser = new Parser()
private val timeout = 60000
@PostConstruct
def loadModel(): Unit = {
if (modelConfigPath == null) {
logger.info("Skipping loading model on startup")
return
}
val configPath = Paths.get(modelConfigPath)
if (!Files.exists(configPath)) {
logger.warn(s"Model path does not exist: $modelConfigPath")
return
}
val configFiles: List[Path] = if (Files.isDirectory(configPath)) {
Files.list(configPath).iterator().asScala.toList
} else {
List(configPath)
}
for (configFile <- configFiles) {
logger.info(s"Loading model from ${configFile.toString}")
val request = new String(Files.readAllBytes(configFile))
StarterConfiguration.getMleapExecutor
.loadModel(jsonParser.fromJsonString[pb.LoadModelRequest](request))(timeout)
}
}
}
| Support loading multiple models from directory of configs | Support loading multiple models from directory of configs
| Scala | apache-2.0 | combust-ml/mleap,combust-ml/mleap,combust/mleap,combust/mleap,combust/mleap,combust-ml/mleap | scala | ## Code Before:
package ml.combust.mleap.springboot
import TypeConverters._
import javax.annotation.PostConstruct
import org.slf4j.LoggerFactory
import ml.combust.mleap.pb
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
import java.nio.file.{Paths, Files}
import scalapb.json4s.Parser
@Component
class ModelLoader {
@Value("${mleap.model.config:#{null}}")
private val modelConfigPath: String = null
private val logger = LoggerFactory.getLogger(classOf[ModelLoader])
private val jsonParser = new Parser()
private val timeout = 60000
@PostConstruct
def loadModel(): Unit = {
if (modelConfigPath == null) {
logger.info("Skipping loading model on startup")
return
}
val configPath = Paths.get(modelConfigPath)
if (!Files.exists(configPath)) {
logger.warn(s"Model path does not exist: $modelConfigPath")
return
}
logger.info(s"Loading model from $modelConfigPath")
val request = new String(Files.readAllBytes(configPath))
StarterConfiguration.getMleapExecutor
.loadModel(jsonParser.fromJsonString[pb.LoadModelRequest](request))(timeout)
}
}
## Instruction:
Support loading multiple models from directory of configs
## Code After:
package ml.combust.mleap.springboot
import TypeConverters._
import javax.annotation.PostConstruct
import org.slf4j.LoggerFactory
import ml.combust.mleap.pb
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
import scala.collection.JavaConverters._
import java.nio.file.{Paths, Files, Path}
import scalapb.json4s.Parser
@Component
class ModelLoader {
@Value("${mleap.model.config:#{null}}")
private val modelConfigPath: String = null
private val logger = LoggerFactory.getLogger(classOf[ModelLoader])
private val jsonParser = new Parser()
private val timeout = 60000
@PostConstruct
def loadModel(): Unit = {
if (modelConfigPath == null) {
logger.info("Skipping loading model on startup")
return
}
val configPath = Paths.get(modelConfigPath)
if (!Files.exists(configPath)) {
logger.warn(s"Model path does not exist: $modelConfigPath")
return
}
val configFiles: List[Path] = if (Files.isDirectory(configPath)) {
Files.list(configPath).iterator().asScala.toList
} else {
List(configPath)
}
for (configFile <- configFiles) {
logger.info(s"Loading model from ${configFile.toString}")
val request = new String(Files.readAllBytes(configFile))
StarterConfiguration.getMleapExecutor
.loadModel(jsonParser.fromJsonString[pb.LoadModelRequest](request))(timeout)
}
}
}
| package ml.combust.mleap.springboot
import TypeConverters._
import javax.annotation.PostConstruct
import org.slf4j.LoggerFactory
import ml.combust.mleap.pb
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
+ import scala.collection.JavaConverters._
- import java.nio.file.{Paths, Files}
+ import java.nio.file.{Paths, Files, Path}
? ++++++
import scalapb.json4s.Parser
@Component
class ModelLoader {
@Value("${mleap.model.config:#{null}}")
private val modelConfigPath: String = null
private val logger = LoggerFactory.getLogger(classOf[ModelLoader])
private val jsonParser = new Parser()
private val timeout = 60000
@PostConstruct
def loadModel(): Unit = {
if (modelConfigPath == null) {
logger.info("Skipping loading model on startup")
return
}
val configPath = Paths.get(modelConfigPath)
if (!Files.exists(configPath)) {
logger.warn(s"Model path does not exist: $modelConfigPath")
return
}
- logger.info(s"Loading model from $modelConfigPath")
+ val configFiles: List[Path] = if (Files.isDirectory(configPath)) {
+ Files.list(configPath).iterator().asScala.toList
+ } else {
+ List(configPath)
+ }
- val request = new String(Files.readAllBytes(configPath))
+ for (configFile <- configFiles) {
+ logger.info(s"Loading model from ${configFile.toString}")
+ val request = new String(Files.readAllBytes(configFile))
+
- StarterConfiguration.getMleapExecutor
+ StarterConfiguration.getMleapExecutor
? ++
- .loadModel(jsonParser.fromJsonString[pb.LoadModelRequest](request))(timeout)
+ .loadModel(jsonParser.fromJsonString[pb.LoadModelRequest](request))(timeout)
? ++
+ }
}
} | 19 | 0.44186 | 14 | 5 |
fb1511fdeb664030ab8e411e594fd33ac5a0bcea | de.mpicbg.tds.knime.hcstools.update/category.xml | de.mpicbg.tds.knime.hcstools.update/category.xml | <?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="de.mpicbg.tds.knime.hcstools.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<category-def name="community-hcs" label="Build artifacts from community-hcs">
<description>Build artifacts from community-hcs</description>
</category-def>
</site> | <?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="de.mpicbg.tds.knime.hcstools.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.r.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.python.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.matlab.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.groovy.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<category-def name="community-hcs" label="Build artifacts from community-hcs">
<description>Build artifacts from community-hcs</description>
</category-def>
</site> | Add knime-scripting features to update site, to create a singular output site we can consume in Jenkins | Add knime-scripting features to update site, to create a singular output site we can consume in Jenkins
| XML | bsd-3-clause | knime-mpicbg/HCS-Tools,knime-mpicbg/HCS-Tools,knime-mpicbg/HCS-Tools,knime-mpicbg/HCS-Tools | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="de.mpicbg.tds.knime.hcstools.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<category-def name="community-hcs" label="Build artifacts from community-hcs">
<description>Build artifacts from community-hcs</description>
</category-def>
</site>
## Instruction:
Add knime-scripting features to update site, to create a singular output site we can consume in Jenkins
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="de.mpicbg.tds.knime.hcstools.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.r.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.python.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.matlab.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<feature id="de.mpicbg.tds.knime.scripting.groovy.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<category-def name="community-hcs" label="Build artifacts from community-hcs">
<description>Build artifacts from community-hcs</description>
</category-def>
</site> | <?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="de.mpicbg.tds.knime.hcstools.feature" version="0.0.0">
+ <category name="community-hcs" />
+ </feature>
+ <feature id="de.mpicbg.tds.knime.scripting.r.feature" version="0.0.0">
+ <category name="community-hcs" />
+ </feature>
+ <feature id="de.mpicbg.tds.knime.scripting.python.feature" version="0.0.0">
+ <category name="community-hcs" />
+ </feature>
+ <feature id="de.mpicbg.tds.knime.scripting.matlab.feature" version="0.0.0">
+ <category name="community-hcs" />
+ </feature>
+ <feature id="de.mpicbg.tds.knime.scripting.groovy.feature" version="0.0.0">
<category name="community-hcs" />
</feature>
<category-def name="community-hcs" label="Build artifacts from community-hcs">
<description>Build artifacts from community-hcs</description>
</category-def>
</site> | 12 | 1.090909 | 12 | 0 |
f096db82998cfd0f857a19f73c25e7a592066ae4 | WEB-INF/resources/db/2.2/seed-data.xml | WEB-INF/resources/db/2.2/seed-data.xml | <?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<property name="now" value="now()" dbms="mysql" />
<property name="now" value="sysdate" dbms="oracle" />
<changeSet author="vlonushte" id="Cohort PV category">
<sql>
insert into catissue_cde
(public_id, long_name, definition, version, last_updated)
values
('cohort', 'Cohort', 'Cohort', '2.2', ${now})
</sql>
</changeSet>
</databaseChangeLog>
| <?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<property name="now" value="now()" dbms="mysql" />
<property name="now" value="sysdate" dbms="oracle" />
<changeSet author="vlonushte" id="Cohort PV category">
<sql>
insert into catissue_cde
(public_id, long_name, definition, version, last_updated)
values
('cohort', 'Cohort', 'Cohort', '2.2', ${now})
</sql>
</changeSet>
<changeSet author="ahegade" id="Update specimen unit table with concentration measures">
<sql>
update
OS_SPECIMEN_UNITS
set
CONC_UNIT = 'cells'
where
SPECIMEN_CLASS = 'Cell';
update
OS_SPECIMEN_UNITS
set
CONC_UNIT = 'microgram/ml',
CONC_HTML_DISPLAY_CODE='µg/ml'
where
SPECIMEN_CLASS in ('Molecular', 'Fluid', 'Tissue');
</sql>
</changeSet>
</databaseChangeLog>
| Allow "Concentration" field to all specimen classes | OPSMN-2454: Allow "Concentration" field to all specimen classes
- Adding seedadata for concentration measures.
| XML | bsd-3-clause | krishagni/openspecimen,krishagni/openspecimen,krishagni/openspecimen | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<property name="now" value="now()" dbms="mysql" />
<property name="now" value="sysdate" dbms="oracle" />
<changeSet author="vlonushte" id="Cohort PV category">
<sql>
insert into catissue_cde
(public_id, long_name, definition, version, last_updated)
values
('cohort', 'Cohort', 'Cohort', '2.2', ${now})
</sql>
</changeSet>
</databaseChangeLog>
## Instruction:
OPSMN-2454: Allow "Concentration" field to all specimen classes
- Adding seedadata for concentration measures.
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<property name="now" value="now()" dbms="mysql" />
<property name="now" value="sysdate" dbms="oracle" />
<changeSet author="vlonushte" id="Cohort PV category">
<sql>
insert into catissue_cde
(public_id, long_name, definition, version, last_updated)
values
('cohort', 'Cohort', 'Cohort', '2.2', ${now})
</sql>
</changeSet>
<changeSet author="ahegade" id="Update specimen unit table with concentration measures">
<sql>
update
OS_SPECIMEN_UNITS
set
CONC_UNIT = 'cells'
where
SPECIMEN_CLASS = 'Cell';
update
OS_SPECIMEN_UNITS
set
CONC_UNIT = 'microgram/ml',
CONC_HTML_DISPLAY_CODE='µg/ml'
where
SPECIMEN_CLASS in ('Molecular', 'Fluid', 'Tissue');
</sql>
</changeSet>
</databaseChangeLog>
| <?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<property name="now" value="now()" dbms="mysql" />
<property name="now" value="sysdate" dbms="oracle" />
<changeSet author="vlonushte" id="Cohort PV category">
<sql>
insert into catissue_cde
(public_id, long_name, definition, version, last_updated)
values
('cohort', 'Cohort', 'Cohort', '2.2', ${now})
</sql>
</changeSet>
+
+ <changeSet author="ahegade" id="Update specimen unit table with concentration measures">
+ <sql>
+ update
+ OS_SPECIMEN_UNITS
+ set
+ CONC_UNIT = 'cells'
+ where
+ SPECIMEN_CLASS = 'Cell';
+
+ update
+ OS_SPECIMEN_UNITS
+ set
+ CONC_UNIT = 'microgram/ml',
+ CONC_HTML_DISPLAY_CODE='µg/ml'
+ where
+ SPECIMEN_CLASS in ('Molecular', 'Fluid', 'Tissue');
+
+ </sql>
+ </changeSet>
</databaseChangeLog> | 20 | 1.052632 | 20 | 0 |
7701bc6ab0b1e27daec6da83a8e50e2b9aaf1997 | .styleci.yml | .styleci.yml | preset: psr2
enabled:
- concat_without_spaces
- extra_empty_lines
- short_array_syntax
- method_separation
- multiline_array_trailing_comma
- no_empty_lines_after_phpdocs
- operators_spaces
- ordered_use
# - phpdoc_align
- phpdoc_indent
- phpdoc_inline_tag
- phpdoc_no_access
- phpdoc_no_package
- phpdoc_order
- phpdoc_scalar
- phpdoc_separation
- phpdoc_to_comment
- phpdoc_trim
- phpdoc_type_to_var
- phpdoc_types
- phpdoc_var_without_name
- return
- short_bool_cast
- single_quote
- spaces_after_semicolon
- spaces_cast
- standardize_not_equal
- ternary_spaces
- trim_array_spaces
- unalign_double_arrow
- unalign_equals
- unary_operators_spaces
- unneeded_control_parentheses
- unused_use
- whitespacy_lines
| preset: psr2
enabled:
- concat_without_spaces
- extra_empty_lines
- short_array_syntax
- method_separation
- multiline_array_trailing_comma
- no_empty_lines_after_phpdocs
- operators_spaces
- ordered_use
# - phpdoc_align
- phpdoc_indent
- phpdoc_inline_tag
- phpdoc_no_access
- phpdoc_no_package
- phpdoc_order
- phpdoc_scalar
- phpdoc_separation
- phpdoc_to_comment
- phpdoc_trim
- phpdoc_type_to_var
- phpdoc_types
- phpdoc_var_without_name
- return
- short_bool_cast
- single_quote
- spaces_after_semicolon
- spaces_cast
- standardize_not_equal
- ternary_spaces
- trim_array_spaces
- unalign_double_arrow
- unalign_equals
- unary_operators_spaces
- unneeded_control_parentheses
- unused_use
- whitespacy_lines
finder:
exclude:
- "src/Carbon/Doctrine/DateTimeType.php"
- "src/Carbon/Doctrine/DateTimeImmutableType.php"
| Exclude Doctrine types from StyleCI | Exclude Doctrine types from StyleCI | YAML | mit | lucasmichot/Carbon,briannesbitt/Carbon,kylekatarnls/Carbon | yaml | ## Code Before:
preset: psr2
enabled:
- concat_without_spaces
- extra_empty_lines
- short_array_syntax
- method_separation
- multiline_array_trailing_comma
- no_empty_lines_after_phpdocs
- operators_spaces
- ordered_use
# - phpdoc_align
- phpdoc_indent
- phpdoc_inline_tag
- phpdoc_no_access
- phpdoc_no_package
- phpdoc_order
- phpdoc_scalar
- phpdoc_separation
- phpdoc_to_comment
- phpdoc_trim
- phpdoc_type_to_var
- phpdoc_types
- phpdoc_var_without_name
- return
- short_bool_cast
- single_quote
- spaces_after_semicolon
- spaces_cast
- standardize_not_equal
- ternary_spaces
- trim_array_spaces
- unalign_double_arrow
- unalign_equals
- unary_operators_spaces
- unneeded_control_parentheses
- unused_use
- whitespacy_lines
## Instruction:
Exclude Doctrine types from StyleCI
## Code After:
preset: psr2
enabled:
- concat_without_spaces
- extra_empty_lines
- short_array_syntax
- method_separation
- multiline_array_trailing_comma
- no_empty_lines_after_phpdocs
- operators_spaces
- ordered_use
# - phpdoc_align
- phpdoc_indent
- phpdoc_inline_tag
- phpdoc_no_access
- phpdoc_no_package
- phpdoc_order
- phpdoc_scalar
- phpdoc_separation
- phpdoc_to_comment
- phpdoc_trim
- phpdoc_type_to_var
- phpdoc_types
- phpdoc_var_without_name
- return
- short_bool_cast
- single_quote
- spaces_after_semicolon
- spaces_cast
- standardize_not_equal
- ternary_spaces
- trim_array_spaces
- unalign_double_arrow
- unalign_equals
- unary_operators_spaces
- unneeded_control_parentheses
- unused_use
- whitespacy_lines
finder:
exclude:
- "src/Carbon/Doctrine/DateTimeType.php"
- "src/Carbon/Doctrine/DateTimeImmutableType.php"
| preset: psr2
enabled:
- concat_without_spaces
- extra_empty_lines
- short_array_syntax
- method_separation
- multiline_array_trailing_comma
- no_empty_lines_after_phpdocs
- operators_spaces
- ordered_use
# - phpdoc_align
- phpdoc_indent
- phpdoc_inline_tag
- phpdoc_no_access
- phpdoc_no_package
- phpdoc_order
- phpdoc_scalar
- phpdoc_separation
- phpdoc_to_comment
- phpdoc_trim
- phpdoc_type_to_var
- phpdoc_types
- phpdoc_var_without_name
- return
- short_bool_cast
- single_quote
- spaces_after_semicolon
- spaces_cast
- standardize_not_equal
- ternary_spaces
- trim_array_spaces
- unalign_double_arrow
- unalign_equals
- unary_operators_spaces
- unneeded_control_parentheses
- unused_use
- whitespacy_lines
+
+ finder:
+ exclude:
+ - "src/Carbon/Doctrine/DateTimeType.php"
+ - "src/Carbon/Doctrine/DateTimeImmutableType.php" | 5 | 0.131579 | 5 | 0 |
c10d6b1d749cf15000a3c88bab99c4478e662686 | app/views/admin/classifications/show.html.erb | app/views/admin/classifications/show.html.erb | <% page_title @classification.name %>
<% content_for :classification_tab do %>
<table class="<%= model_name %> table">
<tr>
<th>Description</th>
<td class="description"><%= @classification.description %></td>
</tr>
<tr>
<td class="details">Details</td>
<td class="details"><%= classification_contents_breakdown(@classification) %></td>
</tr>
<tr>
<td>Duration</td>
<td class="duration">
<% if @classification.start_date && @classification.end_date %>
<%= @classification.start_date %> to <%= @classification.end_date %>
<% end %>
</td>
</tr>
<tr>
<td>Related</td>
<td class="related">
<% if @classification.related_classifications.any? %>
<ul>
<% @classification.related_classifications.each do |pa| %>
<%= content_tag_for(:li, pa) do %>
<%= link_to pa.name, [:admin, pa], title: "Edit #{model_name.humanize.downcase} #{pa.name}" %>
<% end %>
<% end %>
</ul>
<% else %>
<em>None</em>
<% end %>
</td>
</tr>
</table>
<div class="form-actions">
<%= link_to "Edit", [:edit, :admin, @classification], class: "btn btn-large btn-primary"%>
</div>
<% end %>
<%= render partial: 'tab_wrapper' %>
| <% page_title @classification.name %>
<% content_for :classification_tab do %>
<table class="<%= model_name %> table">
<tr>
<th>Description</th>
<td class="description"><%= @classification.description %></td>
</tr>
<tr>
<th>Details</td>
<td class="details"><%= classification_contents_breakdown(@classification) %></td>
</tr>
<tr>
<th>Duration</td>
<td class="duration">
<% if @classification.start_date && @classification.end_date %>
<%= @classification.start_date %> to <%= @classification.end_date %>
<% end %>
</td>
</tr>
<tr>
<th>Related</td>
<td class="related">
<% if @classification.related_classifications.any? %>
<ul>
<% @classification.related_classifications.each do |pa| %>
<%= content_tag_for(:li, pa) do %>
<%= link_to pa.name, [:admin, pa], title: "Edit #{model_name.humanize.downcase} #{pa.name}" %>
<% end %>
<% end %>
</ul>
<% else %>
<em>None</em>
<% end %>
</td>
</tr>
</table>
<div class="form-actions">
<%= link_to "Edit", [:edit, :admin, @classification], class: "btn btn-large btn-primary"%>
</div>
<% end %>
<%= render partial: 'tab_wrapper' %>
| Use <th> tags for table headings | Use <th> tags for table headings
| HTML+ERB | mit | robinwhittleton/whitehall,hotvulcan/whitehall,askl56/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,alphagov/whitehall,ggoral/whitehall,ggoral/whitehall,ggoral/whitehall,robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,askl56/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,alphagov/whitehall | html+erb | ## Code Before:
<% page_title @classification.name %>
<% content_for :classification_tab do %>
<table class="<%= model_name %> table">
<tr>
<th>Description</th>
<td class="description"><%= @classification.description %></td>
</tr>
<tr>
<td class="details">Details</td>
<td class="details"><%= classification_contents_breakdown(@classification) %></td>
</tr>
<tr>
<td>Duration</td>
<td class="duration">
<% if @classification.start_date && @classification.end_date %>
<%= @classification.start_date %> to <%= @classification.end_date %>
<% end %>
</td>
</tr>
<tr>
<td>Related</td>
<td class="related">
<% if @classification.related_classifications.any? %>
<ul>
<% @classification.related_classifications.each do |pa| %>
<%= content_tag_for(:li, pa) do %>
<%= link_to pa.name, [:admin, pa], title: "Edit #{model_name.humanize.downcase} #{pa.name}" %>
<% end %>
<% end %>
</ul>
<% else %>
<em>None</em>
<% end %>
</td>
</tr>
</table>
<div class="form-actions">
<%= link_to "Edit", [:edit, :admin, @classification], class: "btn btn-large btn-primary"%>
</div>
<% end %>
<%= render partial: 'tab_wrapper' %>
## Instruction:
Use <th> tags for table headings
## Code After:
<% page_title @classification.name %>
<% content_for :classification_tab do %>
<table class="<%= model_name %> table">
<tr>
<th>Description</th>
<td class="description"><%= @classification.description %></td>
</tr>
<tr>
<th>Details</td>
<td class="details"><%= classification_contents_breakdown(@classification) %></td>
</tr>
<tr>
<th>Duration</td>
<td class="duration">
<% if @classification.start_date && @classification.end_date %>
<%= @classification.start_date %> to <%= @classification.end_date %>
<% end %>
</td>
</tr>
<tr>
<th>Related</td>
<td class="related">
<% if @classification.related_classifications.any? %>
<ul>
<% @classification.related_classifications.each do |pa| %>
<%= content_tag_for(:li, pa) do %>
<%= link_to pa.name, [:admin, pa], title: "Edit #{model_name.humanize.downcase} #{pa.name}" %>
<% end %>
<% end %>
</ul>
<% else %>
<em>None</em>
<% end %>
</td>
</tr>
</table>
<div class="form-actions">
<%= link_to "Edit", [:edit, :admin, @classification], class: "btn btn-large btn-primary"%>
</div>
<% end %>
<%= render partial: 'tab_wrapper' %>
| <% page_title @classification.name %>
<% content_for :classification_tab do %>
<table class="<%= model_name %> table">
<tr>
<th>Description</th>
<td class="description"><%= @classification.description %></td>
</tr>
<tr>
- <td class="details">Details</td>
+ <th>Details</td>
<td class="details"><%= classification_contents_breakdown(@classification) %></td>
</tr>
<tr>
- <td>Duration</td>
? ^
+ <th>Duration</td>
? ^
<td class="duration">
<% if @classification.start_date && @classification.end_date %>
<%= @classification.start_date %> to <%= @classification.end_date %>
<% end %>
</td>
</tr>
<tr>
- <td>Related</td>
? ^
+ <th>Related</td>
? ^
<td class="related">
<% if @classification.related_classifications.any? %>
<ul>
<% @classification.related_classifications.each do |pa| %>
<%= content_tag_for(:li, pa) do %>
<%= link_to pa.name, [:admin, pa], title: "Edit #{model_name.humanize.downcase} #{pa.name}" %>
<% end %>
<% end %>
</ul>
<% else %>
<em>None</em>
<% end %>
</td>
</tr>
</table>
<div class="form-actions">
<%= link_to "Edit", [:edit, :admin, @classification], class: "btn btn-large btn-primary"%>
</div>
<% end %>
<%= render partial: 'tab_wrapper' %> | 6 | 0.12766 | 3 | 3 |
904145ee0a9111df05ebc545eb54b1da5b223bd3 | api-ref/src/wadls/volume-api/src/v2/samples/volumes/volume-attach-request.json | api-ref/src/wadls/volume-api/src/v2/samples/volumes/volume-attach-request.json | {
"os-attach": {
"instance_uuid": "95D9EF50-507D-11E5-B970-0800200C9A66",
"host_name": "cinder-2",
"mountpoint": "/dev/vdc"
}
}
| {
"os-attach": {
"instance_uuid": "95D9EF50-507D-11E5-B970-0800200C9A66",
"mountpoint": "/dev/vdc"
}
}
| Remove "host_name" in os_attach parameter | Remove "host_name" in os_attach parameter
It cannot be in the same request with "instance_uuid"
Change-Id: I181a2bedcf57d303c924a53d47d62305ef3af678
Closes-Bug: #1515614
| JSON | apache-2.0 | dreamhost/api-site,openstack/api-site,Tesora/tesora-api-site,Tesora/tesora-api-site,Tesora/tesora-api-site,Tesora/tesora-api-site,dreamhost/api-site,dreamhost/api-site,openstack/api-site,openstack/api-site,openstack/api-site,dreamhost/api-site,dreamhost/api-site,dreamhost/api-site,Tesora/tesora-api-site,dreamhost/api-site,Tesora/tesora-api-site,Tesora/tesora-api-site | json | ## Code Before:
{
"os-attach": {
"instance_uuid": "95D9EF50-507D-11E5-B970-0800200C9A66",
"host_name": "cinder-2",
"mountpoint": "/dev/vdc"
}
}
## Instruction:
Remove "host_name" in os_attach parameter
It cannot be in the same request with "instance_uuid"
Change-Id: I181a2bedcf57d303c924a53d47d62305ef3af678
Closes-Bug: #1515614
## Code After:
{
"os-attach": {
"instance_uuid": "95D9EF50-507D-11E5-B970-0800200C9A66",
"mountpoint": "/dev/vdc"
}
}
| {
"os-attach": {
"instance_uuid": "95D9EF50-507D-11E5-B970-0800200C9A66",
- "host_name": "cinder-2",
"mountpoint": "/dev/vdc"
}
} | 1 | 0.142857 | 0 | 1 |
da1651145c93fc876d4156357bb1f1784c6b2100 | src/SFA.DAS.EAS.Employer_Account.Database/StoredProcedures/Cleardown.sql | src/SFA.DAS.EAS.Employer_Account.Database/StoredProcedures/Cleardown.sql | CREATE PROCEDURE [employer_account].[Cleardown]
@INCLUDEUSERTABLE TINYINT = 0
AS
DELETE FROM [employer_account].[AccountEmployerAgreement];
DELETE FROM [employer_account].[EmployerAgreement];
DELETE FROM [employer_account].[Invitation];
DELETE FROM [employer_account].[Membership];
IF @INCLUDEUSERTABLE = 1
BEGIN
DELETE FROM [employer_account].[User];
END
DELETE FROM [employer_account].[Paye];
DELETE FROM [employer_account].[LegalEntity];
DELETE FROM [employer_account].[AccountHistory]
DELETE FROM [employer_account].[Account];
DELETE FROM [employer_account].[Role];
DELETE FROM [employer_account].[EmployerAgreementTemplate];
RETURN 0
| CREATE PROCEDURE [employer_account].[Cleardown]
@INCLUDEUSERTABLE TINYINT = 0
AS
DELETE FROM [employer_account].[AccountEmployerAgreement];
DELETE FROM [employer_account].[EmployerAgreement];
DELETE FROM [employer_account].[Invitation];
DELETE FROM [employer_account].[Membership];
IF @INCLUDEUSERTABLE = 1
BEGIN
DELETE FROM [employer_account].[User];
END
DELETE FROM [employer_account].[Paye];
DELETE FROM [employer_account].[LegalEntity];
DELETE FROM [employer_account].[AccountHistory]
DELETE FROM [employer_account].[Account];
DELETE FROM [employer_account].[EmployerAgreementTemplate];
RETURN 0
| Remove delete from table that does not exist | Remove delete from table that does not exist
| SQL | mit | SkillsFundingAgency/das-employerapprenticeshipsservice,SkillsFundingAgency/das-employerapprenticeshipsservice,SkillsFundingAgency/das-employerapprenticeshipsservice | sql | ## Code Before:
CREATE PROCEDURE [employer_account].[Cleardown]
@INCLUDEUSERTABLE TINYINT = 0
AS
DELETE FROM [employer_account].[AccountEmployerAgreement];
DELETE FROM [employer_account].[EmployerAgreement];
DELETE FROM [employer_account].[Invitation];
DELETE FROM [employer_account].[Membership];
IF @INCLUDEUSERTABLE = 1
BEGIN
DELETE FROM [employer_account].[User];
END
DELETE FROM [employer_account].[Paye];
DELETE FROM [employer_account].[LegalEntity];
DELETE FROM [employer_account].[AccountHistory]
DELETE FROM [employer_account].[Account];
DELETE FROM [employer_account].[Role];
DELETE FROM [employer_account].[EmployerAgreementTemplate];
RETURN 0
## Instruction:
Remove delete from table that does not exist
## Code After:
CREATE PROCEDURE [employer_account].[Cleardown]
@INCLUDEUSERTABLE TINYINT = 0
AS
DELETE FROM [employer_account].[AccountEmployerAgreement];
DELETE FROM [employer_account].[EmployerAgreement];
DELETE FROM [employer_account].[Invitation];
DELETE FROM [employer_account].[Membership];
IF @INCLUDEUSERTABLE = 1
BEGIN
DELETE FROM [employer_account].[User];
END
DELETE FROM [employer_account].[Paye];
DELETE FROM [employer_account].[LegalEntity];
DELETE FROM [employer_account].[AccountHistory]
DELETE FROM [employer_account].[Account];
DELETE FROM [employer_account].[EmployerAgreementTemplate];
RETURN 0
| CREATE PROCEDURE [employer_account].[Cleardown]
@INCLUDEUSERTABLE TINYINT = 0
AS
DELETE FROM [employer_account].[AccountEmployerAgreement];
DELETE FROM [employer_account].[EmployerAgreement];
DELETE FROM [employer_account].[Invitation];
DELETE FROM [employer_account].[Membership];
IF @INCLUDEUSERTABLE = 1
BEGIN
DELETE FROM [employer_account].[User];
END
DELETE FROM [employer_account].[Paye];
DELETE FROM [employer_account].[LegalEntity];
DELETE FROM [employer_account].[AccountHistory]
- DELETE FROM [employer_account].[Account];
+ DELETE FROM [employer_account].[Account];
? +
- DELETE FROM [employer_account].[Role];
DELETE FROM [employer_account].[EmployerAgreementTemplate];
RETURN 0 | 3 | 0.15 | 1 | 2 |
8d513f02f31b78a65b920293a5aeebfc0e52473d | app/src/main/java/net/squanchy/navigation/Navigator.java | app/src/main/java/net/squanchy/navigation/Navigator.java | package net.squanchy.navigation;
import android.content.Context;
import android.content.Intent;
import net.squanchy.eventdetails.EventDetailsActivity;
import net.squanchy.search.SearchActivity;
import net.squanchy.speaker.SpeakerDetailsActivity;
public class Navigator {
private final Context context;
public Navigator(Context context) {
this.context = context;
}
public void toEventDetails(String eventId) {
Intent intent = EventDetailsActivity.createIntent(context, eventId);
context.startActivity(intent);
}
public void toSpeakerDetails(String speakerId) {
Intent intent = SpeakerDetailsActivity.createIntent(context, speakerId);
context.startActivity(intent);
}
public void toSearch() {
context.startActivity(new Intent(context, SearchActivity.class));
}
}
| package net.squanchy.navigation;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import net.squanchy.eventdetails.EventDetailsActivity;
import net.squanchy.search.SearchActivity;
import net.squanchy.speaker.SpeakerDetailsActivity;
public class Navigator {
private final Context context;
public Navigator(Context context) {
this.context = context;
}
public void toEventDetails(String eventId) {
Intent intent = EventDetailsActivity.createIntent(context, eventId);
context.startActivity(intent);
}
public void toSpeakerDetails(String speakerId) {
Intent intent = SpeakerDetailsActivity.createIntent(context, speakerId);
context.startActivity(intent);
}
public void toSearch() {
context.startActivity(new Intent(context, SearchActivity.class));
}
public void toTwitterProfile(String username) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=" + username));
if (canResolve(intent)) {
context.startActivity(intent);
} else {
toExternalUrl("https://twitter.com/" + username);
context.startActivity(intent);
}
}
private boolean canResolve(Intent intent) {
return context.getPackageManager()
.queryIntentActivities(intent, 0)
.isEmpty();
}
public void toExternalUrl(String url) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
context.startActivity(intent);
}
}
| Add support for navigating to Twitter profile and external URL | Add support for navigating to Twitter profile and external URL
| Java | apache-2.0 | squanchy-dev/squanchy-android,squanchy-dev/squanchy-android,squanchy-dev/squanchy-android | java | ## Code Before:
package net.squanchy.navigation;
import android.content.Context;
import android.content.Intent;
import net.squanchy.eventdetails.EventDetailsActivity;
import net.squanchy.search.SearchActivity;
import net.squanchy.speaker.SpeakerDetailsActivity;
public class Navigator {
private final Context context;
public Navigator(Context context) {
this.context = context;
}
public void toEventDetails(String eventId) {
Intent intent = EventDetailsActivity.createIntent(context, eventId);
context.startActivity(intent);
}
public void toSpeakerDetails(String speakerId) {
Intent intent = SpeakerDetailsActivity.createIntent(context, speakerId);
context.startActivity(intent);
}
public void toSearch() {
context.startActivity(new Intent(context, SearchActivity.class));
}
}
## Instruction:
Add support for navigating to Twitter profile and external URL
## Code After:
package net.squanchy.navigation;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import net.squanchy.eventdetails.EventDetailsActivity;
import net.squanchy.search.SearchActivity;
import net.squanchy.speaker.SpeakerDetailsActivity;
public class Navigator {
private final Context context;
public Navigator(Context context) {
this.context = context;
}
public void toEventDetails(String eventId) {
Intent intent = EventDetailsActivity.createIntent(context, eventId);
context.startActivity(intent);
}
public void toSpeakerDetails(String speakerId) {
Intent intent = SpeakerDetailsActivity.createIntent(context, speakerId);
context.startActivity(intent);
}
public void toSearch() {
context.startActivity(new Intent(context, SearchActivity.class));
}
public void toTwitterProfile(String username) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=" + username));
if (canResolve(intent)) {
context.startActivity(intent);
} else {
toExternalUrl("https://twitter.com/" + username);
context.startActivity(intent);
}
}
private boolean canResolve(Intent intent) {
return context.getPackageManager()
.queryIntentActivities(intent, 0)
.isEmpty();
}
public void toExternalUrl(String url) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
context.startActivity(intent);
}
}
| package net.squanchy.navigation;
import android.content.Context;
import android.content.Intent;
+ import android.net.Uri;
import net.squanchy.eventdetails.EventDetailsActivity;
import net.squanchy.search.SearchActivity;
import net.squanchy.speaker.SpeakerDetailsActivity;
public class Navigator {
private final Context context;
public Navigator(Context context) {
this.context = context;
}
public void toEventDetails(String eventId) {
Intent intent = EventDetailsActivity.createIntent(context, eventId);
context.startActivity(intent);
}
public void toSpeakerDetails(String speakerId) {
Intent intent = SpeakerDetailsActivity.createIntent(context, speakerId);
context.startActivity(intent);
}
public void toSearch() {
context.startActivity(new Intent(context, SearchActivity.class));
}
+
+ public void toTwitterProfile(String username) {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=" + username));
+ if (canResolve(intent)) {
+ context.startActivity(intent);
+ } else {
+ toExternalUrl("https://twitter.com/" + username);
+ context.startActivity(intent);
+ }
+ }
+
+ private boolean canResolve(Intent intent) {
+ return context.getPackageManager()
+ .queryIntentActivities(intent, 0)
+ .isEmpty();
+ }
+
+ public void toExternalUrl(String url) {
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+ context.startActivity(intent);
+ }
} | 22 | 0.709677 | 22 | 0 |
d2cbcad65914ccd26b57dcec12c048c3524ecdc4 | src/cclib/__init__.py | src/cclib/__init__.py |
__version__ = "1.5"
from . import parser
from . import progress
from . import method
from . import bridge
from . import io
# The test module can be imported if it was installed with cclib.
try:
from . import test
except ImportError:
pass
|
__version__ = "1.5"
from . import parser
from . import progress
from . import method
from . import bridge
from . import io
# The test module can be imported if it was installed with cclib.
try:
from . import test
except ImportError:
pass
# The objects below constitute our public API. These names will not change
# over time. Names in the sub-modules will typically also be backwards
# compatible, but may sometimes change when code is moved around.
ccopen = io.ccopen
| Add alias cclib.ccopen for easy access | Add alias cclib.ccopen for easy access
| Python | bsd-3-clause | langner/cclib,gaursagar/cclib,ATenderholt/cclib,cclib/cclib,berquist/cclib,berquist/cclib,langner/cclib,berquist/cclib,ATenderholt/cclib,gaursagar/cclib,langner/cclib,cclib/cclib,cclib/cclib | python | ## Code Before:
__version__ = "1.5"
from . import parser
from . import progress
from . import method
from . import bridge
from . import io
# The test module can be imported if it was installed with cclib.
try:
from . import test
except ImportError:
pass
## Instruction:
Add alias cclib.ccopen for easy access
## Code After:
__version__ = "1.5"
from . import parser
from . import progress
from . import method
from . import bridge
from . import io
# The test module can be imported if it was installed with cclib.
try:
from . import test
except ImportError:
pass
# The objects below constitute our public API. These names will not change
# over time. Names in the sub-modules will typically also be backwards
# compatible, but may sometimes change when code is moved around.
ccopen = io.ccopen
|
__version__ = "1.5"
from . import parser
from . import progress
from . import method
from . import bridge
from . import io
# The test module can be imported if it was installed with cclib.
try:
from . import test
except ImportError:
pass
+
+ # The objects below constitute our public API. These names will not change
+ # over time. Names in the sub-modules will typically also be backwards
+ # compatible, but may sometimes change when code is moved around.
+ ccopen = io.ccopen | 5 | 0.357143 | 5 | 0 |
364d25ab2fbad9893500952f8afdc32943975823 | _includes/sidebar.html | _includes/sidebar.html | <nav>
<a href="/">
<img src="/assets/img/avatar-colorful.jpg" id="avatar" />
</a>
<div id="bio">
<p>
Founder/CEO <a href="https://pulumi.io">Pulumi</a> •
Cloud, languages, and developer tools guy •
Eat, sleep, code, repeat
</p>
</div>
<div id="series">
<p>
<b>Popular:</b><br>
<a href="http://joeduffyblog.com/2018/06/18/hello-pulumi/">Pulumi</a><br>
<a href="/2015/11/03/blogging-about-midori">Midori</a><br>
<a href="/2013/02/17/software-leadership-series">Software Leadership</a><br>
</p>
</div>
<div id="social">
{% include social.html %}
</div>
© Joe Duffy, 2018
</nav>
| <nav>
<a href="/">
<img src="/assets/img/avatar-colorful.jpg" id="avatar" />
</a>
<div id="bio">
<p>
Founder/CEO <a href="https://pulumi.io">Pulumi</a> •
Cloud, languages, and developer tools guy •
Eat, sleep, code, repeat
</p>
</div>
<div id="series">
<p>
<b>Popular:</b><br>
<a href="/2019/09/05/journey-to-pulumi-1-0">Pulumi</a><br>
<a href="/2015/11/03/blogging-about-midori">Midori</a><br>
<a href="/2013/02/17/software-leadership-series">Software Leadership</a><br>
</p>
</div>
<div id="social">
{% include social.html %}
</div>
© Joe Duffy, 2018
</nav>
| Update link to latest Pulumi post | Update link to latest Pulumi post
| HTML | mit | joeduffy/joeduffy.github.io | html | ## Code Before:
<nav>
<a href="/">
<img src="/assets/img/avatar-colorful.jpg" id="avatar" />
</a>
<div id="bio">
<p>
Founder/CEO <a href="https://pulumi.io">Pulumi</a> •
Cloud, languages, and developer tools guy •
Eat, sleep, code, repeat
</p>
</div>
<div id="series">
<p>
<b>Popular:</b><br>
<a href="http://joeduffyblog.com/2018/06/18/hello-pulumi/">Pulumi</a><br>
<a href="/2015/11/03/blogging-about-midori">Midori</a><br>
<a href="/2013/02/17/software-leadership-series">Software Leadership</a><br>
</p>
</div>
<div id="social">
{% include social.html %}
</div>
© Joe Duffy, 2018
</nav>
## Instruction:
Update link to latest Pulumi post
## Code After:
<nav>
<a href="/">
<img src="/assets/img/avatar-colorful.jpg" id="avatar" />
</a>
<div id="bio">
<p>
Founder/CEO <a href="https://pulumi.io">Pulumi</a> •
Cloud, languages, and developer tools guy •
Eat, sleep, code, repeat
</p>
</div>
<div id="series">
<p>
<b>Popular:</b><br>
<a href="/2019/09/05/journey-to-pulumi-1-0">Pulumi</a><br>
<a href="/2015/11/03/blogging-about-midori">Midori</a><br>
<a href="/2013/02/17/software-leadership-series">Software Leadership</a><br>
</p>
</div>
<div id="social">
{% include social.html %}
</div>
© Joe Duffy, 2018
</nav>
| <nav>
<a href="/">
<img src="/assets/img/avatar-colorful.jpg" id="avatar" />
</a>
<div id="bio">
<p>
Founder/CEO <a href="https://pulumi.io">Pulumi</a> •
Cloud, languages, and developer tools guy •
Eat, sleep, code, repeat
</p>
</div>
<div id="series">
<p>
<b>Popular:</b><br>
- <a href="http://joeduffyblog.com/2018/06/18/hello-pulumi/">Pulumi</a><br>
+ <a href="/2019/09/05/journey-to-pulumi-1-0">Pulumi</a><br>
<a href="/2015/11/03/blogging-about-midori">Midori</a><br>
<a href="/2013/02/17/software-leadership-series">Software Leadership</a><br>
</p>
</div>
<div id="social">
{% include social.html %}
</div>
© Joe Duffy, 2018
</nav> | 2 | 0.083333 | 1 | 1 |
ee8319fc0a0b3e9ff98714e62c5cb78a61af15e9 | README.md | README.md | Miscellaneous things related to my existence in the physical world.
## Boostrapping a macOS machine
### Prerequisites
- An SSH key.
### Making it go
```sh
$ ansible-playbook -K osx.yml
```
### Things this doesn't handle
#### Installing Dropbox
For Reasons™, Dropbox tends to be one of the first things I set up.
#### Transferring SSH and GPG keys.
| Miscellaneous things related to my existence in the physical world.
## Boostrapping a macOS machine
### Prerequisites
- An SSH key.
### Making it go
```sh
$ ansible-playbook -K osx.yml
```
### Things this doesn't handle
#### Installing Dropbox
For Reasons™, Dropbox tends to be one of the first things I set up.
#### Transferring SSH and GPG keys.
#### Setting my login shell
In enables fish as a login shell, but doesn't set it as mine. You want:
```sh
$ chsh -s /usr/local/bin/fish
```
| Make a note about setting a login shell. | Make a note about setting a login shell.
| Markdown | mit | alloy-d/alloy-d.nyc | markdown | ## Code Before:
Miscellaneous things related to my existence in the physical world.
## Boostrapping a macOS machine
### Prerequisites
- An SSH key.
### Making it go
```sh
$ ansible-playbook -K osx.yml
```
### Things this doesn't handle
#### Installing Dropbox
For Reasons™, Dropbox tends to be one of the first things I set up.
#### Transferring SSH and GPG keys.
## Instruction:
Make a note about setting a login shell.
## Code After:
Miscellaneous things related to my existence in the physical world.
## Boostrapping a macOS machine
### Prerequisites
- An SSH key.
### Making it go
```sh
$ ansible-playbook -K osx.yml
```
### Things this doesn't handle
#### Installing Dropbox
For Reasons™, Dropbox tends to be one of the first things I set up.
#### Transferring SSH and GPG keys.
#### Setting my login shell
In enables fish as a login shell, but doesn't set it as mine. You want:
```sh
$ chsh -s /usr/local/bin/fish
```
| Miscellaneous things related to my existence in the physical world.
## Boostrapping a macOS machine
### Prerequisites
- An SSH key.
### Making it go
```sh
$ ansible-playbook -K osx.yml
```
### Things this doesn't handle
#### Installing Dropbox
For Reasons™, Dropbox tends to be one of the first things I set up.
#### Transferring SSH and GPG keys.
+
+ #### Setting my login shell
+
+ In enables fish as a login shell, but doesn't set it as mine. You want:
+
+ ```sh
+ $ chsh -s /usr/local/bin/fish
+ ``` | 8 | 0.380952 | 8 | 0 |
9b6da01f3ad54fdea81cda5fd15d80a07c3f24fa | Resources/config/app/darvin_image.yml | Resources/config/app/darvin_image.yml | darvin_image:
imagine:
filter_sets:
menu_hover:
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
menu_main:
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
| darvin_image:
imagine:
filter_sets:
menu_hover:
entities: Darvin\MenuBundle\Entity\Menu\MenuItemImage
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
menu_main:
entities: Darvin\MenuBundle\Entity\Menu\MenuItemImage
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
| Configure Imagine filter set entities. | Configure Imagine filter set entities.
| YAML | mit | DarvinStudio/DarvinMenuBundle,DarvinStudio/DarvinMenuBundle | yaml | ## Code Before:
darvin_image:
imagine:
filter_sets:
menu_hover:
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
menu_main:
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
## Instruction:
Configure Imagine filter set entities.
## Code After:
darvin_image:
imagine:
filter_sets:
menu_hover:
entities: Darvin\MenuBundle\Entity\Menu\MenuItemImage
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
menu_main:
entities: Darvin\MenuBundle\Entity\Menu\MenuItemImage
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
| darvin_image:
imagine:
filter_sets:
menu_hover:
+ entities: Darvin\MenuBundle\Entity\Menu\MenuItemImage
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound }
menu_main:
+ entities: Darvin\MenuBundle\Entity\Menu\MenuItemImage
filters:
thumbnail: { size: [ 50, 50 ], mode: outbound } | 2 | 0.222222 | 2 | 0 |
2e1d3186f6cd81cfd47942e809b5cdf6644ad84d | modules/unattended_upgrades/templates/50unattended-upgrades.erb | modules/unattended_upgrades/templates/50unattended-upgrades.erb | // Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"<%= @lsbdistid %> stable";
"<%= @lsbdistid %> <%= @lsbdistcodename %>-security";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-updates";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-proposed-updates";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "2nd-line-support@digital.cabinet-office.gov.uk";
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
| // Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"<%= @lsbdistid %> stable";
"<%= @lsbdistid %> <%= @lsbdistcodename %>-security";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-updates";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-proposed-updates";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "machine.email@digital.cabinet-office.gov.uk";
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
| Upgrade emails should not go to 2nd-line list | Upgrade emails should not go to 2nd-line list
| HTML+ERB | mit | alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet | html+erb | ## Code Before:
// Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"<%= @lsbdistid %> stable";
"<%= @lsbdistid %> <%= @lsbdistcodename %>-security";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-updates";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-proposed-updates";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "2nd-line-support@digital.cabinet-office.gov.uk";
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
## Instruction:
Upgrade emails should not go to 2nd-line list
## Code After:
// Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"<%= @lsbdistid %> stable";
"<%= @lsbdistid %> <%= @lsbdistcodename %>-security";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-updates";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-proposed-updates";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "machine.email@digital.cabinet-office.gov.uk";
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70";
| // Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"<%= @lsbdistid %> stable";
"<%= @lsbdistid %> <%= @lsbdistcodename %>-security";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-updates";
// "<%= @lsbdistid %> <%= @lsbdistcodename %>-proposed-updates";
};
// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
- Unattended-Upgrade::Mail "2nd-line-support@digital.cabinet-office.gov.uk";
? ^^^^^ ^^^^^^^^
+ Unattended-Upgrade::Mail "machine.email@digital.cabinet-office.gov.uk";
? ^^^^ ^^^^^^
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/reboot-required is found after the upgrade
//Unattended-Upgrade::Automatic-Reboot "false";
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire::http::Dl-Limit "70"; | 2 | 0.058824 | 1 | 1 |
34bee65b0fa89f157ed49f62c80afd4497faa91a | Tests/Basic/XCTestManifests.swift | Tests/Basic/XCTestManifests.swift | /*
This source file is part of the Swift.org open source project
Copyright 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
import XCTest
#if !os(OSX)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(ByteStringTests.allTests),
testCase(JSONTests.allTests),
testCase(FSProxyTests.allTests),
testCase(LazyCacheTests.allTests),
testCase(LockTests.allTests),
testCase(OptionParserTests.allTests),
testCase(OutputByteStreamTests.allTests),
testCase(TOMLTests.allTests),
testCase(TemporaryFileTests.allTests),
]
}
#endif
| /*
This source file is part of the Swift.org open source project
Copyright 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
import XCTest
#if !os(OSX)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(ByteStringTests.allTests),
testCase(JSONTests.allTests),
testCase(FSProxyTests.allTests),
testCase(LazyCacheTests.allTests),
testCase(LockTests.allTests),
testCase(OptionParserTests.allTests),
testCase(OutputByteStreamTests.allTests),
testCase(PathTests.allTests),
testCase(PathPerfTests.allTests),
testCase(TOMLTests.allTests),
testCase(TemporaryFileTests.allTests),
]
}
#endif
| Add PathTests and PathPerfTests to the TestManifest so they also run on Linux (macOS picks them up automatically) | Add PathTests and PathPerfTests to the TestManifest so they also run on Linux (macOS picks them up automatically)
| Swift | apache-2.0 | JGiola/swift-package-manager,sschiau/swift-package-manager,vmanot/swift-package-manager,vmanot/swift-package-manager,abertelrud/swift-package-manager,abertelrud/swift-package-manager,JGiola/swift-package-manager,haskellswift/swift-package-manager,mxcl/swift-package-manager,JGiola/swift-package-manager,mxcl/swift-package-manager,sschiau/swift-package-manager,haskellswift/swift-package-manager,sschiau/swift-package-manager,apple/swift-package-manager,abertelrud/swift-package-manager,haskellswift/swift-package-manager,mxcl/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,haskellswift/swift-package-manager,vmanot/swift-package-manager,mxcl/swift-package-manager,sschiau/swift-package-manager,vmanot/swift-package-manager,JGiola/swift-package-manager,vmanot/swift-package-manager,abertelrud/swift-package-manager,apple/swift-package-manager,apple/swift-package-manager,sschiau/swift-package-manager,JGiola/swift-package-manager,abertelrud/swift-package-manager | swift | ## Code Before:
/*
This source file is part of the Swift.org open source project
Copyright 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
import XCTest
#if !os(OSX)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(ByteStringTests.allTests),
testCase(JSONTests.allTests),
testCase(FSProxyTests.allTests),
testCase(LazyCacheTests.allTests),
testCase(LockTests.allTests),
testCase(OptionParserTests.allTests),
testCase(OutputByteStreamTests.allTests),
testCase(TOMLTests.allTests),
testCase(TemporaryFileTests.allTests),
]
}
#endif
## Instruction:
Add PathTests and PathPerfTests to the TestManifest so they also run on Linux (macOS picks them up automatically)
## Code After:
/*
This source file is part of the Swift.org open source project
Copyright 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
import XCTest
#if !os(OSX)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(ByteStringTests.allTests),
testCase(JSONTests.allTests),
testCase(FSProxyTests.allTests),
testCase(LazyCacheTests.allTests),
testCase(LockTests.allTests),
testCase(OptionParserTests.allTests),
testCase(OutputByteStreamTests.allTests),
testCase(PathTests.allTests),
testCase(PathPerfTests.allTests),
testCase(TOMLTests.allTests),
testCase(TemporaryFileTests.allTests),
]
}
#endif
| /*
This source file is part of the Swift.org open source project
Copyright 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
*/
import XCTest
#if !os(OSX)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(ByteStringTests.allTests),
testCase(JSONTests.allTests),
testCase(FSProxyTests.allTests),
testCase(LazyCacheTests.allTests),
testCase(LockTests.allTests),
testCase(OptionParserTests.allTests),
testCase(OutputByteStreamTests.allTests),
+ testCase(PathTests.allTests),
+ testCase(PathPerfTests.allTests),
testCase(TOMLTests.allTests),
testCase(TemporaryFileTests.allTests),
]
}
#endif | 2 | 0.074074 | 2 | 0 |
a64fe58d1287b024e3c7e739ff3e4bf6cb6a384e | packages/he/hex.yaml | packages/he/hex.yaml | homepage: ''
changelog-type: ''
hash: 324cac214a1d449415db644ca172a09755f89901a48cdcb701514320ec4f7f26
test-bench-deps: {}
maintainer: taruti@taruti.net
synopsis: Convert strings into hexadecimal and back.
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=3 && <5'
all-versions:
- '0.1'
- 0.1.1
- 0.1.2
author: Taru Karttunen
latest: 0.1.2
description-type: haddock
description: Convert strings into hexadecimal and back.
license-name: BSD-3-Clause
| homepage: ''
changelog-type: ''
hash: 1ea06834d1b5616edda6601b2945c5242b44cff9be84ff3a27595a136dcb154e
test-bench-deps: {}
maintainer: taruti@taruti.net
synopsis: Convert strings into hexadecimal and back.
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=3 && <4.13'
all-versions:
- '0.1'
- 0.1.1
- 0.1.2
author: Taru Karttunen
latest: 0.1.2
description-type: haddock
description: Convert strings into hexadecimal and back.
license-name: BSD-3-Clause
| Update from Hackage at 2019-09-01T21:57:37Z | Update from Hackage at 2019-09-01T21:57:37Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: 324cac214a1d449415db644ca172a09755f89901a48cdcb701514320ec4f7f26
test-bench-deps: {}
maintainer: taruti@taruti.net
synopsis: Convert strings into hexadecimal and back.
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=3 && <5'
all-versions:
- '0.1'
- 0.1.1
- 0.1.2
author: Taru Karttunen
latest: 0.1.2
description-type: haddock
description: Convert strings into hexadecimal and back.
license-name: BSD-3-Clause
## Instruction:
Update from Hackage at 2019-09-01T21:57:37Z
## Code After:
homepage: ''
changelog-type: ''
hash: 1ea06834d1b5616edda6601b2945c5242b44cff9be84ff3a27595a136dcb154e
test-bench-deps: {}
maintainer: taruti@taruti.net
synopsis: Convert strings into hexadecimal and back.
changelog: ''
basic-deps:
bytestring: -any
base: ! '>=3 && <4.13'
all-versions:
- '0.1'
- 0.1.1
- 0.1.2
author: Taru Karttunen
latest: 0.1.2
description-type: haddock
description: Convert strings into hexadecimal and back.
license-name: BSD-3-Clause
| homepage: ''
changelog-type: ''
- hash: 324cac214a1d449415db644ca172a09755f89901a48cdcb701514320ec4f7f26
+ hash: 1ea06834d1b5616edda6601b2945c5242b44cff9be84ff3a27595a136dcb154e
test-bench-deps: {}
maintainer: taruti@taruti.net
synopsis: Convert strings into hexadecimal and back.
changelog: ''
basic-deps:
bytestring: -any
- base: ! '>=3 && <5'
? ^
+ base: ! '>=3 && <4.13'
? ^^^^
all-versions:
- '0.1'
- 0.1.1
- 0.1.2
author: Taru Karttunen
latest: 0.1.2
description-type: haddock
description: Convert strings into hexadecimal and back.
license-name: BSD-3-Clause | 4 | 0.210526 | 2 | 2 |
198e6fbc9ce7adefda95d167c7fba77ae47c09d6 | ReleaseNotes.md | ReleaseNotes.md |
- [#15](https://github.com/laedit/vika/issues/15) - Could not load file or assembly 'Newtonsoft.Json' when running NVika in AppVeyor
# 0.1.0 (2016-01-31)
- [#12](https://github.com/laedit/vika/issues/12) - Support Mono +enhancement
- [#9](https://github.com/laedit/vika/issues/9) - Handle multiple report files +enhancement
- [#2](https://github.com/laedit/vika/issues/2) - Support AppVeyor +enhancement
- [#1](https://github.com/laedit/vika/issues/1) - Support InspectCode +enhancement
Commits: [19556f025b..a8b59bb103](https://github.com/laedit/vika/compare/19556f025b...a8b59bb103)
|
- [#23](https://github.com/laedit/vika/issues/23) - Support Inspect Code v2016.2
# 0.1.1 (2016-02-05)
- [#15](https://github.com/laedit/vika/issues/15) - Could not load file or assembly 'Newtonsoft.Json' when running NVika in AppVeyor
# 0.1.0 (2016-01-31)
- [#12](https://github.com/laedit/vika/issues/12) - Support Mono +enhancement
- [#9](https://github.com/laedit/vika/issues/9) - Handle multiple report files +enhancement
- [#2](https://github.com/laedit/vika/issues/2) - Support AppVeyor +enhancement
- [#1](https://github.com/laedit/vika/issues/1) - Support InspectCode +enhancement
Commits: [19556f025b..a8b59bb103](https://github.com/laedit/vika/compare/19556f025b...a8b59bb103)
| Update release notes to 0.1.2 | Update release notes to 0.1.2 | Markdown | apache-2.0 | laedit/vika | markdown | ## Code Before:
- [#15](https://github.com/laedit/vika/issues/15) - Could not load file or assembly 'Newtonsoft.Json' when running NVika in AppVeyor
# 0.1.0 (2016-01-31)
- [#12](https://github.com/laedit/vika/issues/12) - Support Mono +enhancement
- [#9](https://github.com/laedit/vika/issues/9) - Handle multiple report files +enhancement
- [#2](https://github.com/laedit/vika/issues/2) - Support AppVeyor +enhancement
- [#1](https://github.com/laedit/vika/issues/1) - Support InspectCode +enhancement
Commits: [19556f025b..a8b59bb103](https://github.com/laedit/vika/compare/19556f025b...a8b59bb103)
## Instruction:
Update release notes to 0.1.2
## Code After:
- [#23](https://github.com/laedit/vika/issues/23) - Support Inspect Code v2016.2
# 0.1.1 (2016-02-05)
- [#15](https://github.com/laedit/vika/issues/15) - Could not load file or assembly 'Newtonsoft.Json' when running NVika in AppVeyor
# 0.1.0 (2016-01-31)
- [#12](https://github.com/laedit/vika/issues/12) - Support Mono +enhancement
- [#9](https://github.com/laedit/vika/issues/9) - Handle multiple report files +enhancement
- [#2](https://github.com/laedit/vika/issues/2) - Support AppVeyor +enhancement
- [#1](https://github.com/laedit/vika/issues/1) - Support InspectCode +enhancement
Commits: [19556f025b..a8b59bb103](https://github.com/laedit/vika/compare/19556f025b...a8b59bb103)
| +
+ - [#23](https://github.com/laedit/vika/issues/23) - Support Inspect Code v2016.2
+
+ # 0.1.1 (2016-02-05)
- [#15](https://github.com/laedit/vika/issues/15) - Could not load file or assembly 'Newtonsoft.Json' when running NVika in AppVeyor
# 0.1.0 (2016-01-31)
- [#12](https://github.com/laedit/vika/issues/12) - Support Mono +enhancement
- [#9](https://github.com/laedit/vika/issues/9) - Handle multiple report files +enhancement
- [#2](https://github.com/laedit/vika/issues/2) - Support AppVeyor +enhancement
- [#1](https://github.com/laedit/vika/issues/1) - Support InspectCode +enhancement
Commits: [19556f025b..a8b59bb103](https://github.com/laedit/vika/compare/19556f025b...a8b59bb103) | 4 | 0.363636 | 4 | 0 |
428bed4a2906e49f23168f0d2e3d8c706c46ceb8 | data/excludes-bracketing.txt | data/excludes-bracketing.txt | attr
bcond_with[^\s]*
build
cmake
cmake_[^\s]*
configure
config
defattr
define
description
desktop_database_post[^\s]*
dir
doc
docdir
else
endif
exclude
fdupes
files
fillup_[^\s]*
find_lang
ghost
global
changelog
check
icon_theme_cache_post[^\s]*
if
ifarch
ifnarch
include
insserv_[^\s]*
install
install_info
install_info_delete
ix86
lang_package
make_install
mime_database_post[^\s]*
package
patch[0-9]*
perl_process_[^\s]*
post
posttrans
postun
pre
prep
pretrans
preun
requires_eq
restart_on_update
setup
service_(add|del)_[^\s]*
stop_on_removal
suse_update_desktop_file
systemd_requires
triggerin
triggerpostun
triggerun
undefine
verify[^\s]*
yast_(build|install)[^\s]*
| attr
bcond_with[^\s]*
build
cmake
cmake_[^\s]*
configure
config
defattr
define
description
desktop_database_post[^\s]*
dir
doc
docdir
else
endif
exclude
fdupes
files
fillup_[^\s]*
find_lang
ghost
global
changelog
check
icon_theme_cache_post[^\s]*
if
ifarch
ifnarch
include
insserv_[^\s]*
install
install_info
install_info_delete
ix86
lang_package
make_install
mime_database_post[^\s]*
package
patch[0-9]*
perl_gen_filelist
perl_make_install
perl_process_[^\s]*
post
posttrans
postun
pre
prep
pretrans
preun
requires_eq
restart_on_update
setup
service_(add|del)_[^\s]*
stop_on_removal
suse_update_desktop_file
systemd_requires
triggerin
triggerpostun
triggerun
undefine
verify[^\s]*
yast_(build|install)[^\s]*
| Exclude some perl macros from bracketing. | Exclude some perl macros from bracketing.
| Text | bsd-3-clause | pombredanne/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,pombredanne/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner | text | ## Code Before:
attr
bcond_with[^\s]*
build
cmake
cmake_[^\s]*
configure
config
defattr
define
description
desktop_database_post[^\s]*
dir
doc
docdir
else
endif
exclude
fdupes
files
fillup_[^\s]*
find_lang
ghost
global
changelog
check
icon_theme_cache_post[^\s]*
if
ifarch
ifnarch
include
insserv_[^\s]*
install
install_info
install_info_delete
ix86
lang_package
make_install
mime_database_post[^\s]*
package
patch[0-9]*
perl_process_[^\s]*
post
posttrans
postun
pre
prep
pretrans
preun
requires_eq
restart_on_update
setup
service_(add|del)_[^\s]*
stop_on_removal
suse_update_desktop_file
systemd_requires
triggerin
triggerpostun
triggerun
undefine
verify[^\s]*
yast_(build|install)[^\s]*
## Instruction:
Exclude some perl macros from bracketing.
## Code After:
attr
bcond_with[^\s]*
build
cmake
cmake_[^\s]*
configure
config
defattr
define
description
desktop_database_post[^\s]*
dir
doc
docdir
else
endif
exclude
fdupes
files
fillup_[^\s]*
find_lang
ghost
global
changelog
check
icon_theme_cache_post[^\s]*
if
ifarch
ifnarch
include
insserv_[^\s]*
install
install_info
install_info_delete
ix86
lang_package
make_install
mime_database_post[^\s]*
package
patch[0-9]*
perl_gen_filelist
perl_make_install
perl_process_[^\s]*
post
posttrans
postun
pre
prep
pretrans
preun
requires_eq
restart_on_update
setup
service_(add|del)_[^\s]*
stop_on_removal
suse_update_desktop_file
systemd_requires
triggerin
triggerpostun
triggerun
undefine
verify[^\s]*
yast_(build|install)[^\s]*
| attr
bcond_with[^\s]*
build
cmake
cmake_[^\s]*
configure
config
defattr
define
description
desktop_database_post[^\s]*
dir
doc
docdir
else
endif
exclude
fdupes
files
fillup_[^\s]*
find_lang
ghost
global
changelog
check
icon_theme_cache_post[^\s]*
if
ifarch
ifnarch
include
insserv_[^\s]*
install
install_info
install_info_delete
ix86
lang_package
make_install
mime_database_post[^\s]*
package
patch[0-9]*
+ perl_gen_filelist
+ perl_make_install
perl_process_[^\s]*
post
posttrans
postun
pre
prep
pretrans
preun
requires_eq
restart_on_update
setup
service_(add|del)_[^\s]*
stop_on_removal
suse_update_desktop_file
systemd_requires
triggerin
triggerpostun
triggerun
undefine
verify[^\s]*
yast_(build|install)[^\s]* | 2 | 0.032787 | 2 | 0 |
5529a7ac29844fefbcccc41c32b56c54c97f1b16 | spec/scanny/checks/system_tools/gpg_usage_check_spec.rb | spec/scanny/checks/system_tools/gpg_usage_check_spec.rb | require "spec_helper"
module Scanny::Checks::SystemTools
describe GpgUsageCheck do
before do
@runner = Scanny::Runner.new(GpgUsageCheck.new)
@message = "Using gpg tool in the wrong way can lead to security problems"
@issue = issue(:info, @message)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GPG.method").with_issue(@issue)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("Gpg.method").with_issue(@issue)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GpgKey.method").with_issue(@issue)
end
it "reports \"system('gpg --example-flag')\" correctly" do
@runner.should check("system('gpg --example-flag')").with_issue(@issue)
end
it "reports \"`gpg --example-flag`\" correctly" do
@runner.should check("`gpg --example-flag`").with_issue(@issue)
end
end
end
| require "spec_helper"
module Scanny::Checks::SystemTools
describe GpgUsageCheck do
before do
@runner = Scanny::Runner.new(GpgUsageCheck.new)
@message = "Using gpg tool in the wrong way can lead to security problems"
@issue = issue(:info, @message)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GPG.method").with_issue(@issue)
end
it "reports \"Gpg.method\" correctly" do
@runner.should check("Gpg.method").with_issue(@issue)
end
it "reports \"GpgKey.method\" correctly" do
@runner.should check("GpgKey.method").with_issue(@issue)
end
it "reports \"GPGME.method\" correctly" do
@runner.should check("GPGME.method").with_issue(@issue)
end
it "reports \"Gpgr.method\" correctly" do
@runner.should check("Gpgr.method").with_issue(@issue)
end
it "reports \"RubyGpg.method\" correctly" do
@runner.should check("RubyGpg.method").with_issue(@issue)
end
it "reports \"system('gpg --example-flag')\" correctly" do
@runner.should check("system('gpg --example-flag')").with_issue(@issue)
end
it "reports \"`gpg --example-flag`\" correctly" do
@runner.should check("`gpg --example-flag`").with_issue(@issue)
end
end
end
| Test all popular libs for ruby related to GPG | Test all popular libs for ruby related to GPG
| Ruby | mit | openSUSE/scanny | ruby | ## Code Before:
require "spec_helper"
module Scanny::Checks::SystemTools
describe GpgUsageCheck do
before do
@runner = Scanny::Runner.new(GpgUsageCheck.new)
@message = "Using gpg tool in the wrong way can lead to security problems"
@issue = issue(:info, @message)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GPG.method").with_issue(@issue)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("Gpg.method").with_issue(@issue)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GpgKey.method").with_issue(@issue)
end
it "reports \"system('gpg --example-flag')\" correctly" do
@runner.should check("system('gpg --example-flag')").with_issue(@issue)
end
it "reports \"`gpg --example-flag`\" correctly" do
@runner.should check("`gpg --example-flag`").with_issue(@issue)
end
end
end
## Instruction:
Test all popular libs for ruby related to GPG
## Code After:
require "spec_helper"
module Scanny::Checks::SystemTools
describe GpgUsageCheck do
before do
@runner = Scanny::Runner.new(GpgUsageCheck.new)
@message = "Using gpg tool in the wrong way can lead to security problems"
@issue = issue(:info, @message)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GPG.method").with_issue(@issue)
end
it "reports \"Gpg.method\" correctly" do
@runner.should check("Gpg.method").with_issue(@issue)
end
it "reports \"GpgKey.method\" correctly" do
@runner.should check("GpgKey.method").with_issue(@issue)
end
it "reports \"GPGME.method\" correctly" do
@runner.should check("GPGME.method").with_issue(@issue)
end
it "reports \"Gpgr.method\" correctly" do
@runner.should check("Gpgr.method").with_issue(@issue)
end
it "reports \"RubyGpg.method\" correctly" do
@runner.should check("RubyGpg.method").with_issue(@issue)
end
it "reports \"system('gpg --example-flag')\" correctly" do
@runner.should check("system('gpg --example-flag')").with_issue(@issue)
end
it "reports \"`gpg --example-flag`\" correctly" do
@runner.should check("`gpg --example-flag`").with_issue(@issue)
end
end
end
| require "spec_helper"
module Scanny::Checks::SystemTools
describe GpgUsageCheck do
before do
@runner = Scanny::Runner.new(GpgUsageCheck.new)
@message = "Using gpg tool in the wrong way can lead to security problems"
@issue = issue(:info, @message)
end
it "reports \"GPG.method\" correctly" do
@runner.should check("GPG.method").with_issue(@issue)
end
- it "reports \"GPG.method\" correctly" do
? ^^
+ it "reports \"Gpg.method\" correctly" do
? ^^
@runner.should check("Gpg.method").with_issue(@issue)
end
- it "reports \"GPG.method\" correctly" do
? ^^
+ it "reports \"GpgKey.method\" correctly" do
? ^^^^^
@runner.should check("GpgKey.method").with_issue(@issue)
+ end
+
+ it "reports \"GPGME.method\" correctly" do
+ @runner.should check("GPGME.method").with_issue(@issue)
+ end
+
+ it "reports \"Gpgr.method\" correctly" do
+ @runner.should check("Gpgr.method").with_issue(@issue)
+ end
+
+ it "reports \"RubyGpg.method\" correctly" do
+ @runner.should check("RubyGpg.method").with_issue(@issue)
end
it "reports \"system('gpg --example-flag')\" correctly" do
@runner.should check("system('gpg --example-flag')").with_issue(@issue)
end
it "reports \"`gpg --example-flag`\" correctly" do
@runner.should check("`gpg --example-flag`").with_issue(@issue)
end
end
end | 16 | 0.516129 | 14 | 2 |
69719173a9bdee22321b723eafbc8d9193b6cc5d | src/AB/AbookBundle/Resources/views/Default/list2.html.twig | src/AB/AbookBundle/Resources/views/Default/list2.html.twig | {% extends "AbookBundle:Layout:layout.html.twig" %}
{% block title %} List Contact {% endblock %}
{% block body %}
<section class="col col-lg-8">
<fieldset>
<legend>Contact List</legend>
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<td>First Name</td>
<td>Last Name</td>
<td>Address</td>
</tr>
</thead>
<tbody>
{% for current in contact %}
<tr>
<td>{{ current.firstName }}</td>
<td>{{ current.lastName }}</td>
<td>{{ current.address }}</td>
</tr>
{% else %}
<tr><td colspan="3">No data found</td></tr>
{% endfor %}
</tbody>
</table>
</fieldset>
</section>
{% endblock %}
| {% extends "AbookBundle:Layout:layout.html.twig" %}
{% block title %} List Contact {% endblock %}
{% block body %}
<section class="col col-lg-8">
<fieldset>
<legend>Contact List</legend>
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Address</th>
</tr>
</thead>
<tbody>
{% for current in contact %}
<tr>
<td>{{ current.idContact }}</td>
<td>{{ current.firstName }}</td>
<td>{{ current.lastName }}</td>
<td>{{ current.address }}</td>
</tr>
{% else %}
<tr><td colspan="3">No data found</td></tr>
{% endfor %}
</tbody>
</table>
</fieldset>
</section>
{% endblock %}
| Add field into contact list | Add field into contact list
| Twig | mit | doncardozo/sftest,doncardozo/sftest | twig | ## Code Before:
{% extends "AbookBundle:Layout:layout.html.twig" %}
{% block title %} List Contact {% endblock %}
{% block body %}
<section class="col col-lg-8">
<fieldset>
<legend>Contact List</legend>
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<td>First Name</td>
<td>Last Name</td>
<td>Address</td>
</tr>
</thead>
<tbody>
{% for current in contact %}
<tr>
<td>{{ current.firstName }}</td>
<td>{{ current.lastName }}</td>
<td>{{ current.address }}</td>
</tr>
{% else %}
<tr><td colspan="3">No data found</td></tr>
{% endfor %}
</tbody>
</table>
</fieldset>
</section>
{% endblock %}
## Instruction:
Add field into contact list
## Code After:
{% extends "AbookBundle:Layout:layout.html.twig" %}
{% block title %} List Contact {% endblock %}
{% block body %}
<section class="col col-lg-8">
<fieldset>
<legend>Contact List</legend>
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Address</th>
</tr>
</thead>
<tbody>
{% for current in contact %}
<tr>
<td>{{ current.idContact }}</td>
<td>{{ current.firstName }}</td>
<td>{{ current.lastName }}</td>
<td>{{ current.address }}</td>
</tr>
{% else %}
<tr><td colspan="3">No data found</td></tr>
{% endfor %}
</tbody>
</table>
</fieldset>
</section>
{% endblock %}
| {% extends "AbookBundle:Layout:layout.html.twig" %}
{% block title %} List Contact {% endblock %}
{% block body %}
<section class="col col-lg-8">
<fieldset>
<legend>Contact List</legend>
<table class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
+ <th>#</th>
- <td>First Name</td>
? ^ ^
+ <th>First Name</th>
? ^ ^
- <td>Last Name</td>
? ^ ^
+ <th>Last Name</th>
? ^ ^
- <td>Address</td>
? ^ ^
+ <th>Address</th>
? ^ ^
</tr>
</thead>
<tbody>
{% for current in contact %}
<tr>
+ <td>{{ current.idContact }}</td>
<td>{{ current.firstName }}</td>
<td>{{ current.lastName }}</td>
<td>{{ current.address }}</td>
</tr>
{% else %}
<tr><td colspan="3">No data found</td></tr>
{% endfor %}
</tbody>
</table>
</fieldset>
</section>
{% endblock %}
| 8 | 0.216216 | 5 | 3 |
7a4ae4526775d0392287128babe6d1428ea0d4ef | lib/endi_feed/util.rb | lib/endi_feed/util.rb | require 'uri'
require 'rss'
require 'time'
module EndiFeed
# This module contains various useful functions.
module Util
def self.included(base)
base.extend self
end
module_function
# Fetches and parses RSS feed
# @return [RSS] parsed XML feed or nil
def parse_feed
open('http://www.elnuevodia.com/rss/noticias.xml') do |rss|
RSS::Parser.parse(rss)
end
end
# Converts HTTP-date (RFC 2616) into a simpler date format
# @param date [Date, String] only Date or String
# @return [String] parsed date (mm/dd/yyyy)
def convert_date(date)
date = String(date)
Time.parse(date).strftime('%x')
end
# Converts HTTP-date (RFC 2616) into the 12-hour format
# @param date [Date, String] only Date or String
# @return [String] parsed time (HH:MM:SS AM|PM)
def convert_time(date)
date = String(date)
Time.parse(date).strftime('%r')
end
end
end | require 'uri'
require 'rss'
require 'time'
module EndiFeed
# This module contains various useful functions.
module Util
def self.included(base)
base.extend self
end
module_function
# Fetches and parses RSS feed
# @param [String] url to parse
# @return [RSS] parsed XML feed or nil
def parse_feed(url = 'http://www.elnuevodia.com/rss/noticias.xml')
open(url) do |rss|
RSS::Parser.parse(rss)
end
end
# Converts HTTP-date (RFC 2616) into a simpler date format
# @param date [Date, String] only Date or String
# @return [String] parsed date (mm/dd/yyyy)
def convert_date(date)
date = String(date)
Time.parse(date).strftime('%x')
end
# Converts HTTP-date (RFC 2616) into the 12-hour format
# @param date [Date, String] only Date or String
# @return [String] parsed time (HH:MM:SS AM|PM)
def convert_time(date)
date = String(date)
Time.parse(date).strftime('%r')
end
end
end | Add url parameter to parse_feed method | Add url parameter to parse_feed method
| Ruby | mit | jonahoffline/endi_feed | ruby | ## Code Before:
require 'uri'
require 'rss'
require 'time'
module EndiFeed
# This module contains various useful functions.
module Util
def self.included(base)
base.extend self
end
module_function
# Fetches and parses RSS feed
# @return [RSS] parsed XML feed or nil
def parse_feed
open('http://www.elnuevodia.com/rss/noticias.xml') do |rss|
RSS::Parser.parse(rss)
end
end
# Converts HTTP-date (RFC 2616) into a simpler date format
# @param date [Date, String] only Date or String
# @return [String] parsed date (mm/dd/yyyy)
def convert_date(date)
date = String(date)
Time.parse(date).strftime('%x')
end
# Converts HTTP-date (RFC 2616) into the 12-hour format
# @param date [Date, String] only Date or String
# @return [String] parsed time (HH:MM:SS AM|PM)
def convert_time(date)
date = String(date)
Time.parse(date).strftime('%r')
end
end
end
## Instruction:
Add url parameter to parse_feed method
## Code After:
require 'uri'
require 'rss'
require 'time'
module EndiFeed
# This module contains various useful functions.
module Util
def self.included(base)
base.extend self
end
module_function
# Fetches and parses RSS feed
# @param [String] url to parse
# @return [RSS] parsed XML feed or nil
def parse_feed(url = 'http://www.elnuevodia.com/rss/noticias.xml')
open(url) do |rss|
RSS::Parser.parse(rss)
end
end
# Converts HTTP-date (RFC 2616) into a simpler date format
# @param date [Date, String] only Date or String
# @return [String] parsed date (mm/dd/yyyy)
def convert_date(date)
date = String(date)
Time.parse(date).strftime('%x')
end
# Converts HTTP-date (RFC 2616) into the 12-hour format
# @param date [Date, String] only Date or String
# @return [String] parsed time (HH:MM:SS AM|PM)
def convert_time(date)
date = String(date)
Time.parse(date).strftime('%r')
end
end
end | require 'uri'
require 'rss'
require 'time'
module EndiFeed
# This module contains various useful functions.
module Util
def self.included(base)
base.extend self
end
module_function
# Fetches and parses RSS feed
+ # @param [String] url to parse
# @return [RSS] parsed XML feed or nil
- def parse_feed
- open('http://www.elnuevodia.com/rss/noticias.xml') do |rss|
? ^^^^^ ---------
+ def parse_feed(url = 'http://www.elnuevodia.com/rss/noticias.xml')
? +++ ++++++++++++++ ^^
+ open(url) do |rss|
RSS::Parser.parse(rss)
end
end
# Converts HTTP-date (RFC 2616) into a simpler date format
# @param date [Date, String] only Date or String
# @return [String] parsed date (mm/dd/yyyy)
def convert_date(date)
date = String(date)
Time.parse(date).strftime('%x')
end
# Converts HTTP-date (RFC 2616) into the 12-hour format
# @param date [Date, String] only Date or String
# @return [String] parsed time (HH:MM:SS AM|PM)
def convert_time(date)
date = String(date)
Time.parse(date).strftime('%r')
end
end
end | 5 | 0.131579 | 3 | 2 |
ba0d09d4017c97ee424bfe515bef766b3385b31e | emacs/lisp/completion.el | emacs/lisp/completion.el | ;;; completion.el -- Configuration for completion, abbreviations, and shortcuts.
;; I don't want to type "yes".
(defalias 'yes-or-no-p 'y-or-n-p)
;; ido mode for mini-buffer completion (see also modes/ido-conf.el)
(require 'ido)
(ido-mode t)
;; Hippie expand
(setq hippie-expand-try-functions-list
'(try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
try-expand-line))
| ;;; completion.el -- Configuration for completion, abbreviations, and shortcuts.
;; I don't want to type "yes".
(defalias 'yes-or-no-p 'y-or-n-p)
;; ido mode for mini-buffer completion (see also modes/ido-conf.el)
(require 'ido)
(ido-mode t)
;; If the current line is already indented, have the tab key try to
;; auto-complete the word at point.
(setq tab-always-indent 'complete)
;; Replace completion-at-point with hippie expand
(defun pjones:hippie-expand () (hippie-expand nil))
(defalias 'completion-at-point 'pjones:hippie-expand)
;; Hippie expand functions
(setq hippie-expand-try-functions-list
'(try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
try-expand-line))
| Update the tab key to run hippie-expand | Update the tab key to run hippie-expand
| Emacs Lisp | bsd-3-clause | pjones/emacsrc | emacs-lisp | ## Code Before:
;;; completion.el -- Configuration for completion, abbreviations, and shortcuts.
;; I don't want to type "yes".
(defalias 'yes-or-no-p 'y-or-n-p)
;; ido mode for mini-buffer completion (see also modes/ido-conf.el)
(require 'ido)
(ido-mode t)
;; Hippie expand
(setq hippie-expand-try-functions-list
'(try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
try-expand-line))
## Instruction:
Update the tab key to run hippie-expand
## Code After:
;;; completion.el -- Configuration for completion, abbreviations, and shortcuts.
;; I don't want to type "yes".
(defalias 'yes-or-no-p 'y-or-n-p)
;; ido mode for mini-buffer completion (see also modes/ido-conf.el)
(require 'ido)
(ido-mode t)
;; If the current line is already indented, have the tab key try to
;; auto-complete the word at point.
(setq tab-always-indent 'complete)
;; Replace completion-at-point with hippie expand
(defun pjones:hippie-expand () (hippie-expand nil))
(defalias 'completion-at-point 'pjones:hippie-expand)
;; Hippie expand functions
(setq hippie-expand-try-functions-list
'(try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
try-expand-line))
| ;;; completion.el -- Configuration for completion, abbreviations, and shortcuts.
;; I don't want to type "yes".
(defalias 'yes-or-no-p 'y-or-n-p)
;; ido mode for mini-buffer completion (see also modes/ido-conf.el)
(require 'ido)
(ido-mode t)
+ ;; If the current line is already indented, have the tab key try to
+ ;; auto-complete the word at point.
+ (setq tab-always-indent 'complete)
+
+ ;; Replace completion-at-point with hippie expand
+ (defun pjones:hippie-expand () (hippie-expand nil))
+ (defalias 'completion-at-point 'pjones:hippie-expand)
+
- ;; Hippie expand
+ ;; Hippie expand functions
? ++++++++++
(setq hippie-expand-try-functions-list
'(try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-lisp-symbol-partially
try-complete-lisp-symbol
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
try-expand-line)) | 10 | 0.5 | 9 | 1 |
1cbf66453e2808e8c15628b41e37e96c93cc77db | great_expectations_airflow/hooks/db_hook.py | great_expectations_airflow/hooks/db_hook.py | from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".format(uri=self.get_uri(), dataset=dataset_name))
sql_context = ge.get_data_context('SqlAlchemy', self.get_uri())
return sql_context.get_dataset(dataset_name=dataset_name, **kwargs)
| import great_expectations as ge
from airflow.hooks.mysql_hook import MySqlHook
class ExpectationMySQLHook(MySqlHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".format(uri=self.get_uri(), dataset=dataset_name))
sql_context = ge.get_data_context('SqlAlchemy', self.get_uri())
return sql_context.get_dataset(dataset_name=dataset_name, **kwargs)
| Make sure hook can actually be instantiated (generic DbApiHook cannot) | Make sure hook can actually be instantiated (generic DbApiHook cannot)
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | python | ## Code Before:
from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".format(uri=self.get_uri(), dataset=dataset_name))
sql_context = ge.get_data_context('SqlAlchemy', self.get_uri())
return sql_context.get_dataset(dataset_name=dataset_name, **kwargs)
## Instruction:
Make sure hook can actually be instantiated (generic DbApiHook cannot)
## Code After:
import great_expectations as ge
from airflow.hooks.mysql_hook import MySqlHook
class ExpectationMySQLHook(MySqlHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".format(uri=self.get_uri(), dataset=dataset_name))
sql_context = ge.get_data_context('SqlAlchemy', self.get_uri())
return sql_context.get_dataset(dataset_name=dataset_name, **kwargs)
| - from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
+ from airflow.hooks.mysql_hook import MySqlHook
- class ExpectationMySQLHook(DbApiHook):
? ^^^^^
+ class ExpectationMySQLHook(MySqlHook):
? ^^^^^
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".format(uri=self.get_uri(), dataset=dataset_name))
sql_context = ge.get_data_context('SqlAlchemy', self.get_uri())
return sql_context.get_dataset(dataset_name=dataset_name, **kwargs) | 4 | 0.285714 | 2 | 2 |
fa18d31b4017a42a29d3f4345a4a7ade9ef08b9f | action_queue.js | action_queue.js | (function () {
"use strict";
var ActionQueue = window.ActionQueue = function () {
var self = this instanceof ActionQueue ? this : Object.create(ActionQueue.prototype);
self._queue = [];
self._isInAction = false;
self._previousAction = undefined;
return self;
};
ActionQueue.prototype.queueNext = function () {
var self = this,
args = [];
Array.prototype.push.apply(args, arguments);
self._queue.push(args);
nextAction.call(self);
return self;
};
function nextAction (finishPrevious) {
var self = this;
if (finishPrevious) self._isInAction = false;
if (!self._isInAction && self._queue.length > 0) {
var args = self._queue.shift(),
action = args.shift();
self._isInAction = true;
self._previousAction = action;
action.apply(self, args);
}
return self;
};
ActionQueue.prototype.finishAction = function () {
var self = this;
nextAction.call(self, true);
return self;
};
})();
| (function () {
"use strict";
var ActionQueue = window.ActionQueue = function () {
var self = this instanceof ActionQueue ? this : Object.create(ActionQueue.prototype);
self._queue = [];
self._isInAction = false;
self._previousAction = undefined;
return self;
};
ActionQueue.prototype.queueNext = function () {
var self = this,
args = [];
Array.prototype.push.apply(args, arguments);
self._queue.push(args);
nextAction.call(self);
return self;
};
function nextAction (finishPrevious) {
var self = this;
if (finishPrevious) self._isInAction = false;
if (!self._isInAction && self._queue.length > 0) {
var args = self._queue.shift(),
action = args.shift();
self._isInAction = true;
self._previousAction = action;
self._callAction(function () { action.apply(self, args) });
}
return self;
};
ActionQueue.prototype._callAction = function(func) { func(); };
ActionQueue.prototype.finishAction = function () {
var self = this;
nextAction.call(self, true);
return self;
};
})();
| Move calling the action into a separate function so it can be subclassed (for async) | Move calling the action into a separate function so it can be subclassed (for async)
| JavaScript | mit | dataworker/dataworker,dataworker/dataworker,jctank88/dataworker,jctank88/dataworker | javascript | ## Code Before:
(function () {
"use strict";
var ActionQueue = window.ActionQueue = function () {
var self = this instanceof ActionQueue ? this : Object.create(ActionQueue.prototype);
self._queue = [];
self._isInAction = false;
self._previousAction = undefined;
return self;
};
ActionQueue.prototype.queueNext = function () {
var self = this,
args = [];
Array.prototype.push.apply(args, arguments);
self._queue.push(args);
nextAction.call(self);
return self;
};
function nextAction (finishPrevious) {
var self = this;
if (finishPrevious) self._isInAction = false;
if (!self._isInAction && self._queue.length > 0) {
var args = self._queue.shift(),
action = args.shift();
self._isInAction = true;
self._previousAction = action;
action.apply(self, args);
}
return self;
};
ActionQueue.prototype.finishAction = function () {
var self = this;
nextAction.call(self, true);
return self;
};
})();
## Instruction:
Move calling the action into a separate function so it can be subclassed (for async)
## Code After:
(function () {
"use strict";
var ActionQueue = window.ActionQueue = function () {
var self = this instanceof ActionQueue ? this : Object.create(ActionQueue.prototype);
self._queue = [];
self._isInAction = false;
self._previousAction = undefined;
return self;
};
ActionQueue.prototype.queueNext = function () {
var self = this,
args = [];
Array.prototype.push.apply(args, arguments);
self._queue.push(args);
nextAction.call(self);
return self;
};
function nextAction (finishPrevious) {
var self = this;
if (finishPrevious) self._isInAction = false;
if (!self._isInAction && self._queue.length > 0) {
var args = self._queue.shift(),
action = args.shift();
self._isInAction = true;
self._previousAction = action;
self._callAction(function () { action.apply(self, args) });
}
return self;
};
ActionQueue.prototype._callAction = function(func) { func(); };
ActionQueue.prototype.finishAction = function () {
var self = this;
nextAction.call(self, true);
return self;
};
})();
| (function () {
"use strict";
var ActionQueue = window.ActionQueue = function () {
var self = this instanceof ActionQueue ? this : Object.create(ActionQueue.prototype);
self._queue = [];
self._isInAction = false;
self._previousAction = undefined;
return self;
};
ActionQueue.prototype.queueNext = function () {
var self = this,
args = [];
Array.prototype.push.apply(args, arguments);
self._queue.push(args);
nextAction.call(self);
return self;
};
function nextAction (finishPrevious) {
var self = this;
if (finishPrevious) self._isInAction = false;
if (!self._isInAction && self._queue.length > 0) {
var args = self._queue.shift(),
action = args.shift();
self._isInAction = true;
self._previousAction = action;
+ self._callAction(function () { action.apply(self, args) });
-
- action.apply(self, args);
}
return self;
};
+
+ ActionQueue.prototype._callAction = function(func) { func(); };
ActionQueue.prototype.finishAction = function () {
var self = this;
nextAction.call(self, true);
return self;
};
})(); | 5 | 0.098039 | 3 | 2 |
b62cd1e3d15211ed7e8658d9918b868148c9d951 | README.md | README.md | We created this toolkit in order to more easily create microservice based applications. Enjoy! :)
|
[](https://www.npmjs.com/package/microservice-toolkit)[](https://david-dm.org/me-ventures/microservice-toolkit)
[](https://nodei.co/npm/microservice-toolkit/)
Node.js framework to provice a basic foundation to build microservices on top of.
## Installation
```
npm install microservice-toolkit
```
| Update readme with installation instructions | Update readme with installation instructions | Markdown | mit | me-ventures/microservice-toolkit,me-ventures/microservice-toolkit | markdown | ## Code Before:
We created this toolkit in order to more easily create microservice based applications. Enjoy! :)
## Instruction:
Update readme with installation instructions
## Code After:
[](https://www.npmjs.com/package/microservice-toolkit)[](https://david-dm.org/me-ventures/microservice-toolkit)
[](https://nodei.co/npm/microservice-toolkit/)
Node.js framework to provice a basic foundation to build microservices on top of.
## Installation
```
npm install microservice-toolkit
```
| - We created this toolkit in order to more easily create microservice based applications. Enjoy! :)
+
+ [](https://www.npmjs.com/package/microservice-toolkit)[](https://david-dm.org/me-ventures/microservice-toolkit)
+
+ [](https://nodei.co/npm/microservice-toolkit/)
+
+ Node.js framework to provice a basic foundation to build microservices on top of.
+
+ ## Installation
+
+ ```
+ npm install microservice-toolkit
+ ``` | 13 | 13 | 12 | 1 |
5eeb8623a9a5302c0642c4d4e477cf189098b373 | worldcities/Model/ModelListItem.swift | worldcities/Model/ModelListItem.swift | import Foundation
class ModelListItem
{
let identifier:Int
let compareString:String
let name:String
let country:String
let latitude:Double
let longitude:Double
init(
identifier:Int,
name:String,
country:String,
latitude:Double,
longitude:Double)
{
self.identifier = identifier
self.name = name
self.country = country
self.latitude = latitude
self.longitude = longitude
let nameLowercase:String = name.lowercased()
let countryLowercase:String = country.lowercased()
var compareString = nameLowercase
compareString.append(countryLowercase)
self.compareString = compareString
}
}
| import Foundation
class ModelListItem
{
let identifier:Int
let compareString:String
let filterString:String
let name:String
let country:String
let latitude:Double
let longitude:Double
init(
identifier:Int,
name:String,
country:String,
latitude:Double,
longitude:Double)
{
self.identifier = identifier
self.name = name
self.country = country
self.latitude = latitude
self.longitude = longitude
let nameLowercase:String = name.lowercased()
let countryLowercase:String = country.lowercased()
var compareString = nameLowercase
compareString.append(countryLowercase)
self.compareString = compareString
filterString = nameLowercase
}
}
| Add filter string to item | Add filter string to item
| Swift | mit | vauxhall/worldcities | swift | ## Code Before:
import Foundation
class ModelListItem
{
let identifier:Int
let compareString:String
let name:String
let country:String
let latitude:Double
let longitude:Double
init(
identifier:Int,
name:String,
country:String,
latitude:Double,
longitude:Double)
{
self.identifier = identifier
self.name = name
self.country = country
self.latitude = latitude
self.longitude = longitude
let nameLowercase:String = name.lowercased()
let countryLowercase:String = country.lowercased()
var compareString = nameLowercase
compareString.append(countryLowercase)
self.compareString = compareString
}
}
## Instruction:
Add filter string to item
## Code After:
import Foundation
class ModelListItem
{
let identifier:Int
let compareString:String
let filterString:String
let name:String
let country:String
let latitude:Double
let longitude:Double
init(
identifier:Int,
name:String,
country:String,
latitude:Double,
longitude:Double)
{
self.identifier = identifier
self.name = name
self.country = country
self.latitude = latitude
self.longitude = longitude
let nameLowercase:String = name.lowercased()
let countryLowercase:String = country.lowercased()
var compareString = nameLowercase
compareString.append(countryLowercase)
self.compareString = compareString
filterString = nameLowercase
}
}
| import Foundation
class ModelListItem
{
let identifier:Int
let compareString:String
+ let filterString:String
let name:String
let country:String
let latitude:Double
let longitude:Double
init(
identifier:Int,
name:String,
country:String,
latitude:Double,
longitude:Double)
{
self.identifier = identifier
self.name = name
self.country = country
self.latitude = latitude
self.longitude = longitude
let nameLowercase:String = name.lowercased()
let countryLowercase:String = country.lowercased()
var compareString = nameLowercase
compareString.append(countryLowercase)
self.compareString = compareString
+ filterString = nameLowercase
}
} | 2 | 0.0625 | 2 | 0 |
75ff9d3362415f9da62b0877218a6b267d121a8e | README.md | README.md |
Read all about ctags [here](http://ctags.sourceforge.net/).
## Installing
```sh
npm install ctags
```
## Documentation
### findTags(path, tag, [options])
Get all tags matching the tag specified from the tags file at the path.
The following `options` are supported:
* `caseInsensitive`: Include tags that match case insensitively,
defaults to `false`
* `partialMatch`: Include tags that partially match, defaults to `false`
```coffeescript
ctags = require 'ctags'
tags = ctags.findTags('/Users/me/repos/node/tags', 'exists')
for tag in tags
console.log("#{tag.name} is in #{tag.file}")
```
### getTags(path)
Get all tags found in the path specified.
```coffeescript
ctags = require 'ctags'
allTags = ctags.getTags('/Users/me/repos/node/tags')
for tag in allTags
console.log("#{tag.name} is in #{tag.file} with pattern: #{tag.pattern}")
```
|
Read all about ctags [here](http://ctags.sourceforge.net/).
## Installing
```sh
npm install ctags
```
## Building
* Clone the repository
* Run `npm install`
* Run `grunt` to compile the native and CoffeeScript code
## Documentation
### findTags(path, tag, [options])
Get all tags matching the tag specified from the tags file at the path.
The following `options` are supported:
* `caseInsensitive`: Include tags that match case insensitively,
defaults to `false`
* `partialMatch`: Include tags that partially match, defaults to `false`
```coffeescript
ctags = require 'ctags'
tags = ctags.findTags('/Users/me/repos/node/tags', 'exists')
for tag in tags
console.log("#{tag.name} is in #{tag.file}")
```
### getTags(path)
Get all tags found in the path specified.
```coffeescript
ctags = require 'ctags'
allTags = ctags.getTags('/Users/me/repos/node/tags')
for tag in allTags
console.log("#{tag.name} is in #{tag.file} with pattern: #{tag.pattern}")
```
| Add steps for building the module | Add steps for building the module
| Markdown | mit | yongkangchen/node-ctags,zertosh/ctags-prebuilt,atom/node-ctags,zertosh/ctags-prebuilt,yongkangchen/node-ctags,zertosh/ctags-prebuilt,zertosh/ctags-prebuilt,atom/node-ctags,atom/node-ctags,yongkangchen/node-ctags | markdown | ## Code Before:
Read all about ctags [here](http://ctags.sourceforge.net/).
## Installing
```sh
npm install ctags
```
## Documentation
### findTags(path, tag, [options])
Get all tags matching the tag specified from the tags file at the path.
The following `options` are supported:
* `caseInsensitive`: Include tags that match case insensitively,
defaults to `false`
* `partialMatch`: Include tags that partially match, defaults to `false`
```coffeescript
ctags = require 'ctags'
tags = ctags.findTags('/Users/me/repos/node/tags', 'exists')
for tag in tags
console.log("#{tag.name} is in #{tag.file}")
```
### getTags(path)
Get all tags found in the path specified.
```coffeescript
ctags = require 'ctags'
allTags = ctags.getTags('/Users/me/repos/node/tags')
for tag in allTags
console.log("#{tag.name} is in #{tag.file} with pattern: #{tag.pattern}")
```
## Instruction:
Add steps for building the module
## Code After:
Read all about ctags [here](http://ctags.sourceforge.net/).
## Installing
```sh
npm install ctags
```
## Building
* Clone the repository
* Run `npm install`
* Run `grunt` to compile the native and CoffeeScript code
## Documentation
### findTags(path, tag, [options])
Get all tags matching the tag specified from the tags file at the path.
The following `options` are supported:
* `caseInsensitive`: Include tags that match case insensitively,
defaults to `false`
* `partialMatch`: Include tags that partially match, defaults to `false`
```coffeescript
ctags = require 'ctags'
tags = ctags.findTags('/Users/me/repos/node/tags', 'exists')
for tag in tags
console.log("#{tag.name} is in #{tag.file}")
```
### getTags(path)
Get all tags found in the path specified.
```coffeescript
ctags = require 'ctags'
allTags = ctags.getTags('/Users/me/repos/node/tags')
for tag in allTags
console.log("#{tag.name} is in #{tag.file} with pattern: #{tag.pattern}")
```
|
Read all about ctags [here](http://ctags.sourceforge.net/).
## Installing
```sh
npm install ctags
```
+
+ ## Building
+ * Clone the repository
+ * Run `npm install`
+ * Run `grunt` to compile the native and CoffeeScript code
## Documentation
### findTags(path, tag, [options])
Get all tags matching the tag specified from the tags file at the path.
The following `options` are supported:
* `caseInsensitive`: Include tags that match case insensitively,
defaults to `false`
* `partialMatch`: Include tags that partially match, defaults to `false`
```coffeescript
ctags = require 'ctags'
tags = ctags.findTags('/Users/me/repos/node/tags', 'exists')
for tag in tags
console.log("#{tag.name} is in #{tag.file}")
```
### getTags(path)
Get all tags found in the path specified.
```coffeescript
ctags = require 'ctags'
allTags = ctags.getTags('/Users/me/repos/node/tags')
for tag in allTags
console.log("#{tag.name} is in #{tag.file} with pattern: #{tag.pattern}")
``` | 5 | 0.128205 | 5 | 0 |
dd9ab6ea36ffc95b0e28b49bf916b7e32ba66a5e | src/next-major-deprecations.md | src/next-major-deprecations.md | # Deprecations in the next major
* `InitializerGetExpressionableNode` to `InitializerExpressionGetableNode` for consistency with `ExportGetableNode`
* Deprecate `InitializerSetExpressionableNode`
| # Deprecations in the next major
* `InitializerGetExpressionableNode` to `InitializerExpressionGetableNode` for consistency with `ExportGetableNode`
* Deprecate `InitializerSetExpressionableNode`
* Remove default export from library.
| Add note about removing default export from library. | chore: Add note about removing default export from library.
| Markdown | mit | dsherret/ts-simple-ast | markdown | ## Code Before:
# Deprecations in the next major
* `InitializerGetExpressionableNode` to `InitializerExpressionGetableNode` for consistency with `ExportGetableNode`
* Deprecate `InitializerSetExpressionableNode`
## Instruction:
chore: Add note about removing default export from library.
## Code After:
# Deprecations in the next major
* `InitializerGetExpressionableNode` to `InitializerExpressionGetableNode` for consistency with `ExportGetableNode`
* Deprecate `InitializerSetExpressionableNode`
* Remove default export from library.
| # Deprecations in the next major
* `InitializerGetExpressionableNode` to `InitializerExpressionGetableNode` for consistency with `ExportGetableNode`
* Deprecate `InitializerSetExpressionableNode`
+ * Remove default export from library.
| 1 | 0.2 | 1 | 0 |
b4e52cc16e8fc203430e0906c6e43d6ddd831ec7 | app/src/main/java/pl/com/chodera/myweather/common/Commons.java | app/src/main/java/pl/com/chodera/myweather/common/Commons.java | package pl.com.chodera.myweather.common;
/**
* Created by Adam Chodera on 2016-03-15.
*/
public class Commons {
public static final String BASE_URL = "http://api.openweathermap.org/data/2.5/";
public static final String OPEN_WEATHER_APP_ID = "6fc006e6b8cbdd1bc3fa490b467a1692";
public static final int CHART_NUMBER_OF_X_VALUES = 8;
public static final String PASCAL_UNIT = "hPa";
public interface Chars {
char SPACE = ' ';
char COLON = ':';
String NEW_LINE = System.getProperty("line.separator");
char PLUS = '+';
char H = 'h';
char CELSIUS_UNIT = 'C';
char PERCENT = '%';
}
public interface IntentKeys {
String LOCATION_NAME = "key_ADVERTISEMENT";
}
public interface Animations {
int DRAW_CHART_DATA = 1800;
}
}
| package pl.com.chodera.myweather.common;
/**
* Created by Adam Chodera on 2016-03-15.
*/
public interface Commons {
String BASE_URL = "http://api.openweathermap.org/data/2.5/";
String OPEN_WEATHER_APP_ID = "6fc006e6b8cbdd1bc3fa490b467a1692";
int CHART_NUMBER_OF_X_VALUES = 8;
String PASCAL_UNIT = "hPa";
interface Chars {
char SPACE = ' ';
char COLON = ':';
String NEW_LINE = System.getProperty("line.separator");
char PLUS = '+';
char H = 'h';
char CELSIUS_UNIT = 'C';
char PERCENT = '%';
}
interface IntentKeys {
String LOCATION_NAME = "key_ADVERTISEMENT";
}
interface Animations {
int DRAW_CHART_DATA = 1800;
}
}
| Change class with static variables into interface | Change class with static variables into interface
| Java | apache-2.0 | adamski8/MyWeather | java | ## Code Before:
package pl.com.chodera.myweather.common;
/**
* Created by Adam Chodera on 2016-03-15.
*/
public class Commons {
public static final String BASE_URL = "http://api.openweathermap.org/data/2.5/";
public static final String OPEN_WEATHER_APP_ID = "6fc006e6b8cbdd1bc3fa490b467a1692";
public static final int CHART_NUMBER_OF_X_VALUES = 8;
public static final String PASCAL_UNIT = "hPa";
public interface Chars {
char SPACE = ' ';
char COLON = ':';
String NEW_LINE = System.getProperty("line.separator");
char PLUS = '+';
char H = 'h';
char CELSIUS_UNIT = 'C';
char PERCENT = '%';
}
public interface IntentKeys {
String LOCATION_NAME = "key_ADVERTISEMENT";
}
public interface Animations {
int DRAW_CHART_DATA = 1800;
}
}
## Instruction:
Change class with static variables into interface
## Code After:
package pl.com.chodera.myweather.common;
/**
* Created by Adam Chodera on 2016-03-15.
*/
public interface Commons {
String BASE_URL = "http://api.openweathermap.org/data/2.5/";
String OPEN_WEATHER_APP_ID = "6fc006e6b8cbdd1bc3fa490b467a1692";
int CHART_NUMBER_OF_X_VALUES = 8;
String PASCAL_UNIT = "hPa";
interface Chars {
char SPACE = ' ';
char COLON = ':';
String NEW_LINE = System.getProperty("line.separator");
char PLUS = '+';
char H = 'h';
char CELSIUS_UNIT = 'C';
char PERCENT = '%';
}
interface IntentKeys {
String LOCATION_NAME = "key_ADVERTISEMENT";
}
interface Animations {
int DRAW_CHART_DATA = 1800;
}
}
| package pl.com.chodera.myweather.common;
/**
* Created by Adam Chodera on 2016-03-15.
*/
- public class Commons {
? ^^^^
+ public interface Commons {
? +++++++ ^
- public static final String BASE_URL = "http://api.openweathermap.org/data/2.5/";
? --------------------
+ String BASE_URL = "http://api.openweathermap.org/data/2.5/";
- public static final String OPEN_WEATHER_APP_ID = "6fc006e6b8cbdd1bc3fa490b467a1692";
? --------------------
+ String OPEN_WEATHER_APP_ID = "6fc006e6b8cbdd1bc3fa490b467a1692";
- public static final int CHART_NUMBER_OF_X_VALUES = 8;
? --------------------
+ int CHART_NUMBER_OF_X_VALUES = 8;
- public static final String PASCAL_UNIT = "hPa";
? --------------------
+ String PASCAL_UNIT = "hPa";
- public interface Chars {
? -------
+ interface Chars {
char SPACE = ' ';
char COLON = ':';
String NEW_LINE = System.getProperty("line.separator");
char PLUS = '+';
char H = 'h';
char CELSIUS_UNIT = 'C';
char PERCENT = '%';
}
- public interface IntentKeys {
? -------
+ interface IntentKeys {
String LOCATION_NAME = "key_ADVERTISEMENT";
}
- public interface Animations {
? -------
+ interface Animations {
int DRAW_CHART_DATA = 1800;
}
} | 16 | 0.444444 | 8 | 8 |
83e4e51d3cd2bc6c3dec519e7952e44f1161b712 | os/install_anaconda.sh | os/install_anaconda.sh | curl https://www.continuum.io/downloads | \
grep -o \
'https://[[:alnum:]|-]*.ssl.cf1.rackcdn.com/Anaconda3-.*-Linux-x86_64.sh' \
>> anaconda_script_url
# Download the bash file
cat paste rs_deb_url | xargs wget -q
# Execute it
# You should pass the -b argument somewhere
# Note: This script will error out if the anaconda directory already exists.
# It's probably a good idea to detect that before running
cat anaconda_script_url | grep -o "Anaconda3-.*-Linux-x86_64.sh" | \
sed 's/$/ -b /' | xargs bash
| curl https://www.continuum.io/downloads | \
grep -o \
'https://[[:alnum:]|-]*.ssl.cf1.rackcdn.com/Anaconda2-.*-Linux-x86_64.sh' \
>> anaconda_script_url
# Download the bash file
cat anaconda_script_url | xargs wget -q
# Execute it
# You should pass the -b argument somewhere
# Note: This script will error out if the anaconda directory already exists.
# It's probably a good idea to detect that before running
cat anaconda_script_url | grep -o "Anaconda2-.*-Linux-x86_64.sh" | \
sed 's/$/ -b /' | xargs bash
| Use Anaconda 2 (not 3), for now | Use Anaconda 2 (not 3), for now
| Shell | mit | brendan-R/dotfiles,brendan-R/dotfiles | shell | ## Code Before:
curl https://www.continuum.io/downloads | \
grep -o \
'https://[[:alnum:]|-]*.ssl.cf1.rackcdn.com/Anaconda3-.*-Linux-x86_64.sh' \
>> anaconda_script_url
# Download the bash file
cat paste rs_deb_url | xargs wget -q
# Execute it
# You should pass the -b argument somewhere
# Note: This script will error out if the anaconda directory already exists.
# It's probably a good idea to detect that before running
cat anaconda_script_url | grep -o "Anaconda3-.*-Linux-x86_64.sh" | \
sed 's/$/ -b /' | xargs bash
## Instruction:
Use Anaconda 2 (not 3), for now
## Code After:
curl https://www.continuum.io/downloads | \
grep -o \
'https://[[:alnum:]|-]*.ssl.cf1.rackcdn.com/Anaconda2-.*-Linux-x86_64.sh' \
>> anaconda_script_url
# Download the bash file
cat anaconda_script_url | xargs wget -q
# Execute it
# You should pass the -b argument somewhere
# Note: This script will error out if the anaconda directory already exists.
# It's probably a good idea to detect that before running
cat anaconda_script_url | grep -o "Anaconda2-.*-Linux-x86_64.sh" | \
sed 's/$/ -b /' | xargs bash
| curl https://www.continuum.io/downloads | \
grep -o \
- 'https://[[:alnum:]|-]*.ssl.cf1.rackcdn.com/Anaconda3-.*-Linux-x86_64.sh' \
? ^
+ 'https://[[:alnum:]|-]*.ssl.cf1.rackcdn.com/Anaconda2-.*-Linux-x86_64.sh' \
? ^
>> anaconda_script_url
# Download the bash file
- cat paste rs_deb_url | xargs wget -q
+ cat anaconda_script_url | xargs wget -q
# Execute it
# You should pass the -b argument somewhere
# Note: This script will error out if the anaconda directory already exists.
# It's probably a good idea to detect that before running
- cat anaconda_script_url | grep -o "Anaconda3-.*-Linux-x86_64.sh" | \
? ^
+ cat anaconda_script_url | grep -o "Anaconda2-.*-Linux-x86_64.sh" | \
? ^
sed 's/$/ -b /' | xargs bash | 6 | 0.428571 | 3 | 3 |
29e30566459ca35e9fe04e18999f5d97cbc8008b | lib/async_client/unit_of_work.rb | lib/async_client/unit_of_work.rb | module AsyncClient
module UnitOfWork
def self.included(descendent)
descendent.extend(ClassMethods)
end
module ClassMethods
DEFAULT_QUEUE = "default".freeze
def default_queue
const_get(:DEFAULT_QUEUE)
end
def enqueue(data = {}, enqueue_options = {})
enqueue_options[:unit_of_work] = name
enqueue_options[:queue] ||= default_queue
async_client = enqueue_options.fetch(:async_client)
async_client.enqueue(data, enqueue_options)
end
def exec_instance(instance)
instance.before_exec if instance.respond_to?(:before_exec)
if instance.respond_to?(:around_exec)
instance.around_exec
else
instance.exec
end
instance.after_exec if instance.respond_to?(:after_exec)
end
def perform(job)
instance = new
instance.import_data(job.data)
instance.instance_variable_set(:@job, job)
exec_instance(instance)
end
end
attr_reader :job
def exec
end
def import_data(data)
data.each { |key, value| instance_variable_set("@#{key}", value) }
end
end
end
| module AsyncClient
module UnitOfWork
def self.included(descendent)
descendent.extend(ClassMethods)
end
module ClassMethods
DEFAULT_QUEUE = "default".freeze
def default_queue
const_get(:DEFAULT_QUEUE)
end
def enqueue(data = {}, enqueue_options = {})
enqueue_options[:unit_of_work] = name
enqueue_options[:queue] ||= default_queue
async_client = enqueue_options.fetch(:async_client)
async_client.enqueue(data, enqueue_options)
end
def exec_instance(instance)
instance.before_exec if instance.respond_to?(:before_exec)
if instance.respond_to?(:around_exec)
instance.around_exec
else
instance.exec
end
instance.after_exec if instance.respond_to?(:after_exec)
end
def perform(async_job)
instance = new
instance.import_data(async_job.data)
instance.instance_variable_set(:@async_job, async_job)
exec_instance(instance)
end
end
attr_reader :async_job
def exec
end
def import_data(data)
data.each { |key, value| instance_variable_set("@#{key}", value) }
end
end
end
| Rename UoW job to async_job | Rename UoW job to async_job
| Ruby | mit | tdg5/async_client,tdg5/async_client | ruby | ## Code Before:
module AsyncClient
module UnitOfWork
def self.included(descendent)
descendent.extend(ClassMethods)
end
module ClassMethods
DEFAULT_QUEUE = "default".freeze
def default_queue
const_get(:DEFAULT_QUEUE)
end
def enqueue(data = {}, enqueue_options = {})
enqueue_options[:unit_of_work] = name
enqueue_options[:queue] ||= default_queue
async_client = enqueue_options.fetch(:async_client)
async_client.enqueue(data, enqueue_options)
end
def exec_instance(instance)
instance.before_exec if instance.respond_to?(:before_exec)
if instance.respond_to?(:around_exec)
instance.around_exec
else
instance.exec
end
instance.after_exec if instance.respond_to?(:after_exec)
end
def perform(job)
instance = new
instance.import_data(job.data)
instance.instance_variable_set(:@job, job)
exec_instance(instance)
end
end
attr_reader :job
def exec
end
def import_data(data)
data.each { |key, value| instance_variable_set("@#{key}", value) }
end
end
end
## Instruction:
Rename UoW job to async_job
## Code After:
module AsyncClient
module UnitOfWork
def self.included(descendent)
descendent.extend(ClassMethods)
end
module ClassMethods
DEFAULT_QUEUE = "default".freeze
def default_queue
const_get(:DEFAULT_QUEUE)
end
def enqueue(data = {}, enqueue_options = {})
enqueue_options[:unit_of_work] = name
enqueue_options[:queue] ||= default_queue
async_client = enqueue_options.fetch(:async_client)
async_client.enqueue(data, enqueue_options)
end
def exec_instance(instance)
instance.before_exec if instance.respond_to?(:before_exec)
if instance.respond_to?(:around_exec)
instance.around_exec
else
instance.exec
end
instance.after_exec if instance.respond_to?(:after_exec)
end
def perform(async_job)
instance = new
instance.import_data(async_job.data)
instance.instance_variable_set(:@async_job, async_job)
exec_instance(instance)
end
end
attr_reader :async_job
def exec
end
def import_data(data)
data.each { |key, value| instance_variable_set("@#{key}", value) }
end
end
end
| module AsyncClient
module UnitOfWork
def self.included(descendent)
descendent.extend(ClassMethods)
end
module ClassMethods
DEFAULT_QUEUE = "default".freeze
def default_queue
const_get(:DEFAULT_QUEUE)
end
def enqueue(data = {}, enqueue_options = {})
enqueue_options[:unit_of_work] = name
enqueue_options[:queue] ||= default_queue
async_client = enqueue_options.fetch(:async_client)
async_client.enqueue(data, enqueue_options)
end
def exec_instance(instance)
instance.before_exec if instance.respond_to?(:before_exec)
if instance.respond_to?(:around_exec)
instance.around_exec
else
instance.exec
end
instance.after_exec if instance.respond_to?(:after_exec)
end
- def perform(job)
+ def perform(async_job)
? ++++++
instance = new
- instance.import_data(job.data)
+ instance.import_data(async_job.data)
? ++++++
- instance.instance_variable_set(:@job, job)
+ instance.instance_variable_set(:@async_job, async_job)
? ++++++ ++++++
exec_instance(instance)
end
end
- attr_reader :job
+ attr_reader :async_job
? ++++++
def exec
end
def import_data(data)
data.each { |key, value| instance_variable_set("@#{key}", value) }
end
end
end | 8 | 0.166667 | 4 | 4 |
6d7fda8a0b011b871de8340d37314419c1e66841 | app/assets/javascripts/select-all.js | app/assets/javascripts/select-all.js | (function(Modules) {
"use strict";
Modules.SelectAll = function() {
var that = this;
that.start = function(element) {
addEventListener();
function addEventListener() {
var selectAll = element.find('#select_all');
if (selectAll != undefined) {
selectAll.on('change', function(e) {
var checked = selectAll.prop('checked');
var checkboxes = $('.select-content-item');
checkboxes.prop('checked', checked);
});
}
}
}
};
})(window.GOVUKAdmin.Modules);
| (function(Modules) {
"use strict";
Modules.SelectAll = function() {
var that = this;
that.start = function(element) {
function addEventListener() {
var selectAll = element.find('#select_all');
if (selectAll != undefined) {
selectAll.on('change', function(e) {
var checked = selectAll.prop('checked');
var checkboxes = $('.select-content-item');
checkboxes.prop('checked', checked);
});
}
}
addEventListener();
}
};
})(window.GOVUKAdmin.Modules);
| Fix 'addEventListener' used before it was defined | Fix 'addEventListener' used before it was defined
In JavaScript, prior to ES6, variable and function declarations are hoisted to the top of a scope,
so it's possible to use identifiers before their formal declarations in code.
This can be confusing and some believe it is best to always declare variables and functions before using them.
Source: http://eslint.org/docs/rules/no-use-before-define
| JavaScript | mit | alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger | javascript | ## Code Before:
(function(Modules) {
"use strict";
Modules.SelectAll = function() {
var that = this;
that.start = function(element) {
addEventListener();
function addEventListener() {
var selectAll = element.find('#select_all');
if (selectAll != undefined) {
selectAll.on('change', function(e) {
var checked = selectAll.prop('checked');
var checkboxes = $('.select-content-item');
checkboxes.prop('checked', checked);
});
}
}
}
};
})(window.GOVUKAdmin.Modules);
## Instruction:
Fix 'addEventListener' used before it was defined
In JavaScript, prior to ES6, variable and function declarations are hoisted to the top of a scope,
so it's possible to use identifiers before their formal declarations in code.
This can be confusing and some believe it is best to always declare variables and functions before using them.
Source: http://eslint.org/docs/rules/no-use-before-define
## Code After:
(function(Modules) {
"use strict";
Modules.SelectAll = function() {
var that = this;
that.start = function(element) {
function addEventListener() {
var selectAll = element.find('#select_all');
if (selectAll != undefined) {
selectAll.on('change', function(e) {
var checked = selectAll.prop('checked');
var checkboxes = $('.select-content-item');
checkboxes.prop('checked', checked);
});
}
}
addEventListener();
}
};
})(window.GOVUKAdmin.Modules);
| (function(Modules) {
"use strict";
Modules.SelectAll = function() {
var that = this;
that.start = function(element) {
- addEventListener();
-
function addEventListener() {
var selectAll = element.find('#select_all');
if (selectAll != undefined) {
selectAll.on('change', function(e) {
var checked = selectAll.prop('checked');
var checkboxes = $('.select-content-item');
checkboxes.prop('checked', checked);
});
}
}
+
+ addEventListener();
}
};
})(window.GOVUKAdmin.Modules); | 4 | 0.181818 | 2 | 2 |
67d5b0817842595e5f94fd368b5b0924ac228eca | playbooks/container-publish.yaml | playbooks/container-publish.yaml | - hosts: all
tasks:
- include_vars: container-builder-vars.yaml
- name: Push images to DockerHub
block:
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
no_log: True
retries: 5
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/{{ item[1].name }}:{{ item[0].version }}
with_nested:
- "{{ kubernetes_versions }}"
- "{{ kubernetes_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/helm-client:{{ helm_version }}
retries: 10
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
with_items: "{{ cluster_autoscaler_versions }}"
retries: 10
| - hosts: all
tasks:
- include_vars: container-builder-vars.yaml
- name: Push images to DockerHub
block:
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
no_log: True
retries: 5
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/{{ item[1].name }}:{{ item[0].version }}
with_nested:
- "{{ kubernetes_versions }}"
- "{{ kubernetes_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/helm-client:{{ item.version }}
with_items: "{{ helm_versions }}"
retries: 10
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
with_items: "{{ cluster_autoscaler_versions }}"
retries: 10
| Fix publish of helm-client containers | [ci] Fix publish of helm-client containers
The publish step was using helm_version which has been renamed to
helm_versions to accomodate build of v2 and v3 clients.
Story: 2007514
Task: 39733
Change-Id: I69aa13b708a95530a4a86eb066885f3e56a91273
| YAML | apache-2.0 | ArchiFleKs/magnum,ArchiFleKs/magnum,openstack/magnum,openstack/magnum | yaml | ## Code Before:
- hosts: all
tasks:
- include_vars: container-builder-vars.yaml
- name: Push images to DockerHub
block:
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
no_log: True
retries: 5
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/{{ item[1].name }}:{{ item[0].version }}
with_nested:
- "{{ kubernetes_versions }}"
- "{{ kubernetes_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/helm-client:{{ helm_version }}
retries: 10
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
with_items: "{{ cluster_autoscaler_versions }}"
retries: 10
## Instruction:
[ci] Fix publish of helm-client containers
The publish step was using helm_version which has been renamed to
helm_versions to accomodate build of v2 and v3 clients.
Story: 2007514
Task: 39733
Change-Id: I69aa13b708a95530a4a86eb066885f3e56a91273
## Code After:
- hosts: all
tasks:
- include_vars: container-builder-vars.yaml
- name: Push images to DockerHub
block:
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
no_log: True
retries: 5
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/{{ item[1].name }}:{{ item[0].version }}
with_nested:
- "{{ kubernetes_versions }}"
- "{{ kubernetes_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/helm-client:{{ item.version }}
with_items: "{{ helm_versions }}"
retries: 10
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
with_items: "{{ cluster_autoscaler_versions }}"
retries: 10
| - hosts: all
tasks:
- include_vars: container-builder-vars.yaml
- name: Push images to DockerHub
block:
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
no_log: True
retries: 5
- command: docker push {{ magnum_repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ magnum_repository }}/{{ item[1].name }}:{{ item[0].version }}
with_nested:
- "{{ kubernetes_versions }}"
- "{{ kubernetes_images }}"
retries: 10
- - command: docker push {{ magnum_repository }}/helm-client:{{ helm_version }}
? ^ - ^
+ - command: docker push {{ magnum_repository }}/helm-client:{{ item.version }}
? ^^ ^
+ with_items: "{{ helm_versions }}"
retries: 10
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
with_items: "{{ cluster_autoscaler_versions }}"
retries: 10 | 3 | 0.136364 | 2 | 1 |
4c685280e47b215459e1229d246ed682a1e3603c | .zuul.yml | .zuul.yml | ui: mocha-bdd
browsers:
- name: chrome
version: [8, latest]
- name: ie
version: 10
- name: android
version: latest
| ui: mocha-bdd
browsers:
- name: chrome
version: 8..latest
- name: firefox
version: 7..latest
- name: safari
version: 6..latest
- name: opera
version: 12.1..latest
- name: ie
version: 10..latest
- name: android
version: latest
| Test in lots more browsers | Test in lots more browsers
| YAML | mit | webmodules/blob | yaml | ## Code Before:
ui: mocha-bdd
browsers:
- name: chrome
version: [8, latest]
- name: ie
version: 10
- name: android
version: latest
## Instruction:
Test in lots more browsers
## Code After:
ui: mocha-bdd
browsers:
- name: chrome
version: 8..latest
- name: firefox
version: 7..latest
- name: safari
version: 6..latest
- name: opera
version: 12.1..latest
- name: ie
version: 10..latest
- name: android
version: latest
| ui: mocha-bdd
browsers:
- name: chrome
- version: [8, latest]
? - ^^ -
+ version: 8..latest
? ^^
+ - name: firefox
+ version: 7..latest
+ - name: safari
+ version: 6..latest
+ - name: opera
+ version: 12.1..latest
- name: ie
- version: 10
+ version: 10..latest
? ++++++++
- name: android
version: latest | 10 | 1.25 | 8 | 2 |
c1e2ca5cbadd696fc3a8ea8e72662f4c293e856c | src/Naderman/Composer/AWS/S3RemoteFilesystem.php | src/Naderman/Composer/AWS/S3RemoteFilesystem.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 Naderman\Composer\AWS;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <naderman@naderman.de>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, $options, AwsClient $awsClient)
{
parent::__construct($io, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
| <?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 Naderman\Composer\AWS;
use Composer\Composer;
use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <naderman@naderman.de>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, Config $config = null, array $options = array(), AwsClient $awsClient)
{
parent::__construct($io, $config, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
| Fix modifications of Composer\Util\RemoteFilesystem (constructor) | Fix modifications of Composer\Util\RemoteFilesystem (constructor)
| PHP | mit | fdewinne/composer-aws,naderman/composer-aws | 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 Naderman\Composer\AWS;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <naderman@naderman.de>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, $options, AwsClient $awsClient)
{
parent::__construct($io, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
## Instruction:
Fix modifications of Composer\Util\RemoteFilesystem (constructor)
## 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 Naderman\Composer\AWS;
use Composer\Composer;
use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <naderman@naderman.de>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
public function __construct(IOInterface $io, Config $config = null, array $options = array(), AwsClient $awsClient)
{
parent::__construct($io, $config, $options);
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
}
| <?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 Naderman\Composer\AWS;
use Composer\Composer;
+ use Composer\Config;
use Composer\IO\IOInterface;
use Composer\Util\RemoteFilesystem;
/**
* Composer Plugin for AWS functionality
*
* @author Nils Adermann <naderman@naderman.de>
*/
class S3RemoteFilesystem extends RemoteFilesystem
{
protected $awsClient;
/**
* {@inheritDoc}
*/
- public function __construct(IOInterface $io, $options, AwsClient $awsClient)
+ public function __construct(IOInterface $io, Config $config = null, array $options = array(), AwsClient $awsClient)
? +++++++++++++++++++++++++++++ ++++++++++
{
- parent::__construct($io, $options);
+ parent::__construct($io, $config, $options);
? +++++++++
$this->awsClient = $awsClient;
}
/**
* {@inheritDoc}
*/
public function getContents($originUrl, $fileUrl, $progress = true, $options = array())
{
return $this->awsClient->download($fileUrl, $progress);
}
/**
* {@inheritDoc}
*/
public function copy($originUrl, $fileUrl, $fileName, $progress = true, $options = array())
{
$this->awsClient->download($fileUrl, $progress, $fileName);
}
} | 5 | 0.098039 | 3 | 2 |
3e4ef2a04e4170f24ba20fcda3e80e3f60e6ba3c | src/components/Overview.vue | src/components/Overview.vue | <template>
<div id="overview">Overview</div>
</template>
<script>
export default {
data() {
return {};
}
};
</script>
<style>
#overview {
padding: 2px 10px 10px 10px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style>
| <template>
<div id="overview">
<canvas width="400" height="400" id="overview-canvas">
Canvas unsupported, use a newer browser.
</canvas>
</div>
</template>
<script>
export default {};
</script>
<style>
#overview-canvas {
background-color: var(--ui-darker);
}
#overview {
padding: 5px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style>
| Use canvas for overview display | Use canvas for overview display
| Vue | mit | Trymunx/Dragon-Slayer,Trymunx/Dragon-Slayer | vue | ## Code Before:
<template>
<div id="overview">Overview</div>
</template>
<script>
export default {
data() {
return {};
}
};
</script>
<style>
#overview {
padding: 2px 10px 10px 10px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style>
## Instruction:
Use canvas for overview display
## Code After:
<template>
<div id="overview">
<canvas width="400" height="400" id="overview-canvas">
Canvas unsupported, use a newer browser.
</canvas>
</div>
</template>
<script>
export default {};
</script>
<style>
#overview-canvas {
background-color: var(--ui-darker);
}
#overview {
padding: 5px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style>
| <template>
- <div id="overview">Overview</div>
? --------------
+ <div id="overview">
+ <canvas width="400" height="400" id="overview-canvas">
+ Canvas unsupported, use a newer browser.
+ </canvas>
+ </div>
</template>
<script>
- export default {
+ export default {};
? ++
- data() {
- return {};
- }
- };
</script>
<style>
+ #overview-canvas {
+ background-color: var(--ui-darker);
+ }
+
#overview {
- padding: 2px 10px 10px 10px;
+ padding: 5px;
margin-bottom: 2px;
color: var(--text-blur);
background-color: var(--ui-darker);
border-color: var(--ui-border);
font-family: "Ubuntu Mono", monospace;
font-size: 0.9em;
white-space: pre-wrap;
text-align: center;
overflow-y: auto;
}
#overview::-webkit-scrollbar {
width: 8px;
}
#overview::-webkit-scrollbar-track {
background-color: var(--ui-darker);
}
#overview::-webkit-scrollbar-thumb {
background-color: var(--ui-border);
}
</style> | 18 | 0.473684 | 11 | 7 |
0eb31fc617a73711b266faccaf5ee2e5e15dc6c5 | app/models/plugin.js | app/models/plugin.js | import DS from 'ember-data';
var Plugin = DS.Model.extend({
name: DS.attr('string'),
packageName: DS.attr('string'),
description: DS.attr('string'),
readme: DS.attr('string'),
repositoryUrl: DS.attr('string'),
website: DS.attr('string'),
lastModified: DS.attr('date'),
lastVersion: DS.attr('string'),
user: DS.belongsTo('user'),
keywords: DS.hasMany('keyword'),
keywordCache: DS.attr('string'),
versions: DS.hasMany('pluginversion'),
installations: DS.hasMany('plugininstallation')
});
export default Plugin;
| import DS from 'ember-data';
var Plugin = DS.Model.extend({
name: DS.attr('string'),
packageName: DS.attr('string'),
description: DS.attr('string'),
readme: DS.attr('string'),
repositoryUrl: DS.attr('string'),
website: DS.attr('string'),
lastModified: DS.attr('date'),
lastVersion: DS.attr('string'),
user: DS.belongsTo('user'),
keywords: DS.hasMany('keyword'),
keywordCache: DS.attr('string'),
versions: DS.hasMany('pluginversion'),
installations: DS.hasMany('plugininstallation'),
installationCount: DS.attr('number')
});
export default Plugin;
| Add installationCount attr on Plugin model | Add installationCount attr on Plugin model
| JavaScript | mit | sergiolepore/hexo-plugin-site,sergiolepore/hexo-plugin-site | javascript | ## Code Before:
import DS from 'ember-data';
var Plugin = DS.Model.extend({
name: DS.attr('string'),
packageName: DS.attr('string'),
description: DS.attr('string'),
readme: DS.attr('string'),
repositoryUrl: DS.attr('string'),
website: DS.attr('string'),
lastModified: DS.attr('date'),
lastVersion: DS.attr('string'),
user: DS.belongsTo('user'),
keywords: DS.hasMany('keyword'),
keywordCache: DS.attr('string'),
versions: DS.hasMany('pluginversion'),
installations: DS.hasMany('plugininstallation')
});
export default Plugin;
## Instruction:
Add installationCount attr on Plugin model
## Code After:
import DS from 'ember-data';
var Plugin = DS.Model.extend({
name: DS.attr('string'),
packageName: DS.attr('string'),
description: DS.attr('string'),
readme: DS.attr('string'),
repositoryUrl: DS.attr('string'),
website: DS.attr('string'),
lastModified: DS.attr('date'),
lastVersion: DS.attr('string'),
user: DS.belongsTo('user'),
keywords: DS.hasMany('keyword'),
keywordCache: DS.attr('string'),
versions: DS.hasMany('pluginversion'),
installations: DS.hasMany('plugininstallation'),
installationCount: DS.attr('number')
});
export default Plugin;
| import DS from 'ember-data';
var Plugin = DS.Model.extend({
name: DS.attr('string'),
packageName: DS.attr('string'),
description: DS.attr('string'),
readme: DS.attr('string'),
repositoryUrl: DS.attr('string'),
website: DS.attr('string'),
lastModified: DS.attr('date'),
lastVersion: DS.attr('string'),
user: DS.belongsTo('user'),
keywords: DS.hasMany('keyword'),
keywordCache: DS.attr('string'),
versions: DS.hasMany('pluginversion'),
- installations: DS.hasMany('plugininstallation')
+ installations: DS.hasMany('plugininstallation'),
? +
+ installationCount: DS.attr('number')
});
export default Plugin; | 3 | 0.157895 | 2 | 1 |
5ddcc8b32ed914bd685647ba6dc2cadbd3a22af8 | index.js | index.js | 'use strict';
const os = require('os');
const path = require('path');
const alfy = require('alfy');
const dotenv = require('dotenv');
const imgur = require('imgur');
const clipboardy = require('clipboardy');
// Load config from ~/.alfred-imgur
dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')});
// Check for errors
if (alfy.input === 'errorNoSelection') {
console.log(`Error: no file selected`);
} else if (alfy.input === 'errorFolder') {
console.log(`Error: folder detected - please select a file`);
} else if (!path.extname(alfy.input).match(/(jpg|png|gif|tiff)/)) {
console.log(`Error: no valid image file extension detected`);
} else {
// Set client id
imgur.setClientId(process.env.APIKEY);
// Upload file to Imgur
imgur.uploadFile(alfy.input).then(function (json) {
// Copy upload URL to clipboard and write to stdout
clipboardy.writeSync(json.data.link);
console.log(json.data.link);
}).catch(function (err) {
console.error(`Error: ${err.message}`);
});
}
| 'use strict';
const os = require('os');
const path = require('path');
const alfy = require('alfy');
const dotenv = require('dotenv');
const imgur = require('imgur');
const clipboardy = require('clipboardy');
// Load config from ~/.alfred-imgur
dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')});
// Check for errors
if (alfy.input === 'errorNoSelection') {
console.log(`Error: no file selected`);
} else if (alfy.input === 'errorFolder') {
console.log(`Error: folder detected - please select a file`);
// eslint-disable-next-line no-negated-condition
} else if (!path.extname(alfy.input).match(/(jpg|png|gif|tiff)/)) {
console.log(`Error: no valid image file extension detected`);
} else {
// Set client id
imgur.setClientId(process.env.APIKEY);
// Upload file to Imgur
imgur.uploadFile(alfy.input).then(function (json) {
// Copy upload URL to clipboard and write to stdout
clipboardy.writeSync(json.data.link);
console.log(json.data.link);
}).catch(function (err) {
console.error(`Error: ${err.message}`);
});
}
| Disable "no-negated-condition" for if condition | Disable "no-negated-condition" for if condition
| JavaScript | mit | frdmn/alfred-imgur | javascript | ## Code Before:
'use strict';
const os = require('os');
const path = require('path');
const alfy = require('alfy');
const dotenv = require('dotenv');
const imgur = require('imgur');
const clipboardy = require('clipboardy');
// Load config from ~/.alfred-imgur
dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')});
// Check for errors
if (alfy.input === 'errorNoSelection') {
console.log(`Error: no file selected`);
} else if (alfy.input === 'errorFolder') {
console.log(`Error: folder detected - please select a file`);
} else if (!path.extname(alfy.input).match(/(jpg|png|gif|tiff)/)) {
console.log(`Error: no valid image file extension detected`);
} else {
// Set client id
imgur.setClientId(process.env.APIKEY);
// Upload file to Imgur
imgur.uploadFile(alfy.input).then(function (json) {
// Copy upload URL to clipboard and write to stdout
clipboardy.writeSync(json.data.link);
console.log(json.data.link);
}).catch(function (err) {
console.error(`Error: ${err.message}`);
});
}
## Instruction:
Disable "no-negated-condition" for if condition
## Code After:
'use strict';
const os = require('os');
const path = require('path');
const alfy = require('alfy');
const dotenv = require('dotenv');
const imgur = require('imgur');
const clipboardy = require('clipboardy');
// Load config from ~/.alfred-imgur
dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')});
// Check for errors
if (alfy.input === 'errorNoSelection') {
console.log(`Error: no file selected`);
} else if (alfy.input === 'errorFolder') {
console.log(`Error: folder detected - please select a file`);
// eslint-disable-next-line no-negated-condition
} else if (!path.extname(alfy.input).match(/(jpg|png|gif|tiff)/)) {
console.log(`Error: no valid image file extension detected`);
} else {
// Set client id
imgur.setClientId(process.env.APIKEY);
// Upload file to Imgur
imgur.uploadFile(alfy.input).then(function (json) {
// Copy upload URL to clipboard and write to stdout
clipboardy.writeSync(json.data.link);
console.log(json.data.link);
}).catch(function (err) {
console.error(`Error: ${err.message}`);
});
}
| 'use strict';
const os = require('os');
const path = require('path');
const alfy = require('alfy');
const dotenv = require('dotenv');
const imgur = require('imgur');
const clipboardy = require('clipboardy');
// Load config from ~/.alfred-imgur
dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')});
// Check for errors
if (alfy.input === 'errorNoSelection') {
console.log(`Error: no file selected`);
} else if (alfy.input === 'errorFolder') {
console.log(`Error: folder detected - please select a file`);
+ // eslint-disable-next-line no-negated-condition
} else if (!path.extname(alfy.input).match(/(jpg|png|gif|tiff)/)) {
console.log(`Error: no valid image file extension detected`);
} else {
// Set client id
imgur.setClientId(process.env.APIKEY);
// Upload file to Imgur
imgur.uploadFile(alfy.input).then(function (json) {
// Copy upload URL to clipboard and write to stdout
clipboardy.writeSync(json.data.link);
console.log(json.data.link);
}).catch(function (err) {
console.error(`Error: ${err.message}`);
});
} | 1 | 0.033333 | 1 | 0 |
9844c961282c0dc846932ce3bd13c6ec7eb8aa4f | packages/ye/yesod-recaptcha2.yaml | packages/ye/yesod-recaptcha2.yaml | homepage: https://github.com/ncaq/yesod-recaptcha2#readme
changelog-type: ''
hash: 19a3d4f01df56e4e5c0ed213f794ec6515bebad43d12aba46a6c6e75c9df04b8
test-bench-deps: {}
maintainer: ncaq@ncaq.net
synopsis: yesod recaptcha2
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
classy-prelude-yesod: -any
http-conduit: -any
yesod-auth: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
author: ncaq
latest: '0.1.0.1'
description-type: markdown
description: ! "# yesod-recaptcha2\n\n~~~hs\nimport Import.ReCaptcha2\n~~~\n\n~~~hs\ninstance
YesodReCaptcha App where\n reCaptchaSiteKey = return \"foo\"\n reCaptchaSecretKey
= return \"bar\"\n~~~\n\n\n~~~hs\n<* reCaptcha\n~~~\n\n"
license-name: MIT
| homepage: https://github.com/ncaq/yesod-recaptcha2#readme
changelog-type: ''
hash: 906ba2463593ab5bd1048173a24cf1d88abf3ee5192b359a3e6763a12e673a30
test-bench-deps: {}
maintainer: ncaq@ncaq.net
synopsis: yesod recaptcha2
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
text: -any
classy-prelude-yesod: -any
http-conduit: -any
yesod-auth: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.2.0'
author: ncaq
latest: '0.2.0'
description-type: markdown
description: ! "# yesod-recaptcha2\n\n~~~hs\nimport Yesod.ReCaptcha2\n~~~\n\n~~~hs\ninstance
YesodReCaptcha App where\n reCaptchaSiteKey = pure \"foo\"\n reCaptchaSecretKey
= pure \"bar\"\n reCaptchaLanguage = pure Nothing\n\n -- with specific language
from https://developers.google.com/recaptcha/docs/language\n -- reCaptchaLanguage
= pure (Just \"ru\")\n~~~\n\n## Append to applicative form\n\n~~~hs\nbuildForm ::
Form MyForm\nbuildForm = renderDivs $ MyForm\n <$> areq textField \"foo\" Nothing\n
\ <* reCaptcha\n~~~\n"
license-name: MIT
| Update from Hackage at 2017-11-04T10:48:38Z | Update from Hackage at 2017-11-04T10:48:38Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/ncaq/yesod-recaptcha2#readme
changelog-type: ''
hash: 19a3d4f01df56e4e5c0ed213f794ec6515bebad43d12aba46a6c6e75c9df04b8
test-bench-deps: {}
maintainer: ncaq@ncaq.net
synopsis: yesod recaptcha2
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
classy-prelude-yesod: -any
http-conduit: -any
yesod-auth: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
author: ncaq
latest: '0.1.0.1'
description-type: markdown
description: ! "# yesod-recaptcha2\n\n~~~hs\nimport Import.ReCaptcha2\n~~~\n\n~~~hs\ninstance
YesodReCaptcha App where\n reCaptchaSiteKey = return \"foo\"\n reCaptchaSecretKey
= return \"bar\"\n~~~\n\n\n~~~hs\n<* reCaptcha\n~~~\n\n"
license-name: MIT
## Instruction:
Update from Hackage at 2017-11-04T10:48:38Z
## Code After:
homepage: https://github.com/ncaq/yesod-recaptcha2#readme
changelog-type: ''
hash: 906ba2463593ab5bd1048173a24cf1d88abf3ee5192b359a3e6763a12e673a30
test-bench-deps: {}
maintainer: ncaq@ncaq.net
synopsis: yesod recaptcha2
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
text: -any
classy-prelude-yesod: -any
http-conduit: -any
yesod-auth: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.2.0'
author: ncaq
latest: '0.2.0'
description-type: markdown
description: ! "# yesod-recaptcha2\n\n~~~hs\nimport Yesod.ReCaptcha2\n~~~\n\n~~~hs\ninstance
YesodReCaptcha App where\n reCaptchaSiteKey = pure \"foo\"\n reCaptchaSecretKey
= pure \"bar\"\n reCaptchaLanguage = pure Nothing\n\n -- with specific language
from https://developers.google.com/recaptcha/docs/language\n -- reCaptchaLanguage
= pure (Just \"ru\")\n~~~\n\n## Append to applicative form\n\n~~~hs\nbuildForm ::
Form MyForm\nbuildForm = renderDivs $ MyForm\n <$> areq textField \"foo\" Nothing\n
\ <* reCaptcha\n~~~\n"
license-name: MIT
| homepage: https://github.com/ncaq/yesod-recaptcha2#readme
changelog-type: ''
- hash: 19a3d4f01df56e4e5c0ed213f794ec6515bebad43d12aba46a6c6e75c9df04b8
+ hash: 906ba2463593ab5bd1048173a24cf1d88abf3ee5192b359a3e6763a12e673a30
test-bench-deps: {}
maintainer: ncaq@ncaq.net
synopsis: yesod recaptcha2
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
+ text: -any
classy-prelude-yesod: -any
http-conduit: -any
yesod-auth: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
+ - '0.2.0'
author: ncaq
- latest: '0.1.0.1'
? ^ --
+ latest: '0.2.0'
? ^
description-type: markdown
- description: ! "# yesod-recaptcha2\n\n~~~hs\nimport Import.ReCaptcha2\n~~~\n\n~~~hs\ninstance
? ^^^ ^^
+ description: ! "# yesod-recaptcha2\n\n~~~hs\nimport Yesod.ReCaptcha2\n~~~\n\n~~~hs\ninstance
? ^^^ ^
- YesodReCaptcha App where\n reCaptchaSiteKey = return \"foo\"\n reCaptchaSecretKey
? ----
+ YesodReCaptcha App where\n reCaptchaSiteKey = pure \"foo\"\n reCaptchaSecretKey
? ++
- = return \"bar\"\n~~~\n\n\n~~~hs\n<* reCaptcha\n~~~\n\n"
+ = pure \"bar\"\n reCaptchaLanguage = pure Nothing\n\n -- with specific language
+ from https://developers.google.com/recaptcha/docs/language\n -- reCaptchaLanguage
+ = pure (Just \"ru\")\n~~~\n\n## Append to applicative form\n\n~~~hs\nbuildForm ::
+ Form MyForm\nbuildForm = renderDivs $ MyForm\n <$> areq textField \"foo\" Nothing\n
+ \ <* reCaptcha\n~~~\n"
license-name: MIT | 16 | 0.727273 | 11 | 5 |
2143c25bcf5b2a2fc485db3969bca44e1670f972 | tests/integration/components/medium-editor-test.js | tests/integration/components/medium-editor-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { find, fillIn } from 'ember-native-dom-helpers';
import { skip } from 'qunit';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
integration: true
});
test('it renders', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor}}`);
assert.equal(find('.medium-editor-element').innerHTML, '');
});
test('it sets initial value and updates it', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor "<h1>Value</h1>"}}`);
assert.equal(find('h1').innerHTML, 'Value');
skip('value didUpdateAttrs test', function() {
this.set('value', '<h2>New value</h2>');
assert.equal(this.$('h2').text(), 'New value');
});
});
skip('onChange action', function() {
test('it should trigger onChange action when content changed', async function(assert) {
assert.expect(1);
this.set('onChange', (actual) => {
assert.equal(actual, '<p>typed value</p>');
});
this.render(hbs`{{medium-editor onChange=(action onChange)}}`);
await fillIn('.medium-editor-element', '<p>typed value</p>');
});
});
| import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { find } from 'ember-native-dom-helpers';
import MediumEditor from 'medium-editor';
const meClass = '.medium-editor-element';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
integration: true
});
test('it renders', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor}}`);
assert.equal(find(meClass).innerHTML, '');
});
test('it sets initial value and updates it', function(assert) {
assert.expect(2);
this.set('tempValue', '<h1>Value</h1>');
this.render(hbs`{{medium-editor tempValue}}`);
assert.equal(find('h1').innerHTML, 'Value');
this.set('tempValue', '<h2>New value</h2>');
assert.equal(find('h2').innerHTML, 'New value');
});
test('it should trigger onChange action when content changed', function(assert) {
assert.expect(1);
this.set('onChange', (actual) => {
assert.equal(actual, '<p>typed value</p>');
});
this.render(hbs`{{medium-editor onChange=(action onChange)}}`);
let editor = MediumEditor.getEditorFromElement(find(meClass));
editor.setContent('<p>typed value</p>');
});
| Update tests to test onChange and value. | Update tests to test onChange and value.
| JavaScript | mit | kolybasov/ember-medium-editor,kolybasov/ember-medium-editor | javascript | ## Code Before:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { find, fillIn } from 'ember-native-dom-helpers';
import { skip } from 'qunit';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
integration: true
});
test('it renders', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor}}`);
assert.equal(find('.medium-editor-element').innerHTML, '');
});
test('it sets initial value and updates it', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor "<h1>Value</h1>"}}`);
assert.equal(find('h1').innerHTML, 'Value');
skip('value didUpdateAttrs test', function() {
this.set('value', '<h2>New value</h2>');
assert.equal(this.$('h2').text(), 'New value');
});
});
skip('onChange action', function() {
test('it should trigger onChange action when content changed', async function(assert) {
assert.expect(1);
this.set('onChange', (actual) => {
assert.equal(actual, '<p>typed value</p>');
});
this.render(hbs`{{medium-editor onChange=(action onChange)}}`);
await fillIn('.medium-editor-element', '<p>typed value</p>');
});
});
## Instruction:
Update tests to test onChange and value.
## Code After:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { find } from 'ember-native-dom-helpers';
import MediumEditor from 'medium-editor';
const meClass = '.medium-editor-element';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
integration: true
});
test('it renders', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor}}`);
assert.equal(find(meClass).innerHTML, '');
});
test('it sets initial value and updates it', function(assert) {
assert.expect(2);
this.set('tempValue', '<h1>Value</h1>');
this.render(hbs`{{medium-editor tempValue}}`);
assert.equal(find('h1').innerHTML, 'Value');
this.set('tempValue', '<h2>New value</h2>');
assert.equal(find('h2').innerHTML, 'New value');
});
test('it should trigger onChange action when content changed', function(assert) {
assert.expect(1);
this.set('onChange', (actual) => {
assert.equal(actual, '<p>typed value</p>');
});
this.render(hbs`{{medium-editor onChange=(action onChange)}}`);
let editor = MediumEditor.getEditorFromElement(find(meClass));
editor.setContent('<p>typed value</p>');
});
| import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
- import { find, fillIn } from 'ember-native-dom-helpers';
? --------
+ import { find } from 'ember-native-dom-helpers';
- import { skip } from 'qunit';
+ import MediumEditor from 'medium-editor';
+
+ const meClass = '.medium-editor-element';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
integration: true
});
test('it renders', function(assert) {
assert.expect(1);
this.render(hbs`{{medium-editor}}`);
- assert.equal(find('.medium-editor-element').innerHTML, '');
? -- ^^^^^^^^^^^^^ ^^^^^^
+ assert.equal(find(meClass).innerHTML, '');
? ^ ^^^
});
test('it sets initial value and updates it', function(assert) {
- assert.expect(1);
? ^
+ assert.expect(2);
? ^
+ this.set('tempValue', '<h1>Value</h1>');
- this.render(hbs`{{medium-editor "<h1>Value</h1>"}}`);
? ^^^^^ ------
+ this.render(hbs`{{medium-editor tempValue}}`);
? ^^^^
assert.equal(find('h1').innerHTML, 'Value');
- skip('value didUpdateAttrs test', function() {
- this.set('value', '<h2>New value</h2>');
? -- ^
+ this.set('tempValue', '<h2>New value</h2>');
? ^^^^^
- assert.equal(this.$('h2').text(), 'New value');
? -- ^^ ^^^ ^ ^^^^
+ assert.equal(find('h2').innerHTML, 'New value');
? ^ ^^ ^^^ ^^^^^
- });
});
- skip('onChange action', function() {
- test('it should trigger onChange action when content changed', async function(assert) {
? -- ------
+ test('it should trigger onChange action when content changed', function(assert) {
- assert.expect(1);
? --
+ assert.expect(1);
- this.set('onChange', (actual) => {
? --
+ this.set('onChange', (actual) => {
- assert.equal(actual, '<p>typed value</p>');
? --
+ assert.equal(actual, '<p>typed value</p>');
- });
? --
+ });
- this.render(hbs`{{medium-editor onChange=(action onChange)}}`);
? --
+ this.render(hbs`{{medium-editor onChange=(action onChange)}}`);
- await fillIn('.medium-editor-element', '<p>typed value</p>');
- });
+ let editor = MediumEditor.getEditorFromElement(find(meClass));
+ editor.setContent('<p>typed value</p>');
}); | 36 | 0.878049 | 18 | 18 |
7e074af90f9144adc48e94a5a6a43e1dbd79f99e | Backlog.md | Backlog.md |
+ Introduce an instrument concept
+ Introduce market data starting with acceptance test
+ Introduce order API
+ Create our acceptance test harness (a console app generating report after each runs session)
## Remarks
+ Null object pattern instead of nulls
+ Implement asynchronous nature of the markets (for their feedback)
+ Try various technical strategy for the inside-the-hexagon implementation (LMAX, F#, Michonne, ...)
+ Conclude and call for action for other guys/languages/platforms...
- - -
## Events autours du passage d'ordre
Cf photo Cyrille
1, 2, 3, 4 dans presque tous les ordres possibles (race cond fonctionnelles)
1. Order updated: Canceled, executed, ... new status
1. __Exec notif__: a quel prix tu as trait effectivement
2. Trade Info (traded): avec qui? marges y/no ? settlement condition? (sous quels termes)
3. Last traded price: mise jour du flux (dernier prix trait par instrument) -> le cours (last executed price)
4. __Feed Updated__: mise jour du flux, avec impact sur les quantits par exemple et les prix
Le solver est intress par 3 et 4
|
1. To introduce the concept of (financial) instrument (mandatory to support the concept of *Market data* feeds)
1. To introduce the notion of market data and the MarketData API & Port/Adapter (starting from our acceptance tests)
1. To introduce the *OrderRouting* API & corresponding port/adapter
1. To create our acceptance test harness (i.e. a console application generating a report after each runs session)
## Remarks
+ Null object pattern instead of nulls
+ Implement asynchronous nature of the markets (for their feedback)
+ Try various technical strategy for the inside-the-hexagon implementation (LMAX, F#, Michonne, ...)
+ Conclude and call for action for other guys/languages/platforms...
- - -
## Events autours du passage d'ordre
Cf photo Cyrille
1, 2, 3, 4 dans presque tous les ordres possibles (race cond fonctionnelles)
1. Order updated: Canceled, executed, ... new status
1. __Exec notif__: a quel prix tu as trait effectivement
2. Trade Info (traded): avec qui? marges y/no ? settlement condition? (sous quels termes)
3. Last traded price: mise jour du flux (dernier prix trait par instrument) -> le cours (last executed price)
4. __Feed Updated__: mise jour du flux, avec impact sur les quantits par exemple et les prix
Le solver est intress par 3 et 4
| Fix spelling within the backlog file. | Fix spelling within the backlog file.
| Markdown | apache-2.0 | Lunch-box/SimpleOrderRouting | markdown | ## Code Before:
+ Introduce an instrument concept
+ Introduce market data starting with acceptance test
+ Introduce order API
+ Create our acceptance test harness (a console app generating report after each runs session)
## Remarks
+ Null object pattern instead of nulls
+ Implement asynchronous nature of the markets (for their feedback)
+ Try various technical strategy for the inside-the-hexagon implementation (LMAX, F#, Michonne, ...)
+ Conclude and call for action for other guys/languages/platforms...
- - -
## Events autours du passage d'ordre
Cf photo Cyrille
1, 2, 3, 4 dans presque tous les ordres possibles (race cond fonctionnelles)
1. Order updated: Canceled, executed, ... new status
1. __Exec notif__: a quel prix tu as trait effectivement
2. Trade Info (traded): avec qui? marges y/no ? settlement condition? (sous quels termes)
3. Last traded price: mise jour du flux (dernier prix trait par instrument) -> le cours (last executed price)
4. __Feed Updated__: mise jour du flux, avec impact sur les quantits par exemple et les prix
Le solver est intress par 3 et 4
## Instruction:
Fix spelling within the backlog file.
## Code After:
1. To introduce the concept of (financial) instrument (mandatory to support the concept of *Market data* feeds)
1. To introduce the notion of market data and the MarketData API & Port/Adapter (starting from our acceptance tests)
1. To introduce the *OrderRouting* API & corresponding port/adapter
1. To create our acceptance test harness (i.e. a console application generating a report after each runs session)
## Remarks
+ Null object pattern instead of nulls
+ Implement asynchronous nature of the markets (for their feedback)
+ Try various technical strategy for the inside-the-hexagon implementation (LMAX, F#, Michonne, ...)
+ Conclude and call for action for other guys/languages/platforms...
- - -
## Events autours du passage d'ordre
Cf photo Cyrille
1, 2, 3, 4 dans presque tous les ordres possibles (race cond fonctionnelles)
1. Order updated: Canceled, executed, ... new status
1. __Exec notif__: a quel prix tu as trait effectivement
2. Trade Info (traded): avec qui? marges y/no ? settlement condition? (sous quels termes)
3. Last traded price: mise jour du flux (dernier prix trait par instrument) -> le cours (last executed price)
4. __Feed Updated__: mise jour du flux, avec impact sur les quantits par exemple et les prix
Le solver est intress par 3 et 4
|
- + Introduce an instrument concept
+ 1. To introduce the concept of (financial) instrument (mandatory to support the concept of *Market data* feeds)
- + Introduce market data starting with acceptance test
+ 1. To introduce the notion of market data and the MarketData API & Port/Adapter (starting from our acceptance tests)
- + Introduce order API
+ 1. To introduce the *OrderRouting* API & corresponding port/adapter
- + Create our acceptance test harness (a console app generating report after each runs session)
? ^ ^
+ 1. To create our acceptance test harness (i.e. a console application generating a report after each runs session)
? ^^ ^^^^ +++++ ++++++++ ++
+
+
## Remarks
+ Null object pattern instead of nulls
+ Implement asynchronous nature of the markets (for their feedback)
+ Try various technical strategy for the inside-the-hexagon implementation (LMAX, F#, Michonne, ...)
+ Conclude and call for action for other guys/languages/platforms...
- - -
## Events autours du passage d'ordre
Cf photo Cyrille
1, 2, 3, 4 dans presque tous les ordres possibles (race cond fonctionnelles)
1. Order updated: Canceled, executed, ... new status
1. __Exec notif__: a quel prix tu as trait effectivement
2. Trade Info (traded): avec qui? marges y/no ? settlement condition? (sous quels termes)
3. Last traded price: mise jour du flux (dernier prix trait par instrument) -> le cours (last executed price)
4. __Feed Updated__: mise jour du flux, avec impact sur les quantits par exemple et les prix
Le solver est intress par 3 et 4
| 10 | 0.25641 | 6 | 4 |
8a2fca1d14d4bb2bfad502afed52af318d76305a | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.1.3
before_install:
- gem update --system
- gem install bundler
- bundle install
- rake install
# Tests use real git commands
- git config --global user.email "danger@example.com"
- git config --global user.name "Danger McShane"
script:
- bundle exec rake spec
- danger
| language: ruby
cache: bundler
rvm:
- 2.1.3
before_install:
- gem install bundler
- bundle install
- rake install
# Tests use real git commands
- git config --global user.email "danger@example.com"
- git config --global user.name "Danger McShane"
script:
- bundle exec rake spec
- danger
| Use bundler caching in CI | Use bundler caching in CI
| YAML | mit | danger/danger,orta/danger,danger/danger,beubi/danger,orta/danger,danger/danger,beubi/danger,beubi/danger,KrauseFx/danger,KrauseFx/danger | yaml | ## Code Before:
language: ruby
rvm:
- 2.1.3
before_install:
- gem update --system
- gem install bundler
- bundle install
- rake install
# Tests use real git commands
- git config --global user.email "danger@example.com"
- git config --global user.name "Danger McShane"
script:
- bundle exec rake spec
- danger
## Instruction:
Use bundler caching in CI
## Code After:
language: ruby
cache: bundler
rvm:
- 2.1.3
before_install:
- gem install bundler
- bundle install
- rake install
# Tests use real git commands
- git config --global user.email "danger@example.com"
- git config --global user.name "Danger McShane"
script:
- bundle exec rake spec
- danger
| language: ruby
+ cache: bundler
rvm:
- 2.1.3
before_install:
- - gem update --system
- gem install bundler
- bundle install
- rake install
# Tests use real git commands
- git config --global user.email "danger@example.com"
- git config --global user.name "Danger McShane"
script:
- bundle exec rake spec
- danger | 2 | 0.125 | 1 | 1 |
a3968ab656e123ac82b6b3c009efadf74f6b85e1 | index.md | index.md | ---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: default
---
<div class="welcome">
<div class="row align-items-center h-100">
<div class="col-md-6 message">
<p>Microbiome researchers are generating unprecedented amounts of data and frequently struggle to analyze it in a reproducible manner.</p>
<p>The <i>Riffomonas</i> project is dedicated to helping you to improve your computational analysis skills using methods that foster reproducibility.</p>
</div>
</div>
</div>
| ---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: default
---
<div class="welcome">
<div class="row align-items-center h-100">
<div class="col-md-6 message">
<p>We believe you can answer you own data analysis questions. Do you?</p>
<p>Scientists are generating unprecedented amounts of data and frequently struggle to analyze it in a reproducible manner. With <i>Riffomonas</i>, you can improve your data analysis skills using methods that foster reproducibility.</p>
</div>
</div>
<script async data-uid="e17b04d285" src="https://upbeat-experimenter-4147.ck.page/e17b04d285/index.js"></script>
</div>
| Add mailing list signup link | Add mailing list signup link
| Markdown | mit | riffomonas/riffomonas.github.io,riffomonas/riffomonas.github.io | markdown | ## Code Before:
---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: default
---
<div class="welcome">
<div class="row align-items-center h-100">
<div class="col-md-6 message">
<p>Microbiome researchers are generating unprecedented amounts of data and frequently struggle to analyze it in a reproducible manner.</p>
<p>The <i>Riffomonas</i> project is dedicated to helping you to improve your computational analysis skills using methods that foster reproducibility.</p>
</div>
</div>
</div>
## Instruction:
Add mailing list signup link
## Code After:
---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: default
---
<div class="welcome">
<div class="row align-items-center h-100">
<div class="col-md-6 message">
<p>We believe you can answer you own data analysis questions. Do you?</p>
<p>Scientists are generating unprecedented amounts of data and frequently struggle to analyze it in a reproducible manner. With <i>Riffomonas</i>, you can improve your data analysis skills using methods that foster reproducibility.</p>
</div>
</div>
<script async data-uid="e17b04d285" src="https://upbeat-experimenter-4147.ck.page/e17b04d285/index.js"></script>
</div>
| ---
# You don't need to edit this file, it's empty on purpose.
# Edit theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: default
---
<div class="welcome">
<div class="row align-items-center h-100">
<div class="col-md-6 message">
- <p>Microbiome researchers are generating unprecedented amounts of data and frequently struggle to analyze it in a reproducible manner.</p>
+ <p>We believe you can answer you own data analysis questions. Do you?</p>
- <p>The <i>Riffomonas</i> project is dedicated to helping you to improve your computational analysis skills using methods that foster reproducibility.</p>
+ <p>Scientists are generating unprecedented amounts of data and frequently struggle to analyze it in a reproducible manner. With <i>Riffomonas</i>, you can improve your data analysis skills using methods that foster reproducibility.</p>
</div>
</div>
+ <script async data-uid="e17b04d285" src="https://upbeat-experimenter-4147.ck.page/e17b04d285/index.js"></script>
</div> | 5 | 0.3125 | 3 | 2 |
cc93633c83082476f3983aea7855b0366052c66f | indico/modules/events/agreements/templates/events/agreements/emails/agreement_default_body.html | indico/modules/events/agreements/templates/events/agreements/emails/agreement_default_body.html | {% extends 'emails/base.html' %}
{% block header_recipient -%}
{person_name}
{%- endblock %}
{% block body %}
There is an agreement you are requested to sign for the event:<br>
<strong>{{ event.getTitle() }}</strong><br><br>
You can sign it on the following page:<br>
{agreement_link}
{% if session %}
<br><br>
Best regards<br>
{{ session.user.getName() }}
{% endif %}
{%- endblock %}
{% block footer_title %}Agreements{% endblock %}
{% block footer %}
{# Show default footer if sent from command line #}
{% if not session.user %}
{{ super() }}
{% endif %}
{% endblock %}
| {% extends 'emails/base.html' %}
{% block header_recipient -%}
{person_name}
{%- endblock %}
{% block body %}
{% block body_text %}
There is an agreement you are requested to sign for the event:<br>
<strong>{{ event.getTitle() }}</strong><br><br>
{% block body_agreement_request %}
You can sign it on the following page:
{% endblock %}<br>
{agreement_link}
{% endblock %}
{% if session %}
<br><br>
Best regards<br>
{{ session.user.getName() }}
{% endif %}
{%- endblock %}
{% block footer_title %}Agreements{% endblock %}
{% block footer %}
{# Show default footer if sent from command line #}
{% if not session.user %}
{{ super() }}
{% endif %}
{% endblock %}
| Add text block to default email body tpl | Add text block to default email body tpl
| HTML | mit | mic4ael/indico,mvidalgarcia/indico,OmeGak/indico,DirkHoffmann/indico,ThiefMaster/indico,OmeGak/indico,ThiefMaster/indico,OmeGak/indico,mvidalgarcia/indico,mvidalgarcia/indico,mic4ael/indico,mvidalgarcia/indico,OmeGak/indico,mic4ael/indico,DirkHoffmann/indico,pferreir/indico,indico/indico,pferreir/indico,ThiefMaster/indico,indico/indico,DirkHoffmann/indico,pferreir/indico,mic4ael/indico,pferreir/indico,DirkHoffmann/indico,indico/indico,ThiefMaster/indico,indico/indico | html | ## Code Before:
{% extends 'emails/base.html' %}
{% block header_recipient -%}
{person_name}
{%- endblock %}
{% block body %}
There is an agreement you are requested to sign for the event:<br>
<strong>{{ event.getTitle() }}</strong><br><br>
You can sign it on the following page:<br>
{agreement_link}
{% if session %}
<br><br>
Best regards<br>
{{ session.user.getName() }}
{% endif %}
{%- endblock %}
{% block footer_title %}Agreements{% endblock %}
{% block footer %}
{# Show default footer if sent from command line #}
{% if not session.user %}
{{ super() }}
{% endif %}
{% endblock %}
## Instruction:
Add text block to default email body tpl
## Code After:
{% extends 'emails/base.html' %}
{% block header_recipient -%}
{person_name}
{%- endblock %}
{% block body %}
{% block body_text %}
There is an agreement you are requested to sign for the event:<br>
<strong>{{ event.getTitle() }}</strong><br><br>
{% block body_agreement_request %}
You can sign it on the following page:
{% endblock %}<br>
{agreement_link}
{% endblock %}
{% if session %}
<br><br>
Best regards<br>
{{ session.user.getName() }}
{% endif %}
{%- endblock %}
{% block footer_title %}Agreements{% endblock %}
{% block footer %}
{# Show default footer if sent from command line #}
{% if not session.user %}
{{ super() }}
{% endif %}
{% endblock %}
| {% extends 'emails/base.html' %}
{% block header_recipient -%}
{person_name}
{%- endblock %}
{% block body %}
+ {% block body_text %}
- There is an agreement you are requested to sign for the event:<br>
+ There is an agreement you are requested to sign for the event:<br>
? ++++
- <strong>{{ event.getTitle() }}</strong><br><br>
+ <strong>{{ event.getTitle() }}</strong><br><br>
? ++++
+ {% block body_agreement_request %}
- You can sign it on the following page:<br>
? ----
+ You can sign it on the following page:
? ++++++++
+ {% endblock %}<br>
- {agreement_link}
+ {agreement_link}
? ++++
+ {% endblock %}
{% if session %}
<br><br>
Best regards<br>
{{ session.user.getName() }}
{% endif %}
{%- endblock %}
{% block footer_title %}Agreements{% endblock %}
{% block footer %}
{# Show default footer if sent from command line #}
{% if not session.user %}
{{ super() }}
{% endif %}
{% endblock %} | 12 | 0.444444 | 8 | 4 |
393accc066fe38e73a215577b05955845ec871e4 | src/Faker/Provider/pl_PL/PhoneNumber.php | src/Faker/Provider/pl_PL/PhoneNumber.php | <?php
namespace Faker\Provider\pl_PL;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
protected static $formats = array(
'+## ### ### ####',
'### ### ###',
'#########',
'(##) ### ## ##',
'+##(##)#######',
);
}
| <?php
namespace Faker\Provider\pl_PL;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
protected static $formats = array(
'+48 ## ### ## ##',
'0048 ## ### ## ##',
'### ### ###',
'+48 ### ### ###',
'0048 ### ### ###',
'#########',
'(##) ### ## ##',
'+48(##)#######',
'0048(##)#######',
);
}
| Add more PL phone number | Add more PL phone number | PHP | mit | kevinrodbe/Faker,localheinz/Faker,lasselehtinen/Faker,datagit/Faker,jeffaustin81/Faker,guillaumewf3/Faker,shunsuke-takahashi/Faker,BePsvPT/Faker,simonfork/Faker,luisbrito/Faker,oswaldderiemaecker/Faker,selmonal/Faker,huang53798584/Faker,mousavian/Faker,bmitch/Faker,syj610226/Faker,cenxun/Faker,Balamir/Faker,pathirana/Faker,antonsofyan/Faker,davidyell/Faker,ivyhjk/Faker,zeropool/Faker,kkiernan/Faker,drakakisgeo/Faker,ravage84/Faker,igorsantos07/Faker,xfxf/Faker-PHP,xfxf/Faker,brainrepo/Faker,oshancsedu/Faker,duchaiweb/Faker-1,nalekberov/Faker,cjaoude/Faker,jadb/Faker,kuldipem/Faker,Beanhunter/Faker,matriphe/Faker,chrismoulton/Faker,mseshachalam/Faker,stof/Faker,alexlondon07/Faker,splp/Faker,nikmauro/Faker,d3trax/Faker,CodeYellowBV/Faker,muya/Faker,vlakoff/Faker,dongnhut/Faker | php | ## Code Before:
<?php
namespace Faker\Provider\pl_PL;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
protected static $formats = array(
'+## ### ### ####',
'### ### ###',
'#########',
'(##) ### ## ##',
'+##(##)#######',
);
}
## Instruction:
Add more PL phone number
## Code After:
<?php
namespace Faker\Provider\pl_PL;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
protected static $formats = array(
'+48 ## ### ## ##',
'0048 ## ### ## ##',
'### ### ###',
'+48 ### ### ###',
'0048 ### ### ###',
'#########',
'(##) ### ## ##',
'+48(##)#######',
'0048(##)#######',
);
}
| <?php
namespace Faker\Provider\pl_PL;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
protected static $formats = array(
- '+## ### ### ####',
? - --
+ '+48 ## ### ## ##',
? +++
+ '0048 ## ### ## ##',
'### ### ###',
+ '+48 ### ### ###',
+ '0048 ### ### ###',
'#########',
'(##) ### ## ##',
- '+##(##)#######',
? ^^
+ '+48(##)#######',
? ^^
+ '0048(##)#######',
);
} | 8 | 0.571429 | 6 | 2 |
84007afe23e361042040fde28ab0a12336decf58 | test/parseJavascript.js | test/parseJavascript.js | const matchSourceExpression = require('../lib/matchSourceExpression');
const expect = require('./unexpected-with-plugins');
const parse = require('../lib/parseJavascript');
describe('parseJavascript', () => {
it('should parse jsx', () => {
expect(parse('<main>Hello world</main>'), 'to satisfy', {
type: 'Program',
tokens: [
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
},
{
type: {
label: 'jsxText'
},
value: 'Hello world'
},
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: '/'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
}
]
});
});
});
| const matchSourceExpression = require('../lib/matchSourceExpression');
const expect = require('./unexpected-with-plugins');
const parse = require('../lib/parseJavascript');
describe('parseJavascript', () => {
it('should parse jsx', () => {
expect(parse('<main>Hello world</main>'), 'to satisfy', {
type: 'Program',
tokens: [
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
},
{
type: {
label: 'jsxText'
},
value: 'Hello world'
},
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: '/'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
}
]
});
});
it('should parse dynamic imports', () => {
expect(parse('const foo = import("./foo.js")', { sourceType: 'module' }), 'to satisfy', {
type: 'Program'
});
})
});
| Add failing test for dynamic imports | Add failing test for dynamic imports
| JavaScript | bsd-3-clause | assetgraph/assetgraph | javascript | ## Code Before:
const matchSourceExpression = require('../lib/matchSourceExpression');
const expect = require('./unexpected-with-plugins');
const parse = require('../lib/parseJavascript');
describe('parseJavascript', () => {
it('should parse jsx', () => {
expect(parse('<main>Hello world</main>'), 'to satisfy', {
type: 'Program',
tokens: [
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
},
{
type: {
label: 'jsxText'
},
value: 'Hello world'
},
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: '/'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
}
]
});
});
});
## Instruction:
Add failing test for dynamic imports
## Code After:
const matchSourceExpression = require('../lib/matchSourceExpression');
const expect = require('./unexpected-with-plugins');
const parse = require('../lib/parseJavascript');
describe('parseJavascript', () => {
it('should parse jsx', () => {
expect(parse('<main>Hello world</main>'), 'to satisfy', {
type: 'Program',
tokens: [
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
},
{
type: {
label: 'jsxText'
},
value: 'Hello world'
},
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: '/'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
}
]
});
});
it('should parse dynamic imports', () => {
expect(parse('const foo = import("./foo.js")', { sourceType: 'module' }), 'to satisfy', {
type: 'Program'
});
})
});
| const matchSourceExpression = require('../lib/matchSourceExpression');
const expect = require('./unexpected-with-plugins');
const parse = require('../lib/parseJavascript');
describe('parseJavascript', () => {
it('should parse jsx', () => {
expect(parse('<main>Hello world</main>'), 'to satisfy', {
type: 'Program',
tokens: [
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
},
{
type: {
label: 'jsxText'
},
value: 'Hello world'
},
{
type: {
label: 'jsxTagStart'
}
},
{
type: {
label: '/'
}
},
{
type: {
label: 'jsxName'
},
value: 'main'
},
{
type: {
label: 'jsxTagEnd'
}
}
]
});
});
+
+ it('should parse dynamic imports', () => {
+ expect(parse('const foo = import("./foo.js")', { sourceType: 'module' }), 'to satisfy', {
+ type: 'Program'
+ });
+ })
}); | 6 | 0.105263 | 6 | 0 |
1040e17e006fef93d990a6212e8be06e0a818c2f | middleware/python/test_middleware.py | middleware/python/test_middleware.py | from tyk.decorators import *
@Pre
def AddSomeHeader(request, session):
# request['Body'] = 'tyk=python'
request['SetHeaders']['SomeHeader'] = 'python2'
return request, session
def NotARealHandler():
pass
| from tyk.decorators import *
from tyk.gateway import TykGateway as tyk
@Pre
def AddSomeHeader(request, session):
request['SetHeaders']['SomeHeader'] = 'python'
tyk.store_data( "cool_key", "cool_value", 300 )
return request, session
def NotARealHandler():
pass
| Update middleware syntax with "TykGateway" | Update middleware syntax with "TykGateway"
| Python | mpl-2.0 | mvdan/tyk,nebolsin/tyk,nebolsin/tyk,lonelycode/tyk,mvdan/tyk,mvdan/tyk,lonelycode/tyk,mvdan/tyk,nebolsin/tyk,lonelycode/tyk,mvdan/tyk,mvdan/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk | python | ## Code Before:
from tyk.decorators import *
@Pre
def AddSomeHeader(request, session):
# request['Body'] = 'tyk=python'
request['SetHeaders']['SomeHeader'] = 'python2'
return request, session
def NotARealHandler():
pass
## Instruction:
Update middleware syntax with "TykGateway"
## Code After:
from tyk.decorators import *
from tyk.gateway import TykGateway as tyk
@Pre
def AddSomeHeader(request, session):
request['SetHeaders']['SomeHeader'] = 'python'
tyk.store_data( "cool_key", "cool_value", 300 )
return request, session
def NotARealHandler():
pass
| from tyk.decorators import *
+ from tyk.gateway import TykGateway as tyk
@Pre
def AddSomeHeader(request, session):
- # request['Body'] = 'tyk=python'
- request['SetHeaders']['SomeHeader'] = 'python2'
? -
+ request['SetHeaders']['SomeHeader'] = 'python'
+ tyk.store_data( "cool_key", "cool_value", 300 )
return request, session
def NotARealHandler():
pass | 5 | 0.5 | 3 | 2 |
4c5d87983d12c3eb55de690beef441f03d2a51b8 | views/atom_feed.erb | views/atom_feed.erb | <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Indy Eleven Matches</title>
<id>http://www.indyeleven.com/matches/results</id>
<updated><%= updated %></updated>
<% entries.each do |entry| %>
<entry>
<title><%= entry[:title] %></title>
<id><%= entry[:id] %></id>
<link href="<%= entry[:id] %>" />
<updated><%= entry[:updated] %></updated>
<summary><%= entry[:summary] %></summary>
<author>
<name><%= entry[:author] %></name>
</author>
<content type="text">
<%= entry[:content] %>
</content>
</entry>
<% end %>
</feed>
| <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Indy Eleven Matches</title>
<id>http://www.indyeleven.com/matches/results</id>
<link href="http://indyelevenfeed.jasonbutz.info/"/>
<updated><%= updated %></updated>
<% entries.each do |entry| %>
<entry>
<title><%= entry[:title] %></title>
<id><%= entry[:id] %></id>
<link href="<%= entry[:id] %>" />
<updated><%= entry[:updated] %></updated>
<summary><%= entry[:summary] %></summary>
<author>
<name><%= entry[:author] %></name>
</author>
<content type="text">
<%= entry[:content] %>
</content>
</entry>
<% end %>
</feed>
| Add link to main feed | Add link to main feed
| HTML+ERB | mit | jbutz/indyelevenfeed | html+erb | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Indy Eleven Matches</title>
<id>http://www.indyeleven.com/matches/results</id>
<updated><%= updated %></updated>
<% entries.each do |entry| %>
<entry>
<title><%= entry[:title] %></title>
<id><%= entry[:id] %></id>
<link href="<%= entry[:id] %>" />
<updated><%= entry[:updated] %></updated>
<summary><%= entry[:summary] %></summary>
<author>
<name><%= entry[:author] %></name>
</author>
<content type="text">
<%= entry[:content] %>
</content>
</entry>
<% end %>
</feed>
## Instruction:
Add link to main feed
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Indy Eleven Matches</title>
<id>http://www.indyeleven.com/matches/results</id>
<link href="http://indyelevenfeed.jasonbutz.info/"/>
<updated><%= updated %></updated>
<% entries.each do |entry| %>
<entry>
<title><%= entry[:title] %></title>
<id><%= entry[:id] %></id>
<link href="<%= entry[:id] %>" />
<updated><%= entry[:updated] %></updated>
<summary><%= entry[:summary] %></summary>
<author>
<name><%= entry[:author] %></name>
</author>
<content type="text">
<%= entry[:content] %>
</content>
</entry>
<% end %>
</feed>
| <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Indy Eleven Matches</title>
<id>http://www.indyeleven.com/matches/results</id>
+ <link href="http://indyelevenfeed.jasonbutz.info/"/>
<updated><%= updated %></updated>
<% entries.each do |entry| %>
<entry>
<title><%= entry[:title] %></title>
<id><%= entry[:id] %></id>
<link href="<%= entry[:id] %>" />
<updated><%= entry[:updated] %></updated>
<summary><%= entry[:summary] %></summary>
<author>
<name><%= entry[:author] %></name>
</author>
<content type="text">
<%= entry[:content] %>
</content>
</entry>
<% end %>
</feed> | 1 | 0.047619 | 1 | 0 |
c3cef4730657def74900c49166100aea0ece4c54 | setup.cfg | setup.cfg | [bumpversion]
current_version = 0.8.0
commit = True
tag = True
[tool:pytest]
testpaths = python
[bumpversion:file:setup.py]
[bumpversion:file:conda-recipe/meta.yaml]
| [bumpversion]
current_version = 0.8.0
commit = True
tag = True
tag_name = {version}
[bumpversion:file:setup.py]
[bumpversion:file:conda-recipe/meta.yaml]
[tool:pytest]
testpaths = python
| Set tag name to GitHub-style. | Set tag name to GitHub-style.
| INI | apache-2.0 | alexhsamuel/fixfmt,alexhsamuel/fixfmt | ini | ## Code Before:
[bumpversion]
current_version = 0.8.0
commit = True
tag = True
[tool:pytest]
testpaths = python
[bumpversion:file:setup.py]
[bumpversion:file:conda-recipe/meta.yaml]
## Instruction:
Set tag name to GitHub-style.
## Code After:
[bumpversion]
current_version = 0.8.0
commit = True
tag = True
tag_name = {version}
[bumpversion:file:setup.py]
[bumpversion:file:conda-recipe/meta.yaml]
[tool:pytest]
testpaths = python
| [bumpversion]
current_version = 0.8.0
commit = True
tag = True
+ tag_name = {version}
-
- [tool:pytest]
- testpaths = python
[bumpversion:file:setup.py]
[bumpversion:file:conda-recipe/meta.yaml]
+ [tool:pytest]
+ testpaths = python
+ | 7 | 0.583333 | 4 | 3 |
388eb652826fe09a63dadcb543aa7147f0feaeef | config/webpack.prod.js | config/webpack.prod.js | const merge = require("webpack-merge");
const PostCompile = require("post-compile-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const Version = require("node-version-assets");
const common = require("./webpack.common.js");
const postCSSPlugins = [
require("postcss-easy-import")({ prefix: "_" }),
require("postcss-mixins"),
require("postcss-simple-vars"),
require("postcss-nested"),
require("postcss-color-function"),
require("postcss-hexrgba"),
require("autoprefixer"),
require("cssnano")
];
module.exports = env => {
const opt = env || {};
return merge(common, {
mode: "production",
plugins: opt.deploy && [
new PostCompile(() => {
new Version({
assets: [
"./src/_compiled/main.css",
"./src/_compiled/main.js",
"./src/_compiled/vendors~main.js",
"./src/_compiled/runtime~main.js"
],
grepFiles: ["./src/index.html"]
}).run();
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
url: false
}
},
{
loader: "postcss-loader",
options: {
plugins: postCSSPlugins
}
}
]
}
]
}
});
};
| const merge = require("webpack-merge");
const PostCompile = require("post-compile-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const Version = require("node-version-assets");
const postCSSPlugins = [
require("postcss-easy-import")({ prefix: "_" }),
require("postcss-mixins"),
require("postcss-simple-vars"),
require("postcss-nested"),
require("postcss-color-function"),
require("postcss-hexrgba"),
require("autoprefixer"),
require("cssnano")
];
const common = require("./webpack.common.js");
module.exports = env => {
const opt = env || {};
return merge(common, {
mode: "production",
plugins: opt.deploy && [
new PostCompile(() => {
new Version({
assets: [
"./src/_compiled/main.css",
"./src/_compiled/main.js",
"./src/_compiled/vendors~main.js",
"./src/_compiled/runtime~main.js"
],
grepFiles: ["./src/index.html"]
}).run();
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
url: false
}
},
{
loader: "postcss-loader",
options: {
plugins: postCSSPlugins
}
}
]
}
]
}
});
};
| Correct linting error with order of requires | Correct linting error with order of requires
| JavaScript | mit | trendyminds/pura,trendyminds/pura | javascript | ## Code Before:
const merge = require("webpack-merge");
const PostCompile = require("post-compile-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const Version = require("node-version-assets");
const common = require("./webpack.common.js");
const postCSSPlugins = [
require("postcss-easy-import")({ prefix: "_" }),
require("postcss-mixins"),
require("postcss-simple-vars"),
require("postcss-nested"),
require("postcss-color-function"),
require("postcss-hexrgba"),
require("autoprefixer"),
require("cssnano")
];
module.exports = env => {
const opt = env || {};
return merge(common, {
mode: "production",
plugins: opt.deploy && [
new PostCompile(() => {
new Version({
assets: [
"./src/_compiled/main.css",
"./src/_compiled/main.js",
"./src/_compiled/vendors~main.js",
"./src/_compiled/runtime~main.js"
],
grepFiles: ["./src/index.html"]
}).run();
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
url: false
}
},
{
loader: "postcss-loader",
options: {
plugins: postCSSPlugins
}
}
]
}
]
}
});
};
## Instruction:
Correct linting error with order of requires
## Code After:
const merge = require("webpack-merge");
const PostCompile = require("post-compile-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const Version = require("node-version-assets");
const postCSSPlugins = [
require("postcss-easy-import")({ prefix: "_" }),
require("postcss-mixins"),
require("postcss-simple-vars"),
require("postcss-nested"),
require("postcss-color-function"),
require("postcss-hexrgba"),
require("autoprefixer"),
require("cssnano")
];
const common = require("./webpack.common.js");
module.exports = env => {
const opt = env || {};
return merge(common, {
mode: "production",
plugins: opt.deploy && [
new PostCompile(() => {
new Version({
assets: [
"./src/_compiled/main.css",
"./src/_compiled/main.js",
"./src/_compiled/vendors~main.js",
"./src/_compiled/runtime~main.js"
],
grepFiles: ["./src/index.html"]
}).run();
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
url: false
}
},
{
loader: "postcss-loader",
options: {
plugins: postCSSPlugins
}
}
]
}
]
}
});
};
| const merge = require("webpack-merge");
const PostCompile = require("post-compile-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const Version = require("node-version-assets");
- const common = require("./webpack.common.js");
const postCSSPlugins = [
require("postcss-easy-import")({ prefix: "_" }),
require("postcss-mixins"),
require("postcss-simple-vars"),
require("postcss-nested"),
require("postcss-color-function"),
require("postcss-hexrgba"),
require("autoprefixer"),
require("cssnano")
];
+
+ const common = require("./webpack.common.js");
module.exports = env => {
const opt = env || {};
return merge(common, {
mode: "production",
plugins: opt.deploy && [
new PostCompile(() => {
new Version({
assets: [
"./src/_compiled/main.css",
"./src/_compiled/main.js",
"./src/_compiled/vendors~main.js",
"./src/_compiled/runtime~main.js"
],
grepFiles: ["./src/index.html"]
}).run();
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
url: false
}
},
{
loader: "postcss-loader",
options: {
plugins: postCSSPlugins
}
}
]
}
]
}
});
}; | 3 | 0.050847 | 2 | 1 |
ff7bd17fac5efd1b80d6b36bcbceba9f71b4f154 | src/index.js | src/index.js | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function() {
var include = function(path) {
document.write('<script src="' + path + '"></script>');
};
include("/chrome/tracing/overlay.js");
include("/chrome/tracing/timeline_model.js");
include("/chrome/tracing/sorted_array_utils.js");
include("/chrome/tracing/timeline.js");
include("/chrome/tracing/timeline_track.js");
include("/chrome/tracing/fast_rect_renderer.js");
include("/chrome/tracing/timeline_view.js");
var timelineView;
function onDOMContentLoaded() {
timelineView = $('timeline-view');
cr.ui.decorate(timelineView, tracing.TimelineView);
chrome.send('ready');
}
function loadTrace(trace) {
if (timelineView == undefined)
throw Error('timelineview is null');
// some old traces were just arrays without an outer object
if (!trace.traceEvents) {
if (trace instanceof Array)
timelineView.traceEvents = trace;
else
throw Error('trace does not have an events array');
} else {
timelineView.traceEvents = trace.traceEvents;
}
return true;
}
window.loadTrace = loadTrace;
document.addEventListener('DOMContentLoaded', onDOMContentLoaded);
})();
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var g_timelineView;
(function() {
var include = function(path) {
document.write('<script src="' + path + '"></script>');
};
include("/chrome/tracing/overlay.js");
include("/chrome/tracing/timeline_model.js");
include("/chrome/tracing/sorted_array_utils.js");
include("/chrome/tracing/timeline.js");
include("/chrome/tracing/timeline_track.js");
include("/chrome/tracing/fast_rect_renderer.js");
include("/chrome/tracing/timeline_view.js");
var timelineView;
function onDOMContentLoaded() {
timelineView = $('timeline-view');
g_timelineView = timelineView;
cr.ui.decorate(timelineView, tracing.TimelineView);
chrome.send('ready');
}
function loadTrace(trace) {
if (timelineView == undefined)
throw Error('timelineview is null');
// some old traces were just arrays without an outer object
if (!trace.traceEvents) {
if (trace instanceof Array)
timelineView.traceEvents = trace;
else
throw Error('trace does not have an events array');
} else {
timelineView.traceEvents = trace.traceEvents;
}
return true;
}
window.loadTrace = loadTrace;
document.addEventListener('DOMContentLoaded', onDOMContentLoaded);
})();
| Make timeline view a global for debugging. | Make timeline view a global for debugging.
| JavaScript | apache-2.0 | natduca/trace_event_viewer,natduca/trace_event_viewer,natduca/trace_event_viewer | javascript | ## Code Before:
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function() {
var include = function(path) {
document.write('<script src="' + path + '"></script>');
};
include("/chrome/tracing/overlay.js");
include("/chrome/tracing/timeline_model.js");
include("/chrome/tracing/sorted_array_utils.js");
include("/chrome/tracing/timeline.js");
include("/chrome/tracing/timeline_track.js");
include("/chrome/tracing/fast_rect_renderer.js");
include("/chrome/tracing/timeline_view.js");
var timelineView;
function onDOMContentLoaded() {
timelineView = $('timeline-view');
cr.ui.decorate(timelineView, tracing.TimelineView);
chrome.send('ready');
}
function loadTrace(trace) {
if (timelineView == undefined)
throw Error('timelineview is null');
// some old traces were just arrays without an outer object
if (!trace.traceEvents) {
if (trace instanceof Array)
timelineView.traceEvents = trace;
else
throw Error('trace does not have an events array');
} else {
timelineView.traceEvents = trace.traceEvents;
}
return true;
}
window.loadTrace = loadTrace;
document.addEventListener('DOMContentLoaded', onDOMContentLoaded);
})();
## Instruction:
Make timeline view a global for debugging.
## Code After:
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var g_timelineView;
(function() {
var include = function(path) {
document.write('<script src="' + path + '"></script>');
};
include("/chrome/tracing/overlay.js");
include("/chrome/tracing/timeline_model.js");
include("/chrome/tracing/sorted_array_utils.js");
include("/chrome/tracing/timeline.js");
include("/chrome/tracing/timeline_track.js");
include("/chrome/tracing/fast_rect_renderer.js");
include("/chrome/tracing/timeline_view.js");
var timelineView;
function onDOMContentLoaded() {
timelineView = $('timeline-view');
g_timelineView = timelineView;
cr.ui.decorate(timelineView, tracing.TimelineView);
chrome.send('ready');
}
function loadTrace(trace) {
if (timelineView == undefined)
throw Error('timelineview is null');
// some old traces were just arrays without an outer object
if (!trace.traceEvents) {
if (trace instanceof Array)
timelineView.traceEvents = trace;
else
throw Error('trace does not have an events array');
} else {
timelineView.traceEvents = trace.traceEvents;
}
return true;
}
window.loadTrace = loadTrace;
document.addEventListener('DOMContentLoaded', onDOMContentLoaded);
})();
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+ var g_timelineView;
(function() {
var include = function(path) {
document.write('<script src="' + path + '"></script>');
};
include("/chrome/tracing/overlay.js");
include("/chrome/tracing/timeline_model.js");
include("/chrome/tracing/sorted_array_utils.js");
include("/chrome/tracing/timeline.js");
include("/chrome/tracing/timeline_track.js");
include("/chrome/tracing/fast_rect_renderer.js");
include("/chrome/tracing/timeline_view.js");
var timelineView;
function onDOMContentLoaded() {
timelineView = $('timeline-view');
+ g_timelineView = timelineView;
cr.ui.decorate(timelineView, tracing.TimelineView);
chrome.send('ready');
}
function loadTrace(trace) {
if (timelineView == undefined)
throw Error('timelineview is null');
// some old traces were just arrays without an outer object
if (!trace.traceEvents) {
if (trace instanceof Array)
timelineView.traceEvents = trace;
else
throw Error('trace does not have an events array');
} else {
timelineView.traceEvents = trace.traceEvents;
}
return true;
}
window.loadTrace = loadTrace;
document.addEventListener('DOMContentLoaded', onDOMContentLoaded);
})(); | 2 | 0.047619 | 2 | 0 |
fe6edd8a73a5be7607e242947f97f6e8b6ca2d21 | Assets/_scss/objects/_chromeframe.scss | Assets/_scss/objects/_chromeframe.scss | // ==========================================================
/* § /objects/chromeframe.scss */
//
// Basic styling for Google's chromeframe
// DOCS: https://developers.google.com/chrome/chrome-frame/
// ==========================================================
/* =============================================================================
$ Chromeframe
================================================================================ */
/*<p>*/.chromeframe {
display: block;
height: 3.5em;
border-bottom: 1px $basicBorderStyle #e7db9c;
background: #faf6e8;
font-size: 12px;
line-height: 3.5em;
text-align: center;
color: darken(#faf6e8, 60%);
@extend %non-print; // Will be hidden on print
a { border-bottom: 1px dotted; }
}
| // ==========================================================
/* § /objects/chromeframe.scss */
//
// Basic styling for Google's chromeframe
// DOCS: https://developers.google.com/chrome/chrome-frame/
// ==========================================================
// =============================================================================
// Variables
// =============================================================================
$chromeframeHeight: 3.5em;
$chromeframeFontSize: 12px;
$chromeframeBackground: #faf6e8;
/* =============================================================================
$ Chromeframe
================================================================================ */
/*<p>*/.chromeframe {
display: block;
height: $chromeframeHeight;
border-bottom: 1px $basicBorderStyle #e7db9c;
background: $chromeframeBackground;
font-size: chromeframeFontSize;
line-height: $chromeframeHeight;
text-align: center;
color: darken($chromeframeBackground, 60%);
@extend %non-print; // Will be hidden on print
a { border-bottom: 1px dotted; }
}
| Add variable-driven styling to the ChromeFrame object | Add variable-driven styling to the ChromeFrame object
| SCSS | mit | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template | scss | ## Code Before:
// ==========================================================
/* § /objects/chromeframe.scss */
//
// Basic styling for Google's chromeframe
// DOCS: https://developers.google.com/chrome/chrome-frame/
// ==========================================================
/* =============================================================================
$ Chromeframe
================================================================================ */
/*<p>*/.chromeframe {
display: block;
height: 3.5em;
border-bottom: 1px $basicBorderStyle #e7db9c;
background: #faf6e8;
font-size: 12px;
line-height: 3.5em;
text-align: center;
color: darken(#faf6e8, 60%);
@extend %non-print; // Will be hidden on print
a { border-bottom: 1px dotted; }
}
## Instruction:
Add variable-driven styling to the ChromeFrame object
## Code After:
// ==========================================================
/* § /objects/chromeframe.scss */
//
// Basic styling for Google's chromeframe
// DOCS: https://developers.google.com/chrome/chrome-frame/
// ==========================================================
// =============================================================================
// Variables
// =============================================================================
$chromeframeHeight: 3.5em;
$chromeframeFontSize: 12px;
$chromeframeBackground: #faf6e8;
/* =============================================================================
$ Chromeframe
================================================================================ */
/*<p>*/.chromeframe {
display: block;
height: $chromeframeHeight;
border-bottom: 1px $basicBorderStyle #e7db9c;
background: $chromeframeBackground;
font-size: chromeframeFontSize;
line-height: $chromeframeHeight;
text-align: center;
color: darken($chromeframeBackground, 60%);
@extend %non-print; // Will be hidden on print
a { border-bottom: 1px dotted; }
}
| // ==========================================================
/* § /objects/chromeframe.scss */
//
// Basic styling for Google's chromeframe
// DOCS: https://developers.google.com/chrome/chrome-frame/
// ==========================================================
+ // =============================================================================
+ // Variables
+ // =============================================================================
+ $chromeframeHeight: 3.5em;
+ $chromeframeFontSize: 12px;
+ $chromeframeBackground: #faf6e8;
+
+
/* =============================================================================
$ Chromeframe
================================================================================ */
/*<p>*/.chromeframe {
display: block;
- height: 3.5em;
+ height: $chromeframeHeight;
border-bottom: 1px $basicBorderStyle #e7db9c;
- background: #faf6e8;
+ background: $chromeframeBackground;
- font-size: 12px;
- line-height: 3.5em;
+ font-size: chromeframeFontSize;
+ line-height: $chromeframeHeight;
text-align: center;
- color: darken(#faf6e8, 60%);
+ color: darken($chromeframeBackground, 60%);
@extend %non-print; // Will be hidden on print
a { border-bottom: 1px dotted; }
} | 18 | 0.72 | 13 | 5 |
8e89ed55b67e91c2c5f11cacee3ea94c0ad73e65 | README.rst | README.rst | **This plugin is obsolete. ``setuptools_scm >= 7.0.0`` supports Git archives by itself.**
Migration guide
---------------
Change the contents of the ``.git_archival.txt`` file in the root directory of your repository from::
ref-names: $Format:%D$
to::
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe)$
ref-names: $Format:%D$
Remove ``setuptools_scm_git_archive`` from your project's dependencies (e.g. the
``setup_requires`` list in your ``setup.py`` file).
| **This plugin is obsolete. ``setuptools_scm >= 7.0.0`` supports Git archives by itself.**
Migration guide
---------------
Change the contents of the ``.git_archival.txt`` file in the root directory of your repository from::
ref-names: $Format:%D$
to::
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true)$
ref-names: $Format:%D$
Remove ``setuptools_scm_git_archive`` from your project's dependencies (e.g. the
``setup_requires`` list in your ``setup.py`` file).
| Include unannotated tags in migration guide | Include unannotated tags in migration guide
adding the tags option to the describe substitution better mimics the `setuptools_scm_git_archive` behavior when a repo uses unannotated tags | reStructuredText | mit | Changaco/setuptools_scm_git_archive | restructuredtext | ## Code Before:
**This plugin is obsolete. ``setuptools_scm >= 7.0.0`` supports Git archives by itself.**
Migration guide
---------------
Change the contents of the ``.git_archival.txt`` file in the root directory of your repository from::
ref-names: $Format:%D$
to::
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe)$
ref-names: $Format:%D$
Remove ``setuptools_scm_git_archive`` from your project's dependencies (e.g. the
``setup_requires`` list in your ``setup.py`` file).
## Instruction:
Include unannotated tags in migration guide
adding the tags option to the describe substitution better mimics the `setuptools_scm_git_archive` behavior when a repo uses unannotated tags
## Code After:
**This plugin is obsolete. ``setuptools_scm >= 7.0.0`` supports Git archives by itself.**
Migration guide
---------------
Change the contents of the ``.git_archival.txt`` file in the root directory of your repository from::
ref-names: $Format:%D$
to::
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true)$
ref-names: $Format:%D$
Remove ``setuptools_scm_git_archive`` from your project's dependencies (e.g. the
``setup_requires`` list in your ``setup.py`` file).
| **This plugin is obsolete. ``setuptools_scm >= 7.0.0`` supports Git archives by itself.**
Migration guide
---------------
Change the contents of the ``.git_archival.txt`` file in the root directory of your repository from::
ref-names: $Format:%D$
to::
node: $Format:%H$
node-date: $Format:%cI$
- describe-name: $Format:%(describe)$
+ describe-name: $Format:%(describe:tags=true)$
? ++++++++++
ref-names: $Format:%D$
Remove ``setuptools_scm_git_archive`` from your project's dependencies (e.g. the
``setup_requires`` list in your ``setup.py`` file). | 2 | 0.111111 | 1 | 1 |
1bf81b51ad340d9b29c7d8f0593f2b911598fad3 | install.sh | install.sh |
function bootstrap {
mkdir -p ~/.vim/{backups,swaps,undo}
echo '" This is where your personal configuration goes.
" Whatever you write in here will override the default.
' > ~/.vim/config.vim
cd ~/.vim/
git clone https://github.com/umayr/vimrc.git runtime
}
function extended {
cd ~/.vim/runtime
echo 'set runtimepath+=~/.vim/runtime
source ~/.vim/runtime/config/basic.vim
source ~/.vim/runtime/config/filetypes.vim
source ~/.vim/runtime/config/plugins_config.vim
source ~/.vim/runtime/config/extended.vim
try
source ~/.vim/runtime/config.vim
catch
endtry' > ~/.vimrc
echo "Extended Vim configurations has been installed."
exit 0;
}
function basic {
cd ~/.vim/runtime
cat ~/.vim/runtime/config/basic.vim > ~/.vimrc
echo "Basic Vim configurations has been installed."
exit 0;
}
bootstrap; [[ $* == *--extended* ]] && extended; basic; |
function bootstrap {
mkdir -p ~/.vim/{backups,swaps,undo}
echo '" This is where your personal configuration goes.
" Whatever you write in here will override the default.
' > ~/.vim/config.vim
cd ~/.vim/
git clone --recursive https://github.com/umayr/vimrc.git runtime
}
function extended {
cd ~/.vim/runtime
echo 'set runtimepath+=~/.vim/runtime
source ~/.vim/runtime/config/basic.vim
source ~/.vim/runtime/config/filetypes.vim
source ~/.vim/runtime/config/plugins_config.vim
source ~/.vim/runtime/config/extended.vim
try
source ~/.vim/runtime/config.vim
catch
endtry' > ~/.vimrc
echo "Extended Vim configurations has been installed."
exit 0;
}
function basic {
cd ~/.vim/runtime
cat ~/.vim/runtime/config/basic.vim > ~/.vimrc
echo "Basic Vim configurations has been installed."
exit 0;
}
bootstrap; [[ $* == *--extended* ]] && extended; basic;
| Add --recursive flag to clone repo with sub-modules | Add --recursive flag to clone repo with sub-modules | Shell | mit | umayr/vimrc | shell | ## Code Before:
function bootstrap {
mkdir -p ~/.vim/{backups,swaps,undo}
echo '" This is where your personal configuration goes.
" Whatever you write in here will override the default.
' > ~/.vim/config.vim
cd ~/.vim/
git clone https://github.com/umayr/vimrc.git runtime
}
function extended {
cd ~/.vim/runtime
echo 'set runtimepath+=~/.vim/runtime
source ~/.vim/runtime/config/basic.vim
source ~/.vim/runtime/config/filetypes.vim
source ~/.vim/runtime/config/plugins_config.vim
source ~/.vim/runtime/config/extended.vim
try
source ~/.vim/runtime/config.vim
catch
endtry' > ~/.vimrc
echo "Extended Vim configurations has been installed."
exit 0;
}
function basic {
cd ~/.vim/runtime
cat ~/.vim/runtime/config/basic.vim > ~/.vimrc
echo "Basic Vim configurations has been installed."
exit 0;
}
bootstrap; [[ $* == *--extended* ]] && extended; basic;
## Instruction:
Add --recursive flag to clone repo with sub-modules
## Code After:
function bootstrap {
mkdir -p ~/.vim/{backups,swaps,undo}
echo '" This is where your personal configuration goes.
" Whatever you write in here will override the default.
' > ~/.vim/config.vim
cd ~/.vim/
git clone --recursive https://github.com/umayr/vimrc.git runtime
}
function extended {
cd ~/.vim/runtime
echo 'set runtimepath+=~/.vim/runtime
source ~/.vim/runtime/config/basic.vim
source ~/.vim/runtime/config/filetypes.vim
source ~/.vim/runtime/config/plugins_config.vim
source ~/.vim/runtime/config/extended.vim
try
source ~/.vim/runtime/config.vim
catch
endtry' > ~/.vimrc
echo "Extended Vim configurations has been installed."
exit 0;
}
function basic {
cd ~/.vim/runtime
cat ~/.vim/runtime/config/basic.vim > ~/.vimrc
echo "Basic Vim configurations has been installed."
exit 0;
}
bootstrap; [[ $* == *--extended* ]] && extended; basic;
|
function bootstrap {
mkdir -p ~/.vim/{backups,swaps,undo}
echo '" This is where your personal configuration goes.
" Whatever you write in here will override the default.
' > ~/.vim/config.vim
cd ~/.vim/
- git clone https://github.com/umayr/vimrc.git runtime
+ git clone --recursive https://github.com/umayr/vimrc.git runtime
? ++++++++++++
}
function extended {
cd ~/.vim/runtime
echo 'set runtimepath+=~/.vim/runtime
source ~/.vim/runtime/config/basic.vim
source ~/.vim/runtime/config/filetypes.vim
source ~/.vim/runtime/config/plugins_config.vim
source ~/.vim/runtime/config/extended.vim
try
source ~/.vim/runtime/config.vim
catch
endtry' > ~/.vimrc
echo "Extended Vim configurations has been installed."
exit 0;
}
function basic {
cd ~/.vim/runtime
cat ~/.vim/runtime/config/basic.vim > ~/.vimrc
echo "Basic Vim configurations has been installed."
exit 0;
}
bootstrap; [[ $* == *--extended* ]] && extended; basic; | 2 | 0.04878 | 1 | 1 |
24b0119c70653de7fe042cbd2e5877a0767f5235 | app/models/user.rb | app/models/user.rb | class User < ActiveRecord::Base
# https://github.com/EppO/rolify
rolify
# Public: Name of user.
# column :name
validates_presence_of :name
# Public: Email address for user.
# column :email
# Public: OAuth provider name.
# column :provider
# Public: Id of user on OAuth provider.
# column :uid
# Public: Created at date and time.
# column :created_at
# Public: Updated at date and time.
# column :updated_at
# Public: Create user with params from omniauth.
#
# auth - Omniauth::Hash
def self.create_with_omniauth(auth)
create! do |user|
user.provider = auth['provider']
user.uid = auth['uid']
if auth['info']
user.username = auth['info']['nickname']
user.name = auth['info']['name'] || ""
user.email = auth['info']['email'] || ""
user.token = auth['credentials']['token']
end
end
end
end
| class User < ActiveRecord::Base
# https://github.com/EppO/rolify
rolify
# Public: Name of user.
# column :name
# Public: Email address for user.
# column :email
# Public: OAuth provider name.
# column :provider
# Public: Id of user on OAuth provider.
# column :uid
# Public: Created at date and time.
# column :created_at
# Public: Updated at date and time.
# column :updated_at
# Public: Create user with params from omniauth.
#
# auth - Omniauth::Hash
def self.create_with_omniauth(auth)
create! do |user|
user.provider = auth['provider']
user.uid = auth['uid']
if auth['info']
user.username = auth['info']['nickname']
user.name = auth['info']['name'] || ""
user.email = auth['info']['email'] || ""
user.token = auth['credentials']['token']
end
end
end
end
| Stop validating presence of name. | Stop validating presence of name.
| Ruby | mit | fotoapp/fotoapp,fotoapp/fotoapp | ruby | ## Code Before:
class User < ActiveRecord::Base
# https://github.com/EppO/rolify
rolify
# Public: Name of user.
# column :name
validates_presence_of :name
# Public: Email address for user.
# column :email
# Public: OAuth provider name.
# column :provider
# Public: Id of user on OAuth provider.
# column :uid
# Public: Created at date and time.
# column :created_at
# Public: Updated at date and time.
# column :updated_at
# Public: Create user with params from omniauth.
#
# auth - Omniauth::Hash
def self.create_with_omniauth(auth)
create! do |user|
user.provider = auth['provider']
user.uid = auth['uid']
if auth['info']
user.username = auth['info']['nickname']
user.name = auth['info']['name'] || ""
user.email = auth['info']['email'] || ""
user.token = auth['credentials']['token']
end
end
end
end
## Instruction:
Stop validating presence of name.
## Code After:
class User < ActiveRecord::Base
# https://github.com/EppO/rolify
rolify
# Public: Name of user.
# column :name
# Public: Email address for user.
# column :email
# Public: OAuth provider name.
# column :provider
# Public: Id of user on OAuth provider.
# column :uid
# Public: Created at date and time.
# column :created_at
# Public: Updated at date and time.
# column :updated_at
# Public: Create user with params from omniauth.
#
# auth - Omniauth::Hash
def self.create_with_omniauth(auth)
create! do |user|
user.provider = auth['provider']
user.uid = auth['uid']
if auth['info']
user.username = auth['info']['nickname']
user.name = auth['info']['name'] || ""
user.email = auth['info']['email'] || ""
user.token = auth['credentials']['token']
end
end
end
end
| class User < ActiveRecord::Base
# https://github.com/EppO/rolify
rolify
# Public: Name of user.
# column :name
- validates_presence_of :name
# Public: Email address for user.
# column :email
# Public: OAuth provider name.
# column :provider
# Public: Id of user on OAuth provider.
# column :uid
# Public: Created at date and time.
# column :created_at
# Public: Updated at date and time.
# column :updated_at
# Public: Create user with params from omniauth.
#
# auth - Omniauth::Hash
def self.create_with_omniauth(auth)
create! do |user|
user.provider = auth['provider']
user.uid = auth['uid']
if auth['info']
user.username = auth['info']['nickname']
user.name = auth['info']['name'] || ""
user.email = auth['info']['email'] || ""
user.token = auth['credentials']['token']
end
end
end
end | 1 | 0.025 | 0 | 1 |
5966e76c2f9e4d3bd09475a2e6a981dae3b6b804 | .travis.yml | .travis.yml | language: python
sudo: false
python:
- "pypy"
- "pypy3.3"
- "3.7"
- "3.6"
- "3.5"
install:
- pip install -U pytest
- pip install coverage
- pip install coveralls
- pip install pytest-cov
- python setup.py develop
script:
py.test -v --cov tinydb_serialization
after_success:
coveralls
| language: python
sudo: false
python:
- "pypy3"
- "3.7"
- "3.6"
- "3.5"
install:
- pip install -U pytest
- pip install coverage
- pip install coveralls
- pip install pytest-cov
- python setup.py develop
script:
py.test -v --cov tinydb_serialization
after_success:
coveralls
| Remove PyPy (Python 2) from CI | Remove PyPy (Python 2) from CI
| YAML | mit | msiemens/tinydb-serialization | yaml | ## Code Before:
language: python
sudo: false
python:
- "pypy"
- "pypy3.3"
- "3.7"
- "3.6"
- "3.5"
install:
- pip install -U pytest
- pip install coverage
- pip install coveralls
- pip install pytest-cov
- python setup.py develop
script:
py.test -v --cov tinydb_serialization
after_success:
coveralls
## Instruction:
Remove PyPy (Python 2) from CI
## Code After:
language: python
sudo: false
python:
- "pypy3"
- "3.7"
- "3.6"
- "3.5"
install:
- pip install -U pytest
- pip install coverage
- pip install coveralls
- pip install pytest-cov
- python setup.py develop
script:
py.test -v --cov tinydb_serialization
after_success:
coveralls
| language: python
sudo: false
python:
- - "pypy"
+ - "pypy3"
? +
- - "pypy3.3"
- "3.7"
- "3.6"
- "3.5"
install:
- pip install -U pytest
- pip install coverage
- pip install coveralls
- pip install pytest-cov
- python setup.py develop
script:
py.test -v --cov tinydb_serialization
after_success:
coveralls | 3 | 0.166667 | 1 | 2 |
574f55c8ac5b97fb858dcc706cd795d5649370e6 | README.md | README.md |
With this package, you can open a PHP file from this namespace. The package use the fuzzy-finder package (official package). You can open directly from a namespace after an "use" (link) or you can select in a modal which lists all "use" in the current file.
# How use it ?
Two choices !
* Open the command palette (ctrl-shift-P). Select "Open from namespace: List namespace" in a PHP file. Select the namespace which you want open. Paste (ctrl+v) in the modal opened just after.
* ```alt+click``` on a namespace in a PHP file.
|
With this package, you can open a PHP file from this namespace. The package use the fuzzy-finder package (official package). You can open directly from a namespace after an "use" (link) or you can select in a modal which lists all "use" in the current file.
# How use it ?
Two choices !
* Open the command palette (ctrl-shift-P). Select "Open from namespace: List namespace" in a PHP file. Select the namespace which you want open. Paste (ctrl+v) in the modal opened just after.
* ```alt+click``` on a namespace in a PHP file. Paste (ctrl+v) in the modal opened just after.
| Update missed part for the documentation. | Update missed part for the documentation.
| Markdown | mit | ChristopheBoucaut/atom-open-from-namespace,ChristopheBoucaut/atom-open-from-namespace | markdown | ## Code Before:
With this package, you can open a PHP file from this namespace. The package use the fuzzy-finder package (official package). You can open directly from a namespace after an "use" (link) or you can select in a modal which lists all "use" in the current file.
# How use it ?
Two choices !
* Open the command palette (ctrl-shift-P). Select "Open from namespace: List namespace" in a PHP file. Select the namespace which you want open. Paste (ctrl+v) in the modal opened just after.
* ```alt+click``` on a namespace in a PHP file.
## Instruction:
Update missed part for the documentation.
## Code After:
With this package, you can open a PHP file from this namespace. The package use the fuzzy-finder package (official package). You can open directly from a namespace after an "use" (link) or you can select in a modal which lists all "use" in the current file.
# How use it ?
Two choices !
* Open the command palette (ctrl-shift-P). Select "Open from namespace: List namespace" in a PHP file. Select the namespace which you want open. Paste (ctrl+v) in the modal opened just after.
* ```alt+click``` on a namespace in a PHP file. Paste (ctrl+v) in the modal opened just after.
|
With this package, you can open a PHP file from this namespace. The package use the fuzzy-finder package (official package). You can open directly from a namespace after an "use" (link) or you can select in a modal which lists all "use" in the current file.
# How use it ?
Two choices !
* Open the command palette (ctrl-shift-P). Select "Open from namespace: List namespace" in a PHP file. Select the namespace which you want open. Paste (ctrl+v) in the modal opened just after.
- * ```alt+click``` on a namespace in a PHP file.
+ * ```alt+click``` on a namespace in a PHP file. Paste (ctrl+v) in the modal opened just after. | 2 | 0.222222 | 1 | 1 |
a187b03b51238075ddd21ac1a988b8d934c979ee | src/Cilex/Provider/ConfigServiceProvider.php | src/Cilex/Provider/ConfigServiceProvider.php | <?php
/*
* This file is part of the Cilex framework.
*
* (c) Mike van Riel <mike.vanriel@naenius.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Yaml;
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['config'] = $app->share(function () use ($app) {
$fullpath = explode('.', $app['config.path']);
switch (strtolower(end($fullpath))) {
case 'yml':
$parser = new Yaml\Parser();
$result = new \ArrayObject(
$parser->parse($app['config.path'])
);
break;
case 'xml':
$result = simplexml_load_file($app['config.path']);
break;
default:
throw new \InvalidArgumentException(
'Unable to load configuration; the provided file '
.'extension was not recognized. Only yml or xml allowed'
);
}
return $result;
});
}
} | <?php
/*
* This file is part of the Cilex framework.
*
* (c) Mike van Riel <mike.vanriel@naenius.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Yaml;
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['config'] = $app->share(function () use ($app) {
if (!file_exists($app['config.path'])) {
throw new \InvalidArgumentException(
$app['config.path'] . ' is not a valid path to the '
.'configuration'
);
}
$fullpath = explode('.', $app['config.path']);
switch (strtolower(end($fullpath))) {
case 'yml':
$parser = new Yaml\Parser();
$result = new \ArrayObject(
$parser->parse($app['config.path'])
);
break;
case 'xml':
$result = simplexml_load_file($app['config.path']);
break;
default:
throw new \InvalidArgumentException(
'Unable to load configuration; the provided file '
.'extension was not recognized. Only yml or xml allowed'
);
}
return $result;
});
}
} | Throw exception if the config.path is not valid | Throw exception if the config.path is not valid
| PHP | mit | Seldaek/Cilex,Sgoettschkes/Cilex,Cilex/Cilex | php | ## Code Before:
<?php
/*
* This file is part of the Cilex framework.
*
* (c) Mike van Riel <mike.vanriel@naenius.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Yaml;
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['config'] = $app->share(function () use ($app) {
$fullpath = explode('.', $app['config.path']);
switch (strtolower(end($fullpath))) {
case 'yml':
$parser = new Yaml\Parser();
$result = new \ArrayObject(
$parser->parse($app['config.path'])
);
break;
case 'xml':
$result = simplexml_load_file($app['config.path']);
break;
default:
throw new \InvalidArgumentException(
'Unable to load configuration; the provided file '
.'extension was not recognized. Only yml or xml allowed'
);
}
return $result;
});
}
}
## Instruction:
Throw exception if the config.path is not valid
## Code After:
<?php
/*
* This file is part of the Cilex framework.
*
* (c) Mike van Riel <mike.vanriel@naenius.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Yaml;
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['config'] = $app->share(function () use ($app) {
if (!file_exists($app['config.path'])) {
throw new \InvalidArgumentException(
$app['config.path'] . ' is not a valid path to the '
.'configuration'
);
}
$fullpath = explode('.', $app['config.path']);
switch (strtolower(end($fullpath))) {
case 'yml':
$parser = new Yaml\Parser();
$result = new \ArrayObject(
$parser->parse($app['config.path'])
);
break;
case 'xml':
$result = simplexml_load_file($app['config.path']);
break;
default:
throw new \InvalidArgumentException(
'Unable to load configuration; the provided file '
.'extension was not recognized. Only yml or xml allowed'
);
}
return $result;
});
}
} | <?php
/*
* This file is part of the Cilex framework.
*
* (c) Mike van Riel <mike.vanriel@naenius.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cilex\Provider;
use Cilex\Application;
use Cilex\ServiceProviderInterface;
use Symfony\Component\Yaml;
class ConfigServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app['config'] = $app->share(function () use ($app) {
+ if (!file_exists($app['config.path'])) {
+ throw new \InvalidArgumentException(
+ $app['config.path'] . ' is not a valid path to the '
+ .'configuration'
+ );
+ }
$fullpath = explode('.', $app['config.path']);
switch (strtolower(end($fullpath))) {
case 'yml':
$parser = new Yaml\Parser();
$result = new \ArrayObject(
$parser->parse($app['config.path'])
);
break;
case 'xml':
$result = simplexml_load_file($app['config.path']);
break;
default:
throw new \InvalidArgumentException(
'Unable to load configuration; the provided file '
.'extension was not recognized. Only yml or xml allowed'
);
}
return $result;
});
}
} | 6 | 0.133333 | 6 | 0 |
00848b5c7ae44da4ad3eab4f063dc6135ea9032d | spec/factories/tasks_tasks.rb | spec/factories/tasks_tasks.rb | FactoryGirl.define do
factory :tasks_task, aliases: [:task], class: 'Tasks::Task' do
association :taskable, factory: :verification
trait(:with_verification) { association :taskable, factory: :verification }
factory :image_task do
association :taskable, factory: :tasks_taskables_image_request
end
factory :question_task do
association :taskable, factory: :tasks_taskables_question_with_options
end
factory :text_task do
association :taskable, factory: :tasks_taskables_text_request
end
end
end
| FactoryGirl.define do
factory :tasks_task, aliases: [:task], class: 'Tasks::Task' do
association :taskable, factory: :verification
trait(:with_verification) { association :taskable, factory: :verification }
trait(:with_image_task) { association :taskable, factory: :tasks_taskables_image_request }
trait(:with_question_task) { association :taskable, factory: :tasks_taskables_question_with_options }
trait(:with_text_task) {association :taskable, factory: :tasks_taskables_text_request}
factory :image_task, traits: [:with_image_task]
factory :question_task, traits: [:with_question_task]
factory :text_task, traits: [:with_text_task]
end
end
| Update task factory to use traits | Update task factory to use traits
| Ruby | mit | hyperoslo/tasuku,hyperoslo/tasuku,hyperoslo/tasuku | ruby | ## Code Before:
FactoryGirl.define do
factory :tasks_task, aliases: [:task], class: 'Tasks::Task' do
association :taskable, factory: :verification
trait(:with_verification) { association :taskable, factory: :verification }
factory :image_task do
association :taskable, factory: :tasks_taskables_image_request
end
factory :question_task do
association :taskable, factory: :tasks_taskables_question_with_options
end
factory :text_task do
association :taskable, factory: :tasks_taskables_text_request
end
end
end
## Instruction:
Update task factory to use traits
## Code After:
FactoryGirl.define do
factory :tasks_task, aliases: [:task], class: 'Tasks::Task' do
association :taskable, factory: :verification
trait(:with_verification) { association :taskable, factory: :verification }
trait(:with_image_task) { association :taskable, factory: :tasks_taskables_image_request }
trait(:with_question_task) { association :taskable, factory: :tasks_taskables_question_with_options }
trait(:with_text_task) {association :taskable, factory: :tasks_taskables_text_request}
factory :image_task, traits: [:with_image_task]
factory :question_task, traits: [:with_question_task]
factory :text_task, traits: [:with_text_task]
end
end
| FactoryGirl.define do
factory :tasks_task, aliases: [:task], class: 'Tasks::Task' do
association :taskable, factory: :verification
- trait(:with_verification) { association :taskable, factory: :verification }
+ trait(:with_verification) { association :taskable, factory: :verification }
? ++++
+ trait(:with_image_task) { association :taskable, factory: :tasks_taskables_image_request }
+ trait(:with_question_task) { association :taskable, factory: :tasks_taskables_question_with_options }
+ trait(:with_text_task) {association :taskable, factory: :tasks_taskables_text_request}
+ factory :image_task, traits: [:with_image_task]
+ factory :question_task, traits: [:with_question_task]
+ factory :text_task, traits: [:with_text_task]
- factory :image_task do
- association :taskable, factory: :tasks_taskables_image_request
- end
-
- factory :question_task do
- association :taskable, factory: :tasks_taskables_question_with_options
- end
-
- factory :text_task do
- association :taskable, factory: :tasks_taskables_text_request
- end
end
end | 19 | 1 | 7 | 12 |
f4fe0d50cf466689342031cac16be757d342c992 | handlers/masking.go | handlers/masking.go | package handlers
import (
"go-message-masking/persistence"
"net/http"
"regexp"
"github.com/ant0ine/go-json-rest/rest"
)
// Message is a code representation of the data sent by the API user through the wire
type Message struct {
Locale string
Text string
MaskString string
}
// MaskSensitiveData is the route handler that responds whenever the `/mask` route
// has been called with valid data
func MaskSensitiveData(w rest.ResponseWriter, r *rest.Request) {
message := Message{}
err := r.DecodeJsonPayload(&message)
var maskString = "(hidden)"
if message.MaskString != "" {
maskString = message.MaskString
}
if err != nil {
rest.Error(w, err.Error(), http.StatusInternalServerError)
return
}
processedMessage := maskSensitiveData(message.Text, persistence.Expressions, maskString)
w.WriteJson(
&Message{
Locale: message.Locale,
Text: processedMessage,
MaskString: maskString,
},
)
}
func maskSensitiveData(s string, expressionMap map[string]string, maskString string) string {
for _, value := range expressionMap {
s = applyExpression(s, value, maskString)
}
return s
}
func applyExpression(s string, expression string, maskString string) string {
re := regexp.MustCompile(expression)
return re.ReplaceAllString(s, maskString)
}
| package handlers
import (
"go-message-masking/persistence"
"net/http"
"regexp"
"github.com/ant0ine/go-json-rest/rest"
)
// Message is a code representation of the data sent by the API user through the wire
type Message struct {
Locale string
Text string
MaskString string
}
// MaskSensitiveData is the route handler that responds whenever the `/mask` route
// has been called with valid data
func MaskSensitiveData(w rest.ResponseWriter, r *rest.Request) {
message := Message{}
err := r.DecodeJsonPayload(&message)
if err != nil {
rest.Error(w, err.Error(), http.StatusInternalServerError)
return
}
var maskString = "(hidden)"
if message.MaskString != "" {
maskString = message.MaskString
}
processedMessage := maskSensitiveData(message.Text, persistence.Expressions, maskString)
w.WriteJson(
&Message{
Locale: message.Locale,
Text: processedMessage,
MaskString: maskString,
},
)
}
func maskSensitiveData(s string, expressionMap map[string]string, maskString string) string {
for _, value := range expressionMap {
s = applyExpression(s, value, maskString)
}
return s
}
func applyExpression(s string, expression string, maskString string) string {
re := regexp.MustCompile(expression)
return re.ReplaceAllString(s, maskString)
}
| Move error validation to the top of the scope | chore: Move error validation to the top of the scope
Signed-off-by: Adrian Oprea <a1b909ec1cc11cce40c28d3640eab600e582f833@codesi.nz>
| Go | agpl-3.0 | opreaadrian/message-masking-service | go | ## Code Before:
package handlers
import (
"go-message-masking/persistence"
"net/http"
"regexp"
"github.com/ant0ine/go-json-rest/rest"
)
// Message is a code representation of the data sent by the API user through the wire
type Message struct {
Locale string
Text string
MaskString string
}
// MaskSensitiveData is the route handler that responds whenever the `/mask` route
// has been called with valid data
func MaskSensitiveData(w rest.ResponseWriter, r *rest.Request) {
message := Message{}
err := r.DecodeJsonPayload(&message)
var maskString = "(hidden)"
if message.MaskString != "" {
maskString = message.MaskString
}
if err != nil {
rest.Error(w, err.Error(), http.StatusInternalServerError)
return
}
processedMessage := maskSensitiveData(message.Text, persistence.Expressions, maskString)
w.WriteJson(
&Message{
Locale: message.Locale,
Text: processedMessage,
MaskString: maskString,
},
)
}
func maskSensitiveData(s string, expressionMap map[string]string, maskString string) string {
for _, value := range expressionMap {
s = applyExpression(s, value, maskString)
}
return s
}
func applyExpression(s string, expression string, maskString string) string {
re := regexp.MustCompile(expression)
return re.ReplaceAllString(s, maskString)
}
## Instruction:
chore: Move error validation to the top of the scope
Signed-off-by: Adrian Oprea <a1b909ec1cc11cce40c28d3640eab600e582f833@codesi.nz>
## Code After:
package handlers
import (
"go-message-masking/persistence"
"net/http"
"regexp"
"github.com/ant0ine/go-json-rest/rest"
)
// Message is a code representation of the data sent by the API user through the wire
type Message struct {
Locale string
Text string
MaskString string
}
// MaskSensitiveData is the route handler that responds whenever the `/mask` route
// has been called with valid data
func MaskSensitiveData(w rest.ResponseWriter, r *rest.Request) {
message := Message{}
err := r.DecodeJsonPayload(&message)
if err != nil {
rest.Error(w, err.Error(), http.StatusInternalServerError)
return
}
var maskString = "(hidden)"
if message.MaskString != "" {
maskString = message.MaskString
}
processedMessage := maskSensitiveData(message.Text, persistence.Expressions, maskString)
w.WriteJson(
&Message{
Locale: message.Locale,
Text: processedMessage,
MaskString: maskString,
},
)
}
func maskSensitiveData(s string, expressionMap map[string]string, maskString string) string {
for _, value := range expressionMap {
s = applyExpression(s, value, maskString)
}
return s
}
func applyExpression(s string, expression string, maskString string) string {
re := regexp.MustCompile(expression)
return re.ReplaceAllString(s, maskString)
}
| package handlers
import (
"go-message-masking/persistence"
"net/http"
"regexp"
"github.com/ant0ine/go-json-rest/rest"
)
// Message is a code representation of the data sent by the API user through the wire
type Message struct {
Locale string
Text string
MaskString string
}
// MaskSensitiveData is the route handler that responds whenever the `/mask` route
// has been called with valid data
func MaskSensitiveData(w rest.ResponseWriter, r *rest.Request) {
message := Message{}
err := r.DecodeJsonPayload(&message)
+ if err != nil {
+ rest.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
+
var maskString = "(hidden)"
if message.MaskString != "" {
maskString = message.MaskString
- }
-
- if err != nil {
- rest.Error(w, err.Error(), http.StatusInternalServerError)
- return
}
processedMessage := maskSensitiveData(message.Text, persistence.Expressions, maskString)
w.WriteJson(
&Message{
Locale: message.Locale,
Text: processedMessage,
MaskString: maskString,
},
)
}
func maskSensitiveData(s string, expressionMap map[string]string, maskString string) string {
for _, value := range expressionMap {
s = applyExpression(s, value, maskString)
}
return s
}
func applyExpression(s string, expression string, maskString string) string {
re := regexp.MustCompile(expression)
return re.ReplaceAllString(s, maskString)
} | 10 | 0.178571 | 5 | 5 |
704424c14d2f550779b681e2b4de5fa160e57c50 | README.md | README.md | Mindlee - Free your mind
====
A mobile web application that allows user to monitor and manage their stress level according to their daily activities
| Mindlee - Free your mind
====
In the midst of our midterm season, we found ourselves stressed out cramming for our tests and working on projects for class. Before we knew it, our productivity was lower, we had a harder time focusing on our work, and we also felt less happy with our lives. Although classes are important, by the end of the day, we need to take care of ourselves and maintain a healthy mindset for the long-term. Thus, we wanted to find a way to reconnect with nature and be more mindful of the stresses that stem from our environment. Once we develop that awareness, we need to find a way to let go, relax, and breathe.
What is Mindlee?
====
A mobile web application that tracks a user’s schedule and reminds them effectively of when their stress levels seem to be stacking too high. Then we provide them with mindful solutions to help them destress, relax and raise their concentration levels.
Usage
====
- Go to mindlee.herokuapp.com
- Login
- Add tentative schedules
- User's stress level will accumulate as activity deadline passes
- Home page will provide the accumulated stress level
- App inform user to de-stress and provided curated activities that may help user relax
- Status page provides live graph of recent changes in stress level and history of activities
User Testing
====
Our user testing on our prototypes have led to several changes that improved the application’s usability and aesthetics. The most useful feedback that we received was on how we could accurately represent a user’s stress level. Thus, we carried out A/B testing on two different iterations of the stress value slider to see which version the user preferred. The results led us to a more intuitive design.
API used
====
- NodeJs + Express
- Handlebars
- d3.js
| Update readme to include informations | Update readme to include informations | Markdown | mit | atomic/mindlee,atomic/mindlee | markdown | ## Code Before:
Mindlee - Free your mind
====
A mobile web application that allows user to monitor and manage their stress level according to their daily activities
## Instruction:
Update readme to include informations
## Code After:
Mindlee - Free your mind
====
In the midst of our midterm season, we found ourselves stressed out cramming for our tests and working on projects for class. Before we knew it, our productivity was lower, we had a harder time focusing on our work, and we also felt less happy with our lives. Although classes are important, by the end of the day, we need to take care of ourselves and maintain a healthy mindset for the long-term. Thus, we wanted to find a way to reconnect with nature and be more mindful of the stresses that stem from our environment. Once we develop that awareness, we need to find a way to let go, relax, and breathe.
What is Mindlee?
====
A mobile web application that tracks a user’s schedule and reminds them effectively of when their stress levels seem to be stacking too high. Then we provide them with mindful solutions to help them destress, relax and raise their concentration levels.
Usage
====
- Go to mindlee.herokuapp.com
- Login
- Add tentative schedules
- User's stress level will accumulate as activity deadline passes
- Home page will provide the accumulated stress level
- App inform user to de-stress and provided curated activities that may help user relax
- Status page provides live graph of recent changes in stress level and history of activities
User Testing
====
Our user testing on our prototypes have led to several changes that improved the application’s usability and aesthetics. The most useful feedback that we received was on how we could accurately represent a user’s stress level. Thus, we carried out A/B testing on two different iterations of the stress value slider to see which version the user preferred. The results led us to a more intuitive design.
API used
====
- NodeJs + Express
- Handlebars
- d3.js
| Mindlee - Free your mind
====
- A mobile web application that allows user to monitor and manage their stress level according to their daily activities
+ In the midst of our midterm season, we found ourselves stressed out cramming for our tests and working on projects for class. Before we knew it, our productivity was lower, we had a harder time focusing on our work, and we also felt less happy with our lives. Although classes are important, by the end of the day, we need to take care of ourselves and maintain a healthy mindset for the long-term. Thus, we wanted to find a way to reconnect with nature and be more mindful of the stresses that stem from our environment. Once we develop that awareness, we need to find a way to let go, relax, and breathe.
+
+ What is Mindlee?
+ ====
+ A mobile web application that tracks a user’s schedule and reminds them effectively of when their stress levels seem to be stacking too high. Then we provide them with mindful solutions to help them destress, relax and raise their concentration levels.
+
+ Usage
+ ====
+ - Go to mindlee.herokuapp.com
+ - Login
+ - Add tentative schedules
+ - User's stress level will accumulate as activity deadline passes
+ - Home page will provide the accumulated stress level
+ - App inform user to de-stress and provided curated activities that may help user relax
+ - Status page provides live graph of recent changes in stress level and history of activities
+
+ User Testing
+ ====
+ Our user testing on our prototypes have led to several changes that improved the application’s usability and aesthetics. The most useful feedback that we received was on how we could accurately represent a user’s stress level. Thus, we carried out A/B testing on two different iterations of the stress value slider to see which version the user preferred. The results led us to a more intuitive design.
+
+ API used
+ ====
+ - NodeJs + Express
+ - Handlebars
+ - d3.js | 26 | 6.5 | 25 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.