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
6dc350d2238f0d8090db28edecaef6d2922cd39b
README.md
README.md
![npm version](https://badge.fury.io/js/txt.wav.svg) ![Code Climate](https://codeclimate.com/github/still-life-studios/txt.wav/badges/gpa.svg) some weird text animations the internet deserves. check out the [demos](http://www.stilllife.studio/txtwav?utm_source=github) #### NPM ``` npm install --save txt.wav ``` #### CDN _Coming Soon_ ## basic usage 1. include the `css` and `js` files from the `dist` folder. 2. add the class `txtwav` to an element you want to animate. 3. add the class for the specific animation you want to include from the following: * `slow` * `vibe` * `bounce` * `flip` full example: ```html <h1 class="txtwav slow">true freaks only</h1> ``` ## about Still Life Studios ![still life studio logo](http://www.stilllife.studio/images/still_life_logo.png) txt.wav is maintained by Still Life Studios. we love open source software. see our other [projects](http://www.stilllife.studio/?utm_source=github#work) or [hire us](http://www.stilllife.studio/?utm_source=github#contact) to design and develop your product. ## license txt.wav is licensed under the MIT license. (http://opensource.org/licenses/MIT)
![npm version](https://badge.fury.io/js/txt.wav.svg) ![Code Climate](https://codeclimate.com/github/still-life-studio/txt.wav/badges/gpa.svg) some weird text animations the internet deserves. check out the [demos](http://www.stilllife.studio/txtwav?utm_source=github) #### NPM ``` npm install --save txt.wav ``` #### CDN _Coming Soon_ ## basic usage 1. include the `css` and `js` files from the `dist` folder. 2. add the class `txtwav` to an element you want to animate. 3. add the class for the specific animation you want to include from the following: * `slow` * `vibe` * `bounce` * `flip` full example: ```html <h1 class="txtwav slow">true freaks only</h1> ``` ## about Still Life ![still life logo](http://www.stilllife.studio/images/still_life_logo.png) txt.wav is maintained by Still Life. we love open source software. see our other [projects](http://www.stilllife.studio/?utm_source=github#work) or [hire us](http://www.stilllife.studio/?utm_source=github#contact) to design and develop your product. ## license txt.wav is licensed under the MIT license. (http://opensource.org/licenses/MIT)
Correct name references to remove 'studios'
Correct name references to remove 'studios'
Markdown
mit
still-life-studio/txt.wav
markdown
## Code Before: ![npm version](https://badge.fury.io/js/txt.wav.svg) ![Code Climate](https://codeclimate.com/github/still-life-studios/txt.wav/badges/gpa.svg) some weird text animations the internet deserves. check out the [demos](http://www.stilllife.studio/txtwav?utm_source=github) #### NPM ``` npm install --save txt.wav ``` #### CDN _Coming Soon_ ## basic usage 1. include the `css` and `js` files from the `dist` folder. 2. add the class `txtwav` to an element you want to animate. 3. add the class for the specific animation you want to include from the following: * `slow` * `vibe` * `bounce` * `flip` full example: ```html <h1 class="txtwav slow">true freaks only</h1> ``` ## about Still Life Studios ![still life studio logo](http://www.stilllife.studio/images/still_life_logo.png) txt.wav is maintained by Still Life Studios. we love open source software. see our other [projects](http://www.stilllife.studio/?utm_source=github#work) or [hire us](http://www.stilllife.studio/?utm_source=github#contact) to design and develop your product. ## license txt.wav is licensed under the MIT license. (http://opensource.org/licenses/MIT) ## Instruction: Correct name references to remove 'studios' ## Code After: ![npm version](https://badge.fury.io/js/txt.wav.svg) ![Code Climate](https://codeclimate.com/github/still-life-studio/txt.wav/badges/gpa.svg) some weird text animations the internet deserves. check out the [demos](http://www.stilllife.studio/txtwav?utm_source=github) #### NPM ``` npm install --save txt.wav ``` #### CDN _Coming Soon_ ## basic usage 1. include the `css` and `js` files from the `dist` folder. 2. add the class `txtwav` to an element you want to animate. 3. add the class for the specific animation you want to include from the following: * `slow` * `vibe` * `bounce` * `flip` full example: ```html <h1 class="txtwav slow">true freaks only</h1> ``` ## about Still Life ![still life logo](http://www.stilllife.studio/images/still_life_logo.png) txt.wav is maintained by Still Life. we love open source software. see our other [projects](http://www.stilllife.studio/?utm_source=github#work) or [hire us](http://www.stilllife.studio/?utm_source=github#contact) to design and develop your product. ## license txt.wav is licensed under the MIT license. (http://opensource.org/licenses/MIT)
80a00e6937f94e78d2f6dab80696cc4d71527142
.kitchen.yml
.kitchen.yml
--- driver: name: vagrant synced_folders: - ["ansible/test", "/tmp/test"] platforms: - name: ubuntu-16.04 driver_config: box: ubuntu/xenial64 box_url: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box vm_hostname: ubuntu-xenial forward: - 80:80 provisioner: name: ansible_playbook playbook: ansible/site.yml roles_path: ansible/roles hosts: all ansible_verbose: true ansible_verbosity: 3 require_chef_for_busser: false verifier: name: serverspec suites: - name: default verifier: patterns: - /tmp/test/integration/default/serverspec/default_spec.rb
--- driver: name: vagrant synced_folders: - ["ansible/test", "/tmp/test"] platforms: - name: ubuntu-16.04 driver_config: box: ubuntu/xenial64 box_url: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box vm_hostname: ubuntu-xenial provision: true provisioner: name: ansible_playbook playbook: ansible/site.yml roles_path: ansible/roles hosts: all ansible_verbose: true ansible_verbosity: 3 require_chef_for_busser: false verifier: name: serverspec suites: - name: default verifier: patterns: - /tmp/test/integration/default/serverspec/default_spec.rb
Set in Test Kitchen to provision from Vagrantfile
Set in Test Kitchen to provision from Vagrantfile
YAML
mit
vitovitolo/cdn,vitovitolo/cdn
yaml
## Code Before: --- driver: name: vagrant synced_folders: - ["ansible/test", "/tmp/test"] platforms: - name: ubuntu-16.04 driver_config: box: ubuntu/xenial64 box_url: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box vm_hostname: ubuntu-xenial forward: - 80:80 provisioner: name: ansible_playbook playbook: ansible/site.yml roles_path: ansible/roles hosts: all ansible_verbose: true ansible_verbosity: 3 require_chef_for_busser: false verifier: name: serverspec suites: - name: default verifier: patterns: - /tmp/test/integration/default/serverspec/default_spec.rb ## Instruction: Set in Test Kitchen to provision from Vagrantfile ## Code After: --- driver: name: vagrant synced_folders: - ["ansible/test", "/tmp/test"] platforms: - name: ubuntu-16.04 driver_config: box: ubuntu/xenial64 box_url: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box vm_hostname: ubuntu-xenial provision: true provisioner: name: ansible_playbook playbook: ansible/site.yml roles_path: ansible/roles hosts: all ansible_verbose: true ansible_verbosity: 3 require_chef_for_busser: false verifier: name: serverspec suites: - name: default verifier: patterns: - /tmp/test/integration/default/serverspec/default_spec.rb
d0b2a786ba46a0ca1d34ef5c9fceb7abd6931ab5
kiwi/app/views/questions/show.html.erb
kiwi/app/views/questions/show.html.erb
<div id="question-info" class="container"> <h3><%= @question.title %></h3> <p><%= @question.content%></p> <p>Asked by <%= @question.user.name %> on <%= std_format_date(@question.created_at) %></p> </div> <%= link_to "Edit my question", edit_question_path %> <%= link_to "Delete my question", question_path, method: :delete %> <div id="answers-container" class="container"> <% @question.answers.each do |answer|%> <div> <%= answer.content %> </div> <% end %> </div>
<div id="question-info" class="container"> <h3><%= @question.title %></h3> <p><%= @question.content%></p> <p>Asked by <%= @question.user.name %> on <%= std_format_date(@question.created_at) %></p> </div> <% if current_user == @question.user %> <%= link_to "Edit my question", edit_question_path %> <%= link_to "Delete my question", question_path, method: :delete %> <% end %> <div id="answers-container" class="container"> <% @question.answers.each do |answer|%> <div> <%= answer.content %> </div> <% end %> </div>
Hide edit and delete questions links on qeustions/show view from all users except question owner
Hide edit and delete questions links on qeustions/show view from all users except question owner
HTML+ERB
mit
nyc-island-foxes-2016/kiwi-overflow,nyc-island-foxes-2016/kiwi-overflow,nyc-island-foxes-2016/kiwi-overflow
html+erb
## Code Before: <div id="question-info" class="container"> <h3><%= @question.title %></h3> <p><%= @question.content%></p> <p>Asked by <%= @question.user.name %> on <%= std_format_date(@question.created_at) %></p> </div> <%= link_to "Edit my question", edit_question_path %> <%= link_to "Delete my question", question_path, method: :delete %> <div id="answers-container" class="container"> <% @question.answers.each do |answer|%> <div> <%= answer.content %> </div> <% end %> </div> ## Instruction: Hide edit and delete questions links on qeustions/show view from all users except question owner ## Code After: <div id="question-info" class="container"> <h3><%= @question.title %></h3> <p><%= @question.content%></p> <p>Asked by <%= @question.user.name %> on <%= std_format_date(@question.created_at) %></p> </div> <% if current_user == @question.user %> <%= link_to "Edit my question", edit_question_path %> <%= link_to "Delete my question", question_path, method: :delete %> <% end %> <div id="answers-container" class="container"> <% @question.answers.each do |answer|%> <div> <%= answer.content %> </div> <% end %> </div>
d10329a397b992bce9c26df095f80ed09bb480f4
examples/index.html
examples/index.html
<!DOCTYPE html> <html> <head> <title>Stencila Project</title> <link rel="stylesheet" type="text/css" href="./stencila.css"> <script type="text/javascript" src="./katex/katex.min.js"></script> <script type="text/javascript" src="./lib/plotly.min.js"></script> <script type="text/javascript" src="./lib/substance.js"></script> <script type="text/javascript" src="./lib/texture.js"></script> <script type="text/javascript" src="./lib/stencila-mini.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.xml.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.all.js"></script> <script type="text/javascript" src="./stencila.js"></script> <script type="text/javascript" src="./vfs.js"></script> <script type="text/javascript" src="./env.js"></script> <script type="text/javascript" src="./app.js"></script> </head> <body></body> </html>
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Stencila Project</title> <link rel="stylesheet" type="text/css" href="./stencila.css"> <script type="text/javascript" src="./katex/katex.min.js"></script> <script type="text/javascript" src="./lib/plotly.min.js"></script> <script type="text/javascript" src="./lib/substance.js"></script> <script type="text/javascript" src="./lib/texture.js"></script> <script type="text/javascript" src="./lib/stencila-mini.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.xml.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.all.js"></script> <script type="text/javascript" src="./stencila.js"></script> <script type="text/javascript" src="./vfs.js"></script> <script type="text/javascript" src="./env.js"></script> <script type="text/javascript" src="./app.js"></script> </head> <body></body> </html>
Add charset="utf-8" instruction to example HTML.
Add charset="utf-8" instruction to example HTML.
HTML
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
html
## Code Before: <!DOCTYPE html> <html> <head> <title>Stencila Project</title> <link rel="stylesheet" type="text/css" href="./stencila.css"> <script type="text/javascript" src="./katex/katex.min.js"></script> <script type="text/javascript" src="./lib/plotly.min.js"></script> <script type="text/javascript" src="./lib/substance.js"></script> <script type="text/javascript" src="./lib/texture.js"></script> <script type="text/javascript" src="./lib/stencila-mini.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.xml.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.all.js"></script> <script type="text/javascript" src="./stencila.js"></script> <script type="text/javascript" src="./vfs.js"></script> <script type="text/javascript" src="./env.js"></script> <script type="text/javascript" src="./app.js"></script> </head> <body></body> </html> ## Instruction: Add charset="utf-8" instruction to example HTML. ## Code After: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Stencila Project</title> <link rel="stylesheet" type="text/css" href="./stencila.css"> <script type="text/javascript" src="./katex/katex.min.js"></script> <script type="text/javascript" src="./lib/plotly.min.js"></script> <script type="text/javascript" src="./lib/substance.js"></script> <script type="text/javascript" src="./lib/texture.js"></script> <script type="text/javascript" src="./lib/stencila-mini.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.xml.js"></script> <script type="text/javascript" src="./lib/stencila-libcore.all.js"></script> <script type="text/javascript" src="./stencila.js"></script> <script type="text/javascript" src="./vfs.js"></script> <script type="text/javascript" src="./env.js"></script> <script type="text/javascript" src="./app.js"></script> </head> <body></body> </html>
6e941ebcd2ea01b9771c29b612355da7382d4102
app/helpers/events_helper.rb
app/helpers/events_helper.rb
module EventsHelper def date_time_helper(date_time) "#{date_time.strftime('%A, %b %d, %Y')} at #{date_time.strftime('%I:%M %p')}" end def available?(event) event.owner == nil && event.pending end end
module EventsHelper def date_time_helper(date_time) "#{date_time.strftime('%A, %b %d, %Y')} at #{date_time.strftime('%I:%M %p')}" end def available?(event) event.owner == nil && event.pending && event.end_date_time > DateTime.now end end
Adjust logic for showing if an event is still available
Adjust logic for showing if an event is still available
Ruby
mit
sd-pocket-gophers-2017/swappaws,sd-pocket-gophers-2017/swappaws,sd-pocket-gophers-2017/swappaws
ruby
## Code Before: module EventsHelper def date_time_helper(date_time) "#{date_time.strftime('%A, %b %d, %Y')} at #{date_time.strftime('%I:%M %p')}" end def available?(event) event.owner == nil && event.pending end end ## Instruction: Adjust logic for showing if an event is still available ## Code After: module EventsHelper def date_time_helper(date_time) "#{date_time.strftime('%A, %b %d, %Y')} at #{date_time.strftime('%I:%M %p')}" end def available?(event) event.owner == nil && event.pending && event.end_date_time > DateTime.now end end
bf373cba03e982e39caabe0cb0e287742a53688a
packages/lesswrong/components/sequences/SequencesNavigationLink.jsx
packages/lesswrong/components/sequences/SequencesNavigationLink.jsx
import { Components, registerComponent, withDocument} from 'meteor/vulcan:core'; import { Posts } from '../../lib/collections/posts'; import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; const SequencesNavigationLink = ({ slug, document, documentId, documentUrl, loading, direction, router} ) => { const post = (slug || documentId) && document const className = "sequences-navigation-top-" + direction const iconStyle = !slug && !documentId ? {color: "rgba(0,0,0,.2)"} : {} return ( <IconButton iconStyle={ iconStyle } className={ className } disabled={ !slug && !documentId } iconClassName="material-icons" tooltip={post && post.title} onClick={() => router.push(documentUrl)}> { direction === "left" ? "navigate_before" : "navigate_next" } </IconButton> ) }; const options = { collection: Posts, queryName: "SequencesPostNavigationLinkQuery", fragmentName: 'SequencesPostNavigationLink', enableTotal: false, } registerComponent('SequencesNavigationLink', SequencesNavigationLink, [withDocument, options], withRouter);
import { Components, registerComponent, withDocument} from 'meteor/vulcan:core'; import { Posts } from '../../lib/collections/posts'; import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ normal: { "& .material-icons": { color: "rgba(0,0,0, 0.5) !important" } }, disabled: { "& .material-icons": { color: "rgba(0,0,0, 0.2) !important" } }, }); const SequencesNavigationLink = ({ slug, document, documentId, documentUrl, loading, direction, router, classes} ) => { const post = (slug || documentId) && document const disabled = (!slug && !documentId); return ( <IconButton className={disabled ? classes.disabled : classes.normal} disabled={disabled} iconClassName="material-icons" tooltip={post && post.title} onClick={() => router.push(documentUrl)}> { direction === "left" ? "navigate_before" : "navigate_next" } </IconButton> ) }; const options = { collection: Posts, queryName: "SequencesPostNavigationLinkQuery", fragmentName: 'SequencesPostNavigationLink', enableTotal: false, } registerComponent('SequencesNavigationLink', SequencesNavigationLink, [withDocument, options], withRouter, withStyles(styles, {name: "SequencesNavigationLink"}));
Fix sequences navigation button coloring
Fix sequences navigation button coloring There was a regression introduced by deleting seemingly-unused SCSS, because `SequencesNavigationLink` was dynamically constructing the class names `sequences-navigation-top-left` and `sequences-navigation-top-right`. Additionally, the SCSS that was incorrectly removed contained a bug, where the style that was supposed to apply to a disabled button (graying it out) wasn't applied. Fix all that and move it to JSS.
JSX
mit
Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2
jsx
## Code Before: import { Components, registerComponent, withDocument} from 'meteor/vulcan:core'; import { Posts } from '../../lib/collections/posts'; import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; const SequencesNavigationLink = ({ slug, document, documentId, documentUrl, loading, direction, router} ) => { const post = (slug || documentId) && document const className = "sequences-navigation-top-" + direction const iconStyle = !slug && !documentId ? {color: "rgba(0,0,0,.2)"} : {} return ( <IconButton iconStyle={ iconStyle } className={ className } disabled={ !slug && !documentId } iconClassName="material-icons" tooltip={post && post.title} onClick={() => router.push(documentUrl)}> { direction === "left" ? "navigate_before" : "navigate_next" } </IconButton> ) }; const options = { collection: Posts, queryName: "SequencesPostNavigationLinkQuery", fragmentName: 'SequencesPostNavigationLink', enableTotal: false, } registerComponent('SequencesNavigationLink', SequencesNavigationLink, [withDocument, options], withRouter); ## Instruction: Fix sequences navigation button coloring There was a regression introduced by deleting seemingly-unused SCSS, because `SequencesNavigationLink` was dynamically constructing the class names `sequences-navigation-top-left` and `sequences-navigation-top-right`. Additionally, the SCSS that was incorrectly removed contained a bug, where the style that was supposed to apply to a disabled button (graying it out) wasn't applied. Fix all that and move it to JSS. ## Code After: import { Components, registerComponent, withDocument} from 'meteor/vulcan:core'; import { Posts } from '../../lib/collections/posts'; import IconButton from 'material-ui/IconButton' import React from 'react'; import { withRouter } from 'react-router'; import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ normal: { "& .material-icons": { color: "rgba(0,0,0, 0.5) !important" } }, disabled: { "& .material-icons": { color: "rgba(0,0,0, 0.2) !important" } }, }); const SequencesNavigationLink = ({ slug, document, documentId, documentUrl, loading, direction, router, classes} ) => { const post = (slug || documentId) && document const disabled = (!slug && !documentId); return ( <IconButton className={disabled ? classes.disabled : classes.normal} disabled={disabled} iconClassName="material-icons" tooltip={post && post.title} onClick={() => router.push(documentUrl)}> { direction === "left" ? "navigate_before" : "navigate_next" } </IconButton> ) }; const options = { collection: Posts, queryName: "SequencesPostNavigationLinkQuery", fragmentName: 'SequencesPostNavigationLink', enableTotal: false, } registerComponent('SequencesNavigationLink', SequencesNavigationLink, [withDocument, options], withRouter, withStyles(styles, {name: "SequencesNavigationLink"}));
907b2563ca46ae69dd218ff89f202f6c63135544
3rd_party/CMakeLists.txt
3rd_party/CMakeLists.txt
link_directories(${ThirdParty_Install_Dir}/lib) include(ExternalProject_CEREAL.cmake) include(ExternalProject_ACE.cmake) if(BUILD_COX_MAP_VIEWER) include(ExternalProject_Lutefisk3D.cmake) endif() ######################################################################################## # Optional components ######################################################################################## if(ENABLE_SCRIPTING_ENGINE) include(ExternalProject_LUA.cmake) include(ExternalProject_SOL2.cmake) endif() if(ENABLE_TESTS) enable_testing() ExternalProject_Add( GMOCK_BUILD DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock URL http://googlemock.googlecode.com/files/gmock-1.6.0.zip UPDATE_COMMAND "" PATCH_COMMAND patch -N -t -p1 < ../gmock.patch SOURCE_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock INSTALL_DIR ${PROJECT_SOURCE_DIR}/3rd_party/ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ) set(GTest_LIBRARIES gtest gtest_main ${CMAKE_THREAD_LIBS_INIT}) endif()
link_directories(${ThirdParty_Install_Dir}/lib) include(ExternalProject_CEREAL.cmake) include(ExternalProject_ACE.cmake) if(WIN32) # ERICEDIT: If the OS is Windows: file(COPY ${ThirdParty_Install_Dir}/lib/libACE.dll DESTINATION ${EXECUTABLE_OUTPUT_PATH}) # ERICEDIT: ACE needed for authserver. endif() if(BUILD_COX_MAP_VIEWER) include(ExternalProject_Lutefisk3D.cmake) endif() ######################################################################################## # Optional components ######################################################################################## if(ENABLE_SCRIPTING_ENGINE) include(ExternalProject_LUA.cmake) include(ExternalProject_SOL2.cmake) endif() if(ENABLE_TESTS) enable_testing() ExternalProject_Add( GMOCK_BUILD DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock URL http://googlemock.googlecode.com/files/gmock-1.6.0.zip UPDATE_COMMAND "" PATCH_COMMAND patch -N -t -p1 < ../gmock.patch SOURCE_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock INSTALL_DIR ${PROJECT_SOURCE_DIR}/3rd_party/ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ) set(GTest_LIBRARIES gtest gtest_main ${CMAKE_THREAD_LIBS_INIT}) endif()
Move ACE transfer to deeper CMakeList
Move ACE transfer to deeper CMakeList ACE will now be transferred to the output directory immediately after it is included in the project. This should prevent errors.
Text
bsd-3-clause
broxen/Segs,broxen/Segs,nemerle/Segs,broxen/Segs,nemerle/Segs,nemerle/Segs,Segs/Segs,Segs/Segs,Segs/Segs,Segs/Segs,Segs/Segs,broxen/Segs,broxen/Segs,nemerle/Segs,broxen/Segs,Segs/Segs,nemerle/Segs,nemerle/Segs,Segs/Segs,broxen/Segs,nemerle/Segs
text
## Code Before: link_directories(${ThirdParty_Install_Dir}/lib) include(ExternalProject_CEREAL.cmake) include(ExternalProject_ACE.cmake) if(BUILD_COX_MAP_VIEWER) include(ExternalProject_Lutefisk3D.cmake) endif() ######################################################################################## # Optional components ######################################################################################## if(ENABLE_SCRIPTING_ENGINE) include(ExternalProject_LUA.cmake) include(ExternalProject_SOL2.cmake) endif() if(ENABLE_TESTS) enable_testing() ExternalProject_Add( GMOCK_BUILD DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock URL http://googlemock.googlecode.com/files/gmock-1.6.0.zip UPDATE_COMMAND "" PATCH_COMMAND patch -N -t -p1 < ../gmock.patch SOURCE_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock INSTALL_DIR ${PROJECT_SOURCE_DIR}/3rd_party/ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ) set(GTest_LIBRARIES gtest gtest_main ${CMAKE_THREAD_LIBS_INIT}) endif() ## Instruction: Move ACE transfer to deeper CMakeList ACE will now be transferred to the output directory immediately after it is included in the project. This should prevent errors. ## Code After: link_directories(${ThirdParty_Install_Dir}/lib) include(ExternalProject_CEREAL.cmake) include(ExternalProject_ACE.cmake) if(WIN32) # ERICEDIT: If the OS is Windows: file(COPY ${ThirdParty_Install_Dir}/lib/libACE.dll DESTINATION ${EXECUTABLE_OUTPUT_PATH}) # ERICEDIT: ACE needed for authserver. endif() if(BUILD_COX_MAP_VIEWER) include(ExternalProject_Lutefisk3D.cmake) endif() ######################################################################################## # Optional components ######################################################################################## if(ENABLE_SCRIPTING_ENGINE) include(ExternalProject_LUA.cmake) include(ExternalProject_SOL2.cmake) endif() if(ENABLE_TESTS) enable_testing() ExternalProject_Add( GMOCK_BUILD DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock URL http://googlemock.googlecode.com/files/gmock-1.6.0.zip UPDATE_COMMAND "" PATCH_COMMAND patch -N -t -p1 < ../gmock.patch SOURCE_DIR ${PROJECT_SOURCE_DIR}/3rd_party/gmock INSTALL_DIR ${PROJECT_SOURCE_DIR}/3rd_party/ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> ) set(GTest_LIBRARIES gtest gtest_main ${CMAKE_THREAD_LIBS_INIT}) endif()
bea9a7858497e3e0dcbac8c10a734d15016710d4
SnailTests/UniqueTests.swift
SnailTests/UniqueTests.swift
// Copyright © 2017 Compass. All rights reserved. import Foundation import XCTest @testable import Snail class UniqueTests: XCTestCase { func testVariableChanges() { var events: [String?] = [] let subject = Unique<String?>(nil) subject.asObservable().subscribe( onNext: { string in events.append(string) } ) subject.value = nil subject.value = "1" subject.value = "2" subject.value = "2" subject.value = "2" XCTAssert(events[0] == "1") XCTAssert(events[1] == "2") XCTAssert(subject.value == "2") XCTAssert(events.count == 2) } func testVariableNotifiesOnSubscribe() { let subject = Unique("initial") subject.value = "new" var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual("new", result) } func testVariableNotifiesInitialOnSubscribe() { let subject = Unique<String?>(nil) var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual(nil, result) } }
// Copyright © 2017 Compass. All rights reserved. import Foundation import XCTest @testable import Snail class UniqueTests: XCTestCase { func testVariableChanges() { var events: [String?] = [] let subject = Unique<String?>(nil) subject.asObservable().subscribe( onNext: { string in events.append(string) } ) subject.value = nil subject.value = "1" subject.value = "2" subject.value = "2" subject.value = "2" XCTAssert(events[0] == "1") XCTAssert(events[1] == "2") XCTAssert(subject.value == "2") XCTAssert(events.count == 2) } func testVariableNotifiesOnSubscribe() { let subject = Unique("initial") subject.value = "new" var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual("new", result) } func testVariableNotifiesInitialOnSubscribe() { let subject = Unique<String?>(nil) var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual(nil, result) } func testVariableHandlesEquatableArrays() { var events: [[String]] = [] let subject = Unique<[String]>(["1", "2"]) subject.asObservable().subscribe( onNext: { array in events.append(array) } ) subject.value = ["1", "2"] subject.value = ["2", "1"] subject.value = ["2", "1"] subject.value = ["1", "2"] XCTAssert(events[0] == ["2", "1"]) XCTAssert(events[1] == ["1", "2"]) } }
Test Unique handles Equatable Arrays.
Test Unique handles Equatable Arrays.
Swift
mit
UrbanCompass/Snail,UrbanCompass/Snail,UrbanCompass/Snail,UrbanCompass/Snail
swift
## Code Before: // Copyright © 2017 Compass. All rights reserved. import Foundation import XCTest @testable import Snail class UniqueTests: XCTestCase { func testVariableChanges() { var events: [String?] = [] let subject = Unique<String?>(nil) subject.asObservable().subscribe( onNext: { string in events.append(string) } ) subject.value = nil subject.value = "1" subject.value = "2" subject.value = "2" subject.value = "2" XCTAssert(events[0] == "1") XCTAssert(events[1] == "2") XCTAssert(subject.value == "2") XCTAssert(events.count == 2) } func testVariableNotifiesOnSubscribe() { let subject = Unique("initial") subject.value = "new" var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual("new", result) } func testVariableNotifiesInitialOnSubscribe() { let subject = Unique<String?>(nil) var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual(nil, result) } } ## Instruction: Test Unique handles Equatable Arrays. ## Code After: // Copyright © 2017 Compass. All rights reserved. import Foundation import XCTest @testable import Snail class UniqueTests: XCTestCase { func testVariableChanges() { var events: [String?] = [] let subject = Unique<String?>(nil) subject.asObservable().subscribe( onNext: { string in events.append(string) } ) subject.value = nil subject.value = "1" subject.value = "2" subject.value = "2" subject.value = "2" XCTAssert(events[0] == "1") XCTAssert(events[1] == "2") XCTAssert(subject.value == "2") XCTAssert(events.count == 2) } func testVariableNotifiesOnSubscribe() { let subject = Unique("initial") subject.value = "new" var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual("new", result) } func testVariableNotifiesInitialOnSubscribe() { let subject = Unique<String?>(nil) var result: String? subject.asObservable().subscribe(onNext: { string in result = string }) XCTAssertEqual(nil, result) } func testVariableHandlesEquatableArrays() { var events: [[String]] = [] let subject = Unique<[String]>(["1", "2"]) subject.asObservable().subscribe( onNext: { array in events.append(array) } ) subject.value = ["1", "2"] subject.value = ["2", "1"] subject.value = ["2", "1"] subject.value = ["1", "2"] XCTAssert(events[0] == ["2", "1"]) XCTAssert(events[1] == ["1", "2"]) } }
11764092ee043286fd017da940c28df51a4eba00
client/js/directives/fancy-box-directive.js
client/js/directives/fancy-box-directive.js
"use strict"; angular.module("hikeio"). directive("fancybox", ["$rootScope", function($rootScope) { return { link: function (scope, element, attrs) { scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); scope.$on("fancyboxClose", function () { $.fancybox.close(); }); $(element).find(attrs.fancybox).fancybox({ afterLoad: function(current, previous) { $rootScope.$broadcast("fancyboxLoaded"); }, afterClose: function(current, previous) { $rootScope.$broadcast("fancyboxClosed"); }, padding : 2, nextEffect : "none", prevEffect : "none", closeEffect : "none", closeBtn : true, arrows : false, keys : true, nextClick : true }); } }; }]);
"use strict"; angular.module("hikeio"). directive("fancybox", ["$rootScope", function($rootScope) { return { link: function (scope, element, attrs) { var context = { afterLoad: function(current, previous) { $rootScope.$broadcast("fancyboxLoaded"); }, afterClose: function(current, previous) { $rootScope.$broadcast("fancyboxClosed"); }, padding : 2, nextEffect : "none", prevEffect : "none", closeEffect : "none", closeBtn : true, arrows : false, keys : true, nextClick : true }; scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); scope.$on("fancyboxClose", function () { $.fancybox.close(); }); scope.$on("$destroy", function () { context.afterLoad = null; context.afterClose = null; }); $(element).find(attrs.fancybox).fancybox(context); } }; }]);
Remove fancybox afterLoad / afterClose event on destroy.
Remove fancybox afterLoad / afterClose event on destroy.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
javascript
## Code Before: "use strict"; angular.module("hikeio"). directive("fancybox", ["$rootScope", function($rootScope) { return { link: function (scope, element, attrs) { scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); scope.$on("fancyboxClose", function () { $.fancybox.close(); }); $(element).find(attrs.fancybox).fancybox({ afterLoad: function(current, previous) { $rootScope.$broadcast("fancyboxLoaded"); }, afterClose: function(current, previous) { $rootScope.$broadcast("fancyboxClosed"); }, padding : 2, nextEffect : "none", prevEffect : "none", closeEffect : "none", closeBtn : true, arrows : false, keys : true, nextClick : true }); } }; }]); ## Instruction: Remove fancybox afterLoad / afterClose event on destroy. ## Code After: "use strict"; angular.module("hikeio"). directive("fancybox", ["$rootScope", function($rootScope) { return { link: function (scope, element, attrs) { var context = { afterLoad: function(current, previous) { $rootScope.$broadcast("fancyboxLoaded"); }, afterClose: function(current, previous) { $rootScope.$broadcast("fancyboxClosed"); }, padding : 2, nextEffect : "none", prevEffect : "none", closeEffect : "none", closeBtn : true, arrows : false, keys : true, nextClick : true }; scope.$on("$routeChangeStart", function () { $.fancybox.close(); }); scope.$on("fancyboxClose", function () { $.fancybox.close(); }); scope.$on("$destroy", function () { context.afterLoad = null; context.afterClose = null; }); $(element).find(attrs.fancybox).fancybox(context); } }; }]);
9149cf53879adbe6b8fe098e0efdecfd63cdd679
api/scripts.go
api/scripts.go
package api import "time" type ScriptsRequest struct { Args []string `json:"args,omitempty"` Files map[string]string `json:"files,omitempty"` CallbackURL string `json:"callback_url,omitempty"` } type ScriptsResponse struct { ID string `json:"id"` Script string `json:"script"` Args []string `json:"args"` CallbackURL string `json:"callback_url"` Status string `json:"status"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Duration string `json:"duration"` Output string `json:"output"` ExecLog string `json:"exec_log"` }
package api import "time" type ScriptsRequest struct { Args []string `json:"args,omitempty"` Files map[string]string `json:"files,omitempty"` CallbackURL string `json:"callback_url,omitempty"` } type ScriptsResponse struct { ID string `json:"id"` Script string `json:"script"` Args []string `json:"args"` Files map[string]string `json:"files,omitempty"` CallbackURL string `json:"callback_url"` Status string `json:"status"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Duration string `json:"duration"` Output string `json:"output"` ExecLog string `json:"exec_log"` }
Add files to the ScriptResponse
Add files to the ScriptResponse
Go
mit
pressly/qmd
go
## Code Before: package api import "time" type ScriptsRequest struct { Args []string `json:"args,omitempty"` Files map[string]string `json:"files,omitempty"` CallbackURL string `json:"callback_url,omitempty"` } type ScriptsResponse struct { ID string `json:"id"` Script string `json:"script"` Args []string `json:"args"` CallbackURL string `json:"callback_url"` Status string `json:"status"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Duration string `json:"duration"` Output string `json:"output"` ExecLog string `json:"exec_log"` } ## Instruction: Add files to the ScriptResponse ## Code After: package api import "time" type ScriptsRequest struct { Args []string `json:"args,omitempty"` Files map[string]string `json:"files,omitempty"` CallbackURL string `json:"callback_url,omitempty"` } type ScriptsResponse struct { ID string `json:"id"` Script string `json:"script"` Args []string `json:"args"` Files map[string]string `json:"files,omitempty"` CallbackURL string `json:"callback_url"` Status string `json:"status"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Duration string `json:"duration"` Output string `json:"output"` ExecLog string `json:"exec_log"` }
80ea64754169780009e82972ee354fd0f1b21bf6
lib/fathead/cppreference_doc/README.md
lib/fathead/cppreference_doc/README.md
Cppreference fathead plugin =========================== This is a fathead plugin for C++ standard library reference manual hosted at http://en.cppreference.com. Data source ----------- fetch.sh downloads and untars a snapshot of the website, which is available at http://en.cppreference.com/w/Cppreference:Archives. A new snapshot is released periodically. The location of the newest archive that is tested for DuckDuckGo is upload.cppreference.com/w/Cppreference:DDG-link?action=raw. Dependencies ------------ * python 3 * python 3 lxml
Cppreference Fathead =========================== This is a Fathead for C++ standard library reference manual hosted at http://en.cppreference.com. Data Source ----------- fetch.sh downloads and untars a snapshot of the website, which is available at http://en.cppreference.com/w/Cppreference:Archives. A new snapshot is released periodically. The location of the newest archive that is tested for DuckDuckGo is upload.cppreference.com/w/Cppreference:DDG-link?action=raw. This archive version maybe different from the latest public archive present at http://en.cppreference.com/w/Cppreference:Archives. The archive at upload.cppreference.com/w/Cppreference:DDG-link?action=raw is updated by linking to the most recent cppreference archive that someone actually tested to work, to ensure that the Fathead functionality does not accidentally break when new cppreference archives are released. The parsing script index2ddg.py as well as other scripts used by the parsing script are present in the repository: https://github.com/p12tic/cppreference-doc. Changes can be made by sending a pull request to this repository. Dependencies ------------ * python 3 * python 3 lxml
Update the readme file to mention where the parsing script is located
Update the readme file to mention where the parsing script is located
Markdown
apache-2.0
nikhilsingh291/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,nikhilsingh291/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,nikhilsingh291/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,nikhilsingh291/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,souravbadami/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,nikhilsingh291/zeroclickinfo-fathead,thinker3197/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,dankolbrs/zeroclickinfo-fathead,p12tic/zeroclickinfo-fathead,nikhilsingh291/zeroclickinfo-fathead,rasikapohankar/zeroclickinfo-fathead
markdown
## Code Before: Cppreference fathead plugin =========================== This is a fathead plugin for C++ standard library reference manual hosted at http://en.cppreference.com. Data source ----------- fetch.sh downloads and untars a snapshot of the website, which is available at http://en.cppreference.com/w/Cppreference:Archives. A new snapshot is released periodically. The location of the newest archive that is tested for DuckDuckGo is upload.cppreference.com/w/Cppreference:DDG-link?action=raw. Dependencies ------------ * python 3 * python 3 lxml ## Instruction: Update the readme file to mention where the parsing script is located ## Code After: Cppreference Fathead =========================== This is a Fathead for C++ standard library reference manual hosted at http://en.cppreference.com. Data Source ----------- fetch.sh downloads and untars a snapshot of the website, which is available at http://en.cppreference.com/w/Cppreference:Archives. A new snapshot is released periodically. The location of the newest archive that is tested for DuckDuckGo is upload.cppreference.com/w/Cppreference:DDG-link?action=raw. This archive version maybe different from the latest public archive present at http://en.cppreference.com/w/Cppreference:Archives. The archive at upload.cppreference.com/w/Cppreference:DDG-link?action=raw is updated by linking to the most recent cppreference archive that someone actually tested to work, to ensure that the Fathead functionality does not accidentally break when new cppreference archives are released. The parsing script index2ddg.py as well as other scripts used by the parsing script are present in the repository: https://github.com/p12tic/cppreference-doc. Changes can be made by sending a pull request to this repository. Dependencies ------------ * python 3 * python 3 lxml
0b102e86b552a982f08ae5a3ce1a22a594dd5bae
mbed_lib.json
mbed_lib.json
{ "name": "dataflash", "config": { "binary-size": { "help": "Configure device to use binary address space.", "value": "0" }, "dataflash-size": { "help": "Configure device to use DataFlash address space.", "value": "0" } } }
{ "name": "dataflash", "config": { "SPI_MOSI": "NC", "SPI_MISO": "NC", "SPI_CLK": "NC", "SPI_CS": "NC", "binary-size": { "help": "Configure device to use binary address space.", "value": "0" }, "dataflash-size": { "help": "Configure device to use DataFlash address space.", "value": "0" } } }
Add macros for default pin names
Add macros for default pin names
JSON
apache-2.0
kjbracey-arm/mbed,andcor02/mbed-os,betzw/mbed-os,betzw/mbed-os,c1728p9/mbed-os,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,kjbracey-arm/mbed,andcor02/mbed-os,betzw/mbed-os,c1728p9/mbed-os,betzw/mbed-os,c1728p9/mbed-os,betzw/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,mbedmicro/mbed,betzw/mbed-os,c1728p9/mbed-os,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,c1728p9/mbed-os,kjbracey-arm/mbed,c1728p9/mbed-os
json
## Code Before: { "name": "dataflash", "config": { "binary-size": { "help": "Configure device to use binary address space.", "value": "0" }, "dataflash-size": { "help": "Configure device to use DataFlash address space.", "value": "0" } } } ## Instruction: Add macros for default pin names ## Code After: { "name": "dataflash", "config": { "SPI_MOSI": "NC", "SPI_MISO": "NC", "SPI_CLK": "NC", "SPI_CS": "NC", "binary-size": { "help": "Configure device to use binary address space.", "value": "0" }, "dataflash-size": { "help": "Configure device to use DataFlash address space.", "value": "0" } } }
e86f85d57c75119237036047b72838c77e5551a4
src/travix/commands/CsCommand.hx
src/travix/commands/CsCommand.hx
package travix.commands; using StringTools; class CsCommand extends Command { override function execute() { if (!Travix.isWindows) if (tryToRun('mono', ['--version']).match(Failure(_, _))) { if(Travix.isLinux) { aptGet('mono-devel'); aptGet('mono-mcs'); } else { aptGet('mono'); } } var main = Travix.getMainClassLocalName(); installLib('hxcs'); build(['-cs', 'bin/cs/'], function () { if (Travix.isWindows) exec('bin\\cs\\bin\\$main.exe'); else exec('mono', ['bin/cs/bin/$main.exe']); }); } }
package travix.commands; class CsCommand extends Command { override function execute() { if (Travix.isMac) { aptGet('mono'); } else if (Travix.isLinux) { // http://www.mono-project.com/download/#download-lin exec('eval', ['sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF']); switch tryToRun('lsb_release', ['-cs']) { case Success('precise\n'): exec('eval', ['echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list']); case Success('trusty\n'): exec('eval', ['echo "deb http://download.mono-project.com/repo/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/mono-official.list']); case Success('xenial\n'): exec('eval', ['echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list']); default: } exec('eval', ['sudo apt-get update']); aptGet('mono-devel'); aptGet('mono-mcs'); // print the effective mono version exec('mono', ['-V']); } var main = Travix.getMainClassLocalName(); installLib('hxcs'); build(['-cs', 'bin/cs/'], function () { if (Travix.isWindows) exec('bin\\cs\\bin\\$main.exe'); else exec('mono', ['bin/cs/bin/$main.exe']); }); } }
Install newer mono version on Linux.
Install newer mono version on Linux. This solves compile-time error "error CS1061: Type `System.Text.StringBuilder' does not contain a definition for `Clear' and no extension method `Clear' of type `System.Text.StringBuilder' could be found. Are you missing an assembly reference?"
Haxe
unlicense
back2dos/travix,back2dos/travix,back2dos/travix
haxe
## Code Before: package travix.commands; using StringTools; class CsCommand extends Command { override function execute() { if (!Travix.isWindows) if (tryToRun('mono', ['--version']).match(Failure(_, _))) { if(Travix.isLinux) { aptGet('mono-devel'); aptGet('mono-mcs'); } else { aptGet('mono'); } } var main = Travix.getMainClassLocalName(); installLib('hxcs'); build(['-cs', 'bin/cs/'], function () { if (Travix.isWindows) exec('bin\\cs\\bin\\$main.exe'); else exec('mono', ['bin/cs/bin/$main.exe']); }); } } ## Instruction: Install newer mono version on Linux. This solves compile-time error "error CS1061: Type `System.Text.StringBuilder' does not contain a definition for `Clear' and no extension method `Clear' of type `System.Text.StringBuilder' could be found. Are you missing an assembly reference?" ## Code After: package travix.commands; class CsCommand extends Command { override function execute() { if (Travix.isMac) { aptGet('mono'); } else if (Travix.isLinux) { // http://www.mono-project.com/download/#download-lin exec('eval', ['sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF']); switch tryToRun('lsb_release', ['-cs']) { case Success('precise\n'): exec('eval', ['echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list']); case Success('trusty\n'): exec('eval', ['echo "deb http://download.mono-project.com/repo/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/mono-official.list']); case Success('xenial\n'): exec('eval', ['echo "deb http://download.mono-project.com/repo/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/mono-official.list']); default: } exec('eval', ['sudo apt-get update']); aptGet('mono-devel'); aptGet('mono-mcs'); // print the effective mono version exec('mono', ['-V']); } var main = Travix.getMainClassLocalName(); installLib('hxcs'); build(['-cs', 'bin/cs/'], function () { if (Travix.isWindows) exec('bin\\cs\\bin\\$main.exe'); else exec('mono', ['bin/cs/bin/$main.exe']); }); } }
a4b6a0d42ef0ee83b278d1a11ffd4a9bceded87e
.travis.yml
.travis.yml
language: php php: - 5.6 - hhvm script: - ./tests/lint.sh git: depth: 5
language: php php: - 5.6 - hhvm sudo: false script: - ./tests/lint.sh git: depth: 5
Use the container-based infrastructure on Travis
Use the container-based infrastructure on Travis
YAML
apache-2.0
duncan3dc/twitter,duncan3dc/twitter,duncan3dc/twitter,duncan3dc/twitter
yaml
## Code Before: language: php php: - 5.6 - hhvm script: - ./tests/lint.sh git: depth: 5 ## Instruction: Use the container-based infrastructure on Travis ## Code After: language: php php: - 5.6 - hhvm sudo: false script: - ./tests/lint.sh git: depth: 5
d52aff7693385dbe47a2903dc1d72f0d564427bd
spec/rules_checker_spec.rb
spec/rules_checker_spec.rb
require 'test_helper' require_relative '../lib/sandi_meter/rules_checker' describe SandiMeter::RulesChecker do let(:fail_conditions) do { first_rule: { small_classes_amount: 1, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end let(:succeed_conditions) do { first_rule: { small_classes_amount: 2, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end describe "#ok?" do it "returns false in any of conditions fail" do expect(SandiMeter::RulesChecker.new(fail_conditions)).to_not be_ok end it "returns true if all of conditions succeed" do expect(SandiMeter::RulesChecker.new(succeed_conditions)).to be_ok end end end
require 'test_helper' require_relative '../lib/sandi_meter/rules_checker' describe SandiMeter::RulesChecker do let(:fail_conditions) do { first_rule: { small_classes_amount: 1, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end let(:succeed_conditions) do { first_rule: { small_classes_amount: 2, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 0, total_controllers_amount: 0 } } end describe "#ok?" do it "returns false in any of conditions fail" do expect(SandiMeter::RulesChecker.new(fail_conditions)).to_not be_ok end it "returns true if all of conditions succeed" do expect(SandiMeter::RulesChecker.new(succeed_conditions)).to be_ok end end end
Test case for RulesChecker with 0 controllers
Test case for RulesChecker with 0 controllers
Ruby
mit
jgraber/sandi_meter,jgraber/sandi_meter,makaroni4/sandi_meter,makaroni4/sandi_meter,jgraber/sandi_meter,makaroni4/sandi_meter
ruby
## Code Before: require 'test_helper' require_relative '../lib/sandi_meter/rules_checker' describe SandiMeter::RulesChecker do let(:fail_conditions) do { first_rule: { small_classes_amount: 1, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end let(:succeed_conditions) do { first_rule: { small_classes_amount: 2, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end describe "#ok?" do it "returns false in any of conditions fail" do expect(SandiMeter::RulesChecker.new(fail_conditions)).to_not be_ok end it "returns true if all of conditions succeed" do expect(SandiMeter::RulesChecker.new(succeed_conditions)).to be_ok end end end ## Instruction: Test case for RulesChecker with 0 controllers ## Code After: require 'test_helper' require_relative '../lib/sandi_meter/rules_checker' describe SandiMeter::RulesChecker do let(:fail_conditions) do { first_rule: { small_classes_amount: 1, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end let(:succeed_conditions) do { first_rule: { small_classes_amount: 2, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 0, total_controllers_amount: 0 } } end describe "#ok?" do it "returns false in any of conditions fail" do expect(SandiMeter::RulesChecker.new(fail_conditions)).to_not be_ok end it "returns true if all of conditions succeed" do expect(SandiMeter::RulesChecker.new(succeed_conditions)).to be_ok end end end
7170ba00f19d09613f9b7d7577ff507d60ac246c
.travis.yml
.travis.yml
language: ruby rvm: - 1.9.3 - 2.0.0 - 2.1.0 - jruby-19mode - rbx-2 before_script: - export AWS_ACCESS_KEY_ID=foo - export AWS_SECRET_ACCESS_KEY=bar
language: ruby rvm: - 2.0.0 - 2.1.0 - rbx-2 before_script: - export AWS_ACCESS_KEY_ID=foo - export AWS_SECRET_ACCESS_KEY=bar
Remove JRuby and MRI 1.9.3 from Travis config
Remove JRuby and MRI 1.9.3 from Travis config
YAML
mit
yuhei-mukoyama/peddler,yasuhisa1984/peddler,VandyParks/peddler,jack0331/peddler,agerwick/peddler,parallel588/peddler,n8armstrong/peddler
yaml
## Code Before: language: ruby rvm: - 1.9.3 - 2.0.0 - 2.1.0 - jruby-19mode - rbx-2 before_script: - export AWS_ACCESS_KEY_ID=foo - export AWS_SECRET_ACCESS_KEY=bar ## Instruction: Remove JRuby and MRI 1.9.3 from Travis config ## Code After: language: ruby rvm: - 2.0.0 - 2.1.0 - rbx-2 before_script: - export AWS_ACCESS_KEY_ID=foo - export AWS_SECRET_ACCESS_KEY=bar
df21abecc49fbc05540218748d47717a81f7872c
dev-tools/idea/.idea/libraries/Solr_example_library.xml
dev-tools/idea/.idea/libraries/Solr_example_library.xml
<component name="libraryTable"> <library name="Solr example library"> <CLASSES> <root url="file://$PROJECT_DIR$/solr/example/lib" /> </CLASSES> <JAVADOC /> <SOURCES /> <jarDirectory url="file://$PROJECT_DIR$/solr/example/lib" recursive="true" /> </library> </component>
<component name="libraryTable"> <library name="Solr example library"> <CLASSES> <root url="file://$PROJECT_DIR$/solr/server/lib" /> </CLASSES> <JAVADOC /> <SOURCES /> <jarDirectory url="file://$PROJECT_DIR$/solr/server/lib" recursive="true" /> </library> </component>
Fix IDEA project settings after move to server.
SOLR-3619: Fix IDEA project settings after move to server. git-svn-id: 308d55f399f3bd9aa0560a10e81a003040006c48@1635833 13f79535-47bb-0310-9956-ffa450edef68
XML
apache-2.0
apache/solr,apache/solr,apache/solr,apache/solr,apache/solr
xml
## Code Before: <component name="libraryTable"> <library name="Solr example library"> <CLASSES> <root url="file://$PROJECT_DIR$/solr/example/lib" /> </CLASSES> <JAVADOC /> <SOURCES /> <jarDirectory url="file://$PROJECT_DIR$/solr/example/lib" recursive="true" /> </library> </component> ## Instruction: SOLR-3619: Fix IDEA project settings after move to server. git-svn-id: 308d55f399f3bd9aa0560a10e81a003040006c48@1635833 13f79535-47bb-0310-9956-ffa450edef68 ## Code After: <component name="libraryTable"> <library name="Solr example library"> <CLASSES> <root url="file://$PROJECT_DIR$/solr/server/lib" /> </CLASSES> <JAVADOC /> <SOURCES /> <jarDirectory url="file://$PROJECT_DIR$/solr/server/lib" recursive="true" /> </library> </component>
73240f018a14ad53e16f4e6c964b7b6090f574cb
vim/plugin/settings/yadr-search.vim
vim/plugin/settings/yadr-search.vim
" ================ Search Settings ================= set incsearch " Find the next match as we type the search set hlsearch " Hilight searches by default set viminfo='100,f1 " Save up to 100 marks, enable capital marks set ignorecase " Ignore case when searching... set smartcase " ...unless we type a capital set wrapscan " Search wrap the file " Using Perl/Python regex style by default when searching nnoremap / /\v vnoremap / /\v " Keep search matches in the middle of the window. nnoremap n nzzzv nnoremap N Nzzzv " Same when jumping around nnoremap g; g;zz nnoremap g, g,zz nnoremap <c-o> <c-o>zz
" ================ Search Settings ================= set incsearch " Find the next match as we type the search set hlsearch " Hilight searches by default set viminfo='100,f1 " Save up to 100 marks, enable capital marks set ignorecase " Ignore case when searching... set smartcase " ...unless we type a capital
Revert "Wrapping search. Perl regex while searching. Center search matches and jumps"
Revert "Wrapping search. Perl regex while searching. Center search matches and jumps" This caused strange issues like inability to properly search for ruby instance variables. This reverts commit 88dd66685af2ba85970d5100bb5c1a3135213228.
VimL
bsd-2-clause
neilor/dotfiles,bionix/dotfiles-1,fernandoaleman/yadr,michaeljacobdavis/dotfiles-yadr,aqibmushtaq/dotfiles,qianthinking/dotfiles,ofer987/dotfiles,stinoga/dotfiles-1,swanandp/dotfiles,sztupy/dotfiles,theone4ever/dotfiles,hulajesus/dotfiles,ccll/dotfiles,tigershen23/dotfiles,andreazevedo/mac_dotfiles,Xiaobin0860/dotfiles,koheku/dotfiles,rchampourlier/dotfiles,jby/dotfiles,minhoolee/skwp-dotfiles,nakolkin/dotfiles,kylewest/yadr,mrap/linux-dotfiles,epelz/dotfiles,eywalker/walkspace,drajguru/dotfiles,auser/yadr,giorni/dotfiles,ay65535/yadr,mba811/dotfiles,btroo/dotfiles,rockymontana/skwp-dotfiles,kylewest/yadr,tosbourn/dotfiles,skjerven/dotfiles,KonradJanica/yadr-tm,rchampourlier/dotfiles,nikolai-b/dotfiles,swinstanley/dotfiles-1,leiklier/dotfiles,captainmike/dotfiles,chenhoward/dotfiles,j-mcnally/dotfiles,svdberg/dotfiles,codedecay/dotfiles-1,akitaonrails/dotfiles,Witos/dotfiles,theone4ever/dotfiles,uhjish/dotfiles,davidjaw/dotfiles,giorni/dotfiles,atsapov/dotfiles,KonradJanica/yadr-tm,lfilho/dotfiles,Witos/dotfiles,c-j-j/dotfiles-yadr,GiorgioNatili/vim,wesson-yi/dotfiles,c-j-j/dotfiles-yadr,yjlintw/dotfiles,chenhoward/dotfiles,pulni/mac_dotfiles,gnpkrish/yadr,j-mcnally/dotfiles,ds82/dotfiles,uni380/dotfiles,phongjalvn/dotfiles,uhjish/dotfiles,SherrySeibel/dotfiles,talbright/skwp-dotfiles,swanandp/dotfiles,xvaara/dotfiles,argami/dotfiles,pulni/mac_dotfiles,kanche/dotfiles,gupta-tarun/dotfiles,ptgamr/dotfiles-2,rockwarrior/dotfiles,davidjaw/dotfiles,andreazevedo/mac_dotfiles,ktemkin/dotfiles,zelga/dotfiles,periodic1236/dotfiles,olslash/dotfiles,davepgreene/yadr,yjlintw/dotfiles,pswaminathan/dotfiles,tmullen/dotfiles,neilor/dotfiles,jameszaghini/dotfiles,kirthar/dotfiles,fongoses/dotfiles,skwp/dotfiles,lhrkkk/yadr,josanastrid/dotfiles,mente/dotfiles,diego-oliveira/dotfiles-1,rrmartins/my_yadr,davepgreene/yadr,plribeiro3000/dotfiles,fernandoaleman/yadr,wesleyskap/dotfiles-1,denyago/dotfiles,fogisland/dotfiles,lhrkkk/dotfiles_old_2015_11_01,sideci-sample/sideci-sample-dotfiles,zelga/dotfiles,leiklier/dotfiles,ernestonakamura/dotfiles,javigon/dotfiles,333fred/dotfiles_yadr,tigershen23/dotfiles,mcmonkeyman/mcmonkeymans-fork-o-dotfiles,romansalin/dotfiles,goorockey/dotfiles,walkleyn/dotfiles,qianthinking/dotfiles,marcvreuls/dotfiles,hophacker/dotfiles,tullie/yadr-tm,zhang-ning/yadr,tallamjr/yadr-fork,tokeryberg/dotfiles-2,kqyang/dotfiles,argyakrivos/dotfiles,andrewSC/dotfiles,ds82/dotfiles,mcmonkeyman/mcmonkeymans-fork-o-dotfiles,diego9627/dotfiles,michaeljacobdavis/dotfiles-yadr,valentinzberea/dotfiles-yadr,tallamjr/yadr-fork,bcrochet/dotfiles,aeikenberry/yardr_dotfiles,eesdil/yadr,josanastrid/dotfiles,fabiopelosin/dotfiles,skwp/dotfiles,rhysyngsun/dotfiles,sayar/dotfiles,agamble/dotfiles,uhjish/dotfiles,kqyang/dotfiles,mrap/dotfiles,ChrisMcKenzie/dotfiles,bobek/dotfiles,lhrkkk/yadr,333fred/dotfiles_yadr,sideci-sample/sideci-sample-dotfiles,tientun/dotfiles,Xiaobin0860/dotfiles,tmullen/dotfiles,flyingfsck/dotfiles,mdarnall/dotfiles,nkgm/dotfiles,LouTheBrew/dotfiles,akitaonrails/dotfiles,fayimora/vps_dotfiles,NikitaAvvakumov/dotfiles,pulni/mac_dotfiles,mente/dotfiles,olslash/dotfiles,backus/yadr,dsimmons/dotfiles-old,tripl3inf/dotfiles,Jojo-Jojovich/dotfiles,kierangraham/dotfiles,gizero/dotfiles,aeikenberry/yardr_dotfiles,1gitGrey/dotfiles-1,nkgm/dotfiles,joeyyang/yadr,sztupy/dotfiles,zhang-ning/yadr,cfabianski/yadr-dotfiles,romansalin/dotfiles,uhjish/dotfiles,hderms/dotfiles,neanias/dotfiles,mba811/dotfiles,codedecay/dotfiles-1,summera/yadr-alt,kdheepak89/yadr-dotfiles,demis001/dotfiles,ktemkin/dotfiles,auser/yadr,lyanderson/dotfiles,mente/dotfiles,minhoolee/skwp-dotfiles,juvoni/dotfiles-1,nrolland/dotfiles,dsimmons/dotfiles-old,phongjalvn/dotfiles,negativo/dotfiles-2,cantoraz/yadr,javigon/dotfiles,jo-tez/yadr,andyattebery/dotfiles,nikolai-b/dotfiles,fabiopelosin/dotfiles,jckdrpr/dotfiles-1,kirthar/dotfiles,lfilho/dotfiles,LouTheBrew/dotfiles,jby/dotfiles,tyok/dotfiles,andrewSC/dotfiles,ernestonakamura/dotfiles,pruan-rht/dotfiles,ashlynbaum/dotfiles,robinrob/framework,macat/dotfiles,tyok/dotfiles,yjlintw/dotfiles,uni380/dotfiles,bob2314/dotfiles-1,tullie/yadr-tm,41407/dotfiles,rrmartins/my_yadr,hderms/dotfiles,epelz/dotfiles,jf87/dotfiles-yadr,sevenadrian/dotfiles,tkuichooseyou/dotfiles,xytis/dotfiles,joesus/dotfiles,bcrochet/dotfiles,walkleyn/dotfiles,hulajesus/dotfiles,gnpkrish/yadr,backus/yadr,mpeter/dotfiles,ignasi/dotfiles,alex-wood/dotfiles,tonynguyen68/dotfiles,patarra/dotfiles,sevenadrian/dotfiles,zhenyuy-fb/dotfiles,tonynguyen68/dotfiles,uhjish/dotfiles,lfilho/dotfiles,bobek/dotfiles,trongrg/dotfiles,K3yChain/yadr,drajguru/dotfiles,ohnorobo/dotfiles,SherrySeibel/dotfiles,joesus/dotfiles,wesleyskap/dotfiles-1,Sumukh/dotfiles,kanche/dotfiles,marcvreuls/dotfiles,rockymontana/skwp-dotfiles,41407/dotfiles,andyattebery/dotfiles,daxgames/dotfiles,sandeepjain/dotfiles,eesdil/yadr,pruan-rht/dotfiles,NikitaAvvakumov/dotfiles,333fred/dotfiles_yadr,cfabianski/yadr-dotfiles,jo-tez/yadr,rhysyngsun/dotfiles,kqyang/dotfiles,rbrcurtis/yadr,sandeepjain/dotfiles,bionix/dotfiles-1,minhoolee/skwp-dotfiles,joeyyang/yadr,lhrkkk/yadr,katgironpe/dotfiles,nakolkin/dotfiles,kierangraham/dotfiles,hunterowens/dotfiles-2,wesson-yi/dotfiles,btroo/dotfiles,argami/dotfiles,trongrg/dotfiles,ashlynbaum/dotfiles,diego9627/dotfiles,thekindofme/dotfiles,tientun/dotfiles,summera/yadr-alt,talbright/skwp-dotfiles,tripl3inf/dotfiles,nyxwulf/dotfiles,juvoni/dotfiles-1,jckdrpr/dotfiles-1,xkonni/dotfiles,ramiroaraujo/dotfiles,skjerven/dotfiles,nrolland/dotfiles,wesson-yi/dotfiles,uhjish/dotfiles,fayimora/dotfiles,GiorgioNatili/vim,ignasi/dotfiles,pswaminathan/dotfiles,denyago/dotfiles,kerbyfc/kdr,gnpkrish/yadr,xytis/dotfiles,fogisland/dotfiles,stinoga/dotfiles-1,ay65535/yadr,agamble/dotfiles,rbrcurtis/yadr,gupta-tarun/dotfiles,thekindofme/dotfiles,svdberg/dotfiles,xytis/dotfiles,skjerven/dotfiles,atsapov/dotfiles,ChrisMcKenzie/dotfiles,goorockey/dotfiles,cantoraz/yadr,brazencavalier/dotfiles,lhrkkk/yadr,kierangraham/dotfiles,daxgames/dotfiles,ofer987/dotfiles,ccll/dotfiles,flyingfsck/dotfiles,zhenyuy-fb/dotfiles,ohnorobo/dotfiles,ptgamr/dotfiles-2,gizero/dotfiles,kierangraham/dotfiles,argyakrivos/dotfiles,sangtt/mdotfiles,uhjish/dotfiles,diego-oliveira/dotfiles-1,minhoolee/skwp-dotfiles,Sumukh/dotfiles,jameszaghini/dotfiles,xkonni/dotfiles,1gitGrey/dotfiles-1,uhjish/dotfiles,hunterowens/dotfiles-2,jf87/dotfiles-yadr,patarra/dotfiles,mdarnall/dotfiles,mrap/linux-dotfiles,ttriggs/dotfiles,nyxwulf/dotfiles,kerbyfc/kdr,eywalker/walkspace,stevenbarragan/dotfiles,hunterowens/dotfiles-2,pairshaped/dotfiles,kerbyfc/kdr,ChrisMcKenzie/dotfiles,qianthinking/dotfiles,tosbourn/dotfiles,xvaara/dotfiles,phongjalvn/dotfiles,RyanMacG/dotfiles-1,koheku/dotfiles,alex-wood/dotfiles,swinstanley/dotfiles-1,jckdrpr/dotfiles-1,sangtt/mdotfiles,eesdil/yadr,ds82/dotfiles,fayimora/vps_dotfiles,ashlynbaum/dotfiles,bob2314/dotfiles-1,andrewSC/dotfiles,neanias/dotfiles,raiseandfall/vim-tmux-dotfiles,mrap/dotfiles,katgironpe/dotfiles,lhrkkk/dotfiles_old_2015_11_01,fongoses/dotfiles,ttriggs/dotfiles,plribeiro3000/dotfiles,martco/yadr,captainmike/dotfiles,brazencavalier/dotfiles,lyanderson/dotfiles,K3yChain/yadr,raiseandfall/vim-tmux-dotfiles,tkuichooseyou/dotfiles,aqibmushtaq/dotfiles,robinrob/framework,valentinzberea/dotfiles-yadr,hophacker/dotfiles,ramiroaraujo/dotfiles,demis001/dotfiles,periodic1236/dotfiles,martco/yadr,RyanMacG/dotfiles-1,pairshaped/dotfiles,kdheepak89/yadr-dotfiles,sayar/dotfiles,stevenbarragan/dotfiles,uhjish/dotfiles,fayimora/vps_dotfiles,fayimora/dotfiles,nyxwulf/dotfiles,tokeryberg/dotfiles-2,tyok/dotfiles,rockwarrior/dotfiles,negativo/dotfiles-2,Jojo-Jojovich/dotfiles,mpeter/dotfiles
viml
## Code Before: " ================ Search Settings ================= set incsearch " Find the next match as we type the search set hlsearch " Hilight searches by default set viminfo='100,f1 " Save up to 100 marks, enable capital marks set ignorecase " Ignore case when searching... set smartcase " ...unless we type a capital set wrapscan " Search wrap the file " Using Perl/Python regex style by default when searching nnoremap / /\v vnoremap / /\v " Keep search matches in the middle of the window. nnoremap n nzzzv nnoremap N Nzzzv " Same when jumping around nnoremap g; g;zz nnoremap g, g,zz nnoremap <c-o> <c-o>zz ## Instruction: Revert "Wrapping search. Perl regex while searching. Center search matches and jumps" This caused strange issues like inability to properly search for ruby instance variables. This reverts commit 88dd66685af2ba85970d5100bb5c1a3135213228. ## Code After: " ================ Search Settings ================= set incsearch " Find the next match as we type the search set hlsearch " Hilight searches by default set viminfo='100,f1 " Save up to 100 marks, enable capital marks set ignorecase " Ignore case when searching... set smartcase " ...unless we type a capital
24a3133ab914400c16179b12371ae4ea9b886fd9
tools/git/update-dev_tools.sh
tools/git/update-dev_tools.sh
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" source "${SCRIPT_DIR}/../dev_tools/git/subtree-utils.sh" pull tools/dev_tools [email protected]:salilab/developer_tools.git master
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" source "${SCRIPT_DIR}/../dev_tools/git/subtree-utils.sh" pull tools/dev_tools [email protected]:salilab/developer_tools.git master salilab/developer_tools
Add new arguments to subtree-update script.
Add new arguments to subtree-update script.
Shell
apache-2.0
salilab/rmf,salilab/rmf,salilab/rmf,salilab/rmf
shell
## Code Before: SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" source "${SCRIPT_DIR}/../dev_tools/git/subtree-utils.sh" pull tools/dev_tools [email protected]:salilab/developer_tools.git master ## Instruction: Add new arguments to subtree-update script. ## Code After: SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" source "${SCRIPT_DIR}/../dev_tools/git/subtree-utils.sh" pull tools/dev_tools [email protected]:salilab/developer_tools.git master salilab/developer_tools
ea79df2314afc4bf8e2747800120a7d5d005ece7
reviewboard/notifications/templatetags/markdown_email.py
reviewboard/notifications/templatetags/markdown_email.py
from __future__ import unicode_literals import markdown from django import template from django.utils.safestring import mark_safe from djblets.markdown import markdown_unescape register = template.Library() @register.filter def markdown_email_html(text, is_rich_text): if not is_rich_text: return text # We use XHTML1 instead of HTML5 to ensure the results can be parsed by # an XML parser. This is actually needed for the main Markdown renderer # for the web UI, but consistency is good here. return mark_safe(markdown.markdown( text, output_format='xhtml1', extensions=[ 'markdown.extensions.fenced_code', 'markdown.extensions.codehilite', 'markdown.extensions.tables', 'pymdownx.tilde', 'djblets.markdown.extensions.escape_html', 'djblets.markdown.extensions.wysiwyg_email', ], extension_configs={ 'codehilite': { 'noclasses': True, }, })) @register.filter def markdown_email_text(text, is_rich_text): if not is_rich_text: return text return markdown_unescape(text)
from __future__ import unicode_literals import markdown from django import template from django.utils.safestring import mark_safe from djblets.markdown import markdown_unescape register = template.Library() @register.filter def markdown_email_html(text, is_rich_text): if not is_rich_text: return text # We use XHTML1 instead of HTML5 to ensure the results can be parsed by # an XML parser. This is actually needed for the main Markdown renderer # for the web UI, but consistency is good here. return mark_safe(markdown.markdown( text, output_format='xhtml1', extensions=[ 'markdown.extensions.fenced_code', 'markdown.extensions.codehilite', 'markdown.extensions.tables', 'markdown.extensions.sane_lists', 'markdown.extensions.smart_strong', 'pymdownx.tilde', 'djblets.markdown.extensions.escape_html', 'djblets.markdown.extensions.wysiwyg_email', ], extension_configs={ 'codehilite': { 'noclasses': True, }, })) @register.filter def markdown_email_text(text, is_rich_text): if not is_rich_text: return text return markdown_unescape(text)
Add a couple missing Markdown extensions for e-mail rendering.
Add a couple missing Markdown extensions for e-mail rendering. The Markdown e-mail rendering code wasn't correctly rendering lists or strings with double-underscores separating words, due to missing a couple of extensions. This adds those missing extensions, bringing some consistency. Testing Done: Tested the e-mail previews before and after this change. Saw that the Markdown had rendered incorrectly before in these cases, but rendered correctly after. Reviewed at https://reviews.reviewboard.org/r/8992/
Python
mit
reviewboard/reviewboard,chipx86/reviewboard,chipx86/reviewboard,brennie/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,brennie/reviewboard,brennie/reviewboard,reviewboard/reviewboard,brennie/reviewboard,chipx86/reviewboard
python
## Code Before: from __future__ import unicode_literals import markdown from django import template from django.utils.safestring import mark_safe from djblets.markdown import markdown_unescape register = template.Library() @register.filter def markdown_email_html(text, is_rich_text): if not is_rich_text: return text # We use XHTML1 instead of HTML5 to ensure the results can be parsed by # an XML parser. This is actually needed for the main Markdown renderer # for the web UI, but consistency is good here. return mark_safe(markdown.markdown( text, output_format='xhtml1', extensions=[ 'markdown.extensions.fenced_code', 'markdown.extensions.codehilite', 'markdown.extensions.tables', 'pymdownx.tilde', 'djblets.markdown.extensions.escape_html', 'djblets.markdown.extensions.wysiwyg_email', ], extension_configs={ 'codehilite': { 'noclasses': True, }, })) @register.filter def markdown_email_text(text, is_rich_text): if not is_rich_text: return text return markdown_unescape(text) ## Instruction: Add a couple missing Markdown extensions for e-mail rendering. The Markdown e-mail rendering code wasn't correctly rendering lists or strings with double-underscores separating words, due to missing a couple of extensions. This adds those missing extensions, bringing some consistency. Testing Done: Tested the e-mail previews before and after this change. Saw that the Markdown had rendered incorrectly before in these cases, but rendered correctly after. Reviewed at https://reviews.reviewboard.org/r/8992/ ## Code After: from __future__ import unicode_literals import markdown from django import template from django.utils.safestring import mark_safe from djblets.markdown import markdown_unescape register = template.Library() @register.filter def markdown_email_html(text, is_rich_text): if not is_rich_text: return text # We use XHTML1 instead of HTML5 to ensure the results can be parsed by # an XML parser. This is actually needed for the main Markdown renderer # for the web UI, but consistency is good here. return mark_safe(markdown.markdown( text, output_format='xhtml1', extensions=[ 'markdown.extensions.fenced_code', 'markdown.extensions.codehilite', 'markdown.extensions.tables', 'markdown.extensions.sane_lists', 'markdown.extensions.smart_strong', 'pymdownx.tilde', 'djblets.markdown.extensions.escape_html', 'djblets.markdown.extensions.wysiwyg_email', ], extension_configs={ 'codehilite': { 'noclasses': True, }, })) @register.filter def markdown_email_text(text, is_rich_text): if not is_rich_text: return text return markdown_unescape(text)
db01563beea08dacb8e8ddacf8603623b2014514
Util/Profiler/TokenFinder.php
Util/Profiler/TokenFinder.php
<?php namespace Lexik\Bundle\TranslationBundle\Util\Profiler; use Symfony\Component\HttpKernel\Profiler\Profiler; /** * @author Cédric Girard <[email protected]> */ class TokenFinder { /** * @var Profiler */ private $profiler; /** * @var int */ private $defaultLimit; /** * @param Profiler $profiler * @param int $defaultLimit */ public function __construct(?Profiler $profiler, $defaultLimit) { $this->profiler = $profiler; $this->defaultLimit = $defaultLimit; } /** * @param string $ip * @param string $url * @param int $limit * @param string $method * @param string $start * @param string $end * @return array */ public function find($ip = null, $url = null, $limit = null, $method = null, $start = null, $end = null) { if ($this->profiler === null) { return []; } $limit = $limit ?: $this->defaultLimit; return $this->profiler->find($ip, $url, $limit, $method, $start, $end); } }
<?php namespace Lexik\Bundle\TranslationBundle\Util\Profiler; use Symfony\Component\HttpKernel\Profiler\Profiler; /** * @author Cédric Girard <[email protected]> */ class TokenFinder { /** * @var Profiler */ private $profiler; /** * @var int */ private $defaultLimit; /** * @param Profiler $profiler * @param int $defaultLimit */ public function __construct(Profiler $profiler, $defaultLimit) { $this->profiler = $profiler; $this->defaultLimit = $defaultLimit; } /** * @param string $ip * @param string $url * @param int $limit * @param string $method * @param string $start * @param string $end * @return array */ public function find($ip = null, $url = null, $limit = null, $method = null, $start = null, $end = null) { $limit = $limit ?: $this->defaultLimit; return $this->profiler->find($ip, $url, $limit, $method, $start, $end); } }
Revert Profiler as optional dependency
Revert Profiler as optional dependency
PHP
mit
lexik/LexikTranslationBundle,lexik/LexikTranslationBundle
php
## Code Before: <?php namespace Lexik\Bundle\TranslationBundle\Util\Profiler; use Symfony\Component\HttpKernel\Profiler\Profiler; /** * @author Cédric Girard <[email protected]> */ class TokenFinder { /** * @var Profiler */ private $profiler; /** * @var int */ private $defaultLimit; /** * @param Profiler $profiler * @param int $defaultLimit */ public function __construct(?Profiler $profiler, $defaultLimit) { $this->profiler = $profiler; $this->defaultLimit = $defaultLimit; } /** * @param string $ip * @param string $url * @param int $limit * @param string $method * @param string $start * @param string $end * @return array */ public function find($ip = null, $url = null, $limit = null, $method = null, $start = null, $end = null) { if ($this->profiler === null) { return []; } $limit = $limit ?: $this->defaultLimit; return $this->profiler->find($ip, $url, $limit, $method, $start, $end); } } ## Instruction: Revert Profiler as optional dependency ## Code After: <?php namespace Lexik\Bundle\TranslationBundle\Util\Profiler; use Symfony\Component\HttpKernel\Profiler\Profiler; /** * @author Cédric Girard <[email protected]> */ class TokenFinder { /** * @var Profiler */ private $profiler; /** * @var int */ private $defaultLimit; /** * @param Profiler $profiler * @param int $defaultLimit */ public function __construct(Profiler $profiler, $defaultLimit) { $this->profiler = $profiler; $this->defaultLimit = $defaultLimit; } /** * @param string $ip * @param string $url * @param int $limit * @param string $method * @param string $start * @param string $end * @return array */ public function find($ip = null, $url = null, $limit = null, $method = null, $start = null, $end = null) { $limit = $limit ?: $this->defaultLimit; return $this->profiler->find($ip, $url, $limit, $method, $start, $end); } }
a66f6322df61e77def496d1b8ec6328714edfb3b
decimate.cfg
decimate.cfg
import decimate.projects from decimate.projects.svn import * from decimate.projects.ant import * from decimate.projects.statuspublishing import * from decimate.projects.otherbuilds import * from decimate.projects.emailnotify import * from decimate.projects.filespublishing import * from decimate.projects.junitpublishingant import * from decimate.projects.cfl import * import os import re import glob baseSvnPath = "reviki/branches/dsl" svnUrls = ["http://svn.reviki.org/svn/" + baseSvnPath] class RevikiProject(StatusPublishingProject): name = "Reviki" category = "3rd Party" def getTestConfigurations(self): return [ BuildDist("Build", platform = "linux2", jdk = "1.5"), ] class BuildDist(StatusPublishingTestConfiguration, SvnTestConfiguration, EmailTestConfiguration, JUnitPublishingAntTestConfiguration, AntTestConfiguration, ExpiringArchiveTestConfiguration): svnUrls = svnUrls antTargets = [(baseSvnPath, "unit-tests"), (baseSvnPath, "war")] emailAddresses = ['[email protected]'] publishFilesBase = baseSvnPath publishFiles = ["*.war"] xmlJUnitResultsPatterns = [os.path.join(baseSvnPath, 'reports', '*.xml')]
import decimate.projects from decimate.projects.svn import * from decimate.projects.ant import * from decimate.projects.statuspublishing import * from decimate.projects.otherbuilds import * from decimate.projects.emailnotify import * from decimate.projects.filespublishing import * from decimate.projects.junitpublishingant import * from decimate.projects.cfl import * import os import re import glob emailAddresses = ["[email protected]"] baseSvnPath = "reviki/branches/dsl" svnUrls = ["http://svn.reviki.org/svn/" + baseSvnPath] class RevikiProject(StatusPublishingProject): name = "Reviki" category = "3rd Party" provides = {"default": "Build"} def getTestConfigurations(self): return [ BuildDist("Build", platform = "linux2", jdk = "1.5"), ] class BuildDist(StatusPublishingTestConfiguration, SvnTestConfiguration, EmailTestConfiguration, JUnitPublishingAntTestConfiguration, AntTestConfiguration, ExpiringArchiveTestConfiguration): svnUrls = svnUrls antTargets = [(baseSvnPath, "unit-tests"), (baseSvnPath, "war")] emailAddresses = emailAddresses publishFilesBase = baseSvnPath publishFiles = ["*.war"] xmlJUnitResultsPatterns = [os.path.join(baseSvnPath, "reports", "*.xml")]
Add 'provides'. Pull out emailAddresses. Consistent quote style.
Add 'provides'. Pull out emailAddresses. Consistent quote style.
INI
apache-2.0
paulcadman/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,strr/reviki,paulcadman/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,paulcadman/reviki,CoreFiling/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,ashirley/reviki,ashirley/reviki,CoreFiling/reviki,paulcadman/reviki
ini
## Code Before: import decimate.projects from decimate.projects.svn import * from decimate.projects.ant import * from decimate.projects.statuspublishing import * from decimate.projects.otherbuilds import * from decimate.projects.emailnotify import * from decimate.projects.filespublishing import * from decimate.projects.junitpublishingant import * from decimate.projects.cfl import * import os import re import glob baseSvnPath = "reviki/branches/dsl" svnUrls = ["http://svn.reviki.org/svn/" + baseSvnPath] class RevikiProject(StatusPublishingProject): name = "Reviki" category = "3rd Party" def getTestConfigurations(self): return [ BuildDist("Build", platform = "linux2", jdk = "1.5"), ] class BuildDist(StatusPublishingTestConfiguration, SvnTestConfiguration, EmailTestConfiguration, JUnitPublishingAntTestConfiguration, AntTestConfiguration, ExpiringArchiveTestConfiguration): svnUrls = svnUrls antTargets = [(baseSvnPath, "unit-tests"), (baseSvnPath, "war")] emailAddresses = ['[email protected]'] publishFilesBase = baseSvnPath publishFiles = ["*.war"] xmlJUnitResultsPatterns = [os.path.join(baseSvnPath, 'reports', '*.xml')] ## Instruction: Add 'provides'. Pull out emailAddresses. Consistent quote style. ## Code After: import decimate.projects from decimate.projects.svn import * from decimate.projects.ant import * from decimate.projects.statuspublishing import * from decimate.projects.otherbuilds import * from decimate.projects.emailnotify import * from decimate.projects.filespublishing import * from decimate.projects.junitpublishingant import * from decimate.projects.cfl import * import os import re import glob emailAddresses = ["[email protected]"] baseSvnPath = "reviki/branches/dsl" svnUrls = ["http://svn.reviki.org/svn/" + baseSvnPath] class RevikiProject(StatusPublishingProject): name = "Reviki" category = "3rd Party" provides = {"default": "Build"} def getTestConfigurations(self): return [ BuildDist("Build", platform = "linux2", jdk = "1.5"), ] class BuildDist(StatusPublishingTestConfiguration, SvnTestConfiguration, EmailTestConfiguration, JUnitPublishingAntTestConfiguration, AntTestConfiguration, ExpiringArchiveTestConfiguration): svnUrls = svnUrls antTargets = [(baseSvnPath, "unit-tests"), (baseSvnPath, "war")] emailAddresses = emailAddresses publishFilesBase = baseSvnPath publishFiles = ["*.war"] xmlJUnitResultsPatterns = [os.path.join(baseSvnPath, "reports", "*.xml")]
41b3913f48846ece823db5cde9a193bc3bce465b
src/com/namelessmc/NamelessAPI/Notification.java
src/com/namelessmc/NamelessAPI/Notification.java
package com.namelessmc.NamelessAPI; public class Notification { private String message; private String url; private NotificationType type; public Notification(String message, String url, NotificationType type) { this.message = message; this.url = url; this.type = type; } public String getMessage() { return message; } public String getUrl() { return url; } public NotificationType getType() { return type; } public static enum NotificationType { TAG, MESSAGE, LIKE, PROFILE_COMMENT, COMMENT_REPLY, THREAD_REPLY, FOLLOW; public static NotificationType fromString(String string) { return NotificationType.valueOf(string.replace('-', '_').toUpperCase()); } } }
package com.namelessmc.NamelessAPI; public class Notification { private final String message; private final String url; private final NotificationType type; public Notification(final String message, final String url, final NotificationType type) { this.message = message; this.url = url; this.type = type; } public String getMessage() { return this.message; } public String getUrl() { return this.url; } public NotificationType getType() { return this.type; } public static enum NotificationType { TAG, MESSAGE, LIKE, PROFILE_COMMENT, COMMENT_REPLY, THREAD_REPLY, FOLLOW, UNKNOWN; public static NotificationType fromString(final String string) { try { return NotificationType.valueOf(string.replace('-', '_').toUpperCase()); } catch (final IllegalArgumentException e) { return NotificationType.UNKNOWN; } } } }
Add fallback "UNKNOWN" notification type
Add fallback "UNKNOWN" notification type
Java
mit
NamelessMC/Nameless-Plugin-API,NamelessMC/Nameless-Java-API
java
## Code Before: package com.namelessmc.NamelessAPI; public class Notification { private String message; private String url; private NotificationType type; public Notification(String message, String url, NotificationType type) { this.message = message; this.url = url; this.type = type; } public String getMessage() { return message; } public String getUrl() { return url; } public NotificationType getType() { return type; } public static enum NotificationType { TAG, MESSAGE, LIKE, PROFILE_COMMENT, COMMENT_REPLY, THREAD_REPLY, FOLLOW; public static NotificationType fromString(String string) { return NotificationType.valueOf(string.replace('-', '_').toUpperCase()); } } } ## Instruction: Add fallback "UNKNOWN" notification type ## Code After: package com.namelessmc.NamelessAPI; public class Notification { private final String message; private final String url; private final NotificationType type; public Notification(final String message, final String url, final NotificationType type) { this.message = message; this.url = url; this.type = type; } public String getMessage() { return this.message; } public String getUrl() { return this.url; } public NotificationType getType() { return this.type; } public static enum NotificationType { TAG, MESSAGE, LIKE, PROFILE_COMMENT, COMMENT_REPLY, THREAD_REPLY, FOLLOW, UNKNOWN; public static NotificationType fromString(final String string) { try { return NotificationType.valueOf(string.replace('-', '_').toUpperCase()); } catch (final IllegalArgumentException e) { return NotificationType.UNKNOWN; } } } }
7264b416e2970f3eb817ec6a1679cdf15d2f1796
pipelines/infrastructure.yml
pipelines/infrastructure.yml
groups: - name: infrastructure jobs: - deploy-mega-ci-bosh resources: - name: deployments-runtime type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/deployments-runtime.git - name: mega-test type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-test.git - name: mega-ci type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-ci.git jobs: - name: deploy-mega-ci-bosh plan: - aggregate: - get: deployments-runtime - get: mega-test - get: mega-ci - task: deploy-bosh file: mega-ci/scripts/ci/deploy-bosh.yml config: params: DEPLOYMENT_DIR: 'mega-test' PATH_TO_PASSWORDS_STUB: 'stubs/bosh/passwords_stub.yml'
groups: - name: infrastructure jobs: - deploy-mega-ci-bosh resources: - name: deployments-runtime type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/deployments-runtime.git - name: mega-test type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-test.git - name: mega-ci type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-ci.git jobs: - name: deploy-mega-ci-bosh plan: - aggregate: - get: deployments-runtime - get: mega-test - get: mega-ci - task: deploy-bosh file: mega-ci/scripts/ci/deploy-bosh.yml config: params: DEPLOYMENT_DIR: 'mega-test' PATH_TO_PASSWORDS_STUB: 'stubs/bosh/bosh_passwords.yml'
Update location of bosh password stub
Update location of bosh password stub
YAML
apache-2.0
cloudfoundry/mega-ci,cloudfoundry/mega-ci
yaml
## Code Before: groups: - name: infrastructure jobs: - deploy-mega-ci-bosh resources: - name: deployments-runtime type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/deployments-runtime.git - name: mega-test type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-test.git - name: mega-ci type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-ci.git jobs: - name: deploy-mega-ci-bosh plan: - aggregate: - get: deployments-runtime - get: mega-test - get: mega-ci - task: deploy-bosh file: mega-ci/scripts/ci/deploy-bosh.yml config: params: DEPLOYMENT_DIR: 'mega-test' PATH_TO_PASSWORDS_STUB: 'stubs/bosh/passwords_stub.yml' ## Instruction: Update location of bosh password stub ## Code After: groups: - name: infrastructure jobs: - deploy-mega-ci-bosh resources: - name: deployments-runtime type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/deployments-runtime.git - name: mega-test type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-test.git - name: mega-ci type: git source: branch: master private_key: {{private_key}} uri: [email protected]:cloudfoundry/mega-ci.git jobs: - name: deploy-mega-ci-bosh plan: - aggregate: - get: deployments-runtime - get: mega-test - get: mega-ci - task: deploy-bosh file: mega-ci/scripts/ci/deploy-bosh.yml config: params: DEPLOYMENT_DIR: 'mega-test' PATH_TO_PASSWORDS_STUB: 'stubs/bosh/bosh_passwords.yml'
5aa823aeef2ca87e2bef4cc4dac1d5cbd68d729d
scripts/commands/orgs/index.bash
scripts/commands/orgs/index.bash
awscli organizations list-accounts --output table --query "sort_by(Accounts,&Name)[$(auto_filter Name Id Status Email -- $@)].{\"1.Name\":Name,\"2.Id\":Id,\"3.Status\":Status,\"4.Email\":Email}"
awscli organizations list-accounts --output table --query "sort_by(Accounts,&Name)[$(auto_filter Name Id Status Email JoinedMethod JoinedTimestamp -- $@)].{\"1.Name\":Name,\"2.Id\":Id,\"3.Status\":Status,\"4.Email\":Email,\"5.JoinedVia\":JoinedMethod,\"6.Joined\":JoinedTimestamp}"
Add joined data to orgs
Add joined data to orgs
Shell
mit
flomotlik/awsinfo,flomotlik/awsinfo
shell
## Code Before: awscli organizations list-accounts --output table --query "sort_by(Accounts,&Name)[$(auto_filter Name Id Status Email -- $@)].{\"1.Name\":Name,\"2.Id\":Id,\"3.Status\":Status,\"4.Email\":Email}" ## Instruction: Add joined data to orgs ## Code After: awscli organizations list-accounts --output table --query "sort_by(Accounts,&Name)[$(auto_filter Name Id Status Email JoinedMethod JoinedTimestamp -- $@)].{\"1.Name\":Name,\"2.Id\":Id,\"3.Status\":Status,\"4.Email\":Email,\"5.JoinedVia\":JoinedMethod,\"6.Joined\":JoinedTimestamp}"
6583495d10bf15f68fd861f725bf8073e4b26a33
tests/testthat/kitchen/execution-introspection.graphql
tests/testthat/kitchen/execution-introspection.graphql
query IntrospectionQuery { __schema { queryType { name } mutationType { name } # subscriptionType { name } types { ...FullType } directives { name description args { ...InputValue } locations } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } } }
query IntrospectionQuery { __schema { queryType { name } mutationType { name } # subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } }
Update introspection query from graphql-js
Update introspection query from graphql-js
GraphQL
mit
schloerke/graphqlr,schloerke/graphqlr,schloerke/graphqlr
graphql
## Code Before: query IntrospectionQuery { __schema { queryType { name } mutationType { name } # subscriptionType { name } types { ...FullType } directives { name description args { ...InputValue } locations } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } } } ## Instruction: Update introspection query from graphql-js ## Code After: query IntrospectionQuery { __schema { queryType { name } mutationType { name } # subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } }
63bfd706d40c35b14fd852ff1efa8e0eb6237f08
RNTester/js/examples/XHR/XHRExampleAbortController.js
RNTester/js/examples/XHR/XHRExampleAbortController.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const {Alert, Button, View} = require('react-native'); class XHRExampleAbortController extends React.Component<{...}, {...}> { _timeout: any; _submit(abortDelay) { clearTimeout(this._timeout); // eslint-disable-next-line no-undef const abortController = new AbortController(); fetch('https://facebook.github.io/react-native/', { signal: abortController.signal, }) .then(res => res.text()) .then(res => Alert.alert(res)) .catch(err => Alert.alert(err.message)); this._timeout = setTimeout(() => { abortController.abort(); }, abortDelay); } componentWillUnmount() { clearTimeout(this._timeout); } render(): React.Node { return ( <View> <Button title="Abort before response" onPress={() => { this._submit(0); }} /> <Button title="Abort after response" onPress={() => { this._submit(5000); }} /> </View> ); } } module.exports = XHRExampleAbortController;
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const {Alert, Button, View} = require('react-native'); class XHRExampleAbortController extends React.Component<{...}, {...}> { _timeout: any; _submit(abortDelay) { clearTimeout(this._timeout); const abortController = new global.AbortController(); fetch('https://facebook.github.io/react-native/', { signal: abortController.signal, }) .then(res => res.text()) .then(res => Alert.alert(res)) .catch(err => Alert.alert(err.message)); this._timeout = setTimeout(() => { abortController.abort(); }, abortDelay); } componentWillUnmount() { clearTimeout(this._timeout); } render(): React.Node { return ( <View> <Button title="Abort before response" onPress={() => { this._submit(0); }} /> <Button title="Abort after response" onPress={() => { this._submit(5000); }} /> </View> ); } } module.exports = XHRExampleAbortController;
Move eslint-disable no-undef to a global comment
Move eslint-disable no-undef to a global comment Summary: Switch the only `// eslint-disable no-undef` to defined the global instead so that the new babel-eslint-no-undef compile time check doesn't need to understand inline eslint comments. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18644590 fbshipit-source-id: ac9c6da3a5e63b285b5e1dde210613b5d893641b
JavaScript
mit
facebook/react-native,facebook/react-native,hammerandchisel/react-native,arthuralee/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,exponent/react-native,myntra/react-native,javache/react-native,exponentjs/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,myntra/react-native,hammerandchisel/react-native,arthuralee/react-native,exponent/react-native,hoangpham95/react-native,janicduplessis/react-native,hoangpham95/react-native,pandiaraj44/react-native,facebook/react-native,exponent/react-native,exponent/react-native,facebook/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponent/react-native,arthuralee/react-native,hammerandchisel/react-native,exponentjs/react-native,myntra/react-native,hoangpham95/react-native,janicduplessis/react-native,hoangpham95/react-native,exponentjs/react-native,exponentjs/react-native,exponentjs/react-native,myntra/react-native,exponent/react-native,pandiaraj44/react-native,facebook/react-native,arthuralee/react-native,hoangpham95/react-native,hammerandchisel/react-native,javache/react-native,hammerandchisel/react-native,pandiaraj44/react-native,hoangpham95/react-native,myntra/react-native,pandiaraj44/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,myntra/react-native,pandiaraj44/react-native,janicduplessis/react-native,javache/react-native,exponent/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,exponentjs/react-native,javache/react-native,hammerandchisel/react-native,javache/react-native,facebook/react-native,myntra/react-native,exponentjs/react-native,exponent/react-native,hoangpham95/react-native,exponentjs/react-native,hammerandchisel/react-native,janicduplessis/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native
javascript
## Code Before: /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const {Alert, Button, View} = require('react-native'); class XHRExampleAbortController extends React.Component<{...}, {...}> { _timeout: any; _submit(abortDelay) { clearTimeout(this._timeout); // eslint-disable-next-line no-undef const abortController = new AbortController(); fetch('https://facebook.github.io/react-native/', { signal: abortController.signal, }) .then(res => res.text()) .then(res => Alert.alert(res)) .catch(err => Alert.alert(err.message)); this._timeout = setTimeout(() => { abortController.abort(); }, abortDelay); } componentWillUnmount() { clearTimeout(this._timeout); } render(): React.Node { return ( <View> <Button title="Abort before response" onPress={() => { this._submit(0); }} /> <Button title="Abort after response" onPress={() => { this._submit(5000); }} /> </View> ); } } module.exports = XHRExampleAbortController; ## Instruction: Move eslint-disable no-undef to a global comment Summary: Switch the only `// eslint-disable no-undef` to defined the global instead so that the new babel-eslint-no-undef compile time check doesn't need to understand inline eslint comments. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18644590 fbshipit-source-id: ac9c6da3a5e63b285b5e1dde210613b5d893641b ## Code After: /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const React = require('react'); const {Alert, Button, View} = require('react-native'); class XHRExampleAbortController extends React.Component<{...}, {...}> { _timeout: any; _submit(abortDelay) { clearTimeout(this._timeout); const abortController = new global.AbortController(); fetch('https://facebook.github.io/react-native/', { signal: abortController.signal, }) .then(res => res.text()) .then(res => Alert.alert(res)) .catch(err => Alert.alert(err.message)); this._timeout = setTimeout(() => { abortController.abort(); }, abortDelay); } componentWillUnmount() { clearTimeout(this._timeout); } render(): React.Node { return ( <View> <Button title="Abort before response" onPress={() => { this._submit(0); }} /> <Button title="Abort after response" onPress={() => { this._submit(5000); }} /> </View> ); } } module.exports = XHRExampleAbortController;
348ac0b3fd81503e102ef3e955868379abc37a00
_config.yml
_config.yml
title: Lagrange tagline: a minimalist Jekyll theme description: baseurl: #"/Lagrange" url: #"https://lenpaul.github.io" github: url: #"https://lenpaul.github.io/Lagrange" author: name: "Paul Le" email: "[email protected]" twitter: "paululele" instagram: "paululele" github: "lenpaul" facebook: "Le.Paul.94" linkedin: "lenpaul" navigation: - title: About url: /about - title: Writing url: /writing - title: Contact url: /contact paginate: 5 disqus: #"your-disqus" # Build settings markdown: kramdown highlighter: rouge permalink: none gems: [jekyll-paginate]
title: My Life Unlearned tagline: this is a tagline description: baseurl: #"" url: #"https://lenpaul.github.io" github: url: #"http://elisepotts.github.io" author: name: "Elise Marie Potts" email: "[email protected]" twitter: "@elisempotts" github: "@elisepotts" linkedin: "Elise Potts" navigation: - title: About url: /about - title: Writing url: /writing - title: Contact url: /contact paginate: 5 disqus: #"your-disqus" # Build settings markdown: kramdown highlighter: rouge permalink: none gems: [jekyll-paginate]
Update config YAML with Elise's info
Update config YAML with Elise's info
YAML
mit
elisepotts/elisepotts.github.io
yaml
## Code Before: title: Lagrange tagline: a minimalist Jekyll theme description: baseurl: #"/Lagrange" url: #"https://lenpaul.github.io" github: url: #"https://lenpaul.github.io/Lagrange" author: name: "Paul Le" email: "[email protected]" twitter: "paululele" instagram: "paululele" github: "lenpaul" facebook: "Le.Paul.94" linkedin: "lenpaul" navigation: - title: About url: /about - title: Writing url: /writing - title: Contact url: /contact paginate: 5 disqus: #"your-disqus" # Build settings markdown: kramdown highlighter: rouge permalink: none gems: [jekyll-paginate] ## Instruction: Update config YAML with Elise's info ## Code After: title: My Life Unlearned tagline: this is a tagline description: baseurl: #"" url: #"https://lenpaul.github.io" github: url: #"http://elisepotts.github.io" author: name: "Elise Marie Potts" email: "[email protected]" twitter: "@elisempotts" github: "@elisepotts" linkedin: "Elise Potts" navigation: - title: About url: /about - title: Writing url: /writing - title: Contact url: /contact paginate: 5 disqus: #"your-disqus" # Build settings markdown: kramdown highlighter: rouge permalink: none gems: [jekyll-paginate]
3b869aa3f7087f1f538ecaf2aff4bcd33e5c43d5
README.md
README.md
Small project for testing out Spring Boot. It is a webservice which exposes one RESTful resource for getting information about an artist from different sources. The sources used are Music Brainz API, Wikipedia and Cover Art Archive. Its dependencies and build functions are configured using Maven. ## Testing The tests can be run via maven: ```bash mvn test ``` ## Building Maven package creates an executable jar file ```bash mvn package ``` # Running The service is built with Spring Boot and can be run with the Spring Boot Maven plugin: ```bash mvn spring-boot:run ``` An example request: ``` http://localhost:8080/artists/5b11f4ce-a62d-471e-81fc-a69a8278c7da ```
| master | develop | | :-------------: |:-------------:| | [![Build Status](https://travis-ci.org/palmithor/springboot-musicapi.svg?branch=master)](https://travis-ci.org/palmithor/springboot-musicapi) | [![Build Status](https://travis-ci.org/palmithor/springboot-musicapi.svg?branch=develop)](https://travis-ci.org/palmithor/springboot-musicapi) | # springboot-musicapi Small project for testing out Spring Boot. It is a webservice which exposes one RESTful resource for getting information about an artist from different sources. The sources used are Music Brainz API, Wikipedia and Cover Art Archive. Its dependencies and build functions are configured using Maven. ## Testing The tests can be run via maven: ```bash mvn test ``` ## Building Maven package creates an executable jar file ```bash mvn package ``` # Running The service is built with Spring Boot and can be run with the Spring Boot Maven plugin: ```bash mvn spring-boot:run ``` An example request: ``` http://localhost:8080/artists/5b11f4ce-a62d-471e-81fc-a69a8278c7da ```
Add travis ci build status labels in readme.
Add travis ci build status labels in readme.
Markdown
apache-2.0
palmithor/springboot-musicapi
markdown
## Code Before: Small project for testing out Spring Boot. It is a webservice which exposes one RESTful resource for getting information about an artist from different sources. The sources used are Music Brainz API, Wikipedia and Cover Art Archive. Its dependencies and build functions are configured using Maven. ## Testing The tests can be run via maven: ```bash mvn test ``` ## Building Maven package creates an executable jar file ```bash mvn package ``` # Running The service is built with Spring Boot and can be run with the Spring Boot Maven plugin: ```bash mvn spring-boot:run ``` An example request: ``` http://localhost:8080/artists/5b11f4ce-a62d-471e-81fc-a69a8278c7da ``` ## Instruction: Add travis ci build status labels in readme. ## Code After: | master | develop | | :-------------: |:-------------:| | [![Build Status](https://travis-ci.org/palmithor/springboot-musicapi.svg?branch=master)](https://travis-ci.org/palmithor/springboot-musicapi) | [![Build Status](https://travis-ci.org/palmithor/springboot-musicapi.svg?branch=develop)](https://travis-ci.org/palmithor/springboot-musicapi) | # springboot-musicapi Small project for testing out Spring Boot. It is a webservice which exposes one RESTful resource for getting information about an artist from different sources. The sources used are Music Brainz API, Wikipedia and Cover Art Archive. Its dependencies and build functions are configured using Maven. ## Testing The tests can be run via maven: ```bash mvn test ``` ## Building Maven package creates an executable jar file ```bash mvn package ``` # Running The service is built with Spring Boot and can be run with the Spring Boot Maven plugin: ```bash mvn spring-boot:run ``` An example request: ``` http://localhost:8080/artists/5b11f4ce-a62d-471e-81fc-a69a8278c7da ```
d37655aedff0b7ae210e7b7e1aa716cf8f49bde8
README.rst
README.rst
Streamz ======= |Build Status| |Doc Status| |Version Status| Streamz helps you build pipelines to manage continuous streams of data. It is simple to use in simple cases, but also supports complex pipelines that involve branching, joining, flow control, feedback, back pressure, and so on. Optionally, Streamz can also work with Pandas dataframes to provide sensible streaming operations on continuous tabular data. To learn more about how to use Streamz see documentation at `streamz.readthedocs.org <https://streamz.readthedocs.org>`_. LICENSE ------- BSD-3 Clause .. |Build Status| image:: https://travis-ci.org/mrocklin/streamz.svg?branch=master :target: https://travis-ci.org/python-streamz/streamz .. |Doc Status| image:: http://readthedocs.org/projects/streamz/badge/?version=latest :target: http://streamz.readthedocs.org/en/latest/ :alt: Documentation Status .. |Version Status| image:: https://img.shields.io/pypi/v/streamz.svg :target: https://pypi.python.org/pypi/streamz/
Streamz ======= |Build Status| |Doc Status| |Version Status| Streamz helps you build pipelines to manage continuous streams of data. It is simple to use in simple cases, but also supports complex pipelines that involve branching, joining, flow control, feedback, back pressure, and so on. Optionally, Streamz can also work with Pandas dataframes to provide sensible streaming operations on continuous tabular data. To learn more about how to use Streamz see documentation at `streamz.readthedocs.org <https://streamz.readthedocs.org>`_. LICENSE ------- BSD-3 Clause .. |Build Status| image:: https://travis-ci.org/python-streamz/streamz.svg?branch=master :target: https://travis-ci.org/python-streamz/streamz .. |Doc Status| image:: http://readthedocs.org/projects/streamz/badge/?version=latest :target: http://streamz.readthedocs.org/en/latest/ :alt: Documentation Status .. |Version Status| image:: https://img.shields.io/pypi/v/streamz.svg :target: https://pypi.python.org/pypi/streamz/
Update build status image url in readme
Update build status image url in readme The current url doesn't seem to be showing the correct build status. This change fixes that.
reStructuredText
bsd-3-clause
mrocklin/streams
restructuredtext
## Code Before: Streamz ======= |Build Status| |Doc Status| |Version Status| Streamz helps you build pipelines to manage continuous streams of data. It is simple to use in simple cases, but also supports complex pipelines that involve branching, joining, flow control, feedback, back pressure, and so on. Optionally, Streamz can also work with Pandas dataframes to provide sensible streaming operations on continuous tabular data. To learn more about how to use Streamz see documentation at `streamz.readthedocs.org <https://streamz.readthedocs.org>`_. LICENSE ------- BSD-3 Clause .. |Build Status| image:: https://travis-ci.org/mrocklin/streamz.svg?branch=master :target: https://travis-ci.org/python-streamz/streamz .. |Doc Status| image:: http://readthedocs.org/projects/streamz/badge/?version=latest :target: http://streamz.readthedocs.org/en/latest/ :alt: Documentation Status .. |Version Status| image:: https://img.shields.io/pypi/v/streamz.svg :target: https://pypi.python.org/pypi/streamz/ ## Instruction: Update build status image url in readme The current url doesn't seem to be showing the correct build status. This change fixes that. ## Code After: Streamz ======= |Build Status| |Doc Status| |Version Status| Streamz helps you build pipelines to manage continuous streams of data. It is simple to use in simple cases, but also supports complex pipelines that involve branching, joining, flow control, feedback, back pressure, and so on. Optionally, Streamz can also work with Pandas dataframes to provide sensible streaming operations on continuous tabular data. To learn more about how to use Streamz see documentation at `streamz.readthedocs.org <https://streamz.readthedocs.org>`_. LICENSE ------- BSD-3 Clause .. |Build Status| image:: https://travis-ci.org/python-streamz/streamz.svg?branch=master :target: https://travis-ci.org/python-streamz/streamz .. |Doc Status| image:: http://readthedocs.org/projects/streamz/badge/?version=latest :target: http://streamz.readthedocs.org/en/latest/ :alt: Documentation Status .. |Version Status| image:: https://img.shields.io/pypi/v/streamz.svg :target: https://pypi.python.org/pypi/streamz/
0b9bed076bac3f942e904a5e8388880af515ced0
api/db/user.js
api/db/user.js
'use strict' module.exports = function (sequelize, DataTypes) { let User = sequelize.define('User', { id: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4 }, email: { type: DataTypes.STRING, allowNull: false }, password: { type: DataTypes.STRING(1024), allowNull: false }, salt: { type: DataTypes.STRING, allowNull: true }, nicknames: { type: 'citext[]', allowNull: true, defaultValue: 'ARRAY[]::citext[]' }, drilled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, drilledDispatch: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, group: { type: DataTypes.ENUM('normal', 'overseer', 'moderator', 'admin'), allowNull: false, defaultValue: 'normal' }, dispatch: { type: DataTypes.BOOLEAN, allowNull: true, defaultValue: null, unique: true } }, { paranoid: true, classMethods: { associate: function (models) { User.hasMany(models.Rat, { as: 'rats' }) } } }) return User }
'use strict' module.exports = function (sequelize, DataTypes) { let User = sequelize.define('User', { id: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4 }, email: { type: DataTypes.STRING, allowNull: false }, password: { type: DataTypes.STRING(1024), allowNull: false }, salt: { type: DataTypes.STRING, allowNull: true }, nicknames: { type: 'citext[]', allowNull: true, defaultValue: sequelize.literal('ARRAY[]::citext[]') }, drilled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, drilledDispatch: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, group: { type: DataTypes.ENUM('normal', 'overseer', 'moderator', 'admin'), allowNull: false, defaultValue: 'normal' }, dispatch: { type: DataTypes.BOOLEAN, allowNull: true, defaultValue: null, unique: true } }, { paranoid: true, classMethods: { associate: function (models) { User.hasMany(models.Rat, { as: 'rats' }) } } }) return User }
Use literal function for citext array default value, not string
Use literal function for citext array default value, not string
JavaScript
bsd-3-clause
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
javascript
## Code Before: 'use strict' module.exports = function (sequelize, DataTypes) { let User = sequelize.define('User', { id: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4 }, email: { type: DataTypes.STRING, allowNull: false }, password: { type: DataTypes.STRING(1024), allowNull: false }, salt: { type: DataTypes.STRING, allowNull: true }, nicknames: { type: 'citext[]', allowNull: true, defaultValue: 'ARRAY[]::citext[]' }, drilled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, drilledDispatch: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, group: { type: DataTypes.ENUM('normal', 'overseer', 'moderator', 'admin'), allowNull: false, defaultValue: 'normal' }, dispatch: { type: DataTypes.BOOLEAN, allowNull: true, defaultValue: null, unique: true } }, { paranoid: true, classMethods: { associate: function (models) { User.hasMany(models.Rat, { as: 'rats' }) } } }) return User } ## Instruction: Use literal function for citext array default value, not string ## Code After: 'use strict' module.exports = function (sequelize, DataTypes) { let User = sequelize.define('User', { id: { type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4 }, email: { type: DataTypes.STRING, allowNull: false }, password: { type: DataTypes.STRING(1024), allowNull: false }, salt: { type: DataTypes.STRING, allowNull: true }, nicknames: { type: 'citext[]', allowNull: true, defaultValue: sequelize.literal('ARRAY[]::citext[]') }, drilled: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, drilledDispatch: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false }, group: { type: DataTypes.ENUM('normal', 'overseer', 'moderator', 'admin'), allowNull: false, defaultValue: 'normal' }, dispatch: { type: DataTypes.BOOLEAN, allowNull: true, defaultValue: null, unique: true } }, { paranoid: true, classMethods: { associate: function (models) { User.hasMany(models.Rat, { as: 'rats' }) } } }) return User }
9a733935a16bf898dcb785316e3a1fc98ac91226
package/src/frontend/media/createMediaPlayer.js
package/src/frontend/media/createMediaPlayer.js
import {browser} from '../browser'; import {VideoPlayer} from '../VideoPlayer'; export const createMediaPlayer = function (options) { options.tagName = options.tagName || 'video'; let isAudio = options.tagName == 'audio'; let playsInline = options.playsInline; let mediaElementTemplate = document.createElement(options.tagName); mediaElementTemplate.setAttribute('id', 'pageflow_media_element_'+options.playerId); mediaElementTemplate.setAttribute('crossorigin', 'anonymous'); const player = new VideoPlayer(mediaElementTemplate, { controlBar: false, loadingSpinner: false, bigPlayButton: false, errorDisplay: false, textTrackSettings: false, poster: options.poster, loop: options.loop, controls: options.controls, html5: { nativeCaptions: !isAudio && browser.has('iphone platform') }, bufferUnderrunWaiting: true, useSlimPlayerControlsDuringPhonePlayback: !playsInline && !isAudio, fullscreenDuringPhonePlayback: !playsInline && !isAudio, fallbackToMutedAutoplay: !isAudio, volumeFading: true, //should be turned on later hooks: undefined, mediaEvents: true, context: options.mediaContext }); if (playsInline) { player.playsinline(true); } player.textTrackSettings = { getValues() { return {}; } }; player.playOrPlayOnLoad = function () { if (this.readyState() > 0) { player.play(); } else { player.on('loadedmetadata', player.play); } }; player.addClass('video-js'); player.addClass('player'); return player; };
import {browser} from '../browser'; import {VideoPlayer} from '../VideoPlayer'; export const createMediaPlayer = function (options) { options.tagName = options.tagName || 'video'; let isAudio = options.tagName == 'audio'; let playsInline = options.playsInline; let mediaElementTemplate = document.createElement(options.tagName); mediaElementTemplate.setAttribute('id', 'pageflow_media_element_'+options.playerId); mediaElementTemplate.setAttribute('crossorigin', 'anonymous'); const player = new VideoPlayer(mediaElementTemplate, { controlBar: false, loadingSpinner: false, bigPlayButton: false, errorDisplay: false, textTrackSettings: false, poster: options.poster, loop: options.loop, controls: options.controls, html5: { nativeCaptions: !isAudio && browser.has('iphone platform') }, bufferUnderrunWaiting: true, fallbackToMutedAutoplay: !isAudio, volumeFading: true, //should be turned on later hooks: undefined, mediaEvents: true, context: options.mediaContext }); if (playsInline) { player.playsinline(true); } player.textTrackSettings = { getValues() { return {}; } }; player.playOrPlayOnLoad = function () { if (this.readyState() > 0) { player.play(); } else { player.on('loadedmetadata', player.play); } }; player.addClass('video-js'); player.addClass('player'); return player; };
Remove paged specific options from scrolled media player
Remove paged specific options from scrolled media player * `fullscreenDuringPhonePlayback` is unused legacy. * `useSlimPlayerControlsDuringPhonePlayback` refers to paged widget types.
JavaScript
mit
tf/pageflow,codevise/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow
javascript
## Code Before: import {browser} from '../browser'; import {VideoPlayer} from '../VideoPlayer'; export const createMediaPlayer = function (options) { options.tagName = options.tagName || 'video'; let isAudio = options.tagName == 'audio'; let playsInline = options.playsInline; let mediaElementTemplate = document.createElement(options.tagName); mediaElementTemplate.setAttribute('id', 'pageflow_media_element_'+options.playerId); mediaElementTemplate.setAttribute('crossorigin', 'anonymous'); const player = new VideoPlayer(mediaElementTemplate, { controlBar: false, loadingSpinner: false, bigPlayButton: false, errorDisplay: false, textTrackSettings: false, poster: options.poster, loop: options.loop, controls: options.controls, html5: { nativeCaptions: !isAudio && browser.has('iphone platform') }, bufferUnderrunWaiting: true, useSlimPlayerControlsDuringPhonePlayback: !playsInline && !isAudio, fullscreenDuringPhonePlayback: !playsInline && !isAudio, fallbackToMutedAutoplay: !isAudio, volumeFading: true, //should be turned on later hooks: undefined, mediaEvents: true, context: options.mediaContext }); if (playsInline) { player.playsinline(true); } player.textTrackSettings = { getValues() { return {}; } }; player.playOrPlayOnLoad = function () { if (this.readyState() > 0) { player.play(); } else { player.on('loadedmetadata', player.play); } }; player.addClass('video-js'); player.addClass('player'); return player; }; ## Instruction: Remove paged specific options from scrolled media player * `fullscreenDuringPhonePlayback` is unused legacy. * `useSlimPlayerControlsDuringPhonePlayback` refers to paged widget types. ## Code After: import {browser} from '../browser'; import {VideoPlayer} from '../VideoPlayer'; export const createMediaPlayer = function (options) { options.tagName = options.tagName || 'video'; let isAudio = options.tagName == 'audio'; let playsInline = options.playsInline; let mediaElementTemplate = document.createElement(options.tagName); mediaElementTemplate.setAttribute('id', 'pageflow_media_element_'+options.playerId); mediaElementTemplate.setAttribute('crossorigin', 'anonymous'); const player = new VideoPlayer(mediaElementTemplate, { controlBar: false, loadingSpinner: false, bigPlayButton: false, errorDisplay: false, textTrackSettings: false, poster: options.poster, loop: options.loop, controls: options.controls, html5: { nativeCaptions: !isAudio && browser.has('iphone platform') }, bufferUnderrunWaiting: true, fallbackToMutedAutoplay: !isAudio, volumeFading: true, //should be turned on later hooks: undefined, mediaEvents: true, context: options.mediaContext }); if (playsInline) { player.playsinline(true); } player.textTrackSettings = { getValues() { return {}; } }; player.playOrPlayOnLoad = function () { if (this.readyState() > 0) { player.play(); } else { player.on('loadedmetadata', player.play); } }; player.addClass('video-js'); player.addClass('player'); return player; };
867159d77d883eaa7874634e60befb24a680e9d0
src/entities/CollectionEditor.js
src/entities/CollectionEditor.js
import { Component } from 'substance' import EntityEditor from './EntityEditor' export default class CollectionEditor extends Component { render($$) { let el = $$('div').addClass('sc-collection-editor') let label = this.getLabel(this.props.model.id) let items = this._getItems() el.append( $$('div').addClass('se-header').append(items.length + ' ' + label) ) items.forEach(item => { el.append( $$(EntityEditor, { model: item }) ) }) return el } _getItems() { return this.props.model.getItems() } }
import { Component, FontAwesomeIcon } from 'substance' import EntityEditor from './EntityEditor' export default class CollectionEditor extends Component { render($$) { let el = $$('div').addClass('sc-collection-editor') let label = this.getLabel(this.props.model.id) let items = this._getItems() el.append( $$('div').addClass('se-header').append(items.length + ' ' + label) ) items.forEach(item => { el.append( $$(EntityEditor, { model: item }) ) }) el.append( $$('button').addClass('se-add-value') .append( $$(FontAwesomeIcon, {icon: 'fa-plus'}).addClass('se-icon'), 'Add ' + label ) .on('click', this._addCollectionItem) ) return el } _getItems() { return this.props.model.getItems() } _addCollectionItem() { } }
Add a new collection item button.
Add a new collection item button.
JavaScript
mit
substance/texture,substance/texture
javascript
## Code Before: import { Component } from 'substance' import EntityEditor from './EntityEditor' export default class CollectionEditor extends Component { render($$) { let el = $$('div').addClass('sc-collection-editor') let label = this.getLabel(this.props.model.id) let items = this._getItems() el.append( $$('div').addClass('se-header').append(items.length + ' ' + label) ) items.forEach(item => { el.append( $$(EntityEditor, { model: item }) ) }) return el } _getItems() { return this.props.model.getItems() } } ## Instruction: Add a new collection item button. ## Code After: import { Component, FontAwesomeIcon } from 'substance' import EntityEditor from './EntityEditor' export default class CollectionEditor extends Component { render($$) { let el = $$('div').addClass('sc-collection-editor') let label = this.getLabel(this.props.model.id) let items = this._getItems() el.append( $$('div').addClass('se-header').append(items.length + ' ' + label) ) items.forEach(item => { el.append( $$(EntityEditor, { model: item }) ) }) el.append( $$('button').addClass('se-add-value') .append( $$(FontAwesomeIcon, {icon: 'fa-plus'}).addClass('se-icon'), 'Add ' + label ) .on('click', this._addCollectionItem) ) return el } _getItems() { return this.props.model.getItems() } _addCollectionItem() { } }
7eeadd9b97e28260346b87866b212499249f769f
CMakeLists.txt
CMakeLists.txt
cmake_minimum_required (VERSION 2.8) set(PROJECT jdksavdecc-mcu) project(${PROJECT} C CXX) set(CXX11 "OFF") include_directories( "include" "jdksavdecc-c/include" ) file(GLOB PROJECT_SRC "jdksavdecc-c/src/*.c" ) set(PROJECT_INCLUDES_GLOBS "jdksavdecc-c/include/*.h" "jdksavdecc-c/include/*.hpp") set(PROJECT_SRC_GLOBS "jdksavdecc-c/src/*.c" "jdksavdecc-c/src/*.cpp" ) if( WIN32 ) include_directories($ENV{PCAP_INCLUDE}) set(LIBS ${LIBS} wpcap) link_directories($ENV{PCAP_LIBRARY}) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set(LIBS ${LIBS} pcap) endif() INCLUDE (common.cmake)
cmake_minimum_required (VERSION 2.8) set(PROJECT jdksavdecc-mcu) project(${PROJECT} C CXX) option(CXX11 "C++11 mode" "OFF") include_directories( "include" "jdksavdecc-c/include" ) file(GLOB PROJECT_SRC "jdksavdecc-c/src/*.c" ) set(PROJECT_INCLUDES_GLOBS "jdksavdecc-c/include/*.h" "jdksavdecc-c/include/*.hpp") set(PROJECT_SRC_GLOBS "jdksavdecc-c/src/*.c" "jdksavdecc-c/src/*.cpp" ) if( WIN32 ) include_directories($ENV{PCAP_INCLUDE}) set(LIBS ${LIBS} wpcap) link_directories($ENV{PCAP_LIBRARY}) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set(LIBS ${LIBS} pcap) endif() INCLUDE (common.cmake)
Change CXX11 to be an option, default OFF
Change CXX11 to be an option, default OFF
Text
mit
jdkoftinoff/jdksavdecc-mcu,jdkoftinoff/jdksavdecc-mcu,jdkoftinoff/jdksavdecc-mcu,jdkoftinoff/jdksavdecc-mcu
text
## Code Before: cmake_minimum_required (VERSION 2.8) set(PROJECT jdksavdecc-mcu) project(${PROJECT} C CXX) set(CXX11 "OFF") include_directories( "include" "jdksavdecc-c/include" ) file(GLOB PROJECT_SRC "jdksavdecc-c/src/*.c" ) set(PROJECT_INCLUDES_GLOBS "jdksavdecc-c/include/*.h" "jdksavdecc-c/include/*.hpp") set(PROJECT_SRC_GLOBS "jdksavdecc-c/src/*.c" "jdksavdecc-c/src/*.cpp" ) if( WIN32 ) include_directories($ENV{PCAP_INCLUDE}) set(LIBS ${LIBS} wpcap) link_directories($ENV{PCAP_LIBRARY}) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set(LIBS ${LIBS} pcap) endif() INCLUDE (common.cmake) ## Instruction: Change CXX11 to be an option, default OFF ## Code After: cmake_minimum_required (VERSION 2.8) set(PROJECT jdksavdecc-mcu) project(${PROJECT} C CXX) option(CXX11 "C++11 mode" "OFF") include_directories( "include" "jdksavdecc-c/include" ) file(GLOB PROJECT_SRC "jdksavdecc-c/src/*.c" ) set(PROJECT_INCLUDES_GLOBS "jdksavdecc-c/include/*.h" "jdksavdecc-c/include/*.hpp") set(PROJECT_SRC_GLOBS "jdksavdecc-c/src/*.c" "jdksavdecc-c/src/*.cpp" ) if( WIN32 ) include_directories($ENV{PCAP_INCLUDE}) set(LIBS ${LIBS} wpcap) link_directories($ENV{PCAP_LIBRARY}) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set(LIBS ${LIBS} pcap) endif() INCLUDE (common.cmake)
13a236b7837626f00486830e86a816be9c2e0ab4
.travis.yml
.travis.yml
sudo: false services: - docker language: java cache: directories: - $HOME/.m2/repository jdk: - oraclejdk8 before_script: - "HOST_IP=$(ip route show 0.0.0.0/0 | grep -Eo 'via \\S+' | awk '{ print $2 }')" - "docker-compose up -d" script: - "mvn verify -B" after_success: - "mvn jacoco:report coveralls:report"
sudo: false services: - docker language: java cache: directories: - $HOME/.m2/repository jdk: - oraclejdk8 before_script: - "docker run -d -v \"$(pwd)/kannel.conf:/etc/kannel/kannel.conf\" -v \"$(pwd)/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf\" --name kannel -p \"12000:12000\" -p \"12001:12001\" --add-host \"SMSC_HOST:$(ip route show 0.0.0.0/0 | grep -Eo 'via \\S+' | awk '{ print $2 }')\" bulktrade/kannel:r5159" script: - "mvn verify -B" after_success: - "mvn jacoco:report coveralls:report"
Switch to docker from docker-compose to try and fix the build
Switch to docker from docker-compose to try and fix the build
YAML
mit
spapageo/jannel
yaml
## Code Before: sudo: false services: - docker language: java cache: directories: - $HOME/.m2/repository jdk: - oraclejdk8 before_script: - "HOST_IP=$(ip route show 0.0.0.0/0 | grep -Eo 'via \\S+' | awk '{ print $2 }')" - "docker-compose up -d" script: - "mvn verify -B" after_success: - "mvn jacoco:report coveralls:report" ## Instruction: Switch to docker from docker-compose to try and fix the build ## Code After: sudo: false services: - docker language: java cache: directories: - $HOME/.m2/repository jdk: - oraclejdk8 before_script: - "docker run -d -v \"$(pwd)/kannel.conf:/etc/kannel/kannel.conf\" -v \"$(pwd)/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf\" --name kannel -p \"12000:12000\" -p \"12001:12001\" --add-host \"SMSC_HOST:$(ip route show 0.0.0.0/0 | grep -Eo 'via \\S+' | awk '{ print $2 }')\" bulktrade/kannel:r5159" script: - "mvn verify -B" after_success: - "mvn jacoco:report coveralls:report"
e079314b669aaf3a860639035ef16eeab44076b0
resources/views/partials/footer.blade.php
resources/views/partials/footer.blade.php
<?php /** * Created by PhpStorm. * User: mgrloren * Date: 7/31/15 * Time: 2:55 PM */ ?> <footer> <div class="container"> <div class="row"> <div class="col-sm-6"> <ul class="list-inline"> {{--<li><i class="icon-facebook icon-2x"></i></li>--}} <li><a href="https://twitter.com/lorenlang"><i class="icon-twitter icon-2x"></i></a></li> {{--<li><i class="icon-google-plus icon-2x"></i></li>--}} {{--<li><i class="icon-pinterest icon-2x"></i></li>--}} <li><a href="https://www.linkedin.com/in/lorenlang"><i class="icon-linkedin icon-2x"></i></a></li> <li><a href="http://wheresmyhead.com/feed"><i class="icon-rss icon-2x"></i></a></li> </ul> </div> <div class="col-sm-6"> {{--<p class="pull-right">Built with <i class="icon-heart-empty"></i> at <a href="http://www.bootply.com">Bootply</a></p> --}} </div> </div> </div> </footer>
<?php /** * Created by PhpStorm. * User: mgrloren * Date: 7/31/15 * Time: 2:55 PM */ ?> <footer> <div class="container"> <div class="row"> <div class="col-sm-6"> <ul class="list-inline"> {{--<li><i class="icon-facebook icon-2x"></i></li>--}} <li><a href="https://twitter.com/lorenlang"><i class="icon-twitter icon-2x"></i></a></li> {{--<li><i class="icon-google-plus icon-2x"></i></li>--}} {{--<li><i class="icon-pinterest icon-2x"></i></li>--}} <li><a href="https://instagram.com/lorenlang00"><i class="icon-instagram icon-2x"></i></a></li> <li><a href="https://www.linkedin.com/in/lorenlang"><i class="icon-linkedin icon-2x"></i></a></li> <li><a href="http://wheresmyhead.com/feed"><i class="icon-rss icon-2x"></i></a></li> </ul> </div> <div class="col-sm-6"> {{--<p class="pull-right">Built with <i class="icon-heart-empty"></i> at <a href="http://www.bootply.com">Bootply</a></p> --}} </div> </div> </div> </footer>
Add Instagram link to footer
Add Instagram link to footer
PHP
mit
lorenlang/blog,lorenlang/blog,lorenlang/blog
php
## Code Before: <?php /** * Created by PhpStorm. * User: mgrloren * Date: 7/31/15 * Time: 2:55 PM */ ?> <footer> <div class="container"> <div class="row"> <div class="col-sm-6"> <ul class="list-inline"> {{--<li><i class="icon-facebook icon-2x"></i></li>--}} <li><a href="https://twitter.com/lorenlang"><i class="icon-twitter icon-2x"></i></a></li> {{--<li><i class="icon-google-plus icon-2x"></i></li>--}} {{--<li><i class="icon-pinterest icon-2x"></i></li>--}} <li><a href="https://www.linkedin.com/in/lorenlang"><i class="icon-linkedin icon-2x"></i></a></li> <li><a href="http://wheresmyhead.com/feed"><i class="icon-rss icon-2x"></i></a></li> </ul> </div> <div class="col-sm-6"> {{--<p class="pull-right">Built with <i class="icon-heart-empty"></i> at <a href="http://www.bootply.com">Bootply</a></p> --}} </div> </div> </div> </footer> ## Instruction: Add Instagram link to footer ## Code After: <?php /** * Created by PhpStorm. * User: mgrloren * Date: 7/31/15 * Time: 2:55 PM */ ?> <footer> <div class="container"> <div class="row"> <div class="col-sm-6"> <ul class="list-inline"> {{--<li><i class="icon-facebook icon-2x"></i></li>--}} <li><a href="https://twitter.com/lorenlang"><i class="icon-twitter icon-2x"></i></a></li> {{--<li><i class="icon-google-plus icon-2x"></i></li>--}} {{--<li><i class="icon-pinterest icon-2x"></i></li>--}} <li><a href="https://instagram.com/lorenlang00"><i class="icon-instagram icon-2x"></i></a></li> <li><a href="https://www.linkedin.com/in/lorenlang"><i class="icon-linkedin icon-2x"></i></a></li> <li><a href="http://wheresmyhead.com/feed"><i class="icon-rss icon-2x"></i></a></li> </ul> </div> <div class="col-sm-6"> {{--<p class="pull-right">Built with <i class="icon-heart-empty"></i> at <a href="http://www.bootply.com">Bootply</a></p> --}} </div> </div> </div> </footer>
cf4ec8179c319fbe512f25889e58b60f14ba0253
AzureFunctions.Client/app/pipes/sidebar.pipe.ts
AzureFunctions.Client/app/pipes/sidebar.pipe.ts
import {Injectable, Pipe, PipeTransform} from '@angular/core'; import {FunctionInfo} from '../models/function-info'; @Pipe({ name: 'sidebarFilter', pure: false }) @Injectable() export class SideBarFilterPipe implements PipeTransform { transform(items: FunctionInfo[], args: string[] | string): any { var query = typeof args === 'string' ? args : args[0]; if (args && args.length > 0 && args[0] && args[0].length > 0) { return items.filter(item => !item.clientOnly && item.name.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) !== -1); } else { return items; } } }
import {Injectable, Pipe, PipeTransform} from '@angular/core'; import {FunctionInfo} from '../models/function-info'; @Pipe({ name: 'sidebarFilter', pure: false }) @Injectable() export class SideBarFilterPipe implements PipeTransform { transform(items: FunctionInfo[], args: string[] | string): any { if (args && args.length > 0) { var query = typeof args === 'string' ? args : args[0]; if (query) { return items.filter(item => !item.clientOnly && item.name.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) !== -1); } } return items; } }
Fix search filter on the sidebar regression
Fix search filter on the sidebar regression
TypeScript
apache-2.0
projectkudu/WebJobsPortal,projectkudu/AzureFunctions,projectkudu/AzureFunctions,agruning/azure-functions-ux,chunye/azure-functions-ux,agruning/azure-functions-ux,chunye/azure-functions-ux,projectkudu/WebJobsPortal,agruning/azure-functions-ux,projectkudu/AzureFunctions,projectkudu/WebJobsPortal,agruning/azure-functions-ux,projectkudu/AzureFunctions,chunye/azure-functions-ux,chunye/azure-functions-ux,chunye/azure-functions-ux,projectkudu/WebJobsPortal,agruning/azure-functions-ux
typescript
## Code Before: import {Injectable, Pipe, PipeTransform} from '@angular/core'; import {FunctionInfo} from '../models/function-info'; @Pipe({ name: 'sidebarFilter', pure: false }) @Injectable() export class SideBarFilterPipe implements PipeTransform { transform(items: FunctionInfo[], args: string[] | string): any { var query = typeof args === 'string' ? args : args[0]; if (args && args.length > 0 && args[0] && args[0].length > 0) { return items.filter(item => !item.clientOnly && item.name.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) !== -1); } else { return items; } } } ## Instruction: Fix search filter on the sidebar regression ## Code After: import {Injectable, Pipe, PipeTransform} from '@angular/core'; import {FunctionInfo} from '../models/function-info'; @Pipe({ name: 'sidebarFilter', pure: false }) @Injectable() export class SideBarFilterPipe implements PipeTransform { transform(items: FunctionInfo[], args: string[] | string): any { if (args && args.length > 0) { var query = typeof args === 'string' ? args : args[0]; if (query) { return items.filter(item => !item.clientOnly && item.name.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) !== -1); } } return items; } }
4376c2705cb778957968e1d680cffdef4d5d8d4f
lib/mongoid/userstamp/railtie.rb
lib/mongoid/userstamp/railtie.rb
module Mongoid module Userstamp class Railtie < Rails::Railtie # Include Mongoid::Userstamp::User into User class, if not already done config.to_prepare do Mongoid::Userstamp.user_classes.each do |user_class| unless user_class.included_modules.include?(Mongoid::Userstamp::User) user_class.send(:include, Mongoid::Userstamp::User) end end end # Add userstamp to models where Mongoid::Userstamp was included, but # mongoid_userstamp was not explicitly called config.to_prepare do Mongoid::Userstamp.model_classes.each do |model_class| unless model_class.included_modules.include?(Mongoid::Userstamp::Model) model_class.send(:include, Mongoid::Userstamp::Model) end end end # Set current_user from controller reader method ActiveSupport.on_load :action_controller do before_action do |c| Mongoid::Userstamp.user_classes.each do |user_class| begin user_class.current = c.send(user_class.mongoid_userstamp_user.reader) rescue end end end end end end end
module Mongoid module Userstamp class Railtie < Rails::Railtie # Include Mongoid::Userstamp::User into User class, if not already done config.to_prepare do Mongoid::Userstamp.user_classes.each do |user_class| unless user_class.included_modules.include?(Mongoid::Userstamp::User) user_class.send(:include, Mongoid::Userstamp::User) end end end # Add userstamp to models where Mongoid::Userstamp was included, but # mongoid_userstamp was not explicitly called config.to_prepare do Mongoid::Userstamp.model_classes.each do |model_class| unless model_class.included_modules.include?(Mongoid::Userstamp::Model) model_class.send(:include, Mongoid::Userstamp::Model) end end end # Set current_user from controller reader method ActiveSupport.on_load :action_controller do set_current = Proc.new do |c| Mongoid::Userstamp.user_classes.each do |user_class| begin user_class.current = c.send(user_class.mongoid_userstamp_user.reader) rescue end end end if respond_to?(:before_filter) before_filter { |c| set_current.call(c)} else before_action { |c| set_current.call(c)} end end end end end
Use respond_to?(:before_filter) to make it Rails version agnostic
Use respond_to?(:before_filter) to make it Rails version agnostic
Ruby
mit
johnnyshields/mongoid_userstamp
ruby
## Code Before: module Mongoid module Userstamp class Railtie < Rails::Railtie # Include Mongoid::Userstamp::User into User class, if not already done config.to_prepare do Mongoid::Userstamp.user_classes.each do |user_class| unless user_class.included_modules.include?(Mongoid::Userstamp::User) user_class.send(:include, Mongoid::Userstamp::User) end end end # Add userstamp to models where Mongoid::Userstamp was included, but # mongoid_userstamp was not explicitly called config.to_prepare do Mongoid::Userstamp.model_classes.each do |model_class| unless model_class.included_modules.include?(Mongoid::Userstamp::Model) model_class.send(:include, Mongoid::Userstamp::Model) end end end # Set current_user from controller reader method ActiveSupport.on_load :action_controller do before_action do |c| Mongoid::Userstamp.user_classes.each do |user_class| begin user_class.current = c.send(user_class.mongoid_userstamp_user.reader) rescue end end end end end end end ## Instruction: Use respond_to?(:before_filter) to make it Rails version agnostic ## Code After: module Mongoid module Userstamp class Railtie < Rails::Railtie # Include Mongoid::Userstamp::User into User class, if not already done config.to_prepare do Mongoid::Userstamp.user_classes.each do |user_class| unless user_class.included_modules.include?(Mongoid::Userstamp::User) user_class.send(:include, Mongoid::Userstamp::User) end end end # Add userstamp to models where Mongoid::Userstamp was included, but # mongoid_userstamp was not explicitly called config.to_prepare do Mongoid::Userstamp.model_classes.each do |model_class| unless model_class.included_modules.include?(Mongoid::Userstamp::Model) model_class.send(:include, Mongoid::Userstamp::Model) end end end # Set current_user from controller reader method ActiveSupport.on_load :action_controller do set_current = Proc.new do |c| Mongoid::Userstamp.user_classes.each do |user_class| begin user_class.current = c.send(user_class.mongoid_userstamp_user.reader) rescue end end end if respond_to?(:before_filter) before_filter { |c| set_current.call(c)} else before_action { |c| set_current.call(c)} end end end end end
95d0366a7c5dd6da55d54c0e881f1af23374f601
.github/workflows/maven.yml
.github/workflows/maven.yml
name: Java CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'zulu' cache: maven - name: Maven Build run: mvn clean install javadoc:javadoc - name: Coveralls Report run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}
name: Java CI on: push: branches: [ master ] pull_request: branches: [ master ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'zulu' cache: maven - name: Maven Build run: mvn clean install javadoc:javadoc - name: Coveralls Report run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}
Allow to trigger the build manually
Allow to trigger the build manually
YAML
apache-2.0
ferstl/pedantic-pom-enforcers
yaml
## Code Before: name: Java CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'zulu' cache: maven - name: Maven Build run: mvn clean install javadoc:javadoc - name: Coveralls Report run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }} ## Instruction: Allow to trigger the build manually ## Code After: name: Java CI on: push: branches: [ master ] pull_request: branches: [ master ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'zulu' cache: maven - name: Maven Build run: mvn clean install javadoc:javadoc - name: Coveralls Report run: mvn org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report org.eluder.coveralls:coveralls-maven-plugin:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}
1adbba4e910486eec0c9dfb037d313faa99e75ad
app/Repositories/ScheduleRepository.php
app/Repositories/ScheduleRepository.php
<?php namespace App\Repositories; use App\Models\Schedule; use App\Repositories\Contracts\ScheduleRepositoryInterface; class ScheduleRepository extends Repository implements ScheduleRepositoryInterface { public function __construct(Schedule $model) { $this->model = $model; } public function getLatestSchedules() { $today = date('Y-m-d'); return $this->model->with('departure_station', 'arrival_station', 'train', 'operator') ->where('departure_date', '>=', $today) ->orWhere('arrival_date', '>=', $today) ->get(); } public function getSchedule($id) { $schedule = $this->find($id); $schedule->load('departure_station', 'arrival_station', 'train', 'operator'); return $schedule; } public function search($departure, $arrival) { $query = $this->model; if ($departure) { $query = $query->where('departure_station_id', $departure); } if ($arrival) { $query = $query->where('arrival_station_id', $arrival); } $results = $query->get(); return $this->getFormattedData($results); } }
<?php namespace App\Repositories; use App\Models\Schedule; use App\Repositories\Contracts\ScheduleRepositoryInterface; class ScheduleRepository extends Repository implements ScheduleRepositoryInterface { public function __construct(Schedule $model) { $this->model = $model; } public function getLatestSchedules() { $today = date('Y-m-d'); return $this->model->with('departure_station', 'arrival_station', 'train', 'operator') ->where('departure_date', '>=', $today) ->orWhere('arrival_date', '>=', $today) ->get(); } public function getSchedule($id) { $schedule = $this->find($id); $schedule->load('departure_station', 'arrival_station', 'train', 'operator'); return $schedule; } public function search($departure, $arrival) { $query = $this->model->with('departure_station', 'arrival_station', 'train', 'operator'); if ($departure) { $query = $query->where('departure_station_id', $departure); } if ($arrival) { $query = $query->where('arrival_station_id', $arrival); } $results = $query->get(); return ! $results->isEmpty() ? $results : []; } }
Load relationships and remove data formatting
Load relationships and remove data formatting
PHP
mit
ShalomPeace/pub-trans-app,ShalomPeace/pub-trans-app
php
## Code Before: <?php namespace App\Repositories; use App\Models\Schedule; use App\Repositories\Contracts\ScheduleRepositoryInterface; class ScheduleRepository extends Repository implements ScheduleRepositoryInterface { public function __construct(Schedule $model) { $this->model = $model; } public function getLatestSchedules() { $today = date('Y-m-d'); return $this->model->with('departure_station', 'arrival_station', 'train', 'operator') ->where('departure_date', '>=', $today) ->orWhere('arrival_date', '>=', $today) ->get(); } public function getSchedule($id) { $schedule = $this->find($id); $schedule->load('departure_station', 'arrival_station', 'train', 'operator'); return $schedule; } public function search($departure, $arrival) { $query = $this->model; if ($departure) { $query = $query->where('departure_station_id', $departure); } if ($arrival) { $query = $query->where('arrival_station_id', $arrival); } $results = $query->get(); return $this->getFormattedData($results); } } ## Instruction: Load relationships and remove data formatting ## Code After: <?php namespace App\Repositories; use App\Models\Schedule; use App\Repositories\Contracts\ScheduleRepositoryInterface; class ScheduleRepository extends Repository implements ScheduleRepositoryInterface { public function __construct(Schedule $model) { $this->model = $model; } public function getLatestSchedules() { $today = date('Y-m-d'); return $this->model->with('departure_station', 'arrival_station', 'train', 'operator') ->where('departure_date', '>=', $today) ->orWhere('arrival_date', '>=', $today) ->get(); } public function getSchedule($id) { $schedule = $this->find($id); $schedule->load('departure_station', 'arrival_station', 'train', 'operator'); return $schedule; } public function search($departure, $arrival) { $query = $this->model->with('departure_station', 'arrival_station', 'train', 'operator'); if ($departure) { $query = $query->where('departure_station_id', $departure); } if ($arrival) { $query = $query->where('arrival_station_id', $arrival); } $results = $query->get(); return ! $results->isEmpty() ? $results : []; } }
c86f9e8264819a74f4d884cdda4ea9a70dc4530e
script/docker.sh
script/docker.sh
echo "==> Adding EPEL repo" cat /etc/redhat-release if grep -q -i "release 7" /etc/redhat-release ; then wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm rpm -Uvh epel-release-7*.rpm echo "==> Installing docker" yum install -y docker elif grep -q -i "release 6" /etc/redhat-release ; then wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6*.rpm echo "==> Installing docker" yum install -y docker-io fi echo "==> Starting docker" service docker start echo "==> Enabling docker to start on reboot" chkconfig docker on
echo "==> Adding EPEL repo" yum install -y epel-release cat /etc/resolv.conf cat /etc/redhat-release if grep -q -i "release 7" /etc/redhat-release ; then echo "==> Installing docker" yum install -y docker elif grep -q -i "release 6" /etc/redhat-release ; then echo "==> Installing docker" yum install -y docker-io fi echo "==> Starting docker" service docker start echo "==> Enabling docker to start on reboot" chkconfig docker on
Streamline installation of epel repo
Streamline installation of epel repo
Shell
apache-2.0
idi-ops/packer-centos,tom--bo/centos,bertvv/centos,bcorner13/centos,kosaki/centos,erikh/centos,ehime/Boxcutter-CentOS,boxcutter/centos,idi-ops/packer-centos,rasputnik/centos,ammonkc/centos-vm,chenpiao/centos,ammonkc/centos-vm,gtirloni/packer-centos-vagrant,ehime/centos,briancline/centos,gtirloni/packer-centos,gtirloni/packer-centos-vagrant,gtirloni/packer-centos,ehime/centos,rasputnik/centos,kontrafiktion/centos,Fydon/centos,Fydon/centos,grafjo/centos,kontrafiktion/centos,webdizz/centos,nazy/centos,bcorner13/centos,chenpiao/centos,webdizz/centos,grafjo/centos,kosaki/centos,ehime/Boxcutter-CentOS,bertvv/centos,tom--bo/centos,boxcutter/centos,briancline/centos,erikh/centos,nazy/centos
shell
## Code Before: echo "==> Adding EPEL repo" cat /etc/redhat-release if grep -q -i "release 7" /etc/redhat-release ; then wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm rpm -Uvh epel-release-7*.rpm echo "==> Installing docker" yum install -y docker elif grep -q -i "release 6" /etc/redhat-release ; then wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6*.rpm echo "==> Installing docker" yum install -y docker-io fi echo "==> Starting docker" service docker start echo "==> Enabling docker to start on reboot" chkconfig docker on ## Instruction: Streamline installation of epel repo ## Code After: echo "==> Adding EPEL repo" yum install -y epel-release cat /etc/resolv.conf cat /etc/redhat-release if grep -q -i "release 7" /etc/redhat-release ; then echo "==> Installing docker" yum install -y docker elif grep -q -i "release 6" /etc/redhat-release ; then echo "==> Installing docker" yum install -y docker-io fi echo "==> Starting docker" service docker start echo "==> Enabling docker to start on reboot" chkconfig docker on
c03e174527aaf92260445970c3b2947bfb00bcb1
spec/conditionals/case_spec.cr
spec/conditionals/case_spec.cr
require "../spec_helper" describe Crow do it "should convert simple case statements" do crystal = <<-CR value = "foo" case value when "foo" p "yes" when "bar" p "no" else p "hiyaa" end CR flow = <<-JS const value = "foo"; switch (value) { case "foo": console.log("yes"); break; case "bar": console.log("no"); break; default: console.log("hiyaa"); break; } JS Crow.convert(crystal).should eq flow end it "should raise an exception when conditionless case statements are found" do crystal = <<-CR case when true p "yes" when false p "no" else p "hiyaa" end CR exception_raised = false begin Crow.convert(crystal) rescue e exception_raised = true e.message.should match /Case statements without conditions cannot be transpiled./ e.message.should match %r{See https://github.com/geppetto-apps/crow/issues/8/} ensure Crow.strict = false end exception_raised.should eq true end end
require "../spec_helper" describe Crow do it "should convert simple case statements" do crystal = <<-CR value = "foo" case value when "foo" p "yes" when "bar" p "no" else p "hiyaa" end CR flow = <<-JS const value = "foo"; switch (value) { case "foo": console.log("yes"); break; case "bar": console.log("no"); break; default: console.log("hiyaa"); break; } JS Crow.convert(crystal).should eq flow end it "should support case statements without default" do crystal = <<-CR value = "foo" case value when "foo" p "yes" when "bar" p "no" end CR flow = <<-JS const value = "foo"; switch (value) { case "foo": console.log("yes"); break; case "bar": console.log("no"); break; } JS Crow.convert(crystal).should eq flow end it "should raise an exception when conditionless case statements are found" do crystal = <<-CR case when true p "yes" when false p "no" else p "hiyaa" end CR exception_raised = false begin Crow.convert(crystal) rescue e exception_raised = true e.message.should match /Case statements without conditions cannot be transpiled./ e.message.should match %r{See https://github.com/geppetto-apps/crow/issues/8/} ensure Crow.strict = false end exception_raised.should eq true end end
Add spec for missing else in case statement
Add spec for missing else in case statement
Crystal
mit
geppetto-apps/crow
crystal
## Code Before: require "../spec_helper" describe Crow do it "should convert simple case statements" do crystal = <<-CR value = "foo" case value when "foo" p "yes" when "bar" p "no" else p "hiyaa" end CR flow = <<-JS const value = "foo"; switch (value) { case "foo": console.log("yes"); break; case "bar": console.log("no"); break; default: console.log("hiyaa"); break; } JS Crow.convert(crystal).should eq flow end it "should raise an exception when conditionless case statements are found" do crystal = <<-CR case when true p "yes" when false p "no" else p "hiyaa" end CR exception_raised = false begin Crow.convert(crystal) rescue e exception_raised = true e.message.should match /Case statements without conditions cannot be transpiled./ e.message.should match %r{See https://github.com/geppetto-apps/crow/issues/8/} ensure Crow.strict = false end exception_raised.should eq true end end ## Instruction: Add spec for missing else in case statement ## Code After: require "../spec_helper" describe Crow do it "should convert simple case statements" do crystal = <<-CR value = "foo" case value when "foo" p "yes" when "bar" p "no" else p "hiyaa" end CR flow = <<-JS const value = "foo"; switch (value) { case "foo": console.log("yes"); break; case "bar": console.log("no"); break; default: console.log("hiyaa"); break; } JS Crow.convert(crystal).should eq flow end it "should support case statements without default" do crystal = <<-CR value = "foo" case value when "foo" p "yes" when "bar" p "no" end CR flow = <<-JS const value = "foo"; switch (value) { case "foo": console.log("yes"); break; case "bar": console.log("no"); break; } JS Crow.convert(crystal).should eq flow end it "should raise an exception when conditionless case statements are found" do crystal = <<-CR case when true p "yes" when false p "no" else p "hiyaa" end CR exception_raised = false begin Crow.convert(crystal) rescue e exception_raised = true e.message.should match /Case statements without conditions cannot be transpiled./ e.message.should match %r{See https://github.com/geppetto-apps/crow/issues/8/} ensure Crow.strict = false end exception_raised.should eq true end end
65f3644a962e0ff13bcfd837b3960c7aa6179ccb
packages/google-oauth/package.js
packages/google-oauth/package.js
Package.describe({ summary: "Google OAuth flow", version: "1.2.6", }); const cordovaPluginGooglePlusURL = // This revision is from the "update-entitlements-plist-files" branch. // This logic can be reverted when/if this PR is merged: // https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366 "https://github.com/meteor/cordova-plugin-googleplus.git#3095abe327e710ab04059ae9d3521bd4037c5a37"; Cordova.depends({ "cordova-plugin-googleplus": cordovaPluginGooglePlusURL }); Package.onUse(api => { api.use("ecmascript"); api.use('oauth2', ['client', 'server']); api.use('oauth', ['client', 'server']); api.use('http', ['server']); api.use('service-configuration'); api.use('random', 'client'); api.addFiles('google_server.js', 'server'); api.addFiles('google_client.js', 'client'); api.addFiles('google_sign-in.js', 'web.cordova'); api.mainModule('namespace.js'); api.export('Google'); });
Package.describe({ summary: "Google OAuth flow", version: "1.3.0", }); Cordova.depends({ "cordova-plugin-googleplus": "8.4.0", }); Package.onUse(api => { api.use("ecmascript"); api.use('oauth2', ['client', 'server']); api.use('oauth', ['client', 'server']); api.use('http', ['server']); api.use('service-configuration'); api.use('random', 'client'); api.addFiles('google_server.js', 'server'); api.addFiles('google_client.js', 'client'); api.addFiles('google_sign-in.js', 'web.cordova'); api.mainModule('namespace.js'); api.export('Google'); });
Stop using our fork of cordova-plugin-googleplus.
Stop using our fork of cordova-plugin-googleplus. The PR that we were waiting on got merged in April 2018: https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
javascript
## Code Before: Package.describe({ summary: "Google OAuth flow", version: "1.2.6", }); const cordovaPluginGooglePlusURL = // This revision is from the "update-entitlements-plist-files" branch. // This logic can be reverted when/if this PR is merged: // https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366 "https://github.com/meteor/cordova-plugin-googleplus.git#3095abe327e710ab04059ae9d3521bd4037c5a37"; Cordova.depends({ "cordova-plugin-googleplus": cordovaPluginGooglePlusURL }); Package.onUse(api => { api.use("ecmascript"); api.use('oauth2', ['client', 'server']); api.use('oauth', ['client', 'server']); api.use('http', ['server']); api.use('service-configuration'); api.use('random', 'client'); api.addFiles('google_server.js', 'server'); api.addFiles('google_client.js', 'client'); api.addFiles('google_sign-in.js', 'web.cordova'); api.mainModule('namespace.js'); api.export('Google'); }); ## Instruction: Stop using our fork of cordova-plugin-googleplus. The PR that we were waiting on got merged in April 2018: https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366 ## Code After: Package.describe({ summary: "Google OAuth flow", version: "1.3.0", }); Cordova.depends({ "cordova-plugin-googleplus": "8.4.0", }); Package.onUse(api => { api.use("ecmascript"); api.use('oauth2', ['client', 'server']); api.use('oauth', ['client', 'server']); api.use('http', ['server']); api.use('service-configuration'); api.use('random', 'client'); api.addFiles('google_server.js', 'server'); api.addFiles('google_client.js', 'client'); api.addFiles('google_sign-in.js', 'web.cordova'); api.mainModule('namespace.js'); api.export('Google'); });
6c696b9ddec9e85df253fddb6228549a24f4f26a
annotations/src/main/java/org/realityforge/arez/annotations/Computed.java
annotations/src/main/java/org/realityforge/arez/annotations/Computed.java
package org.realityforge.arez.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Methods marked with this annotation are computed values within Arez. * * <p>The method should take zero parameters and return a single value. The value * should be derived from other {@link org.realityforge.arez.Observable}s * within the Arez system and the value returned by the method should not change * unless the state of the other Observables changes. The method should NOT modify * other state in the system.</p> * * <p>The computed method is automatically wrapped in a READ_ONLY transaction * by the annotation parser.</p> */ @Retention( RetentionPolicy.CLASS ) @Target( ElementType.METHOD ) public @interface Computed { }
package org.realityforge.arez.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Methods marked with this annotation are computed values within Arez. * * <p>The method should take zero parameters and return a single value. The value * should be derived from other Observables within the Arez system and the value * returned by the method should not change unless the state of the other Observables * changes. The method should NOT modify other state in the system.</p> * * <p>The computed method is automatically wrapped in a READ_ONLY transaction * by the annotation parser.</p> */ @Retention( RetentionPolicy.CLASS ) @Target( ElementType.METHOD ) public @interface Computed { }
Fix javadocs cross link as Observable is not present locally
Fix javadocs cross link as Observable is not present locally
Java
apache-2.0
realityforge/arez,realityforge/arez,realityforge/arez
java
## Code Before: package org.realityforge.arez.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Methods marked with this annotation are computed values within Arez. * * <p>The method should take zero parameters and return a single value. The value * should be derived from other {@link org.realityforge.arez.Observable}s * within the Arez system and the value returned by the method should not change * unless the state of the other Observables changes. The method should NOT modify * other state in the system.</p> * * <p>The computed method is automatically wrapped in a READ_ONLY transaction * by the annotation parser.</p> */ @Retention( RetentionPolicy.CLASS ) @Target( ElementType.METHOD ) public @interface Computed { } ## Instruction: Fix javadocs cross link as Observable is not present locally ## Code After: package org.realityforge.arez.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Methods marked with this annotation are computed values within Arez. * * <p>The method should take zero parameters and return a single value. The value * should be derived from other Observables within the Arez system and the value * returned by the method should not change unless the state of the other Observables * changes. The method should NOT modify other state in the system.</p> * * <p>The computed method is automatically wrapped in a READ_ONLY transaction * by the annotation parser.</p> */ @Retention( RetentionPolicy.CLASS ) @Target( ElementType.METHOD ) public @interface Computed { }
60afe808e5f561f08e0c66b9f39a6bb8508da304
maven-plugin/src/main/java/sortpom/exception/ExceptionConverter.java
maven-plugin/src/main/java/sortpom/exception/ExceptionConverter.java
package sortpom.exception; import org.apache.maven.plugin.MojoFailureException; /** * Converts internal runtime FailureException in a method to a MojoFailureException in order to give nice output to * the Maven framework */ public class ExceptionConverter { private final Runnable method; private FailureException fex; public ExceptionConverter(Runnable method) { this.method = method; } public void executeAndConvertException() throws MojoFailureException { try { method.run(); } catch (FailureException fex) { this.fex = fex; } if (fex != null) { throwMojoFailureException(); } } private void throwMojoFailureException() throws MojoFailureException { if (fex.getCause() != null) { throw new MojoFailureException(fex.getMessage(), fex.getCause()); } else { throw new MojoFailureException(fex.getMessage()); } } }
package sortpom.exception; import org.apache.maven.plugin.MojoFailureException; /** * Converts internal runtime FailureException in a method to a MojoFailureException in order to give nice output to * the Maven framework */ public class ExceptionConverter { private final Runnable method; public ExceptionConverter(Runnable method) { this.method = method; } public void executeAndConvertException() throws MojoFailureException { try { method.run(); } catch (FailureException fex) { if (fex.getCause() != null) { throw new MojoFailureException(fex.getMessage(), fex.getCause()); } else { throw new MojoFailureException(fex.getMessage()); } } } }
Raise coverage. Lets see if this can work with JaCoCo
Raise coverage. Lets see if this can work with JaCoCo
Java
bsd-3-clause
Ekryd/sortpom
java
## Code Before: package sortpom.exception; import org.apache.maven.plugin.MojoFailureException; /** * Converts internal runtime FailureException in a method to a MojoFailureException in order to give nice output to * the Maven framework */ public class ExceptionConverter { private final Runnable method; private FailureException fex; public ExceptionConverter(Runnable method) { this.method = method; } public void executeAndConvertException() throws MojoFailureException { try { method.run(); } catch (FailureException fex) { this.fex = fex; } if (fex != null) { throwMojoFailureException(); } } private void throwMojoFailureException() throws MojoFailureException { if (fex.getCause() != null) { throw new MojoFailureException(fex.getMessage(), fex.getCause()); } else { throw new MojoFailureException(fex.getMessage()); } } } ## Instruction: Raise coverage. Lets see if this can work with JaCoCo ## Code After: package sortpom.exception; import org.apache.maven.plugin.MojoFailureException; /** * Converts internal runtime FailureException in a method to a MojoFailureException in order to give nice output to * the Maven framework */ public class ExceptionConverter { private final Runnable method; public ExceptionConverter(Runnable method) { this.method = method; } public void executeAndConvertException() throws MojoFailureException { try { method.run(); } catch (FailureException fex) { if (fex.getCause() != null) { throw new MojoFailureException(fex.getMessage(), fex.getCause()); } else { throw new MojoFailureException(fex.getMessage()); } } } }
3f90710beee3c098e440b8e6b69302e3d1e1f27e
deploy-requirements.txt
deploy-requirements.txt
akismet == 0.2.0 Django >= 1.2, < 1.3 django-registration == 0.7 docutils >= 0.6, < 0.7 FeedParser >= 4.1, < 5.0 Jinja2 >= 2.4, < 2.5 psycopg2 >= 2.2, < 2.3 Sphinx >= 0.6, < 0.7 Unipath >= 0.2, < 0.3 http://bitbucket.org/ubernostrum/django-contact-form/get/tip.bz2
akismet == 0.2.0 Django >= 1.2, < 1.3 django-registration == 0.7 docutils >= 0.6, < 0.7 FeedParser >= 4.1, < 5.0 Jinja2 >= 2.4, < 2.5 psycopg2 >= 2.2, < 2.3 python-memcached >= 1.45, < 2.0 Sphinx >= 0.6, < 0.7 Unipath >= 0.2, < 0.3 http://bitbucket.org/ubernostrum/django-contact-form/get/tip.bz2
Add python-memcached to the requirements.
Add python-memcached to the requirements.
Text
bsd-3-clause
vxvinh1511/djangoproject.com,vxvinh1511/djangoproject.com,rmoorman/djangoproject.com,relekang/djangoproject.com,hassanabidpk/djangoproject.com,khkaminska/djangoproject.com,xavierdutreilh/djangoproject.com,alawnchen/djangoproject.com,nanuxbe/django,hassanabidpk/djangoproject.com,alawnchen/djangoproject.com,relekang/djangoproject.com,khkaminska/djangoproject.com,khkaminska/djangoproject.com,nanuxbe/django,django/djangoproject.com,relekang/djangoproject.com,xavierdutreilh/djangoproject.com,khkaminska/djangoproject.com,django/djangoproject.com,rmoorman/djangoproject.com,relekang/djangoproject.com,gnarf/djangoproject.com,alawnchen/djangoproject.com,xavierdutreilh/djangoproject.com,django/djangoproject.com,django/djangoproject.com,gnarf/djangoproject.com,vxvinh1511/djangoproject.com,hassanabidpk/djangoproject.com,gnarf/djangoproject.com,nanuxbe/django,xavierdutreilh/djangoproject.com,alawnchen/djangoproject.com,rmoorman/djangoproject.com,gnarf/djangoproject.com,django/djangoproject.com,rmoorman/djangoproject.com,vxvinh1511/djangoproject.com,hassanabidpk/djangoproject.com,nanuxbe/django,django/djangoproject.com
text
## Code Before: akismet == 0.2.0 Django >= 1.2, < 1.3 django-registration == 0.7 docutils >= 0.6, < 0.7 FeedParser >= 4.1, < 5.0 Jinja2 >= 2.4, < 2.5 psycopg2 >= 2.2, < 2.3 Sphinx >= 0.6, < 0.7 Unipath >= 0.2, < 0.3 http://bitbucket.org/ubernostrum/django-contact-form/get/tip.bz2 ## Instruction: Add python-memcached to the requirements. ## Code After: akismet == 0.2.0 Django >= 1.2, < 1.3 django-registration == 0.7 docutils >= 0.6, < 0.7 FeedParser >= 4.1, < 5.0 Jinja2 >= 2.4, < 2.5 psycopg2 >= 2.2, < 2.3 python-memcached >= 1.45, < 2.0 Sphinx >= 0.6, < 0.7 Unipath >= 0.2, < 0.3 http://bitbucket.org/ubernostrum/django-contact-form/get/tip.bz2
a3eb7dc79bf6d4278f06954949efe0e28e1b49c5
Source/Clients/ApiClient.swift
Source/Clients/ApiClient.swift
// // RepositoriesClient.swift // GithubClient // // Created by Eduardo Arenas on 8/5/17. // Copyright © 2017 GameChanger. All rights reserved. // import Foundation import RxSwift public class ApiClient { let decoder = JSONDecoder() private let httpService = HTTPService() private let headers: [String: CustomStringConvertible] public init(authorizationToken: String) { headers = ["Authorization": authorizationToken, "Accept": "application/vnd.github.v3+json"] decoder.dateDecodingStrategy = .iso8601 } func get<T: Decodable>(apiUrl: ApiUrl, parameters: [ApiParameter?]? = nil) -> Observable<T> { let queryDict = parameters.flatMap { CustomApiParameter.queryDict(forParameters: $0) } return httpService.get(url: apiUrl.fullPath, query: queryDict, headers: headers) .map { return try self.decoder.decode(T.self, from: $0.0) } } }
// // RepositoriesClient.swift // GithubClient // // Created by Eduardo Arenas on 8/5/17. // Copyright © 2017 GameChanger. All rights reserved. // import Foundation import RxSwift public class ApiClient { let encoder = JSONEncoder() let decoder = JSONDecoder() private let httpService = HTTPService() private let headers: [String: CustomStringConvertible] public init(authorizationToken: String) { headers = ["Authorization": authorizationToken, "Accept": "application/vnd.github.v3+json"] encoder.dateEncodingStrategy = .iso8601 decoder.dateDecodingStrategy = .iso8601 } func get<T: Decodable>(apiUrl: ApiUrl, parameters: [ApiParameter?]? = nil) -> Observable<T> { let queryDict = parameters.flatMap { CustomApiParameter.queryDict(forParameters: $0) } return httpService.get(url: apiUrl.fullPath, query: queryDict, headers: headers) .map { return try self.decoder.decode(T.self, from: $0.0) } } func patch<U: Encodable, R: Decodable>(apiUrl: ApiUrl, object: U) -> Observable<R> { return httpService.patch(url: apiUrl.fullPath, data: try! encoder.encode(object), headers: headers) .map { return try self.decoder.decode(R.self, from: $0.0) } } }
Add patch method taking an Encodable object to the API Client
Add patch method taking an Encodable object to the API Client
Swift
mit
eduarenas/GithubClient
swift
## Code Before: // // RepositoriesClient.swift // GithubClient // // Created by Eduardo Arenas on 8/5/17. // Copyright © 2017 GameChanger. All rights reserved. // import Foundation import RxSwift public class ApiClient { let decoder = JSONDecoder() private let httpService = HTTPService() private let headers: [String: CustomStringConvertible] public init(authorizationToken: String) { headers = ["Authorization": authorizationToken, "Accept": "application/vnd.github.v3+json"] decoder.dateDecodingStrategy = .iso8601 } func get<T: Decodable>(apiUrl: ApiUrl, parameters: [ApiParameter?]? = nil) -> Observable<T> { let queryDict = parameters.flatMap { CustomApiParameter.queryDict(forParameters: $0) } return httpService.get(url: apiUrl.fullPath, query: queryDict, headers: headers) .map { return try self.decoder.decode(T.self, from: $0.0) } } } ## Instruction: Add patch method taking an Encodable object to the API Client ## Code After: // // RepositoriesClient.swift // GithubClient // // Created by Eduardo Arenas on 8/5/17. // Copyright © 2017 GameChanger. All rights reserved. // import Foundation import RxSwift public class ApiClient { let encoder = JSONEncoder() let decoder = JSONDecoder() private let httpService = HTTPService() private let headers: [String: CustomStringConvertible] public init(authorizationToken: String) { headers = ["Authorization": authorizationToken, "Accept": "application/vnd.github.v3+json"] encoder.dateEncodingStrategy = .iso8601 decoder.dateDecodingStrategy = .iso8601 } func get<T: Decodable>(apiUrl: ApiUrl, parameters: [ApiParameter?]? = nil) -> Observable<T> { let queryDict = parameters.flatMap { CustomApiParameter.queryDict(forParameters: $0) } return httpService.get(url: apiUrl.fullPath, query: queryDict, headers: headers) .map { return try self.decoder.decode(T.self, from: $0.0) } } func patch<U: Encodable, R: Decodable>(apiUrl: ApiUrl, object: U) -> Observable<R> { return httpService.patch(url: apiUrl.fullPath, data: try! encoder.encode(object), headers: headers) .map { return try self.decoder.decode(R.self, from: $0.0) } } }
f11197fd04d7da609b377694d601358d32bf70c2
lib/elixir/mix.exs
lib/elixir/mix.exs
defmodule Elixir.Mixfile do use Mix.Project def project do [app: :elixir, version: System.version, build_per_environment: false, escript: [ embed_elixir: false, main_module: :elixir, emu_args: "%%! -noshell\n" ]] end end
defmodule Elixir.Mixfile do use Mix.Project def project do [app: :elixir, version: System.version, build_per_environment: false] end end
Remove escript from elixir app
Remove escript from elixir app
Elixir
apache-2.0
gfvcastro/elixir,kimshrier/elixir,kimshrier/elixir,gfvcastro/elixir,kelvinst/elixir,lexmag/elixir,pedrosnk/elixir,beedub/elixir,kelvinst/elixir,lexmag/elixir,ggcampinho/elixir,pedrosnk/elixir,ggcampinho/elixir,elixir-lang/elixir,antipax/elixir,joshprice/elixir,michalmuskala/elixir,beedub/elixir,antipax/elixir
elixir
## Code Before: defmodule Elixir.Mixfile do use Mix.Project def project do [app: :elixir, version: System.version, build_per_environment: false, escript: [ embed_elixir: false, main_module: :elixir, emu_args: "%%! -noshell\n" ]] end end ## Instruction: Remove escript from elixir app ## Code After: defmodule Elixir.Mixfile do use Mix.Project def project do [app: :elixir, version: System.version, build_per_environment: false] end end
39329d8c76715bb19cd5b03934563734654bed7e
ReactiveCocoa/NSObject+BindingTarget.swift
ReactiveCocoa/NSObject+BindingTarget.swift
import Foundation import ReactiveSwift extension Reactive where Base: NSObject { /// Creates a binding target which uses the lifetime of the object, and weakly /// references the object so that the supplied `action` is triggered only if /// the object has not deinitialized. /// /// - important: The binding target is bound to the main queue. /// /// - parameters: /// - action: The action to consume values from the bindings. /// /// - returns: /// A binding target that holds no strong references to the object. internal func makeBindingTarget<U>(action: @escaping (Base, U) -> Void) -> BindingTarget<U> { let scheduler = associatedValue { _ in UIScheduler() } return BindingTarget(on: scheduler, lifetime: lifetime) { [weak base = self.base] value in if let base = base { action(base, value) } } } }
import Foundation import ReactiveSwift extension Reactive where Base: NSObject { /// Creates a binding target which uses the lifetime of the object, and weakly /// references the object so that the supplied `action` is triggered only if /// the object has not deinitialized. /// /// - important: The binding target is bound to the main queue. /// /// - parameters: /// - action: The action to consume values from the bindings. /// /// - returns: /// A binding target that holds no strong references to the object. internal func makeBindingTarget<U>(_ key: StaticString = #function, action: @escaping (Base, U) -> Void) -> BindingTarget<U> { return BindingTarget(on: UIScheduler(), lifetime: lifetime) { [weak base = self.base] value in if let base = base { action(base, value) } } } }
Create one `UIScheduler` for each instance of binding target.
Create one `UIScheduler` for each instance of binding target.
Swift
mit
calebd/ReactiveCocoa,walkingsmarts/ReactiveCocoa,walkingsmarts/ReactiveCocoa,ohwutup/ReactiveCocoa,ohwutup/ReactiveCocoa,ohwutup/ReactiveCocoa,calebd/ReactiveCocoa,walkingsmarts/ReactiveCocoa,calebd/ReactiveCocoa
swift
## Code Before: import Foundation import ReactiveSwift extension Reactive where Base: NSObject { /// Creates a binding target which uses the lifetime of the object, and weakly /// references the object so that the supplied `action` is triggered only if /// the object has not deinitialized. /// /// - important: The binding target is bound to the main queue. /// /// - parameters: /// - action: The action to consume values from the bindings. /// /// - returns: /// A binding target that holds no strong references to the object. internal func makeBindingTarget<U>(action: @escaping (Base, U) -> Void) -> BindingTarget<U> { let scheduler = associatedValue { _ in UIScheduler() } return BindingTarget(on: scheduler, lifetime: lifetime) { [weak base = self.base] value in if let base = base { action(base, value) } } } } ## Instruction: Create one `UIScheduler` for each instance of binding target. ## Code After: import Foundation import ReactiveSwift extension Reactive where Base: NSObject { /// Creates a binding target which uses the lifetime of the object, and weakly /// references the object so that the supplied `action` is triggered only if /// the object has not deinitialized. /// /// - important: The binding target is bound to the main queue. /// /// - parameters: /// - action: The action to consume values from the bindings. /// /// - returns: /// A binding target that holds no strong references to the object. internal func makeBindingTarget<U>(_ key: StaticString = #function, action: @escaping (Base, U) -> Void) -> BindingTarget<U> { return BindingTarget(on: UIScheduler(), lifetime: lifetime) { [weak base = self.base] value in if let base = base { action(base, value) } } } }
52310432d6cca88d4aed877b2924500ca4c9913a
.travis.yml
.travis.yml
language: python - "3.2" - "3.4" - "3.5" - "3.6" before_install: - sudo apt-get update -qq - sudo apt-get install -qq python3-pip python3-numpy python3-scipy python3-matplotlib python3-nose - sudo pip3 install codecov rednose nose coverage six toolz nose-parameterized codeclimate-test-reporter cache: pip script: nosetests3 dist: trusty after_success: codecov --token=e3a3e622-b5b4-40a0-b0be-f427bbb23449 CODECLIMATE_REPO_TOKEN=71eb68ef3ba1f85d8e92407d03e43df51deb6f14a870ada23e8530a16d438eae codeclimate-test-reporter
language: python - "3.2" - "3.4" - "3.5" - "3.6" before_install: - sudo apt-get update -qq - sudo apt-get install -qq python3-pip python3-numpy python3-scipy python3-matplotlib python3-nose - sudo pip3 install codecov rednose nose coverage six toolz nose-parameterized codeclimate-test-reporter cache: pip script: nosetests3 dist: trusty after_success: - codeclimate-test-reporter --token 71eb68ef3ba1f85d8e92407d03e43df51deb6f14a870ada23e8530a16d438eae - codecov --token=e3a3e622-b5b4-40a0-b0be-f427bbb23449
Use codeclimate token as CLI arg rather than as env variable
Use codeclimate token as CLI arg rather than as env variable
YAML
apache-2.0
ulikoehler/UliEngineering
yaml
## Code Before: language: python - "3.2" - "3.4" - "3.5" - "3.6" before_install: - sudo apt-get update -qq - sudo apt-get install -qq python3-pip python3-numpy python3-scipy python3-matplotlib python3-nose - sudo pip3 install codecov rednose nose coverage six toolz nose-parameterized codeclimate-test-reporter cache: pip script: nosetests3 dist: trusty after_success: codecov --token=e3a3e622-b5b4-40a0-b0be-f427bbb23449 CODECLIMATE_REPO_TOKEN=71eb68ef3ba1f85d8e92407d03e43df51deb6f14a870ada23e8530a16d438eae codeclimate-test-reporter ## Instruction: Use codeclimate token as CLI arg rather than as env variable ## Code After: language: python - "3.2" - "3.4" - "3.5" - "3.6" before_install: - sudo apt-get update -qq - sudo apt-get install -qq python3-pip python3-numpy python3-scipy python3-matplotlib python3-nose - sudo pip3 install codecov rednose nose coverage six toolz nose-parameterized codeclimate-test-reporter cache: pip script: nosetests3 dist: trusty after_success: - codeclimate-test-reporter --token 71eb68ef3ba1f85d8e92407d03e43df51deb6f14a870ada23e8530a16d438eae - codecov --token=e3a3e622-b5b4-40a0-b0be-f427bbb23449
fc0cb25c0c9c34b3ce79666f4e9b0550bde35bf6
src/Tab.js
src/Tab.js
import React, { Component, Children, PropTypes } from 'react' export function Tab(props, {activeTab, changeTab}) { const onClick = (e) => { e.preventDefault() changeTab(props.for) } let active = props.for === activeTab if (props.render) { return(props.render({active, changeTab: () => changeTab(props.for) })) } let className = active ? 'active' : null return( <li key={props.for} role="tab" className={className}> <a href={`#${props.for}`} onClick={e => onClick(e)}> {props.children} </a> </li> ) } Tab.propTypes = { for: PropTypes.string.isRequired, render: PropTypes.func } Tab.contextTypes = { activeTab: PropTypes.string, changeTab: PropTypes.func }
import React, { Component, Children, PropTypes } from 'react' export function Tab(props, {activeTab, changeTab}) { const onClick = (e) => { e.preventDefault() changeTab(props.for) } let active = props.for === activeTab if (props.render) { return(props.render({active, changeTab: () => changeTab(props.for) })) } let className = active ? 'active' : null return( <li key={props.for} role="tab" className='nav-item'> <a href={`#${props.for}`} className={'nav-link ' + className} onClick={e => onClick(e)}> {props.children} </a> </li> ) } Tab.propTypes = { for: PropTypes.string.isRequired, render: PropTypes.func } Tab.contextTypes = { activeTab: PropTypes.string, changeTab: PropTypes.func }
Use bootstrap4 markup for tabs
Use bootstrap4 markup for tabs
JavaScript
mit
mateomurphy/react-tabbed
javascript
## Code Before: import React, { Component, Children, PropTypes } from 'react' export function Tab(props, {activeTab, changeTab}) { const onClick = (e) => { e.preventDefault() changeTab(props.for) } let active = props.for === activeTab if (props.render) { return(props.render({active, changeTab: () => changeTab(props.for) })) } let className = active ? 'active' : null return( <li key={props.for} role="tab" className={className}> <a href={`#${props.for}`} onClick={e => onClick(e)}> {props.children} </a> </li> ) } Tab.propTypes = { for: PropTypes.string.isRequired, render: PropTypes.func } Tab.contextTypes = { activeTab: PropTypes.string, changeTab: PropTypes.func } ## Instruction: Use bootstrap4 markup for tabs ## Code After: import React, { Component, Children, PropTypes } from 'react' export function Tab(props, {activeTab, changeTab}) { const onClick = (e) => { e.preventDefault() changeTab(props.for) } let active = props.for === activeTab if (props.render) { return(props.render({active, changeTab: () => changeTab(props.for) })) } let className = active ? 'active' : null return( <li key={props.for} role="tab" className='nav-item'> <a href={`#${props.for}`} className={'nav-link ' + className} onClick={e => onClick(e)}> {props.children} </a> </li> ) } Tab.propTypes = { for: PropTypes.string.isRequired, render: PropTypes.func } Tab.contextTypes = { activeTab: PropTypes.string, changeTab: PropTypes.func }
bbc0e376c0af7db58ed011b8dae8541185d98aa3
_layouts/default.html
_layouts/default.html
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> {% include head.html %} <body> <div class="container content"> <div class="masthead"> <h3 class="masthead-title"> <a href="{{ site.baseurl }}" title="Home">{{ site.title }}</a> <small>{{ site.tagline }}</small> </h3> </div> {{ content }} <div class="footer"> <p> &copy; <time datetime="{{ site.time | date_to_xmlschema}}">{{ site.time | date: '%Y' }}</time>. All rights reserved. </p> </div> </div> </body> </html>
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> {% include head.html %} <body> <div class="container content"> <div class="masthead"> <h3 class="masthead-title"> <a href="{{ site.baseurl }}" title="Home">{{ site.title }}</a> <small>{{ site.tagline }}</small> </h3> </div> {{ content }} <div class="footer"> <small> &copy; <time datetime="{{ site.time | date_to_xmlschema}}">{{ site.time | date: '%Y' }}</time>. All rights reserved. </small> </div> </div> </body> </html>
Use <small> for the copyright
Use <small> for the copyright This follows the new semantic meaning of <small> in HTML 5 Quoting the spec: > Small print typically features disclaimers, caveats, legal restrictions, > or copyrights. Small print is also sometimes used for attribution, or > for satisfying licensing requirements.
HTML
mit
iron-coder-challenges/iron-coder-challenges.github.io,izak/izak.github.io,vigneshrdotin/poole,addr/addr.github.io,kamn/kamn.github.io,MobilabSP/poole,anokun7/poole,toanbs/toanbs.github.io,jamj2000/jamj2000.github.io,paperstreet/paperstreet.github.io,JacksonBates/blog,aaewong/poole,coded-aesthetics/blog,angryfrenchguy/angryfrenchguy.github.io,stefan-ka/stefan-ka.github.io,nmasse-itix/nmasse-itix.github.io,orchid-hybrid/orchid-hybrid.github.io,kpmy/kpmy.github.io,mzgreen/mzgreen.github.io,T-X/c0d3.blue,heron2014/poole,MiguelCatalan/miguelcatalan.github.io,algolia-plus/algolia-plus.github.io,Teino1978-Corp/Teino1978-Corp-poole,mr-v/mr-v.github.io,puresol/thehub,willhlaw/blog,giannid/blog,bobsica/bobsica.github.io,cecilelepape/cecilelepape.github.io,iarenzana/iarenzana.github.io,pandasuite/fr,Mycaster/poole,arkane0906/arkane0906.github.io,khoepli/khoepli.github.io,SyedWasiHaider/blog,abitdodgy/poole,jftsaraiva/jftsaraiva.github.io,mikemackintosh/mikemackintosh.github.io,arkane0906/arkane0906.github.io,mingkim/poole,jholl/queenscloth.com,v3rbal/giron.me,MiguelCatalan/miguelcatalan.github.io,mautematico/blog,db42/db42.github.io,tomwright01/tomwright01.github.io,pagination-demo/pagination-demo.github.io,ishan-marikar/poole,select-artur/select-artur.github.io,TomoGraphics/poole,timwilkens/timwilkens.github.io,kamn/kamn.github.io,vasileboris/vasileboris.github.io,EricCrosson/ericcrosson.github.io,cpoff/poole,joenewbry/blog,iarenzana/iarenzana.github.io,cottrell/jekyll-mathjax-template-blog,koalabears/poole,jmarin/jmarin.github.io,BrightCanopy/blog,bogdanm/bogdanm.github.io,The-700nm-Physicist/The-700nm-Physicist.github.io,jeroenlaven90/jeroenlaven90,bradfordbarr/blog,jamj2000/jamj2000.github.io,siunegu/siunegu.github.io,jeroenlaven90/jeroenlaven90,siunegu/siunegu.github.io,mhartkorn/jekyll-theme,lgvalle/poole,jftsaraiva/jftsaraiva.github.io,mattcleaver/poole,lncosie/poole,johnbellone/johnbellone.github.io,pankajinertiate/pankajinertiate.github.io,debearchive/debearchive.github.io,billpmurphy/billpmurphy.github.io,kunyao/kunyao.github.io,Zanadar/poole,mautematico/blog,DivyanshSaini/DivyanshSaini.github.io,jamhung/jamhung.github.io,droidkid/droidkid.github.io,deepakbenny/deepakbenny.github.io,rubek/poole,kyungmi/kyungmi.github.io,jcorsino/johncorsinopt.github.io,cynthiaechen/poole,hmillar/hmillar.github.io,thinkxl/thinkxl.github.io,flyingforks/flyingforks.github.io,jmssmth/jso_new,JacksonBates/blog,periloso/poole,elisaapra/elisaapra.github.io,dxuehu/dxuehu.github.io,tenkunkyab/tenkunkyab.github.io,3rr0rb0x/3rr0rb0x.github.io,gavra0/igavrilovic,JoanM/JoanM.github.io,bparafina/nothingworks.github.io,DeepSpawn/blog,bobsica/bobsica.github.io,scriptstar/TechBlog,jamj2000/jamj2000.github.io,jgrotts/jgrotts.github.io,EigenFace/EigenFace.github.io,Alderian/poole,chrismp/poole,iamarmanjon/blog,mnmlyf/mnmlyf.github.io,bstil22/bstil22.github.io,starlingandjack/starlingandjack.github.io,hershic/hershic.github.io,sveinchen/nievs,Waistcoat/Waistcoat.github.io,dlblr/dlblr.github.io,cottrell/jekyll-mathjax-template-blog,debearchive/debearchive.github.io,MiguelCatalan/miguelcatalan.github.io,jamj2000/jamj2000.github.io,bipinnavlakha/temp,kemaswill/poole,ramseeker/newjims,JacksonBates/blog,flevour/poole,EricCrosson/ericcrosson.github.io,pankajghosh/pankajghosh.github.io,dpford/dpford.github.io,hellfish2/poole,DeepSpawn/blog,MiguelCatalan/miguelcatalan.github.io,farhampton35/farhampton35.github.io,rtfmp/rtfmp.github.io,mikemackintosh/mikemackintosh.github.io,izak/izak.github.io,dansef/poole,addr/addr.github.io,stefan-ka/stefan-ka.github.io,11Macintyre/11macintyre.github.io,githubsmilo/githubsmilo.github.io,andrewflack/andrewflack.github.io,pandasuite/en,colonelmo/colonelmo.github.com,anjesh/anjesh.github.io,resir014/poole,gristv/gristv.github.io,kyungmi/poole,htmlzeta/htmlzeta.github.io,JacksonBates/blog,andrewflack/andrewflack.github.io,mattcleaver/poole,markolenik/markolenik.github.io,geoffyuen/geoffyuen.github.io,ramseeker/newjims,jhylee/poole,mmazzarolo/poole
html
## Code Before: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> {% include head.html %} <body> <div class="container content"> <div class="masthead"> <h3 class="masthead-title"> <a href="{{ site.baseurl }}" title="Home">{{ site.title }}</a> <small>{{ site.tagline }}</small> </h3> </div> {{ content }} <div class="footer"> <p> &copy; <time datetime="{{ site.time | date_to_xmlschema}}">{{ site.time | date: '%Y' }}</time>. All rights reserved. </p> </div> </div> </body> </html> ## Instruction: Use <small> for the copyright This follows the new semantic meaning of <small> in HTML 5 Quoting the spec: > Small print typically features disclaimers, caveats, legal restrictions, > or copyrights. Small print is also sometimes used for attribution, or > for satisfying licensing requirements. ## Code After: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> {% include head.html %} <body> <div class="container content"> <div class="masthead"> <h3 class="masthead-title"> <a href="{{ site.baseurl }}" title="Home">{{ site.title }}</a> <small>{{ site.tagline }}</small> </h3> </div> {{ content }} <div class="footer"> <small> &copy; <time datetime="{{ site.time | date_to_xmlschema}}">{{ site.time | date: '%Y' }}</time>. All rights reserved. </small> </div> </div> </body> </html>
62d9d3cfb2c9e7ad5406e3f8a785d79a787b3bfe
tests/Kwc/Trl/Table/Root/Master.php
tests/Kwc/Trl/Table/Root/Master.php
<?php class Kwc_Trl_Table_Root_Master extends Kwc_Abstract { public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['table'] = array( 'class' => 'Kwf_Component_Generator_Page_Static', 'component' => 'Kwc_Trl_Table_Table_Component', 'name' => 'table', ); return $ret; } }
<?php class Kwc_Trl_Table_Root_Master extends Kwc_Root_TrlRoot_Master_Component { public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['table'] = array( 'class' => 'Kwf_Component_Generator_Page_Static', 'component' => 'Kwc_Trl_Table_Table_Component', 'name' => 'table', ); unset($ret['generators']['flag']); unset($ret['generators']['box']); unset($ret['generators']['category']); return $ret; } }
Fix setup for table trl test
Fix setup for table trl test
PHP
bsd-2-clause
yacon/koala-framework,kaufmo/koala-framework,Sogl/koala-framework,Ben-Ho/koala-framework,Ben-Ho/koala-framework,darimpulso/koala-framework,nsams/koala-framework,fraxachun/koala-framework,darimpulso/koala-framework,yacon/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework,Sogl/koala-framework,fraxachun/koala-framework,nsams/koala-framework,nsams/koala-framework,yacon/koala-framework
php
## Code Before: <?php class Kwc_Trl_Table_Root_Master extends Kwc_Abstract { public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['table'] = array( 'class' => 'Kwf_Component_Generator_Page_Static', 'component' => 'Kwc_Trl_Table_Table_Component', 'name' => 'table', ); return $ret; } } ## Instruction: Fix setup for table trl test ## Code After: <?php class Kwc_Trl_Table_Root_Master extends Kwc_Root_TrlRoot_Master_Component { public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['table'] = array( 'class' => 'Kwf_Component_Generator_Page_Static', 'component' => 'Kwc_Trl_Table_Table_Component', 'name' => 'table', ); unset($ret['generators']['flag']); unset($ret['generators']['box']); unset($ret['generators']['category']); return $ret; } }
6479d9dc301f9e5c32f236d004aa292d27d3b87f
src/main/java/rewbot/minecraft/tutorial/blocks/AdventureBlock.java
src/main/java/rewbot/minecraft/tutorial/blocks/AdventureBlock.java
package rewbot.minecraft.tutorial.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import rewbot.minecraft.tutorial.MmaGlobal; /** * Created by ashepherd on 5/12/2016. */ public class AdventureBlock extends Block { public AdventureBlock(String unlocalizedName, Material material, float hardness, float resistance) { super(material); this.setUnlocalizedName(unlocalizedName); this.setHardness(hardness); this.setResistance(resistance); setCreativeTab(MmaGlobal.mmaCreativeTab); } }
package rewbot.minecraft.tutorial.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import rewbot.minecraft.tutorial.MmaGlobal; import rewbot.minecraft.tutorial.items.AdventureItems; import java.util.Random; /** * Created by ashepherd on 5/12/2016. */ public class AdventureBlock extends Block { public AdventureBlock(String unlocalizedName, Material material, float hardness, float resistance) { super(material); this.setUnlocalizedName(unlocalizedName); this.setHardness(hardness); this.setResistance(resistance); setCreativeTab(MmaGlobal.mmaCreativeTab); } public Item getItemDropped(IBlockState state, Random rand, int fortune) { return this == AdventureBlocks.topazOre ? AdventureItems.topazStone : Item.getItemFromBlock(this); } public int quantityDropped(Random rand) { return this == AdventureBlocks.topazOre ? 1 + rand.nextInt(5) : 1; } }
Drop random number of topaz stones on topaz ore break
Drop random number of topaz stones on topaz ore break
Java
lgpl-2.1
rewbotV86/minecraft-modding-adventure
java
## Code Before: package rewbot.minecraft.tutorial.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import rewbot.minecraft.tutorial.MmaGlobal; /** * Created by ashepherd on 5/12/2016. */ public class AdventureBlock extends Block { public AdventureBlock(String unlocalizedName, Material material, float hardness, float resistance) { super(material); this.setUnlocalizedName(unlocalizedName); this.setHardness(hardness); this.setResistance(resistance); setCreativeTab(MmaGlobal.mmaCreativeTab); } } ## Instruction: Drop random number of topaz stones on topaz ore break ## Code After: package rewbot.minecraft.tutorial.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import rewbot.minecraft.tutorial.MmaGlobal; import rewbot.minecraft.tutorial.items.AdventureItems; import java.util.Random; /** * Created by ashepherd on 5/12/2016. */ public class AdventureBlock extends Block { public AdventureBlock(String unlocalizedName, Material material, float hardness, float resistance) { super(material); this.setUnlocalizedName(unlocalizedName); this.setHardness(hardness); this.setResistance(resistance); setCreativeTab(MmaGlobal.mmaCreativeTab); } public Item getItemDropped(IBlockState state, Random rand, int fortune) { return this == AdventureBlocks.topazOre ? AdventureItems.topazStone : Item.getItemFromBlock(this); } public int quantityDropped(Random rand) { return this == AdventureBlocks.topazOre ? 1 + rand.nextInt(5) : 1; } }
a3f204ad0b9e90770d0975bd027a7de21a60b054
patches/out_of_process_instance.patch
patches/out_of_process_instance.patch
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index af5d1a506fbb..839d5007f7dd 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc @@ -48,6 +48,7 @@ namespace chrome_pdf { const char kChromePrint[] = "chrome://print/"; const char kChromeExtension[] = "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai"; +const char kChromeUIPdfViewer[] = "chrome://pdf-viewer"; // Constants used in handling postMessage() messages. const char kType[] = "type"; @@ -323,7 +324,8 @@ bool OutOfProcessInstance::Init(uint32_t argc, std::string document_url = document_url_var.AsString(); base::StringPiece document_url_piece(document_url); if (!document_url_piece.starts_with(kChromeExtension) && - !document_url_piece.starts_with(kChromePrint)) { + !document_url_piece.starts_with(kChromePrint) && + !document_url_piece.starts_with(kChromeUIPdfViewer)) { return false; }
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index 1fa0964..06e5ad8 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc @@ -336,6 +336,7 @@ bool OutOfProcessInstance::Init(uint32_t argc, base::StringPiece document_url_piece(document_url); is_print_preview_ = document_url_piece.starts_with(kChromePrint); if (!document_url_piece.starts_with(kChromeExtension) && + !document_url_piece.starts_with("chrome://pdf-viewer") && !is_print_preview_) { return false; }
Update patch for Chrome 56
Update patch for Chrome 56
Diff
mit
electron/libchromiumcontent,atom/libchromiumcontent,electron/libchromiumcontent,atom/libchromiumcontent
diff
## Code Before: diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index af5d1a506fbb..839d5007f7dd 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc @@ -48,6 +48,7 @@ namespace chrome_pdf { const char kChromePrint[] = "chrome://print/"; const char kChromeExtension[] = "chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai"; +const char kChromeUIPdfViewer[] = "chrome://pdf-viewer"; // Constants used in handling postMessage() messages. const char kType[] = "type"; @@ -323,7 +324,8 @@ bool OutOfProcessInstance::Init(uint32_t argc, std::string document_url = document_url_var.AsString(); base::StringPiece document_url_piece(document_url); if (!document_url_piece.starts_with(kChromeExtension) && - !document_url_piece.starts_with(kChromePrint)) { + !document_url_piece.starts_with(kChromePrint) && + !document_url_piece.starts_with(kChromeUIPdfViewer)) { return false; } ## Instruction: Update patch for Chrome 56 ## Code After: diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc index 1fa0964..06e5ad8 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc @@ -336,6 +336,7 @@ bool OutOfProcessInstance::Init(uint32_t argc, base::StringPiece document_url_piece(document_url); is_print_preview_ = document_url_piece.starts_with(kChromePrint); if (!document_url_piece.starts_with(kChromeExtension) && + !document_url_piece.starts_with("chrome://pdf-viewer") && !is_print_preview_) { return false; }
c2cb488550521bf667c159c1a921c37f0d994280
resources/views/partials/editor.blade.php
resources/views/partials/editor.blade.php
<script src="http://cdn.tinymce.com/4/tinymce.min.js"></script> <script> tinymce.init( { selector: ".has_editor", menubar: false, plugins: [ "lists link image textcolor", ], formats: { forecolor: {inline: 'span', classes: 'forecolor', styles:{color: "%value"}} }, textcolor_map: [ "0c0934", "Dark Blue", "152845", "Blue", "CACEE8", "Sky Blue", "E5DED8", "Mushy White", "2F0000", "Cherry" ], toolbar: [ "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", "fontsizeselect | forecolor backcolor" ] }) </script>
<script src="http://cdn.tinymce.com/4/tinymce.min.js"></script> <script> tinymce.init( { selector: ".has_editor", menubar: false, plugins: [ "lists link image textcolor paste", ], paste_as_text: true, formats: { forecolor: {inline: 'span', classes: 'forecolor', styles:{color: "%value"}} }, textcolor_map: [ "0c0934", "Dark Blue", "152845", "Blue", "CACEE8", "Sky Blue", "E5DED8", "Mushy White", "2F0000", "Cherry" ], toolbar: [ "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", "fontsizeselect | forecolor backcolor" ] }) </script>
Add paste plugin and set it to remove formatting
Add paste plugin and set it to remove formatting
PHP
mit
saleone/obscuris,saleone/obscuris,saleone/obscuris
php
## Code Before: <script src="http://cdn.tinymce.com/4/tinymce.min.js"></script> <script> tinymce.init( { selector: ".has_editor", menubar: false, plugins: [ "lists link image textcolor", ], formats: { forecolor: {inline: 'span', classes: 'forecolor', styles:{color: "%value"}} }, textcolor_map: [ "0c0934", "Dark Blue", "152845", "Blue", "CACEE8", "Sky Blue", "E5DED8", "Mushy White", "2F0000", "Cherry" ], toolbar: [ "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", "fontsizeselect | forecolor backcolor" ] }) </script> ## Instruction: Add paste plugin and set it to remove formatting ## Code After: <script src="http://cdn.tinymce.com/4/tinymce.min.js"></script> <script> tinymce.init( { selector: ".has_editor", menubar: false, plugins: [ "lists link image textcolor paste", ], paste_as_text: true, formats: { forecolor: {inline: 'span', classes: 'forecolor', styles:{color: "%value"}} }, textcolor_map: [ "0c0934", "Dark Blue", "152845", "Blue", "CACEE8", "Sky Blue", "E5DED8", "Mushy White", "2F0000", "Cherry" ], toolbar: [ "undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", "fontsizeselect | forecolor backcolor" ] }) </script>
02f47c024ff6edab4119e1c5fd9d6631020dc9b6
app/controllers/scribbles_controller.rb
app/controllers/scribbles_controller.rb
class ScribblesController < ApplicationController def create if scribble_params['id'] == "" @scribble = Scribble.new(scribble_params) else @scribble = Scribble.find(scribble_params['id']) @scribble.update_attributes(scribble_params) end @scribble.save respond_to do |format| format.json { render :json => @post } end end private def scribble_params params[:scribble].slice :content, :std_course_id, :scribing_answer_id, :id end end
class ScribblesController < ApplicationController def create if scribble_params['id'] != "" @scribble = Scribble.find(scribble_params['id']) else @scribble = Scribble.where({ std_course_id: scribble_params[:std_course_id], scribing_answer_id: scribble_params[:scribing_answer_id] }).first end if @scribble @scribble.update_attributes(scribble_params) else @scribble = Scribble.new(scribble_params) end @scribble.save respond_to do |format| format.json { render :json => @post } end end private def scribble_params params[:scribble].slice :content, :std_course_id, :scribing_answer_id, :id end end
Fix bug -- multiple scribbles was created per user unless user refreshes page after first scribble
Fix bug -- multiple scribbles was created per user unless user refreshes page after first scribble
Ruby
mit
Coursemology/coursemology.org,nnamon/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,allenwq/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,dariusf/coursemology.org,nnamon/coursemology.org,nnamon/coursemology.org,dariusf/coursemology.org,dariusf/coursemology.org,Coursemology/coursemology.org,Coursemology/coursemology.org
ruby
## Code Before: class ScribblesController < ApplicationController def create if scribble_params['id'] == "" @scribble = Scribble.new(scribble_params) else @scribble = Scribble.find(scribble_params['id']) @scribble.update_attributes(scribble_params) end @scribble.save respond_to do |format| format.json { render :json => @post } end end private def scribble_params params[:scribble].slice :content, :std_course_id, :scribing_answer_id, :id end end ## Instruction: Fix bug -- multiple scribbles was created per user unless user refreshes page after first scribble ## Code After: class ScribblesController < ApplicationController def create if scribble_params['id'] != "" @scribble = Scribble.find(scribble_params['id']) else @scribble = Scribble.where({ std_course_id: scribble_params[:std_course_id], scribing_answer_id: scribble_params[:scribing_answer_id] }).first end if @scribble @scribble.update_attributes(scribble_params) else @scribble = Scribble.new(scribble_params) end @scribble.save respond_to do |format| format.json { render :json => @post } end end private def scribble_params params[:scribble].slice :content, :std_course_id, :scribing_answer_id, :id end end
e1204da909f5f28521cc0370122d8fa5019adfc4
packages/de/desert.yaml
packages/de/desert.yaml
homepage: https://github.com/zjhmale/desert changelog-type: '' hash: a66e1eedefcf1470bb62224731ebb940fb2c266bde796ed0249723141217383a test-bench-deps: base: -any hspec: -any desert: -any maintainer: [email protected] synopsis: a simple build tool for OCaml projects changelog: '' basic-deps: shake: -any bytestring: ! '>=0.10.4.0' base: ! '>=4.7 && <5' filepath: ! '>=1.3.0.2' process: -any transformers: -any http-conduit: -any desert: -any directory: ! '>=1.2.1.0' all-versions: - '0.1.0.0' author: zjhmale latest: '0.1.0.0' description-type: haddock description: Please see README.md license-name: BSD3
homepage: https://github.com/zjhmale/desert changelog-type: '' hash: 8f7bd6392dfd5653a7839cc6212fd9d4f732f160f00f01d9ba00020d257befd6 test-bench-deps: base: -any hspec: -any desert: -any maintainer: [email protected] synopsis: a simple build tool for OCaml projects changelog: '' basic-deps: MissingH: -any bytestring: ! '>=0.10.4.0' base: ! '>=4.7 && <5' filepath: ! '>=1.3.0.2' process: -any transformers: -any http-conduit: -any desert: -any directory: ! '>=1.2.1.0' all-versions: - '0.1.0.0' - '0.1.0.1' author: zjhmale latest: '0.1.0.1' description-type: haddock description: Please see README.md license-name: BSD3
Update from Hackage at 2016-08-07T09:40:39+0000
Update from Hackage at 2016-08-07T09:40:39+0000
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/zjhmale/desert changelog-type: '' hash: a66e1eedefcf1470bb62224731ebb940fb2c266bde796ed0249723141217383a test-bench-deps: base: -any hspec: -any desert: -any maintainer: [email protected] synopsis: a simple build tool for OCaml projects changelog: '' basic-deps: shake: -any bytestring: ! '>=0.10.4.0' base: ! '>=4.7 && <5' filepath: ! '>=1.3.0.2' process: -any transformers: -any http-conduit: -any desert: -any directory: ! '>=1.2.1.0' all-versions: - '0.1.0.0' author: zjhmale latest: '0.1.0.0' description-type: haddock description: Please see README.md license-name: BSD3 ## Instruction: Update from Hackage at 2016-08-07T09:40:39+0000 ## Code After: homepage: https://github.com/zjhmale/desert changelog-type: '' hash: 8f7bd6392dfd5653a7839cc6212fd9d4f732f160f00f01d9ba00020d257befd6 test-bench-deps: base: -any hspec: -any desert: -any maintainer: [email protected] synopsis: a simple build tool for OCaml projects changelog: '' basic-deps: MissingH: -any bytestring: ! '>=0.10.4.0' base: ! '>=4.7 && <5' filepath: ! '>=1.3.0.2' process: -any transformers: -any http-conduit: -any desert: -any directory: ! '>=1.2.1.0' all-versions: - '0.1.0.0' - '0.1.0.1' author: zjhmale latest: '0.1.0.1' description-type: haddock description: Please see README.md license-name: BSD3
47b2a1127805557ceddd1300e6cc448f4380039e
config/schema/elasticsearch_types/service_standard_report.json
config/schema/elasticsearch_types/service_standard_report.json
{ "fields": [ "assessment_date" ] }
{ "fields": [ "assessment_date", "doing_business_in_the_eu", "employ_eu_citizens", "intellectual_property", "personal_data", "public_sector_procurement", "receiving_eu_funding", "regulations_and_standards", "sector_business_area" ] }
Add business readiness facets to service standard reports
Add business readiness facets to service standard reports
JSON
mit
alphagov/rummager,alphagov/rummager
json
## Code Before: { "fields": [ "assessment_date" ] } ## Instruction: Add business readiness facets to service standard reports ## Code After: { "fields": [ "assessment_date", "doing_business_in_the_eu", "employ_eu_citizens", "intellectual_property", "personal_data", "public_sector_procurement", "receiving_eu_funding", "regulations_and_standards", "sector_business_area" ] }
2d0eb92ece92e8454a66132ccdc00631f0314032
README.md
README.md
**It is** Java library for component testing **It does** orchestrate docker environment **It uses** JUnit and Docker Java Client Tested with docker version 1.11 on Linux ##Building ```bash mvn clean install ``` Requires Java 8 ##Using With maven: ```xml <dependency> <groupId>com.github.pavradev</groupId> <artifactId>dockerbay</artifactId> <version>1.0.0</version> <scope>test</scope> </dependency> ``` ```xml <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> ``` ##Examples Check [dockerbay-demo](https://github.com/pavradev/dockerbay-demo) project
**It is** Java library for component testing **It does** orchestrate docker environment **It uses** JUnit and [Java Docker Client](https://github.com/docker-java/docker-java) Tested with docker version 1.11 on Linux ##Building ```bash mvn clean install ``` Requires Java 8 ##Using With maven: ```xml <dependency> <groupId>com.github.pavradev</groupId> <artifactId>dockerbay</artifactId> <version>1.0.0</version> <scope>test</scope> </dependency> ``` ```xml <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> ``` ##Examples Check [dockerbay-demo](https://github.com/pavradev/dockerbay-demo) project
Add link to Java Docker Client
Add link to Java Docker Client
Markdown
apache-2.0
pavradev/dockerbay
markdown
## Code Before: **It is** Java library for component testing **It does** orchestrate docker environment **It uses** JUnit and Docker Java Client Tested with docker version 1.11 on Linux ##Building ```bash mvn clean install ``` Requires Java 8 ##Using With maven: ```xml <dependency> <groupId>com.github.pavradev</groupId> <artifactId>dockerbay</artifactId> <version>1.0.0</version> <scope>test</scope> </dependency> ``` ```xml <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> ``` ##Examples Check [dockerbay-demo](https://github.com/pavradev/dockerbay-demo) project ## Instruction: Add link to Java Docker Client ## Code After: **It is** Java library for component testing **It does** orchestrate docker environment **It uses** JUnit and [Java Docker Client](https://github.com/docker-java/docker-java) Tested with docker version 1.11 on Linux ##Building ```bash mvn clean install ``` Requires Java 8 ##Using With maven: ```xml <dependency> <groupId>com.github.pavradev</groupId> <artifactId>dockerbay</artifactId> <version>1.0.0</version> <scope>test</scope> </dependency> ``` ```xml <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories> ``` ##Examples Check [dockerbay-demo](https://github.com/pavradev/dockerbay-demo) project
b6cc3b2f0e97630f6c2b554826758b1aca72cf0f
circle.yml
circle.yml
machine: services: - postgresql - docker dependencies: cache_directories: - "~/docker" override: - docker info # use circleci's docker cache workaround - if [ -e ~/docker/image.tar ]; then echo "Loading image.tar"; docker load -i ~/docker/image.tar || rm ~/docker/image.tar; fi # build image - docker build -t normandy:build . # Clean up old image and save the new one - mkdir -p ~/docker; test '!' -e ~/docker/image.tar || rm ~/docker/image.tar; docker save normandy:build > ~/docker/image.tar; ls -l ~/docker test: override: - docker run --net host -e DJANGO_CONFIGURATION=Test normandy:build py.test # appropriately tag and push the container to dockerhub deployment: latest: branch: master commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh latest tags: # push all tags tag: /.*/ commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh "$CIRCLE_TAG"
machine: services: - postgresql - docker dependencies: cache_directories: - "~/docker" override: - docker info # use circleci's docker cache workaround - if [ -e ~/docker/image.tar ]; then echo "Loading image.tar"; docker load -i ~/docker/image.tar || rm ~/docker/image.tar; fi # build image - docker build -t normandy:build . # Clean up old image and save the new one - mkdir -p ~/docker; test '!' -e ~/docker/image.tar || rm ~/docker/image.tar; docker save normandy:build > ~/docker/image.tar; ls -l ~/docker test: override: - > docker run --net host -e DJANGO_CONFIGURATION=Test -v $CIRCLE_TEST_REPORTS:/test_artifacts normandy:build py.test --junitxml=/test_artifacts/pytest.xml # appropriately tag and push the container to dockerhub deployment: latest: branch: master commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh latest tags: # push all tags tag: /.*/ commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh "$CIRCLE_TAG"
Store test artifacts for CI processing
Store test artifacts for CI processing
YAML
mpl-2.0
Osmose/normandy,mozilla/normandy,Osmose/normandy,Osmose/normandy,mozilla/normandy,mozilla/normandy,mozilla/normandy,Osmose/normandy
yaml
## Code Before: machine: services: - postgresql - docker dependencies: cache_directories: - "~/docker" override: - docker info # use circleci's docker cache workaround - if [ -e ~/docker/image.tar ]; then echo "Loading image.tar"; docker load -i ~/docker/image.tar || rm ~/docker/image.tar; fi # build image - docker build -t normandy:build . # Clean up old image and save the new one - mkdir -p ~/docker; test '!' -e ~/docker/image.tar || rm ~/docker/image.tar; docker save normandy:build > ~/docker/image.tar; ls -l ~/docker test: override: - docker run --net host -e DJANGO_CONFIGURATION=Test normandy:build py.test # appropriately tag and push the container to dockerhub deployment: latest: branch: master commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh latest tags: # push all tags tag: /.*/ commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh "$CIRCLE_TAG" ## Instruction: Store test artifacts for CI processing ## Code After: machine: services: - postgresql - docker dependencies: cache_directories: - "~/docker" override: - docker info # use circleci's docker cache workaround - if [ -e ~/docker/image.tar ]; then echo "Loading image.tar"; docker load -i ~/docker/image.tar || rm ~/docker/image.tar; fi # build image - docker build -t normandy:build . # Clean up old image and save the new one - mkdir -p ~/docker; test '!' -e ~/docker/image.tar || rm ~/docker/image.tar; docker save normandy:build > ~/docker/image.tar; ls -l ~/docker test: override: - > docker run --net host -e DJANGO_CONFIGURATION=Test -v $CIRCLE_TEST_REPORTS:/test_artifacts normandy:build py.test --junitxml=/test_artifacts/pytest.xml # appropriately tag and push the container to dockerhub deployment: latest: branch: master commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh latest tags: # push all tags tag: /.*/ commands: # set DOCKER_DEPLOY=true in Circle UI to do deploys - "${DOCKER_DEPLOY:-false}" - bin/deploy/dockerhub.sh "$CIRCLE_TAG"
ea27ee4064b3c3ec333467951a464d5d80eb8554
lib/assets/stylesheets/schnitzelstyle/_responsive.scss
lib/assets/stylesheets/schnitzelstyle/_responsive.scss
@mixin schnitzel-responsive { @media only screen and (max-width: 640px) { body { padding-bottom: 10px; } // container overrides .container { width: auto; &>header { margin-top: 0 !important; padding: 0 10px; font-size: 100%; .site-title { font-size: 100%; display: block; margin-left: -10px; margin-right: -10px; } } &>section, &>article { padding-left: 10px; padding-right: 10px; } } // content overrides article, section { margin-top: 10px; h1, h2, h3, h4, h5, h6 { display: block; margin-left: -10px; margin-right: -10px; } } // grid overrides .column, .columns { width: 100% !important; float: none !important; } } }
@mixin schnitzel-responsive { @media only screen and (max-width: 640px) { body { padding-bottom: 10px; } // container overrides .container { width: auto; &>header { margin-top: 0 !important; padding: 0 10px; font-size: 100%; .site-title { font-size: 100%; display: block; margin-left: -10px; margin-right: -10px; } } &>section, &>article { padding-left: 10px; padding-right: 10px; } } // content overrides article, section { margin-top: 10px; h1, h2 { display: block; margin-left: -10px; margin-right: -10px; } } // grid overrides .column, .columns { width: 100% !important; float: none !important; } } }
Fix headings in responsive mode.
Fix headings in responsive mode.
SCSS
mit
hmans/schnitzelstyle,hmans/schnitzelstyle
scss
## Code Before: @mixin schnitzel-responsive { @media only screen and (max-width: 640px) { body { padding-bottom: 10px; } // container overrides .container { width: auto; &>header { margin-top: 0 !important; padding: 0 10px; font-size: 100%; .site-title { font-size: 100%; display: block; margin-left: -10px; margin-right: -10px; } } &>section, &>article { padding-left: 10px; padding-right: 10px; } } // content overrides article, section { margin-top: 10px; h1, h2, h3, h4, h5, h6 { display: block; margin-left: -10px; margin-right: -10px; } } // grid overrides .column, .columns { width: 100% !important; float: none !important; } } } ## Instruction: Fix headings in responsive mode. ## Code After: @mixin schnitzel-responsive { @media only screen and (max-width: 640px) { body { padding-bottom: 10px; } // container overrides .container { width: auto; &>header { margin-top: 0 !important; padding: 0 10px; font-size: 100%; .site-title { font-size: 100%; display: block; margin-left: -10px; margin-right: -10px; } } &>section, &>article { padding-left: 10px; padding-right: 10px; } } // content overrides article, section { margin-top: 10px; h1, h2 { display: block; margin-left: -10px; margin-right: -10px; } } // grid overrides .column, .columns { width: 100% !important; float: none !important; } } }
72ab36671522ceddcbfc3ab753d25d905815603a
tests/docx/style-map.tests.js
tests/docx/style-map.tests.js
var assert = require("assert"); var JSZip = require("jszip"); var zipfile = require("../../lib/zipfile"); var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("zipfile", function() { test('embedded style map can be read after being written', function() { var zip = emptyZipFile(); styleMap.writeStyleMap(zip, "p => h1"); return styleMap.readStyleMap(zip).then(function(contents) { assert.equal(contents, "p => h1"); }); }); }); function emptyZipFile() { var zip = new JSZip(); var buffer = zip.generate({type: "arraybuffer"}); return zipfile.openArrayBuffer(buffer); }
var assert = require("assert"); var JSZip = require("jszip"); var zipfile = require("../../lib/zipfile"); var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("zipfile", function() { test('embedded style map can be read after being written', function() { var zip = emptyZipFile(); styleMap.writeStyleMap(zip, "p => h1"); return styleMap.readStyleMap(zip).then(function(contents) { assert.equal(contents, "p => h1"); }); }); test('embedded style map is written to separate file', function() { var zip = emptyZipFile(); styleMap.writeStyleMap(zip, "p => h1"); return zip.read("mammoth/style-map", "utf8").then(function(contents) { assert.equal(contents, "p => h1"); }); }); }); function emptyZipFile() { var zip = new JSZip(); var buffer = zip.generate({type: "arraybuffer"}); return zipfile.openArrayBuffer(buffer); }
Test that embedded style map is written to separate file
Test that embedded style map is written to separate file
JavaScript
bsd-2-clause
mwilliamson/mammoth.js,mwilliamson/mammoth.js
javascript
## Code Before: var assert = require("assert"); var JSZip = require("jszip"); var zipfile = require("../../lib/zipfile"); var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("zipfile", function() { test('embedded style map can be read after being written', function() { var zip = emptyZipFile(); styleMap.writeStyleMap(zip, "p => h1"); return styleMap.readStyleMap(zip).then(function(contents) { assert.equal(contents, "p => h1"); }); }); }); function emptyZipFile() { var zip = new JSZip(); var buffer = zip.generate({type: "arraybuffer"}); return zipfile.openArrayBuffer(buffer); } ## Instruction: Test that embedded style map is written to separate file ## Code After: var assert = require("assert"); var JSZip = require("jszip"); var zipfile = require("../../lib/zipfile"); var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("zipfile", function() { test('embedded style map can be read after being written', function() { var zip = emptyZipFile(); styleMap.writeStyleMap(zip, "p => h1"); return styleMap.readStyleMap(zip).then(function(contents) { assert.equal(contents, "p => h1"); }); }); test('embedded style map is written to separate file', function() { var zip = emptyZipFile(); styleMap.writeStyleMap(zip, "p => h1"); return zip.read("mammoth/style-map", "utf8").then(function(contents) { assert.equal(contents, "p => h1"); }); }); }); function emptyZipFile() { var zip = new JSZip(); var buffer = zip.generate({type: "arraybuffer"}); return zipfile.openArrayBuffer(buffer); }
c328757a7e2ea87fb6f2cadd425d9eb9885feb35
resources/views/archive/index.blade.php
resources/views/archive/index.blade.php
@extends('layouts.frontend') @section('content') @foreach ($articles as $article) <div class="article" id="article-{{ $article->id }}"> <h1 class="article-title"><a href="#">{{ $article->title }}</a></h1> @if ($article->featured_image) <div class="article-featured-image"> <a href="#"><img src="{{ $article->featuredImagePath() }}" alt="{{ $article->title }}"></a> </div> @endif <ul class="list-inline article-meta text-muted"> <li><i class="fa fa-user"></i> <a href="#">{{ $article->author->name }}</a></li> <li><i class="fa fa-th-list"></i> <a href="#">{{ $article->category->name }}</a></li> @if ($article->tags->count()) <li> <i class="fa fa-tag"></i> @foreach ($article->tags as $tag) <a href="#" class="label label-default">{{ $tag->name }}</a> @endforeach </li> @endif </ul> <p> {!! $article->excerptFormatted(600) !!} </p> <a href="#" class="btn btn-default btn-sm">Continue reading &rarr;</a> </div> @endforeach @stop
@extends('layouts.frontend') @section('content') @foreach ($articles as $article) <div class="article" id="article-{{ $article->id }}"> <h1 class="article-title"><a href="#">{{ $article->title }}</a></h1> @if ($article->featured_image) <div class="article-featured-image"> <a href="#"><img src="{{ $article->featuredImagePath() }}" alt="{{ $article->title }}"></a> </div> @endif <ul class="list-inline article-meta text-muted"> <li><i class="fa fa-clock-o"></i> {{ $article->created_at->diffForHumans() }}</li> <li><i class="fa fa-user"></i> <a href="#">{{ $article->author->name }}</a></li> <li><i class="fa fa-th-list"></i> <a href="#">{{ $article->category->name }}</a></li> @if ($article->tags->count()) <li> <i class="fa fa-tag"></i> @foreach ($article->tags as $tag) <a href="#" class="label label-default">{{ $tag->name }}</a> @endforeach </li> @endif </ul> <p> {!! $article->excerptFormatted(600) !!} </p> <a href="#" class="btn btn-default btn-sm">Continue reading &rarr;</a> </div> @endforeach @stop
Add timestamp to article meta
Add timestamp to article meta
PHP
mit
mrterryh/LBlog,mrterryh/LBlog
php
## Code Before: @extends('layouts.frontend') @section('content') @foreach ($articles as $article) <div class="article" id="article-{{ $article->id }}"> <h1 class="article-title"><a href="#">{{ $article->title }}</a></h1> @if ($article->featured_image) <div class="article-featured-image"> <a href="#"><img src="{{ $article->featuredImagePath() }}" alt="{{ $article->title }}"></a> </div> @endif <ul class="list-inline article-meta text-muted"> <li><i class="fa fa-user"></i> <a href="#">{{ $article->author->name }}</a></li> <li><i class="fa fa-th-list"></i> <a href="#">{{ $article->category->name }}</a></li> @if ($article->tags->count()) <li> <i class="fa fa-tag"></i> @foreach ($article->tags as $tag) <a href="#" class="label label-default">{{ $tag->name }}</a> @endforeach </li> @endif </ul> <p> {!! $article->excerptFormatted(600) !!} </p> <a href="#" class="btn btn-default btn-sm">Continue reading &rarr;</a> </div> @endforeach @stop ## Instruction: Add timestamp to article meta ## Code After: @extends('layouts.frontend') @section('content') @foreach ($articles as $article) <div class="article" id="article-{{ $article->id }}"> <h1 class="article-title"><a href="#">{{ $article->title }}</a></h1> @if ($article->featured_image) <div class="article-featured-image"> <a href="#"><img src="{{ $article->featuredImagePath() }}" alt="{{ $article->title }}"></a> </div> @endif <ul class="list-inline article-meta text-muted"> <li><i class="fa fa-clock-o"></i> {{ $article->created_at->diffForHumans() }}</li> <li><i class="fa fa-user"></i> <a href="#">{{ $article->author->name }}</a></li> <li><i class="fa fa-th-list"></i> <a href="#">{{ $article->category->name }}</a></li> @if ($article->tags->count()) <li> <i class="fa fa-tag"></i> @foreach ($article->tags as $tag) <a href="#" class="label label-default">{{ $tag->name }}</a> @endforeach </li> @endif </ul> <p> {!! $article->excerptFormatted(600) !!} </p> <a href="#" class="btn btn-default btn-sm">Continue reading &rarr;</a> </div> @endforeach @stop
3e113c99f025554a5d7e7143e4e8df1cd4670a5c
grunt/copy.js
grunt/copy.js
var path = require('path'), grunt = require('grunt'); module.exports = { scripts: { files: [{ 'build/js/jquery.min.map': 'client/components/jquery/dist/jquery.min.map' }] }, images: { files: [{ expand: true, cwd: 'client/img', src: '*', dest: 'build/img/', }, { expand: true, cwd: 'client/swagger/img', src: '*', dest: 'build/img/', }] }, dist: { files: [{ expand: true, cwd: '.grunt/build', src: '**/*.*', dest: 'build', filter: function (filepath) { var dest = path.join( 'build', // Remove the parent 'js/src' from filepath filepath.split(path.sep).slice(2).join(path.sep) ); var doesntExist = !grunt.file.exists(dest); if (!doesntExist) { grunt.log.writeln('Skipping existing file: ' + dest); } return doesntExist; }, }] } };
var path = require('path'), grunt = require('grunt'); module.exports = { scripts: { files: [{ 'build/js/jquery.min.map': 'client/components/jquery/dist/jquery.min.map' }] }, images: { files: [{ expand: true, cwd: 'client/img', src: '*', dest: '.grunt/build/img/', }, { expand: true, cwd: 'client/swagger/img', src: '*', dest: '.grunt/build/img/', }] }, dist: { files: [{ expand: true, cwd: '.grunt/build', src: '**/*.*', dest: 'build', filter: function (filepath) { var dest = path.join( 'build', // Remove the parent 'js/src' from filepath filepath.split(path.sep).slice(2).join(path.sep) ); var doesntExist = !grunt.file.exists(dest); if (!doesntExist) { grunt.log.writeln('Skipping existing file: ' + dest); } return doesntExist; }, }] } };
Fix images not included in assets.json
Fix images not included in assets.json
JavaScript
mit
jgable/node-site,jgable/node-site
javascript
## Code Before: var path = require('path'), grunt = require('grunt'); module.exports = { scripts: { files: [{ 'build/js/jquery.min.map': 'client/components/jquery/dist/jquery.min.map' }] }, images: { files: [{ expand: true, cwd: 'client/img', src: '*', dest: 'build/img/', }, { expand: true, cwd: 'client/swagger/img', src: '*', dest: 'build/img/', }] }, dist: { files: [{ expand: true, cwd: '.grunt/build', src: '**/*.*', dest: 'build', filter: function (filepath) { var dest = path.join( 'build', // Remove the parent 'js/src' from filepath filepath.split(path.sep).slice(2).join(path.sep) ); var doesntExist = !grunt.file.exists(dest); if (!doesntExist) { grunt.log.writeln('Skipping existing file: ' + dest); } return doesntExist; }, }] } }; ## Instruction: Fix images not included in assets.json ## Code After: var path = require('path'), grunt = require('grunt'); module.exports = { scripts: { files: [{ 'build/js/jquery.min.map': 'client/components/jquery/dist/jquery.min.map' }] }, images: { files: [{ expand: true, cwd: 'client/img', src: '*', dest: '.grunt/build/img/', }, { expand: true, cwd: 'client/swagger/img', src: '*', dest: '.grunt/build/img/', }] }, dist: { files: [{ expand: true, cwd: '.grunt/build', src: '**/*.*', dest: 'build', filter: function (filepath) { var dest = path.join( 'build', // Remove the parent 'js/src' from filepath filepath.split(path.sep).slice(2).join(path.sep) ); var doesntExist = !grunt.file.exists(dest); if (!doesntExist) { grunt.log.writeln('Skipping existing file: ' + dest); } return doesntExist; }, }] } };
ee6af762a832f2ec3e5416d4095e31bdb4d0ba65
adapters/sinatra_adapter.rb
adapters/sinatra_adapter.rb
require "forwardable" class SinatraAdapter extend Forwardable def initialize(sinatra_app) @sinatra_app = sinatra_app end def success(content) status(200) json_body(content) return_nil_so_sinatra_does_not_double_render end def created(content = "") status(201) json_body(content) return_nil_so_sinatra_does_not_double_render end private attr_reader :sinatra_app def_delegators :sinatra_app, :status, :params def json_body(content) sinatra_app.content_type :json sinatra_app.body(MultiJson.dump(content)) end def return_nil_so_sinatra_does_not_double_render return nil # so sinatra does not double render end end
require "forwardable" class SinatraAdapter extend Forwardable def initialize(sinatra_app) @sinatra_app = sinatra_app end def params sinatra_app.request.params end def success(content) status(200) json_body(content) return_nil_so_sinatra_does_not_double_render end def created(content = "") status(201) json_body(content) return_nil_so_sinatra_does_not_double_render end private attr_reader :sinatra_app def_delegators :sinatra_app, :status def json_body(content) sinatra_app.content_type :json sinatra_app.body(MultiJson.dump(content)) end def return_nil_so_sinatra_does_not_double_render return nil # so sinatra does not double render end end
Remove junk params added by Sinatra
Remove junk params added by Sinatra
Ruby
mit
gds-attic/finder-api,gds-attic/finder-api
ruby
## Code Before: require "forwardable" class SinatraAdapter extend Forwardable def initialize(sinatra_app) @sinatra_app = sinatra_app end def success(content) status(200) json_body(content) return_nil_so_sinatra_does_not_double_render end def created(content = "") status(201) json_body(content) return_nil_so_sinatra_does_not_double_render end private attr_reader :sinatra_app def_delegators :sinatra_app, :status, :params def json_body(content) sinatra_app.content_type :json sinatra_app.body(MultiJson.dump(content)) end def return_nil_so_sinatra_does_not_double_render return nil # so sinatra does not double render end end ## Instruction: Remove junk params added by Sinatra ## Code After: require "forwardable" class SinatraAdapter extend Forwardable def initialize(sinatra_app) @sinatra_app = sinatra_app end def params sinatra_app.request.params end def success(content) status(200) json_body(content) return_nil_so_sinatra_does_not_double_render end def created(content = "") status(201) json_body(content) return_nil_so_sinatra_does_not_double_render end private attr_reader :sinatra_app def_delegators :sinatra_app, :status def json_body(content) sinatra_app.content_type :json sinatra_app.body(MultiJson.dump(content)) end def return_nil_so_sinatra_does_not_double_render return nil # so sinatra does not double render end end
97571cdfdb696d4d8eeb7daeba1f15b5671fe52b
docs/ecs-task-notification.md
docs/ecs-task-notification.md
In ECS scheduler, `hako oneshot` supports multiple methods of detecting task finish. ## ecs:DescribeTasks (default) Use [DescribeTasks](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API to get the task status. This method can be used without any preparation or configuration, but the DescribeTasks API can return "Rate exceeded" error when there's several running `hako oneshot` processes. ## s3:GetObject Amazon ECS has integration with Amazon CloudWatch Events. The integration notifies ECS task state changes to AWS Lambda, Amazon SNS, Amazon SQS, and so on. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html#ecs_task_events Amazon S3 is a good storage for polling, so connecting CloudWatch Events to AWS Lambda and put the payload to S3 is more scalable than ecs:DescribeTasks. The example implementation of AWS Lambda can be found in [../examples/put-ecs-container-status-to-s3](../examples/put-ecs-container-status-to-s3) directory. To enable task notification with S3, you have to configure scheduler in YAML. ```yaml scheduler: type: ecs oneshot_notification_prefix: 's3://ecs-task-notifications/task_statuses?region=ap-northeast-1' ``` It uses ecs-task-notifications bucket in ap-northeast-1 region.
In ECS scheduler, `hako oneshot` supports multiple methods of detecting task finish. ## ecs:DescribeTasks (default) Use [DescribeTasks](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API to get the task status. This method can be used without any preparation or configuration, but the DescribeTasks API can return "Rate exceeded" error when there's several running `hako oneshot` processes. ## s3:GetObject Amazon ECS has integration with Amazon CloudWatch Events. The integration notifies ECS task state changes to AWS Lambda, Amazon SNS, Amazon SQS, and so on. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html#ecs_task_events Amazon S3 is a good storage for polling, so connecting CloudWatch Events to AWS Lambda and put the payload to S3 is more scalable than ecs:DescribeTasks. The example implementation of AWS Lambda can be found in [../examples/put-ecs-container-status-to-s3](../examples/put-ecs-container-status-to-s3) directory. To enable task notification with S3, you have to configure scheduler in definition file. ```js { scheduler: { type: 'ecs', oneshot_notification_prefix: 's3://ecs-task-notifications/task_statuses?region=ap-northeast-1', }, } ``` It uses ecs-task-notifications bucket in ap-northeast-1 region.
Use Jsonnet format in docs
Use Jsonnet format in docs
Markdown
mit
eagletmt/hako,eagletmt/hako,eagletmt/hako
markdown
## Code Before: In ECS scheduler, `hako oneshot` supports multiple methods of detecting task finish. ## ecs:DescribeTasks (default) Use [DescribeTasks](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API to get the task status. This method can be used without any preparation or configuration, but the DescribeTasks API can return "Rate exceeded" error when there's several running `hako oneshot` processes. ## s3:GetObject Amazon ECS has integration with Amazon CloudWatch Events. The integration notifies ECS task state changes to AWS Lambda, Amazon SNS, Amazon SQS, and so on. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html#ecs_task_events Amazon S3 is a good storage for polling, so connecting CloudWatch Events to AWS Lambda and put the payload to S3 is more scalable than ecs:DescribeTasks. The example implementation of AWS Lambda can be found in [../examples/put-ecs-container-status-to-s3](../examples/put-ecs-container-status-to-s3) directory. To enable task notification with S3, you have to configure scheduler in YAML. ```yaml scheduler: type: ecs oneshot_notification_prefix: 's3://ecs-task-notifications/task_statuses?region=ap-northeast-1' ``` It uses ecs-task-notifications bucket in ap-northeast-1 region. ## Instruction: Use Jsonnet format in docs ## Code After: In ECS scheduler, `hako oneshot` supports multiple methods of detecting task finish. ## ecs:DescribeTasks (default) Use [DescribeTasks](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API to get the task status. This method can be used without any preparation or configuration, but the DescribeTasks API can return "Rate exceeded" error when there's several running `hako oneshot` processes. ## s3:GetObject Amazon ECS has integration with Amazon CloudWatch Events. The integration notifies ECS task state changes to AWS Lambda, Amazon SNS, Amazon SQS, and so on. http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html#ecs_task_events Amazon S3 is a good storage for polling, so connecting CloudWatch Events to AWS Lambda and put the payload to S3 is more scalable than ecs:DescribeTasks. The example implementation of AWS Lambda can be found in [../examples/put-ecs-container-status-to-s3](../examples/put-ecs-container-status-to-s3) directory. To enable task notification with S3, you have to configure scheduler in definition file. ```js { scheduler: { type: 'ecs', oneshot_notification_prefix: 's3://ecs-task-notifications/task_statuses?region=ap-northeast-1', }, } ``` It uses ecs-task-notifications bucket in ap-northeast-1 region.
58754d41c2377de4b615f1a80e31274ee30eada4
db-test/package.json
db-test/package.json
{ "name": "gc-rest", "version": "0.0.1", "description": "manages the geocache database abstraction", "repository": { "type": "git", "url": "http://github.com/foobert/gc.git" }, "scripts": { "start": "node_modules/.bin/coffee --nodejs --harmony index.coffee", "test": "node_modules/.bin/mocha --harmony" }, "dependencies": { "bluebird": "^2.9.13", "body-parser": "^1.12.2", "coffee-script": "^1.9.1", "express": "^4.12.2", "pg": "^4.3.0", "squel": "^3.10.0", "superagent-as-promised": "^2.0.0", "uuid": "^2.0.1" }, "devDependencies": { "chai": "^2.1.2" } }
{ "name": "gc-rest", "version": "0.0.1", "description": "manages the geocache database abstraction", "repository": { "type": "git", "url": "http://github.com/foobert/gc.git" }, "scripts": { "start": "node_modules/.bin/coffee index.coffee", "test": "node_modules/.bin/mocha", "dev": "node_modules/.bin/nodemon --exec node_modules/.bin/coffee index.coffee" }, "dependencies": { "bluebird": "^2.9.13", "body-parser": "^1.12.2", "coffee-script": "^1.9.1", "express": "^4.12.2", "pg": "^4.3.0", "squel": "^3.10.0", "superagent-as-promised": "^2.0.0", "uuid": "^2.0.1" }, "devDependencies": { "chai": "^2.1.2", "nodemon": "^1.3.7" } }
Add nodemon for automatic reloading
Add nodemon for automatic reloading
JSON
mit
foobert/gc,foobert/gc,foobert/gc,foobert/gc
json
## Code Before: { "name": "gc-rest", "version": "0.0.1", "description": "manages the geocache database abstraction", "repository": { "type": "git", "url": "http://github.com/foobert/gc.git" }, "scripts": { "start": "node_modules/.bin/coffee --nodejs --harmony index.coffee", "test": "node_modules/.bin/mocha --harmony" }, "dependencies": { "bluebird": "^2.9.13", "body-parser": "^1.12.2", "coffee-script": "^1.9.1", "express": "^4.12.2", "pg": "^4.3.0", "squel": "^3.10.0", "superagent-as-promised": "^2.0.0", "uuid": "^2.0.1" }, "devDependencies": { "chai": "^2.1.2" } } ## Instruction: Add nodemon for automatic reloading ## Code After: { "name": "gc-rest", "version": "0.0.1", "description": "manages the geocache database abstraction", "repository": { "type": "git", "url": "http://github.com/foobert/gc.git" }, "scripts": { "start": "node_modules/.bin/coffee index.coffee", "test": "node_modules/.bin/mocha", "dev": "node_modules/.bin/nodemon --exec node_modules/.bin/coffee index.coffee" }, "dependencies": { "bluebird": "^2.9.13", "body-parser": "^1.12.2", "coffee-script": "^1.9.1", "express": "^4.12.2", "pg": "^4.3.0", "squel": "^3.10.0", "superagent-as-promised": "^2.0.0", "uuid": "^2.0.1" }, "devDependencies": { "chai": "^2.1.2", "nodemon": "^1.3.7" } }
03aac9bf413230ffd079bcaf65421a7e3832ad38
nvid-build.sh
nvid-build.sh
KERNELGCCVERSION=$(cat /proc/version | awk '{print $9}' | awk 'BEGIN {FS="."} {print $1"."$2}') NVIDIAINSTALLER='./'$(ls -t | grep NVIDIA | head -1) if [ ! -e $NVIDIAINSTALLER ] then echo 'NVIDIA installer not found!' exit 1 fi if [ ! -e /usr/bin/gcc-$KERNELGCCVERSION ] then echo 'GCC version $KERNELGCCVERSION not found!' exit 1 fi /etc/init.d/gdm stop echo 'Installing '$NVIDIAINSTALLER env CC=/usr/bin/gcc-$KERNELGCCVERSION $NVIDIAINSTALLER /etc/init.d/gdm start
KERNELGCCVERSION=$(cat /proc/version | awk '{print $9}' | awk 'BEGIN {FS="."} {print $1"."$2}') NVIDIAINSTALLER='./'$(ls -t | grep NVIDIA | head -1) # Options NVBLOGOUT= NVBUNINSTALL= NVBSILENT= while getopts lus o do case "$o" in l) NVBLOGOUT='y' ;; u) NVBUNINSTALL='--uninstall' ;; s) NVBSILENT='--silent --opengl-headers --run-nvidia-xconfig' ;; esac done if [ ! -e $NVIDIAINSTALLER ] then echo 'NVIDIA installer not found!' exit 1 fi if [ ! -e /usr/bin/gcc-$KERNELGCCVERSION ] then echo 'GCC version $KERNELGCCVERSION not found!' exit 1 fi sudo /etc/init.d/gdm stop echo 'Installing '$NVIDIAINSTALLER sudo env CC=/usr/bin/gcc-$KERNELGCCVERSION $NVIDIAINSTALLER "$NVBUNINSTALL $NVBSILENT" sudo /etc/init.d/gdm start if [ -n "$NVBLOGOUT" ] then kill -HUP $PPID fi
Add command arguments for logout (-l), silent (-s, accepts everything), uninstall (-u)
Add command arguments for logout (-l), silent (-s, accepts everything), uninstall (-u)
Shell
mit
aleximplode/nvid-build
shell
## Code Before: KERNELGCCVERSION=$(cat /proc/version | awk '{print $9}' | awk 'BEGIN {FS="."} {print $1"."$2}') NVIDIAINSTALLER='./'$(ls -t | grep NVIDIA | head -1) if [ ! -e $NVIDIAINSTALLER ] then echo 'NVIDIA installer not found!' exit 1 fi if [ ! -e /usr/bin/gcc-$KERNELGCCVERSION ] then echo 'GCC version $KERNELGCCVERSION not found!' exit 1 fi /etc/init.d/gdm stop echo 'Installing '$NVIDIAINSTALLER env CC=/usr/bin/gcc-$KERNELGCCVERSION $NVIDIAINSTALLER /etc/init.d/gdm start ## Instruction: Add command arguments for logout (-l), silent (-s, accepts everything), uninstall (-u) ## Code After: KERNELGCCVERSION=$(cat /proc/version | awk '{print $9}' | awk 'BEGIN {FS="."} {print $1"."$2}') NVIDIAINSTALLER='./'$(ls -t | grep NVIDIA | head -1) # Options NVBLOGOUT= NVBUNINSTALL= NVBSILENT= while getopts lus o do case "$o" in l) NVBLOGOUT='y' ;; u) NVBUNINSTALL='--uninstall' ;; s) NVBSILENT='--silent --opengl-headers --run-nvidia-xconfig' ;; esac done if [ ! -e $NVIDIAINSTALLER ] then echo 'NVIDIA installer not found!' exit 1 fi if [ ! -e /usr/bin/gcc-$KERNELGCCVERSION ] then echo 'GCC version $KERNELGCCVERSION not found!' exit 1 fi sudo /etc/init.d/gdm stop echo 'Installing '$NVIDIAINSTALLER sudo env CC=/usr/bin/gcc-$KERNELGCCVERSION $NVIDIAINSTALLER "$NVBUNINSTALL $NVBSILENT" sudo /etc/init.d/gdm start if [ -n "$NVBLOGOUT" ] then kill -HUP $PPID fi
b7500a83ee23d3da0579635cca40a4ead9524a94
src/js/events/SidebarActions.js
src/js/events/SidebarActions.js
import {RequestUtil} from 'mesosphere-shared-reactjs'; import ActionTypes from '../constants/ActionTypes'; import Config from '../config/Config'; var AppDispatcher = require('./AppDispatcher'); module.exports = { open: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_SIDEBAR_OPEN, data: true }); }, close: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_SIDEBAR_CLOSE, data: false }); }, openCliInstructions: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_CLI_INSTRUCTIONS, data: false }); }, showVersions: function () { var host = Config.rootUrl.replace(/:[0-9]{0,4}$/, ''); var url = host + '/pkgpanda/active.buildinfo.full.json'; RequestUtil.json({ url: url, success: function (response) { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_VERSIONS_SUCCESS, data: response }); }, error: function (e) { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_VERSIONS_ERROR, data: e.message }); } }); }, sidebarWidthChange: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.SIDEBAR_WIDTH_CHANGE }); } };
import {RequestUtil} from 'mesosphere-shared-reactjs'; import { REQUEST_SIDEBAR_OPEN, REQUEST_SIDEBAR_CLOSE, REQUEST_CLI_INSTRUCTIONS, REQUEST_VERSIONS_SUCCESS, REQUEST_VERSIONS_ERROR, REQUEST_SIDEBAR_WIDTH_CHANGE } from '../constants/ActionTypes'; import Config from '../config/Config'; var AppDispatcher = require('./AppDispatcher'); module.exports = { open: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_SIDEBAR_OPEN, data: true }); }, close: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_SIDEBAR_CLOSE, data: false }); }, openCliInstructions: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_CLI_INSTRUCTIONS, data: false }); }, showVersions: function () { var host = Config.rootUrl.replace(/:[0-9]{0,4}$/, ''); var url = host + '/pkgpanda/active.buildinfo.full.json'; RequestUtil.json({ url: url, success: function (response) { AppDispatcher.handleSidebarAction({ type: REQUEST_VERSIONS_SUCCESS, data: response }); }, error: function (e) { AppDispatcher.handleSidebarAction({ type: REQUEST_VERSIONS_ERROR, data: e.message }); } }); }, sidebarWidthChange: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_SIDEBAR_WIDTH_CHANGE }); } };
Fix action type which has incorrectly named ActionType.
Fix action type which has incorrectly named ActionType.
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
javascript
## Code Before: import {RequestUtil} from 'mesosphere-shared-reactjs'; import ActionTypes from '../constants/ActionTypes'; import Config from '../config/Config'; var AppDispatcher = require('./AppDispatcher'); module.exports = { open: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_SIDEBAR_OPEN, data: true }); }, close: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_SIDEBAR_CLOSE, data: false }); }, openCliInstructions: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_CLI_INSTRUCTIONS, data: false }); }, showVersions: function () { var host = Config.rootUrl.replace(/:[0-9]{0,4}$/, ''); var url = host + '/pkgpanda/active.buildinfo.full.json'; RequestUtil.json({ url: url, success: function (response) { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_VERSIONS_SUCCESS, data: response }); }, error: function (e) { AppDispatcher.handleSidebarAction({ type: ActionTypes.REQUEST_VERSIONS_ERROR, data: e.message }); } }); }, sidebarWidthChange: function () { AppDispatcher.handleSidebarAction({ type: ActionTypes.SIDEBAR_WIDTH_CHANGE }); } }; ## Instruction: Fix action type which has incorrectly named ActionType. ## Code After: import {RequestUtil} from 'mesosphere-shared-reactjs'; import { REQUEST_SIDEBAR_OPEN, REQUEST_SIDEBAR_CLOSE, REQUEST_CLI_INSTRUCTIONS, REQUEST_VERSIONS_SUCCESS, REQUEST_VERSIONS_ERROR, REQUEST_SIDEBAR_WIDTH_CHANGE } from '../constants/ActionTypes'; import Config from '../config/Config'; var AppDispatcher = require('./AppDispatcher'); module.exports = { open: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_SIDEBAR_OPEN, data: true }); }, close: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_SIDEBAR_CLOSE, data: false }); }, openCliInstructions: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_CLI_INSTRUCTIONS, data: false }); }, showVersions: function () { var host = Config.rootUrl.replace(/:[0-9]{0,4}$/, ''); var url = host + '/pkgpanda/active.buildinfo.full.json'; RequestUtil.json({ url: url, success: function (response) { AppDispatcher.handleSidebarAction({ type: REQUEST_VERSIONS_SUCCESS, data: response }); }, error: function (e) { AppDispatcher.handleSidebarAction({ type: REQUEST_VERSIONS_ERROR, data: e.message }); } }); }, sidebarWidthChange: function () { AppDispatcher.handleSidebarAction({ type: REQUEST_SIDEBAR_WIDTH_CHANGE }); } };
25ef2690c4799f10ff9046f3e9d07812b872446a
package.json
package.json
{ "name": "rtp-live-pass", "version": "0.1.3", "description": "Retrieve scan data from your RTP LivePass based resort season pass.", "main": "index.js", "dependencies": { "async": "~0.2.7", "node-uuid": "~1.4.0", "request": "~2.16.6", "underscore": "~1.4.4", "xml": "~0.0.7", "xml2js": "~0.2.6" }, "devDependencies": { "nock": "~0.17.3", "nodeunit": "~0.8.0" }, "scripts": { "test": "./node_modules/nodeunit/bin/nodeunit ./test/test.js" }, "repository": { "type": "git", "url": "[email protected]:jeffstieler/rtp-live-pass.git" }, "keywords": [ "RTP", "LivePass", "season pass", "lift pass", "skiing", "snowboarding", "Park City Mountain Resort", "PCMR", "Park City" ], "author": "Jeff Stieler", "license": "BSD", "readmeFilename": "readme.md" }
{ "name": "rtp-live-pass", "version": "0.1.3", "description": "Retrieve scan data from your RTP LivePass based resort season pass.", "main": "index.js", "dependencies": { "async": "~0.2.7", "node-uuid": "~1.4.0", "request": "~2.16.6", "underscore": "~1.4.4", "xml": "~0.0.7", "xml2js": "~0.2.6" }, "devDependencies": { "nock": "~0.17.3", "nodeunit": "~0.8.0" }, "scripts": { "test": "node_modules/.bin/nodeunit test/test.js" }, "repository": { "type": "git", "url": "[email protected]:jeffstieler/rtp-live-pass.git" }, "keywords": [ "RTP", "LivePass", "season pass", "lift pass", "skiing", "snowboarding", "Park City Mountain Resort", "PCMR", "Park City" ], "author": "Jeff Stieler", "license": "BSD", "readmeFilename": "readme.md" }
Update test script to use node_modules/.bin convenience directory.
Update test script to use node_modules/.bin convenience directory.
JSON
bsd-3-clause
jeffstieler/rtp-live-pass
json
## Code Before: { "name": "rtp-live-pass", "version": "0.1.3", "description": "Retrieve scan data from your RTP LivePass based resort season pass.", "main": "index.js", "dependencies": { "async": "~0.2.7", "node-uuid": "~1.4.0", "request": "~2.16.6", "underscore": "~1.4.4", "xml": "~0.0.7", "xml2js": "~0.2.6" }, "devDependencies": { "nock": "~0.17.3", "nodeunit": "~0.8.0" }, "scripts": { "test": "./node_modules/nodeunit/bin/nodeunit ./test/test.js" }, "repository": { "type": "git", "url": "[email protected]:jeffstieler/rtp-live-pass.git" }, "keywords": [ "RTP", "LivePass", "season pass", "lift pass", "skiing", "snowboarding", "Park City Mountain Resort", "PCMR", "Park City" ], "author": "Jeff Stieler", "license": "BSD", "readmeFilename": "readme.md" } ## Instruction: Update test script to use node_modules/.bin convenience directory. ## Code After: { "name": "rtp-live-pass", "version": "0.1.3", "description": "Retrieve scan data from your RTP LivePass based resort season pass.", "main": "index.js", "dependencies": { "async": "~0.2.7", "node-uuid": "~1.4.0", "request": "~2.16.6", "underscore": "~1.4.4", "xml": "~0.0.7", "xml2js": "~0.2.6" }, "devDependencies": { "nock": "~0.17.3", "nodeunit": "~0.8.0" }, "scripts": { "test": "node_modules/.bin/nodeunit test/test.js" }, "repository": { "type": "git", "url": "[email protected]:jeffstieler/rtp-live-pass.git" }, "keywords": [ "RTP", "LivePass", "season pass", "lift pass", "skiing", "snowboarding", "Park City Mountain Resort", "PCMR", "Park City" ], "author": "Jeff Stieler", "license": "BSD", "readmeFilename": "readme.md" }
44669835d8808a7ee9b96bd8603761ec3731bfd7
field_types/core/tree/tree/checkboxes.haml
field_types/core/tree/tree/checkboxes.haml
- @options[:metadata]["data"]["tree_array"].each do |node| = render_field_id = cell('cortex/field_types/core/tree/checkbox', node: node, form: @options[:form]).(:checkbox)
%h4 = render_label - @options[:metadata]["data"]["tree_array"].each do |node| = render_field_id = cell('cortex/field_types/core/tree/checkbox', node: node, form: @options[:form]).(:checkbox)
Add Label to Categories in Cell
Add Label to Categories in Cell
Haml
apache-2.0
cortex-cms/cortex-plugins-core,cortex-cms/cortex-field_types-core,cortex-cms/cortex-plugins-core,cortex-cms/cortex-field_types-core,cortex-cms/cortex-plugins-core,cortex-cms/cortex-field_types-core
haml
## Code Before: - @options[:metadata]["data"]["tree_array"].each do |node| = render_field_id = cell('cortex/field_types/core/tree/checkbox', node: node, form: @options[:form]).(:checkbox) ## Instruction: Add Label to Categories in Cell ## Code After: %h4 = render_label - @options[:metadata]["data"]["tree_array"].each do |node| = render_field_id = cell('cortex/field_types/core/tree/checkbox', node: node, form: @options[:form]).(:checkbox)
868b6b7611be36f2fd8222bb6e363146aff5439d
travis-ci-requirements.txt
travis-ci-requirements.txt
coverage pygments git+http://github.com/enthought/traits.git#egg=traits git+http://github.com/enthought/traitsui.git@feature/python3#egg=traitsui traits_enaml ; python_version == '2.7' enaml ; python_version == '2.7'
coverage pygments git+http://github.com/enthought/traits.git#egg=traits git+http://github.com/enthought/traitsui.git#egg=traitsui traits_enaml ; python_version == '2.7' enaml ; python_version == '2.7'
Fix regression on traitsui branch used in CI.
Fix regression on traitsui branch used in CI.
Text
bsd-3-clause
geggo/pyface,geggo/pyface
text
## Code Before: coverage pygments git+http://github.com/enthought/traits.git#egg=traits git+http://github.com/enthought/traitsui.git@feature/python3#egg=traitsui traits_enaml ; python_version == '2.7' enaml ; python_version == '2.7' ## Instruction: Fix regression on traitsui branch used in CI. ## Code After: coverage pygments git+http://github.com/enthought/traits.git#egg=traits git+http://github.com/enthought/traitsui.git#egg=traitsui traits_enaml ; python_version == '2.7' enaml ; python_version == '2.7'
30b859c827ed450fbf7a52a18aa92af79c11e5e4
lib/index.js
lib/index.js
'use strict'; var bunyan = require('bunyan'); var config = require('coyno-config'); function createLogger() { var log; if (!!config.log.pretty) { var PrettyStream = require('bunyan-prettystream'); var prettyStdOut = new PrettyStream(); prettyStdOut.pipe(process.stdout); log = bunyan.createLogger({ name: 'queue', streams: [{ level: config.log.level, type: 'raw', stream: prettyStdOut }] }); } else { log = bunyan.createLogger({name: 'queue'}); } return log; } module.exports = createLogger();
'use strict'; var bunyan = require('bunyan'); var config = require('coyno-config'); function createLogger() { var log; if (!!config.log.pretty) { var PrettyStream = require('bunyan-prettystream'); var prettyStdOut = new PrettyStream(); prettyStdOut.pipe(process.stdout); log = bunyan.createLogger({ name: 'queue', streams: [{ level: config.log.level, type: 'raw', stream: prettyStdOut }] }); } else { log = bunyan.createLogger({name: 'queue', level: config.log.level}); } return log; } module.exports = createLogger();
Handle log level correctly for raw logs
Handle log level correctly for raw logs
JavaScript
apache-2.0
blooks/log
javascript
## Code Before: 'use strict'; var bunyan = require('bunyan'); var config = require('coyno-config'); function createLogger() { var log; if (!!config.log.pretty) { var PrettyStream = require('bunyan-prettystream'); var prettyStdOut = new PrettyStream(); prettyStdOut.pipe(process.stdout); log = bunyan.createLogger({ name: 'queue', streams: [{ level: config.log.level, type: 'raw', stream: prettyStdOut }] }); } else { log = bunyan.createLogger({name: 'queue'}); } return log; } module.exports = createLogger(); ## Instruction: Handle log level correctly for raw logs ## Code After: 'use strict'; var bunyan = require('bunyan'); var config = require('coyno-config'); function createLogger() { var log; if (!!config.log.pretty) { var PrettyStream = require('bunyan-prettystream'); var prettyStdOut = new PrettyStream(); prettyStdOut.pipe(process.stdout); log = bunyan.createLogger({ name: 'queue', streams: [{ level: config.log.level, type: 'raw', stream: prettyStdOut }] }); } else { log = bunyan.createLogger({name: 'queue', level: config.log.level}); } return log; } module.exports = createLogger();
cdc75dfc67aa7a546a697f4b48d7893089944ce4
spec/models/backend/ecs/elb_spec.rb
spec/models/backend/ecs/elb_spec.rb
require "rails_helper" describe Backend::Ecs::Elb do let(:service) { create :web_service } describe "#health_check_target" do subject { described_class.new(service).health_check_target } context "when a target is HTTP" do before do service.update!(health_check: {protocol: "http", http_path: "/health_check"}) end it { is_expected.to eq "HTTP:#{service.http_port_mapping.host_port}/health_check"} end context "when a target is HTTPS" do before do service.update!(health_check: {protocol: "https", http_path: "/health_check"}) end it { is_expected.to eq "HTTPS:#{service.https_port_mapping.host_port}/health_check"} end context "when a target is TCP" do before do service.update!(health_check: {protocol: "tcp", port: 1111}) end it { is_expected.to eq "TCP:1111"} end context "when health_check is blank" do it { is_expected.to eq "TCP:#{service.port_mappings.first.host_port}"} end end end
require "rails_helper" describe Backend::Ecs::Elb do let(:service) { create :web_service } describe "#health_check_target" do subject { described_class.new(service).health_check_target } # context "when a target is HTTP" do # before do # service.update!(health_check: {protocol: "http", http_path: "/health_check"}) # end # it { is_expected.to eq "HTTP:#{service.http_port_mapping.host_port}/health_check"} # end # # context "when a target is HTTPS" do # before do # service.update!(health_check: {protocol: "https", http_path: "/health_check"}) # end # it { is_expected.to eq "HTTPS:#{service.https_port_mapping.host_port}/health_check"} # end context "when a target is TCP" do before do service.update!(health_check: {protocol: "tcp", port: 1111}) end it { is_expected.to eq "TCP:1111"} end context "when health_check is blank" do it { is_expected.to eq "TCP:#{service.port_mappings.first.host_port}"} end end end
Comment out http health check tests
Comment out http health check tests
Ruby
mit
degica/barcelona,degica/barcelona,degica/barcelona,degica/barcelona,degica/barcelona,degica/barcelona
ruby
## Code Before: require "rails_helper" describe Backend::Ecs::Elb do let(:service) { create :web_service } describe "#health_check_target" do subject { described_class.new(service).health_check_target } context "when a target is HTTP" do before do service.update!(health_check: {protocol: "http", http_path: "/health_check"}) end it { is_expected.to eq "HTTP:#{service.http_port_mapping.host_port}/health_check"} end context "when a target is HTTPS" do before do service.update!(health_check: {protocol: "https", http_path: "/health_check"}) end it { is_expected.to eq "HTTPS:#{service.https_port_mapping.host_port}/health_check"} end context "when a target is TCP" do before do service.update!(health_check: {protocol: "tcp", port: 1111}) end it { is_expected.to eq "TCP:1111"} end context "when health_check is blank" do it { is_expected.to eq "TCP:#{service.port_mappings.first.host_port}"} end end end ## Instruction: Comment out http health check tests ## Code After: require "rails_helper" describe Backend::Ecs::Elb do let(:service) { create :web_service } describe "#health_check_target" do subject { described_class.new(service).health_check_target } # context "when a target is HTTP" do # before do # service.update!(health_check: {protocol: "http", http_path: "/health_check"}) # end # it { is_expected.to eq "HTTP:#{service.http_port_mapping.host_port}/health_check"} # end # # context "when a target is HTTPS" do # before do # service.update!(health_check: {protocol: "https", http_path: "/health_check"}) # end # it { is_expected.to eq "HTTPS:#{service.https_port_mapping.host_port}/health_check"} # end context "when a target is TCP" do before do service.update!(health_check: {protocol: "tcp", port: 1111}) end it { is_expected.to eq "TCP:1111"} end context "when health_check is blank" do it { is_expected.to eq "TCP:#{service.port_mappings.first.host_port}"} end end end
dbec6956571c28b921abdbcee24ce8893a62c6e8
README.md
README.md
Paket ===== A package dependency manager for .NET Initial docs can be found at http://fsprojects.github.io/Paket/ [![NuGet Status](http://img.shields.io/nuget/v/Paket.svg?style=flat)](https://www.nuget.org/packages/Paket/) # Build the project * Mono: Run *build.sh* [![Travis build status](https://travis-ci.org/fsprojects/Paket.png)](https://travis-ci.org/fsprojects/Paket) * Windows: Run *build.cmd* [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/aqs8eux16x4g5p47/branch/master)](https://ci.appveyor.com/project/SteffenForkmann/paket/branch/master)
Paket ===== A package dependency manager for .NET Initial docs can be found at http://fsprojects.github.io/Paket/ [![NuGet Status](http://img.shields.io/nuget/v/Paket.svg?style=flat)](https://www.nuget.org/packages/Paket/) # Build the project | | BuildScript | Status of last build | | :------ | :------: | :------: | | **Mono** | [build.sh](https://github.com/fsprojects/Paket/blob/master/build.sh) | [![Travis build status](https://travis-ci.org/fsprojects/Paket.png)](https://travis-ci.org/fsprojects/Paket) | | **Windows** | [build.cmd](https://github.com/fsprojects/Paket/blob/master/build.cmd) | [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/aqs8eux16x4g5p47/branch/master)](https://ci.appveyor.com/project/SteffenForkmann/paket/branch/master) |
Use a table for build status
Use a table for build status
Markdown
mit
matthid/Paket,mrinaldi/Paket,simonhdickson/Paket,simonhdickson/Paket,mavnn/Paket,magicmonty/Paket,snowcrazed/Paket,lexarchik/Paket,jonathankarsh/Paket,ovatsus/Paket,vasily-kirichenko/Paket,sergey-tihon/Paket,ascjones/Paket,simonhdickson/Paket,devboy/Paket,konste/Paket,theimowski/Paket,ctaggart/Paket,devboy/Paket,betgenius/Paket,dedale/Paket,Stift/Paket,robertpi/Paket,cloudRoutine/Paket,lexarchik/Paket,sergey-tihon/Paket,matthid/Paket,kjellski/Paket,mavnn/Paket,mrinaldi/Paket,Stift/Paket,ascjones/Paket,vbfox/Paket,artur-s/Paket,vbfox/Paket,vbfox/Paket,0x53A/Paket,thinkbeforecoding/Paket,mrinaldi/Paket,fsprojects/Paket,thinkbeforecoding/Paket,simonhdickson/Paket,isaacabraham/Paket,mexx/Paket,isaacabraham/Paket,NatElkins/Paket,mausch/Paket,antymon4o/Paket,Thorium/Paket,0x53A/Paket,LexxFedoroff/Paket,matthid/Paket,betgenius/Paket,matthid/Paket,inosik/Paket,antymon4o/Paket,0x53A/Paket,isaacabraham/Paket,magicmonty/Paket,snowcrazed/Paket,snowcrazed/Paket,baronfel/Paket,dedale/Paket,mrinaldi/Paket,ovatsus/Paket,Thorium/Paket,robertpi/Paket,colinbull/Paket,inosik/Paket,LexxFedoroff/Paket,MorganPersson/Paket,jam40jeff/Paket,thinkbeforecoding/Paket,kjellski/Paket,theimowski/Paket,konste/Paket,vbfox/Paket,cloudRoutine/Paket,mexx/Paket,isaacabraham/Paket,artur-s/Paket,colinbull/Paket,Stift/Paket,Thorium/Paket,jonathankarsh/Paket,snowcrazed/Paket,baronfel/Paket,NatElkins/Paket,0x53A/Paket,Stift/Paket,fsprojects/Paket,jam40jeff/Paket,cloudRoutine/Paket,MorganPersson/Paket,robertpi/Paket,MorganPersson/Paket,MorganPersson/Paket,lexarchik/Paket,mausch/Paket,thinkbeforecoding/Paket,magicmonty/Paket,NatElkins/Paket,robertpi/Paket,vasily-kirichenko/Paket,lexarchik/Paket,NatElkins/Paket,Thorium/Paket,ctaggart/Paket,magicmonty/Paket,cloudRoutine/Paket
markdown
## Code Before: Paket ===== A package dependency manager for .NET Initial docs can be found at http://fsprojects.github.io/Paket/ [![NuGet Status](http://img.shields.io/nuget/v/Paket.svg?style=flat)](https://www.nuget.org/packages/Paket/) # Build the project * Mono: Run *build.sh* [![Travis build status](https://travis-ci.org/fsprojects/Paket.png)](https://travis-ci.org/fsprojects/Paket) * Windows: Run *build.cmd* [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/aqs8eux16x4g5p47/branch/master)](https://ci.appveyor.com/project/SteffenForkmann/paket/branch/master) ## Instruction: Use a table for build status ## Code After: Paket ===== A package dependency manager for .NET Initial docs can be found at http://fsprojects.github.io/Paket/ [![NuGet Status](http://img.shields.io/nuget/v/Paket.svg?style=flat)](https://www.nuget.org/packages/Paket/) # Build the project | | BuildScript | Status of last build | | :------ | :------: | :------: | | **Mono** | [build.sh](https://github.com/fsprojects/Paket/blob/master/build.sh) | [![Travis build status](https://travis-ci.org/fsprojects/Paket.png)](https://travis-ci.org/fsprojects/Paket) | | **Windows** | [build.cmd](https://github.com/fsprojects/Paket/blob/master/build.cmd) | [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/aqs8eux16x4g5p47/branch/master)](https://ci.appveyor.com/project/SteffenForkmann/paket/branch/master) |
6d788133c0b0610a48a8dcb289f8f5c5e8975593
lib/tasks/ci.rake
lib/tasks/ci.rake
namespace :ci do desc <<-DESC Runs tasks to prepare a CI build on Semaphore. DESC task :setup do cp 'config/email.sample.yml', 'config/email.yml' cp 'config/secrets.sample.yml', 'config/secrets.yml' end end
namespace :ci do desc <<-DESC Runs tasks to prepare a CI build on Semaphore. DESC task :setup do cp 'config/email.sample.yml', 'config/email.yml' cp 'config/secrets.sample.yml', 'config/secrets.yml' mkdir_p 'tmp/cache' end end
Create tmp/cache during CI setup
Create tmp/cache during CI setup
Ruby
mit
quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses
ruby
## Code Before: namespace :ci do desc <<-DESC Runs tasks to prepare a CI build on Semaphore. DESC task :setup do cp 'config/email.sample.yml', 'config/email.yml' cp 'config/secrets.sample.yml', 'config/secrets.yml' end end ## Instruction: Create tmp/cache during CI setup ## Code After: namespace :ci do desc <<-DESC Runs tasks to prepare a CI build on Semaphore. DESC task :setup do cp 'config/email.sample.yml', 'config/email.yml' cp 'config/secrets.sample.yml', 'config/secrets.yml' mkdir_p 'tmp/cache' end end
9f92f1f3e03c362d1e194e648cc35ff8f847a5ee
shard.yml
shard.yml
name: atcoder version: 0.1.0 authors: - Koki Takahashi <[email protected]> description: | Implementation of ac-library in Crystal language crystal: 0.33.0 repository: https://github.com/hakatashi/ac-library.cr.git homepage: https://github.com/hakatashi/ac-library.cr documentation: https://github.com/hakatashi/ac-library.cr#readme license: Apache-2.0
name: atcoder version: 0.1.0 authors: - Koki Takahashi <[email protected]> description: | Implementation of ac-library in Crystal language crystal: 0.33.0 repository: https://github.com/google/ac-library.cr.git homepage: https://github.com/google/ac-library.cr documentation: https://github.com/google/ac-library.cr#readme license: Apache-2.0
Rename github username with google
Rename github username with google
YAML
apache-2.0
google/ac-library.cr
yaml
## Code Before: name: atcoder version: 0.1.0 authors: - Koki Takahashi <[email protected]> description: | Implementation of ac-library in Crystal language crystal: 0.33.0 repository: https://github.com/hakatashi/ac-library.cr.git homepage: https://github.com/hakatashi/ac-library.cr documentation: https://github.com/hakatashi/ac-library.cr#readme license: Apache-2.0 ## Instruction: Rename github username with google ## Code After: name: atcoder version: 0.1.0 authors: - Koki Takahashi <[email protected]> description: | Implementation of ac-library in Crystal language crystal: 0.33.0 repository: https://github.com/google/ac-library.cr.git homepage: https://github.com/google/ac-library.cr documentation: https://github.com/google/ac-library.cr#readme license: Apache-2.0
18825d8d57a99e49f777ef564f2877885d0e5871
contrib/flavor/ngs_pipeline_minimal/r-libs.yaml
contrib/flavor/ngs_pipeline_minimal/r-libs.yaml
--- cranrepo: http://cran.fhcrc.org/ cran: - ggplot2 - gsalib - snow biocrepo: http://bioconductor.org/biocLite.R bioc: - cn.mops - rtracklayer
--- cranrepo: http://cran.fhcrc.org/ cran: - ggplot2 - gsalib - snow biocrepo: http://bioconductor.org/biocLite.R bioc: - cn.mops - rtracklayer - DEXSeq
Add DEXseq to the r libraries installed for the minimal pipeline.
Add DEXseq to the r libraries installed for the minimal pipeline.
YAML
mit
chapmanb/cloudbiolinux,AICIDNN/cloudbiolinux,joemphilips/cloudbiolinux,joemphilips/cloudbiolinux,rchekaluk/cloudbiolinux,AICIDNN/cloudbiolinux,kdaily/cloudbiolinux,averagehat/cloudbiolinux,elkingtonmcb/cloudbiolinux,rchekaluk/cloudbiolinux,kdaily/cloudbiolinux,chapmanb/cloudbiolinux,joemphilips/cloudbiolinux,heuermh/cloudbiolinux,lpantano/cloudbiolinux,heuermh/cloudbiolinux,pjotrp/cloudbiolinux,AICIDNN/cloudbiolinux,averagehat/cloudbiolinux,kdaily/cloudbiolinux,AICIDNN/cloudbiolinux,kdaily/cloudbiolinux,lpantano/cloudbiolinux,elkingtonmcb/cloudbiolinux,elkingtonmcb/cloudbiolinux,chapmanb/cloudbiolinux,pjotrp/cloudbiolinux,pjotrp/cloudbiolinux,pjotrp/cloudbiolinux,chapmanb/cloudbiolinux,lpantano/cloudbiolinux,joemphilips/cloudbiolinux,averagehat/cloudbiolinux,rchekaluk/cloudbiolinux,rchekaluk/cloudbiolinux,averagehat/cloudbiolinux,elkingtonmcb/cloudbiolinux,heuermh/cloudbiolinux,heuermh/cloudbiolinux
yaml
## Code Before: --- cranrepo: http://cran.fhcrc.org/ cran: - ggplot2 - gsalib - snow biocrepo: http://bioconductor.org/biocLite.R bioc: - cn.mops - rtracklayer ## Instruction: Add DEXseq to the r libraries installed for the minimal pipeline. ## Code After: --- cranrepo: http://cran.fhcrc.org/ cran: - ggplot2 - gsalib - snow biocrepo: http://bioconductor.org/biocLite.R bioc: - cn.mops - rtracklayer - DEXSeq
83b8f09731705bb13d745c282845c5c2c0963159
docs/index.md
docs/index.md
Welcome to Django Toolkit ========================= Django Toolkit is the set of useful tools we use at LuizaLabs to develop projects using the Django Framework This package includes the utility modules: * [logs](logs) * [middlewares](middlewares) * [shortcuts](shortcuts)
Welcome to Django Toolkit ========================= Django Toolkit is the set of useful tools we use at Luizalabs to develop projects using the [Django web framework][django-website]. This package includes the utility modules: * [logs](logs) * [middlewares](middlewares) * [shortcuts](shortcuts) [django-website]: https://www.djangoproject.com/
Add a link to Django website
Add a link to Django website
Markdown
mit
luizalabs/django-toolkit
markdown
## Code Before: Welcome to Django Toolkit ========================= Django Toolkit is the set of useful tools we use at LuizaLabs to develop projects using the Django Framework This package includes the utility modules: * [logs](logs) * [middlewares](middlewares) * [shortcuts](shortcuts) ## Instruction: Add a link to Django website ## Code After: Welcome to Django Toolkit ========================= Django Toolkit is the set of useful tools we use at Luizalabs to develop projects using the [Django web framework][django-website]. This package includes the utility modules: * [logs](logs) * [middlewares](middlewares) * [shortcuts](shortcuts) [django-website]: https://www.djangoproject.com/
93c834fd3d3d8e4a639985ab2b2c955b37029137
ckanext/opendatani/templates/showcase/snippets/helper.html
ckanext/opendatani/templates/showcase/snippets/helper.html
<div class="module module-narrow module-shallow"> <h2 class="module-heading"> <i class="icon-info-sign"></i> {{ _('What are Showcases?') }} </h2> <div class="module-content"> <p> {% trans %} Showcases are any app, article or report that relate to the published dataset. For example, an annual report that contains aggregated information relating to the dataset or a website where there is further background information on the dataset or a link to an app that has been created utilising some or all of the dataset. {% endtrans %} </p> {% if h.check_access('ckanext_showcase_admin_add') %} <p> Sysadmins can manage Showcase Admins from the <a href="{% url_for controller='ckanext.showcase.controller:ShowcaseController', action='manage_showcase_admins' %}">Showcase configuration page</a>. </p> {% endif %} </div> </div>
<div class="module module-narrow module-shallow"> <h2 class="module-heading"> <i class="icon-info-sign"></i> {{ _('What is a Showcase?') }} </h2> <div class="module-content"> <p> {% trans %} Showcases are any app, article or report that relate to the published dataset. For example, an annual report that contains aggregated information relating to the dataset or a website where there is further background information on the dataset or a link to an app that has been created utilising some or all of the dataset. {% endtrans %} </p> {% if h.check_access('ckanext_showcase_admin_add') %} <p> Sysadmins can manage Showcase Admins from the <a href="{% url_for controller='ckanext.showcase.controller:ShowcaseController', action='manage_showcase_admins' %}">Showcase configuration page</a>. </p> <p> <b>Please note we do not validate any of the Showcases and publication of them does not necessarily mean we endorse them</b> </p> {% endif %} </div> </div>
Add disclaimer sentence on showcase page
Add disclaimer sentence on showcase page
HTML
agpl-3.0
okfn/ckanext-opendatani,okfn/ckanext-opendatani,okfn/ckanext-opendatani,okfn/ckanext-opendatani
html
## Code Before: <div class="module module-narrow module-shallow"> <h2 class="module-heading"> <i class="icon-info-sign"></i> {{ _('What are Showcases?') }} </h2> <div class="module-content"> <p> {% trans %} Showcases are any app, article or report that relate to the published dataset. For example, an annual report that contains aggregated information relating to the dataset or a website where there is further background information on the dataset or a link to an app that has been created utilising some or all of the dataset. {% endtrans %} </p> {% if h.check_access('ckanext_showcase_admin_add') %} <p> Sysadmins can manage Showcase Admins from the <a href="{% url_for controller='ckanext.showcase.controller:ShowcaseController', action='manage_showcase_admins' %}">Showcase configuration page</a>. </p> {% endif %} </div> </div> ## Instruction: Add disclaimer sentence on showcase page ## Code After: <div class="module module-narrow module-shallow"> <h2 class="module-heading"> <i class="icon-info-sign"></i> {{ _('What is a Showcase?') }} </h2> <div class="module-content"> <p> {% trans %} Showcases are any app, article or report that relate to the published dataset. For example, an annual report that contains aggregated information relating to the dataset or a website where there is further background information on the dataset or a link to an app that has been created utilising some or all of the dataset. {% endtrans %} </p> {% if h.check_access('ckanext_showcase_admin_add') %} <p> Sysadmins can manage Showcase Admins from the <a href="{% url_for controller='ckanext.showcase.controller:ShowcaseController', action='manage_showcase_admins' %}">Showcase configuration page</a>. </p> <p> <b>Please note we do not validate any of the Showcases and publication of them does not necessarily mean we endorse them</b> </p> {% endif %} </div> </div>
8626be664570b04c4f3f7f45855a606e33e5df60
c3/app/views/helper/whereabouts.scala.html
c3/app/views/helper/whereabouts.scala.html
@(field: play.api.data.Field, opts: Seq[(String, String)], args: (Symbol, Any)*)(implicit lang: play.api.i18n.Lang) @import scala.util.Try @import helper.dates._ @import utils.helpers.SelectOtherTemplate._ @helper.input(field, args ++ Seq('helper -> "e.g. Hospital"): _*) { (id, name, value, htmlArgs) => @views.html.helper.selectWithOtherPlaceholder(field("location"), opts, args:_*) }
@(field: play.api.data.Field, opts: Seq[(String, String)], args: (Symbol, Any)*)(implicit lang: play.api.i18n.Lang) @import scala.util.Try @import helper.dates._ @import utils.helpers.SelectOtherTemplate._ @helper.input(field("location"), args ++ Seq('helper -> "e.g. Hospital"): _*) { (id, name, value, htmlArgs) => @views.html.helper.selectWithOtherPlaceholder(field("location"), opts, args:_*) }
Fix defect where whereabouts not filled in was not displaying madatory red box around the field
Fix defect where whereabouts not filled in was not displaying madatory red box around the field
HTML
mit
Department-for-Work-and-Pensions/ClaimCapture,Department-for-Work-and-Pensions/ClaimCapture,Department-for-Work-and-Pensions/ClaimCapture
html
## Code Before: @(field: play.api.data.Field, opts: Seq[(String, String)], args: (Symbol, Any)*)(implicit lang: play.api.i18n.Lang) @import scala.util.Try @import helper.dates._ @import utils.helpers.SelectOtherTemplate._ @helper.input(field, args ++ Seq('helper -> "e.g. Hospital"): _*) { (id, name, value, htmlArgs) => @views.html.helper.selectWithOtherPlaceholder(field("location"), opts, args:_*) } ## Instruction: Fix defect where whereabouts not filled in was not displaying madatory red box around the field ## Code After: @(field: play.api.data.Field, opts: Seq[(String, String)], args: (Symbol, Any)*)(implicit lang: play.api.i18n.Lang) @import scala.util.Try @import helper.dates._ @import utils.helpers.SelectOtherTemplate._ @helper.input(field("location"), args ++ Seq('helper -> "e.g. Hospital"): _*) { (id, name, value, htmlArgs) => @views.html.helper.selectWithOtherPlaceholder(field("location"), opts, args:_*) }
d85d2805568f8ea3af628aa82192c497e4229981
resources/ec2-subnets.go
resources/ec2-subnets.go
package resources import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" ) type EC2Subnet struct { svc *ec2.EC2 id *string region *string } func (n *EC2Nuke) ListSubnets() ([]Resource, error) { params := &ec2.DescribeSubnetsInput{} resp, err := n.Service.DescribeSubnets(params) if err != nil { return nil, err } resources := make([]Resource, 0) for _, out := range resp.Subnets { resources = append(resources, &EC2Subnet{ svc: n.Service, id: out.SubnetId, region: n.Service.Config.Region, }) } return resources, nil } func (e *EC2Subnet) Remove() error { params := &ec2.DeleteSubnetInput{ SubnetId: e.id, } _, err := e.svc.DeleteSubnet(params) if err != nil { return err } return nil } func (e *EC2Subnet) String() string { return fmt.Sprintf("%s in %s", *e.id, *e.region) }
package resources import "github.com/aws/aws-sdk-go/service/ec2" type EC2Subnet struct { svc *ec2.EC2 id *string region *string } func (n *EC2Nuke) ListSubnets() ([]Resource, error) { params := &ec2.DescribeSubnetsInput{} resp, err := n.Service.DescribeSubnets(params) if err != nil { return nil, err } resources := make([]Resource, 0) for _, out := range resp.Subnets { resources = append(resources, &EC2Subnet{ svc: n.Service, id: out.SubnetId, region: n.Service.Config.Region, }) } return resources, nil } func (e *EC2Subnet) Remove() error { params := &ec2.DeleteSubnetInput{ SubnetId: e.id, } _, err := e.svc.DeleteSubnet(params) if err != nil { return err } return nil } func (e *EC2Subnet) String() string { return *e.id }
Revert "fixup! CLOUD-1047: Add region to resources"
Revert "fixup! CLOUD-1047: Add region to resources" This reverts commit 05773b07489f247b989f30f866bcba77d9522ac8.
Go
mit
rebuy-de/aws-nuke,rebuy-de/aws-nuke
go
## Code Before: package resources import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" ) type EC2Subnet struct { svc *ec2.EC2 id *string region *string } func (n *EC2Nuke) ListSubnets() ([]Resource, error) { params := &ec2.DescribeSubnetsInput{} resp, err := n.Service.DescribeSubnets(params) if err != nil { return nil, err } resources := make([]Resource, 0) for _, out := range resp.Subnets { resources = append(resources, &EC2Subnet{ svc: n.Service, id: out.SubnetId, region: n.Service.Config.Region, }) } return resources, nil } func (e *EC2Subnet) Remove() error { params := &ec2.DeleteSubnetInput{ SubnetId: e.id, } _, err := e.svc.DeleteSubnet(params) if err != nil { return err } return nil } func (e *EC2Subnet) String() string { return fmt.Sprintf("%s in %s", *e.id, *e.region) } ## Instruction: Revert "fixup! CLOUD-1047: Add region to resources" This reverts commit 05773b07489f247b989f30f866bcba77d9522ac8. ## Code After: package resources import "github.com/aws/aws-sdk-go/service/ec2" type EC2Subnet struct { svc *ec2.EC2 id *string region *string } func (n *EC2Nuke) ListSubnets() ([]Resource, error) { params := &ec2.DescribeSubnetsInput{} resp, err := n.Service.DescribeSubnets(params) if err != nil { return nil, err } resources := make([]Resource, 0) for _, out := range resp.Subnets { resources = append(resources, &EC2Subnet{ svc: n.Service, id: out.SubnetId, region: n.Service.Config.Region, }) } return resources, nil } func (e *EC2Subnet) Remove() error { params := &ec2.DeleteSubnetInput{ SubnetId: e.id, } _, err := e.svc.DeleteSubnet(params) if err != nil { return err } return nil } func (e *EC2Subnet) String() string { return *e.id }
5b5dcf2405100a9f87dab83babff4488aa57073d
client/client.go
client/client.go
package client import ( "code.google.com/p/go-uuid/uuid" "github.com/dnaeon/gru/minion" ) type Client interface { // Submits a new task to a minion SubmitTask(minion uuid.UUID, task MinionTask) error }
package client import ( "code.google.com/p/go-uuid/uuid" // "github.com/dnaeon/gru/minion" "gru/minion" ) type Client interface { // Submits a new task to a minion SubmitTask(u uuid.UUID, t minion.MinionTask) error }
Use shorter names for the arguments passed to SubmitTask method
Use shorter names for the arguments passed to SubmitTask method
Go
mit
ranjithamca/gru
go
## Code Before: package client import ( "code.google.com/p/go-uuid/uuid" "github.com/dnaeon/gru/minion" ) type Client interface { // Submits a new task to a minion SubmitTask(minion uuid.UUID, task MinionTask) error } ## Instruction: Use shorter names for the arguments passed to SubmitTask method ## Code After: package client import ( "code.google.com/p/go-uuid/uuid" // "github.com/dnaeon/gru/minion" "gru/minion" ) type Client interface { // Submits a new task to a minion SubmitTask(u uuid.UUID, t minion.MinionTask) error }
892457433b74999a6cb01bc4fa73255021820c1a
method-proxy.js
method-proxy.js
var MethodProxy = function(object, queue) { this.init = function(object, queue) { this.object = object; for (var i = 0; i < queue.length; ++i) { this.forward(queue[i]); } }; // payload : ['methodName', arguments*] this.push = this.forward = function(payload) { var methodName = payload.shift().split('.'), object = this.object, method; while (methodName.length) { // dig into the object as many levels as needed (e.g. `FB.XFBML.parse`) if (method) { object = object[method]; } method = methodName.shift(); } return object[method].apply(object, payload); }; this.init(object, queue); };
var MethodProxy = function(object, queue) { this.init = function(object, queue) { this.object = object; for (var i = 0, len = queue.length; i < len; ++i) { this.forward(queue[i]); } }; // payload : ['methodName', arguments*] this.push = this.forward = function(payload) { var methodName = payload.shift().split('.'), object = this.object, method; while (methodName.length) { // dig into the object as many levels as needed (e.g. `FB.XFBML.parse`) if (method) { object = object[method]; } method = methodName.shift(); } return object[method].apply(object, payload); }; this.init(object, queue); };
Improve efficiency of queue loop
Improve efficiency of queue loop This commit avoids a property lookup on every iteration of the queue-consuming loop by first storing it in a variable, since we don't expect the size of the array to change within the duration of the loop. This will make the initialization slightly more efficient. Change-Id: Ied891fd5fd360c9732e61c7cf8a645ec63801cc6 Reviewed-on: https://gerrit.causes.com/23783 Tested-by: Joe Lencioni <[email protected]> Reviewed-by: Greg Hurrell <[email protected]>
JavaScript
mit
causes/method-proxy-js
javascript
## Code Before: var MethodProxy = function(object, queue) { this.init = function(object, queue) { this.object = object; for (var i = 0; i < queue.length; ++i) { this.forward(queue[i]); } }; // payload : ['methodName', arguments*] this.push = this.forward = function(payload) { var methodName = payload.shift().split('.'), object = this.object, method; while (methodName.length) { // dig into the object as many levels as needed (e.g. `FB.XFBML.parse`) if (method) { object = object[method]; } method = methodName.shift(); } return object[method].apply(object, payload); }; this.init(object, queue); }; ## Instruction: Improve efficiency of queue loop This commit avoids a property lookup on every iteration of the queue-consuming loop by first storing it in a variable, since we don't expect the size of the array to change within the duration of the loop. This will make the initialization slightly more efficient. Change-Id: Ied891fd5fd360c9732e61c7cf8a645ec63801cc6 Reviewed-on: https://gerrit.causes.com/23783 Tested-by: Joe Lencioni <[email protected]> Reviewed-by: Greg Hurrell <[email protected]> ## Code After: var MethodProxy = function(object, queue) { this.init = function(object, queue) { this.object = object; for (var i = 0, len = queue.length; i < len; ++i) { this.forward(queue[i]); } }; // payload : ['methodName', arguments*] this.push = this.forward = function(payload) { var methodName = payload.shift().split('.'), object = this.object, method; while (methodName.length) { // dig into the object as many levels as needed (e.g. `FB.XFBML.parse`) if (method) { object = object[method]; } method = methodName.shift(); } return object[method].apply(object, payload); }; this.init(object, queue); };
2a9f34aa41ea3416c9e46fb810f4b94b4e1afede
routes.js
routes.js
/** * @file routes.js */ const express = require('express'), storage = require('node-persist') const categorize = require('./middlewares').categorize, validateGroup = require('./middlewares').validateGroup let handlers = require('./middlewares').handlers exports.init = (bot) => { storage.initSync() const router = express.Router() const url = '/bot/:id/:name' handlers = handlers.map(handle => handle(bot)) // handle group messages router.post.apply(router, [url, categorize, validateGroup].concat(handlers)) // handle user messages router.post.apply(router, [url].concat(handlers)) return router }
/** * @file routes.js */ const express = require('express'), storage = require('node-persist') const { validate, isGroup, hasMention, handlers } = require('./middlewares') exports.init = (bot) => { storage.initSync() const uri = '/bot/:id/:name' const middlewares = handlers.map((init) => init(bot)) const router = express.Router() router.post(uri, validate) // group message middlewares router.post(uri, isGroup, hasMention, middlewares) // private message middlewares router.post(uri, middlewares) return router }
Add route and use new filter middlewares
Add route and use new filter middlewares
JavaScript
mit
vekat/magic-conch-shell,Vekat/magicConchShell
javascript
## Code Before: /** * @file routes.js */ const express = require('express'), storage = require('node-persist') const categorize = require('./middlewares').categorize, validateGroup = require('./middlewares').validateGroup let handlers = require('./middlewares').handlers exports.init = (bot) => { storage.initSync() const router = express.Router() const url = '/bot/:id/:name' handlers = handlers.map(handle => handle(bot)) // handle group messages router.post.apply(router, [url, categorize, validateGroup].concat(handlers)) // handle user messages router.post.apply(router, [url].concat(handlers)) return router } ## Instruction: Add route and use new filter middlewares ## Code After: /** * @file routes.js */ const express = require('express'), storage = require('node-persist') const { validate, isGroup, hasMention, handlers } = require('./middlewares') exports.init = (bot) => { storage.initSync() const uri = '/bot/:id/:name' const middlewares = handlers.map((init) => init(bot)) const router = express.Router() router.post(uri, validate) // group message middlewares router.post(uri, isGroup, hasMention, middlewares) // private message middlewares router.post(uri, middlewares) return router }
a5c76918ec47fd0833487723a1f91fed4a31b4d6
travis/install_prestashop.sh
travis/install_prestashop.sh
echo Clone Prestashop # Clone Prestashop into Build Folder cd $TRAVIS_BUILD_DIR git clone --depth=50 --branch=$PS_VERSION https://github.com/Prestashop/Prestashop.git $TRAVIS_BUILD_DIR ls -al $TRAVIS_BUILD_DIR # PrestaShop configuration cp tests/parameters.yml.travis app/config/parameters.yml
echo Clone Prestashop # Clone Prestashop into Build Folder cd $TRAVIS_BUILD_DIR git clone --depth=50 --branch=$PS_VERSION https://github.com/Prestashop/Prestashop.git $TRAVIS_BUILD_DIR ls -al $TRAVIS_BUILD_DIR # PrestaShop configuration # cp tests/parameters.yml.travis app/config/parameters.yml cp app/config/parameters.yml.dist app/config/parameters.yml
Upgrade to Splash V2 Standards
WIP: Upgrade to Splash V2 Standards
Shell
mit
SplashSync/Prestashop,SplashSync/Prestashop,SplashSync/Prestashop
shell
## Code Before: echo Clone Prestashop # Clone Prestashop into Build Folder cd $TRAVIS_BUILD_DIR git clone --depth=50 --branch=$PS_VERSION https://github.com/Prestashop/Prestashop.git $TRAVIS_BUILD_DIR ls -al $TRAVIS_BUILD_DIR # PrestaShop configuration cp tests/parameters.yml.travis app/config/parameters.yml ## Instruction: WIP: Upgrade to Splash V2 Standards ## Code After: echo Clone Prestashop # Clone Prestashop into Build Folder cd $TRAVIS_BUILD_DIR git clone --depth=50 --branch=$PS_VERSION https://github.com/Prestashop/Prestashop.git $TRAVIS_BUILD_DIR ls -al $TRAVIS_BUILD_DIR # PrestaShop configuration # cp tests/parameters.yml.travis app/config/parameters.yml cp app/config/parameters.yml.dist app/config/parameters.yml
921e3fa2079b32a5abb723faf2a568aff4378939
lib/ruboty/brains/google_spreadsheet.rb
lib/ruboty/brains/google_spreadsheet.rb
module Ruboty module Brains class GoogleSpreadsheet < Base env :GOOGLE_CLIENT_ID, "Client ID" env :GOOGLE_CLIENT_SECRET, "Client secret" env :GOOGLE_REDIRECT_URI, "Redirect URI" env :GOOGLE_REFRESH_TOKEN, "Refresh token issued with access token" env :GOOGLE_SPREADSHEET_KEY, "Spreadsheet key (e.g. https://docs.google.com/spreadsheets/d/<key>/edit#gid=0)" def initialize super @threads = [] @threads << Thread.new { sync } @threads << Thread.new { reauthenticate } @threads.each { |thread| thread.abort_on_exception = true } @client = Ruboty::GoogleSpreadsheet::Client.new( client_id: ENV["GOOGLE_CLIENT_ID"], client_secret: ENV["GOOGLE_CLIENT_SECRET"], redirect_uri: ENV["GOOGLE_REDIRECT_URI"], refresh_token: ENV["GOOGLE_REFRESH_TOKEN"] ) @client.authenticate! end def data @data ||= Ruboty::GoogleSpreadsheet::Spreadsheet.new( access_token: @client.access_token, spreadsheet_key: ENV["GOOGLE_SPREADSHEET_KEY"] ) end private def sync loop do sleep 5 data.synchronize end end def reauthenticate loop do sleep 1800 @client.authenticate! @data = nil end end end end end
module Ruboty module Brains class GoogleSpreadsheet < Base env :GOOGLE_CLIENT_ID, "Client ID" env :GOOGLE_CLIENT_SECRET, "Client secret" env :GOOGLE_REDIRECT_URI, "Redirect URI" env :GOOGLE_REFRESH_TOKEN, "Refresh token issued with access token" env :GOOGLE_SPREADSHEET_KEY, "Spreadsheet key (e.g. https://docs.google.com/spreadsheets/d/<key>/edit#gid=0)" def initialize super @threads = [] @threads << Thread.new { sync } @threads << Thread.new { reauthenticate } @threads.each { |thread| thread.abort_on_exception = true } @client = Ruboty::GoogleSpreadsheet::Client.new( client_id: ENV["GOOGLE_CLIENT_ID"], client_secret: ENV["GOOGLE_CLIENT_SECRET"], redirect_uri: ENV["GOOGLE_REDIRECT_URI"], refresh_token: ENV["GOOGLE_REFRESH_TOKEN"] ) @client.authenticate! end def data @data ||= Ruboty::GoogleSpreadsheet::Spreadsheet.new( access_token: @client.access_token, spreadsheet_key: ENV["GOOGLE_SPREADSHEET_KEY"] ) end private def sync loop do sleep 5 data.synchronize end end def reauthenticate loop do # access token will expire in 3600 sec. sleep 3599 @client.authenticate! @data = nil end end end end end
Fix the interval for reauthorization
Fix the interval for reauthorization
Ruby
mit
naoty/ruboty-google_spreadsheet
ruby
## Code Before: module Ruboty module Brains class GoogleSpreadsheet < Base env :GOOGLE_CLIENT_ID, "Client ID" env :GOOGLE_CLIENT_SECRET, "Client secret" env :GOOGLE_REDIRECT_URI, "Redirect URI" env :GOOGLE_REFRESH_TOKEN, "Refresh token issued with access token" env :GOOGLE_SPREADSHEET_KEY, "Spreadsheet key (e.g. https://docs.google.com/spreadsheets/d/<key>/edit#gid=0)" def initialize super @threads = [] @threads << Thread.new { sync } @threads << Thread.new { reauthenticate } @threads.each { |thread| thread.abort_on_exception = true } @client = Ruboty::GoogleSpreadsheet::Client.new( client_id: ENV["GOOGLE_CLIENT_ID"], client_secret: ENV["GOOGLE_CLIENT_SECRET"], redirect_uri: ENV["GOOGLE_REDIRECT_URI"], refresh_token: ENV["GOOGLE_REFRESH_TOKEN"] ) @client.authenticate! end def data @data ||= Ruboty::GoogleSpreadsheet::Spreadsheet.new( access_token: @client.access_token, spreadsheet_key: ENV["GOOGLE_SPREADSHEET_KEY"] ) end private def sync loop do sleep 5 data.synchronize end end def reauthenticate loop do sleep 1800 @client.authenticate! @data = nil end end end end end ## Instruction: Fix the interval for reauthorization ## Code After: module Ruboty module Brains class GoogleSpreadsheet < Base env :GOOGLE_CLIENT_ID, "Client ID" env :GOOGLE_CLIENT_SECRET, "Client secret" env :GOOGLE_REDIRECT_URI, "Redirect URI" env :GOOGLE_REFRESH_TOKEN, "Refresh token issued with access token" env :GOOGLE_SPREADSHEET_KEY, "Spreadsheet key (e.g. https://docs.google.com/spreadsheets/d/<key>/edit#gid=0)" def initialize super @threads = [] @threads << Thread.new { sync } @threads << Thread.new { reauthenticate } @threads.each { |thread| thread.abort_on_exception = true } @client = Ruboty::GoogleSpreadsheet::Client.new( client_id: ENV["GOOGLE_CLIENT_ID"], client_secret: ENV["GOOGLE_CLIENT_SECRET"], redirect_uri: ENV["GOOGLE_REDIRECT_URI"], refresh_token: ENV["GOOGLE_REFRESH_TOKEN"] ) @client.authenticate! end def data @data ||= Ruboty::GoogleSpreadsheet::Spreadsheet.new( access_token: @client.access_token, spreadsheet_key: ENV["GOOGLE_SPREADSHEET_KEY"] ) end private def sync loop do sleep 5 data.synchronize end end def reauthenticate loop do # access token will expire in 3600 sec. sleep 3599 @client.authenticate! @data = nil end end end end end
7e24f4424d9b7e5e874035a21a33fdf089151420
tests/ConnectionManagerTest.php
tests/ConnectionManagerTest.php
<?php namespace duxet\Tests\Realtime; use duxet\Realtime\ConnectionManager; use duxet\Realtime\Connections\NullConnection; use Mockery; class ConnectionManagerTest extends TestCase { public function testConnectionName() { $config = ['driver' => 'null']; $manager = $this->getConfigManager($config); $this->assertSame([], $manager->getConnections()); $return = $manager->connection('local'); $this->assertInstanceOf('duxet\Realtime\Contracts\Connection', $return); $this->assertArrayHasKey('local', $manager->getConnections()); } protected function getManager() { $config = Mockery::mock('Illuminate\Contracts\Config\Repository'); $manager = new ConnectionManager($config); $manager->extend('null', function() { return new NullConnection; }); return $manager; } protected function getConfigManager(array $config) { $manager = $this->getManager(); $manager->getConfig()->shouldReceive('get')->once() ->with('realtime.connections')->andReturn(['local' => $config]); $config['name'] = 'local'; return $manager; } }
<?php namespace duxet\Tests\Realtime; use duxet\Realtime\ConnectionManager; use duxet\Realtime\Connections\NullConnection; use Mockery; class ConnectionManagerTest extends TestCase { public function testConnectionName() { $config = ['driver' => 'null']; $manager = $this->getConfigManager($config); $this->assertSame([], $manager->getConnections()); $return = $manager->connection('local'); $this->assertInstanceOf('duxet\Realtime\Contracts\Connection', $return); $this->assertArrayHasKey('local', $manager->getConnections()); } /** * @expectedException \InvalidArgumentException */ public function testConnectionError() { $manager = $this->getManager(); $config = ['driver' => 'error']; $manager->getConfig()->shouldReceive('get')->once() ->with('realtime.connections')->andReturn(['local' => $config]); $this->assertSame([], $manager->getConnections()); $return = null; $manager->connection('error'); } protected function getManager() { $config = Mockery::mock('Illuminate\Contracts\Config\Repository'); $manager = new ConnectionManager($config); $manager->extend('null', function() { return new NullConnection; }); return $manager; } protected function getConfigManager(array $config) { $manager = $this->getManager(); $manager->getConfig()->shouldReceive('get')->once() ->with('realtime.connections')->andReturn(['local' => $config]); $config['name'] = 'local'; return $manager; } }
Add one more Connection Manager test
Add one more Connection Manager test
PHP
mit
duxet/laravel-realtime
php
## Code Before: <?php namespace duxet\Tests\Realtime; use duxet\Realtime\ConnectionManager; use duxet\Realtime\Connections\NullConnection; use Mockery; class ConnectionManagerTest extends TestCase { public function testConnectionName() { $config = ['driver' => 'null']; $manager = $this->getConfigManager($config); $this->assertSame([], $manager->getConnections()); $return = $manager->connection('local'); $this->assertInstanceOf('duxet\Realtime\Contracts\Connection', $return); $this->assertArrayHasKey('local', $manager->getConnections()); } protected function getManager() { $config = Mockery::mock('Illuminate\Contracts\Config\Repository'); $manager = new ConnectionManager($config); $manager->extend('null', function() { return new NullConnection; }); return $manager; } protected function getConfigManager(array $config) { $manager = $this->getManager(); $manager->getConfig()->shouldReceive('get')->once() ->with('realtime.connections')->andReturn(['local' => $config]); $config['name'] = 'local'; return $manager; } } ## Instruction: Add one more Connection Manager test ## Code After: <?php namespace duxet\Tests\Realtime; use duxet\Realtime\ConnectionManager; use duxet\Realtime\Connections\NullConnection; use Mockery; class ConnectionManagerTest extends TestCase { public function testConnectionName() { $config = ['driver' => 'null']; $manager = $this->getConfigManager($config); $this->assertSame([], $manager->getConnections()); $return = $manager->connection('local'); $this->assertInstanceOf('duxet\Realtime\Contracts\Connection', $return); $this->assertArrayHasKey('local', $manager->getConnections()); } /** * @expectedException \InvalidArgumentException */ public function testConnectionError() { $manager = $this->getManager(); $config = ['driver' => 'error']; $manager->getConfig()->shouldReceive('get')->once() ->with('realtime.connections')->andReturn(['local' => $config]); $this->assertSame([], $manager->getConnections()); $return = null; $manager->connection('error'); } protected function getManager() { $config = Mockery::mock('Illuminate\Contracts\Config\Repository'); $manager = new ConnectionManager($config); $manager->extend('null', function() { return new NullConnection; }); return $manager; } protected function getConfigManager(array $config) { $manager = $this->getManager(); $manager->getConfig()->shouldReceive('get')->once() ->with('realtime.connections')->andReturn(['local' => $config]); $config['name'] = 'local'; return $manager; } }
3f7c8bb47ab1203749e1a805c91a6ead47a215b0
.travis.yml
.travis.yml
language: ruby rvm: - ruby-head - 2.7 - 2.6 - 2.5 - 2.4 - jruby-9.2 before_script: - make install script: - make test matrix: allow_failures: - rvm: ruby-head fast_finish: true deploy: provider: rubygems api_key: $RUBYGEMS_API_KEY gem: smtpapi on: tags: true rvm: '2.4' skip_cleanup: true notifications: slack: if: branch = main on_pull_requests: false on_success: never on_failure: change rooms: $SLACK_TOKEN
language: ruby rvm: - ruby-head - 2.7 - 2.6 - 2.5 - 2.4 - jruby-9.2 before_script: - make install script: - make test matrix: allow_failures: - rvm: ruby-head fast_finish: true deploy: provider: rubygems api_key: $RUBYGEMS_API_KEY gem: smtpapi on: tags: true rvm: '2.4' skip_cleanup: true notifications: slack: if: branch = main on_pull_requests: false on_success: never on_failure: change rooms: - secure: kyDurUDtXcp+6SfpFeszmzRZEpl2IOFqevGelhKVfx7j+M+p1wvPCkv9vnSdpKaZbQ80EKORxS4ZsnKUL9/yOP2uF9mrzB/DCfzFynw/IVfBejM8nkbf/CmosFh0SkkLuwotaPeqMhAtg1J8Avk1HVKJmihaJfkD6kzQ3PSyKlw=
Revert "chore: move encrypted tokens to environment variables"
Revert "chore: move encrypted tokens to environment variables" This reverts part of commit b8fd2a24
YAML
mit
sendgrid/smtpapi-ruby
yaml
## Code Before: language: ruby rvm: - ruby-head - 2.7 - 2.6 - 2.5 - 2.4 - jruby-9.2 before_script: - make install script: - make test matrix: allow_failures: - rvm: ruby-head fast_finish: true deploy: provider: rubygems api_key: $RUBYGEMS_API_KEY gem: smtpapi on: tags: true rvm: '2.4' skip_cleanup: true notifications: slack: if: branch = main on_pull_requests: false on_success: never on_failure: change rooms: $SLACK_TOKEN ## Instruction: Revert "chore: move encrypted tokens to environment variables" This reverts part of commit b8fd2a24 ## Code After: language: ruby rvm: - ruby-head - 2.7 - 2.6 - 2.5 - 2.4 - jruby-9.2 before_script: - make install script: - make test matrix: allow_failures: - rvm: ruby-head fast_finish: true deploy: provider: rubygems api_key: $RUBYGEMS_API_KEY gem: smtpapi on: tags: true rvm: '2.4' skip_cleanup: true notifications: slack: if: branch = main on_pull_requests: false on_success: never on_failure: change rooms: - secure: kyDurUDtXcp+6SfpFeszmzRZEpl2IOFqevGelhKVfx7j+M+p1wvPCkv9vnSdpKaZbQ80EKORxS4ZsnKUL9/yOP2uF9mrzB/DCfzFynw/IVfBejM8nkbf/CmosFh0SkkLuwotaPeqMhAtg1J8Avk1HVKJmihaJfkD6kzQ3PSyKlw=
19087eae584a2673328076910ee94d8029e9ef0d
lib/services.rb
lib/services.rb
require 'gds_api/publishing_api_v2' module Services def self.publishing_api @publishing_api ||= GdsApi::PublishingApiV2.new(Plek.new.find('publishing-api')) end end
require 'gds_api/publishing_api_v2' module Services def self.publishing_api @publishing_api ||= GdsApi::PublishingApiV2.new( Plek.new.find('publishing-api'), bearer_token: ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example' ) end end
Add bearer_token for publishing API authentication
Add bearer_token for publishing API authentication
Ruby
mit
mikeee/z_archived-calculators,mikeee/z_archived-calculators,mikeee/z_archived-calculators,mikeee/z_archived-calculators
ruby
## Code Before: require 'gds_api/publishing_api_v2' module Services def self.publishing_api @publishing_api ||= GdsApi::PublishingApiV2.new(Plek.new.find('publishing-api')) end end ## Instruction: Add bearer_token for publishing API authentication ## Code After: require 'gds_api/publishing_api_v2' module Services def self.publishing_api @publishing_api ||= GdsApi::PublishingApiV2.new( Plek.new.find('publishing-api'), bearer_token: ENV['PUBLISHING_API_BEARER_TOKEN'] || 'example' ) end end
4ddebfc36e25837e480c933c2cbc5b63d2533f5b
README.md
README.md
[Get it in the Chrome Web Store!][web-store] Add links in pull requests to successful builds based on the SHA. ## Auto-configuration If a repo hasn't been configured, and you're viewing the README of the repo, the UI Previewer Button can auto-configure itself. To set this up, [see below](#user-content-ui-previewer-button-config) or follow these steps: 1. Add a header with the title 'UI Previewer Button config' (case doesn't matter). 2. Below that, add a code block with a valid JSON configuration object. To learn more about the format, visit the extension's options page, where you can also configure repos manually. ## UI Previewer Button config ```json { "mainButton": { "urlPattern": "https://github.com/rightscale/ui-previewer-button/commit/${gitSha}.patch", "buttonText": "Patch", "icon": "file-text" } } ``` [web-store]: https://chrome.google.com/webstore/detail/ui-previewer-button/calcadjojlbjppijehnmjhpccdhknodk?hl=en&gl=GB
[Get it in the Chrome Web Store!][web-store] Add links in pull requests to successful builds based on the SHA. ## For example The minimal example is this repo itself: with this extension installed, viewing a PR on this repo will add an icon to show the commit in patch format. A better example is, if you [automatically build a UI on every push][scoutfile-post], you can add a preview link to each commit, and to the PR as a whole, to test that UI immediately. The same goes for docs builds, or anything else you can think of. ## Auto-configuration If a repo hasn't been configured, and you're viewing the README of the repo, the UI Previewer Button can auto-configure itself. To set this up, [see below](#user-content-ui-previewer-button-config) or follow these steps: 1. Add a header with the title 'UI Previewer Button config' (case doesn't matter). 2. Below that, add a code block with a valid JSON configuration object. To learn more about the format, visit the extension's options page, where you can also configure repos manually. ## UI Previewer Button config ```json { "mainButton": { "urlPattern": "https://github.com/rightscale/ui-previewer-button/commit/${gitSha}.patch", "buttonText": "Patch", "icon": "file-text" } } ``` [web-store]: https://chrome.google.com/webstore/detail/ui-previewer-button/calcadjojlbjppijehnmjhpccdhknodk?hl=en&gl=GB [scoutfile-post]: http://eng.rightscale.com/2014/11/18/front-end-deployment.html
Add example and link to blog post
Add example and link to blog post
Markdown
mit
rightscale/ui-previewer-button,rightscale/ui-previewer-button
markdown
## Code Before: [Get it in the Chrome Web Store!][web-store] Add links in pull requests to successful builds based on the SHA. ## Auto-configuration If a repo hasn't been configured, and you're viewing the README of the repo, the UI Previewer Button can auto-configure itself. To set this up, [see below](#user-content-ui-previewer-button-config) or follow these steps: 1. Add a header with the title 'UI Previewer Button config' (case doesn't matter). 2. Below that, add a code block with a valid JSON configuration object. To learn more about the format, visit the extension's options page, where you can also configure repos manually. ## UI Previewer Button config ```json { "mainButton": { "urlPattern": "https://github.com/rightscale/ui-previewer-button/commit/${gitSha}.patch", "buttonText": "Patch", "icon": "file-text" } } ``` [web-store]: https://chrome.google.com/webstore/detail/ui-previewer-button/calcadjojlbjppijehnmjhpccdhknodk?hl=en&gl=GB ## Instruction: Add example and link to blog post ## Code After: [Get it in the Chrome Web Store!][web-store] Add links in pull requests to successful builds based on the SHA. ## For example The minimal example is this repo itself: with this extension installed, viewing a PR on this repo will add an icon to show the commit in patch format. A better example is, if you [automatically build a UI on every push][scoutfile-post], you can add a preview link to each commit, and to the PR as a whole, to test that UI immediately. The same goes for docs builds, or anything else you can think of. ## Auto-configuration If a repo hasn't been configured, and you're viewing the README of the repo, the UI Previewer Button can auto-configure itself. To set this up, [see below](#user-content-ui-previewer-button-config) or follow these steps: 1. Add a header with the title 'UI Previewer Button config' (case doesn't matter). 2. Below that, add a code block with a valid JSON configuration object. To learn more about the format, visit the extension's options page, where you can also configure repos manually. ## UI Previewer Button config ```json { "mainButton": { "urlPattern": "https://github.com/rightscale/ui-previewer-button/commit/${gitSha}.patch", "buttonText": "Patch", "icon": "file-text" } } ``` [web-store]: https://chrome.google.com/webstore/detail/ui-previewer-button/calcadjojlbjppijehnmjhpccdhknodk?hl=en&gl=GB [scoutfile-post]: http://eng.rightscale.com/2014/11/18/front-end-deployment.html
1955723258e84e8451a0cdc3851e8cf51e4416c2
js/widget.js
js/widget.js
(function ($) { $(window).load(function(){ var store = window.hologram.store; window.hologram(document.getElementsByClassName('hologram-area')[0], { uploadUrl: Drupal.settings.Hologram.uploadUrl, onComplete: function(result){ var json = JSON.stringify(result); $('#hologram-image-data').val(json); }, config: { uploader: '/hologram/upload' }, }); //Push exist images to holgoram widget try{ var files = $('#hologram-image-data').val(); if(files){ files = JSON.parse(files); store.dispatch(window.hologram.addFiles(files)); } }catch(ex){ console.log(ex); } store.subscribe(function(){ var files = store.getState().files; var json = JSON.stringify(files); $('#hologram-image-data').val(json); }); }); })(jQuery);
(function ($) { $(window).load(function(){ var store = window.hologram.store; window.hologram(document.getElementsByClassName('hologram-area')[0], { uploadUrl: Drupal.settings.Hologram.uploadUrl, onComplete: function(result){ var files = []; result['response'].forEach(function(response){ var result = response['text']; result = JSON.parse(result); files.push(result); }); var json = JSON.stringify(files); $('#hologram-image-data').val(json); }, config: { uploader: '/hologram/upload' }, }); //Push exist images to holgoram widget try{ var files = $('#hologram-image-data').val(); if(files){ files = JSON.parse(files); store.dispatch(window.hologram.addFiles(files)); } }catch(ex){ console.log(ex); } store.subscribe(function(){ var files = store.getState().files; var json = JSON.stringify(files); $('#hologram-image-data').val(json); }); }); })(jQuery);
Allow user remove uploaded image
Allow user remove uploaded image
JavaScript
mit
dollars0427/hologram-widget
javascript
## Code Before: (function ($) { $(window).load(function(){ var store = window.hologram.store; window.hologram(document.getElementsByClassName('hologram-area')[0], { uploadUrl: Drupal.settings.Hologram.uploadUrl, onComplete: function(result){ var json = JSON.stringify(result); $('#hologram-image-data').val(json); }, config: { uploader: '/hologram/upload' }, }); //Push exist images to holgoram widget try{ var files = $('#hologram-image-data').val(); if(files){ files = JSON.parse(files); store.dispatch(window.hologram.addFiles(files)); } }catch(ex){ console.log(ex); } store.subscribe(function(){ var files = store.getState().files; var json = JSON.stringify(files); $('#hologram-image-data').val(json); }); }); })(jQuery); ## Instruction: Allow user remove uploaded image ## Code After: (function ($) { $(window).load(function(){ var store = window.hologram.store; window.hologram(document.getElementsByClassName('hologram-area')[0], { uploadUrl: Drupal.settings.Hologram.uploadUrl, onComplete: function(result){ var files = []; result['response'].forEach(function(response){ var result = response['text']; result = JSON.parse(result); files.push(result); }); var json = JSON.stringify(files); $('#hologram-image-data').val(json); }, config: { uploader: '/hologram/upload' }, }); //Push exist images to holgoram widget try{ var files = $('#hologram-image-data').val(); if(files){ files = JSON.parse(files); store.dispatch(window.hologram.addFiles(files)); } }catch(ex){ console.log(ex); } store.subscribe(function(){ var files = store.getState().files; var json = JSON.stringify(files); $('#hologram-image-data').val(json); }); }); })(jQuery);
2cd3d64f1f903dc0cb60a9fac13194dce922adef
.github/workflows/test.yml
.github/workflows/test.yml
jobs: build: name: Test Go ${{ matrix.go }} runs-on: ubuntu-20.04 strategy: matrix: go: ['1.17', '1.16'] steps: - uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - run: go test ./...
on: [push, pull_request] name: Test jobs: test: name: Test Go ${{ matrix.go }} runs-on: ubuntu-20.04 strategy: matrix: go: ['1.17', '1.16'] steps: - uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - name: Test run: go test ./...
Define event triggers for GH actions
Define event triggers for GH actions
YAML
apache-2.0
russellhaering/goxmldsig,russellhaering/goxmldsig
yaml
## Code Before: jobs: build: name: Test Go ${{ matrix.go }} runs-on: ubuntu-20.04 strategy: matrix: go: ['1.17', '1.16'] steps: - uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - run: go test ./... ## Instruction: Define event triggers for GH actions ## Code After: on: [push, pull_request] name: Test jobs: test: name: Test Go ${{ matrix.go }} runs-on: ubuntu-20.04 strategy: matrix: go: ['1.17', '1.16'] steps: - uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - name: Test run: go test ./...
7a0f2c0587aa9d76ea3ac9387cf2c14e4f168ad4
test/test-util.coffee
test/test-util.coffee
QUnit.test "test unique", (assert) -> input = [5, 6, 7, 5, 5, 6, 7] output = unique(input) expected = [5, 6, 7] assert.deepEqual( output , expected)
QUnit.test "test unique", (assert) -> input = [5, 6, 7, 5, 5, 6, 7] output = unique(input) expected = [5, 6, 7] assert.deepEqual(output , expected, "plain") input = [5, 6, null, 7, 5, 5, 6, 7] output = unique(input) assert.deepEqual(output, expected, "with null") input = [5] output = unique(input) expected = [5] assert.deepEqual(output, expected, "one value") input = [null, null, null] output = unique(input) expected = [] assert.deepEqual(output, expected, "only nulls") input = [5, 6, 5, 6, 5, 6, "a"] output = unique(input) expected = [5, 6, "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (1)") input = [5, 6, 5, 6, 5, "6", "a"] output = unique(input) expected = [5, "6", "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (2)") input = ["5", 6, 5, 6, 5, "6", "a"] output = unique(input) expected = [5, "6", "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (3)") input = ["5", "5", 6, "5", "6", "5", "6", "a"] output = unique(input) expected = ["5", "6", "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (4)")
Add to unique unit tests
Add to unique unit tests
CoffeeScript
mit
kbroman/d3panels,kbroman/d3panels
coffeescript
## Code Before: QUnit.test "test unique", (assert) -> input = [5, 6, 7, 5, 5, 6, 7] output = unique(input) expected = [5, 6, 7] assert.deepEqual( output , expected) ## Instruction: Add to unique unit tests ## Code After: QUnit.test "test unique", (assert) -> input = [5, 6, 7, 5, 5, 6, 7] output = unique(input) expected = [5, 6, 7] assert.deepEqual(output , expected, "plain") input = [5, 6, null, 7, 5, 5, 6, 7] output = unique(input) assert.deepEqual(output, expected, "with null") input = [5] output = unique(input) expected = [5] assert.deepEqual(output, expected, "one value") input = [null, null, null] output = unique(input) expected = [] assert.deepEqual(output, expected, "only nulls") input = [5, 6, 5, 6, 5, 6, "a"] output = unique(input) expected = [5, 6, "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (1)") input = [5, 6, 5, 6, 5, "6", "a"] output = unique(input) expected = [5, "6", "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (2)") input = ["5", 6, 5, 6, 5, "6", "a"] output = unique(input) expected = [5, "6", "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (3)") input = ["5", "5", 6, "5", "6", "5", "6", "a"] output = unique(input) expected = ["5", "6", "a"] assert.deepEqual(output, expected, "mixed strings/integers can give weird results (4)")
f38a954ba98b2a71dda1ed34bcbfb2cc46232423
likeInstagramFeed.js
likeInstagramFeed.js
(function () { 'use strict'; window.scrollTo(0, document.body.scrollHeight); var likeElements = document.querySelectorAll(".coreSpriteHeartOpen"); var likeCount = 0; var nextTime = 1000; function doLike(i) { likeElements[i].click(); } for (var i = 0; i < likeElements.length; i++) { nextTime = Math.random() * (14000 - 4000) + 4000; console.log(nextTime); console.log("Like: " + likeCount); likeCount++; if (likeCount > 10) { console.log("too much liking !"); break; } else { setTimeout(doLike(i), nextTime); } } })();
(function () { 'use strict'; window.scrollTo(0, document.body.scrollHeight); var likeElements = document.querySelectorAll(".coreSpriteLikeHeartOpen"); var likeCount = 0; var nextTime = 1000; function doLike(photo) { photo.click(); } likeElements.forEach(photo => { nextTime = Math.random() * (14000 - 4000) + 4000; console.log(nextTime); console.log("Like: " + likeCount); likeCount++; if (likeCount > 5) { console.log("too much liking !"); return } else { setTimeout(doLike(photo), nextTime); } }); })();
Fix instagram script on feed
Fix instagram script on feed
JavaScript
apache-2.0
AxelMonroyX/botLikes
javascript
## Code Before: (function () { 'use strict'; window.scrollTo(0, document.body.scrollHeight); var likeElements = document.querySelectorAll(".coreSpriteHeartOpen"); var likeCount = 0; var nextTime = 1000; function doLike(i) { likeElements[i].click(); } for (var i = 0; i < likeElements.length; i++) { nextTime = Math.random() * (14000 - 4000) + 4000; console.log(nextTime); console.log("Like: " + likeCount); likeCount++; if (likeCount > 10) { console.log("too much liking !"); break; } else { setTimeout(doLike(i), nextTime); } } })(); ## Instruction: Fix instagram script on feed ## Code After: (function () { 'use strict'; window.scrollTo(0, document.body.scrollHeight); var likeElements = document.querySelectorAll(".coreSpriteLikeHeartOpen"); var likeCount = 0; var nextTime = 1000; function doLike(photo) { photo.click(); } likeElements.forEach(photo => { nextTime = Math.random() * (14000 - 4000) + 4000; console.log(nextTime); console.log("Like: " + likeCount); likeCount++; if (likeCount > 5) { console.log("too much liking !"); return } else { setTimeout(doLike(photo), nextTime); } }); })();
eb7e61183612f4f9493ad8f133fcf5196b2518bf
www/modules/sample/sample.controller.js
www/modules/sample/sample.controller.js
(function() { 'use strict'; angular.module('Sample') .controller('sampleController', sampleController); sampleController.$inject = ['commonService']; function sampleController(commonService) { var vm = this; /* ======================================== Var ==================================================== */ vm.misc = {}; /* ======================================== Services =============================================== */ var cmnSvc = commonService; var sessionSvc = sessionService; /* ======================================== Public Methods ========================================= */ /* ======================================== Private Methods ======================================== */ function init() { } init(); } })();
(function() { 'use strict'; angular.module('Sample') .controller('sampleController', sampleController); sampleController.$inject = ['commonService', 'sampleService']; function sampleController(commonService, sampleService) { var vm = this; /* ======================================== Var ==================================================== */ vm.misc = {}; /* ======================================== Services =============================================== */ var svc = sampleService; var cmnSvc = commonService; /* ======================================== Public Methods ========================================= */ /* ======================================== Private Methods ======================================== */ function init() { } init(); } })();
Add svc to sample ctrl
Add svc to sample ctrl
JavaScript
mit
tlkiong/angularjs_starting_template,tlkiong/angularjs_starting_template
javascript
## Code Before: (function() { 'use strict'; angular.module('Sample') .controller('sampleController', sampleController); sampleController.$inject = ['commonService']; function sampleController(commonService) { var vm = this; /* ======================================== Var ==================================================== */ vm.misc = {}; /* ======================================== Services =============================================== */ var cmnSvc = commonService; var sessionSvc = sessionService; /* ======================================== Public Methods ========================================= */ /* ======================================== Private Methods ======================================== */ function init() { } init(); } })(); ## Instruction: Add svc to sample ctrl ## Code After: (function() { 'use strict'; angular.module('Sample') .controller('sampleController', sampleController); sampleController.$inject = ['commonService', 'sampleService']; function sampleController(commonService, sampleService) { var vm = this; /* ======================================== Var ==================================================== */ vm.misc = {}; /* ======================================== Services =============================================== */ var svc = sampleService; var cmnSvc = commonService; /* ======================================== Public Methods ========================================= */ /* ======================================== Private Methods ======================================== */ function init() { } init(); } })();
038bc954ed63db6df192de50483f218b037c2438
searchlight/cmd/listener.py
searchlight/cmd/listener.py
from oslo_config import cfg from oslo_service import service as os_service from searchlight import listener from searchlight import service CONF = cfg.CONF CONF.import_group("listener", "searchlight.listener") def main(): service.prepare_service() launcher = os_service.ProcessLauncher(CONF) launcher.launch_service( listener.ListenerService(), workers=CONF.listener.workers) launcher.wait() if __name__ == "__main__": main()
from oslo_config import cfg from oslo_service import service as os_service from searchlight import listener from searchlight import service CONF = cfg.CONF CONF.import_group("listener", "searchlight.listener") def main(): service.prepare_service() launcher = os_service.ProcessLauncher(CONF, restart_method='mutate') launcher.launch_service( listener.ListenerService(), workers=CONF.listener.workers) launcher.wait() if __name__ == "__main__": main()
Enable mutable config in searchlight
Enable mutable config in searchlight New releases of oslo.config support a 'mutable' parameter to Opts. oslo.service provides an option here Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell oslo.service they want mutate_config_files to be called by passing a parameter. This commit is to use the same. This allows searchlight to benefit from I1e7a69de169cc85f4c09954b2f46ce2da7106d90, where the 'debug' option (owned by oslo.log) is made mutable. we should be able to turn debug logging on and off by changing the config. tc goal: https://governance.openstack.org/tc/goals/rocky/enable-mutable-configuration.html Change-Id: I1c2833bef93b1382c7ddb71dba8621004dcd4cb1
Python
apache-2.0
openstack/searchlight,openstack/searchlight,openstack/searchlight
python
## Code Before: from oslo_config import cfg from oslo_service import service as os_service from searchlight import listener from searchlight import service CONF = cfg.CONF CONF.import_group("listener", "searchlight.listener") def main(): service.prepare_service() launcher = os_service.ProcessLauncher(CONF) launcher.launch_service( listener.ListenerService(), workers=CONF.listener.workers) launcher.wait() if __name__ == "__main__": main() ## Instruction: Enable mutable config in searchlight New releases of oslo.config support a 'mutable' parameter to Opts. oslo.service provides an option here Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell oslo.service they want mutate_config_files to be called by passing a parameter. This commit is to use the same. This allows searchlight to benefit from I1e7a69de169cc85f4c09954b2f46ce2da7106d90, where the 'debug' option (owned by oslo.log) is made mutable. we should be able to turn debug logging on and off by changing the config. tc goal: https://governance.openstack.org/tc/goals/rocky/enable-mutable-configuration.html Change-Id: I1c2833bef93b1382c7ddb71dba8621004dcd4cb1 ## Code After: from oslo_config import cfg from oslo_service import service as os_service from searchlight import listener from searchlight import service CONF = cfg.CONF CONF.import_group("listener", "searchlight.listener") def main(): service.prepare_service() launcher = os_service.ProcessLauncher(CONF, restart_method='mutate') launcher.launch_service( listener.ListenerService(), workers=CONF.listener.workers) launcher.wait() if __name__ == "__main__": main()
5ba4e139ce5199912f0eddde335e3567619fa1d4
README.rst
README.rst
========== twistedcat ========== overview -------- twistedcat/nocat can proxy between any two twisted endpoints be they both client, both server, or client and server endpoints. install ------- you can install twistedcat in your python virtual environment like this:: $ pip install git+https://github.com/david415/twistedcat.git usage ----- commandline usage summary:: usage: nocat [-h] [-c CLIENT] [-s SERVER] twistedcat - proxy between any two Twisted endpoints optional arguments: -h, --help show this help message and exit -c CLIENT, --client CLIENT Twisted client endpoint descriptor string -s SERVER, --server SERVER Twisted server endpoint descriptor string
========== twistedcat ========== overview -------- twistedcat/nocat can proxy between any two twisted endpoints be they both client, both server, or client and server endpoints. install ------- you can install twistedcat in your python virtual environment like this:: $ pip install git+https://github.com/david415/twistedcat.git usage ----- commandline usage summary:: usage: nocat [-h] [-c CLIENT] [-s SERVER] twistedcat - proxy between any two Twisted endpoints optional arguments: -h, --help show this help message and exit -c CLIENT, --client CLIENT Twisted client endpoint descriptor string -s SERVER, --server SERVER Twisted server endpoint descriptor string example usage:: ./bin/nocat -s tcp:interface=127.0.0.1:8080 -s tcp:interface=127.0.0.1:8081 contact ------- Bugfixes with pull requests welcome! - email [email protected] - gpg key ID 0x836501BE9F27A723 - gpg fingerprint F473 51BD 87AB 7FCF 6F88 80C9 8365 01BE 9F27 A723
Add usage and contact info to readme
Add usage and contact info to readme
reStructuredText
mit
david415/twistedcat
restructuredtext
## Code Before: ========== twistedcat ========== overview -------- twistedcat/nocat can proxy between any two twisted endpoints be they both client, both server, or client and server endpoints. install ------- you can install twistedcat in your python virtual environment like this:: $ pip install git+https://github.com/david415/twistedcat.git usage ----- commandline usage summary:: usage: nocat [-h] [-c CLIENT] [-s SERVER] twistedcat - proxy between any two Twisted endpoints optional arguments: -h, --help show this help message and exit -c CLIENT, --client CLIENT Twisted client endpoint descriptor string -s SERVER, --server SERVER Twisted server endpoint descriptor string ## Instruction: Add usage and contact info to readme ## Code After: ========== twistedcat ========== overview -------- twistedcat/nocat can proxy between any two twisted endpoints be they both client, both server, or client and server endpoints. install ------- you can install twistedcat in your python virtual environment like this:: $ pip install git+https://github.com/david415/twistedcat.git usage ----- commandline usage summary:: usage: nocat [-h] [-c CLIENT] [-s SERVER] twistedcat - proxy between any two Twisted endpoints optional arguments: -h, --help show this help message and exit -c CLIENT, --client CLIENT Twisted client endpoint descriptor string -s SERVER, --server SERVER Twisted server endpoint descriptor string example usage:: ./bin/nocat -s tcp:interface=127.0.0.1:8080 -s tcp:interface=127.0.0.1:8081 contact ------- Bugfixes with pull requests welcome! - email [email protected] - gpg key ID 0x836501BE9F27A723 - gpg fingerprint F473 51BD 87AB 7FCF 6F88 80C9 8365 01BE 9F27 A723
d631dec341d52aa99734671c73e62a24097b6888
hw/top_earlgrey/util/vivado_hook_write_bitstream_pre.tcl
hw/top_earlgrey/util/vivado_hook_write_bitstream_pre.tcl
set workroot [file dirname [info script]] send_msg "Designcheck 1-1" INFO "Checking design" # Ensure the design meets timing set slack_ns [get_property SLACK [get_timing_paths -delay_type min_max]] send_msg "Designcheck 1-2" INFO "Slack is ${slack_ns} ns." if [expr {$slack_ns < 0}] { send_msg "Designcheck 1-3" ERROR "Timing failed. Slack is ${slack_ns} ns." }
set workroot [file dirname [info script]] send_msg "Designcheck 1-1" INFO "Checking design" # Ensure the design meets timing set slack_ns [get_property SLACK [get_timing_paths -delay_type min_max]] send_msg "Designcheck 1-2" INFO "Slack is ${slack_ns} ns." if [expr {$slack_ns < 0}] { send_msg "Designcheck 1-3" ERROR "Timing failed. Slack is ${slack_ns} ns." } # Enable bitstream identification via USR_ACCESS register. set_property BITSTREAM.CONFIG.USR_ACCESS TIMESTAMP [current_design]
Add timestamp for bitstream identification via USR_ACCESS reg
[fpga] Add timestamp for bitstream identification via USR_ACCESS reg This commit modifies the bitstream generation to add a timestamp in the USR_ACCESS register for later identification. This is useful to find out which bitstream is currently loaded on a running FPGA. Signed-off-by: Pirmin Vogel <[email protected]>
Tcl
apache-2.0
lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan
tcl
## Code Before: set workroot [file dirname [info script]] send_msg "Designcheck 1-1" INFO "Checking design" # Ensure the design meets timing set slack_ns [get_property SLACK [get_timing_paths -delay_type min_max]] send_msg "Designcheck 1-2" INFO "Slack is ${slack_ns} ns." if [expr {$slack_ns < 0}] { send_msg "Designcheck 1-3" ERROR "Timing failed. Slack is ${slack_ns} ns." } ## Instruction: [fpga] Add timestamp for bitstream identification via USR_ACCESS reg This commit modifies the bitstream generation to add a timestamp in the USR_ACCESS register for later identification. This is useful to find out which bitstream is currently loaded on a running FPGA. Signed-off-by: Pirmin Vogel <[email protected]> ## Code After: set workroot [file dirname [info script]] send_msg "Designcheck 1-1" INFO "Checking design" # Ensure the design meets timing set slack_ns [get_property SLACK [get_timing_paths -delay_type min_max]] send_msg "Designcheck 1-2" INFO "Slack is ${slack_ns} ns." if [expr {$slack_ns < 0}] { send_msg "Designcheck 1-3" ERROR "Timing failed. Slack is ${slack_ns} ns." } # Enable bitstream identification via USR_ACCESS register. set_property BITSTREAM.CONFIG.USR_ACCESS TIMESTAMP [current_design]