conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add Wowza Streaming Engine v4.4.1\n" }, { "from": "gpt", "value": "cask 'wowza-streaming-engine' do\n version '4.4.1'\n sha256 '2d87573f3aa0af2b23bbef9b327774ed83f6dea5de5c70d66a66545b7db693b4'\n\n url \"https://www.wowza.com/downloads/WowzaStreamingEngine-#{versi...
ruby
chosen
[ { "from": "system", "value": "Allow iOS versions >= 7.0\n\nOneSignal itself needs >= 6.1 and React Native needs >= 7.0." }, { "from": "human", "value": "require 'json'\npackage_json = JSON.parse(File.read('package.json'))\n\nPod::Spec.new do |s|\n\n s.name = \"react-native-onesignal\"...
ruby
chosen
[ { "from": "system", "value": "Benchmark: Include Tilt::CompileSite to improve performance\n" }, { "from": "human", "value": "class ComplexView\n def header\n \"Colors\"\n end\n\n def item\n items = []\n items << { :name => 'red', :current => true, :url => '#red' }\n items << { :na...
ruby
chosen
[ { "from": "system", "value": "Include 'templates' dir in gem, bump to version 0.0.3\n" }, { "from": "human", "value": "lib = File.expand_path('../lib/', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.name = 'fragrant'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Simplify the test using PublicSuffix.domain\n" }, { "from": "human", "value": "require 'test_helper'\nrequire 'public_suffix'\n\n# This test runs against the current PSL file and ensures\n# the definitions satisfies the test suite.\nclass PslTest < Minitest::Unit::T...
ruby
chosen
[ { "from": "system", "value": "Make gem test remove existing gem files\n" }, { "from": "human", "value": "# encoding: utf-8\n\nclass Nanoc::GemTest < MiniTest::Unit::TestCase\n\n include Nanoc::TestHelpers\n\n def setup\n super\n FileUtils.cd(@orig_wd)\n end\n\n def test_build\n requ...
ruby
chosen
[ { "from": "system", "value": "Update Redis version in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'turnpike/version'\n\nGem::Specification.new do |s|\n s.name = 'turnpike'\n s.version = Turnpike::VERSION...
ruby
chosen
[ { "from": "system", "value": "Add jtv gem + specify version\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'twitchus/version'\n\nGem::Specification.new do |gem|\n gem.name...
ruby
chosen
[ { "from": "system", "value": "Update FileDepotFtpAnonymous to match changes to FileDepotFtp.\n\ndestination_file_exists? was renamed to file_exists? since it's used for the destination directories in addition to the destination file.\ndestination_path needs to return a Pathname object that responds to join....
ruby
chosen
[ { "from": "system", "value": "Change Deployable Apps to Applications\n" }, { "from": "human", "value": "Given /^the following apps have been created$/ do |table|\n table.hashes.map do |hash|\n Factory(:application_with_tasks_and_brigades, name: hash['Name'])\n end\nend\n\nThen /^I see a dir...
ruby
chosen
[ { "from": "system", "value": "Change Tag input to expect and sanitize comma separated string\n" }, { "from": "human", "value": "class TagFieldType < FieldType\n VALIDATION_TYPES = {\n presence: :valid_presence_validation?\n }.freeze\n\n attr_accessor :data, :tag_list, :field_name\n attr_r...
ruby
chosen
[ { "from": "system", "value": "Add homepage to gem spec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mayhem/rails/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Update webmock requirement from ~> 0 to ~> 3\n\nUpdates the requirements on [webmock](https://github.com/bblimke/webmock) to permit the latest version.\n- [Release notes](https://github.com/bblimke/webmock/releases)\n- [Changelog](https://github.com/bblimke/webmock/blob/master/...
ruby
chosen
[ { "from": "system", "value": "Change a NOT NULL column to allow NULL\n" }, { "from": "human", "value": "class AddPhysicalIdToServerspecSchedule < ActiveRecord::Migration\n def change\n add_column :serverspec_schedules, :physical_id, :string, null: false\n end\nend\n" }, { "from": "g...
ruby
chosen
[ { "from": "system", "value": "Update Shared Desktop Ontologies to 0.5.\n" }, { "from": "human", "value": "require 'formula'\n\nclass SharedDesktopOntologies <Formula\n url 'http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.2/shared-desktop-ontologies-0.2.tar.bz2'\n hom...
ruby
chosen
[ { "from": "system", "value": "Update iTerm2 beta formula to the latest version.\n\niTerm 2 has been updated to 2.0.0.20141022\r\nhttps://iterm2.com/downloads/beta/iTerm2-2_0_0_20141022.zip" }, { "from": "human", "value": "class Iterm2Beta < Cask\n version '1.0.0.20140629'\n sha256 'fdda227b014...
ruby
chosen
[ { "from": "system", "value": "Update SpotifBeta.app to version 1.0.0.974.ga39487e3-1439\n" }, { "from": "human", "value": "cask :v1 => 'spotifybeta' do\n version '1.0.0.909.ge4845795-1223'\n sha256 '9279b76b13185d2cba4afcbf19464a97229b3a50620fbfff4311fef8cf9b8c50'\n\n url \"http://download.sp...
ruby
chosen
[ { "from": "system", "value": "Read all stream events is not recursive so can read arbitrarily long streams\n" }, { "from": "human", "value": "module HttpEventstore\n module Actions\n class ReadAllStreamEvents\n\n def initialize(client)\n @client = client\n end\n\n def c...
ruby
chosen
[ { "from": "human", "value": "Add Rake task to delete old Artefact reserving needed slug\n\nThis Artefact is an old StartPage that has not been touched since 2015.\nStartPages are now published in SmartAnswers, and this example is\nleftover from before they were moved from Publisher.\n\nThere is now a need f...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to allow using with Rack 2\n\nRequired to use gem with Rails 5+\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rack/geo/version\"\n\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "human", "value": "Restructure payments fields on Contributions\n\nWe will be storing contribution's fees in contributions table to help us\ngenerate reports.\n" }, { "from": "gpt", "value": "class AddPaymentServiceFeePaidByUserToContributions < ActiveRecord::Migration\n def change\n ...
ruby
chosen
[ { "from": "system", "value": "Update gemspec summary to match readme\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'kontrast/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Remove whitespace and ensure the summary differs from the description.\n" }, { "from": "human", "value": "<% description = \"Ruby on Rails #{plural_name.titleize} engine for Refinery CMS\" %>\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::R...
ruby
chosen
[ { "from": "human", "value": "Define Experience Points Record abilities\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\nmodule Course::ExperiencePointsRecordsAbilityComponent\n include AbilityHost::Component\n\n def define_permissions\n if user\n allow_staff_manage_exper...
ruby
chosen
[ { "from": "system", "value": "Remove hardcoded ID for Australia\n" }, { "from": "human", "value": "# Configure Spree Preferences\n#\n# Note: Initializing preferences available within the Admin will overwrite any changes that were made through the user interface when you restart.\n# If you ...
ruby
chosen
[ { "from": "system", "value": "Add missing stanzas to Adium Nightly16" }, { "from": "human", "value": "cask :v1 => 'adium-nightly16' do\n version '1.6hgr5915'\n sha256 '70619777433df646a7251a10eb74baecdc5a47be085cd83d35f3750fcfea9e1b'\n\n url \"http://nightly.adium.im/adium-adium-1.6/Adium_#{v...
ruby
chosen
[ { "from": "system", "value": "Handle external URLs for Signon\n\nUse the new external_url_for method of Plek to generate external URLs\nfor Signon. This makes Policy Publisher more compatible with\nenvironments where there is a difference between internal and external\nrouting, which is the way GOV.UK is be...
ruby
chosen
[ { "from": "human", "value": "Add more order privileges for distributor enterprise users\n" }, { "from": "gpt", "value": "Spree::Admin::Orders::CustomerDetailsController.class_eval do\n #Override BaseController.authorize_admin to inherit CanCan permissions for the current order\n def authorize_...
ruby
chosen
[ { "from": "system", "value": "Support Ruby 1.9.3 again with Que integration\n" }, { "from": "human", "value": "if defined?(::Que)\n Appsignal.logger.info('Loading Que integration')\n\n module Appsignal\n module Integrations\n module QuePlugin\n def _run\n Appsignal.moni...
ruby
chosen
[ { "from": "system", "value": "Include helper for ssh file pulls\n" }, { "from": "human", "value": "module KnifeCloudformation\n module Utils\n module JSON\n\n def try_json_compat\n unless(@_json_loaded)\n begin\n require 'chef/json_compat'\n rescue\n ...
ruby
chosen
[ { "from": "system", "value": "Fix filename length calculations thx @lleirborras\n" }, { "from": "human", "value": "module Stradivari\n module XLSX\n\n module Controller\n def render_xlsx(options = {})\n filename = _stradivari_xlsx_file_name(options.delete(:filename))\n\n x...
ruby
chosen
[ { "from": "system", "value": "Add Error in module Server and add a to_s\n" }, { "from": "human", "value": "module Twoffein\n class Error < StandardError\n attr_reader :type, :message\n def initialize(type, message)\n @type = type\n @message = message\n end\n end\nend\n" },...
ruby
chosen
[ { "from": "system", "value": "Add updateddate to default list\n" }, { "from": "human", "value": "module ICIMS\n\n require 'ostruct'\n\n class Job < OpenStruct\n\n DEFAULT_FIELDS = %w(id folder jobtitle positioncategory positiontype joblocation additionallocations overview)\n\n class << s...
ruby
chosen
[ { "from": "system", "value": "Update source to reference 1.0.0 tag\n\n* Pod lint requires a release to be specified\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Blindside\"\n s.version = \"1.0-alpha\"\n s.summary = \"Blindside provides dependency inje...
ruby
chosen
[ { "from": "system", "value": "Fix url and homepage to use SSL in Spacious Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'spacious' do\n version :latest\n...
ruby
chosen
[ { "from": "system", "value": "Add Amazon load balancer create and delete\n\nAdd Amazon load balancer create and delete\n" }, { "from": "human", "value": "class ManageIQ::Providers::Amazon::NetworkManager::LoadBalancer < ::LoadBalancer\nend\n" }, { "from": "gpt", "value": "class Manag...
ruby
chosen
[ { "from": "system", "value": "Return 0 when condition is not meet" }, { "from": "human", "value": "module Rule\n class Discount\n DEFAULT_RULE = {product_code:\"SR1\", qty:3, price:4.50}\n def initialize(rule={})\n @rule = DEFAULT_RULE.merge(rule)\n end\n\n def apply(checkout)\...
ruby
chosen
[ { "from": "human", "value": "Add a DocinfoProcessor to emit license information.\n" }, { "from": "gpt", "value": "require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal'\n\ninclude ::Asciidoctor\n\n# A postprocessor that emits an appropriate license URL into a document.\n# Requires that th...
ruby
chosen
[ { "from": "system", "value": "Add _shutdown_test_server impl for Android\n" }, { "from": "human", "value": "module Calabash\n module Android\n module Operations\n def _start_test_server(options={})\n test_options = options.dup\n\n test_options[:main_activity] ||= Environme...
ruby
chosen
[ { "from": "system", "value": "Create Engine for Rails 4.+ as well.\n" }, { "from": "human", "value": "require 'ya2yaml'\n\nmodule Translate\n class Engine < Rails::Engine\n end if defined?(Rails) && Rails::VERSION::MAJOR == 3\n\n class << self\n # For configuring Google Translate API key\n...
ruby
chosen
[ { "from": "system", "value": "Add more system entity examples\n" }, { "from": "human", "value": "module Expando\n module ApiAi\n module SystemEntityExamples\n # Example system entity values to use when replacing/annotating entity values.\n #\n # @see https://docs.api.ai/docs/c...
ruby
chosen
[ { "from": "system", "value": "Fix markup for tags search\n" }, { "from": "human", "value": "module Clarifai\n class Client\n # Defines methods related to Curator Index management\n module CuratorSearch\n def search(index, search_options={})\n response = post(\"curator/#{index}...
ruby
chosen
[ { "from": "system", "value": "Fix syntax bug on retina file matching" }, { "from": "human", "value": "# Automatic Image Sizes extension\nclass Middleman::Extensions::AutomaticImageSizes < ::Middleman::Extension\n def initialize(app, options_hash={}, &block)\n super\n\n # Include 3rd-party...
ruby
chosen
[ { "from": "system", "value": "Prepend \"Hairballs\" to log messages\n" }, { "from": "human", "value": "require_relative '../../hairballs'\n\n# When any value is returned by evaluating some Ruby, this will check if it is\n# JSON (by parsing it). If it's JSON-like, it will get formatted prettily ...
ruby
chosen
[ { "from": "system", "value": "Use operating systen and raise error if distro is not supported\n" }, { "from": "human", "value": "module Invoker\n module Power\n module Distro\n class Base\n RESOLVER_FILE = \"/etc/dnsmasq.d/dev-tld\"\n RINETD_FILE = \"/etc/rinetd.conf\"\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix RubyVersion does not add RUBY VERSION section back\n" }, { "from": "human", "value": "module LockfilePreserver\n class RubyVersion\n def initialize(original, updated)\n @original = original\n @updated = updated\n end\n\n def keep\n if or...
ruby
chosen
[ { "from": "system", "value": "Fix unhandled error in trap signal handler\n\nThread#backtrace can be nil. If this is the case, this signal handler\nwill throw an error and terminate the process. In the case of nil here,\nwe will just print nothing and continue on.\n" }, { "from": "human", "valu...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary instance variable for node\n\nWhile not declaring the `node` as a parameter for these helpers can make\nthings seem cleaner, it reduces the locality of the value's declaration\nto its use.\n" }, { "from": "human", "value": "module SCSSLint\n # Ch...
ruby
chosen
[ { "from": "system", "value": "Handle growl a little more gracefully\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'g'\n\nmodule Timer\n def time(message=\"\")\n start_time = Time.now\n yield\n end_time = Time.now\n put_elapsed_time(start_time, end_time, message)\n ...
ruby
chosen
[ { "from": "system", "value": "Update podspec to pass validation\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"KWStepper\"\n s.version = \"0.0.1\"\n s.summary = \"A stepper control with flexible UI and tailored UX.\"\n s.homepage = \"https://github...
ruby
chosen
[ { "from": "human", "value": "Fix broken Home Office detailed guide category\n\nhttps://www.pivotaltracker.com/story/show/46822955\n" }, { "from": "gpt", "value": "to_fix = MainstreamCategory.where(title: 'Powers of entry').first\n\nif to_fix\n to_fix.title = 'Policing and crime prevention'\n t...
ruby
chosen
[ { "from": "system", "value": "Make sure we allow compression on old sprockets...\n" }, { "from": "human", "value": "# Frozen-string-literal: true\n# Copyright: 2017 - 2018 - MIT License\n# Author: Jordon Bedwell\n# Encoding: utf-8\n\nmodule Jekyll\n module Assets\n module Compressors\n ...
ruby
chosen
[ { "from": "system", "value": "Add printing when bundling begins\n" }, { "from": "human", "value": "require 'tempfile'\n\nmodule Jekyll::Minibundle\n class AssetBundle\n def initialize(type, assets)\n @type, @assets = type, assets\n @temp_file = Tempfile.new \"jekyll-minibundle-#{@t...
ruby
chosen
[ { "from": "human", "value": "Add Amazon Service base class\n" }, { "from": "gpt", "value": "require 'aws-sdk'\nrequire 'contracts'\nrequire_relative 'support/rate_limit_handler'\nrequire_relative '../config'\n\nmodule StackatoLKG\n module Amazon\n class Service\n include ::Contracts::Co...
ruby
chosen
[ { "from": "system", "value": "Update BunnyRunner to use new asynchronous Bunny consumer API.\n" }, { "from": "human", "value": "require 'bunny'\n\nclass Woodhouse::Runners::BunnyRunner < Woodhouse::Runner\n include Celluloid\n\n def subscribe\n bunny = Bunny.new(@config.server_info)\n bu...
ruby
chosen
[ { "from": "system", "value": "Change rspec version to work with older rubies\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'm3u8/version'\n\nGem::Specification.new do |spec|\n spec...
ruby
chosen
[ { "from": "system", "value": "Change to fix spec to test no argument execution\n" }, { "from": "human", "value": "# encoding: utf-8\n\nRSpec.describe 'teletype' do\n xit \"prints available commands and global options\" do\n logo = <<-EOS\n ┏━━━┓\n ┏━┳╋┳┳━┻━━┓\n ┣━┫┗┫┗┳┳┳━┫\n ┃ ┃┏┫┏┫┃┃...
ruby
chosen
[ { "from": "system", "value": "Add rspec test for get photos by earth_date\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe MarsPhotos::Rover do\n let(:rover) { MarsPhotos::Rover.new(\"curiosity\") }\n\n it \"creates a curiosity rover\" do\n expect(rover.name).to eq(\"cur...
ruby
chosen
[ { "from": "system", "value": "Fix spec for less than-ness\n" }, { "from": "human", "value": "$:.unshift File.join(File.expand_path(File.dirname(__FILE__)), \"..\", \"lib\")\nrequire 'packetfu'\n\nPacketFu.packet_classes.each do |pclass|\n\tdescribe pclass, \"peek format\" do\n\t\tit \"will displ...
ruby
chosen
[ { "from": "system", "value": "Add spec to destroy a general deal.\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nrequire 'spec_helper'\n\nRSpec.configure do |config|\n config.use_transactional_fixtures = false\nend\n\ndescribe DealsController, :js => true do\n fixtures :users, ...
ruby
chosen
[ { "from": "system", "value": "Allow any Spree 2.0.0 version\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_product_assembly'\n s.version = '1.0.0'\n s.summary = 'Adds oportunity to make bundle of product...
ruby
chosen
[ { "from": "human", "value": "Add integration test for retriable job extension.\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'integration/jobs/print_line_job'\n\ndescribe \"Asynchronous publishing and consuming with retries\" do\n include_context \"Evented spec\"\n include_co...
ruby
chosen
[ { "from": "system", "value": "Make spec a bit more robust\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'dry/validation/contract'\n\nRSpec.describe Dry::Validation::Contract, 'Rule#each' do\n subject(:contract) { contract_class.new }\n\n let(:contract_class) do\n ...
ruby
chosen
[ { "from": "system", "value": "Add rake to development dependencies.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'pg_simulator'\n s.version = '0.0.1'\n \n s.summary = 'PostgreSQL Schema Simulator'...
ruby
chosen
[ { "from": "system", "value": "Add tests for mailing messages decorator\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass MailingMessageDecoratorTest < Draper::TestCase\nend\n" }, { "from": "gpt", "value": "require 'test_helper'\n\n#\n# == MailingMessageDecorator test\...
ruby
chosen
[ { "from": "system", "value": "Update spec to include resources.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\ns.name = \"Conductor\"\ns.version = \"0.99\"\ns.summary = \"A framework for displaying an 'on-boarding' UI\"\n\ns.homepage ...
ruby
chosen
[ { "from": "human", "value": "Solve Simple Calculate in ruby\n" }, { "from": "gpt", "value": "s = 0.0\n\nSTDIN.read.split(\"\\n\").each do |a|\n a, b, c = a.split.map { |x| x.to_f }\n s += c * b\nend\n\nputs \"VALOR A PAGAR: R$ #{'%.2f' % s}\"\n" } ]
ruby
chosen
[ { "from": "human", "value": "Add implementation of thirtieth-fifth rule of disambiguator prefix\n" }, { "from": "gpt", "value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule35\n def disambiguate(word)\n contains = /^ter([bcdf...
ruby
chosen
[ { "from": "system", "value": "Use test/unit/full instead of test/unit\n" }, { "from": "human", "value": "require 'simplecov'\nSimpleCov.start do\n add_filter '/test|deps/'\nend\n\ngem 'test-unit'\nrequire 'test/unit'\nrequire 'test/unit/rr'\n" }, { "from": "gpt", "value": "require '...
ruby
chosen
[ { "from": "system", "value": "Add solution file for challenge 4.6\n" }, { "from": "human", "value": "# Define a Hash\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below\n\n# my_info is empty to start. Edit this!\nmy_info = {\n :first_name => \"Kai\",\n :last_name =...
ruby
chosen
[ { "from": "system", "value": "Fix spec to use user with admin auth\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe DeliveriesController do\n before(:each) do\n activate_authlogic\n UserSession.create Factory(:user)\n end \n\n it \"should list deliveries only for so...
ruby
chosen
[ { "from": "system", "value": "Set up spec tests for new/create actions for pd_regimes.\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe PdRegimesController, :type => :controller do\n\n describe 'GET #new' do\n it 'renders the new template' do\n get :new\n ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary stubbed facts for Elasticsearch\n\nThe third-party `elasticsearch` module which `govuk_elasticsearch` calls\nneeds the `Linux` fact to be stubbed so that `elasticsearch::params` can\ndetermine the appropriate user/group for that platform.\n\nThe other facts l...
ruby
chosen
[ { "from": "system", "value": "Update podspec for the 3.1.0 release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.platform = :tvos\n s.tvos.deployment_target = \"9.0\"\n s.name = \"ParallaxView\"\n s.summary = \"Add parallax effect like in tvOS applications to any view...
ruby
chosen
[ { "from": "system", "value": "Stop ignoring html5rocks.com, disable SSL in link checks\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'html-proofer'\n\nHTMLProofer.check_directory('./_site', {\n\t:parallel => {\n\t\t:in_processes => 4,\n\t},\n\t:check_html => true,\n\t:cache =...
ruby
chosen
[ { "from": "system", "value": "Fix activity budgets index action test\n" }, { "from": "human", "value": "require 'test_helper'\nmodule Backend\n class ActivityBudgetsControllerTest < ActionController::TestCase\n test_restfully_all_actions duplicate: { params: { activity_id: 1, campaign_id: 6 ...
ruby
chosen
[ { "from": "system", "value": "Add test for the druid-historical service management.\n\nThe druid::historical class needs to ensure the druid-historical service\nis running and enabled.\n" }, { "from": "human", "value": "require 'spec_helper'\ndescribe 'druid::historical' do\n context 'with defa...
ruby
chosen
[ { "from": "system", "value": ":bug: Fix bad plural in Fishbans plugin\n" }, { "from": "human", "value": "require 'fishbans'\nrequire 'cinch'\nrequire_relative 'base_command'\n\nmodule Plugins\n module Commands\n class BanInfo < BaseCommand\n include Cinch::Plugin\n ignore_ignored_u...
ruby
chosen
[ { "from": "system", "value": "Add require for common responses module\n" }, { "from": "human", "value": "require 'gds_api/test_helpers/json_client_helper'\n\nmodule GdsApi\n module TestHelpers\n module NeedApi\n include GdsApi::TestHelpers::CommonResponses\n\n NEED_API_ENDPOINT = P...
ruby
chosen
[ { "from": "human", "value": "Correct first_published_at for NDA document\n\nWhile working on importing news content for the Nuclear Decommissioning\nAuthority in to Content Publisher we discovered a data inconsistency for the\n`first_published_at` value for one of their documents. In the first edition\n(id:...
ruby
chosen
[ { "from": "system", "value": "Add the rspec ~> 2.0.0 development dependencey in the RspecMixin.\n" }, { "from": "human", "value": "class Jeweler\n class Generator\n module RspecMixin\n def self.extended(generator)\n generator.development_dependencies << [\"rspec\", \">= 2.0.0.bet...
ruby
chosen
[ { "from": "system", "value": "Use new API endpoint for user data\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class Stylitics < OmniAuth::Strategies::OAuth2\n # Give your strategy a name.\n option :name, \"stylitics\"\n ...
ruby
chosen
[ { "from": "human", "value": "Add rake task to get cenit-admin application credentials\n" }, { "from": "gpt", "value": "namespace :cenit do\n namespace :admin do\n namespace :app do\n desc \"Show identifier and secret of Cenit-Admin build-in-app\"\n task :credentials => :environment...
ruby
chosen
[ { "from": "system", "value": "Fix migration error on database with zero IDs\n" }, { "from": "human", "value": "class AddIdentificationsCountToObservations < ActiveRecord::Migration\n def up\n add_column :observations, :identifications_count, :integer, :default => 0\n max_id = Identificati...
ruby
chosen
[ { "from": "human", "value": "Set up very basic hard coded structure with key and duration constraints, including sum of durations.\n" }, { "from": "gpt", "value": "$: << '/home/emily/Software/SonicPi/sonic-pi/app/server/vendor/mini_kanren/lib'\n\nrequire 'mini_kanren'\n\nres = MiniKanren.exec do...
ruby
chosen
[ { "from": "human", "value": "Add 4.2.2 Simple String Method Assignment\n" }, { "from": "gpt", "value": "# Solution Below\nold_string = \"Ruby is cool\"\n\nnew_string = old_string.upcase.reverse\n\nputs new_string\n\n\n\n\n# RSpec Tests. They are included in this file because the local variables ...
ruby
chosen
[ { "from": "system", "value": "Use subject.method instead of Tumblfetch::CLI.new.invoke('method')\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'tumblfetch/cli'\n\ndescribe Tumblfetch::CLI do\n describe '#version' do\n subject { capture(:stdout) { Tumblfetch::CLI.new.invok...
ruby
chosen
[ { "from": "system", "value": "Fix Rubocop issue with %w literals\n" }, { "from": "human", "value": "# coding: utf-8\n\nrequire_relative '../../spec_helper'\n\ndescribe 'Nexus3::Api' do\n let(:api_client) do\n Nexus3::Api.new('http://localhost/sample/api', 'admin', 'admin123')\n end\n\n let...
ruby
chosen
[ { "from": "system", "value": "Switch from rspec-rails to rspec\n\nThis commit drops the development dependency on `rspec-rails`. The specs\nfor `polymorpheus` don't use any of the extra functionality beyond what\nis provided by `rspec`.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*...
ruby
chosen
[ { "from": "human", "value": "Add stub rspec test to motd module\n" }, { "from": "gpt", "value": "require_relative '../../../../spec_helper'\n\ndescribe 'motd', :type => :class do\n\n it { is_expected.to compile }\n\n it { is_expected.to compile.with_all_deps }\n\n it { is_expected.to contain_...
ruby
chosen
[ { "from": "system", "value": "Rewrite tank bounding box method\n" }, { "from": "human", "value": "class TankGraphics < Component\n def initialize(game_object)\n super(game_object)\n @body = units.frame('tank1_body.png')\n @shadow = units.frame('tank1_body_shadow.png')\n @gun = units...
ruby
chosen
[ { "from": "system", "value": "Fix homepage URL in the gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"tokite/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.n...
ruby
chosen
[ { "from": "system", "value": "Update gc_ruboconfig requirement from ~> 3.0.1 to ~> 3.1.0\n\nUpdates the requirements on [gc_ruboconfig](https://github.com/gocardless/ruboconfig) to permit the latest version.\n- [Release notes](https://github.com/gocardless/ruboconfig/releases)\n- [Changelog](https://github....
ruby
chosen
[ { "from": "system", "value": "Use factory for name and key\n" }, { "from": "human", "value": "FactoryGirl.define do\n name = FactoryGirl.generate(:name)\n factory :application do\n name { name }\n key { name }\n canvas_api_permissions do\n {\n default: [\n \"admin...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary requires lines from spec\n" }, { "from": "human", "value": "require \"spec_setup\"\nrequire 'fileutils'\nrequire \"fpm\" # local\nrequire \"fpm/package/deb\" # local\nrequire \"fpm/package/dir\" # local\nrequire \"stud/temporary\"\nrequire \"Engl...
ruby
chosen
[ { "from": "human", "value": "Write context blocks for the IepStorer spec\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe IepStorer, type: :model do\n subject {\n IepStorer.new(\n file_name: 'IEP Document',\n path_to_file: '/path/to/file',\n file_date:...
ruby
chosen
[ { "from": "system", "value": "Add obvious dependency on restforce." }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'active_force/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec for files with spaces in the names\n" }, { "from": "human", "value": "# encoding: UTF-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = \"bib...
ruby
chosen
[ { "from": "system", "value": "Upgrade Opera Developer.app to 29.0.1795.0\n" }, { "from": "human", "value": "cask :v1 => 'opera-developer' do\n version '29.0.1794.0'\n sha256 'c6d875407a276a4b48a5d6b271ba5e40b7292c3734510635d74a56ccd7a1b6e8'\n\n url \"http://get.geo.opera.com/pub/opera-develop...
ruby
chosen
[ { "from": "system", "value": "Move oracle-related dependecies to the development section\n\nWhile it'll usually be the case, there's no reason to assume this will\nbe used with Oracle. We shouldn't force it here.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib'...
ruby
chosen