conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add Another Test for Aws::IoTDataPlane\n\nAdds a functional test for non-us-east-1 regions, regarding extraction\nof the SigV4 signing region.\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'stringio'\n\nmodule Aws\n module IoTDataPlane\n desc...
ruby
chosen
[ { "from": "system", "value": "Fix DSL/mock specs up to run, reveals a number of SWT failures though...\n" }, { "from": "human", "value": "class Shoes\n module Mock\n class TextBlock\n include Shoes::Mock::CommonMethods\n WIDTH = 20\n HEIGHT = 10\n\n def initialize(dsl, op...
ruby
chosen
[ { "from": "system", "value": "Disable job test as it fails on CI only\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nclass Api::V1::JobsControllerTest < ActionDispatch::IntegrationTest\n include ActiveJob::TestHelper\n\n setup do\n @user1 = us...
ruby
chosen
[ { "from": "system", "value": "Switch mount point tests to is_expected format\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'LVM Pool' do\n {\n '/dev/xvdb' => '/mnt/dev0',\n '/dev/xvdc' => '/mnt/dev1'\n }.each do |device, mountpoint|\n describe file(mountpoint) d...
ruby
chosen
[ { "from": "system", "value": "Simplify page_entries_info by adding entry_name interface to each ORM\n" }, { "from": "human", "value": "module Kaminari\n module PluckyCriteriaMethods\n include Kaminari::PageScopeMethods\n\n delegate :default_per_page, :max_per_page, :max_pages, :to => :mod...
ruby
chosen
[ { "from": "system", "value": "Allow a user to specify an output file\n" }, { "from": "human", "value": "require 'optparse'\n\ndef main(options = {})\n p options\nend\n\nif __FILE__ == $PROGRAM_NAME\n options = {}\n OptionParser.new do |opts|\n opts.banner = \"Usage: pathfinder.rb [options]...
ruby
chosen
[ { "from": "system", "value": "Set test framework for generators to RSpec\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.\n...
ruby
chosen
[ { "from": "system", "value": "Use a awesome_nested_set github fork for Rails 4\n\nHelp us get rid of the thousands of warnings due to an AR deprecation on\nhow to access connection from an instance, no rc for that gem has been\nrelased at this moment\n" }, { "from": "human", "value": "# By placi...
ruby
chosen
[ { "from": "human", "value": "Add first set of specs for editing answers\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"Surveys\" do\n let(:survey) { FactoryGirl.create(:survey, name: \"Question Set\") }\n let!(:question1) { FactoryGirl.create(:q_long, survey: survey, q...
ruby
chosen
[ { "from": "system", "value": "Fix descriptions in submissions repository spec\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe SubmissionRepository do\n before do\n stub_const('SubmissionRepository::ACCEPTED_THRESHOLD', 3)\n end\n\n describe \"#accepted\" do\n subje...
ruby
chosen
[ { "from": "system", "value": "Delete the TempFilePath constant that unused\n" }, { "from": "human", "value": "# Load the Rails application.\nrequire_relative 'application'\n\n# Initialize the Rails application.\nRails.application.initialize!\n\nTempFilePath = \"#{Rails.root}/public/temp/\"\n" ...
ruby
chosen
[ { "from": "system", "value": "Write failing test for include_blank option\n" }, { "from": "human", "value": "require 'rails_core_extensions/action_view_extensions'\n\nrequire 'action_view'\n\ndescribe RailsCoreExtensions::ActionViewExtensions do\n before do\n class TestModel1\n include ...
ruby
chosen
[ { "from": "human", "value": "Add failing specs for boolean attributes\n" }, { "from": "gpt", "value": "require_relative 'spec_helper'\n\ndescribe ActiveModel::Form do\n # Boolean params generated by the Rails form helpers look like this\n let(:params) do\n { \"form\"=>\n {\"not_checked...
ruby
chosen
[ { "from": "human", "value": "Add pending tests for Sermon search\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe User, type: :model do\n pending \"Sermons search should find all sermons by speaker\" \n pending \"Sermons search should find all sermons by title\" \n pe...
ruby
chosen
[ { "from": "system", "value": "Fix description of Spree::ReturnCalculator spec\n\nThe right method to be overridden is `compute` and\nnot `compute_shipment`.\n\nTake advantage of the change to use described_class here.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'r...
ruby
chosen
[ { "from": "system", "value": "Make \"truncate\" accessible from buttons.\n" }, { "from": "human", "value": "class ApplicationHelper::Button::Basic < Hash\n def initialize(view_context, view_binding, instance_data, props)\n @view_context = view_context\n @view_binding = view_binding\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add localhost to page slug helper assertion\n" }, { "from": "human", "value": "describe PagesHelper do\n class Tester\n include PagesHelper\n end\n\n context 'new record' do\n let(:new_record) { true }\n let(:expected) { { dough_component: 'MirrorInputVa...
ruby
chosen
[ { "from": "system", "value": "Check Onfido::RequestError has the right values when raised\n" }, { "from": "human", "value": "describe Onfido::RequestError do\n subject(:error) do\n described_class.new(failed_response['error']['message']).tap do |e|\n e.type = failed_response['error']['t...
ruby
chosen
[ { "from": "system", "value": "Team: Add class method to query by number plus aliases to it.\n\nIf there's an easier way to do this that I'm unaware of, then that'd be\ncool to know about, but for now it works.\n" }, { "from": "human", "value": "class Team\n\n\tinclude Mongoid::Document\n\tinclud...
ruby
chosen
[ { "from": "system", "value": "Add YARD docs for Transflow()\n" }, { "from": "human", "value": "require 'transflow/version'\nrequire 'transflow/flow_dsl'\n\ndef Transflow(options = {}, &block)\n Transflow::FlowDSL.new(options, &block).call\nend\n" }, { "from": "gpt", "value": "requir...
ruby
chosen
[ { "from": "system", "value": "Remove `:branch`, actually use `:revision`." }, { "from": "human", "value": "class Carthage < Formula\n desc \"Decentralized dependency manager for Cocoa\"\n homepage \"https://github.com/Carthage/Carthage\"\n head \"https://github.com/jdhealy/Carthage.git\",\n ...
ruby
chosen
[ { "from": "system", "value": "Allow stubbing on nil, this time\n" }, { "from": "human", "value": "require 'git_tracker/repository'\n\ndescribe GitTracker::Repository do\n subject { described_class }\n\n describe '.root' do\n let(:git_command) { 'git rev-parse --show-toplevel' }\n before ...
ruby
chosen
[ { "from": "human", "value": "Add podspec for iOS and OS X targets\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name = \"libsqlfs\"\n s.version = \"1.3\"\n s.summary = \"Library that implements a POSIX style filesystem on top of an SQLite database\"\n...
ruby
chosen
[ { "from": "system", "value": "Clean up archives migration script\n" }, { "from": "human", "value": "class CreateArchives < ActiveRecord::Migration\n def change\n create_table :archives do |t|\n t.integer :pages\n t.references :document, index: true, foreign_key: true\n\n t.tim...
ruby
chosen
[ { "from": "system", "value": "Move comment to context message\n" }, { "from": "human", "value": "require 'spec_helper'\n\nBIN = 'bin/gem-search'\nUSAGE = <<-EOS\nUsage: gem-search gem_name [options]\n\n -s, --sort Sort by the item.\n [n]ame :default eg. gem-sea...
ruby
chosen
[ { "from": "human", "value": "Include basic test spec for apache::mod::jk\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'apache::mod::jk', :type => :class do\n it_behaves_like 'a mod class, without including apache'\n\n it { is_expected.to compile }\n it { is_expected.to c...
ruby
chosen
[ { "from": "human", "value": "Add specs to test EventReporter\n" }, { "from": "gpt", "value": "require 'graphite_client'\nrequire File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\ndescribe \"GraphiteClient::EventReporter\" do\n before do\n @url = 'http://example.com/path'\n...
ruby
chosen
[ { "from": "system", "value": "Include spec_helper in booking spec.\n" }, { "from": "human", "value": "describe Booking do\n subject { FactoryGirl.build :booking }\n \n its(:title) { should == 'Simple Booking' }\n \n context \".by_value_date\" do\n it \"should find bookings on exact day\"...
ruby
chosen
[ { "from": "human", "value": "Add test for trailmix:schedule_all_prompts task\n" }, { "from": "gpt", "value": "require \"rake\"\n\ndescribe \"trailmix:schedule_all_prompts\", sidekiq: :inline do\n before do\n load \"tasks/trailmix.rake\"\n Rake::Task.define_task(:environment)\n end\n\n i...
ruby
chosen
[ { "from": "system", "value": "Add links to solution files\n" }, { "from": "human", "value": "=begin\nHow do you define a local variable?\n\tlocal_var = \"this is a local variable\"\n\nHow do you define a method?\n\tdef method_name (arg)\n\t\tmethod content\n\tend\n\nWhat is the difference betwee...
ruby
chosen
[ { "from": "system", "value": "Adjust require statement for relocated deploy utils.\n" }, { "from": "human", "value": "# Copyright 2008-2011 Red Hat, Inc, and individual contributors.\n# \n# This is free software; you can redistribute it and/or modify it\n# under the terms of the GNU Lesser Gener...
ruby
chosen
[ { "from": "system", "value": "Add the ability to print arrays 1" }, { "from": "human", "value": "filename = gets.chomp\nfile = File.open(filename, \"a+\")\nfilea = IO.readlines file\nfor i in 0..(filea.length - 1)\n line = filea.at(i)\n if line.split.at(0) == \"print\"\n puts line.s...
ruby
chosen
[ { "from": "system", "value": "Use ActionController::API instead of ::Base\n" }, { "from": "human", "value": "module Toke\n class ApplicationController < ActionController::Base\n protect_from_forgery with: :null_session\n\n include Toke::TokenAuthentication\n end\nend\n" }, { "fro...
ruby
chosen
[ { "from": "human", "value": "Create a couple of AWS::DirectoryService specs\n" }, { "from": "gpt", "value": "require 'test_helper'\nrequire 'json'\n\ndescribe 'AWS::DirectoryService' do\n let(:simple_ad_template) do\n ::Convection.template do\n directoryservice_simple_ad 'SimpleActiveDi...
ruby
chosen
[ { "from": "human", "value": "Add initial files for GPS 2.3\n" }, { "from": "gpt", "value": "# Your Names\n# 1) Cyrus Vattes\n# 2)\n\n# We spent [#] hours on this challenge.\n\n# Bakery Serving Size portion calculator.\n\ndef serving_size_calc(item_to_make, num_of_ingredients)\n library = {\"coo...
ruby
chosen
[ { "from": "system", "value": "Update link as suggested for Geo Sans Light\n" }, { "from": "human", "value": "class FontGeoSansLight < Cask\n url 'http://img.dafont.com/dl/?f=geo_sans_light'\n homepage 'http://www.dafont.com/geo-sans-light.font'\n version 'latest'\n sha1 'no_checksum'\n font...
ruby
chosen
[ { "from": "system", "value": "Fix button auth spec to properly setup environment\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ApplicationHelper::Button::CatalogItemButton do\n let(:session) { {} }\n before do\n @view_context = setup_view_context_with_sandbox({})\n ...
ruby
chosen
[ { "from": "system", "value": "Change podspec version -> 1.4.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Framer'\n s.version = '1.4.0'\n s.summary = 'Comfortable syntax for working with frames'\n s.description = <<-DESC\nFramer is a...
ruby
chosen
[ { "from": "system", "value": "Remove dead code in TreeBuilderServiceDialogs.\n" }, { "from": "human", "value": "class TreeBuilderServiceDialogs < TreeBuilderAeCustomization\n has_kids_for DialogGroup, [:x_get_tree_dialog_group_kids, :type]\n has_kids_for DialogTab, [:x_get_tree_dialog_tab_kids...
ruby
chosen
[ { "from": "system", "value": "Destroy duplicate assignments that differ by underscores\n" }, { "from": "human", "value": "class NormalizeTitles < ActiveRecord::Migration\n def up\n execute \"update articles set title = replace(title, ' ', '_')\"\n execute \"update assignments set article_...
ruby
chosen
[ { "from": "system", "value": "Use `remote` instead of `path.git_origin`.\n" }, { "from": "human", "value": "class Tap\n module Compat\n def initialize(user, repo)\n super\n\n return unless user == \"caskroom\"\n\n old_initial_revision_var = \"HOMEBREW_UPDATE_BEFORE#{repo_var}\...
ruby
chosen
[ { "from": "system", "value": "Upgrade Adobe Flash Player Plugin to v12.0.0.77\n" }, { "from": "human", "value": "class Flash < Cask\n url 'http://download.macromedia.com/pub/flashplayer/installers/archive/fp_12.0.0.44_archive.zip'\n homepage 'http://get.adobe.com/flashplayer/'\n version '12.0...
ruby
chosen
[ { "from": "system", "value": "Move keys to environment variables\n" }, { "from": "human", "value": "Rails.application.config.middleware.use OmniAuth::Builder do\n provider(\n :auth0,\n 'mV3LbBNO393VYjWHySzgONZT2t7kjqDh',\n '_ZnKuKfv17Vf_o_DA_KA7Ck5Nzzy-QvXi7U8GxBObHZkWuPAUwpMaDzTX_ZrzA...
ruby
chosen
[ { "from": "system", "value": "Fix bower search for null query\n" }, { "from": "human", "value": "class Api::BowerSearchController < Api::ApplicationController\n skip_before_action :check_api_key\n\n def index\n @query = params[:q]\n @search = paginate Project.search(params[:q], filters: ...
ruby
chosen
[ { "from": "system", "value": "[hephaestus] Add named entities extraction as a link task\n" }, { "from": "human", "value": "require 'httparty'\n\n\nclass LinksProcessorTask < Base\n @queue = :links_processor_task\n @msg = \"Procesando enlaces\"\n\n include HTTParty\n\n class ApiError < Runtim...
ruby
chosen
[ { "from": "system", "value": "[TS][000000] Use add as method name and alias shovel\n\nAlthough we're not necessarily emulating a Ruby Set class in\nAttributeSet, using #add like a Set does is clearer.\n" }, { "from": "human", "value": "require 'hashie'\n\nmodule Attrocity\n class AttributesHash...
ruby
chosen
[ { "from": "system", "value": "Copy script after build and use build version\n" }, { "from": "human", "value": "name 'coopr-cli'\ndefault_version 'develop'\n\nsource :git => 'git://github.com/caskdata/coopr.git'\nrelative_path 'coopr-cli'\n\nbuild do\n mkdir \"#{install_dir}/bin\"\n copy \"#{pr...
ruby
chosen
[ { "from": "human", "value": "Add override for mail recipients unless production\n" }, { "from": "gpt", "value": "unless Rails.env.production?\n class OverrideMailRecipient\n def self.delivering_email(mail)\n mail.to = anon_email(mail.to.first)\n end\n\n def self.anon_email(email)\...
ruby
chosen
[ { "from": "system", "value": "Add model definition to migration to make migration more resilient\n" }, { "from": "human", "value": "class RemoveGaCookiesPreference < ActiveRecord::Migration\n def up\n Spree::Preference\n .where( key: 'spree/app_configuration/cookies_policy_ga_section')\...
ruby
chosen
[ { "from": "system", "value": "Mongoid::Criteria: Use \" \" as delimiter.\n" }, { "from": "human", "value": "# lib/frecon/mongoid/criteria.rb\n#\n# Copyright (C) 2015 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part of FReCon, an API ...
ruby
chosen
[ { "from": "system", "value": "Fix homepage url for Bottle" }, { "from": "human", "value": "module Docs\n class Bottle < UrlScraper\n self.type = 'sphinx'\n self.root_path = 'index.html'\n self.links = {\n home: 'https://bottle.org/',\n code: 'https://github.com/bottlepy/bottl...
ruby
chosen
[ { "from": "system", "value": "Edit and update pins complete\n" }, { "from": "human", "value": "class PinsController < ApplicationController\n def index\n @pins = Pin.all\n if request.xhr?\n respond_to do |format|\n format.json { render json: @pins }\n end\n end\n...
ruby
chosen
[ { "from": "system", "value": "Allow optional block for content helper.\n" }, { "from": "human", "value": "module Bsat\n module ContentHelper\n\n def bsat_brand(title, path: nil)\n content_for(:bsat_brand, title)\n content_for(:bsat_brand_path, path) if path.present?\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Remove extra layer of storage abstraction\n" }, { "from": "human", "value": "require 'aws/s3'\nrequire 'forwardable'\n\nmodule Neutrino\n module Storage\n class AWS\n extend Forwardable\n\n class << self\n attr_accessor :acl, :bucket, :access_ke...
ruby
chosen
[ { "from": "system", "value": "Add Zip Code - UI\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Stripe\"\n s.version = \"1.1.4\"\n s.summary = \"Stripe is a web-based API for accepting payments online.\"\n s.license ...
ruby
chosen
[ { "from": "system", "value": "Fix spec failing on CI because of not precise time\n" }, { "from": "human", "value": "describe KnapsackPro::Config::EnvGenerator do\n describe '.set_queue_id' do\n subject { described_class.set_queue_id }\n\n context 'when queue id exists' do\n before do...
ruby
chosen
[ { "from": "system", "value": "Fix spec around Phase title editing\n" }, { "from": "human", "value": "class PhaseFragment < PageFragment\n text_assertions :card, '.card'\n\n def new_card(**params)\n find('a', text: 'ADD NEW CARD').click\n new_card = params[:overlay].launch(session)\n n...
ruby
chosen
[ { "from": "system", "value": "Add more detailed status output. Display exactly how many segments succeeded successfully.\n" }, { "from": "human", "value": "namespace :spree_chimpy do\n namespace :orders do\n desc 'sync all orders with mail chimp'\n task sync: :environment do\n scope ...
ruby
chosen
[ { "from": "system", "value": "Include doc pages urls in applications API\n" }, { "from": "human", "value": "class ApplicationsController < InheritedResources::Base\n include SortHelpers\n\n respond_to :html, :js, :xml\n\n helper_method :sort_column, :sort_direction\n\n def show\n super do...
ruby
chosen
[ { "from": "system", "value": "Fix a typo 'donation -> donate'\n" }, { "from": "human", "value": "class StaticPagesController < ApplicationController\n before_action :logged_in_user, only: :donation\n\n def home\n @song = Song.includes(playings: :user).pickup\n @lives = Live.published.ord...
ruby
chosen
[ { "from": "system", "value": "Add class docs to NodeAttributes::MeritOrder\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Atlas\n module NodeAttributes\n class MeritOrder\n include ValueObject\n include ActiveModel::Validations\n\n values do\n ...
ruby
chosen
[ { "from": "system", "value": "Add :: prefix to Spinach\n" }, { "from": "human", "value": "require 'spinach'\n\nmodule Knapsack\n module Adapters\n class SpinachAdapter < BaseAdapter\n TEST_DIR_PATTERN = 'features/**{,/*/**}/*.feature'\n REPORT_PATH = 'knapsack_spinach_report.json'\...
ruby
chosen
[ { "from": "system", "value": "Support a minimum version of iOS 6.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SimulatorStatusMagic\"\n s.version = \"1.2\"\n s.summary = \"Enable perfect status bars in the iOS Simulator.\"\n s.descriptio...
ruby
chosen
[ { "from": "human", "value": "Remove the abroad section tag\n\nNot used by ODI and adds confusion to interface.\n" }, { "from": "gpt", "value": "class DeleteAbroadTag < Mongoid::Migration\n def self.up\n Tag.any_in(tag_id: [\"abroad\", \"abroad/living-abroad\", \"abroad/travel-abroad\"]).dele...
ruby
chosen
[ { "from": "system", "value": "Add symbol to (now sorted) list of 'as-is' values\n" }, { "from": "human", "value": "module Appsignal\n class ParamsSanitizer\n class << self\n def sanitize(params)\n ParamsSanitizerCopy.sanitize_value(params)\n end\n\n def sanitize!(params...
ruby
chosen
[ { "from": "system", "value": "Check if instance is ready\n" }, { "from": "human", "value": "require 'fog/aws'\n\nmodule Capistrano\n class Configuration\n def for_each_ec2_server(ec2_env:, ec2_role:, &block)\n ec2 = Fog::Compute.new(provider: 'AWS', region: fetch(:region))\n\n filt...
ruby
chosen
[ { "from": "system", "value": "Update update method in gateway backend\n" }, { "from": "human", "value": "module Gateways\n class QuotesGatewayBackend < Backend\n\n def initialize\n super\n @table = @database[:quotes]\n end\n\n def insert(quote)\n ensure_valid!(quote)\n\n...
ruby
chosen
[ { "from": "system", "value": "Revert an acceptable non-nil check\n" }, { "from": "human", "value": "# coding: utf-8\n\nrequire 'transpec/dynamic_analyzer/node_util'\nrequire 'json'\nrequire 'ostruct'\n\nmodule Transpec\n class DynamicAnalyzer\n class RuntimeData\n include NodeUtil\n\n ...
ruby
chosen
[ { "from": "system", "value": "OPS: Allow Sequel 5 to be used with Cranium\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'cranium'\n spec.version = '0.4.3'\n spec.authors = ['Emarsys Technologies']\n spec.email = ['smart-insight-dev@emarsys.com']\n spec.de...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to pull information out of Ruby code & fix file listing from Git\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |gem|\n gem.name = \"lowmagic-migrations\"\n gem.version = \"0.0.1\"\n gem.autho...
ruby
chosen
[ { "from": "system", "value": "Update podspec documentation to point to personally hosted version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SwiftVideoBackground\"\n s.version = \"2.0.0\"\n s.summary = \"An easy to use Swift framework that creates a ...
ruby
chosen
[ { "from": "human", "value": "Add a module for mixing in a deprecated alias\n\nThis offers an alternative to alias_method for when we have a deprecated\nmethod. It will still allow the old method to be called but whenever it\nis a warning will be emitted. This is intended to help us actually\nremove some of ...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in iBoostUp Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'iboostup' do\n version :latest\n sha256...
ruby
chosen
[ { "from": "system", "value": "Tweak the transaction ID to be correct.\n" }, { "from": "human", "value": "$:<< \"./lib\" # uncomment this to run against a Git clone instead of an installed gem\n\nrequire \"paytrace\"\nrequire \"paytrace/debug\"\n\n# change this as needed to reflect the username, ...
ruby
chosen
[ { "from": "human", "value": "Add Yumi IronSource 6.8.1.0 and delete CoreLocation\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n name = \"IronSource\"\n version = \"6.8.1.0\"\n\n s.name = \"Yumi#{name}\"\n s.version = version\n s.summary = \"Yumi#{name}.\"\n s.des...
ruby
chosen
[ { "from": "human", "value": "Add csv import for datasets\n" }, { "from": "gpt", "value": "desc <<-DESC\n Import's multiple CSV datasets\nDESC\n\nnamespace :import do\n # See documentation for \"task :import\".\n task csv_import_datasets: :environment do\n raise ArgumentError, 'missing CSV ...
ruby
chosen
[ { "from": "system", "value": "Update podspec to fix lint errors\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DMCircularScrollView'\n s.version = '1.0.0' \n s.summary = 'Infinite/Circular Scroll...
ruby
chosen
[ { "from": "system", "value": "Add description and summary to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = 'html-p...
ruby
chosen
[ { "from": "system", "value": "Update draft status of assets for *all* attachment events\n\nAfter some discussion with @chrisroos, we agreed that, although it's not\nnecessary to pass the tests, by removing the condition which checks the\ntype of the associated Attachable, we can make the code more robust.\n...
ruby
chosen
[ { "from": "system", "value": "Fix package resource for wt_heatmaps to actually install\n" }, { "from": "human", "value": "#\n# Cookbook Name:: wt_heatmaps\n# Recipe:: apiserver\n#\n# Copyright 2012, Webtrends\n#\n# All rights reserved - Do Not Redistribute\n#\n\npackage \"heatmaps_#{node['wt_hea...
ruby
chosen
[ { "from": "system", "value": "Fix not being able to find deleted reservation histories.\n" }, { "from": "human", "value": "class Admin::ReservationsController < AdminController\n respond_to :html, :json\n skip_before_filter :require_admin, :only => [:index, :checkout]\n before_filter :require...
ruby
chosen
[ { "from": "system", "value": "Revert \"Space is added to a file\"\n\nThis reverts commit 0a7453c53ed20284e7c99eba09db3431225c4f79.\n" }, { "from": "human", "value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n skip_before_filter :set_locale\n\n def self.add_provid...
ruby
chosen
[ { "from": "system", "value": "Fix output of cache integrity checker errors\n" }, { "from": "human", "value": "require 'open_food_network/products_renderer'\n\nProductsCacheIntegrityCheckerJob = Struct.new(:distributor_id, :order_cycle_id) do\n def perform\n if diff.any?\n Bugsnag.notify...
ruby
chosen
[ { "from": "system", "value": "Make yml_template spec less fragile\n\nWhen we compare generated JSON strings, the comparison can fail because\nof whitespace differences. But this doesn’t necessarily indicate\nincorrect JSON. So compare the parsed Hashs.\n\nAlso this allows us to have pretty human readable JS...
ruby
chosen
[ { "from": "system", "value": "Use triple-dot delegation in ForkTracker\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ActiveSupport\n module ForkTracker # :nodoc:\n module CoreExt\n def fork(*)\n if block_given?\n super do\n ForkTra...
ruby
chosen
[ { "from": "system", "value": "Use default locale as cmtool default\n" }, { "from": "human", "value": "module Cmtool\n class ApplicationController < ::ApplicationController\n include Cmtool::ControllerGlue\n before_filter :authorize_user, :check_environment, :set_locale\n layout 'cmtool...
ruby
chosen
[ { "from": "system", "value": "Modify the way Dotenv is loaded\n" }, { "from": "human", "value": "Dotenv.load if ENV['RACK_ENV'] == \"development\"\n\nrequire 'rollbar'\n\nDir[\"./helpers/*.rb\"].each { |file| require file }\nDir[\"./models/*.rb\"].each { |file| require file }\nDir[\"./routes/*.r...
ruby
chosen
[ { "from": "system", "value": "Fix the extra space in the SHA256 hash\n\n```\r\n $ brew upgrade parity\r\nUpdating Homebrew...\r\n==> Auto-updated Homebrew!\r\nUpdated 1 tap (homebrew/cask).\r\nNo changes to formulae.\r\n\r\n==> Upgrading 1 outdated package:\r\nthoughtbot/formulae/parity 2.4.0 -> 3.0.0\r\n==...
ruby
chosen
[ { "from": "system", "value": "Fix double block execution (for `handle_requirement`)\nand double errors output.\n" }, { "from": "human", "value": "module Bacon\n module ColoredOutput\n def handle_requirement(*args)\n error = yield\n\n print error.empty? ? color(\"\\e[32m\") : color(...
ruby
chosen
[ { "from": "system", "value": "Disable colorized output from StatusTable unless STDOUT.tty? is true.\n" }, { "from": "human", "value": "module CapEC2\n class StatusTable\n include CapEC2::Utils\n \n def initialize(instances)\n @instances = instances\n output\n end\n \n ...
ruby
chosen
[ { "from": "system", "value": "Disable document-ready handler after first run to avoid turbolinks problems\n" }, { "from": "human", "value": "module PluggableJs\n module Helpers\n\n module View\n def javascript_pluggable_tag\n controller = params[:controller]\n action = def...
ruby
chosen
[ { "from": "system", "value": "Check for config file readable, not just existing.\n\nAlso remove uneeded heredoc for single-line string.\n" }, { "from": "human", "value": "require 'puppet'\nrequire 'yaml'\nrequire 'faraday'\n\nPuppet::Reports.register_report(:slack) do\n desc <<-DESC\n Send not...
ruby
chosen
[ { "from": "system", "value": "Save domain score to db after scan\n" }, { "from": "human", "value": "namespace :headlines do\n desc \"Scan existing domains for security vulnerabilities\"\n task scan_domains: :environment do\n Headlines::Domain.order(\"rank\").find_each do |domain|\n res...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency for running tests.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"delsolr\"\n s.version = \"0.1.5\"\n s.authors = [\"Ben VandenBos\"]\n s.date = %q{2009-11-02}\n s.description = \"Ruby wrapper ...
ruby
chosen
[ { "from": "system", "value": "Make public_link_to_flyer safe for non-events\n" }, { "from": "human", "value": "# Display email link to promoter. Uses event email if there is one.\n# Displays promoter email in promoter's name is blank.\n# Displays just promoter's name if there are no email addres...
ruby
chosen
[ { "from": "system", "value": "Fix error output on missing uriparser lib\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'mkmf'\nrequire 'rbconfig'\n\nunless have_library('uriparser')\n error 'You need to install uriparser lib'\n exit\nend\n\ncreate_makefile 'uripars...
ruby
chosen
[ { "from": "system", "value": "Update pusher trigger to hopefully get correct count\n" }, { "from": "human", "value": "class Recommendation < ActiveRecord::Base\n belongs_to :photograph, counter_cache: true\n belongs_to :user, counter_cache: true\n\n validates :photograph_id, :user_id, presenc...
ruby
chosen
[ { "from": "system", "value": "Fix useless brackets in each\n" }, { "from": "human", "value": "module Reports\n module Graphs\n def self.order_count_by_day\n total = 0\n\n order_count = Order.group(\"date(created_at)\").count\n order_count = Hash[order_count.sort_by { |k, _| k ...
ruby
chosen
[ { "from": "system", "value": "Make a more useful default follow-up plan\n" }, { "from": "human", "value": "class PageBuilder\n attr_reader :params\n\n class << self\n def create(params)\n new(params).save_and_enqueue\n end\n end\n\n def initialize(params)\n @params = params\n ...
ruby
chosen
[ { "from": "system", "value": "Add check to see if PortfolioProduct is defined\n" }, { "from": "human", "value": "class OverhaulPortfolios < ActiveRecord::Migration\n def up\n add_column :product_groups, :portfolio_id, :integer\n PortfolioProduct.all.each do |pp|\n pg = ProductGr...
ruby
chosen