conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add feature spec for store autocomplete\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nRSpec.describe \"Store promotion rule\", js: true do\n stub_authorization!\n\n let!(:store) { create(:store, name: \"Real fake doors\") }\n let!(:promotion) { create(... | ruby | chosen |
[
{
"from": "system",
"value": "Disable browser spec on this branch until we figure out the menu.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nSimpleCov.command_name 'requests'\n\ndescribe Hdo::Application do\n it \"should load the front page\" do\n front_page.get\n end\n\n it \... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant loading of pg.\n\nThe file has been removed in AR-JDBC 1.3.0 and the library\nshould properly autoload when required from the Gemfile.\n"
},
{
"from": "human",
"value": "require 'active_record'\nrequire 'pg'\nrequire 'logger'\nrequire 'fileutils'\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec expectations to avoid flake specs\n\nThe last expectation we were using in this test is satisfied before\ngoing back to the admin stats page, as the campaing2 name is not\npresent before clicking the `Go back` link. Because of this, the\ntest could end while the req... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for capitalized letter\n"
},
{
"from": "human",
"value": "require './hero'\r\n\r\ndescribe Hero do \r\nend"
},
{
"from": "gpt",
"value": "require './hero'\r\n\r\ndescribe Hero do\r\n \r\n it \"has a capitalized name\" do\r\n hero = Hero.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bundler gem from 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 'peeek/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add content length header for progress bars\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\... | ruby | chosen |
[
{
"from": "system",
"value": "Update upload request Content-Type header from multipart/form-data to application/vnd.api+json\n"
},
{
"from": "human",
"value": "require \"flex_deployment_client/middleware/uploaded_file_middleware\"\nrequire \"flex_deployment_client/requestor/uploaded_file_request... | ruby | chosen |
[
{
"from": "system",
"value": "Add the curl package to the buildserver\n"
},
{
"from": "human",
"value": "\nuser = node[:settings][:user]\n\nexecute \"apt-get-update\" do\n command \"apt-get update\"\nend\n\n%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libsaxonb-java libssl1.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix WordPress recipe task name + overwrite default finalize too"
},
{
"from": "human",
"value": "set :shared_children, %w{ wp-content/uploads }\n\n# Custom events configuration\nafter \"deploy:update_code\", \"wordpress:update_code\"\n\nnamespace :deploy do\n desc ... | ruby | chosen |
[
{
"from": "system",
"value": "Update the application to make you specify a parameter\n"
},
{
"from": "human",
"value": "class MCollective::Application::Puppetupdate < MCollective::Application\n description \"Puppet repository updates Client\"\n usage \"Usage: mco puppetupdate -T oyldn or mco p... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude the email signups controller from the navigation test\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass NavigationSelectionTest < ActiveSupport::TestCase\n include ApplicationHelper\n include Rails.application.routes.url_helpers\n define... | ruby | chosen |
[
{
"from": "system",
"value": "Remove conditional from the tvOS declaration in the podspec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Blindside\"\n s.version = \"1.2.0\"\n s.summary = \"Blindside provides dependency injection capabilities for Objective... | ruby | chosen |
[
{
"from": "system",
"value": "Add XQuartz 2.7.5_rc4. Brew is whining when you start a doctor with 2.7.4.\n"
},
{
"from": "human",
"value": "class XQuartz < Cask\n url 'http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.4.dmg'\n homepage 'http://xquartz.macosforge.org/'\n version '2.7.4'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update project factory with title and wordcount_goal.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n\tfactory :project do\n\t\tgoal_time_limit 10\n\t\tactive true\n\t\tarchived false\n\t\tcompleted false\n\t\tuser\n\tend\nend"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec to walk through admin settings.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nfeature 'Administer' do\n context 'as an admin' do\n stub_authorization!\n\n scenario 'I want to browse to the sisow settings page' do\n visit spree... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to using traits to define approved_topic/approved_post factories\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :topic, :class => Forem::Topic do |t|\n t.subject \"FIRST TOPIC\"\n t.forum {|f| f.association(:forum) }\n t.user {|u... | ruby | chosen |
[
{
"from": "system",
"value": "Remove reference to backend from import_quotes\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass ImportQuotesSpec < BackendSpec\n\n let(:files) do\n [\n File.read(\"spec/support/sample_kindle_clippings.txt\"),\n File.read(\"spec/support... | ruby | chosen |
[
{
"from": "system",
"value": "Add another dsl test, now sending parameters to the nodes (e.g., activation, mode, etc)\n"
},
{
"from": "human",
"value": "require_relative '../domain/diagram'\nrequire_relative '../dsl/dsl.rb'\ngem 'minitest'\nrequire \"minitest/autorun\"\n\n\nclass DSLSTest < Mini... | ruby | chosen |
[
{
"from": "system",
"value": "Fix race conditions in file download tests.\n"
},
{
"from": "human",
"value": "require \"support/api_umbrella_test_helpers/process\"\n\nmodule ApiUmbrellaTestHelpers\n module Downloads\n DOWNLOADS_ROOT = File.join(ApiUmbrellaTestHelpers::Process::TEST_RUN_ROOT, ... | ruby | chosen |
[
{
"from": "system",
"value": "Update an add to list test\n"
},
{
"from": "human",
"value": "title 'add_to_list: Seperator delimiter tests'\n\n# 'Add first entry to an empty list'\ndescribe file('/tmp/samplefile3') do\n its(:content) { should match(/empty_list=newentry/) }\nend\n\n# 'Add existin... | ruby | chosen |
[
{
"from": "system",
"value": "Add exception name to error message"
},
{
"from": "human",
"value": "class Batch < Struct.new(:batch)\n def update\n OUT.puts \"Updating batch ##{batch}\"\n DB.view('ghcontributors/batches', :key => batch, :include_docs => true)['rows'].each do |row|\n b... | ruby | chosen |
[
{
"from": "system",
"value": "Define default proof status number.\n"
},
{
"from": "human",
"value": "class AddNumberToProofAttempt < ActiveRecord::Migration\n def change\n add_column :proof_attempts, :number, :integer, null: false\n end\nend\n"
},
{
"from": "gpt",
"value": "clas... | ruby | chosen |
[
{
"from": "system",
"value": "Fix in path in helper.\n"
},
{
"from": "human",
"value": "module ActionView::Helpers\n module ChartrHelpers\n # easy way to include Chartr assets\n def chartr_includes\n return \"<!--[if IE]>\\n\" +\n javascript_include_tag('chartr/excanvas.js', '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove '.rb' when requiring files\n"
},
{
"from": "human",
"value": "module BorderPatrol\n class InsufficientPointsToActuallyFormAPolygonError < ArgumentError; end\n class Point < Struct.new(:x, :y); end\n\n def self.parse_kml(string)\n doc = Nokogiri::XML(str... | ruby | chosen |
[
{
"from": "system",
"value": "Add more logging to deprecated records check\n"
},
{
"from": "human",
"value": "namespace :data_migration do\n desc \"Remove deprecated STAR records\"\n task remove_deprecated_star: :environment do\n Assessment.where(family: 'STAR').destroy_all\n end\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct subject for test\n\nMissed this in the refactor\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'core/repositories/categories/fake'\n\ndescribe Core::Repositories::Categories::Fake do\n let(:subcategory) { build :category_hash }\n let... | ruby | chosen |
[
{
"from": "system",
"value": "Fix NameError from file dependency order\n"
},
{
"from": "human",
"value": "unless defined?(Motion::Project::Config)\n raise \"This file must be required within a RubyMotion project Rakefile.\"\nend\n\nMotion::Project::App.setup do |app|\n # if Motion::Project.con... | ruby | chosen |
[
{
"from": "system",
"value": "Allow setting of PageSize and Page\n"
},
{
"from": "human",
"value": "class Saasu::Account < Saasu::Base\n allowed_methods :show, :index, :destroy, :update, :create\n filter_by %W(IsActive IsBankAccount AccountType IncludeBuiltIn)\nend\n"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Add class header to alias testing model\n"
},
{
"from": "human",
"value": "# Encoding: utf-8\nrequire 'test_helper'\n\nclass AliasTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Complete edit and update actions.\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n before_action :set_resource, only: [:index, :new, :create]\n before_action :set_comment, only: [:edit, :update, :destroy]\n\n def index\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Add flash messages & adjust routes for create and update\n"
},
{
"from": "human",
"value": "require 'pry'\nclass ProjectsController < ApplicationController\n load_and_authorize_resource\n\n def index\n @projects = Project.all\n end\n\n def show\n @project ... | ruby | chosen |
[
{
"from": "system",
"value": "Update dropbox oauth error message\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n def create\n auth_hash = request.env['omniauth.auth']\n user = Registration.find_or_create_user_from_auth_hash! auth_hash\n\n self.curr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specification of dependencies in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Atlas\"\n s.version = '1.0.0'\n s.summary = \"Atlas is a library of communications use... | ruby | chosen |
[
{
"from": "system",
"value": "Fix lockfile verification for empty lockfile\n"
},
{
"from": "human",
"value": "Given 'lockfile' do |content|\n create_file expand('$tmp').to_lockfile_path, expand(content)\nend\n\nGiven /^I delete lockfile$/ do\n delete_path expand('$tmp').to_lockfile_path\nend\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add more context for difficult-to-reproduce exception\n"
},
{
"from": "human",
"value": "module ExercismWeb\n module Routes\n class Solutions < Core\n get '/code/:language/:slug/random' do |language, slug|\n please_login\n\n language, slug = l... | ruby | chosen |
[
{
"from": "system",
"value": "Make `build_grammar` private in file converter\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'json'\n\nmodule Calyx\n class Grammar\n class << self\n def load(filename)\n file = File.read(filename)\n extension = File.extname(filen... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Faraday's updated middleware_registry interface.\n"
},
{
"from": "human",
"value": "require \"faraday\"\n\nrequire \"faraday/conductivity/version\"\n\nrequire \"faraday/conductivity/extended_logging\"\nrequire \"faraday/conductivity/mimetype\"\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Add public to vk parse\n"
},
{
"from": "human",
"value": "class IdsPlease\n class Vkontakte < IdsPlease::BaseParser\n\n MASK = /vk\\.com|vkontakte/i\n\n class << self\n def parse(links)\n links.map { |l| parse_link(l) }.compact\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr_accessor rather than attr_reader and instance variables.\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\nrequire 'librarian/helpers/debug'\n\nmodule Librarian\n class Dependency\n\n class Requirement < Gem::Requirement\n end\n\n include H... | ruby | chosen |
[
{
"from": "system",
"value": "Change variable name to something more appropriate\n"
},
{
"from": "human",
"value": "require 'singleton'\n\nmodule NormFramework\n\n class Steps\n include Singleton\n\n def self.add(pattern, &block)\n instance.add pattern, &block\n end\n\n def sel... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task to download and replace database with heroku snapshot\n"
},
{
"from": "human",
"value": "# desc \"Explaining what the task does\"\n# task :forest do\n# # Task goes here\n# end\n"
},
{
"from": "gpt",
"value": "desc \"Download and replace t... | ruby | chosen |
[
{
"from": "system",
"value": "Use low priority for emails sent at promo launch\n"
},
{
"from": "human",
"value": "require \"#{Rails.root}/app/helpers/promos_helper\"\nnamespace :promo do\n # Generates the promo tokens and sends emails\n task :launch_promo => :environment do\n include Promos... | ruby | chosen |
[
{
"from": "system",
"value": "Add filterable legend to the right\n"
},
{
"from": "human",
"value": "module StatisticsHelper\n\n def mttr_by_month\n stock_chart mttr_by_month_charts_path, basic_opts('Mean Time to Resolution (MTTR) by Month', 'months')\n end\n\n def mtta_by_month\n stock_... | ruby | chosen |
[
{
"from": "system",
"value": "Add more logging aroung blank posts\n"
},
{
"from": "human",
"value": "require 'image_sizer'\nrequire_dependency 'cooked_post_processor'\n\nmodule Jobs\n\n class ProcessPost < Jobs::Base\n\n def execute(args)\n post = Post.find_by(id: args[:post_id])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set categories serializable hash return name + cocoa pods count.\n"
},
{
"from": "human",
"value": "class CocoaPodCategory < ActiveRecord::Base\n has_many :cocoa_pods\n \n validates_uniqueness_of :name\n validates_presence_of :name\nend\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy previous contents before scanning\n"
},
{
"from": "human",
"value": "class ExtractExtensionVersionContentsWorker\n include Sidekiq::Worker\n\n def perform(version_id, path = \"\")\n @version = ExtensionVersion.find(version_id)\n @extension = @version... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec version to 0.0.16\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CoreData-Views-Collection-ios\"\n s.version = \"0.0.15\"\n s.summary = \"Collection of Core Data based Cocoa Touch views base classes\"\n s.de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix: Adjust in Gmap lib on get user coordinates when him is not logged\n"
},
{
"from": "human",
"value": "module Gmaps\n\n\n private\n\n def format_for_map_this(events)\n letter = ('A'..'Z').to_a\n i = 0\n @array_of_events = Array.new\n\n get_events_in... | ruby | chosen |
[
{
"from": "human",
"value": "Configure no root in json.\n"
},
{
"from": "gpt",
"value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains settings for ActionController::ParamsWrapper which\n# is enabled by default.\n\n# Enable parameter wrapping for JSON. You ... | ruby | chosen |
[
{
"from": "system",
"value": "Set appropriate assets pack for the keyword filter page\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass FiltersController < ApplicationController\n include Authorization\n\n layout 'admin'\n\n before_action :set_filters, only: :index\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set required Ruby version to 2.2.2\n\nThis is in line with the rest of the vCloud Tools estate.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vcloud... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use plugins loading mechanism.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'equatable'\nrequire 'pastel'\nrequire 'tty-color'\nrequire 'tty-cursor'\nrequire 'tty-command'\nrequire 'tty-editor'\n#require 'tty-file'\nrequire 'tty-pager'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use Process module for launching subprocess\n"
},
{
"from": "human",
"value": "#\n# This is the main class for the rockt gem. It defines the public interface.\n#\n# = Usage\n#\n# It's deadly simple:\n# Rockt.launch('http://github.com/')\n#\nmodule Rockt\n class N... | ruby | chosen |
[
{
"from": "system",
"value": "Raise an error if OrganisationMember creation fails.\n"
},
{
"from": "human",
"value": "class OrganisationMembersController < ApplicationController\n before_filter :get_or_create_user, :only => [:create]\n before_filter :get_user, :only => [:destroy]\n\n def crea... | ruby | chosen |
[
{
"from": "system",
"value": "Allow an admin to delete an HD Session\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Renalware\n module HD\n class ClosedSessionPolicy < BasePolicy\n def destroy?\n edit?\n end\n\n def edit?\n return fals... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure design interpolation works."
},
{
"from": "human",
"value": "#Tells the server where to find ImageMagick\n#Paperclip.options[:command_path] = \"/usr/local/bin/\"\nPaperclip.options[:swallow_stderr] = false\n\n#Load custom Paperclip interpolation\nPaperclip... | ruby | chosen |
[
{
"from": "system",
"value": "Use REST exception instead of EOFError in func. test.\n"
},
{
"from": "human",
"value": "TEST_ROOT = File.expand_path('..', __FILE__)\n$:.unshift File.expand_path('../lib', TEST_ROOT)\n\npid = Process.fork\nif pid.nil?\n exec \"/usr/bin/env ruby #{File.expand_path(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test name and add the right require\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/helper'\n\nclass RailsTest < Test::Unit::TestCase\n include DefinesConstants\n\n should \"trigger use of Rails' logger if logger isn't set and Rails' log... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency on activerecord-postgres-hstore, which is no longer a dependency of nested-hstore\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/toro/version', __FILE__)\n\nGem::Specification.new do |s|\n s.authors = ['Tom Benner']\n s.em... | ruby | chosen |
[
{
"from": "system",
"value": "Remove block tests that were turned into liquid integration tests\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass BlockTest < MiniTest::Test\n def test_no_allocation_of_trimmed_strings\n template = Liquid::Template.parse(\"{{ -}} {{- }}\")\... | ruby | chosen |
[
{
"from": "system",
"value": "Add columns for friendships migration table\n"
},
{
"from": "human",
"value": "class CreateFriendships < ActiveRecord::Migration[5.0]\n def change\n create_table :friendships do |t|\n\n t.timestamps\n end\n end\nend\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Revert changes made to create_articles migration\n"
},
{
"from": "human",
"value": "Hanami::Model.migration do\n change do\n create_table :articles do\n primary_key :id\n foreign_key :feed_id, :feeds\n column :guid, String\n column :url, Stri... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up send http request method\n"
},
{
"from": "human",
"value": "require 'net/https'\n\nmodule ActionSms #:nodoc:\n module ConnectionAdapters #:nodoc:\n # All the concrete gateway adapters follow the interface laid down in this\n # class. You can use thi... | ruby | chosen |
[
{
"from": "system",
"value": "Load database config from db_config instead\n"
},
{
"from": "human",
"value": "module Activerecord::Mysql::Reconnect::NewConnectionWithRetry\n def new_connection\n Activerecord::Mysql::Reconnect.retryable(\n :proc => proc { super },\n :connection => sp... | ruby | chosen |
[
{
"from": "system",
"value": "Update XBMC to version 13.0\n"
},
{
"from": "human",
"value": "class Xbmc < Cask\n url 'http://mirrors.xbmc.org/releases/osx/xbmc-12.3-x86_64.dmg'\n homepage 'http://xbmc.org/'\n version '12.3'\n sha256 'ff592da6e455cf06dddf90a765ab784b688285653bfdc2b5ab7820c9ee... | ruby | chosen |
[
{
"from": "system",
"value": "Add lang param to checkbox label for MailingUser in MailinMessage\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: mailing_users\n#\n# id :integer not null, primary key\n# fullname :string(255)\n# email :string(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix requirements in pod spec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'RunIt'\n s.module_name = 'RunIt'\n\n s.version = '0.1.0'\n\n s.homepage = 'https://github.com/Wisors/Ru... | ruby | chosen |
[
{
"from": "system",
"value": "Add initial solution back in\n"
},
{
"from": "human",
"value": "# Count Between\n\n# I worked on this challenge [by myself].\n\n# count_between is a method with three arguments:\n# 1. An array of integers\n# 2. An integer lower bound\n# 3. An integer upper bou... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple unit test for API fact override\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire_relative '../../spec_helper'\n\nrequire OctocatalogDiff::Spec.require_path('/api/v1/fact_override')\n\ndescribe OctocatalogDiff::API::V1::FactOverride... | ruby | chosen |
[
{
"from": "system",
"value": "Add sender url and receiver url to Agreement\n\nThe agreement object should be the same on either side.\n"
},
{
"from": "human",
"value": "require 'ticket_sharing/client'\nrequire 'ticket_sharing/json_support'\n\nmodule TicketSharing\n class Agreement\n\n attr_a... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for creating instances of a cloned Time class\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Time#dup\" do\n it \"returns a Time object that represents the same time\" do\n t = Time.at(100)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use certs in all environments"
},
{
"from": "human",
"value": "module StarterKit\n class AuthConfig < Settingslogic\n source \"#{Rails.root}/config/auth.yml\"\n namespace Rails.env\n load!\n end\nend\n\nOmniAuth.config.logger = Rails.logger\nOmniAuth.conf... | ruby | chosen |
[
{
"from": "human",
"value": "Test around S3 and the importer\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\nrequire 'fileutils'\n\ndescribe Amr::Importer do\n\n let(:local_bucket_path) { 'tmp/test' }\n let(:thing_prefix) { 'this-path'}\n let(:config) { AmrDataFeedConfig.new(s3_... | ruby | chosen |
[
{
"from": "system",
"value": "Use described_class method for consistency\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe Gakubuchi do\n describe \".configuration\" do\n subject { described_class.configuration }\n it { is_expected.to be_an_instance_of Gakubuch... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for actual line coverage, only no files for now\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"tempfile\"\n\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\nrequire \"tempfile\"\n\n\nRSpec::Matchers.define :have_c... | ruby | chosen |
[
{
"from": "system",
"value": "Improve interaction with Rack in app launcher\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.join(File.dirname($0), 'app')\nrequire 'launchy'\nrequire 'rack'\n\nputs $PROGRAM_NAME\n\nARGV << \"app/config.ru\" unless ARGV.length != 0\n\nrack_server = Rack... | ruby | chosen |
[
{
"from": "system",
"value": "Append a \"_\" to memoized instance variables\n"
},
{
"from": "human",
"value": "module ActiveSupport\n module Memoizable\n def self.included(base) #:nodoc:\n base.extend(ClassMethods)\n end\n\n module ClassMethods\n def memoize(symbol)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace generator for testing with sufficent one.\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')\n\ndescribe <%= class_name %> do\n\n before(:each) do\n @valid_attributes ... | ruby | chosen |
[
{
"from": "system",
"value": "Update backports dependency to ~> 3.0.3\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'yardstick/version'\n\nGem::Specification.new do |gem|\n gem.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec for new version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'random_point_generator'\n s.version = '0.0.1'\n s.date = '2014-12-08'\n s.licenses =['MIT']\n s.summary = 'Generates random map points, within ... | ruby | chosen |
[
{
"from": "system",
"value": "Update the tests to match the dollar challenge\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass MathToItex::BasicTest < Test::Unit::TestCase\n def test_it_does_not_error_on_nested_commands\n result = MathToItex('$$ a \\ne \\text{foo $\\Gamma$ ... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for the provided \"binary\" file\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\nrequire 'tempfile'\n\nclass RedcarpetBinTest < Redcarpet::TestCase\n def setup\n @fixture_file = Tempfile.new('bin')\n @fixture_path = @fixture_file.path\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set tag field type to work with an array as input\n"
},
{
"from": "human",
"value": "class TagFieldType < FieldType\n acts_as_taggable\n\n VALIDATION_TYPES = {\n presence: :valid_presence_validation?\n }.freeze\n\n attr_accessor :data, :tag_list, :field_name\... | ruby | chosen |
[
{
"from": "system",
"value": "Make the commented code valid\n"
},
{
"from": "human",
"value": "# Puffer::SessionsBase is a base class for any Admin::SessionsController\n# implementation by default implemented basic auth through PufferUser.\n# See Puffer::SessionsDeviseBase for alternative implem... | ruby | chosen |
[
{
"from": "system",
"value": "Add @question to be used by form\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n\n\n#GET /questions\n def index\n @questions = Question.all\n end\n\n#GET /questions/new\n def new\n if current_user\n render 'new'\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix call on nil in the view for land_parcel\n"
},
{
"from": "human",
"value": "json.call(product, :id, :name, :net_surface_area, :born_at, :dead_at, :variety)\njson.production_started_on product.production.started_on\njson.production_stopped_on product.production.st... | ruby | chosen |
[
{
"from": "system",
"value": "Update annuity rates for December\n"
},
{
"from": "human",
"value": "class GuaranteedIncomeCalculator\n TAX_FREE_POT_PORTION = 0.25\n TAXABLE_POT_PORTION = 0.75\n\n def initialize(pot:, age:)\n self.pot = pot\n self.age = age\n end\n\n attr_accessor :pot,... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to run in MRI\n\nOnly depend on Puck when we're running in JRuby, in MRI we'll default to creating tarballs"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$: << File.expand_path('../lib', __FILE__)\n\nrequire 'jara/version'\n\n\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Remove global values from gemspec\n\n* Update the gem license to be a string\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/axiom/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'axiom'\n gem.ver... | ruby | chosen |
[
{
"from": "system",
"value": "Change routing for option type edit\n\nCurrently there is a different behaviour when adding option values to\nsomething that has ever had its name or presentation altered. If either\nhas ever been altered it will route to the option types index. If\nneither has been altered it... | ruby | chosen |
[
{
"from": "system",
"value": "Increase timeout for merging coverage reports"
},
{
"from": "human",
"value": "# Must be placed at the beginning\n# @see https://github.com/colszowka/simplecov#getting-started\nunless ENV['PARALLEL'] || ENV['NO_COVERAGE']\n if ENV['RAILS_ENV'] =~ /^test(.*)?/\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Mark a FIXME in CourseHelper\n"
},
{
"from": "human",
"value": "#= Helpers for course views\nmodule CourseHelper\n def user_links(users, css_class=nil)\n value = ''\n users.each_with_index do |u, i|\n value += i > 0 ? '<br>'.html_safe : ''\n value +... | ruby | chosen |
[
{
"from": "system",
"value": "Rename and refactor, took @m50 suggestion\n"
},
{
"from": "human",
"value": "module SyntaxHelper\n def specific_page_vue\n \" #{controller_name} #{action_name} \"\n end\n\n def vue_include_tag\n javascript_include_tag \"https://cdn.jsdelivr.net/npm/vue/dist... | ruby | chosen |
[
{
"from": "system",
"value": "Sort timers most recent to oldest\n\nCloses #5\n"
},
{
"from": "human",
"value": "class TimersScreen < PM::TableScreen\n title \"When did\"\n\n def on_load\n set_nav_bar_button :right, system_icon: :add, action: :add_timer\n\n start_counter\n end\n\n def t... | ruby | chosen |
[
{
"from": "system",
"value": "Introduce auto test for development convenience."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"pg_audit_log/version\"\n\nGem::Specification.new do |s|\n s.name = \"pg_audit_log\"\n s.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.13'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n"
}... | ruby | chosen |
[
{
"from": "system",
"value": "Check if the service responds to the given method\n\nInstead of catching all NoMethodErrors and checking the message for the\nmethod name (which is brittle), simply check to see if the service\nresponds to the method. If it's not a publicly defined instance method,\nraise an RP... | ruby | chosen |
[
{
"from": "system",
"value": "Fix JSON parsing in middleware\n"
},
{
"from": "human",
"value": "require 'multi_json'\n\nclass Zeppelin\n module Middleware\n # Middleware for Faraday that parses JSON response bodies. Based on code in\n # the FaradayMiddleware project.\n #\n # @privat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix default spec in establish_connection on rails 4.1\n"
},
{
"from": "human",
"value": "class ActiveRecord::Base\n def self.establish_connection(spec = ENV[\"DATABASE_URL\"])\n if ActiveRecord::VERSION::MAJOR == 4 && ActiveRecord::VERSION::MINOR >= 1\n spe... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.