conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Set bucket team_id on create\n"
},
{
"from": "human",
"value": "class BucketsController < ApplicationController\n before_action :set_bucket, only: [:show, :edit, :update, :destroy]\n\n # GET /buckets\n def index\n @buckets = current_user.buckets\n @columns ... | ruby | chosen |
[
{
"from": "system",
"value": "Add merge to review params in controller to assign reviewer id to current user id\n"
},
{
"from": "human",
"value": "class ReviewsController < ApplicationController\n before_action :authenticate_user!\n\n def new\n @review = Review.new\n @review_carrier = Tr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix webadmin to run bundle before migrations.\n"
},
{
"from": "human",
"value": "require 'facets/kernel/ergo'\n\nRAILS_ROOT = File.dirname(File.dirname(File.expand_path(__FILE__)))\nRESTART_TXT = \"#{RAILS_ROOT}/tmp/restart.txt\"\n\ndef get_current_revision\n re... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for receiving Twilio SMS on carrier network\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\nrequire 'twilio-ruby'\n\nclass TwilioSmsTest < ActionDispatch::IntegrationTest\n\n test 'Send and receive Twilio SMS on carrier network' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make UpdateService error message translatable\n"
},
{
"from": "human",
"value": "module Groups\n class UpdateService < Groups::BaseService\n include UpdateVisibilityLevel\n\n def execute\n reject_parent_id!\n\n return false unless valid_visibility_l... | ruby | chosen |
[
{
"from": "system",
"value": "Send the products SKU inside note for reference later\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'json'\n\nmodule RlmRuby\n class License\n\n def self.generate_keys(contact = {}, products = [])\n req = Net::HTTP::Post.new(RlmRuby.configu... | ruby | chosen |
[
{
"from": "system",
"value": "Remove full namespacing when not needed\n"
},
{
"from": "human",
"value": "module Shamrock\n class Service\n\n attr_reader :port, :url\n\n def initialize(rack_app,\n handler = Rack::Handler::WEBrick,\n monitor = Shamrock::M... | ruby | chosen |
[
{
"from": "system",
"value": "Update importer to count rows and use passed in data\n\nInvoke with: rake guidance:import_csv[file,topic_name,org_name,author_email]\n"
},
{
"from": "human",
"value": "require 'logger'\n\nnamespace :guidance do\n task :import_csv, [:file] => [:environment] do |t, a... | ruby | chosen |
[
{
"from": "system",
"value": "Use the metaclass to get to the superclass of BasicObject.\n"
},
{
"from": "human",
"value": "module Celluloid::Proxy\n CLASS_METHOD = ::Kernel.instance_method(:class)\n \n # Looks up the actual class of instance, even if instance is a proxy.\n def self.class_of... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant GDS SSO initializer\n\nThis was made redundant in [1].\n\n[1]: https://github.com/alphagov/gds-sso/pull/241\n"
},
{
"from": "human",
"value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n config.oauth_id = ENV.fetch(\"OAUTH_I... | ruby | chosen |
[
{
"from": "human",
"value": "Add design by contract example\n"
},
{
"from": "gpt",
"value": "# Design by contract example\n\nclass A\n def initialize\n @transactions = []\n @total = 0\n end\n\n def buy price\n @transactions << price\n @total += price\n end\n\n def sell price\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace quotes with % for searching by name\n"
},
{
"from": "human",
"value": "class Firm\n include DataMapper::Resource\n \n property :id, Integer\n property :firm_id, Integer, :key => true\n property :name, String\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the version constant is available before we use it\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'net/http'\nrequire 'ostruct'\nrequire_relative 'core-ext/openstruct'\n\nmodule GdsApi::JsonUtils\n USER_AGENT = \"GDS Api Client v. #{GdsApi::VE... | ruby | chosen |
[
{
"from": "system",
"value": "Add tvOS deployment target and bump version to 1.0.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"KZAsserts\"\n s.version = \"1.0\"\n s.summary = \"KZAsserts is set of expanded assert macros that don't crash o... | ruby | chosen |
[
{
"from": "system",
"value": "Include development dependencies when building on travis.\n"
},
{
"from": "human",
"value": "# Copyright, 2012, by Natalie Weizenbaum.\n# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>\n#\n# Permission is hereby granted, free of charge, to any... | ruby | chosen |
[
{
"from": "system",
"value": "Allow working directory to be overridden\n"
},
{
"from": "human",
"value": "module Releasecop\n class Checker\n attr_accessor :name, :envs\n\n def initialize(name, envs)\n self.name = name\n self.envs = envs.map { |e| Releasecop::ManifestItem.new(na... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for VisTrails 2.0.3.\n\nAdd cask for VisTrails, an open-source scientific workflow and\nprovenance management system that supports data exploration and\nvisualization.\n"
},
{
"from": "gpt",
"value": "class Vistrails < Cask\n url 'http://downloads.sourcefor... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using node for the execjs runtime. Try switching back to therubyrhino.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nENV[\"BUNDLE_GEMFILE\"] ||= File.expand_path(\"../../Gemfile\", __FILE__)\n\nrequire \"bundler/setup\" # Set up gems listed ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Lato to version 2\n"
},
{
"from": "human",
"value": "class FontLato < Cask\n url 'http://www.latofonts.com/download/LatoOFL.zip'\n homepage 'http://www.latofonts.com/'\n version 'latest'\n sha256 :no_check\n font 'OTF/Lato-Bla.otf'\n font 'OTF/Lato-BlaI... | ruby | chosen |
[
{
"from": "system",
"value": "Work around issue with API/Savon\n"
},
{
"from": "human",
"value": "require 'virtus'\n\nmodule Asendia\n # Products are used for accessing stock levels.\n class Product\n include Virtus.model\n\n attribute :code, String\n attribute :description,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix references in Zone model spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Zone do\n\n let(:zone) { Factory :zone }\n\n context 'factory' do\n #let(:zone){ Factory :zone }\n\n it \"should set zone members correctly\" do\n zon... | ruby | chosen |
[
{
"from": "system",
"value": "Update wording for description for new style\n"
},
{
"from": "human",
"value": "rspec_module = defined?(RSpec::Core) ? 'RSpec' : 'Spec' # RSpec 1 compatability\n\nif rspec_module == 'RSpec'\n require 'rspec/core'\n require 'rspec/expectations'\nelse\n ActiveSuppo... | ruby | chosen |
[
{
"from": "system",
"value": "Create 10 users using faker and set password\n"
},
{
"from": "human",
"value": "require 'faker'\n\npassword = '123'\nusers = []\nrecipes = []\n"
},
{
"from": "gpt",
"value": "require 'faker'\n\npassword = '123'\nusers = []\nrecipes = []\n\n10.times do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set custom controller for registrations\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n mount_devise_token_auth_for 'User', at: 'auth'\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\n na... | ruby | chosen |
[
{
"from": "system",
"value": "Fix admin business size form\n"
},
{
"from": "human",
"value": "BikeChallenge::Application.routes.draw do\n\n resources :rides\n\n resources :teams do\n member do\n get :join, :leave\n end\n end\n\n resources :competitions do\n #resources :business... | ruby | chosen |
[
{
"from": "system",
"value": "Remove route for GET /members/:user_id/activation\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n root 'static_pages#home'\n\n get '/donation', to: 'static_pages#donation'\n\n resources :songs do\n collection do\n get 'search'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Try fixing route after omniauth update\"\n\nThis reverts commit ec79b90d20aa9fbd4a43e2c4eeb757eb748e91c0.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root to: 'sites#index'\n\n post 'omniauth/callback' => 'omniauth#callbac... | ruby | chosen |
[
{
"from": "human",
"value": "Test that the correct results show up on the tags page.\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"Tags\" do\n let(:tag) { FactoryGirl.create(:tag) }\n let!(:thread) { FactoryGirl.create(:message_thread, tags: [tag]) }\n let!(:issue) { ... | ruby | chosen |
[
{
"from": "human",
"value": "Add broadcast receiver example, in Ruby.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\nrequire 'socket'\nrequire 'ipaddr'\n\nMULTICAST_ADDR = \"224.0.0.3\" \nPORT = 47002\n\nip = IPAddr.new(MULTICAST_ADDR).hton + IPAddr.new(\"127.0.0.1\").hton\n\nsock = UDPS... | ruby | chosen |
[
{
"from": "system",
"value": "Remove new issue from project menu"
},
{
"from": "human",
"value": "require_dependency 'deployer/hooks'\n\nActionDispatch::Callbacks.to_prepare do\n require_dependency 'deployer/issue_patch'\n require_dependency 'deployer/project_patch'\nend\n\n\nRedmine::Plugin.r... | ruby | chosen |
[
{
"from": "system",
"value": "Add a description, my name and a version number.\n"
},
{
"from": "human",
"value": "require 'redmine'\n\nRedmine::Plugin.register :redmine_pureftpd_user do\n name 'Redmine Pureftpd User plugin'\n author 'Author name'\n description 'This is a plugin for Redmine'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue loading content for custom pages\n"
},
{
"from": "human",
"value": "module Dugway\n class Template\n attr_reader :name\n\n def initialize(name)\n @name = name\n end\n\n def content\n Dugway.theme.file_content(name)\n end\n \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use alias_method instead of alias\n"
},
{
"from": "human",
"value": "require 'wright/resource'\nrequire 'wright/dsl'\n\nclass Wright::Resource::Link < Wright::Resource\n def initialize(resource)\n super\n @source = nil\n @action = :create\n end\n attr_ac... | ruby | chosen |
[
{
"from": "system",
"value": "Add synthesize_head_routes helper to workaround HEAD routing bug in some Rails 4.x releases\n"
},
{
"from": "human",
"value": "require \"fallback_router/engine\"\n\nmodule FallbackRouter\n class << self\n end\nend\n"
},
{
"from": "gpt",
"value": "requi... | ruby | chosen |
[
{
"from": "system",
"value": "Copy function that handles most known errors, it is wrapper over\nFileUtils.cp\n"
},
{
"from": "human",
"value": "\nmodule Scratch \n\n module Actions\n\n require 'fileutils'\n\n def self.copy_templates(dest)\n\n end\n\n class Exec\n\n def self.ini... | ruby | chosen |
[
{
"from": "system",
"value": "Load decorators from correct dir, now that engine code was moved.\n"
},
{
"from": "human",
"value": "require 'spree_core'\n\nmodule SpreeOmnikassa\n class Engine < Rails::Engine\n engine_name 'spree_omnikassa'\n\n config.autoload_paths += %W(#{config.root}/li... | ruby | chosen |
[
{
"from": "system",
"value": "Add test:js task aliasing konacha:serve\n"
},
{
"from": "human",
"value": "Rake::Task[:test].enhance { Rake::Task[\"konacha:run\"].invoke }\n"
},
{
"from": "gpt",
"value": "Rake::Task[:test].enhance { Rake::Task['konacha:run'].invoke }\n\nnamespace :test... | ruby | chosen |
[
{
"from": "system",
"value": "Add acceptance test to check for package install and uninstall.\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'git class:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do\n it 'should run successfully' do\n pp = ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename name to identifier in the navigation factory.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :navigation do\n sequence(:name) { |n| \"foo-#{n}\" }\n description 'foo'\n end\nend\n"
},
{
"from": "gpt",
"value": "FactoryG... | ruby | chosen |
[
{
"from": "system",
"value": "Fix creating the destinations table.\n"
},
{
"from": "human",
"value": "RSpec.configure do\n dummy_connection = {\n 'adapter' => 'sqlite3',\n 'database' => File.join(__dir__, '..', 'test_database.sqlite3')\n }\n\n ActiveRecord::Base.configurations['default'... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6985svn\n\nHandBrakeCLI Nightly v6985svn built 2015-03-14.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6945svn'\n sha256 '303289b4ed14f9053d1ccaf01bd440d33418a8303cdf9c69e0116d45cec5b9e3'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add end to block in Question spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Question, type: :model do\n \"add some examples to (or delete) #{__FILE__}\"\n\n describe 'polymorphism works for the questions model' do\n\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Update Adobe Air to 4.0\n"
},
{
"from": "human",
"value": "class AdobeAir < Cask\n url 'http://airdownload.adobe.com/air/mac/download/3.9/AdobeAIR.dmg'\n homepage 'https://get.adobe.com/air/'\n version '3.9'\n sha1 '69863ef58dca864c9b9016b512ea79e5d1429498'\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Remove printed blank lines from tag details\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"colorator\"\nrequire \"json\"\n\ndata = JSON.parse(ENV[\"EVENT_JSON\"])\nlabel = %Q(TAG #{data[\"ref\"].delete_prefix(\"refs/tags/\").cyan})\npu... | ruby | chosen |
[
{
"from": "system",
"value": "Update forecast regex to support INLAND labels\n\nParser was breaking when \"...INLAND\" appear at the end of the first line\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'json'\nrequire 'net/http'\n\nget '/ping' do\n 'pong'\nend\n\nget '/forecast' ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Spectacle 0.8.6 for older (<Mavericks) Macs.\n\nCloses #7114.\n"
},
{
"from": "human",
"value": "class Spectacle < Cask\n version '0.8.8'\n sha256 '7c7386e526cbabedb1e16f2e3366c7842712f590985fe9d4f57ff9c0a7854bcf'\n\n url \"https://s3.amazonaws.com/spectacle/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for TagSpaces.\n"
},
{
"from": "human",
"value": "cask 'tagspaces' do\n version '2.3.0'\n sha256 '1b4823fc7ddae593df58c65f8269563569e57b2edc043861fc574c66e43d9c35'\n\n url \"https://github.com/tagspaces/tagspaces/releases/download/v#{vers... | ruby | chosen |
[
{
"from": "human",
"value": "Add id and timestamp to spree_promotion_rule_user\n"
},
{
"from": "gpt",
"value": "class AddIdAndTimestampToPromotionRuleUser < ActiveRecord::Migration\n def up\n add_column :spree_promotion_rules_users, :id, :primary_key\n add_column :spree_promotion_rules_us... | ruby | chosen |
[
{
"from": "system",
"value": "Add Twitter configuration. Load config values from yaml file.\n"
},
{
"from": "human",
"value": "require \"sinatra/base\"\nrequire \"sinatra/reloader\" if development?\nrequire \"twitter\"\n\nclass Star < Sinatra::Base\n\n get '/' do\n 'Star'\n end\n\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Create Task table and call ::auto_migrate\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'slim'\nrequire 'data_mapper'\n\nDataMapper.setup(:default,\n \"sqlite://#{File.expand_path(File.dirname(__FILE__))}/db/tdrb.db\")\n\nget '/' do\n '... | ruby | chosen |
[
{
"from": "human",
"value": "Change integer id columns into bigint\n"
},
{
"from": "gpt",
"value": "class ChangeIdColumnsTypesForSpreeVolumePrices < ActiveRecord::Migration[4.2]\n def change\n change_table(:spree_volume_prices) do |t|\n t.change :variant_id, :bigint\n t.change :rol... | ruby | chosen |
[
{
"from": "system",
"value": "Use --pre for pip 1.4\n"
},
{
"from": "human",
"value": "package 'postgresql-9.1'\npackage \"postgresql-server-dev-9.1\" \npackage \"python-dev\"\n\npython_virtualenv \"/vagrant/vagrant_env\" do\n action :create\nend\n\nexecute \"install SWIG library\" do\n co... | ruby | chosen |
[
{
"from": "human",
"value": "Add solution for problem 5\n"
},
{
"from": "gpt",
"value": "=begin\n\n2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.\n\nWhat is the smallest positive number that is evenly divisible by all of the numbers fro... | ruby | chosen |
[
{
"from": "human",
"value": "Add data migration to convert unknown news articles\n\nThe NewsArticleType Unknown is a legacy concept. These are NewsArticles that were never categorised into one of the other NewsArticleTypes. These are surfaced on the frontend via the [Announcements page](www.gov.uk/governmen... | ruby | chosen |
[
{
"from": "system",
"value": "Update string core ext to_b test so string with other content that doesn't match even if it contains true/false should return the same value.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TestCoreExtensions < Test::Unit::TestCase\n \n test \"to... | ruby | chosen |
[
{
"from": "system",
"value": "Fix class name for Tmptoml in Formula\n\nps-id: BA5BFDF4-45E8-4261-8CF0-4261970251C3\n"
},
{
"from": "human",
"value": "class TmpToml < Formula\n desc \"Command-line utility to render Tera templates using a toml config file as the variable source.\"\n homepage \"h... | ruby | chosen |
[
{
"from": "system",
"value": "Use a Hash for O(1) lookup\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'json'\nrequire 'license_finder/package_utils/pypi'\n\nmodule LicenseFinder\n class Pipenv < PackageManager\n def initialize(options = {})\n super\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix problem with authentication strategy\n"
},
{
"from": "human",
"value": "# TODO: Move all this to its own Gem for reuse in several projects\nmodule Devise\n module Strategies\n class MultipleTokensStrategy < Devise::Strategies::Base\n def valid?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable storage features in testing grounds\n\nIf the full-size region sets has_electricity_storage=false,\nstorage-related pages will still not be shown. However, if the region\npermits storage, it will no longer be forcibly turned off in scaled-down\nscenarios.\n\nCloses #1880... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Gemfile.lock before doing rake cruise\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nProject.configure do |project|\n project.build_command = 'source /usr/local/rvm/scripts/rvm && rvm use ruby-1.8.7-p249@diaspora && gem update --system && ruby lib... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor ChatMessagesController spec, fix errors in spec\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"rspec/mocks\"\n\ndescribe ChatMessagesController do\n describe \"#create\" do\n before do\n @user = Factory(:user)\n @group =... | ruby | chosen |
[
{
"from": "human",
"value": "Implement basic tests for cs_property provider\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Puppet::Type.type(:cs_property).provider(:crm) do\n before do\n described_class.stubs(:command).with(:crm).returns 'crm'\n end\n\n context 'when ge... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dependency error in inline testing connector\n"
},
{
"from": "human",
"value": "require 'sidekiq-unique-jobs/middleware/client/connectors/connector'\n\nmodule SidekiqUniqueJobs\n module Middleware\n module Client\n module Connectors\n class Testi... | ruby | chosen |
[
{
"from": "human",
"value": "Add - Add Sourceable status\n"
},
{
"from": "gpt",
"value": "class SourceableStatus < ActiveRecord::Migration[5.0]\n def change\n add_column :groups, :status, :integer, default: 0\n\n add_column :rooms, :status, :integer, default: 0\n\n add_column :users, :... | ruby | chosen |
[
{
"from": "system",
"value": "Include other text files in the gem\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/lib/db_purge/version')\n\nGem::Specification.new do |spec|\n spec.name = 'db-purge'\n spec.version = DbPurge::Version::STRIN... | ruby | chosen |
[
{
"from": "system",
"value": "Set a minimum version constraint on Faraday.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"faraday/detailed_logger/version\"\n\nGem::Specification.... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec for Chef 13.11.3\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"FC009\" do\n context \"on chef 14.2.0 with a cookbook that uses ifconfig attributes ... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple tests for index controller\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'index controller' do\n describe \"GET '/' \" do\n it 'loads the homepage' do\n get('/')\n expect(last_response).to be_ok\n end\n\n it 'contai... | ruby | chosen |
[
{
"from": "system",
"value": "Add deletion test for sibling relation\n"
},
{
"from": "human",
"value": "require 'rails_helper'\nrequire 'support/privacy_example'\nrequire 'support/public_scope_example'\n\nRSpec.describe Character, type: :model do\n it_behaves_like 'content with privacy'\n it_b... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic specs for Following\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Following do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Following ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a basic MockRequest test for RackShell\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe TicTacToe::RackShell do\n\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'rack'\nrequire 'tic_tac_toe/rack_shell'\n\ndes... | ruby | chosen |
[
{
"from": "system",
"value": "Update to use new arg list\n"
},
{
"from": "human",
"value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\ninclude Magick\n\n# Demonstrate the splice method.\n\nimg = Image.read('images/Flower_Hat.jpg').first\n\ngeom = Geometry.new(20,20, img.columns/2, img.rows/2)... | ruby | chosen |
[
{
"from": "system",
"value": "Use the actual constant since we don't need it's string representation\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Mongoid #:nodoc\n module Fields #:nodoc:\n\n module Internal #:nodoc:\n end\n\n # This module maps classes used in field typ... | ruby | chosen |
[
{
"from": "system",
"value": "Make pytype ignorable in PyObjectWrapper\n"
},
{
"from": "human",
"value": "module PyCall\n module PyObjectWrapper\n def initialize(pyobj, pytype)\n check_type pyobj, pytype\n @__pyobj__ = pyobj\n end\n\n attr_reader :__pyobj__\n\n def ==(othe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix submit button alignment in all cases\n"
},
{
"from": "human",
"value": "module ButtonComponents\n def submit_button(*args, &block)\n options = args.extract_options!\n # This was breaking the contact form - better to leave commented for now\n # if objec... | ruby | chosen |
[
{
"from": "system",
"value": "Add an escape_url helper, rename existing escape to escape_html\n"
},
{
"from": "human",
"value": "module Tumblargh\n module Renderer\n\n class Base\n\n class << self\n\n # Define a simple tag on the block.\n # Name being tag name, and optiona... | ruby | chosen |
[
{
"from": "system",
"value": "Add nice constructors to 'If' expression\n"
},
{
"from": "human",
"value": "module Verifier\n\n # A single branch in an if-elsif-else block.\n #\n # This consists of a condition and a body.\n # Else blocks have no condition (nil).\n class IfBranch\n\n attr_r... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use `record` instead of `r`"
},
{
"from": "human",
"value": "require File.expand_path('../../models/book', __FILE__)\n\nmodule Kindle\n module Annotator\n module Models\n class Books\n BookNotFoundError = Class.new(StandardError)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo: Fog::Connection is deprecated, not Fog::XML::Connection.\n\nCommit 0e1daf3d did a mass rename and accidentally renamed the intended deprecated method.\n"
},
{
"from": "human",
"value": "require \"fog/xml\"\n\nmodule Fog\n # @deprecated Use {Fog::Core::Con... | ruby | chosen |
[
{
"from": "system",
"value": "Handle if a flavor isn't set in attributes\n"
},
{
"from": "human",
"value": "# recipes/client.rb\n#\n# Author: Simple Finance <ops@simple.com>\n# License: Apache License, Version 2.0\n#\n# Copyright 2013 Simple Finance Technology Corporation\n#\n# Licensed under th... | ruby | chosen |
[
{
"from": "system",
"value": "Add type integer for pin_priority\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: apt\n# Resource:: preference\n#\n# Copyright 2010-2013, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file excep... | ruby | chosen |
[
{
"from": "system",
"value": "Update to new version of Julia\n\nUpdating version number and sha256 to Julia 0.4.3\n"
},
{
"from": "human",
"value": "cask 'julia' do\n version '0.4.2'\n sha256 '9ca3756d43cc10d950fafa6e93dd7f4c6ebeade5edb5307cc1e3217b04f5bbe1'\n\n # amazonaws.com is the officia... | ruby | chosen |
[
{
"from": "human",
"value": "Add a cask for Tiled.app\n"
},
{
"from": "gpt",
"value": "class Tiled < Cask\n url 'http://downloads.sourceforge.net/project/tiled/tiled-qt/0.9.1/tiled-qt-0.9.1.dmg'\n homepage 'http://www.mapeditor.org/'\n version '0.9.1'\n sha1 'f7f30ec8761ffd7f293242287ff4d462... | ruby | chosen |
[
{
"from": "system",
"value": "Add etc gem to work with ruby 2.5+."
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'docman/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct ovftool path for Fusion 5\n"
},
{
"from": "human",
"value": "require 'tempfile'\n\nmodule Veewee\n module Provider\n module Vmfusion\n module BoxCommand\n # This function 'exports' the box based on the definition\n def export_ova(optio... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to demonstrate breaking of the loop works\n"
},
{
"from": "human",
"value": "require_relative '../test_helper'\n\ndescribe Gst::Iterator do\n let(:bin) { Gst::Bin.new 'bin' }\n let(:fakesink) { Gst::ElementFactory.make 'fakesink', 'testname' }\n let(:ite... | ruby | chosen |
[
{
"from": "system",
"value": "Change the event check type for the AwaitEventHandler\n"
},
{
"from": "human",
"value": "require 'discordrb/events/generic'\nrequire 'discordrb/await'\n\nmodule Discordrb::Events\n # Event raised when an await is triggered\n class AwaitEvent\n attr_reader :awai... | ruby | chosen |
[
{
"from": "human",
"value": "Add FC070 to detect invalid platform supports in metadata\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "gpt",
"value": "rule \"FC070\", \"Ensure supports metadata defines valid platforms\" do\n tags %w{metadata}\n m... | ruby | chosen |
[
{
"from": "system",
"value": "Use the default a little later.\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\nmodule Fulcrum\n class MediaResource < Resource\n include Actions::List\n include Actions::Find\n include Actions::Create\n\n def default_content_type\n raise ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a safer method of fixing Net::HTTP and Net::FTP, as suggested by @wilkie.\n"
},
{
"from": "human",
"value": "require 'socket'\n\nmodule Net::Socket\n ::Socket.constants.each do |name|\n const_set(name, ::Socket.const_get(name))\n end\nend\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix delete duplicate log output label\n"
},
{
"from": "human",
"value": "module Rundock\n module Operation\n class Task < Base\n def run(backend, attributes = {})\n @instruction.each do |i|\n unless attributes[:task].key?(i)\n Log... | ruby | chosen |
[
{
"from": "system",
"value": "Fix vines gem install check.\n"
},
{
"from": "human",
"value": "module Vines\n module Web\n module Command\n class Init\n def run(opts)\n raise 'vines-web init <domain>' unless opts[:args].size == 1\n raise \"vines gem required: gem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flakey test related with non unique location generation\n\nTests like the following:\nhttps://github.com/ministryofjustice/Claim-for-Crown-Court-Defence/blob/0ea00787062887099785c2c2ea6ec307d34ef53a/spec/controllers/external_users/claims_controller_spec.rb#L657\n\nwere crea... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for things being removed from GC\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n\nRSpec::Matchers.define :have_instance_count_of do |expected|\n match do |actual|\n ObjectSpace.each_object(actual).count == expected\n end\n\n failure_messag... | ruby | chosen |
[
{
"from": "system",
"value": "Test validations for Account.code and Account.account_type.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Account do\n subject { FactoryGirl.build :account }\n \n it { should accept_values_for(:title, \"Test\", \"Test Account!\") }\n it { ... | ruby | chosen |
[
{
"from": "human",
"value": "Improve test coverage of box_path.rb\n"
},
{
"from": "gpt",
"value": "require 'file_data/formats/mpeg4/box_path'\nrequire 'support/test_stream'\nrequire 'file_data/helpers/stream_view'\n\nRSpec.describe FileData::BoxPath do\n let(:view) do\n v = Helpers::StreamVi... | ruby | chosen |
[
{
"from": "system",
"value": "Add more specs for Pronto::Message\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Pronto\n describe Message do\n describe '.new' do\n subject { Message.new(path, line, level, msg, '8cda581') }\n let(:path) { 'README.md' }\n let... | ruby | chosen |
[
{
"from": "system",
"value": "Add googl url shortener to runtime dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ejaydj/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in homepage for gem-hompage, bump version.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"gem-homepage\"\n s.version = \"0.0.1\"\n s.pl... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Reduce the Sentry sampling to 5%\"\n\nThis reverts commit 507d08ed62231721d88869056e3023a3eac153f0.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nif Rails.env.eql?('production') && ENV['SENTRY_DSN'].present?\n Sentry.init do |config|... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.