conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix csv read for bom\n"
},
{
"from": "human",
"value": "require \"csv\"\nclass ActiverecordDataImporter::CsvConverter\n def self.convert_csv_to_hash(filename)\n csvs = CSV.table(filename, header_converters: lambda { |h| h.underscore })\n hash = csvs.map do |c... | ruby | chosen |
[
{
"from": "system",
"value": "Add an aggregate finder with bang that raises exception\n"
},
{
"from": "human",
"value": "module SandthornDriverSequel\n class AggregateAccess < Access\n\n def find_or_register(aggregate_id, aggregate_type)\n if aggregate = find_by_aggregate_id(aggregate_i... | ruby | chosen |
[
{
"from": "system",
"value": "Move response code regexp building out of the constructor\n"
},
{
"from": "human",
"value": "require 'pinguin/success'\nrequire 'pinguin/failure'\nrequire 'net/http'\n\nmodule Pinguin\n module Checks\n class HTTP\n attr_reader :url\n attr_reader :respo... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional notes around skipping of editions\n\nOnce the draft stack is up and running, it is likely that we'll want to push out\ndraft content too so that it can be previewed.\n"
},
{
"from": "human",
"value": "module DataHygiene\n # Can be used to republish a... | ruby | chosen |
[
{
"from": "system",
"value": "Add COALESCE to default NULL columns to 0\n"
},
{
"from": "human",
"value": "module DataMapper\n module Adapters\n class DataObjectsAdapter < AbstractAdapter\n def adjust(attributes, collection)\n query = collection.query\n\n # TODO: if the qu... | ruby | chosen |
[
{
"from": "system",
"value": "[Haml] Use extend self for Haml::Shared.\n"
},
{
"from": "human",
"value": "require 'strscan'\n\n# :stopdoc:\nmodule Haml\n # This module contains functionality that's shared across Haml and Sass.\n module Shared\n def self.handle_interpolation(str)\n scan... | ruby | chosen |
[
{
"from": "system",
"value": "Fix git ls-remote that was breaking the project\n"
},
{
"from": "human",
"value": "require \"proteus/version\"\nrequire \"thor\"\n\nmodule Proteus\n class Kit < Thor\n include Thor::Actions\n\n desc \"url\", \"gets the git url\"\n def url(kit)\n \"git... | ruby | chosen |
[
{
"from": "system",
"value": "Use method missing to implement accessors for post metadata\n"
},
{
"from": "human",
"value": "require \"net/http\"\nrequire \"json\"\n\nrequire \"random_yiff/version\"\n\nclass RandomYiff\n\n attr_reader :post_uri\n\n def initialize\n @post_uri = RandomYiff.po... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for ActiveSupport::Autoload\n"
},
{
"from": "human",
"value": "module SexyScopes\n %w( Version VERSION ).each do |constant|\n autoload constant, 'sexy_scopes/version'\n end\n \n extend ActiveSupport::Autoload\n \n autoload :Wrappers\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Move to actual accessor for backend.\n"
},
{
"from": "human",
"value": "require 'qu/version'\nrequire 'qu/logger'\nrequire 'qu/hooks'\nrequire 'qu/failure'\nrequire 'qu/payload'\nrequire 'qu/job'\nrequire 'qu/backend/base'\nrequire 'qu/failure/logger'\nrequire 'qu/i... | ruby | chosen |
[
{
"from": "system",
"value": "FIX merge! was causing issues on sub-sections\n"
},
{
"from": "human",
"value": "module ShowOff\n module Parsers\n\n class PresentationFileParser\n\n def self.parse(filepath,options = {})\n options.merge!(:current_path => File.dirname(filepath))\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise exception when abstract methods from BlockchainAdapter::Base are called\n"
},
{
"from": "human",
"value": "module StraightEngine\n module BlockchainAdapter\n\n # An almost abstract class, providing guidance for the interfaces of\n # all blockchain adapt... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ActiveRecord reference from Unicorn config\n\nAs if we’re using that. LOL.\n"
},
{
"from": "human",
"value": "worker_processes (ENV['WEB_CONCURRENCY'] || 2).to_i\ntimeout (ENV['WEB_TIMEOUT'] || 9001).to_i\npreload_app true\n\nbefore_fork do |ser... | ruby | chosen |
[
{
"from": "system",
"value": "Handle showing flow drafts based off env var\n\nPreviously this file was overridden on a deployment, this changes it so\nthat the configuration can be determined based off the presence of an\nenvironment variable.\n"
},
{
"from": "human",
"value": "# This file poten... | ruby | chosen |
[
{
"from": "human",
"value": "Add rack request patch to fix omniauth callback issues\n"
},
{
"from": "gpt",
"value": "module Rack\n class Request\n def scheme\n if @env['HTTPS'] == 'on'\n 'https'\n elsif @env['HTTP_X_FORWARDED_SSL'] == 'on'\n 'https'\n elsif @env[... | ruby | chosen |
[
{
"from": "system",
"value": "Use the proper method for selecting from the database\n\n(ActionItem1733)\n"
},
{
"from": "human",
"value": "class RemovePublishedArticles < ActiveRecord::Migration\n def self.up\n select_all(\"SELECT * from articles WHERE type = 'PublishedArticle'\").each do |p... | ruby | chosen |
[
{
"from": "system",
"value": "Add test writing to an invalid location\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'thor'\n\ndescribe Clamshell::Dsl do\n\n before :all do\n Clamshell.ui = Clamshell::UI.new(Thor::Shell::Basic.new)\n end\n\n describe \"builder\" do\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add CLI noodlin create test\n"
},
{
"from": "gpt",
"value": "require_relative 'spec_helper'\n\ndescribe 'Noodle' do\n it \"should echo hi in shell\" do\n hostname = SecureRandom.uuid\n noodlin = \"create -s mars -i host -p hr -P prod #{hostname}.exam... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for non-200 error exceptions"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gemfury::Error do\n before do\n @client = Gemfury::Client.new\n @req_stub = stub_get(\"status/version\")\n end\n\n it 'should throw Unauthorized for a 401... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing test for reflect_on_recommendable\n\nSigned-off-by: David Celis <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@davidcel.is>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass User\n include Recommendable\nend\n\nclass Movie; end\n\ndescribe Re... | ruby | chosen |
[
{
"from": "system",
"value": "Update rev number in pod spec\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint SwiftPhotoGallery.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn... | ruby | chosen |
[
{
"from": "system",
"value": "Add error handling to ListItemsResponse\n"
},
{
"from": "human",
"value": "module Rapa\n module Responses\n class ListItemsResponse < BaseResponse\n private\n\n # @note Override\n def resource_class\n ::Rapa::Resources::ItemResource\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to detect travis environment and avoid looking for the signing key\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"rainforest_auth\"\n s.version = \"0.0.8\"\n s.date = \"2013-08-07\"\n s.summary ... | ruby | chosen |
[
{
"from": "system",
"value": "Add request to notification when request is created\n"
},
{
"from": "human",
"value": "class RequestsController < ApplicationController\n def create\n @request = Request.new(job_id: params[:job_id], client_id: current_user.id)\n job = Job.find(params[:job_id]... | ruby | chosen |
[
{
"from": "system",
"value": "Include helper methods for in_area action.\n"
},
{
"from": "human",
"value": "class ServicesController < ApplicationController\n \n def in_area\n expires_in 60.seconds, :public => true \n map_height = (params[:height].to_i or MAP_HEIGHT)\n map_width = (pa... | ruby | chosen |
[
{
"from": "system",
"value": "Address violation of Rubocop Rails/Delegate\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Spree\n class StockItem < ActiveRecord::Base\n belongs_to :stock_location, class_name: 'Spree::StockLocation'\n belongs_to :variant, class_n... | ruby | chosen |
[
{
"from": "system",
"value": "Correct name and case for TeamboxData validation\n"
},
{
"from": "human",
"value": "class TeamboxData\n validate :map_must_be_known\n validate :must_be_admin_of_target_organization\n validates_inclusion_of :service, :in => %(teambox basecamp)\n\n def must_be_adm... | ruby | chosen |
[
{
"from": "system",
"value": "Update Appium to version 1.4.8\n\nThis commit updates the version and sha256 stanzas.\n"
},
{
"from": "human",
"value": "cask :v1 => 'appium' do\n version '1.3.7'\n sha256 '13e79d5d4d19d8cbd47ebe4f672d616025c236e37bf32b3ca10364842415ed13'\n\n # bitbucket.org is t... | ruby | chosen |
[
{
"from": "human",
"value": "Add Cask for BitPim.App (CDMA phone explorer) v1.0.7\n\nBitPim hasn't been updated in a few years, but it still works on 10.9 (as tested by me) and may work on 10.10. It is one of the best GUI tools for pulling data from old phones.\n"
},
{
"from": "gpt",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for historical levels snapshot\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe HistoricalLevelsSnapshot do\n let!(:pals) { TestPals.create! }\n\n describe '.snapshot!' do\n it 'works' do\n log = LogHelper::FakeLog.new\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add movies to json export\n"
},
{
"from": "human",
"value": "class Identity < ActiveRecord::Base\n belongs_to :owner, class_name: User\n has_many :passwords, :dependent => :destroy\n has_many :identity_files, :dependent => :destroy\n has_many :category_points_am... | ruby | chosen |
[
{
"from": "system",
"value": "Add default published_at for Sample\n"
},
{
"from": "human",
"value": "Comable::Sample.import('categories')\n\nclothing = Comable::Category.where(name: Comable::Sample.t(:clothing)).first!\n\nproducts_attributes = [\n {\n name: Comable::Sample.t(:suede_dress),\n... | ruby | chosen |
[
{
"from": "system",
"value": "QUALITY: Remove tutor name from tutorial serializer\n"
},
{
"from": "human",
"value": "# Doubtfire will deprecate ActiveModelSerializer in the future.\n# Instead, write a serialize method on the model.\n\nrequire 'user_serializer'\n\nclass TutorialSerializer < Activ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove flag argument anti-pattern from Shop::OrderCyclesList\n\nCo-authored-by: Maikel <3db1433c7298ef0d91dd12baeaaf90dc122deafc@email.org.au>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Lists available order cycles for a given customer in ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix intercom API Key and Secret mixup\n\nThe Intercom.io API Secret was being used inplace of the Key for event reporting\n"
},
{
"from": "human",
"value": "class Event \n def self.client\n @client ||= Intercom::Client.new(app_id: IntercomRails.config.app_id, ap... | ruby | chosen |
[
{
"from": "system",
"value": "Modify publication_tab_list to show new labels\n"
},
{
"from": "human",
"value": "module Admin::BaseHelper\n\n def publication_tab_list(*statuses)\n output = statuses.collect do |status|\n content_tag(:li) do\n scope = status.downcase.gsub(' ', '_')\... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper method to build the page-URL from the request-URL.\n"
},
{
"from": "human",
"value": "module PaginationHelper\n\n def pagination(collection=nil, **options, &block)\n # call the collection-method if no collection is given\n collection ||= send :coll... | ruby | chosen |
[
{
"from": "system",
"value": "Add whitespace to highlight a TODO\n"
},
{
"from": "human",
"value": "# encoding : utf-8\n# frozen_string_literal: true\nclass RequestGeolocator\n def initialize(request)\n @request = request\n end\n\n def ip_address\n debug_ip_address = Rails.application.s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove stub after test and create two distinct calculators\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Spree::Calculator::FlexiRate do\n let(:calculator) { Spree::Calculator::FlexiRate.new(preferred_first_item: 2, preferred_additional_item:... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust view popup spec to truncate at 44 as in template\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe \"organisations/_popup.html.erb\", :type => :view do\n let(:org) do\n stub_model Organisation, :name => \"Friendly Charity\", :id => 1,\... | ruby | chosen |
[
{
"from": "system",
"value": "Use prepend instead of ugly alias_method chain\n"
},
{
"from": "human",
"value": "# Monkey patching patterns lifted from\n# https://github.com/thoughtbot/airbrake/blob/master/lib/airbrake/rake_handler.rb\nmodule ExceptionNotifier\n module RakePatch\n def self.in... | ruby | chosen |
[
{
"from": "system",
"value": "Stop deleting failed jobs so they can be diagnosed\n"
},
{
"from": "human",
"value": "silence_warnings do\n Delayed::Job.const_set('MAX_ATTEMPTS', 3)\n Delayed::Job.const_set('MAX_RUN_TIME', 5.minutes)\nend\n"
},
{
"from": "gpt",
"value": "silence_warn... | ruby | chosen |
[
{
"from": "system",
"value": "Update Kerbal Alarm Clock to 2.7.6.0\n"
},
{
"from": "human",
"value": "class KerbalAlarmClock < Kosmos::Package\n title 'Kerbal Alarm Clock'\n url 'https://github.com/TriggerAu/KerbalAlarmClock/releases/download/v2.7.3.0/KerbalAlarmClock_2.7.3.0.zip'\n\n def ins... | ruby | chosen |
[
{
"from": "system",
"value": "Correct requires to be properly relative.\n"
},
{
"from": "human",
"value": "require \"mail_alternatives_with_attachments/version\"\n\nmodule MailAlternativesWithAttachments\n require \"lib/action_mailer_prepare_message\"\n require \"lib/mail_message_alternative_t... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Add missing static function returning singleton logger\n"
},
{
"from": "human",
"value": "#\n# A universal logger\n#\nmodule LogHelper\n class DoubtfireLogger < ActiveSupport::Logger\n # By default, nil is provided\n #\n # Arguments match:\n # 1.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bundler version to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ansi_palette/version'\n\nGem::Specification.new do |spec|\n spec.name... | ruby | chosen |
[
{
"from": "system",
"value": "Add deployment target for tvOS in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"URLNavigator\"\n s.version = \"1.2.4\"\n s.summary = \"⛵️ Elegant URL Routing for Swift\"\n s.homepage = \"https:... | ruby | chosen |
[
{
"from": "system",
"value": "Replace .intern call with quoted symbol literal.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\nruby_version_is \"1.9\" do\n describe \"BasicObject#!=\" do\n it \"is a public instance method\" do\n BasicObje... | ruby | chosen |
[
{
"from": "system",
"value": "Validate that a user is not already a member of this event\n"
},
{
"from": "human",
"value": "class TeamMember < ActiveRecord::Base\n\n # All team members must be assigned to an event that exists\n belongs_to :event\n validates :event_id, presence: :true, numeric... | ruby | chosen |
[
{
"from": "system",
"value": "Set not validated attributes to nil\n"
},
{
"from": "human",
"value": "# Read about factories at http://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :user do\n provider \"twitter\"\n uid \"1234\"\n email \"foo@bar.com\"\n name \... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sqlite3 as a dependency.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"bootstrap-haml-helpers/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Include content_types of text/turtle and application/rdf+xml to http request header in retrieving VoID\n"
},
{
"from": "human",
"value": "require 'umakadata/data_format'\nrequire 'umakadata/http_helper'\nrequire 'umakadata/void'\nrequire 'umakadata/logging/log'\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra class_eval for Ruby 1.9\n"
},
{
"from": "human",
"value": "class Module\n # Declares an attribute reader backed by an internally-named instance variable.\n def attr_internal_reader(*attrs)\n attrs.each {|attr_name| attr_internal_define(attr_name, :... | ruby | chosen |
[
{
"from": "human",
"value": "Add sqlite3 recipe to install build dependencies\n"
},
{
"from": "gpt",
"value": "# This recipe is only used until the opscode sqlite cookbook gains capabilities\n# similar to the mysql and postgresql cookbooks, i.e. a client and ruby recipe.\n\nexecute \"apt-get upd... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor columns to resolve using rows concept\n\nMore consistent\n"
},
{
"from": "human",
"value": "class Grid\n SUBGRID_DIMENSIONS = [(0..2),(3..5),(6..8)].product([(0..2),(3..5),(6..8)])\n WIDTH = 9\n HEIGHT = 9\n\n delegate :size, to: :values\n\n def initia... | ruby | chosen |
[
{
"from": "system",
"value": "Use a template file for title for flexibility\n\nDifferent projects are going to have different requirements on how the\nheading is set. Lots of them are going to want to specify a custom\nsuffix. This lets them do it.\n"
},
{
"from": "human",
"value": "require 'erb... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify tests for ByteSequence.make_bytecode and ByteSequence.read_bytecode.\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe OOPM::Instructions::ByteSequence do\n describe '.make_bytecode' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for podspec 0.22.2"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'FMDB'\n s.version = '2.0'\n s.summary = 'A Cocoa / Objective-C wrapper around SQLite.'\n s.homepage = 'https://github.com/ccgus/fmdb'\n s.license = 'MIT'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency of highline; Version to 0.1.1\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.name = 'fir-cli'\n s.... | ruby | chosen |
[
{
"from": "human",
"value": "Add chained object builder example\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nclass BSONTestConverter\n class InvalidBSONString < StandardError; end\n def self.from_string(s)\n raise InvalidBSONString unless s =~ /^[0-9a-z]{24}$/\n return self.... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify tests for event retrieval\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe StripeEvent do\n let(:event_type) { StripeEvent::TYPE_LIST.sample }\n \n context \"subscribing\" do\n it \"registers a subscriber\" do\n subscriber = St... | ruby | chosen |
[
{
"from": "system",
"value": "Make progress on complete game test."
},
{
"from": "human",
"value": "require_relative 'test_helper'\nrequire_relative '../lib/game_runner'\n\nclass GameRunnerTest < Minitest::Test\n class FakeUI\n def initialize\n @output = []\n end\n\n def get_numbe... | ruby | chosen |
[
{
"from": "system",
"value": "Update the Rack stub for Ruby 1.9 and Rack 1.0 compliance.\n"
},
{
"from": "human",
"value": "app = lambda do |env|\n return [200, { \"Content-Type\" => \"text/html\" }, \"hello <b>world</b>\"]\nend\nrun app\n"
},
{
"from": "gpt",
"value": "app = lamb... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for change in how HTTP/1.0 is handled\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire 'puma/server'\n\nrequire 'socket'\n\nclass TestPumaUnixSocket < Test::Unit::TestCase\n\n App = lambda { |env| [200, {}, [\"Works\"]] }\n\n Path = \"test/... | ruby | chosen |
[
{
"from": "human",
"value": "Convert JSON data to required and available slots vs time\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'csv'\nrequire 'optparse'\n\noptions = {input: nil, output: \"data.csv\"}\nOptionParser.new do |opts|\n opts.banner = \"Usage: e... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for New Service Version\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\nrequire_relative 'support/ui_test_helper'\n\nclass CreateNewSchemaVersionTest < Capybara::Rails::TestCase\n include UITestHelper\n include Warden::Test::Helpers\n after { Wa... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak ruby_version number for each_with_object\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Enumerable#each_with_object\" do\n ruby_version_is ... | ruby | chosen |
[
{
"from": "system",
"value": "Add stock media query lookup\n"
},
{
"from": "human",
"value": "module PictureTag\n module Instructions\n # PictureTag configuration\n class Config < Instruction\n def source\n PictureTag::Parsers::Configuration.new\n end\n end\n\n # Ta... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing test for invalid user\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n\n factory :user, class:Hash do\n user_name { Faker::Internet.user_name }\n email { Faker::Internet.email }\n password { Faker::Internet.password }\n end\n\n fact... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for the total_count resetting behavior\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nRSpec.describe ActiveSet do\n it 'has a version number' do\n expect(ActiveSet::VERSION).not_to be nil\n end\n\n contex... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test that returns an ArgumentError\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Uom, :type => :model do\n\n describe '#valid?' do\n it 'validates correctly' do\n expect(Uom.valid? Uom::MILE).to eq(true)\n end\n it 'v... | ruby | chosen |
[
{
"from": "system",
"value": "Remove audit_viewer from white list for now\n"
},
{
"from": "human",
"value": "ALLOWED_ROLES = %w(\n admin\n compute_admin\n compute_viewer\n dns_viewer\n member\n monitoring_viewer\n network_admin\n network_viewer\n sharedfilesystem_admin\n sharedfilesyst... | ruby | chosen |
[
{
"from": "system",
"value": "Change callbacks to treat the compiler output\n"
},
{
"from": "human",
"value": "class Answer < ApplicationRecord\n include ApplicationHelper\n\n attr_reader :results\n\n before_create :set_correct\n after_create :save_test_cases_result\n\n validates_presence_o... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor proxy method into delcarative rails proxy method\n"
},
{
"from": "human",
"value": "class Player < ActiveRecord::Base\n belongs_to :user\n belongs_to :game\n has_many :actions\n\n validates :user, presence: true\n validates :game, presence: true\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add :sandybridge to hardware_family test\n\nSigned-off-by: Jack Nagel <43386ce32af96f5c56f2a88e458cb94cebee3751@gmail.com>\n"
},
{
"from": "human",
"value": "require 'testing_env'\n\nrequire 'extend/ARGV' # needs to be after test/unit to avoid conflict with OptionsP... | ruby | chosen |
[
{
"from": "system",
"value": "Remove breadcrumb na action show\n"
},
{
"from": "human",
"value": "class Dashboard::WorkersController < Dashboard::BaseController\n expose(:q) { current_user.company.workers.ransack(params[:q]) }\n expose(:roles) { current_user.company.roles }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Mark a facebook user as unsubscribed when they deauthorize your app\n"
},
{
"from": "human",
"value": "\nclass Facebooked::ClientController < Oauth::ClientController\n\n protected\n\n def provider\n return @provider if @provider\n @provider = Facebooked::Oau... | ruby | chosen |
[
{
"from": "system",
"value": "Change Watir test runner so that it does not contain a hardcoded list of files to run tests for\n"
},
{
"from": "human",
"value": "require 'test/unit'\n\n# make it possible to load the test cases from the local directory\n$:.unshift File.dirname(__FILE__)\n\n# FIXME... | ruby | chosen |
[
{
"from": "human",
"value": "Add EuDic.app v3.4.2 , Chinese name is '欧路词典'\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'eudic' do\n version :latest\n sha256 :no_check\n\n # frdic.com is the official download host per the vendor homepage\n url 'http://static.frdic.com/pkg/eudicmac.dmg'\n na... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 12.3 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Fix one test and put another in pending to refactor\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe 'site home' do\n let!(:template) {CardTemplate.create(greeting: \"whoops\")}\n\n it 'exists' do\n visit '/'\n expect(page).to have_conte... | ruby | chosen |
[
{
"from": "human",
"value": "Add uncommitted spec example for B::Transport.reachable?\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe Bunny::Transport, \".reachable?\" do\n it \"returns true for google.com, 80\" do\n Bunny::Transport.reacheable?(\"google.com\", 80, 1).sh... | ruby | chosen |
[
{
"from": "system",
"value": "Make the pod work with XML\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"LastFm\"\n s.version = \"1.11.0\"\n s.summary = \"Block based Last.fm SDK for iOS and Mac OS X.\"\n s.homepage = \"https://github.com/gangverk/L... | ruby | chosen |
[
{
"from": "system",
"value": "Fix disclosure factory to work with new length validations"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :disclosure do\n sequence(:title) { |n| \"My invention#{n}\" }\n abstract \"It does amazing things\"\n body \"Here is a description ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment about the case to use custom RubyGems/Bundler settings.\n\nex.)\n\n- GEM_HOME\n- GEM_PATH\n- BUNDLE_PATH\n"
},
{
"from": "human",
"value": "require \"spec_helper_#{ENV['SPEC_TARGET_BACKEND']}\"\n\n# In default, Serverspec uses the context specified envir... | ruby | chosen |
[
{
"from": "system",
"value": "Add commander as a dependency.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'addlicense/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add benchmarks for :full_matrix strategy\n"
},
{
"from": "human",
"value": "require \"benchmark\"\nrequire \"string_metric\"\nrequire \"text\"\n\nBenchmark.bmbm(7) do |x|\n x.report(\"Recursive implementation\") do\n (1..100).each do |i|\n StringMetric::Lev... | ruby | chosen |
[
{
"from": "system",
"value": "Add proxy workaround to crontab\n"
},
{
"from": "human",
"value": "\n\ncron 'pulledpork' do\n hour '12'\n minute '0'\n command \"/usr/local/bin/pulledpork.pl -c #{node['pulledpork']['pp_config_path']} -l && service #{node['pulledpork']['snort_svc_name']} restart\... | ruby | chosen |
[
{
"from": "system",
"value": "Add capybara screenshot debug step.\n"
},
{
"from": "human",
"value": "And /^I wait for (\\d*) seconds$/ do |seconds|\n sleep seconds.to_i\nend\n"
},
{
"from": "gpt",
"value": "And /^I wait for (\\d*) seconds$/ do |seconds|\n sleep seconds.to_i\nend\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error in spec file.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'postfix::augeas' do\n\n let :pre_condition do\n \"include ::augeas\"\n end\n\n on_supported_os.each do |os, facts|\n context \"on #{os}\" do\n let(:facts) do\... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for the version\n\nspec of InsensitiveSearch\n----\n\n- Add the describe 'VERSION'.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe InsensitiveSearch do\n subject { described_class.run(path_source) }\n\n shared_context 'relative path ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for photo service\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe PhotoService, type: :service do\n subject(:service) { PhotoService.new }\n\n describe '.default_builder' do\n subject(:builder) { PhotoService.default_builder }... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to point 1.1 version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n\tspec.name = \"Persei\"\n\tspec.version = \"1.0.1\"\n\t\n\tspec.homepage = \"https://github.com/Yalantis/Persei\"\t\n\tspec.summary = \"Animated top menu for UITableView... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust method name for upstream changes\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), 'ec2')\n\nmodule Opscode\n module Aws\n module S3\n include Opscode::Aws::Ec2\n\n def region\n if new_resource.region\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use gopls instead of golsp\n\ngolsp is deprecated package name\n"
},
{
"from": "human",
"value": "goget 'github.com/Ladicle/git-prompt'\ngoget 'github.com/ariarijp/crontoc'\ngoget 'github.com/atotto/clipboard/cmd/gocopy' do\n binary_name 'gocopy'\nend\ngoget 'githu... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dangeling references to pry debugger\n"
},
{
"from": "human",
"value": "module Fog\n module Compute\n class Ovirt\n class Real\n def add_to_affinity_group(id, options)\n binding.pry\n raise ArgumentError, \"instance id is a r... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler requirement from ~> 1.10 to ~> 2.0\n\nUpdates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.\n- [Release notes](https://github.com/bundler/bundler/releases)\n- [Changelog](https://github.com/bundler/bundler/blob/ma... | ruby | chosen |
[
{
"from": "system",
"value": "Fix link to swagger in `/info`\n"
},
{
"from": "human",
"value": "require 'helpers/shared_helpers'\n\nmodule API\n module V1\n # Root api endpoints\n class Root < Grape::API\n helpers SharedHelpers\n helpers do\n # Metadata communities hash w... | ruby | chosen |
[
{
"from": "system",
"value": "Change to sample config code\n"
},
{
"from": "human",
"value": "Roadcrew.configure do\n garage admin: {\n endpoint: 'https://staart-admin.herokuapp.com',\n access_token: ENV['STAART_ADMIN_ACCESS_TOKEN'],\n expires_at: ENV['STAART_ADMIN_EXPIRES_AT'],\n r... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary instance vars from controllers.\n"
},
{
"from": "human",
"value": "class ProjectsController < ApplicationController\n def new\n @user = User.find(params[:user_id])\n @project = Project.new\n end\n\n def create\n @user = User.find(param... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.