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
23d82c483c4e725eb8d65c529af558df88ca3f26
app/views/layouts/application.html.erb
app/views/layouts/application.html.erb
<!DOCTYPE html> <html> <head> <title><%= yield :title %> - GOV.UK</title> <%= javascript_include_tag "test-dependencies" if Rails.env.test? %> <%= javascript_include_tag "application" %> <%= stylesheet_link_tag "application" %> <%= csrf_meta_tags %> <%= yield :meta_tags %> <%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %> <%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item %> <%= stylesheet_link_tag "print.css", :media => "print", integrity: false %> </head> <body> <div class="wrapper" id="wrapper"> <%= yield :back_link %> <% unless (content_for(:is_full_width_header) || content_for(:back_link)) %> <% if content_for?(:breadcrumbs) %> <%= yield :breadcrumbs %> <% else %> <%= render 'breadcrumbs' %> <% end %> <% end %> <% if @content_item %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{@content_item["locale"]}" unless !@content_item["locale"] || @content_item["locale"].eql?("en") %>> <% else %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{params["locale"]}" if params["locale"] %>> <% end %> <%= yield %> </main> </div> </body> </html>
<!DOCTYPE html> <html> <head> <title><%= yield :title %> - GOV.UK</title> <%= javascript_include_tag "test-dependencies" if Rails.env.test? %> <%= javascript_include_tag "application" %> <%= stylesheet_link_tag "application" %> <%= csrf_meta_tags %> <%= yield :meta_tags %> <%= explore_menu_variant.analytics_meta_tag.html_safe %> <%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item %> <%= stylesheet_link_tag "print.css", :media => "print", integrity: false %> </head> <body> <div class="wrapper" id="wrapper"> <%= yield :back_link %> <% unless (content_for(:is_full_width_header) || content_for(:back_link)) %> <% if content_for?(:breadcrumbs) %> <%= yield :breadcrumbs %> <% else %> <%= render 'breadcrumbs' %> <% end %> <% end %> <% if @content_item %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{@content_item["locale"]}" unless !@content_item["locale"] || @content_item["locale"].eql?("en") %>> <% else %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{params["locale"]}" if params["locale"] %>> <% end %> <%= yield %> </main> </div> </body> </html>
Remove conditional from A/B test meta tag
Remove conditional from A/B test meta tag
HTML+ERB
mit
alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections
html+erb
## Code Before: <!DOCTYPE html> <html> <head> <title><%= yield :title %> - GOV.UK</title> <%= javascript_include_tag "test-dependencies" if Rails.env.test? %> <%= javascript_include_tag "application" %> <%= stylesheet_link_tag "application" %> <%= csrf_meta_tags %> <%= yield :meta_tags %> <%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %> <%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item %> <%= stylesheet_link_tag "print.css", :media => "print", integrity: false %> </head> <body> <div class="wrapper" id="wrapper"> <%= yield :back_link %> <% unless (content_for(:is_full_width_header) || content_for(:back_link)) %> <% if content_for?(:breadcrumbs) %> <%= yield :breadcrumbs %> <% else %> <%= render 'breadcrumbs' %> <% end %> <% end %> <% if @content_item %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{@content_item["locale"]}" unless !@content_item["locale"] || @content_item["locale"].eql?("en") %>> <% else %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{params["locale"]}" if params["locale"] %>> <% end %> <%= yield %> </main> </div> </body> </html> ## Instruction: Remove conditional from A/B test meta tag ## Code After: <!DOCTYPE html> <html> <head> <title><%= yield :title %> - GOV.UK</title> <%= javascript_include_tag "test-dependencies" if Rails.env.test? %> <%= javascript_include_tag "application" %> <%= stylesheet_link_tag "application" %> <%= csrf_meta_tags %> <%= yield :meta_tags %> <%= explore_menu_variant.analytics_meta_tag.html_safe %> <%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item %> <%= stylesheet_link_tag "print.css", :media => "print", integrity: false %> </head> <body> <div class="wrapper" id="wrapper"> <%= yield :back_link %> <% unless (content_for(:is_full_width_header) || content_for(:back_link)) %> <% if content_for?(:breadcrumbs) %> <%= yield :breadcrumbs %> <% else %> <%= render 'breadcrumbs' %> <% end %> <% end %> <% if @content_item %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{@content_item["locale"]}" unless !@content_item["locale"] || @content_item["locale"].eql?("en") %>> <% else %> <main id="content" role="main" class="content <%= yield :page_class %>" <%= "lang=#{params["locale"]}" if params["locale"] %>> <% end %> <%= yield %> </main> </div> </body> </html>
9c39d365affed424f5e447cf51766894296c717c
tests/testcase.pri
tests/testcase.pri
CONFIG += testcase QT = core testlib dbus INCLUDEPATH += ../lib ../ LIBS += -L ../lib -lofono-qt target.path = $$[QT_INSTALL_PREFIX]/opt/tests/libofono-qt/ INSTALLS += target
CONFIG += testcase QT = core testlib dbus INCLUDEPATH += ../lib ../ QMAKE_LFLAGS += -L ../lib -lofono-qt target.path = $$[QT_INSTALL_PREFIX]/opt/tests/libofono-qt/ INSTALLS += target
Use QMAKE_LFLAGS to make sure we link to the libofono-qt under test
[libofono-qt] Use QMAKE_LFLAGS to make sure we link to the libofono-qt under test This prevents us from accidentally linking against a system copy. This won't protect us from running the tests against a system copy, for that we need LD_LIBRARY_PATH or rpath, but this will at least result in successful and proper builds.
QMake
lgpl-2.1
nemomobile-graveyard/libofono-qt,nemomobile-graveyard/libofono-qt,Kaffeine/libofono-qt,Kaffeine/libofono-qt
qmake
## Code Before: CONFIG += testcase QT = core testlib dbus INCLUDEPATH += ../lib ../ LIBS += -L ../lib -lofono-qt target.path = $$[QT_INSTALL_PREFIX]/opt/tests/libofono-qt/ INSTALLS += target ## Instruction: [libofono-qt] Use QMAKE_LFLAGS to make sure we link to the libofono-qt under test This prevents us from accidentally linking against a system copy. This won't protect us from running the tests against a system copy, for that we need LD_LIBRARY_PATH or rpath, but this will at least result in successful and proper builds. ## Code After: CONFIG += testcase QT = core testlib dbus INCLUDEPATH += ../lib ../ QMAKE_LFLAGS += -L ../lib -lofono-qt target.path = $$[QT_INSTALL_PREFIX]/opt/tests/libofono-qt/ INSTALLS += target
1de7799143765e89edf084b1d9d082749350aba1
lib/sequent/core/event_publisher.rb
lib/sequent/core/event_publisher.rb
module Sequent module Core class EventPublisher class PublishEventError < RuntimeError attr_reader :event_handler_class, :event def initialize(event_handler_class, event) @event_handler_class = event_handler_class @event = event end def message "Event Handler: #{@event_handler_class.inspect}\nEvent: #{@event.inspect}\nCause: #{cause.inspect}" end end def initialize @events_queue = Queue.new @mutex = Mutex.new end def publish_events(events) return if configuration.disable_event_handlers events.each { |event| @events_queue.push(event) } process_events end private def process_events # only process events at the highest level return if @mutex.locked? @mutex.synchronize do while(!@events_queue.empty?) do event = @events_queue.pop configuration.event_handlers.each do |handler| begin handler.handle_message event rescue raise PublishEventError.new(handler.class, event) end end end end end def configuration Sequent.configuration end end end end
module Sequent module Core class EventPublisher # # EventPublisher ensures that, for every thread, events will be published in the order in which they are meant to be published. # # This potentially introduces a wrinkle into your plans: You therefore should not split a "unit of work" across multiple threads. # # If you do not want this, you are free to implement your own version of EventPublisher and configure sequent to use it. # class PublishEventError < RuntimeError attr_reader :event_handler_class, :event def initialize(event_handler_class, event) @event_handler_class = event_handler_class @event = event end def message "Event Handler: #{@event_handler_class.inspect}\nEvent: #{@event.inspect}\nCause: #{cause.inspect}" end end def publish_events(events) return if configuration.disable_event_handlers events.each { |event| events_queue.push(event) } process_events end private def events_queue Thread.current[:events_queue] ||= Queue.new end def skip_if_locked(&block) Thread.current[:events_queue_locked] = false if Thread.current[:events_queue_locked].nil? return if Thread.current[:events_queue_locked] Thread.current[:events_queue_locked] = true block.yield ensure Thread.current[:events_queue_locked] = false end def process_events skip_if_locked do while(!events_queue.empty?) do event = events_queue.pop configuration.event_handlers.each do |handler| begin handler.handle_message event rescue raise PublishEventError.new(handler.class, event) end end end end end def configuration Sequent.configuration end end end end
Synchronize events within a single thread
Synchronize events within a single thread
Ruby
mit
zilverline/sequent,zilverline/sequent
ruby
## Code Before: module Sequent module Core class EventPublisher class PublishEventError < RuntimeError attr_reader :event_handler_class, :event def initialize(event_handler_class, event) @event_handler_class = event_handler_class @event = event end def message "Event Handler: #{@event_handler_class.inspect}\nEvent: #{@event.inspect}\nCause: #{cause.inspect}" end end def initialize @events_queue = Queue.new @mutex = Mutex.new end def publish_events(events) return if configuration.disable_event_handlers events.each { |event| @events_queue.push(event) } process_events end private def process_events # only process events at the highest level return if @mutex.locked? @mutex.synchronize do while(!@events_queue.empty?) do event = @events_queue.pop configuration.event_handlers.each do |handler| begin handler.handle_message event rescue raise PublishEventError.new(handler.class, event) end end end end end def configuration Sequent.configuration end end end end ## Instruction: Synchronize events within a single thread ## Code After: module Sequent module Core class EventPublisher # # EventPublisher ensures that, for every thread, events will be published in the order in which they are meant to be published. # # This potentially introduces a wrinkle into your plans: You therefore should not split a "unit of work" across multiple threads. # # If you do not want this, you are free to implement your own version of EventPublisher and configure sequent to use it. # class PublishEventError < RuntimeError attr_reader :event_handler_class, :event def initialize(event_handler_class, event) @event_handler_class = event_handler_class @event = event end def message "Event Handler: #{@event_handler_class.inspect}\nEvent: #{@event.inspect}\nCause: #{cause.inspect}" end end def publish_events(events) return if configuration.disable_event_handlers events.each { |event| events_queue.push(event) } process_events end private def events_queue Thread.current[:events_queue] ||= Queue.new end def skip_if_locked(&block) Thread.current[:events_queue_locked] = false if Thread.current[:events_queue_locked].nil? return if Thread.current[:events_queue_locked] Thread.current[:events_queue_locked] = true block.yield ensure Thread.current[:events_queue_locked] = false end def process_events skip_if_locked do while(!events_queue.empty?) do event = events_queue.pop configuration.event_handlers.each do |handler| begin handler.handle_message event rescue raise PublishEventError.new(handler.class, event) end end end end end def configuration Sequent.configuration end end end end
7a1351c7f677380eeee8027399e69b0d34e3e858
daybed/tests/features/model_data.py
daybed/tests/features/model_data.py
import json from lettuce import step, world @step(u'post "([^"]*)" records?') def post_record(step, model_name): world.path = '/data/%s' % str(model_name.lower()) for record in step.hashes: data = json.dumps(record) world.response = world.browser.post(world.path, params=data, status='*') @step(u'obtain a record id') def obtain_a_record_id(step): assert 'id' in world.response.json @step(u'retrieve the "([^"]*)" records') def retrieve_records(step, model_name): world.path = '/data/%s' % str(model_name.lower()) world.response = world.browser.get(world.path, status='*') @step(u'results are :') def results_are(step): results = world.response.json['data'] assert len(results) >= len(step.hashes) for i, result in enumerate(results): assert result == step.hashes[i]
import json from lettuce import step, world @step(u'post "([^"]*)" records?') def post_record(step, model_name): world.path = '/data/%s' % str(model_name.lower()) for record in step.hashes: data = json.dumps(record) world.response = world.browser.post(world.path, params=data, status='*') @step(u'obtain a record id') def obtain_a_record_id(step): assert 'id' in world.response.json @step(u'retrieve the "([^"]*)" records') def retrieve_records(step, model_name): world.path = '/data/%s' % str(model_name.lower()) world.response = world.browser.get(world.path, status='*') @step(u'results are :') def results_are(step): results = world.response.json['data'] assert len(results) >= len(step.hashes) for i, result in enumerate(results): step.hashes[i]['id'] = result['id'] # We cannot guess it assert result == step.hashes[i]
Fix bug of adding the id to the resulting data
Fix bug of adding the id to the resulting data
Python
bsd-3-clause
spiral-project/daybed,spiral-project/daybed
python
## Code Before: import json from lettuce import step, world @step(u'post "([^"]*)" records?') def post_record(step, model_name): world.path = '/data/%s' % str(model_name.lower()) for record in step.hashes: data = json.dumps(record) world.response = world.browser.post(world.path, params=data, status='*') @step(u'obtain a record id') def obtain_a_record_id(step): assert 'id' in world.response.json @step(u'retrieve the "([^"]*)" records') def retrieve_records(step, model_name): world.path = '/data/%s' % str(model_name.lower()) world.response = world.browser.get(world.path, status='*') @step(u'results are :') def results_are(step): results = world.response.json['data'] assert len(results) >= len(step.hashes) for i, result in enumerate(results): assert result == step.hashes[i] ## Instruction: Fix bug of adding the id to the resulting data ## Code After: import json from lettuce import step, world @step(u'post "([^"]*)" records?') def post_record(step, model_name): world.path = '/data/%s' % str(model_name.lower()) for record in step.hashes: data = json.dumps(record) world.response = world.browser.post(world.path, params=data, status='*') @step(u'obtain a record id') def obtain_a_record_id(step): assert 'id' in world.response.json @step(u'retrieve the "([^"]*)" records') def retrieve_records(step, model_name): world.path = '/data/%s' % str(model_name.lower()) world.response = world.browser.get(world.path, status='*') @step(u'results are :') def results_are(step): results = world.response.json['data'] assert len(results) >= len(step.hashes) for i, result in enumerate(results): step.hashes[i]['id'] = result['id'] # We cannot guess it assert result == step.hashes[i]
9f7206653ce05787ef37844a11eb549d6c360836
io/io/test/CMakeLists.txt
io/io/test/CMakeLists.txt
ROOT_ADD_GTEST(IOTests TBufferMerger.cxx TFileMergerTests.cxx LIBRARIES RIO Tree)
ROOT_ADD_GTEST(TBufferMerger TBufferMerger.cxx LIBRARIES RIO Tree) ROOT_ADD_GTEST(TFileMerger TFileMergerTests.cxx LIBRARIES RIO Tree)
Split TBufferMerger and TFileMerger tests
Split TBufferMerger and TFileMerger tests
Text
lgpl-2.1
olifre/root,root-mirror/root,olifre/root,olifre/root,karies/root,karies/root,root-mirror/root,olifre/root,root-mirror/root,karies/root,root-mirror/root,root-mirror/root,olifre/root,olifre/root,root-mirror/root,karies/root,karies/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,karies/root,olifre/root,olifre/root,karies/root,root-mirror/root,olifre/root,karies/root,root-mirror/root,karies/root,olifre/root,root-mirror/root,karies/root
text
## Code Before: ROOT_ADD_GTEST(IOTests TBufferMerger.cxx TFileMergerTests.cxx LIBRARIES RIO Tree) ## Instruction: Split TBufferMerger and TFileMerger tests ## Code After: ROOT_ADD_GTEST(TBufferMerger TBufferMerger.cxx LIBRARIES RIO Tree) ROOT_ADD_GTEST(TFileMerger TFileMergerTests.cxx LIBRARIES RIO Tree)
dbfb58a308df800f0e2563d3f319b7045b497261
README.md
README.md
Extension for Chrome-based browsers. This extension blocks advert which can bypass adblock (or similar extensions) and cannot be locked via them
Extension for Chrome-based browsers. This extension blocks advert which can bypass adblock (or similar extensions) and cannot be locked via them Расширение для браузеров на основе Chrome. Это расширение блокирует рекламу, которая обходит адблок (или аналогичные расширения) и не может быть заблокирована через них. Пост на хабре: https://habrahabr.ru/post/340562/
Change readme, add link to habr
Change readme, add link to habr
Markdown
mit
VladReshet/no-ads-forever
markdown
## Code Before: Extension for Chrome-based browsers. This extension blocks advert which can bypass adblock (or similar extensions) and cannot be locked via them ## Instruction: Change readme, add link to habr ## Code After: Extension for Chrome-based browsers. This extension blocks advert which can bypass adblock (or similar extensions) and cannot be locked via them Расширение для браузеров на основе Chrome. Это расширение блокирует рекламу, которая обходит адблок (или аналогичные расширения) и не может быть заблокирована через них. Пост на хабре: https://habrahabr.ru/post/340562/
6ed27036bc86b34b295ad58da8b1082eb1254f95
.github/workflows/tests.yml
.github/workflows/tests.yml
name: Tests "on": pull_request: {} push: branches: - main jobs: unit: name: Unit Test runs-on: - ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 with: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} path: ${{ env.HOME }}/go/pkg/mod restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v2 with: go-version: "1.16" - name: Install richgo run: | #!/usr/bin/env bash set -euo pipefail echo "Installing richgo ${RICHGO_VERSION}" mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" curl \ --location \ --show-error \ --silent \ "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ | tar -C "${HOME}"/bin -xz richgo env: RICHGO_VERSION: 0.3.6 - name: Run Tests run: | #!/usr/bin/env bash set -euo pipefail richgo test ./... env: RICHGO_FORCE_COLOR: "1"
name: Tests "on": pull_request: {} push: branches: - main jobs: unit: name: Unit Test runs-on: - ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 with: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} path: ${{ env.HOME }}/go/pkg/mod restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v2 with: go-version: "1.16" - name: Install richgo run: | #!/usr/bin/env bash set -euo pipefail echo "Installing richgo ${RICHGO_VERSION}" mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" curl \ --location \ --show-error \ --silent \ "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ | tar -C "${HOME}"/bin -xz richgo env: RICHGO_VERSION: 0.3.6 - name: Run Tests run: | #!/usr/bin/env bash set -euo pipefail GOCMD=richgo make env: RICHGO_FORCE_COLOR: "1"
Make github workflows use make
Make github workflows use make Signed-off-by: Sambhav Kothari <7aab945e7d8b4704b65a343665f48610116c36c8@bloomberg.net>
YAML
apache-2.0
buildpacks/libcnb
yaml
## Code Before: name: Tests "on": pull_request: {} push: branches: - main jobs: unit: name: Unit Test runs-on: - ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 with: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} path: ${{ env.HOME }}/go/pkg/mod restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v2 with: go-version: "1.16" - name: Install richgo run: | #!/usr/bin/env bash set -euo pipefail echo "Installing richgo ${RICHGO_VERSION}" mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" curl \ --location \ --show-error \ --silent \ "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ | tar -C "${HOME}"/bin -xz richgo env: RICHGO_VERSION: 0.3.6 - name: Run Tests run: | #!/usr/bin/env bash set -euo pipefail richgo test ./... env: RICHGO_FORCE_COLOR: "1" ## Instruction: Make github workflows use make Signed-off-by: Sambhav Kothari <7aab945e7d8b4704b65a343665f48610116c36c8@bloomberg.net> ## Code After: name: Tests "on": pull_request: {} push: branches: - main jobs: unit: name: Unit Test runs-on: - ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 with: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} path: ${{ env.HOME }}/go/pkg/mod restore-keys: ${{ runner.os }}-go- - uses: actions/setup-go@v2 with: go-version: "1.16" - name: Install richgo run: | #!/usr/bin/env bash set -euo pipefail echo "Installing richgo ${RICHGO_VERSION}" mkdir -p "${HOME}"/bin echo "${HOME}/bin" >> "${GITHUB_PATH}" curl \ --location \ --show-error \ --silent \ "https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \ | tar -C "${HOME}"/bin -xz richgo env: RICHGO_VERSION: 0.3.6 - name: Run Tests run: | #!/usr/bin/env bash set -euo pipefail GOCMD=richgo make env: RICHGO_FORCE_COLOR: "1"
4002012e61e508be4807148f4769d63ac951338d
packages/ta/tasty-json.yaml
packages/ta/tasty-json.yaml
homepage: https://github.com/larskuhtz/tasty-json changelog-type: markdown hash: a06fdadd650ff9f729319daf69f57eacf91f389a851983d07fe1354d58851061 test-bench-deps: {} maintainer: Lars Kuhtz <lakuhtz@gmail.com> synopsis: JSON reporter for the tasty testing framework changelog: | # Revision history for tasty-json ## 0.1.0.0 -- 2020-04-29 * First version. Released on an unsuspecting world. basic-deps: bytestring: '>=0.10' stm: '>=2.4' base: '>=4.10 && <4.15' text: '>=1.2' tagged: '>=0.8' containers: '>=0.6' tasty: '>=1.0' all-versions: - 0.1.0.0 author: Lars Kuhtz latest: 0.1.0.0 description-type: markdown description: |+ Write [tasty](https://hackage.haskell.org/package/tasty) test results to a file in JSON format. Example: ```haskell defaultMainWithIngredients (consoleAndJsonReporter : defaultIngredients) tests ``` license-name: MIT
homepage: https://github.com/larskuhtz/tasty-json changelog-type: markdown hash: b975931bf5ab7b54ee856382b52a03acae68c8328f03c4beb565104a1a3d624a test-bench-deps: {} maintainer: Lars Kuhtz <lakuhtz@gmail.com> synopsis: JSON reporter for the tasty testing framework changelog: | # Revision history for tasty-json ## 0.1.0.0 -- 2020-04-29 * First version. Released on an unsuspecting world. basic-deps: bytestring: '>=0.10' stm: '>=2.4' base: '>=4.10 && <4.16' text: '>=1.2' tagged: '>=0.8' containers: '>=0.6' tasty: '>=1.0' all-versions: - 0.1.0.0 author: Lars Kuhtz latest: 0.1.0.0 description-type: markdown description: |+ Write [tasty](https://hackage.haskell.org/package/tasty) test results to a file in JSON format. Example: ```haskell defaultMainWithIngredients (consoleAndJsonReporter : defaultIngredients) tests ``` license-name: MIT
Update from Hackage at 2021-06-24T22:22:34Z
Update from Hackage at 2021-06-24T22:22:34Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/larskuhtz/tasty-json changelog-type: markdown hash: a06fdadd650ff9f729319daf69f57eacf91f389a851983d07fe1354d58851061 test-bench-deps: {} maintainer: Lars Kuhtz <lakuhtz@gmail.com> synopsis: JSON reporter for the tasty testing framework changelog: | # Revision history for tasty-json ## 0.1.0.0 -- 2020-04-29 * First version. Released on an unsuspecting world. basic-deps: bytestring: '>=0.10' stm: '>=2.4' base: '>=4.10 && <4.15' text: '>=1.2' tagged: '>=0.8' containers: '>=0.6' tasty: '>=1.0' all-versions: - 0.1.0.0 author: Lars Kuhtz latest: 0.1.0.0 description-type: markdown description: |+ Write [tasty](https://hackage.haskell.org/package/tasty) test results to a file in JSON format. Example: ```haskell defaultMainWithIngredients (consoleAndJsonReporter : defaultIngredients) tests ``` license-name: MIT ## Instruction: Update from Hackage at 2021-06-24T22:22:34Z ## Code After: homepage: https://github.com/larskuhtz/tasty-json changelog-type: markdown hash: b975931bf5ab7b54ee856382b52a03acae68c8328f03c4beb565104a1a3d624a test-bench-deps: {} maintainer: Lars Kuhtz <lakuhtz@gmail.com> synopsis: JSON reporter for the tasty testing framework changelog: | # Revision history for tasty-json ## 0.1.0.0 -- 2020-04-29 * First version. Released on an unsuspecting world. basic-deps: bytestring: '>=0.10' stm: '>=2.4' base: '>=4.10 && <4.16' text: '>=1.2' tagged: '>=0.8' containers: '>=0.6' tasty: '>=1.0' all-versions: - 0.1.0.0 author: Lars Kuhtz latest: 0.1.0.0 description-type: markdown description: |+ Write [tasty](https://hackage.haskell.org/package/tasty) test results to a file in JSON format. Example: ```haskell defaultMainWithIngredients (consoleAndJsonReporter : defaultIngredients) tests ``` license-name: MIT
f556733ae92c31766ffaeae630f23ab5014f6a36
spec/packages_spec.lua
spec/packages_spec.lua
SILE = require("core.sile") local lfs = require("lfs") describe("#packages like", function () local _, dir_obj = lfs.dir("packages") local file = dir_obj:next() it("foo", function() end) while file do local pkg, ok = file:gsub(".lua$", "") if ok == 1 and pkg ~= "color-fonts" and pkg ~= "font-fallback" and pkg ~= "pandoc" and pkg ~= "pdf" and pkg ~= "pdfstructure" and pkg ~= "url" then describe(pkg, function () it("should load", function () assert.has.no.error(function() require("packages." .. pkg) end) end) it("should have #documentation", function () local mod = require("packages." .. pkg) assert.truthy(type(mod) == "table") assert.truthy(mod.documentation) end) end) end file = dir_obj:next() end end)
SILE = require("core.sile") local lfs = require("lfs") describe("#package", function () for pkg in lfs.dir("packages") do if pkg ~= ".." and pkg ~= "." and pkg ~= "color-fonts" and pkg ~= "font-fallback" and pkg ~= "pandoc" and pkg ~= "pdf" and pkg ~= "pdfstructure" and pkg ~= "url" then describe(pkg, function () local pack it("should load", function () assert.has.no.error(function() pack = require("packages." .. pkg) end) end) it("return a module", function () assert.truthy(type(pack) == "table") end) it("be documented", function () assert.string(pack.documentation) end) end) end end end)
Refactor unit tests for package loading
test(packages): Refactor unit tests for package loading
Lua
mit
alerque/sile,alerque/sile,alerque/sile,alerque/sile
lua
## Code Before: SILE = require("core.sile") local lfs = require("lfs") describe("#packages like", function () local _, dir_obj = lfs.dir("packages") local file = dir_obj:next() it("foo", function() end) while file do local pkg, ok = file:gsub(".lua$", "") if ok == 1 and pkg ~= "color-fonts" and pkg ~= "font-fallback" and pkg ~= "pandoc" and pkg ~= "pdf" and pkg ~= "pdfstructure" and pkg ~= "url" then describe(pkg, function () it("should load", function () assert.has.no.error(function() require("packages." .. pkg) end) end) it("should have #documentation", function () local mod = require("packages." .. pkg) assert.truthy(type(mod) == "table") assert.truthy(mod.documentation) end) end) end file = dir_obj:next() end end) ## Instruction: test(packages): Refactor unit tests for package loading ## Code After: SILE = require("core.sile") local lfs = require("lfs") describe("#package", function () for pkg in lfs.dir("packages") do if pkg ~= ".." and pkg ~= "." and pkg ~= "color-fonts" and pkg ~= "font-fallback" and pkg ~= "pandoc" and pkg ~= "pdf" and pkg ~= "pdfstructure" and pkg ~= "url" then describe(pkg, function () local pack it("should load", function () assert.has.no.error(function() pack = require("packages." .. pkg) end) end) it("return a module", function () assert.truthy(type(pack) == "table") end) it("be documented", function () assert.string(pack.documentation) end) end) end end end)
58d5915d70c356c150fcdd0cdce940a831014449
android/AndroidScriptingEnvironment/src/com/google/ase/interpreter/sh/ShInterpreterProcess.java
android/AndroidScriptingEnvironment/src/com/google/ase/interpreter/sh/ShInterpreterProcess.java
/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.ase.interpreter.sh; import com.google.ase.AndroidFacade; import com.google.ase.AndroidProxy; import com.google.ase.interpreter.AbstractInterpreterProcess; import com.google.ase.jsonrpc.JsonRpcServer; public class ShInterpreterProcess extends AbstractInterpreterProcess { private final AndroidProxy mAndroidProxy; private final int mAndroidProxyPort; public ShInterpreterProcess(AndroidFacade facade, String launchScript) { super(facade, launchScript); mAndroidProxy = new AndroidProxy(facade); mAndroidProxyPort = new JsonRpcServer(mAndroidProxy).start(); buildEnvironment(); } private void buildEnvironment() { mEnvironment.put("AP_PORT", Integer.toString(mAndroidProxyPort)); } }
/* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.ase.interpreter.sh; import com.google.ase.AndroidFacade; import com.google.ase.AndroidProxy; import com.google.ase.interpreter.AbstractInterpreterProcess; import com.google.ase.jsonrpc.JsonRpcServer; public class ShInterpreterProcess extends AbstractInterpreterProcess { private final AndroidProxy mAndroidProxy; private final int mAndroidProxyPort; public ShInterpreterProcess(AndroidFacade facade, String launchScript) { super(facade, launchScript); mAndroidProxy = new AndroidProxy(facade); mAndroidProxyPort = new JsonRpcServer(mAndroidProxy).start(); buildEnvironment(); } private void buildEnvironment() { mEnvironment.put("AP_PORT", Integer.toString(mAndroidProxyPort)); } @Override protected void writeInterpreterCommand() { if (mLaunchScript != null) { print(SHELL_BIN + " " + mLaunchScript + "\n"); } } }
Add missing call to start shell scripts.
Add missing call to start shell scripts.
Java
apache-2.0
olapaola/olapaola-android-scripting,jeremiahmarks/sl4a,Lh4cKg/sl4a,giuliolunati/sl4a,cristiana214/cristianachavez214-cristianachavez,barbarubra/Don-t-know-What-i-m-doing.,cristiana214/cristianachavez214-cristianachavez,mSenyor/sl4a,kjc88/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,vlinhd11/vlinhd11-android-scripting,kerr-huang/SL4A,vlinhd11/vlinhd11-android-scripting,barbarubra/Don-t-know-What-i-m-doing.,matmutant/sl4a,kuri65536/sl4a,damonkohler/sl4a,valkjsaaa/sl4a,kjc88/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,liamgh/liamgreenhughes-sl4a-tf101,kjc88/sl4a,kuri65536/sl4a,valkjsaaa/sl4a,wskplho/sl4a,miguelpalacio/sl4a,jeremiahmarks/sl4a,olapaola/olapaola-android-scripting,jeremiahmarks/sl4a,kevinmel2000/sl4a,Lh4cKg/sl4a,olapaola/olapaola-android-scripting,giuliolunati/sl4a,jeremiahmarks/sl4a,matmutant/sl4a,kdheepak89/sl4a,kdheepak89/sl4a,olapaola/olapaola-android-scripting,pforret/sl4a,liamgh/liamgreenhughes-sl4a-tf101,damonkohler/sl4a,mSenyor/sl4a,miguelpalacio/sl4a,kdheepak89/sl4a,cristiana214/cristianachavez214-cristianachavez,wskplho/sl4a,matmutant/sl4a,vlachoudis/sl4a,barbarubra/Don-t-know-What-i-m-doing.,cristiana214/cristianachavez214-cristianachavez,mSenyor/sl4a,mSenyor/sl4a,wskplho/sl4a,Lh4cKg/sl4a,jeremiahmarks/sl4a,thejeshgn/sl4a,yqm/sl4a,kevinmel2000/sl4a,cristiana214/cristianachavez214-cristianachavez,thejeshgn/sl4a,yqm/sl4a,liamgh/liamgreenhughes-sl4a-tf101,kerr-huang/SL4A,valkjsaaa/sl4a,valkjsaaa/sl4a,jeremiahmarks/sl4a,mSenyor/sl4a,thejeshgn/sl4a,kerr-huang/SL4A,SatoshiNXSimudrone/sl4a-damon-clone,cristiana214/cristianachavez214-cristianachavez,matmutant/sl4a,liamgh/liamgreenhughes-sl4a-tf101,kerr-huang/SL4A,giuliolunati/sl4a,vlachoudis/sl4a,Lh4cKg/sl4a,barbarubra/Don-t-know-What-i-m-doing.,gonboy/sl4a,liamgh/liamgreenhughes-sl4a-tf101,giuliolunati/sl4a,matmutant/sl4a,yqm/sl4a,kjc88/sl4a,liamgh/liamgreenhughes-sl4a-tf101,kjc88/sl4a,kevinmel2000/sl4a,kevinmel2000/sl4a,vlachoudis/sl4a,cristiana214/cristianachavez214-cristianachavez,Lh4cKg/sl4a,yqm/sl4a,vlinhd11/vlinhd11-android-scripting,vlachoudis/sl4a,damonkohler/sl4a,kuri65536/sl4a,liamgh/liamgreenhughes-sl4a-tf101,kjc88/sl4a,matmutant/sl4a,gonboy/sl4a,jeremiahmarks/sl4a,kjc88/sl4a,wskplho/sl4a,olapaola/olapaola-android-scripting,olapaola/olapaola-android-scripting,Lh4cKg/sl4a,gonboy/sl4a,kdheepak89/sl4a,pforret/sl4a,kevinmel2000/sl4a,vlachoudis/sl4a,damonkohler/sl4a,valkjsaaa/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,mSenyor/sl4a,vlachoudis/sl4a,Lh4cKg/sl4a,kerr-huang/SL4A,giuliolunati/sl4a,mSenyor/sl4a,damonkohler/sl4a,kevinmel2000/sl4a,kevinmel2000/sl4a,wskplho/sl4a,jeremiahmarks/sl4a,miguelpalacio/sl4a,pforret/sl4a,wskplho/sl4a,miguelpalacio/sl4a,giuliolunati/sl4a,valkjsaaa/sl4a,vlinhd11/vlinhd11-android-scripting,valkjsaaa/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,barbarubra/Don-t-know-What-i-m-doing.,yqm/sl4a,yqm/sl4a,vlinhd11/vlinhd11-android-scripting,vlachoudis/sl4a,wskplho/sl4a,gonboy/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,kevinmel2000/sl4a,valkjsaaa/sl4a,kerr-huang/SL4A,mSenyor/sl4a,matmutant/sl4a,vlinhd11/vlinhd11-android-scripting,gonboy/sl4a,kuri65536/sl4a,damonkohler/sl4a,Lh4cKg/sl4a,giuliolunati/sl4a,vlachoudis/sl4a,kdheepak89/sl4a,pforret/sl4a,jeremiahmarks/sl4a,vlinhd11/vlinhd11-android-scripting,liamgh/liamgreenhughes-sl4a-tf101,mSenyor/sl4a,jeremiahmarks/sl4a,yqm/sl4a,kevinmel2000/sl4a,wskplho/sl4a,barbarubra/Don-t-know-What-i-m-doing.,matmutant/sl4a,barbarubra/Don-t-know-What-i-m-doing.,vlinhd11/vlinhd11-android-scripting,olapaola/olapaola-android-scripting,kerr-huang/SL4A,kjc88/sl4a,liamgh/liamgreenhughes-sl4a-tf101,thejeshgn/sl4a,vlinhd11/vlinhd11-android-scripting,valkjsaaa/sl4a,yqm/sl4a,matmutant/sl4a,cristiana214/cristianachavez214-cristianachavez,gonboy/sl4a,damonkohler/sl4a,pforret/sl4a,thejeshgn/sl4a,yqm/sl4a,liamgh/liamgreenhughes-sl4a-tf101,gonboy/sl4a,kerr-huang/SL4A,SatoshiNXSimudrone/sl4a-damon-clone,cristiana214/cristianachavez214-cristianachavez,liamgh/liamgreenhughes-sl4a-tf101,mSenyor/sl4a,yqm/sl4a,damonkohler/sl4a,vlachoudis/sl4a,jeremiahmarks/sl4a,miguelpalacio/sl4a,kjc88/sl4a,kjc88/sl4a,vlachoudis/sl4a,thejeshgn/sl4a,cristiana214/cristianachavez214-cristianachavez,miguelpalacio/sl4a,gonboy/sl4a,Lh4cKg/sl4a,barbarubra/Don-t-know-What-i-m-doing.,thejeshgn/sl4a,vlinhd11/vlinhd11-android-scripting,barbarubra/Don-t-know-What-i-m-doing.,gonboy/sl4a,valkjsaaa/sl4a,matmutant/sl4a,gonboy/sl4a,pforret/sl4a,kjc88/sl4a,kdheepak89/sl4a,valkjsaaa/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,kdheepak89/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,vlachoudis/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,olapaola/olapaola-android-scripting,wskplho/sl4a,olapaola/olapaola-android-scripting,wskplho/sl4a,miguelpalacio/sl4a,olapaola/olapaola-android-scripting,Lh4cKg/sl4a,kuri65536/sl4a,pforret/sl4a,damonkohler/sl4a,damonkohler/sl4a,mSenyor/sl4a,Lh4cKg/sl4a,olapaola/olapaola-android-scripting,cristiana214/cristianachavez214-cristianachavez,barbarubra/Don-t-know-What-i-m-doing.,vlinhd11/vlinhd11-android-scripting,damonkohler/sl4a,kevinmel2000/sl4a,wskplho/sl4a,matmutant/sl4a,kuri65536/sl4a,SatoshiNXSimudrone/sl4a-damon-clone,kuri65536/sl4a,yqm/sl4a,gonboy/sl4a,kevinmel2000/sl4a,kerr-huang/SL4A,barbarubra/Don-t-know-What-i-m-doing.
java
## Code Before: /* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.ase.interpreter.sh; import com.google.ase.AndroidFacade; import com.google.ase.AndroidProxy; import com.google.ase.interpreter.AbstractInterpreterProcess; import com.google.ase.jsonrpc.JsonRpcServer; public class ShInterpreterProcess extends AbstractInterpreterProcess { private final AndroidProxy mAndroidProxy; private final int mAndroidProxyPort; public ShInterpreterProcess(AndroidFacade facade, String launchScript) { super(facade, launchScript); mAndroidProxy = new AndroidProxy(facade); mAndroidProxyPort = new JsonRpcServer(mAndroidProxy).start(); buildEnvironment(); } private void buildEnvironment() { mEnvironment.put("AP_PORT", Integer.toString(mAndroidProxyPort)); } } ## Instruction: Add missing call to start shell scripts. ## Code After: /* * Copyright (C) 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.ase.interpreter.sh; import com.google.ase.AndroidFacade; import com.google.ase.AndroidProxy; import com.google.ase.interpreter.AbstractInterpreterProcess; import com.google.ase.jsonrpc.JsonRpcServer; public class ShInterpreterProcess extends AbstractInterpreterProcess { private final AndroidProxy mAndroidProxy; private final int mAndroidProxyPort; public ShInterpreterProcess(AndroidFacade facade, String launchScript) { super(facade, launchScript); mAndroidProxy = new AndroidProxy(facade); mAndroidProxyPort = new JsonRpcServer(mAndroidProxy).start(); buildEnvironment(); } private void buildEnvironment() { mEnvironment.put("AP_PORT", Integer.toString(mAndroidProxyPort)); } @Override protected void writeInterpreterCommand() { if (mLaunchScript != null) { print(SHELL_BIN + " " + mLaunchScript + "\n"); } } }
4de4de7ebda59cdb8f5af44e7cfe9c950e407660
appveyor.yml
appveyor.yml
version: '{build}' os: Windows Server 2012 install: - ps: iex (new-object net.webclient).downloadstring('https://get.scoop.sh') - ps: $ErrorActionPreference = "Continue" - ps: scoop bucket add versions - ps: $ErrorActionPreference = "Stop" - ps: scoop install sbt0.13 environment: CI_SCALA_VERSION: 2.12.3 APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9" build_script: - sbt version # dummy step, a build_script step is required by appveyor. test_script: - sbt testOnlyJVM testOnlyJS cache: - C:\Users\appveyor\.m2 - C:\Users\appveyor\.ivy2 - C:\Users\appveyor\.coursier - C:\Users\appveyor\scoop\cache - target\repos
version: '{build}' os: Windows Server 2012 install: - ps: iex (new-object net.webclient).downloadstring('https://get.scoop.sh') - ps: $ErrorActionPreference = "Continue" - ps: scoop bucket add versions - ps: $ErrorActionPreference = "Stop" - ps: scoop install sbt0.13 environment: CI_SCALA_VERSION: 2.12.3 APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9" build_script: - sbt version # dummy step, a build_script step is required by appveyor. test_script: - sbt testOnlyJVM # testOnlyJS is disabled because of OOM errors cache: - C:\Users\appveyor\.m2 - C:\Users\appveyor\.ivy2 - C:\Users\appveyor\.coursier - C:\Users\appveyor\scoop\cache - target\repos
Disable JS tests on Appveyor.
Disable JS tests on Appveyor. It seems that the memory consumption on Node.js in Windows is too much to handle for the free tier Appveyor machines.
YAML
bsd-3-clause
MasseGuillaume/scalameta,scalameta/scalameta,scalameta/scalameta,olafurpg/scalameta,MasseGuillaume/scalameta,xeno-by/scalameta,scalameta/scalameta,xeno-by/scalameta,DavidDudson/scalameta,olafurpg/scalameta,olafurpg/scalameta,scalameta/scalameta,DavidDudson/scalameta,scalameta/scalameta,xeno-by/scalameta,MasseGuillaume/scalameta
yaml
## Code Before: version: '{build}' os: Windows Server 2012 install: - ps: iex (new-object net.webclient).downloadstring('https://get.scoop.sh') - ps: $ErrorActionPreference = "Continue" - ps: scoop bucket add versions - ps: $ErrorActionPreference = "Stop" - ps: scoop install sbt0.13 environment: CI_SCALA_VERSION: 2.12.3 APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9" build_script: - sbt version # dummy step, a build_script step is required by appveyor. test_script: - sbt testOnlyJVM testOnlyJS cache: - C:\Users\appveyor\.m2 - C:\Users\appveyor\.ivy2 - C:\Users\appveyor\.coursier - C:\Users\appveyor\scoop\cache - target\repos ## Instruction: Disable JS tests on Appveyor. It seems that the memory consumption on Node.js in Windows is too much to handle for the free tier Appveyor machines. ## Code After: version: '{build}' os: Windows Server 2012 install: - ps: iex (new-object net.webclient).downloadstring('https://get.scoop.sh') - ps: $ErrorActionPreference = "Continue" - ps: scoop bucket add versions - ps: $ErrorActionPreference = "Stop" - ps: scoop install sbt0.13 environment: CI_SCALA_VERSION: 2.12.3 APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9" build_script: - sbt version # dummy step, a build_script step is required by appveyor. test_script: - sbt testOnlyJVM # testOnlyJS is disabled because of OOM errors cache: - C:\Users\appveyor\.m2 - C:\Users\appveyor\.ivy2 - C:\Users\appveyor\.coursier - C:\Users\appveyor\scoop\cache - target\repos
61253510bc859ec1695484d11cbadcd92ad4b107
tests/test_misc.py
tests/test_misc.py
import mistune from unittest import TestCase class TestMiscCases(TestCase): def test_none(self): self.assertEqual(mistune.html(None), '') def test_before_parse_hooks(self): def _add_name(md, s, state): state['name'] = 'test' return s, state md = mistune.create_markdown() md.before_parse_hooks.append(_add_name) state = {} md.parse('', state) self.assertEqual(state['name'], 'test')
import mistune from unittest import TestCase class TestMiscCases(TestCase): def test_none(self): self.assertEqual(mistune.html(None), '') def test_before_parse_hooks(self): def _add_name(md, s, state): state['name'] = 'test' return s, state md = mistune.create_markdown() md.before_parse_hooks.append(_add_name) state = {} md.parse('', state) self.assertEqual(state['name'], 'test') def test_escape_html(self): md = mistune.create_markdown(escape=True) result = md('<div>1</div>') expected = '<p>&lt;div&gt;1&lt;/div&gt;</p>' self.assertEqual(result.strip(), expected) result = md('<em>1</em>') expected = '<p>&lt;em&gt;1&lt;/em&gt;</p>' self.assertEqual(result.strip(), expected) def test_emphasis(self): md = mistune.create_markdown(escape=True) result = md('_em_ **strong**') expected = '<p><em>em</em> <strong>strong</strong></p>' self.assertEqual(result.strip(), expected) def test_allow_harmful_protocols(self): renderer = mistune.HTMLRenderer(allow_harmful_protocols=True) md = mistune.Markdown(renderer) result = md('[h](javascript:alert)') expected = '<p><a href="javascript:alert">h</a></p>' self.assertEqual(result.strip(), expected)
Add test for allow harmful protocols
Add test for allow harmful protocols
Python
bsd-3-clause
lepture/mistune
python
## Code Before: import mistune from unittest import TestCase class TestMiscCases(TestCase): def test_none(self): self.assertEqual(mistune.html(None), '') def test_before_parse_hooks(self): def _add_name(md, s, state): state['name'] = 'test' return s, state md = mistune.create_markdown() md.before_parse_hooks.append(_add_name) state = {} md.parse('', state) self.assertEqual(state['name'], 'test') ## Instruction: Add test for allow harmful protocols ## Code After: import mistune from unittest import TestCase class TestMiscCases(TestCase): def test_none(self): self.assertEqual(mistune.html(None), '') def test_before_parse_hooks(self): def _add_name(md, s, state): state['name'] = 'test' return s, state md = mistune.create_markdown() md.before_parse_hooks.append(_add_name) state = {} md.parse('', state) self.assertEqual(state['name'], 'test') def test_escape_html(self): md = mistune.create_markdown(escape=True) result = md('<div>1</div>') expected = '<p>&lt;div&gt;1&lt;/div&gt;</p>' self.assertEqual(result.strip(), expected) result = md('<em>1</em>') expected = '<p>&lt;em&gt;1&lt;/em&gt;</p>' self.assertEqual(result.strip(), expected) def test_emphasis(self): md = mistune.create_markdown(escape=True) result = md('_em_ **strong**') expected = '<p><em>em</em> <strong>strong</strong></p>' self.assertEqual(result.strip(), expected) def test_allow_harmful_protocols(self): renderer = mistune.HTMLRenderer(allow_harmful_protocols=True) md = mistune.Markdown(renderer) result = md('[h](javascript:alert)') expected = '<p><a href="javascript:alert">h</a></p>' self.assertEqual(result.strip(), expected)
a7e283f7e3d6cbf473ad114e8bb7599acb3e45eb
src/Oro/Bundle/CalendarBundle/Resources/config/validation.yml
src/Oro/Bundle/CalendarBundle/Resources/config/validation.yml
Oro\Bundle\CalendarBundle\Entity\CalendarEvent: properties: title: - NotBlank: ~ - Length: max: 255 start: - DateTime: ~ - NotBlank: ~ - Oro\Bundle\CalendarBundle\Validator\Constraints\DateEarlierThan: end end: - DateTime: ~ - NotBlank: ~ Oro\Bundle\CalendarBundle\Entity\CalendarProperty: properties: targetCalendar: - NotBlank: ~ calendarAlias: - NotBlank: ~ - Length: max: 32 calendar: - NotBlank: ~ backgroundColor: - Length: max: 7 Oro\Bundle\CalendarBundle\Entity\SystemCalendar: properties: name: - NotBlank: ~ - Length: max: 255
Oro\Bundle\CalendarBundle\Entity\CalendarEvent: properties: title: - NotBlank: ~ - Length: max: 255 start: - DateTime: ~ - NotBlank: ~ - Oro\Bundle\CalendarBundle\Validator\Constraints\DateEarlierThan: end end: - DateTime: ~ - NotBlank: ~ attendees: - Valid: ~ Oro\Bundle\CalendarBundle\Entity\CalendarProperty: properties: targetCalendar: - NotBlank: ~ calendarAlias: - NotBlank: ~ - Length: max: 32 calendar: - NotBlank: ~ backgroundColor: - Length: max: 7 Oro\Bundle\CalendarBundle\Entity\SystemCalendar: properties: name: - NotBlank: ~ - Length: max: 255 Oro\Bundle\CalendarBundle\Entity\Attendee: properties: origin: - NotBlank: ~ email: - NotBlank: ~ - Length: max: 255 displayName: - Length: max: 255
Update API REST and SOAP
AEIV-573: Update API REST and SOAP - attendee validation
YAML
mit
orocrm/platform,orocrm/platform,Djamy/platform,trustify/oroplatform,geoffroycochard/platform,Djamy/platform,Djamy/platform,trustify/oroplatform,geoffroycochard/platform,orocrm/platform,geoffroycochard/platform,trustify/oroplatform
yaml
## Code Before: Oro\Bundle\CalendarBundle\Entity\CalendarEvent: properties: title: - NotBlank: ~ - Length: max: 255 start: - DateTime: ~ - NotBlank: ~ - Oro\Bundle\CalendarBundle\Validator\Constraints\DateEarlierThan: end end: - DateTime: ~ - NotBlank: ~ Oro\Bundle\CalendarBundle\Entity\CalendarProperty: properties: targetCalendar: - NotBlank: ~ calendarAlias: - NotBlank: ~ - Length: max: 32 calendar: - NotBlank: ~ backgroundColor: - Length: max: 7 Oro\Bundle\CalendarBundle\Entity\SystemCalendar: properties: name: - NotBlank: ~ - Length: max: 255 ## Instruction: AEIV-573: Update API REST and SOAP - attendee validation ## Code After: Oro\Bundle\CalendarBundle\Entity\CalendarEvent: properties: title: - NotBlank: ~ - Length: max: 255 start: - DateTime: ~ - NotBlank: ~ - Oro\Bundle\CalendarBundle\Validator\Constraints\DateEarlierThan: end end: - DateTime: ~ - NotBlank: ~ attendees: - Valid: ~ Oro\Bundle\CalendarBundle\Entity\CalendarProperty: properties: targetCalendar: - NotBlank: ~ calendarAlias: - NotBlank: ~ - Length: max: 32 calendar: - NotBlank: ~ backgroundColor: - Length: max: 7 Oro\Bundle\CalendarBundle\Entity\SystemCalendar: properties: name: - NotBlank: ~ - Length: max: 255 Oro\Bundle\CalendarBundle\Entity\Attendee: properties: origin: - NotBlank: ~ email: - NotBlank: ~ - Length: max: 255 displayName: - Length: max: 255
0cf35bb0281924e679c13bfc90c793e5d9d5e781
app/views/tryEvalGD.scala.html
app/views/tryEvalGD.scala.html
@main("Try eval.gd") { <script type="text/javascript" src="@routes.Assets.at("javascripts/jquery.autosize.js")"></script> <script type="text/javascript" src="@routes.Assets.at("javascripts/tryEvalGD.min.js")"></script> <div class="row"> <div class="span6"> <textarea class="stupidly-plain" spellcheck="false" placeholder="Type Ruby code here and press control-enter when you are done."></textarea> </div> <div class="span6"> <pre id="result" class="stupidly-plain">JSON output will display here.</pre> </div> </div> <script type="text/javascript"> $(function() { $('textarea').autosize(); }); </script> }
@main("Try eval.gd") { <script type="text/javascript" src="@routes.Assets.at("javascripts/jquery.autosize.js")"></script> <script type="text/javascript" src="@routes.Assets.at("javascripts/tryEvalGD.min.js")"></script> <div class="row"> <div class="span6"> <textarea id="eval" class="stupidly-plain" tabindex="1" spellcheck="false" placeholder="Type Ruby code here and press control-enter when you are done."></textarea> </div> <div class="span6"> <pre id="result" class="stupidly-plain">JSON output will display here.</pre> </div> </div> <script type="text/javascript"> $(function() { $('textarea').autosize(); $('textarea')[0].focus(); }); </script> }
Make the eval area autofocus (and specify tabindex in case that doesn't work)
Make the eval area autofocus (and specify tabindex in case that doesn't work)
HTML
apache-2.0
eval-so/frontend,eval-so/frontend
html
## Code Before: @main("Try eval.gd") { <script type="text/javascript" src="@routes.Assets.at("javascripts/jquery.autosize.js")"></script> <script type="text/javascript" src="@routes.Assets.at("javascripts/tryEvalGD.min.js")"></script> <div class="row"> <div class="span6"> <textarea class="stupidly-plain" spellcheck="false" placeholder="Type Ruby code here and press control-enter when you are done."></textarea> </div> <div class="span6"> <pre id="result" class="stupidly-plain">JSON output will display here.</pre> </div> </div> <script type="text/javascript"> $(function() { $('textarea').autosize(); }); </script> } ## Instruction: Make the eval area autofocus (and specify tabindex in case that doesn't work) ## Code After: @main("Try eval.gd") { <script type="text/javascript" src="@routes.Assets.at("javascripts/jquery.autosize.js")"></script> <script type="text/javascript" src="@routes.Assets.at("javascripts/tryEvalGD.min.js")"></script> <div class="row"> <div class="span6"> <textarea id="eval" class="stupidly-plain" tabindex="1" spellcheck="false" placeholder="Type Ruby code here and press control-enter when you are done."></textarea> </div> <div class="span6"> <pre id="result" class="stupidly-plain">JSON output will display here.</pre> </div> </div> <script type="text/javascript"> $(function() { $('textarea').autosize(); $('textarea')[0].focus(); }); </script> }
a7e5b07203a151741044a12807a12455f45ab77c
src/desktop/components/react/stitch_components/index.tsx
src/desktop/components/react/stitch_components/index.tsx
/** * Export globally available React components from this file. * * Keep in mind that components exported from here (and their dependencies) * increase the size of our `common.js` bundle, so when the stitched component * is no longer used be sure to remove it from this list. * * To find which components are still being stiched can search for * ".SomeComponentName(", since this is how the component is invoked from our * jade / pug components. */ export { StitchWrapper } from "./StitchWrapper" export { NavBar } from "./NavBar" export { CollectionsHubsHomepageNav } from "./CollectionsHubsHomepageNav" export { UserSettingsPaymentsQueryRenderer as UserSettingsPayments, } from "reaction/Components/Payment/UserSettingsPayments" export { UserSettingsTwoFactorAuthenticationQueryRenderer as UserSettingsTwoFactorAuthentication, } from "reaction/Components/UserSettingsTwoFactorAuthentication" export { ReactionCCPARequest as CCPARequest } from "./CCPARequest"
/** * Export globally available React components from this file. * * Keep in mind that components exported from here (and their dependencies) * increase the size of our `common.js` bundle, so when the stitched component * is no longer used be sure to remove it from this list. * * To find which components are still being stiched can search for * ".SomeComponentName(", since this is how the component is invoked from our * jade / pug components. */ export { StitchWrapper } from "./StitchWrapper" export { NavBar } from "./NavBar" export { CollectionsHubsHomepageNav } from "./CollectionsHubsHomepageNav" export { UserSettingsPaymentsQueryRenderer as UserSettingsPayments, } from "reaction/Components/Payment/UserSettingsPayments" export { UserSettingsTwoFactorAuthenticationQueryRenderer as UserSettingsTwoFactorAuthentication, } from "reaction/Components/UserSettingsTwoFactorAuthentication/UserSettingsTwoFactorAuthentication" export { ReactionCCPARequest as CCPARequest } from "./CCPARequest"
Update stitched UserSettingsTwoFactorAuthentication component import
Update stitched UserSettingsTwoFactorAuthentication component import
TypeScript
mit
joeyAghion/force,damassi/force,artsy/force-public,eessex/force,joeyAghion/force,yuki24/force,erikdstock/force,joeyAghion/force,izakp/force,erikdstock/force,eessex/force,oxaudo/force,anandaroop/force,damassi/force,artsy/force-public,artsy/force,oxaudo/force,oxaudo/force,oxaudo/force,yuki24/force,erikdstock/force,joeyAghion/force,izakp/force,anandaroop/force,yuki24/force,artsy/force,eessex/force,anandaroop/force,yuki24/force,izakp/force,izakp/force,artsy/force,anandaroop/force,damassi/force,erikdstock/force,damassi/force,artsy/force,eessex/force
typescript
## Code Before: /** * Export globally available React components from this file. * * Keep in mind that components exported from here (and their dependencies) * increase the size of our `common.js` bundle, so when the stitched component * is no longer used be sure to remove it from this list. * * To find which components are still being stiched can search for * ".SomeComponentName(", since this is how the component is invoked from our * jade / pug components. */ export { StitchWrapper } from "./StitchWrapper" export { NavBar } from "./NavBar" export { CollectionsHubsHomepageNav } from "./CollectionsHubsHomepageNav" export { UserSettingsPaymentsQueryRenderer as UserSettingsPayments, } from "reaction/Components/Payment/UserSettingsPayments" export { UserSettingsTwoFactorAuthenticationQueryRenderer as UserSettingsTwoFactorAuthentication, } from "reaction/Components/UserSettingsTwoFactorAuthentication" export { ReactionCCPARequest as CCPARequest } from "./CCPARequest" ## Instruction: Update stitched UserSettingsTwoFactorAuthentication component import ## Code After: /** * Export globally available React components from this file. * * Keep in mind that components exported from here (and their dependencies) * increase the size of our `common.js` bundle, so when the stitched component * is no longer used be sure to remove it from this list. * * To find which components are still being stiched can search for * ".SomeComponentName(", since this is how the component is invoked from our * jade / pug components. */ export { StitchWrapper } from "./StitchWrapper" export { NavBar } from "./NavBar" export { CollectionsHubsHomepageNav } from "./CollectionsHubsHomepageNav" export { UserSettingsPaymentsQueryRenderer as UserSettingsPayments, } from "reaction/Components/Payment/UserSettingsPayments" export { UserSettingsTwoFactorAuthenticationQueryRenderer as UserSettingsTwoFactorAuthentication, } from "reaction/Components/UserSettingsTwoFactorAuthentication/UserSettingsTwoFactorAuthentication" export { ReactionCCPARequest as CCPARequest } from "./CCPARequest"
29cb760030021f97906d5eaec1c0b885e8bb2930
example/gravity.py
example/gravity.py
# Import the gravitational constant and the Quantity class from dimensionful import G, Quantity # Supply the mass of Earth, mass of Sun, and the distance between. mass_earth = Quantity(5.9742e27, "g") mass_sun = Quantity(1.0, "Msun") distance = Quantity(1.0, "AU") # Calculate it force_gravity = G * mass_earth * mass_sun / distance**2 force_gravity.convert_to_cgs() # Report print "" print "The force of gravity between the Earth and Sun is %s" % force_gravity print ""
# Import the gravitational constant and the Quantity class from dimensionful import G, Quantity # Supply the mass of Earth, mass of Sun, and the distance between. mass_earth = Quantity(5.9742e27, "g") mass_sun = Quantity(1.0, "Msun") distance = Quantity(1.0, "AU") # Calculate it force_gravity = G * mass_earth * mass_sun / distance**2 force_gravity.convert_to_cgs() # Report print "" print "The force of gravity between the Earth and Sun is %s" % force_gravity print "" # prints "The force of gravity between the Earth and Sun is 3.54296304519e+27 cm*g/s**2"
Add what the example should output.
Add what the example should output.
Python
bsd-2-clause
caseywstark/dimensionful
python
## Code Before: # Import the gravitational constant and the Quantity class from dimensionful import G, Quantity # Supply the mass of Earth, mass of Sun, and the distance between. mass_earth = Quantity(5.9742e27, "g") mass_sun = Quantity(1.0, "Msun") distance = Quantity(1.0, "AU") # Calculate it force_gravity = G * mass_earth * mass_sun / distance**2 force_gravity.convert_to_cgs() # Report print "" print "The force of gravity between the Earth and Sun is %s" % force_gravity print "" ## Instruction: Add what the example should output. ## Code After: # Import the gravitational constant and the Quantity class from dimensionful import G, Quantity # Supply the mass of Earth, mass of Sun, and the distance between. mass_earth = Quantity(5.9742e27, "g") mass_sun = Quantity(1.0, "Msun") distance = Quantity(1.0, "AU") # Calculate it force_gravity = G * mass_earth * mass_sun / distance**2 force_gravity.convert_to_cgs() # Report print "" print "The force of gravity between the Earth and Sun is %s" % force_gravity print "" # prints "The force of gravity between the Earth and Sun is 3.54296304519e+27 cm*g/s**2"
2f702c0fc6f99ef6c1277f31a487c877f9f238e7
package.json
package.json
{ "name": "sugarss", "version": "0.0.0", "description": "Compact alternate syntax for CSS", "keywords": [ "css", "postcss", "syntax", "indent" ], "author": "Andrey Sitnik <andrey@sitnik.ru>", "license": "MIT", "repository": "postcss/sugarss", "dependencies": { "postcss": "^5.0.17" }, "devDependencies": { "babel-plugin-precompile-charcodes": "1.0.0", "babel-plugin-add-module-exports": "0.1.2", "babel-preset-es2015-loose": "7.0.0", "eslint-config-postcss": "2.0.0", "babel-preset-stage-0": "6.5.0", "postcss-parser-tests": "5.0.5", "babel-eslint": "5.0.0", "babel-core": "6.5.2", "babel-cli": "6.5.1", "eslint": "2.2.0", "ava": "0.12.0" }, "scripts": { "clean": "rm *.js || echo 'Already cleaned'", "build": "npm run clean && babel -s inline -d ./ *.es6", "test": "npm run build && ava && eslint *.es6 test/*.js" } }
{ "name": "sugarss", "version": "0.0.0", "description": "Compact alternate syntax for CSS", "keywords": [ "css", "postcss", "syntax", "indent" ], "author": "Andrey Sitnik <andrey@sitnik.ru>", "license": "MIT", "repository": "postcss/sugarss", "dependencies": { "postcss": "^5.0.17" }, "devDependencies": { "babel-plugin-precompile-charcodes": "1.0.0", "babel-plugin-add-module-exports": "0.1.2", "babel-preset-es2015-loose": "7.0.0", "eslint-config-postcss": "2.0.0", "babel-preset-stage-0": "6.5.0", "postcss-parser-tests": "5.0.5", "babel-eslint": "5.0.0", "babel-core": "6.5.2", "babel-cli": "6.5.1", "eslint": "2.2.0", "ava": "0.12.0" }, "scripts": { "lint": "eslint *.es6 test/*.js", "clean": "rm *.js || echo 'Already cleaned'", "build": "npm run clean && babel -s inline -d ./ *.es6", "test": "npm run build && ava && npm run lint" } }
Add shortcut to run ESLint
Add shortcut to run ESLint
JSON
mit
postcss/sugarss
json
## Code Before: { "name": "sugarss", "version": "0.0.0", "description": "Compact alternate syntax for CSS", "keywords": [ "css", "postcss", "syntax", "indent" ], "author": "Andrey Sitnik <andrey@sitnik.ru>", "license": "MIT", "repository": "postcss/sugarss", "dependencies": { "postcss": "^5.0.17" }, "devDependencies": { "babel-plugin-precompile-charcodes": "1.0.0", "babel-plugin-add-module-exports": "0.1.2", "babel-preset-es2015-loose": "7.0.0", "eslint-config-postcss": "2.0.0", "babel-preset-stage-0": "6.5.0", "postcss-parser-tests": "5.0.5", "babel-eslint": "5.0.0", "babel-core": "6.5.2", "babel-cli": "6.5.1", "eslint": "2.2.0", "ava": "0.12.0" }, "scripts": { "clean": "rm *.js || echo 'Already cleaned'", "build": "npm run clean && babel -s inline -d ./ *.es6", "test": "npm run build && ava && eslint *.es6 test/*.js" } } ## Instruction: Add shortcut to run ESLint ## Code After: { "name": "sugarss", "version": "0.0.0", "description": "Compact alternate syntax for CSS", "keywords": [ "css", "postcss", "syntax", "indent" ], "author": "Andrey Sitnik <andrey@sitnik.ru>", "license": "MIT", "repository": "postcss/sugarss", "dependencies": { "postcss": "^5.0.17" }, "devDependencies": { "babel-plugin-precompile-charcodes": "1.0.0", "babel-plugin-add-module-exports": "0.1.2", "babel-preset-es2015-loose": "7.0.0", "eslint-config-postcss": "2.0.0", "babel-preset-stage-0": "6.5.0", "postcss-parser-tests": "5.0.5", "babel-eslint": "5.0.0", "babel-core": "6.5.2", "babel-cli": "6.5.1", "eslint": "2.2.0", "ava": "0.12.0" }, "scripts": { "lint": "eslint *.es6 test/*.js", "clean": "rm *.js || echo 'Already cleaned'", "build": "npm run clean && babel -s inline -d ./ *.es6", "test": "npm run build && ava && npm run lint" } }
c6ab8d04e865c69f53aba7ba1da0b120aaa342b9
app/views/projects/_zen.html.haml
app/views/projects/_zen.html.haml
.zennable %input#zen-toggle-comment.zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } .zen-backdrop - classes << ' js-gfm-input markdown-area' = f.text_area attr, class: classes, placeholder: 'Leave a comment' = link_to nil, class: 'zen-enter-link' do %i.fa.fa-expand Edit in fullscreen = link_to nil, class: 'zen-leave-link' do %i.fa.fa-compress
.zennable %input#zen-toggle-comment.zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } .zen-backdrop - classes << ' js-gfm-input markdown-area' = f.text_area attr, class: classes, placeholder: 'Leave a comment' = link_to nil, class: 'zen-enter-link', tabindex: '-1' do %i.fa.fa-expand Edit in fullscreen = link_to nil, class: 'zen-leave-link' do %i.fa.fa-compress
Fix tabindex for comment form
Fix tabindex for comment form
Haml
mit
yatish27/gitlabhq,mr-dxdy/gitlabhq,chenrui2014/gitlabhq,salipro4ever/gitlabhq,yama07/gitlabhq,stanhu/gitlabhq,kemenaran/gitlabhq,childbamboo/gitlabhq,liyakun/gitlabhq,revaret/gitlabhq,yatish27/gitlabhq,sekcheong/gitlabhq,gopeter/gitlabhq,cinderblock/gitlabhq,initiummedia/gitlabhq,chenrui2014/gitlabhq,stanhu/gitlabhq,salipro4ever/gitlabhq,tim-hoff/gitlabhq,flashbuckets/gitlabhq,joalmeid/gitlabhq,yama07/gitlabhq,8thcolor/testing-public-gitlabhq,copystudy/gitlabhq,jaepyoung/gitlabhq,rhels/gitlabhq,duduribeiro/gitlabhq,mr-dxdy/gitlabhq,dreampet/gitlab,LytayTOUCH/gitlabhq,Tyrael/gitlabhq,openwide-java/gitlabhq,mmkassem/gitlabhq,flashbuckets/gitlabhq,fpgentil/gitlabhq,dreampet/gitlab,openwide-java/gitlabhq,jaepyoung/gitlabhq,SkyWei/gitlabhq,stoplightio/gitlabhq,ayufan/gitlabhq,tempbottle/gitlabhq,kitech/gitlabhq,dwrensha/gitlabhq,per-garden/gitlabhq,SVArago/gitlabhq,szechyjs/gitlabhq,OtkurBiz/gitlabhq,TheWatcher/gitlabhq,mmkassem/gitlabhq,nguyen-tien-mulodo/gitlabhq,whluwit/gitlabhq,MauriceMohlek/gitlabhq,axilleas/gitlabhq,szechyjs/gitlabhq,pjknkda/gitlabhq,LytayTOUCH/gitlabhq,stoplightio/gitlabhq,fgbreel/gitlabhq,ordiychen/gitlabhq,allysonbarros/gitlabhq,dwrensha/gitlabhq,michaKFromParis/gitlabhqold,ikappas/gitlabhq,sekcheong/gitlabhq,iiet/iiet-git,htve/GitlabForChinese,cui-liqiang/gitlab-ce,tk23/gitlabhq,per-garden/gitlabhq,bbodenmiller/gitlabhq,wangcan2014/gitlabhq,since2014/gitlabhq,julianengel/gitlabhq,mr-dxdy/gitlabhq,delkyd/gitlabhq,delkyd/gitlabhq,OlegGirko/gitlab-ce,darkrasid/gitlabhq,ordiychen/gitlabhq,koreamic/gitlabhq,hzy001/gitlabhq,H3Chief/gitlabhq,lvfeng1130/gitlabhq,jrjang/gitlabhq,jrjang/gitlab-ce,mente/gitlabhq,NKMR6194/gitlabhq,gorgee/gitlabhq,ksoichiro/gitlabhq,michaKFromParis/sparkslab,dplarson/gitlabhq,dplarson/gitlabhq,pjknkda/gitlabhq,aaronsnyder/gitlabhq,theonlydoo/gitlabhq,ferdinandrosario/gitlabhq,dwrensha/gitlabhq,sue445/gitlabhq,michaKFromParis/gitlabhqold,chadyred/gitlabhq,michaKFromParis/gitlabhq,johnmyqin/gitlabhq,theodi/gitlabhq,nmav/gitlabhq,htve/GitlabForChinese,mavimo/gitlabhq,bozaro/gitlabhq,initiummedia/gitlabhq,ferdinandrosario/gitlabhq,yatish27/gitlabhq,sideci-sample/sideci-sample-gitlabhq,michaKFromParis/sparkslab,ngpestelos/gitlabhq,pulkit21/gitlabhq,yonglehou/gitlabhq,hzy001/gitlabhq,jrjang/gitlab-ce,Soullivaneuh/gitlabhq,ttasanen/gitlabhq,stanhu/gitlabhq,eliasp/gitlabhq,fantasywind/gitlabhq,rebecamendez/gitlabhq,screenpages/gitlabhq,it33/gitlabhq,johnmyqin/gitlabhq,bigsurge/gitlabhq,H3Chief/gitlabhq,MauriceMohlek/gitlabhq,ferdinandrosario/gitlabhq,liyakun/gitlabhq,SVArago/gitlabhq,tempbottle/gitlabhq,iiet/iiet-git,k4zzk/gitlabhq,dukex/gitlabhq,zrbsprite/gitlabhq,ayufan/gitlabhq,ksoichiro/gitlabhq,gorgee/gitlabhq,daiyu/gitlab-zh,dplarson/gitlabhq,luzhongyang/gitlabhq,copystudy/gitlabhq,fantasywind/gitlabhq,axilleas/gitlabhq,ibiart/gitlabhq,jrjang/gitlabhq,NARKOZ/gitlabhq,chadyred/gitlabhq,mrb/gitlabhq,TheWatcher/gitlabhq,bigsurge/gitlabhq,8thcolor/testing-public-gitlabhq,pulkit21/gitlabhq,Exeia/gitlabhq,pulkit21/gitlabhq,MauriceMohlek/gitlabhq,hq804116393/gitlabhq,k4zzk/gitlabhq,rebecamendez/gitlabhq,cncodog/gitlab,darkrasid/gitlabhq,michaKFromParis/gitlabhq,SkyWei/gitlabhq,chadyred/gitlabhq,bbodenmiller/gitlabhq,Devin001/gitlabhq,shinexiao/gitlabhq,joalmeid/gitlabhq,per-garden/gitlabhq,Razer6/gitlabhq,bozaro/gitlabhq,htve/GitlabForChinese,jaepyoung/gitlabhq,SkyWei/gitlabhq,Exeia/gitlabhq,cinderblock/gitlabhq,martijnvermaat/gitlabhq,icedwater/gitlabhq,fendoudeqingchunhh/gitlabhq,ttasanen/gitlabhq,NARKOZ/gitlabhq,yama07/gitlabhq,allistera/gitlabhq,icedwater/gitlabhq,daiyu/gitlab-zh,pjknkda/gitlabhq,t-zuehlsdorff/gitlabhq,Devin001/gitlabhq,WSDC-NITWarangal/gitlabhq,larryli/gitlabhq,tim-hoff/gitlabhq,yonglehou/gitlabhq,yuyue2013/ss,SVArago/gitlabhq,cinderblock/gitlabhq,LUMC/gitlabhq,OtkurBiz/gitlabhq,adaiguoguo/gitlab_globalserarch,williamherry/gitlabhq,TheWatcher/gitlabhq,k4zzk/gitlabhq,mathstuf/gitlabhq,ngpestelos/gitlabhq,flashbuckets/gitlabhq,martinma4/gitlabhq,rumpelsepp/gitlabhq,LUMC/gitlabhq,ikappas/gitlabhq,tk23/gitlabhq,Soullivaneuh/gitlabhq,luzhongyang/gitlabhq,larryli/gitlabhq,jvanbaarsen/gitlabhq,rhels/gitlabhq,LytayTOUCH/gitlabhq,Razer6/gitlabhq,szechyjs/gitlabhq,tempbottle/gitlabhq,jvanbaarsen/gitlabhq,Razer6/gitlabhq,yfaizal/gitlabhq,rumpelsepp/gitlabhq,nmav/gitlabhq,duduribeiro/gitlabhq,mente/gitlabhq,OlegGirko/gitlab-ce,sakishum/gitlabhq,allysonbarros/gitlabhq,fpgentil/gitlabhq,bozaro/gitlabhq,darkrasid/gitlabhq,chenrui2014/gitlabhq,eliasp/gitlabhq,rumpelsepp/gitlabhq,eliasp/gitlabhq,per-garden/gitlabhq,adaiguoguo/gitlab_globalserarch,mavimo/gitlabhq,ordiychen/gitlabhq,williamherry/gitlabhq,daiyu/gitlab-zh,cncodog/gitlab,8thcolor/testing-public-gitlabhq,dvrylc/gitlabhq,nmav/gitlabhq,bigsurge/gitlabhq,Telekom-PD/gitlabhq,whluwit/gitlabhq,nguyen-tien-mulodo/gitlabhq,manfer/gitlabhq,louahola/gitlabhq,julianengel/gitlabhq,mathstuf/gitlabhq,WSDC-NITWarangal/gitlabhq,mr-dxdy/gitlabhq,rumpelsepp/gitlabhq,fantasywind/gitlabhq,it33/gitlabhq,michaKFromParis/sparkslab,hq804116393/gitlabhq,zBMNForks/gitlabhq,bigsurge/gitlabhq,martinma4/gitlabhq,wangcan2014/gitlabhq,stoplightio/gitlabhq,delkyd/gitlabhq,revaret/gitlabhq,initiummedia/gitlabhq,openwide-java/gitlabhq,sideci-sample/sideci-sample-gitlabhq,jvanbaarsen/gitlabhq,yonglehou/gitlabhq,axilleas/gitlabhq,gopeter/gitlabhq,Devin001/gitlabhq,ZeoAlliance/gitlabhq,hq804116393/gitlabhq,WSDC-NITWarangal/gitlabhq,martinma4/gitlabhq,OlegGirko/gitlab-ce,allysonbarros/gitlabhq,sonalkr132/gitlabhq,julianengel/gitlabhq,szechyjs/gitlabhq,aaronsnyder/gitlabhq,kitech/gitlabhq,ksoichiro/gitlabhq,fgbreel/gitlabhq,Burick/gitlabhq,ttasanen/gitlabhq,luzhongyang/gitlabhq,ZeoAlliance/gitlabhq,ngpestelos/gitlabhq,sakishum/gitlabhq,duduribeiro/gitlabhq,koreamic/gitlabhq,kitech/gitlabhq,since2014/gitlabhq,fpgentil/gitlabhq,hq804116393/gitlabhq,childbamboo/gitlabhq,yfaizal/gitlabhq,DanielZhangQingLong/gitlabhq,fgbreel/gitlabhq,johnmyqin/gitlabhq,screenpages/gitlabhq,theonlydoo/gitlabhq,nguyen-tien-mulodo/gitlabhq,kemenaran/gitlabhq,hacsoc/gitlabhq,Datacom/gitlabhq,since2014/gitlabhq,fearenales/gitlabhq,Datacom/gitlabhq,SVArago/gitlabhq,julianengel/gitlabhq,jrjang/gitlabhq,yama07/gitlabhq,mmkassem/gitlabhq,michaKFromParis/gitlabhqold,Exeia/gitlabhq,fpgentil/gitlabhq,t-zuehlsdorff/gitlabhq,ikappas/gitlabhq,fscherwi/gitlabhq,cncodog/gitlab,Tyrael/gitlabhq,joalmeid/gitlabhq,jirutka/gitlabhq,TheWatcher/gitlabhq,fgbreel/gitlabhq,kitech/gitlabhq,whluwit/gitlabhq,koreamic/gitlabhq,tim-hoff/gitlabhq,larryli/gitlabhq,martijnvermaat/gitlabhq,louahola/gitlabhq,youprofit/gitlabhq,zBMNForks/gitlabhq,jrjang/gitlab-ce,cui-liqiang/gitlab-ce,mente/gitlabhq,cui-liqiang/gitlab-ce,shinexiao/gitlabhq,yonglehou/gitlabhq,mavimo/gitlabhq,vjustov/gitlabhq,michaKFromParis/gitlabhq,ksoichiro/gitlabhq,DanielZhangQingLong/gitlabhq,stoplightio/gitlabhq,dukex/gitlabhq,folpindo/gitlabhq,jirutka/gitlabhq,zBMNForks/gitlabhq,delkyd/gitlabhq,adaiguoguo/gitlab_globalserarch,ferdinandrosario/gitlabhq,yuyue2013/ss,vjustov/gitlabhq,fscherwi/gitlabhq,Devin001/gitlabhq,pulkit21/gitlabhq,ibiart/gitlabhq,revaret/gitlabhq,childbamboo/gitlabhq,t-zuehlsdorff/gitlabhq,dvrylc/gitlabhq,Razer6/gitlabhq,NARKOZ/gitlabhq,Telekom-PD/gitlabhq,youprofit/gitlabhq,folpindo/gitlabhq,vjustov/gitlabhq,sonalkr132/gitlabhq,sue445/gitlabhq,cui-liqiang/gitlab-ce,t-zuehlsdorff/gitlabhq,yfaizal/gitlabhq,dplarson/gitlabhq,louahola/gitlabhq,pjknkda/gitlabhq,nguyen-tien-mulodo/gitlabhq,fendoudeqingchunhh/gitlabhq,manfer/gitlabhq,Telekom-PD/gitlabhq,williamherry/gitlabhq,luzhongyang/gitlabhq,kemenaran/gitlabhq,fearenales/gitlabhq,mmkassem/gitlabhq,shinexiao/gitlabhq,dreampet/gitlab,lvfeng1130/gitlabhq,salipro4ever/gitlabhq,yfaizal/gitlabhq,Tyrael/gitlabhq,michaKFromParis/gitlabhqold,manfer/gitlabhq,sue445/gitlabhq,icedwater/gitlabhq,bozaro/gitlabhq,it33/gitlabhq,shinexiao/gitlabhq,since2014/gitlabhq,lvfeng1130/gitlabhq,ayufan/gitlabhq,ordiychen/gitlabhq,gorgee/gitlabhq,Burick/gitlabhq,sonalkr132/gitlabhq,ZeoAlliance/gitlabhq,copystudy/gitlabhq,rebecamendez/gitlabhq,LUMC/gitlabhq,Burick/gitlabhq,rebecamendez/gitlabhq,joalmeid/gitlabhq,folpindo/gitlabhq,theonlydoo/gitlabhq,johnmyqin/gitlabhq,NKMR6194/gitlabhq,initiummedia/gitlabhq,gorgee/gitlabhq,tim-hoff/gitlabhq,Tyrael/gitlabhq,Exeia/gitlabhq,dvrylc/gitlabhq,zrbsprite/gitlabhq,chadyred/gitlabhq,childbamboo/gitlabhq,chenrui2014/gitlabhq,ayufan/gitlabhq,sue445/gitlabhq,youprofit/gitlabhq,adaiguoguo/gitlab_globalserarch,ttasanen/gitlabhq,MauriceMohlek/gitlabhq,larryli/gitlabhq,sekcheong/gitlabhq,htve/GitlabForChinese,Burick/gitlabhq,hzy001/gitlabhq,theonlydoo/gitlabhq,hacsoc/gitlabhq,OlegGirko/gitlab-ce,DanielZhangQingLong/gitlabhq,allistera/gitlabhq,lvfeng1130/gitlabhq,OtkurBiz/gitlabhq,SkyWei/gitlabhq,kemenaran/gitlabhq,NKMR6194/gitlabhq,tk23/gitlabhq,axilleas/gitlabhq,theodi/gitlabhq,OtkurBiz/gitlabhq,sakishum/gitlabhq,dwrensha/gitlabhq,louahola/gitlabhq,allysonbarros/gitlabhq,liyakun/gitlabhq,WSDC-NITWarangal/gitlabhq,fscherwi/gitlabhq,hacsoc/gitlabhq,fscherwi/gitlabhq,iiet/iiet-git,darkrasid/gitlabhq,mavimo/gitlabhq,tempbottle/gitlabhq,dukex/gitlabhq,fendoudeqingchunhh/gitlabhq,allistera/gitlabhq,sonalkr132/gitlabhq,revaret/gitlabhq,michaKFromParis/sparkslab,aaronsnyder/gitlabhq,martinma4/gitlabhq,youprofit/gitlabhq,cinderblock/gitlabhq,sakishum/gitlabhq,zrbsprite/gitlabhq,jaepyoung/gitlabhq,yuyue2013/ss,cncodog/gitlab,NARKOZ/gitlabhq,fendoudeqingchunhh/gitlabhq,daiyu/gitlab-zh,jrjang/gitlab-ce,hzy001/gitlabhq,jirutka/gitlabhq,mrb/gitlabhq,screenpages/gitlabhq,gopeter/gitlabhq,allistera/gitlabhq,koreamic/gitlabhq,rhels/gitlabhq,iiet/iiet-git,flashbuckets/gitlabhq,yuyue2013/ss,LytayTOUCH/gitlabhq,sideci-sample/sideci-sample-gitlabhq,ikappas/gitlabhq,wangcan2014/gitlabhq,stanhu/gitlabhq,wangcan2014/gitlabhq,eliasp/gitlabhq,copystudy/gitlabhq,manfer/gitlabhq,zBMNForks/gitlabhq,theodi/gitlabhq,bbodenmiller/gitlabhq,mrb/gitlabhq,theodi/gitlabhq,duduribeiro/gitlabhq,dvrylc/gitlabhq,sekcheong/gitlabhq,fearenales/gitlabhq,zrbsprite/gitlabhq,Soullivaneuh/gitlabhq,martijnvermaat/gitlabhq,liyakun/gitlabhq,k4zzk/gitlabhq,salipro4ever/gitlabhq,martijnvermaat/gitlabhq,nmav/gitlabhq,openwide-java/gitlabhq,Datacom/gitlabhq,mathstuf/gitlabhq,bbodenmiller/gitlabhq,H3Chief/gitlabhq,LUMC/gitlabhq,mrb/gitlabhq,mente/gitlabhq,dukex/gitlabhq,whluwit/gitlabhq,hacsoc/gitlabhq,Telekom-PD/gitlabhq,yatish27/gitlabhq,vjustov/gitlabhq,H3Chief/gitlabhq,fearenales/gitlabhq,NKMR6194/gitlabhq,Datacom/gitlabhq,tk23/gitlabhq,ibiart/gitlabhq,gopeter/gitlabhq,Soullivaneuh/gitlabhq,DanielZhangQingLong/gitlabhq,fantasywind/gitlabhq,rhels/gitlabhq,it33/gitlabhq,jrjang/gitlabhq,jirutka/gitlabhq,dreampet/gitlab,mathstuf/gitlabhq,aaronsnyder/gitlabhq,screenpages/gitlabhq,icedwater/gitlabhq,ngpestelos/gitlabhq,folpindo/gitlabhq,michaKFromParis/gitlabhq,jvanbaarsen/gitlabhq,williamherry/gitlabhq
haml
## Code Before: .zennable %input#zen-toggle-comment.zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } .zen-backdrop - classes << ' js-gfm-input markdown-area' = f.text_area attr, class: classes, placeholder: 'Leave a comment' = link_to nil, class: 'zen-enter-link' do %i.fa.fa-expand Edit in fullscreen = link_to nil, class: 'zen-leave-link' do %i.fa.fa-compress ## Instruction: Fix tabindex for comment form ## Code After: .zennable %input#zen-toggle-comment.zen-toggle-comment{ tabindex: '-1', type: 'checkbox' } .zen-backdrop - classes << ' js-gfm-input markdown-area' = f.text_area attr, class: classes, placeholder: 'Leave a comment' = link_to nil, class: 'zen-enter-link', tabindex: '-1' do %i.fa.fa-expand Edit in fullscreen = link_to nil, class: 'zen-leave-link' do %i.fa.fa-compress
d1d14186e2c09816bdba6dc4b8877b90cb4bf457
app/controllers/lists_controller.rb
app/controllers/lists_controller.rb
class ListsController < ApplicationController before_action :find_list, only: [:show, :edit, :update, :destroy] respond_to :json, :html def index find_user @lists = @user.lists respond_with(@lists) end def show respond_with({list: @list, dramas: @list.dramas}) end def new @list = List.new end def create @list = List.new(list_params) @list.user = current_user if @list.save redirect_to user_path(current_user), notice: "Added #{@list.name}" else render :new end end def edit end def update if @list.user == current_user && @list.update_attributes(list_params) redirect_to user_path(current_user), notice: "Updated #{@list.name}" else render :edit end end def destroy if @list.user == current_user @list.destroy redirect_to user_path(current_user), notice: "Deleted #{@list.name}" end end private def find_user @user = User.find(params[:user_id]) end def find_list find_user @list = @user.lists.find(params[:id]) end def list_params params.require(:list).permit(:name, :description) end end
class ListsController < ApplicationController before_action :find_list, only: [:show, :edit, :update, :destroy] respond_to :json, :html def index find_user @lists = @user.lists respond_with(@lists) end def show @dramas = @list.dramas.map { |drama| drama.add_image_url } respond_with({list: @list, dramas: @dramas}) end def new @list = List.new end def create @list = List.new(list_params) @list.user = current_user if @list.save redirect_to user_path(current_user), notice: "Added #{@list.name}" else render :new end end def edit end def update if @list.user == current_user && @list.update_attributes(list_params) redirect_to user_path(current_user), notice: "Updated #{@list.name}" else render :edit end end def destroy if @list.user == current_user @list.destroy redirect_to user_path(current_user), notice: "Deleted #{@list.name}" end end private def find_user @user = User.find(params[:user_id]) end def find_list find_user @list = @user.lists.find(params[:id]) end def list_params params.require(:list).permit(:name, :description) end end
Add image url to dramas in lists
Add image url to dramas in lists
Ruby
mit
ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead
ruby
## Code Before: class ListsController < ApplicationController before_action :find_list, only: [:show, :edit, :update, :destroy] respond_to :json, :html def index find_user @lists = @user.lists respond_with(@lists) end def show respond_with({list: @list, dramas: @list.dramas}) end def new @list = List.new end def create @list = List.new(list_params) @list.user = current_user if @list.save redirect_to user_path(current_user), notice: "Added #{@list.name}" else render :new end end def edit end def update if @list.user == current_user && @list.update_attributes(list_params) redirect_to user_path(current_user), notice: "Updated #{@list.name}" else render :edit end end def destroy if @list.user == current_user @list.destroy redirect_to user_path(current_user), notice: "Deleted #{@list.name}" end end private def find_user @user = User.find(params[:user_id]) end def find_list find_user @list = @user.lists.find(params[:id]) end def list_params params.require(:list).permit(:name, :description) end end ## Instruction: Add image url to dramas in lists ## Code After: class ListsController < ApplicationController before_action :find_list, only: [:show, :edit, :update, :destroy] respond_to :json, :html def index find_user @lists = @user.lists respond_with(@lists) end def show @dramas = @list.dramas.map { |drama| drama.add_image_url } respond_with({list: @list, dramas: @dramas}) end def new @list = List.new end def create @list = List.new(list_params) @list.user = current_user if @list.save redirect_to user_path(current_user), notice: "Added #{@list.name}" else render :new end end def edit end def update if @list.user == current_user && @list.update_attributes(list_params) redirect_to user_path(current_user), notice: "Updated #{@list.name}" else render :edit end end def destroy if @list.user == current_user @list.destroy redirect_to user_path(current_user), notice: "Deleted #{@list.name}" end end private def find_user @user = User.find(params[:user_id]) end def find_list find_user @list = @user.lists.find(params[:id]) end def list_params params.require(:list).permit(:name, :description) end end
91f402afa297eafff40b12f8ed2ed2a0e561347b
src/tests/TestUpdaterOptions.cpp
src/tests/TestUpdaterOptions.cpp
void TestUpdaterOptions::testOldFormatArgs() { const int argc = 6; char* argv[argc]; argv[0] = "updater"; argv[1] = "CurrentDir=/path/to/app"; argv[2] = "TempDir=/tmp/updater"; argv[3] = "UpdateScriptFileName=/tmp/updater/file_list.xml"; argv[4] = "AppFileName=/path/to/app/theapp"; argv[5] = "PID=123456"; UpdaterOptions options; options.parse(argc,argv); TEST_COMPARE(options.mode,UpdateInstaller::Setup); TEST_COMPARE(options.installDir,"/path/to/app"); TEST_COMPARE(options.packageDir,"/tmp/updater"); TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml"); TEST_COMPARE(options.waitPid,123456); } int main(int,char**) { TestList<TestUpdaterOptions> tests; tests.addTest(&TestUpdaterOptions::testOldFormatArgs); return TestUtils::runTest(tests); }
void TestUpdaterOptions::testOldFormatArgs() { const int argc = 6; char* argv[argc]; argv[0] = strdup("updater"); argv[1] = strdup("CurrentDir=/path/to/app"); argv[2] = strdup("TempDir=/tmp/updater"); argv[3] = strdup("UpdateScriptFileName=/tmp/updater/file_list.xml"); argv[4] = strdup("AppFileName=/path/to/app/theapp"); argv[5] = strdup("PID=123456"); UpdaterOptions options; options.parse(argc,argv); TEST_COMPARE(options.mode,UpdateInstaller::Setup); TEST_COMPARE(options.installDir,"/path/to/app"); TEST_COMPARE(options.packageDir,"/tmp/updater"); TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml"); TEST_COMPARE(options.waitPid,123456); for (int i=0; i < argc; i++) { free(argv[i]); } } int main(int,char**) { TestList<TestUpdaterOptions> tests; tests.addTest(&TestUpdaterOptions::testOldFormatArgs); return TestUtils::runTest(tests); }
Fix warnings about conversion from string literal to char*
Fix warnings about conversion from string literal to char* UpdaterOptions::parse() will probably not have a need to modify its arguments but for consistency with the declaration of main() it takes a char*, so strdup() the strings.
C++
bsd-2-clause
zhengw1985/Update-Installer,zhengw1985/Update-Installer,zhengw1985/Update-Installer
c++
## Code Before: void TestUpdaterOptions::testOldFormatArgs() { const int argc = 6; char* argv[argc]; argv[0] = "updater"; argv[1] = "CurrentDir=/path/to/app"; argv[2] = "TempDir=/tmp/updater"; argv[3] = "UpdateScriptFileName=/tmp/updater/file_list.xml"; argv[4] = "AppFileName=/path/to/app/theapp"; argv[5] = "PID=123456"; UpdaterOptions options; options.parse(argc,argv); TEST_COMPARE(options.mode,UpdateInstaller::Setup); TEST_COMPARE(options.installDir,"/path/to/app"); TEST_COMPARE(options.packageDir,"/tmp/updater"); TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml"); TEST_COMPARE(options.waitPid,123456); } int main(int,char**) { TestList<TestUpdaterOptions> tests; tests.addTest(&TestUpdaterOptions::testOldFormatArgs); return TestUtils::runTest(tests); } ## Instruction: Fix warnings about conversion from string literal to char* UpdaterOptions::parse() will probably not have a need to modify its arguments but for consistency with the declaration of main() it takes a char*, so strdup() the strings. ## Code After: void TestUpdaterOptions::testOldFormatArgs() { const int argc = 6; char* argv[argc]; argv[0] = strdup("updater"); argv[1] = strdup("CurrentDir=/path/to/app"); argv[2] = strdup("TempDir=/tmp/updater"); argv[3] = strdup("UpdateScriptFileName=/tmp/updater/file_list.xml"); argv[4] = strdup("AppFileName=/path/to/app/theapp"); argv[5] = strdup("PID=123456"); UpdaterOptions options; options.parse(argc,argv); TEST_COMPARE(options.mode,UpdateInstaller::Setup); TEST_COMPARE(options.installDir,"/path/to/app"); TEST_COMPARE(options.packageDir,"/tmp/updater"); TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml"); TEST_COMPARE(options.waitPid,123456); for (int i=0; i < argc; i++) { free(argv[i]); } } int main(int,char**) { TestList<TestUpdaterOptions> tests; tests.addTest(&TestUpdaterOptions::testOldFormatArgs); return TestUtils::runTest(tests); }
f7ee72a374b91603673b5f612585c9183f118185
src/Bakery.Events.AspNetCore/project.json
src/Bakery.Events.AspNetCore/project.json
{ "dependencies": { "Bakery.Events": "0.12", "Microsoft.AspNetCore.Http.Abstractions": "1.1.0", "NETStandard.Library": "1.6.1" }, "frameworks": { "netstandard1.5": { "imports": "dnxcore50" } }, "version": "0.12" }
{ "dependencies": { "Bakery.Events": "0.12", "Microsoft.AspNetCore.Http.Abstractions": "1.1.0", "Microsoft.AspNetCore.Mvc.Core": "1.1.0", "NETStandard.Library": "1.6.1" }, "frameworks": { "netstandard1.6": { "imports": "dnxcore50" } }, "version": "0.12" }
Make Bakery.Events.AspNetCore netstandard1.6, as required by ASP.NET Core MVC; add the ASP.NET Core MVC dependency (needed for a helper method that uses StatusCodeResult).
Make Bakery.Events.AspNetCore netstandard1.6, as required by ASP.NET Core MVC; add the ASP.NET Core MVC dependency (needed for a helper method that uses StatusCodeResult).
JSON
mit
brendanjbaker/Bakery
json
## Code Before: { "dependencies": { "Bakery.Events": "0.12", "Microsoft.AspNetCore.Http.Abstractions": "1.1.0", "NETStandard.Library": "1.6.1" }, "frameworks": { "netstandard1.5": { "imports": "dnxcore50" } }, "version": "0.12" } ## Instruction: Make Bakery.Events.AspNetCore netstandard1.6, as required by ASP.NET Core MVC; add the ASP.NET Core MVC dependency (needed for a helper method that uses StatusCodeResult). ## Code After: { "dependencies": { "Bakery.Events": "0.12", "Microsoft.AspNetCore.Http.Abstractions": "1.1.0", "Microsoft.AspNetCore.Mvc.Core": "1.1.0", "NETStandard.Library": "1.6.1" }, "frameworks": { "netstandard1.6": { "imports": "dnxcore50" } }, "version": "0.12" }
5e2f958c82b49fdfa48f1f0d80faba7ed8736dc5
app/index.jade
app/index.jade
doctype html html(lang="en", manifest="app.manifest") head meta(charset="utf-8") meta(name="viewport", content="width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui") title readfwd.com body p Hello, world! // build:js({.tmp,dist}) js/main.js script(src="js/main.js") // endbuild
doctype html html(lang="en", manifest="app.manifest") head meta(charset="utf-8") meta(name="fragment", content="!") meta(name="viewport", content="width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui") title readfwd.com body p Hello, world! // build:js({.tmp,dist}) js/main.js script(src="js/main.js") // endbuild
Add meta fragment tag for SPA SEO.
Add meta fragment tag for SPA SEO.
Jade
mpl-2.0
learnfwd/learnfwd.com,learnfwd/learnfwd.com,learnfwd/learnfwd.com
jade
## Code Before: doctype html html(lang="en", manifest="app.manifest") head meta(charset="utf-8") meta(name="viewport", content="width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui") title readfwd.com body p Hello, world! // build:js({.tmp,dist}) js/main.js script(src="js/main.js") // endbuild ## Instruction: Add meta fragment tag for SPA SEO. ## Code After: doctype html html(lang="en", manifest="app.manifest") head meta(charset="utf-8") meta(name="fragment", content="!") meta(name="viewport", content="width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui") title readfwd.com body p Hello, world! // build:js({.tmp,dist}) js/main.js script(src="js/main.js") // endbuild
5c8d9c76429823d0d5dcb0013de1f9e89d9870cc
app/Transformers/RecordTransformer.php
app/Transformers/RecordTransformer.php
<?php namespace Transformers; class RecordTransformer extends Transformer { /** * transform record * * @param array $record * @return array */ public function transform($record) { return [ 'release_id' => $record->release_id, 'title' => $record->basic_information->title, 'artist' => $record->basic_information->artists[0]->name, 'year' => $record->basic_information->year, 'thumb' => $record->basic_information->thumb ]; } /** * release transformer * * @param array $release * @return array */ public function transformRelease($release) { $tracklist = []; foreach ($release['tracklist'] as $key => $track) { $tracklist[] = $track->title; } return [ 'title' => $release['title'], 'artist' => $release['artists'][0]->name, 'title' => $release['artists'][0]->name . ' - ' . $release['title'], 'year' => $release['year'], 'label' => $release['labels'][0]->name, 'released' => $release['released'], 'spotify' => $release['spotify'], 'notes' => $release['notes'], 'image' => $release['images'][0]->uri, 'tracklist' => $tracklist, ]; } }
<?php namespace Transformers; class RecordTransformer extends Transformer { /** * transform record * * @param array $record * @return array */ public function transform($record) { return [ 'release_id' => $record->release_id, 'title' => $record->basic_information->title, 'artist' => $record->basic_information->artists[0]->name, 'year' => $record->basic_information->year, 'thumb' => $record->basic_information->thumb ]; } /** * release transformer * * @param array $release * @return array */ public function transformRelease($release) { $tracklist = []; foreach ($release['tracklist'] as $key => $track) { $tracklist[] = $track->title; } return [ 'title' => $release['title'], 'artist' => $release['artists'][0]->name, 'title' => $release['artists'][0]->name . ' - ' . $release['title'], 'year' => $release['year'], 'label' => $release['labels'][0]->name, 'released' => $release['released'], 'spotify' => $release['spotify'], 'notes' => isset($release['notes']) ? $release['notes'] : false, 'image' => $release['images'][0]->uri, 'tracklist' => $tracklist, ]; } }
Fix releases breaking if there were no notes
Fix releases breaking if there were no notes
PHP
mit
lukasjuhas/api.itsluk.as,lukasjuhas/api.itsluk.as
php
## Code Before: <?php namespace Transformers; class RecordTransformer extends Transformer { /** * transform record * * @param array $record * @return array */ public function transform($record) { return [ 'release_id' => $record->release_id, 'title' => $record->basic_information->title, 'artist' => $record->basic_information->artists[0]->name, 'year' => $record->basic_information->year, 'thumb' => $record->basic_information->thumb ]; } /** * release transformer * * @param array $release * @return array */ public function transformRelease($release) { $tracklist = []; foreach ($release['tracklist'] as $key => $track) { $tracklist[] = $track->title; } return [ 'title' => $release['title'], 'artist' => $release['artists'][0]->name, 'title' => $release['artists'][0]->name . ' - ' . $release['title'], 'year' => $release['year'], 'label' => $release['labels'][0]->name, 'released' => $release['released'], 'spotify' => $release['spotify'], 'notes' => $release['notes'], 'image' => $release['images'][0]->uri, 'tracklist' => $tracklist, ]; } } ## Instruction: Fix releases breaking if there were no notes ## Code After: <?php namespace Transformers; class RecordTransformer extends Transformer { /** * transform record * * @param array $record * @return array */ public function transform($record) { return [ 'release_id' => $record->release_id, 'title' => $record->basic_information->title, 'artist' => $record->basic_information->artists[0]->name, 'year' => $record->basic_information->year, 'thumb' => $record->basic_information->thumb ]; } /** * release transformer * * @param array $release * @return array */ public function transformRelease($release) { $tracklist = []; foreach ($release['tracklist'] as $key => $track) { $tracklist[] = $track->title; } return [ 'title' => $release['title'], 'artist' => $release['artists'][0]->name, 'title' => $release['artists'][0]->name . ' - ' . $release['title'], 'year' => $release['year'], 'label' => $release['labels'][0]->name, 'released' => $release['released'], 'spotify' => $release['spotify'], 'notes' => isset($release['notes']) ? $release['notes'] : false, 'image' => $release['images'][0]->uri, 'tracklist' => $tracklist, ]; } }
c16517fffdebf31fafc5eb04696abac72370b843
src/main/java/com/codeup/hibernate/repositories/MoviesRepository.java
src/main/java/com/codeup/hibernate/repositories/MoviesRepository.java
/** * This source file is subject to the license that is bundled with this package in the file LICENSE. */ package com.codeup.hibernate.repositories; import com.codeup.movies.Movie; import com.codeup.movies.Movies; import org.hibernate.Session; import org.hibernate.query.Query; import java.util.List; public class MoviesRepository implements Movies { private final Session session; public MoviesRepository(Session session) { this.session = session; } public void add(Movie movie) { session.beginTransaction(); session.save(movie); session.getTransaction().commit(); } public Movie with(int id) { Query query = session.createQuery("FROM Movie WHERE id = ?"); query.setParameter(0, id); return (Movie) query.uniqueResult(); } @Override public List<Movie> withTitleSimilarTo(String title) { Query query = session.createQuery("FROM Movie WHERE title LIKE ?"); query.setParameter(0, title); @SuppressWarnings("unchecked") List movies = query.getResultList(); return movies; } }
/** * This source file is subject to the license that is bundled with this package in the file LICENSE. */ package com.codeup.hibernate.repositories; import com.codeup.movies.Movie; import com.codeup.movies.Movies; import org.hibernate.Session; import org.hibernate.query.Query; import java.util.List; public class MoviesRepository implements Movies { private final Session session; public MoviesRepository(Session session) { this.session = session; } public void add(Movie movie) { session.beginTransaction(); session.save(movie); session.getTransaction().commit(); } public Movie with(int id) { Query query = session.createQuery("FROM Movie WHERE id = ?"); query.setParameter(0, id); return (Movie) query.uniqueResult(); } @Override public List<Movie> withTitleSimilarTo(String title) { Query query = session.createQuery("FROM Movie WHERE title LIKE ?"); query.setParameter(0, "%" + title + "%"); @SuppressWarnings("unchecked") List movies = query.getResultList(); return movies; } }
Fix error in query parameter.
Fix error in query parameter.
Java
mit
MontealegreLuis/hibernate-example
java
## Code Before: /** * This source file is subject to the license that is bundled with this package in the file LICENSE. */ package com.codeup.hibernate.repositories; import com.codeup.movies.Movie; import com.codeup.movies.Movies; import org.hibernate.Session; import org.hibernate.query.Query; import java.util.List; public class MoviesRepository implements Movies { private final Session session; public MoviesRepository(Session session) { this.session = session; } public void add(Movie movie) { session.beginTransaction(); session.save(movie); session.getTransaction().commit(); } public Movie with(int id) { Query query = session.createQuery("FROM Movie WHERE id = ?"); query.setParameter(0, id); return (Movie) query.uniqueResult(); } @Override public List<Movie> withTitleSimilarTo(String title) { Query query = session.createQuery("FROM Movie WHERE title LIKE ?"); query.setParameter(0, title); @SuppressWarnings("unchecked") List movies = query.getResultList(); return movies; } } ## Instruction: Fix error in query parameter. ## Code After: /** * This source file is subject to the license that is bundled with this package in the file LICENSE. */ package com.codeup.hibernate.repositories; import com.codeup.movies.Movie; import com.codeup.movies.Movies; import org.hibernate.Session; import org.hibernate.query.Query; import java.util.List; public class MoviesRepository implements Movies { private final Session session; public MoviesRepository(Session session) { this.session = session; } public void add(Movie movie) { session.beginTransaction(); session.save(movie); session.getTransaction().commit(); } public Movie with(int id) { Query query = session.createQuery("FROM Movie WHERE id = ?"); query.setParameter(0, id); return (Movie) query.uniqueResult(); } @Override public List<Movie> withTitleSimilarTo(String title) { Query query = session.createQuery("FROM Movie WHERE title LIKE ?"); query.setParameter(0, "%" + title + "%"); @SuppressWarnings("unchecked") List movies = query.getResultList(); return movies; } }
a2215e904b8997a4bade3f4924c7cd68883b04cd
pkgs/applications/editors/emacs/elisp-packages/yes-no/default.nix
pkgs/applications/editors/emacs/elisp-packages/yes-no/default.nix
{ lib, stdenv, fetchurl }: stdenv.mkDerivation { name = "yes-no"; src = fetchurl { url = "https://github.com/emacsmirror/emacswiki.org/blob/185fdc34fb1e02b43759ad933d3ee5646b0e78f8/yes-no.el"; sha256 = "1k0nn619i82jiqm48k5nk6b8cv2rggh0i5075nhc85a2s9pwhx32"; }; dontUnpack = true; installPhase = '' install -d $out/share/emacs/site-lisp install $src $out/share/emacs/site-lisp/yes-no.el ''; meta = with lib; { description = "Specify use of `y-or-n-p' or `yes-or-no-p' on a case-by-case basis"; homepage = "https://www.emacswiki.org/emacs/yes-no.el"; license = licenses.gpl3Plus; maintainers = with maintainers; [ jcs090218 ]; platforms = platforms.all; }; }
{ lib, fetchurl, trivialBuild }: trivialBuild { pname = "yes-no"; version = "0"; src = fetchurl { url = "https://github.com/emacsmirror/emacswiki.org/blob/185fdc34fb1e02b43759ad933d3ee5646b0e78f8/yes-no.el"; sha256 = "1k0nn619i82jiqm48k5nk6b8cv2rggh0i5075nhc85a2s9pwhx32"; }; dontUnpack = true; installPhase = '' install -d $out/share/emacs/site-lisp install $src $out/share/emacs/site-lisp/yes-no.el ''; meta = with lib; { description = "Specify use of `y-or-n-p' or `yes-or-no-p' on a case-by-case basis"; homepage = "https://www.emacswiki.org/emacs/yes-no.el"; license = licenses.gpl3Plus; maintainers = with maintainers; [ jcs090218 ]; platforms = platforms.all; }; }
Use trivialPackage instead of stdenv.mkDerivation
emacsPackages.yes-no: Use trivialPackage instead of stdenv.mkDerivation
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs
nix
## Code Before: { lib, stdenv, fetchurl }: stdenv.mkDerivation { name = "yes-no"; src = fetchurl { url = "https://github.com/emacsmirror/emacswiki.org/blob/185fdc34fb1e02b43759ad933d3ee5646b0e78f8/yes-no.el"; sha256 = "1k0nn619i82jiqm48k5nk6b8cv2rggh0i5075nhc85a2s9pwhx32"; }; dontUnpack = true; installPhase = '' install -d $out/share/emacs/site-lisp install $src $out/share/emacs/site-lisp/yes-no.el ''; meta = with lib; { description = "Specify use of `y-or-n-p' or `yes-or-no-p' on a case-by-case basis"; homepage = "https://www.emacswiki.org/emacs/yes-no.el"; license = licenses.gpl3Plus; maintainers = with maintainers; [ jcs090218 ]; platforms = platforms.all; }; } ## Instruction: emacsPackages.yes-no: Use trivialPackage instead of stdenv.mkDerivation ## Code After: { lib, fetchurl, trivialBuild }: trivialBuild { pname = "yes-no"; version = "0"; src = fetchurl { url = "https://github.com/emacsmirror/emacswiki.org/blob/185fdc34fb1e02b43759ad933d3ee5646b0e78f8/yes-no.el"; sha256 = "1k0nn619i82jiqm48k5nk6b8cv2rggh0i5075nhc85a2s9pwhx32"; }; dontUnpack = true; installPhase = '' install -d $out/share/emacs/site-lisp install $src $out/share/emacs/site-lisp/yes-no.el ''; meta = with lib; { description = "Specify use of `y-or-n-p' or `yes-or-no-p' on a case-by-case basis"; homepage = "https://www.emacswiki.org/emacs/yes-no.el"; license = licenses.gpl3Plus; maintainers = with maintainers; [ jcs090218 ]; platforms = platforms.all; }; }
56ecad6907dea785ebffba414dfe3ff586e5f2e0
src/shutdown/hpr_wall.c
src/shutdown/hpr_wall.c
/* ISC license. */ #include <string.h> #include <utmpx.h> #include <skalibs/posixishard.h> #include <skalibs/allreadwrite.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; }
/* ISC license. */ #include <string.h> #include <utmpx.h> #include <skalibs/allreadwrite.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> #include <skalibs/posixishard.h> #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; }
Include posixishard as late as possible
Include posixishard as late as possible
C
isc
skarnet/s6-linux-init,skarnet/s6-linux-init
c
## Code Before: /* ISC license. */ #include <string.h> #include <utmpx.h> #include <skalibs/posixishard.h> #include <skalibs/allreadwrite.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; } ## Instruction: Include posixishard as late as possible ## Code After: /* ISC license. */ #include <string.h> #include <utmpx.h> #include <skalibs/allreadwrite.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> #include <skalibs/posixishard.h> #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; }
1cdd76d4a6c5d10fb50c62a31353ced143dbbaf9
trunk/org.mwc.asset.help/html/schemaDoc.xml
trunk/org.mwc.asset.help/html/schemaDoc.xml
<?xml version="1.0" encoding="UTF-8"?> <toc label="ASSET Model Reference" topic="../org.mwc.asset.core/asset_schemas/doc/schema.html"> <topic href="../org.mwc.asset.core/asset_schemas/doc/schema1.html" label="Scenario"> </topic> <topic href="../org.mwc.asset.core/asset_schemas/doc/schema20.html#id80" label="Participant"> </topic> </toc>
<?xml version="1.0" encoding="UTF-8"?> <toc label="ASSET Model Reference" topic="../org.mwc.asset.core/asset_schemas/doc/schema.html"> <topic href="../org.mwc.asset.core/asset_schemas/doc/schema.html" label="Scenario"> </topic> </toc>
Correct links to Oxygen-generated content
Correct links to Oxygen-generated content git-svn-id: d2601f1668e3cd2de409f5c059006a6eeada0abf@2741 cb33b658-6c9e-41a7-9690-cba343611204
XML
epl-1.0
pecko/debrief,theanuradha/debrief,debrief/debrief,alastrina123/debrief,pecko/debrief,theanuradha/debrief,pecko/debrief,pecko/debrief,pecko/debrief,theanuradha/debrief,alastrina123/debrief,alastrina123/debrief,alastrina123/debrief,debrief/debrief,debrief/debrief,pecko/debrief,theanuradha/debrief,debrief/debrief,debrief/debrief,theanuradha/debrief,theanuradha/debrief,pecko/debrief,theanuradha/debrief,alastrina123/debrief,debrief/debrief,alastrina123/debrief,alastrina123/debrief
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <toc label="ASSET Model Reference" topic="../org.mwc.asset.core/asset_schemas/doc/schema.html"> <topic href="../org.mwc.asset.core/asset_schemas/doc/schema1.html" label="Scenario"> </topic> <topic href="../org.mwc.asset.core/asset_schemas/doc/schema20.html#id80" label="Participant"> </topic> </toc> ## Instruction: Correct links to Oxygen-generated content git-svn-id: d2601f1668e3cd2de409f5c059006a6eeada0abf@2741 cb33b658-6c9e-41a7-9690-cba343611204 ## Code After: <?xml version="1.0" encoding="UTF-8"?> <toc label="ASSET Model Reference" topic="../org.mwc.asset.core/asset_schemas/doc/schema.html"> <topic href="../org.mwc.asset.core/asset_schemas/doc/schema.html" label="Scenario"> </topic> </toc>
33ea27f49b45106390aa9b842bc3e180f1d9dd20
.travis.yml
.travis.yml
sudo: required dist: trusty language: python env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py34 - TOXENV=py35 - TOXENV=py36 - TOXENV=py37 install: - scripts/travis.sh - make install - pip-accel install coveralls tox - pip-accel install -r requirements-checks.txt script: - make check - make tox after_success: - coveralls branches: except: - /^[0-9]/
sudo: required dist: trusty language: python matrix: include: - env: TOXENV=py26 - env: TOXENV=py27 - env: TOXENV=py34 - env: TOXENV=py35 - env: TOXENV=py36 - env: TOXENV=py37 dist: xenial install: - scripts/travis.sh - make install - pip-accel install coveralls tox - pip-accel install -r requirements-checks.txt script: - make check - make tox after_success: - coveralls branches: except: - /^[0-9]/
Configure Travis CI to test Python 3.7 on Ubuntu 16.04
Configure Travis CI to test Python 3.7 on Ubuntu 16.04 This is a follow-up to this build failure: https://travis-ci.org/paylogic/py2deb/builds/456412859 Pip complains that Python was built without ssl support and apparently this is because Python 3.7 is incompatible with the ssl version on Ubuntu 14.04 (still the default on Travis CI). Switching to xenial has solved this for me in other projects (deb-pkg-tools, executor, humanfriendly) so I'm hoping it will work the same here 😇.
YAML
mit
paylogic/py2deb,paylogic/py2deb
yaml
## Code Before: sudo: required dist: trusty language: python env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py34 - TOXENV=py35 - TOXENV=py36 - TOXENV=py37 install: - scripts/travis.sh - make install - pip-accel install coveralls tox - pip-accel install -r requirements-checks.txt script: - make check - make tox after_success: - coveralls branches: except: - /^[0-9]/ ## Instruction: Configure Travis CI to test Python 3.7 on Ubuntu 16.04 This is a follow-up to this build failure: https://travis-ci.org/paylogic/py2deb/builds/456412859 Pip complains that Python was built without ssl support and apparently this is because Python 3.7 is incompatible with the ssl version on Ubuntu 14.04 (still the default on Travis CI). Switching to xenial has solved this for me in other projects (deb-pkg-tools, executor, humanfriendly) so I'm hoping it will work the same here 😇. ## Code After: sudo: required dist: trusty language: python matrix: include: - env: TOXENV=py26 - env: TOXENV=py27 - env: TOXENV=py34 - env: TOXENV=py35 - env: TOXENV=py36 - env: TOXENV=py37 dist: xenial install: - scripts/travis.sh - make install - pip-accel install coveralls tox - pip-accel install -r requirements-checks.txt script: - make check - make tox after_success: - coveralls branches: except: - /^[0-9]/
9a77c1233146a96b72340bffdf8791200e2a9ade
lib/current_scopes.rb
lib/current_scopes.rb
module CurrentScopes def self.included(base) base.helper_method :current_user, :current_course, :current_student end def current_course return unless current_user @__current_course ||= current_user.courses.find_by(id: session[:course_id]) if session[:course_id] @__current_course ||= current_user.default_course end def current_user_is_staff? return unless current_user && current_course current_user.is_staff?(current_course) end def current_user_is_admin? return unless current_user && current_course current_user.is_admin?(current_course) end def current_user_is_gsi? return unless current_user && current_course current_user.is_gsi?(current_course) end def current_user_is_student? return unless current_user && current_course current_user.is_student?(current_course) end def current_user_is_professor? return unless current_user && current_course current_user.is_professor?(current_course) end def current_student if current_user_is_staff? @__current_student ||= (current_course.students.find_by(id: params[:student_id]) if params[:student_id]) else @__current_student ||= current_user end end def current_role return unless current_user && current_course @__current_role ||= current_user.role(current_course) end def current_student=(student) @__current_student = student end end
module CurrentScopes def self.included(base) base.helper_method :current_user, :current_course, :current_student end def current_course return unless current_user @__current_course ||= CourseRouter.current_course_for(current_user, session[:course_id]) end def current_user_is_staff? return unless current_user && current_course current_user.is_staff?(current_course) end def current_user_is_admin? return unless current_user && current_course current_user.is_admin?(current_course) end def current_user_is_gsi? return unless current_user && current_course current_user.is_gsi?(current_course) end def current_user_is_student? return unless current_user && current_course current_user.is_student?(current_course) end def current_user_is_professor? return unless current_user && current_course current_user.is_professor?(current_course) end def current_student if current_user_is_staff? @__current_student ||= (current_course.students.find_by(id: params[:student_id]) if params[:student_id]) else @__current_student ||= current_user end end def current_role return unless current_user && current_course @__current_role ||= current_user.role(current_course) end def current_student=(student) @__current_student = student end end
Use the CourseRouter to retrieve the current course
Use the CourseRouter to retrieve the current course
Ruby
agpl-3.0
UM-USElab/gradecraft-development,UM-USElab/gradecraft-development,UM-USElab/gradecraft-development,UM-USElab/gradecraft-development,mkoon/gradecraft-development,mkoon/gradecraft-development,mkoon/gradecraft-development
ruby
## Code Before: module CurrentScopes def self.included(base) base.helper_method :current_user, :current_course, :current_student end def current_course return unless current_user @__current_course ||= current_user.courses.find_by(id: session[:course_id]) if session[:course_id] @__current_course ||= current_user.default_course end def current_user_is_staff? return unless current_user && current_course current_user.is_staff?(current_course) end def current_user_is_admin? return unless current_user && current_course current_user.is_admin?(current_course) end def current_user_is_gsi? return unless current_user && current_course current_user.is_gsi?(current_course) end def current_user_is_student? return unless current_user && current_course current_user.is_student?(current_course) end def current_user_is_professor? return unless current_user && current_course current_user.is_professor?(current_course) end def current_student if current_user_is_staff? @__current_student ||= (current_course.students.find_by(id: params[:student_id]) if params[:student_id]) else @__current_student ||= current_user end end def current_role return unless current_user && current_course @__current_role ||= current_user.role(current_course) end def current_student=(student) @__current_student = student end end ## Instruction: Use the CourseRouter to retrieve the current course ## Code After: module CurrentScopes def self.included(base) base.helper_method :current_user, :current_course, :current_student end def current_course return unless current_user @__current_course ||= CourseRouter.current_course_for(current_user, session[:course_id]) end def current_user_is_staff? return unless current_user && current_course current_user.is_staff?(current_course) end def current_user_is_admin? return unless current_user && current_course current_user.is_admin?(current_course) end def current_user_is_gsi? return unless current_user && current_course current_user.is_gsi?(current_course) end def current_user_is_student? return unless current_user && current_course current_user.is_student?(current_course) end def current_user_is_professor? return unless current_user && current_course current_user.is_professor?(current_course) end def current_student if current_user_is_staff? @__current_student ||= (current_course.students.find_by(id: params[:student_id]) if params[:student_id]) else @__current_student ||= current_user end end def current_role return unless current_user && current_course @__current_role ||= current_user.role(current_course) end def current_student=(student) @__current_student = student end end
ca43ddf2e17f4ca3b6441b707d2f09a1a415cee8
db/pubsub.sql
db/pubsub.sql
create table entities ( id serial primary key, jid text not null unique ); create table nodes ( id serial primary key, node text not null unique, persistent boolean not null default true, deliver_payload boolean not null default true ); create table affiliations ( id serial primary key, entity_id integer not null references entities on delete cascade, node_id integer not null references nodes on delete cascade, affiliation text not null check (affiliation in ('outcast', 'publisher', 'owner')), unique (entity_id, node_id) ); create table subscriptions ( id serial primary key, entity_id integer not null references entities on delete cascade, resource text, node_id integer not null references nodes on delete cascade, subscription text not null default 'subscribed' check (subscription in ('subscribed', 'pending', 'unconfigured')), unique (entity_id, resource, node_id) ); create table items ( id serial primary key, node_id integer not null references nodes on delete cascade, item text not null, publisher text not null, data text, date timestamp with time zone not null default now(), unique (node_id, item) );
create table entities ( id serial primary key, jid text not null unique ); create table nodes ( id serial primary key, node text not null unique, persistent boolean not null default true, deliver_payload boolean not null default true send_last_published_item text not null default 'on_sub' check (send_last_published_item in ('never', 'on_sub')), ); create table affiliations ( id serial primary key, entity_id integer not null references entities on delete cascade, node_id integer not null references nodes on delete cascade, affiliation text not null check (affiliation in ('outcast', 'publisher', 'owner')), unique (entity_id, node_id) ); create table subscriptions ( id serial primary key, entity_id integer not null references entities on delete cascade, resource text, node_id integer not null references nodes on delete cascade, subscription text not null default 'subscribed' check (subscription in ('subscribed', 'pending', 'unconfigured')), unique (entity_id, resource, node_id) ); create table items ( id serial primary key, node_id integer not null references nodes on delete cascade, item text not null, publisher text not null, data text, date timestamp with time zone not null default now(), unique (node_id, item) );
Add send_last_published_item configuration item to nodes table definition.
Add send_last_published_item configuration item to nodes table definition. --HG-- extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40239
SQL
mit
ralphm/idavoll
sql
## Code Before: create table entities ( id serial primary key, jid text not null unique ); create table nodes ( id serial primary key, node text not null unique, persistent boolean not null default true, deliver_payload boolean not null default true ); create table affiliations ( id serial primary key, entity_id integer not null references entities on delete cascade, node_id integer not null references nodes on delete cascade, affiliation text not null check (affiliation in ('outcast', 'publisher', 'owner')), unique (entity_id, node_id) ); create table subscriptions ( id serial primary key, entity_id integer not null references entities on delete cascade, resource text, node_id integer not null references nodes on delete cascade, subscription text not null default 'subscribed' check (subscription in ('subscribed', 'pending', 'unconfigured')), unique (entity_id, resource, node_id) ); create table items ( id serial primary key, node_id integer not null references nodes on delete cascade, item text not null, publisher text not null, data text, date timestamp with time zone not null default now(), unique (node_id, item) ); ## Instruction: Add send_last_published_item configuration item to nodes table definition. --HG-- extra : convert_revision : svn%3Ae60b0d31-0b1b-0410-851a-a02d0c527677/trunk%40239 ## Code After: create table entities ( id serial primary key, jid text not null unique ); create table nodes ( id serial primary key, node text not null unique, persistent boolean not null default true, deliver_payload boolean not null default true send_last_published_item text not null default 'on_sub' check (send_last_published_item in ('never', 'on_sub')), ); create table affiliations ( id serial primary key, entity_id integer not null references entities on delete cascade, node_id integer not null references nodes on delete cascade, affiliation text not null check (affiliation in ('outcast', 'publisher', 'owner')), unique (entity_id, node_id) ); create table subscriptions ( id serial primary key, entity_id integer not null references entities on delete cascade, resource text, node_id integer not null references nodes on delete cascade, subscription text not null default 'subscribed' check (subscription in ('subscribed', 'pending', 'unconfigured')), unique (entity_id, resource, node_id) ); create table items ( id serial primary key, node_id integer not null references nodes on delete cascade, item text not null, publisher text not null, data text, date timestamp with time zone not null default now(), unique (node_id, item) );
d22a3b8d0ea0911a07ec5f8cbb2b064ecb06f4a5
pkgs/tools/text/replace/default.nix
pkgs/tools/text/replace/default.nix
{stdenv, fetchurl}: stdenv.mkDerivation { name = "replace-2.24"; src = fetchurl { url = ftp://hpux.connect.org.uk/hpux/Users/replace-2.24/replace-2.24-src-11.11.tar.gz; sha256 = "1c2nkxx83vmlh1v3ib6r2xqh121gdb1rharwsimcb2h0xwc558dm"; }; makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man"; crossAttrs = { makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man CC=${stdenv.cross.config}-gcc"; }; preInstall = "mkdir -p \$out/share/man"; postInstall = "mv \$out/bin/replace \$out/bin/replace-literal"; patches = [./malloc.patch]; meta = { homepage = http://replace.richardlloyd.org.uk/; description = "A tool to replace verbatim strings"; }; }
{stdenv, fetchurl}: stdenv.mkDerivation { name = "replace-2.24"; src = fetchurl { url = ftp://hpux.connect.org.uk/hpux/Users/replace-2.24/replace-2.24-src-11.11.tar.gz; sha256 = "1c2nkxx83vmlh1v3ib6r2xqh121gdb1rharwsimcb2h0xwc558dm"; }; makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man"; crossAttrs = { makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man CC=${stdenv.cross.config}-gcc"; }; preBuild = '' sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h ''; preInstall = "mkdir -p \$out/share/man"; postInstall = "mv \$out/bin/replace \$out/bin/replace-literal"; patches = [./malloc.patch]; meta = { homepage = http://replace.richardlloyd.org.uk/; description = "A tool to replace verbatim strings"; }; }
Fix /bin/mv reference in replace-literal
Fix /bin/mv reference in replace-literal
Nix
mit
triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs
nix
## Code Before: {stdenv, fetchurl}: stdenv.mkDerivation { name = "replace-2.24"; src = fetchurl { url = ftp://hpux.connect.org.uk/hpux/Users/replace-2.24/replace-2.24-src-11.11.tar.gz; sha256 = "1c2nkxx83vmlh1v3ib6r2xqh121gdb1rharwsimcb2h0xwc558dm"; }; makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man"; crossAttrs = { makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man CC=${stdenv.cross.config}-gcc"; }; preInstall = "mkdir -p \$out/share/man"; postInstall = "mv \$out/bin/replace \$out/bin/replace-literal"; patches = [./malloc.patch]; meta = { homepage = http://replace.richardlloyd.org.uk/; description = "A tool to replace verbatim strings"; }; } ## Instruction: Fix /bin/mv reference in replace-literal ## Code After: {stdenv, fetchurl}: stdenv.mkDerivation { name = "replace-2.24"; src = fetchurl { url = ftp://hpux.connect.org.uk/hpux/Users/replace-2.24/replace-2.24-src-11.11.tar.gz; sha256 = "1c2nkxx83vmlh1v3ib6r2xqh121gdb1rharwsimcb2h0xwc558dm"; }; makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man"; crossAttrs = { makeFlags = "TREE=\$(out) MANTREE=\$(TREE)/share/man CC=${stdenv.cross.config}-gcc"; }; preBuild = '' sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h ''; preInstall = "mkdir -p \$out/share/man"; postInstall = "mv \$out/bin/replace \$out/bin/replace-literal"; patches = [./malloc.patch]; meta = { homepage = http://replace.richardlloyd.org.uk/; description = "A tool to replace verbatim strings"; }; }
852be2bc7b0413cf7d2a54a316c35141907144e5
client/src/components/Tickets/Show/Children/Fields.vue
client/src/components/Tickets/Show/Children/Fields.vue
<!-- Copyright 2017 Mathew Robinson <mrobinson@praelatus.io>. All rights reserved. Use of this source code is governed by the AGPLv3 license that can be found in the LICENSE file. --> <template> <div class="card fields"> <h2 class="card-header" > Fields </h2> <div class="card-block" > <div v-for="field in fields"> <div class="field-name">{{ field.name }}:</div> <div class="field-value">{{ getValue(field) }}</div> </div> </div> </div> </template> <script> import dateUtils from '@/lib/dates' export default { name: 'ticket-fields', methods: { getValue: function (field) { switch (field.data_type) { case 'DATE': return dateUtils.dateFormat(field.value) default: return field.value } } }, props: { fields: { name: 'fields', default: [] } } } </script> <style> .field-value { margin-top: 0.5rem; margin-bottom: 0.5rem; } @media(min-width: 992px) { .fields { margin-top: 1rem; } } </style>
<!-- Copyright 2017 Mathew Robinson <mrobinson@praelatus.io>. All rights reserved. Use of this source code is governed by the AGPLv3 license that can be found in the LICENSE file. --> <template> <div class="card fields"> <h2 class="card-header" > Fields </h2> <div class="card-block" > <div v-for="field in fields"> <div class="field-name">{{ field.name }}:</div> <div class="field-value">{{ getValue(field) }}</div> </div> </div> </div> </template> <script> import dateUtils from '@/lib/dates' export default { name: 'ticket-fields', methods: { getValue: function (field) { switch (field.data_type) { case 'DATE': return dateUtils.dateFormat(field.value) default: return field.value ? field.value : 'None' } } }, props: { fields: { name: 'fields', default: [] } } } </script> <style> .field-value { margin-top: 0.5rem; margin-bottom: 0.5rem; } @media(min-width: 992px) { .fields { margin-top: 1rem; } } </style>
Support fields with no value
Support fields with no value
Vue
agpl-3.0
praelatus/praelatus,praelatus/praelatus,praelatus/backend,praelatus/praelatus,praelatus/backend,praelatus/backend
vue
## Code Before: <!-- Copyright 2017 Mathew Robinson <mrobinson@praelatus.io>. All rights reserved. Use of this source code is governed by the AGPLv3 license that can be found in the LICENSE file. --> <template> <div class="card fields"> <h2 class="card-header" > Fields </h2> <div class="card-block" > <div v-for="field in fields"> <div class="field-name">{{ field.name }}:</div> <div class="field-value">{{ getValue(field) }}</div> </div> </div> </div> </template> <script> import dateUtils from '@/lib/dates' export default { name: 'ticket-fields', methods: { getValue: function (field) { switch (field.data_type) { case 'DATE': return dateUtils.dateFormat(field.value) default: return field.value } } }, props: { fields: { name: 'fields', default: [] } } } </script> <style> .field-value { margin-top: 0.5rem; margin-bottom: 0.5rem; } @media(min-width: 992px) { .fields { margin-top: 1rem; } } </style> ## Instruction: Support fields with no value ## Code After: <!-- Copyright 2017 Mathew Robinson <mrobinson@praelatus.io>. All rights reserved. Use of this source code is governed by the AGPLv3 license that can be found in the LICENSE file. --> <template> <div class="card fields"> <h2 class="card-header" > Fields </h2> <div class="card-block" > <div v-for="field in fields"> <div class="field-name">{{ field.name }}:</div> <div class="field-value">{{ getValue(field) }}</div> </div> </div> </div> </template> <script> import dateUtils from '@/lib/dates' export default { name: 'ticket-fields', methods: { getValue: function (field) { switch (field.data_type) { case 'DATE': return dateUtils.dateFormat(field.value) default: return field.value ? field.value : 'None' } } }, props: { fields: { name: 'fields', default: [] } } } </script> <style> .field-value { margin-top: 0.5rem; margin-bottom: 0.5rem; } @media(min-width: 992px) { .fields { margin-top: 1rem; } } </style>
e5f929453fb141e035aeb1b867aeb06ca516409a
Resources/scripts/Clastic.js
Resources/scripts/Clastic.js
module.exports = function() { 'use strict'; global.Clastic = global.Clastic || {}; /** * @class Clastic.Clastic * @constructor */ global.Clastic.Clastic = function() {}; global.Clastic.Clastic.prototype.resolvePaths = function(paths, rootDir) { var fs = require('fs'); require(rootDir + '/src/Clastic/CoreBundle/Resources/scripts/GulpScript.js')(); var sourceDir = 'src/Clastic'; var extraScripts = []; fs.readdirSync(sourceDir).forEach(function (file) { var pathDefinitions = rootDir + '/' + sourceDir + '/' + file + '/clastic.js'; if (fs.existsSync(pathDefinitions) && !fs.statSync(pathDefinitions).isDirectory()) { extraScripts = extraScripts.concat(require(pathDefinitions)(paths)); } }); extraScripts.sort(function(a, b) { return (a.options.weight < b.options.weight) ? -1 : 1; }); extraScripts.forEach(function(script) { paths.scripts[script.type] = paths.scripts[script.type] || []; paths.scripts[script.type].push(script.src); }); return paths; }; };
module.exports = function() { 'use strict'; global.Clastic = global.Clastic || {}; /** * @class Clastic.Clastic * @constructor */ global.Clastic.Clastic = function() {}; global.Clastic.Clastic.prototype.resolvePaths = function(paths, rootDir) { var fs = require('fs'); require('./GulpScript.js')(); var extraScripts = []; fs.readdirSync(rootDir).forEach(function (file) { var pathDefinitions = rootDir + '/' + file + '/clastic.js'; if (fs.existsSync(pathDefinitions) && !fs.statSync(pathDefinitions).isDirectory()) { extraScripts = extraScripts.concat(require(pathDefinitions)(paths)); } }); extraScripts.sort(function(a, b) { return (a.options.weight < b.options.weight) ? -1 : 1; }); extraScripts.forEach(function(script) { paths.scripts[script.type] = paths.scripts[script.type] || []; paths.scripts[script.type].push(script.src); }); return paths; }; };
Make assets work for implementors.
[Core] Make assets work for implementors.
JavaScript
mit
Clastic/CoreBundle,Clastic/CoreBundle
javascript
## Code Before: module.exports = function() { 'use strict'; global.Clastic = global.Clastic || {}; /** * @class Clastic.Clastic * @constructor */ global.Clastic.Clastic = function() {}; global.Clastic.Clastic.prototype.resolvePaths = function(paths, rootDir) { var fs = require('fs'); require(rootDir + '/src/Clastic/CoreBundle/Resources/scripts/GulpScript.js')(); var sourceDir = 'src/Clastic'; var extraScripts = []; fs.readdirSync(sourceDir).forEach(function (file) { var pathDefinitions = rootDir + '/' + sourceDir + '/' + file + '/clastic.js'; if (fs.existsSync(pathDefinitions) && !fs.statSync(pathDefinitions).isDirectory()) { extraScripts = extraScripts.concat(require(pathDefinitions)(paths)); } }); extraScripts.sort(function(a, b) { return (a.options.weight < b.options.weight) ? -1 : 1; }); extraScripts.forEach(function(script) { paths.scripts[script.type] = paths.scripts[script.type] || []; paths.scripts[script.type].push(script.src); }); return paths; }; }; ## Instruction: [Core] Make assets work for implementors. ## Code After: module.exports = function() { 'use strict'; global.Clastic = global.Clastic || {}; /** * @class Clastic.Clastic * @constructor */ global.Clastic.Clastic = function() {}; global.Clastic.Clastic.prototype.resolvePaths = function(paths, rootDir) { var fs = require('fs'); require('./GulpScript.js')(); var extraScripts = []; fs.readdirSync(rootDir).forEach(function (file) { var pathDefinitions = rootDir + '/' + file + '/clastic.js'; if (fs.existsSync(pathDefinitions) && !fs.statSync(pathDefinitions).isDirectory()) { extraScripts = extraScripts.concat(require(pathDefinitions)(paths)); } }); extraScripts.sort(function(a, b) { return (a.options.weight < b.options.weight) ? -1 : 1; }); extraScripts.forEach(function(script) { paths.scripts[script.type] = paths.scripts[script.type] || []; paths.scripts[script.type].push(script.src); }); return paths; }; };
78e6c92a37fd96e6b87463b96603173dc2505c83
.travis.yml
.travis.yml
language: python python: - 2.7 sudo: false install: pip install pdfjinja addons: apt: packages: - tcl8.6-dev - tk8.6-dev - python-tk - libtiff5-dev - libjpeg8-dev - zlib1g-dev - libfreetype6-dev - liblcms2-dev - libwebp-dev - libmagickwand-dev - pdftk script: python tests.py
language: python python: - 2.7 sudo: false install: pip install . addons: apt: packages: - python-tk - libtiff5-dev - libjpeg8-dev - zlib1g-dev - libfreetype6-dev - liblcms2-dev - libmagickwand-dev - pdftk script: python tests.py
Install local package instead of from pip.
Install local package instead of from pip.
YAML
mit
rammie/pdfjinja
yaml
## Code Before: language: python python: - 2.7 sudo: false install: pip install pdfjinja addons: apt: packages: - tcl8.6-dev - tk8.6-dev - python-tk - libtiff5-dev - libjpeg8-dev - zlib1g-dev - libfreetype6-dev - liblcms2-dev - libwebp-dev - libmagickwand-dev - pdftk script: python tests.py ## Instruction: Install local package instead of from pip. ## Code After: language: python python: - 2.7 sudo: false install: pip install . addons: apt: packages: - python-tk - libtiff5-dev - libjpeg8-dev - zlib1g-dev - libfreetype6-dev - liblcms2-dev - libmagickwand-dev - pdftk script: python tests.py
426058126a0a6e1f089a146424e1f9cd28d98293
provisioning/roles/plugins/defaults/main.yml
provisioning/roles/plugins/defaults/main.yml
--- plugin_dependencies: - python-reportlab pip_plugins: # - "omero-webtagging-autotag" - "omero-iviewer" - "omero-figure" omero_plugin_names: # - "omero_webtagging_autotag" - "omero_iviewer" - "omero_figure" python_lib_path: "/usr/lib/python2.7/site-packages"
--- pip_dependencies: - reportlab - markdown pip_plugins: # - "omero-webtagging-autotag" - "omero-iviewer" - "omero-figure==3.2.1" omero_plugin_names: # - "omero_webtagging_autotag" - "omero_iviewer" - "omero_figure" python_lib_path: "/usr/lib/python2.7/site-packages"
Install older version of omero-figure (newer on e did not work with server v5.4.9)
Install older version of omero-figure (newer on e did not work with server v5.4.9)
YAML
mit
JIC-CSB/omero-ansible
yaml
## Code Before: --- plugin_dependencies: - python-reportlab pip_plugins: # - "omero-webtagging-autotag" - "omero-iviewer" - "omero-figure" omero_plugin_names: # - "omero_webtagging_autotag" - "omero_iviewer" - "omero_figure" python_lib_path: "/usr/lib/python2.7/site-packages" ## Instruction: Install older version of omero-figure (newer on e did not work with server v5.4.9) ## Code After: --- pip_dependencies: - reportlab - markdown pip_plugins: # - "omero-webtagging-autotag" - "omero-iviewer" - "omero-figure==3.2.1" omero_plugin_names: # - "omero_webtagging_autotag" - "omero_iviewer" - "omero_figure" python_lib_path: "/usr/lib/python2.7/site-packages"
cbd828b22bc8e54ca7c0d64db69dfc7738c89807
packages/co/complex-generic.yaml
packages/co/complex-generic.yaml
homepage: https://gitorious.org/complex-generic changelog-type: '' hash: 035d4ab5d0f2b72b41cbfe1c56adfa358584f978e72549ce8bcb88e80c6ba0d5 test-bench-deps: {} maintainer: claude@mathr.co.uk synopsis: complex numbers with non-mandatory RealFloat changelog: '' basic-deps: base: <4.9 template-haskell: <2.11 all-versions: - '0.1.1' author: Claude Heiland-Allen latest: '0.1.1' description-type: haddock description: ! 'The base package''s ''Data.Complex'' has a ''RealFloat'' requirement for almost all operations, which rules out uses such as ''Complex Rational'' or ''Complex Integer''. This package provides an alternative, putting most operations into additional type classes. Generating instances with template haskell helps reduce excessive boilerplate and avoids instance overlap.' license-name: BSD3
homepage: https://code.mathr.co.uk/complex-generic changelog-type: '' hash: 440fd9de41fb8eb8f7668c9f77f447daac8ffcfbf01547c1db18b49650627079 test-bench-deps: {} maintainer: claude@mathr.co.uk synopsis: complex numbers with non-mandatory RealFloat changelog: '' basic-deps: base: <4.10 template-haskell: <2.12 all-versions: - '0.1.1' - '0.1.1.1' author: Claude Heiland-Allen latest: '0.1.1.1' description-type: haddock description: ! 'The base package''s ''Data.Complex'' has a ''RealFloat'' requirement for almost all operations, which rules out uses such as ''Complex Rational'' or ''Complex Integer''. This package provides an alternative, putting most operations into additional type classes. Generating instances with template haskell helps reduce excessive boilerplate and avoids instance overlap.' license-name: BSD3
Update from Hackage at 2017-04-03T15:32:53Z
Update from Hackage at 2017-04-03T15:32:53Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://gitorious.org/complex-generic changelog-type: '' hash: 035d4ab5d0f2b72b41cbfe1c56adfa358584f978e72549ce8bcb88e80c6ba0d5 test-bench-deps: {} maintainer: claude@mathr.co.uk synopsis: complex numbers with non-mandatory RealFloat changelog: '' basic-deps: base: <4.9 template-haskell: <2.11 all-versions: - '0.1.1' author: Claude Heiland-Allen latest: '0.1.1' description-type: haddock description: ! 'The base package''s ''Data.Complex'' has a ''RealFloat'' requirement for almost all operations, which rules out uses such as ''Complex Rational'' or ''Complex Integer''. This package provides an alternative, putting most operations into additional type classes. Generating instances with template haskell helps reduce excessive boilerplate and avoids instance overlap.' license-name: BSD3 ## Instruction: Update from Hackage at 2017-04-03T15:32:53Z ## Code After: homepage: https://code.mathr.co.uk/complex-generic changelog-type: '' hash: 440fd9de41fb8eb8f7668c9f77f447daac8ffcfbf01547c1db18b49650627079 test-bench-deps: {} maintainer: claude@mathr.co.uk synopsis: complex numbers with non-mandatory RealFloat changelog: '' basic-deps: base: <4.10 template-haskell: <2.12 all-versions: - '0.1.1' - '0.1.1.1' author: Claude Heiland-Allen latest: '0.1.1.1' description-type: haddock description: ! 'The base package''s ''Data.Complex'' has a ''RealFloat'' requirement for almost all operations, which rules out uses such as ''Complex Rational'' or ''Complex Integer''. This package provides an alternative, putting most operations into additional type classes. Generating instances with template haskell helps reduce excessive boilerplate and avoids instance overlap.' license-name: BSD3
71faca1a144eb1d935e228f5b4f65a784e9eda72
logs/index.html
logs/index.html
--- layout: page slug: logs type: index title: Logs Folder exclude_from_nav: true --- {% for tag in site.tags %} {% capture tag_name %}{{ tag | first }}{% endcapture %} <h2>{{ tag_name }}</h2> {% for post in site.tags[tag_name] %} <time class="blog-date" pubdate="pubdate">{{ post.date|date: "%Y-%m-%d" }}</time> {{ post.title }} <br /> {% endfor %} {% endfor %}
--- layout: page slug: logs type: index title: Logs Folder exclude_from_nav: true --- {% for tag in site.tags %} {% capture tag_name %}{{ tag | first }}{% endcapture %} <h2 id="{{ tag_name }}">{{ tag_name }}</h2> {% for post in site.tags[tag_name] %} <time class="blog-date" pubdate="pubdate">{{ post.date|date: "%Y-%m-%d" }}</time> {{ post.title }} <br /> {% endfor %} {% endfor %}
Add id to jump to tag.
Add id to jump to tag.
HTML
mit
astrohckr/hckr.github.io,astrohckr/astrohckr.github.io,astrohckr/astrohckr.github.io,astrohckr/hckr.github.io
html
## Code Before: --- layout: page slug: logs type: index title: Logs Folder exclude_from_nav: true --- {% for tag in site.tags %} {% capture tag_name %}{{ tag | first }}{% endcapture %} <h2>{{ tag_name }}</h2> {% for post in site.tags[tag_name] %} <time class="blog-date" pubdate="pubdate">{{ post.date|date: "%Y-%m-%d" }}</time> {{ post.title }} <br /> {% endfor %} {% endfor %} ## Instruction: Add id to jump to tag. ## Code After: --- layout: page slug: logs type: index title: Logs Folder exclude_from_nav: true --- {% for tag in site.tags %} {% capture tag_name %}{{ tag | first }}{% endcapture %} <h2 id="{{ tag_name }}">{{ tag_name }}</h2> {% for post in site.tags[tag_name] %} <time class="blog-date" pubdate="pubdate">{{ post.date|date: "%Y-%m-%d" }}</time> {{ post.title }} <br /> {% endfor %} {% endfor %}
50c44a5708d1c054207eba264e1cdf9d1f6718da
deployer/logger.py
deployer/logger.py
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logger.propagate = False if TOTEM_ENV == 'local': formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=LOG_DATE) handler = logging.StreamHandler() handler.setFormatter(formatter) app_logger.addHandler(handler) else: formatter = logging.Formatter( '{0}[%(process)d]: %(name)s: %(message)s' .format(LOG_IDENTIFIER)) handler = logging.handlers.SysLogHandler( address='/dev/log', facility=SysLogHandler.LOG_DAEMON) handler.setFormatter(formatter) handler.setLevel(logging.INFO) app_logger.addHandler(handler) app_logger.info('Logger initialized') return app_logger def init_celery_logging(*args, **kwargs): init_logging('celery')
from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logger.propagate = False if TOTEM_ENV == 'local': formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=LOG_DATE) handler = logging.StreamHandler() handler.setFormatter(formatter) app_logger.addHandler(handler) else: formatter = logging.Formatter( '{0}[%(process)d]: %(name)s: %(message)s' .format(LOG_IDENTIFIER)) handler = logging.handlers.SysLogHandler( address='/dev/log', facility=SysLogHandler.LOG_DAEMON) handler.setFormatter(formatter) handler.setLevel(LOG_ROOT_LEVEL) app_logger.addHandler(handler) app_logger.info('Logger initialized') return app_logger def init_celery_logging(*args, **kwargs): init_logging('celery')
Set log level for handler
Set log level for handler
Python
mit
totem/cluster-deployer,totem/cluster-deployer,totem/cluster-deployer
python
## Code Before: from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logger.propagate = False if TOTEM_ENV == 'local': formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=LOG_DATE) handler = logging.StreamHandler() handler.setFormatter(formatter) app_logger.addHandler(handler) else: formatter = logging.Formatter( '{0}[%(process)d]: %(name)s: %(message)s' .format(LOG_IDENTIFIER)) handler = logging.handlers.SysLogHandler( address='/dev/log', facility=SysLogHandler.LOG_DAEMON) handler.setFormatter(formatter) handler.setLevel(logging.INFO) app_logger.addHandler(handler) app_logger.info('Logger initialized') return app_logger def init_celery_logging(*args, **kwargs): init_logging('celery') ## Instruction: Set log level for handler ## Code After: from __future__ import absolute_import import logging from logging.handlers import SysLogHandler from conf.appconfig import LOG_FORMAT, LOG_DATE, LOG_ROOT_LEVEL, TOTEM_ENV, \ LOG_IDENTIFIER def init_logging(name=None): app_logger = logging.getLogger(name) app_logger.setLevel(LOG_ROOT_LEVEL) app_logger.propagate = False if TOTEM_ENV == 'local': formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=LOG_DATE) handler = logging.StreamHandler() handler.setFormatter(formatter) app_logger.addHandler(handler) else: formatter = logging.Formatter( '{0}[%(process)d]: %(name)s: %(message)s' .format(LOG_IDENTIFIER)) handler = logging.handlers.SysLogHandler( address='/dev/log', facility=SysLogHandler.LOG_DAEMON) handler.setFormatter(formatter) handler.setLevel(LOG_ROOT_LEVEL) app_logger.addHandler(handler) app_logger.info('Logger initialized') return app_logger def init_celery_logging(*args, **kwargs): init_logging('celery')
6e31eb9e1049d75ad4e7e1031c0dfa4d6617c48f
csaps/__init__.py
csaps/__init__.py
from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataType, UnivariateVectorizedDataType, MultivariateDataType, NdGridDataType, ) __all__ = [ 'SplinePPForm', 'UnivariateCubicSmoothingSpline', 'MultivariateCubicSmoothingSpline', 'NdGridCubicSmoothingSpline', # Type-hints 'UnivariateDataType', 'UnivariateVectorizedDataType', 'MultivariateDataType', 'NdGridDataType', ]
from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, NdGridSplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataType, UnivariateVectorizedDataType, MultivariateDataType, NdGridDataType, ) __all__ = [ 'SplinePPForm', 'NdGridSplinePPForm', 'UnivariateCubicSmoothingSpline', 'MultivariateCubicSmoothingSpline', 'NdGridCubicSmoothingSpline', # Type-hints 'UnivariateDataType', 'UnivariateVectorizedDataType', 'MultivariateDataType', 'NdGridDataType', ]
Add NdGridSplinePPForm to csaps imports
Add NdGridSplinePPForm to csaps imports
Python
mit
espdev/csaps
python
## Code Before: from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataType, UnivariateVectorizedDataType, MultivariateDataType, NdGridDataType, ) __all__ = [ 'SplinePPForm', 'UnivariateCubicSmoothingSpline', 'MultivariateCubicSmoothingSpline', 'NdGridCubicSmoothingSpline', # Type-hints 'UnivariateDataType', 'UnivariateVectorizedDataType', 'MultivariateDataType', 'NdGridDataType', ] ## Instruction: Add NdGridSplinePPForm to csaps imports ## Code After: from csaps._version import __version__ # noqa from csaps._base import ( SplinePPForm, NdGridSplinePPForm, UnivariateCubicSmoothingSpline, MultivariateCubicSmoothingSpline, NdGridCubicSmoothingSpline, ) from csaps._types import ( UnivariateDataType, UnivariateVectorizedDataType, MultivariateDataType, NdGridDataType, ) __all__ = [ 'SplinePPForm', 'NdGridSplinePPForm', 'UnivariateCubicSmoothingSpline', 'MultivariateCubicSmoothingSpline', 'NdGridCubicSmoothingSpline', # Type-hints 'UnivariateDataType', 'UnivariateVectorizedDataType', 'MultivariateDataType', 'NdGridDataType', ]
4478cb194412ea363b9555b720e065b6e7103229
spec/lib/simple_webmon_spec.rb
spec/lib/simple_webmon_spec.rb
require 'spec_helper' require 'simple_webmon' describe SimpleWebmon do before(:all) do FakeWeb.allow_net_connect = false FakeWeb.register_uri(:get, "http://good.example.com/", body: "Hello World!") FakeWeb.register_uri(:get, "http://servererror.example.com/", body: "Internal Server Error", status: ["500", "Internal Server Error"]) FakeWeb.register_uri(:get, "http://slow.example.com/", response: sleep(10)) end it "returns 'OK' when given a URL for a properly responding site" do monitor = SimpleWebmon::Monitor.new expect(monitor.get_status("http://good.example.com/")).to eq 'OK' end it "returns 'DOWN' when given a URL that responds with an Internal Server Error" do monitor = SimpleWebmon::Monitor.new expect(monitor.get_status("http://servererror.example.com/")).to eq 'Internal Server Error' end it "returns 'DOWN' when given a URL that doesn't respond in time" do monitor = SimpleWebmon::Monitor.new expect(monitor.check("http://slow.example.com/", 1)).to eq 'ERROR: Timeout' end end
require 'spec_helper' require 'simple_webmon' describe SimpleWebmon do before(:all) do FakeWeb.allow_net_connect = false FakeWeb.register_uri(:get, "http://good.example.com/", body: "Hello World!") FakeWeb.register_uri(:get, "http://servererror.example.com/", body: "Internal Server Error", status: ["500", "Internal Server Error"]) FakeWeb.register_uri(:get, "http://slow.example.com/", response: sleep(10)) end let(:monitor) { SimpleWebmon::Monitor.new } describe '.get_status' do it "returns 'OK' when given a URL for a properly responding site" do expect(monitor.get_status("http://good.example.com/")).to eq 'OK' end it "returns correct status message when given a URL that responds with an Internal Server Error" do expect(monitor.get_status("http://servererror.example.com/")).to eq 'Internal Server Error' end end describe '.check' do it "returns 'DOWN' when given a URL that doesn't respond in time" do expect(monitor.check("http://slow.example.com/", 1)).to eq 'ERROR: Timeout' end it "returns 'OK' when given a URL that responds correctly" do expect(monitor.check("http://good.example.com/")).to eq 'OK' end it "returns 'ERROR' and the correct status message when given a URL that fails" do expect(monitor.check("http://servererror.example.com/")).to eq 'ERROR: Internal Server Error' end end end
Add more tests for .check method
Add more tests for .check method
Ruby
mit
mikeadmire/simple_webmon
ruby
## Code Before: require 'spec_helper' require 'simple_webmon' describe SimpleWebmon do before(:all) do FakeWeb.allow_net_connect = false FakeWeb.register_uri(:get, "http://good.example.com/", body: "Hello World!") FakeWeb.register_uri(:get, "http://servererror.example.com/", body: "Internal Server Error", status: ["500", "Internal Server Error"]) FakeWeb.register_uri(:get, "http://slow.example.com/", response: sleep(10)) end it "returns 'OK' when given a URL for a properly responding site" do monitor = SimpleWebmon::Monitor.new expect(monitor.get_status("http://good.example.com/")).to eq 'OK' end it "returns 'DOWN' when given a URL that responds with an Internal Server Error" do monitor = SimpleWebmon::Monitor.new expect(monitor.get_status("http://servererror.example.com/")).to eq 'Internal Server Error' end it "returns 'DOWN' when given a URL that doesn't respond in time" do monitor = SimpleWebmon::Monitor.new expect(monitor.check("http://slow.example.com/", 1)).to eq 'ERROR: Timeout' end end ## Instruction: Add more tests for .check method ## Code After: require 'spec_helper' require 'simple_webmon' describe SimpleWebmon do before(:all) do FakeWeb.allow_net_connect = false FakeWeb.register_uri(:get, "http://good.example.com/", body: "Hello World!") FakeWeb.register_uri(:get, "http://servererror.example.com/", body: "Internal Server Error", status: ["500", "Internal Server Error"]) FakeWeb.register_uri(:get, "http://slow.example.com/", response: sleep(10)) end let(:monitor) { SimpleWebmon::Monitor.new } describe '.get_status' do it "returns 'OK' when given a URL for a properly responding site" do expect(monitor.get_status("http://good.example.com/")).to eq 'OK' end it "returns correct status message when given a URL that responds with an Internal Server Error" do expect(monitor.get_status("http://servererror.example.com/")).to eq 'Internal Server Error' end end describe '.check' do it "returns 'DOWN' when given a URL that doesn't respond in time" do expect(monitor.check("http://slow.example.com/", 1)).to eq 'ERROR: Timeout' end it "returns 'OK' when given a URL that responds correctly" do expect(monitor.check("http://good.example.com/")).to eq 'OK' end it "returns 'ERROR' and the correct status message when given a URL that fails" do expect(monitor.check("http://servererror.example.com/")).to eq 'ERROR: Internal Server Error' end end end
06095d71264e2ed34a8d42ef9d0b03cc67b947c5
.travis.yml
.travis.yml
language: android android: components: - build-tools-22.0.1 # Specify your build tools verison - android-22 # Android Platform Target env: # Envirement Variables global: before_install: # Commands to excecute before install - echo "Before install stage" install: # Specify what and how to install - echo "Install stage" - sudo apt-get install -y python-software-properties - curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - - sudo apt-get install -y nodejs libsass - sudo npm install before_script: # Commands to excecute before running tests - echo "Before script stage" script: - echo "Starting build" - npm run compile
language: android android: components: - build-tools-22.0.1 # Specify your build tools verison - android-22 # Android Platform Target env: # Envirement Variables global: before_install: # Commands to excecute before install - echo "Before install stage" install: # Specify what and how to install - echo "Install stage" - sudo apt-get install -y python-software-properties - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - - sudo apt-get install -y nodejs - sudo npm install before_script: # Commands to excecute before running tests - echo "Before script stage" script: - echo "Starting build" - npm run compile
Fix out of date node.js
Fix out of date node.js
YAML
mit
ewhal/EmergencyAssist,ewhal/EmergencyAssist
yaml
## Code Before: language: android android: components: - build-tools-22.0.1 # Specify your build tools verison - android-22 # Android Platform Target env: # Envirement Variables global: before_install: # Commands to excecute before install - echo "Before install stage" install: # Specify what and how to install - echo "Install stage" - sudo apt-get install -y python-software-properties - curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - - sudo apt-get install -y nodejs libsass - sudo npm install before_script: # Commands to excecute before running tests - echo "Before script stage" script: - echo "Starting build" - npm run compile ## Instruction: Fix out of date node.js ## Code After: language: android android: components: - build-tools-22.0.1 # Specify your build tools verison - android-22 # Android Platform Target env: # Envirement Variables global: before_install: # Commands to excecute before install - echo "Before install stage" install: # Specify what and how to install - echo "Install stage" - sudo apt-get install -y python-software-properties - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - - sudo apt-get install -y nodejs - sudo npm install before_script: # Commands to excecute before running tests - echo "Before script stage" script: - echo "Starting build" - npm run compile
a59413dc688077d0f1c4d8ae26fce464b837faa6
src/scripts/scripts.js
src/scripts/scripts.js
$(document).foundation(); $('a.disabled').click(function(e) { e.preventDefault(); }); // Show shadow when content slides under the page header $(document).ready(function() { var $content = $('#site-body .content'); var $header = $('#page-head .inner'); if ($header.length > 0) { $content.css('margin-top', $header.outerHeight()); $(document).resize(function() { $content.css('margin-top', $header.outerHeight()); }); $(window).scroll(function() { if($(this).scrollTop() > 0) { $header.addClass('overlay'); } else { $header.removeClass('overlay'); } }); } });
$(document).foundation(); $('a.disabled').click(function(e) { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); }); // Show shadow when content slides under the page header $(document).ready(function() { var $content = $('#site-body .content'); var $header = $('#page-head .inner'); if ($header.length > 0) { $content.css('margin-top', $header.outerHeight()); $(document).resize(function() { $content.css('margin-top', $header.outerHeight()); }); $(window).scroll(function() { if($(this).scrollTop() > 0) { $header.addClass('overlay'); } else { $header.removeClass('overlay'); } }); } // ================================================================ // Fake form submits and confirmation buttons. // // To create a confirmation button add ( data-confirm-action="message" ) // to the button. This will trigger a confirmation box. If the answer // is affirmative the button action will fire. // // For fake submit buttons add ( data-trigger-submit="id" ) and replace // id with the id of the submit button. // ================================================================ $('[data-confirm-action]').click(function(e) { var message = $(this).attr('data-confirm-action'); var confirm = window.confirm(message); if (!confirm) { e.preventDefault(); e.stopImmediatePropagation(); } }); $('[data-trigger-submit]').click(function(e) { e.preventDefault(); var id = $(this).attr('data-trigger-submit'); $('#' + id).click(); }); });
Implement fake form submits and confirmation buttons
Implement fake form submits and confirmation buttons
JavaScript
bsd-3-clause
flipside-org/aw-datacollection,flipside-org/aw-datacollection,flipside-org/aw-datacollection
javascript
## Code Before: $(document).foundation(); $('a.disabled').click(function(e) { e.preventDefault(); }); // Show shadow when content slides under the page header $(document).ready(function() { var $content = $('#site-body .content'); var $header = $('#page-head .inner'); if ($header.length > 0) { $content.css('margin-top', $header.outerHeight()); $(document).resize(function() { $content.css('margin-top', $header.outerHeight()); }); $(window).scroll(function() { if($(this).scrollTop() > 0) { $header.addClass('overlay'); } else { $header.removeClass('overlay'); } }); } }); ## Instruction: Implement fake form submits and confirmation buttons ## Code After: $(document).foundation(); $('a.disabled').click(function(e) { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); }); // Show shadow when content slides under the page header $(document).ready(function() { var $content = $('#site-body .content'); var $header = $('#page-head .inner'); if ($header.length > 0) { $content.css('margin-top', $header.outerHeight()); $(document).resize(function() { $content.css('margin-top', $header.outerHeight()); }); $(window).scroll(function() { if($(this).scrollTop() > 0) { $header.addClass('overlay'); } else { $header.removeClass('overlay'); } }); } // ================================================================ // Fake form submits and confirmation buttons. // // To create a confirmation button add ( data-confirm-action="message" ) // to the button. This will trigger a confirmation box. If the answer // is affirmative the button action will fire. // // For fake submit buttons add ( data-trigger-submit="id" ) and replace // id with the id of the submit button. // ================================================================ $('[data-confirm-action]').click(function(e) { var message = $(this).attr('data-confirm-action'); var confirm = window.confirm(message); if (!confirm) { e.preventDefault(); e.stopImmediatePropagation(); } }); $('[data-trigger-submit]').click(function(e) { e.preventDefault(); var id = $(this).attr('data-trigger-submit'); $('#' + id).click(); }); });
0868bbd0e445cb39217351cd13d2c3f7a173416c
mws/__init__.py
mws/__init__.py
from __future__ import absolute_import from .mws import MWS, MWSError from .apis import Feeds, Finances, InboundShipments, Inventory, MerchantFulfillment,\ OffAmazonPayments, Orders, OutboundShipments, Products, Recommendations,\ Reports, Sellers __all__ = [ 'Feeds', 'Finances', 'InboundShipments', 'Inventory', 'MerchantFulfillment', 'MWS', 'MWSError', 'OffAmazonPayments', 'Orders', 'OutboundShipments', 'Products', 'Recommendations', 'Reports', 'Sellers', # TODO Add Subscriptions ]
from __future__ import absolute_import from .mws import MWS, MWSError from .apis import Feeds, Finances, InboundShipments, Inventory, MerchantFulfillment,\ OffAmazonPayments, Orders, OutboundShipments, Products, Recommendations,\ Reports, Sellers, Subscriptions __all__ = [ 'Feeds', 'Finances', 'InboundShipments', 'Inventory', 'MerchantFulfillment', 'MWS', 'MWSError', 'OffAmazonPayments', 'Orders', 'OutboundShipments', 'Products', 'Recommendations', 'Reports', 'Sellers', 'Subscriptions', ]
Include the new Subscriptions stub
Include the new Subscriptions stub
Python
unlicense
GriceTurrble/python-amazon-mws,Bobspadger/python-amazon-mws
python
## Code Before: from __future__ import absolute_import from .mws import MWS, MWSError from .apis import Feeds, Finances, InboundShipments, Inventory, MerchantFulfillment,\ OffAmazonPayments, Orders, OutboundShipments, Products, Recommendations,\ Reports, Sellers __all__ = [ 'Feeds', 'Finances', 'InboundShipments', 'Inventory', 'MerchantFulfillment', 'MWS', 'MWSError', 'OffAmazonPayments', 'Orders', 'OutboundShipments', 'Products', 'Recommendations', 'Reports', 'Sellers', # TODO Add Subscriptions ] ## Instruction: Include the new Subscriptions stub ## Code After: from __future__ import absolute_import from .mws import MWS, MWSError from .apis import Feeds, Finances, InboundShipments, Inventory, MerchantFulfillment,\ OffAmazonPayments, Orders, OutboundShipments, Products, Recommendations,\ Reports, Sellers, Subscriptions __all__ = [ 'Feeds', 'Finances', 'InboundShipments', 'Inventory', 'MerchantFulfillment', 'MWS', 'MWSError', 'OffAmazonPayments', 'Orders', 'OutboundShipments', 'Products', 'Recommendations', 'Reports', 'Sellers', 'Subscriptions', ]
5c9b98319b3537ef6287bc28353cd72748f9e1a8
profile_collection/startup/99-bluesky.py
profile_collection/startup/99-bluesky.py
gs.DETS = [em_ch1, em_ch2, em_ch3, em_ch4]
gs.DETS = [em] gs.TABLE_COLS.append('em_chan21') gs.PLOT_Y = 'em_ch1' gs.TEMP_CONTROLLER = cs700 gs.TH_MOTOR = th gs.TTH_MOTOR = tth import time as ttime # We probably already have these imports, but we use them below # so I'm importing here to be sure. from databroker import DataBroker as db, get_events def verify_files_accessible(name, doc): "This is a brute-force approach. We retrieve all the data." ttime.sleep(0.1) # Wati for data to be saved. if name != 'stop': return print(" Verifying that run was saved to broker...") try: header = db[doc['run_start']] except Exception as e: print(" Verification Failed! Error: {0}".format(e)) return else: print('\x1b[1A\u2713') print(" Verifying that all data is accessible on the disk...") try: list(get_events(header, fill=True)) except Exception as e: print(" Verification Failed! Error: {0}".format(e)) else: print('\x1b[1A\u2713') gs.RE.subscribe('stop', verify_files_accessible) # Alternatively, # gs.RE(my_scan, verify_files_accessible) # or # ct(verify_files_accessible)
Add multiple settings for bluesky
Add multiple settings for bluesky - Define a data validator to run at the end of a scan. - Set up default detectors and plot and table settles for SPEC API.
Python
bsd-2-clause
NSLS-II-XPD/ipython_ophyd,pavoljuhas/ipython_ophyd,NSLS-II-XPD/ipython_ophyd,pavoljuhas/ipython_ophyd
python
## Code Before: gs.DETS = [em_ch1, em_ch2, em_ch3, em_ch4] ## Instruction: Add multiple settings for bluesky - Define a data validator to run at the end of a scan. - Set up default detectors and plot and table settles for SPEC API. ## Code After: gs.DETS = [em] gs.TABLE_COLS.append('em_chan21') gs.PLOT_Y = 'em_ch1' gs.TEMP_CONTROLLER = cs700 gs.TH_MOTOR = th gs.TTH_MOTOR = tth import time as ttime # We probably already have these imports, but we use them below # so I'm importing here to be sure. from databroker import DataBroker as db, get_events def verify_files_accessible(name, doc): "This is a brute-force approach. We retrieve all the data." ttime.sleep(0.1) # Wati for data to be saved. if name != 'stop': return print(" Verifying that run was saved to broker...") try: header = db[doc['run_start']] except Exception as e: print(" Verification Failed! Error: {0}".format(e)) return else: print('\x1b[1A\u2713') print(" Verifying that all data is accessible on the disk...") try: list(get_events(header, fill=True)) except Exception as e: print(" Verification Failed! Error: {0}".format(e)) else: print('\x1b[1A\u2713') gs.RE.subscribe('stop', verify_files_accessible) # Alternatively, # gs.RE(my_scan, verify_files_accessible) # or # ct(verify_files_accessible)
bdf8b4548c9aecf720a1429dc8de7aa1ad45f635
lib/kaleidoscope/instance_methods.rb
lib/kaleidoscope/instance_methods.rb
module Kaleidoscope module InstanceMethods def colors_for end def generate_colors Kaleidoscope.log("Generating colors.") end def destroy_colors Kaleidoscope.log("Deleting colors.") end end end
module Kaleidoscope module InstanceMethods def colors_for end def generate_colors Kaleidoscope.log("Generating colors for #{self.class.model_name}.") end def destroy_colors Kaleidoscope.log("Deleting colors for #{self.class.model_name}.") end end end
Add model name to logs for instance methods
Add model name to logs for instance methods
Ruby
mit
JoshSmith/kaleidoscope
ruby
## Code Before: module Kaleidoscope module InstanceMethods def colors_for end def generate_colors Kaleidoscope.log("Generating colors.") end def destroy_colors Kaleidoscope.log("Deleting colors.") end end end ## Instruction: Add model name to logs for instance methods ## Code After: module Kaleidoscope module InstanceMethods def colors_for end def generate_colors Kaleidoscope.log("Generating colors for #{self.class.model_name}.") end def destroy_colors Kaleidoscope.log("Deleting colors for #{self.class.model_name}.") end end end
4a04fdc57f5aded2722af9ee1d0993e3bd05fbc0
app/views/admin/expectations/index.html.erb
app/views/admin/expectations/index.html.erb
<div> <h2>Existing Expectations</h2> <ul> <% @expectations.each do |expectation| %> <li><%= expectation.text %></li> <% end %> </ul> <h2>Add Expectation</h2> <%= semantic_form_for([:admin, @expectation]) do |f| %> <%= f.inputs do %> <%= f.input :text %> <%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %> <% end %> <%= f.buttons %> <% end %> </div> <%= javascript_include_tag '/guide-assets/javascripts/publications.js' %> <script type="text/javascript" charset="utf-8"> $(function () { $('#expectation_text').change(function () { var title_field = $(this); console.log(title_field); var slug_field = $('#expectation_css_class'); console.log(slug_field); if (slug_field.text() == '') { slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val())); } }) }) </script> <% content_for :page_title, "Expectations dashboard" %>
<div> <h2>Existing Expectations</h2> <ul> <% @expectations.each do |expectation| %> <li><%= expectation.text %></li> <% end %> </ul> <h2>Add Expectation</h2> <%= semantic_form_for([:admin, @expectation]) do |f| %> <%= f.inputs do %> <%= f.input :text %> <%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %> <% end %> <%= f.buttons %> <% end %> </div> <%= javascript_include_tag '/guide-assets/javascripts/publications.js' %> <script type="text/javascript" charset="utf-8"> $(function () { $('#expectation_text').change(function () { var title_field = $(this); var slug_field = $('#expectation_css_class'); if (slug_field.text() == '') { slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val())); } }) }) </script> <% content_for :page_title, "Expectations dashboard" %>
Remove stray logging statements from expectations JS
Remove stray logging statements from expectations JS
HTML+ERB
mit
telekomatrix/publisher,theodi/publisher,leftees/publisher,telekomatrix/publisher,alphagov/publisher,theodi/publisher,theodi/publisher,alphagov/publisher,telekomatrix/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,theodi/publisher,alphagov/publisher,leftees/publisher
html+erb
## Code Before: <div> <h2>Existing Expectations</h2> <ul> <% @expectations.each do |expectation| %> <li><%= expectation.text %></li> <% end %> </ul> <h2>Add Expectation</h2> <%= semantic_form_for([:admin, @expectation]) do |f| %> <%= f.inputs do %> <%= f.input :text %> <%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %> <% end %> <%= f.buttons %> <% end %> </div> <%= javascript_include_tag '/guide-assets/javascripts/publications.js' %> <script type="text/javascript" charset="utf-8"> $(function () { $('#expectation_text').change(function () { var title_field = $(this); console.log(title_field); var slug_field = $('#expectation_css_class'); console.log(slug_field); if (slug_field.text() == '') { slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val())); } }) }) </script> <% content_for :page_title, "Expectations dashboard" %> ## Instruction: Remove stray logging statements from expectations JS ## Code After: <div> <h2>Existing Expectations</h2> <ul> <% @expectations.each do |expectation| %> <li><%= expectation.text %></li> <% end %> </ul> <h2>Add Expectation</h2> <%= semantic_form_for([:admin, @expectation]) do |f| %> <%= f.inputs do %> <%= f.input :text %> <%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %> <% end %> <%= f.buttons %> <% end %> </div> <%= javascript_include_tag '/guide-assets/javascripts/publications.js' %> <script type="text/javascript" charset="utf-8"> $(function () { $('#expectation_text').change(function () { var title_field = $(this); var slug_field = $('#expectation_css_class'); if (slug_field.text() == '') { slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val())); } }) }) </script> <% content_for :page_title, "Expectations dashboard" %>
8eeb41a2a7a11fff41afe3cc1d58d74233b6672d
db/v21.bib
db/v21.bib
@Proceedings{HeinzICGI2012, booktitle = {Proceedings of the Eleventh International Conference on Grammatical Inference}, editor = {Jeffrey Heinz and Colin de la Higuera and and Tim Oates}, publisher = {JMLR Workshop and Conference Proceedings}, volume = {21}, year = {2012}, address = {University of Maryland, College Park, MD, USA}, month = {5--8 September}, shortname = {ICGI 2012}, sections = {preface=Preface|default=Accepted Papers} }
@Proceedings{HeinzICGI2012, booktitle = {Proceedings of the Eleventh International Conference on Grammatical Inference}, editor = {Heinz, Jeffrey and de la Higuera, Colin and Oates, Tim}, publisher = {JMLR Workshop and Conference Proceedings}, volume = {21}, year = {2012}, address = {University of Maryland, College Park, MD, USA}, month = {5--8 September}, shortname = {ICGI 2012}, sections = {preface=Preface|default=Accepted Papers} }
Remove extra and in editor field
Remove extra and in editor field
TeX
mit
mreid/papersite,mreid/papersite,mreid/papersite
tex
## Code Before: @Proceedings{HeinzICGI2012, booktitle = {Proceedings of the Eleventh International Conference on Grammatical Inference}, editor = {Jeffrey Heinz and Colin de la Higuera and and Tim Oates}, publisher = {JMLR Workshop and Conference Proceedings}, volume = {21}, year = {2012}, address = {University of Maryland, College Park, MD, USA}, month = {5--8 September}, shortname = {ICGI 2012}, sections = {preface=Preface|default=Accepted Papers} } ## Instruction: Remove extra and in editor field ## Code After: @Proceedings{HeinzICGI2012, booktitle = {Proceedings of the Eleventh International Conference on Grammatical Inference}, editor = {Heinz, Jeffrey and de la Higuera, Colin and Oates, Tim}, publisher = {JMLR Workshop and Conference Proceedings}, volume = {21}, year = {2012}, address = {University of Maryland, College Park, MD, USA}, month = {5--8 September}, shortname = {ICGI 2012}, sections = {preface=Preface|default=Accepted Papers} }
4d587171de2e78c7f5fb11a727f257546521183d
lib/castle/extractors/ip.rb
lib/castle/extractors/ip.rb
module Castle module Extractors # used for extraction of ip from the request class IP def initialize(request) @request = request end def call return @request.env['HTTP_CF_CONNECTING_IP'] if @request.env['HTTP_CF_CONNECTING_IP'] return @request.remote_ip if @request.respond_to?(:remote_ip) @request.ip end end end end
module Castle module Extractors # used for extraction of ip from the request class IP def initialize(request) @request = request end def call return @request.remote_ip if @request.respond_to?(:remote_ip) @request.ip end end end end
Drop special handling for CF IP header
Drop special handling for CF IP header
Ruby
mit
castle/castle-ruby,castle/castle-ruby
ruby
## Code Before: module Castle module Extractors # used for extraction of ip from the request class IP def initialize(request) @request = request end def call return @request.env['HTTP_CF_CONNECTING_IP'] if @request.env['HTTP_CF_CONNECTING_IP'] return @request.remote_ip if @request.respond_to?(:remote_ip) @request.ip end end end end ## Instruction: Drop special handling for CF IP header ## Code After: module Castle module Extractors # used for extraction of ip from the request class IP def initialize(request) @request = request end def call return @request.remote_ip if @request.respond_to?(:remote_ip) @request.ip end end end end
8737a9617722e602838849cbf98ec351be2e4e3a
README.md
README.md
Unvanquished-CBSE ================= Experimental repository for the gamelogic rewrite of Unvanquished Testing out ideas for comments and crits.
Unvanquished CBSE ================= Testing auto generation of plumbing code for a component-based gamelogic for the game Unvanquished. Please, please keep in mind that this is *very* WIP. Terminology ----------- An *entity* is an object of the game that contains a number of behaviors called *components* that interact using entity-wide broadcast *messages* and shared *attributes* that are read-only variable with an added broadcast "set" message. Because using only messages and attributes is a bit limited, we support component dependencies and component inheritance. When a component depends on another, it can call methods on the other directly. In addition inheritance allows to surcharge some message handling as well as methods directly with a dependency. How the generation works ------------------------ A python tool reads a YAML definition of the components/entities... does processing and calls Jinja2 templates to "render" C++ files. As part of the processing, the correctness of the definition should be checked (for example the dependency-inheritance graph must be acyclic) and each component will gather its "own" attributes/messages... for rendering. How the generated code works ---------------------------- Each entity contains a pointer to each component and has a virtual function that dispatches the messages to the right components (known statically since the code is auto-generated). It also contains the shared attributes. Each component contains a pointer to the entity, pointers to component dependencies and shared attributes. Each component is implemented as a "stub" class that only contains helper functions, the customer code will be able to us that class as such ```c++ class MyComponent: protected BaseMyComponent { // the constructor will probably be forced :/ // but otherwise you can use helper functions here } ``` Inheritance is handled as such, if AliceComponent is the parent of BobComponent then the tool will generate a stub class for Alice and a stub class for Bob that doesn't contain the properties of Alice, then the customer code is like this: ```c++ class AliceComponent: protected BaseAliceComponent { //Stuff } class BobComponent: protected AliceComponent, BaseBobComponent { //Moar stuff } ```
Extend the readme a bit
Extend the readme a bit
Markdown
bsd-3-clause
DaemonDevelopers/CBSE-Toolchain,DaemonDevelopers/CBSE-Toolchain,DaemonDevelopers/CBSE-Toolchain
markdown
## Code Before: Unvanquished-CBSE ================= Experimental repository for the gamelogic rewrite of Unvanquished Testing out ideas for comments and crits. ## Instruction: Extend the readme a bit ## Code After: Unvanquished CBSE ================= Testing auto generation of plumbing code for a component-based gamelogic for the game Unvanquished. Please, please keep in mind that this is *very* WIP. Terminology ----------- An *entity* is an object of the game that contains a number of behaviors called *components* that interact using entity-wide broadcast *messages* and shared *attributes* that are read-only variable with an added broadcast "set" message. Because using only messages and attributes is a bit limited, we support component dependencies and component inheritance. When a component depends on another, it can call methods on the other directly. In addition inheritance allows to surcharge some message handling as well as methods directly with a dependency. How the generation works ------------------------ A python tool reads a YAML definition of the components/entities... does processing and calls Jinja2 templates to "render" C++ files. As part of the processing, the correctness of the definition should be checked (for example the dependency-inheritance graph must be acyclic) and each component will gather its "own" attributes/messages... for rendering. How the generated code works ---------------------------- Each entity contains a pointer to each component and has a virtual function that dispatches the messages to the right components (known statically since the code is auto-generated). It also contains the shared attributes. Each component contains a pointer to the entity, pointers to component dependencies and shared attributes. Each component is implemented as a "stub" class that only contains helper functions, the customer code will be able to us that class as such ```c++ class MyComponent: protected BaseMyComponent { // the constructor will probably be forced :/ // but otherwise you can use helper functions here } ``` Inheritance is handled as such, if AliceComponent is the parent of BobComponent then the tool will generate a stub class for Alice and a stub class for Bob that doesn't contain the properties of Alice, then the customer code is like this: ```c++ class AliceComponent: protected BaseAliceComponent { //Stuff } class BobComponent: protected AliceComponent, BaseBobComponent { //Moar stuff } ```
4a19061407b5a6d8be9a9f10600b0311798f1b19
install_master_node.sh
install_master_node.sh
apt-get -y install hadoop-0.20-mapreduce-jobtracker hadoop-hdfs-namenode hadoop-client
apt-get -y install hadoop-0.20-mapreduce-jobtracker hadoop-hdfs-namenode hadoop-client # Upload and run on ALL VM's. # This is mainly for the master. # Maybe not necessary to apply the entire script to the slaves as some of the # directories will be for client apps only. # If hadoop components are installed after this the relevant section in the script # MUST be executed in isolation. ./bind_hadoop_directories.sh
Set up storage on VM.
RR: Set up storage on VM.
Shell
apache-2.0
rrothwell/heat_hadoop
shell
## Code Before: apt-get -y install hadoop-0.20-mapreduce-jobtracker hadoop-hdfs-namenode hadoop-client ## Instruction: RR: Set up storage on VM. ## Code After: apt-get -y install hadoop-0.20-mapreduce-jobtracker hadoop-hdfs-namenode hadoop-client # Upload and run on ALL VM's. # This is mainly for the master. # Maybe not necessary to apply the entire script to the slaves as some of the # directories will be for client apps only. # If hadoop components are installed after this the relevant section in the script # MUST be executed in isolation. ./bind_hadoop_directories.sh
e49af4ac9be10a34e24672f65bab16c6c1efa5ef
vue.config.js
vue.config.js
module.exports = { assetsDir: 'styleguide/', css: { modules: true } };
module.exports = { css: { modules: true }, publicPath: '/styleguide/' };
Correct to the right property
Correct to the right property
JavaScript
mit
rodet/styleguide,rodet/styleguide
javascript
## Code Before: module.exports = { assetsDir: 'styleguide/', css: { modules: true } }; ## Instruction: Correct to the right property ## Code After: module.exports = { css: { modules: true }, publicPath: '/styleguide/' };
4359a9947c1d86d9e4003c1e8fc358e9a66c6b1d
DisplayAdapter/display_adapter/scripts/init_db.py
DisplayAdapter/display_adapter/scripts/init_db.py
__author__ = 'richard'
import sys import sqlite3 from display_adapter import db_name help_message = """ This initialises an sqlite3 db for the purposes of the DisplayAdapter programs. Arguments: init_db.py database_name """ runs_table = """ CREATE TABLE runs ( id INTEGER NOT NULL, input_pattern VARCHAR, time_slot DATETIME, user_name VARCHAR(50), PRIMARY KEY (id) ) """ screensavers_table = """ CREATE TABLE screensavers ( pattern VARCHAR ) """ def init_db(db_name=db_name): """ This function takes a database name and creates the database required for the DisplayAdapter programs """ con = sqlite3.connect(db_name) cur = con.cursor() cur.execute(runs_table) cur.execute(screensavers_table) con.commit() con.close() if __name__ == "__main__": if len(sys.argv) < 2: if sys.argv[1].lower() == "help": print(help_message) else: init_db(sys.argv[1]) else: init_db()
Create internal db initialisation script
Create internal db initialisation script Paired by Michael and Richard
Python
mit
CO600GOL/Game_of_life,CO600GOL/Game_of_life,CO600GOL/Game_of_life
python
## Code Before: __author__ = 'richard' ## Instruction: Create internal db initialisation script Paired by Michael and Richard ## Code After: import sys import sqlite3 from display_adapter import db_name help_message = """ This initialises an sqlite3 db for the purposes of the DisplayAdapter programs. Arguments: init_db.py database_name """ runs_table = """ CREATE TABLE runs ( id INTEGER NOT NULL, input_pattern VARCHAR, time_slot DATETIME, user_name VARCHAR(50), PRIMARY KEY (id) ) """ screensavers_table = """ CREATE TABLE screensavers ( pattern VARCHAR ) """ def init_db(db_name=db_name): """ This function takes a database name and creates the database required for the DisplayAdapter programs """ con = sqlite3.connect(db_name) cur = con.cursor() cur.execute(runs_table) cur.execute(screensavers_table) con.commit() con.close() if __name__ == "__main__": if len(sys.argv) < 2: if sys.argv[1].lower() == "help": print(help_message) else: init_db(sys.argv[1]) else: init_db()
8f597e2a05f8eb4f466b2de20d8fa299faf192ef
_data/nav.yml
_data/nav.yml
- title: About url: /about/ sections: - title: Vision url: /charter/ - title: Roadmap url: /roadmap/ - title: Screenshots url: /screenshots/ - title: News url: /news/ - title: Development url: https://github.com/neovim/neovim - title: Documentation url: /doc/ sections: - title: General href: /doc/general/ - title: Lua resources href: /doc/lua-resources/ - title: LSP href: /doc/lsp/ - title: Tree-sitter href: /doc/treesitter/ - title: Forum url: http://discourse.neovim.io - title: Sponsors url: /sponsors/
- title: About url: /about/ sections: - title: Vision url: /charter/ - title: Roadmap url: /roadmap/ - title: Screenshots url: /screenshots/ - title: News url: /news/ - title: Development url: https://github.com/neovim/neovim - title: Documentation url: /doc/ sections: - title: General url: /doc/general/ - title: Lua resources url: /doc/lua-resources/ - title: LSP url: /doc/lsp/ - title: Tree-sitter url: /doc/treesitter/ - title: Forum url: http://discourse.neovim.io - title: Sponsors url: /sponsors/
Revert "second attempt at fixing doc"
Revert "second attempt at fixing doc" This reverts commit 7560780d19b30a1cbdd6908c64b01b3c83628c55.
YAML
mit
neovim/neovim.github.io,neovim/neovim.github.io,neovim/neovim.github.io
yaml
## Code Before: - title: About url: /about/ sections: - title: Vision url: /charter/ - title: Roadmap url: /roadmap/ - title: Screenshots url: /screenshots/ - title: News url: /news/ - title: Development url: https://github.com/neovim/neovim - title: Documentation url: /doc/ sections: - title: General href: /doc/general/ - title: Lua resources href: /doc/lua-resources/ - title: LSP href: /doc/lsp/ - title: Tree-sitter href: /doc/treesitter/ - title: Forum url: http://discourse.neovim.io - title: Sponsors url: /sponsors/ ## Instruction: Revert "second attempt at fixing doc" This reverts commit 7560780d19b30a1cbdd6908c64b01b3c83628c55. ## Code After: - title: About url: /about/ sections: - title: Vision url: /charter/ - title: Roadmap url: /roadmap/ - title: Screenshots url: /screenshots/ - title: News url: /news/ - title: Development url: https://github.com/neovim/neovim - title: Documentation url: /doc/ sections: - title: General url: /doc/general/ - title: Lua resources url: /doc/lua-resources/ - title: LSP url: /doc/lsp/ - title: Tree-sitter url: /doc/treesitter/ - title: Forum url: http://discourse.neovim.io - title: Sponsors url: /sponsors/
1fb12ca366ae3fde4a7656f05f35b3acfee6f767
Cargo.toml
Cargo.toml
[package] name = "rppal" version = "0.6.0" authors = ["Rene van der Meer <rene@golemparts.com>"] description = "Interface for the Raspberry Pi's GPIO and SPI peripherals." documentation = "https://docs.golemparts.com/rppal" repository = "https://github.com/golemparts/rppal" readme = "README.md" license = "MIT" categories = ["embedded", "hardware-support"] keywords = ["raspberry","pi","gpio","spi"] [dependencies] libc = "0.2" quick-error = "1.1"
[package] name = "rppal" version = "0.6.0" authors = ["Rene van der Meer <rene@golemparts.com>"] description = "Interface for the Raspberry Pi's GPIO, I2C and SPI peripherals." documentation = "https://docs.golemparts.com/rppal" repository = "https://github.com/golemparts/rppal" readme = "README.md" license = "MIT" categories = ["embedded", "hardware-support"] keywords = ["raspberry","pi","gpio","spi","i2c"] [dependencies] libc = "0.2" quick-error = "1.1"
Add I2C to keywords and description
Add I2C to keywords and description
TOML
mit
golemparts/rppal
toml
## Code Before: [package] name = "rppal" version = "0.6.0" authors = ["Rene van der Meer <rene@golemparts.com>"] description = "Interface for the Raspberry Pi's GPIO and SPI peripherals." documentation = "https://docs.golemparts.com/rppal" repository = "https://github.com/golemparts/rppal" readme = "README.md" license = "MIT" categories = ["embedded", "hardware-support"] keywords = ["raspberry","pi","gpio","spi"] [dependencies] libc = "0.2" quick-error = "1.1" ## Instruction: Add I2C to keywords and description ## Code After: [package] name = "rppal" version = "0.6.0" authors = ["Rene van der Meer <rene@golemparts.com>"] description = "Interface for the Raspberry Pi's GPIO, I2C and SPI peripherals." documentation = "https://docs.golemparts.com/rppal" repository = "https://github.com/golemparts/rppal" readme = "README.md" license = "MIT" categories = ["embedded", "hardware-support"] keywords = ["raspberry","pi","gpio","spi","i2c"] [dependencies] libc = "0.2" quick-error = "1.1"
c343acbbcb250c95d6a9f940871bb12a71e88202
CHANGES.rst
CHANGES.rst
Weitersager Changelog ===================== Version 0.3 ----------- Unreleased Version 0.2 ----------- Released 2020-09-13 - Raised minimum Python version to 3.7. - HTTP protocol was changed: - Only a single channel is allowed per message. - Response code for successful submit was changed from 200 (OK) to more appropriate 202 (Accepted). - Divided code base into separate modules in a package. - Switch to a ``src/`` layout. - Dependency versions have been pinned. - Updated irc version to 19.0.1 (from 12.3). - Updated blinker to 1.4 (from 1.3). - Do not use tox for tests anymore. - Use ``dataclass`` instead of ``namedtuple`` for value objects. - Allowed for custom shutdown predicate. Version 0.1 ----------- Released 2015-04-24 at LANresort 2015 - First official release
Weitersager Changelog ===================== Version 0.3 ----------- Unreleased Version 0.2 ----------- Released 2020-09-13 - Raised minimum Python version to 3.7. - HTTP protocol was changed: - Only a single channel is allowed per message. - Response code for successful submit was changed from 200 (OK) to more appropriate 202 (Accepted). - Divided code base into separate modules in a package. - Switch to a ``src/`` layout. - Dependency versions have been pinned. - Updated irc version to 19.0.1 (from 12.3). - Updated blinker to 1.4 (from 1.3). - Do not use tox for tests anymore. - Use ``dataclass`` instead of ``namedtuple`` for value objects. - Allowed for custom shutdown predicate. Version 0.1 ----------- Released 2015-04-24 at LANresort 2015 - First official release
Put blank lines between changelog items
Put blank lines between changelog items Fixes rendering of nested list.
reStructuredText
mit
homeworkprod/weitersager
restructuredtext
## Code Before: Weitersager Changelog ===================== Version 0.3 ----------- Unreleased Version 0.2 ----------- Released 2020-09-13 - Raised minimum Python version to 3.7. - HTTP protocol was changed: - Only a single channel is allowed per message. - Response code for successful submit was changed from 200 (OK) to more appropriate 202 (Accepted). - Divided code base into separate modules in a package. - Switch to a ``src/`` layout. - Dependency versions have been pinned. - Updated irc version to 19.0.1 (from 12.3). - Updated blinker to 1.4 (from 1.3). - Do not use tox for tests anymore. - Use ``dataclass`` instead of ``namedtuple`` for value objects. - Allowed for custom shutdown predicate. Version 0.1 ----------- Released 2015-04-24 at LANresort 2015 - First official release ## Instruction: Put blank lines between changelog items Fixes rendering of nested list. ## Code After: Weitersager Changelog ===================== Version 0.3 ----------- Unreleased Version 0.2 ----------- Released 2020-09-13 - Raised minimum Python version to 3.7. - HTTP protocol was changed: - Only a single channel is allowed per message. - Response code for successful submit was changed from 200 (OK) to more appropriate 202 (Accepted). - Divided code base into separate modules in a package. - Switch to a ``src/`` layout. - Dependency versions have been pinned. - Updated irc version to 19.0.1 (from 12.3). - Updated blinker to 1.4 (from 1.3). - Do not use tox for tests anymore. - Use ``dataclass`` instead of ``namedtuple`` for value objects. - Allowed for custom shutdown predicate. Version 0.1 ----------- Released 2015-04-24 at LANresort 2015 - First official release
8400db5e17ea160a61fd52faada28d468da77b00
lib/ups/parsers/track_parser.rb
lib/ups/parsers/track_parser.rb
require 'uri' require 'ox' module UPS module Parsers class TrackParser < BaseParser def initialize(response) # Unescape double/triple quoted first line: "<?xml version=\\\"1.0\\\"?>\\n<TrackResponse>\n" super(response.gsub(/\\"/, '"').gsub(/\\n/, "\n")) end def to_h { status_date: status_date, status_type_description: status_type_description, status_type_code: status_type_code } end def status_date Date.parse(latest_activity[:Date]) end def status_type_description status_type[:Description] end def status_type_code status_type[:Code] end private def status_type latest_activity[:Status][:StatusType] end def latest_activity activities.sort_by {|a| [a[:GMTDate], a[:GMTTime]] }.last end def activities normalize_response_into_array(root_response[:Shipment][:Package][:Activity]) end def root_response parsed_response[:TrackResponse] end end end end
require 'uri' require 'ox' module UPS module Parsers class TrackParser < BaseParser def initialize(response) # Unescape double/triple quoted first line: "<?xml version=\\\"1.0\\\"?>\\n<TrackResponse>\n" super(response.gsub(/\\"/, '"').gsub(/\\n/, "\n")) end def to_h { status_date: status_date, status_type_description: status_type_description, status_type_code: status_type_code } end def activities normalize_response_into_array(root_response[:Shipment][:Package][:Activity]) end def status_date Date.parse(latest_activity[:Date]) end def status_type_description status_type[:Description] end def status_type_code status_type[:Code] end private def status_type latest_activity[:Status][:StatusType] end def latest_activity activities.sort_by {|a| [a[:GMTDate], a[:GMTTime]] }.last end def root_response parsed_response[:TrackResponse] end end end end
Allow all shipment activities to be accessed YP-22
Allow all shipment activities to be accessed YP-22
Ruby
mit
veeqo/ups-ruby
ruby
## Code Before: require 'uri' require 'ox' module UPS module Parsers class TrackParser < BaseParser def initialize(response) # Unescape double/triple quoted first line: "<?xml version=\\\"1.0\\\"?>\\n<TrackResponse>\n" super(response.gsub(/\\"/, '"').gsub(/\\n/, "\n")) end def to_h { status_date: status_date, status_type_description: status_type_description, status_type_code: status_type_code } end def status_date Date.parse(latest_activity[:Date]) end def status_type_description status_type[:Description] end def status_type_code status_type[:Code] end private def status_type latest_activity[:Status][:StatusType] end def latest_activity activities.sort_by {|a| [a[:GMTDate], a[:GMTTime]] }.last end def activities normalize_response_into_array(root_response[:Shipment][:Package][:Activity]) end def root_response parsed_response[:TrackResponse] end end end end ## Instruction: Allow all shipment activities to be accessed YP-22 ## Code After: require 'uri' require 'ox' module UPS module Parsers class TrackParser < BaseParser def initialize(response) # Unescape double/triple quoted first line: "<?xml version=\\\"1.0\\\"?>\\n<TrackResponse>\n" super(response.gsub(/\\"/, '"').gsub(/\\n/, "\n")) end def to_h { status_date: status_date, status_type_description: status_type_description, status_type_code: status_type_code } end def activities normalize_response_into_array(root_response[:Shipment][:Package][:Activity]) end def status_date Date.parse(latest_activity[:Date]) end def status_type_description status_type[:Description] end def status_type_code status_type[:Code] end private def status_type latest_activity[:Status][:StatusType] end def latest_activity activities.sort_by {|a| [a[:GMTDate], a[:GMTTime]] }.last end def root_response parsed_response[:TrackResponse] end end end end
d4b900289cdab019dbdd93db23fa0c11dd300571
spec/requests/quizzes_spec.rb
spec/requests/quizzes_spec.rb
require 'spec_helper' describe "Quizzes" do %w(/ /quizzes).each do |path| it 'should redirect you to login' do visit path page.current_url.should == 'http://www.example.com/oauth2authorize' end end it 'shows a list of quizzes' do Factory :quiz login visit '/' page.should have_content('Scrabble for Nihilists') page.should have_content('47') page.should have_content('United States') end it 'says something when there are no quizzes' do login page.should have_content('There are no quizzes yet') end it 'allows you to create a new quiz' do login visit '/' click_link 'Create a new quiz' page.should have_content('New quiz') end # Advanced validation is tested in models/quiz_spec.rb. it 'does validation' do login visit new_quiz_path click_button 'Create Quiz' ['Name', 'Owner', 'Playlist', 'Country alpha2'].each do |field| page.should have_content("#{field} can't be blank") end end it 'lets you edit a quiz' do Factory :quiz login visit '/' click_link 'Scrabble for Nihilists' click_link 'Edit' fill_in 'Name', :with => 'Scrabble for bad spelers' click_button 'Update Quiz' page.should have_content('Scrabble for bad spelers') end end
require 'spec_helper' describe "Quizzes" do %w(/ /quizzes).each do |path| it 'should redirect you to login' do visit path page.current_url.should == 'http://www.example.com/oauth2authorize' end end it 'shows a list of quizzes' do Factory :quiz login visit '/' page.should have_content('Scrabble for Nihilists') page.should have_content('47') page.should have_content('United States') end it 'says something when there are no quizzes' do login page.should have_content('There are no quizzes yet') end it 'allows you to create a new quiz' do login visit '/' click_link 'Create a new quiz' page.should have_content('New quiz') end # Advanced validation is tested in models/quiz_spec.rb. it 'does validation' do login stub_out_plus_discovery_document stub_out_current_user_profile visit new_quiz_path click_button 'Create Quiz' ['Name', 'Playlist', 'Country alpha2'].each do |field| page.should have_content("#{field} can't be blank") end end it 'lets you edit a quiz' do Factory :quiz login visit '/' click_link 'Scrabble for Nihilists' click_link 'Edit' fill_in 'Name', :with => 'Scrabble for bad spelers' click_button 'Update Quiz' page.should have_content('Scrabble for bad spelers') end end
Set the quiz owner to the user's Google+ profile ID
Set the quiz owner to the user's Google+ profile ID
Ruby
apache-2.0
jjinux/quizzimoto,jjinux/quizzimoto,jjinux/quizzimoto,JuanitoFatas/Quizzimoto,JuanitoFatas/Quizzimoto
ruby
## Code Before: require 'spec_helper' describe "Quizzes" do %w(/ /quizzes).each do |path| it 'should redirect you to login' do visit path page.current_url.should == 'http://www.example.com/oauth2authorize' end end it 'shows a list of quizzes' do Factory :quiz login visit '/' page.should have_content('Scrabble for Nihilists') page.should have_content('47') page.should have_content('United States') end it 'says something when there are no quizzes' do login page.should have_content('There are no quizzes yet') end it 'allows you to create a new quiz' do login visit '/' click_link 'Create a new quiz' page.should have_content('New quiz') end # Advanced validation is tested in models/quiz_spec.rb. it 'does validation' do login visit new_quiz_path click_button 'Create Quiz' ['Name', 'Owner', 'Playlist', 'Country alpha2'].each do |field| page.should have_content("#{field} can't be blank") end end it 'lets you edit a quiz' do Factory :quiz login visit '/' click_link 'Scrabble for Nihilists' click_link 'Edit' fill_in 'Name', :with => 'Scrabble for bad spelers' click_button 'Update Quiz' page.should have_content('Scrabble for bad spelers') end end ## Instruction: Set the quiz owner to the user's Google+ profile ID ## Code After: require 'spec_helper' describe "Quizzes" do %w(/ /quizzes).each do |path| it 'should redirect you to login' do visit path page.current_url.should == 'http://www.example.com/oauth2authorize' end end it 'shows a list of quizzes' do Factory :quiz login visit '/' page.should have_content('Scrabble for Nihilists') page.should have_content('47') page.should have_content('United States') end it 'says something when there are no quizzes' do login page.should have_content('There are no quizzes yet') end it 'allows you to create a new quiz' do login visit '/' click_link 'Create a new quiz' page.should have_content('New quiz') end # Advanced validation is tested in models/quiz_spec.rb. it 'does validation' do login stub_out_plus_discovery_document stub_out_current_user_profile visit new_quiz_path click_button 'Create Quiz' ['Name', 'Playlist', 'Country alpha2'].each do |field| page.should have_content("#{field} can't be blank") end end it 'lets you edit a quiz' do Factory :quiz login visit '/' click_link 'Scrabble for Nihilists' click_link 'Edit' fill_in 'Name', :with => 'Scrabble for bad spelers' click_button 'Update Quiz' page.should have_content('Scrabble for bad spelers') end end
6a3503c725d1ed6e92c07c75a6221f178e357c99
CHANGELOG.md
CHANGELOG.md
* ### 0.0.4 * Add request retry support (Daniel Brain) ### 0.0.3 * Add no-proxy hosts support to proxy * Fix proxy to fallback to HTTP_PROXY when http_proxy doesn't exist ### 0.0.2 * Set rejectUnauthorized default to false * Modify default timeout to 30 seconds ### 0.0.1 * Initial version, extracted from cliffano/bagofholding
* Add custom error handler and error codes matching to retry support (Daniel Brain) ### 0.0.4 * Add request retry support (Daniel Brain) ### 0.0.3 * Add no-proxy hosts support to proxy * Fix proxy to fallback to HTTP_PROXY when http_proxy doesn't exist ### 0.0.2 * Set rejectUnauthorized default to false * Modify default timeout to 30 seconds ### 0.0.1 * Initial version, extracted from cliffano/bagofholding
Add note on error handler and error codes matching.
Add note on error handler and error codes matching.
Markdown
mit
cliffano/bagofrequest
markdown
## Code Before: * ### 0.0.4 * Add request retry support (Daniel Brain) ### 0.0.3 * Add no-proxy hosts support to proxy * Fix proxy to fallback to HTTP_PROXY when http_proxy doesn't exist ### 0.0.2 * Set rejectUnauthorized default to false * Modify default timeout to 30 seconds ### 0.0.1 * Initial version, extracted from cliffano/bagofholding ## Instruction: Add note on error handler and error codes matching. ## Code After: * Add custom error handler and error codes matching to retry support (Daniel Brain) ### 0.0.4 * Add request retry support (Daniel Brain) ### 0.0.3 * Add no-proxy hosts support to proxy * Fix proxy to fallback to HTTP_PROXY when http_proxy doesn't exist ### 0.0.2 * Set rejectUnauthorized default to false * Modify default timeout to 30 seconds ### 0.0.1 * Initial version, extracted from cliffano/bagofholding
024018301cf7492d3fd8b82cfae56148ffe674d6
tasks/git-sync.sh
tasks/git-sync.sh
source $GOPHER_INSTALLDIR/lib/gopherbot_v1.sh if [ $# -lt 3 ] then echo "Not enough arguments to git-sync; usage: git-sync <url> <branch> <dir> (true)" >&2 exit 1 fi # git-sync.sh - clone or update a git repository and optionally set the # working directory REPO_URL=$1 BRANCH=$2 REPO_DIR=$3 SET_WD=$4 if [ -n "$SET_WD" ] then SetWorkingDirectory "$REPO_DIR" fi SetParameter "GOPHER_JOB_DIR" "$REPO_DIR" mkdir -p $REPO_DIR cd $REPO_DIR if [ -e .git ] then git fetch git checkout $BRANCH git pull else git clone $REPO_URL . git checkout $BRANCH fi
source $GOPHER_INSTALLDIR/lib/gopherbot_v1.sh if [ $# -lt 3 ] then echo "Not enough arguments to git-sync; usage: git-sync <url> <branch> <dir> (true)" >&2 exit 1 fi # git-sync.sh - clone or update a git repository and optionally set the # working directory REPO_URL=$1 BRANCH=$2 REPO_DIR=$3 SET_WD=$4 mkdir -p $REPO_DIR cd $REPO_DIR if [ -n "$SET_WD" ] then SetWorkingDirectory "$REPO_DIR" fi SetParameter "GOPHER_JOB_DIR" "$REPO_DIR" if [ -e .git ] then git fetch git checkout $BRANCH git pull else git clone $REPO_URL . git checkout $BRANCH fi
Create wd path before SetWorkingDirectory
Create wd path before SetWorkingDirectory
Shell
mit
parsley42/gopherbot,uva-its/gopherbot,uva-its/gopherbot,parsley42/gopherbot,parsley42/gopherbot,uva-its/gopherbot,parsley42/gopherbot,uva-its/gopherbot
shell
## Code Before: source $GOPHER_INSTALLDIR/lib/gopherbot_v1.sh if [ $# -lt 3 ] then echo "Not enough arguments to git-sync; usage: git-sync <url> <branch> <dir> (true)" >&2 exit 1 fi # git-sync.sh - clone or update a git repository and optionally set the # working directory REPO_URL=$1 BRANCH=$2 REPO_DIR=$3 SET_WD=$4 if [ -n "$SET_WD" ] then SetWorkingDirectory "$REPO_DIR" fi SetParameter "GOPHER_JOB_DIR" "$REPO_DIR" mkdir -p $REPO_DIR cd $REPO_DIR if [ -e .git ] then git fetch git checkout $BRANCH git pull else git clone $REPO_URL . git checkout $BRANCH fi ## Instruction: Create wd path before SetWorkingDirectory ## Code After: source $GOPHER_INSTALLDIR/lib/gopherbot_v1.sh if [ $# -lt 3 ] then echo "Not enough arguments to git-sync; usage: git-sync <url> <branch> <dir> (true)" >&2 exit 1 fi # git-sync.sh - clone or update a git repository and optionally set the # working directory REPO_URL=$1 BRANCH=$2 REPO_DIR=$3 SET_WD=$4 mkdir -p $REPO_DIR cd $REPO_DIR if [ -n "$SET_WD" ] then SetWorkingDirectory "$REPO_DIR" fi SetParameter "GOPHER_JOB_DIR" "$REPO_DIR" if [ -e .git ] then git fetch git checkout $BRANCH git pull else git clone $REPO_URL . git checkout $BRANCH fi
f8b04127fb177532f1f117816c4d6bc243af7ec0
README.md
README.md
A handful of rendering and game demos. ## Support ## This project officially supports Windows 7 and Ubuntu 16.04+. ## Requirements ## ### Ubuntu ### * CMake 3.6+ * Clang 3.6+ * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ### Windows 7 ### * CMake 3.6+ * Visual Studio 2015 * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ## Demo Previews ## ### Demo 1 - Simple Blinn-Phong Renderer ### Renders models as solid gray objects that are lit using the Blinn-Phong shading method. There are no controls. ![](http://i.imgur.com/YFlAEFd.png=150x100) ![](http://i.imgur.com/YilEqRU.png=150x100)
A handful of rendering and game demos. ## Support ## This project officially supports Windows 7 and Ubuntu 16.04+. ## Requirements ## ### Ubuntu ### * CMake 3.6+ * Clang 3.6+ * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ### Windows 7 ### * CMake 3.6+ * Visual Studio 2015 * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ## Demo Previews ## ### Demo 1 - Simple Blinn-Phong Renderer ### Renders models as solid gray objects that are lit using the Blinn-Phong shading method. There are no controls. <img src="http://i.imgur.com/YFlAEFd.png" width="150" height="100" /> <img src="http://i.imgur.com/YilEqRU.png" width="150" height="100" />
Use html since github markdown does not support image resizing.
Use html since github markdown does not support image resizing.
Markdown
mit
invaderjon/demo,invaderjon/demo
markdown
## Code Before: A handful of rendering and game demos. ## Support ## This project officially supports Windows 7 and Ubuntu 16.04+. ## Requirements ## ### Ubuntu ### * CMake 3.6+ * Clang 3.6+ * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ### Windows 7 ### * CMake 3.6+ * Visual Studio 2015 * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ## Demo Previews ## ### Demo 1 - Simple Blinn-Phong Renderer ### Renders models as solid gray objects that are lit using the Blinn-Phong shading method. There are no controls. ![](http://i.imgur.com/YFlAEFd.png=150x100) ![](http://i.imgur.com/YilEqRU.png=150x100) ## Instruction: Use html since github markdown does not support image resizing. ## Code After: A handful of rendering and game demos. ## Support ## This project officially supports Windows 7 and Ubuntu 16.04+. ## Requirements ## ### Ubuntu ### * CMake 3.6+ * Clang 3.6+ * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ### Windows 7 ### * CMake 3.6+ * Visual Studio 2015 * Git 2.5.0+ * OpenGL * GLFW 3 * GLM * Assimp 2.0+ ## Demo Previews ## ### Demo 1 - Simple Blinn-Phong Renderer ### Renders models as solid gray objects that are lit using the Blinn-Phong shading method. There are no controls. <img src="http://i.imgur.com/YFlAEFd.png" width="150" height="100" /> <img src="http://i.imgur.com/YilEqRU.png" width="150" height="100" />
fa25ecdee9b89b58a9e1cfe0a982f18694fd6cb6
omnibus/files/private-chef-cookbooks/private-chef/metadata.rb
omnibus/files/private-chef-cookbooks/private-chef/metadata.rb
name "private-chef" maintainer "Opscode, Inc." maintainer_email "cookbooks@chef.io" license "Apache 2.0" description "Installs and configures Chef Server from Omnibus" long_description "Installs and configures Chef Server from Omnibus" version "0.1.0" recipe "chef-server", "Configures the Chef Server from Omnibus" %w{ ubuntu debian redhat centos oracle scientific fedora amazon }.each do |os| supports os end depends 'enterprise' # grabbed via Berkshelf + Git depends 'apt' depends 'yum', '~> 3.0' depends 'openssl', '>= 4.4'
name "private-chef" maintainer "Opscode, Inc." maintainer_email "cookbooks@chef.io" license "Apache 2.0" description "Installs and configures Chef Server from Omnibus" long_description "Installs and configures Chef Server from Omnibus" version "0.1.0" recipe "chef-server", "Configures the Chef Server from Omnibus" %w{ ubuntu debian redhat centos oracle scientific fedora amazon }.each do |os| supports os end depends 'enterprise' # grabbed via Berkshelf + Git depends 'openssl', '>= 4.4'
Remove apt and yum dependencies
[cookbooks] Remove apt and yum dependencies These cookbooks appear unused in the private-chef cookbooks. These were previously used to install the add-on repository; however, that functionality was changed in 9d10dac3d3933503211217968449c38657e0f7a6 to use mixlib-install. Signed-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io>
Ruby
apache-2.0
chef/chef-server,chef/chef-server,juliandunn/chef-server-1,chef/chef-server,chef/chef-server,juliandunn/chef-server-1,juliandunn/chef-server-1,chef/chef-server,chef/chef-server,juliandunn/chef-server-1,juliandunn/chef-server-1
ruby
## Code Before: name "private-chef" maintainer "Opscode, Inc." maintainer_email "cookbooks@chef.io" license "Apache 2.0" description "Installs and configures Chef Server from Omnibus" long_description "Installs and configures Chef Server from Omnibus" version "0.1.0" recipe "chef-server", "Configures the Chef Server from Omnibus" %w{ ubuntu debian redhat centos oracle scientific fedora amazon }.each do |os| supports os end depends 'enterprise' # grabbed via Berkshelf + Git depends 'apt' depends 'yum', '~> 3.0' depends 'openssl', '>= 4.4' ## Instruction: [cookbooks] Remove apt and yum dependencies These cookbooks appear unused in the private-chef cookbooks. These were previously used to install the add-on repository; however, that functionality was changed in 9d10dac3d3933503211217968449c38657e0f7a6 to use mixlib-install. Signed-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io> ## Code After: name "private-chef" maintainer "Opscode, Inc." maintainer_email "cookbooks@chef.io" license "Apache 2.0" description "Installs and configures Chef Server from Omnibus" long_description "Installs and configures Chef Server from Omnibus" version "0.1.0" recipe "chef-server", "Configures the Chef Server from Omnibus" %w{ ubuntu debian redhat centos oracle scientific fedora amazon }.each do |os| supports os end depends 'enterprise' # grabbed via Berkshelf + Git depends 'openssl', '>= 4.4'
2f71b7ced3a447a79ca2a00daae394c6c00fb8d1
.travis.yml
.travis.yml
language: c os: linux sudo: false dist: trusty compiler: gcc addons: apt: packages: - ninja-build - realpath - lua5.2 - pasmo - libz80ex-dev script: - ninja
language: c os: linux sudo: false dist: trusty compiler: gcc addons: apt: packages: - ninja-build - realpath - lua5.2 - pasmo - libz80ex-dev - lemon script: - make
Update Travis file to hopefully work.
Update Travis file to hopefully work. --HG-- branch : master
YAML
bsd-2-clause
davidgiven/cowgol,davidgiven/cowgol
yaml
## Code Before: language: c os: linux sudo: false dist: trusty compiler: gcc addons: apt: packages: - ninja-build - realpath - lua5.2 - pasmo - libz80ex-dev script: - ninja ## Instruction: Update Travis file to hopefully work. --HG-- branch : master ## Code After: language: c os: linux sudo: false dist: trusty compiler: gcc addons: apt: packages: - ninja-build - realpath - lua5.2 - pasmo - libz80ex-dev - lemon script: - make
b9b36ee9934f3811a76f7dbcd1c176621b700e0e
Casks/intellij-idea12.rb
Casks/intellij-idea12.rb
cask :v1 => 'intellij-idea12' do version '12.1.7' sha256 '5fd6130f66e2a64a4083c77e4dc1efde153bee333ce729553f39d0b106508466' url "http://download.jetbrains.com/idea/ideaIU-#{version}.dmg" homepage 'https://www.jetbrains.com/idea/index.html' license :unknown app 'IntelliJ IDEA 12.app' end
cask :v1 => 'intellij-idea12' do version '12.1.7b' sha256 '4f98af36f7747323d6a83a8d758aa0d6f02f20faa5da5a9e5bd8b7856cfe429a' url "http://download.jetbrains.com/idea/ideaIU-#{version}.dmg" homepage 'https://www.jetbrains.com/idea/index.html' license :unknown app 'IntelliJ IDEA 12.app' end
Update the version of IntelliJ Ultimate 12 to 12.1.7b. The previous version (12.1.7) is no longer available from the Jetbrains website.
Update the version of IntelliJ Ultimate 12 to 12.1.7b. The previous version (12.1.7) is no longer available from the Jetbrains website.
Ruby
bsd-2-clause
chadcatlett/caskroom-homebrew-versions,elovelan/homebrew-versions,zsjohny/homebrew-versions,kstarsinic/homebrew-versions,n8henrie/homebrew-versions,pquentin/homebrew-versions,bimmlerd/homebrew-versions,tomschlick/homebrew-versions,lukaselmer/homebrew-versions,rkJun/homebrew-versions,dictcp/homebrew-versions,onewheelskyward/homebrew-versions,visualphoenix/homebrew-versions,lukasbestle/homebrew-versions,invl/homebrew-versions,coeligena/homebrew-verscustomized,noamross/homebrew-versions,nicday/homebrew-versions,zchee/homebrew-versions,3van/homebrew-versions,adjohnson916/homebrew-versions
ruby
## Code Before: cask :v1 => 'intellij-idea12' do version '12.1.7' sha256 '5fd6130f66e2a64a4083c77e4dc1efde153bee333ce729553f39d0b106508466' url "http://download.jetbrains.com/idea/ideaIU-#{version}.dmg" homepage 'https://www.jetbrains.com/idea/index.html' license :unknown app 'IntelliJ IDEA 12.app' end ## Instruction: Update the version of IntelliJ Ultimate 12 to 12.1.7b. The previous version (12.1.7) is no longer available from the Jetbrains website. ## Code After: cask :v1 => 'intellij-idea12' do version '12.1.7b' sha256 '4f98af36f7747323d6a83a8d758aa0d6f02f20faa5da5a9e5bd8b7856cfe429a' url "http://download.jetbrains.com/idea/ideaIU-#{version}.dmg" homepage 'https://www.jetbrains.com/idea/index.html' license :unknown app 'IntelliJ IDEA 12.app' end
899386089a4c75dcf520be1da09a64d3e8632f3a
packages/celltags-extension/src/index.ts
packages/celltags-extension/src/index.ts
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTools, INotebookTracker } from '@jupyterlab/notebook'; import { TagTool } from '@jupyterlab/celltags'; /** * Initialization data for the celltags extension. */ const celltags: JupyterFrontEndPlugin<void> = { id: 'celltags', autoStart: true, requires: [INotebookTools, INotebookTracker], activate: ( app: JupyterFrontEnd, tools: INotebookTools, tracker: INotebookTracker ) => { const tool = new TagTool(tracker, app); tools.addItem({ tool: tool, rank: 1.6 }); } }; export default celltags;
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTools, INotebookTracker } from '@jupyterlab/notebook'; import { TagTool } from '@jupyterlab/celltags'; /** * Initialization data for the celltags extension. */ const celltags: JupyterFrontEndPlugin<void> = { id: '@jupyterlab/celltags', autoStart: true, requires: [INotebookTools, INotebookTracker], activate: ( app: JupyterFrontEnd, tools: INotebookTools, tracker: INotebookTracker ) => { const tool = new TagTool(tracker, app); tools.addItem({ tool: tool, rank: 1.6 }); } }; export default celltags;
Rename the celltags plugin id
Rename the celltags plugin id
TypeScript
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
typescript
## Code Before: import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTools, INotebookTracker } from '@jupyterlab/notebook'; import { TagTool } from '@jupyterlab/celltags'; /** * Initialization data for the celltags extension. */ const celltags: JupyterFrontEndPlugin<void> = { id: 'celltags', autoStart: true, requires: [INotebookTools, INotebookTracker], activate: ( app: JupyterFrontEnd, tools: INotebookTools, tracker: INotebookTracker ) => { const tool = new TagTool(tracker, app); tools.addItem({ tool: tool, rank: 1.6 }); } }; export default celltags; ## Instruction: Rename the celltags plugin id ## Code After: import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application'; import { INotebookTools, INotebookTracker } from '@jupyterlab/notebook'; import { TagTool } from '@jupyterlab/celltags'; /** * Initialization data for the celltags extension. */ const celltags: JupyterFrontEndPlugin<void> = { id: '@jupyterlab/celltags', autoStart: true, requires: [INotebookTools, INotebookTracker], activate: ( app: JupyterFrontEnd, tools: INotebookTools, tracker: INotebookTracker ) => { const tool = new TagTool(tracker, app); tools.addItem({ tool: tool, rank: 1.6 }); } }; export default celltags;
247025b942be59f463d47d0fdbfb8d72a06f6300
hello-world-rest-interface-db-driven-with-spring-boot/src/main/resources/application.yml
hello-world-rest-interface-db-driven-with-spring-boot/src/main/resources/application.yml
spring: datasource: url: jdbc:mysql://localhost:3306/msa username: root # password: password driver-class-name: com.mysql.jdbc.Driver jpa: generate-ddl: true show-sql: true
spring: datasource: url: jdbc:mysql://localhost:3306/msa username: root password: root driver-class-name: com.mysql.jdbc.Driver jpa: generate-ddl: true show-sql: true server: port: 8082
Use a specified server port instead of the default.
Use a specified server port instead of the default.
YAML
mit
sanjeevsachdev/microservices-workshop,sanjeevsachdev/microservices-workshop
yaml
## Code Before: spring: datasource: url: jdbc:mysql://localhost:3306/msa username: root # password: password driver-class-name: com.mysql.jdbc.Driver jpa: generate-ddl: true show-sql: true ## Instruction: Use a specified server port instead of the default. ## Code After: spring: datasource: url: jdbc:mysql://localhost:3306/msa username: root password: root driver-class-name: com.mysql.jdbc.Driver jpa: generate-ddl: true show-sql: true server: port: 8082
5eabea682317fe53d89fcf1b2ec98a1f44de51d3
rt/syslog/simpleConfig.py
rt/syslog/simpleConfig.py
hostname_patterns = [ ['KEEP', '.*'] ] path_patterns = [ ['PKGS', r'.*\/test_record_pkg'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], ['SKIP', r'.*\/bash'], ['SKIP', r'.*\/collect2'], ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ]
hostname_patterns = [ ['KEEP', '.*'] ] path_patterns = [ ['PKGS', r'.*\/test_record_pkg'], ['PKGS', r'.*\/python[0-9][^/][^/]*'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], ['SKIP', r'.*\/bash'], ['SKIP', r'.*\/collect2'], ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ] python_pkg_patterns = [ { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"^[^/]" }, # SKIP all built-in packages { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r"^_" }, # SKIP names that start with a underscore { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r".*\." }, # SKIP all names that are divided with periods: a.b.c { 'k_s' : 'KEEP', 'kind' : 'path', 'patt' : r".*/.local/" }, # KEEP all packages installed by users { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"/home" }, # SKIP all other packages in user locations ]
Add in python patterns for py pkg test
Add in python patterns for py pkg test
Python
lgpl-2.1
xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt,xalt/xalt
python
## Code Before: hostname_patterns = [ ['KEEP', '.*'] ] path_patterns = [ ['PKGS', r'.*\/test_record_pkg'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], ['SKIP', r'.*\/bash'], ['SKIP', r'.*\/collect2'], ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ] ## Instruction: Add in python patterns for py pkg test ## Code After: hostname_patterns = [ ['KEEP', '.*'] ] path_patterns = [ ['PKGS', r'.*\/test_record_pkg'], ['PKGS', r'.*\/python[0-9][^/][^/]*'], ['SKIP', r'.*\/lua'], ['SKIP', r'.*\/expr'], ['SKIP', r'.*\/cc1'], ['SKIP', r'.*\/bash'], ['SKIP', r'.*\/collect2'], ['SKIP', r'.*\/mpich/.*'], ['SKIP', r'.*\/x86_64-linux-gnu.*'], ] python_pkg_patterns = [ { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"^[^/]" }, # SKIP all built-in packages { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r"^_" }, # SKIP names that start with a underscore { 'k_s' : 'SKIP', 'kind' : 'name', 'patt' : r".*\." }, # SKIP all names that are divided with periods: a.b.c { 'k_s' : 'KEEP', 'kind' : 'path', 'patt' : r".*/.local/" }, # KEEP all packages installed by users { 'k_s' : 'SKIP', 'kind' : 'path', 'patt' : r"/home" }, # SKIP all other packages in user locations ]
7a7729e9af8e91411526525c19c5d434609e0f21
logger.py
logger.py
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR] " + msg) class Logger(object): def __init__(self): self.logger_level = MSG_ALL def info(self, msg): if self.logger_level & MSG_INFO: logi(msg) def warning(self, msg): if self.logger_level & MSG_WARNING: logw(msg) def error(self, msg): if self.logger_level & MSG_ERROR: loge(msg) def verbose(self, msg): if self.logger_level & MSG_VERBOSE: logv(msg)
MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("\033[1;31m[ERROR] " + msg + "\033[m") class Logger(object): def __init__(self): self.logger_level = MSG_ALL def info(self, msg): if self.logger_level & MSG_INFO: logi(msg) def warning(self, msg): if self.logger_level & MSG_WARNING: logw(msg) def error(self, msg): if self.logger_level & MSG_ERROR: loge(msg) def verbose(self, msg): if self.logger_level & MSG_VERBOSE: logv(msg)
Add color for error message.
Add color for error message.
Python
mit
PyOCL/oclGA,PyOCL/OpenCLGA,PyOCL/OpenCLGA,PyOCL/oclGA,PyOCL/oclGA,PyOCL/TSP,PyOCL/TSP,PyOCL/oclGA,PyOCL/OpenCLGA
python
## Code Before: MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("[ERROR] " + msg) class Logger(object): def __init__(self): self.logger_level = MSG_ALL def info(self, msg): if self.logger_level & MSG_INFO: logi(msg) def warning(self, msg): if self.logger_level & MSG_WARNING: logw(msg) def error(self, msg): if self.logger_level & MSG_ERROR: loge(msg) def verbose(self, msg): if self.logger_level & MSG_VERBOSE: logv(msg) ## Instruction: Add color for error message. ## Code After: MSG_INFO = 0x01 MSG_WARNING = 0x02 MSG_ERROR = 0x04 MSG_VERBOSE = 0x08 MSG_ALL = MSG_INFO | MSG_WARNING | MSG_ERROR | MSG_VERBOSE def logi(msg): print("[INFO] " + msg) def logv(msg): print("[VERBOSE] " + msg) def logw(msg): print("[WARNING] " + msg) def loge(msg): print("\033[1;31m[ERROR] " + msg + "\033[m") class Logger(object): def __init__(self): self.logger_level = MSG_ALL def info(self, msg): if self.logger_level & MSG_INFO: logi(msg) def warning(self, msg): if self.logger_level & MSG_WARNING: logw(msg) def error(self, msg): if self.logger_level & MSG_ERROR: loge(msg) def verbose(self, msg): if self.logger_level & MSG_VERBOSE: logv(msg)
68f80981aab7d345dcefb1a7145ad5da15c226ff
.eslintrc.json
.eslintrc.json
{ "root": true, "env": { "node": true }, "extends": "airbnb/legacy", "rules": { "no-console": 0, "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], "valid-jsdoc": [2, { "requireReturn": false }] } }
{ "root": true, "env": { "node": true }, "extends": "airbnb/legacy", "rules": { "no-console": 0, "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], "valid-jsdoc": [2, { "requireReturn": false }], "vars-on-top": 1 } }
Change vars on top to warning, better for Express
Change vars on top to warning, better for Express [ci skip]
JSON
mit
ocean/higgins,ocean/higgins
json
## Code Before: { "root": true, "env": { "node": true }, "extends": "airbnb/legacy", "rules": { "no-console": 0, "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], "valid-jsdoc": [2, { "requireReturn": false }] } } ## Instruction: Change vars on top to warning, better for Express [ci skip] ## Code After: { "root": true, "env": { "node": true }, "extends": "airbnb/legacy", "rules": { "no-console": 0, "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], "valid-jsdoc": [2, { "requireReturn": false }], "vars-on-top": 1 } }
24de1c4cfceebdd1425821f0609bd56e46bc83b8
.travis.yml
.travis.yml
language: ruby services: - elasticsearch env: -ROOMS_DB_USER=root ROOMS_DB_DATABASE=nyu_rooms_test ROOMS_DB_HOST=localhost ROOMS_SECRET_TOKEN=dd6f1b6faf2511a744f3f08644e76edcb6be01d7019a6e62947e3a76a2c5f1ea7f3206af6bd0409ed222a56b2a53788da8de1d3528547889cc59c7dbc27f4503 ROOMS_COOKIE_DOMAIN=.local ROOMS_BONSAI_URL=http://localhost:9200 LOGIN_URL=https://dev.login.library.nyu.edu SSO_LOGOUT_PATH=/logout before_script: - sleep 30 - mysql -e 'create database nyu_rooms_test;' - bundle exec rake db:schema:load - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Room FORCE=true - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Reservation FORCE=true - sleep 30 rvm: - 2.0.0 - 2.1.5 - 2.2.5 notifications: email: - lib-webservices@nyu.edu sudo: false
language: ruby services: - elasticsearch env: -ROOMS_DB_USER=root ROOMS_DB_DATABASE=nyu_rooms_test ROOMS_DB_HOST=localhost ROOMS_SECRET_TOKEN=dd6f1b6faf2511a744f3f08644e76edcb6be01d7019a6e62947e3a76a2c5f1ea7f3206af6bd0409ed222a56b2a53788da8de1d3528547889cc59c7dbc27f4503 ROOMS_COOKIE_DOMAIN=.local ROOMS_BONSAI_URL=http://localhost:9200 LOGIN_URL=https://dev.login.library.nyu.edu SSO_LOGOUT_PATH=/logout before_script: - sleep 30 - mysql -e 'create database nyu_rooms_test;' - bundle exec rake db:schema:load - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Room FORCE=true - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Reservation FORCE=true - sleep 30 rvm: - 2.0.0 - 2.1.5 - 2.2.5 - 2.3.1 notifications: email: - lib-webservices@nyu.edu sudo: false
Add ruby version to Travis
Add ruby version to Travis
YAML
mit
NYULibraries/rooms,NYULibraries/rooms,NYULibraries/rooms,NYULibraries/rooms
yaml
## Code Before: language: ruby services: - elasticsearch env: -ROOMS_DB_USER=root ROOMS_DB_DATABASE=nyu_rooms_test ROOMS_DB_HOST=localhost ROOMS_SECRET_TOKEN=dd6f1b6faf2511a744f3f08644e76edcb6be01d7019a6e62947e3a76a2c5f1ea7f3206af6bd0409ed222a56b2a53788da8de1d3528547889cc59c7dbc27f4503 ROOMS_COOKIE_DOMAIN=.local ROOMS_BONSAI_URL=http://localhost:9200 LOGIN_URL=https://dev.login.library.nyu.edu SSO_LOGOUT_PATH=/logout before_script: - sleep 30 - mysql -e 'create database nyu_rooms_test;' - bundle exec rake db:schema:load - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Room FORCE=true - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Reservation FORCE=true - sleep 30 rvm: - 2.0.0 - 2.1.5 - 2.2.5 notifications: email: - lib-webservices@nyu.edu sudo: false ## Instruction: Add ruby version to Travis ## Code After: language: ruby services: - elasticsearch env: -ROOMS_DB_USER=root ROOMS_DB_DATABASE=nyu_rooms_test ROOMS_DB_HOST=localhost ROOMS_SECRET_TOKEN=dd6f1b6faf2511a744f3f08644e76edcb6be01d7019a6e62947e3a76a2c5f1ea7f3206af6bd0409ed222a56b2a53788da8de1d3528547889cc59c7dbc27f4503 ROOMS_COOKIE_DOMAIN=.local ROOMS_BONSAI_URL=http://localhost:9200 LOGIN_URL=https://dev.login.library.nyu.edu SSO_LOGOUT_PATH=/logout before_script: - sleep 30 - mysql -e 'create database nyu_rooms_test;' - bundle exec rake db:schema:load - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Room FORCE=true - RAILS_ENV=test bundle exec rake environment tire:import CLASS=Reservation FORCE=true - sleep 30 rvm: - 2.0.0 - 2.1.5 - 2.2.5 - 2.3.1 notifications: email: - lib-webservices@nyu.edu sudo: false
55bdbdb19069301bfa2a30e19d39f9329a772e84
src/js/disability-benefits/components/ClaimsDecision.jsx
src/js/disability-benefits/components/ClaimsDecision.jsx
import React from 'react'; class ClaimsDecision extends React.Component { render() { return ( <div className="claim-decision-is-ready usa-alert usa-alert-info claims-no-icon"> <h4>Your claim decision is ready</h4> <p>VA sent you a claim decision by U.S mail. Please allow up to 8 business days for it to arrive.</p> <p>Do you disagree with your claim decision? <a href="/disability-benefits/claims-appeal">File an appeal</a></p> <p>If you have new evidence to support your claim and have no yet appealed, you can ask VA to <a href="/disability-benefits/claims-process/claim-types/reopened-claim">Reopen your claim</a></p> </div> ); } } export default ClaimsDecision;
import React from 'react'; class ClaimsDecision extends React.Component { render() { return ( <div className="claim-decision-is-ready usa-alert usa-alert-info claims-no-icon"> <h4>Your claim decision is ready</h4> <p>We sent you a packet by U.S. mail that includes details of the decision or award. Please allow 7 business days for your packet to arrive before contacting a VA call center.</p> <p>Do you disagree with your claim decision? <a href="/disability-benefits/claims-appeal">File an appeal</a></p> <p>If you have new evidence to support your claim and have no yet appealed, you can ask VA to <a href="/disability-benefits/claims-process/claim-types/reopened-claim">Reopen your claim</a></p> </div> ); } } export default ClaimsDecision;
Update content for your claim decision is ready alert
Update content for your claim decision is ready alert
JSX
cc0-1.0
department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website
jsx
## Code Before: import React from 'react'; class ClaimsDecision extends React.Component { render() { return ( <div className="claim-decision-is-ready usa-alert usa-alert-info claims-no-icon"> <h4>Your claim decision is ready</h4> <p>VA sent you a claim decision by U.S mail. Please allow up to 8 business days for it to arrive.</p> <p>Do you disagree with your claim decision? <a href="/disability-benefits/claims-appeal">File an appeal</a></p> <p>If you have new evidence to support your claim and have no yet appealed, you can ask VA to <a href="/disability-benefits/claims-process/claim-types/reopened-claim">Reopen your claim</a></p> </div> ); } } export default ClaimsDecision; ## Instruction: Update content for your claim decision is ready alert ## Code After: import React from 'react'; class ClaimsDecision extends React.Component { render() { return ( <div className="claim-decision-is-ready usa-alert usa-alert-info claims-no-icon"> <h4>Your claim decision is ready</h4> <p>We sent you a packet by U.S. mail that includes details of the decision or award. Please allow 7 business days for your packet to arrive before contacting a VA call center.</p> <p>Do you disagree with your claim decision? <a href="/disability-benefits/claims-appeal">File an appeal</a></p> <p>If you have new evidence to support your claim and have no yet appealed, you can ask VA to <a href="/disability-benefits/claims-process/claim-types/reopened-claim">Reopen your claim</a></p> </div> ); } } export default ClaimsDecision;
0f515974cb85e1c948bbdaae7874fd853ce35e56
{{cookiecutter.project_slug}}/setup.cfg
{{cookiecutter.project_slug}}/setup.cfg
[flake8] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [pycodestyle] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] python_version = 3.7 check_untyped_defs = True ignore_errors = False ignore_missing_imports = True strict_optional = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True [mypy-*.migrations.*] # Django migrations should not produce any errors: ignore_errors = True
[flake8] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [pycodestyle] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] python_version = 3.7 check_untyped_defs = True ignore_missing_imports = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True [mypy.plugins.django-stubs] django_settings_module = config.settings.test [mypy-*.migrations.*] # Django migrations should not produce any errors: ignore_errors = True
Remove mypy defaults and set django-stubs setting
Remove mypy defaults and set django-stubs setting https://mypy.readthedocs.io/en/latest/config_file.html ignore_errors = False strict_optional = True Are both set to these values by default. No need to set them in the config. ```toml [mypy.plugins.django-stubs] django_settings_module = config.settings.local ``` mypy.plugins.django-stubs requires django_settings_module to be set. https://github.com/typeddjango/django-stubs#configuration
INI
bsd-3-clause
Parbhat/cookiecutter-django-foundation,Parbhat/cookiecutter-django-foundation,pydanny/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,ryankanno/cookiecutter-django,Parbhat/cookiecutter-django-foundation,pydanny/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-django,luzfcb/cookiecutter-django,pydanny/cookiecutter-django,ryankanno/cookiecutter-django,luzfcb/cookiecutter-django,trungdong/cookiecutter-django,luzfcb/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,luzfcb/cookiecutter-django,Parbhat/cookiecutter-django-foundation
ini
## Code Before: [flake8] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [pycodestyle] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] python_version = 3.7 check_untyped_defs = True ignore_errors = False ignore_missing_imports = True strict_optional = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True [mypy-*.migrations.*] # Django migrations should not produce any errors: ignore_errors = True ## Instruction: Remove mypy defaults and set django-stubs setting https://mypy.readthedocs.io/en/latest/config_file.html ignore_errors = False strict_optional = True Are both set to these values by default. No need to set them in the config. ```toml [mypy.plugins.django-stubs] django_settings_module = config.settings.local ``` mypy.plugins.django-stubs requires django_settings_module to be set. https://github.com/typeddjango/django-stubs#configuration ## Code After: [flake8] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [pycodestyle] max-line-length = 120 exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules [mypy] python_version = 3.7 check_untyped_defs = True ignore_missing_imports = True warn_unused_ignores = True warn_redundant_casts = True warn_unused_configs = True [mypy.plugins.django-stubs] django_settings_module = config.settings.test [mypy-*.migrations.*] # Django migrations should not produce any errors: ignore_errors = True
2d80e2a5aa3b6d5899f85e8fada998f5a96fa169
project_template/src/store.js
project_template/src/store.js
import { createStore, combineReducers } from "redux"; import { welcome } from "src/modules/welcome/reducer"; const rootReducer = combineReducers({ welcome // additional reducers would be added here }); const store = createStore( rootReducer, window.devToolsExtension ? window.devToolsExtension() : f => f ); export default store;
import { createStore, combineReducers } from "redux"; import { welcome } from "src/modules/welcome/reducer"; const rootReducer = combineReducers({ welcome // additional reducers would be added here }); const store = createStore( rootReducer, window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f ); export default store;
Update Redux DevTools Extension reference
Update Redux DevTools Extension reference
JavaScript
mit
kabisa/maji,kabisa/maji,kabisa/maji
javascript
## Code Before: import { createStore, combineReducers } from "redux"; import { welcome } from "src/modules/welcome/reducer"; const rootReducer = combineReducers({ welcome // additional reducers would be added here }); const store = createStore( rootReducer, window.devToolsExtension ? window.devToolsExtension() : f => f ); export default store; ## Instruction: Update Redux DevTools Extension reference ## Code After: import { createStore, combineReducers } from "redux"; import { welcome } from "src/modules/welcome/reducer"; const rootReducer = combineReducers({ welcome // additional reducers would be added here }); const store = createStore( rootReducer, window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f ); export default store;
f9d39f7008e220e038816cd4a39255fcc0a78729
_config.yml
_config.yml
url: http://emory-lits-labs.github.io/annotator-meltdown/
url: http://emory-lits-labs.github.io/annotator-meltdown/ exclude: ['node_modules']
Exclude node modules from jekyll site
Exclude node modules from jekyll site
YAML
apache-2.0
emory-lits-labs/annotator-meltdown,emory-lits-labs/annotator-meltdown
yaml
## Code Before: url: http://emory-lits-labs.github.io/annotator-meltdown/ ## Instruction: Exclude node modules from jekyll site ## Code After: url: http://emory-lits-labs.github.io/annotator-meltdown/ exclude: ['node_modules']
c3fea138dfd97ea2404e9861cd79f2098f457772
CONTRIBUTING.rst
CONTRIBUTING.rst
Contributing ============ Firstly, thank you for making it this far. We really appreciate anyone who even thinks about reporting an issue or helping out with the code or docs. It is kind of you to take the time. Please Provide a Comment Example -------------------------------- If you're having trouble with how the contents of a particular Doxygen comment are being processed then please provide an example of the comment in question. Ideally as a pull-request with additions to the `examples/specific` folder but feel free to provide the comment content in your issue instead. It really helps to accelerate development if we have examples to work from.
Contributing ============ Firstly, thank you for making it this far. We really appreciate anyone who even thinks about reporting an issue or helping out with the code or docs. It is kind of you to take the time. Please Provide an Example ------------------------- If you're having trouble with how the contents of a particular Doxygen comment or a particular set of code is being processed then please provide an example of the in question. Ideally as a pull-request with additions to the `examples/specific` folder but feel free to provide the comment content in your issue instead. It really helps to accelerate development if we have examples to work from. Feel Free to Keep Reminding Me ------------------------------ Honesty time! I am sorry that this is the case but I tend to get distracted and not give Breathe the attention it deserves. Please do keep reminding me about your issue if you would like it fixed. I'll try to be explicit if I really don't have the time to fix it in the immediate future, but if I've made some vague promise to look at it and you've heard nothing for 3 days then feel free to prod me again. It will get fixed faster if you do and I promise not to get upset :)
Add reminder section to contributing guidelines
Add reminder section to contributing guidelines
reStructuredText
bsd-3-clause
AnthonyTruchet/breathe,kirbyfan64/breathe,AnthonyTruchet/breathe,RR2DO2/breathe,kirbyfan64/breathe,kirbyfan64/breathe,RR2DO2/breathe,AnthonyTruchet/breathe,AnthonyTruchet/breathe,kirbyfan64/breathe
restructuredtext
## Code Before: Contributing ============ Firstly, thank you for making it this far. We really appreciate anyone who even thinks about reporting an issue or helping out with the code or docs. It is kind of you to take the time. Please Provide a Comment Example -------------------------------- If you're having trouble with how the contents of a particular Doxygen comment are being processed then please provide an example of the comment in question. Ideally as a pull-request with additions to the `examples/specific` folder but feel free to provide the comment content in your issue instead. It really helps to accelerate development if we have examples to work from. ## Instruction: Add reminder section to contributing guidelines ## Code After: Contributing ============ Firstly, thank you for making it this far. We really appreciate anyone who even thinks about reporting an issue or helping out with the code or docs. It is kind of you to take the time. Please Provide an Example ------------------------- If you're having trouble with how the contents of a particular Doxygen comment or a particular set of code is being processed then please provide an example of the in question. Ideally as a pull-request with additions to the `examples/specific` folder but feel free to provide the comment content in your issue instead. It really helps to accelerate development if we have examples to work from. Feel Free to Keep Reminding Me ------------------------------ Honesty time! I am sorry that this is the case but I tend to get distracted and not give Breathe the attention it deserves. Please do keep reminding me about your issue if you would like it fixed. I'll try to be explicit if I really don't have the time to fix it in the immediate future, but if I've made some vague promise to look at it and you've heard nothing for 3 days then feel free to prod me again. It will get fixed faster if you do and I promise not to get upset :)
7a0768898525eae077f6fe067ae285f667fda2ce
packages/un/unicode.yaml
packages/un/unicode.yaml
homepage: http://code.haskell.org/~thielema/unicode/ changelog-type: '' hash: b4e5c1f57f15f613d7d10f33922ac2e8c99da46a12e88b3f9563bd644f8c1a93 test-bench-deps: unicode: -any base: -any utility-ht: ! '>=0.0.1 && <0.1' containers: -any maintainer: Henning Thielemann <haskell@henning-thielemann.de> synopsis: Construct and transform unicode characters changelog: '' basic-deps: base: ! '>=4 && <5' containers: ! '>=0.4 && <0.6' all-versions: - '0.0' author: Henning Thielemann <haskell@henning-thielemann.de> latest: '0.0' description-type: haddock description: ! 'The package contains functions for construction of various characters like: * block graphic elements * frame elements * fractions * subscript and superscript characters Related packages: * @unicode-properties@: classifications such as lower case, graphical etc. * @rfc5051@: sorting of characters' license-name: BSD3
homepage: http://hub.darcs.net/thielema/unicode/ changelog-type: '' hash: 2812c0d35f6315e0e23ea9eb2483e74fed2186b842adad1d7c5240ba543c1e02 test-bench-deps: unicode: -any base: -any utility-ht: ! '>=0.0.1 && <0.1' containers: -any maintainer: Henning Thielemann <haskell@henning-thielemann.de> synopsis: Construct and transform unicode characters changelog: '' basic-deps: base: ! '>=4 && <5' semigroups: ! '>=0.1 && <1.0' containers: ! '>=0.4 && <0.6' all-versions: - '0.0' - '0.0.1' author: Henning Thielemann <haskell@henning-thielemann.de> latest: '0.0.1' description-type: haddock description: ! 'The package contains functions for construction of various characters like: * block graphic elements * frame elements * fractions * subscript and superscript characters Related packages: * @unicode-properties@: classifications such as lower case, graphical etc. * @rfc5051@: sorting of characters' license-name: BSD3
Update from Hackage at 2018-02-17T22:20:47Z
Update from Hackage at 2018-02-17T22:20:47Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: http://code.haskell.org/~thielema/unicode/ changelog-type: '' hash: b4e5c1f57f15f613d7d10f33922ac2e8c99da46a12e88b3f9563bd644f8c1a93 test-bench-deps: unicode: -any base: -any utility-ht: ! '>=0.0.1 && <0.1' containers: -any maintainer: Henning Thielemann <haskell@henning-thielemann.de> synopsis: Construct and transform unicode characters changelog: '' basic-deps: base: ! '>=4 && <5' containers: ! '>=0.4 && <0.6' all-versions: - '0.0' author: Henning Thielemann <haskell@henning-thielemann.de> latest: '0.0' description-type: haddock description: ! 'The package contains functions for construction of various characters like: * block graphic elements * frame elements * fractions * subscript and superscript characters Related packages: * @unicode-properties@: classifications such as lower case, graphical etc. * @rfc5051@: sorting of characters' license-name: BSD3 ## Instruction: Update from Hackage at 2018-02-17T22:20:47Z ## Code After: homepage: http://hub.darcs.net/thielema/unicode/ changelog-type: '' hash: 2812c0d35f6315e0e23ea9eb2483e74fed2186b842adad1d7c5240ba543c1e02 test-bench-deps: unicode: -any base: -any utility-ht: ! '>=0.0.1 && <0.1' containers: -any maintainer: Henning Thielemann <haskell@henning-thielemann.de> synopsis: Construct and transform unicode characters changelog: '' basic-deps: base: ! '>=4 && <5' semigroups: ! '>=0.1 && <1.0' containers: ! '>=0.4 && <0.6' all-versions: - '0.0' - '0.0.1' author: Henning Thielemann <haskell@henning-thielemann.de> latest: '0.0.1' description-type: haddock description: ! 'The package contains functions for construction of various characters like: * block graphic elements * frame elements * fractions * subscript and superscript characters Related packages: * @unicode-properties@: classifications such as lower case, graphical etc. * @rfc5051@: sorting of characters' license-name: BSD3
4e76d0e95005e51f9cba5070798cd2076445f74f
recipes/default.rb
recipes/default.rb
include_recipe "mono4::_#{node['platform_family']}" if platform_family?('rhel', 'fedora') include_recipe 'yum' include_recipe 'yum-epel' elsif platform_family?('debian') include_recipe 'apt' else raise "Platform #{node['platform']} not supported" end if node['mono4']['install_method'] == 'source' include_recipe 'mono4::_source' elsif node['mono4']['install_method'] == 'package' package "#{node['mono4']['package_name']}" do version node['mono4']['package_version'] action :install end else raise "Installation method #{node['mono4']['install_method']} not supported" end # know current versions: 3.2.8+dfsg-4ubuntu1.1, 4.0.1-0xamarin5
include_recipe "mono4::_#{node['platform_family']}" if platform_family?('rhel', 'fedora') include_recipe 'yum' include_recipe 'yum-epel' elsif platform_family?('debian') include_recipe 'apt' else raise "Platform #{node['platform']} not supported" end if node['mono4']['install_method'] == 'source' include_recipe 'mono4::_source' elsif node['mono4']['install_method'] == 'package' package node['mono4']['package_name'] do version node['mono4']['package_version'] action :install end else raise "Installation method #{node['mono4']['install_method']} not supported" end
Remove not required string interpolation
Remove not required string interpolation
Ruby
apache-2.0
shirhatti/mono4-coobook,stonevil/mono4-coobook
ruby
## Code Before: include_recipe "mono4::_#{node['platform_family']}" if platform_family?('rhel', 'fedora') include_recipe 'yum' include_recipe 'yum-epel' elsif platform_family?('debian') include_recipe 'apt' else raise "Platform #{node['platform']} not supported" end if node['mono4']['install_method'] == 'source' include_recipe 'mono4::_source' elsif node['mono4']['install_method'] == 'package' package "#{node['mono4']['package_name']}" do version node['mono4']['package_version'] action :install end else raise "Installation method #{node['mono4']['install_method']} not supported" end # know current versions: 3.2.8+dfsg-4ubuntu1.1, 4.0.1-0xamarin5 ## Instruction: Remove not required string interpolation ## Code After: include_recipe "mono4::_#{node['platform_family']}" if platform_family?('rhel', 'fedora') include_recipe 'yum' include_recipe 'yum-epel' elsif platform_family?('debian') include_recipe 'apt' else raise "Platform #{node['platform']} not supported" end if node['mono4']['install_method'] == 'source' include_recipe 'mono4::_source' elsif node['mono4']['install_method'] == 'package' package node['mono4']['package_name'] do version node['mono4']['package_version'] action :install end else raise "Installation method #{node['mono4']['install_method']} not supported" end
f750efdc3b088b8748d6ba3ff1d8e6e8a0510139
common/DbConst.js
common/DbConst.js
class DbConst { // no support for static contants, declare then after the class definition } DbConst.DB_NAME = "FormHistoryControl"; DbConst.DB_VERSION = 1; DbConst.DB_STORE_TEXT = 'text_history'; DbConst.DB_STORE_ELEM = 'elem_history'; DbConst.DB_TEXT_IDX_FIELD = 'by_fieldkey'; DbConst.DB_TEXT_IDX_NAME = 'by_name'; DbConst.DB_TEXT_IDX_LAST = 'by_last'; DbConst.DB_TEXT_IDX_HOST = 'by_host'; DbConst.DB_ELEM_IDX_FIELD = 'by_fieldkey'; DbConst.DB_ELEM_IDX_SAVED = 'by_saved';
class DbConst { // no support for static contants, declare then after the class definition } DbConst.DB_NAME = "FormHistoryControl"; DbConst.DB_VERSION = 1; DbConst.DB_STORE_TEXT = 'text_history'; DbConst.DB_STORE_ELEM = 'elem_history'; DbConst.DB_TEXT_IDX_FIELD = 'by_fieldkey'; DbConst.DB_TEXT_IDX_NAME = 'by_name'; DbConst.DB_TEXT_IDX_LAST = 'by_last'; DbConst.DB_TEXT_IDX_HOST = 'by_host'; DbConst.DB_TEXT_IDX_HOST_NAME = "by_host_plus_name"; DbConst.DB_ELEM_IDX_FIELD = 'by_fieldkey'; DbConst.DB_ELEM_IDX_SAVED = 'by_saved';
Enable storing multiple versions for the same multiline field
Enable storing multiple versions for the same multiline field
JavaScript
mit
stephanmahieu/formhistorycontrol-2,stephanmahieu/formhistorycontrol-2,stephanmahieu/formhistorycontrol-2
javascript
## Code Before: class DbConst { // no support for static contants, declare then after the class definition } DbConst.DB_NAME = "FormHistoryControl"; DbConst.DB_VERSION = 1; DbConst.DB_STORE_TEXT = 'text_history'; DbConst.DB_STORE_ELEM = 'elem_history'; DbConst.DB_TEXT_IDX_FIELD = 'by_fieldkey'; DbConst.DB_TEXT_IDX_NAME = 'by_name'; DbConst.DB_TEXT_IDX_LAST = 'by_last'; DbConst.DB_TEXT_IDX_HOST = 'by_host'; DbConst.DB_ELEM_IDX_FIELD = 'by_fieldkey'; DbConst.DB_ELEM_IDX_SAVED = 'by_saved'; ## Instruction: Enable storing multiple versions for the same multiline field ## Code After: class DbConst { // no support for static contants, declare then after the class definition } DbConst.DB_NAME = "FormHistoryControl"; DbConst.DB_VERSION = 1; DbConst.DB_STORE_TEXT = 'text_history'; DbConst.DB_STORE_ELEM = 'elem_history'; DbConst.DB_TEXT_IDX_FIELD = 'by_fieldkey'; DbConst.DB_TEXT_IDX_NAME = 'by_name'; DbConst.DB_TEXT_IDX_LAST = 'by_last'; DbConst.DB_TEXT_IDX_HOST = 'by_host'; DbConst.DB_TEXT_IDX_HOST_NAME = "by_host_plus_name"; DbConst.DB_ELEM_IDX_FIELD = 'by_fieldkey'; DbConst.DB_ELEM_IDX_SAVED = 'by_saved';
7da5738d37f3e8067359de13612b42e914a397ca
README.md
README.md
**Notice:** texit is no longer live. If you'd like to host it, please contact me via email at zach@zachlatta.com or create a GitHub issue. --- A simple web service that makes beautiful typesetting easy anywhere on the web. ## Usage ### Equations Get rendered SVG of provided LaTeX equation. http://tex.sh/tex/$<latex goes here>$ #### Markdown Example You'll have to escape backslashes and friends when using Markdown. ![Discrete Fourier Transform](http://tex.sh/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) becomes ![Example](http://tex.sh/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) ### Graphs Get a graph of a function: http://tex.sh/graph/x^2 Output: ![Basic Parabola](http://tex.sh/graph/x^2) #### Parameters Parameters are passed after the function to graph. http://tex.sh/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label This renders out to the following. ![Example Graph](http://tex.sh/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label) | Valid parameters | | ---------------- | | xmin | | xmax | | ymin | | ymax | | xlabel | | ylabel |
A simple web service that makes beautiful typesetting easy anywhere on the web. ## Usage ### Equations Get rendered SVG of provided LaTeX equation. https://texit.apps.zachlatta.com/tex/$<latex goes here>$ #### Markdown Example You'll have to escape backslashes and friends when using Markdown. ![Discrete Fourier Transform](https://texit.apps.zachlatta.com/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) becomes ![Example](https://texit.apps.zachlatta.com/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) ### Graphs Get a graph of a function: https://texit.apps.zachlatta.com/graph/x^2 Output: ![Basic Parabola](https://texit.apps.zachlatta.com/graph/x^2) #### Parameters Parameters are passed after the function to graph. https://texit.apps.zachlatta.com/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label This renders out to the following. ![Example Graph](https://texit.apps.zachlatta.com/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label) | Valid parameters | | ---------------- | | xmin | | xmax | | ymin | | ymax | | xlabel | | ylabel |
Deploy the application and fix example links.
Deploy the application and fix example links.
Markdown
mit
texit/texit,texit/texit,texit/texit,texit/texit
markdown
## Code Before: **Notice:** texit is no longer live. If you'd like to host it, please contact me via email at zach@zachlatta.com or create a GitHub issue. --- A simple web service that makes beautiful typesetting easy anywhere on the web. ## Usage ### Equations Get rendered SVG of provided LaTeX equation. http://tex.sh/tex/$<latex goes here>$ #### Markdown Example You'll have to escape backslashes and friends when using Markdown. ![Discrete Fourier Transform](http://tex.sh/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) becomes ![Example](http://tex.sh/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) ### Graphs Get a graph of a function: http://tex.sh/graph/x^2 Output: ![Basic Parabola](http://tex.sh/graph/x^2) #### Parameters Parameters are passed after the function to graph. http://tex.sh/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label This renders out to the following. ![Example Graph](http://tex.sh/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label) | Valid parameters | | ---------------- | | xmin | | xmax | | ymin | | ymax | | xlabel | | ylabel | ## Instruction: Deploy the application and fix example links. ## Code After: A simple web service that makes beautiful typesetting easy anywhere on the web. ## Usage ### Equations Get rendered SVG of provided LaTeX equation. https://texit.apps.zachlatta.com/tex/$<latex goes here>$ #### Markdown Example You'll have to escape backslashes and friends when using Markdown. ![Discrete Fourier Transform](https://texit.apps.zachlatta.com/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) becomes ![Example](https://texit.apps.zachlatta.com/tex/$\\sum_{i=-\\infty}^{\\infty} x[n] e^{-i\\omega t}$) ### Graphs Get a graph of a function: https://texit.apps.zachlatta.com/graph/x^2 Output: ![Basic Parabola](https://texit.apps.zachlatta.com/graph/x^2) #### Parameters Parameters are passed after the function to graph. https://texit.apps.zachlatta.com/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label This renders out to the following. ![Example Graph](https://texit.apps.zachlatta.com/graph/x^2,xmin=-5,xmax=+5,ymin=0,xlabel=label) | Valid parameters | | ---------------- | | xmin | | xmax | | ymin | | ymax | | xlabel | | ylabel |
87a5419d9717d641bf4c30740d2d431f4fd7a478
setup.py
setup.py
import os from setuptools import setup from setuptools import find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, "README.txt")).read() CHANGES = open(os.path.join(here, "CHANGES.txt")).read() requires = [ "pyramid", "SQLAlchemy", "transaction", "repoze.tm2", "zope.sqlalchemy"] entry_points = """ [paste.paster_create_template] pyramid_sqla=pyramid_sqla.paster_templates:PyramidSQLAProjectTemplate """ setup(name="pyramid_sqla", version="1.0rc1", description="A SQLAlchemy library and Pylons-like application template for Pyramid", long_description=README + "\n\n" + CHANGES, classifiers=[ "Intended Audience :: Developers", "Framework :: Pylons", "Programming Language :: Python", "License :: OSI Approved :: MIT License", ], keywords="web wsgi pylons pyramid", author="Mike Orr", author_email="sluggoster@gmail.com", url="http://docs.pylonshq.com", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require = requires, install_requires = requires, test_suite="pyramid_sqla", entry_points=entry_points, )
import os from setuptools import setup from setuptools import find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, "README.txt")).read() CHANGES = open(os.path.join(here, "CHANGES.txt")).read() requires = [ "pyramid", ] entry_points = """ [paste.paster_create_template] pyramid_sqla=pyramid_sqla.paster_templates:PyramidSQLAProjectTemplate """ setup(name="pyramid_sqla", version="1.0rc1", description="A SQLAlchemy library and Pylons-like application template for Pyramid", long_description=README + "\n\n" + CHANGES, classifiers=[ "Intended Audience :: Developers", "Framework :: Pylons", "Programming Language :: Python", "License :: OSI Approved :: MIT License", ], keywords="web wsgi pylons pyramid", author="Mike Orr", author_email="sluggoster@gmail.com", url="http://docs.pylonshq.com", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require = requires, install_requires = requires, test_suite="pyramid_sqla", entry_points=entry_points, )
Delete all formal dependencies except 'pyramid'.
Delete all formal dependencies except 'pyramid'.
Python
mit
Pylons/akhet,hlwsmith/akhet,Pylons/akhet,hlwsmith/akhet,hlwsmith/akhet
python
## Code Before: import os from setuptools import setup from setuptools import find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, "README.txt")).read() CHANGES = open(os.path.join(here, "CHANGES.txt")).read() requires = [ "pyramid", "SQLAlchemy", "transaction", "repoze.tm2", "zope.sqlalchemy"] entry_points = """ [paste.paster_create_template] pyramid_sqla=pyramid_sqla.paster_templates:PyramidSQLAProjectTemplate """ setup(name="pyramid_sqla", version="1.0rc1", description="A SQLAlchemy library and Pylons-like application template for Pyramid", long_description=README + "\n\n" + CHANGES, classifiers=[ "Intended Audience :: Developers", "Framework :: Pylons", "Programming Language :: Python", "License :: OSI Approved :: MIT License", ], keywords="web wsgi pylons pyramid", author="Mike Orr", author_email="sluggoster@gmail.com", url="http://docs.pylonshq.com", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require = requires, install_requires = requires, test_suite="pyramid_sqla", entry_points=entry_points, ) ## Instruction: Delete all formal dependencies except 'pyramid'. ## Code After: import os from setuptools import setup from setuptools import find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, "README.txt")).read() CHANGES = open(os.path.join(here, "CHANGES.txt")).read() requires = [ "pyramid", ] entry_points = """ [paste.paster_create_template] pyramid_sqla=pyramid_sqla.paster_templates:PyramidSQLAProjectTemplate """ setup(name="pyramid_sqla", version="1.0rc1", description="A SQLAlchemy library and Pylons-like application template for Pyramid", long_description=README + "\n\n" + CHANGES, classifiers=[ "Intended Audience :: Developers", "Framework :: Pylons", "Programming Language :: Python", "License :: OSI Approved :: MIT License", ], keywords="web wsgi pylons pyramid", author="Mike Orr", author_email="sluggoster@gmail.com", url="http://docs.pylonshq.com", license="MIT", packages=find_packages(), include_package_data=True, zip_safe=False, tests_require = requires, install_requires = requires, test_suite="pyramid_sqla", entry_points=entry_points, )
b9f0b9e3f4dfea13ccaa4754d3cd534b3743300d
lib/parsley_simple_form/simple_form_adapt.rb
lib/parsley_simple_form/simple_form_adapt.rb
module ParsleySimpleForm class SimpleFormAdapt < SimpleForm::FormBuilder map_type :presence_validation, to: ParsleySimpleForm::Validators::Presence map_type :length_validation, to: ParsleySimpleForm::Validators::Length map_type :numericality_validation, to: ParsleySimpleForm::Validators::Numericality map_type :inclusion_validation, to: ParsleySimpleForm::Validators::Inclusion # Add parsley attributes validation def input(attribute_name, options = {}, &block) options[:input_html] ||= {} parsley_validations = validations_for(attribute_name) options[:input_html].merge!(parsley_validations) super end private def validations_for(attribute_name) object_class.validators_on(attribute_name).each_with_object({}) do |validate, attributes| next unless klass = validate_constantize(validate.kind) attributes.merge! klass.new(object, validate, attribute_name).attribute_validate end end # This method will search get custom method, whether don't find get validation from ParsleySimpleForm def validate_constantize(validate_kind) get_custom_validation(validate_kind) || mappings["#{validate_kind}_validation".to_sym] || false end def get_custom_validation(klass) camelized = klass.to_s.camelize begin Object.const_get(camelized) rescue false end end def object_class object.class end end end
module ParsleySimpleForm class SimpleFormAdapt < SimpleForm::FormBuilder map_type :presence_validation, to: ParsleySimpleForm::Validators::Presence map_type :length_validation, to: ParsleySimpleForm::Validators::Length map_type :numericality_validation, to: ParsleySimpleForm::Validators::Numericality map_type :inclusion_validation, to: ParsleySimpleForm::Validators::Inclusion # Add parsley attributes validation def input(attribute_name, options = {}, &block) options[:input_html] ||= {} parsley_validations = validations_for(attribute_name) options[:input_html].merge!(parsley_validations) super end private def validations_for(attribute_name) object_class.validators_on(attribute_name).each_with_object({}) do |validate, attributes| next unless klass = validate_constantize(validate.kind) attributes.merge! klass.new(object, validate, attribute_name).attribute_validate end end # This method will search get custom method, whether don't find get validation from ParsleySimpleForm def validate_constantize(validate_kind) get_custom_validation(validate_kind) || mappings["#{validate_kind}_validation".to_sym] || false end def get_custom_validation(klass) camelized = ('validators/' + klass.to_s).camelize begin Object.const_get(camelized) rescue false end end def object_class object.class end end end
Add ability to search validator custom with module Validators::Custom
Add ability to search validator custom with module Validators::Custom
Ruby
mit
formaweb/parsley_simple_form
ruby
## Code Before: module ParsleySimpleForm class SimpleFormAdapt < SimpleForm::FormBuilder map_type :presence_validation, to: ParsleySimpleForm::Validators::Presence map_type :length_validation, to: ParsleySimpleForm::Validators::Length map_type :numericality_validation, to: ParsleySimpleForm::Validators::Numericality map_type :inclusion_validation, to: ParsleySimpleForm::Validators::Inclusion # Add parsley attributes validation def input(attribute_name, options = {}, &block) options[:input_html] ||= {} parsley_validations = validations_for(attribute_name) options[:input_html].merge!(parsley_validations) super end private def validations_for(attribute_name) object_class.validators_on(attribute_name).each_with_object({}) do |validate, attributes| next unless klass = validate_constantize(validate.kind) attributes.merge! klass.new(object, validate, attribute_name).attribute_validate end end # This method will search get custom method, whether don't find get validation from ParsleySimpleForm def validate_constantize(validate_kind) get_custom_validation(validate_kind) || mappings["#{validate_kind}_validation".to_sym] || false end def get_custom_validation(klass) camelized = klass.to_s.camelize begin Object.const_get(camelized) rescue false end end def object_class object.class end end end ## Instruction: Add ability to search validator custom with module Validators::Custom ## Code After: module ParsleySimpleForm class SimpleFormAdapt < SimpleForm::FormBuilder map_type :presence_validation, to: ParsleySimpleForm::Validators::Presence map_type :length_validation, to: ParsleySimpleForm::Validators::Length map_type :numericality_validation, to: ParsleySimpleForm::Validators::Numericality map_type :inclusion_validation, to: ParsleySimpleForm::Validators::Inclusion # Add parsley attributes validation def input(attribute_name, options = {}, &block) options[:input_html] ||= {} parsley_validations = validations_for(attribute_name) options[:input_html].merge!(parsley_validations) super end private def validations_for(attribute_name) object_class.validators_on(attribute_name).each_with_object({}) do |validate, attributes| next unless klass = validate_constantize(validate.kind) attributes.merge! klass.new(object, validate, attribute_name).attribute_validate end end # This method will search get custom method, whether don't find get validation from ParsleySimpleForm def validate_constantize(validate_kind) get_custom_validation(validate_kind) || mappings["#{validate_kind}_validation".to_sym] || false end def get_custom_validation(klass) camelized = ('validators/' + klass.to_s).camelize begin Object.const_get(camelized) rescue false end end def object_class object.class end end end
a8ba117f27dcbdac52d42a580c1c8bd0dd25a3d7
_config.yml
_config.yml
markdown: kramdown permalink: /blog/:year/:title/ relative_permalinks: true exclude: - CNAME - Gemfile - LICENSE - Rakefile - README.md - vendor/ layouts: ./_noita noita: name: Noita description: Jekyll theme built with Foundation author: name: Anatol Broder url: http://penibelst.de/ lang: en favicons: - /assets/2014/04/21/favicon-152.png topbar: toggle: Menu right: - name: About url: /about/ - name: Guide url: /guide/ - name: Blog url: /blog/ - name: Repository url: https://github.com/penibelst/jekyll-noita class: small button compress_html: clippings: [html, head, title, base, link, meta, style, body, article, section, nav, aside, h1, h2, h3, h4, h5, h6, hgroup, header, footer, address, p, hr, blockquote, ol, ul, li, dl, dt, dd, figure, figcaption, main, div, table, caption, colgroup, col, tbody, thead, tfoot, tr, td, th] endings: [html, head, body, li, dt, dd, p, rt, rp, optgroup, option, colgroup, caption, thead, tbody, tfoot, tr, td, th]
markdown: kramdown permalink: /blog/:year/:title/ relative_permalinks: true exclude: - CNAME - Gemfile - LICENSE - Rakefile - README.md - vendor/ - vnu/ - vnu.zip layouts: ./_noita noita: name: Noita description: Jekyll theme built with Foundation author: name: Anatol Broder url: http://penibelst.de/ lang: en favicons: - /assets/2014/04/21/favicon-152.png topbar: toggle: Menu right: - name: About url: /about/ - name: Guide url: /guide/ - name: Blog url: /blog/ - name: Repository url: https://github.com/penibelst/jekyll-noita class: small button compress_html: clippings: all endings: all comments: ["<!--", "-->"] ignore: envs: [travis]
Exclude vnu from the build
Exclude vnu from the build
YAML
mit
mariagwyn/jekyll-noita,penibelst/jekyll-noita,mariagwyn/jekyll-noita
yaml
## Code Before: markdown: kramdown permalink: /blog/:year/:title/ relative_permalinks: true exclude: - CNAME - Gemfile - LICENSE - Rakefile - README.md - vendor/ layouts: ./_noita noita: name: Noita description: Jekyll theme built with Foundation author: name: Anatol Broder url: http://penibelst.de/ lang: en favicons: - /assets/2014/04/21/favicon-152.png topbar: toggle: Menu right: - name: About url: /about/ - name: Guide url: /guide/ - name: Blog url: /blog/ - name: Repository url: https://github.com/penibelst/jekyll-noita class: small button compress_html: clippings: [html, head, title, base, link, meta, style, body, article, section, nav, aside, h1, h2, h3, h4, h5, h6, hgroup, header, footer, address, p, hr, blockquote, ol, ul, li, dl, dt, dd, figure, figcaption, main, div, table, caption, colgroup, col, tbody, thead, tfoot, tr, td, th] endings: [html, head, body, li, dt, dd, p, rt, rp, optgroup, option, colgroup, caption, thead, tbody, tfoot, tr, td, th] ## Instruction: Exclude vnu from the build ## Code After: markdown: kramdown permalink: /blog/:year/:title/ relative_permalinks: true exclude: - CNAME - Gemfile - LICENSE - Rakefile - README.md - vendor/ - vnu/ - vnu.zip layouts: ./_noita noita: name: Noita description: Jekyll theme built with Foundation author: name: Anatol Broder url: http://penibelst.de/ lang: en favicons: - /assets/2014/04/21/favicon-152.png topbar: toggle: Menu right: - name: About url: /about/ - name: Guide url: /guide/ - name: Blog url: /blog/ - name: Repository url: https://github.com/penibelst/jekyll-noita class: small button compress_html: clippings: all endings: all comments: ["<!--", "-->"] ignore: envs: [travis]
14836a955d0c9b8a2790cc295d94cdf660ee2d5f
lib/refinery_initializer.rb
lib/refinery_initializer.rb
REFINERY_ROOT = File.join File.dirname(__FILE__), '..' unless REFINERY_ROOT == RAILS_ROOT # e.g. only if we're in a gem. $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins" $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins/refinery/lib" require 'refinery' require 'refinery/initializer' end
dir_parts = (File.join File.dirname(__FILE__), '..').split(File::SEPARATOR) dir_parts = dir_parts[0..(dir_parts.length-3)] until dir_parts[dir_parts.length-1] != ".." REFINERY_ROOT = File.join dir_parts unless REFINERY_ROOT == RAILS_ROOT # e.g. only if we're in a gem. $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins" $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins/refinery/lib" require 'refinery' require 'refinery/initializer' end
Remove any dir/.. in REFINERY_ROOT which are ugly and useless.
Remove any dir/.. in REFINERY_ROOT which are ugly and useless.
Ruby
mit
mlinfoot/refinerycms,donabrams/refinerycms,SmartMedia/refinerycms-with-custom-icons,LytayTOUCH/refinerycms,mlinfoot/refinerycms,mkaplan9/refinerycms,bricesanchez/refinerycms,chrise86/refinerycms,mabras/refinerycms,mojarra/myrefinerycms,trevornez/refinerycms,kappiah/refinerycms,simi/refinerycms,simi/refinerycms,hoopla-software/refinerycms,SmartMedia/refinerycms-with-custom-icons,kelkoo-services/refinerycms,louim/refinerycms,Eric-Guo/refinerycms,anitagraham/refinerycms,hoopla-software/refinerycms,mobilityhouse/refinerycms,mlinfoot/refinerycms,johanb/refinerycms,refinery/refinerycms,Retimont/refinerycms,chrise86/refinerycms,aguzubiaga/refinerycms,bryanmtl/g-refinerycms,refinery/refinerycms,simi/refinerycms,anitagraham/refinerycms,hoopla-software/refinerycms,stefanspicer/refinerycms,stefanspicer/refinerycms,louim/refinerycms,donabrams/refinerycms,kelkoo-services/refinerycms,refinery/refinerycms,LytayTOUCH/refinerycms,sideci-sample/sideci-sample-refinerycms,LytayTOUCH/refinerycms,stakes/refinerycms,johanb/refinerycms,Retimont/refinerycms,johanb/refinerycms,KingLemuel/refinerycms,mobilityhouse/refinerycms,aguzubiaga/refinerycms,koa/refinerycms,trevornez/refinerycms,bricesanchez/refinerycms,bryanmtl/g-refinerycms,chrise86/refinerycms,simi/refinerycms,mojarra/myrefinerycms,clanplaid/wow.clanplaid.net,pcantrell/refinerycms,mabras/refinerycms,Eric-Guo/refinerycms,gwagener/refinerycms,KingLemuel/refinerycms,mkaplan9/refinerycms,Retimont/refinerycms,anitagraham/refinerycms,KingLemuel/refinerycms,kappiah/refinerycms,sideci-sample/sideci-sample-refinerycms,trevornez/refinerycms,kappiah/refinerycms,clanplaid/wow.clanplaid.net,gwagener/refinerycms,mkaplan9/refinerycms,aguzubiaga/refinerycms,gwagener/refinerycms,koa/refinerycms,mabras/refinerycms,stefanspicer/refinerycms,pcantrell/refinerycms,stakes/refinerycms,Eric-Guo/refinerycms
ruby
## Code Before: REFINERY_ROOT = File.join File.dirname(__FILE__), '..' unless REFINERY_ROOT == RAILS_ROOT # e.g. only if we're in a gem. $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins" $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins/refinery/lib" require 'refinery' require 'refinery/initializer' end ## Instruction: Remove any dir/.. in REFINERY_ROOT which are ugly and useless. ## Code After: dir_parts = (File.join File.dirname(__FILE__), '..').split(File::SEPARATOR) dir_parts = dir_parts[0..(dir_parts.length-3)] until dir_parts[dir_parts.length-1] != ".." REFINERY_ROOT = File.join dir_parts unless REFINERY_ROOT == RAILS_ROOT # e.g. only if we're in a gem. $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins" $LOAD_PATH.unshift "#{REFINERY_ROOT}/vendor/plugins/refinery/lib" require 'refinery' require 'refinery/initializer' end
9b37a3ea4bc3123ec9f8e2c8be7bd150768047a3
db/migrate/20170611131130_add_parliament_id_to_archived_petitions.rb
db/migrate/20170611131130_add_parliament_id_to_archived_petitions.rb
class AddParliamentIdToArchivedPetitions < ActiveRecord::Migration class Parliament < ActiveRecord::Base; end class ArchivedPetition < ActiveRecord::Base; end def up add_column :archived_petitions, :parliament_id, :integer add_index :archived_petitions, :parliament_id add_foreign_key :archived_petitions, :parliaments parliament = Parliament.create!( government: "Conservative – Liberal Democrat coalition", opening_at: "2010-05-18T00:00:00".in_time_zone, dissolution_at: "2015-03-30T23:59:59".in_time_zone, archived_at: "2015-07-20T00:00:00".in_time_zone ) ArchivedPetition.update_all(parliament_id: parliament.id) end def down remove_foreign_key :archived_petitions, :parliaments remove_column :archived_petitions, :parliament_id parliament = Parliament.find_by!(opening_at: "2010-05-18T00:00:00".in_time_zone) parliament.destroy end end
class AddParliamentIdToArchivedPetitions < ActiveRecord::Migration class Parliament < ActiveRecord::Base; end class ArchivedPetition < ActiveRecord::Base; end def up add_column :archived_petitions, :parliament_id, :integer add_index :archived_petitions, :parliament_id add_foreign_key :archived_petitions, :parliaments Parliament.reset_column_information ArchivedPetition.reset_column_information parliament = Parliament.create!( government: "Conservative – Liberal Democrat coalition", opening_at: "2010-05-18T00:00:00".in_time_zone, dissolution_at: "2015-03-30T23:59:59".in_time_zone, archived_at: "2015-07-20T00:00:00".in_time_zone ) ArchivedPetition.update_all(parliament_id: parliament.id) end def down remove_foreign_key :archived_petitions, :parliaments remove_column :archived_petitions, :parliament_id parliament = Parliament.find_by!(opening_at: "2010-05-18T00:00:00".in_time_zone) parliament.destroy end end
Reset column information in migration
Reset column information in migration When running `rake db:migrate` from scratch Rails will load the column information for a table and cache it so when the model is used a second time the column information is stale and a previously added column is not found. Fix this by resetting the column information before using the model(s).
Ruby
mit
alphagov/e-petitions,oskarpearson/e-petitions,unboxed/e-petitions,StatesOfJersey/e-petitions,unboxed/e-petitions,alphagov/e-petitions,StatesOfJersey/e-petitions,StatesOfJersey/e-petitions,joelanman/e-petitions,unboxed/e-petitions,StatesOfJersey/e-petitions,unboxed/e-petitions,joelanman/e-petitions,oskarpearson/e-petitions,oskarpearson/e-petitions,joelanman/e-petitions,alphagov/e-petitions,alphagov/e-petitions
ruby
## Code Before: class AddParliamentIdToArchivedPetitions < ActiveRecord::Migration class Parliament < ActiveRecord::Base; end class ArchivedPetition < ActiveRecord::Base; end def up add_column :archived_petitions, :parliament_id, :integer add_index :archived_petitions, :parliament_id add_foreign_key :archived_petitions, :parliaments parliament = Parliament.create!( government: "Conservative – Liberal Democrat coalition", opening_at: "2010-05-18T00:00:00".in_time_zone, dissolution_at: "2015-03-30T23:59:59".in_time_zone, archived_at: "2015-07-20T00:00:00".in_time_zone ) ArchivedPetition.update_all(parliament_id: parliament.id) end def down remove_foreign_key :archived_petitions, :parliaments remove_column :archived_petitions, :parliament_id parliament = Parliament.find_by!(opening_at: "2010-05-18T00:00:00".in_time_zone) parliament.destroy end end ## Instruction: Reset column information in migration When running `rake db:migrate` from scratch Rails will load the column information for a table and cache it so when the model is used a second time the column information is stale and a previously added column is not found. Fix this by resetting the column information before using the model(s). ## Code After: class AddParliamentIdToArchivedPetitions < ActiveRecord::Migration class Parliament < ActiveRecord::Base; end class ArchivedPetition < ActiveRecord::Base; end def up add_column :archived_petitions, :parliament_id, :integer add_index :archived_petitions, :parliament_id add_foreign_key :archived_petitions, :parliaments Parliament.reset_column_information ArchivedPetition.reset_column_information parliament = Parliament.create!( government: "Conservative – Liberal Democrat coalition", opening_at: "2010-05-18T00:00:00".in_time_zone, dissolution_at: "2015-03-30T23:59:59".in_time_zone, archived_at: "2015-07-20T00:00:00".in_time_zone ) ArchivedPetition.update_all(parliament_id: parliament.id) end def down remove_foreign_key :archived_petitions, :parliaments remove_column :archived_petitions, :parliament_id parliament = Parliament.find_by!(opening_at: "2010-05-18T00:00:00".in_time_zone) parliament.destroy end end
c51bd527554dd98d0a8328183bb79d4d44ba1181
app/views/rapidfire/questions/index.html.erb
app/views/rapidfire/questions/index.html.erb
<div class='container survey__edit'> <div class='section-header'> <h1> Editing Questions in <%= @question_group.name %></h1> <div class='survey__admin-tools'> <%= link_to "Preview Question Group", new_question_group_answer_group_path(@question_group) %> </div> </div> <div class='survey__questions-list'> <% if @questions.length > 1 %> <div class='survey__admin-tools'> <span>Drag to reorder questions. (Changes will be saved automatically.)</span> </div> <% end %> <ul class='list list--survey' data-sortable-questions='<%= @question_group.id %>'> <%= render partial: "question", collection: @questions %> </ul> <%= link_to "Add New Question", new_question_group_question_path(@question_group), :class => 'button button--no-margin' %> </div> </div>
<div class='container survey__edit'> <div class='section-header'> <h1> Editing Questions in <%= @question_group.name %></h1> <div class='survey__admin-tools'> <%= link_to "Preview Question Group", new_question_group_answer_group_path(@question_group) + '?preview' %> </div> </div> <div class='survey__questions-list'> <% if @questions.length > 1 %> <div class='survey__admin-tools'> <span>Drag to reorder questions. (Changes will be saved automatically.)</span> </div> <% end %> <ul class='list list--survey' data-sortable-questions='<%= @question_group.id %>'> <%= render partial: "question", collection: @questions %> </ul> <%= link_to "Add New Question", new_question_group_question_path(@question_group), :class => 'button button--no-margin' %> </div> </div>
Add ?preview to "Preview Question Group" link
Add ?preview to "Preview Question Group" link There's probably a better way to do this, but this works. Resolves #767
HTML+ERB
mit
majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,Wowu/WikiEduDashboard,alpha721/WikiEduDashboard,Wowu/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,MusikAnimal/WikiEduDashboard,sejalkhatri/WikiEduDashboard,majakomel/WikiEduDashboard,feelfreelinux/WikiEduDashboard,KarmaHater/WikiEduDashboard,MusikAnimal/WikiEduDashboard,sejalkhatri/WikiEduDashboard,Wowu/WikiEduDashboard,majakomel/WikiEduDashboard,feelfreelinux/WikiEduDashboard,KarmaHater/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,MusikAnimal/WikiEduDashboard,Wowu/WikiEduDashboard,MusikAnimal/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,majakomel/WikiEduDashboard,feelfreelinux/WikiEduDashboard,feelfreelinux/WikiEduDashboard
html+erb
## Code Before: <div class='container survey__edit'> <div class='section-header'> <h1> Editing Questions in <%= @question_group.name %></h1> <div class='survey__admin-tools'> <%= link_to "Preview Question Group", new_question_group_answer_group_path(@question_group) %> </div> </div> <div class='survey__questions-list'> <% if @questions.length > 1 %> <div class='survey__admin-tools'> <span>Drag to reorder questions. (Changes will be saved automatically.)</span> </div> <% end %> <ul class='list list--survey' data-sortable-questions='<%= @question_group.id %>'> <%= render partial: "question", collection: @questions %> </ul> <%= link_to "Add New Question", new_question_group_question_path(@question_group), :class => 'button button--no-margin' %> </div> </div> ## Instruction: Add ?preview to "Preview Question Group" link There's probably a better way to do this, but this works. Resolves #767 ## Code After: <div class='container survey__edit'> <div class='section-header'> <h1> Editing Questions in <%= @question_group.name %></h1> <div class='survey__admin-tools'> <%= link_to "Preview Question Group", new_question_group_answer_group_path(@question_group) + '?preview' %> </div> </div> <div class='survey__questions-list'> <% if @questions.length > 1 %> <div class='survey__admin-tools'> <span>Drag to reorder questions. (Changes will be saved automatically.)</span> </div> <% end %> <ul class='list list--survey' data-sortable-questions='<%= @question_group.id %>'> <%= render partial: "question", collection: @questions %> </ul> <%= link_to "Add New Question", new_question_group_question_path(@question_group), :class => 'button button--no-margin' %> </div> </div>
4096fb8c0d55b0e7b7fd273438d035dd54ec2332
includes/templates/simple.tpl
includes/templates/simple.tpl
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>{$browser_title}</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/mini-default.min.css" /> </head> <body> <main> <h1>{$page_title}</h1> {$page_body} <footer class="wrapper"> All business records are created by the Virginia State Corporation Commission, and are thus without copyright protection, so may be reused and reproduced freely, without seeking any form of permission from anybody. All other website content is published under <a href="http://opensource.org/licenses/MIT">the MIT license</a>. This website is an independent, private effort, created and run as a hobby, and is in no way affiliated with the Commonwealth of Virginia or the State Corporation Commission. <a href="https://github.com/openva/vabusinesses.org">All site source code is on GitHub</a>—pull requests welcome. </footer> </main> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>{$browser_title}</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/mini-default.min.css" /> </head> <body> <main> <h1>{$page_title}</h1> <article id="search"> <form method="get" action="/search/"> <label for="query">Search</label> <input type="text" size="50" name="query" id="query"> <input type="submit" value="Go"> </form> </article> {$page_body} <footer class="wrapper"> All business records are created by the Virginia State Corporation Commission, and are thus without copyright protection, so may be reused and reproduced freely, without seeking any form of permission from anybody. All other website content is published under <a href="http://opensource.org/licenses/MIT">the MIT license</a>. This website is an independent, private effort, created and run as a hobby, and is in no way affiliated with the Commonwealth of Virginia or the State Corporation Commission. <a href="https://github.com/openva/vabusinesses.org">All site source code is on GitHub</a>—pull requests welcome. </footer> </main> </body> </html>
Add a search box to every page
Add a search box to every page Closes #110.
Smarty
mit
openva/vabusinesses.org,openva/vabusinesses.org
smarty
## Code Before: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>{$browser_title}</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/mini-default.min.css" /> </head> <body> <main> <h1>{$page_title}</h1> {$page_body} <footer class="wrapper"> All business records are created by the Virginia State Corporation Commission, and are thus without copyright protection, so may be reused and reproduced freely, without seeking any form of permission from anybody. All other website content is published under <a href="http://opensource.org/licenses/MIT">the MIT license</a>. This website is an independent, private effort, created and run as a hobby, and is in no way affiliated with the Commonwealth of Virginia or the State Corporation Commission. <a href="https://github.com/openva/vabusinesses.org">All site source code is on GitHub</a>—pull requests welcome. </footer> </main> </body> </html> ## Instruction: Add a search box to every page Closes #110. ## Code After: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>{$browser_title}</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/mini-default.min.css" /> </head> <body> <main> <h1>{$page_title}</h1> <article id="search"> <form method="get" action="/search/"> <label for="query">Search</label> <input type="text" size="50" name="query" id="query"> <input type="submit" value="Go"> </form> </article> {$page_body} <footer class="wrapper"> All business records are created by the Virginia State Corporation Commission, and are thus without copyright protection, so may be reused and reproduced freely, without seeking any form of permission from anybody. All other website content is published under <a href="http://opensource.org/licenses/MIT">the MIT license</a>. This website is an independent, private effort, created and run as a hobby, and is in no way affiliated with the Commonwealth of Virginia or the State Corporation Commission. <a href="https://github.com/openva/vabusinesses.org">All site source code is on GitHub</a>—pull requests welcome. </footer> </main> </body> </html>
3c4b2a07c509c7031e7e914729982fc3431872d9
server.js
server.js
'use strict'; const express = require('express'); const app = express(); const path = require('path'); const twilio = require('twilio'); const bodyparser = require('body-parser'); const onConnect = require('./lib/socket').onConnect; const twilioRoute = require('./lib/twilio'); app.use(express.static(path.join(__dirname, 'public'))); app.use(bodyparser.json()); app.post('/twilio/response', twilio.webhook({ validate: false }), twilioRoute.response); const server = require('http').createServer(app); const io = require('socket.io')(server); server.listen(process.env.port || 3000); io.on('connection', onConnect);
'use strict'; const express = require('express'); const app = express(); const path = require('path'); const twilio = require('twilio'); const bodyparser = require('body-parser'); const onConnect = require('./lib/socket').onConnect; const twilioRoute = require('./lib/twilio'); app.use(express.static(path.join(__dirname, 'public'))); app.use(bodyparser.urlencoded({ extended: false })); app.post('/twilio/response', twilio.webhook({ validate: false }), twilioRoute.response); const server = require('http').createServer(app); const io = require('socket.io')(server); server.listen(process.env.port || 3000); io.on('connection', onConnect);
Switch json for url parser
Switch json for url parser
JavaScript
apache-2.0
peterjuras/askeighty,peterjuras/askeighty
javascript
## Code Before: 'use strict'; const express = require('express'); const app = express(); const path = require('path'); const twilio = require('twilio'); const bodyparser = require('body-parser'); const onConnect = require('./lib/socket').onConnect; const twilioRoute = require('./lib/twilio'); app.use(express.static(path.join(__dirname, 'public'))); app.use(bodyparser.json()); app.post('/twilio/response', twilio.webhook({ validate: false }), twilioRoute.response); const server = require('http').createServer(app); const io = require('socket.io')(server); server.listen(process.env.port || 3000); io.on('connection', onConnect); ## Instruction: Switch json for url parser ## Code After: 'use strict'; const express = require('express'); const app = express(); const path = require('path'); const twilio = require('twilio'); const bodyparser = require('body-parser'); const onConnect = require('./lib/socket').onConnect; const twilioRoute = require('./lib/twilio'); app.use(express.static(path.join(__dirname, 'public'))); app.use(bodyparser.urlencoded({ extended: false })); app.post('/twilio/response', twilio.webhook({ validate: false }), twilioRoute.response); const server = require('http').createServer(app); const io = require('socket.io')(server); server.listen(process.env.port || 3000); io.on('connection', onConnect);
5c6f950fcfba27fc913af5392d222400dcceee2f
node-iterator-shim.js
node-iterator-shim.js
export default function createNodeIterator(root, whatToShow, filter = null) { var iter = _create.call(window.document, root, whatToShow, filter, false); return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter; } function shim(iter, root) { var _referenceNode = root; var _pointerBeforeReferenceNode = true; return Object.create(NodeIterator.prototype, { root: { get: () => iter.root }, whatToShow: { get: () => iter.whatToShow }, filter: { get: () => iter.filter }, referenceNode: { get: () => _referenceNode }, pointerBeforeReferenceNode: { get: () => _pointerBeforeReferenceNode }, detach: { get: () => iter.detach }, nextNode: { value: () => { let result = iter.nextNode(); _pointerBeforeReferenceNode = false; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } }, previousNode: { value: () => { let result = iter.previousNode(); _pointerBeforeReferenceNode = true; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } } }); }
export default function createNodeIterator(root, whatToShow, filter = null) { let document = root.ownerDocument; var iter = document.createNodeIterator(root, whatToShow, filter, false); return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter; } function shim(iter, root) { var _referenceNode = root; var _pointerBeforeReferenceNode = true; return Object.create(NodeIterator.prototype, { root: { get: () => iter.root }, whatToShow: { get: () => iter.whatToShow }, filter: { get: () => iter.filter }, referenceNode: { get: () => _referenceNode }, pointerBeforeReferenceNode: { get: () => _pointerBeforeReferenceNode }, detach: { get: () => iter.detach }, nextNode: { value: () => { let result = iter.nextNode(); _pointerBeforeReferenceNode = false; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } }, previousNode: { value: () => { let result = iter.previousNode(); _pointerBeforeReferenceNode = true; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } } }); }
Fix bad invocation of old, dead code
Fix bad invocation of old, dead code
JavaScript
mit
tilgovi/node-iterator-shim,tilgovi/dom-node-iterator
javascript
## Code Before: export default function createNodeIterator(root, whatToShow, filter = null) { var iter = _create.call(window.document, root, whatToShow, filter, false); return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter; } function shim(iter, root) { var _referenceNode = root; var _pointerBeforeReferenceNode = true; return Object.create(NodeIterator.prototype, { root: { get: () => iter.root }, whatToShow: { get: () => iter.whatToShow }, filter: { get: () => iter.filter }, referenceNode: { get: () => _referenceNode }, pointerBeforeReferenceNode: { get: () => _pointerBeforeReferenceNode }, detach: { get: () => iter.detach }, nextNode: { value: () => { let result = iter.nextNode(); _pointerBeforeReferenceNode = false; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } }, previousNode: { value: () => { let result = iter.previousNode(); _pointerBeforeReferenceNode = true; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } } }); } ## Instruction: Fix bad invocation of old, dead code ## Code After: export default function createNodeIterator(root, whatToShow, filter = null) { let document = root.ownerDocument; var iter = document.createNodeIterator(root, whatToShow, filter, false); return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter; } function shim(iter, root) { var _referenceNode = root; var _pointerBeforeReferenceNode = true; return Object.create(NodeIterator.prototype, { root: { get: () => iter.root }, whatToShow: { get: () => iter.whatToShow }, filter: { get: () => iter.filter }, referenceNode: { get: () => _referenceNode }, pointerBeforeReferenceNode: { get: () => _pointerBeforeReferenceNode }, detach: { get: () => iter.detach }, nextNode: { value: () => { let result = iter.nextNode(); _pointerBeforeReferenceNode = false; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } }, previousNode: { value: () => { let result = iter.previousNode(); _pointerBeforeReferenceNode = true; if (result === null) { return null; } else { _referenceNode = result; return _referenceNode; } } } }); }
0c66e645db9802f1d285e1cf5805a62ad27f82ee
pontoon/base/templates/project_selector.html
pontoon/base/templates/project_selector.html
{% if projects|length > 0 %} <!-- Project input/select --> <div class="project select"> <div class="button breadcrumbs selector"> {% if project and project.name != '' %} <span class="title" data-slug="{{ project.slug }}">{{ project.name }}</span> {% else %} <span class="title">Select website</span> {% endif %} </div> <div class="menu"> <div class="search-wrapper clearfix"> <div class="icon fa fa-search"></div> <input type="search" autocomplete="off"> </div> <ul> {% for project in projects %} <li class="clearfix"> <span class="project-name" data-slug="{{ project.slug }}" data-locales="{% for l in project.locales.all() %}{{ l.code|lower }}{% if not loop.last %},{% endif %}{% endfor %}" data-parts="{{ project.parts }}">{{ project.name }}</span> <span class="project-url">{{ project.url }}</span> </li> {% endfor %} <li class="no-match">No results</li> </ul> </div> </div> {% endif %}
{% if projects|length > 0 %} <!-- Project input/select --> <div class="project select"> <div class="button breadcrumbs selector"> {% if project and project.name != '' %} <span class="title" data-slug="{{ project.slug }}">{{ project.name }}</span> {% else %} <span class="title">Select website</span> {% endif %} </div> <div class="menu"> <div class="search-wrapper clearfix"> <div class="icon fa fa-search"></div> <input type="search" autocomplete="off"> </div> <ul> {% for project in projects.order_by("name") %} <li class="clearfix"> <span class="project-name" data-slug="{{ project.slug }}" data-locales="{% for l in project.locales.all() %}{{ l.code|lower }}{% if not loop.last %},{% endif %}{% endfor %}" data-parts="{{ project.parts }}">{{ project.name }}</span> <span class="project-url">{{ project.url }}</span> </li> {% endfor %} <li class="no-match">No results</li> </ul> </div> </div> {% endif %}
Sort projects in the projects menu alphabetically
Sort projects in the projects menu alphabetically
HTML
bsd-3-clause
Jobava/mirror-pontoon,Osmose/pontoon,jotes/pontoon,yfdyh000/pontoon,Jobava/mirror-pontoon,vivekanand1101/pontoon,m8ttyB/pontoon,mozilla/pontoon,mastizada/pontoon,m8ttyB/pontoon,vivekanand1101/pontoon,mozilla/pontoon,Osmose/pontoon,mozilla/pontoon,jotes/pontoon,participedia/pontoon,jotes/pontoon,participedia/pontoon,participedia/pontoon,mathjazz/pontoon,mathjazz/pontoon,Osmose/pontoon,m8ttyB/pontoon,Jobava/mirror-pontoon,mastizada/pontoon,yfdyh000/pontoon,m8ttyB/pontoon,Jobava/mirror-pontoon,mozilla/pontoon,mastizada/pontoon,sudheesh001/pontoon,participedia/pontoon,Osmose/pontoon,sudheesh001/pontoon,mathjazz/pontoon,vivekanand1101/pontoon,mathjazz/pontoon,yfdyh000/pontoon,jotes/pontoon,vivekanand1101/pontoon,mathjazz/pontoon,sudheesh001/pontoon,yfdyh000/pontoon,sudheesh001/pontoon,mozilla/pontoon,mastizada/pontoon
html
## Code Before: {% if projects|length > 0 %} <!-- Project input/select --> <div class="project select"> <div class="button breadcrumbs selector"> {% if project and project.name != '' %} <span class="title" data-slug="{{ project.slug }}">{{ project.name }}</span> {% else %} <span class="title">Select website</span> {% endif %} </div> <div class="menu"> <div class="search-wrapper clearfix"> <div class="icon fa fa-search"></div> <input type="search" autocomplete="off"> </div> <ul> {% for project in projects %} <li class="clearfix"> <span class="project-name" data-slug="{{ project.slug }}" data-locales="{% for l in project.locales.all() %}{{ l.code|lower }}{% if not loop.last %},{% endif %}{% endfor %}" data-parts="{{ project.parts }}">{{ project.name }}</span> <span class="project-url">{{ project.url }}</span> </li> {% endfor %} <li class="no-match">No results</li> </ul> </div> </div> {% endif %} ## Instruction: Sort projects in the projects menu alphabetically ## Code After: {% if projects|length > 0 %} <!-- Project input/select --> <div class="project select"> <div class="button breadcrumbs selector"> {% if project and project.name != '' %} <span class="title" data-slug="{{ project.slug }}">{{ project.name }}</span> {% else %} <span class="title">Select website</span> {% endif %} </div> <div class="menu"> <div class="search-wrapper clearfix"> <div class="icon fa fa-search"></div> <input type="search" autocomplete="off"> </div> <ul> {% for project in projects.order_by("name") %} <li class="clearfix"> <span class="project-name" data-slug="{{ project.slug }}" data-locales="{% for l in project.locales.all() %}{{ l.code|lower }}{% if not loop.last %},{% endif %}{% endfor %}" data-parts="{{ project.parts }}">{{ project.name }}</span> <span class="project-url">{{ project.url }}</span> </li> {% endfor %} <li class="no-match">No results</li> </ul> </div> </div> {% endif %}
e47bdd93a8909f20e7a6c9abc79ec835aede01e9
requirements.txt
requirements.txt
lxml==3.4.0 pytz==2014.7 vcrpy==1.1.1 raven==5.0.0 invoke==0.9.0 celery==3.1.15 requests==2.4.1 nameparser==0.3.3 python-dateutil==2.2 fluent-logger==0.3.4 elasticsearch==1.3.0 cassandra-driver==2.5.1 Flask==0.10.1 blist==1.3.6 furl==0.4.4 jsonschema==2.4.0 jsonpointer==1.7 pycountry==1.10 djangorestframework==3.1.3 Django==1.8.2 django-pgjson==0.3.1 django-cors-headers==1.1.0 django-robots==1.1
lxml==3.4.0 pytz==2014.7 vcrpy==1.1.1 raven==5.0.0 invoke==0.9.0 celery==3.1.15 requests==2.4.1 nameparser==0.3.3 python-dateutil==2.2 fluent-logger==0.3.4 elasticsearch==1.3.0 cassandra-driver==2.5.1 Flask==0.10.1 blist==1.3.6 furl==0.4.4 jsonschema==2.4.0 jsonpointer==1.7 pycountry==1.10 djangorestframework==3.1.3 Django==1.8.2 django-pgjson==0.3.1 django-cors-headers==1.1.0 django-robots==1.1 psycopg2==2.6.1
Add back psycopg2 for django jsonfield
Add back psycopg2 for django jsonfield
Text
apache-2.0
felliott/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,mehanig/scrapi,erinspace/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,fabianvf/scrapi
text
## Code Before: lxml==3.4.0 pytz==2014.7 vcrpy==1.1.1 raven==5.0.0 invoke==0.9.0 celery==3.1.15 requests==2.4.1 nameparser==0.3.3 python-dateutil==2.2 fluent-logger==0.3.4 elasticsearch==1.3.0 cassandra-driver==2.5.1 Flask==0.10.1 blist==1.3.6 furl==0.4.4 jsonschema==2.4.0 jsonpointer==1.7 pycountry==1.10 djangorestframework==3.1.3 Django==1.8.2 django-pgjson==0.3.1 django-cors-headers==1.1.0 django-robots==1.1 ## Instruction: Add back psycopg2 for django jsonfield ## Code After: lxml==3.4.0 pytz==2014.7 vcrpy==1.1.1 raven==5.0.0 invoke==0.9.0 celery==3.1.15 requests==2.4.1 nameparser==0.3.3 python-dateutil==2.2 fluent-logger==0.3.4 elasticsearch==1.3.0 cassandra-driver==2.5.1 Flask==0.10.1 blist==1.3.6 furl==0.4.4 jsonschema==2.4.0 jsonpointer==1.7 pycountry==1.10 djangorestframework==3.1.3 Django==1.8.2 django-pgjson==0.3.1 django-cors-headers==1.1.0 django-robots==1.1 psycopg2==2.6.1
f9b2f8cd60af9b37ad80db10c42b36059ca5a10f
tests/unit/core/migrations_tests.py
tests/unit/core/migrations_tests.py
import os from django.test import TestCase import oscar.apps class TestMigrations(TestCase): def check_for_auth_model(self, filepath): with open(filepath) as f: s = f.read() return 'auth.User' in s or 'auth.user' in s def test_dont_contain_hardcoded_user_model(self): root_path = os.path.dirname(oscar.apps.__file__) matches = [] for dir, __, migrations in os.walk(root_path): if dir.endswith('migrations'): paths = [os.path.join(dir, migration) for migration in migrations if migration.endswith('.py')] matches += filter(self.check_for_auth_model, paths) if matches: pretty_matches = '\n'.join( [match.replace(root_path, '') for match in matches]) self.fail('References to hardcoded User model found in the ' 'following migration(s):\n' + pretty_matches)
import os import re from django.test import TestCase import oscar.apps class TestMigrations(TestCase): def setUp(self): self.root_path = os.path.dirname(oscar.apps.__file__) self.migration_filenames = [] for path, __, migrations in os.walk(self.root_path): if path.endswith('migrations'): paths = [ os.path.join(path, migration) for migration in migrations if migration.endswith('.py') and migration != '__init__.py'] self.migration_filenames += paths def test_dont_contain_hardcoded_user_model(self): def check_for_auth_model(filepath): with open(filepath) as f: s = f.read() return 'auth.User' in s or 'auth.user' in s matches = filter(check_for_auth_model, self.migration_filenames) if matches: pretty_matches = '\n'.join( [match.replace(self.root_path, '') for match in matches]) self.fail('References to hardcoded User model found in the ' 'following migration(s):\n' + pretty_matches) def test_no_duplicate_migration_numbers(self): # pull app name and migration number regexp = re.compile(r'^.+oscar/apps/([\w/]+)/migrations/(\d{4}).+$') keys = [] for migration in self.migration_filenames: match = regexp.match(migration) keys.append(match.group(1) + match.group(2)) self.assertEqual(len(keys), len(set(keys)))
Add unit test for duplicate migration numbers
Add unit test for duplicate migration numbers Duplicate migration numbers can happen when merging changes from different branches. This test ensures that we address the issue right away.
Python
bsd-3-clause
django-oscar/django-oscar,django-oscar/django-oscar,Bogh/django-oscar,anentropic/django-oscar,pdonadeo/django-oscar,manevant/django-oscar,nickpack/django-oscar,itbabu/django-oscar,jinnykoo/wuyisj.com,faratro/django-oscar,QLGu/django-oscar,eddiep1101/django-oscar,monikasulik/django-oscar,michaelkuty/django-oscar,jmt4/django-oscar,solarissmoke/django-oscar,dongguangming/django-oscar,amirrpp/django-oscar,vovanbo/django-oscar,ka7eh/django-oscar,john-parton/django-oscar,rocopartners/django-oscar,ahmetdaglarbas/e-commerce,adamend/django-oscar,jmt4/django-oscar,thechampanurag/django-oscar,binarydud/django-oscar,django-oscar/django-oscar,bschuon/django-oscar,machtfit/django-oscar,monikasulik/django-oscar,eddiep1101/django-oscar,mexeniz/django-oscar,itbabu/django-oscar,sonofatailor/django-oscar,pasqualguerrero/django-oscar,MatthewWilkes/django-oscar,rocopartners/django-oscar,spartonia/django-oscar,spartonia/django-oscar,kapari/django-oscar,anentropic/django-oscar,QLGu/django-oscar,manevant/django-oscar,mexeniz/django-oscar,sonofatailor/django-oscar,solarissmoke/django-oscar,jinnykoo/wuyisj.com,manevant/django-oscar,spartonia/django-oscar,nickpack/django-oscar,itbabu/django-oscar,pasqualguerrero/django-oscar,eddiep1101/django-oscar,thechampanurag/django-oscar,jinnykoo/wuyisj,rocopartners/django-oscar,django-oscar/django-oscar,jlmadurga/django-oscar,saadatqadri/django-oscar,jinnykoo/christmas,sasha0/django-oscar,jmt4/django-oscar,solarissmoke/django-oscar,ahmetdaglarbas/e-commerce,binarydud/django-oscar,anentropic/django-oscar,WillisXChen/django-oscar,nfletton/django-oscar,mexeniz/django-oscar,michaelkuty/django-oscar,rocopartners/django-oscar,dongguangming/django-oscar,kapt/django-oscar,faratro/django-oscar,QLGu/django-oscar,bnprk/django-oscar,eddiep1101/django-oscar,sasha0/django-oscar,faratro/django-oscar,josesanch/django-oscar,MatthewWilkes/django-oscar,bnprk/django-oscar,jinnykoo/wuyisj.com,sasha0/django-oscar,jinnykoo/wuyisj,adamend/django-oscar,saadatqadri/django-oscar,dongguangming/django-oscar,marcoantoniooliveira/labweb,WadeYuChen/django-oscar,taedori81/django-oscar,QLGu/django-oscar,john-parton/django-oscar,pasqualguerrero/django-oscar,Jannes123/django-oscar,john-parton/django-oscar,mexeniz/django-oscar,amirrpp/django-oscar,marcoantoniooliveira/labweb,marcoantoniooliveira/labweb,kapt/django-oscar,josesanch/django-oscar,Jannes123/django-oscar,WillisXChen/django-oscar,binarydud/django-oscar,lijoantony/django-oscar,adamend/django-oscar,bschuon/django-oscar,michaelkuty/django-oscar,machtfit/django-oscar,WillisXChen/django-oscar,jmt4/django-oscar,vovanbo/django-oscar,bnprk/django-oscar,itbabu/django-oscar,john-parton/django-oscar,pdonadeo/django-oscar,okfish/django-oscar,WadeYuChen/django-oscar,kapari/django-oscar,marcoantoniooliveira/labweb,bschuon/django-oscar,jlmadurga/django-oscar,ademuk/django-oscar,machtfit/django-oscar,jinnykoo/wuyisj,ademuk/django-oscar,pdonadeo/django-oscar,dongguangming/django-oscar,spartonia/django-oscar,kapari/django-oscar,adamend/django-oscar,bnprk/django-oscar,amirrpp/django-oscar,ka7eh/django-oscar,ka7eh/django-oscar,jlmadurga/django-oscar,okfish/django-oscar,binarydud/django-oscar,WillisXChen/django-oscar,lijoantony/django-oscar,ademuk/django-oscar,saadatqadri/django-oscar,nfletton/django-oscar,jinnykoo/wuyisj,nfletton/django-oscar,WillisXChen/django-oscar,jlmadurga/django-oscar,WadeYuChen/django-oscar,Bogh/django-oscar,nickpack/django-oscar,solarissmoke/django-oscar,Bogh/django-oscar,Bogh/django-oscar,okfish/django-oscar,WadeYuChen/django-oscar,kapt/django-oscar,manevant/django-oscar,sasha0/django-oscar,amirrpp/django-oscar,monikasulik/django-oscar,okfish/django-oscar,jinnykoo/christmas,Jannes123/django-oscar,sonofatailor/django-oscar,ka7eh/django-oscar,jinnykoo/wuyisj.com,WillisXChen/django-oscar,michaelkuty/django-oscar,nfletton/django-oscar,lijoantony/django-oscar,thechampanurag/django-oscar,anentropic/django-oscar,vovanbo/django-oscar,sonofatailor/django-oscar,taedori81/django-oscar,nickpack/django-oscar,josesanch/django-oscar,kapari/django-oscar,lijoantony/django-oscar,MatthewWilkes/django-oscar,thechampanurag/django-oscar,jinnykoo/christmas,taedori81/django-oscar,faratro/django-oscar,taedori81/django-oscar,ahmetdaglarbas/e-commerce,saadatqadri/django-oscar,bschuon/django-oscar,pdonadeo/django-oscar,ahmetdaglarbas/e-commerce,pasqualguerrero/django-oscar,vovanbo/django-oscar,MatthewWilkes/django-oscar,monikasulik/django-oscar,Jannes123/django-oscar,ademuk/django-oscar
python
## Code Before: import os from django.test import TestCase import oscar.apps class TestMigrations(TestCase): def check_for_auth_model(self, filepath): with open(filepath) as f: s = f.read() return 'auth.User' in s or 'auth.user' in s def test_dont_contain_hardcoded_user_model(self): root_path = os.path.dirname(oscar.apps.__file__) matches = [] for dir, __, migrations in os.walk(root_path): if dir.endswith('migrations'): paths = [os.path.join(dir, migration) for migration in migrations if migration.endswith('.py')] matches += filter(self.check_for_auth_model, paths) if matches: pretty_matches = '\n'.join( [match.replace(root_path, '') for match in matches]) self.fail('References to hardcoded User model found in the ' 'following migration(s):\n' + pretty_matches) ## Instruction: Add unit test for duplicate migration numbers Duplicate migration numbers can happen when merging changes from different branches. This test ensures that we address the issue right away. ## Code After: import os import re from django.test import TestCase import oscar.apps class TestMigrations(TestCase): def setUp(self): self.root_path = os.path.dirname(oscar.apps.__file__) self.migration_filenames = [] for path, __, migrations in os.walk(self.root_path): if path.endswith('migrations'): paths = [ os.path.join(path, migration) for migration in migrations if migration.endswith('.py') and migration != '__init__.py'] self.migration_filenames += paths def test_dont_contain_hardcoded_user_model(self): def check_for_auth_model(filepath): with open(filepath) as f: s = f.read() return 'auth.User' in s or 'auth.user' in s matches = filter(check_for_auth_model, self.migration_filenames) if matches: pretty_matches = '\n'.join( [match.replace(self.root_path, '') for match in matches]) self.fail('References to hardcoded User model found in the ' 'following migration(s):\n' + pretty_matches) def test_no_duplicate_migration_numbers(self): # pull app name and migration number regexp = re.compile(r'^.+oscar/apps/([\w/]+)/migrations/(\d{4}).+$') keys = [] for migration in self.migration_filenames: match = regexp.match(migration) keys.append(match.group(1) + match.group(2)) self.assertEqual(len(keys), len(set(keys)))
b54a143ab00b6eb88cd1fccf31b734413f0fcdc4
main.js
main.js
window.addEventListener("keypress", function (event) { if (window.document.activeElement !== window.document.body) { return; } const keyCode = event.code; if (keyCode.indexOf("Digit") !== 0) { return; } const digit = Number(keyCode[5]); if (digit < 0 || digit > 9) { return; } const index = (digit === 0) ? 8 : (digit - 1); const results = document.body.querySelectorAll("h3.r"); const result = results[index]; if (!result) { return; } const anchor = result.querySelector("a"); const href = anchor.href; window.location.href = href; }); const emojicationSuffix = "\u{FE0F}\u{20e3} "; function emojifyResults () { const results = document.body.querySelectorAll("h3.r"); const last = results.length - 1; console.log("results", results); results.forEach((result, index) => { if (index === last || index < 9) { const digit = (index === last) ? 0 : index + 1; const emojiDigit = String(digit) + emojicationSuffix; result.insertAdjacentText("afterbegin", emojiDigit); } }); }; if (window.document.readyState === "complete") { emojifyResults(); } window.document.onreadystatechange = function () { if (document.readyState === "complete") { emojifyResults(); } }
window.addEventListener("keydown", function handleNavigation (event) { if (window.document.activeElement !== window.document.body) { return; } const keyCode = event.code; if (keyCode.indexOf("Digit") !== 0) { return; } const digit = Number(keyCode[5]); if (digit < 0 || digit > 9) { return; } const index = (digit === 0) ? 8 : (digit - 1); const results = document.body.querySelectorAll("h3.r"); const result = results[index]; if (!result) { return; } event.stopPropagation(); const anchor = result.querySelector("a"); const href = anchor.href; window.location.href = href; }, true); const emojicationSuffix = "\u{FE0F}\u{20e3} "; function emojifyResults () { const results = document.body.querySelectorAll("h3.r"); const last = results.length - 1; results.forEach((result, index) => { if (index === last || index < 9) { const digit = (index === last) ? 0 : index + 1; const emojiDigit = String(digit) + emojicationSuffix; result.insertAdjacentText("afterbegin", emojiDigit); } }); }; if (window.document.readyState === "complete") { emojifyResults(); } window.document.onreadystatechange = function () { if (document.readyState === "complete") { emojifyResults(); } }
Handle navigation on keydown instead of keypress to work around automatic input focus acquisition.
Handle navigation on keydown instead of keypress to work around automatic input focus acquisition.
JavaScript
mit
iwehrman/google-search-result-hotkeys
javascript
## Code Before: window.addEventListener("keypress", function (event) { if (window.document.activeElement !== window.document.body) { return; } const keyCode = event.code; if (keyCode.indexOf("Digit") !== 0) { return; } const digit = Number(keyCode[5]); if (digit < 0 || digit > 9) { return; } const index = (digit === 0) ? 8 : (digit - 1); const results = document.body.querySelectorAll("h3.r"); const result = results[index]; if (!result) { return; } const anchor = result.querySelector("a"); const href = anchor.href; window.location.href = href; }); const emojicationSuffix = "\u{FE0F}\u{20e3} "; function emojifyResults () { const results = document.body.querySelectorAll("h3.r"); const last = results.length - 1; console.log("results", results); results.forEach((result, index) => { if (index === last || index < 9) { const digit = (index === last) ? 0 : index + 1; const emojiDigit = String(digit) + emojicationSuffix; result.insertAdjacentText("afterbegin", emojiDigit); } }); }; if (window.document.readyState === "complete") { emojifyResults(); } window.document.onreadystatechange = function () { if (document.readyState === "complete") { emojifyResults(); } } ## Instruction: Handle navigation on keydown instead of keypress to work around automatic input focus acquisition. ## Code After: window.addEventListener("keydown", function handleNavigation (event) { if (window.document.activeElement !== window.document.body) { return; } const keyCode = event.code; if (keyCode.indexOf("Digit") !== 0) { return; } const digit = Number(keyCode[5]); if (digit < 0 || digit > 9) { return; } const index = (digit === 0) ? 8 : (digit - 1); const results = document.body.querySelectorAll("h3.r"); const result = results[index]; if (!result) { return; } event.stopPropagation(); const anchor = result.querySelector("a"); const href = anchor.href; window.location.href = href; }, true); const emojicationSuffix = "\u{FE0F}\u{20e3} "; function emojifyResults () { const results = document.body.querySelectorAll("h3.r"); const last = results.length - 1; results.forEach((result, index) => { if (index === last || index < 9) { const digit = (index === last) ? 0 : index + 1; const emojiDigit = String(digit) + emojicationSuffix; result.insertAdjacentText("afterbegin", emojiDigit); } }); }; if (window.document.readyState === "complete") { emojifyResults(); } window.document.onreadystatechange = function () { if (document.readyState === "complete") { emojifyResults(); } }
fb6020ad088d30804fbfb4fd7dc8e66d6c8f3b66
SwiftGit2/Libgit2.swift
SwiftGit2/Libgit2.swift
// // Libgit2.swift // SwiftGit2 // // Created by Matt Diephouse on 1/11/15. // Copyright (c) 2015 GitHub, Inc. All rights reserved. // import libgit2 func == (lhs: git_otype, rhs: git_otype) -> Bool { return lhs.rawValue == rhs.rawValue } extension git_strarray { func filter(_ isIncluded: (String) -> Bool) -> [String] { return map { $0 }.filter(isIncluded) } func map<T>(_ transform: (String) -> T) -> [T] { return (0..<self.count).map { let string = String(validatingUTF8: self.strings[$0]!)! return transform(string) } } }
// // Libgit2.swift // SwiftGit2 // // Created by Matt Diephouse on 1/11/15. // Copyright (c) 2015 GitHub, Inc. All rights reserved. // import libgit2 extension git_strarray { func filter(_ isIncluded: (String) -> Bool) -> [String] { return map { $0 }.filter(isIncluded) } func map<T>(_ transform: (String) -> T) -> [T] { return (0..<self.count).map { let string = String(validatingUTF8: self.strings[$0]!)! return transform(string) } } }
Use default == implementation for git_otype
Use default == implementation for git_otype
Swift
mit
SwiftGit2/SwiftGit2,mattrubin/SwiftGit2,SwiftGit2/SwiftGit2,mattrubin/SwiftGit2
swift
## Code Before: // // Libgit2.swift // SwiftGit2 // // Created by Matt Diephouse on 1/11/15. // Copyright (c) 2015 GitHub, Inc. All rights reserved. // import libgit2 func == (lhs: git_otype, rhs: git_otype) -> Bool { return lhs.rawValue == rhs.rawValue } extension git_strarray { func filter(_ isIncluded: (String) -> Bool) -> [String] { return map { $0 }.filter(isIncluded) } func map<T>(_ transform: (String) -> T) -> [T] { return (0..<self.count).map { let string = String(validatingUTF8: self.strings[$0]!)! return transform(string) } } } ## Instruction: Use default == implementation for git_otype ## Code After: // // Libgit2.swift // SwiftGit2 // // Created by Matt Diephouse on 1/11/15. // Copyright (c) 2015 GitHub, Inc. All rights reserved. // import libgit2 extension git_strarray { func filter(_ isIncluded: (String) -> Bool) -> [String] { return map { $0 }.filter(isIncluded) } func map<T>(_ transform: (String) -> T) -> [T] { return (0..<self.count).map { let string = String(validatingUTF8: self.strings[$0]!)! return transform(string) } } }
cff40df709cd65b18632f518c881ff07de01761f
tox.ini
tox.ini
[tox] envlist = py24,py25,py26,py27,py31 [testenv] deps=unittest2 commands=unit2 discover [] [testenv:py26] commands= unit2 discover [] sphinx-build -b doctest docs html sphinx-build docs html deps = unittest2 sphinx [testenv:py27] commands= unit2 discover [] sphinx-build -b doctest docs html sphinx-build docs html deps = unittest2 sphinx [testenv:py31] commands= unit2 discover [] deps = unittest2py3k
[tox] envlist = py24,py25,py26,py27,py31 [testenv] deps=unittest2 commands=unit2 discover [] [testenv:py26] commands= unit2 discover [] sphinx-build -b doctest docs html sphinx-build docs html deps = unittest2 sphinx [testenv:py27] commands= unit2 discover [] sphinx-build -b doctest docs html deps = unittest2 sphinx [testenv:py31] commands= unit2 discover [] deps = unittest2py3k
Remove unnecessary sphinx docs build for 2.7 (only need to test the docs build on one version of Python)
Remove unnecessary sphinx docs build for 2.7 (only need to test the docs build on one version of Python)
INI
bsd-2-clause
derwiki-adroll/mock,testing-cabal/mock,lord63-forks/mock,nett55/mock,fladi/mock,rbtcollins/mock,johndeng/mock,kostyll/mock,pypingou/mock,dannybtran/mock,OddBloke/mock,scorphus/mock,sorenh/mock,frankier/mock
ini
## Code Before: [tox] envlist = py24,py25,py26,py27,py31 [testenv] deps=unittest2 commands=unit2 discover [] [testenv:py26] commands= unit2 discover [] sphinx-build -b doctest docs html sphinx-build docs html deps = unittest2 sphinx [testenv:py27] commands= unit2 discover [] sphinx-build -b doctest docs html sphinx-build docs html deps = unittest2 sphinx [testenv:py31] commands= unit2 discover [] deps = unittest2py3k ## Instruction: Remove unnecessary sphinx docs build for 2.7 (only need to test the docs build on one version of Python) ## Code After: [tox] envlist = py24,py25,py26,py27,py31 [testenv] deps=unittest2 commands=unit2 discover [] [testenv:py26] commands= unit2 discover [] sphinx-build -b doctest docs html sphinx-build docs html deps = unittest2 sphinx [testenv:py27] commands= unit2 discover [] sphinx-build -b doctest docs html deps = unittest2 sphinx [testenv:py31] commands= unit2 discover [] deps = unittest2py3k
0538b5948d6da4726e96d56365950b6a7d5957e2
app/views/categories/articles.html.erb
app/views/categories/articles.html.erb
<h1>Category: <%= @category.category %></h1> <h2>Articles:</h2> <% @articles.each do |article| %> <h3><%= article.title %></h3> <p><%= article.text %></p> <p class="attributes">Posted by <%= article.username %></p> <p class="attributes"> <%= link_to 'Comments', article_path(article) %> (<%= article.comments.count %>) <% if user_signed_in? && article.username == current_user.username %> | <%= link_to 'Edit', edit_article_path(article) %> | <%= link_to 'Delete', article_path(article), method: :delete, data: {confirm: 'Are you sure?'} %> <% end %> </p> <% end %>
<h1>Category: <%= @category.category %></h1> <h2>Articles:</h2> <% @articles.each do |article| %> <h3><%= article.title %></h3> <p><%= simple_format(article.text) %></p> <p class="attributes">Posted by <%= article.username %></p> <p class="attributes"> <%= link_to 'Comments', article_path(article) %> (<%= article.comments.count %>) <% if user_signed_in? && article.username == current_user.username %> | <%= link_to 'Edit', edit_article_path(article) %> | <%= link_to 'Delete', article_path(article), method: :delete, data: {confirm: 'Are you sure?'} %> <% end %> </p> <% end %>
Add simple_format for articles to categories
Add simple_format for articles to categories
HTML+ERB
mit
arseniy96/my_first_site,arseniy96/my_first_site,arseniy96/my_first_site
html+erb
## Code Before: <h1>Category: <%= @category.category %></h1> <h2>Articles:</h2> <% @articles.each do |article| %> <h3><%= article.title %></h3> <p><%= article.text %></p> <p class="attributes">Posted by <%= article.username %></p> <p class="attributes"> <%= link_to 'Comments', article_path(article) %> (<%= article.comments.count %>) <% if user_signed_in? && article.username == current_user.username %> | <%= link_to 'Edit', edit_article_path(article) %> | <%= link_to 'Delete', article_path(article), method: :delete, data: {confirm: 'Are you sure?'} %> <% end %> </p> <% end %> ## Instruction: Add simple_format for articles to categories ## Code After: <h1>Category: <%= @category.category %></h1> <h2>Articles:</h2> <% @articles.each do |article| %> <h3><%= article.title %></h3> <p><%= simple_format(article.text) %></p> <p class="attributes">Posted by <%= article.username %></p> <p class="attributes"> <%= link_to 'Comments', article_path(article) %> (<%= article.comments.count %>) <% if user_signed_in? && article.username == current_user.username %> | <%= link_to 'Edit', edit_article_path(article) %> | <%= link_to 'Delete', article_path(article), method: :delete, data: {confirm: 'Are you sure?'} %> <% end %> </p> <% end %>
13e03e390a70a34487e9b81ea7184ec92a3b504d
.forestry/front_matter/templates/blog-post.yml
.forestry/front_matter/templates/blog-post.yml
--- label: Blog post hide_body: false fields: - type: text name: layout label: layout - type: text name: title label: title - type: datetime name: date label: date - type: text name: categories label: categories
--- label: Blog post hide_body: false fields: - type: text name: layout label: layout config: required: true default: post description: Page layout - type: text name: title label: title description: Post title config: required: true - type: datetime name: date label: date default: now config: required: true date_format: YYYY-MM-DD export_format: YYYY-MM-DD h:mm:ss A ZZ description: Post date - type: text name: categories label: categories description: Post categories
Update from Forestry.io - Updated Forestry configuration
Update from Forestry.io - Updated Forestry configuration
YAML
apache-2.0
rossng/rossng.github.io,rossng/rossng.github.io
yaml
## Code Before: --- label: Blog post hide_body: false fields: - type: text name: layout label: layout - type: text name: title label: title - type: datetime name: date label: date - type: text name: categories label: categories ## Instruction: Update from Forestry.io - Updated Forestry configuration ## Code After: --- label: Blog post hide_body: false fields: - type: text name: layout label: layout config: required: true default: post description: Page layout - type: text name: title label: title description: Post title config: required: true - type: datetime name: date label: date default: now config: required: true date_format: YYYY-MM-DD export_format: YYYY-MM-DD h:mm:ss A ZZ description: Post date - type: text name: categories label: categories description: Post categories
389c6980267e77cc1a2bef26c2c42ca115d7bc6d
administrator-guides/integrations/jira/README.md
administrator-guides/integrations/jira/README.md
_notify on issue creation, deletion and status, resolution, comment or priority changes._ 1. In Rocket.Chat go to "Administration"->"Integrations" and create "New Integration" 2. Choose Incoming WebHook 3. Follow all instructions like Enable, give it a name, link to channel etc. Set "Enable Script" to true and enter content of *[this gist](https://gist.github.com/malko/7b46696aa92d07736cc8ea9ed4041c68)* in the "Script" box 4. Press Save changes and copy the *Webhook URL* (added just below the script box) 5. Go to your jira as administrator and follow instruction on adding outgoing webhook [here](https://developer.atlassian.com/jiradev/jira-apis/webhooks#Webhooks-configureConfiguringawebhook) You can tweak the content of the script to better sweets your needs ## Add Jira integration via Outgoing WebHook _Integration for Rocket.Chat that summarizes any JIRA issues mentioned._ 1. Go to <https://github.com/gustavkarlsson/rocketchat-jira-trigger> and follow the instructions. Example of Jira integration: ![image](Jira-webhook.png)
_notify on issue creation, deletion and status, resolution, comment or priority changes._ 1. In Rocket.Chat go to "Administration"->"Integrations" and create "New Integration" 2. Choose Incoming WebHook 3. Follow all instructions like Enable, give it a name, link to channel etc. Set "Enable Script" to true and enter content of *[this script](https://github.com/malko/rocketchat-jira-hook/blob/master/jira-rocketchat-hook.js)* in the "Script" box 4. Press Save changes and copy the *Webhook URL* (added just below the script box) 5. Go to your jira as administrator and follow instructions on adding outgoing webhook [here](https://developer.atlassian.com/jiradev/jira-apis/webhooks#Webhooks-configureConfiguringawebhook) You can tweak the content of the script to better suit your needs ## Add Jira integration via Outgoing WebHook _Integration for Rocket.Chat that summarizes any JIRA issues mentioned._ 1. Go to <https://github.com/gustavkarlsson/rocketchat-jira-trigger> and follow the instructions. Example of Jira integration: ![image](Jira-webhook.png)
Update link to JIRA incoming script
Update link to JIRA incoming script
Markdown
mit
RocketChat/Rocket.Chat.Docs,RocketChat/Rocket.Chat.Docs,RocketChat/Rocket.Chat.Docs,RocketChat/Rocket.Chat.Docs
markdown
## Code Before: _notify on issue creation, deletion and status, resolution, comment or priority changes._ 1. In Rocket.Chat go to "Administration"->"Integrations" and create "New Integration" 2. Choose Incoming WebHook 3. Follow all instructions like Enable, give it a name, link to channel etc. Set "Enable Script" to true and enter content of *[this gist](https://gist.github.com/malko/7b46696aa92d07736cc8ea9ed4041c68)* in the "Script" box 4. Press Save changes and copy the *Webhook URL* (added just below the script box) 5. Go to your jira as administrator and follow instruction on adding outgoing webhook [here](https://developer.atlassian.com/jiradev/jira-apis/webhooks#Webhooks-configureConfiguringawebhook) You can tweak the content of the script to better sweets your needs ## Add Jira integration via Outgoing WebHook _Integration for Rocket.Chat that summarizes any JIRA issues mentioned._ 1. Go to <https://github.com/gustavkarlsson/rocketchat-jira-trigger> and follow the instructions. Example of Jira integration: ![image](Jira-webhook.png) ## Instruction: Update link to JIRA incoming script ## Code After: _notify on issue creation, deletion and status, resolution, comment or priority changes._ 1. In Rocket.Chat go to "Administration"->"Integrations" and create "New Integration" 2. Choose Incoming WebHook 3. Follow all instructions like Enable, give it a name, link to channel etc. Set "Enable Script" to true and enter content of *[this script](https://github.com/malko/rocketchat-jira-hook/blob/master/jira-rocketchat-hook.js)* in the "Script" box 4. Press Save changes and copy the *Webhook URL* (added just below the script box) 5. Go to your jira as administrator and follow instructions on adding outgoing webhook [here](https://developer.atlassian.com/jiradev/jira-apis/webhooks#Webhooks-configureConfiguringawebhook) You can tweak the content of the script to better suit your needs ## Add Jira integration via Outgoing WebHook _Integration for Rocket.Chat that summarizes any JIRA issues mentioned._ 1. Go to <https://github.com/gustavkarlsson/rocketchat-jira-trigger> and follow the instructions. Example of Jira integration: ![image](Jira-webhook.png)
78093b0e496001fc1d76af8bf2e22310fb635cbe
app/views/shared/proposals/_tags_form.html.haml
app/views/shared/proposals/_tags_form.html.haml
.widget-header %h3 Review Tags .widget-content %fieldset = form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f| .form-group .tag-list = f.select :review_tags, options_for_select(event.review_tags, proposal.object.review_tags), {}, { class: 'multiselect review-tags', multiple: true } %button.pull-right.btn.btn-success{:type => "submit"} Update
.widget-header %h3 Review Tags .widget-content %fieldset = form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f| .form-group .tag-list = f.select :review_tags, options_for_select(event.review_tags, proposal.object.review_tags), {}, { class: 'multiselect review-tags', multiple: true } .form-group %button.btn.btn-success.pull-right{:type => "submit"} Update
Move button to avoid collision with long tags list
Move button to avoid collision with long tags list
Haml
mit
rubycentral/cfp-app,ruby-no-kai/cfp-app,ruby-no-kai/cfp-app,ruby-no-kai/cfp-app,rubycentral/cfp-app,rubycentral/cfp-app
haml
## Code Before: .widget-header %h3 Review Tags .widget-content %fieldset = form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f| .form-group .tag-list = f.select :review_tags, options_for_select(event.review_tags, proposal.object.review_tags), {}, { class: 'multiselect review-tags', multiple: true } %button.pull-right.btn.btn-success{:type => "submit"} Update ## Instruction: Move button to avoid collision with long tags list ## Code After: .widget-header %h3 Review Tags .widget-content %fieldset = form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f| .form-group .tag-list = f.select :review_tags, options_for_select(event.review_tags, proposal.object.review_tags), {}, { class: 'multiselect review-tags', multiple: true } .form-group %button.btn.btn-success.pull-right{:type => "submit"} Update
3679a62c59dde625a18416f15aadaa6845bc8cfd
NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h
NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h
@interface NSData (ImageMIMEDetection) @end
@interface NSData (ImageMIMEDetection) /** Try to deduce the MIME type. @return string representation of detected MIME type. `nil` if not able to detect the MIME type. @see http://en.wikipedia.org/wiki/Internet_media_type */ - (NSString *)tdt_MIMEType; @end
Add interface for the category
Add interface for the category
C
bsd-3-clause
talk-to/NSData-TDTImageMIMEDetection
c
## Code Before: @interface NSData (ImageMIMEDetection) @end ## Instruction: Add interface for the category ## Code After: @interface NSData (ImageMIMEDetection) /** Try to deduce the MIME type. @return string representation of detected MIME type. `nil` if not able to detect the MIME type. @see http://en.wikipedia.org/wiki/Internet_media_type */ - (NSString *)tdt_MIMEType; @end
410d1afe0776383e7e759942721fdf533ab79a71
PHPCI/Logging/BuildDBLogHandler.php
PHPCI/Logging/BuildDBLogHandler.php
<?php /** * PHPCI - Continuous Integration for PHP * * @copyright Copyright 2014, Block 8 Limited. * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md * @link https://www.phptesting.org/ */ namespace PHPCI\Logging; use b8\Store; use Monolog\Handler\AbstractProcessingHandler; use PHPCI\Model\Build; class BuildDBLogHandler extends AbstractProcessingHandler { /** * @var Build */ protected $build; protected $logValue; public function __construct( Build $build, $level = LogLevel::INFO, $bubble = true ) { parent::__construct($level, $bubble); $this->build = $build; // We want to add to any existing saved log information. $this->logValue = $build->getLog(); } protected function write(array $record) { $message = (string)$record['message']; $message = str_replace($this->build->currentBuildPath, '/', $message); $this->logValue .= $message . PHP_EOL; $this->build->setLog($this->logValue); } }
<?php /** * PHPCI - Continuous Integration for PHP * * @copyright Copyright 2014, Block 8 Limited. * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md * @link https://www.phptesting.org/ */ namespace PHPCI\Logging; use b8\Store\Factory; use Monolog\Handler\AbstractProcessingHandler; use PHPCI\Model\Build; class BuildDBLogHandler extends AbstractProcessingHandler { /** * @var Build */ protected $build; protected $logValue; public function __construct( Build $build, $level = LogLevel::INFO, $bubble = true ) { parent::__construct($level, $bubble); $this->build = $build; // We want to add to any existing saved log information. $this->logValue = $build->getLog(); } protected function write(array $record) { $message = (string)$record['message']; $message = str_replace($this->build->currentBuildPath, '/', $message); $this->logValue .= $message . PHP_EOL; $this->build->setLog($this->logValue); Factory::getStore('Build')->save($this->build); } }
Save the build log every time the log is updated.
Save the build log every time the log is updated.
PHP
bsd-2-clause
php-censor/php-censor,corpsee/php-censor,corpsee/php-censor,php-censor/php-censor,corpsee/php-censor,php-censor/php-censor
php
## Code Before: <?php /** * PHPCI - Continuous Integration for PHP * * @copyright Copyright 2014, Block 8 Limited. * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md * @link https://www.phptesting.org/ */ namespace PHPCI\Logging; use b8\Store; use Monolog\Handler\AbstractProcessingHandler; use PHPCI\Model\Build; class BuildDBLogHandler extends AbstractProcessingHandler { /** * @var Build */ protected $build; protected $logValue; public function __construct( Build $build, $level = LogLevel::INFO, $bubble = true ) { parent::__construct($level, $bubble); $this->build = $build; // We want to add to any existing saved log information. $this->logValue = $build->getLog(); } protected function write(array $record) { $message = (string)$record['message']; $message = str_replace($this->build->currentBuildPath, '/', $message); $this->logValue .= $message . PHP_EOL; $this->build->setLog($this->logValue); } } ## Instruction: Save the build log every time the log is updated. ## Code After: <?php /** * PHPCI - Continuous Integration for PHP * * @copyright Copyright 2014, Block 8 Limited. * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md * @link https://www.phptesting.org/ */ namespace PHPCI\Logging; use b8\Store\Factory; use Monolog\Handler\AbstractProcessingHandler; use PHPCI\Model\Build; class BuildDBLogHandler extends AbstractProcessingHandler { /** * @var Build */ protected $build; protected $logValue; public function __construct( Build $build, $level = LogLevel::INFO, $bubble = true ) { parent::__construct($level, $bubble); $this->build = $build; // We want to add to any existing saved log information. $this->logValue = $build->getLog(); } protected function write(array $record) { $message = (string)$record['message']; $message = str_replace($this->build->currentBuildPath, '/', $message); $this->logValue .= $message . PHP_EOL; $this->build->setLog($this->logValue); Factory::getStore('Build')->save($this->build); } }
b8f70f1d8575c3177c56a196f7d884362d10a401
core/res/values/dimens.xml
core/res/values/dimens.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- As defined: http://developer.android.com/design/style/typography.html --> <dimen name="text_micro">12sp</dimen> <dimen name="text_small">14sp</dimen> <dimen name="text_medium">18sp</dimen> <dimen name="text_large">22sp</dimen> <!-- As defined: http://developer.android.com/design/style/metrics-grids.html --> <dimen name="touch_rhythm_size">48dp</dimen> </resources>
<?xml version="1.0" encoding="utf-8"?> <resources> <!-- As defined: http://developer.android.com/design/style/typography.html --> <dimen name="text_micro">12sp</dimen> <dimen name="text_small">14sp</dimen> <dimen name="text_medium">18sp</dimen> <dimen name="text_large">22sp</dimen> <!-- As defined: http://developer.android.com/design/style/metrics-grids.html --> <dimen name="touch_rhythm_size">48dp</dimen> <!-- Material design constants: http://android-developers.blogspot.ca/2014/10/material-design-on-android-checklist.html --> <dimen name="material_keyline1">16dp</dimen> <dimen name="material_keyline2">72dp</dimen> <dimen name="material_keyline3">16dp</dimen> <dimen name="material_grid_size">8dp</dimen> <dimen name="material_max_drawer_width">320dp</dimen> </resources>
Add some material design constants
Add some material design constants
XML
apache-2.0
kquan/android-utils
xml
## Code Before: <?xml version="1.0" encoding="utf-8"?> <resources> <!-- As defined: http://developer.android.com/design/style/typography.html --> <dimen name="text_micro">12sp</dimen> <dimen name="text_small">14sp</dimen> <dimen name="text_medium">18sp</dimen> <dimen name="text_large">22sp</dimen> <!-- As defined: http://developer.android.com/design/style/metrics-grids.html --> <dimen name="touch_rhythm_size">48dp</dimen> </resources> ## Instruction: Add some material design constants ## Code After: <?xml version="1.0" encoding="utf-8"?> <resources> <!-- As defined: http://developer.android.com/design/style/typography.html --> <dimen name="text_micro">12sp</dimen> <dimen name="text_small">14sp</dimen> <dimen name="text_medium">18sp</dimen> <dimen name="text_large">22sp</dimen> <!-- As defined: http://developer.android.com/design/style/metrics-grids.html --> <dimen name="touch_rhythm_size">48dp</dimen> <!-- Material design constants: http://android-developers.blogspot.ca/2014/10/material-design-on-android-checklist.html --> <dimen name="material_keyline1">16dp</dimen> <dimen name="material_keyline2">72dp</dimen> <dimen name="material_keyline3">16dp</dimen> <dimen name="material_grid_size">8dp</dimen> <dimen name="material_max_drawer_width">320dp</dimen> </resources>