conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make haproxy disable call multithreaded\n"
},
{
"from": "human",
"value": "module KumoDockerCloud\n class HaproxyService < Service\n def initialize(stack_name)\n super(stack_name, 'haproxy')\n\n @client = docker_cloud_api.client\n end\n\n def dis... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for running features with ruby 1.8.7 (CSV)\n"
},
{
"from": "human",
"value": "Then \"I should see nicely formatted datetimes\" do\n page.body.should =~ /\\w+ \\d{1,2}, \\d{4} \\d{2}:\\d{2}/\nend\n\nThen /^I should see a link to download \"([^\"]*)\"$/ d... | ruby | chosen |
[
{
"from": "system",
"value": "Use private modifier since no inheritance or whatsoever\n"
},
{
"from": "human",
"value": "class OPMLFile\n attr_reader :name, :content_type, :size, :fullpath\n\n def initialize(content)\n fail UploadError, I18n.t('opml.error.empty_file') if content.nil?\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Add node matcher for rails metadata\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module RSpec\n # Check that the first argument to the top level describe is the tested\n # class or module.\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for rack/csrf"
},
{
"from": "human",
"value": "require_relative 'form'\n\nmodule Sequent\n module Web\n module Sinatra\n module FormHelpers\n def html_form(action, method=:get, options={}, &block)\n html_form_for nil, act... | ruby | chosen |
[
{
"from": "system",
"value": "Raise QueryBuilderError with helpful status\n"
},
{
"from": "human",
"value": "require 'rest-client'\nrequire 'json'\n\nmodule SafetyPin\n class QueryBuilder\n def self.execute(query)\n response = RestClient.get url, {params: query}\n results = JSON.pa... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to point to DeskAPIClient 1.1.4 and enable bitcode.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DeskKit\"\n s.version = \"1.2.1\"\n s.summary = \"A framework that makes it easy to incorporate your Desk sit... | ruby | chosen |
[
{
"from": "system",
"value": "Test all the resources in the resource test suite\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "apt_update 'update'\n\ninclude_recipe 'php'\n\n# create a test pool\nphp_fpm_pool 'test-pool' do\n ac... | ruby | chosen |
[
{
"from": "system",
"value": "Change API base url to use HTTPS\n\nhttps://github.com/vlado/open_exchange_rates/pull/9#issuecomment-239127834\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"open_exchange_rates/version\"\nrequire \"open_exchange_rates/configuration\"\nrequire \"... | ruby | chosen |
[
{
"from": "system",
"value": "Make podspec point to version 0.3\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'LRImageManager'\n s.version = '0.2'\n s.license = 'MIT'\n s.summary = 'Objective-C simple image manager with memory and disk cache support.'\n s.homepag... | ruby | chosen |
[
{
"from": "system",
"value": "Fix feature spec for adding offers\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"Company adds Offer\" do\n let(:company) { Company.first || FactoryGirl.create(:company) }\n\n before do\n login_as(company, scope: :user)\n visit... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for testing with live v4.0.0 site\n\nUse AM_LIVE_BASE_URL_400 env var to specify base url to test with.\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire Pathname(__FILE__).ascend{|d| h=d+'spec_helper.rb'; break h if h.file?}\n\ndescribe 'Lo... | ruby | chosen |
[
{
"from": "system",
"value": "Allow including Job module to anonymous classes.\n"
},
{
"from": "human",
"value": "module QueueingRabbit\n\n module Job\n\n def queue(*args)\n if args.first.kind_of?(Hash)\n @queue_options = args.first\n else\n @queue_name, @queue_option... | ruby | chosen |
[
{
"from": "system",
"value": "Update Solr Formula to 1.4.0\n"
},
{
"from": "human",
"value": "require 'formula'\n\nSOLR_START_SCRIPT = <<-end_script\n#!/bin/sh\nif [ -z \"$1\" ]; then\n echo \"Usage: $ solr path/to/config/dir\"\nelse \n cd %s/example && java -Dsolr.solr.home=$1 -jar start.jar\... | ruby | chosen |
[
{
"from": "system",
"value": "Update HTDelegateProxt.podspec with 0.0.2 version and tag.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"HTDelegateProxy\"\n s.version = \"0.0.2\"\n s.summary = \"A class that allows you to assign multiple delegates.\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade CMake 3 to v3.0.2"
},
{
"from": "human",
"value": "require 'formula'\n\nclass NoExpatFramework < Requirement\n def expat_framework\n '/Library/Frameworks/expat.framework'\n end\n\n satisfy :build_env => false do\n not File.exist? expat_framework\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[merb-gen] Fix for generation of namespaced model specs\n\n[#1233 state:resolved]"
},
{
"from": "human",
"value": "require File.join( File.dirname(__FILE__), <%= go_up(modules.size + 1) %>, \"spec_helper\" )\n\ndescribe <%= class_name %> do\n\n it \"should have spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning for stubbing initialize\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe RevisionFeedbackController do\n describe '#index' do\n let!(:course) { create(:course, id: 1) }\n let(:assignment) { cre... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for appdmg_eula package provider\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\nrequire 'spec_helper'\n\ndescribe Puppet::Type.type(:package).provider(:appdmg_eula) do\n let(:resource) { Puppet::Type.type(:package).new(:name => 'foo', :provider => :... | ruby | chosen |
[
{
"from": "system",
"value": "Rename rake task create_admin -> create_user\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\ndesc \"Create nondigest versions of all ckeditor digest assets\"\ntask \"assets:precompile\" do\n fingerprint = /\\-[0-9a-f]{32}\\./\n for file in Dir[\"public/a... | ruby | chosen |
[
{
"from": "system",
"value": "Add debugging instruction to debug why rake task failing\n"
},
{
"from": "human",
"value": "require 'active_record'\nrequire 'multi_spork'\n\nnamespace :multi_spork do\n namespace :testdbs do\n desc \"Clone schema of development db to test dbs to be used by mult... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in spot controller\n"
},
{
"from": "human",
"value": "class SpotsController < ApplicationController\n before_filter :load_spot, only: [:show, :edit, :update, :destroy]\n\n def index\n \t@spots = Spot.all\n @spots = @spots.order(:favorites_count)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add http basic auth to users controller\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_action :authenticate_user!, except: [:new, :create]\n\n def new\n if current_user.present?\n redirect_to dashboard_path\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove prefix stripping since it's not used\n"
},
{
"from": "human",
"value": "require 'album_photos'\n\nclass AlbumCreator\n attr_reader :title, :prefix\n\n def initialize(title)\n @title = title\n @prefix = title.to_url\n end\n\n def insert_all_photos\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment on extensions/input types hash.\n"
},
{
"from": "human",
"value": "module Ontology::HetsOptions\n extend ActiveSupport::Concern\n\n EXTENSIONS_TO_INPUT_TYPES = {'.tptp' => 'tptp',\n '.p' => 'tptp'}\n\n def hets_options\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move indexing listener to back of the queue\n\nTo minimise the chance that the search indexing job is picked up before\na scheduled-edition publishing transaction is complete, we move have the\nsearch indexer listener register itself last.\n"
},
{
"from": "human",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Allow setting an alternative panopticon endpoint during development.\n"
},
{
"from": "human",
"value": "require 'panopticon_api'\n\nPanopticonApi.endpoint = case Rails.env.to_s\nwhen 'development' then 'http://panopticon.dev.gov.uk'\nwhen 'test' then 'http://panopti... | ruby | chosen |
[
{
"from": "system",
"value": "Fix stop removal in efforts/show view for multi-lap events.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass EffortShowView < EffortWithLapSplitRows\n\n delegate :full_name, :bib_number, :gender, :split_times, :finish_status, :report_url, :... | ruby | chosen |
[
{
"from": "system",
"value": "Remove order-dependency from locale specs\n\nThis commit removes an implicit order dependency in the frontend locale\nspecs.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nshared_context 'fr locale' do\n before do\n I18n.backend.store_transl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bad recursive call\n\n\nFormer-commit-id: 69f08a332dfa56d3d3bfcfa931b629981c9cc809 [formerly 5c2f208bc5ddeee63749b54bd759439f6d4ef817] [formerly 1ca3c18e5cbcac9d566e32d2d6b320a49ecc8079 [formerly 1b5d8b976f3af6d1ec351ddbf0c2d8c02267f67d [formerly 0319a6768f65170052c8cd512... | ruby | chosen |
[
{
"from": "system",
"value": "Add new summary methods for inspecting exported assessments CSV\n"
},
{
"from": "human",
"value": "require 'csv'\n\nclass AnalyzeAssessmentsTable < Struct.new(:path)\n\n def contents\n encoding_options = {\n invalid: :replace,\n undef: :replace,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change directory before git pull origin master\n"
},
{
"from": "human",
"value": "module GitFindCommitter\n class Repository\n def initialize(config)\n @config = config\n end\n\n def prepare_repo\n if File.exist?(@config.tmp_repo_path)\n `... | ruby | chosen |
[
{
"from": "system",
"value": "Use urlsafe_base64 for url sensitive chars\n"
},
{
"from": "human",
"value": "require 'securerandom'\n\nmodule Sorcery\n module Model\n # This module encapsulates the logic for temporary token.\n # A temporary token is created to identify a user in scenarios\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dev dependencies from gemspec\n\n- doesn't work with test env, so they're in Gemfile anyway.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails-pipeline/version\"\n\n# Describe ... | ruby | chosen |
[
{
"from": "system",
"value": "Support older version of multi_json for backwards compatibility with other gems.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'faraday'\n\nmodule Github\n class Response::Jsonize < Response\n dependency 'multi_json'\n\n define_parser do |bo... | ruby | chosen |
[
{
"from": "system",
"value": "Return plain body on error when parsing response for json\n"
},
{
"from": "human",
"value": "module {{call .Fnc.camelize .Pkg.Name}}\n\n module HttpClient\n\n # ResponseHandler takes care of decoding the response body into suitable type\n class ResponseHandle... | ruby | chosen |
[
{
"from": "system",
"value": "Use QC::Delayed::TABLE_NAME instead of a static string"
},
{
"from": "human",
"value": "module QC\n module Delayed\n class Setup\n # Public: Creates a table for storing delayed jobs using the current\n # postgresql connection.\n #\n # Returns... | ruby | chosen |
[
{
"from": "system",
"value": "Make nemeservers create vips on the mgmt network\n"
},
{
"from": "human",
"value": "module Stacks::VirtualNameService\n def self.extended(object)\n object.configure()\n end\n\n def configure()\n @ports = [53]\n end\n\n def realserver_prod_fqdns\n self.... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Rubocop warning re: long parameter lists\n"
},
{
"from": "human",
"value": "require 'xml/mapping'\n\nrequire_relative 'descriptive_node'\nrequire_relative 'st_identifier'\nrequire_relative 'stash_administrative'\n\nmodule Stash\n module Wrapper\n class S... | ruby | chosen |
[
{
"from": "system",
"value": "Use kind_of object to check if http call was successfully.\n"
},
{
"from": "human",
"value": "module RSS\n def self.fetch(url, limit = 10)\n cache_key = 'rss::' + url\n items = Cache.get( cache_key )\n return items if items\n\n begin\n puts 'fetch ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reference to 'TZInfo Data' instead of 'TZInfo::Data'.\n"
},
{
"from": "human",
"value": "#--\n# Copyright (c) 2012 Philip Ross\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation fi... | ruby | chosen |
[
{
"from": "system",
"value": "Use ENV.to_hash instead of ENV.to_h\n"
},
{
"from": "human",
"value": "require 'dotenv'\nrequire 'dotenv/schema'\n\nmodule Dotenv\n class << self\n def load_with_validation(*filenames)\n env_before = ENV.to_h\n load_without_validation *filenames\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove active support, and simply use the json lib.\n"
},
{
"from": "human",
"value": "require 'activesupport'\n\nclass JsonResponse\n\n attr_reader :status\n\n def initialize\n @status = false\n @data = {}\n end\n\n def serialize\n { :status => @status... | ruby | chosen |
[
{
"from": "system",
"value": "Use if instead of unless to check existance of key.\n"
},
{
"from": "human",
"value": "# Cookbook Name:: rs_utils\n# Recipe:: setup_ssh\n#\n# Copyright (c) 2011 RightScale Inc\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo => router to routes\n"
},
{
"from": "human",
"value": "module RSpec::Rails\n # Extends ActionDispatch::Integration::Runner to work with RSpec.\n #\n # == Matchers\n #\n # In addition to the stock matchers from rspec-expectations, request\n # specs add... | ruby | chosen |
[
{
"from": "system",
"value": "Unify names of migration feature flags\n"
},
{
"from": "human",
"value": "module Travis::API::V3\n class Services::Repository::Migrate < Service\n # FIXME: This shouldn't be \"bar\" - we need confirmation on what the topic\n # should be for beginning the mi... | ruby | chosen |
[
{
"from": "system",
"value": "Add jancode to Item class\n"
},
{
"from": "human",
"value": "require \"openlogi/base_object\"\nrequire \"openlogi/stock\"\nrequire \"openlogi/international_info\"\nrequire \"openlogi/image\"\nrequire \"openlogi/boolean\"\n\nmodule Openlogi\n class Item < BaseObject... | ruby | chosen |
[
{
"from": "system",
"value": "Remove logic for inferring membership of the DR VDCs.\n\nThe disaster-recovery VDCs (VMWare \"virtual datacentres\") no longer\nexist; they were part of the old VMWare-based installation when parts of\nGOV.UK were hosted in Carrenza and UKCloud.\n\nThis logic had a bug where th... | ruby | chosen |
[
{
"from": "system",
"value": "Save the set temp at reading\n"
},
{
"from": "human",
"value": "class ThermControl\n SWING = 0.5\n CONTROL_PIN = 17\n\n def self.run\n pin = GPIO::Pin.new(pin: CONTROL_PIN, direction: :out)\n loop do\n begin\n set_temp = SetTemp.first\n t... | ruby | chosen |
[
{
"from": "human",
"value": "[COOK-2458] Update package cache on install failure and retry\n\nFix to update the aptitude package cache and retry when an apt-get\ninstall fails.\n"
},
{
"from": "gpt",
"value": "class Chef\n class Provider\n class Package\n class Apt\n\n def instal... | ruby | chosen |
[
{
"from": "system",
"value": "Add RSpec 3 to specs"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'morpheus/version'\n\nGem::Specification.new do |spec|\n spec.name = \"morph... | ruby | chosen |
[
{
"from": "human",
"value": "Add solution to problem 17\n"
},
{
"from": "gpt",
"value": "=begin\n\nIf the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.\n\nIf all the numbers from 1 to 1000 (one thousand) inclusi... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Use `cmd_tuples` instead of checking row index for migration.\n"
},
{
"from": "human",
"value": "class MigrateTosSetting < ActiveRecord::Migration\n def up\n res = execute(\"SELECT * FROM site_settings WHERE name = 'tos_accept_required' AND value = 't'\")\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow file names on build command line.\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"lib/http_doc/model\"\nrequire \"lib/http_doc/parser\"\nrequire \"lib/http_doc/rendering\"\n\nclass HttpDoc < Thor\n \n desc \"build PATH ...\", \"Generate do... | ruby | chosen |
[
{
"from": "system",
"value": "Add sorting of the boards.\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'haml'\nrequire 'leankitkanban'\n\nenable :sessions\n\nbefore do\n LeanKitKanban::Config.account = session[:account] \n LeanKitKanban::Config.email = session[:email] \n L... | ruby | chosen |
[
{
"from": "system",
"value": "Remove comments; same in README"
},
{
"from": "human",
"value": "# Sinatra app for local development\n# $ ruby app.rb\n\nrequire 'rubygems'\nrequire 'sinatra'\n\nset :static, true\nset :public_folder, './'\n\nget '/' do\n redirect '/index.html'\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Use env vars instead of config file for google creds.\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire 'sinatra'\nrequire \"yaml\"\nrequire 'haml'\nrequire \"google_drive\"\nrequire \"csv\"\nrequire \"json\"\nrequire \"jsonpath\"\nrequire 'rest_clien... | ruby | chosen |
[
{
"from": "system",
"value": "Fix type of type_key_name field to be String"
},
{
"from": "human",
"value": "# encoding: UTF-8\nmodule MongoMapper\n module Plugins\n module Associations\n class BelongsToAssociation < SingleAssociation\n def type_key_name\n \"#{as}_type\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Add required_ruby_version gemspec and set it to >= 2.1.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGEM_NAME = \"rbkit\"\n\nlib = File.expand_path(\"../lib\", __FILE__)\n$: << lib unless $:.include?(lib)\n\nrequire \"rbkit/version\"\n\nGem::Spec... | ruby | chosen |
[
{
"from": "human",
"value": "Add first draft of BatchResultCollection class.\n"
},
{
"from": "gpt",
"value": "module SalesforceBulk\n class BatchResultCollection < Array\n \n attr_reader :client\n attr_reader :currentIndex\n attr_reader :batchId\n attr_reader :jobId\n attr_rea... | ruby | chosen |
[
{
"from": "system",
"value": "Update handmade schema copier to also copy notification schemas\n"
},
{
"from": "human",
"value": "module SchemaGenerator\n class HandmadeSchemaCopier\n def copy_schema(schema_name)\n FileUtils.mkdir_p(\"dist/formats/#{schema_name}/publisher_v2\")\n Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Set up environment better for Travis testing.\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire_relative '../lib/main'\n\ndef local_api?\n ENV['SOLVEBIO_API_HOST'].start_with?('http://127.0.0.1')\nend\n"
},
{
"from": "gpt",
"value": "req... | ruby | chosen |
[
{
"from": "human",
"value": "Add a rake task to generate build metadata\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nfile \"lib/bundler/generated/build_metadata.rb\" => [\".git/HEAD\", __FILE__] do |t|\n build_metadata = {\n :built_at => BUNDLER_SPEC.date.strftime(\"%Y-%m-... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"minitest no version in dependency\"\n\nThis reverts commit c81858eba75f7415986f4d321c514a5f4c73cd35.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"supercharged/version\"\n\n# D... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature steps for first scenario\n"
},
{
"from": "gpt",
"value": "When(/^I see the home page$/) do\n visit root_path\nend\n\nWhen(/^I click \"([^\"]*)\"$/) do |link|\n click_on link\nend\n\nThen(/^I should see a new game$/) do\n\texpect(page).to have_content(/G... | ruby | chosen |
[
{
"from": "system",
"value": "Set secret token from ENV in production and raise error if not done\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add all and use view for single display\n"
},
{
"from": "human",
"value": "get '/task/:id' do |id|\n @task = Task.find(id)\n @task.description\nend\n\nget '/tasks/new' do\n erb :'task/new'\nend\n\npost '/tasks' do\n puts params.inspect\n task = Task.create(para... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade to Rubygems 2.6.13 to resolve CVEs\n\nhttp://blog.rubygems.org/2017/08/27/2.6.13-released.html\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# THIS IS NOW HAND MANAGED, JUST EDIT THE THING\n... | ruby | chosen |
[
{
"from": "system",
"value": "Return meaningful message when no gif found.\n"
},
{
"from": "human",
"value": "require \"sinatra/base\"\nrequire \"json\"\n\nclass GifBot < Sinatra::Base\n post \"/\" do\n return error(\"I need text and trigger_word parameters\") unless params_present?\n sea... | ruby | chosen |
[
{
"from": "system",
"value": "Add setting for number of Net Acuity connections\n\n\nFormer-commit-id: cca98e318665998559b3057695e34a10458cb1cf [formerly 153a9ca4e9621a202cd53bde075acd080ff9b5eb] [formerly 56b1a1729009943000bc3033f9cca4aeb81ab935 [formerly 15a41a6a19e9bcf1bbae178451cb480fa6b5bd7d]]\nFormer-c... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor and add some more error messages.\n"
},
{
"from": "human",
"value": "require 'safe_yaml'\nrequire 'sinatra/base'\n\nrequire 'cocoapods-core/specification'\nrequire 'cocoapods-core/specification/linter'\n\nrequire 'db/config'\nrequire 'app/models/github'\nre... | ruby | chosen |
[
{
"from": "human",
"value": "Add task to poll queue\n"
},
{
"from": "gpt",
"value": "require 'chronic'\n\n# https://github.com/ssoroka/scheduler_daemon\nclass PollInjectionResponsesTask < Scheduler::SchedulerTask\n environments :production, :demo\n every '1m'\n\n def run\n queue = Settings... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec\n- There are two subspec: ObjC and Swift\n- Default subspec is ObjC\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CHTCollectionViewWaterfallLayout\"\n s.version = \"0.9.2\"\n s.summary = \"The waterfall (i.e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra *_xen reference from specs\n\nfollow-up to ManageIQ/manageiq#20250\n"
},
{
"from": "human",
"value": "describe TreeNode::VmOrTemplate do\n subject { described_class.new(object, nil, nil) }\n\n # FIXME: make this dynamic somehow by using VmOrTemplate.d... | ruby | chosen |
[
{
"from": "system",
"value": "Replace [1] for last fixes problem when running run_tests!\n"
},
{
"from": "human",
"value": "module Mumukit::Templates::WithStructuredResults\n def post_process_file(file, result, status)\n result = extract_result(result)\n if [:passed, :failed].include? sta... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for laullon version of GitX git gui.\n\nMore up to date and developed than original GitX client.\n"
},
{
"from": "gpt",
"value": "class GitxL < Cask\n url 'https://github.com/downloads/laullon/gitx/GitX-L_v0.8.4.zip'\n homepage 'http://gitx.laullon.com/'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update Berkshelf to fix Ridley dep issue .. :/\n"
},
{
"from": "human",
"value": "default.base.berkshelf_version = '2.0.14'\ndefault.base.berkshelf_solve_version = '0.8.2'\n"
},
{
"from": "gpt",
"value": "default.base.berkshelf_version = '2.0.16'\ndefaul... | ruby | chosen |
[
{
"from": "system",
"value": "Fix MW Datasource removal toast text\n"
},
{
"from": "human",
"value": "class MiddlewareDatasourceController < ApplicationController\n include Mixins::GenericListMixin\n include Mixins::GenericShowMixin\n include EmsCommon\n include MiddlewareCommonMixin\n\n be... | ruby | chosen |
[
{
"from": "system",
"value": "Remove respond_to as it is not needed"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Spree\n module Admin\n class SuppliersController < ResourceController\n respond_to :html\n \n end\n end\nend\n"
},
{
"from": "gpt",
"value"... | ruby | chosen |
[
{
"from": "system",
"value": "Rollback to older version of bundler\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ruby_inspector/version'\n\nGem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Fix run with Azure Pipelines as CI Source and Azure Repos Git as Request Source\n\n"
},
{
"from": "human",
"value": "# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables\nrequire \"uri\"\nrequire \"danger/request_sources/github/github\"\n\nmodul... | ruby | chosen |
[
{
"from": "system",
"value": "Define to_s methods for GitHub::Client and Repository\n"
},
{
"from": "human",
"value": "require 'httparty'\nrequire 'json'\nrequire 'yaml' if ENV['REPONAUT_ENV'] == 'cucumber'\n\nmodule Reponaut\n module GitHub\n class NoSuchUserError < StandardError; end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as dev dependency, per travis-ci\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'private_attr/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in spec suite description\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(File.expand_path(__FILE__)), \"spec_helper\")\n\ndescribe \"filter_having extension\" do\n before do\n @ds = Sequel.mock.dataset.extension(:hash_aliases)\n end\... | ruby | chosen |
[
{
"from": "human",
"value": "Bring adjustment factory from spree_core\n"
},
{
"from": "gpt",
"value": "FactoryBot.define do\n factory :adjustment, class: Spree::Adjustment do\n association(:adjustable, factory: :order)\n amount 100.0\n label 'Shipping'\n association(:source, factory... | ruby | chosen |
[
{
"from": "system",
"value": "Add subcommands test in Noir::Command::Completion\n"
},
{
"from": "human",
"value": "require 'noir'\nrequire 'spec_helper'\n\ndescribe 'Noir::Command::Completion' do\n it 'is Noir::Command::TerminalCommand' do\n expect(Noir::Command::Completion.class).to eq(Clas... | ruby | chosen |
[
{
"from": "system",
"value": "Add sidebar to product page.\n"
},
{
"from": "human",
"value": "module Spree\n ProductsController.class_eval do\n\n def show\n @variants = @product.variants_including.active(current_currency).includes([:option_values, :images])\n @product_properties = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add other side of association to Office model\n"
},
{
"from": "human",
"value": "class Office < ActiveRecord::Base\n self.table_name = \"pw_moffice\"\nend\n"
},
{
"from": "gpt",
"value": "class Office < ActiveRecord::Base\n self.table_name = \"pw_moffi... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Watir::Browser.start, Watir::Browser.attach and any other Watir::Browser methods.\n"
},
{
"from": "human",
"value": "require File.expand_path('version', File.dirname(__FILE__))\n\nmodule Watir\n class Browser\n class << self\n def new(browse... | ruby | chosen |
[
{
"from": "system",
"value": "Include last 10 days in history\n"
},
{
"from": "human",
"value": "require 'date'\n\nclass StockInfo\n attr_accessor :symbol\n\n def initialize(symbol)\n self.symbol = symbol\n end\n\n def last_prices\n quotes.map { |quote| quote[:close].to_f }\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add tag stanza to firefox nightly\n"
},
{
"from": "human",
"value": "cask :v1 => 'firefox-nightly' do\n version '41.0a1'\n sha256 :no_check # required as upstream package is updated in-place\n\n url \"https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest... | ruby | chosen |
[
{
"from": "system",
"value": "Improve intent of the regex used to strip out _id, and other PR fixes\n"
},
{
"from": "human",
"value": "module Formtastic\n module Inputs\n # Outputs a label and a text field, along with a datalist tag\n # datalist tag provides a list of options which drives... | ruby | chosen |
[
{
"from": "system",
"value": "Select ideas for slides show\n"
},
{
"from": "human",
"value": "class StaticPagesController < ApplicationController\n def home\n \t@ideas = Idea.order('likes_count DESC')\n end\nend\n"
},
{
"from": "gpt",
"value": "class StaticPagesController < Applic... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the build on Ruby 1.8 using Test::Unit\n"
},
{
"from": "human",
"value": "module Shoulda\n module Matchers\n if defined?(Test::Unit::AssertionFailedError)\n AssertionError = Test::Unit::AssertionFailedError\n elsif Gem.ruby_version >= Gem::Version.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Allow any version of those depends.\n"
},
{
"from": "human",
"value": "$:.unshift(File.expand_path(\"../lib\", __FILE__))\nrequire \"clippy/version\"\n\nGem::Specification.new do |spec|\n spec.files = %W(Readme.md License Rakefile Gemfile) + Dir[\"lib/**/*\"]\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add required packages to build nokogiri.\n"
},
{
"from": "human",
"value": "include_recipe 'cron'\n# install gem backup with options --no-ri --no-rdoc before include_recipe 'backup'\ngem_package 'backup' do\n version node['backup']['version'] if node['backup']['ver... | ruby | chosen |
[
{
"from": "human",
"value": "Add pending specs until we figure out how to test warden.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule Gitometer\n class WardenHelped; include WardenHelpers; end\n\n describe WardenHelpers do \n subject { WardenHelped.new }\n \n pending ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to toggle live stream for hab_build resource\n\nSigned-off-by: Elliott Davis <ddda907ff26ca0abaafd09579d559b51098ffe8e@chef.io>\n"
},
{
"from": "human",
"value": "require_relative '../libraries/helpers'\n\nresource_name :hab_build\n\nactions :build, :pub... | ruby | chosen |
[
{
"from": "system",
"value": "Correct heading sizes in tests for visualization page\n"
},
{
"from": "human",
"value": "require_relative 'minitest_helper'\n\nclass TestWeb < MiniTest::Unit::TestCase\n\tinclude Rack::Test::Methods\n\n\tdef app\n\t\tRubyStats\n\tend\n\n\tdef test_redirect\n\t\tget ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the spec less confusing - technically poof! is a class method, but is intended to be used as an instance method by include\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Poof::Magic do\n\n describe '#poof!' do\n\n before(:all) do\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.