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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f5e24821ff9d68caa92ecdad85600560d5fe0a0 | custom.css | custom.css | body {
margin: 10px 10px 10px 10px;
padding: 10px 10px 10px 10px;
border-top-color: #2323aa;
border-top-width: 5px;
border-top-style: double;
font-family: sans-serif;
color: #2323ff;
} | body {
margin: 10px 10px 10px 10px;
padding: 10px 10px 10px 10px;
border-top-color: #2323aa;
border-top-width: 5px;
border-top-style: double;
font-family: sans-serif;
color: #2323ff;
}
.the-form {
color: #334433;
border-bottom-width: 5px;
border-bottom-style: double;
border-bottom-color: #443344;
}
| Add styling to the form section | Add styling to the form section
| CSS | bsd-2-clause | ambidextrousTx/Marvelous,ambidextrousTx/Marvelous | css | ## Code Before:
body {
margin: 10px 10px 10px 10px;
padding: 10px 10px 10px 10px;
border-top-color: #2323aa;
border-top-width: 5px;
border-top-style: double;
font-family: sans-serif;
color: #2323ff;
}
## Instruction:
Add styling to the form section
## Code After:
body {
margin: 10px 10px 10px 10px;
padding: 10px 10px 10px 10px;
border-top-color: #2323aa;
border-top-width: 5px;
border-top-style: double;
font-family: sans-serif;
color: #2323ff;
}
.the-form {
color: #334433;
border-bottom-width: 5px;
border-bottom-style: double;
border-bottom-color: #443344;
}
| body {
- margin: 10px 10px 10px 10px;
? ^^^^
+ margin: 10px 10px 10px 10px;
? ^
- padding: 10px 10px 10px 10px;
? ^^^^
+ padding: 10px 10px 10px 10px;
? ^
- border-top-color: #2323aa;
? ^^^^
+ border-top-color: #2323aa;
? ^
- border-top-width: 5px;
? ^^^^
+ border-top-width: 5px;
? ^
- border-top-style: double;
? ^^^^
+ border-top-style: double;
? ^
- font-family: sans-serif;
? ^^^^
+ font-family: sans-serif;
? ^
- color: #2323ff;
? ^^^^
+ color: #2323ff;
? ^
}
+
+ .the-form {
+ color: #334433;
+ border-bottom-width: 5px;
+ border-bottom-style: double;
+ border-bottom-color: #443344;
+
+ } | 22 | 2.444444 | 15 | 7 |
26c2475996fd2f2d431973027f2501d1113903be | .github/workflows/schedule.yml | .github/workflows/schedule.yml | name: Bot schedule
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs: {}
jobs:
bot:
runs-on: ubuntu-latest
steps:
- name: Run bot
run: docker run ghcr.io/${{ github.repository_owner }}/rol-automizer -u ${{ secrets.ROL_USERNAME }} -p ${{ secrets.ROL_PASSWORD }}
| name: Bot schedule
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs: {}
jobs:
bot:
runs-on: ubuntu-latest
steps:
- name: Run bot
run: docker run ${{ secrets.DOCKERHUB_USER }}/rol-automizer -u ${{ secrets.ROL_USERNAME }} -p ${{ secrets.ROL_PASSWORD }}
| Use dockerhub image to avoid login | Use dockerhub image to avoid login
| YAML | mit | joffrey-bion/rol-automizer,joffrey-bion/rol-automizer | yaml | ## Code Before:
name: Bot schedule
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs: {}
jobs:
bot:
runs-on: ubuntu-latest
steps:
- name: Run bot
run: docker run ghcr.io/${{ github.repository_owner }}/rol-automizer -u ${{ secrets.ROL_USERNAME }} -p ${{ secrets.ROL_PASSWORD }}
## Instruction:
Use dockerhub image to avoid login
## Code After:
name: Bot schedule
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs: {}
jobs:
bot:
runs-on: ubuntu-latest
steps:
- name: Run bot
run: docker run ${{ secrets.DOCKERHUB_USER }}/rol-automizer -u ${{ secrets.ROL_USERNAME }} -p ${{ secrets.ROL_PASSWORD }}
| name: Bot schedule
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs: {}
jobs:
bot:
runs-on: ubuntu-latest
steps:
- name: Run bot
- run: docker run ghcr.io/${{ github.repository_owner }}/rol-automizer -u ${{ secrets.ROL_USERNAME }} -p ${{ secrets.ROL_PASSWORD }}
? -------- ^^^^^^^ ^^ ^^^^^ ^^^^^
+ run: docker run ${{ secrets.DOCKERHUB_USER }}/rol-automizer -u ${{ secrets.ROL_USERNAME }} -p ${{ secrets.ROL_PASSWORD }}
? ^^^ ^ ^^^^^^^^^^ ^^^^
| 2 | 0.142857 | 1 | 1 |
ebba0844cc74969e5a651ff7e93c6dd06390cf3f | recipes/configure.rb | recipes/configure.rb |
template node['pulledpork']['disablesid'] do
source 'disablesid.conf.erb'
owner 'root'
group 'root'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
not_if { node['pulledpork']['disabled_sids_hash_array'].empty? }
end
template node['pulledpork']['pp_config_path'] do
source 'pulledpork.conf.erb'
owner 'root'
group 'root'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
end
# create the sorule_path unless its managed elsewhere
directory node['pulledpork']['sorule_path'] do
owner 'root'
group 'root'
mode '0755'
not_if { ::File.exist?(node['pulledpork']['sorule_path']) }
end
# pulled pork fails if a so rule doesn't exist in the dir.
cookbook_file '/usr/lib/snort_dynamicrules/os-linux.so' do
source 'default_so_rule'
action :create_if_missing
owner 'root'
group 'root'
mode '0655'
end
|
template node['pulledpork']['disablesid'] do
source 'disablesid.conf.erb'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
not_if { node['pulledpork']['disabled_sids_hash_array'].empty? }
end
template node['pulledpork']['pp_config_path'] do
source 'pulledpork.conf.erb'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
end
# create the sorule_path unless its managed elsewhere
directory node['pulledpork']['sorule_path'] do
mode '0755'
not_if { ::File.exist?(node['pulledpork']['sorule_path']) }
end
# pulled pork fails if a so rule doesn't exist in the dir.
cookbook_file '/usr/lib/snort_dynamicrules/os-linux.so' do
source 'default_so_rule'
action :create_if_missing
mode '0655'
end
| Remove default user/groups from resources | Remove default user/groups from resources
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
| Ruby | apache-2.0 | tas50/chef-pulledpork,tas50/chef-pulledpork | ruby | ## Code Before:
template node['pulledpork']['disablesid'] do
source 'disablesid.conf.erb'
owner 'root'
group 'root'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
not_if { node['pulledpork']['disabled_sids_hash_array'].empty? }
end
template node['pulledpork']['pp_config_path'] do
source 'pulledpork.conf.erb'
owner 'root'
group 'root'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
end
# create the sorule_path unless its managed elsewhere
directory node['pulledpork']['sorule_path'] do
owner 'root'
group 'root'
mode '0755'
not_if { ::File.exist?(node['pulledpork']['sorule_path']) }
end
# pulled pork fails if a so rule doesn't exist in the dir.
cookbook_file '/usr/lib/snort_dynamicrules/os-linux.so' do
source 'default_so_rule'
action :create_if_missing
owner 'root'
group 'root'
mode '0655'
end
## Instruction:
Remove default user/groups from resources
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
## Code After:
template node['pulledpork']['disablesid'] do
source 'disablesid.conf.erb'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
not_if { node['pulledpork']['disabled_sids_hash_array'].empty? }
end
template node['pulledpork']['pp_config_path'] do
source 'pulledpork.conf.erb'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
end
# create the sorule_path unless its managed elsewhere
directory node['pulledpork']['sorule_path'] do
mode '0755'
not_if { ::File.exist?(node['pulledpork']['sorule_path']) }
end
# pulled pork fails if a so rule doesn't exist in the dir.
cookbook_file '/usr/lib/snort_dynamicrules/os-linux.so' do
source 'default_so_rule'
action :create_if_missing
mode '0655'
end
|
template node['pulledpork']['disablesid'] do
source 'disablesid.conf.erb'
- owner 'root'
- group 'root'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
not_if { node['pulledpork']['disabled_sids_hash_array'].empty? }
end
template node['pulledpork']['pp_config_path'] do
source 'pulledpork.conf.erb'
- owner 'root'
- group 'root'
mode '0640'
notifies :run, 'execute[run_pulledpork]'
end
# create the sorule_path unless its managed elsewhere
directory node['pulledpork']['sorule_path'] do
- owner 'root'
- group 'root'
mode '0755'
not_if { ::File.exist?(node['pulledpork']['sorule_path']) }
end
# pulled pork fails if a so rule doesn't exist in the dir.
cookbook_file '/usr/lib/snort_dynamicrules/os-linux.so' do
source 'default_so_rule'
action :create_if_missing
- owner 'root'
- group 'root'
mode '0655'
end | 8 | 0.235294 | 0 | 8 |
1da20311dbb49cf6bed3fcc2ea4239afd2f08538 | unix_env_setup.sh | unix_env_setup.sh |
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt-get update
sudo apt-get install g++-7 unzip autoconf libtool libssl-dev python perl
git submodule update --init --recursive
if [ ! -d cmake_app ]; then
mkdir cmake_app
wget --no-check-certificate --quiet -O - https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.tar.gz | tar --strip-components=1 -xz -C cmake_app
else
echo "cmake installed already"
fi
export PROOT=$(pwd)
export PATH=`pwd`/cmake_app/bin:${PATH}
cmake --version
# sucks that we HAVE to do this to get a compile out
pip install --user pyparsing
mkdir build
cd build
CC=gcc-7 CXX=g++-7 cmake -DENABLE_TESTING=ON -DENABLE_TESTING_COVERAGE=OFF ..
echo "Please add `pwd`/cmake_app/bin to your PATH env varaibles to ensure you will be able to compile in the future"
|
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt-get update
sudo apt-get install g++-7 unzip autoconf libtool libssl-dev python perl libncurses5-dev libreadline-dev
git submodule update --init --recursive
if [ ! -d cmake_app ]; then
mkdir cmake_app
wget --no-check-certificate --quiet -O - https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.tar.gz | tar --strip-components=1 -xz -C cmake_app
else
echo "cmake installed already"
fi
export PROOT=$(pwd)
export PATH=`pwd`/cmake_app/bin:${PATH}
cmake --version
# sucks that we HAVE to do this to get a compile out
pip install --user pyparsing
mkdir build
cd build
CC=gcc-7 CXX=g++-7 cmake -DENABLE_TESTING=ON -DENABLE_TESTING_COVERAGE=OFF ..
echo "Please add `pwd`/cmake_app/bin to your PATH env varaibles to ensure you will be able to compile in the future"
| Add missing deps to unix setup script | Add missing deps to unix setup script
| Shell | apache-2.0 | dev-osrose/osIROSE-new,RavenX8/osIROSE-new,dev-osrose/osIROSE-new,RavenX8/osIROSE-new,dev-osrose/osIROSE-new,RavenX8/osIROSE-new | shell | ## Code Before:
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt-get update
sudo apt-get install g++-7 unzip autoconf libtool libssl-dev python perl
git submodule update --init --recursive
if [ ! -d cmake_app ]; then
mkdir cmake_app
wget --no-check-certificate --quiet -O - https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.tar.gz | tar --strip-components=1 -xz -C cmake_app
else
echo "cmake installed already"
fi
export PROOT=$(pwd)
export PATH=`pwd`/cmake_app/bin:${PATH}
cmake --version
# sucks that we HAVE to do this to get a compile out
pip install --user pyparsing
mkdir build
cd build
CC=gcc-7 CXX=g++-7 cmake -DENABLE_TESTING=ON -DENABLE_TESTING_COVERAGE=OFF ..
echo "Please add `pwd`/cmake_app/bin to your PATH env varaibles to ensure you will be able to compile in the future"
## Instruction:
Add missing deps to unix setup script
## Code After:
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt-get update
sudo apt-get install g++-7 unzip autoconf libtool libssl-dev python perl libncurses5-dev libreadline-dev
git submodule update --init --recursive
if [ ! -d cmake_app ]; then
mkdir cmake_app
wget --no-check-certificate --quiet -O - https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.tar.gz | tar --strip-components=1 -xz -C cmake_app
else
echo "cmake installed already"
fi
export PROOT=$(pwd)
export PATH=`pwd`/cmake_app/bin:${PATH}
cmake --version
# sucks that we HAVE to do this to get a compile out
pip install --user pyparsing
mkdir build
cd build
CC=gcc-7 CXX=g++-7 cmake -DENABLE_TESTING=ON -DENABLE_TESTING_COVERAGE=OFF ..
echo "Please add `pwd`/cmake_app/bin to your PATH env varaibles to ensure you will be able to compile in the future"
|
sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
sudo apt-get update
- sudo apt-get install g++-7 unzip autoconf libtool libssl-dev python perl
+ sudo apt-get install g++-7 unzip autoconf libtool libssl-dev python perl libncurses5-dev libreadline-dev
? ++++++++++++++++++++++++++++++++
git submodule update --init --recursive
if [ ! -d cmake_app ]; then
mkdir cmake_app
wget --no-check-certificate --quiet -O - https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.tar.gz | tar --strip-components=1 -xz -C cmake_app
else
echo "cmake installed already"
fi
export PROOT=$(pwd)
export PATH=`pwd`/cmake_app/bin:${PATH}
cmake --version
# sucks that we HAVE to do this to get a compile out
pip install --user pyparsing
mkdir build
cd build
CC=gcc-7 CXX=g++-7 cmake -DENABLE_TESTING=ON -DENABLE_TESTING_COVERAGE=OFF ..
echo "Please add `pwd`/cmake_app/bin to your PATH env varaibles to ensure you will be able to compile in the future" | 2 | 0.076923 | 1 | 1 |
11b1577cd91c81469cc63767585c5862c9abf301 | demo/app/src/main/java/com/chaquo/python/demo/MainActivity.java | demo/app/src/main/java/com/chaquo/python/demo/MainActivity.java | package com.chaquo.python.demo;
import android.os.*;
import android.support.v7.app.*;
import android.support.v7.preference.*;
import android.text.method.*;
import android.widget.*;
import com.chaquo.python.*;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
setContentView(R.layout.activity_main);
getSupportFragmentManager().beginTransaction()
.replace(R.id.flMenu, new MenuFragment())
.commit();
((TextView)findViewById(R.id.tvCaption)).setMovementMethod(LinkMovementMethod.getInstance());
}
public static class MenuFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.activity_main);
}
}
}
| package com.chaquo.python.demo;
import android.content.pm.*;
import android.os.*;
import android.support.v7.app.*;
import android.support.v7.preference.*;
import android.text.method.*;
import android.widget.*;
import com.chaquo.python.*;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
String version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
setTitle(getTitle() + " " + version);
} catch (PackageManager.NameNotFoundException ignored) {}
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
setContentView(R.layout.activity_main);
getSupportFragmentManager().beginTransaction()
.replace(R.id.flMenu, new MenuFragment())
.commit();
((TextView)findViewById(R.id.tvCaption)).setMovementMethod(LinkMovementMethod.getInstance());
}
public static class MenuFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.activity_main);
}
}
}
| Add version number to menu screen | Add version number to menu screen
| Java | mit | chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy,chaquo/chaquopy | java | ## Code Before:
package com.chaquo.python.demo;
import android.os.*;
import android.support.v7.app.*;
import android.support.v7.preference.*;
import android.text.method.*;
import android.widget.*;
import com.chaquo.python.*;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
setContentView(R.layout.activity_main);
getSupportFragmentManager().beginTransaction()
.replace(R.id.flMenu, new MenuFragment())
.commit();
((TextView)findViewById(R.id.tvCaption)).setMovementMethod(LinkMovementMethod.getInstance());
}
public static class MenuFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.activity_main);
}
}
}
## Instruction:
Add version number to menu screen
## Code After:
package com.chaquo.python.demo;
import android.content.pm.*;
import android.os.*;
import android.support.v7.app.*;
import android.support.v7.preference.*;
import android.text.method.*;
import android.widget.*;
import com.chaquo.python.*;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
String version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
setTitle(getTitle() + " " + version);
} catch (PackageManager.NameNotFoundException ignored) {}
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
setContentView(R.layout.activity_main);
getSupportFragmentManager().beginTransaction()
.replace(R.id.flMenu, new MenuFragment())
.commit();
((TextView)findViewById(R.id.tvCaption)).setMovementMethod(LinkMovementMethod.getInstance());
}
public static class MenuFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.activity_main);
}
}
}
| package com.chaquo.python.demo;
+ import android.content.pm.*;
import android.os.*;
import android.support.v7.app.*;
import android.support.v7.preference.*;
import android.text.method.*;
import android.widget.*;
import com.chaquo.python.*;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ try {
+ String version = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
+ setTitle(getTitle() + " " + version);
+ } catch (PackageManager.NameNotFoundException ignored) {}
+
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
setContentView(R.layout.activity_main);
getSupportFragmentManager().beginTransaction()
.replace(R.id.flMenu, new MenuFragment())
.commit();
((TextView)findViewById(R.id.tvCaption)).setMovementMethod(LinkMovementMethod.getInstance());
}
public static class MenuFragment extends PreferenceFragmentCompat {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.activity_main);
}
}
} | 6 | 0.181818 | 6 | 0 |
7836646ca7349987aa5165e9d9175e0f091395e0 | Source/Trait/Grid.js | Source/Trait/Grid.js | LSD.Trait.Grid = new Class({
sort: function() {
},
filter: function() {
}
}) | /*
---
script: Grid.js
description: Filters and sort datasets (and widgets)
license: Public domain (http://unlicense.org).
requires:
- LSD
provides:
- LSD.Trait.Grid
...
*/
LSD.Trait.Grid = new Class({
sort: function() {
},
filter: function() {
}
}); | Add grid trait file header | Add grid trait file header | JavaScript | unlicense | Inviz/lsd | javascript | ## Code Before:
LSD.Trait.Grid = new Class({
sort: function() {
},
filter: function() {
}
})
## Instruction:
Add grid trait file header
## Code After:
/*
---
script: Grid.js
description: Filters and sort datasets (and widgets)
license: Public domain (http://unlicense.org).
requires:
- LSD
provides:
- LSD.Trait.Grid
...
*/
LSD.Trait.Grid = new Class({
sort: function() {
},
filter: function() {
}
}); | + /*
+ ---
+
+ script: Grid.js
+
+ description: Filters and sort datasets (and widgets)
+
+ license: Public domain (http://unlicense.org).
+
+ requires:
+ - LSD
+
+ provides:
+ - LSD.Trait.Grid
+
+ ...
+ */
+
+
LSD.Trait.Grid = new Class({
sort: function() {
},
filter: function() {
}
- })
+ });
? +
| 21 | 1.909091 | 20 | 1 |
be72debf99ad1754722e31206f50360ff4e14922 | scripts/run-headless-tests.sh | scripts/run-headless-tests.sh |
set -xeuo pipefail
if [ `adb devices | wc -l` -lt "3" ]
then
echo "No devices are connected. Make sure emulator is booted with flipper sample app running"
exit 1
fi
yarn build-headless --mac
unzip -u dist/Flipper-headless.zip -d /tmp
(cd headless-tests && yarn test)
|
set -euo pipefail
if [ `adb devices | wc -l` -lt "3" ]
then
echo "ERROR: No devices are connected. Make sure emulator is booted with flipper sample app running"
exit 1
fi
api_version=$(adb shell getprop ro.build.version.sdk)
if [ "$api_version" != "24" ]; then
echo "WARNING: Emulator has api version $api_version. Should be using API 24 for snapshot test to pass. ( Must match the one we request from oneworld at https://fburl.com/diffusion/op67q916 )"
fi
yarn build-headless --mac
unzip -o dist/Flipper-headless.zip -d /tmp
(cd headless-tests && yarn test)
| Improve headless test running script | Improve headless test running script
Summary: Now emits a warning if api version doesn't match expected one.
Reviewed By: cekkaewnumchai
Differential Revision: D17685261
fbshipit-source-id: 2a01d64e2e160d411d7a58125b5bb45437476f8f
| Shell | mit | facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper | shell | ## Code Before:
set -xeuo pipefail
if [ `adb devices | wc -l` -lt "3" ]
then
echo "No devices are connected. Make sure emulator is booted with flipper sample app running"
exit 1
fi
yarn build-headless --mac
unzip -u dist/Flipper-headless.zip -d /tmp
(cd headless-tests && yarn test)
## Instruction:
Improve headless test running script
Summary: Now emits a warning if api version doesn't match expected one.
Reviewed By: cekkaewnumchai
Differential Revision: D17685261
fbshipit-source-id: 2a01d64e2e160d411d7a58125b5bb45437476f8f
## Code After:
set -euo pipefail
if [ `adb devices | wc -l` -lt "3" ]
then
echo "ERROR: No devices are connected. Make sure emulator is booted with flipper sample app running"
exit 1
fi
api_version=$(adb shell getprop ro.build.version.sdk)
if [ "$api_version" != "24" ]; then
echo "WARNING: Emulator has api version $api_version. Should be using API 24 for snapshot test to pass. ( Must match the one we request from oneworld at https://fburl.com/diffusion/op67q916 )"
fi
yarn build-headless --mac
unzip -o dist/Flipper-headless.zip -d /tmp
(cd headless-tests && yarn test)
|
- set -xeuo pipefail
? -
+ set -euo pipefail
if [ `adb devices | wc -l` -lt "3" ]
then
- echo "No devices are connected. Make sure emulator is booted with flipper sample app running"
+ echo "ERROR: No devices are connected. Make sure emulator is booted with flipper sample app running"
? +++++++
exit 1
fi
+ api_version=$(adb shell getprop ro.build.version.sdk)
+
+ if [ "$api_version" != "24" ]; then
+ echo "WARNING: Emulator has api version $api_version. Should be using API 24 for snapshot test to pass. ( Must match the one we request from oneworld at https://fburl.com/diffusion/op67q916 )"
+ fi
+
yarn build-headless --mac
- unzip -u dist/Flipper-headless.zip -d /tmp
? ^
+ unzip -o dist/Flipper-headless.zip -d /tmp
? ^
(cd headless-tests && yarn test) | 12 | 1 | 9 | 3 |
ab3dd4bf7ca3e004766410931d1df2cebdec0815 | docs/source/user_install.md | docs/source/user_install.md | Installation
============
Users can install the current version of **ipywidgets** with
[pip](https://pip.pypa.io/en/stable/) or
[conda](https://conda.readthedocs.io/en/latest/).
With pip
--------
``` bash
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
```
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
an activated virtual environment, the ``--sys-prefix`` option may be required
to enable the extension and keep the environment isolated (i.e.
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
With conda
----------
``` bash
conda install -c conda-forge ipywidgets
```
Installing **ipywidgets** with conda will also enable the extension for you.
| Installation
============
Users can install the current version of **ipywidgets** with
[pip](https://pip.pypa.io/en/stable/) or
[conda](https://conda.readthedocs.io/en/latest/).
With pip
--------
``` bash
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
```
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
an activated virtual environment, the ``--sys-prefix`` option may be required
to enable the extension and keep the environment isolated (i.e.
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
With conda
----------
``` bash
conda install -c conda-forge ipywidgets
```
Installing **ipywidgets** with conda will also enable the extension for you.
Installing the JupyterLab Extension
-----------------------------------
To install the JupyterLab extension you also need to run the below command in
a terminal which requires that you have [nodejs](https://nodejs.org/en/)
installed.
```bash
jupyter labextension install @jupyterlab/nbwidgets
```
**Note:** A clean reinstall of the JupyterLab extension can be done by first deleting
the lab directory before running the above command. The location of the lab
directory can be queried by executing `jupyter lab path` in your terminal.
| Add a note about installing the jupyterlab extension | Add a note about installing the jupyterlab extension | Markdown | bsd-3-clause | ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets | markdown | ## Code Before:
Installation
============
Users can install the current version of **ipywidgets** with
[pip](https://pip.pypa.io/en/stable/) or
[conda](https://conda.readthedocs.io/en/latest/).
With pip
--------
``` bash
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
```
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
an activated virtual environment, the ``--sys-prefix`` option may be required
to enable the extension and keep the environment isolated (i.e.
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
With conda
----------
``` bash
conda install -c conda-forge ipywidgets
```
Installing **ipywidgets** with conda will also enable the extension for you.
## Instruction:
Add a note about installing the jupyterlab extension
## Code After:
Installation
============
Users can install the current version of **ipywidgets** with
[pip](https://pip.pypa.io/en/stable/) or
[conda](https://conda.readthedocs.io/en/latest/).
With pip
--------
``` bash
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
```
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
an activated virtual environment, the ``--sys-prefix`` option may be required
to enable the extension and keep the environment isolated (i.e.
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
With conda
----------
``` bash
conda install -c conda-forge ipywidgets
```
Installing **ipywidgets** with conda will also enable the extension for you.
Installing the JupyterLab Extension
-----------------------------------
To install the JupyterLab extension you also need to run the below command in
a terminal which requires that you have [nodejs](https://nodejs.org/en/)
installed.
```bash
jupyter labextension install @jupyterlab/nbwidgets
```
**Note:** A clean reinstall of the JupyterLab extension can be done by first deleting
the lab directory before running the above command. The location of the lab
directory can be queried by executing `jupyter lab path` in your terminal.
| Installation
============
Users can install the current version of **ipywidgets** with
[pip](https://pip.pypa.io/en/stable/) or
[conda](https://conda.readthedocs.io/en/latest/).
With pip
--------
``` bash
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
```
When using [virtualenv](https://virtualenv.pypa.io/en/stable/) and working in
an activated virtual environment, the ``--sys-prefix`` option may be required
to enable the extension and keep the environment isolated (i.e.
``jupyter nbextension enable --py widgetsnbextension --sys-prefix``).
With conda
----------
``` bash
conda install -c conda-forge ipywidgets
```
Installing **ipywidgets** with conda will also enable the extension for you.
+
+
+ Installing the JupyterLab Extension
+ -----------------------------------
+
+ To install the JupyterLab extension you also need to run the below command in
+ a terminal which requires that you have [nodejs](https://nodejs.org/en/)
+ installed.
+ ```bash
+ jupyter labextension install @jupyterlab/nbwidgets
+ ```
+
+ **Note:** A clean reinstall of the JupyterLab extension can be done by first deleting
+ the lab directory before running the above command. The location of the lab
+ directory can be queried by executing `jupyter lab path` in your terminal.
+ | 16 | 0.571429 | 16 | 0 |
e7b67d7225d526e2c5f6ef671326c7b9adf38ef8 | repo-requirements.txt | repo-requirements.txt | -e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles
-e git://github.com/MITx/django-pipeline.git#egg=django-pipeline
-e git://github.com/rocha/django-wiki.git@33e9a24b9a20#egg=django-wiki
-e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e common/lib/capa
-e common/lib/xmodule
| -e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles
-e git://github.com/MITx/django-pipeline.git#egg=django-pipeline
-e git://github.com/MITx/django-wiki.git@e2e84558#egg=django-wiki
-e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e common/lib/capa
-e common/lib/xmodule
| Switch django-wiki dependency to a clone in our org so that local changes are easier to make | Switch django-wiki dependency to a clone in our org so that local changes are easier to make
| Text | agpl-3.0 | Edraak/circleci-edx-platform,philanthropy-u/edx-platform,pabloborrego93/edx-platform,naresh21/synergetics-edx-platform,arbrandes/edx-platform,tiagochiavericosta/edx-platform,don-github/edx-platform,dsajkl/123,4eek/edx-platform,angelapper/edx-platform,franosincic/edx-platform,beni55/edx-platform,mcgachey/edx-platform,kamalx/edx-platform,shurihell/testasia,shubhdev/edxOnBaadal,mcgachey/edx-platform,pelikanchik/edx-platform,cpennington/edx-platform,eduNEXT/edx-platform,TeachAtTUM/edx-platform,ubc/edx-platform,ampax/edx-platform,Ayub-Khan/edx-platform,EduPepperPDTesting/pepper2013-testing,inares/edx-platform,jazkarta/edx-platform-for-isc,OmarIthawi/edx-platform,pepeportela/edx-platform,longmen21/edx-platform,RPI-OPENEDX/edx-platform,ampax/edx-platform-backup,bitifirefly/edx-platform,simbs/edx-platform,EduPepperPD/pepper2013,SravanthiSinha/edx-platform,prarthitm/edxplatform,mitocw/edx-platform,antoviaque/edx-platform,pomegranited/edx-platform,adoosii/edx-platform,SivilTaram/edx-platform,raccoongang/edx-platform,motion2015/a3,kmoocdev/edx-platform,shubhdev/edx-platform,doismellburning/edx-platform,pepeportela/edx-platform,adoosii/edx-platform,morenopc/edx-platform,morenopc/edx-platform,syjeon/new_edx,jazztpt/edx-platform,cselis86/edx-platform,zubair-arbi/edx-platform,shubhdev/edxOnBaadal,angelapper/edx-platform,10clouds/edx-platform,bigdatauniversity/edx-platform,ovnicraft/edx-platform,miptliot/edx-platform,rhndg/openedx,angelapper/edx-platform,IONISx/edx-platform,lduarte1991/edx-platform,a-parhom/edx-platform,rue89-tech/edx-platform,atsolakid/edx-platform,philanthropy-u/edx-platform,shubhdev/edxOnBaadal,bitifirefly/edx-platform,DNFcode/edx-platform,deepsrijit1105/edx-platform,xuxiao19910803/edx,pku9104038/edx-platform,adoosii/edx-platform,pdehaye/theming-edx-platform,synergeticsedx/deployment-wipro,franosincic/edx-platform,arifsetiawan/edx-platform,mcgachey/edx-platform,procangroup/edx-platform,mjg2203/edx-platform-seas,pku9104038/edx-platform,rue89-tech/edx-platform,cyanna/edx-platform,torchingloom/edx-platform,antonve/s4-project-mooc,msegado/edx-platform,vasyarv/edx-platform,edx/edx-platform,gsehub/edx-platform,CredoReference/edx-platform,kxliugang/edx-platform,kursitet/edx-platform,xingyepei/edx-platform,kursitet/edx-platform,appliedx/edx-platform,mushtaqak/edx-platform,MSOpenTech/edx-platform,openfun/edx-platform,jazztpt/edx-platform,alexthered/kienhoc-platform,pdehaye/theming-edx-platform,pelikanchik/edx-platform,rue89-tech/edx-platform,valtech-mooc/edx-platform,don-github/edx-platform,gsehub/edx-platform,fintech-circle/edx-platform,romain-li/edx-platform,edx-solutions/edx-platform,cyanna/edx-platform,nanolearningllc/edx-platform-cypress-2,vismartltd/edx-platform,kmoocdev2/edx-platform,inares/edx-platform,dcosentino/edx-platform,ahmadio/edx-platform,shashank971/edx-platform,kalebhartje/schoolboost,CredoReference/edx-platform,Ayub-Khan/edx-platform,Livit/Livit.Learn.EdX,4eek/edx-platform,mjirayu/sit_academy,Shrhawk/edx-platform,simbs/edx-platform,BehavioralInsightsTeam/edx-platform,mjirayu/sit_academy,mcgachey/edx-platform,hkawasaki/kawasaki-aio8-2,gsehub/edx-platform,hkawasaki/kawasaki-aio8-2,openfun/edx-platform,ubc/edx-platform,openfun/edx-platform,CredoReference/edx-platform,motion2015/a3,jazkarta/edx-platform,msegado/edx-platform,JioEducation/edx-platform,Kalyzee/edx-platform,bigdatauniversity/edx-platform,hmcmooc/muddx-platform,shurihell/testasia,PepperPD/edx-pepper-platform,mbareta/edx-platform-ft,nagyistoce/edx-platform,dkarakats/edx-platform,Softmotions/edx-platform,apigee/edx-platform,ahmadiga/min_edx,IONISx/edx-platform,zhenzhai/edx-platform,nanolearningllc/edx-platform-cypress-2,EduPepperPD/pepper2013,naresh21/synergetics-edx-platform,eemirtekin/edx-platform,knehez/edx-platform,rationalAgent/edx-platform-custom,antonve/s4-project-mooc,shurihell/testasia,valtech-mooc/edx-platform,mushtaqak/edx-platform,TeachAtTUM/edx-platform,y12uc231/edx-platform,xinjiguaike/edx-platform,EduPepperPDTesting/pepper2013-testing,zubair-arbi/edx-platform,dsajkl/123,synergeticsedx/deployment-wipro,wwj718/edx-platform,nttks/edx-platform,rhndg/openedx,playm2mboy/edx-platform,Unow/edx-platform,J861449197/edx-platform,jamiefolsom/edx-platform,WatanabeYasumasa/edx-platform,inares/edx-platform,MSOpenTech/edx-platform,olexiim/edx-platform,utecuy/edx-platform,inares/edx-platform,leansoft/edx-platform,mahendra-r/edx-platform,Ayub-Khan/edx-platform,DefyVentures/edx-platform,kamalx/edx-platform,mitocw/edx-platform,jazztpt/edx-platform,BehavioralInsightsTeam/edx-platform,jruiperezv/ANALYSE,iivic/BoiseStateX,iivic/BoiseStateX,eduNEXT/edx-platform,kmoocdev/edx-platform,fly19890211/edx-platform,procangroup/edx-platform,edx-solutions/edx-platform,beacloudgenius/edx-platform,nanolearning/edx-platform,nanolearning/edx-platform,yokose-ks/edx-platform,dsajkl/reqiop,y12uc231/edx-platform,prarthitm/edxplatform,longmen21/edx-platform,dkarakats/edx-platform,beni55/edx-platform,arbrandes/edx-platform,abdoosh00/edx-rtl-final,playm2mboy/edx-platform,ahmedaljazzar/edx-platform,marcore/edx-platform,JioEducation/edx-platform,ovnicraft/edx-platform,mjg2203/edx-platform-seas,raccoongang/edx-platform,CourseTalk/edx-platform,antoviaque/edx-platform,B-MOOC/edx-platform,Edraak/edx-platform,IITBinterns13/edx-platform-dev,benpatterson/edx-platform,IITBinterns13/edx-platform-dev,AkA84/edx-platform,CredoReference/edx-platform,RPI-OPENEDX/edx-platform,analyseuc3m/ANALYSE-v1,jamiefolsom/edx-platform,dsajkl/123,DefyVentures/edx-platform,alexthered/kienhoc-platform,BehavioralInsightsTeam/edx-platform,rationalAgent/edx-platform-custom,jbassen/edx-platform,leansoft/edx-platform,polimediaupv/edx-platform,itsjeyd/edx-platform,miptliot/edx-platform,jbassen/edx-platform,vasyarv/edx-platform,MakeHer/edx-platform,eemirtekin/edx-platform,nikolas/edx-platform,nanolearning/edx-platform,lduarte1991/edx-platform,benpatterson/edx-platform,msegado/edx-platform,jruiperezv/ANALYSE,sameetb-cuelogic/edx-platform-test,sameetb-cuelogic/edx-platform-test,antonve/s4-project-mooc,mahendra-r/edx-platform,bdero/edx-platform,stvstnfrd/edx-platform,Lektorium-LLC/edx-platform,raccoongang/edx-platform,nanolearningllc/edx-platform-cypress,bitifirefly/edx-platform,doganov/edx-platform,jswope00/griffinx,EduPepperPDTesting/pepper2013-testing,prarthitm/edxplatform,AkA84/edx-platform,edx/edx-platform,Softmotions/edx-platform,zubair-arbi/edx-platform,zadgroup/edx-platform,knehez/edx-platform,unicri/edx-platform,rhndg/openedx,tanmaykm/edx-platform,longmen21/edx-platform,vasyarv/edx-platform,waheedahmed/edx-platform,JioEducation/edx-platform,caesar2164/edx-platform,ferabra/edx-platform,jazkarta/edx-platform-for-isc,shubhdev/edx-platform,LearnEra/LearnEraPlaftform,dkarakats/edx-platform,vasyarv/edx-platform,raccoongang/edx-platform,iivic/BoiseStateX,shubhdev/edxOnBaadal,simbs/edx-platform,etzhou/edx-platform,jamesblunt/edx-platform,Ayub-Khan/edx-platform,franosincic/edx-platform,CourseTalk/edx-platform,cselis86/edx-platform,openfun/edx-platform,devs1991/test_edx_docmode,shabab12/edx-platform,bigdatauniversity/edx-platform,atsolakid/edx-platform,atsolakid/edx-platform,ZLLab-Mooc/edx-platform,bigdatauniversity/edx-platform,syjeon/new_edx,Livit/Livit.Learn.EdX,kxliugang/edx-platform,DNFcode/edx-platform,eemirtekin/edx-platform,waheedahmed/edx-platform,xingyepei/edx-platform,tiagochiavericosta/edx-platform,jonathan-beard/edx-platform,AkA84/edx-platform,cecep-edu/edx-platform,Semi-global/edx-platform,torchingloom/edx-platform,y12uc231/edx-platform,playm2mboy/edx-platform,shubhdev/edxOnBaadal,etzhou/edx-platform,ferabra/edx-platform,Unow/edx-platform,Kalyzee/edx-platform,Edraak/circleci-edx-platform,4eek/edx-platform,msegado/edx-platform,jelugbo/tundex,louyihua/edx-platform,ZLLab-Mooc/edx-platform,DefyVentures/edx-platform,iivic/BoiseStateX,don-github/edx-platform,DefyVentures/edx-platform,sameetb-cuelogic/edx-platform-test,ubc/edx-platform,xuxiao19910803/edx,yokose-ks/edx-platform,solashirai/edx-platform,chand3040/cloud_that,fly19890211/edx-platform,Edraak/circleci-edx-platform,doismellburning/edx-platform,mbareta/edx-platform-ft,kamalx/edx-platform,mahendra-r/edx-platform,zubair-arbi/edx-platform,devs1991/test_edx_docmode,ESOedX/edx-platform,torchingloom/edx-platform,hastexo/edx-platform,mushtaqak/edx-platform,vikas1885/test1,cpennington/edx-platform,eestay/edx-platform,OmarIthawi/edx-platform,dcosentino/edx-platform,ovnicraft/edx-platform,mtlchun/edx,jelugbo/tundex,y12uc231/edx-platform,synergeticsedx/deployment-wipro,doismellburning/edx-platform,J861449197/edx-platform,chauhanhardik/populo,pomegranited/edx-platform,tiagochiavericosta/edx-platform,martynovp/edx-platform,ampax/edx-platform-backup,SivilTaram/edx-platform,edx-solutions/edx-platform,AkA84/edx-platform,kmoocdev/edx-platform,jzoldak/edx-platform,marcore/edx-platform,andyzsf/edx,shubhdev/openedx,B-MOOC/edx-platform,caesar2164/edx-platform,romain-li/edx-platform,eduNEXT/edunext-platform,JCBarahona/edX,cselis86/edx-platform,IITBinterns13/edx-platform-dev,hamzehd/edx-platform,martynovp/edx-platform,xuxiao19910803/edx-platform,doismellburning/edx-platform,teltek/edx-platform,Unow/edx-platform,bdero/edx-platform,xuxiao19910803/edx-platform,chrisndodge/edx-platform,appsembler/edx-platform,xuxiao19910803/edx-platform,a-parhom/edx-platform,nanolearningllc/edx-platform-cypress,ampax/edx-platform-backup,kalebhartje/schoolboost,TsinghuaX/edx-platform,kmoocdev2/edx-platform,IONISx/edx-platform,wwj718/edx-platform,wwj718/ANALYSE,mjg2203/edx-platform-seas,ak2703/edx-platform,appliedx/edx-platform,mushtaqak/edx-platform,a-parhom/edx-platform,ampax/edx-platform-backup,appsembler/edx-platform,knehez/edx-platform,chand3040/cloud_that,apigee/edx-platform,wwj718/edx-platform,jbzdak/edx-platform,miptliot/edx-platform,jruiperezv/ANALYSE,jazkarta/edx-platform,PepperPD/edx-pepper-platform,cyanna/edx-platform,rationalAgent/edx-platform-custom,jazkarta/edx-platform-for-isc,10clouds/edx-platform,amir-qayyum-khan/edx-platform,kursitet/edx-platform,Stanford-Online/edx-platform,jzoldak/edx-platform,ahmadiga/min_edx,WatanabeYasumasa/edx-platform,stvstnfrd/edx-platform,rue89-tech/edx-platform,cognitiveclass/edx-platform,ahmedaljazzar/edx-platform,lduarte1991/edx-platform,a-parhom/edx-platform,caesar2164/edx-platform,ubc/edx-platform,valtech-mooc/edx-platform,jbassen/edx-platform,EduPepperPD/pepper2013,zadgroup/edx-platform,Semi-global/edx-platform,kalebhartje/schoolboost,jolyonb/edx-platform,utecuy/edx-platform,Lektorium-LLC/edx-platform,nikolas/edx-platform,IndonesiaX/edx-platform,chauhanhardik/populo_2,IONISx/edx-platform,ak2703/edx-platform,jazkarta/edx-platform,B-MOOC/edx-platform,wwj718/ANALYSE,mtlchun/edx,B-MOOC/edx-platform,nikolas/edx-platform,rismalrv/edx-platform,waheedahmed/edx-platform,unicri/edx-platform,martynovp/edx-platform,OmarIthawi/edx-platform,halvertoluke/edx-platform,iivic/BoiseStateX,xuxiao19910803/edx,naresh21/synergetics-edx-platform,EduPepperPDTesting/pepper2013-testing,morenopc/edx-platform,auferack08/edx-platform,J861449197/edx-platform,cognitiveclass/edx-platform,jbzdak/edx-platform,nanolearning/edx-platform,xinjiguaike/edx-platform,polimediaupv/edx-platform,appliedx/edx-platform,motion2015/a3,hamzehd/edx-platform,jjmiranda/edx-platform,itsjeyd/edx-platform,RPI-OPENEDX/edx-platform,JCBarahona/edX,DNFcode/edx-platform,jswope00/griffinx,xinjiguaike/edx-platform,mcgachey/edx-platform,andyzsf/edx,kursitet/edx-platform,nttks/jenkins-test,benpatterson/edx-platform,jbassen/edx-platform,nttks/edx-platform,auferack08/edx-platform,nagyistoce/edx-platform,jswope00/griffinx,Shrhawk/edx-platform,valtech-mooc/edx-platform,SivilTaram/edx-platform,leansoft/edx-platform,devs1991/test_edx_docmode,SravanthiSinha/edx-platform,cecep-edu/edx-platform,teltek/edx-platform,gsehub/edx-platform,gymnasium/edx-platform,peterm-itr/edx-platform,vikas1885/test1,rismalrv/edx-platform,Shrhawk/edx-platform,morpheby/levelup-by,kmoocdev/edx-platform,edry/edx-platform,jswope00/GAI,eduNEXT/edx-platform,nttks/jenkins-test,UOMx/edx-platform,nttks/jenkins-test,jazkarta/edx-platform-for-isc,bdero/edx-platform,zubair-arbi/edx-platform,appliedx/edx-platform,don-github/edx-platform,zhenzhai/edx-platform,motion2015/a3,prarthitm/edxplatform,rhndg/openedx,ferabra/edx-platform,Edraak/edx-platform,zerobatu/edx-platform,zerobatu/edx-platform,abdoosh00/edx-rtl-final,ahmadio/edx-platform,devs1991/test_edx_docmode,edx/edx-platform,martynovp/edx-platform,rismalrv/edx-platform,Semi-global/edx-platform,halvertoluke/edx-platform,Softmotions/edx-platform,IndonesiaX/edx-platform,ak2703/edx-platform,praveen-pal/edx-platform,chauhanhardik/populo,sudheerchintala/LearnEraPlatForm,IITBinterns13/edx-platform-dev,jazztpt/edx-platform,RPI-OPENEDX/edx-platform,motion2015/a3,antonve/s4-project-mooc,antoviaque/edx-platform,abdoosh00/edx-rtl-final,shubhdev/openedx,chrisndodge/edx-platform,JCBarahona/edX,ahmadiga/min_edx,sudheerchintala/LearnEraPlatForm,hamzehd/edx-platform,deepsrijit1105/edx-platform,chand3040/cloud_that,shabab12/edx-platform,lduarte1991/edx-platform,jonathan-beard/edx-platform,UXE/local-edx,Edraak/edraak-platform,chudaol/edx-platform,MSOpenTech/edx-platform,nagyistoce/edx-platform,amir-qayyum-khan/edx-platform,waheedahmed/edx-platform,mushtaqak/edx-platform,Kalyzee/edx-platform,pku9104038/edx-platform,stvstnfrd/edx-platform,dsajkl/reqiop,ampax/edx-platform,unicri/edx-platform,Softmotions/edx-platform,msegado/edx-platform,philanthropy-u/edx-platform,abdoosh00/edraak,eestay/edx-platform,jzoldak/edx-platform,naresh21/synergetics-edx-platform,chudaol/edx-platform,hamzehd/edx-platform,TsinghuaX/edx-platform,motion2015/edx-platform,tiagochiavericosta/edx-platform,ahmedaljazzar/edx-platform,eemirtekin/edx-platform,solashirai/edx-platform,Kalyzee/edx-platform,IndonesiaX/edx-platform,chrisndodge/edx-platform,auferack08/edx-platform,torchingloom/edx-platform,EDUlib/edx-platform,stvstnfrd/edx-platform,LearnEra/LearnEraPlaftform,WatanabeYasumasa/edx-platform,vismartltd/edx-platform,sudheerchintala/LearnEraPlatForm,nttks/jenkins-test,hastexo/edx-platform,devs1991/test_edx_docmode,Edraak/edx-platform,zhenzhai/edx-platform,CourseTalk/edx-platform,pomegranited/edx-platform,cpennington/edx-platform,Lektorium-LLC/edx-platform,praveen-pal/edx-platform,yokose-ks/edx-platform,IndonesiaX/edx-platform,zerobatu/edx-platform,jswope00/griffinx,hkawasaki/kawasaki-aio8-1,Edraak/circleci-edx-platform,abdoosh00/edraak,andyzsf/edx,dkarakats/edx-platform,EDUlib/edx-platform,xuxiao19910803/edx-platform,CourseTalk/edx-platform,gymnasium/edx-platform,dcosentino/edx-platform,LICEF/edx-platform,hmcmooc/muddx-platform,TsinghuaX/edx-platform,UOMx/edx-platform,zofuthan/edx-platform,leansoft/edx-platform,Semi-global/edx-platform,jonathan-beard/edx-platform,SivilTaram/edx-platform,kalebhartje/schoolboost,vismartltd/edx-platform,pepeportela/edx-platform,nttks/edx-platform,UXE/local-edx,nagyistoce/edx-platform,MSOpenTech/edx-platform,kamalx/edx-platform,don-github/edx-platform,jolyonb/edx-platform,jelugbo/tundex,hkawasaki/kawasaki-aio8-0,jswope00/GAI,abdoosh00/edx-rtl-final,franosincic/edx-platform,appliedx/edx-platform,vikas1885/test1,MakeHer/edx-platform,MakeHer/edx-platform,amir-qayyum-khan/edx-platform,PepperPD/edx-pepper-platform,mitocw/edx-platform,ovnicraft/edx-platform,alu042/edx-platform,J861449197/edx-platform,jbassen/edx-platform,beni55/edx-platform,arifsetiawan/edx-platform,SivilTaram/edx-platform,procangroup/edx-platform,playm2mboy/edx-platform,pelikanchik/edx-platform,pelikanchik/edx-platform,adoosii/edx-platform,romain-li/edx-platform,teltek/edx-platform,LICEF/edx-platform,MakeHer/edx-platform,ZLLab-Mooc/edx-platform,mjirayu/sit_academy,morenopc/edx-platform,hkawasaki/kawasaki-aio8-0,carsongee/edx-platform,tanmaykm/edx-platform,edx/edx-platform,benpatterson/edx-platform,hmcmooc/muddx-platform,ahmadio/edx-platform,y12uc231/edx-platform,vasyarv/edx-platform,vismartltd/edx-platform,IndonesiaX/edx-platform,jazkarta/edx-platform,Stanford-Online/edx-platform,morpheby/levelup-by,ak2703/edx-platform,RPI-OPENEDX/edx-platform,utecuy/edx-platform,zofuthan/edx-platform,arifsetiawan/edx-platform,pku9104038/edx-platform,doganov/edx-platform,simbs/edx-platform,carsongee/edx-platform,yokose-ks/edx-platform,itsjeyd/edx-platform,Edraak/circleci-edx-platform,ahmadio/edx-platform,jazkarta/edx-platform-for-isc,peterm-itr/edx-platform,eemirtekin/edx-platform,Edraak/edraak-platform,alu042/edx-platform,defance/edx-platform,BehavioralInsightsTeam/edx-platform,cecep-edu/edx-platform,sameetb-cuelogic/edx-platform-test,MSOpenTech/edx-platform,Stanford-Online/edx-platform,cselis86/edx-platform,valtech-mooc/edx-platform,hkawasaki/kawasaki-aio8-0,kmoocdev2/edx-platform,syjeon/new_edx,LearnEra/LearnEraPlaftform,beacloudgenius/edx-platform,ZLLab-Mooc/edx-platform,bigdatauniversity/edx-platform,louyihua/edx-platform,shashank971/edx-platform,apigee/edx-platform,wwj718/ANALYSE,mjirayu/sit_academy,carsongee/edx-platform,ferabra/edx-platform,wwj718/ANALYSE,zadgroup/edx-platform,devs1991/test_edx_docmode,simbs/edx-platform,jamesblunt/edx-platform,B-MOOC/edx-platform,kmoocdev/edx-platform,jazkarta/edx-platform,motion2015/edx-platform,nikolas/edx-platform,IONISx/edx-platform,jolyonb/edx-platform,Shrhawk/edx-platform,peterm-itr/edx-platform,halvertoluke/edx-platform,olexiim/edx-platform,proversity-org/edx-platform,marcore/edx-platform,polimediaupv/edx-platform,analyseuc3m/ANALYSE-v1,hamzehd/edx-platform,shashank971/edx-platform,beacloudgenius/edx-platform,mbareta/edx-platform-ft,xingyepei/edx-platform,nagyistoce/edx-platform,mitocw/edx-platform,nttks/edx-platform,edry/edx-platform,etzhou/edx-platform,jonathan-beard/edx-platform,vikas1885/test1,jjmiranda/edx-platform,jbzdak/edx-platform,longmen21/edx-platform,vikas1885/test1,inares/edx-platform,yokose-ks/edx-platform,zerobatu/edx-platform,arifsetiawan/edx-platform,motion2015/edx-platform,ak2703/edx-platform,atsolakid/edx-platform,kxliugang/edx-platform,jjmiranda/edx-platform,ahmadiga/min_edx,kmoocdev2/edx-platform,shashank971/edx-platform,Livit/Livit.Learn.EdX,jamesblunt/edx-platform,ubc/edx-platform,DNFcode/edx-platform,10clouds/edx-platform,eduNEXT/edunext-platform,antonve/s4-project-mooc,zofuthan/edx-platform,shashank971/edx-platform,eduNEXT/edunext-platform,nttks/jenkins-test,adoosii/edx-platform,rhndg/openedx,dsajkl/123,leansoft/edx-platform,arifsetiawan/edx-platform,kalebhartje/schoolboost,EduPepperPDTesting/pepper2013-testing,edry/edx-platform,arbrandes/edx-platform,TsinghuaX/edx-platform,doismellburning/edx-platform,syjeon/new_edx,shurihell/testasia,arbrandes/edx-platform,Livit/Livit.Learn.EdX,UOMx/edx-platform,jbzdak/edx-platform,benpatterson/edx-platform,xuxiao19910803/edx,kmoocdev2/edx-platform,jswope00/GAI,jbzdak/edx-platform,marcore/edx-platform,cselis86/edx-platform,ESOedX/edx-platform,nanolearningllc/edx-platform-cypress,peterm-itr/edx-platform,cognitiveclass/edx-platform,hkawasaki/kawasaki-aio8-2,halvertoluke/edx-platform,cpennington/edx-platform,Edraak/edx-platform,gymnasium/edx-platform,Unow/edx-platform,Lektorium-LLC/edx-platform,wwj718/edx-platform,chauhanhardik/populo,mtlchun/edx,appsembler/edx-platform,Kalyzee/edx-platform,zofuthan/edx-platform,EduPepperPDTesting/pepper2013-testing,teltek/edx-platform,pabloborrego93/edx-platform,apigee/edx-platform,jamesblunt/edx-platform,rue89-tech/edx-platform,sameetb-cuelogic/edx-platform-test,kxliugang/edx-platform,DefyVentures/edx-platform,jamiefolsom/edx-platform,proversity-org/edx-platform,zadgroup/edx-platform,bitifirefly/edx-platform,fintech-circle/edx-platform,solashirai/edx-platform,defance/edx-platform,nikolas/edx-platform,chauhanhardik/populo_2,ovnicraft/edx-platform,Stanford-Online/edx-platform,chudaol/edx-platform,ahmedaljazzar/edx-platform,tanmaykm/edx-platform,J861449197/edx-platform,cecep-edu/edx-platform,beacloudgenius/edx-platform,zadgroup/edx-platform,JCBarahona/edX,dsajkl/reqiop,Edraak/edx-platform,PepperPD/edx-pepper-platform,carsongee/edx-platform,dcosentino/edx-platform,nanolearningllc/edx-platform-cypress-2,Semi-global/edx-platform,eestay/edx-platform,eduNEXT/edx-platform,openfun/edx-platform,Softmotions/edx-platform,eduNEXT/edunext-platform,Shrhawk/edx-platform,ampax/edx-platform,Endika/edx-platform,proversity-org/edx-platform,devs1991/test_edx_docmode,jelugbo/tundex,cyanna/edx-platform,romain-li/edx-platform,bdero/edx-platform,knehez/edx-platform,longmen21/edx-platform,jjmiranda/edx-platform,beni55/edx-platform,LICEF/edx-platform,hkawasaki/kawasaki-aio8-0,morpheby/levelup-by,ZLLab-Mooc/edx-platform,jamesblunt/edx-platform,ESOedX/edx-platform,zhenzhai/edx-platform,SravanthiSinha/edx-platform,edx-solutions/edx-platform,UOMx/edx-platform,chauhanhardik/populo_2,shabab12/edx-platform,praveen-pal/edx-platform,olexiim/edx-platform,deepsrijit1105/edx-platform,jolyonb/edx-platform,wwj718/ANALYSE,ahmadio/edx-platform,antoviaque/edx-platform,hkawasaki/kawasaki-aio8-1,fly19890211/edx-platform,nanolearningllc/edx-platform-cypress,polimediaupv/edx-platform,etzhou/edx-platform,JioEducation/edx-platform,pabloborrego93/edx-platform,Endika/edx-platform,UXE/local-edx,cecep-edu/edx-platform,xinjiguaike/edx-platform,motion2015/edx-platform,LearnEra/LearnEraPlaftform,DNFcode/edx-platform,xuxiao19910803/edx,analyseuc3m/ANALYSE-v1,mbareta/edx-platform-ft,jazztpt/edx-platform,jelugbo/tundex,mtlchun/edx,martynovp/edx-platform,shubhdev/edx-platform,AkA84/edx-platform,shabab12/edx-platform,nanolearningllc/edx-platform-cypress-2,chauhanhardik/populo,praveen-pal/edx-platform,philanthropy-u/edx-platform,mtlchun/edx,defance/edx-platform,fintech-circle/edx-platform,kamalx/edx-platform,mjirayu/sit_academy,franosincic/edx-platform,zhenzhai/edx-platform,hmcmooc/muddx-platform,caesar2164/edx-platform,hkawasaki/kawasaki-aio8-1,cyanna/edx-platform,ferabra/edx-platform,jruiperezv/ANALYSE,jamiefolsom/edx-platform,jonathan-beard/edx-platform,nanolearningllc/edx-platform-cypress-2,eestay/edx-platform,chand3040/cloud_that,SravanthiSinha/edx-platform,dkarakats/edx-platform,halvertoluke/edx-platform,romain-li/edx-platform,shubhdev/openedx,EDUlib/edx-platform,Endika/edx-platform,dcosentino/edx-platform,edry/edx-platform,chauhanhardik/populo,rismalrv/edx-platform,chand3040/cloud_that,jruiperezv/ANALYSE,hastexo/edx-platform,rismalrv/edx-platform,alu042/edx-platform,devs1991/test_edx_docmode,louyihua/edx-platform,LICEF/edx-platform,andyzsf/edx,alexthered/kienhoc-platform,knehez/edx-platform,MakeHer/edx-platform,xingyepei/edx-platform,chauhanhardik/populo_2,louyihua/edx-platform,nanolearningllc/edx-platform-cypress,gymnasium/edx-platform,cognitiveclass/edx-platform,beni55/edx-platform,xinjiguaike/edx-platform,SravanthiSinha/edx-platform,Endika/edx-platform,mjg2203/edx-platform-seas,TeachAtTUM/edx-platform,shubhdev/edx-platform,ESOedX/edx-platform,playm2mboy/edx-platform,OmarIthawi/edx-platform,shurihell/testasia,EDUlib/edx-platform,beacloudgenius/edx-platform,olexiim/edx-platform,solashirai/edx-platform,LICEF/edx-platform,kursitet/edx-platform,fintech-circle/edx-platform,EduPepperPD/pepper2013,morenopc/edx-platform,chudaol/edx-platform,unicri/edx-platform,mahendra-r/edx-platform,shubhdev/edx-platform,rationalAgent/edx-platform-custom,Ayub-Khan/edx-platform,doganov/edx-platform,sudheerchintala/LearnEraPlatForm,nttks/edx-platform,dsajkl/123,bitifirefly/edx-platform,auferack08/edx-platform,alu042/edx-platform,xuxiao19910803/edx-platform,jswope00/griffinx,jamiefolsom/edx-platform,pdehaye/theming-edx-platform,chudaol/edx-platform,eestay/edx-platform,chauhanhardik/populo_2,10clouds/edx-platform,polimediaupv/edx-platform,edry/edx-platform,waheedahmed/edx-platform,shubhdev/openedx,etzhou/edx-platform,Edraak/edraak-platform,rationalAgent/edx-platform-custom,unicri/edx-platform,mahendra-r/edx-platform,4eek/edx-platform,proversity-org/edx-platform,4eek/edx-platform,shubhdev/openedx,analyseuc3m/ANALYSE-v1,dsajkl/reqiop,miptliot/edx-platform,PepperPD/edx-pepper-platform,chrisndodge/edx-platform,WatanabeYasumasa/edx-platform,zofuthan/edx-platform,jswope00/GAI,pomegranited/edx-platform,pabloborrego93/edx-platform,amir-qayyum-khan/edx-platform,JCBarahona/edX,utecuy/edx-platform,abdoosh00/edraak,solashirai/edx-platform,Edraak/edraak-platform,EduPepperPD/pepper2013,cognitiveclass/edx-platform,vismartltd/edx-platform,ahmadiga/min_edx,appsembler/edx-platform,zerobatu/edx-platform,fly19890211/edx-platform,hkawasaki/kawasaki-aio8-1,olexiim/edx-platform,ampax/edx-platform-backup,tiagochiavericosta/edx-platform,pomegranited/edx-platform,ampax/edx-platform,kxliugang/edx-platform,wwj718/edx-platform,alexthered/kienhoc-platform,hkawasaki/kawasaki-aio8-2,jzoldak/edx-platform,torchingloom/edx-platform,TeachAtTUM/edx-platform,itsjeyd/edx-platform,pdehaye/theming-edx-platform,abdoosh00/edraak,fly19890211/edx-platform,morpheby/levelup-by,pepeportela/edx-platform,synergeticsedx/deployment-wipro,procangroup/edx-platform,defance/edx-platform,deepsrijit1105/edx-platform,atsolakid/edx-platform,doganov/edx-platform,alexthered/kienhoc-platform,xingyepei/edx-platform,doganov/edx-platform,angelapper/edx-platform,UXE/local-edx,utecuy/edx-platform,tanmaykm/edx-platform,motion2015/edx-platform,hastexo/edx-platform,nanolearning/edx-platform | text | ## Code Before:
-e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles
-e git://github.com/MITx/django-pipeline.git#egg=django-pipeline
-e git://github.com/rocha/django-wiki.git@33e9a24b9a20#egg=django-wiki
-e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e common/lib/capa
-e common/lib/xmodule
## Instruction:
Switch django-wiki dependency to a clone in our org so that local changes are easier to make
## Code After:
-e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles
-e git://github.com/MITx/django-pipeline.git#egg=django-pipeline
-e git://github.com/MITx/django-wiki.git@e2e84558#egg=django-wiki
-e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e common/lib/capa
-e common/lib/xmodule
| -e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles
-e git://github.com/MITx/django-pipeline.git#egg=django-pipeline
- -e git://github.com/rocha/django-wiki.git@33e9a24b9a20#egg=django-wiki
? ^^^^^ -- -- ^^^^^
+ -e git://github.com/MITx/django-wiki.git@e2e84558#egg=django-wiki
? ^^^^ ++ ^^^
-e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
-e common/lib/capa
-e common/lib/xmodule | 2 | 0.333333 | 1 | 1 |
60ac00588bdba3a2e5a7e21c25e3232372a5e201 | src/styles/main.scss | src/styles/main.scss | * {
box-sizing: border-box;
}
body {
width: 372px;
margin: 0;
padding: 0;
font-size: 0;
}
.app-title {
margin: 0;
margin-bottom: 5px;
font-size: 12px;
font-weight: 400;
color: rgba(#000, 0.5);
}
.app-header {
border: solid 1px rgba(#000, 0.3);
padding: 20px;
padding-top: 15px;
background-color: #f3f3f3;
}
.search-input {
width: 100%;
border-style: solid;
border-width: 1px;
border-color: rgba(#000, 0.3);
padding: 6px 12px;
font-size: 16px;
&:focus {
outline-width: 0;
border-color: #36c;
box-shadow: 0 0 5px 2px #9cf;
}
}
| * {
box-sizing: border-box;
}
body {
width: 372px;
margin: 0;
padding: 0;
font-size: 0;
}
.app-header {
border: solid 1px rgba(#000, 0.3);
padding: 20px;
padding-top: 15px;
background-color: #f3f3f3;
}
.app-title {
margin: 0;
margin-bottom: 5px;
font-size: 12px;
font-weight: 400;
color: rgba(#000, 0.5);
}
.search-input {
width: 100%;
border-style: solid;
border-width: 1px;
border-color: rgba(#000, 0.3);
padding: 6px 12px;
font-size: 16px;
&:focus {
outline-width: 0;
border-color: #36c;
box-shadow: 0 0 5px 2px #9cf;
}
}
| Move .app-title rule below .app-header | Move .app-title rule below .app-header
Since the .app-title is contained within the .app-header, .app-title
ought to be listed below .app-header rather than above it.
| SCSS | mit | caleb531/youversion-suggest-chrome,caleb531/youversion-suggest-chrome | scss | ## Code Before:
* {
box-sizing: border-box;
}
body {
width: 372px;
margin: 0;
padding: 0;
font-size: 0;
}
.app-title {
margin: 0;
margin-bottom: 5px;
font-size: 12px;
font-weight: 400;
color: rgba(#000, 0.5);
}
.app-header {
border: solid 1px rgba(#000, 0.3);
padding: 20px;
padding-top: 15px;
background-color: #f3f3f3;
}
.search-input {
width: 100%;
border-style: solid;
border-width: 1px;
border-color: rgba(#000, 0.3);
padding: 6px 12px;
font-size: 16px;
&:focus {
outline-width: 0;
border-color: #36c;
box-shadow: 0 0 5px 2px #9cf;
}
}
## Instruction:
Move .app-title rule below .app-header
Since the .app-title is contained within the .app-header, .app-title
ought to be listed below .app-header rather than above it.
## Code After:
* {
box-sizing: border-box;
}
body {
width: 372px;
margin: 0;
padding: 0;
font-size: 0;
}
.app-header {
border: solid 1px rgba(#000, 0.3);
padding: 20px;
padding-top: 15px;
background-color: #f3f3f3;
}
.app-title {
margin: 0;
margin-bottom: 5px;
font-size: 12px;
font-weight: 400;
color: rgba(#000, 0.5);
}
.search-input {
width: 100%;
border-style: solid;
border-width: 1px;
border-color: rgba(#000, 0.3);
padding: 6px 12px;
font-size: 16px;
&:focus {
outline-width: 0;
border-color: #36c;
box-shadow: 0 0 5px 2px #9cf;
}
}
| * {
box-sizing: border-box;
}
body {
width: 372px;
margin: 0;
padding: 0;
font-size: 0;
}
+ .app-header {
+ border: solid 1px rgba(#000, 0.3);
+ padding: 20px;
+ padding-top: 15px;
+ background-color: #f3f3f3;
+ }
.app-title {
margin: 0;
margin-bottom: 5px;
font-size: 12px;
font-weight: 400;
color: rgba(#000, 0.5);
- }
- .app-header {
- border: solid 1px rgba(#000, 0.3);
- padding: 20px;
- padding-top: 15px;
- background-color: #f3f3f3;
}
.search-input {
width: 100%;
border-style: solid;
border-width: 1px;
border-color: rgba(#000, 0.3);
padding: 6px 12px;
font-size: 16px;
&:focus {
outline-width: 0;
border-color: #36c;
box-shadow: 0 0 5px 2px #9cf;
}
} | 12 | 0.315789 | 6 | 6 |
2678bb6e37c8bf8a69d788a677b7244cc142537a | app/assets/stylesheets/frontend/utils/_topic-features.scss | app/assets/stylesheets/frontend/utils/_topic-features.scss | @mixin topic-features {
.featured-news {
@extend %contain-floats;
margin: 0 (-$gutter-half);
article {
width: 100%;
}
&.items-1 {
article {
.img-holder {
@include media(tablet){
width: 50%;
float: left;
}
}
.text {
@include media(tablet){
width: 50%;
float: left;
h2, p {
padding-left: $gutter-half;
}
}
}
}
}
&.items-3,
&.items-4 {
article {
@include media(tablet) {
width: 33.33%;
&.item-0,
&.item-1 {
width: 50%;
float: left;
}
}
}
.item-2 {
clear: left;
}
}
&.items-2,
&.items-5 {
article {
@include media(tablet){
width: 33.33%;
float: left;
}
}
.item-3 {
clear: left;
}
}
}
}
| @mixin topic-features {
.featured-news {
@extend %contain-floats;
margin: 0 (-$gutter-half);
article {
width: 100%;
}
&.items-1 {
article {
@include media(tablet) {
float: left;
width: 33.33%;
}
}
}
&.items-3,
&.items-4 {
article {
@include media(tablet) {
width: 33.33%;
&.item-0,
&.item-1 {
width: 50%;
float: left;
}
}
}
.item-2 {
clear: left;
}
}
&.items-2,
&.items-5 {
article {
@include media(tablet){
width: 33.33%;
float: left;
}
}
.item-3 {
clear: left;
}
}
}
}
| Fix layout for 1 featured item on topics | Fix layout for 1 featured item on topics
https://www.pivotaltracker.com/story/show/58961990
| SCSS | mit | ggoral/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,hotvulcan/whitehall,ggoral/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,askl56/whitehall,askl56/whitehall,ggoral/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,alphagov/whitehall,hotvulcan/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,alphagov/whitehall | scss | ## Code Before:
@mixin topic-features {
.featured-news {
@extend %contain-floats;
margin: 0 (-$gutter-half);
article {
width: 100%;
}
&.items-1 {
article {
.img-holder {
@include media(tablet){
width: 50%;
float: left;
}
}
.text {
@include media(tablet){
width: 50%;
float: left;
h2, p {
padding-left: $gutter-half;
}
}
}
}
}
&.items-3,
&.items-4 {
article {
@include media(tablet) {
width: 33.33%;
&.item-0,
&.item-1 {
width: 50%;
float: left;
}
}
}
.item-2 {
clear: left;
}
}
&.items-2,
&.items-5 {
article {
@include media(tablet){
width: 33.33%;
float: left;
}
}
.item-3 {
clear: left;
}
}
}
}
## Instruction:
Fix layout for 1 featured item on topics
https://www.pivotaltracker.com/story/show/58961990
## Code After:
@mixin topic-features {
.featured-news {
@extend %contain-floats;
margin: 0 (-$gutter-half);
article {
width: 100%;
}
&.items-1 {
article {
@include media(tablet) {
float: left;
width: 33.33%;
}
}
}
&.items-3,
&.items-4 {
article {
@include media(tablet) {
width: 33.33%;
&.item-0,
&.item-1 {
width: 50%;
float: left;
}
}
}
.item-2 {
clear: left;
}
}
&.items-2,
&.items-5 {
article {
@include media(tablet){
width: 33.33%;
float: left;
}
}
.item-3 {
clear: left;
}
}
}
}
| @mixin topic-features {
.featured-news {
@extend %contain-floats;
margin: 0 (-$gutter-half);
article {
width: 100%;
}
&.items-1 {
article {
- .img-holder {
- @include media(tablet){
? --
+ @include media(tablet) {
? +
- width: 50%;
- float: left;
? --
+ float: left;
- }
- }
- .text {
- @include media(tablet){
- width: 50%;
? -- ^^
+ width: 33.33%;
? ^^^^^
- float: left;
-
- h2, p {
- padding-left: $gutter-half;
- }
- }
}
}
}
&.items-3,
&.items-4 {
article {
@include media(tablet) {
width: 33.33%;
&.item-0,
&.item-1 {
width: 50%;
float: left;
}
}
}
.item-2 {
clear: left;
}
}
&.items-2,
&.items-5 {
article {
@include media(tablet){
width: 33.33%;
float: left;
}
}
.item-3 {
clear: left;
}
}
}
} | 18 | 0.295082 | 3 | 15 |
f6cd6b3377769af524377979438b9e662bb9175a | tangled/site/model/base.py | tangled/site/model/base.py | import datetime
from sqlalchemy.schema import Column
from sqlalchemy.types import DateTime, Integer
from sqlalchemy.ext.declarative import declarative_base, declared_attr
Base = declarative_base()
class BaseMixin:
id = Column(Integer, primary_key=True)
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
class TimestampMixin:
created_at = Column(
DateTime, nullable=False, default=datetime.datetime.now)
updated_at = Column(DateTime)
| from datetime import datetime
from sqlalchemy.schema import Column
from sqlalchemy.types import DateTime, Integer
from sqlalchemy.ext.declarative import declarative_base, declared_attr
Base = declarative_base()
class BaseMixin:
id = Column(Integer, primary_key=True)
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
class TimestampMixin:
created_at = Column(DateTime, nullable=False, default=datetime.now)
updated_at = Column(DateTime, onupdate=datetime.now)
| Update updated time on update | Update updated time on update
I.e., added onupdate=datetime.now to TimestampMixin.updated_at so that it will
be automatically updated whenever a record is edited.
| Python | mit | TangledWeb/tangled.site | python | ## Code Before:
import datetime
from sqlalchemy.schema import Column
from sqlalchemy.types import DateTime, Integer
from sqlalchemy.ext.declarative import declarative_base, declared_attr
Base = declarative_base()
class BaseMixin:
id = Column(Integer, primary_key=True)
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
class TimestampMixin:
created_at = Column(
DateTime, nullable=False, default=datetime.datetime.now)
updated_at = Column(DateTime)
## Instruction:
Update updated time on update
I.e., added onupdate=datetime.now to TimestampMixin.updated_at so that it will
be automatically updated whenever a record is edited.
## Code After:
from datetime import datetime
from sqlalchemy.schema import Column
from sqlalchemy.types import DateTime, Integer
from sqlalchemy.ext.declarative import declarative_base, declared_attr
Base = declarative_base()
class BaseMixin:
id = Column(Integer, primary_key=True)
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
class TimestampMixin:
created_at = Column(DateTime, nullable=False, default=datetime.now)
updated_at = Column(DateTime, onupdate=datetime.now)
| - import datetime
+ from datetime import datetime
from sqlalchemy.schema import Column
from sqlalchemy.types import DateTime, Integer
from sqlalchemy.ext.declarative import declarative_base, declared_attr
Base = declarative_base()
class BaseMixin:
id = Column(Integer, primary_key=True)
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()
class TimestampMixin:
- created_at = Column(
- DateTime, nullable=False, default=datetime.datetime.now)
? ^^ ---------
+ created_at = Column(DateTime, nullable=False, default=datetime.now)
? ++++++++++ + ^^^^^^^
- updated_at = Column(DateTime)
+ updated_at = Column(DateTime, onupdate=datetime.now) | 7 | 0.28 | 3 | 4 |
e958911e99486534629e42fde4332fb73bc0fe27 | spec/i18n_locale_switcher_spec.rb | spec/i18n_locale_switcher_spec.rb | require "spec_helper"
describe "Rack::I18nLocaleSwitcher" do
def app
Rack::Builder.new {
map "/" do
use Rack::I18nLocaleSwitcher
run lambda { |env| [200, {}, "Coolness"] }
end
}.to_app
end
it "should detect locale from Accept-Language-Header" do
get '/', {'Accept-Language' => 'en-US, en'}
I18n.locale.should == :en
end
end | require "spec_helper"
describe "Rack::I18nLocaleSwitcher" do
before do
I18n.available_locales = [:en, :'en-US', :de, :'de-DE']
I18n.default_locale = :en
end
def app
Rack::Builder.new {
map "/" do
use Rack::I18nLocaleSwitcher
run lambda { |env| [200, {}, "Coolness"] }
end
}.to_app
end
it "should set the locate to default locale" do
get '/'
I18n.locale.should eql(I18n.default_locale)
end
context 'from request params' do
it "should set the I18n locale" do
get '/', :locale => 'de'
last_request.url.should include('?locale=de')
I18n.locale.should eql(:de)
end
it "should disallow other locales than the available locales" do
get '/', :locale => 'xx'
I18n.locale.should eql(I18n.default_locale)
end
end
context 'from path prefix ' do
it "should set the I18n locale" do
get '/de/'
I18n.locale.should eql(:de)
end
end
context 'from subdomain' do
before do
default_host = 'de.example.com'
end
xit "should set the I18n locale" do
get '/'
I18n.locale.should eql(:de)
end
end
context 'from top level domain' do
before do
default_host = 'example.de'
it "should set the I18n locale" do
get '/'
I18n.locale.should eql(:de)
end
end
end
context 'from accept-language header' do
it "should override the client requested locale" do
header "Accept-Language", "de, en"
get '/'
I18n.locale.should eql(:de)
end
end
context 'from session' do
xit "should override the users session locale" do
request.session['locale'] = :de
get '/', :locale => 'en'
I18n.locale.should eql(:en)
end
end
context 'from default' do
end
end | Add more to ensure the switcher works with http header. | Add more to ensure the switcher works with http header.
| Ruby | mit | christoph-buente/rack-i18n_locale_switcher | ruby | ## Code Before:
require "spec_helper"
describe "Rack::I18nLocaleSwitcher" do
def app
Rack::Builder.new {
map "/" do
use Rack::I18nLocaleSwitcher
run lambda { |env| [200, {}, "Coolness"] }
end
}.to_app
end
it "should detect locale from Accept-Language-Header" do
get '/', {'Accept-Language' => 'en-US, en'}
I18n.locale.should == :en
end
end
## Instruction:
Add more to ensure the switcher works with http header.
## Code After:
require "spec_helper"
describe "Rack::I18nLocaleSwitcher" do
before do
I18n.available_locales = [:en, :'en-US', :de, :'de-DE']
I18n.default_locale = :en
end
def app
Rack::Builder.new {
map "/" do
use Rack::I18nLocaleSwitcher
run lambda { |env| [200, {}, "Coolness"] }
end
}.to_app
end
it "should set the locate to default locale" do
get '/'
I18n.locale.should eql(I18n.default_locale)
end
context 'from request params' do
it "should set the I18n locale" do
get '/', :locale => 'de'
last_request.url.should include('?locale=de')
I18n.locale.should eql(:de)
end
it "should disallow other locales than the available locales" do
get '/', :locale => 'xx'
I18n.locale.should eql(I18n.default_locale)
end
end
context 'from path prefix ' do
it "should set the I18n locale" do
get '/de/'
I18n.locale.should eql(:de)
end
end
context 'from subdomain' do
before do
default_host = 'de.example.com'
end
xit "should set the I18n locale" do
get '/'
I18n.locale.should eql(:de)
end
end
context 'from top level domain' do
before do
default_host = 'example.de'
it "should set the I18n locale" do
get '/'
I18n.locale.should eql(:de)
end
end
end
context 'from accept-language header' do
it "should override the client requested locale" do
header "Accept-Language", "de, en"
get '/'
I18n.locale.should eql(:de)
end
end
context 'from session' do
xit "should override the users session locale" do
request.session['locale'] = :de
get '/', :locale => 'en'
I18n.locale.should eql(:en)
end
end
context 'from default' do
end
end | require "spec_helper"
describe "Rack::I18nLocaleSwitcher" do
+
+ before do
+ I18n.available_locales = [:en, :'en-US', :de, :'de-DE']
+ I18n.default_locale = :en
+ end
def app
Rack::Builder.new {
map "/" do
use Rack::I18nLocaleSwitcher
run lambda { |env| [200, {}, "Coolness"] }
end
}.to_app
end
+ it "should set the locate to default locale" do
+ get '/'
+ I18n.locale.should eql(I18n.default_locale)
-
- it "should detect locale from Accept-Language-Header" do
- get '/', {'Accept-Language' => 'en-US, en'}
- I18n.locale.should == :en
end
+ context 'from request params' do
+
+ it "should set the I18n locale" do
+ get '/', :locale => 'de'
+ last_request.url.should include('?locale=de')
+ I18n.locale.should eql(:de)
+ end
+
+ it "should disallow other locales than the available locales" do
+ get '/', :locale => 'xx'
+ I18n.locale.should eql(I18n.default_locale)
+ end
+
+ end
+
+ context 'from path prefix ' do
+ it "should set the I18n locale" do
+ get '/de/'
+ I18n.locale.should eql(:de)
+ end
+ end
+
+ context 'from subdomain' do
+
+ before do
+ default_host = 'de.example.com'
+ end
+
+ xit "should set the I18n locale" do
+ get '/'
+ I18n.locale.should eql(:de)
+ end
+ end
+
+ context 'from top level domain' do
+
+ before do
+ default_host = 'example.de'
+
+ it "should set the I18n locale" do
+ get '/'
+ I18n.locale.should eql(:de)
+ end
+ end
+ end
+
+ context 'from accept-language header' do
+
+ it "should override the client requested locale" do
+ header "Accept-Language", "de, en"
+ get '/'
+ I18n.locale.should eql(:de)
+ end
+
+ end
+
+ context 'from session' do
+ xit "should override the users session locale" do
+ request.session['locale'] = :de
+ get '/', :locale => 'en'
+ I18n.locale.should eql(:en)
+ end
+
+
+ end
+
+ context 'from default' do
+ end
+
end | 81 | 3.681818 | 77 | 4 |
b97b7f3add16409f00c7d2f896b859945098b796 | init.php | init.php | <?php
// Set default settings here. Can be overridden in config.php.
$settings = array();
$settings['sqlColor'] = true;
require_once('config.php');
$dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password'], array( PDO::ATTR_PERSISTENT => true ));
require_once('libs/sqlquery/SqlParser.php');
| <?php
// Set default settings here. Can be overridden in config.php.
$settings = array();
$settings['sqlColor'] = true;
require_once('config.php');
$dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password']);
require_once('libs/sqlquery/SqlParser.php');
| Remove persistant conections. Does not seem to work so well | Remove persistant conections. Does not seem to work so well
| PHP | mit | qbdsoft/Query-Digest-UI,qbdsoft/Query-Digest-UI,qbdsoft/Query-Digest-UI,kormoc/Query-Digest-UI,qbdsoft/Query-Digest-UI,kormoc/Query-Digest-UI,kormoc/Query-Digest-UI | php | ## Code Before:
<?php
// Set default settings here. Can be overridden in config.php.
$settings = array();
$settings['sqlColor'] = true;
require_once('config.php');
$dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password'], array( PDO::ATTR_PERSISTENT => true ));
require_once('libs/sqlquery/SqlParser.php');
## Instruction:
Remove persistant conections. Does not seem to work so well
## Code After:
<?php
// Set default settings here. Can be overridden in config.php.
$settings = array();
$settings['sqlColor'] = true;
require_once('config.php');
$dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password']);
require_once('libs/sqlquery/SqlParser.php');
| <?php
// Set default settings here. Can be overridden in config.php.
$settings = array();
$settings['sqlColor'] = true;
require_once('config.php');
- $dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password'], array( PDO::ATTR_PERSISTENT => true ));
? ---------------------------------------
+ $dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password']);
require_once('libs/sqlquery/SqlParser.php'); | 2 | 0.181818 | 1 | 1 |
30b2e24711be245d1d718ded01f8c1c93874a467 | docs/simplesamlphp-install-repo.txt | docs/simplesamlphp-install-repo.txt | Installing SimpleSAMLphp from the repository
============================================
These are some notes about running SimpleSAMLphp from subversion.
Installing from github
----------------------
Go to the directory where you want to install SimpleSAMLphp:
cd /var
Then do a git clone:
git clone git@github.com:simplesamlphp/simplesamlphp.git simplesamlphp
Initialize configuration and metadata:
cd /var/simplesamlphp
cp -r config-templates/* config/
cp -r metadata-templates/* metadata/
Install the external dependencies with Composer (you can refer to http://getcomposer.org/ to get detailed
instructions on how to install Composer itself):
php composer.phar install
Upgrading
---------
Go to the root directory of your simpleSAMLphp installation:
cd /var/simplesamlphp
Ask git to update to the latest version:
git fetch origin
git pull master
Install the external dependencies with Composer (http://getcomposer.org/):
php composer.phar install
| Installing SimpleSAMLphp from the repository
============================================
These are some notes about running SimpleSAMLphp from the repository.
Installing from github
----------------------
Go to the directory where you want to install SimpleSAMLphp:
cd /var
Then do a git clone:
git clone git@github.com:simplesamlphp/simplesamlphp.git simplesamlphp
Initialize configuration and metadata:
cd /var/simplesamlphp
cp -r config-templates/* config/
cp -r metadata-templates/* metadata/
Install the external dependencies with Composer (you can refer to http://getcomposer.org/ to get detailed
instructions on how to install Composer itself):
php composer.phar install
Upgrading
---------
Go to the root directory of your simpleSAMLphp installation:
cd /var/simplesamlphp
Ask git to update to the latest version:
git fetch origin
git pull origin master
Install the external dependencies with Composer (http://getcomposer.org/):
php composer.phar install
| Fix for the recently added install instructions. | Fix for the recently added install instructions. | Text | lgpl-2.1 | tectronics/simplesamlphp,tectronics/simplesamlphp,tectronics/simplesamlphp,vivekrajenderan/simplesamlphp,tectronics/simplesamlphp,vivekrajenderan/simplesamlphp,vivekrajenderan/simplesamlphp,vivekrajenderan/simplesamlphp,tectronics/simplesamlphp,vivekrajenderan/simplesamlphp | text | ## Code Before:
Installing SimpleSAMLphp from the repository
============================================
These are some notes about running SimpleSAMLphp from subversion.
Installing from github
----------------------
Go to the directory where you want to install SimpleSAMLphp:
cd /var
Then do a git clone:
git clone git@github.com:simplesamlphp/simplesamlphp.git simplesamlphp
Initialize configuration and metadata:
cd /var/simplesamlphp
cp -r config-templates/* config/
cp -r metadata-templates/* metadata/
Install the external dependencies with Composer (you can refer to http://getcomposer.org/ to get detailed
instructions on how to install Composer itself):
php composer.phar install
Upgrading
---------
Go to the root directory of your simpleSAMLphp installation:
cd /var/simplesamlphp
Ask git to update to the latest version:
git fetch origin
git pull master
Install the external dependencies with Composer (http://getcomposer.org/):
php composer.phar install
## Instruction:
Fix for the recently added install instructions.
## Code After:
Installing SimpleSAMLphp from the repository
============================================
These are some notes about running SimpleSAMLphp from the repository.
Installing from github
----------------------
Go to the directory where you want to install SimpleSAMLphp:
cd /var
Then do a git clone:
git clone git@github.com:simplesamlphp/simplesamlphp.git simplesamlphp
Initialize configuration and metadata:
cd /var/simplesamlphp
cp -r config-templates/* config/
cp -r metadata-templates/* metadata/
Install the external dependencies with Composer (you can refer to http://getcomposer.org/ to get detailed
instructions on how to install Composer itself):
php composer.phar install
Upgrading
---------
Go to the root directory of your simpleSAMLphp installation:
cd /var/simplesamlphp
Ask git to update to the latest version:
git fetch origin
git pull origin master
Install the external dependencies with Composer (http://getcomposer.org/):
php composer.phar install
| Installing SimpleSAMLphp from the repository
============================================
- These are some notes about running SimpleSAMLphp from subversion.
? ^^^^ ^
+ These are some notes about running SimpleSAMLphp from the repository.
? ^^ + +++ + ^^
Installing from github
----------------------
Go to the directory where you want to install SimpleSAMLphp:
cd /var
Then do a git clone:
git clone git@github.com:simplesamlphp/simplesamlphp.git simplesamlphp
Initialize configuration and metadata:
cd /var/simplesamlphp
cp -r config-templates/* config/
cp -r metadata-templates/* metadata/
Install the external dependencies with Composer (you can refer to http://getcomposer.org/ to get detailed
instructions on how to install Composer itself):
php composer.phar install
Upgrading
---------
Go to the root directory of your simpleSAMLphp installation:
cd /var/simplesamlphp
Ask git to update to the latest version:
git fetch origin
- git pull master
+ git pull origin master
? +++++++
Install the external dependencies with Composer (http://getcomposer.org/):
php composer.phar install | 4 | 0.095238 | 2 | 2 |
c2eb094a1df918c119304b6133692ab643b331f9 | lib/tchart/model/separator_item.rb | lib/tchart/model/separator_item.rb | module TChart
class SeparatorItem
attr_reader :y_coordinate
attr_reader :length
attr_reader :date_ranges
def initialize
@date_ranges = []
end
def calc_layout(chart, y_coordinate)
@y_coordinate = y_coordinate
@length = chart.x_axis_length
end
def render(tex)
tex.comment "horizontal separator line"
tex.line Coordinate.new(0, y_coordinate), Coordinate.new(length, y_coordinate)
end
end
end
| module TChart
class SeparatorItem
attr_reader :from
attr_reader :to
attr_reader :date_ranges
def initialize
@date_ranges = []
end
def calc_layout(chart, y)
@from = Coordinate.new(0, y)
@to = Coordinate.new(chart.x_axis_length, y)
end
def render(tex)
tex.comment "horizontal separator line"
tex.line from, to
end
end
end
| Convert SeparatorItem to use Coordinates. | Convert SeparatorItem to use Coordinates.
| Ruby | mit | milewdev/tchart,milewdev/tchart | ruby | ## Code Before:
module TChart
class SeparatorItem
attr_reader :y_coordinate
attr_reader :length
attr_reader :date_ranges
def initialize
@date_ranges = []
end
def calc_layout(chart, y_coordinate)
@y_coordinate = y_coordinate
@length = chart.x_axis_length
end
def render(tex)
tex.comment "horizontal separator line"
tex.line Coordinate.new(0, y_coordinate), Coordinate.new(length, y_coordinate)
end
end
end
## Instruction:
Convert SeparatorItem to use Coordinates.
## Code After:
module TChart
class SeparatorItem
attr_reader :from
attr_reader :to
attr_reader :date_ranges
def initialize
@date_ranges = []
end
def calc_layout(chart, y)
@from = Coordinate.new(0, y)
@to = Coordinate.new(chart.x_axis_length, y)
end
def render(tex)
tex.comment "horizontal separator line"
tex.line from, to
end
end
end
| module TChart
class SeparatorItem
- attr_reader :y_coordinate
+ attr_reader :from
- attr_reader :length
? ---- ^
+ attr_reader :to
? ^
attr_reader :date_ranges
def initialize
@date_ranges = []
end
- def calc_layout(chart, y_coordinate)
? -----------
+ def calc_layout(chart, y)
- @y_coordinate = y_coordinate
- @length = chart.x_axis_length
+ @from = Coordinate.new(0, y)
+ @to = Coordinate.new(chart.x_axis_length, y)
end
def render(tex)
tex.comment "horizontal separator line"
- tex.line Coordinate.new(0, y_coordinate), Coordinate.new(length, y_coordinate)
+ tex.line from, to
end
end
end | 12 | 0.521739 | 6 | 6 |
33f0df1f1fe00be21a27f8fa494f27e5d0e341b6 | packages/li/lightstep-haskell.yaml | packages/li/lightstep-haskell.yaml | homepage: https://github.com/ethercrow/lightstep-haskell#readme
changelog-type: ''
hash: a4495e7fe32adaea87e0901ae3d5f92254e94eec9145f982dd1c650550be754a
test-bench-deps: {}
maintainer: Dmitry Ivanov <ethercrow@gmail.com>
synopsis: LightStep OpenTracing client library
changelog: ''
basic-deps:
exceptions: -any
stm: -any
base: ! '>=4.12 && <5'
http2-client-grpc: -any
unordered-containers: -any
text: -any
http2-client: -any
async: -any
containers: -any
lens: -any
chronos: -any
proto-lens: -any
mtl: -any
lightstep-haskell: -any
transformers: -any
proto-lens-runtime: -any
all-versions:
- 0.1.0
author: ''
latest: 0.1.0
description-type: haddock
description: LightStep OpenTracing client library. Uses GRPC transport via proto-lens.
license-name: Apache-2.0
| homepage: https://github.com/ethercrow/lightstep-haskell#readme
changelog-type: ''
hash: f5ee2a0d120b04c49db492ed766aed925fedfe5085c75fbeb6acf9c5b4940375
test-bench-deps: {}
maintainer: Dmitry Ivanov <ethercrow@gmail.com>
synopsis: LightStep OpenTracing client library
changelog: ''
basic-deps:
exceptions: -any
stm: -any
base: ! '>=4.12 && <5'
http2-client-grpc: -any
unordered-containers: -any
text: -any
http2-client: -any
async: -any
containers: -any
lens: -any
chronos: -any
proto-lens: -any
mtl: -any
lightstep-haskell: -any
transformers: -any
proto-lens-runtime: -any
all-versions:
- 0.1.0
- 0.1.1
author: ''
latest: 0.1.1
description-type: haddock
description: LightStep OpenTracing client library. Uses GRPC transport via proto-lens.
license-name: Apache-2.0
| Update from Hackage at 2019-10-20T14:03:42Z | Update from Hackage at 2019-10-20T14:03:42Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/ethercrow/lightstep-haskell#readme
changelog-type: ''
hash: a4495e7fe32adaea87e0901ae3d5f92254e94eec9145f982dd1c650550be754a
test-bench-deps: {}
maintainer: Dmitry Ivanov <ethercrow@gmail.com>
synopsis: LightStep OpenTracing client library
changelog: ''
basic-deps:
exceptions: -any
stm: -any
base: ! '>=4.12 && <5'
http2-client-grpc: -any
unordered-containers: -any
text: -any
http2-client: -any
async: -any
containers: -any
lens: -any
chronos: -any
proto-lens: -any
mtl: -any
lightstep-haskell: -any
transformers: -any
proto-lens-runtime: -any
all-versions:
- 0.1.0
author: ''
latest: 0.1.0
description-type: haddock
description: LightStep OpenTracing client library. Uses GRPC transport via proto-lens.
license-name: Apache-2.0
## Instruction:
Update from Hackage at 2019-10-20T14:03:42Z
## Code After:
homepage: https://github.com/ethercrow/lightstep-haskell#readme
changelog-type: ''
hash: f5ee2a0d120b04c49db492ed766aed925fedfe5085c75fbeb6acf9c5b4940375
test-bench-deps: {}
maintainer: Dmitry Ivanov <ethercrow@gmail.com>
synopsis: LightStep OpenTracing client library
changelog: ''
basic-deps:
exceptions: -any
stm: -any
base: ! '>=4.12 && <5'
http2-client-grpc: -any
unordered-containers: -any
text: -any
http2-client: -any
async: -any
containers: -any
lens: -any
chronos: -any
proto-lens: -any
mtl: -any
lightstep-haskell: -any
transformers: -any
proto-lens-runtime: -any
all-versions:
- 0.1.0
- 0.1.1
author: ''
latest: 0.1.1
description-type: haddock
description: LightStep OpenTracing client library. Uses GRPC transport via proto-lens.
license-name: Apache-2.0
| homepage: https://github.com/ethercrow/lightstep-haskell#readme
changelog-type: ''
- hash: a4495e7fe32adaea87e0901ae3d5f92254e94eec9145f982dd1c650550be754a
+ hash: f5ee2a0d120b04c49db492ed766aed925fedfe5085c75fbeb6acf9c5b4940375
test-bench-deps: {}
maintainer: Dmitry Ivanov <ethercrow@gmail.com>
synopsis: LightStep OpenTracing client library
changelog: ''
basic-deps:
exceptions: -any
stm: -any
base: ! '>=4.12 && <5'
http2-client-grpc: -any
unordered-containers: -any
text: -any
http2-client: -any
async: -any
containers: -any
lens: -any
chronos: -any
proto-lens: -any
mtl: -any
lightstep-haskell: -any
transformers: -any
proto-lens-runtime: -any
all-versions:
- 0.1.0
+ - 0.1.1
author: ''
- latest: 0.1.0
? ^
+ latest: 0.1.1
? ^
description-type: haddock
description: LightStep OpenTracing client library. Uses GRPC transport via proto-lens.
license-name: Apache-2.0 | 5 | 0.16129 | 3 | 2 |
89a74fa8b8ccadf9ef79ba0b52404f9e19701541 | src/Beloop/Bundle/UserBundle/Resources/config/doctrine/User.orm.yml | src/Beloop/Bundle/UserBundle/Resources/config/doctrine/User.orm.yml | Beloop\Component\User\Entity\User:
type: entity
repositoryClass: Beloop\Component\User\Repository\UserRepository
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
biography:
column: biography
type: text
nullable: true
website:
column: website
type: string
length: 255
nullable: true
instagram:
column: instagram
type: string
length: 255
nullable: true
avatarName:
column: avatar
type: string
length: 255
nullable: true
oneToMany:
images:
targetEntity: Beloop\Component\Instagram\Entity\Instagram
mappedBy: user
manyToOne:
language:
targetEntity: Beloop\Component\Language\Entity\Interfaces\LanguageInterface
joinColumn:
name: language_iso
referencedColumnName: iso
nullable: true
manyToMany:
courses:
targetEntity: Beloop\Component\Course\Entity\Interfaces\CourseInterface
mappedBy: enrolledUsers
lifecycleCallbacks:
preUpdate: [loadUpdateAt]
prePersist: [loadUpdateAt] | Beloop\Component\User\Entity\User:
type: entity
repositoryClass: Beloop\Component\User\Repository\UserRepository
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
biography:
column: biography
type: text
nullable: true
website:
column: website
type: string
length: 255
nullable: true
instagram:
column: instagram
type: string
length: 255
nullable: true
avatarName:
column: avatar
type: string
length: 255
nullable: true
oneToMany:
images:
targetEntity: Beloop\Component\Instagram\Entity\Instagram
mappedBy: user
manyToOne:
language:
targetEntity: Beloop\Component\Language\Entity\Interfaces\LanguageInterface
joinColumn:
name: language_iso
referencedColumnName: iso
nullable: true
manyToMany:
courses:
targetEntity: Beloop\Component\Course\Entity\Interfaces\CourseInterface
mappedBy: enrolledUsers
orderBy:
startDate: DESC
lifecycleCallbacks:
preUpdate: [loadUpdateAt]
prePersist: [loadUpdateAt] | Order user courses by start date | Order user courses by start date
| YAML | mit | beloop/components,beloop/components,beloop/components | yaml | ## Code Before:
Beloop\Component\User\Entity\User:
type: entity
repositoryClass: Beloop\Component\User\Repository\UserRepository
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
biography:
column: biography
type: text
nullable: true
website:
column: website
type: string
length: 255
nullable: true
instagram:
column: instagram
type: string
length: 255
nullable: true
avatarName:
column: avatar
type: string
length: 255
nullable: true
oneToMany:
images:
targetEntity: Beloop\Component\Instagram\Entity\Instagram
mappedBy: user
manyToOne:
language:
targetEntity: Beloop\Component\Language\Entity\Interfaces\LanguageInterface
joinColumn:
name: language_iso
referencedColumnName: iso
nullable: true
manyToMany:
courses:
targetEntity: Beloop\Component\Course\Entity\Interfaces\CourseInterface
mappedBy: enrolledUsers
lifecycleCallbacks:
preUpdate: [loadUpdateAt]
prePersist: [loadUpdateAt]
## Instruction:
Order user courses by start date
## Code After:
Beloop\Component\User\Entity\User:
type: entity
repositoryClass: Beloop\Component\User\Repository\UserRepository
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
biography:
column: biography
type: text
nullable: true
website:
column: website
type: string
length: 255
nullable: true
instagram:
column: instagram
type: string
length: 255
nullable: true
avatarName:
column: avatar
type: string
length: 255
nullable: true
oneToMany:
images:
targetEntity: Beloop\Component\Instagram\Entity\Instagram
mappedBy: user
manyToOne:
language:
targetEntity: Beloop\Component\Language\Entity\Interfaces\LanguageInterface
joinColumn:
name: language_iso
referencedColumnName: iso
nullable: true
manyToMany:
courses:
targetEntity: Beloop\Component\Course\Entity\Interfaces\CourseInterface
mappedBy: enrolledUsers
orderBy:
startDate: DESC
lifecycleCallbacks:
preUpdate: [loadUpdateAt]
prePersist: [loadUpdateAt] | Beloop\Component\User\Entity\User:
type: entity
repositoryClass: Beloop\Component\User\Repository\UserRepository
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
biography:
column: biography
type: text
nullable: true
website:
column: website
type: string
length: 255
nullable: true
instagram:
column: instagram
type: string
length: 255
nullable: true
avatarName:
column: avatar
type: string
length: 255
nullable: true
oneToMany:
images:
targetEntity: Beloop\Component\Instagram\Entity\Instagram
mappedBy: user
manyToOne:
language:
targetEntity: Beloop\Component\Language\Entity\Interfaces\LanguageInterface
joinColumn:
name: language_iso
referencedColumnName: iso
nullable: true
manyToMany:
courses:
targetEntity: Beloop\Component\Course\Entity\Interfaces\CourseInterface
mappedBy: enrolledUsers
+ orderBy:
+ startDate: DESC
lifecycleCallbacks:
preUpdate: [loadUpdateAt]
prePersist: [loadUpdateAt] | 2 | 0.039216 | 2 | 0 |
6a62be6db5af2038748e79d99f1361c0f8575916 | Granola.podspec | Granola.podspec | Pod::Spec.new do |s|
s.name = "Granola"
s.version = "0.1.0"
s.summary = "A healthful serializer for your HealthKit data."
s.homepage = "https://github.com/openmhealth/Granola"
s.license = { :type => 'Apache 2.0',
:file => 'LICENSE' }
s.authors = { "Brent Hargrave" => "brent@brent.is" }
s.source = { :git => "https://github.com/openmhealth/Granola.git",
:tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/openmhealth'
s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.frameworks = 'HealthKit'
s.dependency 'ObjectiveSugar', '~> 1.1'
end
| Pod::Spec.new do |s|
s.name = "Granola"
s.version = "0.2.0"
s.summary = "A healthful serializer for your HealthKit data."
s.homepage = "https://github.com/openmhealth/Granola"
s.license = { :type => 'Apache 2.0',
:file => 'LICENSE' }
s.authors = { "Brent Hargrave" => "brent@brent.is",
"Chris Schaefbauer" => "chris.schaefbauer@openmhealth.org",
"Emerson Farrugia" => "emerson@openmhealth.org",
"Simona Carini" => "simona@openmhealth.org" }
s.source = { :git => "https://github.com/openmhealth/Granola.git",
:tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/openmhealth'
s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.frameworks = 'HealthKit'
s.dependency 'ObjectiveSugar', '~> 1.1'
end
| Update Pod spec with all authors and new version | Update Pod spec with all authors and new version
| Ruby | apache-2.0 | openmhealth/Granola,Rich86man/Granola | ruby | ## Code Before:
Pod::Spec.new do |s|
s.name = "Granola"
s.version = "0.1.0"
s.summary = "A healthful serializer for your HealthKit data."
s.homepage = "https://github.com/openmhealth/Granola"
s.license = { :type => 'Apache 2.0',
:file => 'LICENSE' }
s.authors = { "Brent Hargrave" => "brent@brent.is" }
s.source = { :git => "https://github.com/openmhealth/Granola.git",
:tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/openmhealth'
s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.frameworks = 'HealthKit'
s.dependency 'ObjectiveSugar', '~> 1.1'
end
## Instruction:
Update Pod spec with all authors and new version
## Code After:
Pod::Spec.new do |s|
s.name = "Granola"
s.version = "0.2.0"
s.summary = "A healthful serializer for your HealthKit data."
s.homepage = "https://github.com/openmhealth/Granola"
s.license = { :type => 'Apache 2.0',
:file => 'LICENSE' }
s.authors = { "Brent Hargrave" => "brent@brent.is",
"Chris Schaefbauer" => "chris.schaefbauer@openmhealth.org",
"Emerson Farrugia" => "emerson@openmhealth.org",
"Simona Carini" => "simona@openmhealth.org" }
s.source = { :git => "https://github.com/openmhealth/Granola.git",
:tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/openmhealth'
s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.frameworks = 'HealthKit'
s.dependency 'ObjectiveSugar', '~> 1.1'
end
| Pod::Spec.new do |s|
s.name = "Granola"
- s.version = "0.1.0"
? ^
+ s.version = "0.2.0"
? ^
s.summary = "A healthful serializer for your HealthKit data."
s.homepage = "https://github.com/openmhealth/Granola"
s.license = { :type => 'Apache 2.0',
:file => 'LICENSE' }
- s.authors = { "Brent Hargrave" => "brent@brent.is" }
? ^^
+ s.authors = { "Brent Hargrave" => "brent@brent.is",
? ^
+ "Chris Schaefbauer" => "chris.schaefbauer@openmhealth.org",
+ "Emerson Farrugia" => "emerson@openmhealth.org",
+ "Simona Carini" => "simona@openmhealth.org" }
s.source = { :git => "https://github.com/openmhealth/Granola.git",
:tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/openmhealth'
s.platform = :ios, '7.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.frameworks = 'HealthKit'
s.dependency 'ObjectiveSugar', '~> 1.1'
end
| 7 | 0.388889 | 5 | 2 |
fe25e59198ab2978beb721a0115a4099fbea36d1 | src/components/HomePage.js | src/components/HomePage.js | import React from 'react';
import { InitialSearchContainer } from '../containers';
const HomePage = () => (
<div className="landing-page">
<h1>
<img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/>
</h1>
<div className="text--center">
<p className="landing-page__legend">Todas las respuestas en un solo lugar</p>
</div>
<InitialSearchContainer />
</div>
);
export default HomePage;
| import React from 'react';
import { InitialSearchContainer } from '../containers';
const HomePage = () => (
<div className="landing-page">
<h1>
<img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/>
</h1>
<div className="text--center">
<p className="landing-page__legend">Encuentra ejercicios resueltos de los libros de ingeniería que necesitas</p>
</div>
<InitialSearchContainer />
</div>
);
export default HomePage;
| Change slogan y home page | Change slogan y home page
| JavaScript | mit | jlmonroy13/solvingbooks-poison,jlmonroy13/solvingbooks-poison | javascript | ## Code Before:
import React from 'react';
import { InitialSearchContainer } from '../containers';
const HomePage = () => (
<div className="landing-page">
<h1>
<img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/>
</h1>
<div className="text--center">
<p className="landing-page__legend">Todas las respuestas en un solo lugar</p>
</div>
<InitialSearchContainer />
</div>
);
export default HomePage;
## Instruction:
Change slogan y home page
## Code After:
import React from 'react';
import { InitialSearchContainer } from '../containers';
const HomePage = () => (
<div className="landing-page">
<h1>
<img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/>
</h1>
<div className="text--center">
<p className="landing-page__legend">Encuentra ejercicios resueltos de los libros de ingeniería que necesitas</p>
</div>
<InitialSearchContainer />
</div>
);
export default HomePage;
| import React from 'react';
import { InitialSearchContainer } from '../containers';
const HomePage = () => (
<div className="landing-page">
<h1>
<img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/>
</h1>
<div className="text--center">
- <p className="landing-page__legend">Todas las respuestas en un solo lugar</p>
+ <p className="landing-page__legend">Encuentra ejercicios resueltos de los libros de ingeniería que necesitas</p>
</div>
<InitialSearchContainer />
</div>
);
export default HomePage; | 2 | 0.125 | 1 | 1 |
2ae3544a92258f3dca3d707fe2c8bfb05e4063cf | TrailScribeTest/AndroidManifest.xml | TrailScribeTest/AndroidManifest.xml | <?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.cmu.sv.trailscribe.tests"
android:versionCode="1"
android:versionName="1.0">
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of edu.cmu.sv.trailscribe. To run the tests use the command:
"adb shell am instrument -w edu.cmu.sv.trailscribe.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="edu.cmu.sv.trailscribe"
android:label="Tests for edu.cmu.sv.trailscribe"/>
</manifest>
| <?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.cmu.sv.trailscribe.tests"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of edu.cmu.sv.trailscribe. To run the tests use the command:
"adb shell am instrument -w edu.cmu.sv.trailscribe.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="edu.cmu.sv.trailscribe"
android:label="Tests for edu.cmu.sv.trailscribe"/>
</manifest>
| Add min and target SDK versions for TrailScribeTest | Add min and target SDK versions for TrailScribeTest
| XML | mit | CMUPracticum/TrailScribe,CMUPracticum/TrailScribe,CMUPracticum/TrailScribe | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.cmu.sv.trailscribe.tests"
android:versionCode="1"
android:versionName="1.0">
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of edu.cmu.sv.trailscribe. To run the tests use the command:
"adb shell am instrument -w edu.cmu.sv.trailscribe.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="edu.cmu.sv.trailscribe"
android:label="Tests for edu.cmu.sv.trailscribe"/>
</manifest>
## Instruction:
Add min and target SDK versions for TrailScribeTest
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.cmu.sv.trailscribe.tests"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of edu.cmu.sv.trailscribe. To run the tests use the command:
"adb shell am instrument -w edu.cmu.sv.trailscribe.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="edu.cmu.sv.trailscribe"
android:label="Tests for edu.cmu.sv.trailscribe"/>
</manifest>
| <?xml version="1.0" encoding="utf-8"?>
<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.cmu.sv.trailscribe.tests"
android:versionCode="1"
android:versionName="1.0">
+
+ <uses-sdk
+ android:minSdkVersion="14"
+ android:targetSdkVersion="19" />
+
<!-- We add an application tag here just so that we can indicate that
this package needs to link against the android.test library,
which is needed when building test cases. -->
<application>
<uses-library android:name="android.test.runner" />
</application>
<!--
This declares that this application uses the instrumentation test runner targeting
the package of edu.cmu.sv.trailscribe. To run the tests use the command:
"adb shell am instrument -w edu.cmu.sv.trailscribe.tests/android.test.InstrumentationTestRunner"
-->
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="edu.cmu.sv.trailscribe"
android:label="Tests for edu.cmu.sv.trailscribe"/>
</manifest> | 5 | 0.238095 | 5 | 0 |
1c70756e1afc11d3f50e9f735ef60119a7e9da5f | activesupport/test/core_ext/regexp_ext_test.rb | activesupport/test/core_ext/regexp_ext_test.rb |
require "abstract_unit"
require "active_support/core_ext/regexp"
class RegexpExtAccessTests < ActiveSupport::TestCase
def test_multiline
assert_equal true, //m.multiline?
assert_equal false, //.multiline?
assert_equal false, /(?m:)/.multiline?
end
# Based on https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb.
def test_match_p
/back(...)/ =~ "backref"
# must match here, but not in a separate method, e.g., assert_send,
# to check if $~ is affected or not.
assert_equal false, //.match?(nil)
assert_equal true, //.match?("")
assert_equal true, /.../.match?(:abc)
assert_raise(TypeError) { /.../.match?(Object.new) }
assert_equal true, /b/.match?("abc")
assert_equal true, /b/.match?("abc", 1)
assert_equal true, /../.match?("abc", 1)
assert_equal true, /../.match?("abc", -2)
assert_equal false, /../.match?("abc", -4)
assert_equal false, /../.match?("abc", 4)
assert_equal true, /\z/.match?("")
assert_equal true, /\z/.match?("abc")
assert_equal true, /R.../.match?("Ruby")
assert_equal false, /R.../.match?("Ruby", 1)
assert_equal false, /P.../.match?("Ruby")
assert_equal "backref", $&
assert_equal "ref", $1
end
end
|
require "abstract_unit"
require "active_support/core_ext/regexp"
class RegexpExtAccessTests < ActiveSupport::TestCase
def test_multiline
assert_equal true, //m.multiline?
assert_equal false, //.multiline?
assert_equal false, /(?m:)/.multiline?
end
end
| Remove `test_match_p` since Rails 6 requires Ruby 2.4.1 or newer | Remove `test_match_p` since Rails 6 requires Ruby 2.4.1 or newer
Follow up of #32034.
| Ruby | mit | vipulnsward/rails,prathamesh-sonpatki/rails,illacceptanything/illacceptanything,mohitnatoo/rails,illacceptanything/illacceptanything,MSP-Greg/rails,Stellenticket/rails,fabianoleittes/rails,yahonda/rails,yahonda/rails,arunagw/rails,mechanicles/rails,shioyama/rails,illacceptanything/illacceptanything,iainbeeston/rails,kddeisz/rails,starknx/rails,rails/rails,starknx/rails,Stellenticket/rails,arunagw/rails,schuetzm/rails,Edouard-chin/rails,yalab/rails,illacceptanything/illacceptanything,yawboakye/rails,printercu/rails,flanger001/rails,esparta/rails,aditya-kapoor/rails,Edouard-chin/rails,prathamesh-sonpatki/rails,fabianoleittes/rails,deraru/rails,joonyou/rails,jeremy/rails,utilum/rails,EmmaB/rails-1,repinel/rails,palkan/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,repinel/rails,bogdanvlviv/rails,notapatch/rails,baerjam/rails,lcreid/rails,gauravtiwari/rails,aditya-kapoor/rails,tgxworld/rails,rafaelfranca/omg-rails,shioyama/rails,illacceptanything/illacceptanything,untidy-hair/rails,yalab/rails,iainbeeston/rails,yhirano55/rails,Erol/rails,Vasfed/rails,lcreid/rails,Vasfed/rails,rails/rails,BlakeWilliams/rails,iainbeeston/rails,mechanicles/rails,tgxworld/rails,arunagw/rails,kmcphillips/rails,yawboakye/rails,palkan/rails,untidy-hair/rails,yhirano55/rails,esparta/rails,Envek/rails,georgeclaghorn/rails,eileencodes/rails,betesh/rails,arunagw/rails,flanger001/rails,starknx/rails,esparta/rails,shioyama/rails,yawboakye/rails,baerjam/rails,bogdanvlviv/rails,deraru/rails,eileencodes/rails,Envek/rails,tjschuck/rails,aditya-kapoor/rails,rafaelfranca/omg-rails,lcreid/rails,Envek/rails,kmcphillips/rails,EmmaB/rails-1,MSP-Greg/rails,yalab/rails,assain/rails,iainbeeston/rails,vipulnsward/rails,palkan/rails,baerjam/rails,illacceptanything/illacceptanything,BlakeWilliams/rails,tgxworld/rails,kddeisz/rails,mohitnatoo/rails,printercu/rails,georgeclaghorn/rails,eileencodes/rails,rafaelfranca/omg-rails,tjschuck/rails,Stellenticket/rails,utilum/rails,utilum/rails,Vasfed/rails,deraru/rails,schuetzm/rails,joonyou/rails,repinel/rails,jeremy/rails,illacceptanything/illacceptanything,BlakeWilliams/rails,illacceptanything/illacceptanything,shioyama/rails,mechanicles/rails,kmcphillips/rails,kddeisz/rails,flanger001/rails,eileencodes/rails,untidy-hair/rails,EmmaB/rails-1,notapatch/rails,untidy-hair/rails,rails/rails,deraru/rails,yawboakye/rails,MSP-Greg/rails,Envek/rails,schuetzm/rails,Erol/rails,yahonda/rails,yalab/rails,notapatch/rails,joonyou/rails,BlakeWilliams/rails,assain/rails,prathamesh-sonpatki/rails,MSP-Greg/rails,printercu/rails,esparta/rails,georgeclaghorn/rails,kmcphillips/rails,illacceptanything/illacceptanything,notapatch/rails,jeremy/rails,illacceptanything/illacceptanything,printercu/rails,mohitnatoo/rails,prathamesh-sonpatki/rails,flanger001/rails,Stellenticket/rails,yhirano55/rails,tgxworld/rails,fabianoleittes/rails,palkan/rails,repinel/rails,rails/rails,kddeisz/rails,vipulnsward/rails,bogdanvlviv/rails,betesh/rails,fabianoleittes/rails,jeremy/rails,schuetzm/rails,illacceptanything/illacceptanything,yhirano55/rails,Edouard-chin/rails,illacceptanything/illacceptanything,Erol/rails,mechanicles/rails,georgeclaghorn/rails,baerjam/rails,bogdanvlviv/rails,tjschuck/rails,assain/rails,Edouard-chin/rails,Vasfed/rails,aditya-kapoor/rails,lcreid/rails,gauravtiwari/rails,tjschuck/rails,betesh/rails,vipulnsward/rails,Erol/rails,gauravtiwari/rails,illacceptanything/illacceptanything,yahonda/rails,assain/rails,joonyou/rails,mohitnatoo/rails,betesh/rails,utilum/rails | ruby | ## Code Before:
require "abstract_unit"
require "active_support/core_ext/regexp"
class RegexpExtAccessTests < ActiveSupport::TestCase
def test_multiline
assert_equal true, //m.multiline?
assert_equal false, //.multiline?
assert_equal false, /(?m:)/.multiline?
end
# Based on https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb.
def test_match_p
/back(...)/ =~ "backref"
# must match here, but not in a separate method, e.g., assert_send,
# to check if $~ is affected or not.
assert_equal false, //.match?(nil)
assert_equal true, //.match?("")
assert_equal true, /.../.match?(:abc)
assert_raise(TypeError) { /.../.match?(Object.new) }
assert_equal true, /b/.match?("abc")
assert_equal true, /b/.match?("abc", 1)
assert_equal true, /../.match?("abc", 1)
assert_equal true, /../.match?("abc", -2)
assert_equal false, /../.match?("abc", -4)
assert_equal false, /../.match?("abc", 4)
assert_equal true, /\z/.match?("")
assert_equal true, /\z/.match?("abc")
assert_equal true, /R.../.match?("Ruby")
assert_equal false, /R.../.match?("Ruby", 1)
assert_equal false, /P.../.match?("Ruby")
assert_equal "backref", $&
assert_equal "ref", $1
end
end
## Instruction:
Remove `test_match_p` since Rails 6 requires Ruby 2.4.1 or newer
Follow up of #32034.
## Code After:
require "abstract_unit"
require "active_support/core_ext/regexp"
class RegexpExtAccessTests < ActiveSupport::TestCase
def test_multiline
assert_equal true, //m.multiline?
assert_equal false, //.multiline?
assert_equal false, /(?m:)/.multiline?
end
end
|
require "abstract_unit"
require "active_support/core_ext/regexp"
class RegexpExtAccessTests < ActiveSupport::TestCase
def test_multiline
assert_equal true, //m.multiline?
assert_equal false, //.multiline?
assert_equal false, /(?m:)/.multiline?
end
-
- # Based on https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb.
- def test_match_p
- /back(...)/ =~ "backref"
- # must match here, but not in a separate method, e.g., assert_send,
- # to check if $~ is affected or not.
- assert_equal false, //.match?(nil)
- assert_equal true, //.match?("")
- assert_equal true, /.../.match?(:abc)
- assert_raise(TypeError) { /.../.match?(Object.new) }
- assert_equal true, /b/.match?("abc")
- assert_equal true, /b/.match?("abc", 1)
- assert_equal true, /../.match?("abc", 1)
- assert_equal true, /../.match?("abc", -2)
- assert_equal false, /../.match?("abc", -4)
- assert_equal false, /../.match?("abc", 4)
- assert_equal true, /\z/.match?("")
- assert_equal true, /\z/.match?("abc")
- assert_equal true, /R.../.match?("Ruby")
- assert_equal false, /R.../.match?("Ruby", 1)
- assert_equal false, /P.../.match?("Ruby")
- assert_equal "backref", $&
- assert_equal "ref", $1
- end
end | 24 | 0.685714 | 0 | 24 |
2b5187be300da713725fd3e33fa88c16cdc3d24a | atom/setupAtom.sh | atom/setupAtom.sh | set -euf -o pipefail
AtomHome="${1}/.atom/"
AtomPackages="packages.txt"
if [ -d "${AtomHome}" ]; then
cp ./config.cson ${AtomHome}
cp ./keymap.cson ${AtomHome}
cp ./styles.less ${AtomHome}
fi
while read -r pkg; do
apm install ${pkg}
done <${AtomPackages}
| set -euf -o pipefail
AtomHome="/home/${1}/.atom/"
AtomPackages="packages.txt"
if [ ! -d "${AtomHome}" ]; then
mkdir ${AtomHome}
chmod 0750 ${1} ${AtomHome}
chown ${1}:${1} ${AtomHome}
fi
cp ./config.cson ${AtomHome}
cp ./keymap.cson ${AtomHome}
cp ./styles.less ${AtomHome}
while read -r pkg; do
apm install ${pkg}
done <${AtomPackages}
| Create atom config dir if necessary | Create atom config dir if necessary
| Shell | mit | teenooCH/dotfiles | shell | ## Code Before:
set -euf -o pipefail
AtomHome="${1}/.atom/"
AtomPackages="packages.txt"
if [ -d "${AtomHome}" ]; then
cp ./config.cson ${AtomHome}
cp ./keymap.cson ${AtomHome}
cp ./styles.less ${AtomHome}
fi
while read -r pkg; do
apm install ${pkg}
done <${AtomPackages}
## Instruction:
Create atom config dir if necessary
## Code After:
set -euf -o pipefail
AtomHome="/home/${1}/.atom/"
AtomPackages="packages.txt"
if [ ! -d "${AtomHome}" ]; then
mkdir ${AtomHome}
chmod 0750 ${1} ${AtomHome}
chown ${1}:${1} ${AtomHome}
fi
cp ./config.cson ${AtomHome}
cp ./keymap.cson ${AtomHome}
cp ./styles.less ${AtomHome}
while read -r pkg; do
apm install ${pkg}
done <${AtomPackages}
| set -euf -o pipefail
- AtomHome="${1}/.atom/"
+ AtomHome="/home/${1}/.atom/"
? ++++++
AtomPackages="packages.txt"
- if [ -d "${AtomHome}" ]; then
+ if [ ! -d "${AtomHome}" ]; then
? ++
- cp ./config.cson ${AtomHome}
- cp ./keymap.cson ${AtomHome}
- cp ./styles.less ${AtomHome}
+ mkdir ${AtomHome}
+ chmod 0750 ${1} ${AtomHome}
+ chown ${1}:${1} ${AtomHome}
fi
+ cp ./config.cson ${AtomHome}
+ cp ./keymap.cson ${AtomHome}
+ cp ./styles.less ${AtomHome}
while read -r pkg; do
apm install ${pkg}
done <${AtomPackages} | 13 | 0.928571 | 8 | 5 |
10caa2360f5620dafc7dc86e9960b5c1fde55596 | sandbox/task.rake | sandbox/task.rake | require "base_task"
class SandboxTask < BaseTask
def initialize(*args)
super
self.sandboxdir = "sandbox/ruby-#{package.rubyver}"
self.sandboxdirmgw = File.join(sandboxdir, package.mingwdir)
self.sandboxdir_abs = File.expand_path(sandboxdir, package.rootdir)
ruby_exe = "#{sandboxdirmgw}/bin/ruby.exe"
desc "Build sandbox for ruby-#{package.rubyver}"
task "sandbox" => [:devkit, "compile", ruby_exe]
file ruby_exe => compile_task.pkgfile do
# pacman doesn't work on automount paths (/c/path), so that we
# mount to /tmp
pmrootdir = "/tmp/rubyinstaller/ruby-#{package.rubyver}"
mkdir_p File.join(ENV['RI_DEVKIT'], pmrootdir)
mkdir_p sandboxdir
rm_rf sandboxdir
%w[var/cache/pacman/pkg var/lib/pacman].each do |dir|
mkdir_p File.join(sandboxdir, dir)
end
msys_sh <<-EOT
mount #{sandboxdir_abs.inspect} #{pmrootdir.inspect} &&
pacman --root #{pmrootdir.inspect} -Sy &&
pacman --root #{pmrootdir.inspect} --noconfirm -U #{compile_task.pkgfile.inspect};
umount #{pmrootdir.inspect}
EOT
touch ruby_exe
end
end
end
| require "base_task"
class SandboxTask < BaseTask
def initialize(*args)
super
self.sandboxdir = "sandbox/ruby-#{package.rubyver}-#{package.arch}"
self.sandboxdirmgw = File.join(sandboxdir, package.mingwdir)
self.sandboxdir_abs = File.expand_path(sandboxdir, package.rootdir)
ruby_exe = "#{sandboxdirmgw}/bin/ruby.exe"
desc "Build sandbox for ruby-#{package.rubyver}"
task "sandbox" => [:devkit, "compile", ruby_exe]
file ruby_exe => compile_task.pkgfile do
# pacman doesn't work on automount paths (/c/path), so that we
# mount to /tmp
pmrootdir = "/tmp/rubyinstaller/ruby-#{package.rubyver}-#{package.arch}"
mkdir_p File.join(ENV['RI_DEVKIT'], pmrootdir)
mkdir_p sandboxdir
rm_rf sandboxdir
%w[var/cache/pacman/pkg var/lib/pacman].each do |dir|
mkdir_p File.join(sandboxdir, dir)
end
msys_sh <<-EOT
mount #{sandboxdir_abs.inspect} #{pmrootdir.inspect} &&
pacman --root #{pmrootdir.inspect} -Sy &&
pacman --root #{pmrootdir.inspect} --noconfirm -U #{compile_task.pkgfile.inspect};
umount #{pmrootdir.inspect}
EOT
touch ruby_exe
end
end
end
| Use per distinct sandbox directory per arch. | Use per distinct sandbox directory per arch.
This avoids repeated deletion of the sanbox folder.
| Ruby | bsd-3-clause | oneclick/rubyinstaller2,oneclick/rubyinstaller2,oneclick/rubyinstaller2,larskanis/rubyinstaller2,larskanis/rubyinstaller2,larskanis/rubyinstaller2 | ruby | ## Code Before:
require "base_task"
class SandboxTask < BaseTask
def initialize(*args)
super
self.sandboxdir = "sandbox/ruby-#{package.rubyver}"
self.sandboxdirmgw = File.join(sandboxdir, package.mingwdir)
self.sandboxdir_abs = File.expand_path(sandboxdir, package.rootdir)
ruby_exe = "#{sandboxdirmgw}/bin/ruby.exe"
desc "Build sandbox for ruby-#{package.rubyver}"
task "sandbox" => [:devkit, "compile", ruby_exe]
file ruby_exe => compile_task.pkgfile do
# pacman doesn't work on automount paths (/c/path), so that we
# mount to /tmp
pmrootdir = "/tmp/rubyinstaller/ruby-#{package.rubyver}"
mkdir_p File.join(ENV['RI_DEVKIT'], pmrootdir)
mkdir_p sandboxdir
rm_rf sandboxdir
%w[var/cache/pacman/pkg var/lib/pacman].each do |dir|
mkdir_p File.join(sandboxdir, dir)
end
msys_sh <<-EOT
mount #{sandboxdir_abs.inspect} #{pmrootdir.inspect} &&
pacman --root #{pmrootdir.inspect} -Sy &&
pacman --root #{pmrootdir.inspect} --noconfirm -U #{compile_task.pkgfile.inspect};
umount #{pmrootdir.inspect}
EOT
touch ruby_exe
end
end
end
## Instruction:
Use per distinct sandbox directory per arch.
This avoids repeated deletion of the sanbox folder.
## Code After:
require "base_task"
class SandboxTask < BaseTask
def initialize(*args)
super
self.sandboxdir = "sandbox/ruby-#{package.rubyver}-#{package.arch}"
self.sandboxdirmgw = File.join(sandboxdir, package.mingwdir)
self.sandboxdir_abs = File.expand_path(sandboxdir, package.rootdir)
ruby_exe = "#{sandboxdirmgw}/bin/ruby.exe"
desc "Build sandbox for ruby-#{package.rubyver}"
task "sandbox" => [:devkit, "compile", ruby_exe]
file ruby_exe => compile_task.pkgfile do
# pacman doesn't work on automount paths (/c/path), so that we
# mount to /tmp
pmrootdir = "/tmp/rubyinstaller/ruby-#{package.rubyver}-#{package.arch}"
mkdir_p File.join(ENV['RI_DEVKIT'], pmrootdir)
mkdir_p sandboxdir
rm_rf sandboxdir
%w[var/cache/pacman/pkg var/lib/pacman].each do |dir|
mkdir_p File.join(sandboxdir, dir)
end
msys_sh <<-EOT
mount #{sandboxdir_abs.inspect} #{pmrootdir.inspect} &&
pacman --root #{pmrootdir.inspect} -Sy &&
pacman --root #{pmrootdir.inspect} --noconfirm -U #{compile_task.pkgfile.inspect};
umount #{pmrootdir.inspect}
EOT
touch ruby_exe
end
end
end
| require "base_task"
class SandboxTask < BaseTask
def initialize(*args)
super
- self.sandboxdir = "sandbox/ruby-#{package.rubyver}"
+ self.sandboxdir = "sandbox/ruby-#{package.rubyver}-#{package.arch}"
? ++++++++++++++++
self.sandboxdirmgw = File.join(sandboxdir, package.mingwdir)
self.sandboxdir_abs = File.expand_path(sandboxdir, package.rootdir)
ruby_exe = "#{sandboxdirmgw}/bin/ruby.exe"
desc "Build sandbox for ruby-#{package.rubyver}"
task "sandbox" => [:devkit, "compile", ruby_exe]
file ruby_exe => compile_task.pkgfile do
# pacman doesn't work on automount paths (/c/path), so that we
# mount to /tmp
- pmrootdir = "/tmp/rubyinstaller/ruby-#{package.rubyver}"
+ pmrootdir = "/tmp/rubyinstaller/ruby-#{package.rubyver}-#{package.arch}"
? ++++++++++++++++
mkdir_p File.join(ENV['RI_DEVKIT'], pmrootdir)
mkdir_p sandboxdir
rm_rf sandboxdir
%w[var/cache/pacman/pkg var/lib/pacman].each do |dir|
mkdir_p File.join(sandboxdir, dir)
end
msys_sh <<-EOT
mount #{sandboxdir_abs.inspect} #{pmrootdir.inspect} &&
pacman --root #{pmrootdir.inspect} -Sy &&
pacman --root #{pmrootdir.inspect} --noconfirm -U #{compile_task.pkgfile.inspect};
umount #{pmrootdir.inspect}
EOT
touch ruby_exe
end
end
end | 4 | 0.117647 | 2 | 2 |
c30c9a640b74093c0217927cff4a819bb459e596 | src/Tools/Model/PropertyManager.php | src/Tools/Model/PropertyManager.php | <?php
declare(strict_types=1);
namespace LotGD\Core\Tools\Model;
/**
* Provides method and doctrine annotation for a property submodel
*/
trait PropertyManager
{
private $propertyStorage = null;
public function loadProperties()
{
if ($this->propertyStorage !== null) {
return;
}
foreach ($this->properties as $property) {
$this->propertyStorage[$property->getName()] = $property;
}
}
public function getProperty(string $name, $default = null)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
return $this->propertyStorage[$name]->getValue();
} else {
return $default;
}
}
public function setProperty(string $name, $value)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$this->propertyStorage[$name]->setValue($value);
} else {
$className = $this->properties->getTypeClass()->name;
$property = new $className();
if (method_exists($property, "setOwner")) {
$property->setOwner($this);
}
$property->setName($name);
$property->setValue($value);
$this->propertyStorage[$name] = $property;
$this->properties->add($property);
}
}
}
| <?php
declare(strict_types=1);
namespace LotGD\Core\Tools\Model;
/**
* Provides method and doctrine annotation for a property submodel
*/
trait PropertyManager
{
private $propertyStorage = null;
public function loadProperties()
{
if ($this->propertyStorage !== null) {
return;
}
foreach ($this->properties as $property) {
$this->propertyStorage[$property->getName()] = $property;
}
}
public function getProperty(string $name, $default = null)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
return $this->propertyStorage[$name]->getValue();
} else {
return $default;
}
}
public function unsetProperty(string $name)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$property = $this->propertyStorage[$name];
$this->properties->removeElement($property);
unset($this->propertyStorage[$name]);
}
}
public function setProperty(string $name, $value)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$this->propertyStorage[$name]->setValue($value);
} else {
$className = $this->properties->getTypeClass()->name;
$property = new $className();
if (method_exists($property, "setOwner")) {
$property->setOwner($this);
}
$property->setName($name);
$property->setValue($value);
$this->propertyStorage[$name] = $property;
$this->properties->add($property);
}
}
}
| Add unsetProperty for property managers | Add unsetProperty for property managers
| PHP | agpl-3.0 | lotgd/core,lotgd/core | php | ## Code Before:
<?php
declare(strict_types=1);
namespace LotGD\Core\Tools\Model;
/**
* Provides method and doctrine annotation for a property submodel
*/
trait PropertyManager
{
private $propertyStorage = null;
public function loadProperties()
{
if ($this->propertyStorage !== null) {
return;
}
foreach ($this->properties as $property) {
$this->propertyStorage[$property->getName()] = $property;
}
}
public function getProperty(string $name, $default = null)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
return $this->propertyStorage[$name]->getValue();
} else {
return $default;
}
}
public function setProperty(string $name, $value)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$this->propertyStorage[$name]->setValue($value);
} else {
$className = $this->properties->getTypeClass()->name;
$property = new $className();
if (method_exists($property, "setOwner")) {
$property->setOwner($this);
}
$property->setName($name);
$property->setValue($value);
$this->propertyStorage[$name] = $property;
$this->properties->add($property);
}
}
}
## Instruction:
Add unsetProperty for property managers
## Code After:
<?php
declare(strict_types=1);
namespace LotGD\Core\Tools\Model;
/**
* Provides method and doctrine annotation for a property submodel
*/
trait PropertyManager
{
private $propertyStorage = null;
public function loadProperties()
{
if ($this->propertyStorage !== null) {
return;
}
foreach ($this->properties as $property) {
$this->propertyStorage[$property->getName()] = $property;
}
}
public function getProperty(string $name, $default = null)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
return $this->propertyStorage[$name]->getValue();
} else {
return $default;
}
}
public function unsetProperty(string $name)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$property = $this->propertyStorage[$name];
$this->properties->removeElement($property);
unset($this->propertyStorage[$name]);
}
}
public function setProperty(string $name, $value)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$this->propertyStorage[$name]->setValue($value);
} else {
$className = $this->properties->getTypeClass()->name;
$property = new $className();
if (method_exists($property, "setOwner")) {
$property->setOwner($this);
}
$property->setName($name);
$property->setValue($value);
$this->propertyStorage[$name] = $property;
$this->properties->add($property);
}
}
}
| <?php
declare(strict_types=1);
namespace LotGD\Core\Tools\Model;
/**
* Provides method and doctrine annotation for a property submodel
*/
trait PropertyManager
{
private $propertyStorage = null;
public function loadProperties()
{
if ($this->propertyStorage !== null) {
return;
}
foreach ($this->properties as $property) {
$this->propertyStorage[$property->getName()] = $property;
}
}
public function getProperty(string $name, $default = null)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
return $this->propertyStorage[$name]->getValue();
} else {
return $default;
}
}
+ public function unsetProperty(string $name)
+ {
+ $this->loadProperties();
+
+ if (isset($this->propertyStorage[$name])) {
+ $property = $this->propertyStorage[$name];
+ $this->properties->removeElement($property);
+ unset($this->propertyStorage[$name]);
+ }
+ }
+
public function setProperty(string $name, $value)
{
$this->loadProperties();
if (isset($this->propertyStorage[$name])) {
$this->propertyStorage[$name]->setValue($value);
} else {
$className = $this->properties->getTypeClass()->name;
$property = new $className();
if (method_exists($property, "setOwner")) {
$property->setOwner($this);
}
$property->setName($name);
$property->setValue($value);
$this->propertyStorage[$name] = $property;
$this->properties->add($property);
}
}
} | 11 | 0.203704 | 11 | 0 |
edeec29d30fbb7043307bda3978ca487b12586cf | lib/simctl/device_settings.rb | lib/simctl/device_settings.rb | require 'cfpropertylist'
module SimCtl
class DeviceSettings
attr_reader :path
def initialize(path)
@path = path
end
# Disables the keyboard helpers
#
# @return [void]
def disable_keyboard_helpers!
edit(path.preferences_plist) do |plist|
%w(
KeyboardPeriodShortcut
KeyboardAutocapitalization
KeyboardCheckSpelling
KeyboardAssistant
KeyboardAutocorrection
KeyboardPrediction
KeyboardShowPredictionBar
KeyboardCapsLock
).each do |key|
plist[key] = false
end
plist
end
end
private
def edit(path, &block)
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
content = CFPropertyList.native_types(plist.value) || {}
plist.value = CFPropertyList.guess(yield content)
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
end
end
end
| require 'cfpropertylist'
module SimCtl
class DeviceSettings
attr_reader :path
def initialize(path)
@path = path
end
# Disables the keyboard helpers
#
# @return [void]
def disable_keyboard_helpers!
edit(path.preferences_plist) do |plist|
%w(
KeyboardAllowPaddle
KeyboardAssistant
KeyboardAutocapitalization
KeyboardAutocorrection
KeyboardCapsLock
KeyboardCheckSpelling
KeyboardPeriodShortcut
KeyboardPrediction
KeyboardShowPredictionBar
).each do |key|
plist[key] = false
end
plist
end
end
private
def edit(path, &block)
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
content = CFPropertyList.native_types(plist.value) || {}
plist.value = CFPropertyList.guess(yield content)
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
end
end
end
| Sort & add missing keyboard options | Sort & add missing keyboard options
| Ruby | mit | adamprice/simctl,plu/simctl | ruby | ## Code Before:
require 'cfpropertylist'
module SimCtl
class DeviceSettings
attr_reader :path
def initialize(path)
@path = path
end
# Disables the keyboard helpers
#
# @return [void]
def disable_keyboard_helpers!
edit(path.preferences_plist) do |plist|
%w(
KeyboardPeriodShortcut
KeyboardAutocapitalization
KeyboardCheckSpelling
KeyboardAssistant
KeyboardAutocorrection
KeyboardPrediction
KeyboardShowPredictionBar
KeyboardCapsLock
).each do |key|
plist[key] = false
end
plist
end
end
private
def edit(path, &block)
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
content = CFPropertyList.native_types(plist.value) || {}
plist.value = CFPropertyList.guess(yield content)
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
end
end
end
## Instruction:
Sort & add missing keyboard options
## Code After:
require 'cfpropertylist'
module SimCtl
class DeviceSettings
attr_reader :path
def initialize(path)
@path = path
end
# Disables the keyboard helpers
#
# @return [void]
def disable_keyboard_helpers!
edit(path.preferences_plist) do |plist|
%w(
KeyboardAllowPaddle
KeyboardAssistant
KeyboardAutocapitalization
KeyboardAutocorrection
KeyboardCapsLock
KeyboardCheckSpelling
KeyboardPeriodShortcut
KeyboardPrediction
KeyboardShowPredictionBar
).each do |key|
plist[key] = false
end
plist
end
end
private
def edit(path, &block)
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
content = CFPropertyList.native_types(plist.value) || {}
plist.value = CFPropertyList.guess(yield content)
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
end
end
end
| require 'cfpropertylist'
module SimCtl
class DeviceSettings
attr_reader :path
def initialize(path)
@path = path
end
# Disables the keyboard helpers
#
# @return [void]
def disable_keyboard_helpers!
edit(path.preferences_plist) do |plist|
%w(
+ KeyboardAllowPaddle
+ KeyboardAssistant
+ KeyboardAutocapitalization
+ KeyboardAutocorrection
+ KeyboardCapsLock
+ KeyboardCheckSpelling
KeyboardPeriodShortcut
- KeyboardAutocapitalization
- KeyboardCheckSpelling
- KeyboardAssistant
- KeyboardAutocorrection
KeyboardPrediction
KeyboardShowPredictionBar
- KeyboardCapsLock
).each do |key|
plist[key] = false
end
plist
end
end
private
def edit(path, &block)
plist = File.exists?(path) ? CFPropertyList::List.new(file: path) : CFPropertyList::List.new
content = CFPropertyList.native_types(plist.value) || {}
plist.value = CFPropertyList.guess(yield content)
plist.save(path, CFPropertyList::List::FORMAT_BINARY)
end
end
end | 11 | 0.268293 | 6 | 5 |
5c110374d1c75c8892f074a9ea15dbb73744924e | .eslintrc.js | .eslintrc.js | module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
rules: {
'import/first': ['off', 'always'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 2, maxEOF: 0 }],
},
},
],
rules: {
indent: ['error', 4],
}
}
| module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
rules: {
'import/first': ['off', 'always'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 2, maxEOF: 0 }],
},
},
],
rules: {
'comma-dangle': ['off', 'always'],
'indent': ['error', 4],
'no-console': ['warn', {}],
}
}
| Allow dangling commas and warn about console statements | eslint: Allow dangling commas and warn about console statements
| JavaScript | mit | peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag | javascript | ## Code Before:
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
rules: {
'import/first': ['off', 'always'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 2, maxEOF: 0 }],
},
},
],
rules: {
indent: ['error', 4],
}
}
## Instruction:
eslint: Allow dangling commas and warn about console statements
## Code After:
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
rules: {
'import/first': ['off', 'always'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 2, maxEOF: 0 }],
},
},
],
rules: {
'comma-dangle': ['off', 'always'],
'indent': ['error', 4],
'no-console': ['warn', {}],
}
}
| module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
rules: {
'import/first': ['off', 'always'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 2, maxEOF: 0 }],
},
},
],
rules: {
+ 'comma-dangle': ['off', 'always'],
- indent: ['error', 4],
+ 'indent': ['error', 4],
? + +
+ 'no-console': ['warn', {}],
}
} | 4 | 0.137931 | 3 | 1 |
f69da6f24833d6c934598babccd76cd2a88864d8 | .travis.yml | .travis.yml | addons:
postgresql: 9.6
before_script:
- bundle exec rails db:setup
bundler_args: --jobs 4 --retry 3 --without development
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 2.3.5
- 2.4.2
script:
- bundle exec rails bundle:audit
- bundle exec rubocop
- bundle exec rails test
sudo: false
| addons:
postgresql: 9.6
before_script:
- bundle exec rails db:setup
bundler_args: --jobs 4 --retry 3 --without development
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 2.3.5
- 2.4.2
script:
- bundle exec rails bundle:audit
- bundle exec license_finder --quiet
- bundle exec rubocop
- bundle exec rails test
sudo: false
| Add `license_finder` to CI jobs | Add `license_finder` to CI jobs
| YAML | mit | renocollective/member-portal,renocollective/member-portal,renocollective/member-portal | yaml | ## Code Before:
addons:
postgresql: 9.6
before_script:
- bundle exec rails db:setup
bundler_args: --jobs 4 --retry 3 --without development
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 2.3.5
- 2.4.2
script:
- bundle exec rails bundle:audit
- bundle exec rubocop
- bundle exec rails test
sudo: false
## Instruction:
Add `license_finder` to CI jobs
## Code After:
addons:
postgresql: 9.6
before_script:
- bundle exec rails db:setup
bundler_args: --jobs 4 --retry 3 --without development
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 2.3.5
- 2.4.2
script:
- bundle exec rails bundle:audit
- bundle exec license_finder --quiet
- bundle exec rubocop
- bundle exec rails test
sudo: false
| addons:
postgresql: 9.6
before_script:
- bundle exec rails db:setup
bundler_args: --jobs 4 --retry 3 --without development
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 2.3.5
- 2.4.2
script:
- bundle exec rails bundle:audit
+ - bundle exec license_finder --quiet
- bundle exec rubocop
- bundle exec rails test
sudo: false | 1 | 0.058824 | 1 | 0 |
869b44c5d6a0d7174def151577444a18e30929a3 | application/jsx/home.jsx | application/jsx/home.jsx | /** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
event.preventDefault();
this.props.user.logout();
},
render : function() {
if (this.props.loggedIn) {
return (
<div>
<p>
Hello. You are logged in. <a onClick={this.logout}>Log out</a>
</p>
<p>
Your email:
<a href="/account/change-email" onClick={this.navigate}>Change email</a>
</p>
<p>
<a href="/account/change-password" onClick={this.navigate}>Change password</a>
</p>
</div>
);
} else {
return (
<div>
<p>
Hello. Please
<a href="/login" onClick={this.navigate}>log in</a> or
<a href="/register" onClick={this.navigate}>register</a>.
</p>
<p>
Or <a href="http://project.vm/social-login/github">log in with GitHub</a>.
</p>
</div>
);
}
}
});
});
| /** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
var success = _.bind(
function() {
this.redirect('/');
},
this
);
event.preventDefault();
this.props.user.logout(success);
},
render : function() {
if (this.props.loggedIn) {
return (
<div>
<p>
Hello. You are logged in. <a onClick={this.logout}>Log out</a>
</p>
<p>
Your email:
<a href="/account/change-email" onClick={this.navigate}>Change email</a>
</p>
<p>
<a href="/account/change-password" onClick={this.navigate}>Change password</a>
</p>
</div>
);
} else {
return (
<div>
<p>
Hello. Please
<a href="/login" onClick={this.navigate}>log in</a> or
<a href="/register" onClick={this.navigate}>register</a>.
</p>
<p>
Or <a href="http://project.vm/social-login/github">log in with GitHub</a>.
</p>
</div>
);
}
}
});
});
| Send redirect closure on successful logout. | Send redirect closure on successful logout.
| JSX | mit | areida/spacesynter,dcpages/dcLibrary-Template,dcpages/dcLibrary-Template,areida/spacesynter,areida/spacesynter,areida/spacesynter,areida/spacesynter | jsx | ## Code Before:
/** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
event.preventDefault();
this.props.user.logout();
},
render : function() {
if (this.props.loggedIn) {
return (
<div>
<p>
Hello. You are logged in. <a onClick={this.logout}>Log out</a>
</p>
<p>
Your email:
<a href="/account/change-email" onClick={this.navigate}>Change email</a>
</p>
<p>
<a href="/account/change-password" onClick={this.navigate}>Change password</a>
</p>
</div>
);
} else {
return (
<div>
<p>
Hello. Please
<a href="/login" onClick={this.navigate}>log in</a> or
<a href="/register" onClick={this.navigate}>register</a>.
</p>
<p>
Or <a href="http://project.vm/social-login/github">log in with GitHub</a>.
</p>
</div>
);
}
}
});
});
## Instruction:
Send redirect closure on successful logout.
## Code After:
/** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
var success = _.bind(
function() {
this.redirect('/');
},
this
);
event.preventDefault();
this.props.user.logout(success);
},
render : function() {
if (this.props.loggedIn) {
return (
<div>
<p>
Hello. You are logged in. <a onClick={this.logout}>Log out</a>
</p>
<p>
Your email:
<a href="/account/change-email" onClick={this.navigate}>Change email</a>
</p>
<p>
<a href="/account/change-password" onClick={this.navigate}>Change password</a>
</p>
</div>
);
} else {
return (
<div>
<p>
Hello. Please
<a href="/login" onClick={this.navigate}>log in</a> or
<a href="/register" onClick={this.navigate}>register</a>.
</p>
<p>
Or <a href="http://project.vm/social-login/github">log in with GitHub</a>.
</p>
</div>
);
}
}
});
});
| /** @jsx React.DOM */
define([
'react',
'templates/mixins/navigate'
], function(
React,
NavigateMixin
) {
return React.createClass({
displayName : 'HomeModule',
mixins : [NavigateMixin],
logout : function(event) {
+ var success = _.bind(
+ function() {
+ this.redirect('/');
+ },
+ this
+ );
+
event.preventDefault();
+
- this.props.user.logout();
+ this.props.user.logout(success);
? +++++++
},
render : function() {
if (this.props.loggedIn) {
return (
<div>
<p>
Hello. You are logged in. <a onClick={this.logout}>Log out</a>
</p>
<p>
Your email:
<a href="/account/change-email" onClick={this.navigate}>Change email</a>
</p>
<p>
<a href="/account/change-password" onClick={this.navigate}>Change password</a>
</p>
</div>
);
} else {
return (
<div>
<p>
Hello. Please
<a href="/login" onClick={this.navigate}>log in</a> or
<a href="/register" onClick={this.navigate}>register</a>.
</p>
<p>
Or <a href="http://project.vm/social-login/github">log in with GitHub</a>.
</p>
</div>
);
}
}
});
}); | 10 | 0.188679 | 9 | 1 |
840a8692f39b5c4d72ca06d418af854bbf51e384 | docs/feeds.rst | docs/feeds.rst | Feeds
========
Puput allows to customize the feeds for your blog entries. These options can be found in the settings tab while editing blog properties.
Feed description
------
Set *Use short description in feeds* to False if you want to use the full blog post content as description for the feed items.
When set to True (by default), Puput will try to use the blog post's excerpt or truncate the body to 70 words when the excerpt is not available.
| Feeds
=====
Puput allows to customize the feeds for your blog entries. These options can be found in the settings tab while editing blog properties.
Feed description
----------------
Set *Use short description in feeds* to False if you want to use the full blog post content as description for the feed items.
When set to True (by default), Puput will try to use the blog post's excerpt or truncate the body to 70 words when the excerpt is not available.
| Fix the underlines of headings in | Fix the underlines of headings in
| reStructuredText | mit | APSL/puput,csalom/puput,csalom/puput,csalom/puput,APSL/puput,APSL/puput | restructuredtext | ## Code Before:
Feeds
========
Puput allows to customize the feeds for your blog entries. These options can be found in the settings tab while editing blog properties.
Feed description
------
Set *Use short description in feeds* to False if you want to use the full blog post content as description for the feed items.
When set to True (by default), Puput will try to use the blog post's excerpt or truncate the body to 70 words when the excerpt is not available.
## Instruction:
Fix the underlines of headings in
## Code After:
Feeds
=====
Puput allows to customize the feeds for your blog entries. These options can be found in the settings tab while editing blog properties.
Feed description
----------------
Set *Use short description in feeds* to False if you want to use the full blog post content as description for the feed items.
When set to True (by default), Puput will try to use the blog post's excerpt or truncate the body to 70 words when the excerpt is not available.
| Feeds
- ========
? ---
+ =====
Puput allows to customize the feeds for your blog entries. These options can be found in the settings tab while editing blog properties.
Feed description
- ------
+ ----------------
Set *Use short description in feeds* to False if you want to use the full blog post content as description for the feed items.
When set to True (by default), Puput will try to use the blog post's excerpt or truncate the body to 70 words when the excerpt is not available.
| 4 | 0.363636 | 2 | 2 |
ac14efc0a8facbfe2fe7288734c86b27eb9b2770 | openprocurement/tender/openeu/adapters.py | openprocurement/tender/openeu/adapters.py | from openprocurement.tender.core.adapters import TenderConfigurator
from openprocurement.tender.openeu.models import Tender
from openprocurement.tender.openua.constants import (
TENDERING_EXTRA_PERIOD
)
from openprocurement.tender.openeu.constants import (
TENDERING_DURATION, PREQUALIFICATION_COMPLAINT_STAND_STILL
)
class TenderAboveThresholdEUConfigurator(TenderConfigurator):
""" AboveThresholdEU Tender configuration adapter """
name = "AboveThresholdEU Tender configurator"
model = Tender
# duration of tendering period. timedelta object.
tendering_period_duration = TENDERING_DURATION
# duration of tender period extension. timedelta object
tendering_period_extra = TENDERING_EXTRA_PERIOD
# duration of pre-qualification stand-still period. timedelta object.
prequalification_complaint_stand_still = PREQUALIFICATION_COMPLAINT_STAND_STILL
block_tender_complaint_status = model.block_tender_complaint_status
block_complaint_status = model.block_complaint_status
| from openprocurement.tender.core.adapters import TenderConfigurator
from openprocurement.tender.openeu.models import Tender
from openprocurement.tender.openua.constants import (
TENDERING_EXTRA_PERIOD, STATUS4ROLE
)
from openprocurement.tender.openeu.constants import (
TENDERING_DURATION, PREQUALIFICATION_COMPLAINT_STAND_STILL
)
class TenderAboveThresholdEUConfigurator(TenderConfigurator):
""" AboveThresholdEU Tender configuration adapter """
name = "AboveThresholdEU Tender configurator"
model = Tender
# duration of tendering period. timedelta object.
tendering_period_duration = TENDERING_DURATION
# duration of tender period extension. timedelta object
tendering_period_extra = TENDERING_EXTRA_PERIOD
# duration of pre-qualification stand-still period. timedelta object.
prequalification_complaint_stand_still = PREQUALIFICATION_COMPLAINT_STAND_STILL
block_tender_complaint_status = model.block_tender_complaint_status
block_complaint_status = model.block_complaint_status
# Dictionary with allowed complaint statuses for operations for each role
allowed_statuses_for_complaint_operations_for_roles = STATUS4ROLE
| Add constant for complaint documents | Add constant for complaint documents
| Python | apache-2.0 | openprocurement/openprocurement.tender.openeu | python | ## Code Before:
from openprocurement.tender.core.adapters import TenderConfigurator
from openprocurement.tender.openeu.models import Tender
from openprocurement.tender.openua.constants import (
TENDERING_EXTRA_PERIOD
)
from openprocurement.tender.openeu.constants import (
TENDERING_DURATION, PREQUALIFICATION_COMPLAINT_STAND_STILL
)
class TenderAboveThresholdEUConfigurator(TenderConfigurator):
""" AboveThresholdEU Tender configuration adapter """
name = "AboveThresholdEU Tender configurator"
model = Tender
# duration of tendering period. timedelta object.
tendering_period_duration = TENDERING_DURATION
# duration of tender period extension. timedelta object
tendering_period_extra = TENDERING_EXTRA_PERIOD
# duration of pre-qualification stand-still period. timedelta object.
prequalification_complaint_stand_still = PREQUALIFICATION_COMPLAINT_STAND_STILL
block_tender_complaint_status = model.block_tender_complaint_status
block_complaint_status = model.block_complaint_status
## Instruction:
Add constant for complaint documents
## Code After:
from openprocurement.tender.core.adapters import TenderConfigurator
from openprocurement.tender.openeu.models import Tender
from openprocurement.tender.openua.constants import (
TENDERING_EXTRA_PERIOD, STATUS4ROLE
)
from openprocurement.tender.openeu.constants import (
TENDERING_DURATION, PREQUALIFICATION_COMPLAINT_STAND_STILL
)
class TenderAboveThresholdEUConfigurator(TenderConfigurator):
""" AboveThresholdEU Tender configuration adapter """
name = "AboveThresholdEU Tender configurator"
model = Tender
# duration of tendering period. timedelta object.
tendering_period_duration = TENDERING_DURATION
# duration of tender period extension. timedelta object
tendering_period_extra = TENDERING_EXTRA_PERIOD
# duration of pre-qualification stand-still period. timedelta object.
prequalification_complaint_stand_still = PREQUALIFICATION_COMPLAINT_STAND_STILL
block_tender_complaint_status = model.block_tender_complaint_status
block_complaint_status = model.block_complaint_status
# Dictionary with allowed complaint statuses for operations for each role
allowed_statuses_for_complaint_operations_for_roles = STATUS4ROLE
| from openprocurement.tender.core.adapters import TenderConfigurator
from openprocurement.tender.openeu.models import Tender
from openprocurement.tender.openua.constants import (
- TENDERING_EXTRA_PERIOD
+ TENDERING_EXTRA_PERIOD, STATUS4ROLE
? +++++++++++++
)
from openprocurement.tender.openeu.constants import (
TENDERING_DURATION, PREQUALIFICATION_COMPLAINT_STAND_STILL
)
class TenderAboveThresholdEUConfigurator(TenderConfigurator):
""" AboveThresholdEU Tender configuration adapter """
name = "AboveThresholdEU Tender configurator"
model = Tender
# duration of tendering period. timedelta object.
tendering_period_duration = TENDERING_DURATION
# duration of tender period extension. timedelta object
tendering_period_extra = TENDERING_EXTRA_PERIOD
# duration of pre-qualification stand-still period. timedelta object.
prequalification_complaint_stand_still = PREQUALIFICATION_COMPLAINT_STAND_STILL
block_tender_complaint_status = model.block_tender_complaint_status
block_complaint_status = model.block_complaint_status
+
+ # Dictionary with allowed complaint statuses for operations for each role
+ allowed_statuses_for_complaint_operations_for_roles = STATUS4ROLE | 5 | 0.185185 | 4 | 1 |
c1764d6dc258167cea8ca1dbfb460b9a25406ef6 | app/models/renalware/patients/worry_query.rb | app/models/renalware/patients/worry_query.rb | require_dependency "renalware/patients"
module Renalware
module Patients
class WorryQuery
attr_reader :query_params
def initialize(query_params)
@query_params = query_params
@query_params[:s] = "date_time DESC" if @query_params[:s].blank?
end
def call
search
.result
.includes(patient: { current_modality: [:description] })
.order(created_at: :asc)
.page(query_params[:page])
.per(query_params[:per_page])
end
def search
@search ||= Worry.ransack(query_params)
end
end
end
end
| require_dependency "renalware/patients"
module Renalware
module Patients
class WorryQuery
attr_reader :query_params
def initialize(query_params)
@query_params = query_params
@query_params[:s] = "date_time DESC" if @query_params[:s].blank?
end
def call
search
.result
.includes(:created_by, patient: { current_modality: [:description] })
.order(created_at: :asc)
.page(query_params[:page])
.per(query_params[:per_page])
end
def search
@search ||= Worry.ransack(query_params)
end
end
end
end
| Resolve Worryboard list N+1 issues | Resolve Worryboard list N+1 issues
| Ruby | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | ruby | ## Code Before:
require_dependency "renalware/patients"
module Renalware
module Patients
class WorryQuery
attr_reader :query_params
def initialize(query_params)
@query_params = query_params
@query_params[:s] = "date_time DESC" if @query_params[:s].blank?
end
def call
search
.result
.includes(patient: { current_modality: [:description] })
.order(created_at: :asc)
.page(query_params[:page])
.per(query_params[:per_page])
end
def search
@search ||= Worry.ransack(query_params)
end
end
end
end
## Instruction:
Resolve Worryboard list N+1 issues
## Code After:
require_dependency "renalware/patients"
module Renalware
module Patients
class WorryQuery
attr_reader :query_params
def initialize(query_params)
@query_params = query_params
@query_params[:s] = "date_time DESC" if @query_params[:s].blank?
end
def call
search
.result
.includes(:created_by, patient: { current_modality: [:description] })
.order(created_at: :asc)
.page(query_params[:page])
.per(query_params[:per_page])
end
def search
@search ||= Worry.ransack(query_params)
end
end
end
end
| require_dependency "renalware/patients"
module Renalware
module Patients
class WorryQuery
attr_reader :query_params
def initialize(query_params)
@query_params = query_params
@query_params[:s] = "date_time DESC" if @query_params[:s].blank?
end
def call
search
.result
- .includes(patient: { current_modality: [:description] })
+ .includes(:created_by, patient: { current_modality: [:description] })
? +++++++++++++
.order(created_at: :asc)
.page(query_params[:page])
.per(query_params[:per_page])
end
def search
@search ||= Worry.ransack(query_params)
end
end
end
end | 2 | 0.074074 | 1 | 1 |
485f1e8443bee8dd5f7116112f98717edbc49a08 | examples/ably.js | examples/ably.js | 'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
});
| 'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
/* global define */
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
});
| Allow "define" in examples (no-undef) | Allow "define" in examples (no-undef)
| JavaScript | mit | vgno/ably | javascript | ## Code Before:
'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
});
## Instruction:
Allow "define" in examples (no-undef)
## Code After:
'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
/* global define */
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
});
| 'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
+ /* global define */
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
}); | 1 | 0.083333 | 1 | 0 |
d603bea6e9869e749b7122112351e532196b8c5a | generator/generator.go | generator/generator.go | package generator
import "os"
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate writes the file with the contents of the given package.
func (g *Generator) Generate(pkg *Package) error {
return g.writeFile(pkg)
}
func (g *Generator) writeFile(pkg *Package) error {
file, err := os.Create(g.filename)
if err != nil {
return err
}
defer file.Close()
return Base.Execute(file, pkg)
}
| package generator
import (
"fmt"
"os"
)
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate writes the file with the contents of the given package.
func (g *Generator) Generate(pkg *Package) error {
return g.writeFile(pkg)
}
func (g *Generator) writeFile(pkg *Package) (err error) {
file, err := os.Create(g.filename)
if err != nil {
return err
}
defer func() {
file.Close()
if err != nil {
fmt.Println()
fmt.Println("kallax: No file generated due to an occurred error:")
os.Remove(g.filename)
}
}()
return Base.Execute(file, pkg)
}
| Delete autogenerated kallax.go if generation failed | Delete autogenerated kallax.go if generation failed
| Go | mit | src-d/go-kallax | go | ## Code Before:
package generator
import "os"
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate writes the file with the contents of the given package.
func (g *Generator) Generate(pkg *Package) error {
return g.writeFile(pkg)
}
func (g *Generator) writeFile(pkg *Package) error {
file, err := os.Create(g.filename)
if err != nil {
return err
}
defer file.Close()
return Base.Execute(file, pkg)
}
## Instruction:
Delete autogenerated kallax.go if generation failed
## Code After:
package generator
import (
"fmt"
"os"
)
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate writes the file with the contents of the given package.
func (g *Generator) Generate(pkg *Package) error {
return g.writeFile(pkg)
}
func (g *Generator) writeFile(pkg *Package) (err error) {
file, err := os.Create(g.filename)
if err != nil {
return err
}
defer func() {
file.Close()
if err != nil {
fmt.Println()
fmt.Println("kallax: No file generated due to an occurred error:")
os.Remove(g.filename)
}
}()
return Base.Execute(file, pkg)
}
| package generator
- import "os"
+ import (
+ "fmt"
+ "os"
+ )
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate writes the file with the contents of the given package.
func (g *Generator) Generate(pkg *Package) error {
return g.writeFile(pkg)
}
- func (g *Generator) writeFile(pkg *Package) error {
+ func (g *Generator) writeFile(pkg *Package) (err error) {
? +++++ +
file, err := os.Create(g.filename)
if err != nil {
return err
}
+ defer func() {
- defer file.Close()
? ^^^^^^
+ file.Close()
? ^
+ if err != nil {
+ fmt.Println()
+ fmt.Println("kallax: No file generated due to an occurred error:")
+ os.Remove(g.filename)
+ }
+ }()
+
return Base.Execute(file, pkg)
} | 17 | 0.607143 | 14 | 3 |
1e64b7ecd66280dea272594e35e287f23bb906a6 | requirements.txt | requirements.txt | Flask==0.10.1
Flask-Login==0.2.7
Jinja2==2.7.1
Markdown==2.3.1
MarkupSafe==0.18
Pillow==2.4.0
Pygments==1.6
Werkzeug==0.9.4
beautifulsoup4==4.3.2
bleach==1.4
blinker==1.3
html5lib==0.999
itsdangerous==0.24
-e git://github.com/kylewm/mf2py.git@a76437dd3948a30f53cb14f693057533ae8a68d3#egg=mf2py-origin/master
oauthlib==0.6.1
pytz==2013.9
requests==2.2.1
requests-oauthlib==0.4.0
six==1.6.1
smartypants==1.8.3
uWSGI==1.9.20
| Flask==0.10.1
Flask-Login==0.2.7
Jinja2==2.7.1
Markdown==2.3.1
MarkupSafe==0.18
Pillow==2.4.0
Pygments==1.6
Werkzeug==0.9.4
beautifulsoup4==4.3.2
bleach==1.4
blinker==1.3
html5lib==0.999
itsdangerous==0.24
-e git://github.com/kylewm/mf2py.git@a76437dd3948a30f53cb14f693057533ae8a68d3#egg=mf2py
oauthlib==0.6.1
pytz==2013.9
requests==2.2.1
requests-oauthlib==0.4.0
six==1.6.1
smartypants==1.8.3
uWSGI==1.9.20
| Remove trailing origin/master from mf2py version spec | Remove trailing origin/master from mf2py version spec
| Text | bsd-2-clause | Lancey6/redwind,Lancey6/redwind,thedod/redwind,thedod/redwind,Lancey6/redwind | text | ## Code Before:
Flask==0.10.1
Flask-Login==0.2.7
Jinja2==2.7.1
Markdown==2.3.1
MarkupSafe==0.18
Pillow==2.4.0
Pygments==1.6
Werkzeug==0.9.4
beautifulsoup4==4.3.2
bleach==1.4
blinker==1.3
html5lib==0.999
itsdangerous==0.24
-e git://github.com/kylewm/mf2py.git@a76437dd3948a30f53cb14f693057533ae8a68d3#egg=mf2py-origin/master
oauthlib==0.6.1
pytz==2013.9
requests==2.2.1
requests-oauthlib==0.4.0
six==1.6.1
smartypants==1.8.3
uWSGI==1.9.20
## Instruction:
Remove trailing origin/master from mf2py version spec
## Code After:
Flask==0.10.1
Flask-Login==0.2.7
Jinja2==2.7.1
Markdown==2.3.1
MarkupSafe==0.18
Pillow==2.4.0
Pygments==1.6
Werkzeug==0.9.4
beautifulsoup4==4.3.2
bleach==1.4
blinker==1.3
html5lib==0.999
itsdangerous==0.24
-e git://github.com/kylewm/mf2py.git@a76437dd3948a30f53cb14f693057533ae8a68d3#egg=mf2py
oauthlib==0.6.1
pytz==2013.9
requests==2.2.1
requests-oauthlib==0.4.0
six==1.6.1
smartypants==1.8.3
uWSGI==1.9.20
| Flask==0.10.1
Flask-Login==0.2.7
Jinja2==2.7.1
Markdown==2.3.1
MarkupSafe==0.18
Pillow==2.4.0
Pygments==1.6
Werkzeug==0.9.4
beautifulsoup4==4.3.2
bleach==1.4
blinker==1.3
html5lib==0.999
itsdangerous==0.24
- -e git://github.com/kylewm/mf2py.git@a76437dd3948a30f53cb14f693057533ae8a68d3#egg=mf2py-origin/master
? --------------
+ -e git://github.com/kylewm/mf2py.git@a76437dd3948a30f53cb14f693057533ae8a68d3#egg=mf2py
oauthlib==0.6.1
pytz==2013.9
requests==2.2.1
requests-oauthlib==0.4.0
six==1.6.1
smartypants==1.8.3
uWSGI==1.9.20 | 2 | 0.095238 | 1 | 1 |
807549f5995e2a68f6d427da905b668a2adbc4f0 | .travis.yml | .travis.yml | sudo: required
dist: trusty
language: cpp
before_install:
# Modified Adafruit script for Arduino CI
- source <(curl -SLs https://raw.githubusercontent.com/blinkinlabs/travis-ci-arduino/master/install.sh)
install:
# - sudo apt-get -y install qt57[QTPACKAGE] qt57serialport libusb-1.0-0-dev
- sudo apt-get -y --force-yes install gcc-arm-none-eabi dfu-util
# - sudo apt-get -y install eagle
script:
# Build Arduino examples
- build_platform blinkytape
| dist: trusty
language: cpp
before_install:
# Modified Adafruit script for Arduino CI
- source <(curl -SLs https://raw.githubusercontent.com/blinkinlabs/travis-ci-arduino/master/install.sh)
install:
# - sudo apt-get -y install qt57[QTPACKAGE] qt57serialport libusb-1.0-0-dev
# - sudo apt-get -y --force-yes install gcc-arm-none-eabi dfu-util
# - sudo apt-get -y install eagle
script:
# Build Arduino examples
- build_platform blinkytape
| Drop root requirement since we don't need to install any packages | Drop root requirement since we don't need to install any packages
| YAML | mit | Blinkinlabs/BlinkyTape_Arduino | yaml | ## Code Before:
sudo: required
dist: trusty
language: cpp
before_install:
# Modified Adafruit script for Arduino CI
- source <(curl -SLs https://raw.githubusercontent.com/blinkinlabs/travis-ci-arduino/master/install.sh)
install:
# - sudo apt-get -y install qt57[QTPACKAGE] qt57serialport libusb-1.0-0-dev
- sudo apt-get -y --force-yes install gcc-arm-none-eabi dfu-util
# - sudo apt-get -y install eagle
script:
# Build Arduino examples
- build_platform blinkytape
## Instruction:
Drop root requirement since we don't need to install any packages
## Code After:
dist: trusty
language: cpp
before_install:
# Modified Adafruit script for Arduino CI
- source <(curl -SLs https://raw.githubusercontent.com/blinkinlabs/travis-ci-arduino/master/install.sh)
install:
# - sudo apt-get -y install qt57[QTPACKAGE] qt57serialport libusb-1.0-0-dev
# - sudo apt-get -y --force-yes install gcc-arm-none-eabi dfu-util
# - sudo apt-get -y install eagle
script:
# Build Arduino examples
- build_platform blinkytape
| - sudo: required
dist: trusty
language: cpp
before_install:
# Modified Adafruit script for Arduino CI
- source <(curl -SLs https://raw.githubusercontent.com/blinkinlabs/travis-ci-arduino/master/install.sh)
install:
# - sudo apt-get -y install qt57[QTPACKAGE] qt57serialport libusb-1.0-0-dev
- - sudo apt-get -y --force-yes install gcc-arm-none-eabi dfu-util
+ # - sudo apt-get -y --force-yes install gcc-arm-none-eabi dfu-util
? +
# - sudo apt-get -y install eagle
script:
# Build Arduino examples
- build_platform blinkytape | 3 | 0.1875 | 1 | 2 |
6b146ea622792d99d5f62e0f30827ecddd344bce | modules/nginx/templates/conf.d/nginx.conf.erb | modules/nginx/templates/conf.d/nginx.conf.erb | user <%= @daemon_user %>;
worker_processes <%= @worker_processes %>;
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
events {
worker_connections <%= @worker_connections %>;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens <%= @server_tokens %>;
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on'%>
gzip on;
<% end %>
client_max_body_size <%= @client_max_body_size %>;
keepalive_timeout <%= @keepalive_timeout %>;
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on'%>
tcp_nopush on;
<% end %>
client_body_timeout <%= @client_body_timeout %>;
client_header_timeout <%= @client_header_timeout %>;
send_timeout <%= @send_timeout %>;
<% if @access_log == 'on'%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/access.log;
<% else %>
access_log off;
<% end -%>
include /etc/nginx/conf.d/*.conf;
}
| user <%= @daemon_user %>;
worker_processes <%= @worker_processes %>;
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
events {
worker_connections <%= @worker_connections %>;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
charset utf-8;
server_tokens <%= @server_tokens %>;
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on'%>
gzip on;
<% end %>
client_max_body_size <%= @client_max_body_size %>;
keepalive_timeout <%= @keepalive_timeout %>;
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on'%>
tcp_nopush on;
<% end %>
client_body_timeout <%= @client_body_timeout %>;
client_header_timeout <%= @client_header_timeout %>;
send_timeout <%= @send_timeout %>;
<% if @access_log == 'on'%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/access.log;
<% else %>
access_log off;
<% end -%>
include /etc/nginx/conf.d/*.conf;
}
| Set nginx' default charset to utf-8 | Set nginx' default charset to utf-8
| HTML+ERB | mit | feedlabs/puppet-packages,njam/puppet-packages,tomaszdurka/puppet-packages,vrenetic/puppet-packages,feedlabs/puppet-packages,zazabe/puppet-packages,vrenetic/puppet-packages,vrenetic/puppet-packages,cargomedia/puppet-packages,feedlabs/puppet-packages,tomaszdurka/puppet-packages,tomaszdurka/puppet-packages,vrenetic/puppet-packages,ppp0/puppet-packages,tomaszdurka/puppet-packages,ppp0/puppet-packages,ppp0/puppet-packages,feedlabs/puppet-packages,zazabe/puppet-packages,feedlabs/puppet-packages,zazabe/puppet-packages,cargomedia/puppet-packages,ppp0/puppet-packages,njam/puppet-packages,njam/puppet-packages,tomaszdurka/puppet-packages,cargomedia/puppet-packages,njam/puppet-packages,cargomedia/puppet-packages,vrenetic/puppet-packages,zazabe/puppet-packages,tomaszdurka/puppet-packages,ppp0/puppet-packages,vrenetic/puppet-packages,njam/puppet-packages,zazabe/puppet-packages,cargomedia/puppet-packages | html+erb | ## Code Before:
user <%= @daemon_user %>;
worker_processes <%= @worker_processes %>;
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
events {
worker_connections <%= @worker_connections %>;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens <%= @server_tokens %>;
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on'%>
gzip on;
<% end %>
client_max_body_size <%= @client_max_body_size %>;
keepalive_timeout <%= @keepalive_timeout %>;
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on'%>
tcp_nopush on;
<% end %>
client_body_timeout <%= @client_body_timeout %>;
client_header_timeout <%= @client_header_timeout %>;
send_timeout <%= @send_timeout %>;
<% if @access_log == 'on'%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/access.log;
<% else %>
access_log off;
<% end -%>
include /etc/nginx/conf.d/*.conf;
}
## Instruction:
Set nginx' default charset to utf-8
## Code After:
user <%= @daemon_user %>;
worker_processes <%= @worker_processes %>;
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
events {
worker_connections <%= @worker_connections %>;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
charset utf-8;
server_tokens <%= @server_tokens %>;
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on'%>
gzip on;
<% end %>
client_max_body_size <%= @client_max_body_size %>;
keepalive_timeout <%= @keepalive_timeout %>;
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on'%>
tcp_nopush on;
<% end %>
client_body_timeout <%= @client_body_timeout %>;
client_header_timeout <%= @client_header_timeout %>;
send_timeout <%= @send_timeout %>;
<% if @access_log == 'on'%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/access.log;
<% else %>
access_log off;
<% end -%>
include /etc/nginx/conf.d/*.conf;
}
| user <%= @daemon_user %>;
worker_processes <%= @worker_processes %>;
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
error_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/error.log;
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
events {
worker_connections <%= @worker_connections %>;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
+ charset utf-8;
server_tokens <%= @server_tokens %>;
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on'%>
gzip on;
<% end %>
client_max_body_size <%= @client_max_body_size %>;
keepalive_timeout <%= @keepalive_timeout %>;
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on'%>
tcp_nopush on;
<% end %>
client_body_timeout <%= @client_body_timeout %>;
client_header_timeout <%= @client_header_timeout %>;
send_timeout <%= @send_timeout %>;
<% if @access_log == 'on'%>
access_log <%= scope.lookupvar('nginx::params::nx_logdir')%>/access.log;
<% else %>
access_log off;
<% end -%>
include /etc/nginx/conf.d/*.conf;
} | 1 | 0.028571 | 1 | 0 |
4f25d1b2f0b0bb8d5dc64a193c159bebd53ac245 | content-resources/src/main/resources/sql/PostgreSQL/createUserTables.sql | content-resources/src/main/resources/sql/PostgreSQL/createUserTables.sql | DROP TABLE IF EXISTS oskari_users;
DROP TABLE IF EXISTS oskari_roles;
CREATE TABLE oskari_users (
id serial NOT NULL,
user_name character varying(25) NOT NULL,
first_name character varying(128),
last_name character varying(128),
uuid character varying(64),
CONSTRAINT oskari_users_pkey PRIMARY KEY (id),
UNIQUE (user_name)
);
CREATE TABLE oskari_roles (
id serial NOT NULL,
name character varying(25) NOT NULL,
is_guest boolean default FALSE,
UNIQUE (name)
);
| DROP TABLE IF EXISTS oskari_role_oskari_user;
DROP TABLE IF EXISTS oskari_roles;
DROP TABLE IF EXISTS oskari_users;
CREATE TABLE oskari_users (
id serial NOT NULL,
user_name character varying(25) NOT NULL,
first_name character varying(128),
last_name character varying(128),
uuid character varying(64),
CONSTRAINT oskari_users_pkey PRIMARY KEY (id),
UNIQUE (user_name)
);
CREATE TABLE oskari_roles (
id serial NOT NULL,
name character varying(25) NOT NULL,
is_guest boolean default FALSE,
CONSTRAINT oskari_roles_pkey PRIMARY KEY (id),
UNIQUE (name)
);
CREATE TABLE oskari_role_oskari_user (
id serial NOT NULL,
user_name character varying(25) REFERENCES oskari_users(user_name),
role_id integer REFERENCES oskari_roles(id),
CONSTRAINT oskari_role_oskari_user_pkey PRIMARY KEY (id)
);
| Add table to map oskari users to roles | Add table to map oskari users to roles
| SQL | mit | uhef/Oskari-Routing,uhef/Oskari-Routing,nls-oskari/oskari-server,uhef/Oskari-Routing,nls-oskari/oskari-server,uhef/Oskari-Routing,nls-oskari/oskari-server | sql | ## Code Before:
DROP TABLE IF EXISTS oskari_users;
DROP TABLE IF EXISTS oskari_roles;
CREATE TABLE oskari_users (
id serial NOT NULL,
user_name character varying(25) NOT NULL,
first_name character varying(128),
last_name character varying(128),
uuid character varying(64),
CONSTRAINT oskari_users_pkey PRIMARY KEY (id),
UNIQUE (user_name)
);
CREATE TABLE oskari_roles (
id serial NOT NULL,
name character varying(25) NOT NULL,
is_guest boolean default FALSE,
UNIQUE (name)
);
## Instruction:
Add table to map oskari users to roles
## Code After:
DROP TABLE IF EXISTS oskari_role_oskari_user;
DROP TABLE IF EXISTS oskari_roles;
DROP TABLE IF EXISTS oskari_users;
CREATE TABLE oskari_users (
id serial NOT NULL,
user_name character varying(25) NOT NULL,
first_name character varying(128),
last_name character varying(128),
uuid character varying(64),
CONSTRAINT oskari_users_pkey PRIMARY KEY (id),
UNIQUE (user_name)
);
CREATE TABLE oskari_roles (
id serial NOT NULL,
name character varying(25) NOT NULL,
is_guest boolean default FALSE,
CONSTRAINT oskari_roles_pkey PRIMARY KEY (id),
UNIQUE (name)
);
CREATE TABLE oskari_role_oskari_user (
id serial NOT NULL,
user_name character varying(25) REFERENCES oskari_users(user_name),
role_id integer REFERENCES oskari_roles(id),
CONSTRAINT oskari_role_oskari_user_pkey PRIMARY KEY (id)
);
| + DROP TABLE IF EXISTS oskari_role_oskari_user;
+ DROP TABLE IF EXISTS oskari_roles;
DROP TABLE IF EXISTS oskari_users;
- DROP TABLE IF EXISTS oskari_roles;
CREATE TABLE oskari_users (
id serial NOT NULL,
user_name character varying(25) NOT NULL,
first_name character varying(128),
last_name character varying(128),
uuid character varying(64),
CONSTRAINT oskari_users_pkey PRIMARY KEY (id),
UNIQUE (user_name)
);
CREATE TABLE oskari_roles (
id serial NOT NULL,
name character varying(25) NOT NULL,
is_guest boolean default FALSE,
+ CONSTRAINT oskari_roles_pkey PRIMARY KEY (id),
UNIQUE (name)
);
+
+ CREATE TABLE oskari_role_oskari_user (
+ id serial NOT NULL,
+ user_name character varying(25) REFERENCES oskari_users(user_name),
+ role_id integer REFERENCES oskari_roles(id),
+ CONSTRAINT oskari_role_oskari_user_pkey PRIMARY KEY (id)
+ ); | 11 | 0.578947 | 10 | 1 |
860cea2b6d183414d794eb2e2d44beb7728e2d4b | hasjob/models/location.py | hasjob/models/location.py |
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'location'
id = db.Column(db.Integer, primary_key=True, autoincrement=False)
geonameid = db.synonym('id')
board_id = db.Column(None, db.ForeignKey('board.id'), nullable=False, primary_key=True, index=True)
parent = db.synonym('board_id')
board = db.relationship(Board, backref=db.backref('locations', lazy='dynamic', cascade='all, delete-orphan'))
#: Landing page description
description = db.Column(db.UnicodeText, nullable=True)
__table_args__ = (db.UniqueConstraint('board_id', 'name'),)
def url_for(self, action='view', **kwargs):
subdomain = self.board.name if self.board.not_root else None
if action == 'view':
return url_for('browse_by_location', location=self.name, subdomain=subdomain, **kwargs)
elif action == 'edit':
return url_for('location_edit', name=self.name, subdomain=subdomain, **kwargs)
@classmethod
def get(cls, name, board):
return cls.query.filter_by(name=name, board=board).one_or_none()
|
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'location'
id = db.Column(db.Integer, primary_key=True, autoincrement=False)
geonameid = db.synonym('id')
board_id = db.Column(None, db.ForeignKey('board.id'), nullable=False, primary_key=True, index=True)
board = db.relationship(Board, backref=db.backref('locations', lazy='dynamic', cascade='all, delete-orphan'))
parent = db.synonym('board')
#: Landing page description
description = db.Column(db.UnicodeText, nullable=True)
__table_args__ = (db.UniqueConstraint('board_id', 'name'),)
def url_for(self, action='view', **kwargs):
subdomain = self.board.name if self.board.not_root else None
if action == 'view':
return url_for('browse_by_location', location=self.name, subdomain=subdomain, **kwargs)
elif action == 'edit':
return url_for('location_edit', name=self.name, subdomain=subdomain, **kwargs)
@classmethod
def get(cls, name, board):
return cls.query.filter_by(name=name, board=board).one_or_none()
| Fix parent synonym for Location model | Fix parent synonym for Location model
| Python | agpl-3.0 | hasgeek/hasjob,hasgeek/hasjob,hasgeek/hasjob,hasgeek/hasjob | python | ## Code Before:
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'location'
id = db.Column(db.Integer, primary_key=True, autoincrement=False)
geonameid = db.synonym('id')
board_id = db.Column(None, db.ForeignKey('board.id'), nullable=False, primary_key=True, index=True)
parent = db.synonym('board_id')
board = db.relationship(Board, backref=db.backref('locations', lazy='dynamic', cascade='all, delete-orphan'))
#: Landing page description
description = db.Column(db.UnicodeText, nullable=True)
__table_args__ = (db.UniqueConstraint('board_id', 'name'),)
def url_for(self, action='view', **kwargs):
subdomain = self.board.name if self.board.not_root else None
if action == 'view':
return url_for('browse_by_location', location=self.name, subdomain=subdomain, **kwargs)
elif action == 'edit':
return url_for('location_edit', name=self.name, subdomain=subdomain, **kwargs)
@classmethod
def get(cls, name, board):
return cls.query.filter_by(name=name, board=board).one_or_none()
## Instruction:
Fix parent synonym for Location model
## Code After:
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'location'
id = db.Column(db.Integer, primary_key=True, autoincrement=False)
geonameid = db.synonym('id')
board_id = db.Column(None, db.ForeignKey('board.id'), nullable=False, primary_key=True, index=True)
board = db.relationship(Board, backref=db.backref('locations', lazy='dynamic', cascade='all, delete-orphan'))
parent = db.synonym('board')
#: Landing page description
description = db.Column(db.UnicodeText, nullable=True)
__table_args__ = (db.UniqueConstraint('board_id', 'name'),)
def url_for(self, action='view', **kwargs):
subdomain = self.board.name if self.board.not_root else None
if action == 'view':
return url_for('browse_by_location', location=self.name, subdomain=subdomain, **kwargs)
elif action == 'edit':
return url_for('location_edit', name=self.name, subdomain=subdomain, **kwargs)
@classmethod
def get(cls, name, board):
return cls.query.filter_by(name=name, board=board).one_or_none()
|
from . import db, BaseScopedNameMixin
from flask import url_for
from .board import Board
__all__ = ['Location']
class Location(BaseScopedNameMixin, db.Model):
"""
A location where jobs are listed, using geonameid for primary key. Scoped to a board
"""
__tablename__ = 'location'
id = db.Column(db.Integer, primary_key=True, autoincrement=False)
geonameid = db.synonym('id')
board_id = db.Column(None, db.ForeignKey('board.id'), nullable=False, primary_key=True, index=True)
- parent = db.synonym('board_id')
board = db.relationship(Board, backref=db.backref('locations', lazy='dynamic', cascade='all, delete-orphan'))
+ parent = db.synonym('board')
#: Landing page description
description = db.Column(db.UnicodeText, nullable=True)
__table_args__ = (db.UniqueConstraint('board_id', 'name'),)
def url_for(self, action='view', **kwargs):
subdomain = self.board.name if self.board.not_root else None
if action == 'view':
return url_for('browse_by_location', location=self.name, subdomain=subdomain, **kwargs)
elif action == 'edit':
return url_for('location_edit', name=self.name, subdomain=subdomain, **kwargs)
@classmethod
def get(cls, name, board):
return cls.query.filter_by(name=name, board=board).one_or_none() | 2 | 0.058824 | 1 | 1 |
3c7192de8a8ae5c4723a362ce25ee943cdffadce | salt/discourse/init.sls | salt/discourse/init.sls | discourse:
pkg.installed:
- pkgs:
- git
- ruby
- bundler
- imagemagick
- advancecomp
- gifsicle
- jhead
- jpegoptim
- libjpeg-turbo-progs
- optipng
- pngcrush
- pngquant
- libpq-dev
- nodejs
- npm
git.latest:
- name: https://github.com/discourse/discourse.git
- rev: v1.5.3
- target: /srv/discourse
- require:
- pkg: discourse
discourse-ruby-install:
cmd.run:
- name: "bundle install --deployment --without test --without development"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-node-install:
cmd.run:
- name: "npm install -g svgo phantomjs-prebuilt"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-migrate:
cmd.run:
- name: "bundle exec rake db:migrate"
- cwd: /srv/discourse
- onchanges:
- cmd: discourse-ruby-install
| discourse:
pkg.installed:
- pkgs:
- git
- ruby
- bundler
- imagemagick
- advancecomp
- gifsicle
- jhead
- jpegoptim
- libjpeg-turbo-progs
- optipng
- pngcrush
- pngquant
- libpq-dev
- nodejs
- npm
git.latest:
- name: https://github.com/discourse/discourse.git
- rev: v1.5.3
- target: /srv/discourse
- require:
- pkg: discourse
discourse-ruby-install:
cmd.run:
- name: "bundle install --deployment --without test --without development"
- cwd: /srv/discourse
- env:
- DISCOURSE_DB_SOCKET: ''
- DISCOURSE_DB_USERNAME: discourse
- DISCOURSE_DB_PASSWORD: {{ pillar["postgresql-users"]["discourse"] }}
- DISCOURSE_DB_HOST: {{ salt["mine.get"](pillar["roles"]["postgresql"], "psf_internal").values()|first }}
- DISCOURSE_DB_PORT: {{ pillar["postgresql"]["port"] }}
- onchanges:
- git: discourse
discourse-node-install:
cmd.run:
- name: "npm install -g svgo phantomjs-prebuilt"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-migrate:
cmd.run:
- name: "bundle exec rake db:migrate"
- cwd: /srv/discourse
- onchanges:
- cmd: discourse-ruby-install
| Add database credentials to the migrate call | Add database credentials to the migrate call
| SaltStack | mit | zware/psf-salt,python/psf-salt,zware/psf-salt,zware/psf-salt,python/psf-salt,python/psf-salt,python/psf-salt,zware/psf-salt | saltstack | ## Code Before:
discourse:
pkg.installed:
- pkgs:
- git
- ruby
- bundler
- imagemagick
- advancecomp
- gifsicle
- jhead
- jpegoptim
- libjpeg-turbo-progs
- optipng
- pngcrush
- pngquant
- libpq-dev
- nodejs
- npm
git.latest:
- name: https://github.com/discourse/discourse.git
- rev: v1.5.3
- target: /srv/discourse
- require:
- pkg: discourse
discourse-ruby-install:
cmd.run:
- name: "bundle install --deployment --without test --without development"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-node-install:
cmd.run:
- name: "npm install -g svgo phantomjs-prebuilt"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-migrate:
cmd.run:
- name: "bundle exec rake db:migrate"
- cwd: /srv/discourse
- onchanges:
- cmd: discourse-ruby-install
## Instruction:
Add database credentials to the migrate call
## Code After:
discourse:
pkg.installed:
- pkgs:
- git
- ruby
- bundler
- imagemagick
- advancecomp
- gifsicle
- jhead
- jpegoptim
- libjpeg-turbo-progs
- optipng
- pngcrush
- pngquant
- libpq-dev
- nodejs
- npm
git.latest:
- name: https://github.com/discourse/discourse.git
- rev: v1.5.3
- target: /srv/discourse
- require:
- pkg: discourse
discourse-ruby-install:
cmd.run:
- name: "bundle install --deployment --without test --without development"
- cwd: /srv/discourse
- env:
- DISCOURSE_DB_SOCKET: ''
- DISCOURSE_DB_USERNAME: discourse
- DISCOURSE_DB_PASSWORD: {{ pillar["postgresql-users"]["discourse"] }}
- DISCOURSE_DB_HOST: {{ salt["mine.get"](pillar["roles"]["postgresql"], "psf_internal").values()|first }}
- DISCOURSE_DB_PORT: {{ pillar["postgresql"]["port"] }}
- onchanges:
- git: discourse
discourse-node-install:
cmd.run:
- name: "npm install -g svgo phantomjs-prebuilt"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-migrate:
cmd.run:
- name: "bundle exec rake db:migrate"
- cwd: /srv/discourse
- onchanges:
- cmd: discourse-ruby-install
| discourse:
pkg.installed:
- pkgs:
- git
- ruby
- bundler
- imagemagick
- advancecomp
- gifsicle
- jhead
- jpegoptim
- libjpeg-turbo-progs
- optipng
- pngcrush
- pngquant
- libpq-dev
- nodejs
- npm
git.latest:
- name: https://github.com/discourse/discourse.git
- rev: v1.5.3
- target: /srv/discourse
- require:
- pkg: discourse
discourse-ruby-install:
cmd.run:
- name: "bundle install --deployment --without test --without development"
- cwd: /srv/discourse
+ - env:
+ - DISCOURSE_DB_SOCKET: ''
+ - DISCOURSE_DB_USERNAME: discourse
+ - DISCOURSE_DB_PASSWORD: {{ pillar["postgresql-users"]["discourse"] }}
+ - DISCOURSE_DB_HOST: {{ salt["mine.get"](pillar["roles"]["postgresql"], "psf_internal").values()|first }}
+ - DISCOURSE_DB_PORT: {{ pillar["postgresql"]["port"] }}
- onchanges:
- git: discourse
discourse-node-install:
cmd.run:
- name: "npm install -g svgo phantomjs-prebuilt"
- cwd: /srv/discourse
- onchanges:
- git: discourse
discourse-migrate:
cmd.run:
- name: "bundle exec rake db:migrate"
- cwd: /srv/discourse
- onchanges:
- cmd: discourse-ruby-install | 6 | 0.122449 | 6 | 0 |
4abe87036c2b50c1e27f4ccf27bab4076d2cf03f | src/main/java/org/kohsuke/github/GHEvent.java | src/main/java/org/kohsuke/github/GHEvent.java | package org.kohsuke.github;
import java.util.Locale;
/**
* Hook event type.
*
* @author Kohsuke Kawaguchi
* @see GHEventInfo
* @see <a href="https://developer.github.com/v3/activity/events/types/">Event type reference</a>
*/
public enum GHEvent {
COMMIT_COMMENT,
CREATE,
DELETE,
DEPLOYMENT,
DEPLOYMENT_STATUS,
DOWNLOAD,
FOLLOW,
FORK,
FORK_APPLY,
GIST,
GOLLUM,
ISSUE_COMMENT,
ISSUES,
MEMBER,
PAGE_BUILD,
PUBLIC,
PULL_REQUEST,
PULL_REQUEST_REVIEW_COMMENT,
PUSH,
RELEASE,
REPOSITORY, // only valid for org hooks
STATUS,
TEAM_ADD,
WATCH,
PING,
/**
* Special event type that means "every possible event"
*/
ALL;
/**
* Returns GitHub's internal representation of this event.
*/
String symbol() {
if (this==ALL) return "*";
return name().toLowerCase(Locale.ENGLISH);
}
}
| package org.kohsuke.github;
import java.util.Locale;
/**
* Hook event type.
*
* @author Kohsuke Kawaguchi
* @see GHEventInfo
* @see <a href="https://developer.github.com/v3/activity/events/types/">Event type reference</a>
*/
public enum GHEvent {
COMMIT_COMMENT,
CREATE,
DELETE,
DEPLOYMENT,
DEPLOYMENT_STATUS,
DOWNLOAD,
FOLLOW,
FORK,
FORK_APPLY,
GIST,
GOLLUM,
INSTALLATION,
INSTALLATION_REPOSITORIES,
ISSUE_COMMENT,
ISSUES,
LABEL,
MARKETPLACE_PURCHASE,
MEMBER,
MEMBERSHIP,
MILESTONE,
ORGANIZATION,
ORG_BLOCK,
PAGE_BUILD,
PROJECT_CARD,
PROJECT_COLUMN,
PROJECT,
PUBLIC,
PULL_REQUEST,
PULL_REQUEST_REVIEW,
PULL_REQUEST_REVIEW_COMMENT,
PUSH,
RELEASE,
REPOSITORY, // only valid for org hooks
STATUS,
TEAM,
TEAM_ADD,
WATCH,
PING,
/**
* Special event type that means "every possible event"
*/
ALL;
/**
* Returns GitHub's internal representation of this event.
*/
String symbol() {
if (this==ALL) return "*";
return name().toLowerCase(Locale.ENGLISH);
}
}
| Add missing event types used by repository webhooks | Add missing event types used by repository webhooks
| Java | mit | kohsuke/github-api,recena/github-api,stephenc/github-api | java | ## Code Before:
package org.kohsuke.github;
import java.util.Locale;
/**
* Hook event type.
*
* @author Kohsuke Kawaguchi
* @see GHEventInfo
* @see <a href="https://developer.github.com/v3/activity/events/types/">Event type reference</a>
*/
public enum GHEvent {
COMMIT_COMMENT,
CREATE,
DELETE,
DEPLOYMENT,
DEPLOYMENT_STATUS,
DOWNLOAD,
FOLLOW,
FORK,
FORK_APPLY,
GIST,
GOLLUM,
ISSUE_COMMENT,
ISSUES,
MEMBER,
PAGE_BUILD,
PUBLIC,
PULL_REQUEST,
PULL_REQUEST_REVIEW_COMMENT,
PUSH,
RELEASE,
REPOSITORY, // only valid for org hooks
STATUS,
TEAM_ADD,
WATCH,
PING,
/**
* Special event type that means "every possible event"
*/
ALL;
/**
* Returns GitHub's internal representation of this event.
*/
String symbol() {
if (this==ALL) return "*";
return name().toLowerCase(Locale.ENGLISH);
}
}
## Instruction:
Add missing event types used by repository webhooks
## Code After:
package org.kohsuke.github;
import java.util.Locale;
/**
* Hook event type.
*
* @author Kohsuke Kawaguchi
* @see GHEventInfo
* @see <a href="https://developer.github.com/v3/activity/events/types/">Event type reference</a>
*/
public enum GHEvent {
COMMIT_COMMENT,
CREATE,
DELETE,
DEPLOYMENT,
DEPLOYMENT_STATUS,
DOWNLOAD,
FOLLOW,
FORK,
FORK_APPLY,
GIST,
GOLLUM,
INSTALLATION,
INSTALLATION_REPOSITORIES,
ISSUE_COMMENT,
ISSUES,
LABEL,
MARKETPLACE_PURCHASE,
MEMBER,
MEMBERSHIP,
MILESTONE,
ORGANIZATION,
ORG_BLOCK,
PAGE_BUILD,
PROJECT_CARD,
PROJECT_COLUMN,
PROJECT,
PUBLIC,
PULL_REQUEST,
PULL_REQUEST_REVIEW,
PULL_REQUEST_REVIEW_COMMENT,
PUSH,
RELEASE,
REPOSITORY, // only valid for org hooks
STATUS,
TEAM,
TEAM_ADD,
WATCH,
PING,
/**
* Special event type that means "every possible event"
*/
ALL;
/**
* Returns GitHub's internal representation of this event.
*/
String symbol() {
if (this==ALL) return "*";
return name().toLowerCase(Locale.ENGLISH);
}
}
| package org.kohsuke.github;
import java.util.Locale;
/**
* Hook event type.
*
* @author Kohsuke Kawaguchi
* @see GHEventInfo
* @see <a href="https://developer.github.com/v3/activity/events/types/">Event type reference</a>
*/
public enum GHEvent {
COMMIT_COMMENT,
CREATE,
DELETE,
DEPLOYMENT,
DEPLOYMENT_STATUS,
DOWNLOAD,
FOLLOW,
FORK,
FORK_APPLY,
GIST,
GOLLUM,
+ INSTALLATION,
+ INSTALLATION_REPOSITORIES,
ISSUE_COMMENT,
ISSUES,
+ LABEL,
+ MARKETPLACE_PURCHASE,
MEMBER,
+ MEMBERSHIP,
+ MILESTONE,
+ ORGANIZATION,
+ ORG_BLOCK,
PAGE_BUILD,
+ PROJECT_CARD,
+ PROJECT_COLUMN,
+ PROJECT,
PUBLIC,
PULL_REQUEST,
+ PULL_REQUEST_REVIEW,
PULL_REQUEST_REVIEW_COMMENT,
PUSH,
RELEASE,
REPOSITORY, // only valid for org hooks
STATUS,
+ TEAM,
TEAM_ADD,
WATCH,
PING,
/**
* Special event type that means "every possible event"
*/
ALL;
/**
* Returns GitHub's internal representation of this event.
*/
String symbol() {
if (this==ALL) return "*";
return name().toLowerCase(Locale.ENGLISH);
}
} | 13 | 0.254902 | 13 | 0 |
fbec589b351787ff3066c71fbaf8d5fed5d49db2 | doc/README.md | doc/README.md |
+ [API](api/README.md)
+ [Development](development/README.md)
+ [Install](install/README.md)
+ [Integration](external-issue-tracker/README.md)
+ [Legal](legal/README.md)
+ [Markdown](markdown/markdown.md)
+ [Permissions](permissions/permissions.md)
+ [Public access](public_access/public_access.md)
+ [Raketasks](raketasks/README.md)
+ [Release](release/README.md)
+ [Security](security/README.md)
+ [System hooks](system_hooks/system_hooks.md)
+ [Update](update/README.md)
+ [Web hooks](web_hooks/web_hooks.md)
+ [Workflow](workflow/workflow.md)
|
+ [API](api/README.md)
+ [Development](development/README.md)
+ [Install](install/README.md)
+ [Integration](integration/external-issue-tracker.md)
+ [Legal](legal/README.md)
+ [Markdown](markdown/markdown.md)
+ [Permissions](permissions/permissions.md)
+ [Public access](public_access/public_access.md)
+ [Raketasks](raketasks/README.md)
+ [Release](release/README.md)
+ [Security](security/README.md)
+ [System hooks](system_hooks/system_hooks.md)
+ [Update](update/README.md)
+ [Web hooks](web_hooks/web_hooks.md)
+ [Workflow](workflow/workflow.md)
| Fix link to isue tracker integration page | Fix link to isue tracker integration page
| Markdown | mit | 8thcolor/rubyconfau2015-sadr,8thcolor/eurucamp2014-htdsadr,8thcolor/rubyconfau2015-sadr,8thcolor/rubyconfau2015-sadr,8thcolor/eurucamp2014-htdsadr,8thcolor/eurucamp2014-htdsadr | markdown | ## Code Before:
+ [API](api/README.md)
+ [Development](development/README.md)
+ [Install](install/README.md)
+ [Integration](external-issue-tracker/README.md)
+ [Legal](legal/README.md)
+ [Markdown](markdown/markdown.md)
+ [Permissions](permissions/permissions.md)
+ [Public access](public_access/public_access.md)
+ [Raketasks](raketasks/README.md)
+ [Release](release/README.md)
+ [Security](security/README.md)
+ [System hooks](system_hooks/system_hooks.md)
+ [Update](update/README.md)
+ [Web hooks](web_hooks/web_hooks.md)
+ [Workflow](workflow/workflow.md)
## Instruction:
Fix link to isue tracker integration page
## Code After:
+ [API](api/README.md)
+ [Development](development/README.md)
+ [Install](install/README.md)
+ [Integration](integration/external-issue-tracker.md)
+ [Legal](legal/README.md)
+ [Markdown](markdown/markdown.md)
+ [Permissions](permissions/permissions.md)
+ [Public access](public_access/public_access.md)
+ [Raketasks](raketasks/README.md)
+ [Release](release/README.md)
+ [Security](security/README.md)
+ [System hooks](system_hooks/system_hooks.md)
+ [Update](update/README.md)
+ [Web hooks](web_hooks/web_hooks.md)
+ [Workflow](workflow/workflow.md)
|
+ [API](api/README.md)
+ [Development](development/README.md)
+ [Install](install/README.md)
- + [Integration](external-issue-tracker/README.md)
? -------
+ + [Integration](integration/external-issue-tracker.md)
? ++++++++++++
+ [Legal](legal/README.md)
+ [Markdown](markdown/markdown.md)
+ [Permissions](permissions/permissions.md)
+ [Public access](public_access/public_access.md)
+ [Raketasks](raketasks/README.md)
+ [Release](release/README.md)
+ [Security](security/README.md)
+ [System hooks](system_hooks/system_hooks.md)
+ [Update](update/README.md)
+ [Web hooks](web_hooks/web_hooks.md)
+ [Workflow](workflow/workflow.md) | 2 | 0.125 | 1 | 1 |
109938e90fa8ae220f49513d109ec5028f023c95 | src/js/routes.js | src/js/routes.js | const SubredditTarget = require('route_targets/subreddit.js');
const Routes = {
'/': {
target: SubredditTarget,
'/': 'view',
},
'/r/:subreddit': {
target: SubredditTarget,
'/': 'view',
'/:sort': {
'/': 'view',
'/:time': 'view'
}
},
'/:sort': {
target: SubredditTarget,
'/': 'view',
'/:time': 'view'
}
};
export default Routes;
| const SubredditTarget = require('route_targets/subreddit.js');
const Routes = {
'/r': {
target: SubredditTarget,
'/:subreddit': {
'/': 'view',
'/:sort': {
'/': 'view',
'/:time': 'view'
}
}
},
'/': {
target: SubredditTarget,
'/': 'view'
},
'/:sort': {
target: SubredditTarget,
'/': 'view',
'/:time': 'view'
}
};
export default Routes;
| Fix routing for sort on front page | Fix routing for sort on front page
| JavaScript | mit | AdamEdgett/material-reddit,AdamEdgett/material-reddit,AdamEdgett/material-reddit | javascript | ## Code Before:
const SubredditTarget = require('route_targets/subreddit.js');
const Routes = {
'/': {
target: SubredditTarget,
'/': 'view',
},
'/r/:subreddit': {
target: SubredditTarget,
'/': 'view',
'/:sort': {
'/': 'view',
'/:time': 'view'
}
},
'/:sort': {
target: SubredditTarget,
'/': 'view',
'/:time': 'view'
}
};
export default Routes;
## Instruction:
Fix routing for sort on front page
## Code After:
const SubredditTarget = require('route_targets/subreddit.js');
const Routes = {
'/r': {
target: SubredditTarget,
'/:subreddit': {
'/': 'view',
'/:sort': {
'/': 'view',
'/:time': 'view'
}
}
},
'/': {
target: SubredditTarget,
'/': 'view'
},
'/:sort': {
target: SubredditTarget,
'/': 'view',
'/:time': 'view'
}
};
export default Routes;
| const SubredditTarget = require('route_targets/subreddit.js');
const Routes = {
+ '/r': {
+ target: SubredditTarget,
+ '/:subreddit': {
+ '/': 'view',
+ '/:sort': {
+ '/': 'view',
+ '/:time': 'view'
+ }
+ }
+ },
'/': {
target: SubredditTarget,
- '/': 'view',
? -
+ '/': 'view'
- },
- '/r/:subreddit': {
- target: SubredditTarget,
- '/': 'view',
- '/:sort': {
- '/': 'view',
- '/:time': 'view'
- }
},
'/:sort': {
target: SubredditTarget,
'/': 'view',
'/:time': 'view'
}
};
export default Routes; | 20 | 0.869565 | 11 | 9 |
d0ea4b585ef9523eac528c5a4fba4b0af653cad3 | tests/loginput/test_loginput_index.py | tests/loginput/test_loginput_index.py | from loginput_test_suite import LoginputTestSuite
class TestTestRoute(LoginputTestSuite):
routes = ['/test', '/test/']
status_code = 200
body = ''
# Routes left need to have unit tests written for:
# @route('/veris')
# @route('/veris/')
# @post('/blockip', methods=['POST'])
# @post('/blockip/', methods=['POST'])
# @post('/ipwhois', methods=['POST'])
# @post('/ipwhois/', methods=['POST'])
# @post('/ipintel', methods=['POST'])
# @post('/ipintel/', methods=['POST'])
# @post('/ipcifquery', methods=['POST'])
# @post('/ipcifquery/', methods=['POST'])
# @post('/ipdshieldquery', methods=['POST'])
# @post('/ipdshieldquery/', methods=['POST'])
# @route('/plugins', methods=['GET'])
# @route('/plugins/', methods=['GET'])
# @route('/plugins/<endpoint>', methods=['GET'])
# @post('/incident', methods=['POST'])
# @post('/incident/', methods=['POST'])
| from loginput_test_suite import LoginputTestSuite
class TestTestRoute(LoginputTestSuite):
routes = ['/test', '/test/']
status_code = 200
body = ''
# Routes left need to have unit tests written for:
# @route('/_bulk',method='POST')
# @route('/_bulk/',method='POST')
# @route('/_status')
# @route('/_status/')
# @route('/nxlog/', method=['POST','PUT'])
# @route('/nxlog', method=['POST','PUT'])
# @route('/events/',method=['POST','PUT'])
# @route('/events', method=['POST','PUT'])
# @route('/cef', method=['POST','PUT'])
# @route('/cef/',method=['POST','PUT'])
# @route('/custom/<application>',method=['POST','PUT'])
| Update comments for loginput tests | Update comments for loginput tests
Signed-off-by: Brandon Myers <9cda508be11a1ae7ceef912b85c196946f0ec5f3@mozilla.com>
| Python | mpl-2.0 | jeffbryner/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,Phrozyn/MozDef,jeffbryner/MozDef,gdestuynder/MozDef,ameihm0912/MozDef,gdestuynder/MozDef,mozilla/MozDef,ameihm0912/MozDef,gdestuynder/MozDef,mozilla/MozDef,ameihm0912/MozDef,mpurzynski/MozDef,mozilla/MozDef,mpurzynski/MozDef,mpurzynski/MozDef,mozilla/MozDef,jeffbryner/MozDef,Phrozyn/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,Phrozyn/MozDef,ameihm0912/MozDef | python | ## Code Before:
from loginput_test_suite import LoginputTestSuite
class TestTestRoute(LoginputTestSuite):
routes = ['/test', '/test/']
status_code = 200
body = ''
# Routes left need to have unit tests written for:
# @route('/veris')
# @route('/veris/')
# @post('/blockip', methods=['POST'])
# @post('/blockip/', methods=['POST'])
# @post('/ipwhois', methods=['POST'])
# @post('/ipwhois/', methods=['POST'])
# @post('/ipintel', methods=['POST'])
# @post('/ipintel/', methods=['POST'])
# @post('/ipcifquery', methods=['POST'])
# @post('/ipcifquery/', methods=['POST'])
# @post('/ipdshieldquery', methods=['POST'])
# @post('/ipdshieldquery/', methods=['POST'])
# @route('/plugins', methods=['GET'])
# @route('/plugins/', methods=['GET'])
# @route('/plugins/<endpoint>', methods=['GET'])
# @post('/incident', methods=['POST'])
# @post('/incident/', methods=['POST'])
## Instruction:
Update comments for loginput tests
Signed-off-by: Brandon Myers <9cda508be11a1ae7ceef912b85c196946f0ec5f3@mozilla.com>
## Code After:
from loginput_test_suite import LoginputTestSuite
class TestTestRoute(LoginputTestSuite):
routes = ['/test', '/test/']
status_code = 200
body = ''
# Routes left need to have unit tests written for:
# @route('/_bulk',method='POST')
# @route('/_bulk/',method='POST')
# @route('/_status')
# @route('/_status/')
# @route('/nxlog/', method=['POST','PUT'])
# @route('/nxlog', method=['POST','PUT'])
# @route('/events/',method=['POST','PUT'])
# @route('/events', method=['POST','PUT'])
# @route('/cef', method=['POST','PUT'])
# @route('/cef/',method=['POST','PUT'])
# @route('/custom/<application>',method=['POST','PUT'])
| from loginput_test_suite import LoginputTestSuite
class TestTestRoute(LoginputTestSuite):
routes = ['/test', '/test/']
status_code = 200
body = ''
# Routes left need to have unit tests written for:
- # @route('/veris')
- # @route('/veris/')
- # @post('/blockip', methods=['POST'])
? ^ ^ -- -- - - - -
+ # @route('/_bulk',method='POST')
? ^ ^ + + +
- # @post('/blockip/', methods=['POST'])
? ^ ^ -- -- - - - -
+ # @route('/_bulk/',method='POST')
? ^ ^ + + +
+ # @route('/_status')
+ # @route('/_status/')
- # @post('/ipwhois', methods=['POST'])
- # @post('/ipwhois/', methods=['POST'])
- # @post('/ipintel', methods=['POST'])
- # @post('/ipintel/', methods=['POST'])
? ^ ^ --- ^^ -
+ # @route('/nxlog/', method=['POST','PUT'])
? ^ ^ + ^ ++ ++++++
+ # @route('/nxlog', method=['POST','PUT'])
+ # @route('/events/',method=['POST','PUT'])
+ # @route('/events', method=['POST','PUT'])
- # @post('/ipcifquery', methods=['POST'])
- # @post('/ipcifquery/', methods=['POST'])
- # @post('/ipdshieldquery', methods=['POST'])
- # @post('/ipdshieldquery/', methods=['POST'])
- # @route('/plugins', methods=['GET'])
- # @route('/plugins/', methods=['GET'])
- # @route('/plugins/<endpoint>', methods=['GET'])
- # @post('/incident', methods=['POST'])
? ^ ^ -- -- ^^ -
+ # @route('/cef', method=['POST','PUT'])
? ^ ^ + ^ ++++++
- # @post('/incident/', methods=['POST'])
+ # @route('/cef/',method=['POST','PUT'])
+ # @route('/custom/<application>',method=['POST','PUT']) | 28 | 1.037037 | 11 | 17 |
d9b214870528da026467fa399ba3cc494ff29521 | Resources/config/routing.yml | Resources/config/routing.yml | tip_bundle_homepage:
path: /tip
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_feedback:
path: /tip/{id}/feedback/{feedback}
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:feedback }
tip_stats:
path: /tip/stats
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:stats }
lexik_translation_edition:
resource: "@LexikTranslationBundle/Resources/config/routing.yml"
_tip_lexik_edition:
path: /tip/editor
defaults: { _controller: LexikTranslationBundle:Translation:grid }
| tip_bundle_homepage:
path: /tip
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_feedback:
path: /tip/{id}/feedback/{feedback}
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:feedback }
tip_show:
path: /tip/show
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_stats:
path: /tip/stats
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:stats }
lexik_translation_edition:
resource: "@LexikTranslationBundle/Resources/config/routing.yml"
_tip_lexik_edition:
path: /tip/editor
defaults: { _controller: LexikTranslationBundle:Translation:grid }
| Add a show route to make debugging a little easier | Add a show route to make debugging a little easier
| YAML | mit | tamago-db/TamagoTipsManagerBundle,tamago-db/TamagoTipsManagerBundle,tamago-db/TamagoTipsManagerBundle | yaml | ## Code Before:
tip_bundle_homepage:
path: /tip
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_feedback:
path: /tip/{id}/feedback/{feedback}
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:feedback }
tip_stats:
path: /tip/stats
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:stats }
lexik_translation_edition:
resource: "@LexikTranslationBundle/Resources/config/routing.yml"
_tip_lexik_edition:
path: /tip/editor
defaults: { _controller: LexikTranslationBundle:Translation:grid }
## Instruction:
Add a show route to make debugging a little easier
## Code After:
tip_bundle_homepage:
path: /tip
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_feedback:
path: /tip/{id}/feedback/{feedback}
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:feedback }
tip_show:
path: /tip/show
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_stats:
path: /tip/stats
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:stats }
lexik_translation_edition:
resource: "@LexikTranslationBundle/Resources/config/routing.yml"
_tip_lexik_edition:
path: /tip/editor
defaults: { _controller: LexikTranslationBundle:Translation:grid }
| tip_bundle_homepage:
- path: /tip
? ----
+ path: /tip
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
tip_feedback:
- path: /tip/{id}/feedback/{feedback}
? ----
+ path: /tip/{id}/feedback/{feedback}
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:feedback }
+ tip_show:
+ path: /tip/show
+ defaults: { _controller: TamagoTipsManagerBundle:TipsManager:index }
+
tip_stats:
- path: /tip/stats
? ----
+ path: /tip/stats
defaults: { _controller: TamagoTipsManagerBundle:TipsManager:stats }
lexik_translation_edition:
resource: "@LexikTranslationBundle/Resources/config/routing.yml"
_tip_lexik_edition:
path: /tip/editor
defaults: { _controller: LexikTranslationBundle:Translation:grid }
| 10 | 0.5 | 7 | 3 |
8ca1a1e6523fe0142b9158f3492b7610895332c6 | source/views/convocations/archived-row.js | source/views/convocations/archived-row.js | // @flow
import React from 'react'
import {StyleSheet} from 'react-native'
import {ListRow, Detail, Title} from '../components/list'
import type {PodcastEpisode} from './types'
const styles = StyleSheet.create({
row: {
paddingTop: 5,
paddingBottom: 5,
},
})
type Props = {
event: PodcastEpisode,
onPress: PodcastEpisode => any,
}
export class ArchivedConvocationRow extends React.PureComponent<Props> {
_onPress = () => this.props.onPress(this.props.event)
render() {
const {event} = this.props
let annotation = ''
if (event.enclosure && event.enclosure.type.startsWith('audio/')) {
annotation = '🎧'
} else if (event.enclosure && event.enclosure.type.startsWith('video/')) {
annotation = '📺'
}
return (
<ListRow
arrowPosition="center"
contentContainerStyle={styles.row}
onPress={this._onPress}
>
<Title>
{annotation} {event.title}
</Title>
<Detail lines={4}>{event.description}</Detail>
</ListRow>
)
}
}
| // @flow
import React from 'react'
import {StyleSheet} from 'react-native'
import {ListRow, Detail, Title} from '../components/list'
import type {PodcastEpisode} from './types'
import {fastGetTrimmedText} from '../../lib/html'
import {AllHtmlEntities} from 'html-entities'
const styles = StyleSheet.create({
row: {
paddingTop: 5,
paddingBottom: 5,
},
})
type Props = {
event: PodcastEpisode,
onPress: PodcastEpisode => any,
}
const entities = new AllHtmlEntities()
export class ArchivedConvocationRow extends React.PureComponent<Props> {
_onPress = () => this.props.onPress(this.props.event)
render() {
const {event} = this.props
let annotation = ''
if (event.enclosure && event.enclosure.type.startsWith('audio/')) {
annotation = '🎧'
} else if (event.enclosure && event.enclosure.type.startsWith('video/')) {
annotation = '📺'
}
return (
<ListRow
arrowPosition="center"
contentContainerStyle={styles.row}
onPress={this._onPress}
>
<Title>
{annotation} {event.title}
</Title>
<Detail lines={4}>
{entities.decode(fastGetTrimmedText(event.description))}
</Detail>
</ListRow>
)
}
}
| Convert entities to readable text in convos | Convert entities to readable text in convos
| JavaScript | mit | carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls | javascript | ## Code Before:
// @flow
import React from 'react'
import {StyleSheet} from 'react-native'
import {ListRow, Detail, Title} from '../components/list'
import type {PodcastEpisode} from './types'
const styles = StyleSheet.create({
row: {
paddingTop: 5,
paddingBottom: 5,
},
})
type Props = {
event: PodcastEpisode,
onPress: PodcastEpisode => any,
}
export class ArchivedConvocationRow extends React.PureComponent<Props> {
_onPress = () => this.props.onPress(this.props.event)
render() {
const {event} = this.props
let annotation = ''
if (event.enclosure && event.enclosure.type.startsWith('audio/')) {
annotation = '🎧'
} else if (event.enclosure && event.enclosure.type.startsWith('video/')) {
annotation = '📺'
}
return (
<ListRow
arrowPosition="center"
contentContainerStyle={styles.row}
onPress={this._onPress}
>
<Title>
{annotation} {event.title}
</Title>
<Detail lines={4}>{event.description}</Detail>
</ListRow>
)
}
}
## Instruction:
Convert entities to readable text in convos
## Code After:
// @flow
import React from 'react'
import {StyleSheet} from 'react-native'
import {ListRow, Detail, Title} from '../components/list'
import type {PodcastEpisode} from './types'
import {fastGetTrimmedText} from '../../lib/html'
import {AllHtmlEntities} from 'html-entities'
const styles = StyleSheet.create({
row: {
paddingTop: 5,
paddingBottom: 5,
},
})
type Props = {
event: PodcastEpisode,
onPress: PodcastEpisode => any,
}
const entities = new AllHtmlEntities()
export class ArchivedConvocationRow extends React.PureComponent<Props> {
_onPress = () => this.props.onPress(this.props.event)
render() {
const {event} = this.props
let annotation = ''
if (event.enclosure && event.enclosure.type.startsWith('audio/')) {
annotation = '🎧'
} else if (event.enclosure && event.enclosure.type.startsWith('video/')) {
annotation = '📺'
}
return (
<ListRow
arrowPosition="center"
contentContainerStyle={styles.row}
onPress={this._onPress}
>
<Title>
{annotation} {event.title}
</Title>
<Detail lines={4}>
{entities.decode(fastGetTrimmedText(event.description))}
</Detail>
</ListRow>
)
}
}
| // @flow
import React from 'react'
import {StyleSheet} from 'react-native'
import {ListRow, Detail, Title} from '../components/list'
import type {PodcastEpisode} from './types'
+ import {fastGetTrimmedText} from '../../lib/html'
+ import {AllHtmlEntities} from 'html-entities'
const styles = StyleSheet.create({
row: {
paddingTop: 5,
paddingBottom: 5,
},
})
type Props = {
event: PodcastEpisode,
onPress: PodcastEpisode => any,
}
+
+ const entities = new AllHtmlEntities()
export class ArchivedConvocationRow extends React.PureComponent<Props> {
_onPress = () => this.props.onPress(this.props.event)
render() {
const {event} = this.props
let annotation = ''
if (event.enclosure && event.enclosure.type.startsWith('audio/')) {
annotation = '🎧'
} else if (event.enclosure && event.enclosure.type.startsWith('video/')) {
annotation = '📺'
}
return (
<ListRow
arrowPosition="center"
contentContainerStyle={styles.row}
onPress={this._onPress}
>
<Title>
{annotation} {event.title}
</Title>
- <Detail lines={4}>{event.description}</Detail>
+ <Detail lines={4}>
+ {entities.decode(fastGetTrimmedText(event.description))}
+ </Detail>
</ListRow>
)
}
} | 8 | 0.173913 | 7 | 1 |
85880eef4ce33a11dc5c55af0c018727eb93d003 | .travis.yml | .travis.yml | sudo: false
language: python
python:
- 2.6
- 2.7
cache:
pip: true
directories:
- $HOME/perl5
install:
- export PERL5LIB=~/perl5/lib/perl5
- export PYTHONPATH=$(echo $(dirname $(which python))/../lib/python*/site-packages)
- export PATH=~/perl5/bin:$PATH
- pip install coverage
- curl -L https://cpanmin.us/ -o cpanm && chmod a+x cpanm
- ./cpanm --local-lib=~/perl5 --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Devel::Cover MIME::Lite
- git clone --depth=5 https://github.com/salilab/saliweb
- (cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHONPATH perldir=~/perl5/lib/perl5 prefix=~/usr webdir=~/www install)
script:
- scons coverage=true python=$(which python) test
after_success:
- bash <(curl -s https://codecov.io/bash)
- cover -report codecov
| sudo: false
language: python
matrix:
include:
- dist: trusty
python: 2.6
- dist: xenial
python: 2.7
addons:
apt:
packages:
- scons
- libdbi-perl
cache:
pip: true
directories:
- $HOME/perl5
install:
- export PERL5LIB=~/perl5/lib/perl5
- export PYTHONPATH=$(echo $(dirname $(which python))/../lib/python*/site-packages)
- export PATH=~/perl5/bin:$PATH
- pip install coverage flask
- curl -L https://cpanmin.us/ -o cpanm && chmod a+x cpanm
- ./cpanm --local-lib=~/perl5 --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Devel::Cover MIME::Lite
- git clone --depth=5 https://github.com/salilab/saliweb
- (cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHONPATH perldir=~/perl5/lib/perl5 prefix=~/usr webdir=~/www install && touch $PYTHONPATH/saliweb/frontend/config.py)
script:
- scons coverage=true python=$(which python) test
after_success:
- bash <(curl -s https://codecov.io/bash)
- cover -report codecov
| Update to work with latest Travis and saliweb | Update to work with latest Travis and saliweb
| YAML | lgpl-2.1 | salilab/ligscore,salilab/ligscore | yaml | ## Code Before:
sudo: false
language: python
python:
- 2.6
- 2.7
cache:
pip: true
directories:
- $HOME/perl5
install:
- export PERL5LIB=~/perl5/lib/perl5
- export PYTHONPATH=$(echo $(dirname $(which python))/../lib/python*/site-packages)
- export PATH=~/perl5/bin:$PATH
- pip install coverage
- curl -L https://cpanmin.us/ -o cpanm && chmod a+x cpanm
- ./cpanm --local-lib=~/perl5 --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Devel::Cover MIME::Lite
- git clone --depth=5 https://github.com/salilab/saliweb
- (cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHONPATH perldir=~/perl5/lib/perl5 prefix=~/usr webdir=~/www install)
script:
- scons coverage=true python=$(which python) test
after_success:
- bash <(curl -s https://codecov.io/bash)
- cover -report codecov
## Instruction:
Update to work with latest Travis and saliweb
## Code After:
sudo: false
language: python
matrix:
include:
- dist: trusty
python: 2.6
- dist: xenial
python: 2.7
addons:
apt:
packages:
- scons
- libdbi-perl
cache:
pip: true
directories:
- $HOME/perl5
install:
- export PERL5LIB=~/perl5/lib/perl5
- export PYTHONPATH=$(echo $(dirname $(which python))/../lib/python*/site-packages)
- export PATH=~/perl5/bin:$PATH
- pip install coverage flask
- curl -L https://cpanmin.us/ -o cpanm && chmod a+x cpanm
- ./cpanm --local-lib=~/perl5 --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Devel::Cover MIME::Lite
- git clone --depth=5 https://github.com/salilab/saliweb
- (cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHONPATH perldir=~/perl5/lib/perl5 prefix=~/usr webdir=~/www install && touch $PYTHONPATH/saliweb/frontend/config.py)
script:
- scons coverage=true python=$(which python) test
after_success:
- bash <(curl -s https://codecov.io/bash)
- cover -report codecov
| sudo: false
language: python
- python:
- - 2.6
- - 2.7
+ matrix:
+ include:
+ - dist: trusty
+ python: 2.6
+ - dist: xenial
+ python: 2.7
+ addons:
+ apt:
+ packages:
+ - scons
+ - libdbi-perl
cache:
pip: true
directories:
- $HOME/perl5
install:
- export PERL5LIB=~/perl5/lib/perl5
- export PYTHONPATH=$(echo $(dirname $(which python))/../lib/python*/site-packages)
- export PATH=~/perl5/bin:$PATH
- - pip install coverage
+ - pip install coverage flask
? ++++++
- curl -L https://cpanmin.us/ -o cpanm && chmod a+x cpanm
- ./cpanm --local-lib=~/perl5 --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov Test::Exception Test::Output Devel::Cover MIME::Lite
- git clone --depth=5 https://github.com/salilab/saliweb
- - (cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHONPATH perldir=~/perl5/lib/perl5 prefix=~/usr webdir=~/www install)
+ - (cd saliweb && scons modeller_key=UNKNOWN pythondir=$PYTHONPATH perldir=~/perl5/lib/perl5 prefix=~/usr webdir=~/www install && touch $PYTHONPATH/saliweb/frontend/config.py)
? ++++++++++++++++++++++++++++++++++++++++++++++++
script:
- scons coverage=true python=$(which python) test
after_success:
- bash <(curl -s https://codecov.io/bash)
- cover -report codecov | 18 | 0.782609 | 13 | 5 |
e9240292ea960d075aebd23ee1c8930ccfa56e07 | pair/pairing_handler.go | pair/pairing_handler.go | package pair
import(
"io"
"fmt"
)
type PairingHandler interface {
Handle(Container) (Container, error)
}
func HandleReaderForHandler(r io.Reader, h PairingHandler) (io.Reader, error) {
cont_in, err := NewTLV8ContainerFromReader(r)
if err != nil {
return nil, err
}
fmt.Println("-> Seq:", cont_in.GetByte(TLVType_SequenceNumber))
cont_out, err := h.Handle(cont_in)
if err != nil {
fmt.Println("[ERROR]", err)
return nil, err
} else {
if cont_out != nil {
fmt.Println("<- Seq:", cont_out.GetByte(TLVType_SequenceNumber))
fmt.Println("-------------")
return cont_out.BytesBuffer(), nil
}
}
return nil, err
} | package pair
import(
"io"
"fmt"
)
type PairingHandler interface {
Handle(Container) (Container, error)
}
func HandleReaderForHandler(r io.Reader, h PairingHandler) (r_out io.Reader, err error) {
cont_in, err := NewTLV8ContainerFromReader(r)
if err != nil {
return nil, err
}
fmt.Println("-> Seq:", cont_in.GetByte(TLVType_SequenceNumber))
cont_out, err := h.Handle(cont_in)
if err != nil {
fmt.Println("[ERROR]", err)
} else {
if cont_out != nil {
fmt.Println("<- Seq:", cont_out.GetByte(TLVType_SequenceNumber))
r_out = cont_out.BytesBuffer()
}
}
fmt.Println("--------------------------")
return r_out, err
} | Update log output when handling pairing requests | Update log output when handling pairing requests
| Go | apache-2.0 | sjfloat/hc,bahlo/hc,mxlje/hc,savaki/hc,ninjasphere/hc,brutella/hc | go | ## Code Before:
package pair
import(
"io"
"fmt"
)
type PairingHandler interface {
Handle(Container) (Container, error)
}
func HandleReaderForHandler(r io.Reader, h PairingHandler) (io.Reader, error) {
cont_in, err := NewTLV8ContainerFromReader(r)
if err != nil {
return nil, err
}
fmt.Println("-> Seq:", cont_in.GetByte(TLVType_SequenceNumber))
cont_out, err := h.Handle(cont_in)
if err != nil {
fmt.Println("[ERROR]", err)
return nil, err
} else {
if cont_out != nil {
fmt.Println("<- Seq:", cont_out.GetByte(TLVType_SequenceNumber))
fmt.Println("-------------")
return cont_out.BytesBuffer(), nil
}
}
return nil, err
}
## Instruction:
Update log output when handling pairing requests
## Code After:
package pair
import(
"io"
"fmt"
)
type PairingHandler interface {
Handle(Container) (Container, error)
}
func HandleReaderForHandler(r io.Reader, h PairingHandler) (r_out io.Reader, err error) {
cont_in, err := NewTLV8ContainerFromReader(r)
if err != nil {
return nil, err
}
fmt.Println("-> Seq:", cont_in.GetByte(TLVType_SequenceNumber))
cont_out, err := h.Handle(cont_in)
if err != nil {
fmt.Println("[ERROR]", err)
} else {
if cont_out != nil {
fmt.Println("<- Seq:", cont_out.GetByte(TLVType_SequenceNumber))
r_out = cont_out.BytesBuffer()
}
}
fmt.Println("--------------------------")
return r_out, err
} | package pair
import(
"io"
"fmt"
)
type PairingHandler interface {
Handle(Container) (Container, error)
}
- func HandleReaderForHandler(r io.Reader, h PairingHandler) (io.Reader, error) {
+ func HandleReaderForHandler(r io.Reader, h PairingHandler) (r_out io.Reader, err error) {
? ++++++ ++++
cont_in, err := NewTLV8ContainerFromReader(r)
if err != nil {
return nil, err
}
fmt.Println("-> Seq:", cont_in.GetByte(TLVType_SequenceNumber))
cont_out, err := h.Handle(cont_in)
if err != nil {
fmt.Println("[ERROR]", err)
- return nil, err
} else {
if cont_out != nil {
fmt.Println("<- Seq:", cont_out.GetByte(TLVType_SequenceNumber))
- fmt.Println("-------------")
- return cont_out.BytesBuffer(), nil
? ^ ^^^ -----
+ r_out = cont_out.BytesBuffer()
? ^^^ ^^
}
}
+ fmt.Println("--------------------------")
- return nil, err
? ^^^
+ return r_out, err
? ^^^^^
} | 9 | 0.264706 | 4 | 5 |
dcc5976c5185d103212edbcd7df72ba0dffdf22e | page_object_stubs.gemspec | page_object_stubs.gemspec | require_relative 'lib/page_object_stubs/version'
Gem::Specification.new do |spec|
spec.name = 'page_object_stubs'
spec.version = PageObjectStubs::VERSION
spec.date = PageObjectStubs::DATE
spec.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
spec.authors = spec.email = ['code@bootstraponline.com']
spec.summary = spec.description = 'PageObject stub generator for RubyMine'
spec.description += '.' # avoid identical warning
spec.homepage = 'https://github.com/bootstraponline/page_object_stubs'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']
spec.add_runtime_dependency 'parser', '~> 2.2.2.2'
spec.add_development_dependency 'pry', '~> 0.10.1'
spec.add_development_dependency 'appium_thor', '~> 0.0.7'
spec.add_development_dependency 'rspec', '~> 3.2.0'
spec.add_development_dependency 'bundler', '~> 1.9'
spec.add_development_dependency 'rake', '~> 10.0'
end
| require_relative 'lib/page_object_stubs/version'
Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 1.9.3'
spec.name = 'page_object_stubs'
spec.version = PageObjectStubs::VERSION
spec.date = PageObjectStubs::DATE
spec.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
spec.authors = spec.email = ['code@bootstraponline.com']
spec.summary = spec.description = 'PageObject stub generator for RubyMine'
spec.description += '.' # avoid identical warning
spec.homepage = 'https://github.com/bootstraponline/page_object_stubs'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']
spec.add_runtime_dependency 'parser', '~> 2.2.2.2'
spec.add_development_dependency 'pry', '~> 0.10.1'
spec.add_development_dependency 'appium_thor', '~> 0.0.7'
spec.add_development_dependency 'rspec', '~> 3.2.0'
spec.add_development_dependency 'bundler', '~> 1.9'
spec.add_development_dependency 'rake', '~> 10.0'
end
| Add required ruby version to gemspec | Add required ruby version to gemspec
| Ruby | apache-2.0 | bootstraponline/page_object_stubs | ruby | ## Code Before:
require_relative 'lib/page_object_stubs/version'
Gem::Specification.new do |spec|
spec.name = 'page_object_stubs'
spec.version = PageObjectStubs::VERSION
spec.date = PageObjectStubs::DATE
spec.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
spec.authors = spec.email = ['code@bootstraponline.com']
spec.summary = spec.description = 'PageObject stub generator for RubyMine'
spec.description += '.' # avoid identical warning
spec.homepage = 'https://github.com/bootstraponline/page_object_stubs'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']
spec.add_runtime_dependency 'parser', '~> 2.2.2.2'
spec.add_development_dependency 'pry', '~> 0.10.1'
spec.add_development_dependency 'appium_thor', '~> 0.0.7'
spec.add_development_dependency 'rspec', '~> 3.2.0'
spec.add_development_dependency 'bundler', '~> 1.9'
spec.add_development_dependency 'rake', '~> 10.0'
end
## Instruction:
Add required ruby version to gemspec
## Code After:
require_relative 'lib/page_object_stubs/version'
Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 1.9.3'
spec.name = 'page_object_stubs'
spec.version = PageObjectStubs::VERSION
spec.date = PageObjectStubs::DATE
spec.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
spec.authors = spec.email = ['code@bootstraponline.com']
spec.summary = spec.description = 'PageObject stub generator for RubyMine'
spec.description += '.' # avoid identical warning
spec.homepage = 'https://github.com/bootstraponline/page_object_stubs'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']
spec.add_runtime_dependency 'parser', '~> 2.2.2.2'
spec.add_development_dependency 'pry', '~> 0.10.1'
spec.add_development_dependency 'appium_thor', '~> 0.0.7'
spec.add_development_dependency 'rspec', '~> 3.2.0'
spec.add_development_dependency 'bundler', '~> 1.9'
spec.add_development_dependency 'rake', '~> 10.0'
end
| require_relative 'lib/page_object_stubs/version'
Gem::Specification.new do |spec|
+ spec.required_ruby_version = '>= 1.9.3'
+
spec.name = 'page_object_stubs'
spec.version = PageObjectStubs::VERSION
spec.date = PageObjectStubs::DATE
spec.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
spec.authors = spec.email = ['code@bootstraponline.com']
spec.summary = spec.description = 'PageObject stub generator for RubyMine'
spec.description += '.' # avoid identical warning
spec.homepage = 'https://github.com/bootstraponline/page_object_stubs'
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.require_paths = ['lib']
spec.add_runtime_dependency 'parser', '~> 2.2.2.2'
spec.add_development_dependency 'pry', '~> 0.10.1'
spec.add_development_dependency 'appium_thor', '~> 0.0.7'
spec.add_development_dependency 'rspec', '~> 3.2.0'
spec.add_development_dependency 'bundler', '~> 1.9'
spec.add_development_dependency 'rake', '~> 10.0'
end | 2 | 0.083333 | 2 | 0 |
59d8d301ea18105ca9c3047cd664b8b985e62e32 | app/controllers/main_chat_controller.rb | app/controllers/main_chat_controller.rb | class MainChatController < ApplicationController
respond_to :html, :json
def index
respond_with Message.last_five_main_chat_messages
end
end
| class MainChatController < ApplicationController
respond_to :html, :json
def index
respond_with Message.last_five_chat_messages("main")
end
end
| Move MainChatController to use refactored last_five_chat_messages method | Move MainChatController to use refactored last_five_chat_messages method
| Ruby | mit | neslom/flack,neslom/flack,neslom/flack | ruby | ## Code Before:
class MainChatController < ApplicationController
respond_to :html, :json
def index
respond_with Message.last_five_main_chat_messages
end
end
## Instruction:
Move MainChatController to use refactored last_five_chat_messages method
## Code After:
class MainChatController < ApplicationController
respond_to :html, :json
def index
respond_with Message.last_five_chat_messages("main")
end
end
| class MainChatController < ApplicationController
respond_to :html, :json
def index
- respond_with Message.last_five_main_chat_messages
? -----
+ respond_with Message.last_five_chat_messages("main")
? ++++++++
end
end | 2 | 0.285714 | 1 | 1 |
905dd48429bf952ab1b2f5cd31c7c35d4c9e0cfb | app/views/meme.blade.php | app/views/meme.blade.php | @extends('main')
@section('head')
<style>
.row
{
margin-top: 5%;
}
#meme
{
display: block;
margin-left: auto;
margin-right: auto;
}
#progress
{
margin-top: 1%;
}
</style>
@endsection
@section('content')
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="jumbotron">
<div class="page-header">
<h1>
{{{ $meme->name }}} <small><small>{{{ $meme->description }}}</small></small>
</h1>
</div>
<div class="">
<img id="meme" class="img-responsive img-thumbnail" title="{{ $meme->name }}" src="{{{ $image }}}">
<div class="panel-footer text-center">
<a href="{{ URL::to('vote/'.$code.'/1') }}" class="btn btn-success btn-lg" >Spoko</a>
<a href="{{ URL::to('vote/'.$code.'/0') }}" class="btn btn-danger btn-lg" >Suchar</a>
</div>
</div>
</div>
</div>
</div>
@endsection | @extends('main')
@section('head')
<style>
.row
{
margin-top: 5%;
}
#meme
{
display: block;
margin-left: auto;
margin-right: auto;
}
#progress
{
margin-top: 1%;
}
</style>
@endsection
@section('content')
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="jumbotron">
<div class="page-header">
<h1>
{{{ $meme->name }}} <small><small>{{{ $meme->description }}}</small></small>
</h1>
</div>
<div class="">
<img id="meme" class="img-responsive img-thumbnail" title="{{ $meme->name }}" src="{{{ $image }}}">
@if(isset($code))
<div class="panel-footer text-center">
<a href="{{ URL::to('vote/'.$code.'/1') }}" class="btn btn-success btn-lg" >Spoko</a>
<a href="{{ URL::to('vote/'.$code.'/0') }}" class="btn btn-danger btn-lg" >Suchar</a>
</div>
@endif
</div>
</div>
</div>
</div>
@endsection | Fix bug if no voting | Fix bug if no voting
| PHP | mit | marcinlawnik/ekosme.me,marcinlawnik/ekosme.me,marcinlawnik/ekosme.me | php | ## Code Before:
@extends('main')
@section('head')
<style>
.row
{
margin-top: 5%;
}
#meme
{
display: block;
margin-left: auto;
margin-right: auto;
}
#progress
{
margin-top: 1%;
}
</style>
@endsection
@section('content')
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="jumbotron">
<div class="page-header">
<h1>
{{{ $meme->name }}} <small><small>{{{ $meme->description }}}</small></small>
</h1>
</div>
<div class="">
<img id="meme" class="img-responsive img-thumbnail" title="{{ $meme->name }}" src="{{{ $image }}}">
<div class="panel-footer text-center">
<a href="{{ URL::to('vote/'.$code.'/1') }}" class="btn btn-success btn-lg" >Spoko</a>
<a href="{{ URL::to('vote/'.$code.'/0') }}" class="btn btn-danger btn-lg" >Suchar</a>
</div>
</div>
</div>
</div>
</div>
@endsection
## Instruction:
Fix bug if no voting
## Code After:
@extends('main')
@section('head')
<style>
.row
{
margin-top: 5%;
}
#meme
{
display: block;
margin-left: auto;
margin-right: auto;
}
#progress
{
margin-top: 1%;
}
</style>
@endsection
@section('content')
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="jumbotron">
<div class="page-header">
<h1>
{{{ $meme->name }}} <small><small>{{{ $meme->description }}}</small></small>
</h1>
</div>
<div class="">
<img id="meme" class="img-responsive img-thumbnail" title="{{ $meme->name }}" src="{{{ $image }}}">
@if(isset($code))
<div class="panel-footer text-center">
<a href="{{ URL::to('vote/'.$code.'/1') }}" class="btn btn-success btn-lg" >Spoko</a>
<a href="{{ URL::to('vote/'.$code.'/0') }}" class="btn btn-danger btn-lg" >Suchar</a>
</div>
@endif
</div>
</div>
</div>
</div>
@endsection | @extends('main')
@section('head')
<style>
.row
{
margin-top: 5%;
}
#meme
{
display: block;
margin-left: auto;
margin-right: auto;
}
#progress
{
margin-top: 1%;
}
</style>
@endsection
@section('content')
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="jumbotron">
<div class="page-header">
<h1>
{{{ $meme->name }}} <small><small>{{{ $meme->description }}}</small></small>
</h1>
</div>
<div class="">
<img id="meme" class="img-responsive img-thumbnail" title="{{ $meme->name }}" src="{{{ $image }}}">
+ @if(isset($code))
<div class="panel-footer text-center">
<a href="{{ URL::to('vote/'.$code.'/1') }}" class="btn btn-success btn-lg" >Spoko</a>
<a href="{{ URL::to('vote/'.$code.'/0') }}" class="btn btn-danger btn-lg" >Suchar</a>
</div>
+ @endif
</div>
</div>
</div>
</div>
@endsection | 2 | 0.046512 | 2 | 0 |
05913ccc1fd6d111e6f32443ab407f06afe86fc9 | test/run-tests.sh | test/run-tests.sh | PATH=$(npm bin):$PATH
export DIR=$(pwd)
shouldFail=false
for f in $( find . -name "test.sh" ); do
cd $(dirname $f)
chmod a+x ./test.sh
bash ./test.sh > output.json
output=$(json-diff output.json expected-output.json);
if [ "$output" != " undefined" ] ; then
shouldFail=true
echo "Test failed: $(pwd)"
json-diff output.json expected-output.json
fi
rm output.json
cd "${DIR}"
done
if [ "$shouldFail" = true ] ; then
echo "Tests failed due to errors"
exit 1
fi | PATH=$(npm bin):$PATH
export DIR=$(pwd)
totalTestCount=0
failedTestCount=0
for f in $( find . -name "test.sh" ); do
((totalTestCount++))
cd $(dirname $f)
chmod a+x ./test.sh
bash ./test.sh > output.json
output=$(json-diff output.json expected-output.json);
if [ "$output" != " undefined" ] ; then
((failedTestCount++))
echo "Test failed: $(pwd)"
json-diff output.json expected-output.json
fi
rm output.json
cd "${DIR}"
done
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
if (( failedTestCount > 0 )) ; then
echo -e "${RED}${failedTestCount} of ${totalTestCount} tests FAILED${NC}"
exit 1
else
echo -e "${GREEN}All ${totalTestCount} tests PASSED${NC}"
exit 0
fi | Test runner displays number of failing/succeeded tests | Test runner displays number of failing/succeeded tests
| Shell | mit | michalstocki/swagger-json-filter,michalstocki/swagger-json-filter | shell | ## Code Before:
PATH=$(npm bin):$PATH
export DIR=$(pwd)
shouldFail=false
for f in $( find . -name "test.sh" ); do
cd $(dirname $f)
chmod a+x ./test.sh
bash ./test.sh > output.json
output=$(json-diff output.json expected-output.json);
if [ "$output" != " undefined" ] ; then
shouldFail=true
echo "Test failed: $(pwd)"
json-diff output.json expected-output.json
fi
rm output.json
cd "${DIR}"
done
if [ "$shouldFail" = true ] ; then
echo "Tests failed due to errors"
exit 1
fi
## Instruction:
Test runner displays number of failing/succeeded tests
## Code After:
PATH=$(npm bin):$PATH
export DIR=$(pwd)
totalTestCount=0
failedTestCount=0
for f in $( find . -name "test.sh" ); do
((totalTestCount++))
cd $(dirname $f)
chmod a+x ./test.sh
bash ./test.sh > output.json
output=$(json-diff output.json expected-output.json);
if [ "$output" != " undefined" ] ; then
((failedTestCount++))
echo "Test failed: $(pwd)"
json-diff output.json expected-output.json
fi
rm output.json
cd "${DIR}"
done
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
if (( failedTestCount > 0 )) ; then
echo -e "${RED}${failedTestCount} of ${totalTestCount} tests FAILED${NC}"
exit 1
else
echo -e "${GREEN}All ${totalTestCount} tests PASSED${NC}"
exit 0
fi | PATH=$(npm bin):$PATH
export DIR=$(pwd)
- shouldFail=false
+ totalTestCount=0
+ failedTestCount=0
for f in $( find . -name "test.sh" ); do
+ ((totalTestCount++))
cd $(dirname $f)
chmod a+x ./test.sh
bash ./test.sh > output.json
output=$(json-diff output.json expected-output.json);
if [ "$output" != " undefined" ] ; then
- shouldFail=true
+ ((failedTestCount++))
echo "Test failed: $(pwd)"
json-diff output.json expected-output.json
fi
rm output.json
cd "${DIR}"
done
- if [ "$shouldFail" = true ] ; then
- echo "Tests failed due to errors"
+
+ RED='\033[0;31m'
+ GREEN='\033[0;32m'
+ NC='\033[0m'
+ if (( failedTestCount > 0 )) ; then
+ echo -e "${RED}${failedTestCount} of ${totalTestCount} tests FAILED${NC}"
exit 1
+ else
+ echo -e "${GREEN}All ${totalTestCount} tests PASSED${NC}"
+ exit 0
fi | 17 | 0.73913 | 13 | 4 |
bb400dabdaed0430a4af9830d34571dd1cdf8258 | app/views/plantings/_modal.html.haml | app/views/plantings/_modal.html.haml | .modal-dialog{role: "document"}
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{planting.crop.name} planting
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
.modal-body
%p Which garden is the planting in?
%ul.list-group
- planting.owner.gardens.active.order(:name).each do |garden|
%li.list-group-item
= link_to plantings_path(planting: {crop_id: planting.crop_id, garden_id: garden.id}), method: :post do
.md-v-line
.d-flex.justify-content-between
= image_tag garden_image_path(garden), class: 'img', height: 50
%span
%h4= garden.name
%p= garden.description
%span
- garden
%a.btn{"data-target" => "#modelPlantingForm", "data-toggle" => "modal", href: "", id: 'planting-button'}
= planting_icon
Plant
| .modal-dialog{role: "document"}
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{planting.crop.name} planting
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
.modal-body
%p Which garden is the planting in?
%ul.list-group
- planting.owner.gardens.active.order(:name).each do |garden|
%li.list-group-item
= link_to plantings_path(planting: {crop_id: planting.crop_id, garden_id: garden.id}), method: :post do
.md-v-line
.d-flex.justify-content-between
= image_tag garden_image_path(garden), class: 'img', height: 50
%span
%h4= garden.name
%p= garden.description
%span
- garden
= link_to 'add new garden', new_garden_path
%a.btn{"data-target" => "#modelPlantingForm", "data-toggle" => "modal", href: "", id: 'planting-button'}
= planting_icon
Plant
| Add new garden button on modal planting form | Add new garden button on modal planting form
| Haml | agpl-3.0 | Growstuff/growstuff,Br3nda/growstuff,cesy/growstuff,Br3nda/growstuff,cesy/growstuff,Growstuff/growstuff,cesy/growstuff,Growstuff/growstuff,cesy/growstuff,Br3nda/growstuff,Growstuff/growstuff,Br3nda/growstuff | haml | ## Code Before:
.modal-dialog{role: "document"}
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{planting.crop.name} planting
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
.modal-body
%p Which garden is the planting in?
%ul.list-group
- planting.owner.gardens.active.order(:name).each do |garden|
%li.list-group-item
= link_to plantings_path(planting: {crop_id: planting.crop_id, garden_id: garden.id}), method: :post do
.md-v-line
.d-flex.justify-content-between
= image_tag garden_image_path(garden), class: 'img', height: 50
%span
%h4= garden.name
%p= garden.description
%span
- garden
%a.btn{"data-target" => "#modelPlantingForm", "data-toggle" => "modal", href: "", id: 'planting-button'}
= planting_icon
Plant
## Instruction:
Add new garden button on modal planting form
## Code After:
.modal-dialog{role: "document"}
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{planting.crop.name} planting
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
.modal-body
%p Which garden is the planting in?
%ul.list-group
- planting.owner.gardens.active.order(:name).each do |garden|
%li.list-group-item
= link_to plantings_path(planting: {crop_id: planting.crop_id, garden_id: garden.id}), method: :post do
.md-v-line
.d-flex.justify-content-between
= image_tag garden_image_path(garden), class: 'img', height: 50
%span
%h4= garden.name
%p= garden.description
%span
- garden
= link_to 'add new garden', new_garden_path
%a.btn{"data-target" => "#modelPlantingForm", "data-toggle" => "modal", href: "", id: 'planting-button'}
= planting_icon
Plant
| .modal-dialog{role: "document"}
.modal-content
.modal-header.text-center
%h4.modal-title.w-100.font-weight-bold Record #{planting.crop.name} planting
%button.close{"aria-label" => "Close", "data-dismiss" => "modal", type: "button"}
%span{"aria-hidden" => "true"} ×
.modal-body
%p Which garden is the planting in?
%ul.list-group
- planting.owner.gardens.active.order(:name).each do |garden|
%li.list-group-item
= link_to plantings_path(planting: {crop_id: planting.crop_id, garden_id: garden.id}), method: :post do
.md-v-line
.d-flex.justify-content-between
= image_tag garden_image_path(garden), class: 'img', height: 50
%span
%h4= garden.name
%p= garden.description
%span
- garden
+ = link_to 'add new garden', new_garden_path
%a.btn{"data-target" => "#modelPlantingForm", "data-toggle" => "modal", href: "", id: 'planting-button'}
= planting_icon
Plant | 1 | 0.038462 | 1 | 0 |
b5601797b0e734514e5958be64576abe9fe684d7 | src/cli.py | src/cli.py | from cmd2 import Cmd, options, make_option
import h5_wrapper
import sys
import os
class CmdApp(Cmd):
def do_ls(self, args, opts=None):
for g in self.explorer.list_groups():
print(g+"/")
for ds in self.explorer.list_datasets():
print(ds)
def do_cd(self, args, opts=None):
if len(args) == 0:
args = '/'
self.explorer.change_dir(args)
def do_load(self, args, opts=None):
print("Loading "+ args)
self.explorer = h5_wrapper.H5Explorer(args)
def do_pwd(self, args, opts=None):
print(self.explorer.working_dir)
def do_pushd(self, args, opts=None):
self.explorer.push_dir(args)
def do_popd(self, args, opts=None):
self.explorer.pop_dir()
self.do_pwd(None)
def precmd(self, line):
if not line.startswith('load') and (line.endswith('.h5') or line.endswith('.hdf5')):
line = 'load ' + line
return line
def do_exit(self, args):
return True
def do_clear(self, args):
os.system('clear')
if __name__ == '__main__':
c = CmdApp()
c.cmdloop()
| from cmd2 import Cmd, options, make_option
import h5_wrapper
import sys
import os
class CmdApp(Cmd):
def do_ls(self, args, opts=None):
if len(args.strip()) > 0:
for g in self.explorer.list_groups(args):
print(g+"/")
for ds in self.explorer.list_datasets(args):
print(ds)
else:
for g in self.explorer.list_groups():
print(g+"/")
for ds in self.explorer.list_datasets():
print(ds)
def do_cd(self, args, opts=None):
if len(args) == 0:
args = '/'
self.explorer.change_dir(args)
def do_load(self, args, opts=None):
print("Loading "+ args)
self.explorer = h5_wrapper.H5Explorer(args)
def do_pwd(self, args, opts=None):
print(self.explorer.working_dir)
def do_pushd(self, args, opts=None):
self.explorer.push_dir(args)
def do_popd(self, args, opts=None):
self.explorer.pop_dir()
self.do_pwd(None)
def precmd(self, line):
if not line.startswith('load') and (line.endswith('.h5') or line.endswith('.hdf5')):
line = 'load ' + line
return line
def do_exit(self, args):
return True
def do_clear(self, args):
os.system('clear')
if __name__ == '__main__':
c = CmdApp()
c.cmdloop()
| Allow ls to pass arguments | Allow ls to pass arguments
| Python | mit | ksunden/h5cli | python | ## Code Before:
from cmd2 import Cmd, options, make_option
import h5_wrapper
import sys
import os
class CmdApp(Cmd):
def do_ls(self, args, opts=None):
for g in self.explorer.list_groups():
print(g+"/")
for ds in self.explorer.list_datasets():
print(ds)
def do_cd(self, args, opts=None):
if len(args) == 0:
args = '/'
self.explorer.change_dir(args)
def do_load(self, args, opts=None):
print("Loading "+ args)
self.explorer = h5_wrapper.H5Explorer(args)
def do_pwd(self, args, opts=None):
print(self.explorer.working_dir)
def do_pushd(self, args, opts=None):
self.explorer.push_dir(args)
def do_popd(self, args, opts=None):
self.explorer.pop_dir()
self.do_pwd(None)
def precmd(self, line):
if not line.startswith('load') and (line.endswith('.h5') or line.endswith('.hdf5')):
line = 'load ' + line
return line
def do_exit(self, args):
return True
def do_clear(self, args):
os.system('clear')
if __name__ == '__main__':
c = CmdApp()
c.cmdloop()
## Instruction:
Allow ls to pass arguments
## Code After:
from cmd2 import Cmd, options, make_option
import h5_wrapper
import sys
import os
class CmdApp(Cmd):
def do_ls(self, args, opts=None):
if len(args.strip()) > 0:
for g in self.explorer.list_groups(args):
print(g+"/")
for ds in self.explorer.list_datasets(args):
print(ds)
else:
for g in self.explorer.list_groups():
print(g+"/")
for ds in self.explorer.list_datasets():
print(ds)
def do_cd(self, args, opts=None):
if len(args) == 0:
args = '/'
self.explorer.change_dir(args)
def do_load(self, args, opts=None):
print("Loading "+ args)
self.explorer = h5_wrapper.H5Explorer(args)
def do_pwd(self, args, opts=None):
print(self.explorer.working_dir)
def do_pushd(self, args, opts=None):
self.explorer.push_dir(args)
def do_popd(self, args, opts=None):
self.explorer.pop_dir()
self.do_pwd(None)
def precmd(self, line):
if not line.startswith('load') and (line.endswith('.h5') or line.endswith('.hdf5')):
line = 'load ' + line
return line
def do_exit(self, args):
return True
def do_clear(self, args):
os.system('clear')
if __name__ == '__main__':
c = CmdApp()
c.cmdloop()
| from cmd2 import Cmd, options, make_option
import h5_wrapper
import sys
import os
class CmdApp(Cmd):
def do_ls(self, args, opts=None):
+ if len(args.strip()) > 0:
+ for g in self.explorer.list_groups(args):
+ print(g+"/")
+
+ for ds in self.explorer.list_datasets(args):
+ print(ds)
+ else:
- for g in self.explorer.list_groups():
+ for g in self.explorer.list_groups():
? ++++
- print(g+"/")
+ print(g+"/")
? ++++
-
+
? ++++
- for ds in self.explorer.list_datasets():
+ for ds in self.explorer.list_datasets():
? ++++
- print(ds)
+ print(ds)
? ++++
def do_cd(self, args, opts=None):
if len(args) == 0:
args = '/'
self.explorer.change_dir(args)
def do_load(self, args, opts=None):
print("Loading "+ args)
self.explorer = h5_wrapper.H5Explorer(args)
def do_pwd(self, args, opts=None):
print(self.explorer.working_dir)
def do_pushd(self, args, opts=None):
self.explorer.push_dir(args)
def do_popd(self, args, opts=None):
self.explorer.pop_dir()
self.do_pwd(None)
def precmd(self, line):
if not line.startswith('load') and (line.endswith('.h5') or line.endswith('.hdf5')):
line = 'load ' + line
return line
def do_exit(self, args):
return True
def do_clear(self, args):
os.system('clear')
if __name__ == '__main__':
c = CmdApp()
c.cmdloop() | 17 | 0.346939 | 12 | 5 |
d4944818f210eaa928527edcfab4e9ba2e081977 | README.md | README.md |
[L.B. Stanza](http://lbstanza.org) is an optionally-typed, general-purpose langauge. I've only tested the linux version so please submit issues if you have any problems with the Mac version.
### Linux
```sh
brew install MadcapJake/lbstanza/stanza-linux
```
### Mac
```sh
brew install MadcapJake/lbstanza/stanza-mac
```
### Caveats
Be sure to set the `STANZA_CONFIG` variable as shown after installing.
### Tips
[`stz`], a fish shell function, provides a simple wrapper for executing one-liners and running scripts.
```sh
brew install fisher
fisher i stz
stz -e 'print(1)'
stz -r some-stanza-file.stanza
```
[`stz`]: https://github.com/fisherman/stz
|
[L.B. Stanza](http://lbstanza.org) is an optionally-typed, general-purpose langauge. I've only tested the linux version so please submit issues if you have any problems with the Mac version.
### Install
#### Linux
```sh
brew install MadcapJake/lbstanza/stanza-linux
```
#### Mac
```sh
brew install MadcapJake/lbstanza/stanza-mac
```
#### Upgrading
```sh
brew update # Pulls new tap commits
brew upgrade stanza-linux # installs latest version of stanza
```
### Caveats
Be sure to set the `STANZA_CONFIG` variable as shown after installing.
### Tips
[`stz`], a fish shell function, provides a simple wrapper for executing one-liners and running scripts.
```sh
brew install fisher
fisher i stz
stz -e 'print(1)'
stz -r some-stanza-file.stanza
```
[`stz`]: https://github.com/fisherman/stz
| Add upgrading instructions to readme | Add upgrading instructions to readme
| Markdown | mit | MadcapJake/homebrew-lbstanza,stanza-tools/homebrew-tap | markdown | ## Code Before:
[L.B. Stanza](http://lbstanza.org) is an optionally-typed, general-purpose langauge. I've only tested the linux version so please submit issues if you have any problems with the Mac version.
### Linux
```sh
brew install MadcapJake/lbstanza/stanza-linux
```
### Mac
```sh
brew install MadcapJake/lbstanza/stanza-mac
```
### Caveats
Be sure to set the `STANZA_CONFIG` variable as shown after installing.
### Tips
[`stz`], a fish shell function, provides a simple wrapper for executing one-liners and running scripts.
```sh
brew install fisher
fisher i stz
stz -e 'print(1)'
stz -r some-stanza-file.stanza
```
[`stz`]: https://github.com/fisherman/stz
## Instruction:
Add upgrading instructions to readme
## Code After:
[L.B. Stanza](http://lbstanza.org) is an optionally-typed, general-purpose langauge. I've only tested the linux version so please submit issues if you have any problems with the Mac version.
### Install
#### Linux
```sh
brew install MadcapJake/lbstanza/stanza-linux
```
#### Mac
```sh
brew install MadcapJake/lbstanza/stanza-mac
```
#### Upgrading
```sh
brew update # Pulls new tap commits
brew upgrade stanza-linux # installs latest version of stanza
```
### Caveats
Be sure to set the `STANZA_CONFIG` variable as shown after installing.
### Tips
[`stz`], a fish shell function, provides a simple wrapper for executing one-liners and running scripts.
```sh
brew install fisher
fisher i stz
stz -e 'print(1)'
stz -r some-stanza-file.stanza
```
[`stz`]: https://github.com/fisherman/stz
|
[L.B. Stanza](http://lbstanza.org) is an optionally-typed, general-purpose langauge. I've only tested the linux version so please submit issues if you have any problems with the Mac version.
+ ### Install
+
- ### Linux
+ #### Linux
? +
```sh
brew install MadcapJake/lbstanza/stanza-linux
```
- ### Mac
+ #### Mac
? +
```sh
brew install MadcapJake/lbstanza/stanza-mac
+ ```
+
+ #### Upgrading
+
+ ```sh
+ brew update # Pulls new tap commits
+ brew upgrade stanza-linux # installs latest version of stanza
```
### Caveats
Be sure to set the `STANZA_CONFIG` variable as shown after installing.
### Tips
[`stz`], a fish shell function, provides a simple wrapper for executing one-liners and running scripts.
```sh
brew install fisher
fisher i stz
stz -e 'print(1)'
stz -r some-stanza-file.stanza
```
[`stz`]: https://github.com/fisherman/stz | 13 | 0.419355 | 11 | 2 |
9c2951d794bb27952606cae77da1ebcd0d651e72 | aiodownload/api.py | aiodownload/api.py |
from aiodownload import AioDownloadBundle, AioDownload
import asyncio
def one(url, download=None):
return [s for s in swarm([url], download=download)][0]
def swarm(urls, download=None):
return [e for e in each(urls, download=download)]
def each(iterable, url_map=None, download=None):
url_map = url_map or _url_map
download = download or AioDownload()
tasks = []
for i in iterable:
url = url_map(i)
info = None if i == url else i
tasks.append(
download._loop.create_task(
AioDownload(url, info=info)
)
)
for task_set in download._loop.run_until_complete(asyncio.wait(tasks)):
for task in task_set:
yield task.result()
def _url_map(x):
return str(x)
|
from aiodownload import AioDownloadBundle, AioDownload
import asyncio
def one(url, download=None):
return [s for s in swarm([url], download=download)][0]
def swarm(urls, download=None):
return [e for e in each(urls, download=download)]
def each(iterable, url_map=None, download=None):
url_map = url_map or _url_map
download = download or AioDownload()
tasks = []
for i in iterable:
url = url_map(i)
info = None if i == url else i
tasks.append(
download._loop.create_task(
download.main(AioDownloadBundle(url, info=info))
)
)
for task_set in download._loop.run_until_complete(asyncio.wait(tasks)):
for task in task_set:
yield task.result()
def _url_map(x):
return str(x)
| Fix - needed to provide create_task a function, not a class | Fix - needed to provide create_task a function, not a class
| Python | mit | jelloslinger/aiodownload | python | ## Code Before:
from aiodownload import AioDownloadBundle, AioDownload
import asyncio
def one(url, download=None):
return [s for s in swarm([url], download=download)][0]
def swarm(urls, download=None):
return [e for e in each(urls, download=download)]
def each(iterable, url_map=None, download=None):
url_map = url_map or _url_map
download = download or AioDownload()
tasks = []
for i in iterable:
url = url_map(i)
info = None if i == url else i
tasks.append(
download._loop.create_task(
AioDownload(url, info=info)
)
)
for task_set in download._loop.run_until_complete(asyncio.wait(tasks)):
for task in task_set:
yield task.result()
def _url_map(x):
return str(x)
## Instruction:
Fix - needed to provide create_task a function, not a class
## Code After:
from aiodownload import AioDownloadBundle, AioDownload
import asyncio
def one(url, download=None):
return [s for s in swarm([url], download=download)][0]
def swarm(urls, download=None):
return [e for e in each(urls, download=download)]
def each(iterable, url_map=None, download=None):
url_map = url_map or _url_map
download = download or AioDownload()
tasks = []
for i in iterable:
url = url_map(i)
info = None if i == url else i
tasks.append(
download._loop.create_task(
download.main(AioDownloadBundle(url, info=info))
)
)
for task_set in download._loop.run_until_complete(asyncio.wait(tasks)):
for task in task_set:
yield task.result()
def _url_map(x):
return str(x)
|
from aiodownload import AioDownloadBundle, AioDownload
import asyncio
def one(url, download=None):
return [s for s in swarm([url], download=download)][0]
def swarm(urls, download=None):
return [e for e in each(urls, download=download)]
def each(iterable, url_map=None, download=None):
url_map = url_map or _url_map
download = download or AioDownload()
tasks = []
for i in iterable:
url = url_map(i)
info = None if i == url else i
tasks.append(
download._loop.create_task(
- AioDownload(url, info=info)
+ download.main(AioDownloadBundle(url, info=info))
? ++++++++++++++ ++++++ +
)
)
for task_set in download._loop.run_until_complete(asyncio.wait(tasks)):
for task in task_set:
yield task.result()
def _url_map(x):
return str(x)
| 2 | 0.052632 | 1 | 1 |
36e6d4181d168bb7a06395516423b274f70037f6 | recipes-bsp/burn-boot/burn-boot_git.bb | recipes-bsp/burn-boot/burn-boot_git.bb | SUMMARY = "A small python tool for downloading bootloader to ddr through serial port"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=219f23a516954274fab23350ce921da3"
SRCREV = "6d8429dd5dfa4ec1cee4428cafe882c16624832a"
SRC_URI = "git://github.com/96boards-hikey/burn-boot.git;protocol=https \
"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/hisi-idt.py ${D}${bindir}
}
RDEPENDS_${PN} += "python3-core python3-pyserial"
inherit deploy
do_deploy() {
install -D -p -m 0755 ${S}/hisi-idt.py ${DEPLOYDIR}/bootloader/hisi-idt.py
}
addtask deploy before do_build after do_compile
BBCLASSEXTEND = "native"
| SUMMARY = "A small python tool for downloading bootloader to ddr through serial port"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=219f23a516954274fab23350ce921da3"
SRCREV = "6d8429dd5dfa4ec1cee4428cafe882c16624832a"
SRC_URI = "git://github.com/96boards-hikey/burn-boot.git;protocol=https \
"
S = "${WORKDIR}/git"
inherit deploy native
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/hisi-idt.py ${D}${bindir}
}
do_deploy() {
install -D -p -m 0755 ${S}/hisi-idt.py ${DEPLOYDIR}/bootloader/hisi-idt.py
}
addtask deploy before do_build after do_compile
RDEPENDS_${PN} += "python3-core python3-pyserial"
| Make it multilib safe, delete target recipe | burn-boot: Make it multilib safe, delete target recipe
Since it plays with DEPLOY_DIR, we have to ensure its cleaned before
rebuilds and its host only package so make it native only.
This helps resolve conflicts when multilib is enabled
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
| BitBake | mit | 96boards/meta-96boards,mrchapp/meta-96boards | bitbake | ## Code Before:
SUMMARY = "A small python tool for downloading bootloader to ddr through serial port"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=219f23a516954274fab23350ce921da3"
SRCREV = "6d8429dd5dfa4ec1cee4428cafe882c16624832a"
SRC_URI = "git://github.com/96boards-hikey/burn-boot.git;protocol=https \
"
S = "${WORKDIR}/git"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/hisi-idt.py ${D}${bindir}
}
RDEPENDS_${PN} += "python3-core python3-pyserial"
inherit deploy
do_deploy() {
install -D -p -m 0755 ${S}/hisi-idt.py ${DEPLOYDIR}/bootloader/hisi-idt.py
}
addtask deploy before do_build after do_compile
BBCLASSEXTEND = "native"
## Instruction:
burn-boot: Make it multilib safe, delete target recipe
Since it plays with DEPLOY_DIR, we have to ensure its cleaned before
rebuilds and its host only package so make it native only.
This helps resolve conflicts when multilib is enabled
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
## Code After:
SUMMARY = "A small python tool for downloading bootloader to ddr through serial port"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=219f23a516954274fab23350ce921da3"
SRCREV = "6d8429dd5dfa4ec1cee4428cafe882c16624832a"
SRC_URI = "git://github.com/96boards-hikey/burn-boot.git;protocol=https \
"
S = "${WORKDIR}/git"
inherit deploy native
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/hisi-idt.py ${D}${bindir}
}
do_deploy() {
install -D -p -m 0755 ${S}/hisi-idt.py ${DEPLOYDIR}/bootloader/hisi-idt.py
}
addtask deploy before do_build after do_compile
RDEPENDS_${PN} += "python3-core python3-pyserial"
| SUMMARY = "A small python tool for downloading bootloader to ddr through serial port"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=219f23a516954274fab23350ce921da3"
SRCREV = "6d8429dd5dfa4ec1cee4428cafe882c16624832a"
SRC_URI = "git://github.com/96boards-hikey/burn-boot.git;protocol=https \
"
S = "${WORKDIR}/git"
+ inherit deploy native
+
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/hisi-idt.py ${D}${bindir}
}
-
- RDEPENDS_${PN} += "python3-core python3-pyserial"
-
- inherit deploy
do_deploy() {
install -D -p -m 0755 ${S}/hisi-idt.py ${DEPLOYDIR}/bootloader/hisi-idt.py
}
addtask deploy before do_build after do_compile
- BBCLASSEXTEND = "native"
+ RDEPENDS_${PN} += "python3-core python3-pyserial" | 8 | 0.296296 | 3 | 5 |
4596840e6a9979f72c406dc129dd3c7f6ec59fef | config/livestax.yml | config/livestax.yml | livestax:
members:
- jamiecobbett
- lozette
- sl33p
- deberny
channel:
"#pull-requests"
exclude_titles:
- "[DO NOT MERGE]"
- DO NOT MERGE
- WIP
- "[DO NOT SEAL]"
- "[DON'T SEAL]"
- DO NOT SEAL
- DON'T SEAL
| livestax:
members:
- jamiecobbett
- lozette
- sl33p
- deberny
- shaffi
channel:
"#pull-requests"
exclude_titles:
- "[DO NOT MERGE]"
- DO NOT MERGE
- WIP
- "[DO NOT SEAL]"
- "[DON'T SEAL]"
- DO NOT SEAL
- DON'T SEAL
| Add Shaffi to the seal | Add Shaffi to the seal
| YAML | mit | livestax/seal,livestax/seal | yaml | ## Code Before:
livestax:
members:
- jamiecobbett
- lozette
- sl33p
- deberny
channel:
"#pull-requests"
exclude_titles:
- "[DO NOT MERGE]"
- DO NOT MERGE
- WIP
- "[DO NOT SEAL]"
- "[DON'T SEAL]"
- DO NOT SEAL
- DON'T SEAL
## Instruction:
Add Shaffi to the seal
## Code After:
livestax:
members:
- jamiecobbett
- lozette
- sl33p
- deberny
- shaffi
channel:
"#pull-requests"
exclude_titles:
- "[DO NOT MERGE]"
- DO NOT MERGE
- WIP
- "[DO NOT SEAL]"
- "[DON'T SEAL]"
- DO NOT SEAL
- DON'T SEAL
| livestax:
members:
- jamiecobbett
- lozette
- sl33p
- deberny
+ - shaffi
channel:
"#pull-requests"
exclude_titles:
- "[DO NOT MERGE]"
- DO NOT MERGE
- WIP
- "[DO NOT SEAL]"
- "[DON'T SEAL]"
- DO NOT SEAL
- DON'T SEAL | 1 | 0.055556 | 1 | 0 |
0dc1ee91333858df79dce97d1c2b6a52d36a4088 | frontend/src/metabase/components/Icon.jsx | frontend/src/metabase/components/Icon.jsx | /*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
height: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
}
render() {
const icon = loadIcon(this.props.name);
const props = { ...icon.attrs, ...this.props };
if (props.size != null) {
props.width = props.size;
props.height = props.size;
}
if (props.scale != null) {
props.width *= props.scale;
props.height *= props.scale;
}
if (!icon) {
return <span className="hide" />;
} else if (icon.img) {
return (<RetinaImage forceOriginalDimensions={false} {...props} src={icon.img} />);
} else if (icon.svg) {
return (<svg {...props} dangerouslySetInnerHTML={{__html: icon.svg}}></svg>);
} else {
return (<svg {...props}><path d={icon.path} /></svg>);
}
}
}
| /*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
height: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
}
render() {
const icon = loadIcon(this.props.name);
if (!icon) {
return null;
}
const props = { ...icon.attrs, ...this.props };
if (props.size != null) {
props.width = props.size;
props.height = props.size;
}
if (props.scale != null) {
props.width *= props.scale;
props.height *= props.scale;
}
if (icon.img) {
return (<RetinaImage forceOriginalDimensions={false} {...props} src={icon.img} />);
} else if (icon.svg) {
return (<svg {...props} dangerouslySetInnerHTML={{__html: icon.svg}}></svg>);
} else {
return (<svg {...props}><path d={icon.path} /></svg>);
}
}
}
| Fix "Cannot read property 'attrs' of undefined" when icon is missing | Fix "Cannot read property 'attrs' of undefined" when icon is missing
| JSX | agpl-3.0 | blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase,blueoceanideas/metabase | jsx | ## Code Before:
/*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
height: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
}
render() {
const icon = loadIcon(this.props.name);
const props = { ...icon.attrs, ...this.props };
if (props.size != null) {
props.width = props.size;
props.height = props.size;
}
if (props.scale != null) {
props.width *= props.scale;
props.height *= props.scale;
}
if (!icon) {
return <span className="hide" />;
} else if (icon.img) {
return (<RetinaImage forceOriginalDimensions={false} {...props} src={icon.img} />);
} else if (icon.svg) {
return (<svg {...props} dangerouslySetInnerHTML={{__html: icon.svg}}></svg>);
} else {
return (<svg {...props}><path d={icon.path} /></svg>);
}
}
}
## Instruction:
Fix "Cannot read property 'attrs' of undefined" when icon is missing
## Code After:
/*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
height: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
}
render() {
const icon = loadIcon(this.props.name);
if (!icon) {
return null;
}
const props = { ...icon.attrs, ...this.props };
if (props.size != null) {
props.width = props.size;
props.height = props.size;
}
if (props.scale != null) {
props.width *= props.scale;
props.height *= props.scale;
}
if (icon.img) {
return (<RetinaImage forceOriginalDimensions={false} {...props} src={icon.img} />);
} else if (icon.svg) {
return (<svg {...props} dangerouslySetInnerHTML={{__html: icon.svg}}></svg>);
} else {
return (<svg {...props}><path d={icon.path} /></svg>);
}
}
}
| /*eslint-disable react/no-danger */
import React, { Component, PropTypes } from "react";
import RetinaImage from "react-retina-image";
import { loadIcon } from 'metabase/icon_paths';
export default class Icon extends Component {
static propTypes = {
name: PropTypes.string.isRequired,
width: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
height: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
}
render() {
const icon = loadIcon(this.props.name);
+ if (!icon) {
+ return null;
+ }
const props = { ...icon.attrs, ...this.props };
if (props.size != null) {
props.width = props.size;
props.height = props.size;
}
if (props.scale != null) {
props.width *= props.scale;
props.height *= props.scale;
}
- if (!icon) {
? -
+ if (icon.img) {
? ++++
- return <span className="hide" />;
- } else if (icon.img) {
return (<RetinaImage forceOriginalDimensions={false} {...props} src={icon.img} />);
} else if (icon.svg) {
return (<svg {...props} dangerouslySetInnerHTML={{__html: icon.svg}}></svg>);
} else {
return (<svg {...props}><path d={icon.path} /></svg>);
}
}
} | 7 | 0.159091 | 4 | 3 |
c740e183ca7024dfeb6293543ddee88ab5b21883 | .travis.yml | .travis.yml | language: ruby
rvm:
- ree
- 1.8.7
- 1.9.3
bundler_args: --without development
env:
- DB=sqlite
- DB=mysql
- DB=postgres
branches:
except:
- fit-pages
before_script:
- "cp -v config/database.${DB}.yml config/database.yml"
- "cp -v config/teambox.example.yml config/teambox.yml"
- bundle exec rake db:create db:schema:load RAILS_ENV=test
script: "bundle exec rake spec"
matrix:
allow_failures:
- rvm: 1.9.3
| language: ruby
rvm:
- 1.9.3
- 2.0.0
bundler_args: --without development
env:
- DB=sqlite
- DB=mysql
- DB=postgres
branches:
except:
- fit-pages
before_script:
- "cp -v config/database.${DB}.yml config/database.yml"
- "cp -v config/teambox.example.yml config/teambox.yml"
- bundle exec rake db:create db:schema:load RAILS_ENV=test
script: "bundle exec rake spec"
matrix:
allow_failures:
- rvm: 2.0.0
| Remove REE, 1.8.7, add 2.0.0 | Travis: Remove REE, 1.8.7, add 2.0.0
| YAML | agpl-3.0 | crewmate/crewmate,crewmate/crewmate,codeforeurope/samenspel,crewmate/crewmate,codeforeurope/samenspel | yaml | ## Code Before:
language: ruby
rvm:
- ree
- 1.8.7
- 1.9.3
bundler_args: --without development
env:
- DB=sqlite
- DB=mysql
- DB=postgres
branches:
except:
- fit-pages
before_script:
- "cp -v config/database.${DB}.yml config/database.yml"
- "cp -v config/teambox.example.yml config/teambox.yml"
- bundle exec rake db:create db:schema:load RAILS_ENV=test
script: "bundle exec rake spec"
matrix:
allow_failures:
- rvm: 1.9.3
## Instruction:
Travis: Remove REE, 1.8.7, add 2.0.0
## Code After:
language: ruby
rvm:
- 1.9.3
- 2.0.0
bundler_args: --without development
env:
- DB=sqlite
- DB=mysql
- DB=postgres
branches:
except:
- fit-pages
before_script:
- "cp -v config/database.${DB}.yml config/database.yml"
- "cp -v config/teambox.example.yml config/teambox.yml"
- bundle exec rake db:create db:schema:load RAILS_ENV=test
script: "bundle exec rake spec"
matrix:
allow_failures:
- rvm: 2.0.0
| language: ruby
rvm:
- - ree
- - 1.8.7
- 1.9.3
+ - 2.0.0
bundler_args: --without development
env:
- DB=sqlite
- DB=mysql
- DB=postgres
branches:
except:
- fit-pages
before_script:
- "cp -v config/database.${DB}.yml config/database.yml"
- "cp -v config/teambox.example.yml config/teambox.yml"
- bundle exec rake db:create db:schema:load RAILS_ENV=test
script: "bundle exec rake spec"
matrix:
allow_failures:
- - rvm: 1.9.3
? ^ ^ ^
+ - rvm: 2.0.0
? ^ ^ ^
| 5 | 0.238095 | 2 | 3 |
98fac12e7fc2a13230536dba49961e0f7460b135 | client/src/index.css | client/src/index.css | body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
| body {
margin: 0;
padding: 0;
font-family: sans-serif;
padding-bottom: 60px;
}
| Set padding-bottom to avoid overlap with footer | Set padding-bottom to avoid overlap with footer
| CSS | mit | Pairboard/Pairboard,Pairboard/Pairboard | css | ## Code Before:
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
## Instruction:
Set padding-bottom to avoid overlap with footer
## Code After:
body {
margin: 0;
padding: 0;
font-family: sans-serif;
padding-bottom: 60px;
}
| body {
margin: 0;
padding: 0;
font-family: sans-serif;
+ padding-bottom: 60px;
} | 1 | 0.2 | 1 | 0 |
fc6de6706cb4cb8cde60924785865e4be3ff3e67 | .pre-commit-config.yaml | .pre-commit-config.yaml | repos:
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--line-length, "120"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-xml
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
hooks:
- id: isort
| ci:
skip: [pylint]
repos:
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--line-length, "120"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-xml
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.0
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
exclude: "survey/static/|dev/templates/|survey/templates/"
| Add prettier to the pre-commit configuration | Add prettier to the pre-commit configuration
| YAML | agpl-3.0 | Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey,Pierre-Sassoulas/django-survey | yaml | ## Code Before:
repos:
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--line-length, "120"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-xml
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
hooks:
- id: isort
## Instruction:
Add prettier to the pre-commit configuration
## Code After:
ci:
skip: [pylint]
repos:
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args: [--line-length, "120"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-xml
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.7.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.0
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
exclude: "survey/static/|dev/templates/|survey/templates/"
| + ci:
+ skip: [pylint]
+
repos:
- - repo: https://github.com/myint/autoflake
? -
+ - repo: https://github.com/myint/autoflake
? +
rev: v1.4
hooks:
- - id: autoflake
? --
+ - id: autoflake
? ++
args:
- - --in-place
? --
+ - --in-place
- - --remove-all-unused-imports
? --
+ - --remove-all-unused-imports
- - --expand-star-imports
? --
+ - --expand-star-imports
- - --remove-duplicate-keys
? --
+ - --remove-duplicate-keys
- - --remove-unused-variables
? --
+ - --remove-unused-variables
- - repo: https://github.com/ambv/black
? -
+ - repo: https://github.com/ambv/black
? +
rev: 20.8b1
hooks:
- - id: black
+ - id: black
? ++
- args: [--line-length, "120"]
+ args: [--line-length, "120"]
? ++
- - repo: https://github.com/pre-commit/pre-commit-hooks
? -
+ - repo: https://github.com/pre-commit/pre-commit-hooks
? +
rev: v3.4.0
hooks:
- - id: check-merge-conflict
? --
+ - id: check-merge-conflict
? ++
- - id: trailing-whitespace
? --
+ - id: trailing-whitespace
? ++
- - id: end-of-file-fixer
? --
+ - id: end-of-file-fixer
? ++
- - id: check-json
? --
+ - id: check-json
? ++
- - id: check-xml
? --
+ - id: check-xml
? ++
- - repo: https://gitlab.com/pycqa/flake8
? -
+ - repo: https://gitlab.com/pycqa/flake8
? +
rev: 3.8.4
hooks:
- - id: flake8
? --
+ - id: flake8
? ++
- - repo: https://github.com/PyCQA/isort
? -
+ - repo: https://github.com/PyCQA/isort
? +
rev: 5.7.0
hooks:
- - id: isort
? --
+ - id: isort
? ++
+ - repo: https://github.com/pre-commit/mirrors-prettier
+ rev: v2.3.0
+ hooks:
+ - id: prettier
+ args: [--prose-wrap=always, --print-width=88]
+ exclude: "survey/static/|dev/templates/|survey/templates/" | 49 | 1.53125 | 29 | 20 |
e3544b18dbc3430779009709fbb684572a841ea8 | src/Storage/Collection/CollectionManager.php | src/Storage/Collection/CollectionManager.php | <?php
namespace Bolt\Storage\Collection;
use Bolt\Storage\EntityManager;
/**
* Collection Manager class
*
* @author Ross Riley <riley.ross@gmail.com>
*/
class CollectionManager
{
public $collections;
public $em;
/**
* @param $entity
* @param $handler
*/
public function setHandler($entity, $handler)
{
$this->collections[$entity] = $handler;
}
/**
* Set an instance of EntityManager
*
* @param EntityManager $em
*/
public function setEntityManager(EntityManager $em = null)
{
$this->em = $em;
}
public function create($class)
{
if (isset($this->collections[$class])) {
return call_user_func($this->collections[$class]);
}
}
}
| <?php
namespace Bolt\Storage\Collection;
use Bolt\Storage\EntityManager;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Collection Manager class
*
* @author Ross Riley <riley.ross@gmail.com>
*/
class CollectionManager
{
public $collections;
public $em;
/**
* @param $entity
* @param $handler
*/
public function setHandler($entity, $handler)
{
$this->collections[$entity] = $handler;
}
/**
* Set an instance of EntityManager
*
* @param EntityManager $em
*/
public function setEntityManager(EntityManager $em = null)
{
$this->em = $em;
}
/**
* @param string $class
*
* @throws \InvalidArgumentException
*
* @return ArrayCollection
*/
public function create($class)
{
if (!isset($this->collections[$class])) {
throw new \InvalidArgumentException(sprintf('No collection handler exists for %s', $class));
}
return call_user_func($this->collections[$class]);
}
}
| Throw an exception when a collection is created missing a handler | Throw an exception when a collection is created missing a handler
| PHP | mit | GawainLynch/bolt,bolt/bolt,romulo1984/bolt,lenvanessen/bolt,electrolinux/bolt,electrolinux/bolt,GawainLynch/bolt,lenvanessen/bolt,lenvanessen/bolt,romulo1984/bolt,bolt/bolt,GawainLynch/bolt,lenvanessen/bolt,nikgo/bolt,electrolinux/bolt,romulo1984/bolt,romulo1984/bolt,GawainLynch/bolt,nikgo/bolt,nikgo/bolt,nikgo/bolt,electrolinux/bolt,bolt/bolt,bolt/bolt | php | ## Code Before:
<?php
namespace Bolt\Storage\Collection;
use Bolt\Storage\EntityManager;
/**
* Collection Manager class
*
* @author Ross Riley <riley.ross@gmail.com>
*/
class CollectionManager
{
public $collections;
public $em;
/**
* @param $entity
* @param $handler
*/
public function setHandler($entity, $handler)
{
$this->collections[$entity] = $handler;
}
/**
* Set an instance of EntityManager
*
* @param EntityManager $em
*/
public function setEntityManager(EntityManager $em = null)
{
$this->em = $em;
}
public function create($class)
{
if (isset($this->collections[$class])) {
return call_user_func($this->collections[$class]);
}
}
}
## Instruction:
Throw an exception when a collection is created missing a handler
## Code After:
<?php
namespace Bolt\Storage\Collection;
use Bolt\Storage\EntityManager;
use Doctrine\Common\Collections\ArrayCollection;
/**
* Collection Manager class
*
* @author Ross Riley <riley.ross@gmail.com>
*/
class CollectionManager
{
public $collections;
public $em;
/**
* @param $entity
* @param $handler
*/
public function setHandler($entity, $handler)
{
$this->collections[$entity] = $handler;
}
/**
* Set an instance of EntityManager
*
* @param EntityManager $em
*/
public function setEntityManager(EntityManager $em = null)
{
$this->em = $em;
}
/**
* @param string $class
*
* @throws \InvalidArgumentException
*
* @return ArrayCollection
*/
public function create($class)
{
if (!isset($this->collections[$class])) {
throw new \InvalidArgumentException(sprintf('No collection handler exists for %s', $class));
}
return call_user_func($this->collections[$class]);
}
}
| <?php
namespace Bolt\Storage\Collection;
use Bolt\Storage\EntityManager;
+ use Doctrine\Common\Collections\ArrayCollection;
/**
* Collection Manager class
*
* @author Ross Riley <riley.ross@gmail.com>
*/
class CollectionManager
{
public $collections;
public $em;
/**
* @param $entity
* @param $handler
*/
public function setHandler($entity, $handler)
{
$this->collections[$entity] = $handler;
}
/**
* Set an instance of EntityManager
*
* @param EntityManager $em
*/
public function setEntityManager(EntityManager $em = null)
{
$this->em = $em;
}
+ /**
+ * @param string $class
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return ArrayCollection
+ */
public function create($class)
{
- if (isset($this->collections[$class])) {
+ if (!isset($this->collections[$class])) {
? +
- return call_user_func($this->collections[$class]);
+ throw new \InvalidArgumentException(sprintf('No collection handler exists for %s', $class));
}
+
+ return call_user_func($this->collections[$class]);
}
} | 14 | 0.333333 | 12 | 2 |
37515217167b5ea53d6c15ef2727674d91f8fd65 | package.json | package.json | {
"name": "restbase-cassandra",
"description": "RESTBase table storage on Cassandra",
"version": "0.3.0",
"dependencies": {
"assert": "^1.1.1",
"async": "0.x.x",
"bluebird": "^2.3.10",
"cassandra-codec": "~0.0.2",
"cassandra-driver": "^1.0.2",
"connect-busboy": "git+https://github.com/gwicke/connect-busboy.git#master",
"extend": "^2.0.0",
"node-uuid": "git+https://github.com/gwicke/node-uuid.git#master",
"request": "2.x.x",
"restify": "2.x.x",
"routeswitch": "^0.5.2"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "x.x.x",
"mocha-jshint": "0.0.9"
}
}
| {
"name": "restbase-cassandra",
"description": "RESTBase table storage on Cassandra",
"version": "0.3.1",
"dependencies": {
"async": "0.x.x",
"bluebird": "~2.3.10",
"cassandra-codec": "~0.0.2",
"cassandra-driver": "~1.0.2",
"connect-busboy": "git+https://github.com/gwicke/connect-busboy.git#master",
"extend": "~2.0.0",
"node-uuid": "git+https://github.com/gwicke/node-uuid.git#master",
"request": "2.x.x",
"restify": "2.x.x",
"routeswitch": "~0.6.3"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "x.x.x",
"mocha-jshint": "0.0.9"
}
}
| Update dependencies & release v0.3.1 | Update dependencies & release v0.3.1
| JSON | apache-2.0 | gwicke/restbase-mod-table-cassandra,eevans/restbase-mod-table-cassandra | json | ## Code Before:
{
"name": "restbase-cassandra",
"description": "RESTBase table storage on Cassandra",
"version": "0.3.0",
"dependencies": {
"assert": "^1.1.1",
"async": "0.x.x",
"bluebird": "^2.3.10",
"cassandra-codec": "~0.0.2",
"cassandra-driver": "^1.0.2",
"connect-busboy": "git+https://github.com/gwicke/connect-busboy.git#master",
"extend": "^2.0.0",
"node-uuid": "git+https://github.com/gwicke/node-uuid.git#master",
"request": "2.x.x",
"restify": "2.x.x",
"routeswitch": "^0.5.2"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "x.x.x",
"mocha-jshint": "0.0.9"
}
}
## Instruction:
Update dependencies & release v0.3.1
## Code After:
{
"name": "restbase-cassandra",
"description": "RESTBase table storage on Cassandra",
"version": "0.3.1",
"dependencies": {
"async": "0.x.x",
"bluebird": "~2.3.10",
"cassandra-codec": "~0.0.2",
"cassandra-driver": "~1.0.2",
"connect-busboy": "git+https://github.com/gwicke/connect-busboy.git#master",
"extend": "~2.0.0",
"node-uuid": "git+https://github.com/gwicke/node-uuid.git#master",
"request": "2.x.x",
"restify": "2.x.x",
"routeswitch": "~0.6.3"
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "x.x.x",
"mocha-jshint": "0.0.9"
}
}
| {
"name": "restbase-cassandra",
"description": "RESTBase table storage on Cassandra",
- "version": "0.3.0",
? ^
+ "version": "0.3.1",
? ^
"dependencies": {
- "assert": "^1.1.1",
"async": "0.x.x",
- "bluebird": "^2.3.10",
? ^
+ "bluebird": "~2.3.10",
? ^
"cassandra-codec": "~0.0.2",
- "cassandra-driver": "^1.0.2",
? ^
+ "cassandra-driver": "~1.0.2",
? ^
"connect-busboy": "git+https://github.com/gwicke/connect-busboy.git#master",
- "extend": "^2.0.0",
? ^
+ "extend": "~2.0.0",
? ^
"node-uuid": "git+https://github.com/gwicke/node-uuid.git#master",
"request": "2.x.x",
"restify": "2.x.x",
- "routeswitch": "^0.5.2"
? ^ ^ ^
+ "routeswitch": "~0.6.3"
? ^ ^ ^
},
"scripts": {
"test": "mocha"
},
"devDependencies": {
"mocha": "x.x.x",
"mocha-jshint": "0.0.9"
}
} | 11 | 0.44 | 5 | 6 |
b43db0113a50f2999a6e93eaf8dbc1e6b89a60ff | Pod/Classes/BCBalancedMultilineLabel.h | Pod/Classes/BCBalancedMultilineLabel.h |
@interface BCBalancedMultilineLabel : UILabel
@end
|
/**
* A simple label subclass that draws itself such that each of its
* lines have as close to the same length as possible. It can be
* used anywhere that you could use an ordinary `UILabel` by simply
* changing the instantiated class.
*/
@interface BCBalancedMultilineLabel : UILabel
@end
| Add Appledoc to the header | Add Appledoc to the header | C | mit | briancroom/BCBalancedMultilineLabel | c | ## Code Before:
@interface BCBalancedMultilineLabel : UILabel
@end
## Instruction:
Add Appledoc to the header
## Code After:
/**
* A simple label subclass that draws itself such that each of its
* lines have as close to the same length as possible. It can be
* used anywhere that you could use an ordinary `UILabel` by simply
* changing the instantiated class.
*/
@interface BCBalancedMultilineLabel : UILabel
@end
|
+ /**
+ * A simple label subclass that draws itself such that each of its
+ * lines have as close to the same length as possible. It can be
+ * used anywhere that you could use an ordinary `UILabel` by simply
+ * changing the instantiated class.
+ */
@interface BCBalancedMultilineLabel : UILabel
@end | 6 | 1.5 | 6 | 0 |
ef2061dbaa70d414a87b67a28c97ceee7148cb6e | README.markdown | README.markdown |
Using the *lyframework* usable with a free license.
This repository/branch contain the admin part of the project.
|
Ruby Restful Mobile oriented framework.
- Concentrate on API
- Can create Web interface easily
## Docs
Documentation is to be done.
## Status
Orientation and satus of the current project to define.
| Change the Rubyzome welcome page. | Change the Rubyzome welcome page. | Markdown | mit | yogsototh/rubyzome_framework,yogsototh/rubyzome_framework,yogsototh/rubyzome_framework,yogsototh/rubyzome_framework | markdown | ## Code Before:
Using the *lyframework* usable with a free license.
This repository/branch contain the admin part of the project.
## Instruction:
Change the Rubyzome welcome page.
## Code After:
Ruby Restful Mobile oriented framework.
- Concentrate on API
- Can create Web interface easily
## Docs
Documentation is to be done.
## Status
Orientation and satus of the current project to define.
|
- Using the *lyframework* usable with a free license.
+ Ruby Restful Mobile oriented framework.
- This repository/branch contain the admin part of the project.
+ - Concentrate on API
+ - Can create Web interface easily
+
+
+ ## Docs
+
+ Documentation is to be done.
+
+ ## Status
+
+ Orientation and satus of the current project to define. | 14 | 3.5 | 12 | 2 |
6ceb7f20c2343585e9d7c08902b397520a4bc901 | .travis.yml | .travis.yml | language: java
jdk:
- oraclejdk7
script: "./gradlew :plugin:jpi :pl:bintrayUpload -PbinTrayKey=$BINTRAY_KEY -Pversion=0.1.$TRAVIS_BUILD_NUMBER
-x jar -x javadoc -x sourcesJar -x publishMavenJpiPublicationToMavenLocal"
env:
global:
secure: blEUjsU8dIot/C43rEeXdun9rQns+lR0qxzMG5cvWr7m3G95LFGOyhFzw9QBaTBFlGplteZAvV6OPo56uHx38J5uGv2DrOGqbX0UoxYY/fh8JytmpESmvGvL5EmPLtgx0V7Hu4+Ts0X1PzYLV69mD5dG7bg//P5fiLzHSSqfBCs=
| language: java
jdk:
- oraclejdk7
script: "./gradlew :plugin:jpi
after_success: if [ $TRAVIS_SECURE_ENV_VARS -eq true ]; then ./gradlew :pl:bintrayUpload -PbinTrayKey=$BINTRAY_KEY -Pversion=0.1.$TRAVIS_BUILD_NUMBER
-x jar -x javadoc -x sourcesJar -x publishMavenJpiPublicationToMavenLocal"; fi
env:
global:
secure: blEUjsU8dIot/C43rEeXdun9rQns+lR0qxzMG5cvWr7m3G95LFGOyhFzw9QBaTBFlGplteZAvV6OPo56uHx38J5uGv2DrOGqbX0UoxYY/fh8JytmpESmvGvL5EmPLtgx0V7Hu4+Ts0X1PzYLV69mD5dG7bg//P5fiLzHSSqfBCs=
| Make Bintray upload only for build from master | Make Bintray upload only for build from master | YAML | apache-2.0 | jenkinsci/deployment-sphere-plugin,rkovalenko/deployment-sphere-plugin,webdizz/deployment-sphere-plugin,jenkinsci/deployment-sphere-plugin,rkovalenko/deployment-sphere-plugin,jenkinsci/deployment-sphere-plugin,webdizz/deployment-sphere-plugin,webdizz/deployment-sphere-plugin | yaml | ## Code Before:
language: java
jdk:
- oraclejdk7
script: "./gradlew :plugin:jpi :pl:bintrayUpload -PbinTrayKey=$BINTRAY_KEY -Pversion=0.1.$TRAVIS_BUILD_NUMBER
-x jar -x javadoc -x sourcesJar -x publishMavenJpiPublicationToMavenLocal"
env:
global:
secure: blEUjsU8dIot/C43rEeXdun9rQns+lR0qxzMG5cvWr7m3G95LFGOyhFzw9QBaTBFlGplteZAvV6OPo56uHx38J5uGv2DrOGqbX0UoxYY/fh8JytmpESmvGvL5EmPLtgx0V7Hu4+Ts0X1PzYLV69mD5dG7bg//P5fiLzHSSqfBCs=
## Instruction:
Make Bintray upload only for build from master
## Code After:
language: java
jdk:
- oraclejdk7
script: "./gradlew :plugin:jpi
after_success: if [ $TRAVIS_SECURE_ENV_VARS -eq true ]; then ./gradlew :pl:bintrayUpload -PbinTrayKey=$BINTRAY_KEY -Pversion=0.1.$TRAVIS_BUILD_NUMBER
-x jar -x javadoc -x sourcesJar -x publishMavenJpiPublicationToMavenLocal"; fi
env:
global:
secure: blEUjsU8dIot/C43rEeXdun9rQns+lR0qxzMG5cvWr7m3G95LFGOyhFzw9QBaTBFlGplteZAvV6OPo56uHx38J5uGv2DrOGqbX0UoxYY/fh8JytmpESmvGvL5EmPLtgx0V7Hu4+Ts0X1PzYLV69mD5dG7bg//P5fiLzHSSqfBCs=
| language: java
jdk:
- oraclejdk7
- script: "./gradlew :plugin:jpi :pl:bintrayUpload -PbinTrayKey=$BINTRAY_KEY -Pversion=0.1.$TRAVIS_BUILD_NUMBER
+ script: "./gradlew :plugin:jpi
+ after_success: if [ $TRAVIS_SECURE_ENV_VARS -eq true ]; then ./gradlew :pl:bintrayUpload -PbinTrayKey=$BINTRAY_KEY -Pversion=0.1.$TRAVIS_BUILD_NUMBER
- -x jar -x javadoc -x sourcesJar -x publishMavenJpiPublicationToMavenLocal"
+ -x jar -x javadoc -x sourcesJar -x publishMavenJpiPublicationToMavenLocal"; fi
? +++++
env:
global:
secure: blEUjsU8dIot/C43rEeXdun9rQns+lR0qxzMG5cvWr7m3G95LFGOyhFzw9QBaTBFlGplteZAvV6OPo56uHx38J5uGv2DrOGqbX0UoxYY/fh8JytmpESmvGvL5EmPLtgx0V7Hu4+Ts0X1PzYLV69mD5dG7bg//P5fiLzHSSqfBCs= | 5 | 0.625 | 3 | 2 |
f10de1e4b4a497976d9e4169fa2c8850f351d8f5 | views/site/index.js | views/site/index.js | $(function(){
$('.imgTile').click(function(){
window.location.href = $(this).data('url');
})
});
function initialize() {
var mapOptions = {
center: { lat: 32.7688, lng: -85.5285},
zoom: 6,
disableDefaultUI:true
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize); | $(function(){
$('.imgTile').click(function(){
window.location.href = $(this).data('url');
})
});
var map = {
map: null,
mapOptions: null,
init: function() {
this.initOptions();
this.map = new google.maps.Map(document.getElementById('map-canvas'), this.mapOptions);
this.initEvents();
},
initOptions: function() {
this.mapOptions = {
center: { lat: 32.7688, lng: -85.5285},
zoom: 6,
disableDefaultUI:true,
scrollwheel: false
};
},
initEvents: function() {
google.maps.event.addListener(this.map, 'click', this.onClick);
google.maps.event.addListener(this.map, 'mouseout', this.onMouseout);
},
onClick: function(e) {
//this.mapOptions.scrollwheel = true;
this.setOptions({scrollwheel: true});
},
onMouseout: function(e) {
this.setOptions({scrollwheel: false});
}
}
google.maps.event.addDomListener(window, 'load', map.init()); | Disable map scrolling until user click on the map. | Disable map scrolling until user click on the map.
| JavaScript | bsd-3-clause | wangchj/bfre,wangchj/bfre,wangchj/bfre | javascript | ## Code Before:
$(function(){
$('.imgTile').click(function(){
window.location.href = $(this).data('url');
})
});
function initialize() {
var mapOptions = {
center: { lat: 32.7688, lng: -85.5285},
zoom: 6,
disableDefaultUI:true
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
## Instruction:
Disable map scrolling until user click on the map.
## Code After:
$(function(){
$('.imgTile').click(function(){
window.location.href = $(this).data('url');
})
});
var map = {
map: null,
mapOptions: null,
init: function() {
this.initOptions();
this.map = new google.maps.Map(document.getElementById('map-canvas'), this.mapOptions);
this.initEvents();
},
initOptions: function() {
this.mapOptions = {
center: { lat: 32.7688, lng: -85.5285},
zoom: 6,
disableDefaultUI:true,
scrollwheel: false
};
},
initEvents: function() {
google.maps.event.addListener(this.map, 'click', this.onClick);
google.maps.event.addListener(this.map, 'mouseout', this.onMouseout);
},
onClick: function(e) {
//this.mapOptions.scrollwheel = true;
this.setOptions({scrollwheel: true});
},
onMouseout: function(e) {
this.setOptions({scrollwheel: false});
}
}
google.maps.event.addDomListener(window, 'load', map.init()); | $(function(){
$('.imgTile').click(function(){
window.location.href = $(this).data('url');
})
});
- function initialize() {
+ var map = {
+ map: null,
+ mapOptions: null,
+ init: function() {
+ this.initOptions();
+ this.map = new google.maps.Map(document.getElementById('map-canvas'), this.mapOptions);
+ this.initEvents();
+ },
+ initOptions: function() {
- var mapOptions = {
? ---
+ this.mapOptions = {
? ++++++++
- center: { lat: 32.7688, lng: -85.5285},
+ center: { lat: 32.7688, lng: -85.5285},
? ++++
- zoom: 6,
+ zoom: 6,
? ++++
- disableDefaultUI:true
+ disableDefaultUI:true,
? ++++ +
+ scrollwheel: false
+ };
- };
? ^
+ },
? ^
+ initEvents: function() {
+ google.maps.event.addListener(this.map, 'click', this.onClick);
+ google.maps.event.addListener(this.map, 'mouseout', this.onMouseout);
+ },
+ onClick: function(e) {
+ //this.mapOptions.scrollwheel = true;
+ this.setOptions({scrollwheel: true});
- var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
+ },
+ onMouseout: function(e) {
+ this.setOptions({scrollwheel: false});
+ }
}
- google.maps.event.addDomListener(window, 'load', initialize);
? ^^^^^^
+ google.maps.event.addDomListener(window, 'load', map.init());
? ++++ ^^
| 36 | 2.117647 | 28 | 8 |
6b6b7352010a06121d4e1d4e7174052642028112 | src/Euskadi31/Bundle/RedisBundle/Redis/NativeRedisSessionHandler.php | src/Euskadi31/Bundle/RedisBundle/Redis/NativeRedisSessionHandler.php | <?php
/*
* This file is part of the RedisBundle package.
*
* (c) Axel Etcheverry <axel@etcheverry.biz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Euskadi31\Bundle\RedisBundle\Redis;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Redis;
/**
* NativeRedisSessionStorage.
*
* Driver for the redis session save handler provided by the redis PHP extension.
*
* @see https://github.com/nicolasff/phpredis
*
* @author Axel Etcheverry <axel@etcheverry.biz>
*/
class NativeRedisSessionHandler extends NativeSessionHandler
{
/**
* Constructor.
*
* @param Redis $redis
*/
public function __construct(Redis $redis)
{
ini_set('session.save_handler', 'redis');
ini_set(
'session.save_path',
sprintf('tcp://%s:%d?persistent=0', $redis->getHost(), $redis->getPort())
);
}
}
| <?php
/*
* This file is part of the RedisBundle package.
*
* (c) Axel Etcheverry <axel@etcheverry.biz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Euskadi31\Bundle\RedisBundle\Redis;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Redis;
/**
* NativeRedisSessionStorage.
*
* Driver for the redis session save handler provided by the redis PHP extension.
*
* @see https://github.com/nicolasff/phpredis
*
* @author Axel Etcheverry <axel@etcheverry.biz>
*/
class NativeRedisSessionHandler extends NativeSessionHandler
{
/**
* Constructor.
*
* @param Redis $redis
*/
public function __construct(Redis $redis)
{
ini_set('session.save_handler', 'redis');
if($redis->getAuth() === null) {
ini_set(
'session.save_path',
sprintf('tcp://%s:%d?persistent=0', $redis->getHost(), $redis->getPort())
);
} else {
ini_set(
'session.save_path',
sprintf('tcp://%s:%d?persistent=0&auth=%s', $redis->getHost(), $redis->getPort(), urlencode($redis->getAuth()))
);
}
}
}
| Fix problem Auth when password was requested | Fix problem Auth when password was requested
English and French following:
A RedisException was thrown when redis was configured with a password
Adding a test to verify that the connexion use a password or not
Adding a parameters for auth in TCP
French:
Une RedisException était déclenchée lorsqu'on tentait d'utiliser un redis configurer avec un mot de passe
Ajout d'un test pour vérifier si Redis est configurer avec un mot de passe
Ajout d'un paramètre auth sur la requête TCP pour les redis avec mot de passe | PHP | mit | euskadi31/RedisBundle | php | ## Code Before:
<?php
/*
* This file is part of the RedisBundle package.
*
* (c) Axel Etcheverry <axel@etcheverry.biz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Euskadi31\Bundle\RedisBundle\Redis;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Redis;
/**
* NativeRedisSessionStorage.
*
* Driver for the redis session save handler provided by the redis PHP extension.
*
* @see https://github.com/nicolasff/phpredis
*
* @author Axel Etcheverry <axel@etcheverry.biz>
*/
class NativeRedisSessionHandler extends NativeSessionHandler
{
/**
* Constructor.
*
* @param Redis $redis
*/
public function __construct(Redis $redis)
{
ini_set('session.save_handler', 'redis');
ini_set(
'session.save_path',
sprintf('tcp://%s:%d?persistent=0', $redis->getHost(), $redis->getPort())
);
}
}
## Instruction:
Fix problem Auth when password was requested
English and French following:
A RedisException was thrown when redis was configured with a password
Adding a test to verify that the connexion use a password or not
Adding a parameters for auth in TCP
French:
Une RedisException était déclenchée lorsqu'on tentait d'utiliser un redis configurer avec un mot de passe
Ajout d'un test pour vérifier si Redis est configurer avec un mot de passe
Ajout d'un paramètre auth sur la requête TCP pour les redis avec mot de passe
## Code After:
<?php
/*
* This file is part of the RedisBundle package.
*
* (c) Axel Etcheverry <axel@etcheverry.biz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Euskadi31\Bundle\RedisBundle\Redis;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Redis;
/**
* NativeRedisSessionStorage.
*
* Driver for the redis session save handler provided by the redis PHP extension.
*
* @see https://github.com/nicolasff/phpredis
*
* @author Axel Etcheverry <axel@etcheverry.biz>
*/
class NativeRedisSessionHandler extends NativeSessionHandler
{
/**
* Constructor.
*
* @param Redis $redis
*/
public function __construct(Redis $redis)
{
ini_set('session.save_handler', 'redis');
if($redis->getAuth() === null) {
ini_set(
'session.save_path',
sprintf('tcp://%s:%d?persistent=0', $redis->getHost(), $redis->getPort())
);
} else {
ini_set(
'session.save_path',
sprintf('tcp://%s:%d?persistent=0&auth=%s', $redis->getHost(), $redis->getPort(), urlencode($redis->getAuth()))
);
}
}
}
| <?php
/*
* This file is part of the RedisBundle package.
*
* (c) Axel Etcheverry <axel@etcheverry.biz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Euskadi31\Bundle\RedisBundle\Redis;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Redis;
/**
* NativeRedisSessionStorage.
*
* Driver for the redis session save handler provided by the redis PHP extension.
*
* @see https://github.com/nicolasff/phpredis
*
* @author Axel Etcheverry <axel@etcheverry.biz>
*/
class NativeRedisSessionHandler extends NativeSessionHandler
{
/**
* Constructor.
*
* @param Redis $redis
*/
public function __construct(Redis $redis)
{
ini_set('session.save_handler', 'redis');
+ if($redis->getAuth() === null) {
- ini_set(
+ ini_set(
? ++++
- 'session.save_path',
+ 'session.save_path',
? ++++
- sprintf('tcp://%s:%d?persistent=0', $redis->getHost(), $redis->getPort())
+ sprintf('tcp://%s:%d?persistent=0', $redis->getHost(), $redis->getPort())
? ++++
+ );
+ } else {
+ ini_set(
+ 'session.save_path',
+ sprintf('tcp://%s:%d?persistent=0&auth=%s', $redis->getHost(), $redis->getPort(), urlencode($redis->getAuth()))
+ );
- );
? ^^
+ }
? ^
}
} | 15 | 0.375 | 11 | 4 |
9a58e0ceeceb434bb3fe22dafa7adedd57652d95 | selendroid-server/src/main/java/io/selendroid/server/util/Intents.java | selendroid-server/src/main/java/io/selendroid/server/util/Intents.java | package io.selendroid.server.util;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
/**
* A helper class for working with intents
*/
public class Intents {
/**
* Create an intent to start an activity, for both ServerInstrumentation and LightweightInstrumentation
*/
public static Intent createStartActivityIntent(Context context, String mainActivityName) {
Intent intent = new Intent();
intent.setClassName(context, mainActivityName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
return intent;
}
/**
* Create an implicit intent based on the given URI.
*/
public static Intent createUriIntent(String intentUri) {
return new Intent(Intent.ACTION_VIEW, Uri.parse(intentUri));
}
}
| package io.selendroid.server.util;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
/**
* A helper class for working with intents
*/
public class Intents {
/**
* Create an intent to start an activity, for both ServerInstrumentation and LightweightInstrumentation
*/
public static Intent createStartActivityIntent(Context context, String mainActivityName) {
Intent intent = new Intent();
intent.setClassName(context, mainActivityName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
return intent;
}
/**
* Create an implicit intent based on the given URI.
*/
public static Intent createUriIntent(String intentUri) {
return new Intent(Intent.ACTION_VIEW, Uri.parse(intentUri))
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
}
}
| Add flags to the intent so it is launched correctly. | Add flags to the intent so it is launched correctly.
| Java | apache-2.0 | selendroid/selendroid,koichirok/selendroid,koichirok/selendroid,selendroid/selendroid,koichirok/selendroid,koichirok/selendroid,selendroid/selendroid,selendroid/selendroid,selendroid/selendroid,koichirok/selendroid | java | ## Code Before:
package io.selendroid.server.util;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
/**
* A helper class for working with intents
*/
public class Intents {
/**
* Create an intent to start an activity, for both ServerInstrumentation and LightweightInstrumentation
*/
public static Intent createStartActivityIntent(Context context, String mainActivityName) {
Intent intent = new Intent();
intent.setClassName(context, mainActivityName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
return intent;
}
/**
* Create an implicit intent based on the given URI.
*/
public static Intent createUriIntent(String intentUri) {
return new Intent(Intent.ACTION_VIEW, Uri.parse(intentUri));
}
}
## Instruction:
Add flags to the intent so it is launched correctly.
## Code After:
package io.selendroid.server.util;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
/**
* A helper class for working with intents
*/
public class Intents {
/**
* Create an intent to start an activity, for both ServerInstrumentation and LightweightInstrumentation
*/
public static Intent createStartActivityIntent(Context context, String mainActivityName) {
Intent intent = new Intent();
intent.setClassName(context, mainActivityName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
return intent;
}
/**
* Create an implicit intent based on the given URI.
*/
public static Intent createUriIntent(String intentUri) {
return new Intent(Intent.ACTION_VIEW, Uri.parse(intentUri))
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
}
}
| package io.selendroid.server.util;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
/**
* A helper class for working with intents
*/
public class Intents {
/**
* Create an intent to start an activity, for both ServerInstrumentation and LightweightInstrumentation
*/
public static Intent createStartActivityIntent(Context context, String mainActivityName) {
Intent intent = new Intent();
intent.setClassName(context, mainActivityName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
| Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
return intent;
}
/**
* Create an implicit intent based on the given URI.
*/
public static Intent createUriIntent(String intentUri) {
- return new Intent(Intent.ACTION_VIEW, Uri.parse(intentUri));
? -
+ return new Intent(Intent.ACTION_VIEW, Uri.parse(intentUri))
+ .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
}
} | 4 | 0.133333 | 3 | 1 |
434b3e94f461c995a5e2f421acca29897495f0a8 | setup.py | setup.py | from distutils.core import setup
setup(
name = 'respite',
version = '0.6.1',
description = "Respite conforms Django to Representational State Transfer (REST)",
author = "Johannes Gorset",
author_email = "jgorset@gmail.com",
url = "http://github.com/jgorset/respite",
packages = ['respite']
)
| from distutils.core import setup
setup(
name = 'respite',
version = '0.6.1',
description = "Respite conforms Django to Representational State Transfer (REST)",
author = "Johannes Gorset",
author_email = "jgorset@gmail.com",
url = "http://github.com/jgorset/respite",
packages = ['respite', 'respite.lib', 'respite.serializers']
)
| Add 'lib' and 'serializers' to packages | Add 'lib' and 'serializers' to packages
| Python | mit | jgorset/django-respite,jgorset/django-respite,jgorset/django-respite | python | ## Code Before:
from distutils.core import setup
setup(
name = 'respite',
version = '0.6.1',
description = "Respite conforms Django to Representational State Transfer (REST)",
author = "Johannes Gorset",
author_email = "jgorset@gmail.com",
url = "http://github.com/jgorset/respite",
packages = ['respite']
)
## Instruction:
Add 'lib' and 'serializers' to packages
## Code After:
from distutils.core import setup
setup(
name = 'respite',
version = '0.6.1',
description = "Respite conforms Django to Representational State Transfer (REST)",
author = "Johannes Gorset",
author_email = "jgorset@gmail.com",
url = "http://github.com/jgorset/respite",
packages = ['respite', 'respite.lib', 'respite.serializers']
)
| from distutils.core import setup
setup(
name = 'respite',
version = '0.6.1',
description = "Respite conforms Django to Representational State Transfer (REST)",
author = "Johannes Gorset",
author_email = "jgorset@gmail.com",
url = "http://github.com/jgorset/respite",
- packages = ['respite']
+ packages = ['respite', 'respite.lib', 'respite.serializers']
) | 2 | 0.181818 | 1 | 1 |
88b8134f540c33e619c27ef5580dc1e66b7cb02b | quay-enterprise/generate-signing-keys.sh | quay-enterprise/generate-signing-keys.sh | set -e
if [ $# -lt 1 ]; then
echo 1>&2 "$0: missing target directory"
exit 2
fi
echo 'Generating initial keys'
gpg2 --batch --gen-key aci-signing-key-batch.txt
echo 'Generating public signing key'
gpg2 --no-default-keyring --armor \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--output $1/signing-public.gpg \
--export "<support@quay.io>"
echo 'Determining private key'
PRIVATE_KEY=`gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--list-keys | tail -n 3 | head -n 1 | cut -c 13-20`
echo 'Exporting private signing key'
echo "Private key name: $PRIVATE_KEY"
gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub --export-secret-key > $1/signing-private.gpg
echo 'Cleaning up'
rm signing.sec
rm signing.pub
echo "Emitted $1/signing-private.gpg and $1/signing-public.gpg" | set -e
if [ $# -lt 1 ]; then
echo 1>&2 "$0: missing target directory"
exit 2
fi
echo 'Generating initial keys'
gpg2 --batch --gen-key aci-signing-key-batch.txt
EMAIL=`awk '{if($1=="Name-Email:") print $2}' aci-signing-key-batch.txt`
echo 'Generating public signing key'
gpg2 --no-default-keyring --armor \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--output $1/signing-public.gpg \
--export
echo 'Determining private key'
PRIVATE_KEY=`gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--list-keys | tail -n 3 | head -n 1 | cut -c 13-20`
echo 'Exporting private signing key'
echo "Private key name: $PRIVATE_KEY"
gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub --export-secret-key > $1/signing-private.gpg
echo 'Cleaning up'
rm signing.sec
rm signing.pub
echo "Emitted $1/signing-private.gpg and $1/signing-public.gpg"
| Fix email in key generation | Fix email in key generation
The email used in generating a public signing key should be pulled from aci-signing-key-batch.txt
Changed to pull from the second entry of the row with a first entry of "Name-Email:" in aci-signing-key-batch.txt. | Shell | apache-2.0 | atxwebs/docs,joshix/docs,jonboulle/docs,endocode/coreos-docs,coreos/docs | shell | ## Code Before:
set -e
if [ $# -lt 1 ]; then
echo 1>&2 "$0: missing target directory"
exit 2
fi
echo 'Generating initial keys'
gpg2 --batch --gen-key aci-signing-key-batch.txt
echo 'Generating public signing key'
gpg2 --no-default-keyring --armor \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--output $1/signing-public.gpg \
--export "<support@quay.io>"
echo 'Determining private key'
PRIVATE_KEY=`gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--list-keys | tail -n 3 | head -n 1 | cut -c 13-20`
echo 'Exporting private signing key'
echo "Private key name: $PRIVATE_KEY"
gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub --export-secret-key > $1/signing-private.gpg
echo 'Cleaning up'
rm signing.sec
rm signing.pub
echo "Emitted $1/signing-private.gpg and $1/signing-public.gpg"
## Instruction:
Fix email in key generation
The email used in generating a public signing key should be pulled from aci-signing-key-batch.txt
Changed to pull from the second entry of the row with a first entry of "Name-Email:" in aci-signing-key-batch.txt.
## Code After:
set -e
if [ $# -lt 1 ]; then
echo 1>&2 "$0: missing target directory"
exit 2
fi
echo 'Generating initial keys'
gpg2 --batch --gen-key aci-signing-key-batch.txt
EMAIL=`awk '{if($1=="Name-Email:") print $2}' aci-signing-key-batch.txt`
echo 'Generating public signing key'
gpg2 --no-default-keyring --armor \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--output $1/signing-public.gpg \
--export
echo 'Determining private key'
PRIVATE_KEY=`gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--list-keys | tail -n 3 | head -n 1 | cut -c 13-20`
echo 'Exporting private signing key'
echo "Private key name: $PRIVATE_KEY"
gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub --export-secret-key > $1/signing-private.gpg
echo 'Cleaning up'
rm signing.sec
rm signing.pub
echo "Emitted $1/signing-private.gpg and $1/signing-public.gpg"
| set -e
if [ $# -lt 1 ]; then
echo 1>&2 "$0: missing target directory"
exit 2
fi
echo 'Generating initial keys'
gpg2 --batch --gen-key aci-signing-key-batch.txt
+ EMAIL=`awk '{if($1=="Name-Email:") print $2}' aci-signing-key-batch.txt`
+
echo 'Generating public signing key'
gpg2 --no-default-keyring --armor \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--output $1/signing-public.gpg \
- --export "<support@quay.io>"
+ --export
echo 'Determining private key'
PRIVATE_KEY=`gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub \
--list-keys | tail -n 3 | head -n 1 | cut -c 13-20`
echo 'Exporting private signing key'
echo "Private key name: $PRIVATE_KEY"
gpg2 --no-default-keyring \
--secret-keyring ./signing.sec --keyring ./signing.pub --export-secret-key > $1/signing-private.gpg
echo 'Cleaning up'
rm signing.sec
rm signing.pub
echo "Emitted $1/signing-private.gpg and $1/signing-public.gpg" | 4 | 0.129032 | 3 | 1 |
df18229b38a01d87076f3b13aee5bfd1f0f989c2 | tunobase/blog/models.py | tunobase/blog/models.py | '''
Blog App
This module determines how to display the Blog app in Django's admin
and lists other model functions.
'''
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from tunobase.core import models as core_models
class Blog(core_models.ContentModel):
'''
Blogs the Site has
'''
class BlogEntry(core_models.ContentModel):
'''
Entries per Blog
'''
blog = models.ForeignKey(Blog, related_name='entries')
author_users = models.ManyToManyField(
settings.AUTH_USER_MODEL,
related_name='blog_entries_authored',
null=True,
blank=True
)
authors_alternate = models.CharField(
max_length=512,
blank=True,
null=True
)
class Meta:
verbose_name_plural = 'Blog entries'
def get_absolute_url(self):
return reverse('blog_entry_detail', args=(self.slug,))
@property
def authors(self):
'''
Return a list of authors selected as users on the system and a list
of alternate authors as not users on the system if either exist
'''
authors_dict = {}
auth_users = self.author_users.all()
if auth_users:
authors_dict.update({
'users': auth_users
})
if self.authors_alternate:
authors_dict.update({
'alternate': self.authors_alternate.split(',')
})
return authors_dict
| '''
Blog App
This module determines how to display the Blog app in Django's admin
and lists other model functions.
'''
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from tunobase.core import models as core_models
class Blog(core_models.ContentModel):
'''
Blogs the Site has
'''
class Meta:
verbose_name = 'Blog Category'
verbose_name_plural = 'Blog Categories'
class BlogEntry(core_models.ContentModel):
'''
Entries per Blog
'''
blog = models.ForeignKey(Blog, related_name='entries')
author_users = models.ManyToManyField(
settings.AUTH_USER_MODEL,
related_name='blog_entries_authored',
null=True,
blank=True
)
authors_alternate = models.CharField(
max_length=512,
blank=True,
null=True
)
class Meta:
verbose_name_plural = 'Blog entries'
def get_absolute_url(self):
return reverse('blog_entry_detail', args=(self.slug,))
@property
def authors(self):
'''
Return a list of authors selected as users on the system and a list
of alternate authors as not users on the system if either exist
'''
authors_dict = {}
auth_users = self.author_users.all()
if auth_users:
authors_dict.update({
'users': auth_users
})
if self.authors_alternate:
authors_dict.update({
'alternate': self.authors_alternate.split(',')
})
return authors_dict
| Update blog model with a more descriptive name | Update blog model with a more descriptive name
| Python | bsd-3-clause | unomena/tunobase,unomena/tunobase | python | ## Code Before:
'''
Blog App
This module determines how to display the Blog app in Django's admin
and lists other model functions.
'''
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from tunobase.core import models as core_models
class Blog(core_models.ContentModel):
'''
Blogs the Site has
'''
class BlogEntry(core_models.ContentModel):
'''
Entries per Blog
'''
blog = models.ForeignKey(Blog, related_name='entries')
author_users = models.ManyToManyField(
settings.AUTH_USER_MODEL,
related_name='blog_entries_authored',
null=True,
blank=True
)
authors_alternate = models.CharField(
max_length=512,
blank=True,
null=True
)
class Meta:
verbose_name_plural = 'Blog entries'
def get_absolute_url(self):
return reverse('blog_entry_detail', args=(self.slug,))
@property
def authors(self):
'''
Return a list of authors selected as users on the system and a list
of alternate authors as not users on the system if either exist
'''
authors_dict = {}
auth_users = self.author_users.all()
if auth_users:
authors_dict.update({
'users': auth_users
})
if self.authors_alternate:
authors_dict.update({
'alternate': self.authors_alternate.split(',')
})
return authors_dict
## Instruction:
Update blog model with a more descriptive name
## Code After:
'''
Blog App
This module determines how to display the Blog app in Django's admin
and lists other model functions.
'''
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from tunobase.core import models as core_models
class Blog(core_models.ContentModel):
'''
Blogs the Site has
'''
class Meta:
verbose_name = 'Blog Category'
verbose_name_plural = 'Blog Categories'
class BlogEntry(core_models.ContentModel):
'''
Entries per Blog
'''
blog = models.ForeignKey(Blog, related_name='entries')
author_users = models.ManyToManyField(
settings.AUTH_USER_MODEL,
related_name='blog_entries_authored',
null=True,
blank=True
)
authors_alternate = models.CharField(
max_length=512,
blank=True,
null=True
)
class Meta:
verbose_name_plural = 'Blog entries'
def get_absolute_url(self):
return reverse('blog_entry_detail', args=(self.slug,))
@property
def authors(self):
'''
Return a list of authors selected as users on the system and a list
of alternate authors as not users on the system if either exist
'''
authors_dict = {}
auth_users = self.author_users.all()
if auth_users:
authors_dict.update({
'users': auth_users
})
if self.authors_alternate:
authors_dict.update({
'alternate': self.authors_alternate.split(',')
})
return authors_dict
| '''
Blog App
This module determines how to display the Blog app in Django's admin
and lists other model functions.
'''
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from tunobase.core import models as core_models
class Blog(core_models.ContentModel):
'''
Blogs the Site has
'''
+
+ class Meta:
+ verbose_name = 'Blog Category'
+ verbose_name_plural = 'Blog Categories'
class BlogEntry(core_models.ContentModel):
'''
Entries per Blog
'''
blog = models.ForeignKey(Blog, related_name='entries')
author_users = models.ManyToManyField(
settings.AUTH_USER_MODEL,
related_name='blog_entries_authored',
null=True,
blank=True
)
authors_alternate = models.CharField(
max_length=512,
blank=True,
null=True
)
class Meta:
verbose_name_plural = 'Blog entries'
def get_absolute_url(self):
return reverse('blog_entry_detail', args=(self.slug,))
@property
def authors(self):
'''
Return a list of authors selected as users on the system and a list
of alternate authors as not users on the system if either exist
'''
authors_dict = {}
auth_users = self.author_users.all()
if auth_users:
authors_dict.update({
'users': auth_users
})
if self.authors_alternate:
authors_dict.update({
'alternate': self.authors_alternate.split(',')
})
return authors_dict | 4 | 0.063492 | 4 | 0 |
4878a9464b5672a55405bd20acda6412c94d0af4 | install.sh | install.sh |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
if [ -f "~/.bashrc" ]; then
mv -i -v ~/.bashrc ~/.bashrc.orig
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
else
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
fi
if [ -f "~/.vimrc" ];
then
mv -i -v ~/.vimrc ~/.vimrc.orig
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
else
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
fi
if [ -f "~/.profile" ]; then
mv -i -v ~/.profile ~/.profile.orig
cp -i -v profile ~/.profile
fi
if [ -f "~/.gitconfig" ];
then
mv -i -v ~/.gitconfig ~/.gitconfig.orig
cp -i -v gitconfig ~/.gitconfig
else
cp -i -v gitconfig ~/.gitconfig
fi
if [ -f "~/.gitignore_global" ]; then
mv -i -v ~/.gitignore_global ~/.gitignore_global.orig
cp -i -v gitignore_global ~/.gitignore_global
else
cp -i -v gitignore_global ~/.gitignore_global
fi
vim +PluginInstall +qall
|
sudo apt-get install vim
yum install vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
if [ -f "$HOME/.bashrc" ]; then
mv -i -v ~/.bashrc ~/.bashrc.orig
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
else
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
fi
if [ -f "$HOME/.vimrc" ];
then
mv -i -v ~/.vimrc ~/.vimrc.orig
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
else
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
fi
if [ -f "$HOME/.profile" ]; then
mv -i -v ~/.profile ~/.profile.orig
cp -i -v profile ~/.profile
fi
if [ -f "$HOME/.gitconfig" ];
then
mv -i -v ~/.gitconfig ~/.gitconfig.orig
cp -i -v gitconfig ~/.gitconfig
else
cp -i -v gitconfig ~/.gitconfig
fi
if [ -f "$HOME/.gitignore_global" ]; then
mv -i -v ~/.gitignore_global ~/.gitignore_global.orig
cp -i -v gitignore_global ~/.gitignore_global
else
cp -i -v gitignore_global ~/.gitignore_global
fi
vim +PluginInstall +qall
| Fix to recognize home directory | Fix to recognize home directory
| Shell | apache-2.0 | wjw0926/dotfiles | shell | ## Code Before:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
if [ -f "~/.bashrc" ]; then
mv -i -v ~/.bashrc ~/.bashrc.orig
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
else
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
fi
if [ -f "~/.vimrc" ];
then
mv -i -v ~/.vimrc ~/.vimrc.orig
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
else
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
fi
if [ -f "~/.profile" ]; then
mv -i -v ~/.profile ~/.profile.orig
cp -i -v profile ~/.profile
fi
if [ -f "~/.gitconfig" ];
then
mv -i -v ~/.gitconfig ~/.gitconfig.orig
cp -i -v gitconfig ~/.gitconfig
else
cp -i -v gitconfig ~/.gitconfig
fi
if [ -f "~/.gitignore_global" ]; then
mv -i -v ~/.gitignore_global ~/.gitignore_global.orig
cp -i -v gitignore_global ~/.gitignore_global
else
cp -i -v gitignore_global ~/.gitignore_global
fi
vim +PluginInstall +qall
## Instruction:
Fix to recognize home directory
## Code After:
sudo apt-get install vim
yum install vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
if [ -f "$HOME/.bashrc" ]; then
mv -i -v ~/.bashrc ~/.bashrc.orig
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
else
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
fi
if [ -f "$HOME/.vimrc" ];
then
mv -i -v ~/.vimrc ~/.vimrc.orig
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
else
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
fi
if [ -f "$HOME/.profile" ]; then
mv -i -v ~/.profile ~/.profile.orig
cp -i -v profile ~/.profile
fi
if [ -f "$HOME/.gitconfig" ];
then
mv -i -v ~/.gitconfig ~/.gitconfig.orig
cp -i -v gitconfig ~/.gitconfig
else
cp -i -v gitconfig ~/.gitconfig
fi
if [ -f "$HOME/.gitignore_global" ]; then
mv -i -v ~/.gitignore_global ~/.gitignore_global.orig
cp -i -v gitignore_global ~/.gitignore_global
else
cp -i -v gitignore_global ~/.gitignore_global
fi
vim +PluginInstall +qall
| +
+ sudo apt-get install vim
+ yum install vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- if [ -f "~/.bashrc" ]; then
? ^
+ if [ -f "$HOME/.bashrc" ]; then
? ^^^^^
mv -i -v ~/.bashrc ~/.bashrc.orig
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
else
cp -i -v bashrc ~/.bashrc
source ~/.bashrc
fi
- if [ -f "~/.vimrc" ];
? ^
+ if [ -f "$HOME/.vimrc" ];
? ^^^^^
then
mv -i -v ~/.vimrc ~/.vimrc.orig
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
else
cp -i -v vimrc ~/.vimrc
source ~/.vimrc
fi
- if [ -f "~/.profile" ]; then
? ^
+ if [ -f "$HOME/.profile" ]; then
? ^^^^^
mv -i -v ~/.profile ~/.profile.orig
cp -i -v profile ~/.profile
fi
- if [ -f "~/.gitconfig" ];
? ^
+ if [ -f "$HOME/.gitconfig" ];
? ^^^^^
then
mv -i -v ~/.gitconfig ~/.gitconfig.orig
cp -i -v gitconfig ~/.gitconfig
else
cp -i -v gitconfig ~/.gitconfig
fi
- if [ -f "~/.gitignore_global" ]; then
? ^
+ if [ -f "$HOME/.gitignore_global" ]; then
? ^^^^^
mv -i -v ~/.gitignore_global ~/.gitignore_global.orig
cp -i -v gitignore_global ~/.gitignore_global
else
cp -i -v gitignore_global ~/.gitignore_global
fi
vim +PluginInstall +qall | 13 | 0.302326 | 8 | 5 |
89be710282fd664209f590668f7b9b179182eb4c | mysql/run.sh | mysql/run.sh | docker run -d --net=host -p 3306:3006 -v /var/host_lib/mysql:/var/lib/mysql -t hnakamur/mysql
| docker run -d --net=host --name mysql -p 3306:3006 -v /var/host_lib/mysql:/var/lib/mysql -t hnakamur/mysql
| Set name for mysql container | Set name for mysql container
| Shell | mit | hnakamur/vagrant-docker-rails-development-example,hnakamur/vagrant-docker-rails-development-example,hnakamur/vagrant-docker-rails-development-example | shell | ## Code Before:
docker run -d --net=host -p 3306:3006 -v /var/host_lib/mysql:/var/lib/mysql -t hnakamur/mysql
## Instruction:
Set name for mysql container
## Code After:
docker run -d --net=host --name mysql -p 3306:3006 -v /var/host_lib/mysql:/var/lib/mysql -t hnakamur/mysql
| - docker run -d --net=host -p 3306:3006 -v /var/host_lib/mysql:/var/lib/mysql -t hnakamur/mysql
+ docker run -d --net=host --name mysql -p 3306:3006 -v /var/host_lib/mysql:/var/lib/mysql -t hnakamur/mysql
? +++++++++++++
| 2 | 2 | 1 | 1 |
eb6b3027e61b9f62e161506f8a8b7d0efaad29c6 | requirements.txt | requirements.txt | pbr>=0.6,!=0.7,<1.0
cliff>=1.6.0
python-glanceclient>=0.13.1
python-keystoneclient>=0.9.0
python-novaclient>=2.17.0
python-cinderclient>=1.0.7
python-neutronclient>=2.3.5,<3
requests>=1.1
six>=1.7.0
| cliff>=1.6.0
oslo.i18n>=0.2.0 # Apache-2.0
pbr>=0.6,!=0.7,<1.0
python-glanceclient>=0.13.1
python-keystoneclient>=0.9.0
python-novaclient>=2.17.0
python-cinderclient>=1.0.7
python-neutronclient>=2.3.5,<3
requests>=1.1
six>=1.7.0
| Add oslo.i18n as a dependency | Add oslo.i18n as a dependency
Add i18n in requirements.txt
implements bp add_i18n
Change-Id: I84ecd16696593414739c52ee344b8a1c9868941a
| Text | apache-2.0 | dtroyer/python-openstackclient,openstack/python-openstackclient,redhat-openstack/python-openstackclient,BjoernT/python-openstackclient,dtroyer/python-openstackclient,redhat-openstack/python-openstackclient,varunarya10/python-openstackclient,BjoernT/python-openstackclient,varunarya10/python-openstackclient,openstack/python-openstackclient | text | ## Code Before:
pbr>=0.6,!=0.7,<1.0
cliff>=1.6.0
python-glanceclient>=0.13.1
python-keystoneclient>=0.9.0
python-novaclient>=2.17.0
python-cinderclient>=1.0.7
python-neutronclient>=2.3.5,<3
requests>=1.1
six>=1.7.0
## Instruction:
Add oslo.i18n as a dependency
Add i18n in requirements.txt
implements bp add_i18n
Change-Id: I84ecd16696593414739c52ee344b8a1c9868941a
## Code After:
cliff>=1.6.0
oslo.i18n>=0.2.0 # Apache-2.0
pbr>=0.6,!=0.7,<1.0
python-glanceclient>=0.13.1
python-keystoneclient>=0.9.0
python-novaclient>=2.17.0
python-cinderclient>=1.0.7
python-neutronclient>=2.3.5,<3
requests>=1.1
six>=1.7.0
| + cliff>=1.6.0
+ oslo.i18n>=0.2.0 # Apache-2.0
pbr>=0.6,!=0.7,<1.0
- cliff>=1.6.0
python-glanceclient>=0.13.1
python-keystoneclient>=0.9.0
python-novaclient>=2.17.0
python-cinderclient>=1.0.7
python-neutronclient>=2.3.5,<3
requests>=1.1
six>=1.7.0 | 3 | 0.333333 | 2 | 1 |
697833caade1323ddb9a0b4e51031f1d494262cd | 201705/migonzalvar/biggest_set.py | 201705/migonzalvar/biggest_set.py |
from contextlib import contextmanager
import time
from main import has_subset_sum_zero
class Duration:
def __init__(self, elapsed=None):
self.elapsed = elapsed
@contextmanager
def less_than(secs):
duration = Duration()
tic = time.time()
yield duration
elapsed = time.time() - tic
print(f'Duration: {elapsed} seconds')
if elapsed >= secs:
print('Limit reached. Stopping.')
raise SystemExit(0)
def do():
for n in range(1, 100, 10):
source = range(1, n)
print(f'Length: {n} items')
with less_than(300):
result = has_subset_sum_zero(source)
print(f'Result: {result}')
print('Continue...')
print()
if __name__ == '__main__':
do()
|
from contextlib import contextmanager
import time
from main import has_subset_sum_zero
class Duration:
def __init__(self, elapsed=None):
self.elapsed = elapsed
@contextmanager
def less_than(secs):
duration = Duration()
tic = time.time()
yield duration
elapsed = time.time() - tic
duration.elapsed = elapsed
def nosolution_case(N):
return range(1, N + 1)
def negative_worst_case(N):
case = list(range(-N + 1, 0))
case += [abs(sum(case))]
return case
def positive_worst_case(N):
case = list(range(1, N))
case.insert(0, - sum(case))
return case
def do():
strategies = [nosolution_case, negative_worst_case, positive_worst_case]
for strategy in strategies:
print(f'## Using {strategy.__name__}')
print()
for n in range(1, 100, 10):
source = range(1, n)
print(f'Length: {n} items')
with less_than(300) as duration:
result = has_subset_sum_zero(source)
print(f'Result: {result}')
print(f'Duration: {duration.elapsed} seconds')
if duration.elapsed >= secs:
print('Limit reached. Stopping.')
break
print('Continue searching...')
print()
if __name__ == '__main__':
do()
| Use several strategies for performance | Use several strategies for performance
| Python | bsd-3-clause | VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,VigoTech/reto,vigojug/reto,vigojug/reto,vigojug/reto,vigojug/reto,VigoTech/reto,vigojug/reto,vigojug/reto,vigojug/reto,vigojug/reto,VigoTech/reto,VigoTech/reto,vigojug/reto,vigojug/reto | python | ## Code Before:
from contextlib import contextmanager
import time
from main import has_subset_sum_zero
class Duration:
def __init__(self, elapsed=None):
self.elapsed = elapsed
@contextmanager
def less_than(secs):
duration = Duration()
tic = time.time()
yield duration
elapsed = time.time() - tic
print(f'Duration: {elapsed} seconds')
if elapsed >= secs:
print('Limit reached. Stopping.')
raise SystemExit(0)
def do():
for n in range(1, 100, 10):
source = range(1, n)
print(f'Length: {n} items')
with less_than(300):
result = has_subset_sum_zero(source)
print(f'Result: {result}')
print('Continue...')
print()
if __name__ == '__main__':
do()
## Instruction:
Use several strategies for performance
## Code After:
from contextlib import contextmanager
import time
from main import has_subset_sum_zero
class Duration:
def __init__(self, elapsed=None):
self.elapsed = elapsed
@contextmanager
def less_than(secs):
duration = Duration()
tic = time.time()
yield duration
elapsed = time.time() - tic
duration.elapsed = elapsed
def nosolution_case(N):
return range(1, N + 1)
def negative_worst_case(N):
case = list(range(-N + 1, 0))
case += [abs(sum(case))]
return case
def positive_worst_case(N):
case = list(range(1, N))
case.insert(0, - sum(case))
return case
def do():
strategies = [nosolution_case, negative_worst_case, positive_worst_case]
for strategy in strategies:
print(f'## Using {strategy.__name__}')
print()
for n in range(1, 100, 10):
source = range(1, n)
print(f'Length: {n} items')
with less_than(300) as duration:
result = has_subset_sum_zero(source)
print(f'Result: {result}')
print(f'Duration: {duration.elapsed} seconds')
if duration.elapsed >= secs:
print('Limit reached. Stopping.')
break
print('Continue searching...')
print()
if __name__ == '__main__':
do()
|
from contextlib import contextmanager
import time
from main import has_subset_sum_zero
class Duration:
def __init__(self, elapsed=None):
self.elapsed = elapsed
@contextmanager
def less_than(secs):
duration = Duration()
tic = time.time()
yield duration
elapsed = time.time() - tic
- print(f'Duration: {elapsed} seconds')
- if elapsed >= secs:
- print('Limit reached. Stopping.')
- raise SystemExit(0)
+ duration.elapsed = elapsed
+
+
+ def nosolution_case(N):
+ return range(1, N + 1)
+
+
+ def negative_worst_case(N):
+ case = list(range(-N + 1, 0))
+ case += [abs(sum(case))]
+ return case
+
+
+ def positive_worst_case(N):
+ case = list(range(1, N))
+ case.insert(0, - sum(case))
+ return case
def do():
+ strategies = [nosolution_case, negative_worst_case, positive_worst_case]
+ for strategy in strategies:
+ print(f'## Using {strategy.__name__}')
- for n in range(1, 100, 10):
- source = range(1, n)
- print(f'Length: {n} items')
- with less_than(300):
- result = has_subset_sum_zero(source)
- print(f'Result: {result}')
- print('Continue...')
print()
+ for n in range(1, 100, 10):
+ source = range(1, n)
+ print(f'Length: {n} items')
+ with less_than(300) as duration:
+ result = has_subset_sum_zero(source)
+ print(f'Result: {result}')
+ print(f'Duration: {duration.elapsed} seconds')
+ if duration.elapsed >= secs:
+ print('Limit reached. Stopping.')
+ break
+ print('Continue searching...')
+ print()
if __name__ == '__main__':
do() | 43 | 1.194444 | 32 | 11 |
99cf9e85f8c9ad18e06bd2d9e8c11c2e25487ee0 | src/collection.js | src/collection.js | import {Subject} from 'rx';
import isolate from '@cycle/isolate';
let _id = 0;
function id() {
return _id++;
};
function registerHandlers(item, handlers, action$) {
for (let sink in item) {
if (sink in handlers) {
const handler = handlers[sink];
item[sink].subscribe(event => action$.onNext(
(state) => handler(state, {item, event})
))
}
}
}
function makeItem (component, sources, props) {
const newId = id();
const newItem = isolate(component, newId.toString())({...sources, ...props});
newItem.id = newId;
return newItem;
}
export default function Collection (component, sources, handlers = {}, items = [], action$ = new Subject) {
return {
add (props) {
const newItem = makeItem(component, sources, props);
registerHandlers(newItem, handlers, action$);
return Collection(
component,
sources,
handlers,
[...items, newItem],
action$
)
},
remove (itemForRemoval) {
return Collection(
component,
sources,
handlers,
items.filter(item => item.id !== itemForRemoval.id),
action$
)
},
asArray () {
return items;
},
action$: action$.asObservable()
}
}
| import {Subject, Observable} from 'rx';
import isolate from '@cycle/isolate';
let _id = 0;
function id() {
return _id++;
};
function handlerStreams (item, handlers) {
const sinkStreams = Object.keys(item).map(sink => {
if (handlers[sink] === undefined) {
return null;
}
const handler = handlers[sink];
const sink$ = item[sink];
return sink$.map(event => (state) => handler(state, {item, event}));
});
return Observable.merge(...sinkStreams.filter(action => action !== null));
}
function makeItem (component, sources, props) {
const newId = id();
const newItem = isolate(component, newId.toString())({...sources, ...props});
newItem.id = newId;
return newItem;
}
export default function Collection (component, sources, handlers = {}, items = [], action$ = new Subject) {
return {
add (props) {
const newItem = makeItem(component, sources, props);
handlerStreams(newItem, handlers).subscribe(action$);
return Collection(
component,
sources,
handlers,
[...items, newItem],
action$
)
},
remove (itemForRemoval) {
return Collection(
component,
sources,
handlers,
items.filter(item => item.id !== itemForRemoval.id),
action$
)
},
asArray () {
return items;
},
action$: action$.asObservable()
}
}
| Refactor registerHandlers to return an observable of handlers | Refactor registerHandlers to return an observable of handlers
| JavaScript | mit | Widdershin/cycle-collections,cyclejs/collection,Widdershin/cycle-collections,Hypnosphi/collection,Widdershin/cycle-collections,cyclejs/collection,Hypnosphi/collection,Hypnosphi/collection,cyclejs/collection | javascript | ## Code Before:
import {Subject} from 'rx';
import isolate from '@cycle/isolate';
let _id = 0;
function id() {
return _id++;
};
function registerHandlers(item, handlers, action$) {
for (let sink in item) {
if (sink in handlers) {
const handler = handlers[sink];
item[sink].subscribe(event => action$.onNext(
(state) => handler(state, {item, event})
))
}
}
}
function makeItem (component, sources, props) {
const newId = id();
const newItem = isolate(component, newId.toString())({...sources, ...props});
newItem.id = newId;
return newItem;
}
export default function Collection (component, sources, handlers = {}, items = [], action$ = new Subject) {
return {
add (props) {
const newItem = makeItem(component, sources, props);
registerHandlers(newItem, handlers, action$);
return Collection(
component,
sources,
handlers,
[...items, newItem],
action$
)
},
remove (itemForRemoval) {
return Collection(
component,
sources,
handlers,
items.filter(item => item.id !== itemForRemoval.id),
action$
)
},
asArray () {
return items;
},
action$: action$.asObservable()
}
}
## Instruction:
Refactor registerHandlers to return an observable of handlers
## Code After:
import {Subject, Observable} from 'rx';
import isolate from '@cycle/isolate';
let _id = 0;
function id() {
return _id++;
};
function handlerStreams (item, handlers) {
const sinkStreams = Object.keys(item).map(sink => {
if (handlers[sink] === undefined) {
return null;
}
const handler = handlers[sink];
const sink$ = item[sink];
return sink$.map(event => (state) => handler(state, {item, event}));
});
return Observable.merge(...sinkStreams.filter(action => action !== null));
}
function makeItem (component, sources, props) {
const newId = id();
const newItem = isolate(component, newId.toString())({...sources, ...props});
newItem.id = newId;
return newItem;
}
export default function Collection (component, sources, handlers = {}, items = [], action$ = new Subject) {
return {
add (props) {
const newItem = makeItem(component, sources, props);
handlerStreams(newItem, handlers).subscribe(action$);
return Collection(
component,
sources,
handlers,
[...items, newItem],
action$
)
},
remove (itemForRemoval) {
return Collection(
component,
sources,
handlers,
items.filter(item => item.id !== itemForRemoval.id),
action$
)
},
asArray () {
return items;
},
action$: action$.asObservable()
}
}
| - import {Subject} from 'rx';
+ import {Subject, Observable} from 'rx';
? ++++++++++++
import isolate from '@cycle/isolate';
let _id = 0;
function id() {
return _id++;
};
- function registerHandlers(item, handlers, action$) {
- for (let sink in item) {
- if (sink in handlers) {
- const handler = handlers[sink];
+ function handlerStreams (item, handlers) {
+ const sinkStreams = Object.keys(item).map(sink => {
+ if (handlers[sink] === undefined) {
+ return null;
+ }
- item[sink].subscribe(event => action$.onNext(
+ const handler = handlers[sink];
+ const sink$ = item[sink];
+
- (state) => handler(state, {item, event})
? ^
+ return sink$.map(event => (state) => handler(state, {item, event}));
? ++++++ +++++++++++++++ ^^ ++
- ))
- }
- }
+ });
? ++
+
+ return Observable.merge(...sinkStreams.filter(action => action !== null));
}
function makeItem (component, sources, props) {
const newId = id();
const newItem = isolate(component, newId.toString())({...sources, ...props});
newItem.id = newId;
return newItem;
}
export default function Collection (component, sources, handlers = {}, items = [], action$ = new Subject) {
return {
add (props) {
const newItem = makeItem(component, sources, props);
- registerHandlers(newItem, handlers, action$);
+ handlerStreams(newItem, handlers).subscribe(action$);
return Collection(
component,
sources,
handlers,
[...items, newItem],
action$
)
},
remove (itemForRemoval) {
return Collection(
component,
sources,
handlers,
items.filter(item => item.id !== itemForRemoval.id),
action$
)
},
asArray () {
return items;
},
action$: action$.asObservable()
}
} | 25 | 0.390625 | 14 | 11 |
228de62565d9d1819a5054190f25e8e40cda2285 | Help-Using-CentOS.txt | Help-Using-CentOS.txt | If you are using CentOS here is what I recommend:
1. Mount a CentOS ISO.
2. Copy the contents of Packages/* to a location you put in CONFIG_REPOS.
3. Repeat steps 1 & 2 for each ISO image (eg 2 for the DVD images).
4. Change into the directory you copied the packages to.
5. Run "createrepo -d ."
6. You are ready to roll your installable image.
| If you are using CentOS here is what I recommend:
1. Mount a CentOS ISO.
2. Copy the contents of Packages/* to a location you put in CONFIG_REPOS.
3. Repeat steps 1 & 2 for each ISO image (eg 2 for the DVD images).
4. Change into the directory you copied the packages to.
5. Run "createrepo -d ."
6. You are ready to roll your installable image.
Note: CentOS archives previous releases. Currently Tresys is testing against
RHEL 6.2 (this may have changed though). To get a specific archived ISO from
the CentOS mirrors use their "vault" sub-domain. Eg:
- http://vault.centos.org/6.2/isos/x86_64/
| Add info regarding CentOS archives and vault link | Add info regarding CentOS archives and vault link
| Text | apache-2.0 | quark-pat/CLIP,quark-pat/CLIP,tomhurd/clip,ykhodorkovskiy/clip,tomhurd/clip,rprevette/clip,tomhurd/clip,ykhodorkovskiy/clip,quark-pat/CLIP,quark-pat/CLIP,tomhurd/clip,quark-pat/CLIP,tomhurd/clip,rprevette/clip,rprevette/clip,quark-pat/CLIP,ykhodorkovskiy/clip,tomhurd/clip,ykhodorkovskiy/clip,rprevette/clip,quark-pat/CLIP | text | ## Code Before:
If you are using CentOS here is what I recommend:
1. Mount a CentOS ISO.
2. Copy the contents of Packages/* to a location you put in CONFIG_REPOS.
3. Repeat steps 1 & 2 for each ISO image (eg 2 for the DVD images).
4. Change into the directory you copied the packages to.
5. Run "createrepo -d ."
6. You are ready to roll your installable image.
## Instruction:
Add info regarding CentOS archives and vault link
## Code After:
If you are using CentOS here is what I recommend:
1. Mount a CentOS ISO.
2. Copy the contents of Packages/* to a location you put in CONFIG_REPOS.
3. Repeat steps 1 & 2 for each ISO image (eg 2 for the DVD images).
4. Change into the directory you copied the packages to.
5. Run "createrepo -d ."
6. You are ready to roll your installable image.
Note: CentOS archives previous releases. Currently Tresys is testing against
RHEL 6.2 (this may have changed though). To get a specific archived ISO from
the CentOS mirrors use their "vault" sub-domain. Eg:
- http://vault.centos.org/6.2/isos/x86_64/
| If you are using CentOS here is what I recommend:
1. Mount a CentOS ISO.
2. Copy the contents of Packages/* to a location you put in CONFIG_REPOS.
3. Repeat steps 1 & 2 for each ISO image (eg 2 for the DVD images).
4. Change into the directory you copied the packages to.
5. Run "createrepo -d ."
6. You are ready to roll your installable image.
+
+ Note: CentOS archives previous releases. Currently Tresys is testing against
+ RHEL 6.2 (this may have changed though). To get a specific archived ISO from
+ the CentOS mirrors use their "vault" sub-domain. Eg:
+ - http://vault.centos.org/6.2/isos/x86_64/ | 5 | 0.625 | 5 | 0 |
a2efa2455807b0ac5e1548a863f774b301c0b566 | setup-files/setup-conf.el | setup-files/setup-conf.el | ;; Time-stamp: <2015-06-30 16:51:07 kmodi>
;; Conf Mode
(use-package conf-mode
:mode (("\\.conf\\'" . conf-space-mode)
("\\.setup.*\\'" . conf-space-mode)))
(provide 'setup-conf)
| ;; Time-stamp: <2017-08-15 12:05:32 kmodi>
;; Conf Mode
(use-package conf-mode
:mode (("\\.conf\\'" . conf-space-mode)
("\\.setup.*\\'" . conf-space-mode))
:config
(progn
(defun modi/conf-quote-normal ()
"Enable `conf-quote-normal' for *.setup files."
(when-let* ((fname (buffer-file-name))
(enable-conf-quote-normal (string-match-p "\\.setup.*" fname)))
;; Set the syntax of ' and " to punctuation.
(conf-quote-normal nil)))
(add-hook 'conf-space-mode-hook #'modi/conf-quote-normal)))
(provide 'setup-conf)
| Set syntax of ' and " to punctuation for some conf-space-mode files | Set syntax of ' and " to punctuation for some conf-space-mode files
| Emacs Lisp | mit | kaushalmodi/.emacs.d,kaushalmodi/.emacs.d | emacs-lisp | ## Code Before:
;; Time-stamp: <2015-06-30 16:51:07 kmodi>
;; Conf Mode
(use-package conf-mode
:mode (("\\.conf\\'" . conf-space-mode)
("\\.setup.*\\'" . conf-space-mode)))
(provide 'setup-conf)
## Instruction:
Set syntax of ' and " to punctuation for some conf-space-mode files
## Code After:
;; Time-stamp: <2017-08-15 12:05:32 kmodi>
;; Conf Mode
(use-package conf-mode
:mode (("\\.conf\\'" . conf-space-mode)
("\\.setup.*\\'" . conf-space-mode))
:config
(progn
(defun modi/conf-quote-normal ()
"Enable `conf-quote-normal' for *.setup files."
(when-let* ((fname (buffer-file-name))
(enable-conf-quote-normal (string-match-p "\\.setup.*" fname)))
;; Set the syntax of ' and " to punctuation.
(conf-quote-normal nil)))
(add-hook 'conf-space-mode-hook #'modi/conf-quote-normal)))
(provide 'setup-conf)
| - ;; Time-stamp: <2015-06-30 16:51:07 kmodi>
? ^ ^ ^^ ^^^^ ^
+ ;; Time-stamp: <2017-08-15 12:05:32 kmodi>
? ^ ^ ^^ ^ ^^^^
;; Conf Mode
(use-package conf-mode
- :mode (("\\.conf\\'" . conf-space-mode)
? ---
+ :mode (("\\.conf\\'" . conf-space-mode)
- ("\\.setup.*\\'" . conf-space-mode)))
? -
+ ("\\.setup.*\\'" . conf-space-mode))
+ :config
+ (progn
+ (defun modi/conf-quote-normal ()
+ "Enable `conf-quote-normal' for *.setup files."
+ (when-let* ((fname (buffer-file-name))
+ (enable-conf-quote-normal (string-match-p "\\.setup.*" fname)))
+ ;; Set the syntax of ' and " to punctuation.
+ (conf-quote-normal nil)))
+ (add-hook 'conf-space-mode-hook #'modi/conf-quote-normal)))
(provide 'setup-conf) | 15 | 1.5 | 12 | 3 |
90228ea0f1b868da6cfbb5aad78062bfaf4da588 | src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/views/content-delete.html | src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/views/content-delete.html | <div class="umb-dialog umb-pane" ng-controller="Our.Umbraco.Nexu.ContentDeleteController">
<umb-load-indicator ng-if="isLoading">
</umb-load-indicator>
<div class="umb-dialog-body" auto-scale="90" ng-hide="isLoading">
<div ng-if="!isLoading && links.length > 0">
<nexu-relation-list relations="links" show-language="showlanguage" items-per-page="itemsPerPage"/>
</div>
<p class="umb-abstract">
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong> ?
</p>
<umb-confirm on-confirm="performDelete" on-cancel="cancel">
</umb-confirm>
</div>
</div>
| <div class="umb-dialog umb-pane" ng-controller="Our.Umbraco.Nexu.ContentDeleteController">
<umb-load-indicator ng-if="isLoading">
</umb-load-indicator>
<div class="umb-dialog-body" auto-scale="90" ng-hide="isLoading">
<div ng-if="!isLoading && links.length > 0">
<nexu-relation-list relations="links" show-language="showlanguage" items-per-page="itemsPerPage" />
</div>
<p class="abstract">
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
</p>
<div class="umb-alert umb-alert--warning">
<localize key="defaultdialogs_variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.</localize>
</div>
<umb-confirm on-confirm="performDelete" confirm-button-style="danger" on-cancel="cancel"></umb-confirm>
</div>
</div>
| Set correct output for delete view of content | Set correct output for delete view of content
| HTML | mit | dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu | html | ## Code Before:
<div class="umb-dialog umb-pane" ng-controller="Our.Umbraco.Nexu.ContentDeleteController">
<umb-load-indicator ng-if="isLoading">
</umb-load-indicator>
<div class="umb-dialog-body" auto-scale="90" ng-hide="isLoading">
<div ng-if="!isLoading && links.length > 0">
<nexu-relation-list relations="links" show-language="showlanguage" items-per-page="itemsPerPage"/>
</div>
<p class="umb-abstract">
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong> ?
</p>
<umb-confirm on-confirm="performDelete" on-cancel="cancel">
</umb-confirm>
</div>
</div>
## Instruction:
Set correct output for delete view of content
## Code After:
<div class="umb-dialog umb-pane" ng-controller="Our.Umbraco.Nexu.ContentDeleteController">
<umb-load-indicator ng-if="isLoading">
</umb-load-indicator>
<div class="umb-dialog-body" auto-scale="90" ng-hide="isLoading">
<div ng-if="!isLoading && links.length > 0">
<nexu-relation-list relations="links" show-language="showlanguage" items-per-page="itemsPerPage" />
</div>
<p class="abstract">
<localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
</p>
<div class="umb-alert umb-alert--warning">
<localize key="defaultdialogs_variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.</localize>
</div>
<umb-confirm on-confirm="performDelete" confirm-button-style="danger" on-cancel="cancel"></umb-confirm>
</div>
</div>
| <div class="umb-dialog umb-pane" ng-controller="Our.Umbraco.Nexu.ContentDeleteController">
<umb-load-indicator ng-if="isLoading">
</umb-load-indicator>
<div class="umb-dialog-body" auto-scale="90" ng-hide="isLoading">
-
+
<div ng-if="!isLoading && links.length > 0">
- <nexu-relation-list relations="links" show-language="showlanguage" items-per-page="itemsPerPage"/>
+ <nexu-relation-list relations="links" show-language="showlanguage" items-per-page="itemsPerPage" />
? +
</div>
- <p class="umb-abstract">
? ----
+ <p class="abstract">
- <localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong> ?
? -
+ <localize key="defaultdialogs_confirmdelete">Are you sure you want to delete</localize> <strong>{{currentNode.name}}</strong>?
</p>
+ <div class="umb-alert umb-alert--warning">
+ <localize key="defaultdialogs_variantdeletewarning">This will delete the node and all its languages. If you only want to delete one language go and unpublish it instead.</localize>
+ </div>
- <umb-confirm on-confirm="performDelete" on-cancel="cancel">
+ <umb-confirm on-confirm="performDelete" confirm-button-style="danger" on-cancel="cancel"></umb-confirm>
? ++++++++++++++++++++++++++++++ ++++++++++++++
- </umb-confirm>
</div>
</div> | 14 | 0.608696 | 8 | 6 |
6b733ad7e2e3ba8909d164b826dc3205bfd3b6e4 | spec/controllers/api/v0/product_images_controller_spec.rb | spec/controllers/api/v0/product_images_controller_spec.rb |
require 'spec_helper'
module Api
describe V0::ProductImagesController, type: :controller do
include AuthenticationHelper
include FileHelper
render_views
describe "uploading an image" do
before do
allow(controller).to receive(:spree_current_user) { current_api_user }
end
let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
let!(:product_without_image) { create(:product) }
let!(:product_with_image) { create(:product_with_image) }
let(:current_api_user) { create(:admin_user) }
it "saves a new image when none is present" do
post :update_product_image, xhr: true,
params: { product_id: product_without_image.id, file: image, use_route: :product_images }
expect(response.status).to eq 201
expect(product_without_image.images.first.id).to eq json_response['id']
end
it "updates an existing product image" do
post :update_product_image, xhr: true,
params: { product_id: product_with_image.id, file: image, use_route: :product_images }
expect(response.status).to eq 200
expect(product_with_image.images.first.id).to eq json_response['id']
end
end
end
end
|
require 'spec_helper'
describe Api::V0::ProductImagesController, type: :controller do
include AuthenticationHelper
include FileHelper
render_views
describe "uploading an image" do
let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
let(:product_without_image) { create(:product) }
let(:product_with_image) { create(:product_with_image) }
let(:current_api_user) { create(:admin_user) }
before do
allow(controller).to receive(:spree_current_user) { current_api_user }
end
it "saves a new image when none is present" do
post :update_product_image, xhr: true, params: {
product_id: product_without_image.id, file: image, use_route: :product_images
}
expect(response.status).to eq 201
expect(product_without_image.images.first.id).to eq json_response['id']
end
it "updates an existing product image" do
post :update_product_image, xhr: true, params: {
product_id: product_with_image.id, file: image, use_route: :product_images
}
expect(response.status).to eq 200
expect(product_with_image.images.first.id).to eq json_response['id']
end
end
end
| Increase readability of image controller spec | Increase readability of image controller spec
Best viewed without whitespace changes.
- Decrease indent.
- Move `let` to top like in other specs.
- Avoid `let!` to speed up the specs.
| Ruby | agpl-3.0 | mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork | ruby | ## Code Before:
require 'spec_helper'
module Api
describe V0::ProductImagesController, type: :controller do
include AuthenticationHelper
include FileHelper
render_views
describe "uploading an image" do
before do
allow(controller).to receive(:spree_current_user) { current_api_user }
end
let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
let!(:product_without_image) { create(:product) }
let!(:product_with_image) { create(:product_with_image) }
let(:current_api_user) { create(:admin_user) }
it "saves a new image when none is present" do
post :update_product_image, xhr: true,
params: { product_id: product_without_image.id, file: image, use_route: :product_images }
expect(response.status).to eq 201
expect(product_without_image.images.first.id).to eq json_response['id']
end
it "updates an existing product image" do
post :update_product_image, xhr: true,
params: { product_id: product_with_image.id, file: image, use_route: :product_images }
expect(response.status).to eq 200
expect(product_with_image.images.first.id).to eq json_response['id']
end
end
end
end
## Instruction:
Increase readability of image controller spec
Best viewed without whitespace changes.
- Decrease indent.
- Move `let` to top like in other specs.
- Avoid `let!` to speed up the specs.
## Code After:
require 'spec_helper'
describe Api::V0::ProductImagesController, type: :controller do
include AuthenticationHelper
include FileHelper
render_views
describe "uploading an image" do
let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
let(:product_without_image) { create(:product) }
let(:product_with_image) { create(:product_with_image) }
let(:current_api_user) { create(:admin_user) }
before do
allow(controller).to receive(:spree_current_user) { current_api_user }
end
it "saves a new image when none is present" do
post :update_product_image, xhr: true, params: {
product_id: product_without_image.id, file: image, use_route: :product_images
}
expect(response.status).to eq 201
expect(product_without_image.images.first.id).to eq json_response['id']
end
it "updates an existing product image" do
post :update_product_image, xhr: true, params: {
product_id: product_with_image.id, file: image, use_route: :product_images
}
expect(response.status).to eq 200
expect(product_with_image.images.first.id).to eq json_response['id']
end
end
end
|
require 'spec_helper'
- module Api
- describe V0::ProductImagesController, type: :controller do
? --
+ describe Api::V0::ProductImagesController, type: :controller do
? +++++
- include AuthenticationHelper
? --
+ include AuthenticationHelper
- include FileHelper
? --
+ include FileHelper
- render_views
? --
+ render_views
- describe "uploading an image" do
? --
+ describe "uploading an image" do
- before do
- allow(controller).to receive(:spree_current_user) { current_api_user }
- end
+ let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
+ let(:product_without_image) { create(:product) }
+ let(:product_with_image) { create(:product_with_image) }
+ let(:current_api_user) { create(:admin_user) }
+ before do
+ allow(controller).to receive(:spree_current_user) { current_api_user }
+ end
- let(:image) { Rack::Test::UploadedFile.new(black_logo_file, 'image/png') }
- let!(:product_without_image) { create(:product) }
- let!(:product_with_image) { create(:product_with_image) }
- let(:current_api_user) { create(:admin_user) }
- it "saves a new image when none is present" do
? --
+ it "saves a new image when none is present" do
- post :update_product_image, xhr: true,
? --
+ post :update_product_image, xhr: true, params: {
? ++++++++++
- params: { product_id: product_without_image.id, file: image, use_route: :product_images }
? -------------------------------------- --
+ product_id: product_without_image.id, file: image, use_route: :product_images
+ }
- expect(response.status).to eq 201
? --
+ expect(response.status).to eq 201
- expect(product_without_image.images.first.id).to eq json_response['id']
? --
+ expect(product_without_image.images.first.id).to eq json_response['id']
- end
? --
+ end
- it "updates an existing product image" do
? --
+ it "updates an existing product image" do
- post :update_product_image, xhr: true,
? --
+ post :update_product_image, xhr: true, params: {
? ++++++++++
- params: { product_id: product_with_image.id, file: image, use_route: :product_images }
? -------------------------------------- --
+ product_id: product_with_image.id, file: image, use_route: :product_images
+ }
- expect(response.status).to eq 200
? --
+ expect(response.status).to eq 200
- expect(product_with_image.images.first.id).to eq json_response['id']
? --
+ expect(product_with_image.images.first.id).to eq json_response['id']
- end
end
end
end | 50 | 1.351351 | 25 | 25 |
761490d6e7242764c08a36aee132a54433b939ca | latestVersion.sbt | latestVersion.sbt | latestVersion in ThisBuild := "0.11.0"
latestBinaryCompatibleVersion in ThisBuild := None
unreleasedModuleNames in ThisBuild := Set()
| latestVersion in ThisBuild := "0.12.0"
latestBinaryCompatibleVersion in ThisBuild := Some("0.12.0")
unreleasedModuleNames in ThisBuild := Set()
| Set latest version to 0.12.0 | Set latest version to 0.12.0
| Scala | mit | vlovgr/ciris | scala | ## Code Before:
latestVersion in ThisBuild := "0.11.0"
latestBinaryCompatibleVersion in ThisBuild := None
unreleasedModuleNames in ThisBuild := Set()
## Instruction:
Set latest version to 0.12.0
## Code After:
latestVersion in ThisBuild := "0.12.0"
latestBinaryCompatibleVersion in ThisBuild := Some("0.12.0")
unreleasedModuleNames in ThisBuild := Set()
| - latestVersion in ThisBuild := "0.11.0"
? ^
+ latestVersion in ThisBuild := "0.12.0"
? ^
- latestBinaryCompatibleVersion in ThisBuild := None
? ^ ^
+ latestBinaryCompatibleVersion in ThisBuild := Some("0.12.0")
? ^ ^ ++++++++++
unreleasedModuleNames in ThisBuild := Set() | 4 | 1.333333 | 2 | 2 |
f95741da1039becc0e145a3046adf654bd23630b | document.tex | document.tex | \documentclass[12pt]{report}
\usepackage{mystyle}
\usepackage{subfiles}
\begin{document}
\subfile{./tex/front-matter}
\subfile{./tex/introduction}
\subfile{./tex/engineering}
\subfile{./tex/background}
\subfile{./tex/prototypes}
\subfile{./tex/case-study-fourth-year-system}
\subfile{./tex/case-study-research-ide}
\subfile{./tex/platform}
\subfile{./tex/conclusion}
\include{./tex/citations}
% Add appendices now.
\appendix
\subfile{./tex/appendix-use-cases-1}
\subfile{./tex/appendix-use-cases-2}
\subfile{./tex/appendix-framework-research}
%\chapter{Extra Simulation Results}
%
%\chapter{Review of Linear Algebra}
\end{document}
| \documentclass[12pt]{report}
\usepackage{mystyle}
\usepackage{subfiles}
\begin{document}
\subfile{./tex/front-matter}
\subfile{./tex/introduction}
\subfile{./tex/engineering}
\subfile{./tex/background}
\subfile{./tex/prototypes}
\subfile{./tex/case-study-fourth-year-system}
\subfile{./tex/platform}
\subfile{./tex/case-study-research-ide}
\subfile{./tex/conclusion}
\include{./tex/citations}
% Add appendices now.
\appendix
\subfile{./tex/appendix-use-cases-1}
\subfile{./tex/appendix-use-cases-2}
\subfile{./tex/appendix-framework-research}
%\chapter{Extra Simulation Results}
%
%\chapter{Review of Linear Algebra}
\end{document}
| Move platform before research IDE | Move platform before research IDE
| TeX | mit | WorkflowsOnRails/project-report | tex | ## Code Before:
\documentclass[12pt]{report}
\usepackage{mystyle}
\usepackage{subfiles}
\begin{document}
\subfile{./tex/front-matter}
\subfile{./tex/introduction}
\subfile{./tex/engineering}
\subfile{./tex/background}
\subfile{./tex/prototypes}
\subfile{./tex/case-study-fourth-year-system}
\subfile{./tex/case-study-research-ide}
\subfile{./tex/platform}
\subfile{./tex/conclusion}
\include{./tex/citations}
% Add appendices now.
\appendix
\subfile{./tex/appendix-use-cases-1}
\subfile{./tex/appendix-use-cases-2}
\subfile{./tex/appendix-framework-research}
%\chapter{Extra Simulation Results}
%
%\chapter{Review of Linear Algebra}
\end{document}
## Instruction:
Move platform before research IDE
## Code After:
\documentclass[12pt]{report}
\usepackage{mystyle}
\usepackage{subfiles}
\begin{document}
\subfile{./tex/front-matter}
\subfile{./tex/introduction}
\subfile{./tex/engineering}
\subfile{./tex/background}
\subfile{./tex/prototypes}
\subfile{./tex/case-study-fourth-year-system}
\subfile{./tex/platform}
\subfile{./tex/case-study-research-ide}
\subfile{./tex/conclusion}
\include{./tex/citations}
% Add appendices now.
\appendix
\subfile{./tex/appendix-use-cases-1}
\subfile{./tex/appendix-use-cases-2}
\subfile{./tex/appendix-framework-research}
%\chapter{Extra Simulation Results}
%
%\chapter{Review of Linear Algebra}
\end{document}
| \documentclass[12pt]{report}
\usepackage{mystyle}
\usepackage{subfiles}
\begin{document}
\subfile{./tex/front-matter}
\subfile{./tex/introduction}
\subfile{./tex/engineering}
\subfile{./tex/background}
\subfile{./tex/prototypes}
\subfile{./tex/case-study-fourth-year-system}
+ \subfile{./tex/platform}
\subfile{./tex/case-study-research-ide}
- \subfile{./tex/platform}
\subfile{./tex/conclusion}
\include{./tex/citations}
% Add appendices now.
\appendix
\subfile{./tex/appendix-use-cases-1}
\subfile{./tex/appendix-use-cases-2}
\subfile{./tex/appendix-framework-research}
%\chapter{Extra Simulation Results}
%
%\chapter{Review of Linear Algebra}
\end{document} | 2 | 0.064516 | 1 | 1 |
34aa4a19ac1fc7ff52ea0d9ac13df944f1e9754d | src/tn/plonebehavior/template/html_page_html.py | src/tn/plonebehavior/template/html_page_html.py | try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(grok.Adapter):
grok.context(html_page.IHTMLPageSchema)
grok.implements(interfaces.IHTML)
contextless_factory = ContextlessHTML
def __unicode__(self):
base_url = self.context.absolute_url()
return unicode(self.contextless_factory(base_url,
self.context.html))
| try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import _
from tn.plonebehavior.template import ITemplateConfiguration
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
from z3c.form import validator
import collections
import lxml.cssselect
import lxml.html
import zope.interface
isiterable = lambda o: isinstance(o, collections.Iterable)
class HTMLPageHTML(grok.Adapter):
grok.context(html_page.IHTMLPageSchema)
grok.implements(interfaces.IHTML)
contextless_factory = ContextlessHTML
def __unicode__(self):
base_url = self.context.absolute_url()
return unicode(self.contextless_factory(base_url,
self.context.html))
class CSSSelectorValidator(validator.SimpleFieldValidator):
def validate(self, value):
super(CSSSelectorValidator, self).validate(value)
tree = lxml.html.document_fromstring(self.context.html)
xpath = lxml.cssselect.CSSSelector(value).path
selection = tree.xpath(xpath)
if not isiterable(selection) or len(selection) != 1:
raise zope.interface.Invalid(_(
"Expression doesn't select a single element "
"in the HTML page."
))
validator.WidgetValidatorDiscriminators(
CSSSelectorValidator,
context=html_page.IHTMLPageSchema,
field=ITemplateConfiguration['css']
)
grok.global_adapter(CSSSelectorValidator)
| Add a validation to ensure that CSS selector actually works | Add a validation to ensure that CSS selector actually works
| Python | bsd-3-clause | tecnologiaenegocios/tn.plonebehavior.template,tecnologiaenegocios/tn.plonebehavior.template | python | ## Code Before:
try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
class HTMLPageHTML(grok.Adapter):
grok.context(html_page.IHTMLPageSchema)
grok.implements(interfaces.IHTML)
contextless_factory = ContextlessHTML
def __unicode__(self):
base_url = self.context.absolute_url()
return unicode(self.contextless_factory(base_url,
self.context.html))
## Instruction:
Add a validation to ensure that CSS selector actually works
## Code After:
try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
from tn.plonebehavior.template import _
from tn.plonebehavior.template import ITemplateConfiguration
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
from z3c.form import validator
import collections
import lxml.cssselect
import lxml.html
import zope.interface
isiterable = lambda o: isinstance(o, collections.Iterable)
class HTMLPageHTML(grok.Adapter):
grok.context(html_page.IHTMLPageSchema)
grok.implements(interfaces.IHTML)
contextless_factory = ContextlessHTML
def __unicode__(self):
base_url = self.context.absolute_url()
return unicode(self.contextless_factory(base_url,
self.context.html))
class CSSSelectorValidator(validator.SimpleFieldValidator):
def validate(self, value):
super(CSSSelectorValidator, self).validate(value)
tree = lxml.html.document_fromstring(self.context.html)
xpath = lxml.cssselect.CSSSelector(value).path
selection = tree.xpath(xpath)
if not isiterable(selection) or len(selection) != 1:
raise zope.interface.Invalid(_(
"Expression doesn't select a single element "
"in the HTML page."
))
validator.WidgetValidatorDiscriminators(
CSSSelectorValidator,
context=html_page.IHTMLPageSchema,
field=ITemplateConfiguration['css']
)
grok.global_adapter(CSSSelectorValidator)
| try:
from tn.plonehtmlpage import html_page
HAS_HTML_PAGE = True
except ImportError:
HAS_HTML_PAGE = False
if HAS_HTML_PAGE:
from five import grok
+ from tn.plonebehavior.template import _
+ from tn.plonebehavior.template import ITemplateConfiguration
from tn.plonebehavior.template import interfaces
from tn.plonebehavior.template.html import ContextlessHTML
+ from z3c.form import validator
+
+ import collections
+ import lxml.cssselect
+ import lxml.html
+ import zope.interface
+
+ isiterable = lambda o: isinstance(o, collections.Iterable)
class HTMLPageHTML(grok.Adapter):
grok.context(html_page.IHTMLPageSchema)
grok.implements(interfaces.IHTML)
contextless_factory = ContextlessHTML
def __unicode__(self):
base_url = self.context.absolute_url()
return unicode(self.contextless_factory(base_url,
self.context.html))
+
+ class CSSSelectorValidator(validator.SimpleFieldValidator):
+ def validate(self, value):
+ super(CSSSelectorValidator, self).validate(value)
+
+ tree = lxml.html.document_fromstring(self.context.html)
+ xpath = lxml.cssselect.CSSSelector(value).path
+ selection = tree.xpath(xpath)
+ if not isiterable(selection) or len(selection) != 1:
+ raise zope.interface.Invalid(_(
+ "Expression doesn't select a single element "
+ "in the HTML page."
+ ))
+
+ validator.WidgetValidatorDiscriminators(
+ CSSSelectorValidator,
+ context=html_page.IHTMLPageSchema,
+ field=ITemplateConfiguration['css']
+ )
+
+ grok.global_adapter(CSSSelectorValidator) | 31 | 1.47619 | 31 | 0 |
f86b1cd775100d4e3c63210c2a199bb11713067c | scripts/config.sh | scripts/config.sh |
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function relative() {
local full_path="${SCRIPT_DIR}/../${1}"
if [ -d "${full_path}" ]; then
# Use readlink as a fallback to readpath for cross-platform compat.
if ! command -v realpath >/dev/null 2>&1; then
echo $(readlink -f "${full_path}")
else
echo $(realpath "${full_path}")
fi
else
# when the directory doesn't exist, fallback to this.
echo "${full_path}"
fi
}
EXAMPLES_DIR=$(relative "examples")
LIB_DIR=$(relative "lib")
CODEGEN_DIR=$(relative "codegen")
CONTRIB_DIR=$(relative "contrib")
DOC_DIR=$(relative "target/doc")
if [ "${1}" = "-p" ]; then
echo $SCRIPT_DIR
echo $EXAMPLES_DIR
echo $LIB_DIR
echo $CODEGEN_DIR
echo $CONTRIB_DIR
echo $DOC_DIR
fi
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function relative() {
local full_path="${SCRIPT_DIR}/../${1}"
if [ -d "${full_path}" ]; then
# Try to use readlink as a fallback to readpath for cross-platform compat.
if command -v realpath >/dev/null 2>&1; then
echo $(realpath "${full_path}")
elif ! (readlink -f 2>&1 | grep illegal > /dev/null); then
echo $(readlink -f "${full_path}")
else
echo "Rocket's scripts require 'realpath' or 'readlink -f' support." >&2
echo "Install realpath or GNU readlink via your package manager." >&2
echo "Aborting." >&2
exit 1
fi
else
# when the directory doesn't exist, fallback to this.
echo "${full_path}"
fi
}
EXAMPLES_DIR=$(relative "examples") || exit $?
LIB_DIR=$(relative "lib") || exit $?
CODEGEN_DIR=$(relative "codegen") || exit $?
CONTRIB_DIR=$(relative "contrib") || exit $?
DOC_DIR=$(relative "target/doc") || exit $?
if [ "${1}" = "-p" ]; then
echo $SCRIPT_DIR
echo $EXAMPLES_DIR
echo $LIB_DIR
echo $CODEGEN_DIR
echo $CONTRIB_DIR
echo $DOC_DIR
fi
| Print a nice message when readlink/readpath support is bad. | Print a nice message when readlink/readpath support is bad.
| Shell | apache-2.0 | impowski/Rocket,antonpirker/Rocket,gsquire/Rocket,gsquire/Rocket,impowski/Rocket,antonpirker/Rocket,gsquire/Rocket,shssoichiro/Rocket,shssoichiro/Rocket,impowski/Rocket,antonpirker/Rocket,shssoichiro/Rocket | shell | ## Code Before:
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function relative() {
local full_path="${SCRIPT_DIR}/../${1}"
if [ -d "${full_path}" ]; then
# Use readlink as a fallback to readpath for cross-platform compat.
if ! command -v realpath >/dev/null 2>&1; then
echo $(readlink -f "${full_path}")
else
echo $(realpath "${full_path}")
fi
else
# when the directory doesn't exist, fallback to this.
echo "${full_path}"
fi
}
EXAMPLES_DIR=$(relative "examples")
LIB_DIR=$(relative "lib")
CODEGEN_DIR=$(relative "codegen")
CONTRIB_DIR=$(relative "contrib")
DOC_DIR=$(relative "target/doc")
if [ "${1}" = "-p" ]; then
echo $SCRIPT_DIR
echo $EXAMPLES_DIR
echo $LIB_DIR
echo $CODEGEN_DIR
echo $CONTRIB_DIR
echo $DOC_DIR
fi
## Instruction:
Print a nice message when readlink/readpath support is bad.
## Code After:
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function relative() {
local full_path="${SCRIPT_DIR}/../${1}"
if [ -d "${full_path}" ]; then
# Try to use readlink as a fallback to readpath for cross-platform compat.
if command -v realpath >/dev/null 2>&1; then
echo $(realpath "${full_path}")
elif ! (readlink -f 2>&1 | grep illegal > /dev/null); then
echo $(readlink -f "${full_path}")
else
echo "Rocket's scripts require 'realpath' or 'readlink -f' support." >&2
echo "Install realpath or GNU readlink via your package manager." >&2
echo "Aborting." >&2
exit 1
fi
else
# when the directory doesn't exist, fallback to this.
echo "${full_path}"
fi
}
EXAMPLES_DIR=$(relative "examples") || exit $?
LIB_DIR=$(relative "lib") || exit $?
CODEGEN_DIR=$(relative "codegen") || exit $?
CONTRIB_DIR=$(relative "contrib") || exit $?
DOC_DIR=$(relative "target/doc") || exit $?
if [ "${1}" = "-p" ]; then
echo $SCRIPT_DIR
echo $EXAMPLES_DIR
echo $LIB_DIR
echo $CODEGEN_DIR
echo $CONTRIB_DIR
echo $DOC_DIR
fi
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function relative() {
local full_path="${SCRIPT_DIR}/../${1}"
if [ -d "${full_path}" ]; then
- # Use readlink as a fallback to readpath for cross-platform compat.
? ^
+ # Try to use readlink as a fallback to readpath for cross-platform compat.
? ^^^^^^^^
- if ! command -v realpath >/dev/null 2>&1; then
? --
+ if command -v realpath >/dev/null 2>&1; then
+ echo $(realpath "${full_path}")
+ elif ! (readlink -f 2>&1 | grep illegal > /dev/null); then
echo $(readlink -f "${full_path}")
else
- echo $(realpath "${full_path}")
+ echo "Rocket's scripts require 'realpath' or 'readlink -f' support." >&2
+ echo "Install realpath or GNU readlink via your package manager." >&2
+ echo "Aborting." >&2
+ exit 1
fi
else
# when the directory doesn't exist, fallback to this.
echo "${full_path}"
fi
}
- EXAMPLES_DIR=$(relative "examples")
+ EXAMPLES_DIR=$(relative "examples") || exit $?
? +++++++++++
- LIB_DIR=$(relative "lib")
+ LIB_DIR=$(relative "lib") || exit $?
? +++++++++++
- CODEGEN_DIR=$(relative "codegen")
+ CODEGEN_DIR=$(relative "codegen") || exit $?
? +++++++++++
- CONTRIB_DIR=$(relative "contrib")
+ CONTRIB_DIR=$(relative "contrib") || exit $?
? +++++++++++
- DOC_DIR=$(relative "target/doc")
+ DOC_DIR=$(relative "target/doc") || exit $?
? +++++++++++
if [ "${1}" = "-p" ]; then
echo $SCRIPT_DIR
echo $EXAMPLES_DIR
echo $LIB_DIR
echo $CODEGEN_DIR
echo $CONTRIB_DIR
echo $DOC_DIR
fi | 21 | 0.636364 | 13 | 8 |
f75917d34d9340e9db51ecaaf5f29289d96754e7 | resources/views/partials/forms/edit/purchase_date.blade.php | resources/views/partials/forms/edit/purchase_date.blade.php | <!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
| <!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
<a onclick="document.getElementById('purchase_date').value = ''"> Clear </a>
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
| Add a link used to clear the purchase date input | Add a link used to clear the purchase date input
| PHP | agpl-3.0 | snipe/snipe-it,snipe/snipe-it,snipe/snipe-it,snipe/snipe-it | php | ## Code Before:
<!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
## Instruction:
Add a link used to clear the purchase date input
## Code After:
<!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
<a onclick="document.getElementById('purchase_date').value = ''"> Clear </a>
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
| <!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<label for="purchase_date" class="col-md-3 control-label">{{ trans('general.purchase_date') }}</label>
<div class="input-group col-md-4">
<div class="input-group date" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-autoclose="true">
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
<span class="input-group-addon"><i class="fas fa-calendar" aria-hidden="true"></i></span>
</div>
+ <a onclick="document.getElementById('purchase_date').value = ''"> Clear </a>
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
</div>
| 1 | 0.083333 | 1 | 0 |
6c2f926ce61fb3cec849f6f48f6c6518cc9bf0d4 | app/mailers/contact_mailer.rb | app/mailers/contact_mailer.rb | class ContactMailer < ApplicationMailer
def contact_email(message)
@message = message
@from = @message.email
mail(from: message.email, reply_to: message.email, subject: message.subject)
end
def admin_email(message, emails)
@message = message
@emails = emails
# mail(subject: message.subject, bcc: @emails)
# let's try iteration
@emails.each do |email|
mail(subject: message.subject, bcc: @emails)
end
end
def session_reminder(message, emails)
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
def payment_reminder(message, emails, event)
@event = event
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
def registration_reminder(message, email)
@message = message
mail(subject: @message.subject, to: email)
end
end
| class ContactMailer < ApplicationMailer
def contact_email(message)
@message = message
@from = @message.email
mail(from: message.email, reply_to: message.email, subject: message.subject)
end
def admin_email(message, emails)
@message = message
@emails = emails
# mail(subject: message.subject, bcc: @emails)
# let's try iteration
@emails.each do |email|
mail(subject: message.subject, bcc: @emails)
end
end
def session_reminder(message, emails)
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
def payment_reminder(message, email, event)
@event = event
@message = message
mail(subject: @message.subject, to: email)
end
def registration_reminder(message, email)
@message = message
mail(subject: @message.subject, to: email)
end
end
| Fix to be `to` instead of `bcc` | Fix to be `to` instead of `bcc`
| Ruby | mit | Acerak2/registration,Acerak2/registration,Acerak2/registration,10000-Lakes-Gaming/registration,Acerak2/registration,10000-Lakes-Gaming/registration,10000-Lakes-Gaming/registration,10000-Lakes-Gaming/registration | ruby | ## Code Before:
class ContactMailer < ApplicationMailer
def contact_email(message)
@message = message
@from = @message.email
mail(from: message.email, reply_to: message.email, subject: message.subject)
end
def admin_email(message, emails)
@message = message
@emails = emails
# mail(subject: message.subject, bcc: @emails)
# let's try iteration
@emails.each do |email|
mail(subject: message.subject, bcc: @emails)
end
end
def session_reminder(message, emails)
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
def payment_reminder(message, emails, event)
@event = event
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
def registration_reminder(message, email)
@message = message
mail(subject: @message.subject, to: email)
end
end
## Instruction:
Fix to be `to` instead of `bcc`
## Code After:
class ContactMailer < ApplicationMailer
def contact_email(message)
@message = message
@from = @message.email
mail(from: message.email, reply_to: message.email, subject: message.subject)
end
def admin_email(message, emails)
@message = message
@emails = emails
# mail(subject: message.subject, bcc: @emails)
# let's try iteration
@emails.each do |email|
mail(subject: message.subject, bcc: @emails)
end
end
def session_reminder(message, emails)
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
def payment_reminder(message, email, event)
@event = event
@message = message
mail(subject: @message.subject, to: email)
end
def registration_reminder(message, email)
@message = message
mail(subject: @message.subject, to: email)
end
end
| class ContactMailer < ApplicationMailer
def contact_email(message)
@message = message
@from = @message.email
mail(from: message.email, reply_to: message.email, subject: message.subject)
end
def admin_email(message, emails)
@message = message
@emails = emails
# mail(subject: message.subject, bcc: @emails)
# let's try iteration
@emails.each do |email|
mail(subject: message.subject, bcc: @emails)
end
end
def session_reminder(message, emails)
@message = message
@emails = emails
mail(subject: @message.subject, bcc: @emails)
end
- def payment_reminder(message, emails, event)
? -
+ def payment_reminder(message, email, event)
@event = event
@message = message
- @emails = emails
- mail(subject: @message.subject, bcc: @emails)
? ^^^ - -
+ mail(subject: @message.subject, to: email)
? ^^
end
def registration_reminder(message, email)
@message = message
mail(subject: @message.subject, to: email)
end
end | 5 | 0.131579 | 2 | 3 |
fc1ed272bdbc8f6c8a5ed7f266968768f76458d5 | requirements.txt | requirements.txt | backpack==0.1
blinker==1.4
certifi==2017.4.17
chardet==3.0.4
cleo==0.6.0
click==6.7
Faker==0.7.17
Flask==0.12.2
flask-orator==0.2.0
idna==2.5
inflection==0.3.1
itsdangerous==0.24
Jinja2==2.9.6
lazy-object-proxy==1.3.1
MarkupSafe==1.0
mock==2.0.0
orator==0.9.7
pastel==0.1.0
pbr==3.0.1
pendulum==1.2.1
psutil==5.2.2
pyaml==16.12.2
Pygments==2.2.0
pylev==1.3.0
PyMySQL==0.7.11
python-dateutil==2.6.0
python-dotenv==0.6.4
pytz==2017.2
pytzdata==2017.2
PyYAML==3.12
requests==2.18.1
simplejson==3.10.0
six==1.10.0
tzlocal==1.4
urllib3==1.21.1
Werkzeug==0.12.2
wrapt==1.10.10
| backpack==0.1
blinker==1.4
certifi==2017.4.17
chardet==3.0.4
cleo==0.6.0
click==6.7
Faker==0.7.17
Flask==0.12.2
flask-orator==0.2.0
idna==2.5
inflection==0.3.1
itsdangerous==0.24
Jinja2==2.9.6
lazy-object-proxy==1.3.1
MarkupSafe==1.0
mock==2.0.0
mysqlclient==1.3.10
orator==0.9.7
pastel==0.1.0
pbr==3.0.1
pendulum==1.2.1
psutil==5.2.2
pyaml==16.12.2
Pygments==2.2.0
pylev==1.3.0
python-dateutil==2.6.0
python-dotenv==0.6.4
pytz==2017.2
pytzdata==2017.2
PyYAML==3.12
requests==2.18.1
simplejson==3.10.0
six==1.10.0
tzlocal==1.4
urllib3==1.21.1
Werkzeug==0.12.2
wrapt==1.10.10
| Use mysqlclient library instead of buggy pymysql | Use mysqlclient library instead of buggy pymysql
| Text | mit | erjanmx/salam-bot | text | ## Code Before:
backpack==0.1
blinker==1.4
certifi==2017.4.17
chardet==3.0.4
cleo==0.6.0
click==6.7
Faker==0.7.17
Flask==0.12.2
flask-orator==0.2.0
idna==2.5
inflection==0.3.1
itsdangerous==0.24
Jinja2==2.9.6
lazy-object-proxy==1.3.1
MarkupSafe==1.0
mock==2.0.0
orator==0.9.7
pastel==0.1.0
pbr==3.0.1
pendulum==1.2.1
psutil==5.2.2
pyaml==16.12.2
Pygments==2.2.0
pylev==1.3.0
PyMySQL==0.7.11
python-dateutil==2.6.0
python-dotenv==0.6.4
pytz==2017.2
pytzdata==2017.2
PyYAML==3.12
requests==2.18.1
simplejson==3.10.0
six==1.10.0
tzlocal==1.4
urllib3==1.21.1
Werkzeug==0.12.2
wrapt==1.10.10
## Instruction:
Use mysqlclient library instead of buggy pymysql
## Code After:
backpack==0.1
blinker==1.4
certifi==2017.4.17
chardet==3.0.4
cleo==0.6.0
click==6.7
Faker==0.7.17
Flask==0.12.2
flask-orator==0.2.0
idna==2.5
inflection==0.3.1
itsdangerous==0.24
Jinja2==2.9.6
lazy-object-proxy==1.3.1
MarkupSafe==1.0
mock==2.0.0
mysqlclient==1.3.10
orator==0.9.7
pastel==0.1.0
pbr==3.0.1
pendulum==1.2.1
psutil==5.2.2
pyaml==16.12.2
Pygments==2.2.0
pylev==1.3.0
python-dateutil==2.6.0
python-dotenv==0.6.4
pytz==2017.2
pytzdata==2017.2
PyYAML==3.12
requests==2.18.1
simplejson==3.10.0
six==1.10.0
tzlocal==1.4
urllib3==1.21.1
Werkzeug==0.12.2
wrapt==1.10.10
| backpack==0.1
blinker==1.4
certifi==2017.4.17
chardet==3.0.4
cleo==0.6.0
click==6.7
Faker==0.7.17
Flask==0.12.2
flask-orator==0.2.0
idna==2.5
inflection==0.3.1
itsdangerous==0.24
Jinja2==2.9.6
lazy-object-proxy==1.3.1
MarkupSafe==1.0
mock==2.0.0
+ mysqlclient==1.3.10
orator==0.9.7
pastel==0.1.0
pbr==3.0.1
pendulum==1.2.1
psutil==5.2.2
pyaml==16.12.2
Pygments==2.2.0
pylev==1.3.0
- PyMySQL==0.7.11
python-dateutil==2.6.0
python-dotenv==0.6.4
pytz==2017.2
pytzdata==2017.2
PyYAML==3.12
requests==2.18.1
simplejson==3.10.0
six==1.10.0
tzlocal==1.4
urllib3==1.21.1
Werkzeug==0.12.2
wrapt==1.10.10 | 2 | 0.054054 | 1 | 1 |
b58708c7b03b0f29e8aed914fb833d447f98bc26 | lib/backup/storage/object.rb | lib/backup/storage/object.rb |
module Backup
module Storage
class Object
##
# Holds the type attribute
attr_accessor :storage_file
##
# Instantiates a new Backup::Storage::Object and stores the
# full path to the storage file (yaml) in the @storage_file attribute
def initialize(type)
@storage_file = File.join(DATA_PATH, TRIGGER, "#{type}.yml")
end
##
# Tries to load an existing YAML file and returns an
# array of storage objects. If no file exists, an empty
# array gets returned
#
# If a file is loaded it'll sort the array of objects by @time
# descending. The newest backup storage object comes in Backup::Storage::Object.load[0]
# and the oldest in Backup::Storage::Object.load[-1]
def load
if File.exist?(storage_file)
YAML.load_file(storage_file).sort { |a,b| b.time <=> a.time }
else
[]
end
end
##
# Takes the provided objects and converts it to YAML format.
# The YAML data gets written to the storage file
def write(objects)
File.open(storage_file, 'w') do |file|
file.write(objects.to_yaml)
end
end
end
end
end
|
module Backup
module Storage
class Object
##
# Holds the type attribute
attr_accessor :storage_file
##
# Instantiates a new Backup::Storage::Object and stores the
# full path to the storage file (yaml) in the @storage_file attribute
def initialize(type)
@storage_file = File.join(DATA_PATH, TRIGGER, "#{type}.yml")
end
##
# Tries to load an existing YAML file and returns an
# array of storage objects. If no file exists, an empty
# array gets returned
#
# If a file is loaded it'll sort the array of objects by @time
# descending. The newest backup storage object comes in Backup::Storage::Object.load[0]
# and the oldest in Backup::Storage::Object.load[-1]
def load
if File.exist?(storage_file) && !File.zero?(storage_file)
YAML.load_file(storage_file).sort { |a,b| b.time <=> a.time }
else
[]
end
end
##
# Takes the provided objects and converts it to YAML format.
# The YAML data gets written to the storage file
def write(objects)
File.open(storage_file, 'w') do |file|
file.write(objects.to_yaml)
end
end
end
end
end
| Check if config file is empty before attempting to read it. | Check if config file is empty before attempting to read it. | Ruby | mit | martincik/backup,zires/backup,sferik/backup,ccoenen/backup,tian-xiaobo/backup,zires/backup,pat/backup,tian-xiaobo/backup,interu/backup,scalp42/backup,martincik/backup,hiphapis/backup,pawelduda/backup,backup/backup,bukalapak/backup,scalp42/backup,rics3n/backup,McStork/backup,tian-xiaobo/backup,otzy007/backup,bernd/backup,rics3n/backup,ccoenen/backup,otzy007/backup,backup/backup,skcript/backup,skcript/backup,pawelduda/backup,McStork/backup,interu/backup,zBMNForks/backup,reedloden/backup,hiphapis/backup,McStork/backup,john/backup,pollosp/backup,ccoenen/backup,scalp42/backup,zBMNForks/backup,reedloden/backup,pawelduda/backup,zBMNForks/backup,bernd/backup,otzy007/backup,interu/backup,skcript/backup,reedloden/backup,hiphapis/backup,juliancheal/backup,backup/backup,pollosp/backup,pollosp/backup,martincik/backup,rics3n/backup,zires/backup | ruby | ## Code Before:
module Backup
module Storage
class Object
##
# Holds the type attribute
attr_accessor :storage_file
##
# Instantiates a new Backup::Storage::Object and stores the
# full path to the storage file (yaml) in the @storage_file attribute
def initialize(type)
@storage_file = File.join(DATA_PATH, TRIGGER, "#{type}.yml")
end
##
# Tries to load an existing YAML file and returns an
# array of storage objects. If no file exists, an empty
# array gets returned
#
# If a file is loaded it'll sort the array of objects by @time
# descending. The newest backup storage object comes in Backup::Storage::Object.load[0]
# and the oldest in Backup::Storage::Object.load[-1]
def load
if File.exist?(storage_file)
YAML.load_file(storage_file).sort { |a,b| b.time <=> a.time }
else
[]
end
end
##
# Takes the provided objects and converts it to YAML format.
# The YAML data gets written to the storage file
def write(objects)
File.open(storage_file, 'w') do |file|
file.write(objects.to_yaml)
end
end
end
end
end
## Instruction:
Check if config file is empty before attempting to read it.
## Code After:
module Backup
module Storage
class Object
##
# Holds the type attribute
attr_accessor :storage_file
##
# Instantiates a new Backup::Storage::Object and stores the
# full path to the storage file (yaml) in the @storage_file attribute
def initialize(type)
@storage_file = File.join(DATA_PATH, TRIGGER, "#{type}.yml")
end
##
# Tries to load an existing YAML file and returns an
# array of storage objects. If no file exists, an empty
# array gets returned
#
# If a file is loaded it'll sort the array of objects by @time
# descending. The newest backup storage object comes in Backup::Storage::Object.load[0]
# and the oldest in Backup::Storage::Object.load[-1]
def load
if File.exist?(storage_file) && !File.zero?(storage_file)
YAML.load_file(storage_file).sort { |a,b| b.time <=> a.time }
else
[]
end
end
##
# Takes the provided objects and converts it to YAML format.
# The YAML data gets written to the storage file
def write(objects)
File.open(storage_file, 'w') do |file|
file.write(objects.to_yaml)
end
end
end
end
end
|
module Backup
module Storage
class Object
##
# Holds the type attribute
attr_accessor :storage_file
##
# Instantiates a new Backup::Storage::Object and stores the
# full path to the storage file (yaml) in the @storage_file attribute
def initialize(type)
@storage_file = File.join(DATA_PATH, TRIGGER, "#{type}.yml")
end
##
# Tries to load an existing YAML file and returns an
# array of storage objects. If no file exists, an empty
# array gets returned
#
# If a file is loaded it'll sort the array of objects by @time
# descending. The newest backup storage object comes in Backup::Storage::Object.load[0]
# and the oldest in Backup::Storage::Object.load[-1]
def load
- if File.exist?(storage_file)
+ if File.exist?(storage_file) && !File.zero?(storage_file)
YAML.load_file(storage_file).sort { |a,b| b.time <=> a.time }
else
[]
end
end
##
# Takes the provided objects and converts it to YAML format.
# The YAML data gets written to the storage file
def write(objects)
File.open(storage_file, 'w') do |file|
file.write(objects.to_yaml)
end
end
end
end
end | 2 | 0.045455 | 1 | 1 |
4228f1cb025424d2285a7b7c87676e95c6686627 | README.md | README.md | an implementation for gittest api
Our Official site is http://GitTest.com, currently it is only a demo site!
This is open souce project, I want to do a service like GitHub.Com, but it is for testing management.
It should include test plan, test case, test step, test result, test case result, etc, and might provider API for calling in the future.
Since I don't have ability to make this come ture, so I create this open source project here and I am hoping that anyone who is interesting with this can help improve this demo, thanks very much for help!
# Screenshots:
## HomePage

## CasesPage

## StepsPage
 | an implementation for gittest api
Our Official site is http://GitTest.com, currently it is only a demo site!
This is open souce project, I want to do a service like GitHub.Com, but it is for testing management.
It should include test plan, test case, test step, test result, test case result, etc, and might provider API for calling in the future.
Since I don't have ability to make this come ture, so I create this open source project here and I am hoping that anyone who is interesting with this can help improve this demo, thanks very much for help!
# Screenshots:
## Architecture Desgin

## HomePage

## CasesPage

## StepsPage

| Add Architecture Desgin in readme | Add Architecture Desgin in readme | Markdown | mit | gittestapi/gittest,gittestapi/gittest | markdown | ## Code Before:
an implementation for gittest api
Our Official site is http://GitTest.com, currently it is only a demo site!
This is open souce project, I want to do a service like GitHub.Com, but it is for testing management.
It should include test plan, test case, test step, test result, test case result, etc, and might provider API for calling in the future.
Since I don't have ability to make this come ture, so I create this open source project here and I am hoping that anyone who is interesting with this can help improve this demo, thanks very much for help!
# Screenshots:
## HomePage

## CasesPage

## StepsPage

## Instruction:
Add Architecture Desgin in readme
## Code After:
an implementation for gittest api
Our Official site is http://GitTest.com, currently it is only a demo site!
This is open souce project, I want to do a service like GitHub.Com, but it is for testing management.
It should include test plan, test case, test step, test result, test case result, etc, and might provider API for calling in the future.
Since I don't have ability to make this come ture, so I create this open source project here and I am hoping that anyone who is interesting with this can help improve this demo, thanks very much for help!
# Screenshots:
## Architecture Desgin

## HomePage

## CasesPage

## StepsPage

| an implementation for gittest api
Our Official site is http://GitTest.com, currently it is only a demo site!
This is open souce project, I want to do a service like GitHub.Com, but it is for testing management.
It should include test plan, test case, test step, test result, test case result, etc, and might provider API for calling in the future.
Since I don't have ability to make this come ture, so I create this open source project here and I am hoping that anyone who is interesting with this can help improve this demo, thanks very much for help!
# Screenshots:
+ ## Architecture Desgin
+ 
## HomePage

## CasesPage

## StepsPage
 | 2 | 0.1 | 2 | 0 |
08bc1bd87a19def169155364df7be6afbb946f50 | app/views/thredded/shared/nav/_private_topics.html.erb | app/views/thredded/shared/nav/_private_topics.html.erb | <li class="thredded--user-navigation--item thredded--user-navigation--private-topics">
<%= link_to private_topics_path do %>
<%= inline_svg 'thredded/private-messages.svg', class: 'thredded--icon' %>
<%= t('thredded.nav.private_topics') %>
<% if unread_private_topics_count > 0 -%>
<span class="thredded--user-navigation--private-topics--unread">
<%= unread_private_topics_count %>
</span>
<% end -%>
<% end -%>
</li>
| <li class="thredded--user-navigation--item thredded--user-navigation--private-topics">
<%= link_to private_topics_path, rel: 'nofollow' do %>
<%= inline_svg 'thredded/private-messages.svg', class: 'thredded--icon' %>
<%= t('thredded.nav.private_topics') %>
<% if unread_private_topics_count > 0 -%>
<span class="thredded--user-navigation--private-topics--unread">
<%= unread_private_topics_count %>
</span>
<% end -%>
<% end -%>
</li>
| Add `rel="nofollow"` to private topics link | [JRO] Add `rel="nofollow"` to private topics link
We don't want search engines trying to follow this link.
Closes issue #257
| HTML+ERB | mit | thredded/thredded,jvoss/thredded,jayroh/thredded,jayroh/thredded,thredded/thredded,thredded/thredded,jvoss/thredded,jvoss/thredded,jvoss/thredded,thredded/thredded,jayroh/thredded,jayroh/thredded | html+erb | ## Code Before:
<li class="thredded--user-navigation--item thredded--user-navigation--private-topics">
<%= link_to private_topics_path do %>
<%= inline_svg 'thredded/private-messages.svg', class: 'thredded--icon' %>
<%= t('thredded.nav.private_topics') %>
<% if unread_private_topics_count > 0 -%>
<span class="thredded--user-navigation--private-topics--unread">
<%= unread_private_topics_count %>
</span>
<% end -%>
<% end -%>
</li>
## Instruction:
[JRO] Add `rel="nofollow"` to private topics link
We don't want search engines trying to follow this link.
Closes issue #257
## Code After:
<li class="thredded--user-navigation--item thredded--user-navigation--private-topics">
<%= link_to private_topics_path, rel: 'nofollow' do %>
<%= inline_svg 'thredded/private-messages.svg', class: 'thredded--icon' %>
<%= t('thredded.nav.private_topics') %>
<% if unread_private_topics_count > 0 -%>
<span class="thredded--user-navigation--private-topics--unread">
<%= unread_private_topics_count %>
</span>
<% end -%>
<% end -%>
</li>
| <li class="thredded--user-navigation--item thredded--user-navigation--private-topics">
- <%= link_to private_topics_path do %>
+ <%= link_to private_topics_path, rel: 'nofollow' do %>
? +++++++++++++++++
<%= inline_svg 'thredded/private-messages.svg', class: 'thredded--icon' %>
<%= t('thredded.nav.private_topics') %>
<% if unread_private_topics_count > 0 -%>
<span class="thredded--user-navigation--private-topics--unread">
<%= unread_private_topics_count %>
</span>
<% end -%>
<% end -%>
</li> | 2 | 0.181818 | 1 | 1 |
02353c2a5e5286942807167a5232c224f54a34e6 | distribution/template/bin/startClient.sh | distribution/template/bin/startClient.sh |
JAVA_PATH=""
#JAVA_PATH="/usr/sbin/jre1.8.0_77/bin/"
execdir="$(readlink -f `dirname ${BASH_SOURCE[0]}`)"
DJIGGER_HOME="${DJIGGER_HOME:-$(dirname ${execdir})}"
DJIGGER_CONFDIR="${DJIGGER_CONFDIR:-${DJIGGER_HOME}/conf}"
DJIGGER_LIBDIR="${DJIGGER_LIBDIR:-${DJIGGER_HOME}/lib}"
START_OPTS=()
START_OPTS+=("-Dlogback.configurationFile=${DJIGGER_CONFDIR}/logback-client.xml")
START_OPTS+=("${JAVA_OPTS}")
cd "${DJIGGER_HOME}" \
&& exec "${JAVA_HOME}java" ${START_OPTS[@]} -cp "${DJIGGER_LIBDIR}/*:${JAVA_PATH}/../lib/tools.jar" io.djigger.ui.MainFrame \
|| echo "Error: Invalid DJIGGER_HOME"
| execdir="$(readlink -f `dirname ${BASH_SOURCE[0]}`)"
# If you don't have `java` in your $PATH or you want to use a different JDK, either export
# JAVA_HOME in your profile or adjust and uncomment the definition below
#
#DJIGGER_JAVA_HOME="/usr/lib/jdk1.8.0_77"
DJIGGER_HOME="${DJIGGER_HOME:-$(dirname ${execdir})}"
DJIGGER_CONFDIR="${DJIGGER_CONFDIR:-${DJIGGER_HOME}/conf}"
DJIGGER_LIBDIR="${DJIGGER_LIBDIR:-${DJIGGER_HOME}/lib}"
# Required JVM arguments for djigger
DJIGGER_OPTS=("-Dlogback.configurationFile=${DJIGGER_CONFDIR}/logback-client.xml")
# Custom JVM arguments can be set by exporting JAVA_OPTS in your profile
if [ -n "${JAVA_HOME:-${DJIGGER_JAVA_HOME}}" ]; then
RUNJAVA="${JAVA_HOME:-${DJIGGER_JAVA_HOME}}/bin/java"
JDK_LIBS="${JAVA_HOME:-${DJIGGER_JAVA_HOME}}/lib"
else
RUNJAVA="java"
fi
cd "${DJIGGER_HOME}" \
&& exec "${RUNJAVA}" ${DJIGGER_OPTS[@]} -cp "${DJIGGER_LIBDIR}/*:${JDK_LIBS}/tools.jar"
${JAVA_OPTS} io.djigger.ui.MainFrame \
|| echo "Error: Invalid DJIGGER_HOME" | Fix startup with defined JAVA_HOME, allow JDK override | Fix startup with defined JAVA_HOME, allow JDK override
| Shell | agpl-3.0 | denkbar/djigger,denkbar/djigger,denkbar/djigger | shell | ## Code Before:
JAVA_PATH=""
#JAVA_PATH="/usr/sbin/jre1.8.0_77/bin/"
execdir="$(readlink -f `dirname ${BASH_SOURCE[0]}`)"
DJIGGER_HOME="${DJIGGER_HOME:-$(dirname ${execdir})}"
DJIGGER_CONFDIR="${DJIGGER_CONFDIR:-${DJIGGER_HOME}/conf}"
DJIGGER_LIBDIR="${DJIGGER_LIBDIR:-${DJIGGER_HOME}/lib}"
START_OPTS=()
START_OPTS+=("-Dlogback.configurationFile=${DJIGGER_CONFDIR}/logback-client.xml")
START_OPTS+=("${JAVA_OPTS}")
cd "${DJIGGER_HOME}" \
&& exec "${JAVA_HOME}java" ${START_OPTS[@]} -cp "${DJIGGER_LIBDIR}/*:${JAVA_PATH}/../lib/tools.jar" io.djigger.ui.MainFrame \
|| echo "Error: Invalid DJIGGER_HOME"
## Instruction:
Fix startup with defined JAVA_HOME, allow JDK override
## Code After:
execdir="$(readlink -f `dirname ${BASH_SOURCE[0]}`)"
# If you don't have `java` in your $PATH or you want to use a different JDK, either export
# JAVA_HOME in your profile or adjust and uncomment the definition below
#
#DJIGGER_JAVA_HOME="/usr/lib/jdk1.8.0_77"
DJIGGER_HOME="${DJIGGER_HOME:-$(dirname ${execdir})}"
DJIGGER_CONFDIR="${DJIGGER_CONFDIR:-${DJIGGER_HOME}/conf}"
DJIGGER_LIBDIR="${DJIGGER_LIBDIR:-${DJIGGER_HOME}/lib}"
# Required JVM arguments for djigger
DJIGGER_OPTS=("-Dlogback.configurationFile=${DJIGGER_CONFDIR}/logback-client.xml")
# Custom JVM arguments can be set by exporting JAVA_OPTS in your profile
if [ -n "${JAVA_HOME:-${DJIGGER_JAVA_HOME}}" ]; then
RUNJAVA="${JAVA_HOME:-${DJIGGER_JAVA_HOME}}/bin/java"
JDK_LIBS="${JAVA_HOME:-${DJIGGER_JAVA_HOME}}/lib"
else
RUNJAVA="java"
fi
cd "${DJIGGER_HOME}" \
&& exec "${RUNJAVA}" ${DJIGGER_OPTS[@]} -cp "${DJIGGER_LIBDIR}/*:${JDK_LIBS}/tools.jar"
${JAVA_OPTS} io.djigger.ui.MainFrame \
|| echo "Error: Invalid DJIGGER_HOME" | + execdir="$(readlink -f `dirname ${BASH_SOURCE[0]}`)"
- JAVA_PATH=""
- #JAVA_PATH="/usr/sbin/jre1.8.0_77/bin/"
-
- execdir="$(readlink -f `dirname ${BASH_SOURCE[0]}`)"
+ # If you don't have `java` in your $PATH or you want to use a different JDK, either export
+ # JAVA_HOME in your profile or adjust and uncomment the definition below
+ #
+ #DJIGGER_JAVA_HOME="/usr/lib/jdk1.8.0_77"
DJIGGER_HOME="${DJIGGER_HOME:-$(dirname ${execdir})}"
DJIGGER_CONFDIR="${DJIGGER_CONFDIR:-${DJIGGER_HOME}/conf}"
DJIGGER_LIBDIR="${DJIGGER_LIBDIR:-${DJIGGER_HOME}/lib}"
- START_OPTS=()
+ # Required JVM arguments for djigger
- START_OPTS+=("-Dlogback.configurationFile=${DJIGGER_CONFDIR}/logback-client.xml")
? ^^^ - -
+ DJIGGER_OPTS=("-Dlogback.configurationFile=${DJIGGER_CONFDIR}/logback-client.xml")
? ^^^^^^
- START_OPTS+=("${JAVA_OPTS}")
+
+ # Custom JVM arguments can be set by exporting JAVA_OPTS in your profile
+
+ if [ -n "${JAVA_HOME:-${DJIGGER_JAVA_HOME}}" ]; then
+ RUNJAVA="${JAVA_HOME:-${DJIGGER_JAVA_HOME}}/bin/java"
+ JDK_LIBS="${JAVA_HOME:-${DJIGGER_JAVA_HOME}}/lib"
+ else
+ RUNJAVA="java"
+ fi
cd "${DJIGGER_HOME}" \
- && exec "${JAVA_HOME}java" ${START_OPTS[@]} -cp "${DJIGGER_LIBDIR}/*:${JAVA_PATH}/../lib/tools.jar" io.djigger.ui.MainFrame \
+ && exec "${RUNJAVA}" ${DJIGGER_OPTS[@]} -cp "${DJIGGER_LIBDIR}/*:${JDK_LIBS}/tools.jar"
+ ${JAVA_OPTS} io.djigger.ui.MainFrame \
|| echo "Error: Invalid DJIGGER_HOME" | 26 | 1.529412 | 18 | 8 |
29be0ccaa9deb0ced229d2e49b238702769cddb4 | spec/support/helper_methods.rb | spec/support/helper_methods.rb | module RSpecHelpers
def relative_path(path)
RSpec::Core::Metadata.relative_path(path)
end
def ignoring_warnings
original = $VERBOSE
$VERBOSE = nil
result = yield
$VERBOSE = original
result
end
def with_safe_set_to_level_that_triggers_security_errors
Thread.new do
ignoring_warnings { $SAFE = 3 }
yield
end.join
# $SAFE is not supported on Rubinius
unless defined?(Rubinius)
expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
end
end
end
| module RSpecHelpers
SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS = RUBY_VERSION >= '2.3' ? 1 : 3
def relative_path(path)
RSpec::Core::Metadata.relative_path(path)
end
def ignoring_warnings
original = $VERBOSE
$VERBOSE = nil
result = yield
$VERBOSE = original
result
end
def with_safe_set_to_level_that_triggers_security_errors
Thread.new do
ignoring_warnings { $SAFE = SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS }
yield
end.join
# $SAFE is not supported on Rubinius
unless defined?(Rubinius)
expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
end
end
end
| Fix failing specs caused by $SAFE incompatibility on MRI 2.3 | Fix failing specs caused by $SAFE incompatibility on MRI 2.3
ArgumentError:
$SAFE=2 to 4 are obsolete
| Ruby | mit | xmik/rspec-core,rspec/rspec-core,rspec/rspec-core,azbshiri/rspec-core,rspec/rspec-core,xmik/rspec-core,xmik/rspec-core,azbshiri/rspec-core,azbshiri/rspec-core | ruby | ## Code Before:
module RSpecHelpers
def relative_path(path)
RSpec::Core::Metadata.relative_path(path)
end
def ignoring_warnings
original = $VERBOSE
$VERBOSE = nil
result = yield
$VERBOSE = original
result
end
def with_safe_set_to_level_that_triggers_security_errors
Thread.new do
ignoring_warnings { $SAFE = 3 }
yield
end.join
# $SAFE is not supported on Rubinius
unless defined?(Rubinius)
expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
end
end
end
## Instruction:
Fix failing specs caused by $SAFE incompatibility on MRI 2.3
ArgumentError:
$SAFE=2 to 4 are obsolete
## Code After:
module RSpecHelpers
SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS = RUBY_VERSION >= '2.3' ? 1 : 3
def relative_path(path)
RSpec::Core::Metadata.relative_path(path)
end
def ignoring_warnings
original = $VERBOSE
$VERBOSE = nil
result = yield
$VERBOSE = original
result
end
def with_safe_set_to_level_that_triggers_security_errors
Thread.new do
ignoring_warnings { $SAFE = SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS }
yield
end.join
# $SAFE is not supported on Rubinius
unless defined?(Rubinius)
expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
end
end
end
| module RSpecHelpers
+ SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS = RUBY_VERSION >= '2.3' ? 1 : 3
+
def relative_path(path)
RSpec::Core::Metadata.relative_path(path)
end
def ignoring_warnings
original = $VERBOSE
$VERBOSE = nil
result = yield
$VERBOSE = original
result
end
def with_safe_set_to_level_that_triggers_security_errors
Thread.new do
- ignoring_warnings { $SAFE = 3 }
+ ignoring_warnings { $SAFE = SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS }
yield
end.join
# $SAFE is not supported on Rubinius
unless defined?(Rubinius)
expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
end
end
end | 4 | 0.153846 | 3 | 1 |
a707369a96aa892764775146c0ca081c9b95c712 | routes/front.js | routes/front.js | var express = require('express');
var router = express.Router();
router.get('/token', function (req, res) {
res.redirect('/');
});
router.get('/*', function (req, res, next) {
res.render('user/dashboard', { layout: 'user', title: 'Busy' });
});
module.exports = router;
| var express = require('express');
var router = express.Router();
router.get('/*', function (req, res, next) {
res.render('user/dashboard', { layout: 'user', title: 'Busy' });
});
module.exports = router;
| Remove token endPoint; need to redeploy. | Remove token endPoint; need to redeploy.
| JavaScript | mit | Sekhmet/busy,busyorg/busy,ryanbaer/busy,Sekhmet/busy,busyorg/busy,ryanbaer/busy | javascript | ## Code Before:
var express = require('express');
var router = express.Router();
router.get('/token', function (req, res) {
res.redirect('/');
});
router.get('/*', function (req, res, next) {
res.render('user/dashboard', { layout: 'user', title: 'Busy' });
});
module.exports = router;
## Instruction:
Remove token endPoint; need to redeploy.
## Code After:
var express = require('express');
var router = express.Router();
router.get('/*', function (req, res, next) {
res.render('user/dashboard', { layout: 'user', title: 'Busy' });
});
module.exports = router;
| var express = require('express');
var router = express.Router();
-
- router.get('/token', function (req, res) {
- res.redirect('/');
- });
router.get('/*', function (req, res, next) {
res.render('user/dashboard', { layout: 'user', title: 'Busy' });
});
module.exports = router; | 4 | 0.333333 | 0 | 4 |
b13582733af9903711307a79822d396bb912b7ba | .travis.yml | .travis.yml | sudo: required
os: osx
cache:
ccache: true
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
- /usr/local/Cellar
- /usr/local/Caskroom
- /usr/local/opt
- /Applications/
env:
- TRAVIS=1
branches:
only:
- osx
before_install:
- brew update
install:
- brew install ansible
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
script:
- git clone https://github.com/benmezger/dotfiles.git ~/dotfiles
- (cd ~/dotfiles; git checkout osx)
- ansible-galaxy install -r requirements.yml
- ansible-playbook -i inventory osx.yml
| sudo: required
os: osx
cache:
ccache: true
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
- /usr/local/Cellar
- /usr/local/Caskroom
- /usr/local/opt
env:
- TRAVIS=1
branches:
only:
- osx
before_install:
- brew update
install:
- brew install ansible
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
script:
- git clone https://github.com/benmezger/dotfiles.git ~/dotfiles
- (cd ~/dotfiles; git checkout osx)
- ansible-galaxy install -r requirements.yml
- ansible-playbook -i inventory osx.yml
| Remove OSX's /Application directory from Travi's cache system | Test: Remove OSX's /Application directory from Travi's cache system
| YAML | mit | benmezger/dotfiles,benmezger/dotfiles,benmezger/dotfiles,benmezger/dotfiles | yaml | ## Code Before:
sudo: required
os: osx
cache:
ccache: true
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
- /usr/local/Cellar
- /usr/local/Caskroom
- /usr/local/opt
- /Applications/
env:
- TRAVIS=1
branches:
only:
- osx
before_install:
- brew update
install:
- brew install ansible
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
script:
- git clone https://github.com/benmezger/dotfiles.git ~/dotfiles
- (cd ~/dotfiles; git checkout osx)
- ansible-galaxy install -r requirements.yml
- ansible-playbook -i inventory osx.yml
## Instruction:
Test: Remove OSX's /Application directory from Travi's cache system
## Code After:
sudo: required
os: osx
cache:
ccache: true
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
- /usr/local/Cellar
- /usr/local/Caskroom
- /usr/local/opt
env:
- TRAVIS=1
branches:
only:
- osx
before_install:
- brew update
install:
- brew install ansible
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
script:
- git clone https://github.com/benmezger/dotfiles.git ~/dotfiles
- (cd ~/dotfiles; git checkout osx)
- ansible-galaxy install -r requirements.yml
- ansible-playbook -i inventory osx.yml
| sudo: required
os: osx
cache:
ccache: true
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
- /usr/local/Cellar
- /usr/local/Caskroom
- /usr/local/opt
- - /Applications/
env:
- TRAVIS=1
branches:
only:
- osx
before_install:
- brew update
install:
- brew install ansible
- brew install ccache
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
script:
- git clone https://github.com/benmezger/dotfiles.git ~/dotfiles
- (cd ~/dotfiles; git checkout osx)
- ansible-galaxy install -r requirements.yml
- ansible-playbook -i inventory osx.yml | 1 | 0.029412 | 0 | 1 |
e1e4dd5954bcffe9733099903a02a57c19db4530 | CHANGELOG.md | CHANGELOG.md |
* Re-put services as public (see #177)
## v1.5
* Add `process_timeout` option (see #110)
* Add `.gitattributes` (see #159)
* Add specialized response classes (see #172)
* Drop support for php v5.3, 5.4, 5.5 and symfony below v2.7 (see #160)
* Upgrade Snappy to its first stable release (see #175)
* Deprecate Loggable decorator in favor of `setLogger` method added to generators (see #175)
Credits go to: @Soullivaneuh, @valdezalbertm, @akovalyov, @garak, @matudelatower, @NiR-.
|
A BC break has been introduced in v1.5.0: the LoggableGenerator has been moved in a new namespace. This is now fixed.
* Fix BC break due to moved LoggableGenerator (#185)
* Adding support for Symfony 4 (#190)
Credits go to: @jzawadzki and @NiR-. Also, thank you @NAYZO, @carusogabriel and @antondachauer for your tweaks in the docs and for updating PHPUnit tests.
## v1.5.1
* Re-put services as public (see #177)
## v1.5
* Add `process_timeout` option (see #110)
* Add `.gitattributes` (see #159)
* Add specialized response classes (see #172)
* Drop support for php v5.3, 5.4, 5.5 and symfony below v2.7 (see #160)
* Upgrade Snappy to its first stable release (see #175)
* Deprecate Loggable decorator in favor of `setLogger` method added to generators (see #175)
Credits go to: @Soullivaneuh, @valdezalbertm, @akovalyov, @garak, @matudelatower, @NiR-.
| Add a note about v1.5.2 in the changelog | Add a note about v1.5.2 in the changelog
| Markdown | mit | KnpLabs/KnpSnappyBundle | markdown | ## Code Before:
* Re-put services as public (see #177)
## v1.5
* Add `process_timeout` option (see #110)
* Add `.gitattributes` (see #159)
* Add specialized response classes (see #172)
* Drop support for php v5.3, 5.4, 5.5 and symfony below v2.7 (see #160)
* Upgrade Snappy to its first stable release (see #175)
* Deprecate Loggable decorator in favor of `setLogger` method added to generators (see #175)
Credits go to: @Soullivaneuh, @valdezalbertm, @akovalyov, @garak, @matudelatower, @NiR-.
## Instruction:
Add a note about v1.5.2 in the changelog
## Code After:
A BC break has been introduced in v1.5.0: the LoggableGenerator has been moved in a new namespace. This is now fixed.
* Fix BC break due to moved LoggableGenerator (#185)
* Adding support for Symfony 4 (#190)
Credits go to: @jzawadzki and @NiR-. Also, thank you @NAYZO, @carusogabriel and @antondachauer for your tweaks in the docs and for updating PHPUnit tests.
## v1.5.1
* Re-put services as public (see #177)
## v1.5
* Add `process_timeout` option (see #110)
* Add `.gitattributes` (see #159)
* Add specialized response classes (see #172)
* Drop support for php v5.3, 5.4, 5.5 and symfony below v2.7 (see #160)
* Upgrade Snappy to its first stable release (see #175)
* Deprecate Loggable decorator in favor of `setLogger` method added to generators (see #175)
Credits go to: @Soullivaneuh, @valdezalbertm, @akovalyov, @garak, @matudelatower, @NiR-.
| +
+ A BC break has been introduced in v1.5.0: the LoggableGenerator has been moved in a new namespace. This is now fixed.
+
+ * Fix BC break due to moved LoggableGenerator (#185)
+ * Adding support for Symfony 4 (#190)
+
+ Credits go to: @jzawadzki and @NiR-. Also, thank you @NAYZO, @carusogabriel and @antondachauer for your tweaks in the docs and for updating PHPUnit tests.
+
+ ## v1.5.1
* Re-put services as public (see #177)
## v1.5
* Add `process_timeout` option (see #110)
* Add `.gitattributes` (see #159)
* Add specialized response classes (see #172)
* Drop support for php v5.3, 5.4, 5.5 and symfony below v2.7 (see #160)
* Upgrade Snappy to its first stable release (see #175)
* Deprecate Loggable decorator in favor of `setLogger` method added to generators (see #175)
Credits go to: @Soullivaneuh, @valdezalbertm, @akovalyov, @garak, @matudelatower, @NiR-. | 9 | 0.692308 | 9 | 0 |
d50ee615d43ce357fa4896d64890b2f9ec14cc74 | app/views/labels/_form.haml | app/views/labels/_form.haml | %p
%label{:for => 'caption'} Caption:
=text_field :label, :caption
%p
%label{:for => 'numeric'} Value:
=text_field :label, :value
| %p
%label{:for => 'caption'} Caption:
=text_field :label, :caption
| Remove the number field for labels. Its not used. | Remove the number field for labels. Its not used.
| Haml | mit | RAllner/fassets_core,RAllner/fassets_core,fassets/fassets_resources,fassets/fassets_resources | haml | ## Code Before:
%p
%label{:for => 'caption'} Caption:
=text_field :label, :caption
%p
%label{:for => 'numeric'} Value:
=text_field :label, :value
## Instruction:
Remove the number field for labels. Its not used.
## Code After:
%p
%label{:for => 'caption'} Caption:
=text_field :label, :caption
| %p
%label{:for => 'caption'} Caption:
=text_field :label, :caption
- %p
- %label{:for => 'numeric'} Value:
- =text_field :label, :value | 3 | 0.5 | 0 | 3 |
266027514c740c30c0efae5fcd1e2932f1be9933 | perfrunner/tests/ycsb2.py | perfrunner/tests/ycsb2.py | from perfrunner.helpers.cbmonitor import with_stats
from perfrunner.helpers.local import clone_ycsb
from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task
from perfrunner.tests import PerfTest
from perfrunner.tests.n1ql import N1QLTest
class YCSBTest(PerfTest):
def download_ycsb(self):
clone_ycsb(repo=self.test_config.ycsb_settings.repo,
branch=self.test_config.ycsb_settings.branch)
def load(self, *args, **kwargs):
PerfTest.load(self, task=ycsb_data_load_task)
self.check_num_items()
@with_stats
def access(self, *args, **kwargs):
PerfTest.access(self, task=ycsb_task)
def _report_kpi(self):
self.reporter.post_to_sf(
self.metric_helper.parse_ycsb_throughput()
)
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.access()
self.report_kpi()
class YCSBN1QLTest(YCSBTest, N1QLTest):
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.build_index()
self.access()
self.report_kpi()
| from perfrunner.helpers.cbmonitor import with_stats
from perfrunner.helpers.local import clone_ycsb
from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task
from perfrunner.tests import PerfTest
from perfrunner.tests.n1ql import N1QLTest
class YCSBTest(PerfTest):
def download_ycsb(self):
clone_ycsb(repo=self.test_config.ycsb_settings.repo,
branch=self.test_config.ycsb_settings.branch)
def load(self, *args, **kwargs):
PerfTest.load(self, task=ycsb_data_load_task)
@with_stats
def access(self, *args, **kwargs):
PerfTest.access(self, task=ycsb_task)
def _report_kpi(self):
self.reporter.post_to_sf(
self.metric_helper.parse_ycsb_throughput()
)
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.check_num_items()
self.access()
self.report_kpi()
class YCSBN1QLTest(YCSBTest, N1QLTest):
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.check_num_items()
self.build_index()
self.access()
self.report_kpi()
| Check the number of items a little bit later | Check the number of items a little bit later
Due to MB-22749
Change-Id: Icffe46201223efa5645644ca40b99dffe4f0fb31
Reviewed-on: http://review.couchbase.org/76413
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
| Python | apache-2.0 | couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,pavel-paulau/perfrunner,couchbase/perfrunner,couchbase/perfrunner | python | ## Code Before:
from perfrunner.helpers.cbmonitor import with_stats
from perfrunner.helpers.local import clone_ycsb
from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task
from perfrunner.tests import PerfTest
from perfrunner.tests.n1ql import N1QLTest
class YCSBTest(PerfTest):
def download_ycsb(self):
clone_ycsb(repo=self.test_config.ycsb_settings.repo,
branch=self.test_config.ycsb_settings.branch)
def load(self, *args, **kwargs):
PerfTest.load(self, task=ycsb_data_load_task)
self.check_num_items()
@with_stats
def access(self, *args, **kwargs):
PerfTest.access(self, task=ycsb_task)
def _report_kpi(self):
self.reporter.post_to_sf(
self.metric_helper.parse_ycsb_throughput()
)
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.access()
self.report_kpi()
class YCSBN1QLTest(YCSBTest, N1QLTest):
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.build_index()
self.access()
self.report_kpi()
## Instruction:
Check the number of items a little bit later
Due to MB-22749
Change-Id: Icffe46201223efa5645644ca40b99dffe4f0fb31
Reviewed-on: http://review.couchbase.org/76413
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com>
## Code After:
from perfrunner.helpers.cbmonitor import with_stats
from perfrunner.helpers.local import clone_ycsb
from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task
from perfrunner.tests import PerfTest
from perfrunner.tests.n1ql import N1QLTest
class YCSBTest(PerfTest):
def download_ycsb(self):
clone_ycsb(repo=self.test_config.ycsb_settings.repo,
branch=self.test_config.ycsb_settings.branch)
def load(self, *args, **kwargs):
PerfTest.load(self, task=ycsb_data_load_task)
@with_stats
def access(self, *args, **kwargs):
PerfTest.access(self, task=ycsb_task)
def _report_kpi(self):
self.reporter.post_to_sf(
self.metric_helper.parse_ycsb_throughput()
)
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.check_num_items()
self.access()
self.report_kpi()
class YCSBN1QLTest(YCSBTest, N1QLTest):
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
self.check_num_items()
self.build_index()
self.access()
self.report_kpi()
| from perfrunner.helpers.cbmonitor import with_stats
from perfrunner.helpers.local import clone_ycsb
from perfrunner.helpers.worker import ycsb_data_load_task, ycsb_task
from perfrunner.tests import PerfTest
from perfrunner.tests.n1ql import N1QLTest
class YCSBTest(PerfTest):
def download_ycsb(self):
clone_ycsb(repo=self.test_config.ycsb_settings.repo,
branch=self.test_config.ycsb_settings.branch)
def load(self, *args, **kwargs):
PerfTest.load(self, task=ycsb_data_load_task)
- self.check_num_items()
@with_stats
def access(self, *args, **kwargs):
PerfTest.access(self, task=ycsb_task)
def _report_kpi(self):
self.reporter.post_to_sf(
self.metric_helper.parse_ycsb_throughput()
)
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
+ self.check_num_items()
self.access()
self.report_kpi()
class YCSBN1QLTest(YCSBTest, N1QLTest):
def run(self):
self.download_ycsb()
self.load()
self.wait_for_persistence()
+ self.check_num_items()
self.build_index()
self.access()
self.report_kpi() | 3 | 0.06 | 2 | 1 |
5cd8261adec0f6b5de939ecf826ee8638a5a93e4 | src/output.c | src/output.c |
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
(void)write(cur_out,data,len);
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
}
|
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
ssize_t n = write(cur_out,data,len);
(void)n;
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
}
| Work around incompatibility of warn_unused_result on one machine. | Work around incompatibility of warn_unused_result on one machine.
On one machine, the call to "write" in output.c gave this compiler error:
ignoring return value of ‘write’, declared with attribute warn_unused_result
To work around that, the code now grabs the return value and ignores it with
(void).
| C | mit | chkoreff/Fexl,chkoreff/Fexl | c | ## Code Before:
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
(void)write(cur_out,data,len);
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
}
## Instruction:
Work around incompatibility of warn_unused_result on one machine.
On one machine, the call to "write" in output.c gave this compiler error:
ignoring return value of ‘write’, declared with attribute warn_unused_result
To work around that, the code now grabs the return value and ignores it with
(void).
## Code After:
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
ssize_t n = write(cur_out,data,len);
(void)n;
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
}
|
/* Initially we put data to stdout. */
int cur_out = 1;
/* Put data to current output. */
void putd(const char *data, unsigned long len)
{
- (void)write(cur_out,data,len);
? ^^^ ^^
+ ssize_t n = write(cur_out,data,len);
? ^^ ^^^^^^^^^
+ (void)n;
}
void put(const char *data)
{
putd(data, strlen(data));
}
void put_ch(char ch)
{
char buf[1];
buf[0] = ch;
putd(buf,1);
}
void put_long(long x)
{
put(format_long(x));
}
void put_ulong(unsigned long x)
{
put(format_ulong(x));
}
void put_double(double x)
{
put(format_double(x));
}
void nl(void)
{
putd("\n",1);
}
void set_output(int fd)
{
fsync(cur_out);
cur_out = fd;
}
void put_to_error(void)
{
set_output(2);
} | 3 | 0.057692 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.