commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
909f87a693c4a25b68ad77f683b3022f9413ca8e
src/tuxedo-menu.js
src/tuxedo-menu.js
(function ($) { 'use strict'; var settings; $.fn.tuxedoMenu = function (options) { var self = this; // Extend default settings with options settings = $.extend({ triggerSelector: '.tuxedo-menu-trigger', menuSelector: '.tuxedo-menu', isFixed: true }, options); self.addClass('tuxedo-menu tuxedo-menu-pristine animated') .toggleClass('tuxedo-menu-visible', !settings.isFixed) .toggleClass('tuxedo-menu-fixed slideOutLeft', settings.isFixed); $(settings.triggerSelector).addClass('tuxedo-menu-trigger'); $(settings.triggerSelector).on('click', function () { if (!settings.isFixed) { return; } $(settings.menuSelector) .toggleClass('slideInLeft slideOutLeft') .addClass('tuxedo-menu-visible'); }); $(document).click(function (event) { if (!settings.isFixed || $(event.target).is(settings.triggerSelector)) { return; } if (!$(event.target).is(settings.triggerSelector) && !$(event.target).closest(settings.menuSelector).length) { $(settings.menuSelector) .removeClass('slideInLeft') .addClass('slideOutLeft'); } }); return self; }; }(jQuery));
(function ($) { 'use strict'; var settings; $.fn.tuxedoMenu = function (options) { var self = this; // Extend default settings with options settings = $.extend({ triggerSelector: '.tuxedo-menu-trigger', menuSelector: '.tuxedo-menu', isFixed: true }, options); self.addClass('tuxedo-menu tuxedo-menu-pristine animated') .toggleClass('tuxedo-menu-visible', !settings.isFixed) .toggleClass('tuxedo-menu-fixed slideOutLeft', settings.isFixed); $(settings.triggerSelector).addClass('tuxedo-menu-trigger'); $(settings.triggerSelector).on('click', function () { if (!settings.isFixed) { return; } $(settings.menuSelector) .toggleClass('slideInLeft slideOutLeft') .addClass('tuxedo-menu-visible'); return false; }); $(document).click(function (event) { if (!settings.isFixed || $(event.target).is(settings.triggerSelector)) { return; } if (!$(event.target).is(settings.triggerSelector) && !$(event.target).closest(settings.menuSelector).length) { $(settings.menuSelector) .removeClass('slideInLeft') .addClass('slideOutLeft'); } }); return self; }; }(jQuery));
Stop event bubbling when trigger is clicked
Stop event bubbling when trigger is clicked
JavaScript
mit
beekmanlabs/tuxedo-menu,ethanhann/tuxedo-menu,beekmanlabs/tuxedo-menu,ethanhann/tuxedo-menu
javascript
## Code Before: (function ($) { 'use strict'; var settings; $.fn.tuxedoMenu = function (options) { var self = this; // Extend default settings with options settings = $.extend({ triggerSelector: '.tuxedo-menu-trigger', menuSelector: '.tuxedo-menu', isFixed: true }, options); self.addClass('tuxedo-menu tuxedo-menu-pristine animated') .toggleClass('tuxedo-menu-visible', !settings.isFixed) .toggleClass('tuxedo-menu-fixed slideOutLeft', settings.isFixed); $(settings.triggerSelector).addClass('tuxedo-menu-trigger'); $(settings.triggerSelector).on('click', function () { if (!settings.isFixed) { return; } $(settings.menuSelector) .toggleClass('slideInLeft slideOutLeft') .addClass('tuxedo-menu-visible'); }); $(document).click(function (event) { if (!settings.isFixed || $(event.target).is(settings.triggerSelector)) { return; } if (!$(event.target).is(settings.triggerSelector) && !$(event.target).closest(settings.menuSelector).length) { $(settings.menuSelector) .removeClass('slideInLeft') .addClass('slideOutLeft'); } }); return self; }; }(jQuery)); ## Instruction: Stop event bubbling when trigger is clicked ## Code After: (function ($) { 'use strict'; var settings; $.fn.tuxedoMenu = function (options) { var self = this; // Extend default settings with options settings = $.extend({ triggerSelector: '.tuxedo-menu-trigger', menuSelector: '.tuxedo-menu', isFixed: true }, options); self.addClass('tuxedo-menu tuxedo-menu-pristine animated') .toggleClass('tuxedo-menu-visible', !settings.isFixed) .toggleClass('tuxedo-menu-fixed slideOutLeft', settings.isFixed); $(settings.triggerSelector).addClass('tuxedo-menu-trigger'); $(settings.triggerSelector).on('click', function () { if (!settings.isFixed) { return; } $(settings.menuSelector) .toggleClass('slideInLeft slideOutLeft') .addClass('tuxedo-menu-visible'); return false; }); $(document).click(function (event) { if (!settings.isFixed || $(event.target).is(settings.triggerSelector)) { return; } if (!$(event.target).is(settings.triggerSelector) && !$(event.target).closest(settings.menuSelector).length) { $(settings.menuSelector) .removeClass('slideInLeft') .addClass('slideOutLeft'); } }); return self; }; }(jQuery));
09104b033683f9e1ecd419971e79fcceeff57b17
lib/hungry/client.rb
lib/hungry/client.rb
module Hungry # Handles all communication with the API server class Client attr_reader :api_key # Create a hungry client # # @param [String] api_key Your API key. The shirt and shoes of API service # @return Client A new instance of Client def initialize(api_key) @api_key = api_key end # Get a menu # @param [Fixnum, String] id ID of the menu you'd like to see # @return [Menu] an instance of Menu def menu(id) Hungry::Menu.new( get_endpoint("http://menus.nypl.org/api/menus/#{id}"), self ) end # Order a dish # @param [Fixnum, String] id ID of the dish # @return [Dish] an instance of Dish def dish(id) Hungry::Dish.new( get_endpoint("http://menus.nypl.org/api/dishes/#{id}"), self ) end def menus Hungry::MenuList.new( get_endpoint("http://menus.nypl.org/api/menus/"), self ) end protected def get_endpoint(path) # full_path = "http://menus.nypl.org/api/" << path response = Faraday.get path, {"token" => @api_key} JSON.parse(response.body) end end end
module Hungry # Handles all communication with the API server class Client attr_reader :api_key # Create a hungry client # # @param [String] api_key Your API key. The shirt and shoes of API service # @return Client A new instance of Client def initialize(api_key) @api_key = api_key @conn = Faraday.new end # Get a menu # @param [Fixnum, String] id ID of the menu you'd like to see # @return [Menu] an instance of Menu def menu(id) Hungry::Menu.new( get_endpoint("http://menus.nypl.org/api/menus/#{id}"), self ) end # Order a dish # @param [Fixnum, String] id ID of the dish # @return [Dish] an instance of Dish def dish(id) Hungry::Dish.new( get_endpoint("http://menus.nypl.org/api/dishes/#{id}"), self ) end def menus Hungry::MenuList.new( get_endpoint("http://menus.nypl.org/api/menus/"), self ) end protected def get_endpoint(path) # full_path = "http://menus.nypl.org/api/" << path response = @conn.get path, {"token" => @api_key} JSON.parse(response.body) end end end
Create a connection instance in Client
Create a connection instance in Client In order to keep track of rate-limiting as well as retrieve pagination links from headers, we'll need Client to keep a connection instance that we can query.
Ruby
mit
seanredmond/Hungry
ruby
## Code Before: module Hungry # Handles all communication with the API server class Client attr_reader :api_key # Create a hungry client # # @param [String] api_key Your API key. The shirt and shoes of API service # @return Client A new instance of Client def initialize(api_key) @api_key = api_key end # Get a menu # @param [Fixnum, String] id ID of the menu you'd like to see # @return [Menu] an instance of Menu def menu(id) Hungry::Menu.new( get_endpoint("http://menus.nypl.org/api/menus/#{id}"), self ) end # Order a dish # @param [Fixnum, String] id ID of the dish # @return [Dish] an instance of Dish def dish(id) Hungry::Dish.new( get_endpoint("http://menus.nypl.org/api/dishes/#{id}"), self ) end def menus Hungry::MenuList.new( get_endpoint("http://menus.nypl.org/api/menus/"), self ) end protected def get_endpoint(path) # full_path = "http://menus.nypl.org/api/" << path response = Faraday.get path, {"token" => @api_key} JSON.parse(response.body) end end end ## Instruction: Create a connection instance in Client In order to keep track of rate-limiting as well as retrieve pagination links from headers, we'll need Client to keep a connection instance that we can query. ## Code After: module Hungry # Handles all communication with the API server class Client attr_reader :api_key # Create a hungry client # # @param [String] api_key Your API key. The shirt and shoes of API service # @return Client A new instance of Client def initialize(api_key) @api_key = api_key @conn = Faraday.new end # Get a menu # @param [Fixnum, String] id ID of the menu you'd like to see # @return [Menu] an instance of Menu def menu(id) Hungry::Menu.new( get_endpoint("http://menus.nypl.org/api/menus/#{id}"), self ) end # Order a dish # @param [Fixnum, String] id ID of the dish # @return [Dish] an instance of Dish def dish(id) Hungry::Dish.new( get_endpoint("http://menus.nypl.org/api/dishes/#{id}"), self ) end def menus Hungry::MenuList.new( get_endpoint("http://menus.nypl.org/api/menus/"), self ) end protected def get_endpoint(path) # full_path = "http://menus.nypl.org/api/" << path response = @conn.get path, {"token" => @api_key} JSON.parse(response.body) end end end
9650453a7504dd126e0db1f32090a599573d160e
autogen.sh
autogen.sh
ORIGDIR=`pwd` srcdir=`dirname $0` [ -n "$srcdir" ] && cd $srcdir [ ! -d m4 ] && mkdir m4 autoreconf -Wno-portability --force --install -I m4 || exit $? cd $ORIGDIR [ -z "$NO_CONFIGURE" ] && $srcdir/configure --enable-maintainer-mode "$@"
ORIGDIR=`pwd` srcdir=`dirname $0` [ -n "$srcdir" ] && cd $srcdir [ ! -d m4 ] && mkdir m4 autoreconf -Wno-portability --force --install -I m4 || exit $? cd $ORIGDIR if [ -z "$NO_CONFIGURE" ] then $srcdir/configure --enable-maintainer-mode "$@" || exit $? fi exit 0
Fix script exiting with error when NO_CONFIGURE was set.
Fix script exiting with error when NO_CONFIGURE was set.
Shell
mit
maciejmrowiec/masterfiles,frap/masterfiles-1,maciejmrowiec/masterfiles,phnakarin/masterfiles,maciejmrowiec/masterfiles,martingehrke/masterfiles,phnakarin/masterfiles,martingehrke/masterfiles,frap/masterfiles-1,phnakarin/masterfiles,martingehrke/masterfiles,frap/masterfiles-1
shell
## Code Before: ORIGDIR=`pwd` srcdir=`dirname $0` [ -n "$srcdir" ] && cd $srcdir [ ! -d m4 ] && mkdir m4 autoreconf -Wno-portability --force --install -I m4 || exit $? cd $ORIGDIR [ -z "$NO_CONFIGURE" ] && $srcdir/configure --enable-maintainer-mode "$@" ## Instruction: Fix script exiting with error when NO_CONFIGURE was set. ## Code After: ORIGDIR=`pwd` srcdir=`dirname $0` [ -n "$srcdir" ] && cd $srcdir [ ! -d m4 ] && mkdir m4 autoreconf -Wno-portability --force --install -I m4 || exit $? cd $ORIGDIR if [ -z "$NO_CONFIGURE" ] then $srcdir/configure --enable-maintainer-mode "$@" || exit $? fi exit 0
4032d0499571f9e6f34119225dd844917d96f717
.kitchen.yml
.kitchen.yml
--- driver: name: vagrant provisioner: name: chef_zero always_update_cookbooks: true product_name: chef product_version: 14 verifier: name: inspec platforms: - name: centos-7.2 suites: - name: default run_list: - recipe[dockerserver::default] attributes:
--- driver: name: vagrant provisioner: name: chef_zero always_update_cookbooks: true product_name: chef product_version: 15 client_rb: chef_license: accept verifier: name: inspec platforms: - name: centos-7.2 suites: - name: default run_list: - recipe[dockerserver::default] attributes:
Update Kitchen To Chef Infra Client 15
Update Kitchen To Chef Infra Client 15
YAML
mit
gryte/dockerserver
yaml
## Code Before: --- driver: name: vagrant provisioner: name: chef_zero always_update_cookbooks: true product_name: chef product_version: 14 verifier: name: inspec platforms: - name: centos-7.2 suites: - name: default run_list: - recipe[dockerserver::default] attributes: ## Instruction: Update Kitchen To Chef Infra Client 15 ## Code After: --- driver: name: vagrant provisioner: name: chef_zero always_update_cookbooks: true product_name: chef product_version: 15 client_rb: chef_license: accept verifier: name: inspec platforms: - name: centos-7.2 suites: - name: default run_list: - recipe[dockerserver::default] attributes:
895d9c6251ccbafd3ae9c47b163218a27ac23e01
.travis.yml
.travis.yml
sudo: false language: erlang otp_release: - 21.1 - 20.0 - 19.3 before_install: - ./ci before_install "${PWD:?}"/rebar3 - pip install --user codecov install: - ./ci install "${PWD:?}"/rebar3 script: - ./ci script "${PWD:?}"/rebar3 cache: directories: - .plt after_success: - codecov
sudo: false language: erlang otp_release: - 23.0 - 22.3 - 21.3 - 20.3 - 19.3 before_install: - ./ci before_install "${PWD:?}"/rebar3 - pip install --user codecov install: - ./ci install "${PWD:?}"/rebar3 script: - ./ci script "${PWD:?}"/rebar3 cache: directories: - .plt after_success: - codecov
Update check/test target OTP versions
Update check/test target OTP versions
YAML
apache-2.0
inaka/apns4erl
yaml
## Code Before: sudo: false language: erlang otp_release: - 21.1 - 20.0 - 19.3 before_install: - ./ci before_install "${PWD:?}"/rebar3 - pip install --user codecov install: - ./ci install "${PWD:?}"/rebar3 script: - ./ci script "${PWD:?}"/rebar3 cache: directories: - .plt after_success: - codecov ## Instruction: Update check/test target OTP versions ## Code After: sudo: false language: erlang otp_release: - 23.0 - 22.3 - 21.3 - 20.3 - 19.3 before_install: - ./ci before_install "${PWD:?}"/rebar3 - pip install --user codecov install: - ./ci install "${PWD:?}"/rebar3 script: - ./ci script "${PWD:?}"/rebar3 cache: directories: - .plt after_success: - codecov
2d886cdf71e943f2800a1377195f847c3e533b9b
.eslintrc.js
.eslintrc.js
module.exports = { "extends": ["eslint:recommended", "google"], "env": { "browser": true, "es6": true }, "parserOptions": { "ecmaVersion": 2017 } }
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in * compliance with the License. You may obtain a copy of * the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in * writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES * OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing * permissions and limitations under the License. */ module.exports = { "extends": ["eslint:recommended", "google"], "env": { "browser": true, "es6": true }, "parserOptions": { "ecmaVersion": 2017 } }
Use License in esling config file
Use License in esling config file The .eslintrc.js file needs a license so I added one. Change-Id: I212e78b42c0c75f1b58d59712702e83f2cd4d14c
JavaScript
apache-2.0
google/web-serial-polyfill,google/web-serial-polyfill,google/web-serial-polyfill
javascript
## Code Before: module.exports = { "extends": ["eslint:recommended", "google"], "env": { "browser": true, "es6": true }, "parserOptions": { "ecmaVersion": 2017 } } ## Instruction: Use License in esling config file The .eslintrc.js file needs a license so I added one. Change-Id: I212e78b42c0c75f1b58d59712702e83f2cd4d14c ## Code After: /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in * compliance with the License. You may obtain a copy of * the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in * writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES * OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing * permissions and limitations under the License. */ module.exports = { "extends": ["eslint:recommended", "google"], "env": { "browser": true, "es6": true }, "parserOptions": { "ecmaVersion": 2017 } }
0c00acb19274626241f901ea85a124511dfe4526
server/lepton_server.py
server/lepton_server.py
import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo from common.Frame import Frame port = "5556" context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://*:{}".format(port)) widgets = ['Got ', progressbar.Counter(), ' frames (', progressbar.Timer(), ')'] pbar = progressbar.ProgressBar(widgets=widgets, maxval=progressbar.UnknownLength).start() if pylepton is not None: with pylepton.Lepton("/dev/spidev0.1") as lepton: n = 0 while True: arr, idx = lepton.capture() frame = Frame(idx, arr) #frame = Frame(-1, np.random.random_integers(4095, size=(60.,80.))) socket.send(frame.encode()) pbar.update(n) n += 1
import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo from common.Frame import Frame port = "5556" context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://*:{}".format(port)) widgets = ['Got ', progressbar.Counter(), ' frames (', progressbar.Timer(), ')'] pbar = progressbar.ProgressBar(widgets=widgets, maxval=progressbar.UnknownLength).start() if pylepton is not None: with pylepton.Lepton("/dev/spidev0.1") as lepton: n = 0 while True: arr, idx = lepton.capture() frame = Frame(idx, np.squeeze(arr)) #frame = Frame(-1, np.random.random_integers(4095, size=(60.,80.))) socket.send(frame.encode()) pbar.update(n) n += 1
Remove third dimension from image array
Remove third dimension from image array
Python
mit
wonkoderverstaendige/raspi_lepton
python
## Code Before: import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo from common.Frame import Frame port = "5556" context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://*:{}".format(port)) widgets = ['Got ', progressbar.Counter(), ' frames (', progressbar.Timer(), ')'] pbar = progressbar.ProgressBar(widgets=widgets, maxval=progressbar.UnknownLength).start() if pylepton is not None: with pylepton.Lepton("/dev/spidev0.1") as lepton: n = 0 while True: arr, idx = lepton.capture() frame = Frame(idx, arr) #frame = Frame(-1, np.random.random_integers(4095, size=(60.,80.))) socket.send(frame.encode()) pbar.update(n) n += 1 ## Instruction: Remove third dimension from image array ## Code After: import sys import time import zmq import numpy as np try: import progressbar except ImportError: progressbar = None try: import pylepton except ImportError: print "Couldn't import pylepton, using Dummy data!" Lepton = None # importing packages in parent folders is voodoo from common.Frame import Frame port = "5556" context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://*:{}".format(port)) widgets = ['Got ', progressbar.Counter(), ' frames (', progressbar.Timer(), ')'] pbar = progressbar.ProgressBar(widgets=widgets, maxval=progressbar.UnknownLength).start() if pylepton is not None: with pylepton.Lepton("/dev/spidev0.1") as lepton: n = 0 while True: arr, idx = lepton.capture() frame = Frame(idx, np.squeeze(arr)) #frame = Frame(-1, np.random.random_integers(4095, size=(60.,80.))) socket.send(frame.encode()) pbar.update(n) n += 1
5b19808402a5c825815096e88da496ce1855a2e2
app/templates/post.hbs
app/templates/post.hbs
<div class="wrapper"> <article class="wrapper post"> <h1 class="post-title"><span class="ion-social-rss ionicon"></span>{{model.title}}</h1> <div class="article-head"> <div class="post-footer">by Hampton, Michael & Justin</div> <div class="date-header">{{formattedDate}}</div> </div> <section class="post-body"> {{html}} </section> </article> </div>
<div class="wrapper"> <article class="wrapper post"> <h1 class="post-title"><span class="ion-social-rss ionicon"></span>{{model.title}}</h1> <div class="article-head"> <div class="post-footer">by Hampton, Michael & Justin</div> <div class="date-header">{{formattedDate}}</div> </div> <section class="post-body"> {{html}} </section> </article> <!-- All this stuff below here is Disqus code for the blog. You can probably get rid of it if we have our own comment section in the future. --> <div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES * * */ var disqus_shortname = 'wordset'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> </div>
Add Disqus comments to blog
Add Disqus comments to blog See issue /wordset/wordset/issues/51
Handlebars
mit
BryanCode/wordset-ui,kaelig/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,wordset/wordset-ui,kaelig/wordset-ui
handlebars
## Code Before: <div class="wrapper"> <article class="wrapper post"> <h1 class="post-title"><span class="ion-social-rss ionicon"></span>{{model.title}}</h1> <div class="article-head"> <div class="post-footer">by Hampton, Michael & Justin</div> <div class="date-header">{{formattedDate}}</div> </div> <section class="post-body"> {{html}} </section> </article> </div> ## Instruction: Add Disqus comments to blog See issue /wordset/wordset/issues/51 ## Code After: <div class="wrapper"> <article class="wrapper post"> <h1 class="post-title"><span class="ion-social-rss ionicon"></span>{{model.title}}</h1> <div class="article-head"> <div class="post-footer">by Hampton, Michael & Justin</div> <div class="date-header">{{formattedDate}}</div> </div> <section class="post-body"> {{html}} </section> </article> <!-- All this stuff below here is Disqus code for the blog. You can probably get rid of it if we have our own comment section in the future. --> <div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES * * */ var disqus_shortname = 'wordset'; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> </div>
96cb966e9daf67909ed35c2163ee57becacdf6f7
.github/workflows/ci.yml
.github/workflows/ci.yml
name: CI on: [push, pull_request] jobs: tests: name: Tests strategy: fail-fast: false matrix: otp: ['19.3', '22.3', 24] runs-on: ubuntu-20.04 container: image: erlang:${{ matrix.otp }} steps: - uses: actions/checkout@v2 - name: Cache rebar3 uses: actions/cache@v2 with: path: | ~/.cache/rebar3/ key: ${{matrix.otp}}-${{hashFiles('rebar.config')}} - run: ./configure --enable-gcov - run: rebar3 compile - run: rebar3 xref - run: rebar3 dialyzer - run: rebar3 eunit -v - name: Send to Coveralls if: matrix.otp == 24 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | COVERALLS=true rebar3 as test coveralls send curl -v -k https://coveralls.io/webhook \ --header "Content-Type: application/json" \ --data '{"repo_name":"$GITHUB_REPOSITORY", "repo_token":"$GITHUB_TOKEN", "payload":{"build_num":$GITHUB_RUN_ID, "status":"done"}}'
name: CI on: [push, pull_request] jobs: tests: name: Tests strategy: fail-fast: false matrix: otp: ['19.3', '22.3', 24] runs-on: ubuntu-20.04 container: image: erlang:${{ matrix.otp }} steps: - uses: actions/checkout@v2 - name: Cache rebar3 uses: actions/cache@v2 with: path: | ~/.cache/rebar3/ key: ${{matrix.otp}}-${{hashFiles('rebar.config')}} - run: ./configure --enable-gcov - run: rebar3 compile - run: rebar3 xref - run: rebar3 dialyzer - name: Run tests to obtain Erlang coverage run: | mv test/unload_test.erl . rebar3 eunit -v mv _build/test/cover/eunit.coverdata . - name: Run tests to obtain C coverage run: | mv unload_test.erl test/ rebar3 eunit -v mv eunit.coverdata _build/test/cover/ - name: Send to Coveralls if: matrix.otp == 24 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | COVERALLS=true rebar3 as test coveralls send curl -v -k https://coveralls.io/webhook \ --header "Content-Type: application/json" \ --data '{"repo_name":"$GITHUB_REPOSITORY", "repo_token":"$GITHUB_TOKEN", "payload":{"build_num":$GITHUB_RUN_ID, "status":"done"}}'
Use dirty workaround to get Erlang and C coverage
Use dirty workaround to get Erlang and C coverage
YAML
apache-2.0
processone/fast_yaml
yaml
## Code Before: name: CI on: [push, pull_request] jobs: tests: name: Tests strategy: fail-fast: false matrix: otp: ['19.3', '22.3', 24] runs-on: ubuntu-20.04 container: image: erlang:${{ matrix.otp }} steps: - uses: actions/checkout@v2 - name: Cache rebar3 uses: actions/cache@v2 with: path: | ~/.cache/rebar3/ key: ${{matrix.otp}}-${{hashFiles('rebar.config')}} - run: ./configure --enable-gcov - run: rebar3 compile - run: rebar3 xref - run: rebar3 dialyzer - run: rebar3 eunit -v - name: Send to Coveralls if: matrix.otp == 24 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | COVERALLS=true rebar3 as test coveralls send curl -v -k https://coveralls.io/webhook \ --header "Content-Type: application/json" \ --data '{"repo_name":"$GITHUB_REPOSITORY", "repo_token":"$GITHUB_TOKEN", "payload":{"build_num":$GITHUB_RUN_ID, "status":"done"}}' ## Instruction: Use dirty workaround to get Erlang and C coverage ## Code After: name: CI on: [push, pull_request] jobs: tests: name: Tests strategy: fail-fast: false matrix: otp: ['19.3', '22.3', 24] runs-on: ubuntu-20.04 container: image: erlang:${{ matrix.otp }} steps: - uses: actions/checkout@v2 - name: Cache rebar3 uses: actions/cache@v2 with: path: | ~/.cache/rebar3/ key: ${{matrix.otp}}-${{hashFiles('rebar.config')}} - run: ./configure --enable-gcov - run: rebar3 compile - run: rebar3 xref - run: rebar3 dialyzer - name: Run tests to obtain Erlang coverage run: | mv test/unload_test.erl . rebar3 eunit -v mv _build/test/cover/eunit.coverdata . - name: Run tests to obtain C coverage run: | mv unload_test.erl test/ rebar3 eunit -v mv eunit.coverdata _build/test/cover/ - name: Send to Coveralls if: matrix.otp == 24 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | COVERALLS=true rebar3 as test coveralls send curl -v -k https://coveralls.io/webhook \ --header "Content-Type: application/json" \ --data '{"repo_name":"$GITHUB_REPOSITORY", "repo_token":"$GITHUB_TOKEN", "payload":{"build_num":$GITHUB_RUN_ID, "status":"done"}}'
b751ec5761a9bbe60c4ba7b0665e3b9af89bfce6
cookbooks/nginx/templates/default/nginx.conf.erb
cookbooks/nginx/templates/default/nginx.conf.erb
user nginx; worker_processes 4; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; }
<% if node[:lsb][:release].to_f >= 14.04 -%> user www-data; <% else -%> user nginx; <% end -%> worker_processes <%= node['cpu']['total'] %>; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; }
Support nginx on 14.04 + dynamic number of worker processes based on CPUs
Support nginx on 14.04 + dynamic number of worker processes based on CPUs
HTML+ERB
apache-2.0
zerebubuth/openstreetmap-chef,tomhughes/openstreetmap-chef,openstreetmap/chef,Firefishy/chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,gravitystorm/chef,Firefishy/chef,tomhughes/openstreetmap-chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,zerebubuth/openstreetmap-chef,Firefishy/chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,openstreetmap/chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,Firefishy/chef,gravitystorm/chef,gravitystorm/chef,openstreetmap/chef,gravitystorm/chef,gravitystorm/chef,openstreetmap/chef,Firefishy/chef,zerebubuth/openstreetmap-chef,openstreetmap/chef,Firefishy/chef,Firefishy/chef,tomhughes/openstreetmap-chef,tomhughes/openstreetmap-chef,gravitystorm/chef,openstreetmap/chef,gravitystorm/chef,Firefishy/chef,gravitystorm/chef
html+erb
## Code Before: user nginx; worker_processes 4; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; } ## Instruction: Support nginx on 14.04 + dynamic number of worker processes based on CPUs ## Code After: <% if node[:lsb][:release].to_f >= 14.04 -%> user www-data; <% else -%> user nginx; <% end -%> worker_processes <%= node['cpu']['total'] %>; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; }
8130376565ae1bc2776409589509322562fc7a16
docs/orm_helpers.rst
docs/orm_helpers.rst
ORM helpers =========== .. module:: sqlalchemy_utils.functions escape_like ^^^^^^^^^^^ .. autofunction:: escape_like get_bind ^^^^^^^^ .. autofunction:: get_bind get_column_key ^^^^^^^^^^^^^^ .. autofunction:: get_column_key get_columns ^^^^^^^^^^^ .. autofunction:: get_columns get_declarative_base ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: get_declarative_base get_mapper ^^^^^^^^^^ .. autofunction:: get_mapper get_primary_keys ^^^^^^^^^^^^^^^^ .. autofunction:: get_primary_keys get_tables ^^^^^^^^^^ .. autofunction:: get_tables query_entities ^^^^^^^^^^^^^^ .. autofunction:: query_entities has_any_changes ^^^^^^^^^^^^^^^ .. autofunction:: has_any_changes has_changes ^^^^^^^^^^^ .. autofunction:: has_changes identity ^^^^^^^^ .. autofunction:: identity naturally_equivalent ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: naturally_equivalent sort_query ^^^^^^^^^^ .. autofunction:: sort_query
ORM helpers =========== .. module:: sqlalchemy_utils.functions escape_like ^^^^^^^^^^^ .. autofunction:: escape_like get_bind ^^^^^^^^ .. autofunction:: get_bind get_column_key ^^^^^^^^^^^^^^ .. autofunction:: get_column_key get_columns ^^^^^^^^^^^ .. autofunction:: get_columns get_declarative_base ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: get_declarative_base get_mapper ^^^^^^^^^^ .. autofunction:: get_mapper get_primary_keys ^^^^^^^^^^^^^^^^ .. autofunction:: get_primary_keys get_tables ^^^^^^^^^^ .. autofunction:: get_tables query_entities ^^^^^^^^^^^^^^ .. autofunction:: query_entities has_changes ^^^^^^^^^^^ .. autofunction:: has_changes identity ^^^^^^^^ .. autofunction:: identity naturally_equivalent ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: naturally_equivalent sort_query ^^^^^^^^^^ .. autofunction:: sort_query
Remove has_any_changes from docs (deprecated)
Remove has_any_changes from docs (deprecated)
reStructuredText
bsd-3-clause
joshfriend/sqlalchemy-utils,JackWink/sqlalchemy-utils,tonyseek/sqlalchemy-utils,spoqa/sqlalchemy-utils,cheungpat/sqlalchemy-utils,konstantinoskostis/sqlalchemy-utils,joshfriend/sqlalchemy-utils,tonyseek/sqlalchemy-utils,rmoorman/sqlalchemy-utils,marrybird/sqlalchemy-utils
restructuredtext
## Code Before: ORM helpers =========== .. module:: sqlalchemy_utils.functions escape_like ^^^^^^^^^^^ .. autofunction:: escape_like get_bind ^^^^^^^^ .. autofunction:: get_bind get_column_key ^^^^^^^^^^^^^^ .. autofunction:: get_column_key get_columns ^^^^^^^^^^^ .. autofunction:: get_columns get_declarative_base ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: get_declarative_base get_mapper ^^^^^^^^^^ .. autofunction:: get_mapper get_primary_keys ^^^^^^^^^^^^^^^^ .. autofunction:: get_primary_keys get_tables ^^^^^^^^^^ .. autofunction:: get_tables query_entities ^^^^^^^^^^^^^^ .. autofunction:: query_entities has_any_changes ^^^^^^^^^^^^^^^ .. autofunction:: has_any_changes has_changes ^^^^^^^^^^^ .. autofunction:: has_changes identity ^^^^^^^^ .. autofunction:: identity naturally_equivalent ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: naturally_equivalent sort_query ^^^^^^^^^^ .. autofunction:: sort_query ## Instruction: Remove has_any_changes from docs (deprecated) ## Code After: ORM helpers =========== .. module:: sqlalchemy_utils.functions escape_like ^^^^^^^^^^^ .. autofunction:: escape_like get_bind ^^^^^^^^ .. autofunction:: get_bind get_column_key ^^^^^^^^^^^^^^ .. autofunction:: get_column_key get_columns ^^^^^^^^^^^ .. autofunction:: get_columns get_declarative_base ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: get_declarative_base get_mapper ^^^^^^^^^^ .. autofunction:: get_mapper get_primary_keys ^^^^^^^^^^^^^^^^ .. autofunction:: get_primary_keys get_tables ^^^^^^^^^^ .. autofunction:: get_tables query_entities ^^^^^^^^^^^^^^ .. autofunction:: query_entities has_changes ^^^^^^^^^^^ .. autofunction:: has_changes identity ^^^^^^^^ .. autofunction:: identity naturally_equivalent ^^^^^^^^^^^^^^^^^^^^ .. autofunction:: naturally_equivalent sort_query ^^^^^^^^^^ .. autofunction:: sort_query
fb9313d8be844c94e3fa96ce40bcbb040c2fb652
dev/golang/type/README.md
dev/golang/type/README.md
* [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case)
* [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) * [Convert an integer to a byte array](https://stackoverflow.com/questions/16888357/convert-an-integer-to-a-byte-array)
Add Convert an integer to a byte array
Add Convert an integer to a byte array
Markdown
mit
northbright/bookmarks,northbright/bookmarks,northbright/bookmarks
markdown
## Code Before: * [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) ## Instruction: Add Convert an integer to a byte array ## Code After: * [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) * [Convert an integer to a byte array](https://stackoverflow.com/questions/16888357/convert-an-integer-to-a-byte-array)
5d4eec08a19cb0f33eaa4d37490e30a00c496ba0
app/views/explore/projects/_project.html.haml
app/views/explore/projects/_project.html.haml
%li %h4.project-title .project-access-icon = visibility_level_icon(project.visibility_level) = link_to project.name_with_namespace, [project.namespace.becomes(Namespace), project] %span.pull-right %i.fa.fa-star = project.star_count .project-info - if project.description.present? %p.project-description.str-truncated = project.description .repo-info - unless project.empty_repo? = link_to pluralize(round_commit_count(project), 'commit'), namespace_project_commits_path(project.namespace, project, project.default_branch) &middot; = link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project) &middot; = link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project) - else %i.fa.fa-exclamation-triangle Empty repository
%li %h4.project-title .project-access-icon = visibility_level_icon(project.visibility_level) = link_to project.name_with_namespace, [project.namespace.becomes(Namespace), project] %span.pull-right %i.fa.fa-star = project.star_count .project-info - if project.description.present? .project-description.str-truncated = markdown(project.description, pipeline: :description) .repo-info - unless project.empty_repo? = link_to pluralize(round_commit_count(project), 'commit'), namespace_project_commits_path(project.namespace, project, project.default_branch) &middot; = link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project) &middot; = link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project) - else %i.fa.fa-exclamation-triangle Empty repository
Apply markdown filter for project descriptions on explore view
Apply markdown filter for project descriptions on explore view Signed-off-by: Sven Strickroth <[email protected]>
Haml
mit
kemenaran/gitlabhq,pulkit21/gitlabhq,dplarson/gitlabhq,yfaizal/gitlabhq,whluwit/gitlabhq,nmav/gitlabhq,MauriceMohlek/gitlabhq,dukex/gitlabhq,larryli/gitlabhq,fgbreel/gitlabhq,hzy001/gitlabhq,liyakun/gitlabhq,axilleas/gitlabhq,Devin001/gitlabhq,k4zzk/gitlabhq,pjknkda/gitlabhq,dreampet/gitlab,sonalkr132/gitlabhq,dreampet/gitlab,OlegGirko/gitlab-ce,liyakun/gitlabhq,WSDC-NITWarangal/gitlabhq,TheWatcher/gitlabhq,pjknkda/gitlabhq,t-zuehlsdorff/gitlabhq,cui-liqiang/gitlab-ce,bozaro/gitlabhq,larryli/gitlabhq,stanhu/gitlabhq,jrjang/gitlab-ce,delkyd/gitlabhq,iiet/iiet-git,fantasywind/gitlabhq,fantasywind/gitlabhq,ksoichiro/gitlabhq,larryli/gitlabhq,SVArago/gitlabhq,pulkit21/gitlabhq,szechyjs/gitlabhq,icedwater/gitlabhq,ordiychen/gitlabhq,SVArago/gitlabhq,Razer6/gitlabhq,bbodenmiller/gitlabhq,michaKFromParis/gitlabhq,k4zzk/gitlabhq,allistera/gitlabhq,OlegGirko/gitlab-ce,whluwit/gitlabhq,copystudy/gitlabhq,screenpages/gitlabhq,dplarson/gitlabhq,koreamic/gitlabhq,michaKFromParis/sparkslab,rebecamendez/gitlabhq,mrb/gitlabhq,hacsoc/gitlabhq,pulkit21/gitlabhq,DanielZhangQingLong/gitlabhq,theonlydoo/gitlabhq,shinexiao/gitlabhq,sonalkr132/gitlabhq,vjustov/gitlabhq,htve/GitlabForChinese,ordiychen/gitlabhq,OlegGirko/gitlab-ce,liyakun/gitlabhq,jirutka/gitlabhq,fpgentil/gitlabhq,yatish27/gitlabhq,sue445/gitlabhq,duduribeiro/gitlabhq,LUMC/gitlabhq,louahola/gitlabhq,ferdinandrosario/gitlabhq,sekcheong/gitlabhq,Telekom-PD/gitlabhq,iiet/iiet-git,nmav/gitlabhq,yfaizal/gitlabhq,michaKFromParis/gitlabhq,cui-liqiang/gitlab-ce,wangcan2014/gitlabhq,DanielZhangQingLong/gitlabhq,Exeia/gitlabhq,salipro4ever/gitlabhq,jrjang/gitlabhq,SVArago/gitlabhq,yonglehou/gitlabhq,it33/gitlabhq,szechyjs/gitlabhq,dukex/gitlabhq,darkrasid/gitlabhq,mr-dxdy/gitlabhq,Soullivaneuh/gitlabhq,WSDC-NITWarangal/gitlabhq,salipro4ever/gitlabhq,hacsoc/gitlabhq,joalmeid/gitlabhq,mmkassem/gitlabhq,jaepyoung/gitlabhq,copystudy/gitlabhq,jrjang/gitlabhq,LUMC/gitlabhq,martinma4/gitlabhq,ikappas/gitlabhq,mmkassem/gitlabhq,Soullivaneuh/gitlabhq,stoplightio/gitlabhq,hq804116393/gitlabhq,Exeia/gitlabhq,duduribeiro/gitlabhq,H3Chief/gitlabhq,shinexiao/gitlabhq,martijnvermaat/gitlabhq,darkrasid/gitlabhq,openwide-java/gitlabhq,ferdinandrosario/gitlabhq,LUMC/gitlabhq,fgbreel/gitlabhq,cui-liqiang/gitlab-ce,Devin001/gitlabhq,mrb/gitlabhq,daiyu/gitlab-zh,darkrasid/gitlabhq,htve/GitlabForChinese,sekcheong/gitlabhq,icedwater/gitlabhq,fscherwi/gitlabhq,martinma4/gitlabhq,stanhu/gitlabhq,mr-dxdy/gitlabhq,copystudy/gitlabhq,icedwater/gitlabhq,ttasanen/gitlabhq,sonalkr132/gitlabhq,yatish27/gitlabhq,rumpelsepp/gitlabhq,sue445/gitlabhq,wangcan2014/gitlabhq,Burick/gitlabhq,wangcan2014/gitlabhq,ngpestelos/gitlabhq,allistera/gitlabhq,hq804116393/gitlabhq,pjknkda/gitlabhq,Tyrael/gitlabhq,joalmeid/gitlabhq,folpindo/gitlabhq,stoplightio/gitlabhq,since2014/gitlabhq,allysonbarros/gitlabhq,yatish27/gitlabhq,jirutka/gitlabhq,martijnvermaat/gitlabhq,jaepyoung/gitlabhq,bozaro/gitlabhq,stoplightio/gitlabhq,nmav/gitlabhq,DanielZhangQingLong/gitlabhq,sekcheong/gitlabhq,vjustov/gitlabhq,ttasanen/gitlabhq,t-zuehlsdorff/gitlabhq,fpgentil/gitlabhq,folpindo/gitlabhq,martinma4/gitlabhq,it33/gitlabhq,vjustov/gitlabhq,michaKFromParis/gitlabhqold,mrb/gitlabhq,michaKFromParis/sparkslab,pjknkda/gitlabhq,NKMR6194/gitlabhq,since2014/gitlabhq,allysonbarros/gitlabhq,whluwit/gitlabhq,iiet/iiet-git,since2014/gitlabhq,aaronsnyder/gitlabhq,louahola/gitlabhq,Devin001/gitlabhq,dwrensha/gitlabhq,k4zzk/gitlabhq,duduribeiro/gitlabhq,mr-dxdy/gitlabhq,hzy001/gitlabhq,iiet/iiet-git,theonlydoo/gitlabhq,vjustov/gitlabhq,stanhu/gitlabhq,H3Chief/gitlabhq,Tyrael/gitlabhq,tk23/gitlabhq,sonalkr132/gitlabhq,OtkurBiz/gitlabhq,DanielZhangQingLong/gitlabhq,LUMC/gitlabhq,yfaizal/gitlabhq,michaKFromParis/sparkslab,OlegGirko/gitlab-ce,tk23/gitlabhq,martinma4/gitlabhq,fscherwi/gitlabhq,folpindo/gitlabhq,yonglehou/gitlabhq,pulkit21/gitlabhq,copystudy/gitlabhq,TheWatcher/gitlabhq,nguyen-tien-mulodo/gitlabhq,hacsoc/gitlabhq,michaKFromParis/gitlabhqold,daiyu/gitlab-zh,dwrensha/gitlabhq,koreamic/gitlabhq,Burick/gitlabhq,jrjang/gitlabhq,Datacom/gitlabhq,delkyd/gitlabhq,ngpestelos/gitlabhq,bozaro/gitlabhq,ttasanen/gitlabhq,Burick/gitlabhq,fscherwi/gitlabhq,ksoichiro/gitlabhq,dwrensha/gitlabhq,larryli/gitlabhq,allistera/gitlabhq,gopeter/gitlabhq,aaronsnyder/gitlabhq,it33/gitlabhq,louahola/gitlabhq,hzy001/gitlabhq,chenrui2014/gitlabhq,joalmeid/gitlabhq,axilleas/gitlabhq,fpgentil/gitlabhq,MauriceMohlek/gitlabhq,delkyd/gitlabhq,Datacom/gitlabhq,OtkurBiz/gitlabhq,Burick/gitlabhq,hq804116393/gitlabhq,axilleas/gitlabhq,michaKFromParis/gitlabhqold,OtkurBiz/gitlabhq,stoplightio/gitlabhq,jrjang/gitlab-ce,jaepyoung/gitlabhq,ngpestelos/gitlabhq,szechyjs/gitlabhq,michaKFromParis/gitlabhqold,MauriceMohlek/gitlabhq,jrjang/gitlabhq,fantasywind/gitlabhq,openwide-java/gitlabhq,shinexiao/gitlabhq,t-zuehlsdorff/gitlabhq,duduribeiro/gitlabhq,sue445/gitlabhq,Devin001/gitlabhq,cui-liqiang/gitlab-ce,bozaro/gitlabhq,mrb/gitlabhq,fgbreel/gitlabhq,axilleas/gitlabhq,aaronsnyder/gitlabhq,stanhu/gitlabhq,Razer6/gitlabhq,daiyu/gitlab-zh,TheWatcher/gitlabhq,H3Chief/gitlabhq,screenpages/gitlabhq,ikappas/gitlabhq,chenrui2014/gitlabhq,ikappas/gitlabhq,mr-dxdy/gitlabhq,theonlydoo/gitlabhq,rumpelsepp/gitlabhq,sekcheong/gitlabhq,htve/GitlabForChinese,Datacom/gitlabhq,shinexiao/gitlabhq,chenrui2014/gitlabhq,nguyen-tien-mulodo/gitlabhq,k4zzk/gitlabhq,allistera/gitlabhq,Tyrael/gitlabhq,dplarson/gitlabhq,ksoichiro/gitlabhq,folpindo/gitlabhq,ordiychen/gitlabhq,dukex/gitlabhq,Telekom-PD/gitlabhq,fpgentil/gitlabhq,htve/GitlabForChinese,aaronsnyder/gitlabhq,wangcan2014/gitlabhq,daiyu/gitlab-zh,michaKFromParis/sparkslab,szechyjs/gitlabhq,michaKFromParis/gitlabhq,Exeia/gitlabhq,dreampet/gitlab,bbodenmiller/gitlabhq,openwide-java/gitlabhq,dreampet/gitlab,michaKFromParis/gitlabhq,gopeter/gitlabhq,delkyd/gitlabhq,sue445/gitlabhq,WSDC-NITWarangal/gitlabhq,liyakun/gitlabhq,salipro4ever/gitlabhq,ordiychen/gitlabhq,Razer6/gitlabhq,hzy001/gitlabhq,koreamic/gitlabhq,allysonbarros/gitlabhq,dukex/gitlabhq,chenrui2014/gitlabhq,ngpestelos/gitlabhq,gopeter/gitlabhq,hq804116393/gitlabhq,SVArago/gitlabhq,bbodenmiller/gitlabhq,Tyrael/gitlabhq,TheWatcher/gitlabhq,rebecamendez/gitlabhq,jirutka/gitlabhq,whluwit/gitlabhq,kemenaran/gitlabhq,louahola/gitlabhq,joalmeid/gitlabhq,WSDC-NITWarangal/gitlabhq,yonglehou/gitlabhq,H3Chief/gitlabhq,koreamic/gitlabhq,hacsoc/gitlabhq,NKMR6194/gitlabhq,OtkurBiz/gitlabhq,nguyen-tien-mulodo/gitlabhq,it33/gitlabhq,ttasanen/gitlabhq,fscherwi/gitlabhq,dplarson/gitlabhq,ikappas/gitlabhq,t-zuehlsdorff/gitlabhq,bbodenmiller/gitlabhq,since2014/gitlabhq,icedwater/gitlabhq,salipro4ever/gitlabhq,rebecamendez/gitlabhq,gopeter/gitlabhq,fantasywind/gitlabhq,rebecamendez/gitlabhq,screenpages/gitlabhq,Telekom-PD/gitlabhq,martijnvermaat/gitlabhq,allysonbarros/gitlabhq,ferdinandrosario/gitlabhq,NKMR6194/gitlabhq,Soullivaneuh/gitlabhq,nguyen-tien-mulodo/gitlabhq,kemenaran/gitlabhq,jrjang/gitlab-ce,Datacom/gitlabhq,ksoichiro/gitlabhq,MauriceMohlek/gitlabhq,martijnvermaat/gitlabhq,Exeia/gitlabhq,theonlydoo/gitlabhq,yonglehou/gitlabhq,Razer6/gitlabhq,mmkassem/gitlabhq,jaepyoung/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,kemenaran/gitlabhq,ferdinandrosario/gitlabhq,tk23/gitlabhq,tk23/gitlabhq,darkrasid/gitlabhq,openwide-java/gitlabhq,yatish27/gitlabhq,rumpelsepp/gitlabhq,NKMR6194/gitlabhq,dwrensha/gitlabhq,Telekom-PD/gitlabhq,rumpelsepp/gitlabhq,nmav/gitlabhq,screenpages/gitlabhq,yfaizal/gitlabhq,Soullivaneuh/gitlabhq,jrjang/gitlab-ce,fgbreel/gitlabhq
haml
## Code Before: %li %h4.project-title .project-access-icon = visibility_level_icon(project.visibility_level) = link_to project.name_with_namespace, [project.namespace.becomes(Namespace), project] %span.pull-right %i.fa.fa-star = project.star_count .project-info - if project.description.present? %p.project-description.str-truncated = project.description .repo-info - unless project.empty_repo? = link_to pluralize(round_commit_count(project), 'commit'), namespace_project_commits_path(project.namespace, project, project.default_branch) &middot; = link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project) &middot; = link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project) - else %i.fa.fa-exclamation-triangle Empty repository ## Instruction: Apply markdown filter for project descriptions on explore view Signed-off-by: Sven Strickroth <[email protected]> ## Code After: %li %h4.project-title .project-access-icon = visibility_level_icon(project.visibility_level) = link_to project.name_with_namespace, [project.namespace.becomes(Namespace), project] %span.pull-right %i.fa.fa-star = project.star_count .project-info - if project.description.present? .project-description.str-truncated = markdown(project.description, pipeline: :description) .repo-info - unless project.empty_repo? = link_to pluralize(round_commit_count(project), 'commit'), namespace_project_commits_path(project.namespace, project, project.default_branch) &middot; = link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project) &middot; = link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project) - else %i.fa.fa-exclamation-triangle Empty repository
338d62bc26a8f9251a3ea68a3b6d98faec2cb844
scss/css/_grid.scss
scss/css/_grid.scss
// CSS: Grid // Project: WFPUI // Author: Matthew Morek ([email protected]) // URL: http://matthewmorek.com @import "../modules/grid"; @import "grid-units"; @mixin grid { @include grid--wrapper; &[class*="wfp-u-"] { font-family: $sans-serif-stack; } } .opera-only :-o-prefocus, .wfp-grid { word-spacing: -0.43em; } .wfp-grid { @include grid; [class*="wfp-u-"] { @include grid--unit; } }
// CSS: Grid // Project: WFPUI // Author: Matthew Morek ([email protected]) // URL: http://matthewmorek.com @import "../init"; @import "../modules/grid"; @import "grid-units"; @mixin grid { @include grid--wrapper; &[class*="wfp-u-"] { font-family: $sans-serif-stack; } } .opera-only :-o-prefocus, .wfp-grid { word-spacing: -0.43em; } .wfp-grid { @include grid; [class*="wfp-u-"] { @include grid--unit; } }
Fix ann issue with some vars being unavailable
Fix ann issue with some vars being unavailable
SCSS
apache-2.0
wfp/ui,wfp/ui,wfp/ui
scss
## Code Before: // CSS: Grid // Project: WFPUI // Author: Matthew Morek ([email protected]) // URL: http://matthewmorek.com @import "../modules/grid"; @import "grid-units"; @mixin grid { @include grid--wrapper; &[class*="wfp-u-"] { font-family: $sans-serif-stack; } } .opera-only :-o-prefocus, .wfp-grid { word-spacing: -0.43em; } .wfp-grid { @include grid; [class*="wfp-u-"] { @include grid--unit; } } ## Instruction: Fix ann issue with some vars being unavailable ## Code After: // CSS: Grid // Project: WFPUI // Author: Matthew Morek ([email protected]) // URL: http://matthewmorek.com @import "../init"; @import "../modules/grid"; @import "grid-units"; @mixin grid { @include grid--wrapper; &[class*="wfp-u-"] { font-family: $sans-serif-stack; } } .opera-only :-o-prefocus, .wfp-grid { word-spacing: -0.43em; } .wfp-grid { @include grid; [class*="wfp-u-"] { @include grid--unit; } }
87a65d3769299267d496e85999cf3313ba92ea73
SIDEBAR.md
SIDEBAR.md
There's more to building RESTful web services than is covered here. You can continue your exploration of Spring and REST with the following resources. ### Getting Started Guides * [Consuming a RESTful Web Service][gs-consuming-rest] * [Building a Hypermedia-Driven REST Web Service][gs-rest-hateoas] * [Consuming REST Services with Spring for Android][gs-consuming-rest-android] * [Consuming XML from a REST Web Service with Spring for Android][gs-consuming-rest-xml-android] * [Building a RESTful Web Service with Spring Bootstrap Actuator][gs-actuator-service] [gs-consuming-rest]: /guides/gs/consuming-rest/ [gs-consuming-rest-android]: /guides/gs/consuming-rest-android/ [gs-rest-hateoas]: /guides/gs/rest-hateoas/ [gs-consuming-rest-xml-android]: /guides/gs/consuming-rest-xml-android/ [gs-actuator-service]: /guides/gs/actuator-service/ ### Tutorials * [Designing and Implementing RESTful Web Services with Spring][tut-rest] [tut-rest]: /guides/tutorials/rest ### Concepts and Technologies * [REST][u-rest] * [JSON][u-json] [u-rest]: /understanding/REST [u-json]: /understanding/JSON
There's more to building RESTful web services than is covered here. You can continue your exploration of Spring and REST with the following resources. ### Getting Started Guides * [Consuming a RESTful Web Service][gs-consuming-rest] * [Building a Hypermedia-Driven REST Web Service][gs-rest-hateoas] * [Consuming REST Services with Spring for Android][gs-consuming-rest-android] * [Consuming XML from a REST Web Service with Spring for Android][gs-consuming-rest-xml-android] * [Building a RESTful Web Service with Spring Bootstrap Actuator][gs-actuator-service] [gs-consuming-rest]: /guides/gs/consuming-rest/ [gs-consuming-rest-android]: /guides/gs/consuming-rest-android/ [gs-rest-hateoas]: /guides/gs/rest-hateoas/ [gs-consuming-rest-xml-android]: /guides/gs/consuming-rest-xml-android/ [gs-actuator-service]: /guides/gs/actuator-service/ ### Tutorials * [Designing and Implementing RESTful Web Services with Spring][tut-rest] [tut-rest]: /guides/tutorials/rest ### Concepts and Technologies * [REST][u-rest] * [JSON][u-json] * [View Templates][u-view-templates] [u-rest]: /understanding/REST [u-json]: /understanding/JSON [u-view-templates]: /understanding/view-templates
Add sidebar links to u-view-templates
Add sidebar links to u-view-templates
Markdown
mit
prod-hid/akd-api,prod-hid/akd-api
markdown
## Code Before: There's more to building RESTful web services than is covered here. You can continue your exploration of Spring and REST with the following resources. ### Getting Started Guides * [Consuming a RESTful Web Service][gs-consuming-rest] * [Building a Hypermedia-Driven REST Web Service][gs-rest-hateoas] * [Consuming REST Services with Spring for Android][gs-consuming-rest-android] * [Consuming XML from a REST Web Service with Spring for Android][gs-consuming-rest-xml-android] * [Building a RESTful Web Service with Spring Bootstrap Actuator][gs-actuator-service] [gs-consuming-rest]: /guides/gs/consuming-rest/ [gs-consuming-rest-android]: /guides/gs/consuming-rest-android/ [gs-rest-hateoas]: /guides/gs/rest-hateoas/ [gs-consuming-rest-xml-android]: /guides/gs/consuming-rest-xml-android/ [gs-actuator-service]: /guides/gs/actuator-service/ ### Tutorials * [Designing and Implementing RESTful Web Services with Spring][tut-rest] [tut-rest]: /guides/tutorials/rest ### Concepts and Technologies * [REST][u-rest] * [JSON][u-json] [u-rest]: /understanding/REST [u-json]: /understanding/JSON ## Instruction: Add sidebar links to u-view-templates ## Code After: There's more to building RESTful web services than is covered here. You can continue your exploration of Spring and REST with the following resources. ### Getting Started Guides * [Consuming a RESTful Web Service][gs-consuming-rest] * [Building a Hypermedia-Driven REST Web Service][gs-rest-hateoas] * [Consuming REST Services with Spring for Android][gs-consuming-rest-android] * [Consuming XML from a REST Web Service with Spring for Android][gs-consuming-rest-xml-android] * [Building a RESTful Web Service with Spring Bootstrap Actuator][gs-actuator-service] [gs-consuming-rest]: /guides/gs/consuming-rest/ [gs-consuming-rest-android]: /guides/gs/consuming-rest-android/ [gs-rest-hateoas]: /guides/gs/rest-hateoas/ [gs-consuming-rest-xml-android]: /guides/gs/consuming-rest-xml-android/ [gs-actuator-service]: /guides/gs/actuator-service/ ### Tutorials * [Designing and Implementing RESTful Web Services with Spring][tut-rest] [tut-rest]: /guides/tutorials/rest ### Concepts and Technologies * [REST][u-rest] * [JSON][u-json] * [View Templates][u-view-templates] [u-rest]: /understanding/REST [u-json]: /understanding/JSON [u-view-templates]: /understanding/view-templates
715968ecc10072939c7bfbd438224b6506e3a8a0
appveyor.yml
appveyor.yml
environment: matrix: - nodejs_version: 6 test_suite: "simple" - nodejs_version: 6 test_suite: "installs" - nodejs_version: 6 test_suite: "kitchensink" - nodejs_version: 4 test_suite: "simple" - nodejs_version: 4 test_suite: "installs" - nodejs_version: 4 test_suite: "kitchensink" - nodejs_version: 0.10 test_suite: "simple" cache: - node_modules - packages\react-scripts\node_modules clone_depth: 50 branches: only: - master matrix: fast_finish: true platform: - x64 install: - ps: Install-Product node $env:nodejs_version $env:platform build: off test_script: - node --version - npm --version - sh tasks/e2e-%test_suite%.sh
environment: matrix: - nodejs_version: 6 test_suite: "simple" - nodejs_version: 6 test_suite: "installs" - nodejs_version: 6 test_suite: "kitchensink" - nodejs_version: 4 test_suite: "simple" - nodejs_version: 4 test_suite: "installs" - nodejs_version: 4 test_suite: "kitchensink" cache: - node_modules - packages\react-scripts\node_modules clone_depth: 50 branches: only: - master matrix: fast_finish: true platform: - x64 install: - ps: Install-Product node $env:nodejs_version $env:platform build: off test_script: - node --version - npm --version - sh tasks/e2e-%test_suite%.sh
Remove Windows 0.10 simple test
Remove Windows 0.10 simple test
YAML
mit
brysgo/create-react-app,reedsa/create-react-app,prontotools/create-react-app,liamhu/create-react-app,1Body/prayer-app,appier/create-react-app,ro-savage/create-react-app,kst404/e8e-react-scripts,ro-savage/create-react-app,1Body/prayer-app,iamdoron/create-react-app,CodingZeal/create-react-app,peopleticker/create-react-app,GreenGremlin/create-react-app,bttf/create-react-app,dsopel94/create-react-app,christiantinauer/create-react-app,scyankai/create-react-app,RobzDoom/frame_trap,paweljedrzejczyk/create-react-app,Timer/create-react-app,TryKickoff/create-kickoff-app,matart15/create-react-app,shrynx/react-super-scripts,stockspiking/create-react-app,matart15/create-react-app,appier/create-react-app,liamhu/create-react-app,Bogala/create-react-app-awesome-ts,Timer/create-react-app,kst404/e8e-react-scripts,Clearcover/web-build,ontruck/create-react-app,jdcrensh/create-react-app,appier/create-react-app,Exocortex/create-react-app,timlogemann/create-react-app,lolaent/create-react-app,johnslay/create-react-app,Clearcover/web-build,devex-web-frontend/create-react-app-dx,timlogemann/create-react-app,lolaent/create-react-app,digitalorigin/create-react-app,timlogemann/create-react-app,stockspiking/create-react-app,Place1/create-react-app-typescript,GreenGremlin/create-react-app,0xaio/create-react-app,reedsa/create-react-app,amido/create-react-app,digitalorigin/create-react-app,sigmacomputing/create-react-app,amido/create-react-app,tharakawj/create-react-app,d3ce1t/create-react-app,RobzDoom/frame_trap,viankakrisna/create-react-app,christiantinauer/create-react-app,liamhu/create-react-app,cr101/create-react-app,maletor/create-react-app,brysgo/create-react-app,shrynx/react-super-scripts,picter/create-react-app,Timer/create-react-app,just-boris/create-preact-app,peopleticker/create-react-app,maletor/create-react-app,Clearcover/web-build,lolaent/create-react-app,paweljedrzejczyk/create-react-app,1Body/prayer-app,jdcrensh/create-react-app,ConnectedHomes/create-react-web-app,christiantinauer/create-react-app,Exocortex/create-react-app,Place1/create-react-app-typescript,ConnectedHomes/create-react-web-app,Place1/create-react-app-typescript,gutenye/create-react-app,romaindso/create-react-app,d3ce1t/create-react-app,picter/create-react-app,Bogala/create-react-app-awesome-ts,Place1/create-react-app-typescript,maletor/create-react-app,gutenye/create-react-app,prontotools/create-react-app,facebookincubator/create-react-app,tharakawj/create-react-app,infernojs/create-inferno-app,picter/create-react-app,TondaHack/create-react-app,HelpfulHuman/helpful-react-scripts,peopleticker/create-react-app,ConnectedHomes/create-react-web-app,1Body/prayer-app,0xaio/create-react-app,CodingZeal/create-react-app,kst404/e8e-react-scripts,GreenGremlin/create-react-app,mangomint/create-react-app,IamJoseph/create-react-app,johnslay/create-react-app,andrewmaudsley/create-react-app,ConnectedHomes/create-react-web-app,viankakrisna/create-react-app,andrewmaudsley/create-react-app,sigmacomputing/create-react-app,andrewmaudsley/create-react-app,dsopel94/create-react-app,scyankai/create-react-app,GreenGremlin/create-react-app,in2core/create-react-app,ontruck/create-react-app,romaindso/create-react-app,in2core/create-react-app,CodingZeal/create-react-app,dsopel94/create-react-app,prontotools/create-react-app,romaindso/create-react-app,mangomint/create-react-app,tharakawj/create-react-app,Bogala/create-react-app-awesome-ts,shrynx/react-super-scripts,scyankai/create-react-app,jdcrensh/create-react-app,devex-web-frontend/create-react-app-dx,TondaHack/create-react-app,0xaio/create-react-app,bttf/create-react-app,devex-web-frontend/create-react-app-dx,johnslay/create-react-app,Bogala/create-react-app-awesome-ts,RobzDoom/frame_trap,paweljedrzejczyk/create-react-app,Timer/create-react-app,g3r4n/create-esri-react-app,IamJoseph/create-react-app,infernojs/create-inferno-app,infernojs/create-inferno-app,cr101/create-react-app,g3r4n/create-esri-react-app,TryKickoff/create-kickoff-app,mangomint/create-react-app,mangomint/create-react-app,devex-web-frontend/create-react-app-dx,IamJoseph/create-react-app,ontruck/create-react-app,in2core/create-react-app,just-boris/create-preact-app,cr101/create-react-app,amido/create-react-app,facebookincubator/create-react-app,stockspiking/create-react-app,matart15/create-react-app,digitalorigin/create-react-app,facebookincubator/create-react-app,iamdoron/create-react-app,d3ce1t/create-react-app,ro-savage/create-react-app,jdcrensh/create-react-app,iamdoron/create-react-app,timlogemann/create-react-app,bttf/create-react-app,HelpfulHuman/helpful-react-scripts,brysgo/create-react-app,HelpfulHuman/helpful-react-scripts,d3ce1t/create-react-app,TondaHack/create-react-app,gutenye/create-react-app,g3r4n/create-esri-react-app,sigmacomputing/create-react-app,TryKickoff/create-kickoff-app,reedsa/create-react-app,viankakrisna/create-react-app,christiantinauer/create-react-app,just-boris/create-preact-app,Exocortex/create-react-app
yaml
## Code Before: environment: matrix: - nodejs_version: 6 test_suite: "simple" - nodejs_version: 6 test_suite: "installs" - nodejs_version: 6 test_suite: "kitchensink" - nodejs_version: 4 test_suite: "simple" - nodejs_version: 4 test_suite: "installs" - nodejs_version: 4 test_suite: "kitchensink" - nodejs_version: 0.10 test_suite: "simple" cache: - node_modules - packages\react-scripts\node_modules clone_depth: 50 branches: only: - master matrix: fast_finish: true platform: - x64 install: - ps: Install-Product node $env:nodejs_version $env:platform build: off test_script: - node --version - npm --version - sh tasks/e2e-%test_suite%.sh ## Instruction: Remove Windows 0.10 simple test ## Code After: environment: matrix: - nodejs_version: 6 test_suite: "simple" - nodejs_version: 6 test_suite: "installs" - nodejs_version: 6 test_suite: "kitchensink" - nodejs_version: 4 test_suite: "simple" - nodejs_version: 4 test_suite: "installs" - nodejs_version: 4 test_suite: "kitchensink" cache: - node_modules - packages\react-scripts\node_modules clone_depth: 50 branches: only: - master matrix: fast_finish: true platform: - x64 install: - ps: Install-Product node $env:nodejs_version $env:platform build: off test_script: - node --version - npm --version - sh tasks/e2e-%test_suite%.sh
e1652c35601b3474752bab5e2f5af2a44f9b7f93
.travis.yml
.travis.yml
language: php php: - "5.4" - "5.3" before_install: - cd ~/builds - git clone git://github.com/laravel/laravel.git - mv ./orchestral/orchestra ./laravel/bundles/orchestra - echo "<?php return array('orchestra' => array('auto' => true, 'handles' => 'orchestra'));" > ./laravel/application/bundles.php - cd ./laravel - php artisan bundle:install hybrid - php artisan bundle:install Messages script: "php artisan test orchestra"
language: php services: sqlite3 php: - "5.4" - "5.3" before_install: - cd ~/builds - git clone git://github.com/laravel/laravel.git - mv ./orchestral/orchestra ./laravel/bundles/orchestra - echo "<?php return array('orchestra' => array('auto' => true, 'handles' => 'orchestra'));" > ./laravel/application/bundles.php - cd ./laravel - php artisan bundle:install hybrid - php artisan bundle:install Messages script: "php artisan test orchestra"
Add sqlite as required service for CI
Add sqlite as required service for CI Signed-off-by: crynobone <[email protected]>
YAML
mit
orchestral/orchestra,orchestral/orchestra
yaml
## Code Before: language: php php: - "5.4" - "5.3" before_install: - cd ~/builds - git clone git://github.com/laravel/laravel.git - mv ./orchestral/orchestra ./laravel/bundles/orchestra - echo "<?php return array('orchestra' => array('auto' => true, 'handles' => 'orchestra'));" > ./laravel/application/bundles.php - cd ./laravel - php artisan bundle:install hybrid - php artisan bundle:install Messages script: "php artisan test orchestra" ## Instruction: Add sqlite as required service for CI Signed-off-by: crynobone <[email protected]> ## Code After: language: php services: sqlite3 php: - "5.4" - "5.3" before_install: - cd ~/builds - git clone git://github.com/laravel/laravel.git - mv ./orchestral/orchestra ./laravel/bundles/orchestra - echo "<?php return array('orchestra' => array('auto' => true, 'handles' => 'orchestra'));" > ./laravel/application/bundles.php - cd ./laravel - php artisan bundle:install hybrid - php artisan bundle:install Messages script: "php artisan test orchestra"
08b4cc4e065e63eef522756888fa8a75d9bf6ddb
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-nap', version='0.3', description='A light REST tool for Django', author='Curtis Maloney', author_email='[email protected]', url='http://github.com/funkybob/django-nap', keywords=['django', 'json', 'rest'], packages = find_packages(), zip_safe=False, classifiers = [ 'Environment :: Web Environment', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], requires = [ 'Django (>=1.4)', ], )
from setuptools import setup, find_packages setup( name='django-nap', version='0.4', description='A light REST tool for Django', author='Curtis Maloney', author_email='[email protected]', url='http://github.com/funkybob/django-nap', keywords=['django', 'json', 'rest'], packages = find_packages(excludes=['test.*']), zip_safe=False, classifiers = [ 'Environment :: Web Environment', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], requires = [ 'Django (>=1.4)', ], )
Fix find packages Bump version
Fix find packages Bump version
Python
bsd-3-clause
limbera/django-nap,MarkusH/django-nap
python
## Code Before: from setuptools import setup, find_packages setup( name='django-nap', version='0.3', description='A light REST tool for Django', author='Curtis Maloney', author_email='[email protected]', url='http://github.com/funkybob/django-nap', keywords=['django', 'json', 'rest'], packages = find_packages(), zip_safe=False, classifiers = [ 'Environment :: Web Environment', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], requires = [ 'Django (>=1.4)', ], ) ## Instruction: Fix find packages Bump version ## Code After: from setuptools import setup, find_packages setup( name='django-nap', version='0.4', description='A light REST tool for Django', author='Curtis Maloney', author_email='[email protected]', url='http://github.com/funkybob/django-nap', keywords=['django', 'json', 'rest'], packages = find_packages(excludes=['test.*']), zip_safe=False, classifiers = [ 'Environment :: Web Environment', 'Framework :: Django', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], requires = [ 'Django (>=1.4)', ], )
49d59a4681d3070c0dcd8dff7d939ddafb842bd7
concrete/src/File/ImportProcessor/AutorotateImageProcessor.php
concrete/src/File/ImportProcessor/AutorotateImageProcessor.php
<?php namespace Concrete\Core\File\ImportProcessor; use Concrete\Core\Entity\File\Version; use Concrete\Core\Support\Facade\Image; use Imagine\Filter\Basic\Autorotate; use Imagine\Filter\Transformation; use Imagine\Image\Metadata\ExifMetadataReader; class AutorotateImageProcessor implements ProcessorInterface { public function shouldProcess(Version $version) { return function_exists('exif_read_data') && $version->getTypeObject()->getName() == 'JPEG'; } public function process(Version $version) { $fr = $version->getFileResource(); $imagine = Image::getFacadeRoot()->setMetadataReader(new ExifMetadataReader); $image = $imagine->load($fr->read()); $transformation = new Transformation($imagine); $transformation->applyFilter($image, new Autorotate()); $version->updateContents($image->get('jpg')); } }
<?php namespace Concrete\Core\File\ImportProcessor; use Concrete\Core\Entity\File\Version; use Concrete\Core\Support\Facade\Image; use Imagine\Filter\Basic\Autorotate; use Imagine\Filter\Transformation; use Imagine\Image\Metadata\ExifMetadataReader; use Concrete\Core\Support\Facade\Application; class AutorotateImageProcessor implements ProcessorInterface { public function shouldProcess(Version $version) { return function_exists('exif_read_data') && $version->getTypeObject()->getName() == 'JPEG'; } public function process(Version $version) { $fr = $version->getFileResource(); $app = Application::getFacadeApplication(); $imagine = $app->make(Image::getFacadeAccessor()); $imagine->setMetadataReader(new ExifMetadataReader); $image = $imagine->load($fr->read()); $transformation = new Transformation($imagine); $transformation->applyFilter($image, new Autorotate()); $version->updateContents($image->get('jpg')); } }
Use app make to ensure new instances
Use app make to ensure new instances
PHP
mit
mlocati/concrete5,rikzuiderlicht/concrete5,deek87/concrete5,KorvinSzanto/concrete5,haeflimi/concrete5,mlocati/concrete5,triplei/concrete5-8,concrete5/concrete5,hissy/concrete5,a3020/concrete5,a3020/concrete5,deek87/concrete5,haeflimi/concrete5,rikzuiderlicht/concrete5,haeflimi/concrete5,biplobice/concrete5,olsgreen/concrete5,triplei/concrete5-8,jaromirdalecky/concrete5,hissy/concrete5,deek87/concrete5,hissy/concrete5,acliss19xx/concrete5,MrKarlDilkington/concrete5,mlocati/concrete5,triplei/concrete5-8,concrete5/concrete5,mainio/concrete5,MrKarlDilkington/concrete5,haeflimi/concrete5,olsgreen/concrete5,mlocati/concrete5,biplobice/concrete5,acliss19xx/concrete5,KorvinSzanto/concrete5,jaromirdalecky/concrete5,biplobice/concrete5,hissy/concrete5,concrete5/concrete5,jaromirdalecky/concrete5,MrKarlDilkington/concrete5,rikzuiderlicht/concrete5,jaromirdalecky/concrete5,concrete5/concrete5,mainio/concrete5,mainio/concrete5,deek87/concrete5,KorvinSzanto/concrete5,acliss19xx/concrete5,olsgreen/concrete5,biplobice/concrete5
php
## Code Before: <?php namespace Concrete\Core\File\ImportProcessor; use Concrete\Core\Entity\File\Version; use Concrete\Core\Support\Facade\Image; use Imagine\Filter\Basic\Autorotate; use Imagine\Filter\Transformation; use Imagine\Image\Metadata\ExifMetadataReader; class AutorotateImageProcessor implements ProcessorInterface { public function shouldProcess(Version $version) { return function_exists('exif_read_data') && $version->getTypeObject()->getName() == 'JPEG'; } public function process(Version $version) { $fr = $version->getFileResource(); $imagine = Image::getFacadeRoot()->setMetadataReader(new ExifMetadataReader); $image = $imagine->load($fr->read()); $transformation = new Transformation($imagine); $transformation->applyFilter($image, new Autorotate()); $version->updateContents($image->get('jpg')); } } ## Instruction: Use app make to ensure new instances ## Code After: <?php namespace Concrete\Core\File\ImportProcessor; use Concrete\Core\Entity\File\Version; use Concrete\Core\Support\Facade\Image; use Imagine\Filter\Basic\Autorotate; use Imagine\Filter\Transformation; use Imagine\Image\Metadata\ExifMetadataReader; use Concrete\Core\Support\Facade\Application; class AutorotateImageProcessor implements ProcessorInterface { public function shouldProcess(Version $version) { return function_exists('exif_read_data') && $version->getTypeObject()->getName() == 'JPEG'; } public function process(Version $version) { $fr = $version->getFileResource(); $app = Application::getFacadeApplication(); $imagine = $app->make(Image::getFacadeAccessor()); $imagine->setMetadataReader(new ExifMetadataReader); $image = $imagine->load($fr->read()); $transformation = new Transformation($imagine); $transformation->applyFilter($image, new Autorotate()); $version->updateContents($image->get('jpg')); } }
ea0b84404ccad39d312f8eff89cf050345c4cf8b
.travis.yml
.travis.yml
language: java sudo: false jdk: oraclejdk8 install: mvn -T 4 ${CDH} ${SPARK} ${SCALA} -Ptravis -DskipTests=true -B -V install script: mvn -T 2 ${CDH} ${SPARK} ${SCALA} ${JACOCO} -Ptravis -q -B verify env: JACOCO=-Pjacoco CDH=-Pcdh58 cache: directories: - $HOME/.m2 git: depth: 10 after_success: if [ -n "$JACOCO" ]; then bash <(curl -s https://codecov.io/bash); fi
language: java sudo: false jdk: oraclejdk8 install: mvn -T 4 ${CDH} ${SPARK} ${SCALA} -Ptravis -DskipTests=true -B -V install script: - mvn -T 2 ${CDH} ${SPARK} ${SCALA} ${JACOCO} -Ptravis -q -B verify - rm -r $HOME/.m2/repository/com/cloudera/oryx env: JACOCO=-Pjacoco CDH=-Pcdh58 cache: directories: - $HOME/.m2 git: depth: 10 after_success: if [ -n "$JACOCO" ]; then bash <(curl -s https://codecov.io/bash); fi
Remove project artifacts so they're not cached every time in Travis
Remove project artifacts so they're not cached every time in Travis
YAML
apache-2.0
oncewang/oryx2,srowen/oryx,OryxProject/oryx,oncewang/oryx2,srowen/oryx,OryxProject/oryx
yaml
## Code Before: language: java sudo: false jdk: oraclejdk8 install: mvn -T 4 ${CDH} ${SPARK} ${SCALA} -Ptravis -DskipTests=true -B -V install script: mvn -T 2 ${CDH} ${SPARK} ${SCALA} ${JACOCO} -Ptravis -q -B verify env: JACOCO=-Pjacoco CDH=-Pcdh58 cache: directories: - $HOME/.m2 git: depth: 10 after_success: if [ -n "$JACOCO" ]; then bash <(curl -s https://codecov.io/bash); fi ## Instruction: Remove project artifacts so they're not cached every time in Travis ## Code After: language: java sudo: false jdk: oraclejdk8 install: mvn -T 4 ${CDH} ${SPARK} ${SCALA} -Ptravis -DskipTests=true -B -V install script: - mvn -T 2 ${CDH} ${SPARK} ${SCALA} ${JACOCO} -Ptravis -q -B verify - rm -r $HOME/.m2/repository/com/cloudera/oryx env: JACOCO=-Pjacoco CDH=-Pcdh58 cache: directories: - $HOME/.m2 git: depth: 10 after_success: if [ -n "$JACOCO" ]; then bash <(curl -s https://codecov.io/bash); fi
8412bcba27ce714932e0df954fdee6b2c1a161ef
tests/HttpComponentTest.php
tests/HttpComponentTest.php
<?php declare(strict_types=1); namespace Tests; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Http; use LaravelZero\Framework\Contracts\Providers\ComposerContract; final class HttpComponentTest extends TestCase { /** @test */ public function it_installs_the_required_packages(): void { $composerMock = $this->createMock(ComposerContract::class); $composerMock->expects($this->exactly(2)) ->method('require') ->withConsecutive( [$this->equalTo('guzzlehttp/guzzle "^6.3.1"')], [$this->equalTo('illuminate/http "^7.0"')] ); $this->app->instance(ComposerContract::class, $composerMock); Artisan::call('app:install', ['component' => 'http']); } /** @test */ public function it_can_use_the_http_client(): void { Http::fake(); Http::withHeaders([ 'X-Faked' => 'enabled', ])->get('https://faked.test'); Http::assertSent(function ($request) { return $request->hasHeader('X-Faked', 'enabled') && $request->url('https://faked.test'); }); } }
<?php declare(strict_types=1); namespace Tests; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Http; use LaravelZero\Framework\Contracts\Providers\ComposerContract; final class HttpComponentTest extends TestCase { /** @test */ public function it_installs_the_required_packages(): void { $composerMock = $this->createMock(ComposerContract::class); $composerMock->expects($this->exactly(2)) ->method('require') ->withConsecutive( [$this->equalTo('guzzlehttp/guzzle "^6.3.1"')], [$this->equalTo('illuminate/http "^7.0"')] ); $this->app->instance(ComposerContract::class, $composerMock); Artisan::call('app:install', ['component' => 'http']); } /** @test */ public function it_can_use_the_http_client(): void { Http::fake(); $response = Http::withHeaders([ 'X-Faked' => 'enabled', ])->get('https://faked.test'); Http::assertSent(function ($request) { return $request->hasHeader('X-Faked', 'enabled') && $request->url('https://faked.test'); }); $this->assertTrue($response->ok()); $this->assertEmpty($response->body()); } }
Add assertions for the Http client response
Add assertions for the Http client response
PHP
mit
laravel-zero/framework
php
## Code Before: <?php declare(strict_types=1); namespace Tests; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Http; use LaravelZero\Framework\Contracts\Providers\ComposerContract; final class HttpComponentTest extends TestCase { /** @test */ public function it_installs_the_required_packages(): void { $composerMock = $this->createMock(ComposerContract::class); $composerMock->expects($this->exactly(2)) ->method('require') ->withConsecutive( [$this->equalTo('guzzlehttp/guzzle "^6.3.1"')], [$this->equalTo('illuminate/http "^7.0"')] ); $this->app->instance(ComposerContract::class, $composerMock); Artisan::call('app:install', ['component' => 'http']); } /** @test */ public function it_can_use_the_http_client(): void { Http::fake(); Http::withHeaders([ 'X-Faked' => 'enabled', ])->get('https://faked.test'); Http::assertSent(function ($request) { return $request->hasHeader('X-Faked', 'enabled') && $request->url('https://faked.test'); }); } } ## Instruction: Add assertions for the Http client response ## Code After: <?php declare(strict_types=1); namespace Tests; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Http; use LaravelZero\Framework\Contracts\Providers\ComposerContract; final class HttpComponentTest extends TestCase { /** @test */ public function it_installs_the_required_packages(): void { $composerMock = $this->createMock(ComposerContract::class); $composerMock->expects($this->exactly(2)) ->method('require') ->withConsecutive( [$this->equalTo('guzzlehttp/guzzle "^6.3.1"')], [$this->equalTo('illuminate/http "^7.0"')] ); $this->app->instance(ComposerContract::class, $composerMock); Artisan::call('app:install', ['component' => 'http']); } /** @test */ public function it_can_use_the_http_client(): void { Http::fake(); $response = Http::withHeaders([ 'X-Faked' => 'enabled', ])->get('https://faked.test'); Http::assertSent(function ($request) { return $request->hasHeader('X-Faked', 'enabled') && $request->url('https://faked.test'); }); $this->assertTrue($response->ok()); $this->assertEmpty($response->body()); } }
f5b2334d392c748c4a74bd66c9e14489d428c90d
server/lib/parseArtistTitle/kfconfig-default.js
server/lib/parseArtistTitle/kfconfig-default.js
// karaoke-forever string to artist/title parser defaults module.exports = { // regex or string; artist/song get split around this match (default='-') delimiter: '-', // bool; whether artist is on left side of delimiter (default=true) artistFirst: true, // string; override Artist for songs in this file's scope (default='') artist: '', // each stage is configured with regexes and/or strings and // simply removes matches by default (repl=''); use an array // to pass a replacement param/string, e.g. [find, repl] replacements: { // applied to input string before split to Artist/Title preSplit: [ // remove non-digits follwed by digits /[\D]+[\d]+/i, // remove digits between non-word characters /\W*\d+\W*/i, // remove text between (), [], or {} /[([{].*[)\]}]/ig, ], // applied to both Artist and Title after split postSplit: [ // correct for "..., The" [/(.*)(, The)$/i, 'The $1'], ], // applied to Artist after split artist: [ // Last, First [Middle] -> First [Middle] Last [/^(\w+?), ?(\w* ?\w*.?)$/ig, '$2 $1'], ], // applied to Title after split title: [ ], } }
// karaoke-forever string to artist/title parser defaults module.exports = { // regex or string; artist/song get split around this match (default='-') delimiter: '-', // bool; whether artist is on left side of delimiter (default=true) artistFirst: true, // string; override Artist for songs in this file's scope (default='') artist: '', // each stage is configured with regexes and/or strings and // simply removes matches by default (repl=''); use an array // to pass a replacement param/string, e.g. [find, repl] replacements: { // applied to input string before split to Artist/Title preSplit: [ // at least 2 word chars followed by at least 3 digits /\D{2,}[^\s]\d{3,}/i, // track numbers /^[\d\-.\s]+/, // remove text between (), [], or {} /[([{].*[)\]}]/ig, ], // applied to both Artist and Title after split postSplit: [ // correct for "..., The" [/(.*)(, The)$/i, 'The $1'], ], // applied to Artist after split artist: [ // Last, First [Middle] -> First [Middle] Last [/^(\w+?), ?(\w* ?\w*.?)$/ig, '$2 $1'], ], // applied to Title after split title: [ ], } }
Improve filename parser regex (hopefully)
Improve filename parser regex (hopefully)
JavaScript
isc
bhj/karaoke-forever,bhj/karaoke-forever
javascript
## Code Before: // karaoke-forever string to artist/title parser defaults module.exports = { // regex or string; artist/song get split around this match (default='-') delimiter: '-', // bool; whether artist is on left side of delimiter (default=true) artistFirst: true, // string; override Artist for songs in this file's scope (default='') artist: '', // each stage is configured with regexes and/or strings and // simply removes matches by default (repl=''); use an array // to pass a replacement param/string, e.g. [find, repl] replacements: { // applied to input string before split to Artist/Title preSplit: [ // remove non-digits follwed by digits /[\D]+[\d]+/i, // remove digits between non-word characters /\W*\d+\W*/i, // remove text between (), [], or {} /[([{].*[)\]}]/ig, ], // applied to both Artist and Title after split postSplit: [ // correct for "..., The" [/(.*)(, The)$/i, 'The $1'], ], // applied to Artist after split artist: [ // Last, First [Middle] -> First [Middle] Last [/^(\w+?), ?(\w* ?\w*.?)$/ig, '$2 $1'], ], // applied to Title after split title: [ ], } } ## Instruction: Improve filename parser regex (hopefully) ## Code After: // karaoke-forever string to artist/title parser defaults module.exports = { // regex or string; artist/song get split around this match (default='-') delimiter: '-', // bool; whether artist is on left side of delimiter (default=true) artistFirst: true, // string; override Artist for songs in this file's scope (default='') artist: '', // each stage is configured with regexes and/or strings and // simply removes matches by default (repl=''); use an array // to pass a replacement param/string, e.g. [find, repl] replacements: { // applied to input string before split to Artist/Title preSplit: [ // at least 2 word chars followed by at least 3 digits /\D{2,}[^\s]\d{3,}/i, // track numbers /^[\d\-.\s]+/, // remove text between (), [], or {} /[([{].*[)\]}]/ig, ], // applied to both Artist and Title after split postSplit: [ // correct for "..., The" [/(.*)(, The)$/i, 'The $1'], ], // applied to Artist after split artist: [ // Last, First [Middle] -> First [Middle] Last [/^(\w+?), ?(\w* ?\w*.?)$/ig, '$2 $1'], ], // applied to Title after split title: [ ], } }
5ec8a96dde9826044f6750f804d0b8c1f90f0882
src/selectors/databaseFilterSettings.ts
src/selectors/databaseFilterSettings.ts
import { hitDatabaseSelector, databaseFIlterSettingsSelector } from './index'; import { createSelector } from 'reselect'; import { HitDatabaseEntry } from 'types'; export const hitDatabaseFilteredBySearchTerm = createSelector( [hitDatabaseSelector, databaseFIlterSettingsSelector], (hitDatabase, { searchTerm }) => hitDatabase .filter((hit: HitDatabaseEntry) => hit.title.search(searchTerm) !== -1) .map((el: HitDatabaseEntry) => el.id) );
import { hitDatabaseSelector, databaseFilterSettingsSelector } from './index'; import { createSelector } from 'reselect'; import { HitDatabaseEntry, HitDatabaseMap, StatusFilterType } from 'types'; import { filterBy } from 'utils/databaseFilter'; import { Map } from 'immutable'; export const hitDatabaseFilteredBySearchTerm = createSelector( [hitDatabaseSelector, databaseFilterSettingsSelector], (hitDatabase, { searchTerm }) => hitDatabase .filter((hit: HitDatabaseEntry) => hit.title.search(searchTerm) !== -1) .map((el: HitDatabaseEntry) => el.id) ); export const hitDatabaseFilteredByStatus = createSelector( [hitDatabaseSelector, databaseFilterSettingsSelector], (hitDatabase, { statusFilters }) => { if (statusFilters.isEmpty()) { return hitDatabase; } const filterFunction = filterBy(hitDatabase); const resultsMaps = statusFilters.reduce( (acc: HitDatabaseMap[], cur: StatusFilterType) => acc.concat(filterFunction(cur)), [] ); return resultsMaps .reduce( (acc: HitDatabaseMap, cur: HitDatabaseMap) => acc.merge(cur), Map() ) .map((el: HitDatabaseEntry) => el.id) .toArray(); } );
Add selector for filtering HITs by status.
Add selector for filtering HITs by status.
TypeScript
mit
Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine
typescript
## Code Before: import { hitDatabaseSelector, databaseFIlterSettingsSelector } from './index'; import { createSelector } from 'reselect'; import { HitDatabaseEntry } from 'types'; export const hitDatabaseFilteredBySearchTerm = createSelector( [hitDatabaseSelector, databaseFIlterSettingsSelector], (hitDatabase, { searchTerm }) => hitDatabase .filter((hit: HitDatabaseEntry) => hit.title.search(searchTerm) !== -1) .map((el: HitDatabaseEntry) => el.id) ); ## Instruction: Add selector for filtering HITs by status. ## Code After: import { hitDatabaseSelector, databaseFilterSettingsSelector } from './index'; import { createSelector } from 'reselect'; import { HitDatabaseEntry, HitDatabaseMap, StatusFilterType } from 'types'; import { filterBy } from 'utils/databaseFilter'; import { Map } from 'immutable'; export const hitDatabaseFilteredBySearchTerm = createSelector( [hitDatabaseSelector, databaseFilterSettingsSelector], (hitDatabase, { searchTerm }) => hitDatabase .filter((hit: HitDatabaseEntry) => hit.title.search(searchTerm) !== -1) .map((el: HitDatabaseEntry) => el.id) ); export const hitDatabaseFilteredByStatus = createSelector( [hitDatabaseSelector, databaseFilterSettingsSelector], (hitDatabase, { statusFilters }) => { if (statusFilters.isEmpty()) { return hitDatabase; } const filterFunction = filterBy(hitDatabase); const resultsMaps = statusFilters.reduce( (acc: HitDatabaseMap[], cur: StatusFilterType) => acc.concat(filterFunction(cur)), [] ); return resultsMaps .reduce( (acc: HitDatabaseMap, cur: HitDatabaseMap) => acc.merge(cur), Map() ) .map((el: HitDatabaseEntry) => el.id) .toArray(); } );
fb68aed02a3107ab8b5052363e49dc38751e3544
iso/bootlocal.sh
iso/bootlocal.sh
BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=boot2docker-data` PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'` mkdir -p /mnt/$PARTNAME/var/lib/minishift ln -s /mnt/$PARTNAME/var/lib/minishift /var/lib/minishift
BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=boot2docker-data` PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'` mkdir -p /mnt/$PARTNAME/var/lib/minishift ln -s /mnt/$PARTNAME/var/lib/minishift /var/lib/minishift mkdir -p /mnt/$PARTNAME/data ln -s /mnt/$PARTNAME/data /data
Configure /data as a persisted directory.
Configure /data as a persisted directory.
Shell
apache-2.0
LalatenduMohanty/minishift-b2d-iso,minishift/minishift-b2d-iso,LalatenduMohanty/minishift-b2d-iso,minishift/minishift-b2d-iso
shell
## Code Before: BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=boot2docker-data` PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'` mkdir -p /mnt/$PARTNAME/var/lib/minishift ln -s /mnt/$PARTNAME/var/lib/minishift /var/lib/minishift ## Instruction: Configure /data as a persisted directory. ## Code After: BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=boot2docker-data` PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'` mkdir -p /mnt/$PARTNAME/var/lib/minishift ln -s /mnt/$PARTNAME/var/lib/minishift /var/lib/minishift mkdir -p /mnt/$PARTNAME/data ln -s /mnt/$PARTNAME/data /data
75e7bd4e66181f1a66e6405448e46dfffb73bd38
boards/arm/nucleo_f429zi/board.cmake
boards/arm/nucleo_f429zi/board.cmake
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
set_ifndef(STLINK_FW stlink) if(STLINK_FW STREQUAL jlink) board_runner_args(jlink "--device=stm32f429zi" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) elseif(STLINK_FW STREQUAL stlink) include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake) endif()
Add JLink support for flash, as per nucleo_f070rb
nucleo_f429zi: Add JLink support for flash, as per nucleo_f070rb Signed-off-by: Dave Marples <[email protected]> Added ability to use JLink in addition to OpenOCD for flashing.
CMake
apache-2.0
Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,ldts/zephyr,ldts/zephyr,explora26/zephyr,nashif/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,ldts/zephyr,galak/zephyr,galak/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,Vudentz/zephyr,explora26/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr,explora26/zephyr,nashif/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr,nashif/zephyr,explora26/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr
cmake
## Code Before: include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) ## Instruction: nucleo_f429zi: Add JLink support for flash, as per nucleo_f070rb Signed-off-by: Dave Marples <[email protected]> Added ability to use JLink in addition to OpenOCD for flashing. ## Code After: set_ifndef(STLINK_FW stlink) if(STLINK_FW STREQUAL jlink) board_runner_args(jlink "--device=stm32f429zi" "--speed=4000") include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) elseif(STLINK_FW STREQUAL stlink) include($ENV{ZEPHYR_BASE}/boards/common/openocd.board.cmake) endif()
a2c8cede6e0b28769d7e86988c6818f8cca5e140
.travis.yml
.travis.yml
language: php php: - 5.5 - 5.6 - 7.0 - 7.1 - hhvm
language: php sudo: false matrix: fast_finish: true include: - php: 5.5 - php: 5.6 - php: 7.0 - php: 7.1 - php: 7.2
Drop HHVM and use the build matrix
Drop HHVM and use the build matrix HHVM LTS 3.24 is the last version to support PHP 5 compatibility third paragraph states "HHVM will not aim to target PHP7" and further down "We do not intend to be the runtime of choice for folks with pure PHP7 code." (just HACK) https://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html add PHP 7.2 Uses build matrix uses sudo false for faster container based testing when sudo is not required
YAML
mit
kodols/php-mysql-library
yaml
## Code Before: language: php php: - 5.5 - 5.6 - 7.0 - 7.1 - hhvm ## Instruction: Drop HHVM and use the build matrix HHVM LTS 3.24 is the last version to support PHP 5 compatibility third paragraph states "HHVM will not aim to target PHP7" and further down "We do not intend to be the runtime of choice for folks with pure PHP7 code." (just HACK) https://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html add PHP 7.2 Uses build matrix uses sudo false for faster container based testing when sudo is not required ## Code After: language: php sudo: false matrix: fast_finish: true include: - php: 5.5 - php: 5.6 - php: 7.0 - php: 7.1 - php: 7.2
90be7c452f088e06e2d5ca205b71d62a10d4e361
tests/acceptance/test-runner.js
tests/acceptance/test-runner.js
// Mocha globals. const { describe, it, beforeEach, afterEach, before, after } = global; export { describe as runnerDescribe, it as runnerIt, beforeEach as runnerBeforeEach, afterEach as runnerAfterEach, before as runnerBefore, after as runnerAfter }; delete global.describe; delete global.beforeEach; delete global.runnerAfterEach; delete global.runnerBefore; delete global.afer; delete global.it;
// Mocha globals. const { describe, it, beforeEach, afterEach, before, after } = global; export { describe as runnerDescribe, it as runnerIt, beforeEach as runnerBeforeEach, afterEach as runnerAfterEach, before as runnerBefore, after as runnerAfter }; delete global.describe; delete global.beforeEach; delete global.afterEach; delete global.before; delete global.after; delete global.it;
Fix typos in Mocha global cleanup code
Fix typos in Mocha global cleanup code
JavaScript
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
javascript
## Code Before: // Mocha globals. const { describe, it, beforeEach, afterEach, before, after } = global; export { describe as runnerDescribe, it as runnerIt, beforeEach as runnerBeforeEach, afterEach as runnerAfterEach, before as runnerBefore, after as runnerAfter }; delete global.describe; delete global.beforeEach; delete global.runnerAfterEach; delete global.runnerBefore; delete global.afer; delete global.it; ## Instruction: Fix typos in Mocha global cleanup code ## Code After: // Mocha globals. const { describe, it, beforeEach, afterEach, before, after } = global; export { describe as runnerDescribe, it as runnerIt, beforeEach as runnerBeforeEach, afterEach as runnerAfterEach, before as runnerBefore, after as runnerAfter }; delete global.describe; delete global.beforeEach; delete global.afterEach; delete global.before; delete global.after; delete global.it;
2fd3f20edd23256b61b98de6d9363d6f19436d9d
.travis.yml
.travis.yml
language: node_js node_js: - "7" - "8" script: npm run lint cache: directories: - node_modules
language: node_js node_js: - "7" - "8" script: npm run lint cache: directories: - node_modules branches: only: - master
Build Travis on master pushes but not twice in PRs
:construction_worker: Build Travis on master pushes but not twice in PRs
YAML
mit
JasonEtco/flintcms,JasonEtco/flintcms
yaml
## Code Before: language: node_js node_js: - "7" - "8" script: npm run lint cache: directories: - node_modules ## Instruction: :construction_worker: Build Travis on master pushes but not twice in PRs ## Code After: language: node_js node_js: - "7" - "8" script: npm run lint cache: directories: - node_modules branches: only: - master
7d768d45632ba6bc60791f07c32a995f91bca97e
byceps/blueprints/user_message/templates/user_message/create_form.html
byceps/blueprints/user_message/templates/user_message/create_form.html
{% extends 'layout/base.html' %} {% from 'macros/forms.html' import form_buttons, form_fieldset, form_field, form_supplement %} {% from 'macros/user_avatar.html' import render_user_avatar_20_and_link %} {% set current_page = 'user_message' %} {% set title = 'Mitteilung an Benutzer senden' %} {% block body %} <h1>Mitteilung senden</h1> <form action="{{ url_for('.create', recipient_id=recipient.id) }}" method="post"> {%- call form_fieldset() %} {%- call form_supplement(label='Empfänger/in') %} {{ render_user_avatar_20_and_link(recipient) }} {%- endcall %} {{ form_field(form.body, maxlength=2000, required='required', autofocus='autofocus') }} {%- endcall %} {{ form_buttons('Senden') }} </form> {%- endblock %}
{% extends 'layout/base.html' %} {% from 'macros/forms.html' import form_buttons, form_fieldset, form_field, form_supplement %} {% from 'macros/user_avatar.html' import render_user_avatar_20_and_link %} {% set current_page = 'user_message' %} {% set title = 'Mitteilung an Benutzer senden' %} {% block body %} <h1>Mitteilung senden</h1> <form action="{{ url_for('.create', recipient_id=recipient.id) }}" method="post"> {%- call form_fieldset() %} {%- call form_supplement(label='Empfänger/in') %} {{ render_user_avatar_20_and_link(recipient) }} {%- endcall %} {{ form_field(form.body, maxlength=2000, required='required', autofocus='autofocus') }} {%- endcall %} {{ form_buttons('Senden') }} </form> <p style="margin-top: 1.5rem;">Über dieses Formular kannst du der Person eine Nachricht zukommen lassen.</p> <p>Dazu senden wir ihr eine E-Mail mit deinem Text. Deine E-Mail-Adresse geben wir dabei <em>nicht</em> weiter.</p> <p>Die Person kann dir über das Kontaktformular auf deiner Profilseite antworten.</p> {%- endblock %}
Add message to user message form
Add message to user message form
HTML
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
html
## Code Before: {% extends 'layout/base.html' %} {% from 'macros/forms.html' import form_buttons, form_fieldset, form_field, form_supplement %} {% from 'macros/user_avatar.html' import render_user_avatar_20_and_link %} {% set current_page = 'user_message' %} {% set title = 'Mitteilung an Benutzer senden' %} {% block body %} <h1>Mitteilung senden</h1> <form action="{{ url_for('.create', recipient_id=recipient.id) }}" method="post"> {%- call form_fieldset() %} {%- call form_supplement(label='Empfänger/in') %} {{ render_user_avatar_20_and_link(recipient) }} {%- endcall %} {{ form_field(form.body, maxlength=2000, required='required', autofocus='autofocus') }} {%- endcall %} {{ form_buttons('Senden') }} </form> {%- endblock %} ## Instruction: Add message to user message form ## Code After: {% extends 'layout/base.html' %} {% from 'macros/forms.html' import form_buttons, form_fieldset, form_field, form_supplement %} {% from 'macros/user_avatar.html' import render_user_avatar_20_and_link %} {% set current_page = 'user_message' %} {% set title = 'Mitteilung an Benutzer senden' %} {% block body %} <h1>Mitteilung senden</h1> <form action="{{ url_for('.create', recipient_id=recipient.id) }}" method="post"> {%- call form_fieldset() %} {%- call form_supplement(label='Empfänger/in') %} {{ render_user_avatar_20_and_link(recipient) }} {%- endcall %} {{ form_field(form.body, maxlength=2000, required='required', autofocus='autofocus') }} {%- endcall %} {{ form_buttons('Senden') }} </form> <p style="margin-top: 1.5rem;">Über dieses Formular kannst du der Person eine Nachricht zukommen lassen.</p> <p>Dazu senden wir ihr eine E-Mail mit deinem Text. Deine E-Mail-Adresse geben wir dabei <em>nicht</em> weiter.</p> <p>Die Person kann dir über das Kontaktformular auf deiner Profilseite antworten.</p> {%- endblock %}
4c6cecfa47116c6cd6e1ed777f8cd537bb0e51f0
.travis.yml
.travis.yml
language: rust rust: - stable - beta - nightly matrix: allow_failures: - rust: nightly notifications: email: recipients: - [email protected] on_success: never on_failure: always irc: channels: - "irc.mozilla.org#chimper" on_success: always on_failure: always
language: rust rust: - stable - beta - nightly matrix: allow_failures: - rust: nightly notifications: email: recipients: - [email protected] on_success: never on_failure: always irc: channels: - "irc.mozilla.org#chimper" on_success: always on_failure: always skip_join: true
Make the IRC notifications without join/leave
Make the IRC notifications without join/leave
YAML
lgpl-2.1
pedrocr/rawloader,pedrocr/rawloader
yaml
## Code Before: language: rust rust: - stable - beta - nightly matrix: allow_failures: - rust: nightly notifications: email: recipients: - [email protected] on_success: never on_failure: always irc: channels: - "irc.mozilla.org#chimper" on_success: always on_failure: always ## Instruction: Make the IRC notifications without join/leave ## Code After: language: rust rust: - stable - beta - nightly matrix: allow_failures: - rust: nightly notifications: email: recipients: - [email protected] on_success: never on_failure: always irc: channels: - "irc.mozilla.org#chimper" on_success: always on_failure: always skip_join: true
e64358edc12b9a2fcbf57ecb2ce17ca609df8d43
Core/Assembler.h
Core/Assembler.h
enum class ArmipsMode { FILE, MEMORY }; struct LabelDefinition { std::wstring name; int64_t value; }; struct EquationDefinition { std::wstring name; std::wstring value; }; struct ArmipsArguments { // common ArmipsMode mode; int symFileVersion; bool errorOnWarning; bool silent; StringList* errorsResult; std::vector<EquationDefinition> equList; std::vector<LabelDefinition> labels; // file mode std::wstring inputFileName; std::wstring tempFileName; std::wstring symFileName; bool useAbsoluteFileNames; // memory mode std::shared_ptr<AssemblerFile> memoryFile; std::wstring content; ArmipsArguments() { mode = ArmipsMode::FILE; errorOnWarning = false; silent = false; errorsResult = nullptr; useAbsoluteFileNames = true; } }; bool runArmips(ArmipsArguments& arguments);
enum class ArmipsMode { FILE, MEMORY }; struct LabelDefinition { std::wstring name; int64_t value; }; struct EquationDefinition { std::wstring name; std::wstring value; }; struct ArmipsArguments { // common ArmipsMode mode; int symFileVersion; bool errorOnWarning; bool silent; StringList* errorsResult; std::vector<EquationDefinition> equList; std::vector<LabelDefinition> labels; // file mode std::wstring inputFileName; std::wstring tempFileName; std::wstring symFileName; bool useAbsoluteFileNames; // memory mode std::shared_ptr<AssemblerFile> memoryFile; std::wstring content; ArmipsArguments() { mode = ArmipsMode::FILE; symFileVersion = 0; errorOnWarning = false; silent = false; errorsResult = nullptr; useAbsoluteFileNames = true; } }; bool runArmips(ArmipsArguments& arguments);
Fix symFileVersion not being initialized in ArmipsArguments constructor
Fix symFileVersion not being initialized in ArmipsArguments constructor
C
mit
Kingcom/armips,Kingcom/armips,sp1187/armips,sp1187/armips,Kingcom/armips,sp1187/armips
c
## Code Before: enum class ArmipsMode { FILE, MEMORY }; struct LabelDefinition { std::wstring name; int64_t value; }; struct EquationDefinition { std::wstring name; std::wstring value; }; struct ArmipsArguments { // common ArmipsMode mode; int symFileVersion; bool errorOnWarning; bool silent; StringList* errorsResult; std::vector<EquationDefinition> equList; std::vector<LabelDefinition> labels; // file mode std::wstring inputFileName; std::wstring tempFileName; std::wstring symFileName; bool useAbsoluteFileNames; // memory mode std::shared_ptr<AssemblerFile> memoryFile; std::wstring content; ArmipsArguments() { mode = ArmipsMode::FILE; errorOnWarning = false; silent = false; errorsResult = nullptr; useAbsoluteFileNames = true; } }; bool runArmips(ArmipsArguments& arguments); ## Instruction: Fix symFileVersion not being initialized in ArmipsArguments constructor ## Code After: enum class ArmipsMode { FILE, MEMORY }; struct LabelDefinition { std::wstring name; int64_t value; }; struct EquationDefinition { std::wstring name; std::wstring value; }; struct ArmipsArguments { // common ArmipsMode mode; int symFileVersion; bool errorOnWarning; bool silent; StringList* errorsResult; std::vector<EquationDefinition> equList; std::vector<LabelDefinition> labels; // file mode std::wstring inputFileName; std::wstring tempFileName; std::wstring symFileName; bool useAbsoluteFileNames; // memory mode std::shared_ptr<AssemblerFile> memoryFile; std::wstring content; ArmipsArguments() { mode = ArmipsMode::FILE; symFileVersion = 0; errorOnWarning = false; silent = false; errorsResult = nullptr; useAbsoluteFileNames = true; } }; bool runArmips(ArmipsArguments& arguments);
05ee8aec8d40c6733be50b9f46f737bbd9f6b498
chatwork-cli-get-rooms.rb
chatwork-cli-get-rooms.rb
require 'faraday' require 'json' BASE_URI='https://api.chatwork.com/v1/' API_TOKEN=ENV['CHATWORK_API_TOKEN'] GET_ROOMS='rooms' chatwork_connection = Faraday::Connection.new(url: BASE_URI) do |builder| builder.use Faraday::Request::UrlEncoded builder.use Faraday::Response::Middleware builder.use Faraday::Adapter::NetHttp end response = chatwork_connection.get do |request| request.url GET_ROOMS request.headers = { 'X-ChatWorkToken' => API_TOKEN } end response.success? ? results = JSON.parse(response.body) : return results.each do |result| puts result['name'] + ' : Unread [' + result['unread_num'].to_s + '] Mention [' + result['mention_num'].to_s + ']' unless result['unread_num'].zero? end
require_relative './chatwork-cli-controller' chatwork = ChatworkCliController.new results = chatwork.get_unread_rooms results.each do |result| puts result['name'] + ' : Unread [' + result['unread_num'].to_s + '] Mention [' + result['mention_num'].to_s + ']' end
Modify to use the ChatworkCliController class
Modify to use the ChatworkCliController class
Ruby
mit
mizoki/chatwork-cli-ruby
ruby
## Code Before: require 'faraday' require 'json' BASE_URI='https://api.chatwork.com/v1/' API_TOKEN=ENV['CHATWORK_API_TOKEN'] GET_ROOMS='rooms' chatwork_connection = Faraday::Connection.new(url: BASE_URI) do |builder| builder.use Faraday::Request::UrlEncoded builder.use Faraday::Response::Middleware builder.use Faraday::Adapter::NetHttp end response = chatwork_connection.get do |request| request.url GET_ROOMS request.headers = { 'X-ChatWorkToken' => API_TOKEN } end response.success? ? results = JSON.parse(response.body) : return results.each do |result| puts result['name'] + ' : Unread [' + result['unread_num'].to_s + '] Mention [' + result['mention_num'].to_s + ']' unless result['unread_num'].zero? end ## Instruction: Modify to use the ChatworkCliController class ## Code After: require_relative './chatwork-cli-controller' chatwork = ChatworkCliController.new results = chatwork.get_unread_rooms results.each do |result| puts result['name'] + ' : Unread [' + result['unread_num'].to_s + '] Mention [' + result['mention_num'].to_s + ']' end
d3ce79c7b207fa090ac04abc4997b7137f67b234
spec/helpers_spec.rb
spec/helpers_spec.rb
require 'helpers' RSpec.configure do |c| c.include Helpers end describe 'an example group' do it 'has access to the helper methods defined in the module' do expect(help).to be(:available) end end describe '#load_data_file' do it 'should load the test data correctly' do data = load_data_file(:test) expect(data['success']).to eq(true) end end describe '#fixture' do fixture :data, [:test] it 'should load the test data correctly' do expect(data['success']).to eq(true) end end
require 'helpers' RSpec.configure do |c| c.include Helpers end describe 'an example group' do it 'has access to the helper methods defined in the module' do expect(help).to be(:available) end end describe '#load_data_file' do it 'should load the test data correctly' do data = load_data_file(:test) expect(data['success']).to eq(true) end end describe '#fixture' do fixture :data, [:test] it 'should load the test data correctly' do expect(data['success']).to eq(true) end end describe '#fixture_property' do fixture :data, [:test] fixture_property :data_success, :data, ['success'] it 'should define the test property correctly' do expect(data_success).to eq(true) end end
Add a spec for fixture_property
Add a spec for fixture_property
Ruby
mit
VxJasonxV/discordrb,meew0/discordrb,VxJasonxV/discordrb,meew0/discordrb
ruby
## Code Before: require 'helpers' RSpec.configure do |c| c.include Helpers end describe 'an example group' do it 'has access to the helper methods defined in the module' do expect(help).to be(:available) end end describe '#load_data_file' do it 'should load the test data correctly' do data = load_data_file(:test) expect(data['success']).to eq(true) end end describe '#fixture' do fixture :data, [:test] it 'should load the test data correctly' do expect(data['success']).to eq(true) end end ## Instruction: Add a spec for fixture_property ## Code After: require 'helpers' RSpec.configure do |c| c.include Helpers end describe 'an example group' do it 'has access to the helper methods defined in the module' do expect(help).to be(:available) end end describe '#load_data_file' do it 'should load the test data correctly' do data = load_data_file(:test) expect(data['success']).to eq(true) end end describe '#fixture' do fixture :data, [:test] it 'should load the test data correctly' do expect(data['success']).to eq(true) end end describe '#fixture_property' do fixture :data, [:test] fixture_property :data_success, :data, ['success'] it 'should define the test property correctly' do expect(data_success).to eq(true) end end
6825153e6c26ed2906da37afa8cc02493d5332f4
Tests/MenuItemTreeTest.php
Tests/MenuItemTreeTest.php
<?php namespace Bundle\MenuBundle\Tests; use Bundle\MenuBundle\MenuItem; class MenuItemTreeTest extends \PHPUnit_Framework_TestCase { /** * Create a new MenuItem * * @param string $name * @param string $route * @param array $attributes * @return MenuItem */ protected function createMenu($name = 'test_menu', $route = 'homepage', array $attributes = array()) { return new MenuItem($name, $route, $attributes); } }
<?php namespace Bundle\MenuBundle\Tests; use Bundle\MenuBundle\MenuItem; class MenuItemTreeTest extends \PHPUnit_Framework_TestCase { public function testSampleTree() { $class = 'Bundle\MenuBundle\MenuItem'; $menu = new $class('Root li', null, array('class' => 'root')); $pt1 = $menu->getChild('Parent 1'); $ch1 = $pt1->addChild('Child 1'); $ch2 = $pt1->addChild('Child 2'); // add the 3rd child via addChild with an object $ch3 = new $class('Child 3'); $pt1->addChild($ch3); $pt2 = $menu->getChild('Parent 2'); $ch4 = $pt2->addChild('Child 4'); $gc1 = $ch4->addChild('Grandchild 1'); $items = array( 'menu' => $menu, 'pt1' => $pt1, 'pt2' => $pt2, 'ch1' => $ch1, 'ch2' => $ch2, 'ch3' => $ch3, 'ch4' => $ch4, 'gc1' => $gc1, ); return $items; } /** * @depends testSampleTree */ public function testSampleTreeIntegrity(array $items) { extract($items); $this->assertEquals(2, count($menu)); $this->assertEquals(3, count($menu['Parent 1'])); $this->assertEquals(1, count($menu['Parent 2'])); $this->assertEquals(1, count($menu['Parent 2']['Child 4'])); $this->assertEquals('Grandchild 1', $menu['Parent 2']['Child 4']['Grandchild 1']->getName()); } // prints a visual representation of our basic testing tree protected function printTestTree() { print(' Menu Structure '."\n"); print(' rt '."\n"); print(' / \ '."\n"); print(' pt1 pt2 '."\n"); print(' / | \ | '."\n"); print(' ch1 ch2 ch3 ch4 '."\n"); print(' | '."\n"); print(' gc1 '."\n"); } /** * Create a new MenuItem * * @param string $name * @param string $route * @param array $attributes * @return MenuItem */ protected function createMenu($name = 'test_menu', $route = 'homepage', array $attributes = array()) { return new MenuItem($name, $route, $attributes); } }
Add sample tree in unit tests, and check its integrity
Add sample tree in unit tests, and check its integrity
PHP
mit
piotrantosik/KnpMenuBundle,WouterJ/KnpMenuBundle,Soullivaneuh/KnpMenuBundle,Nek-/KnpMenuBundle,benji07/KnpMenuBundle,Soullivaneuh/KnpMenuBundle,craue/MenuBundle,KnpLabs/KnpMenuBundle,stof/KnpMenuBundle,javiereguiluz/KnpMenuBundle,bocharsky-bw/KnpMenuBundle
php
## Code Before: <?php namespace Bundle\MenuBundle\Tests; use Bundle\MenuBundle\MenuItem; class MenuItemTreeTest extends \PHPUnit_Framework_TestCase { /** * Create a new MenuItem * * @param string $name * @param string $route * @param array $attributes * @return MenuItem */ protected function createMenu($name = 'test_menu', $route = 'homepage', array $attributes = array()) { return new MenuItem($name, $route, $attributes); } } ## Instruction: Add sample tree in unit tests, and check its integrity ## Code After: <?php namespace Bundle\MenuBundle\Tests; use Bundle\MenuBundle\MenuItem; class MenuItemTreeTest extends \PHPUnit_Framework_TestCase { public function testSampleTree() { $class = 'Bundle\MenuBundle\MenuItem'; $menu = new $class('Root li', null, array('class' => 'root')); $pt1 = $menu->getChild('Parent 1'); $ch1 = $pt1->addChild('Child 1'); $ch2 = $pt1->addChild('Child 2'); // add the 3rd child via addChild with an object $ch3 = new $class('Child 3'); $pt1->addChild($ch3); $pt2 = $menu->getChild('Parent 2'); $ch4 = $pt2->addChild('Child 4'); $gc1 = $ch4->addChild('Grandchild 1'); $items = array( 'menu' => $menu, 'pt1' => $pt1, 'pt2' => $pt2, 'ch1' => $ch1, 'ch2' => $ch2, 'ch3' => $ch3, 'ch4' => $ch4, 'gc1' => $gc1, ); return $items; } /** * @depends testSampleTree */ public function testSampleTreeIntegrity(array $items) { extract($items); $this->assertEquals(2, count($menu)); $this->assertEquals(3, count($menu['Parent 1'])); $this->assertEquals(1, count($menu['Parent 2'])); $this->assertEquals(1, count($menu['Parent 2']['Child 4'])); $this->assertEquals('Grandchild 1', $menu['Parent 2']['Child 4']['Grandchild 1']->getName()); } // prints a visual representation of our basic testing tree protected function printTestTree() { print(' Menu Structure '."\n"); print(' rt '."\n"); print(' / \ '."\n"); print(' pt1 pt2 '."\n"); print(' / | \ | '."\n"); print(' ch1 ch2 ch3 ch4 '."\n"); print(' | '."\n"); print(' gc1 '."\n"); } /** * Create a new MenuItem * * @param string $name * @param string $route * @param array $attributes * @return MenuItem */ protected function createMenu($name = 'test_menu', $route = 'homepage', array $attributes = array()) { return new MenuItem($name, $route, $attributes); } }
8da1fb6299a87f9c2516f1e168573ac2949440e8
packages/flutter_markdown/.cirrus.yml
packages/flutter_markdown/.cirrus.yml
container: image: cirrusci/flutter:0.1.0 test_task: pub_cache: folder: ~/.pub-cache test_script: flutter test
container: image: cirrusci/flutter:latest test_task: pub_cache: folder: ~/.pub-cache test_script: flutter test analyze_task: pub_cache: folder: ~/.pub-cache analyze_script: flutter analyze
Use the latest available Flutter image
Use the latest available Flutter image Plus run `flutter analyze`
YAML
bsd-3-clause
flutter/packages,flutter/packages,flutter/packages,flutter/packages,flutter/packages,flutter/packages,flutter/packages,flutter/packages,flutter/packages,flutter/packages
yaml
## Code Before: container: image: cirrusci/flutter:0.1.0 test_task: pub_cache: folder: ~/.pub-cache test_script: flutter test ## Instruction: Use the latest available Flutter image Plus run `flutter analyze` ## Code After: container: image: cirrusci/flutter:latest test_task: pub_cache: folder: ~/.pub-cache test_script: flutter test analyze_task: pub_cache: folder: ~/.pub-cache analyze_script: flutter analyze
5c3776b35e0a33f90f15bc748166f40e3310abdd
chart/templates/tls-secrets.yaml
chart/templates/tls-secrets.yaml
{{- if .Values.ingress.enabled }} {{- range .Values.ingress.secrets }} apiVersion: v1 kind: Secret metadata: name: longhorn namespace: {{ include "release_namespace" . }} labels: {{- include "longhorn.labels" . | nindent 4 }} app: longhorn type: kubernetes.io/tls data: tls.crt: {{ .certificate | b64enc }} tls.key: {{ .key | b64enc }} --- {{- end }} {{- end }}
{{- if .Values.ingress.enabled }} {{- range .Values.ingress.secrets }} apiVersion: v1 kind: Secret metadata: name: {{ .name }} namespace: {{ include "release_namespace" $ }} labels: {{- include "longhorn.labels" $ | nindent 4 }} app: longhorn type: kubernetes.io/tls data: tls.crt: {{ .certificate | b64enc }} tls.key: {{ .key | b64enc }} --- {{- end }} {{- end }}
Fix ability to provide own tls certificate for ingress.
Fix ability to provide own tls certificate for ingress. Signed-off-by: Jan Černý <[email protected]>
YAML
apache-2.0
rancher/longhorn
yaml
## Code Before: {{- if .Values.ingress.enabled }} {{- range .Values.ingress.secrets }} apiVersion: v1 kind: Secret metadata: name: longhorn namespace: {{ include "release_namespace" . }} labels: {{- include "longhorn.labels" . | nindent 4 }} app: longhorn type: kubernetes.io/tls data: tls.crt: {{ .certificate | b64enc }} tls.key: {{ .key | b64enc }} --- {{- end }} {{- end }} ## Instruction: Fix ability to provide own tls certificate for ingress. Signed-off-by: Jan Černý <[email protected]> ## Code After: {{- if .Values.ingress.enabled }} {{- range .Values.ingress.secrets }} apiVersion: v1 kind: Secret metadata: name: {{ .name }} namespace: {{ include "release_namespace" $ }} labels: {{- include "longhorn.labels" $ | nindent 4 }} app: longhorn type: kubernetes.io/tls data: tls.crt: {{ .certificate | b64enc }} tls.key: {{ .key | b64enc }} --- {{- end }} {{- end }}
d7139725865d2ef3a2b596e80f9be6437ee90de5
windows-package/README.txt
windows-package/README.txt
This package distributes the clang compiler and a compiler plugin called clazy. clang and llvm were built from branch release_40 (https://github.com/llvm-mirror/llvm.git f3d3277bb713bb8aced9a7ac2e9b05c52d2844ee and https://github.com/llvm-mirror/clang.git 3c8961bedc65c9a15cbe67a2ef385a0938f7cfef. See LICENSE-LLVM.TXT for clang's license. See LICENSE-CLAZY.txt for clazy's license. See README-CLAZY.md for more information and for how you can build clang and clazy to get these binaries yourself.
This package distributes the clang compiler and a compiler plugin called clazy. clang and llvm were built from branch release_40 (https://github.com/llvm-mirror/llvm.git c8fccc53ed66d505898f8850bcc690c977a7c9a7 and https://github.com/llvm-mirror/clang.git 3c8961bedc65c9a15cbe67a2ef385a0938f7cfef. See LICENSE-LLVM.TXT for clang's license. See LICENSE-CLAZY.txt for clazy's license. See README-CLAZY.md for more information and for how you can build clang and clazy to get these binaries yourself.
Update the llvm sha1 used for the MSVC pre-built binary
Update the llvm sha1 used for the MSVC pre-built binary
Text
lgpl-2.1
nyalldawson/clazy,nyalldawson/clazy,nyalldawson/clazy,nyalldawson/clazy
text
## Code Before: This package distributes the clang compiler and a compiler plugin called clazy. clang and llvm were built from branch release_40 (https://github.com/llvm-mirror/llvm.git f3d3277bb713bb8aced9a7ac2e9b05c52d2844ee and https://github.com/llvm-mirror/clang.git 3c8961bedc65c9a15cbe67a2ef385a0938f7cfef. See LICENSE-LLVM.TXT for clang's license. See LICENSE-CLAZY.txt for clazy's license. See README-CLAZY.md for more information and for how you can build clang and clazy to get these binaries yourself. ## Instruction: Update the llvm sha1 used for the MSVC pre-built binary ## Code After: This package distributes the clang compiler and a compiler plugin called clazy. clang and llvm were built from branch release_40 (https://github.com/llvm-mirror/llvm.git c8fccc53ed66d505898f8850bcc690c977a7c9a7 and https://github.com/llvm-mirror/clang.git 3c8961bedc65c9a15cbe67a2ef385a0938f7cfef. See LICENSE-LLVM.TXT for clang's license. See LICENSE-CLAZY.txt for clazy's license. See README-CLAZY.md for more information and for how you can build clang and clazy to get these binaries yourself.
561943ec212113b1b63094ccdfaf8f2ee43c1ba5
db/seeds.rb
db/seeds.rb
dionne = User.create( name: "dionne", password: "cat" ) baby = Movie.create( name: "Adventures in Babysitting", description: "A lifetime of fun. In just one night" ) live_action = Genre.create( name: "Live-Action" ) baby.genres << live_action dionne.movies << baby
dionne = User.create( name: "dionne", password: "cat" ) baby = Movie.create( name: "Adventures in Babysitting", description: "A lifetime of fun. In just one night", rating: 5 ) live_action = Genre.create( name: "Live-Action" ) baby.genres << live_action dionne.movies << baby
Add ranking to one seed entry
Add ranking to one seed entry
Ruby
mit
SputterPuttRedux/phase_3_audition,SputterPuttRedux/phase_3_audition
ruby
## Code Before: dionne = User.create( name: "dionne", password: "cat" ) baby = Movie.create( name: "Adventures in Babysitting", description: "A lifetime of fun. In just one night" ) live_action = Genre.create( name: "Live-Action" ) baby.genres << live_action dionne.movies << baby ## Instruction: Add ranking to one seed entry ## Code After: dionne = User.create( name: "dionne", password: "cat" ) baby = Movie.create( name: "Adventures in Babysitting", description: "A lifetime of fun. In just one night", rating: 5 ) live_action = Genre.create( name: "Live-Action" ) baby.genres << live_action dionne.movies << baby
4182fe6d42d89b6731fa30030e2150f24ee80b4c
ButtonStyleKitSample/ButtonStyleKit/ButtonStyleSelectableBase.swift
ButtonStyleKitSample/ButtonStyleKit/ButtonStyleSelectableBase.swift
// // ButtonStyleSelectableBase.swift // ButtonStyleKit // // Created by keygx on 2016/08/04. // Copyright © 2016年 keygx. All rights reserved. // import UIKit open class ButtonStyleSelectableBase: ButtonStyleKit { override public final var isEnabled: Bool { set { if newValue { currentState = .normal } else { currentState = .disabled } } get { return super.isEnabled } } override public final var isSelected: Bool { set { if newValue { currentState = .selected } else { currentState = .normal } } get { return super.isSelected } } public final var value: Bool = false { didSet { currentState = { if value { return .selected } else { return .normal } }() } } }
// // ButtonStyleSelectableBase.swift // ButtonStyleKit // // Created by keygx on 2016/08/04. // Copyright © 2016年 keygx. All rights reserved. // import UIKit open class ButtonStyleSelectableBase: ButtonStyleKit { override public final var isEnabled: Bool { set { if newValue { currentState = .normal } else { currentState = .disabled } } get { return super.isEnabled } } override public final var isSelected: Bool { set { if newValue { value = true } else { value = false } } get { return super.isSelected } } public final var value: Bool = false { didSet { currentState = { if value { return .selected } else { return .normal } }() } } }
Fix to reflect the value of isSelected in button value
Fix to reflect the value of isSelected in button value
Swift
mit
keygx/ButtonStyleKit
swift
## Code Before: // // ButtonStyleSelectableBase.swift // ButtonStyleKit // // Created by keygx on 2016/08/04. // Copyright © 2016年 keygx. All rights reserved. // import UIKit open class ButtonStyleSelectableBase: ButtonStyleKit { override public final var isEnabled: Bool { set { if newValue { currentState = .normal } else { currentState = .disabled } } get { return super.isEnabled } } override public final var isSelected: Bool { set { if newValue { currentState = .selected } else { currentState = .normal } } get { return super.isSelected } } public final var value: Bool = false { didSet { currentState = { if value { return .selected } else { return .normal } }() } } } ## Instruction: Fix to reflect the value of isSelected in button value ## Code After: // // ButtonStyleSelectableBase.swift // ButtonStyleKit // // Created by keygx on 2016/08/04. // Copyright © 2016年 keygx. All rights reserved. // import UIKit open class ButtonStyleSelectableBase: ButtonStyleKit { override public final var isEnabled: Bool { set { if newValue { currentState = .normal } else { currentState = .disabled } } get { return super.isEnabled } } override public final var isSelected: Bool { set { if newValue { value = true } else { value = false } } get { return super.isSelected } } public final var value: Bool = false { didSet { currentState = { if value { return .selected } else { return .normal } }() } } }
a8515cf56837ef3f32ea53003f88275a47c4d249
src/pipeline.py
src/pipeline.py
import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' self.setting = '' def logger(self, message): print("["+time.strftime('%Y-%m-%d %H:%M%p %Z')+"] "+message) def read_config(self): with open("app.json") as json_file: self.setting = json.load(json_file) def clean(self): self.read_config() self.logger("Start pipeline") def processApp(self): self.logger("processApp") def pj_initialize(self): self.logger("initialize") def run(self): for step in self.setting['step']: mod = imp.load_source(step["packageName"], './') if hasattr(mod, step["className"]): class_inst = getattr(mod, step["className"])() class_inst.setName(step['name']) class_inst.init() class_inst.run() class_inst.finish()
import os import fnmatch import re import subprocess import sys import json import imp import time from pprint import pprint class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' self.setting = '' def logger(self, message): print("["+time.strftime('%Y-%m-%d %H:%M%p %Z')+"] "+message) def read_config(self): with open("app.json") as json_file: self.setting = json.load(json_file) def clean(self): self.read_config() self.logger("Start pipeline") def processApp(self): self.logger("processApp") def pj_initialize(self): self.logger("initialize") def run(self): for step in self.setting['step']: mod = __import__(step["packageName"]) if hasattr(mod, step["className"]): class_inst = getattr(mod, step["className"])() class_inst.setName(step['name']) class_inst.init() class_inst.run() class_inst.finish()
Change the way to import package dynamically
Change the way to import package dynamically
Python
mit
s4553711/HiScript
python
## Code Before: import os import fnmatch import re import subprocess import sys import json import imp import time class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' self.setting = '' def logger(self, message): print("["+time.strftime('%Y-%m-%d %H:%M%p %Z')+"] "+message) def read_config(self): with open("app.json") as json_file: self.setting = json.load(json_file) def clean(self): self.read_config() self.logger("Start pipeline") def processApp(self): self.logger("processApp") def pj_initialize(self): self.logger("initialize") def run(self): for step in self.setting['step']: mod = imp.load_source(step["packageName"], './') if hasattr(mod, step["className"]): class_inst = getattr(mod, step["className"])() class_inst.setName(step['name']) class_inst.init() class_inst.run() class_inst.finish() ## Instruction: Change the way to import package dynamically ## Code After: import os import fnmatch import re import subprocess import sys import json import imp import time from pprint import pprint class pipeline(object): def __init__(self): self.name = '' self.taskId = '' self.taskPath = '' self.scriptPath = '' self.inputPath = '' self.outputPath = '' self.setting = '' def logger(self, message): print("["+time.strftime('%Y-%m-%d %H:%M%p %Z')+"] "+message) def read_config(self): with open("app.json") as json_file: self.setting = json.load(json_file) def clean(self): self.read_config() self.logger("Start pipeline") def processApp(self): self.logger("processApp") def pj_initialize(self): self.logger("initialize") def run(self): for step in self.setting['step']: mod = __import__(step["packageName"]) if hasattr(mod, step["className"]): class_inst = getattr(mod, step["className"])() class_inst.setName(step['name']) class_inst.init() class_inst.run() class_inst.finish()
cb05ae9a3889be03ed374a76ebdc0a86010bf935
src/index.js
src/index.js
import Kinvey from 'kinvey-javascript-sdk-core'; import { NetworkRack } from 'kinvey-javascript-sdk-core/es5/rack/rack'; import { HttpMiddleware } from 'kinvey-javascript-sdk-core/es5/rack/middleware/http'; import { PhoneGapHttpMiddleware } from './http'; import { PhoneGapPush } from './push'; import { PhoneGapPopup } from './popup'; import { PhoneGapDevice } from './device'; // Add Http middleware const networkRack = NetworkRack.sharedInstance(); networkRack.swap(HttpMiddleware, new PhoneGapHttpMiddleware()); // Extend the Kinvey class class PhoneGapKinvey extends Kinvey { static init(options) { // Initialize Kinvey const client = super.init(options); // Add Push module to Kinvey this.Push = new PhoneGapPush(); // Return the client return client; } } // Expose some globals global.KinveyDevice = PhoneGapDevice; global.KinveyPopup = PhoneGapPopup; // Export module.exports = PhoneGapKinvey;
import Kinvey from 'kinvey-javascript-sdk-core'; import { KinveyError } from 'kinvey-javascript-sdk-core/es5/errors'; import { NetworkRack } from 'kinvey-javascript-sdk-core/es5/rack/rack'; import { HttpMiddleware } from 'kinvey-javascript-sdk-core/es5/rack/middleware/http'; import { PhoneGapHttpMiddleware } from './http'; import { PhoneGapPush } from './push'; import { PhoneGapPopup } from './popup'; import { PhoneGapDevice } from './device'; // Add Http middleware const networkRack = NetworkRack.sharedInstance(); networkRack.swap(HttpMiddleware, new PhoneGapHttpMiddleware()); // Extend the Kinvey class class PhoneGapKinvey extends Kinvey { static init(options) { if (PhoneGapDevice.isPhoneGap()) { const onDeviceReady = () => { document.removeEventListener('deviceready', onDeviceReady); if (!global.device) { throw new KinveyError('Cordova Device Plugin is not installed.', 'Please refer to http://devcenter.kinvey.com/phonegap-v3.0/guides/push#ProjectSetUp for help with' + ' setting up your project.'); } }; document.addEventListener('deviceready', onDeviceReady, false); } // Initialize Kinvey const client = super.init(options); // Add Push module to Kinvey this.Push = new PhoneGapPush(); // Return the client return client; } } // Expose some globals global.KinveyDevice = PhoneGapDevice; global.KinveyPopup = PhoneGapPopup; // Export module.exports = PhoneGapKinvey;
Check that cordova device plugin is installed
Check that cordova device plugin is installed
JavaScript
apache-2.0
Kinvey/kinvey-phonegap-lib
javascript
## Code Before: import Kinvey from 'kinvey-javascript-sdk-core'; import { NetworkRack } from 'kinvey-javascript-sdk-core/es5/rack/rack'; import { HttpMiddleware } from 'kinvey-javascript-sdk-core/es5/rack/middleware/http'; import { PhoneGapHttpMiddleware } from './http'; import { PhoneGapPush } from './push'; import { PhoneGapPopup } from './popup'; import { PhoneGapDevice } from './device'; // Add Http middleware const networkRack = NetworkRack.sharedInstance(); networkRack.swap(HttpMiddleware, new PhoneGapHttpMiddleware()); // Extend the Kinvey class class PhoneGapKinvey extends Kinvey { static init(options) { // Initialize Kinvey const client = super.init(options); // Add Push module to Kinvey this.Push = new PhoneGapPush(); // Return the client return client; } } // Expose some globals global.KinveyDevice = PhoneGapDevice; global.KinveyPopup = PhoneGapPopup; // Export module.exports = PhoneGapKinvey; ## Instruction: Check that cordova device plugin is installed ## Code After: import Kinvey from 'kinvey-javascript-sdk-core'; import { KinveyError } from 'kinvey-javascript-sdk-core/es5/errors'; import { NetworkRack } from 'kinvey-javascript-sdk-core/es5/rack/rack'; import { HttpMiddleware } from 'kinvey-javascript-sdk-core/es5/rack/middleware/http'; import { PhoneGapHttpMiddleware } from './http'; import { PhoneGapPush } from './push'; import { PhoneGapPopup } from './popup'; import { PhoneGapDevice } from './device'; // Add Http middleware const networkRack = NetworkRack.sharedInstance(); networkRack.swap(HttpMiddleware, new PhoneGapHttpMiddleware()); // Extend the Kinvey class class PhoneGapKinvey extends Kinvey { static init(options) { if (PhoneGapDevice.isPhoneGap()) { const onDeviceReady = () => { document.removeEventListener('deviceready', onDeviceReady); if (!global.device) { throw new KinveyError('Cordova Device Plugin is not installed.', 'Please refer to http://devcenter.kinvey.com/phonegap-v3.0/guides/push#ProjectSetUp for help with' + ' setting up your project.'); } }; document.addEventListener('deviceready', onDeviceReady, false); } // Initialize Kinvey const client = super.init(options); // Add Push module to Kinvey this.Push = new PhoneGapPush(); // Return the client return client; } } // Expose some globals global.KinveyDevice = PhoneGapDevice; global.KinveyPopup = PhoneGapPopup; // Export module.exports = PhoneGapKinvey;
2c615a9106a056446f6332ce920e9592487ea50a
app/javascript/app/components/my-climate-watch/viz-creator/components/charts/tooltip/tooltip-component.jsx
app/javascript/app/components/my-climate-watch/viz-creator/components/charts/tooltip/tooltip-component.jsx
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { themr } from 'react-css-themr'; import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; const Tooltip = ({ label, tooltip }) => ( <div className={theme.tooltip}> <div className={theme.tooltipHeader}> <span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span> <span className={theme.unit}>{tooltip[0].unit}</span> </div> {tooltip.map(l => ( <div className={theme.label} key={l.label}> <div className={theme.legend}> <span className={theme.labelDot} style={{ backgroundColor: l.color }} /> <p className={theme.labelName}>{l.label}</p> </div> <p className={theme.labelValue}>{l.value}</p> </div> ))} </div> ); Tooltip.propTypes = { label: PropTypes.any, tooltip: PropTypes.array }; export default themr('Tooltip', theme)(Tooltip);
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { themr } from 'react-css-themr'; import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; const Tooltip = ({ label, tooltip, payload }) => ( <div className={theme.tooltip}> <div className={theme.tooltipHeader}> <span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span> <span className={theme.unit}>{tooltip[0].unit}</span> </div> {tooltip.map((l, i) => ( <div className={theme.label} key={l.label}> <div className={theme.legend}> <span className={theme.labelDot} style={{ backgroundColor: l.color }} /> <p className={theme.labelName}>{l.label}</p> </div> {l.value ? <p className={theme.labelValue}>{l.value}</p> : null} {!l.value && payload.length && payload.length > 1 && ( <p className={theme.labelValue}>{payload[i].value}</p> )} {!l.value && payload.length && payload.length === 1 && ( <p className={theme.labelValue}>{payload[0].value}</p> )} </div> ))} </div> ); Tooltip.propTypes = { label: PropTypes.any, tooltip: PropTypes.array, payload: PropTypes.array }; export default themr('Tooltip', theme)(Tooltip);
Add payload to render values
Add payload to render values
JSX
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
jsx
## Code Before: import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { themr } from 'react-css-themr'; import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; const Tooltip = ({ label, tooltip }) => ( <div className={theme.tooltip}> <div className={theme.tooltipHeader}> <span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span> <span className={theme.unit}>{tooltip[0].unit}</span> </div> {tooltip.map(l => ( <div className={theme.label} key={l.label}> <div className={theme.legend}> <span className={theme.labelDot} style={{ backgroundColor: l.color }} /> <p className={theme.labelName}>{l.label}</p> </div> <p className={theme.labelValue}>{l.value}</p> </div> ))} </div> ); Tooltip.propTypes = { label: PropTypes.any, tooltip: PropTypes.array }; export default themr('Tooltip', theme)(Tooltip); ## Instruction: Add payload to render values ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { themr } from 'react-css-themr'; import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss'; const Tooltip = ({ label, tooltip, payload }) => ( <div className={theme.tooltip}> <div className={theme.tooltipHeader}> <span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span> <span className={theme.unit}>{tooltip[0].unit}</span> </div> {tooltip.map((l, i) => ( <div className={theme.label} key={l.label}> <div className={theme.legend}> <span className={theme.labelDot} style={{ backgroundColor: l.color }} /> <p className={theme.labelName}>{l.label}</p> </div> {l.value ? <p className={theme.labelValue}>{l.value}</p> : null} {!l.value && payload.length && payload.length > 1 && ( <p className={theme.labelValue}>{payload[i].value}</p> )} {!l.value && payload.length && payload.length === 1 && ( <p className={theme.labelValue}>{payload[0].value}</p> )} </div> ))} </div> ); Tooltip.propTypes = { label: PropTypes.any, tooltip: PropTypes.array, payload: PropTypes.array }; export default themr('Tooltip', theme)(Tooltip);
69755e54ad5c7b8813f01b738d6318da77a79e05
README.md
README.md
IMDb ==== An IMDb interface for Node ```typescript import { IMDb, Movie } from '../src' async function example(): Promise<Movie> { let i = new IMDb() let movie = await i.getMovie('tt3501632') // Thor: Ragnarok return movie } example() .then((movie) => console.log(movie.getTitle())) .catch((e) => console.error(e)) ```
IMDb [![CircleCI](https://circleci.com/gh/mhsjlw/imdb.svg?style=svg)](https://circleci.com/gh/mhsjlw/imdb) ==== An IMDb interface for Node ```typescript import { IMDb, Movie } from '../src' async function example(): Promise<Movie> { let i = new IMDb() let movie = await i.getMovie('tt3501632') // Thor: Ragnarok return movie } example() .then((movie) => console.log(movie.getTitle())) .catch((e) => console.error(e)) ```
Add status badge [no ci]
Add status badge [no ci]
Markdown
mit
mhsjlw/imdb
markdown
## Code Before: IMDb ==== An IMDb interface for Node ```typescript import { IMDb, Movie } from '../src' async function example(): Promise<Movie> { let i = new IMDb() let movie = await i.getMovie('tt3501632') // Thor: Ragnarok return movie } example() .then((movie) => console.log(movie.getTitle())) .catch((e) => console.error(e)) ``` ## Instruction: Add status badge [no ci] ## Code After: IMDb [![CircleCI](https://circleci.com/gh/mhsjlw/imdb.svg?style=svg)](https://circleci.com/gh/mhsjlw/imdb) ==== An IMDb interface for Node ```typescript import { IMDb, Movie } from '../src' async function example(): Promise<Movie> { let i = new IMDb() let movie = await i.getMovie('tt3501632') // Thor: Ragnarok return movie } example() .then((movie) => console.log(movie.getTitle())) .catch((e) => console.error(e)) ```
39cf8718473cd4ca3c09444bef7d1d583b0312ed
src/main/java/io/github/spharris/ssc/SscGuiceModule.java
src/main/java/io/github/spharris/ssc/SscGuiceModule.java
package io.github.spharris.ssc; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.sun.jna.Native; public class SscGuiceModule extends AbstractModule { @Override protected void configure() { bind(Ssc.class).toInstance((Ssc) Native.loadLibrary(Ssc.SSC_LIB_NAME, Ssc.class)); install(new FactoryModuleBuilder().implement(SscModule.class, SscModule.class) .build(SscModuleFactory.class)); } }
package io.github.spharris.ssc; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.sun.jna.Native; public class SscGuiceModule extends AbstractModule { @Override protected void configure() { bind(Ssc.class).toInstance((Ssc) Native.loadLibrary(Ssc.SSC_LIB_NAME, Ssc.class)); bind(DataContainer.class); install(new FactoryModuleBuilder().implement(SscModule.class, SscModule.class) .build(SscModuleFactory.class)); } }
Add integration tests for data
Add integration tests for data
Java
mit
spharris/pvwatts-java,spharris/pvwatts-java
java
## Code Before: package io.github.spharris.ssc; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.sun.jna.Native; public class SscGuiceModule extends AbstractModule { @Override protected void configure() { bind(Ssc.class).toInstance((Ssc) Native.loadLibrary(Ssc.SSC_LIB_NAME, Ssc.class)); install(new FactoryModuleBuilder().implement(SscModule.class, SscModule.class) .build(SscModuleFactory.class)); } } ## Instruction: Add integration tests for data ## Code After: package io.github.spharris.ssc; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.sun.jna.Native; public class SscGuiceModule extends AbstractModule { @Override protected void configure() { bind(Ssc.class).toInstance((Ssc) Native.loadLibrary(Ssc.SSC_LIB_NAME, Ssc.class)); bind(DataContainer.class); install(new FactoryModuleBuilder().implement(SscModule.class, SscModule.class) .build(SscModuleFactory.class)); } }
c1a66df58748b8a07b29be486144ab7be2572515
Pages/Page.php
Pages/Page.php
<?php /** * @author Manuel Thalmann <[email protected]> * @license Apache-2.0 */ namespace ManuTh\TemPHPlate\Pages; use System\Web; use System\Web\Forms\Rendering\PaintEventArgs; use System\Web\Forms\MenuItem; use ManuTh\TemPHPlate\Templates\BootstrapTemplate; { /** * A page */ class Page extends Web\Page { /** * Initializes a new instance of the `Page` class. */ public function Page() { $this->Template = new BootstrapTemplate($this); } /** * Draws the object. * * @return void */ protected function DrawInternal() { echo ' <h1>TemPHPlate</h1> <p> <img src="./meme.jpg" /> </p> <p> Next you may wanna edit your menu-bar.<br /> Open up <code>/Properties/MenuBar.json</code> for doing so. </p>'; } } } ?>
<?php /** * @author Manuel Thalmann <[email protected]> * @license Apache-2.0 */ namespace ManuTh\TemPHPlate\Pages; use System\Web; use System\Web\Forms\Rendering\PaintEventArgs; use System\Web\Forms\MenuItem; use ManuTh\TemPHPlate\Templates\BootstrapTemplate; { /** * A page */ class Page extends Web\Page { /** * Initializes a new instance of the `Page` class. */ public function Page() { $this->Template = new BootstrapTemplate($this); $this->Title = 'TemPHPlate - Home'; } /** * Draws the object. * * @return void */ protected function DrawInternal() { echo ' <h1>TemPHPlate</h1> <p> <img src="./meme.jpg" /> </p> <p> Next you may wanna edit your menu-bar.<br /> Open up <code>/Properties/MenuBar.json</code> for doing so. </p>'; } } } ?>
Set the title of the default page
Set the title of the default page
PHP
apache-2.0
manuth/TemPHPlate,manuth/TemPHPlate,manuth/TemPHPlate
php
## Code Before: <?php /** * @author Manuel Thalmann <[email protected]> * @license Apache-2.0 */ namespace ManuTh\TemPHPlate\Pages; use System\Web; use System\Web\Forms\Rendering\PaintEventArgs; use System\Web\Forms\MenuItem; use ManuTh\TemPHPlate\Templates\BootstrapTemplate; { /** * A page */ class Page extends Web\Page { /** * Initializes a new instance of the `Page` class. */ public function Page() { $this->Template = new BootstrapTemplate($this); } /** * Draws the object. * * @return void */ protected function DrawInternal() { echo ' <h1>TemPHPlate</h1> <p> <img src="./meme.jpg" /> </p> <p> Next you may wanna edit your menu-bar.<br /> Open up <code>/Properties/MenuBar.json</code> for doing so. </p>'; } } } ?> ## Instruction: Set the title of the default page ## Code After: <?php /** * @author Manuel Thalmann <[email protected]> * @license Apache-2.0 */ namespace ManuTh\TemPHPlate\Pages; use System\Web; use System\Web\Forms\Rendering\PaintEventArgs; use System\Web\Forms\MenuItem; use ManuTh\TemPHPlate\Templates\BootstrapTemplate; { /** * A page */ class Page extends Web\Page { /** * Initializes a new instance of the `Page` class. */ public function Page() { $this->Template = new BootstrapTemplate($this); $this->Title = 'TemPHPlate - Home'; } /** * Draws the object. * * @return void */ protected function DrawInternal() { echo ' <h1>TemPHPlate</h1> <p> <img src="./meme.jpg" /> </p> <p> Next you may wanna edit your menu-bar.<br /> Open up <code>/Properties/MenuBar.json</code> for doing so. </p>'; } } } ?>
68261a641b10faea3a6fa050775682b913fc02aa
gulpfile.js
gulpfile.js
const gulp = require('gulp'); const babel = require('gulp-babel'); const srcDir = './src'; const buildDir = './lib'; gulp.task('babelify', () => { return gulp.src(`${srcDir}/**/*.js`) .pipe(babel()) .pipe(gulp.dest(buildDir)); }); gulp.task('watch', () => { gulp.watch('babelify', [`${srcDir}/**/*.js`]); }) gulp.task('default', ['babelify', 'watch']);
const gulp = require('gulp'); const babel = require('gulp-babel'); const srcDir = './src'; const buildDir = './lib'; gulp.task('babelify', () => { return gulp.src(`${srcDir}/**/*.js`) .pipe(babel()) .pipe(gulp.dest(buildDir)); }); gulp.task('watch', () => { gulp.watch(`${srcDir}/**/*.js`, ['babelify']); }) gulp.task('default', ['babelify', 'watch']);
Correct the gulp watch declaration
Correct the gulp watch declaration
JavaScript
isc
ketsugi/plexacious
javascript
## Code Before: const gulp = require('gulp'); const babel = require('gulp-babel'); const srcDir = './src'; const buildDir = './lib'; gulp.task('babelify', () => { return gulp.src(`${srcDir}/**/*.js`) .pipe(babel()) .pipe(gulp.dest(buildDir)); }); gulp.task('watch', () => { gulp.watch('babelify', [`${srcDir}/**/*.js`]); }) gulp.task('default', ['babelify', 'watch']); ## Instruction: Correct the gulp watch declaration ## Code After: const gulp = require('gulp'); const babel = require('gulp-babel'); const srcDir = './src'; const buildDir = './lib'; gulp.task('babelify', () => { return gulp.src(`${srcDir}/**/*.js`) .pipe(babel()) .pipe(gulp.dest(buildDir)); }); gulp.task('watch', () => { gulp.watch(`${srcDir}/**/*.js`, ['babelify']); }) gulp.task('default', ['babelify', 'watch']);
d7f7fe3401e52fc46daac09064a825f7130d146f
doc/release-notes.md
doc/release-notes.md
Bitcoin ABC version 0.23.3 is now available from: <https://download.bitcoinabc.org/0.23.3/> This release includes the following features and fixes:
Bitcoin ABC version 0.23.3 is now available from: <https://download.bitcoinabc.org/0.23.3/> This release includes the following features and fixes: - All the RPC help is now available even is the wallet is disabled - Improvements to the experimental avalanche feature
Add some release notes for the 0.23.3 release
Add some release notes for the 0.23.3 release Summary: As per title. Test Plan: Read it. Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9465
Markdown
mit
Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc
markdown
## Code Before: Bitcoin ABC version 0.23.3 is now available from: <https://download.bitcoinabc.org/0.23.3/> This release includes the following features and fixes: ## Instruction: Add some release notes for the 0.23.3 release Summary: As per title. Test Plan: Read it. Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9465 ## Code After: Bitcoin ABC version 0.23.3 is now available from: <https://download.bitcoinabc.org/0.23.3/> This release includes the following features and fixes: - All the RPC help is now available even is the wallet is disabled - Improvements to the experimental avalanche feature
9d382a7e5fd6bc7bd1dee9ae479e6b609232f439
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var cssPath = [ './vendor/webuploader_fex/dist/webuploader.css', './assets/css/**/*' ]; var jsPath = [ './vendor/jquery/dist/jquery.js', './vendor/webuploader_fex/dist/webuploader.js', './assets/js/**/*' ]; gulp.task('css', function () { gulp.src(cssPath) .pipe(sass()) .pipe(concat('all.css')) .pipe(gulp.dest('./public/css')); }); gulp.task('js', function () { gulp.src(jsPath) .pipe(concat('all.js')) .pipe(gulp.dest('./public/js')); }); gulp.task('watch', function () { gulp.watch('assets/css/**/*', ['css']); gulp.watch('assets/js/**/*', ['js']); }); gulp.task('build', function () { gulp.start(['css', 'js']); }); gulp.task('nodemon', function () { nodemon({ script: './bin/www', ext: 'sass js', env: { 'NODE_ENV': 'development' } }); }); gulp.task('default', function () { gulp.start('watch'); gulp.start('nodemon'); });
var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var cssPath = [ './vendor/webuploader_fex/dist/webuploader.css', './assets/css/**/*' ]; var jsPath = [ './vendor/jquery/dist/jquery.js', './vendor/webuploader_fex/dist/webuploader.js', './assets/js/**/*' ]; gulp.task('css', function () { gulp.src(cssPath) .pipe(sass()) .pipe(concat('all.css')) .pipe(gulp.dest('./public/css')); }); gulp.task('js', function () { gulp.src(jsPath) .pipe(concat('all.js')) .pipe(gulp.dest('./public/js')); }); gulp.task('watch', function () { gulp.watch('assets/css/**/*', ['css']); gulp.watch('assets/js/**/*', ['js']); }); gulp.task('build', function () { gulp.start(['css', 'js']); }); gulp.task('nodemon', function () { nodemon({ script: './bin/www', ext: 'sass js', env: { 'NODE_ENV': 'development' }, watch: ['app.js', './routes', './bin'] }); }); gulp.task('default', function () { gulp.start('watch'); gulp.start('nodemon'); });
Add watch files in nodemon task
Add watch files in nodemon task
JavaScript
mit
urlucky/ImageStorm,urlucky/ImageStorm
javascript
## Code Before: var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var cssPath = [ './vendor/webuploader_fex/dist/webuploader.css', './assets/css/**/*' ]; var jsPath = [ './vendor/jquery/dist/jquery.js', './vendor/webuploader_fex/dist/webuploader.js', './assets/js/**/*' ]; gulp.task('css', function () { gulp.src(cssPath) .pipe(sass()) .pipe(concat('all.css')) .pipe(gulp.dest('./public/css')); }); gulp.task('js', function () { gulp.src(jsPath) .pipe(concat('all.js')) .pipe(gulp.dest('./public/js')); }); gulp.task('watch', function () { gulp.watch('assets/css/**/*', ['css']); gulp.watch('assets/js/**/*', ['js']); }); gulp.task('build', function () { gulp.start(['css', 'js']); }); gulp.task('nodemon', function () { nodemon({ script: './bin/www', ext: 'sass js', env: { 'NODE_ENV': 'development' } }); }); gulp.task('default', function () { gulp.start('watch'); gulp.start('nodemon'); }); ## Instruction: Add watch files in nodemon task ## Code After: var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var cssPath = [ './vendor/webuploader_fex/dist/webuploader.css', './assets/css/**/*' ]; var jsPath = [ './vendor/jquery/dist/jquery.js', './vendor/webuploader_fex/dist/webuploader.js', './assets/js/**/*' ]; gulp.task('css', function () { gulp.src(cssPath) .pipe(sass()) .pipe(concat('all.css')) .pipe(gulp.dest('./public/css')); }); gulp.task('js', function () { gulp.src(jsPath) .pipe(concat('all.js')) .pipe(gulp.dest('./public/js')); }); gulp.task('watch', function () { gulp.watch('assets/css/**/*', ['css']); gulp.watch('assets/js/**/*', ['js']); }); gulp.task('build', function () { gulp.start(['css', 'js']); }); gulp.task('nodemon', function () { nodemon({ script: './bin/www', ext: 'sass js', env: { 'NODE_ENV': 'development' }, watch: ['app.js', './routes', './bin'] }); }); gulp.task('default', function () { gulp.start('watch'); gulp.start('nodemon'); });
ee9937659d8fe7a3a7b5ea98cba8832bcbd81ac6
spec/hamlit/engine/error_spec.rb
spec/hamlit/engine/error_spec.rb
describe Hamlit::Engine do describe 'syntax error' do it 'raises syntax error for empty =' do expect { render_string('= ') }.to raise_error( Hamlit::SyntaxError, "There's no Ruby code for = to evaluate.", ) end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 4 spaces') end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 1 spaces') end it 'raises syntax error which has correct line number in backtrace' do begin render_string(<<-HAML.unindent) %1 %2 %3 %4 %5 %6 %7 %8 this is invalid indent %9 HAML rescue Hamlit::SyntaxError => e return unless e.respond_to?(:backtrace_locations) line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1] expect(line_number).to eq('8') end end end end
describe Hamlit::Engine do describe 'syntax error' do it 'raises syntax error for empty =' do expect { render_string('= ') }.to raise_error( Hamlit::SyntaxError, "There's no Ruby code for = to evaluate.", ) end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 4 spaces') end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 1 spaces') end it 'raises syntax error which has correct line number in backtrace' do begin render_string(<<-HAML.unindent) %1 %2 %3 %4 %5 %6 %7 %8 this is invalid indent %9 HAML rescue Hamlit::SyntaxError => e if e.respond_to?(:backtrace_locations) line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1] expect(line_number).to eq('8') end end end end end
Fix an error on Ruby 2.0
Fix an error on Ruby 2.0
Ruby
mit
haml/haml,PericlesTheo/hamlit,haml/haml,haml/haml,PericlesTheo/hamlit,PericlesTheo/hamlit,haml/haml,PericlesTheo/hamlit
ruby
## Code Before: describe Hamlit::Engine do describe 'syntax error' do it 'raises syntax error for empty =' do expect { render_string('= ') }.to raise_error( Hamlit::SyntaxError, "There's no Ruby code for = to evaluate.", ) end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 4 spaces') end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 1 spaces') end it 'raises syntax error which has correct line number in backtrace' do begin render_string(<<-HAML.unindent) %1 %2 %3 %4 %5 %6 %7 %8 this is invalid indent %9 HAML rescue Hamlit::SyntaxError => e return unless e.respond_to?(:backtrace_locations) line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1] expect(line_number).to eq('8') end end end end ## Instruction: Fix an error on Ruby 2.0 ## Code After: describe Hamlit::Engine do describe 'syntax error' do it 'raises syntax error for empty =' do expect { render_string('= ') }.to raise_error( Hamlit::SyntaxError, "There's no Ruby code for = to evaluate.", ) end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 4 spaces') end it 'raises syntax error for illegal indentation' do expect { render_string(<<-HAML.unindent) }. %a %b HAML to raise_error(Hamlit::SyntaxError, 'inconsistent indentation: 2 spaces used for indentation, but the rest of the document was indented using 1 spaces') end it 'raises syntax error which has correct line number in backtrace' do begin render_string(<<-HAML.unindent) %1 %2 %3 %4 %5 %6 %7 %8 this is invalid indent %9 HAML rescue Hamlit::SyntaxError => e if e.respond_to?(:backtrace_locations) line_number = e.backtrace_locations.first.to_s.match(/:(\d+):/)[1] expect(line_number).to eq('8') end end end end end
e7f923488ebf589aa78f7dc37792ffba3fffd2a3
pyinfra_kubernetes/defaults.py
pyinfra_kubernetes/defaults.py
DEFAULTS = { # Install 'kubernetes_version': None, # must be provided 'kubernetes_download_base_url': 'https://dl.k8s.io', 'kubernetes_install_dir': '/usr/local/kubernetes', 'kubernetes_bin_dir': '/usr/local/bin', 'kubernetes_conf_dir': '/etc/kubernetes', # Config 'kubernetes_service_cidr': None, # must be provided 'kubernetes_master_url': 'http://127.0.0.1', }
DEFAULTS = { # Install 'kubernetes_version': None, # must be provided 'kubernetes_download_base_url': 'https://dl.k8s.io', 'kubernetes_install_dir': '/usr/local/kubernetes', 'kubernetes_bin_dir': '/usr/local/bin', 'kubernetes_conf_dir': '/etc/kubernetes', # Config 'kubernetes_service_cidr': None, # must be provided # API server URL for master components (controller-manager, scheduler) 'kubernetes_master_url': 'http://127.0.0.1', }
Update comment about default data.
Update comment about default data.
Python
mit
EDITD/pyinfra-kubernetes,EDITD/pyinfra-kubernetes
python
## Code Before: DEFAULTS = { # Install 'kubernetes_version': None, # must be provided 'kubernetes_download_base_url': 'https://dl.k8s.io', 'kubernetes_install_dir': '/usr/local/kubernetes', 'kubernetes_bin_dir': '/usr/local/bin', 'kubernetes_conf_dir': '/etc/kubernetes', # Config 'kubernetes_service_cidr': None, # must be provided 'kubernetes_master_url': 'http://127.0.0.1', } ## Instruction: Update comment about default data. ## Code After: DEFAULTS = { # Install 'kubernetes_version': None, # must be provided 'kubernetes_download_base_url': 'https://dl.k8s.io', 'kubernetes_install_dir': '/usr/local/kubernetes', 'kubernetes_bin_dir': '/usr/local/bin', 'kubernetes_conf_dir': '/etc/kubernetes', # Config 'kubernetes_service_cidr': None, # must be provided # API server URL for master components (controller-manager, scheduler) 'kubernetes_master_url': 'http://127.0.0.1', }
26687d6caf37202df77c8b5d1c108da0ca1f85cd
tests/PaginationTest.php
tests/PaginationTest.php
<?php use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Froiden\RestAPI\Tests\TestCase; class PaginationTest extends TestCase { /** * Test User Index Page. * * @return void **/ public function testPagination() { //Use "Limit" to get required number of result $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '5', 'limit' => '2' ]); dd($response->getContent()); $this->assertEquals(200, $response->status()); } }
<?php use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Froiden\RestAPI\Tests\TestCase; class PaginationTest extends TestCase { /** * Test User Index Page. * * @return void **/ public function testPagination() { //Pagination set offset = "5" or limit ="3" $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '5', 'limit' => '2' ]); $this->assertEquals(200, $response->status()); //Pagination set offset = "1" or limit ="1" $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '1', 'limit' => '1' ]); $this->assertEquals(200, $response->status()); //Pagination set offset = "5" or limit ="3" $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '5', 'limit' => '-2' ]); $this->assertNotEquals(200, $response->status()); } }
Write TestCase for pagination with parameter 'offset' or 'limit'4
Test: Write TestCase for pagination with parameter 'offset' or 'limit'4
PHP
mit
Froiden/laravel-rest-api,Froiden/laravel-rest-api
php
## Code Before: <?php use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Froiden\RestAPI\Tests\TestCase; class PaginationTest extends TestCase { /** * Test User Index Page. * * @return void **/ public function testPagination() { //Use "Limit" to get required number of result $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '5', 'limit' => '2' ]); dd($response->getContent()); $this->assertEquals(200, $response->status()); } } ## Instruction: Test: Write TestCase for pagination with parameter 'offset' or 'limit'4 ## Code After: <?php use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; use Froiden\RestAPI\Tests\TestCase; class PaginationTest extends TestCase { /** * Test User Index Page. * * @return void **/ public function testPagination() { //Pagination set offset = "5" or limit ="3" $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '5', 'limit' => '2' ]); $this->assertEquals(200, $response->status()); //Pagination set offset = "1" or limit ="1" $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '1', 'limit' => '1' ]); $this->assertEquals(200, $response->status()); //Pagination set offset = "5" or limit ="3" $response = $this->call('GET', '/dummyUser', [ 'order' => 'id asc', 'offset' => '5', 'limit' => '-2' ]); $this->assertNotEquals(200, $response->status()); } }
58ec3665f816c5ca50639d8742a69d934f0c37e4
tests/unit/array-offset-test.js
tests/unit/array-offset-test.js
/* global QUnit */ import Em from 'ember'; import ArrayOffset from 'array-offset'; QUnit.module('ArrayOffset'); QUnit.test('constructor exists', function (assert) { assert.ok(ArrayOffset, 'ArrayOffset is not null or undefined'); assert.equal(typeof ArrayOffset, 'function', 'ArrayOffset is function'); }); QUnit.test('can be initialized without content', function (assert) { assert.ok(ArrayOffset.create(), 'ArrayOffset is created without content'); }); QUnit.test('content is initialized', function (assert) { var arr = Em.A(['a', 'b', 'c']); var proxy = ArrayOffset.create({ content: arr }); assert.equal(proxy.get('arrangedContent.length'), 3); assert.equal(proxy.get('content.length'), 3); assert.equal(proxy.get('length'), 3); assert.equal(proxy.get('arrangedContent').join(''), 'abc'); }); QUnit.test('default offset', function (assert) { var proxy = ArrayOffset.create(); assert.equal(proxy.get('offset'), 0, 'Default offset is zero'); });
/* global QUnit */ import Em from 'ember'; import ArrayOffset from 'array-offset'; QUnit.module('ArrayOffset'); QUnit.test('constructor exists', function (assert) { assert.ok(ArrayOffset, 'ArrayOffset is not null or undefined'); assert.equal(typeof ArrayOffset, 'function', 'ArrayOffset is function'); }); QUnit.test('can be initialized without content', function (assert) { assert.ok(ArrayOffset.create(), 'ArrayOffset is created without content'); }); QUnit.test('content is initialized', function (assert) { var arr = Em.A(['a', 'b', 'c']); var proxy = ArrayOffset.create({ content: arr }); assert.equal(proxy.get('arrangedContent.length'), 3); assert.equal(proxy.get('content.length'), 3); assert.equal(proxy.get('length'), 3); assert.deepEqual(proxy.toArray(), ['a', 'b', 'c']); }); QUnit.test('default offset', function (assert) { var proxy = ArrayOffset.create(); assert.equal(proxy.get('offset'), 0, 'Default offset is zero'); });
Use deep equal over array join
Use deep equal over array join
JavaScript
mit
dcheng168/ember-cli-array-offset,dcheng168/ember-cli-array-offset,j-/ember-cli-array-offset,j-/ember-cli-array-offset
javascript
## Code Before: /* global QUnit */ import Em from 'ember'; import ArrayOffset from 'array-offset'; QUnit.module('ArrayOffset'); QUnit.test('constructor exists', function (assert) { assert.ok(ArrayOffset, 'ArrayOffset is not null or undefined'); assert.equal(typeof ArrayOffset, 'function', 'ArrayOffset is function'); }); QUnit.test('can be initialized without content', function (assert) { assert.ok(ArrayOffset.create(), 'ArrayOffset is created without content'); }); QUnit.test('content is initialized', function (assert) { var arr = Em.A(['a', 'b', 'c']); var proxy = ArrayOffset.create({ content: arr }); assert.equal(proxy.get('arrangedContent.length'), 3); assert.equal(proxy.get('content.length'), 3); assert.equal(proxy.get('length'), 3); assert.equal(proxy.get('arrangedContent').join(''), 'abc'); }); QUnit.test('default offset', function (assert) { var proxy = ArrayOffset.create(); assert.equal(proxy.get('offset'), 0, 'Default offset is zero'); }); ## Instruction: Use deep equal over array join ## Code After: /* global QUnit */ import Em from 'ember'; import ArrayOffset from 'array-offset'; QUnit.module('ArrayOffset'); QUnit.test('constructor exists', function (assert) { assert.ok(ArrayOffset, 'ArrayOffset is not null or undefined'); assert.equal(typeof ArrayOffset, 'function', 'ArrayOffset is function'); }); QUnit.test('can be initialized without content', function (assert) { assert.ok(ArrayOffset.create(), 'ArrayOffset is created without content'); }); QUnit.test('content is initialized', function (assert) { var arr = Em.A(['a', 'b', 'c']); var proxy = ArrayOffset.create({ content: arr }); assert.equal(proxy.get('arrangedContent.length'), 3); assert.equal(proxy.get('content.length'), 3); assert.equal(proxy.get('length'), 3); assert.deepEqual(proxy.toArray(), ['a', 'b', 'c']); }); QUnit.test('default offset', function (assert) { var proxy = ArrayOffset.create(); assert.equal(proxy.get('offset'), 0, 'Default offset is zero'); });
56cafd49cb499f4dfb98e81d94e275c04d1dcd8b
metadata/com.smartpack.kernelmanager.yml
metadata/com.smartpack.kernelmanager.yml
Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: [email protected] AuthorWebSite: https://smartpack.github.io/ WebSite: https://smartpack.github.io/spkm/ SourceCode: https://github.com/SmartPack/SmartPack-Kernel-Manager IssueTracker: https://github.com/SmartPack/SmartPack-Kernel-Manager/issues Changelog: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases Donate: https://www.paypal.me/menacherry/ AutoName: SmartPack-Kernel Manager RepoType: git Repo: https://github.com/SmartPack/SmartPack-Kernel-Manager Builds: - versionName: '14.8' versionCode: 148 commit: v14.8 subdir: app gradle: - yes - versionName: '15.2' versionCode: 152 commit: v15.2 subdir: app gradle: - yes - versionName: '15.4' versionCode: 154 commit: v15.4 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: '15.4' CurrentVersionCode: 154
Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: [email protected] AuthorWebSite: https://smartpack.github.io/ WebSite: https://smartpack.github.io/spkm/ SourceCode: https://github.com/SmartPack/SmartPack-Kernel-Manager IssueTracker: https://github.com/SmartPack/SmartPack-Kernel-Manager/issues Changelog: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases Donate: https://www.paypal.me/menacherry/ AutoName: SmartPack-Kernel Manager RepoType: git Repo: https://github.com/SmartPack/SmartPack-Kernel-Manager Builds: - versionName: '14.8' versionCode: 148 commit: v14.8 subdir: app gradle: - yes - versionName: '15.2' versionCode: 152 commit: v15.2 subdir: app gradle: - yes - versionName: '15.4' versionCode: 154 commit: v15.4 subdir: app gradle: - yes - versionName: '15.5' versionCode: 155 commit: v15.5 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: '15.5' CurrentVersionCode: 155
Update SmartPack-Kernel Manager to 15.5 (155)
Update SmartPack-Kernel Manager to 15.5 (155)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: [email protected] AuthorWebSite: https://smartpack.github.io/ WebSite: https://smartpack.github.io/spkm/ SourceCode: https://github.com/SmartPack/SmartPack-Kernel-Manager IssueTracker: https://github.com/SmartPack/SmartPack-Kernel-Manager/issues Changelog: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases Donate: https://www.paypal.me/menacherry/ AutoName: SmartPack-Kernel Manager RepoType: git Repo: https://github.com/SmartPack/SmartPack-Kernel-Manager Builds: - versionName: '14.8' versionCode: 148 commit: v14.8 subdir: app gradle: - yes - versionName: '15.2' versionCode: 152 commit: v15.2 subdir: app gradle: - yes - versionName: '15.4' versionCode: 154 commit: v15.4 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: '15.4' CurrentVersionCode: 154 ## Instruction: Update SmartPack-Kernel Manager to 15.5 (155) ## Code After: Categories: - System License: GPL-3.0-or-later AuthorName: sunilpaulmathew AuthorEmail: [email protected] AuthorWebSite: https://smartpack.github.io/ WebSite: https://smartpack.github.io/spkm/ SourceCode: https://github.com/SmartPack/SmartPack-Kernel-Manager IssueTracker: https://github.com/SmartPack/SmartPack-Kernel-Manager/issues Changelog: https://github.com/SmartPack/SmartPack-Kernel-Manager/releases Donate: https://www.paypal.me/menacherry/ AutoName: SmartPack-Kernel Manager RepoType: git Repo: https://github.com/SmartPack/SmartPack-Kernel-Manager Builds: - versionName: '14.8' versionCode: 148 commit: v14.8 subdir: app gradle: - yes - versionName: '15.2' versionCode: 152 commit: v15.2 subdir: app gradle: - yes - versionName: '15.4' versionCode: 154 commit: v15.4 subdir: app gradle: - yes - versionName: '15.5' versionCode: 155 commit: v15.5 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: '15.5' CurrentVersionCode: 155
98c4e0f4228a92248ccfca4fc1bc5c5302529eee
src/Http/Routing/Router.php
src/Http/Routing/Router.php
<?php namespace RandomState\LaravelApi\Http\Routing; use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Support\Responsable; use ArrayObject; use Illuminate\Support\Facades\App; use JsonSerializable; use Illuminate\Http\Response; use Illuminate\Http\JsonResponse; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; use RandomState\LaravelApi\Http\Response\ResponseFactory; use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; class Router extends \Illuminate\Routing\Router implements Registrar { /** * @var \Illuminate\Routing\Router */ protected $router; public static function prepareResponse($request, $response) { if($response instanceof Responsable) { $response = $response->toResponse($request); } if($response instanceof PsrResponseInterface) { $response = (new HttpFoundationFactory)->createResponse($response); } elseif( ! $response instanceof SymfonyResponse) { $response = App::make(ResponseFactory::class)->build($response); $response = new Response($response); } elseif( ! $response instanceof SymfonyResponse && ($response instanceof Arrayable || $response instanceof Jsonable || $response instanceof ArrayObject || $response instanceof JsonSerializable || is_array($response))) { $response = new JsonResponse($response); } if($response->getStatusCode() === Response::HTTP_NOT_MODIFIED) { $response->setNotModified(); } return $response->prepare($request); } }
<?php namespace RandomState\LaravelApi\Http\Routing; use Illuminate\Contracts\Routing\Registrar; use RandomState\LaravelApi\Http\Response\ResponseFactory; class Router extends \Illuminate\Routing\Router implements Registrar { /** * @var \Illuminate\Routing\Router */ protected $router; public static function prepareResponse($request, $response) { $response = app(ResponseFactory::class)->build($response); return parent::prepareResponse($request,$response); } }
Clean up router to defer to base router as much as possible.
Clean up router to defer to base router as much as possible.
PHP
mit
randomstate/laravel-api
php
## Code Before: <?php namespace RandomState\LaravelApi\Http\Routing; use Illuminate\Contracts\Routing\Registrar; use Illuminate\Contracts\Support\Responsable; use ArrayObject; use Illuminate\Support\Facades\App; use JsonSerializable; use Illuminate\Http\Response; use Illuminate\Http\JsonResponse; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; use RandomState\LaravelApi\Http\Response\ResponseFactory; use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; class Router extends \Illuminate\Routing\Router implements Registrar { /** * @var \Illuminate\Routing\Router */ protected $router; public static function prepareResponse($request, $response) { if($response instanceof Responsable) { $response = $response->toResponse($request); } if($response instanceof PsrResponseInterface) { $response = (new HttpFoundationFactory)->createResponse($response); } elseif( ! $response instanceof SymfonyResponse) { $response = App::make(ResponseFactory::class)->build($response); $response = new Response($response); } elseif( ! $response instanceof SymfonyResponse && ($response instanceof Arrayable || $response instanceof Jsonable || $response instanceof ArrayObject || $response instanceof JsonSerializable || is_array($response))) { $response = new JsonResponse($response); } if($response->getStatusCode() === Response::HTTP_NOT_MODIFIED) { $response->setNotModified(); } return $response->prepare($request); } } ## Instruction: Clean up router to defer to base router as much as possible. ## Code After: <?php namespace RandomState\LaravelApi\Http\Routing; use Illuminate\Contracts\Routing\Registrar; use RandomState\LaravelApi\Http\Response\ResponseFactory; class Router extends \Illuminate\Routing\Router implements Registrar { /** * @var \Illuminate\Routing\Router */ protected $router; public static function prepareResponse($request, $response) { $response = app(ResponseFactory::class)->build($response); return parent::prepareResponse($request,$response); } }
acb75c7604243ac031f13485fcbf20c25c3b412b
function/detach.js
function/detach.js
"use strict"; /* istanbul ignore else */ if(typeof process === 'object') module.exports = function(fn, bind) { return function() { var args = arguments; process.nextTick(function(){ return fn.apply(bind, args); }) }; }; else module.exports = function(fn, bind) { return function() { var args = arguments; setTimeout(function(){ return fn.apply(bind, args); }, 0); }; };
"use strict"; /* istanbul ignore else */ if(typeof process === 'object') module.exports = function(fn, bind) { return function() { var args = arguments; process.nextTick(function(){ if(fn) return fn.apply(bind, args); }) }; }; else module.exports = function(fn, bind) { return function() { var args = arguments; setTimeout(function(){ if(fn) return fn.apply(bind, args); }, 0); }; };
Check for function to exists
Check for function to exists
JavaScript
mit
131/nyks
javascript
## Code Before: "use strict"; /* istanbul ignore else */ if(typeof process === 'object') module.exports = function(fn, bind) { return function() { var args = arguments; process.nextTick(function(){ return fn.apply(bind, args); }) }; }; else module.exports = function(fn, bind) { return function() { var args = arguments; setTimeout(function(){ return fn.apply(bind, args); }, 0); }; }; ## Instruction: Check for function to exists ## Code After: "use strict"; /* istanbul ignore else */ if(typeof process === 'object') module.exports = function(fn, bind) { return function() { var args = arguments; process.nextTick(function(){ if(fn) return fn.apply(bind, args); }) }; }; else module.exports = function(fn, bind) { return function() { var args = arguments; setTimeout(function(){ if(fn) return fn.apply(bind, args); }, 0); }; };
1592a988099faa64de9355ae4dc99cbf1b8e6169
gh_pages.sh
gh_pages.sh
BRANCH=`git branch 2> /dev/null | grep "*" | sed 's#*\ \(.*\)#\1#'` if [ "$BRANCH" != "master" ] then exit 1 fi DESC=`git describe --tags` # Update master branch make doc git add doc/*.html doc/api/*.html git ci -m "Update docs to $DESC" # Update gh-pages branch TMP=`mktemp --tmpdir -d temp.XXXXXXXXXX` cp ./doc/* $TMP rm -f $TMP/*~ git checkout gh-pages cp $TMP/* ./ git add ./*.js ./*.html git ci -m "Update docs to $DESC" git checkout master rm -rf $TMP
BRANCH=`git branch 2> /dev/null | grep "*" | sed 's#*\ \(.*\)#\1#'` if [ "$BRANCH" != "master" ] then exit 1 fi DESC=`git describe --tags` # Update master branch make doc git add doc/*.html doc/api/*.html git ci -m "Update docs to $DESC" # Update gh-pages branch TMP=`mktemp --tmpdir -d gh_pages.XXXXXXXXXX 2> /dev/null || mktemp -d -t gh_pages` cp ./doc/* $TMP rm -f $TMP/*~ git checkout gh-pages cp $TMP/* ./ git add ./*.js ./*.html git ci -m "Update docs to $DESC" git checkout master rm -rf $TMP
Fix TMP dir creation on OS X
Fix TMP dir creation on OS X
Shell
mit
Sannis/node-ubjson,Sannis/node-ubjson
shell
## Code Before: BRANCH=`git branch 2> /dev/null | grep "*" | sed 's#*\ \(.*\)#\1#'` if [ "$BRANCH" != "master" ] then exit 1 fi DESC=`git describe --tags` # Update master branch make doc git add doc/*.html doc/api/*.html git ci -m "Update docs to $DESC" # Update gh-pages branch TMP=`mktemp --tmpdir -d temp.XXXXXXXXXX` cp ./doc/* $TMP rm -f $TMP/*~ git checkout gh-pages cp $TMP/* ./ git add ./*.js ./*.html git ci -m "Update docs to $DESC" git checkout master rm -rf $TMP ## Instruction: Fix TMP dir creation on OS X ## Code After: BRANCH=`git branch 2> /dev/null | grep "*" | sed 's#*\ \(.*\)#\1#'` if [ "$BRANCH" != "master" ] then exit 1 fi DESC=`git describe --tags` # Update master branch make doc git add doc/*.html doc/api/*.html git ci -m "Update docs to $DESC" # Update gh-pages branch TMP=`mktemp --tmpdir -d gh_pages.XXXXXXXXXX 2> /dev/null || mktemp -d -t gh_pages` cp ./doc/* $TMP rm -f $TMP/*~ git checkout gh-pages cp $TMP/* ./ git add ./*.js ./*.html git ci -m "Update docs to $DESC" git checkout master rm -rf $TMP
89a869228baed62318364f1658c3fef70df43e04
lib/connection_client.robot
lib/connection_client.robot
*** Settings *** Documentation This module is for SSH connection override to QEMU ... based openbmc systems. Library SSHLibrary Library OperatingSystem *** Variables *** *** Keywords *** Open Connection And Log In Run Keyword If '${SSH_PORT}' != '${EMPTY}' and '${HTTPS_PORT}' != '${EMPTY}' ... User input SSH and HTTPs Ports Run Keyword If '${SSH_PORT}' == '${EMPTY}' Open connection ${OPENBMC_HOST} ... ELSE Run Keyword Open connection ${OPENBMC_HOST} port=${SSH_PORT} Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD} User input SSH and HTTPs Ports [Documentation] Update the global SSH and HTTPs port variable for QEMU ${port_num}= Convert To Integer ${SSH_PORT} ${SSH_PORT}= Replace Variables ${port_num} ${https_num}= Convert To Integer ${HTTPS_PORT} ${AUTH_URI}= Replace Variables https://${OPENBMC_HOST}:${https_num}
*** Settings *** Documentation This module is for SSH connection override to QEMU ... based openbmc systems. Library SSHLibrary Library OperatingSystem *** Variables *** *** Keywords *** Open Connection And Log In Run Keyword If '${SSH_PORT}' != '${EMPTY}' and '${HTTPS_PORT}' != '${EMPTY}' ... User input SSH and HTTPs Ports Run Keyword If '${SSH_PORT}' == '${EMPTY}' Open connection ${OPENBMC_HOST} ... ELSE Run Keyword Open connection ${OPENBMC_HOST} port=${SSH_PORT} Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD} User input SSH and HTTPs Ports [Documentation] Update the global SSH and HTTPs port variable for QEMU ${port_num}= Convert To Integer ${SSH_PORT} ${SSH_PORT}= Replace Variables ${port_num} ${https_num}= Convert To Integer ${HTTPS_PORT} Set Global Variable ${AUTH_URI} https://${OPENBMC_HOST}:${https_num}
Update AUTH_URI variable in connections as global
Update AUTH_URI variable in connections as global Resolves openbmc/openbmc-test-automation#47 Change-Id: Ieb4788d9609748675c4e7a8f5c3f32423ad61a30 Signed-off-by: Sridevi Ramesh <[email protected]>
RobotFramework
apache-2.0
openbmc/openbmc-test-automation,openbmc/openbmc-test-automation
robotframework
## Code Before: *** Settings *** Documentation This module is for SSH connection override to QEMU ... based openbmc systems. Library SSHLibrary Library OperatingSystem *** Variables *** *** Keywords *** Open Connection And Log In Run Keyword If '${SSH_PORT}' != '${EMPTY}' and '${HTTPS_PORT}' != '${EMPTY}' ... User input SSH and HTTPs Ports Run Keyword If '${SSH_PORT}' == '${EMPTY}' Open connection ${OPENBMC_HOST} ... ELSE Run Keyword Open connection ${OPENBMC_HOST} port=${SSH_PORT} Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD} User input SSH and HTTPs Ports [Documentation] Update the global SSH and HTTPs port variable for QEMU ${port_num}= Convert To Integer ${SSH_PORT} ${SSH_PORT}= Replace Variables ${port_num} ${https_num}= Convert To Integer ${HTTPS_PORT} ${AUTH_URI}= Replace Variables https://${OPENBMC_HOST}:${https_num} ## Instruction: Update AUTH_URI variable in connections as global Resolves openbmc/openbmc-test-automation#47 Change-Id: Ieb4788d9609748675c4e7a8f5c3f32423ad61a30 Signed-off-by: Sridevi Ramesh <[email protected]> ## Code After: *** Settings *** Documentation This module is for SSH connection override to QEMU ... based openbmc systems. Library SSHLibrary Library OperatingSystem *** Variables *** *** Keywords *** Open Connection And Log In Run Keyword If '${SSH_PORT}' != '${EMPTY}' and '${HTTPS_PORT}' != '${EMPTY}' ... User input SSH and HTTPs Ports Run Keyword If '${SSH_PORT}' == '${EMPTY}' Open connection ${OPENBMC_HOST} ... ELSE Run Keyword Open connection ${OPENBMC_HOST} port=${SSH_PORT} Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD} User input SSH and HTTPs Ports [Documentation] Update the global SSH and HTTPs port variable for QEMU ${port_num}= Convert To Integer ${SSH_PORT} ${SSH_PORT}= Replace Variables ${port_num} ${https_num}= Convert To Integer ${HTTPS_PORT} Set Global Variable ${AUTH_URI} https://${OPENBMC_HOST}:${https_num}
4d203821876f5e4e87c75417224e79035ecf0641
src/session/manager.h
src/session/manager.h
/* * waysome - wayland based window manager * * Copyright in alphabetical order: * * Copyright (C) 2014-2015 Julian Ganz * Copyright (C) 2014-2015 Manuel Messner * Copyright (C) 2014-2015 Marcel Müller * Copyright (C) 2014-2015 Matthias Beyer * Copyright (C) 2014-2015 Nadja Sommerfeld * * This file is part of waysome. * * waysome is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 2.1 of the License, or (at your option) * any later version. * * waysome is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with waysome. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __WS_SESSION_MANAGER_H__ #define __WS_SESSION_MANAGER_H__ #endif // __WS_SESSION_MANAGER_H__
/* * waysome - wayland based window manager * * Copyright in alphabetical order: * * Copyright (C) 2014-2015 Julian Ganz * Copyright (C) 2014-2015 Manuel Messner * Copyright (C) 2014-2015 Marcel Müller * Copyright (C) 2014-2015 Matthias Beyer * Copyright (C) 2014-2015 Nadja Sommerfeld * * This file is part of waysome. * * waysome is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 2.1 of the License, or (at your option) * any later version. * * waysome is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with waysome. If not, see <http://www.gnu.org/licenses/>. */ /** * @addtogroup session "Session manager" * * @{ */ #ifndef __WS_SESSION_MANAGER_H__ #define __WS_SESSION_MANAGER_H__ #endif // __WS_SESSION_MANAGER_H__ /** * @} */
Add session files to session doc group
Add session files to session doc group
C
lgpl-2.1
waysome/waysome,waysome/waysome
c
## Code Before: /* * waysome - wayland based window manager * * Copyright in alphabetical order: * * Copyright (C) 2014-2015 Julian Ganz * Copyright (C) 2014-2015 Manuel Messner * Copyright (C) 2014-2015 Marcel Müller * Copyright (C) 2014-2015 Matthias Beyer * Copyright (C) 2014-2015 Nadja Sommerfeld * * This file is part of waysome. * * waysome is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 2.1 of the License, or (at your option) * any later version. * * waysome is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with waysome. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __WS_SESSION_MANAGER_H__ #define __WS_SESSION_MANAGER_H__ #endif // __WS_SESSION_MANAGER_H__ ## Instruction: Add session files to session doc group ## Code After: /* * waysome - wayland based window manager * * Copyright in alphabetical order: * * Copyright (C) 2014-2015 Julian Ganz * Copyright (C) 2014-2015 Manuel Messner * Copyright (C) 2014-2015 Marcel Müller * Copyright (C) 2014-2015 Matthias Beyer * Copyright (C) 2014-2015 Nadja Sommerfeld * * This file is part of waysome. * * waysome is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 2.1 of the License, or (at your option) * any later version. * * waysome is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with waysome. If not, see <http://www.gnu.org/licenses/>. */ /** * @addtogroup session "Session manager" * * @{ */ #ifndef __WS_SESSION_MANAGER_H__ #define __WS_SESSION_MANAGER_H__ #endif // __WS_SESSION_MANAGER_H__ /** * @} */
98c70d3bd9fdb922245a39e3df221af27292fdfb
.travis.yml
.travis.yml
language: ruby script: bundle exec rake spec rvm: - 2.0.0 - 2.1 - 2.2.4 - ruby-head gemfile: - gemfiles/Gemfile-rails.3.2.x - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x - gemfiles/Gemfile-rails.4.2.x - gemfiles/Gemfile-rails.5.0.0.beta1 sudo: false matrix: exclude: - rvm: ruby-head gemfile: gemfiles/Gemfile-rails.3.2.x allow_failures: - rvm: ruby-head
language: ruby script: bundle exec rake spec rvm: - 2.0.0 - 2.1 - 2.2.4 - ruby-head gemfile: - gemfiles/Gemfile-rails.3.2.x - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x - gemfiles/Gemfile-rails.4.2.x - gemfiles/Gemfile-rails.5.0.0.beta1 sudo: false matrix: exclude: - rvm: ruby-head gemfile: gemfiles/Gemfile-rails.3.2.x - rvm: 2.0.0 gemfile: gemfiles/Gemfile-rails.5.0.0.beta1 - rvm: 2.1 gemfile: gemfiles/Gemfile-rails.5.0.0.beta1 allow_failures: - rvm: ruby-head
Exclude rails 5 with ruby under 2.1 tests from Travis
Exclude rails 5 with ruby under 2.1 tests from Travis Rails 5 Only Supports Ruby 2.2.2+.
YAML
mit
amatsuda/active_decorator,yui-knk/active_decorator,yui-knk/active_decorator,amatsuda/active_decorator
yaml
## Code Before: language: ruby script: bundle exec rake spec rvm: - 2.0.0 - 2.1 - 2.2.4 - ruby-head gemfile: - gemfiles/Gemfile-rails.3.2.x - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x - gemfiles/Gemfile-rails.4.2.x - gemfiles/Gemfile-rails.5.0.0.beta1 sudo: false matrix: exclude: - rvm: ruby-head gemfile: gemfiles/Gemfile-rails.3.2.x allow_failures: - rvm: ruby-head ## Instruction: Exclude rails 5 with ruby under 2.1 tests from Travis Rails 5 Only Supports Ruby 2.2.2+. ## Code After: language: ruby script: bundle exec rake spec rvm: - 2.0.0 - 2.1 - 2.2.4 - ruby-head gemfile: - gemfiles/Gemfile-rails.3.2.x - gemfiles/Gemfile-rails.4.0.x - gemfiles/Gemfile-rails.4.1.x - gemfiles/Gemfile-rails.4.2.x - gemfiles/Gemfile-rails.5.0.0.beta1 sudo: false matrix: exclude: - rvm: ruby-head gemfile: gemfiles/Gemfile-rails.3.2.x - rvm: 2.0.0 gemfile: gemfiles/Gemfile-rails.5.0.0.beta1 - rvm: 2.1 gemfile: gemfiles/Gemfile-rails.5.0.0.beta1 allow_failures: - rvm: ruby-head
0e71d00b575d51e8687a6791fd59bdd5e06c94df
cookbooks/universe_ubuntu/attributes/default.rb
cookbooks/universe_ubuntu/attributes/default.rb
default['universe']['user'] = 'vagrant' user = default['universe']['user'] default['universe']['home'] = automatic['etc']['passwd'][user]['dir']
default['universe']['user'] = 'vagrant' default['universe']['gpu'] = false # Change to 'true' to enable gpu processing user = default['universe']['user'] default['universe']['home'] = automatic['etc']['passwd'][user]['dir']
Add gpu flag to attributes file
Add gpu flag to attributes file
Ruby
mit
havk64/Universe-on-Ubuntu-Chef-Cookbook,havk64/Universe-on-Ubuntu-Chef-Cookbook
ruby
## Code Before: default['universe']['user'] = 'vagrant' user = default['universe']['user'] default['universe']['home'] = automatic['etc']['passwd'][user]['dir'] ## Instruction: Add gpu flag to attributes file ## Code After: default['universe']['user'] = 'vagrant' default['universe']['gpu'] = false # Change to 'true' to enable gpu processing user = default['universe']['user'] default['universe']['home'] = automatic['etc']['passwd'][user]['dir']
72655de9283671e32f81456a49f9d5776380241f
src/main/scala/Sockets.scala
src/main/scala/Sockets.scala
package org.refptr.iscala import org.zeromq.ZMQ class Sockets(profile: Profile) { val ctx = ZMQ.context(1) val publish = ctx.socket(ZMQ.PUB) val raw_input = ctx.socket(ZMQ.ROUTER) val requests = ctx.socket(ZMQ.ROUTER) val control = ctx.socket(ZMQ.ROUTER) val heartbeat = ctx.socket(ZMQ.REP) private def toURI(port: Int) = s"${profile.transport}://${profile.ip}:$port" publish.bind(toURI(profile.iopub_port)) requests.bind(toURI(profile.shell_port)) control.bind(toURI(profile.control_port)) raw_input.bind(toURI(profile.stdin_port)) heartbeat.bind(toURI(profile.hb_port)) def terminate() { publish.close() raw_input.close() requests.close() control.close() heartbeat.close() ctx.term() } }
package org.refptr.iscala import org.zeromq.ZMQ class Sockets(profile: Profile) { val ctx = ZMQ.context(1) val publish = ctx.socket(ZMQ.PUB) val requests = ctx.socket(ZMQ.ROUTER) val control = ctx.socket(ZMQ.ROUTER) val stdin = ctx.socket(ZMQ.ROUTER) val heartbeat = ctx.socket(ZMQ.REP) private def toURI(port: Int) = s"${profile.transport}://${profile.ip}:$port" publish.bind(toURI(profile.iopub_port)) requests.bind(toURI(profile.shell_port)) control.bind(toURI(profile.control_port)) stdin.bind(toURI(profile.stdin_port)) heartbeat.bind(toURI(profile.hb_port)) def terminate() { publish.close() requests.close() control.close() stdin.close() heartbeat.close() ctx.term() } }
Rename raw_input socket to stdin
Rename raw_input socket to stdin
Scala
mit
nkhuyu/IScala,nkhuyu/IScala,mattpap/IScala,mattpap/IScala
scala
## Code Before: package org.refptr.iscala import org.zeromq.ZMQ class Sockets(profile: Profile) { val ctx = ZMQ.context(1) val publish = ctx.socket(ZMQ.PUB) val raw_input = ctx.socket(ZMQ.ROUTER) val requests = ctx.socket(ZMQ.ROUTER) val control = ctx.socket(ZMQ.ROUTER) val heartbeat = ctx.socket(ZMQ.REP) private def toURI(port: Int) = s"${profile.transport}://${profile.ip}:$port" publish.bind(toURI(profile.iopub_port)) requests.bind(toURI(profile.shell_port)) control.bind(toURI(profile.control_port)) raw_input.bind(toURI(profile.stdin_port)) heartbeat.bind(toURI(profile.hb_port)) def terminate() { publish.close() raw_input.close() requests.close() control.close() heartbeat.close() ctx.term() } } ## Instruction: Rename raw_input socket to stdin ## Code After: package org.refptr.iscala import org.zeromq.ZMQ class Sockets(profile: Profile) { val ctx = ZMQ.context(1) val publish = ctx.socket(ZMQ.PUB) val requests = ctx.socket(ZMQ.ROUTER) val control = ctx.socket(ZMQ.ROUTER) val stdin = ctx.socket(ZMQ.ROUTER) val heartbeat = ctx.socket(ZMQ.REP) private def toURI(port: Int) = s"${profile.transport}://${profile.ip}:$port" publish.bind(toURI(profile.iopub_port)) requests.bind(toURI(profile.shell_port)) control.bind(toURI(profile.control_port)) stdin.bind(toURI(profile.stdin_port)) heartbeat.bind(toURI(profile.hb_port)) def terminate() { publish.close() requests.close() control.close() stdin.close() heartbeat.close() ctx.term() } }
11515bfc3fe725eabfeb5bac45d9ccd798f992dd
lib/thor/task_hash.rb
lib/thor/task_hash.rb
require 'thor/ordered_hash' require 'thor/task' class Thor::TaskHash < Thor::OrderedHash def initialize(klass) super() @klass = klass end def each(local = false, &block) super() { |k, t| yield k, t.with_klass(@klass) } @klass.superclass.tasks.each { |k, t| yield k, t.with_klass(@klass) } unless local || @klass == Thor end def [](name) if task = super(name) return task.with_klass(@klass) end Thor::Task.dynamic(name, @klass) end end
require 'thor/ordered_hash' require 'thor/task' class Thor::TaskHash < Thor::OrderedHash def initialize(klass) super() @klass = klass end def each(local = false, &block) super() { |k, t| yield k, t.with_klass(@klass) } @klass.superclass.tasks.each { |k, t| yield k, t.with_klass(@klass) } unless local || @klass == Thor end def [](name) if task = super(name) || (@klass == Thor && @klass.superclass.tasks[name]) return task.with_klass(@klass) end Thor::Task.dynamic(name, @klass) end end
Make Thor::TaskHash look up tasks from the superclass.
Make Thor::TaskHash look up tasks from the superclass.
Ruby
mit
nju520/bundler,doudou/thor,ximus/bundler,mattbrictson/bundler-1,1337807/bundler,steved/bundler,e2/bundler,smlance/bundler,asutoshpalai/bundler,patvice/bundler,agis-/bundler,mvz/bundler,simplybusiness/bundler,neslom/bundler,ipmobiletech/bundler,Elffers/bundler,fancyremarker/thor,carpodaster/bundler,ligi/bundler,Teino1978-Corp/Teino1978-Corp-bundler,pjump/bundler,zhangkuaiji/bundler,anil826/bundler,roseweixel/bundler,CorainChicago/bundler,schaary/bundler,b-dean/thor,sideci-sample/sideci-sample-bundler,joshsoftware/bundler,joshsoftware/bundler,AiyionPrime/bundler,roseweixel/bundler,jaym/bundler,danimashu/bundler,shaiguitar/thor,Wirachmat/bundler,haonature888/bundler,mdorrance/bundler,haonature/bundler,bundler/bundler,cstrahan/bundler,masarakki/bundler,PG-kura/bundler,zhangkuaiji/bundler,JuanitoFatas/bundler,flyinbutrs/thor,masarakki/bundler,ngpestelos/bundler,schaary/bundler,frsyuki/bundler,Eric-Guo/bundler,groovenauts/thor,gentoo/bundler,seanlinsley/bundler,dilumnavanjana/bundler,lmtim/bundler,CorainChicago/bundler,chulkilee/bundler,fhernandez173/thor,kohgpat/bundler,bronzdoc/bundler,EasonYi/bundler,chulkilee/bundler,kohgpat/bundler,groovenauts/thor,h4ck3rm1k3/bundler,cdwort/bundler,jingweno/bundler,RochesterinNYC/bundler,carpodaster/bundler,chef/bundler,vemmaverve/bundler,davydovanton/bundler,neslom/bundler,philnash/bundler,pivotal-cf-experimental/bundler,haonaturel/bundler,h4ck3rm1k3/bundler,simplybusiness/bundler,byroot/bundler,ligi/bundler,anil826/bundler,ipmobiletech/bundler,jingweno/bundler,eagletmt/bundler,Wirachmat/bundler,fancyremarker/thor,AiyionPrime/bundler,elovelan/bundler,drnic/thor,seanlinsley/bundler,PG-kura/bundler,christer155/bundler,raphael/bundler,cstrahan/bundler,bronzdoc/bundler,jasonkarns/bundler,dilumnavanjana/bundler,mpapis/bundler,cowboyd/bundler,nju520/bundler,Flameeyes/bundler,davydovanton/bundler,sideci-sample/sideci-sample-bundler,frsyuki/bundler,EthanK28/bundler,pivotal-cf-experimental/bundler,sideci-sample/sideci-sample-thor,chef/bundler,haocafes/bundler,agis-/bundler,segiddins/thor,Eric-Guo/bundler,wenderjean/bundler,gregkare/bundler,ximus/bundler,steved/bundler,jasonkarns/bundler,rkh/bundler,EasonYi/bundler,r7kamura/thor,fhernandez173/thor,trampoline/bundler,sideci-sample/sideci-sample-thor,EthanK28/bundler,mdorrance/bundler,gregkare/bundler,tgxworld/bundler,patvice/bundler,tgxworld/bundler,asymmetric/bundler,wenderjean/bundler,mpapis/bundler,christer155/bundler,TimMoore/bundler,twcctz500000/bundler,lgierth/bundler,asymmetric/bundler,linkodehub/thor,r7kamura/thor,smlance/bundler,RochesterinNYC/bundler,jaym/bundler,cdwort/bundler,ngpestelos/bundler,byroot/bundler,TimMoore/bundler,flyinbutrs/thor,Teino1978-Corp/Teino1978-Corp-bundler,suhastech/bundler,ducthanh/bundler,Elffers/bundler,mvz/bundler,jsierles/thor,r7kamura/bundler,asutoshpalai/bundler,philnash/bundler,MasterLambaster/bundler,erikhuda/thor,b-dean/thor,lmtim/bundler,robinboening/bundler,danimashu/bundler,suhastech/bundler,linkodehub/thor,mtscout6/bundler,mattbrictson/bundler-1,robinboening/bundler,pjump/bundler,segiddins/thor,elovelan/bundler,bundler/bundler
ruby
## Code Before: require 'thor/ordered_hash' require 'thor/task' class Thor::TaskHash < Thor::OrderedHash def initialize(klass) super() @klass = klass end def each(local = false, &block) super() { |k, t| yield k, t.with_klass(@klass) } @klass.superclass.tasks.each { |k, t| yield k, t.with_klass(@klass) } unless local || @klass == Thor end def [](name) if task = super(name) return task.with_klass(@klass) end Thor::Task.dynamic(name, @klass) end end ## Instruction: Make Thor::TaskHash look up tasks from the superclass. ## Code After: require 'thor/ordered_hash' require 'thor/task' class Thor::TaskHash < Thor::OrderedHash def initialize(klass) super() @klass = klass end def each(local = false, &block) super() { |k, t| yield k, t.with_klass(@klass) } @klass.superclass.tasks.each { |k, t| yield k, t.with_klass(@klass) } unless local || @klass == Thor end def [](name) if task = super(name) || (@klass == Thor && @klass.superclass.tasks[name]) return task.with_klass(@klass) end Thor::Task.dynamic(name, @klass) end end
ca8d51a2ef6edcd94501d38fde799c9163b7d770
app/src/main/java/in/testpress/testpress/events/SmsReceivingEvent.java
app/src/main/java/in/testpress/testpress/events/SmsReceivingEvent.java
package in.testpress.testpress.events; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import in.testpress.testpress.R; import in.testpress.testpress.authenticator.CodeVerificationActivity.Timer; import in.testpress.testpress.core.Constants; public class SmsReceivingEvent extends BroadcastReceiver { public String code; private Timer timer; public SmsReceivingEvent(Timer timer) { this.timer = timer; } @Override public void onReceive(Context context, Intent intent) { // Retrieves a map of extended data from the intent. final Bundle bundle = intent.getExtras(); try { if (bundle != null) { final Object[] pdusObj = (Object[]) bundle.get("pdus"); SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[0]); String senderNum = currentMessage.getDisplayOriginatingAddress(); if (senderNum.matches(".*TSTPRS")) { //check whether TSTPRS present in senderAddress String smsContent = currentMessage.getDisplayMessageBody(); //get the code from smsContent code = smsContent.replaceAll(".*(?<=Thank you for registering at +"+Constants.Http.URL_BASE +"+. Your authorization code is )([^\n]*)(?=.).*", "$1"); timer.cancel(); timer.onFinish(); } } // bundle is null } catch (Exception e) { timer.cancel(); timer.onFinish(); } } }
package in.testpress.testpress.events; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import in.testpress.testpress.authenticator.CodeVerificationActivity.Timer; public class SmsReceivingEvent extends BroadcastReceiver { public String code; private Timer timer; public SmsReceivingEvent(Timer timer) { this.timer = timer; } @Override public void onReceive(Context context, Intent intent) { // Retrieves a map of extended data from the intent. final Bundle bundle = intent.getExtras(); try { if (bundle != null) { final Object[] pdusObj = (Object[]) bundle.get("pdus"); SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[0]); String senderNum = currentMessage.getDisplayOriginatingAddress(); if (senderNum.matches(".*TSTPRS")) { //check whether TSTPRS present in senderAddress String smsContent = currentMessage.getDisplayMessageBody(); //get the code from smsContent code = smsContent.replaceAll(".*(?=.*)(?<=Your authorization code is )([^\n]*)(?=.).*", "$1"); timer.cancel(); timer.onFinish(); } } // bundle is null } catch (Exception e) { timer.cancel(); timer.onFinish(); } } }
Modify sms format in sms receiving event
Modify sms format in sms receiving event Sms regex format is changed to support all institutes names.
Java
mit
testpress/android,testpress/android,testpress/android,testpress/android,testpress/android
java
## Code Before: package in.testpress.testpress.events; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import in.testpress.testpress.R; import in.testpress.testpress.authenticator.CodeVerificationActivity.Timer; import in.testpress.testpress.core.Constants; public class SmsReceivingEvent extends BroadcastReceiver { public String code; private Timer timer; public SmsReceivingEvent(Timer timer) { this.timer = timer; } @Override public void onReceive(Context context, Intent intent) { // Retrieves a map of extended data from the intent. final Bundle bundle = intent.getExtras(); try { if (bundle != null) { final Object[] pdusObj = (Object[]) bundle.get("pdus"); SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[0]); String senderNum = currentMessage.getDisplayOriginatingAddress(); if (senderNum.matches(".*TSTPRS")) { //check whether TSTPRS present in senderAddress String smsContent = currentMessage.getDisplayMessageBody(); //get the code from smsContent code = smsContent.replaceAll(".*(?<=Thank you for registering at +"+Constants.Http.URL_BASE +"+. Your authorization code is )([^\n]*)(?=.).*", "$1"); timer.cancel(); timer.onFinish(); } } // bundle is null } catch (Exception e) { timer.cancel(); timer.onFinish(); } } } ## Instruction: Modify sms format in sms receiving event Sms regex format is changed to support all institutes names. ## Code After: package in.testpress.testpress.events; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import in.testpress.testpress.authenticator.CodeVerificationActivity.Timer; public class SmsReceivingEvent extends BroadcastReceiver { public String code; private Timer timer; public SmsReceivingEvent(Timer timer) { this.timer = timer; } @Override public void onReceive(Context context, Intent intent) { // Retrieves a map of extended data from the intent. final Bundle bundle = intent.getExtras(); try { if (bundle != null) { final Object[] pdusObj = (Object[]) bundle.get("pdus"); SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[0]); String senderNum = currentMessage.getDisplayOriginatingAddress(); if (senderNum.matches(".*TSTPRS")) { //check whether TSTPRS present in senderAddress String smsContent = currentMessage.getDisplayMessageBody(); //get the code from smsContent code = smsContent.replaceAll(".*(?=.*)(?<=Your authorization code is )([^\n]*)(?=.).*", "$1"); timer.cancel(); timer.onFinish(); } } // bundle is null } catch (Exception e) { timer.cancel(); timer.onFinish(); } } }
b69dacb83221b6d006693e24d8da18ecbfc62dcd
README.md
README.md
Pneumatic-testbed ================= A testbed application to drive design decisions about the Pneumatic game library Creating a window ================= ```c++ #include <string> #include <iostream> #include "pneu/graphics/Window.hpp" #include "pneu/core/MethodResult.hpp" auto main(int argc, const char** argv) -> int { pneu::graphics::Window win("testing", 800, 600, 80, 60); win.init().onError([](const std::string& error) { std::cout << error << std::endl; exit(1); }); while (win.isRunning()) { win.pollEvents(); win.update(); win.renderFrame(); } return 0; } ```
Pneumatic-testbed ================= A testbed application to drive design decisions about the Pneumatic game library
Undo previous commit as example doesn't belong there
Undo previous commit as example doesn't belong there
Markdown
mit
burtonageo/Pneumatic-testbed
markdown
## Code Before: Pneumatic-testbed ================= A testbed application to drive design decisions about the Pneumatic game library Creating a window ================= ```c++ #include <string> #include <iostream> #include "pneu/graphics/Window.hpp" #include "pneu/core/MethodResult.hpp" auto main(int argc, const char** argv) -> int { pneu::graphics::Window win("testing", 800, 600, 80, 60); win.init().onError([](const std::string& error) { std::cout << error << std::endl; exit(1); }); while (win.isRunning()) { win.pollEvents(); win.update(); win.renderFrame(); } return 0; } ``` ## Instruction: Undo previous commit as example doesn't belong there ## Code After: Pneumatic-testbed ================= A testbed application to drive design decisions about the Pneumatic game library
40be948ae58449c7be11b243b9df4316e2e92c4a
recipes/libpgmath/build.sh
recipes/libpgmath/build.sh
cd runtime/libpgmath mkdir build cd build if [[ $target_platform == "osx-64" ]]; then export CC=$PREFIX/bin/clang export CXX=$PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX elif [[ $target_platform == "win-64" ]]; then export CC=clang-cl.exe export CXX=clang-cl.exe export LIBRARY_PREFIX=$PREFIX/Library export CMAKE_GENERATOR="MSYS Makefiles" else export CC=$BUILD_PREFIX/bin/clang export CXX=$BUILD_PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX fi PIP_NO_INDEX= pip install lit cmake \ -G "${CMAKE_GENERATOR}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$LIBRARY_PREFIX \ -DCMAKE_PREFIX_PATH=$LIBRARY_PREFIX \ .. make -j${CPU_COUNT} make install make check-libpgmath
cd runtime/libpgmath mkdir build cd build if [[ $target_platform == "osx-64" ]]; then export CC=$PREFIX/bin/clang export CXX=$PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX elif [[ $target_platform == "win-64" ]]; then export CC=$BUILD_PREFIX/Library/bin/clang-cl.exe export CXX=$BUILD_PREFIX/Library/bin/clang-cl.exe export LIBRARY_PREFIX=$PREFIX/Library export CMAKE_GENERATOR="MSYS Makefiles" else export CC=$BUILD_PREFIX/bin/clang export CXX=$BUILD_PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX fi PIP_NO_INDEX= pip install lit cmake \ -G "${CMAKE_GENERATOR}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$LIBRARY_PREFIX \ -DCMAKE_PREFIX_PATH=$LIBRARY_PREFIX \ .. make -j${CPU_COUNT} make install make check-libpgmath
Revert "No full path to clang-cl"
Revert "No full path to clang-cl" This reverts commit 17174b032c7a76d8a51fdbd15101e1f6b5ea8082.
Shell
bsd-3-clause
isuruf/staged-recipes,mariusvniekerk/staged-recipes,kwilcox/staged-recipes,synapticarbors/staged-recipes,conda-forge/staged-recipes,scopatz/staged-recipes,ocefpaf/staged-recipes,chrisburr/staged-recipes,petrushy/staged-recipes,goanpeca/staged-recipes,igortg/staged-recipes,stuertz/staged-recipes,mcs07/staged-recipes,patricksnape/staged-recipes,chrisburr/staged-recipes,ReimarBauer/staged-recipes,jakirkham/staged-recipes,birdsarah/staged-recipes,jakirkham/staged-recipes,johanneskoester/staged-recipes,dschreij/staged-recipes,patricksnape/staged-recipes,synapticarbors/staged-recipes,kwilcox/staged-recipes,jochym/staged-recipes,goanpeca/staged-recipes,SylvainCorlay/staged-recipes,Juanlu001/staged-recipes,igortg/staged-recipes,mariusvniekerk/staged-recipes,ocefpaf/staged-recipes,birdsarah/staged-recipes,ReimarBauer/staged-recipes,hadim/staged-recipes,stuertz/staged-recipes,isuruf/staged-recipes,SylvainCorlay/staged-recipes,asmeurer/staged-recipes,asmeurer/staged-recipes,jochym/staged-recipes,hadim/staged-recipes,petrushy/staged-recipes,dschreij/staged-recipes,mcs07/staged-recipes,Juanlu001/staged-recipes,conda-forge/staged-recipes,johanneskoester/staged-recipes,scopatz/staged-recipes
shell
## Code Before: cd runtime/libpgmath mkdir build cd build if [[ $target_platform == "osx-64" ]]; then export CC=$PREFIX/bin/clang export CXX=$PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX elif [[ $target_platform == "win-64" ]]; then export CC=clang-cl.exe export CXX=clang-cl.exe export LIBRARY_PREFIX=$PREFIX/Library export CMAKE_GENERATOR="MSYS Makefiles" else export CC=$BUILD_PREFIX/bin/clang export CXX=$BUILD_PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX fi PIP_NO_INDEX= pip install lit cmake \ -G "${CMAKE_GENERATOR}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$LIBRARY_PREFIX \ -DCMAKE_PREFIX_PATH=$LIBRARY_PREFIX \ .. make -j${CPU_COUNT} make install make check-libpgmath ## Instruction: Revert "No full path to clang-cl" This reverts commit 17174b032c7a76d8a51fdbd15101e1f6b5ea8082. ## Code After: cd runtime/libpgmath mkdir build cd build if [[ $target_platform == "osx-64" ]]; then export CC=$PREFIX/bin/clang export CXX=$PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX elif [[ $target_platform == "win-64" ]]; then export CC=$BUILD_PREFIX/Library/bin/clang-cl.exe export CXX=$BUILD_PREFIX/Library/bin/clang-cl.exe export LIBRARY_PREFIX=$PREFIX/Library export CMAKE_GENERATOR="MSYS Makefiles" else export CC=$BUILD_PREFIX/bin/clang export CXX=$BUILD_PREFIX/bin/clang++ export LIBRARY_PREFIX=$PREFIX fi PIP_NO_INDEX= pip install lit cmake \ -G "${CMAKE_GENERATOR}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$LIBRARY_PREFIX \ -DCMAKE_PREFIX_PATH=$LIBRARY_PREFIX \ .. make -j${CPU_COUNT} make install make check-libpgmath
a6e1a602f182d388c7aa477361baa0117da8064e
spec/acceptance/nodesets/ubuntu-1204-64.yml
spec/acceptance/nodesets/ubuntu-1204-64.yml
HOSTS: ubuntu-1204-x64: roles: - master platform: ubuntu-1204-x86_64 hypervisor: docker image: ubuntu:12.04 docker_preserve_image: true # The default 'service ssh start' is not working on Ubuntu 12.04 because upstart has been disabled # see https://github.com/tianon/docker-brew-ubuntu-core/issues/4#event-142513085 docker_cmd: '["sh", "-c", "/usr/sbin/sshd -D"]' docker_image_commands: # Install a more recent version of PHP - 'echo "deb http://ppa.launchpad.net/ondrej/php5/ubuntu precise main" >> /etc/apt/sources.list' - 'apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C' - 'apt-get update' - 'apt-get -qqy install cron' CONFIG: type: foss log_level: info trace_limit: 100
HOSTS: ubuntu-1204-x64: roles: - master platform: ubuntu-1204-x86_64 hypervisor: docker image: ubuntu:12.04 docker_preserve_image: true # The default 'service ssh start' is not working on Ubuntu 12.04 because upstart has been disabled # see https://github.com/tianon/docker-brew-ubuntu-core/issues/4#event-142513085 docker_cmd: '["sh", "-c", "/usr/sbin/sshd -D"]' docker_image_commands: # Install a more recent version of PHP - 'echo "deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu precise main" >> /etc/apt/sources.list' - 'apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C' - 'apt-get update' - 'apt-get -qqy install cron' CONFIG: type: foss log_level: info trace_limit: 100
Downgrade to PHP 5.4 to avoid pulling in Apache 2.4
Downgrade to PHP 5.4 to avoid pulling in Apache 2.4
YAML
apache-2.0
tohuwabohu/puppet-roundcube,tohuwabohu/puppet-roundcube
yaml
## Code Before: HOSTS: ubuntu-1204-x64: roles: - master platform: ubuntu-1204-x86_64 hypervisor: docker image: ubuntu:12.04 docker_preserve_image: true # The default 'service ssh start' is not working on Ubuntu 12.04 because upstart has been disabled # see https://github.com/tianon/docker-brew-ubuntu-core/issues/4#event-142513085 docker_cmd: '["sh", "-c", "/usr/sbin/sshd -D"]' docker_image_commands: # Install a more recent version of PHP - 'echo "deb http://ppa.launchpad.net/ondrej/php5/ubuntu precise main" >> /etc/apt/sources.list' - 'apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C' - 'apt-get update' - 'apt-get -qqy install cron' CONFIG: type: foss log_level: info trace_limit: 100 ## Instruction: Downgrade to PHP 5.4 to avoid pulling in Apache 2.4 ## Code After: HOSTS: ubuntu-1204-x64: roles: - master platform: ubuntu-1204-x86_64 hypervisor: docker image: ubuntu:12.04 docker_preserve_image: true # The default 'service ssh start' is not working on Ubuntu 12.04 because upstart has been disabled # see https://github.com/tianon/docker-brew-ubuntu-core/issues/4#event-142513085 docker_cmd: '["sh", "-c", "/usr/sbin/sshd -D"]' docker_image_commands: # Install a more recent version of PHP - 'echo "deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu precise main" >> /etc/apt/sources.list' - 'apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C' - 'apt-get update' - 'apt-get -qqy install cron' CONFIG: type: foss log_level: info trace_limit: 100
95a71b03b2b19b55bfb1cc281cfad0fbdee001f1
requirements.txt
requirements.txt
gunicorn==19.7.1 backports-abc==0.5 bkcharts==0.2 bokeh==0.12.10 certifi==2017.7.27.1 chardet==3.0.4 click==6.7 Flask==0.12.2 idna==2.6 itsdangerous==0.24 Jinja2==2.9.6 MarkupSafe==1.0 numpy==1.13.3 python-dateutil==2.6.1 PyYAML==3.12 requests==2.18.4 singledispatch==3.4.0.3 six==1.11.0 tornado==4.5.2 urllib3==1.22 Werkzeug==0.12.2 pandas==0.21.0 scipy==1.0.0 astropy==2.0.2 matplotlib==2.0.2 mpld3==0.3 tables===3.4.2 apscheduler==3.4.0
gunicorn==19.7.1 backports-abc==0.5 bkcharts==0.2 bokeh==0.12.10 certifi==2017.7.27.1 chardet==3.0.4 click==6.7 Flask==0.12.2 idna==2.6 itsdangerous==0.24 Jinja2==2.9.6 MarkupSafe==1.0 numpy==1.13.3 python-dateutil==2.6.1 PyYAML==3.12 requests==2.18.4 singledispatch==3.4.0.3 six==1.11.0 tornado==4.5.2 urllib3==1.22 Werkzeug==0.12.2 pandas==0.21.0 scipy==1.0.0 astropy==2.0.2 matplotlib==2.0.2 mpld3==0.3 tables===3.4.2 apscheduler==3.4.0 PyAstronomy==0.11.1
Add PyAstronomy which are used for updating exoEU DB
Add PyAstronomy which are used for updating exoEU DB
Text
mit
DanielAndreasen/SWEETer-Cat,DanielAndreasen/SWEETer-Cat
text
## Code Before: gunicorn==19.7.1 backports-abc==0.5 bkcharts==0.2 bokeh==0.12.10 certifi==2017.7.27.1 chardet==3.0.4 click==6.7 Flask==0.12.2 idna==2.6 itsdangerous==0.24 Jinja2==2.9.6 MarkupSafe==1.0 numpy==1.13.3 python-dateutil==2.6.1 PyYAML==3.12 requests==2.18.4 singledispatch==3.4.0.3 six==1.11.0 tornado==4.5.2 urllib3==1.22 Werkzeug==0.12.2 pandas==0.21.0 scipy==1.0.0 astropy==2.0.2 matplotlib==2.0.2 mpld3==0.3 tables===3.4.2 apscheduler==3.4.0 ## Instruction: Add PyAstronomy which are used for updating exoEU DB ## Code After: gunicorn==19.7.1 backports-abc==0.5 bkcharts==0.2 bokeh==0.12.10 certifi==2017.7.27.1 chardet==3.0.4 click==6.7 Flask==0.12.2 idna==2.6 itsdangerous==0.24 Jinja2==2.9.6 MarkupSafe==1.0 numpy==1.13.3 python-dateutil==2.6.1 PyYAML==3.12 requests==2.18.4 singledispatch==3.4.0.3 six==1.11.0 tornado==4.5.2 urllib3==1.22 Werkzeug==0.12.2 pandas==0.21.0 scipy==1.0.0 astropy==2.0.2 matplotlib==2.0.2 mpld3==0.3 tables===3.4.2 apscheduler==3.4.0 PyAstronomy==0.11.1
75a66a9bad87cf4c9b9dfea6be5ffbf1559a791d
src/main/webapp/scripts/index.js
src/main/webapp/scripts/index.js
//$("checkbox").click(setLocationCookie); $(document).ready(function() { $('#location-checkbox').change(function() { if(this.checked) { setLocationCookie(); } }); });
//$("checkbox").click(setLocationCookie); $(document).ready(function() { $('#location-checkbox').change(function() { if(this.checked) { setLocationCookie(); } }); $('#blob-input').change(function() { const filePath = $(this).val(); $('#file-path').text(filePath.split('\\').pop()); }); });
Add js for fake upload button
Add js for fake upload button
JavaScript
apache-2.0
googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020
javascript
## Code Before: //$("checkbox").click(setLocationCookie); $(document).ready(function() { $('#location-checkbox').change(function() { if(this.checked) { setLocationCookie(); } }); }); ## Instruction: Add js for fake upload button ## Code After: //$("checkbox").click(setLocationCookie); $(document).ready(function() { $('#location-checkbox').change(function() { if(this.checked) { setLocationCookie(); } }); $('#blob-input').change(function() { const filePath = $(this).val(); $('#file-path').text(filePath.split('\\').pop()); }); });
07c3c7e00a4c2733a3233ff483797c798451a87f
apps/predict/mixins.py
apps/predict/mixins.py
from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from .models import PredictDataset class PredictMixin(object): """The baseline predict view""" slug_field = 'md5' @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): """Only allow a logged in users to view""" return super(PredictMixin, self).dispatch(request, *args, **kwargs) def get_queryset(self): """Limit queryset to the user's own predictions only""" qs = PredictDataset.objects.all() if 'slug' not in self.kwargs: # Limit to my own predictions unless I have the md5 qs = qs.filter(user_id=self.request.user.pk) return qs
from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from .models import PredictDataset class PredictMixin(object): """The baseline predict view""" slug_field = 'md5' @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): """Only allow a logged in users to view""" return super(PredictMixin, self).dispatch(request, *args, **kwargs) def get_queryset(self): """Limit queryset to the user's own predictions only""" qset = PredictDataset.objects.all() if 'slug' not in self.kwargs: # Limit to my own predictions unless I have the md5 qset = qset.filter(user_id=self.request.user.pk) return qset.prefetch_related('strains', 'strains__piperun', 'strains__piperun__programs')
Improve prefetch speed in predict listing pages
Improve prefetch speed in predict listing pages
Python
agpl-3.0
IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site,IQSS/gentb-site
python
## Code Before: from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from .models import PredictDataset class PredictMixin(object): """The baseline predict view""" slug_field = 'md5' @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): """Only allow a logged in users to view""" return super(PredictMixin, self).dispatch(request, *args, **kwargs) def get_queryset(self): """Limit queryset to the user's own predictions only""" qs = PredictDataset.objects.all() if 'slug' not in self.kwargs: # Limit to my own predictions unless I have the md5 qs = qs.filter(user_id=self.request.user.pk) return qs ## Instruction: Improve prefetch speed in predict listing pages ## Code After: from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from .models import PredictDataset class PredictMixin(object): """The baseline predict view""" slug_field = 'md5' @method_decorator(login_required) def dispatch(self, request, *args, **kwargs): """Only allow a logged in users to view""" return super(PredictMixin, self).dispatch(request, *args, **kwargs) def get_queryset(self): """Limit queryset to the user's own predictions only""" qset = PredictDataset.objects.all() if 'slug' not in self.kwargs: # Limit to my own predictions unless I have the md5 qset = qset.filter(user_id=self.request.user.pk) return qset.prefetch_related('strains', 'strains__piperun', 'strains__piperun__programs')
53593511d70e0e84ac01fa0daca2496566afc500
config/initializers/middleware.js
config/initializers/middleware.js
var express = require('express') var expressValidator = require('express-validator') var passport = require('./passport.js'); module.exports = (function(){ function configure(app) { app.use(express.static(__dirname + '/public')) app.use(passport.initialize()) app.use(express.static(__dirname + '/public')) app.use(function(req,res,next) { res.header("Access-Control-Allow-Origin", "*") res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept") next() }) app.use(express.bodyParser()) app.use(expressValidator()); app.use(express.cookieParser()) app.use(express.session({secret: 'oi09ajsdf09fwlkej33lkjpx'})) app.use(express.methodOverride()) app.use(function(err, req, res, next) { res.send({ error: err }) }); } return { configure: configure } })()
var express = require('express') var expressValidator = require('express-validator') var passport = require('./passport.js'); module.exports = (function(){ function configure(app) { app.use(function(req,res,next) { res.header("Access-Control-Allow-Origin", "*") res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept") next() }) app.use(express.bodyParser()) app.use(expressValidator()); app.use(express.cookieParser()) app.use(express.session({secret: 'oi09ajsdf09fwlkej33lkjpx'})) app.use(express.methodOverride()) app.use(express.static(__dirname + '/../../public')) app.use(passport.initialize()) app.use(function(err, req, res, next) { res.send({ error: err }) }); } return { configure: configure } })()
Update relative path to static files.
[CHORE] Update relative path to static files.
JavaScript
isc
xdv/gatewayd,whotooktwarden/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,zealord/gatewayd,zealord/gatewayd
javascript
## Code Before: var express = require('express') var expressValidator = require('express-validator') var passport = require('./passport.js'); module.exports = (function(){ function configure(app) { app.use(express.static(__dirname + '/public')) app.use(passport.initialize()) app.use(express.static(__dirname + '/public')) app.use(function(req,res,next) { res.header("Access-Control-Allow-Origin", "*") res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept") next() }) app.use(express.bodyParser()) app.use(expressValidator()); app.use(express.cookieParser()) app.use(express.session({secret: 'oi09ajsdf09fwlkej33lkjpx'})) app.use(express.methodOverride()) app.use(function(err, req, res, next) { res.send({ error: err }) }); } return { configure: configure } })() ## Instruction: [CHORE] Update relative path to static files. ## Code After: var express = require('express') var expressValidator = require('express-validator') var passport = require('./passport.js'); module.exports = (function(){ function configure(app) { app.use(function(req,res,next) { res.header("Access-Control-Allow-Origin", "*") res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept") next() }) app.use(express.bodyParser()) app.use(expressValidator()); app.use(express.cookieParser()) app.use(express.session({secret: 'oi09ajsdf09fwlkej33lkjpx'})) app.use(express.methodOverride()) app.use(express.static(__dirname + '/../../public')) app.use(passport.initialize()) app.use(function(err, req, res, next) { res.send({ error: err }) }); } return { configure: configure } })()
76ac1d7a0769b17e898d4f0410fedd1e90e950de
app/views/favourites/index.html.erb
app/views/favourites/index.html.erb
<%= content_for :search_bar do %> <%= render 'shared/search_bar' %> <% end %> <%= content_for :filter_menu do %> <%= render 'shared/filter_menu' %> <% end %> <article id="monster-list" class="pt5 mt5"> <%= render 'monsters/empty', empty: false %> </article> <script type="text/javascript"> if (localStorage.hasOwnProperty('favourites') == true && "<%= @monster_set.slug.html_safe %>" in JSON.parse(localStorage.getItem('favourites'))) { $.ajax({ url: "/favourites/fetch", data: {favourite_monsters: JSON.parse(localStorage.favourites)["<%= @monster_set.slug.html_safe %>"]}, success: function (data, response) { $('article#monster-list').append(data); filters.init(); favourites.init({set:"<%=@monster_set.slug.html_safe%>"}); }, }); }; </script>
<%= content_for :search_bar do %> <%= render 'shared/search_bar' %> <% end %> <%= content_for :filter_menu do %> <%= render 'shared/filter_menu' %> <% end %> <article id="monster-list" class="pt5 mt5"> <%= render 'monsters/empty', empty: false %> </article> <script type="text/javascript"> if (localStorage.hasOwnProperty('favourites') == true && "<%= @monster_set.slug.html_safe %>" in JSON.parse(localStorage.getItem('favourites'))) { $.ajax({ url: "/favourites/fetch", data: {favourite_monsters: JSON.parse(localStorage.favourites)["<%= @monster_set.slug.html_safe %>"]}, success: function (data, response) { $('article#monster-list').append(data); filters.init({ crXp: <%= Monster::CR_XP.to_json.html_safe %>, }); favourites.init({set:"<%=@monster_set.slug.html_safe%>"}); }, }); }; </script>
Initialize filter on favourites index with crxp map.
Initialize filter on favourites index with crxp map.
HTML+ERB
mit
evangillespie/monsterCards,evangillespie/monsterCards,evangillespie/monsterCards
html+erb
## Code Before: <%= content_for :search_bar do %> <%= render 'shared/search_bar' %> <% end %> <%= content_for :filter_menu do %> <%= render 'shared/filter_menu' %> <% end %> <article id="monster-list" class="pt5 mt5"> <%= render 'monsters/empty', empty: false %> </article> <script type="text/javascript"> if (localStorage.hasOwnProperty('favourites') == true && "<%= @monster_set.slug.html_safe %>" in JSON.parse(localStorage.getItem('favourites'))) { $.ajax({ url: "/favourites/fetch", data: {favourite_monsters: JSON.parse(localStorage.favourites)["<%= @monster_set.slug.html_safe %>"]}, success: function (data, response) { $('article#monster-list').append(data); filters.init(); favourites.init({set:"<%=@monster_set.slug.html_safe%>"}); }, }); }; </script> ## Instruction: Initialize filter on favourites index with crxp map. ## Code After: <%= content_for :search_bar do %> <%= render 'shared/search_bar' %> <% end %> <%= content_for :filter_menu do %> <%= render 'shared/filter_menu' %> <% end %> <article id="monster-list" class="pt5 mt5"> <%= render 'monsters/empty', empty: false %> </article> <script type="text/javascript"> if (localStorage.hasOwnProperty('favourites') == true && "<%= @monster_set.slug.html_safe %>" in JSON.parse(localStorage.getItem('favourites'))) { $.ajax({ url: "/favourites/fetch", data: {favourite_monsters: JSON.parse(localStorage.favourites)["<%= @monster_set.slug.html_safe %>"]}, success: function (data, response) { $('article#monster-list').append(data); filters.init({ crXp: <%= Monster::CR_XP.to_json.html_safe %>, }); favourites.init({set:"<%=@monster_set.slug.html_safe%>"}); }, }); }; </script>
a0b61fcf9bd6df2de1491162b514dba8afd9803d
tst/main.ts
tst/main.ts
/// <reference path="../src/amd.ts" /> declare const global: any, require: any; const assert = require('assert'); global.require(['tst/fizz'], (fizz: any) => assert.strictEqual(fizz.buzz(), 5));
/// <reference path="../src/amd.ts" /> declare const global: any, require: any; const assert = require('assert'); // Test variants of modules emitted by tsc global.require(['tst/fizz'], (fizz: any) => assert.strictEqual(fizz.buzz(), 5)); // Test mixed sequence of inter-dependent modules global.define('a', [], () => 2) global.require(['b', 'c', 'a'], (b: any, c: any, a: any) => assert.strictEqual(b + c.a + a, 10)); global.define('b', ['c'], (c: any) => c.a + 2); global.define('c', ['a'], (a: any) => ({ a: 1 + a })); global.require(['a', 'd'], (a: any, d: any) => assert.strictEqual(a + d.z, 10)); global.define('d', ['e'], (e: any) => ({ z: 4 + e })); global.define('e', ['a'], (a: any) => 2 + a);
Add tests covering mixed sequence of define/require
Add tests covering mixed sequence of define/require
TypeScript
mit
federico-lox/AMD.ts,federico-lox/AMD.ts
typescript
## Code Before: /// <reference path="../src/amd.ts" /> declare const global: any, require: any; const assert = require('assert'); global.require(['tst/fizz'], (fizz: any) => assert.strictEqual(fizz.buzz(), 5)); ## Instruction: Add tests covering mixed sequence of define/require ## Code After: /// <reference path="../src/amd.ts" /> declare const global: any, require: any; const assert = require('assert'); // Test variants of modules emitted by tsc global.require(['tst/fizz'], (fizz: any) => assert.strictEqual(fizz.buzz(), 5)); // Test mixed sequence of inter-dependent modules global.define('a', [], () => 2) global.require(['b', 'c', 'a'], (b: any, c: any, a: any) => assert.strictEqual(b + c.a + a, 10)); global.define('b', ['c'], (c: any) => c.a + 2); global.define('c', ['a'], (a: any) => ({ a: 1 + a })); global.require(['a', 'd'], (a: any, d: any) => assert.strictEqual(a + d.z, 10)); global.define('d', ['e'], (e: any) => ({ z: 4 + e })); global.define('e', ['a'], (a: any) => 2 + a);
4c0e83405b43c3da72e2a48bfc84c29f4d3b78ad
server/dbconnection.ts
server/dbconnection.ts
import mongo = require("mongodb"); const client = mongo.MongoClient; interface Db extends mongo.Db { users: mongo.Collection; } export const initialize = () => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: Db) { if (err) { return; } if (!db.users) { db.createCollection("users"); } }); }; export const upsertUser = (patreonId: string, accessKey: string, refreshKey: string, accountStatus: string, res) => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: Db) { if (err) { res.json(err); return; } db.users.updateOne( { patreonId }, { patreonId, accessKey, refreshKey, accountStatus }, { upsert: true }, (err, result) => { if (err) { res.json(err); } res.json(result); }); }); }
import mongo = require("mongodb"); const client = mongo.MongoClient; export const initialize = () => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: Db) { if (err) { return; } if (!db.users) { db.createCollection("users"); } }); }; export const upsertUser = (patreonId: string, accessKey: string, refreshKey: string, accountStatus: string, res) => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: mongo.Db) { if (err) { res.json(err); return; } const users = db.collection("users"); users.updateOne( { patreonId }, { patreonId, accessKey, refreshKey, accountStatus }, { upsert: true }, (err, result) => { if (err) { res.json(err); } res.json(result); }); }); }
Correct mongodb api collection access
Correct mongodb api collection access
TypeScript
mit
cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative
typescript
## Code Before: import mongo = require("mongodb"); const client = mongo.MongoClient; interface Db extends mongo.Db { users: mongo.Collection; } export const initialize = () => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: Db) { if (err) { return; } if (!db.users) { db.createCollection("users"); } }); }; export const upsertUser = (patreonId: string, accessKey: string, refreshKey: string, accountStatus: string, res) => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: Db) { if (err) { res.json(err); return; } db.users.updateOne( { patreonId }, { patreonId, accessKey, refreshKey, accountStatus }, { upsert: true }, (err, result) => { if (err) { res.json(err); } res.json(result); }); }); } ## Instruction: Correct mongodb api collection access ## Code After: import mongo = require("mongodb"); const client = mongo.MongoClient; export const initialize = () => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: Db) { if (err) { return; } if (!db.users) { db.createCollection("users"); } }); }; export const upsertUser = (patreonId: string, accessKey: string, refreshKey: string, accountStatus: string, res) => { if (!process.env.DB_CONNECTION_STRING) { console.error("No connection string found."); return; } client.connect(process.env.DB_CONNECTION_STRING, function (err, db: mongo.Db) { if (err) { res.json(err); return; } const users = db.collection("users"); users.updateOne( { patreonId }, { patreonId, accessKey, refreshKey, accountStatus }, { upsert: true }, (err, result) => { if (err) { res.json(err); } res.json(result); }); }); }
dca539c770ed3655de37180ffde7c5db4424aa99
lib/less/rails/railtie.rb
lib/less/rails/railtie.rb
require 'sprockets/railtie' module Less module Rails class Railtie < ::Rails::Railtie config.less = ActiveSupport::OrderedOptions.new config.less.paths = [] config.less.compress = false config.app_generators.stylesheet_engine :less config.before_initialize do |app| require 'less' require 'less-rails' Sprockets::Engines #force autoloading Sprockets.register_engine '.less', LessTemplate end initializer 'less-rails.before.load_config_initializers', :before => :load_config_initializers, :group => :all do |app| app.assets.register_preprocessor 'text/css', ImportProcessor Sprockets.register_preprocessor 'text/css', ImportProcessor if Sprockets.respond_to?('register_preprocessor') config.assets.configure do |env| env.context_class.class_eval do class_attribute :less_config self.less_config = app.config.less end end end initializer 'less-rails.after.append_assets_path', :after => :append_assets_path, :group => :all do |app| assets_stylesheet_paths = app.config.assets.paths.select { |p| p && p.to_s.ends_with?('stylesheets') } app.config.less.paths.unshift(*assets_stylesheet_paths) end initializer 'less-rails.setup_compression', :group => :all do |app| config.less.compress = app.config.assets.compress end end end end
require 'sprockets/railtie' module Less module Rails class Railtie < ::Rails::Railtie config.less = ActiveSupport::OrderedOptions.new config.less.paths = [] config.less.compress = false config.app_generators.stylesheet_engine :less config.before_initialize do |app| require 'less' require 'less-rails' Sprockets::Engines #force autoloading Sprockets.register_engine '.less', LessTemplate end initializer 'less-rails.before.load_config_initializers', :before => :load_config_initializers, :group => :all do |app| sprockets_env = app.assets || Sprockets sprockets_env.register_preprocessor 'text/css', ImportProcessor config.assets.configure do |env| env.context_class.class_eval do class_attribute :less_config self.less_config = app.config.less end end end initializer 'less-rails.after.append_assets_path', :after => :append_assets_path, :group => :all do |app| assets_stylesheet_paths = app.config.assets.paths.select { |p| p && p.to_s.ends_with?('stylesheets') } app.config.less.paths.unshift(*assets_stylesheet_paths) end initializer 'less-rails.setup_compression', :group => :all do |app| config.less.compress = app.config.assets.compress end end end end
Fix Undefined MethodError at app.assets.register_preprocessor for sprockets3.X
Fix Undefined MethodError at app.assets.register_preprocessor for sprockets3.X
Ruby
mit
Genkilabs/less-rails,metaskills/less-rails
ruby
## Code Before: require 'sprockets/railtie' module Less module Rails class Railtie < ::Rails::Railtie config.less = ActiveSupport::OrderedOptions.new config.less.paths = [] config.less.compress = false config.app_generators.stylesheet_engine :less config.before_initialize do |app| require 'less' require 'less-rails' Sprockets::Engines #force autoloading Sprockets.register_engine '.less', LessTemplate end initializer 'less-rails.before.load_config_initializers', :before => :load_config_initializers, :group => :all do |app| app.assets.register_preprocessor 'text/css', ImportProcessor Sprockets.register_preprocessor 'text/css', ImportProcessor if Sprockets.respond_to?('register_preprocessor') config.assets.configure do |env| env.context_class.class_eval do class_attribute :less_config self.less_config = app.config.less end end end initializer 'less-rails.after.append_assets_path', :after => :append_assets_path, :group => :all do |app| assets_stylesheet_paths = app.config.assets.paths.select { |p| p && p.to_s.ends_with?('stylesheets') } app.config.less.paths.unshift(*assets_stylesheet_paths) end initializer 'less-rails.setup_compression', :group => :all do |app| config.less.compress = app.config.assets.compress end end end end ## Instruction: Fix Undefined MethodError at app.assets.register_preprocessor for sprockets3.X ## Code After: require 'sprockets/railtie' module Less module Rails class Railtie < ::Rails::Railtie config.less = ActiveSupport::OrderedOptions.new config.less.paths = [] config.less.compress = false config.app_generators.stylesheet_engine :less config.before_initialize do |app| require 'less' require 'less-rails' Sprockets::Engines #force autoloading Sprockets.register_engine '.less', LessTemplate end initializer 'less-rails.before.load_config_initializers', :before => :load_config_initializers, :group => :all do |app| sprockets_env = app.assets || Sprockets sprockets_env.register_preprocessor 'text/css', ImportProcessor config.assets.configure do |env| env.context_class.class_eval do class_attribute :less_config self.less_config = app.config.less end end end initializer 'less-rails.after.append_assets_path', :after => :append_assets_path, :group => :all do |app| assets_stylesheet_paths = app.config.assets.paths.select { |p| p && p.to_s.ends_with?('stylesheets') } app.config.less.paths.unshift(*assets_stylesheet_paths) end initializer 'less-rails.setup_compression', :group => :all do |app| config.less.compress = app.config.assets.compress end end end end
8d8bfecab60a4104d0e7871d51216e2524da8dea
src/Reflow/Parser.hs
src/Reflow/Parser.hs
module Reflow.Parser where import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text as T import Text.ParserCombinators.Parsec import Reflow.Types parseFile :: Text -> [Content] parseFile t = either (const []) id $ parse parseContent "content" (T.unpack t) parseContent :: Parser [Content] parseContent = many (quoted <|> codeBlock <|> normal) <* eof normal :: Parser Content normal = Normal <$> singleLine quoted :: Parser Content quoted = do q <- quoteChar l <- singleLine return $ Quoted (q <> l) codeBlock :: Parser Content codeBlock = do s <- codeBlockChar c <- codeBlockContents e <- codeBlockChar eol return $ CodeBlock $ s <> c <> e singleLine :: Parser Text singleLine = T.pack <$> manyTill anyChar (try eol) quoteChar :: Parser Text quoteChar = T.pack <$> (string ">") codeBlockChar :: Parser Text codeBlockChar = T.pack <$> (string "```") codeBlockContents :: Parser Text codeBlockContents = T.pack <$> manyTill anyChar (lookAhead codeBlockChar) eol :: Parser String eol = try (string "\n\r") <|> try (string "\r\n") <|> string "\n" <|> string "\r" <?> "end of line"
module Reflow.Parser where import Data.Monoid ((<>)) import Data.Text (Text, pack) import Text.Parsec import Text.Parsec.Text (Parser) import Reflow.Types parseFile :: Text -> [Content] parseFile t = either (const []) id $ parse parseContent "content" t parseContent :: Parser [Content] parseContent = many (quoted <|> codeBlock <|> normal) <* eof normal :: Parser Content normal = Normal <$> singleLine quoted :: Parser Content quoted = do q <- quoteChar l <- singleLine return $ Quoted (q <> l) codeBlock :: Parser Content codeBlock = do s <- codeBlockChar c <- codeBlockContents e <- codeBlockChar eol return $ CodeBlock $ s <> c <> e singleLine :: Parser Text singleLine = pack <$> manyTill anyChar (try eol) quoteChar :: Parser Text quoteChar = pack <$> (string ">") codeBlockChar :: Parser Text codeBlockChar = pack <$> (string "```") codeBlockContents :: Parser Text codeBlockContents = pack <$> manyTill anyChar (lookAhead codeBlockChar) eol :: Parser String eol = try (string "\n\r") <|> try (string "\r\n") <|> string "\n" <|> string "\r" <?> "end of line"
Make parsing Data.Text.Text slightly nicer
Make parsing Data.Text.Text slightly nicer Parsec has had support for parsing Text Since version 3.1.2, so we don't need `T.unpack text` as long as we also import `Text.Parsec.Text`. This also means that the code only requires `(Text, pack)` from `Data.Text`, so import only those (unqualified).
Haskell
mit
gfontenot/reflow
haskell
## Code Before: module Reflow.Parser where import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text as T import Text.ParserCombinators.Parsec import Reflow.Types parseFile :: Text -> [Content] parseFile t = either (const []) id $ parse parseContent "content" (T.unpack t) parseContent :: Parser [Content] parseContent = many (quoted <|> codeBlock <|> normal) <* eof normal :: Parser Content normal = Normal <$> singleLine quoted :: Parser Content quoted = do q <- quoteChar l <- singleLine return $ Quoted (q <> l) codeBlock :: Parser Content codeBlock = do s <- codeBlockChar c <- codeBlockContents e <- codeBlockChar eol return $ CodeBlock $ s <> c <> e singleLine :: Parser Text singleLine = T.pack <$> manyTill anyChar (try eol) quoteChar :: Parser Text quoteChar = T.pack <$> (string ">") codeBlockChar :: Parser Text codeBlockChar = T.pack <$> (string "```") codeBlockContents :: Parser Text codeBlockContents = T.pack <$> manyTill anyChar (lookAhead codeBlockChar) eol :: Parser String eol = try (string "\n\r") <|> try (string "\r\n") <|> string "\n" <|> string "\r" <?> "end of line" ## Instruction: Make parsing Data.Text.Text slightly nicer Parsec has had support for parsing Text Since version 3.1.2, so we don't need `T.unpack text` as long as we also import `Text.Parsec.Text`. This also means that the code only requires `(Text, pack)` from `Data.Text`, so import only those (unqualified). ## Code After: module Reflow.Parser where import Data.Monoid ((<>)) import Data.Text (Text, pack) import Text.Parsec import Text.Parsec.Text (Parser) import Reflow.Types parseFile :: Text -> [Content] parseFile t = either (const []) id $ parse parseContent "content" t parseContent :: Parser [Content] parseContent = many (quoted <|> codeBlock <|> normal) <* eof normal :: Parser Content normal = Normal <$> singleLine quoted :: Parser Content quoted = do q <- quoteChar l <- singleLine return $ Quoted (q <> l) codeBlock :: Parser Content codeBlock = do s <- codeBlockChar c <- codeBlockContents e <- codeBlockChar eol return $ CodeBlock $ s <> c <> e singleLine :: Parser Text singleLine = pack <$> manyTill anyChar (try eol) quoteChar :: Parser Text quoteChar = pack <$> (string ">") codeBlockChar :: Parser Text codeBlockChar = pack <$> (string "```") codeBlockContents :: Parser Text codeBlockContents = pack <$> manyTill anyChar (lookAhead codeBlockChar) eol :: Parser String eol = try (string "\n\r") <|> try (string "\r\n") <|> string "\n" <|> string "\r" <?> "end of line"
043e663309597048e2983f46cff558ddefc5efb9
requirements.txt
requirements.txt
open-repo # Script to open current repo in default browser Pygments # Syntax highlighting, used by 'ccat' alias pygments-style-solarized # Solarized for Pygments yamllint # For syntastic linting sqlparse # SQL parser used by prettysql vim plugin I wrote
open-repo # Script to open current repo in default browser Pygments # Syntax highlighting, used by 'ccat' alias pygments-style-solarized # Solarized for Pygments yamllint # For syntastic linting sqlparse # SQL parser used by prettysql vim plugin I wrote howdoi # Searches stack overflow and returns the top answer
Add howdoi which queries StackOverflow for me
Pip: Add howdoi which queries StackOverflow for me
Text
mit
tscheffe/dotfiles,tscheffe/dotfiles,tscheffe/dotfiles
text
## Code Before: open-repo # Script to open current repo in default browser Pygments # Syntax highlighting, used by 'ccat' alias pygments-style-solarized # Solarized for Pygments yamllint # For syntastic linting sqlparse # SQL parser used by prettysql vim plugin I wrote ## Instruction: Pip: Add howdoi which queries StackOverflow for me ## Code After: open-repo # Script to open current repo in default browser Pygments # Syntax highlighting, used by 'ccat' alias pygments-style-solarized # Solarized for Pygments yamllint # For syntastic linting sqlparse # SQL parser used by prettysql vim plugin I wrote howdoi # Searches stack overflow and returns the top answer
24e087572acc46e0691b1cd30d979e439fdbfa93
app/controllers/public_pages_controller.rb
app/controllers/public_pages_controller.rb
class PublicPagesController < ApplicationController def home end def search end def profile profile_username = params[:username] @profile_user = User.find_by(username: profile_username) not_found if @profile_user.nil? @profile = @profile_user.profile not_found if @profile.nil? render 'own_profile' if user_signed_in? && current_user == @profile_user end end
class PublicPagesController < ApplicationController def home end def search end def profile profile_username = params[:username] @profile_user = User.find_by(username: profile_username) not_found if @profile_user.nil? @profile = @profile_user.profile not_found if @profile.nil? @conversation = Conversation.new if user_signed_in? render 'own_profile' if user_signed_in? && current_user == @profile_user end private end
Create @conversation if the user is signed in
Create @conversation if the user is signed in
Ruby
agpl-3.0
payloadtech/mailpenny,payloadtech/mailpenny,payloadtech/mailpenny
ruby
## Code Before: class PublicPagesController < ApplicationController def home end def search end def profile profile_username = params[:username] @profile_user = User.find_by(username: profile_username) not_found if @profile_user.nil? @profile = @profile_user.profile not_found if @profile.nil? render 'own_profile' if user_signed_in? && current_user == @profile_user end end ## Instruction: Create @conversation if the user is signed in ## Code After: class PublicPagesController < ApplicationController def home end def search end def profile profile_username = params[:username] @profile_user = User.find_by(username: profile_username) not_found if @profile_user.nil? @profile = @profile_user.profile not_found if @profile.nil? @conversation = Conversation.new if user_signed_in? render 'own_profile' if user_signed_in? && current_user == @profile_user end private end
78415f5e919736d281b386522c2af9a771cde2f3
src/main.js
src/main.js
enyo.kind({ /* * name: * name of this "kind" (optionally namespaced with a .) */ name: 'Slides.Main', /* * components: * Array of "kind" objects that compose the layout of your app */ components: [ {name: 'mainLayout', kind: 'FittableRows', classes: 'enyo-fit', components: [ { kind: 'newness.InfiniteSlidingPane', name: 'slidesPanes', fit: true, components: [ ] }, { kind: 'onyx.Toolbar', layoutKind: 'FittableColumnsLayout', components: [ {kind: 'onyx.Button', allowHtml: true, content: '&larr; Back'}, {fit: true}, {kind: 'onyx.Button', allowHtml: true, content: 'Next &rarr;'} ] } ]} ], create: function() { this.inherited(arguments); var component = { kind: "Slides.Slide", name: "slide1", content: "Hello world!" }; this.$.slidesPanes.viewTypes.push( component ); this.$.slidesPanes.push( "slide1" ); } });
enyo.kind({ /* * name: * name of this "kind" (optionally namespaced with a .) */ name: 'Slides.Main', /* * components: * Array of "kind" objects that compose the layout of your app */ components: [ {name: 'mainLayout', kind: 'FittableRows', classes: 'enyo-fit', components: [ { kind: 'newness.InfiniteSlidingPane', name: 'slidesPanes', fit: true, components: [ ] }, { kind: 'onyx.Toolbar', layoutKind: 'FittableColumnsLayout', components: [ {kind: 'onyx.Button', allowHtml: true, content: '&larr; Back', onclick: 'previousSlide'}, {fit: true}, {kind: 'onyx.Button', allowHtml: true, content: 'Next &rarr;', onclick: 'nextSlide'} ] } ]} ], create: function() { this.inherited(arguments); var component = { kind: "Slides.Slide", name: "slide1", content: "Hello world 1!" }; this.$.slidesPanes.viewTypes.push( component ); component = { kind: "Slides.Slide", name: "slide2", content: "Hello world 2!" }; this.$.slidesPanes.viewTypes.push( component ); component = { kind: "Slides.Slide", name: "slide3", content: "Hello world 3!" }; this.$.slidesPanes.viewTypes.push( component ); }, nextSlide: function() { component = this.$.slidesPanes.viewTypes[this.$.slidesPanes.getViewCount()]; this.$.slidesPanes.push(component.name); }, previousSlide: function() { this.$.slidesPanes.getView().pop(); } });
Test pane animation with custom component pushing
Test pane animation with custom component pushing
JavaScript
apache-2.0
MeatballIndustries/EnyoSlides_GDG_10-17-12,MeatballIndustries/enyo-slides,MeatballIndustries/EnyoSlides_GDG_10-17-12,MeatballIndustries/EnyoSlides_GDG_10-17-12
javascript
## Code Before: enyo.kind({ /* * name: * name of this "kind" (optionally namespaced with a .) */ name: 'Slides.Main', /* * components: * Array of "kind" objects that compose the layout of your app */ components: [ {name: 'mainLayout', kind: 'FittableRows', classes: 'enyo-fit', components: [ { kind: 'newness.InfiniteSlidingPane', name: 'slidesPanes', fit: true, components: [ ] }, { kind: 'onyx.Toolbar', layoutKind: 'FittableColumnsLayout', components: [ {kind: 'onyx.Button', allowHtml: true, content: '&larr; Back'}, {fit: true}, {kind: 'onyx.Button', allowHtml: true, content: 'Next &rarr;'} ] } ]} ], create: function() { this.inherited(arguments); var component = { kind: "Slides.Slide", name: "slide1", content: "Hello world!" }; this.$.slidesPanes.viewTypes.push( component ); this.$.slidesPanes.push( "slide1" ); } }); ## Instruction: Test pane animation with custom component pushing ## Code After: enyo.kind({ /* * name: * name of this "kind" (optionally namespaced with a .) */ name: 'Slides.Main', /* * components: * Array of "kind" objects that compose the layout of your app */ components: [ {name: 'mainLayout', kind: 'FittableRows', classes: 'enyo-fit', components: [ { kind: 'newness.InfiniteSlidingPane', name: 'slidesPanes', fit: true, components: [ ] }, { kind: 'onyx.Toolbar', layoutKind: 'FittableColumnsLayout', components: [ {kind: 'onyx.Button', allowHtml: true, content: '&larr; Back', onclick: 'previousSlide'}, {fit: true}, {kind: 'onyx.Button', allowHtml: true, content: 'Next &rarr;', onclick: 'nextSlide'} ] } ]} ], create: function() { this.inherited(arguments); var component = { kind: "Slides.Slide", name: "slide1", content: "Hello world 1!" }; this.$.slidesPanes.viewTypes.push( component ); component = { kind: "Slides.Slide", name: "slide2", content: "Hello world 2!" }; this.$.slidesPanes.viewTypes.push( component ); component = { kind: "Slides.Slide", name: "slide3", content: "Hello world 3!" }; this.$.slidesPanes.viewTypes.push( component ); }, nextSlide: function() { component = this.$.slidesPanes.viewTypes[this.$.slidesPanes.getViewCount()]; this.$.slidesPanes.push(component.name); }, previousSlide: function() { this.$.slidesPanes.getView().pop(); } });
64a6a94709061b073812b0cd1ef59c3d8afe050b
.ci/Dockerfile
.ci/Dockerfile
FROM hseeberger/scala-sbt COPY . /app/spark-nlp ENV JAVA_OPTS="-Xmx2012m -XX:+UseG1GC" WORKDIR /app/spark-nlp/ RUN sbt compile
FROM hseeberger/scala-sbt:8u212_1.2.8_2.13.0 COPY . /app/spark-nlp ENV JAVA_OPTS="-Xmx2012m -XX:+UseG1GC" WORKDIR /app/spark-nlp/ RUN sbt compile
Add tag to scala-sbt image for travis
Add tag to scala-sbt image for travis
unknown
apache-2.0
JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp
unknown
## Code Before: FROM hseeberger/scala-sbt COPY . /app/spark-nlp ENV JAVA_OPTS="-Xmx2012m -XX:+UseG1GC" WORKDIR /app/spark-nlp/ RUN sbt compile ## Instruction: Add tag to scala-sbt image for travis ## Code After: FROM hseeberger/scala-sbt:8u212_1.2.8_2.13.0 COPY . /app/spark-nlp ENV JAVA_OPTS="-Xmx2012m -XX:+UseG1GC" WORKDIR /app/spark-nlp/ RUN sbt compile
e8369e1fe63e15c446bed6c1c7fbcdf8a4949bdd
building-block-sample.yml
building-block-sample.yml
name: "Name of Component" tags: - quote - testimonial - content - flexbox category: containers description: A testimonial block to tell your site visitors how awesome you are. versions: - 6.3.0 - 6.3.1 author: github: rafibomb name: Rafi twitter: thefakerafi containerClass: row medium-6 columns align-center # Best Practices (Delete these when copying into new Building Block) # name should be short and contain the name of the component used. Example: Article Card, Social Sharing Buttons # tags should be minimal but descriptive. Make sure to use a tag that matches the component used. Example: If your component used off-canvas and buttons then tag: off-canvas, button # category needs to match one of the main categories for your component to show. Navigation, status, media, containers, forms, control # description should describe what the Building Block is, what it can be used for or use cases, and any special instructions to use it or interact with it. # versions describe what versions of Foundation this component should work on. If you are not sure about older versions, specify only the version you built it with. # author describes yourself. Your GitHub username goes here, twitter handle so we can give you a shoutout and of-course your name. # containerClass can be used to inject a wrapper for your Building Block to present it better. The example here will center the Building Block and keep the width to 6 columns wide.
name: "Name of Component" tags: - quote - testimonial - content - flexbox category: containers description: A testimonial block to tell your site visitors how awesome you are. versions: - 6.3.0 - 6.3.1 author: github: rafibomb name: Rafi twitter: thefakerafi containerClass: row medium-6 columns align-center requirements: - flexbox - fontawesome # Best Practices (Delete these when copying into new Building Block) # name should be short and contain the name of the component used. Example: Article Card, Social Sharing Buttons # tags should be minimal but descriptive. Make sure to use a tag that matches the component used. Example: If your component used off-canvas and buttons then tag: off-canvas, button # category needs to match one of the main categories for your component to show. Navigation, status, media, containers, forms, control # description should describe what the Building Block is, what it can be used for or use cases, and any special instructions to use it or interact with it. # versions describe what versions of Foundation this component should work on. If you are not sure about older versions, specify only the version you built it with. # author describes yourself. Your GitHub username goes here, twitter handle so we can give you a shoutout and of-course your name. # containerClass can be used to inject a wrapper for your Building Block to present it better. The example here will center the Building Block and keep the width to 6 columns wide. # requirements for the component to work as expected, see https://github.com/zurb/building-blocks/issues/211
Add requirements to bb sample .yml
Add requirements to bb sample .yml
YAML
mit
zurb/building-blocks,zurb/building-blocks
yaml
## Code Before: name: "Name of Component" tags: - quote - testimonial - content - flexbox category: containers description: A testimonial block to tell your site visitors how awesome you are. versions: - 6.3.0 - 6.3.1 author: github: rafibomb name: Rafi twitter: thefakerafi containerClass: row medium-6 columns align-center # Best Practices (Delete these when copying into new Building Block) # name should be short and contain the name of the component used. Example: Article Card, Social Sharing Buttons # tags should be minimal but descriptive. Make sure to use a tag that matches the component used. Example: If your component used off-canvas and buttons then tag: off-canvas, button # category needs to match one of the main categories for your component to show. Navigation, status, media, containers, forms, control # description should describe what the Building Block is, what it can be used for or use cases, and any special instructions to use it or interact with it. # versions describe what versions of Foundation this component should work on. If you are not sure about older versions, specify only the version you built it with. # author describes yourself. Your GitHub username goes here, twitter handle so we can give you a shoutout and of-course your name. # containerClass can be used to inject a wrapper for your Building Block to present it better. The example here will center the Building Block and keep the width to 6 columns wide. ## Instruction: Add requirements to bb sample .yml ## Code After: name: "Name of Component" tags: - quote - testimonial - content - flexbox category: containers description: A testimonial block to tell your site visitors how awesome you are. versions: - 6.3.0 - 6.3.1 author: github: rafibomb name: Rafi twitter: thefakerafi containerClass: row medium-6 columns align-center requirements: - flexbox - fontawesome # Best Practices (Delete these when copying into new Building Block) # name should be short and contain the name of the component used. Example: Article Card, Social Sharing Buttons # tags should be minimal but descriptive. Make sure to use a tag that matches the component used. Example: If your component used off-canvas and buttons then tag: off-canvas, button # category needs to match one of the main categories for your component to show. Navigation, status, media, containers, forms, control # description should describe what the Building Block is, what it can be used for or use cases, and any special instructions to use it or interact with it. # versions describe what versions of Foundation this component should work on. If you are not sure about older versions, specify only the version you built it with. # author describes yourself. Your GitHub username goes here, twitter handle so we can give you a shoutout and of-course your name. # containerClass can be used to inject a wrapper for your Building Block to present it better. The example here will center the Building Block and keep the width to 6 columns wide. # requirements for the component to work as expected, see https://github.com/zurb/building-blocks/issues/211
522fce43947016f17669a8e1ccde47fc1c451930
about.md
about.md
--- layout: page title: About --- Hi. My name is Sepehr and I'm a software engineer. I learned Ruby on Rails back-end development at the Iron Yard Academy where I built a few small apps along with [the API for abstract](https://github.com/sepehrvakili/abstract-be). Previously, I helped build an online academy as a product manager in Malaysia. I studied Computer Information Systems and Managerial Sciences at Georgia State University. I enjoy software engineering because I love tackling new and challenging problems. You can say hi to me [@sepehrvakili](https://twitter.com/sepehrvakili). Thanks for reading.
--- layout: page title: About --- Hi. My name is Sepehr and I'm a software engineer. I learned Ruby on Rails back-end development at the Iron Yard Academy where I built a few small apps along with [the API for abstract](https://github.com/sepehrvakili/abstract-be). Previously, I helped build an online academy as a product manager in Malaysia. I studied Computer Information Systems and Managerial Sciences at Georgia State University. I have a strong interest in not only software engineering but in the various components involved in bringing a complete quality product to life. I pride myself in being reliable, independent, and self-driven while appreciating the fact that it takes teamwork and collaboration to build a complete product. My colleagues would describe me as a strong team player, eager learner, and fast executor. You can say hi to me [@sepehrvakili](https://twitter.com/sepehrvakili). Thanks for reading.
Update bio with more detail
Update bio with more detail
Markdown
mit
sepehrvakili/sepehrvakili.github.io
markdown
## Code Before: --- layout: page title: About --- Hi. My name is Sepehr and I'm a software engineer. I learned Ruby on Rails back-end development at the Iron Yard Academy where I built a few small apps along with [the API for abstract](https://github.com/sepehrvakili/abstract-be). Previously, I helped build an online academy as a product manager in Malaysia. I studied Computer Information Systems and Managerial Sciences at Georgia State University. I enjoy software engineering because I love tackling new and challenging problems. You can say hi to me [@sepehrvakili](https://twitter.com/sepehrvakili). Thanks for reading. ## Instruction: Update bio with more detail ## Code After: --- layout: page title: About --- Hi. My name is Sepehr and I'm a software engineer. I learned Ruby on Rails back-end development at the Iron Yard Academy where I built a few small apps along with [the API for abstract](https://github.com/sepehrvakili/abstract-be). Previously, I helped build an online academy as a product manager in Malaysia. I studied Computer Information Systems and Managerial Sciences at Georgia State University. I have a strong interest in not only software engineering but in the various components involved in bringing a complete quality product to life. I pride myself in being reliable, independent, and self-driven while appreciating the fact that it takes teamwork and collaboration to build a complete product. My colleagues would describe me as a strong team player, eager learner, and fast executor. You can say hi to me [@sepehrvakili](https://twitter.com/sepehrvakili). Thanks for reading.
0eefed1e133759afc1f06986bccf2792a9fcefa1
app/assets/javascripts/events.coffee
app/assets/javascripts/events.coffee
$ -> $('#starts-at-datetime-picker').datetimepicker locale: 'de' $('#ends-at-datetime-picker').datetimepicker locale: 'de'
$ -> $('#starts-at-datetime-picker').datetimepicker locale: 'de' $('#ends-at-datetime-picker').datetimepicker locale: 'de' $(document).on "fields_added.nested_form_fields", (event, param) -> $(dateField).datetimepicker( locale: 'de' ) for dateField in $(event.target).find('.date')
Fix added shifts' datetimepickers not working
Fix added shifts' datetimepickers not working
CoffeeScript
agpl-3.0
where2help/where2help,where2help/where2help,where2help/where2help
coffeescript
## Code Before: $ -> $('#starts-at-datetime-picker').datetimepicker locale: 'de' $('#ends-at-datetime-picker').datetimepicker locale: 'de' ## Instruction: Fix added shifts' datetimepickers not working ## Code After: $ -> $('#starts-at-datetime-picker').datetimepicker locale: 'de' $('#ends-at-datetime-picker').datetimepicker locale: 'de' $(document).on "fields_added.nested_form_fields", (event, param) -> $(dateField).datetimepicker( locale: 'de' ) for dateField in $(event.target).find('.date')
82fb1b1486e2cd391bdd3e505cbb397eee73341e
src/main/java/com/speedledger/measure/jenkins/ElasticsearchPlugin.java
src/main/java/com/speedledger/measure/jenkins/ElasticsearchPlugin.java
package com.speedledger.measure.jenkins; import hudson.Plugin; import hudson.model.Descriptor; import hudson.model.Items; import net.sf.json.JSONObject; import org.kohsuke.stapler.StaplerRequest; import javax.servlet.ServletException; import java.io.IOException; /** * Elasticsearch plugin to Jenkins. * Reports build information to Elasticsearch on build completion. * * This class only handles loading and saving the configuration of Elasticsearch, see {@link Config}. */ public class ElasticsearchPlugin extends Plugin { private Config config; @Override public void start() throws Exception { Items.XSTREAM.registerConverter(new Config.ConverterImpl()); load(); } @Override public void configure(StaplerRequest req, JSONObject jsonObject) throws IOException, ServletException, Descriptor.FormException { String url = jsonObject.getString("url"); String indexName = jsonObject.getString("indexName"); String typeName = jsonObject.getString("typeName"); config = new Config(url, indexName, typeName); save(); } public Config getConfig() { return config; } // Used by Jelly public String getUrl() { return config == null ? null : config.getUrl(); } // Used by Jelly public String getIndexName() { return config == null ? null : config.getIndexName(); } // Used by Jelly public String getTypeName() { return config == null ? null : config.getTypeName(); } }
package com.speedledger.measure.jenkins; import hudson.Plugin; import hudson.model.Descriptor; import hudson.model.Items; import net.sf.json.JSONObject; import org.kohsuke.stapler.StaplerRequest; import javax.servlet.ServletException; import java.io.IOException; /** * Elasticsearch plugin to Jenkins. * Reports build information to Elasticsearch on build completion. * * This class only handles loading and saving the configuration of Elasticsearch, see {@link Config}. */ public class ElasticsearchPlugin extends Plugin { private Config config; @Override public void start() throws Exception { Items.XSTREAM.registerConverter(new Config.ConverterImpl()); load(); } @Override public void configure(StaplerRequest req, JSONObject jsonObject) throws IOException, ServletException, Descriptor.FormException { String url = jsonObject.getString("elasticsearchUrl"); String indexName = jsonObject.getString("elasticsearchIndexName"); String typeName = jsonObject.getString("elasticsearchTypeName"); config = new Config(url, indexName, typeName); save(); } public Config getConfig() { return config; } // Used by Jelly public String getUrl() { return config == null ? null : config.getUrl(); } // Used by Jelly public String getIndexName() { return config == null ? null : config.getIndexName(); } // Used by Jelly public String getTypeName() { return config == null ? null : config.getTypeName(); } }
Fix reading wrong keys from config form response
Fix reading wrong keys from config form response
Java
mit
speedledger/elasticsearch-jenkins
java
## Code Before: package com.speedledger.measure.jenkins; import hudson.Plugin; import hudson.model.Descriptor; import hudson.model.Items; import net.sf.json.JSONObject; import org.kohsuke.stapler.StaplerRequest; import javax.servlet.ServletException; import java.io.IOException; /** * Elasticsearch plugin to Jenkins. * Reports build information to Elasticsearch on build completion. * * This class only handles loading and saving the configuration of Elasticsearch, see {@link Config}. */ public class ElasticsearchPlugin extends Plugin { private Config config; @Override public void start() throws Exception { Items.XSTREAM.registerConverter(new Config.ConverterImpl()); load(); } @Override public void configure(StaplerRequest req, JSONObject jsonObject) throws IOException, ServletException, Descriptor.FormException { String url = jsonObject.getString("url"); String indexName = jsonObject.getString("indexName"); String typeName = jsonObject.getString("typeName"); config = new Config(url, indexName, typeName); save(); } public Config getConfig() { return config; } // Used by Jelly public String getUrl() { return config == null ? null : config.getUrl(); } // Used by Jelly public String getIndexName() { return config == null ? null : config.getIndexName(); } // Used by Jelly public String getTypeName() { return config == null ? null : config.getTypeName(); } } ## Instruction: Fix reading wrong keys from config form response ## Code After: package com.speedledger.measure.jenkins; import hudson.Plugin; import hudson.model.Descriptor; import hudson.model.Items; import net.sf.json.JSONObject; import org.kohsuke.stapler.StaplerRequest; import javax.servlet.ServletException; import java.io.IOException; /** * Elasticsearch plugin to Jenkins. * Reports build information to Elasticsearch on build completion. * * This class only handles loading and saving the configuration of Elasticsearch, see {@link Config}. */ public class ElasticsearchPlugin extends Plugin { private Config config; @Override public void start() throws Exception { Items.XSTREAM.registerConverter(new Config.ConverterImpl()); load(); } @Override public void configure(StaplerRequest req, JSONObject jsonObject) throws IOException, ServletException, Descriptor.FormException { String url = jsonObject.getString("elasticsearchUrl"); String indexName = jsonObject.getString("elasticsearchIndexName"); String typeName = jsonObject.getString("elasticsearchTypeName"); config = new Config(url, indexName, typeName); save(); } public Config getConfig() { return config; } // Used by Jelly public String getUrl() { return config == null ? null : config.getUrl(); } // Used by Jelly public String getIndexName() { return config == null ? null : config.getIndexName(); } // Used by Jelly public String getTypeName() { return config == null ? null : config.getTypeName(); } }
cab149fe1f7cd523bb7064d6d374a8aaf377710b
app/views/admin/visualizations/track.html.erb
app/views/admin/visualizations/track.html.erb
<!DOCTYPE html> <html lang="en"> <body> <%= render 'shared/analytics', ua: Cartodb.config[:google_analytics]["embeds"] %> </body> </html>
<!DOCTYPE html> <html lang="en"> <body> <%= render partial: 'shared/analytics', locals: { ua: Cartodb.config[:google_analytics]['embeds'], domain: Cartodb.config[:google_analytics]['domain'] } %> </html>
Fix google analytics in visualization track_embed
Fix google analytics in visualization track_embed
HTML+ERB
bsd-3-clause
raquel-ucl/cartodb,splashblot/dronedb,raquel-ucl/cartodb,UCL-ShippingGroup/cartodb-1,raquel-ucl/cartodb,splashblot/dronedb,thorncp/cartodb,nuxcode/cartodb,DigitalCoder/cartodb,codeandtheory/cartodb,nuxcode/cartodb,UCL-ShippingGroup/cartodb-1,dbirchak/cartodb,bloomberg/cartodb,nuxcode/cartodb,thorncp/cartodb,splashblot/dronedb,nyimbi/cartodb,DigitalCoder/cartodb,UCL-ShippingGroup/cartodb-1,CartoDB/cartodb,DigitalCoder/cartodb,bloomberg/cartodb,dbirchak/cartodb,CartoDB/cartodb,future-analytics/cartodb,raquel-ucl/cartodb,dbirchak/cartodb,future-analytics/cartodb,nuxcode/cartodb,codeandtheory/cartodb,future-analytics/cartodb,thorncp/cartodb,nuxcode/cartodb,bloomberg/cartodb,nyimbi/cartodb,thorncp/cartodb,nyimbi/cartodb,dbirchak/cartodb,future-analytics/cartodb,thorncp/cartodb,bloomberg/cartodb,nyimbi/cartodb,DigitalCoder/cartodb,DigitalCoder/cartodb,bloomberg/cartodb,splashblot/dronedb,UCL-ShippingGroup/cartodb-1,codeandtheory/cartodb,raquel-ucl/cartodb,future-analytics/cartodb,CartoDB/cartodb,CartoDB/cartodb,nyimbi/cartodb,CartoDB/cartodb,dbirchak/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,UCL-ShippingGroup/cartodb-1,splashblot/dronedb
html+erb
## Code Before: <!DOCTYPE html> <html lang="en"> <body> <%= render 'shared/analytics', ua: Cartodb.config[:google_analytics]["embeds"] %> </body> </html> ## Instruction: Fix google analytics in visualization track_embed ## Code After: <!DOCTYPE html> <html lang="en"> <body> <%= render partial: 'shared/analytics', locals: { ua: Cartodb.config[:google_analytics]['embeds'], domain: Cartodb.config[:google_analytics]['domain'] } %> </html>
e6206c2bdacfbd2632beb6ed56ccb6856d299e08
tests/test_suggestion_fetcher.py
tests/test_suggestion_fetcher.py
import unittest2 from google.appengine.ext import testbed from models.account import Account from models.suggestion import Suggestion from helpers.suggestions.suggestion_fetcher import SuggestionFetcher class TestEventTeamRepairer(unittest2.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() self.testbed.init_datastore_v3_stub() self.testbed.init_memcache_stub() account = Account.get_or_insert( "123", email="[email protected]", registered=True).put() suggestion = Suggestion( author=account, review_state=Suggestion.REVIEW_PENDING, target_key="2012cmp", target_model="event").put() def testCount(self): self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "event"), 1) self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "media"), 0)
import unittest2 from google.appengine.ext import testbed from models.account import Account from models.suggestion import Suggestion from helpers.suggestions.suggestion_fetcher import SuggestionFetcher class TestSuggestionFetcher(unittest2.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() self.testbed.init_datastore_v3_stub() self.testbed.init_memcache_stub() account = Account.get_or_insert( "123", email="[email protected]", registered=True).put() suggestion = Suggestion( author=account, review_state=Suggestion.REVIEW_PENDING, target_key="2012cmp", target_model="event").put() def testCount(self): self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "event"), 1) self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "media"), 0)
Fix class name of test.
Fix class name of test.
Python
mit
phil-lopreiato/the-blue-alliance,jaredhasenklein/the-blue-alliance,fangeugene/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/the-blue-alliance,the-blue-alliance/the-blue-alliance,synth3tk/the-blue-alliance,synth3tk/the-blue-alliance,nwalters512/the-blue-alliance,the-blue-alliance/the-blue-alliance,fangeugene/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,fangeugene/the-blue-alliance,verycumbersome/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-alliance,the-blue-alliance/the-blue-alliance,phil-lopreiato/the-blue-alliance,bdaroz/the-blue-alliance,phil-lopreiato/the-blue-alliance,nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,tsteward/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,the-blue-alliance/the-blue-alliance,synth3tk/the-blue-alliance,the-blue-alliance/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,bdaroz/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,nwalters512/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,fangeugene/the-blue-alliance,tsteward/the-blue-alliance,tsteward/the-blue-alliance,synth3tk/the-blue-alliance,nwalters512/the-blue-alliance,jaredhasenklein/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,bdaroz/the-blue-alliance,bdaroz/the-blue-alliance
python
## Code Before: import unittest2 from google.appengine.ext import testbed from models.account import Account from models.suggestion import Suggestion from helpers.suggestions.suggestion_fetcher import SuggestionFetcher class TestEventTeamRepairer(unittest2.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() self.testbed.init_datastore_v3_stub() self.testbed.init_memcache_stub() account = Account.get_or_insert( "123", email="[email protected]", registered=True).put() suggestion = Suggestion( author=account, review_state=Suggestion.REVIEW_PENDING, target_key="2012cmp", target_model="event").put() def testCount(self): self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "event"), 1) self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "media"), 0) ## Instruction: Fix class name of test. ## Code After: import unittest2 from google.appengine.ext import testbed from models.account import Account from models.suggestion import Suggestion from helpers.suggestions.suggestion_fetcher import SuggestionFetcher class TestSuggestionFetcher(unittest2.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() self.testbed.init_datastore_v3_stub() self.testbed.init_memcache_stub() account = Account.get_or_insert( "123", email="[email protected]", registered=True).put() suggestion = Suggestion( author=account, review_state=Suggestion.REVIEW_PENDING, target_key="2012cmp", target_model="event").put() def testCount(self): self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "event"), 1) self.assertEqual(SuggestionFetcher.count(Suggestion.REVIEW_PENDING, "media"), 0)
eb430929e4772e1fb1cde83ddfbc03a705b34af1
apps/vscode/vscode.settings.json
apps/vscode/vscode.settings.json
// Place your settings in this file to overwrite the default settings { "editor.fontFamily": "Menlo, 'DejaVu Sans Mono', Consolas, Monaco, 'Courier New', monospace, 'Droid Sans Fallback'", "editor.fontSize": 11, "editor.minimap.enabled": false, "editor.renderWhitespace": "all", "editor.renderIndentGuides": true, "editor.rulers": [ 80, 100, 120 ], "editor.tabCompletion": true, "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "__pycache__": true, "**/*.pyc": true }, "files.trimTrailingWhitespace": true, "search.exclude": { "**/.terraform": true }, "terminal.integrated.shell.osx": "/usr/local/bin/zsh", "terminal.integrated.shell.linux": "zsh", "terraform.formatOnSave": true, "workbench.activityBar.visible": true }
// Place your settings in this file to overwrite the default settings { "editor.fontFamily": "Menlo, 'DejaVu Sans Mono', Consolas, Monaco, 'Courier New', monospace, 'Droid Sans Fallback'", "editor.fontSize": 11, "editor.minimap.enabled": false, "editor.renderWhitespace": "all", "editor.renderIndentGuides": true, "editor.rulers": [ 80, 100, 120 ], "editor.tabCompletion": true, "git.enableCommitSigning": true, "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "__pycache__": true, "**/*.pyc": true }, "files.trimTrailingWhitespace": true, "search.exclude": { "**/.terraform": true }, "terminal.integrated.shell.osx": "/usr/local/bin/zsh", "terminal.integrated.shell.linux": "zsh", "terraform.formatOnSave": true, "workbench.activityBar.visible": true }
Add support for signing Git commits in VS Code
Add support for signing Git commits in VS Code
JSON
mit
jammycakes/dotfiles,jammycakes/dotfiles
json
## Code Before: // Place your settings in this file to overwrite the default settings { "editor.fontFamily": "Menlo, 'DejaVu Sans Mono', Consolas, Monaco, 'Courier New', monospace, 'Droid Sans Fallback'", "editor.fontSize": 11, "editor.minimap.enabled": false, "editor.renderWhitespace": "all", "editor.renderIndentGuides": true, "editor.rulers": [ 80, 100, 120 ], "editor.tabCompletion": true, "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "__pycache__": true, "**/*.pyc": true }, "files.trimTrailingWhitespace": true, "search.exclude": { "**/.terraform": true }, "terminal.integrated.shell.osx": "/usr/local/bin/zsh", "terminal.integrated.shell.linux": "zsh", "terraform.formatOnSave": true, "workbench.activityBar.visible": true } ## Instruction: Add support for signing Git commits in VS Code ## Code After: // Place your settings in this file to overwrite the default settings { "editor.fontFamily": "Menlo, 'DejaVu Sans Mono', Consolas, Monaco, 'Courier New', monospace, 'Droid Sans Fallback'", "editor.fontSize": 11, "editor.minimap.enabled": false, "editor.renderWhitespace": "all", "editor.renderIndentGuides": true, "editor.rulers": [ 80, 100, 120 ], "editor.tabCompletion": true, "git.enableCommitSigning": true, "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "__pycache__": true, "**/*.pyc": true }, "files.trimTrailingWhitespace": true, "search.exclude": { "**/.terraform": true }, "terminal.integrated.shell.osx": "/usr/local/bin/zsh", "terminal.integrated.shell.linux": "zsh", "terraform.formatOnSave": true, "workbench.activityBar.visible": true }
09f6dce93fc00c9e67a066f7dfbeb18d098ec668
.jscs.json
.jscs.json
{ "preset": "node-style-guide", "requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ], "validateIndentation": 4, "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", "requireCapitalizedComments": null, "maximumLineLength": 100, "validateQuoteMarks": null, "requireTrailingComma": null, "disallowTrailingComma": null, "requireSpacesInsideObjectBrackets": "all", "excludeFiles": [ "node_modules/**", "test/**", "coverage/**" ] }
{ "preset": "node-style-guide", "requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ], "validateIndentation": 4, "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", "requireCapitalizedComments": null, "maximumLineLength": 100, "validateQuoteMarks": null, "requireTrailingComma": null, "disallowTrailingComma": null, "requireSpacesInsideObjectBrackets": "all", "requireEarlyReturn": false, "excludeFiles": [ "node_modules/**", "test/**", "coverage/**" ] }
Fix JSCS issue with require early return
Fix JSCS issue with require early return
JSON
apache-2.0
d00rman/service-runner,wikimedia/service-runner,gwicke/service-runner,nyurik/service-runner,Pchelolo/service-runner
json
## Code Before: { "preset": "node-style-guide", "requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ], "validateIndentation": 4, "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", "requireCapitalizedComments": null, "maximumLineLength": 100, "validateQuoteMarks": null, "requireTrailingComma": null, "disallowTrailingComma": null, "requireSpacesInsideObjectBrackets": "all", "excludeFiles": [ "node_modules/**", "test/**", "coverage/**" ] } ## Instruction: Fix JSCS issue with require early return ## Code After: { "preset": "node-style-guide", "requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ], "validateIndentation": 4, "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", "requireCapitalizedComments": null, "maximumLineLength": 100, "validateQuoteMarks": null, "requireTrailingComma": null, "disallowTrailingComma": null, "requireSpacesInsideObjectBrackets": "all", "requireEarlyReturn": false, "excludeFiles": [ "node_modules/**", "test/**", "coverage/**" ] }
6109a57c6712038e801292244dbaa977d05d24fd
app/controllers/users_controller.rb
app/controllers/users_controller.rb
class UsersController < ApplicationController before_action :authenticate_user! def show if current_user.id == params[:id].to_i @user = current_user else redirect_to root_path, alert: "ACCESS DENIED." end end end
class UsersController < ApplicationController before_action :authenticate_user! def show if current_user.id == params[:id].to_i @user = current_user respond_to do |format| format.html { render :show } format.json { render json: @user } end else redirect_to root_path, alert: "ACCESS DENIED." end end end
Update user show page to render json data
Update user show page to render json data
Ruby
mit
evanscloud/monocle,evanscloud/monocle,evanscloud/monocle
ruby
## Code Before: class UsersController < ApplicationController before_action :authenticate_user! def show if current_user.id == params[:id].to_i @user = current_user else redirect_to root_path, alert: "ACCESS DENIED." end end end ## Instruction: Update user show page to render json data ## Code After: class UsersController < ApplicationController before_action :authenticate_user! def show if current_user.id == params[:id].to_i @user = current_user respond_to do |format| format.html { render :show } format.json { render json: @user } end else redirect_to root_path, alert: "ACCESS DENIED." end end end
0fa3cbdf796c72800761006d4aaee68116162318
.travis.yml
.travis.yml
language: ruby bundler_args: --without development before_install: - sudo apt-get update -qq - sudo apt-get install -qq wbritish script: - RAILS_ENV=test bundle exec rake spec rvm: - 2.0.0 - 1.9.3 - 1.9.2 matrix: allow_failures: - rvm: 2.0.0 branches: only: - master
language: ruby bundler_args: --without development before_install: - sudo apt-get update -qq - sudo apt-get install -qq wbritish script: - RAILS_ENV=test GOVUK_APP_DOMAIN=test.example.com bundle exec rake spec rvm: - 2.0.0 - 1.9.3 - 1.9.2 matrix: allow_failures: - rvm: 2.0.0 branches: only: - master
Add env variable to make build work
Add env variable to make build work
YAML
mit
bitzesty/trade-tariff-frontend,alphagov/trade-tariff-frontend,alphagov/trade-tariff-frontend,bitzesty/trade-tariff-frontend,alphagov/trade-tariff-frontend,bitzesty/trade-tariff-frontend,bitzesty/trade-tariff-frontend,alphagov/trade-tariff-frontend
yaml
## Code Before: language: ruby bundler_args: --without development before_install: - sudo apt-get update -qq - sudo apt-get install -qq wbritish script: - RAILS_ENV=test bundle exec rake spec rvm: - 2.0.0 - 1.9.3 - 1.9.2 matrix: allow_failures: - rvm: 2.0.0 branches: only: - master ## Instruction: Add env variable to make build work ## Code After: language: ruby bundler_args: --without development before_install: - sudo apt-get update -qq - sudo apt-get install -qq wbritish script: - RAILS_ENV=test GOVUK_APP_DOMAIN=test.example.com bundle exec rake spec rvm: - 2.0.0 - 1.9.3 - 1.9.2 matrix: allow_failures: - rvm: 2.0.0 branches: only: - master
176f9afac80d39fba1639f9733ecde5ccd90b87f
.travis.yml
.travis.yml
language: java sudo: false install: true matrix: include: - os: linux dist: trusty jdk: oraclejdk8 env: _JAVA_OPTIONS="-Xmx2048m -Xms512m -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw -Dprism.text=t2k -Dtestfx.setup.timeout=2500" addons: apt: packages: - oracle-java8-installer before_script: - if [[ "${TRAVIS_OS_NAME}" == linux ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi script: - mvn clean install jacoco:report sonar:sonar site -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=ben12-github -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${TRAVIS_BRANCH} deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN local_dir: target/site on: branch: master cache: directories: - '$HOME/.m2/repository' - '$HOME/.sonar/cache'
language: java sudo: false install: true matrix: include: - os: linux dist: trusty jdk: oraclejdk8 env: _JAVA_OPTIONS="-Xmx2048m -Xms512m -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw -Dprism.text=t2k -Dtestfx.setup.timeout=2500" addons: apt: packages: - oracle-java8-installer before_script: - if [[ "${TRAVIS_OS_NAME}" == linux ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi script: - mvn clean install jacoco:report sonar:sonar site -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=ben12-github -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${TRAVIS_BRANCH} after_success: - echo 'infxnity.ben12.eu' > ./target/site/CNAME deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN local_dir: target/site on: branch: master cache: directories: - '$HOME/.m2/repository' - '$HOME/.sonar/cache'
Add CNAME file in deployed gh-pages
Add CNAME file in deployed gh-pages
YAML
mit
ben12/infxnity
yaml
## Code Before: language: java sudo: false install: true matrix: include: - os: linux dist: trusty jdk: oraclejdk8 env: _JAVA_OPTIONS="-Xmx2048m -Xms512m -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw -Dprism.text=t2k -Dtestfx.setup.timeout=2500" addons: apt: packages: - oracle-java8-installer before_script: - if [[ "${TRAVIS_OS_NAME}" == linux ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi script: - mvn clean install jacoco:report sonar:sonar site -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=ben12-github -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${TRAVIS_BRANCH} deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN local_dir: target/site on: branch: master cache: directories: - '$HOME/.m2/repository' - '$HOME/.sonar/cache' ## Instruction: Add CNAME file in deployed gh-pages ## Code After: language: java sudo: false install: true matrix: include: - os: linux dist: trusty jdk: oraclejdk8 env: _JAVA_OPTIONS="-Xmx2048m -Xms512m -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw -Dprism.text=t2k -Dtestfx.setup.timeout=2500" addons: apt: packages: - oracle-java8-installer before_script: - if [[ "${TRAVIS_OS_NAME}" == linux ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi script: - mvn clean install jacoco:report sonar:sonar site -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=ben12-github -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${TRAVIS_BRANCH} after_success: - echo 'infxnity.ben12.eu' > ./target/site/CNAME deploy: provider: pages skip_cleanup: true github_token: $GITHUB_TOKEN local_dir: target/site on: branch: master cache: directories: - '$HOME/.m2/repository' - '$HOME/.sonar/cache'
2982b003a00bf5494f34abd5edf78604c7f4e609
helpers/set-npm-userconfig/test-user.ini
helpers/set-npm-userconfig/test-user.ini
init-author-name=Tester McPerson [email protected] init-author-url=http://example.com registry = https://registry.npmjs.org/ //registry.npmjs.org/:_authToken=5f871bad-a35b-44da-aa77-f29b87a7d846
init-author-name=Tester McPerson [email protected] init-author-url=http://example.com registry = https://registry.npmjs.org/ //registry.npmjs.org/:_authToken=bf7b95c5-6661-411b-8362-a40e3ae9d5f4
Reset test npm token so CI passes again
build: Reset test npm token so CI passes again
INI
mit
evocateur/lerna,sebmck/lerna,lerna/lerna,lerna/lerna,kittens/lerna,lerna/lerna,evocateur/lerna
ini
## Code Before: init-author-name=Tester McPerson [email protected] init-author-url=http://example.com registry = https://registry.npmjs.org/ //registry.npmjs.org/:_authToken=5f871bad-a35b-44da-aa77-f29b87a7d846 ## Instruction: build: Reset test npm token so CI passes again ## Code After: init-author-name=Tester McPerson [email protected] init-author-url=http://example.com registry = https://registry.npmjs.org/ //registry.npmjs.org/:_authToken=bf7b95c5-6661-411b-8362-a40e3ae9d5f4
5b4591581e2dc8cb6c4ff366cb10eed0486771c5
README.md
README.md
Roger plugin to transpile ES6 code with BabelJS ``` gem 'roger_babeljs' ``` ## Changes and versions Have a look at the [CHANGELOG](CHANGELOG.md) to see what's new. ## Contributors [View contributors](https://github.com/digitpaint/roger_babeljs/graphs/contributors) ## License MIT License, see [LICENSE](LICENSE) for more info.
Roger plugin to transpile ES6 code with BabelJS ``` gem 'roger_babeljs' ## Use it in the server ``` mockup.serve do |server| server.use RogerBabeljs::Middleware, { match: [%r{/url/you/want/to/match/*\.js}], babel_options: { # ... Options to pass to Babel } } end ``` ## Changes and versions Have a look at the [CHANGELOG](CHANGELOG.md) to see what's new. ## Contributors [View contributors](https://github.com/digitpaint/roger_babeljs/graphs/contributors) ## License MIT License, see [LICENSE](LICENSE) for more info.
Add short intro on how to use it in the server
Add short intro on how to use it in the server
Markdown
mit
DigitPaint/roger_babeljs
markdown
## Code Before: Roger plugin to transpile ES6 code with BabelJS ``` gem 'roger_babeljs' ``` ## Changes and versions Have a look at the [CHANGELOG](CHANGELOG.md) to see what's new. ## Contributors [View contributors](https://github.com/digitpaint/roger_babeljs/graphs/contributors) ## License MIT License, see [LICENSE](LICENSE) for more info. ## Instruction: Add short intro on how to use it in the server ## Code After: Roger plugin to transpile ES6 code with BabelJS ``` gem 'roger_babeljs' ## Use it in the server ``` mockup.serve do |server| server.use RogerBabeljs::Middleware, { match: [%r{/url/you/want/to/match/*\.js}], babel_options: { # ... Options to pass to Babel } } end ``` ## Changes and versions Have a look at the [CHANGELOG](CHANGELOG.md) to see what's new. ## Contributors [View contributors](https://github.com/digitpaint/roger_babeljs/graphs/contributors) ## License MIT License, see [LICENSE](LICENSE) for more info.
3ecd4b54e17b91e66441ecd416cc12cc2315a035
rundeckapp/grails-app/views/framework/_projectSelect.gsp
rundeckapp/grails-app/views/framework/_projectSelect.gsp
<g:set var="projectSet" value="${[]}"/> <g:each in="${projects*.name.sort()}" var="proj"> %{ projectSet << ['key': proj, 'value': proj] }% </g:each> <auth:resourceAllowed action="create" kind="project" context="application"> <g:if test="${!params.nocreate}"> %{ projectSet << [value: "Create new Project...", key: '-new-'] }% </g:if> </auth:resourceAllowed> <g:select from="${projectSet}" optionKey='key' optionValue='value' name="${params.key ? params.key : 'projectSelect'}" onchange="${params.callback ? params.callback : 'selectProject'}(this.value);" value="${params.selected ? params.selected : project}"/> <g:if test="${error}"> <span class="error message">${error}</span> </g:if>
<g:set var="projectSet" value="${[]}"/> <g:each in="${projects*.name.sort()}" var="proj"> %{ projectSet << ['key': proj, 'value': proj] }% </g:each> <auth:resourceAllowed action="create" kind="project" context="application"> <g:if test="${!params.nocreate}"> %{ projectSet << [value: "Create new Project...", key: '-new-'] }% </g:if> </auth:resourceAllowed> <g:select from="${projectSet}" optionKey='key' optionValue='value' name="${params.key ? params.key : 'projectSelect'}" onchange="${params.callback ? params.callback : 'selectProject'}(this.value);" value="${params.selected ? params.selected : project}"/>
Remove error message in project select area
Remove error message in project select area
Groovy Server Pages
apache-2.0
paul-krohn/rundeck,jgpacker/rundeck,variacode/rundeck,patcadelina/rundeck,paul-krohn/rundeck,variacode95/rundeck,paul-krohn/rundeck,jamieps/rundeck,jgpacker/rundeck,variacode/rundeck,tjordanchat/rundeck,rophy/rundeck,patcadelina/rundeck,jamieps/rundeck,rundeck/rundeck,variacode95/rundeck,damageboy/rundeck,variacode95/rundeck,rundeck/rundeck,variacode/rundeck,rophy/rundeck,rophy/rundeck,jgpacker/rundeck,variacode/rundeck,variacode95/rundeck,damageboy/rundeck,patcadelina/rundeck,patcadelina/rundeck,damageboy/rundeck,tjordanchat/rundeck,variacode/rundeck,jamieps/rundeck,rophy/rundeck,paul-krohn/rundeck,rundeck/rundeck,rundeck/rundeck,jgpacker/rundeck,jamieps/rundeck,tjordanchat/rundeck,damageboy/rundeck,tjordanchat/rundeck,rundeck/rundeck
groovy-server-pages
## Code Before: <g:set var="projectSet" value="${[]}"/> <g:each in="${projects*.name.sort()}" var="proj"> %{ projectSet << ['key': proj, 'value': proj] }% </g:each> <auth:resourceAllowed action="create" kind="project" context="application"> <g:if test="${!params.nocreate}"> %{ projectSet << [value: "Create new Project...", key: '-new-'] }% </g:if> </auth:resourceAllowed> <g:select from="${projectSet}" optionKey='key' optionValue='value' name="${params.key ? params.key : 'projectSelect'}" onchange="${params.callback ? params.callback : 'selectProject'}(this.value);" value="${params.selected ? params.selected : project}"/> <g:if test="${error}"> <span class="error message">${error}</span> </g:if> ## Instruction: Remove error message in project select area ## Code After: <g:set var="projectSet" value="${[]}"/> <g:each in="${projects*.name.sort()}" var="proj"> %{ projectSet << ['key': proj, 'value': proj] }% </g:each> <auth:resourceAllowed action="create" kind="project" context="application"> <g:if test="${!params.nocreate}"> %{ projectSet << [value: "Create new Project...", key: '-new-'] }% </g:if> </auth:resourceAllowed> <g:select from="${projectSet}" optionKey='key' optionValue='value' name="${params.key ? params.key : 'projectSelect'}" onchange="${params.callback ? params.callback : 'selectProject'}(this.value);" value="${params.selected ? params.selected : project}"/>
3b3d8b40a5b4dda16440a0262246aa6ff8da4332
gulp/watch.js
gulp/watch.js
import gulp from 'gulp'; import {build} from './build'; import {test} from './test'; import {makeParser, fixParser} from './parse'; const allSrcGlob = [ 'src/**/*.js', '!src/static/antlr4/parsers/**/*.js', 'test/**/*.js', ]; const allBuildGlob = [ 'build/src/*.js', 'build/test/**/*.js', ]; const grammarGlob = [ 'src/static/antlr4/grammars/**/*.g4', 'build/src/static/antlr4/Translator.js', ]; const dataGlob = [ 'src/static/data/**/*.*', ]; export const watch = done => { gulp.watch(allSrcGlob, build); gulp.watch(allBuildGlob, test); gulp.watch(grammarGlob, gulp.series(makeParser, fixParser)); gulp.watch(dataGlob, test); done(); }; gulp.task('watch', watch);
import gulp from 'gulp'; import {build} from './build'; import {test} from './test'; import {makeParser, fixParser} from './parse'; const allSrcGlob = [ 'src/**/*.js', '!src/static/antlr4/parsers/**/*.js', 'test/**/*.js', ]; const allBuildGlob = [ 'build/src/*.js', 'build/test/**/*.js', ]; const grammarGlob = [ 'src/static/antlr4/grammars/**/*.g4', 'build/src/static/antlr4/Translator.js', ]; const dataGlob = [ 'src/static/data/**/*.*', 'src/static/antlr4/parsers/TestudocParser.js', ]; export const watch = done => { gulp.watch(allSrcGlob, build); gulp.watch(allBuildGlob, test); gulp.watch(grammarGlob, gulp.series(makeParser, fixParser)); gulp.watch(dataGlob, test); done(); }; gulp.task('watch', watch);
Test again when TestudocParser is recreated
Test again when TestudocParser is recreated
JavaScript
mit
jlenoble/ecmascript-parser
javascript
## Code Before: import gulp from 'gulp'; import {build} from './build'; import {test} from './test'; import {makeParser, fixParser} from './parse'; const allSrcGlob = [ 'src/**/*.js', '!src/static/antlr4/parsers/**/*.js', 'test/**/*.js', ]; const allBuildGlob = [ 'build/src/*.js', 'build/test/**/*.js', ]; const grammarGlob = [ 'src/static/antlr4/grammars/**/*.g4', 'build/src/static/antlr4/Translator.js', ]; const dataGlob = [ 'src/static/data/**/*.*', ]; export const watch = done => { gulp.watch(allSrcGlob, build); gulp.watch(allBuildGlob, test); gulp.watch(grammarGlob, gulp.series(makeParser, fixParser)); gulp.watch(dataGlob, test); done(); }; gulp.task('watch', watch); ## Instruction: Test again when TestudocParser is recreated ## Code After: import gulp from 'gulp'; import {build} from './build'; import {test} from './test'; import {makeParser, fixParser} from './parse'; const allSrcGlob = [ 'src/**/*.js', '!src/static/antlr4/parsers/**/*.js', 'test/**/*.js', ]; const allBuildGlob = [ 'build/src/*.js', 'build/test/**/*.js', ]; const grammarGlob = [ 'src/static/antlr4/grammars/**/*.g4', 'build/src/static/antlr4/Translator.js', ]; const dataGlob = [ 'src/static/data/**/*.*', 'src/static/antlr4/parsers/TestudocParser.js', ]; export const watch = done => { gulp.watch(allSrcGlob, build); gulp.watch(allBuildGlob, test); gulp.watch(grammarGlob, gulp.series(makeParser, fixParser)); gulp.watch(dataGlob, test); done(); }; gulp.task('watch', watch);
96bb30afd35bd93339bbd777e01a2e01d7ee7a62
kubernetes/prod/deployment.yaml
kubernetes/prod/deployment.yaml
--- apiVersion: apps/v1 kind: Deployment metadata: name: moderator namespace: moderator-prod labels: app: moderator spec: replicas: 1 selector: matchLabels: app: moderator template: metadata: labels: app: moderator spec: containers: - name: moderator-web image: 783633885093.dkr.ecr.us-west-2.amazonaws.com/moderator:91e987717292633cb940eb0ce416dcddac9a6309 ports: - containerPort: 8000 envFrom: - configMapRef: name: moderator-prod - secretRef: name: moderator-prod
--- apiVersion: apps/v1 kind: Deployment metadata: name: moderator namespace: moderator-prod labels: app: moderator spec: replicas: 1 selector: matchLabels: app: moderator template: metadata: labels: app: moderator spec: containers: - name: moderator-web image: 783633885093.dkr.ecr.us-west-2.amazonaws.com/moderator:6d854c71e90dc3f3d6872c5c5e50a5490e9b6ee4 ports: - containerPort: 8000 envFrom: - configMapRef: name: moderator-prod - secretRef: name: moderator-prod
Upgrade to latest version for testing that Flux does its job
Upgrade to latest version for testing that Flux does its job
YAML
agpl-3.0
mozilla/mozmoderator,akatsoulas/mozmoderator,mozilla/mozmoderator,akatsoulas/mozmoderator,mozilla/mozmoderator,akatsoulas/mozmoderator
yaml
## Code Before: --- apiVersion: apps/v1 kind: Deployment metadata: name: moderator namespace: moderator-prod labels: app: moderator spec: replicas: 1 selector: matchLabels: app: moderator template: metadata: labels: app: moderator spec: containers: - name: moderator-web image: 783633885093.dkr.ecr.us-west-2.amazonaws.com/moderator:91e987717292633cb940eb0ce416dcddac9a6309 ports: - containerPort: 8000 envFrom: - configMapRef: name: moderator-prod - secretRef: name: moderator-prod ## Instruction: Upgrade to latest version for testing that Flux does its job ## Code After: --- apiVersion: apps/v1 kind: Deployment metadata: name: moderator namespace: moderator-prod labels: app: moderator spec: replicas: 1 selector: matchLabels: app: moderator template: metadata: labels: app: moderator spec: containers: - name: moderator-web image: 783633885093.dkr.ecr.us-west-2.amazonaws.com/moderator:6d854c71e90dc3f3d6872c5c5e50a5490e9b6ee4 ports: - containerPort: 8000 envFrom: - configMapRef: name: moderator-prod - secretRef: name: moderator-prod
b3c2c211cc4738a76d43c1a3af8dbc40382636bf
user-lisp/rust-customisations.el
user-lisp/rust-customisations.el
(require 'flycheck) (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) (provide 'rust-customisations)
(require 'flycheck) (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) (add-hook 'rust-mode-hook #'flycheck-mode) (provide 'rust-customisations)
Use flycheck for all rust buffers.
Use flycheck for all rust buffers.
Emacs Lisp
mit
Wilfred/.emacs.d,Wilfred/.emacs.d,Wilfred/.emacs.d,Wilfred/.emacs.d,Wilfred/.emacs.d,Wilfred/.emacs.d,Wilfred/.emacs.d
emacs-lisp
## Code Before: (require 'flycheck) (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) (provide 'rust-customisations) ## Instruction: Use flycheck for all rust buffers. ## Code After: (require 'flycheck) (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) (add-hook 'rust-mode-hook #'flycheck-mode) (provide 'rust-customisations)
c6259c5b9c0fd3bf18212359c7b29ab328a2ce05
README.md
README.md
Page Object Extension ===================== Behat extension providing tools to implement page object pattern. [![Build Status](https://secure.travis-ci.org/sensiolabs/BehatPageObjectExtension.png?branch=master)](http://travis-ci.org/sensiolabs/BehatPageObjectExtension) ## Documentation [Official documentation](http://extensions.behat.org/page-object/)
Page Object Extension ===================== Behat extension providing tools to implement page object pattern. [![Build Status](https://secure.travis-ci.org/sensiolabs/BehatPageObjectExtension.png?branch=master)](http://travis-ci.org/sensiolabs/BehatPageObjectExtension) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/bcbbc1d0-d07a-4173-814c-0d3b6ffe23d5/mini.png)](https://insight.sensiolabs.com/projects/bcbbc1d0-d07a-4173-814c-0d3b6ffe23d5) ## Documentation [Official documentation](http://extensions.behat.org/page-object/)
Add the SensioLabs Insight widget
Add the SensioLabs Insight widget
Markdown
mit
jakzal/BehatPageObjectExtension,sensiolabs/BehatPageObjectExtension
markdown
## Code Before: Page Object Extension ===================== Behat extension providing tools to implement page object pattern. [![Build Status](https://secure.travis-ci.org/sensiolabs/BehatPageObjectExtension.png?branch=master)](http://travis-ci.org/sensiolabs/BehatPageObjectExtension) ## Documentation [Official documentation](http://extensions.behat.org/page-object/) ## Instruction: Add the SensioLabs Insight widget ## Code After: Page Object Extension ===================== Behat extension providing tools to implement page object pattern. [![Build Status](https://secure.travis-ci.org/sensiolabs/BehatPageObjectExtension.png?branch=master)](http://travis-ci.org/sensiolabs/BehatPageObjectExtension) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/bcbbc1d0-d07a-4173-814c-0d3b6ffe23d5/mini.png)](https://insight.sensiolabs.com/projects/bcbbc1d0-d07a-4173-814c-0d3b6ffe23d5) ## Documentation [Official documentation](http://extensions.behat.org/page-object/)
4d0637d2deb9bc20fa39ed28b499497be35aaef3
test/fixtures/ShortUrl.json
test/fixtures/ShortUrl.json
[ { "key": "127.0.0.1:-fDnkY", "targetUrl": "https://www.google.com/", "createdAt": "2017-01-08 22:37:31+0200" } ]
[ { "key": "127.0.0.1:-fDnkY", "targetUrl": "https://www.google.com/", "createdAt": "2017-01-08T20:37:31.584Z" }, { "key": "127.0.0.1:customSlashdot", "targetUrl": "http://slashdot.org/" } ]
Add a short URL with default createdAt to fixtures
test: Add a short URL with default createdAt to fixtures
JSON
mit
crocodele/urlie-redirector,crocodele/urlie-redirector
json
## Code Before: [ { "key": "127.0.0.1:-fDnkY", "targetUrl": "https://www.google.com/", "createdAt": "2017-01-08 22:37:31+0200" } ] ## Instruction: test: Add a short URL with default createdAt to fixtures ## Code After: [ { "key": "127.0.0.1:-fDnkY", "targetUrl": "https://www.google.com/", "createdAt": "2017-01-08T20:37:31.584Z" }, { "key": "127.0.0.1:customSlashdot", "targetUrl": "http://slashdot.org/" } ]
06f29814ef53d8fd60f1bd99f981801c9130fdaa
config/view.php
config/view.php
<?php return [ /* |-------------------------------------------------------------------------- | View Storage Paths |-------------------------------------------------------------------------- | | Most templating systems load templates from disk. Here you may specify | an array of paths that should be checked for your views. Of course | the usual Laravel view path has already been registered for you. | */ 'paths' => [ realpath(base_path('resources/views')), ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path('framework/views')), ];
<?php return [ /* |-------------------------------------------------------------------------- | View Storage Paths |-------------------------------------------------------------------------- | | Most templating systems load templates from disk. Here you may specify | an array of paths that should be checked for your views. Of course | the usual Laravel view path has already been registered for you. | */ 'paths' => [ realpath(base_path('public/')), ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path('framework/views')), ];
Change dir to serve resources from public dir
:key: Change dir to serve resources from public dir
PHP
mit
TRomesh/Coupley,rajikaimal/Coupley,MadushikaPerera/Coupley,MadushikaPerera/Coupley,TRomesh/Coupley,MadushikaPerera/Coupley,IsuruDilhan/Coupley,rajikaimal/Coupley,IsuruDilhan/Coupley,rajikaimal/Coupley,TRomesh/Coupley,IsuruDilhan/Coupley
php
## Code Before: <?php return [ /* |-------------------------------------------------------------------------- | View Storage Paths |-------------------------------------------------------------------------- | | Most templating systems load templates from disk. Here you may specify | an array of paths that should be checked for your views. Of course | the usual Laravel view path has already been registered for you. | */ 'paths' => [ realpath(base_path('resources/views')), ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path('framework/views')), ]; ## Instruction: :key: Change dir to serve resources from public dir ## Code After: <?php return [ /* |-------------------------------------------------------------------------- | View Storage Paths |-------------------------------------------------------------------------- | | Most templating systems load templates from disk. Here you may specify | an array of paths that should be checked for your views. Of course | the usual Laravel view path has already been registered for you. | */ 'paths' => [ realpath(base_path('public/')), ], /* |-------------------------------------------------------------------------- | Compiled View Path |-------------------------------------------------------------------------- | | This option determines where all the compiled Blade templates will be | stored for your application. Typically, this is within the storage | directory. However, as usual, you are free to change this value. | */ 'compiled' => realpath(storage_path('framework/views')), ];
ca5c78d00120fd99a75a106375ea01d1053a919e
test/dummy/spec/models/user_enum_scope_spec.rb
test/dummy/spec/models/user_enum_scope_spec.rb
require 'spec_helper' describe User do before :all do # Create test users create(:user, :role_admin) 2.times { create(:user, :role_editor) } 5.times { create(:user, :role_author) } 20.times { create(:user, :role_user) } end before { default_user_roles } it 'adds the scope methods for each possible enum value' do scopes = [:role_admin, :role_editor, :role_admin, :role_user] expect(User).to respond_to(*scopes) end it 'returns the correct count from the db' do expect(User.role_admin.count).to eq(1) expect(User.role_editor.count).to eq(2) expect(User.role_author.count).to eq(5) expect(User.role_user.count).to eq(20) end end
require 'spec_helper' describe 'Role enum for User' do before :each do # Ensure default enum set up default_user_roles # Create test users # Having issues with FactoryGirl and changing the role enum values # between tests # create(:user, :role_admin) # 2.times { create(:user, :role_editor) } # 5.times { create(:user, :role_author) } # 20.times { create(:user, :role_user) } User.create(role: User::Role::ADMIN) 2.times { User.create(role: User::Role::EDITOR) } 5.times { User.create(role: User::Role::AUTHOR) } 20.times { User.create(role: User::Role::USER) } end it 'adds the scope methods for each possible enum value' do scopes = [:role_admin, :role_editor, :role_admin, :role_user] expect(User).to respond_to(*scopes) end it 'returns the correct count from the db' do expect(User.role_admin.count).to eq(1) expect(User.role_editor.count).to eq(2) expect(User.role_author.count).to eq(5) expect(User.role_user.count).to eq(20) end end
Change description and temporarily stop using FG
Change description and temporarily stop using FG - Updated the top description string for `describe` - Temporarily changed test user creation to default Rails API because I'm having issues with other tests and FactoryGirl
Ruby
mit
jfairbank/rails_attr_enum,jfairbank/rails_attr_enum
ruby
## Code Before: require 'spec_helper' describe User do before :all do # Create test users create(:user, :role_admin) 2.times { create(:user, :role_editor) } 5.times { create(:user, :role_author) } 20.times { create(:user, :role_user) } end before { default_user_roles } it 'adds the scope methods for each possible enum value' do scopes = [:role_admin, :role_editor, :role_admin, :role_user] expect(User).to respond_to(*scopes) end it 'returns the correct count from the db' do expect(User.role_admin.count).to eq(1) expect(User.role_editor.count).to eq(2) expect(User.role_author.count).to eq(5) expect(User.role_user.count).to eq(20) end end ## Instruction: Change description and temporarily stop using FG - Updated the top description string for `describe` - Temporarily changed test user creation to default Rails API because I'm having issues with other tests and FactoryGirl ## Code After: require 'spec_helper' describe 'Role enum for User' do before :each do # Ensure default enum set up default_user_roles # Create test users # Having issues with FactoryGirl and changing the role enum values # between tests # create(:user, :role_admin) # 2.times { create(:user, :role_editor) } # 5.times { create(:user, :role_author) } # 20.times { create(:user, :role_user) } User.create(role: User::Role::ADMIN) 2.times { User.create(role: User::Role::EDITOR) } 5.times { User.create(role: User::Role::AUTHOR) } 20.times { User.create(role: User::Role::USER) } end it 'adds the scope methods for each possible enum value' do scopes = [:role_admin, :role_editor, :role_admin, :role_user] expect(User).to respond_to(*scopes) end it 'returns the correct count from the db' do expect(User.role_admin.count).to eq(1) expect(User.role_editor.count).to eq(2) expect(User.role_author.count).to eq(5) expect(User.role_user.count).to eq(20) end end