conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update the roadrunner recipe to the correct version\n\n\nFormer-commit-id: 42491d55ab6100e710a33afd893bc11ffc2a8f32 [formerly 4c9d2cbeffe552e4b69fba7cdc3add19c55d3208] [formerly 7a03c9db672239c043f002a4df39d25771fa84f3 [formerly 9eeb719a6d1651e9f9ee6956e17a1a3a1925babd]]\nForme... | ruby | chosen |
[
{
"from": "system",
"value": "Fix previous commit, for i18n_options_for_select\n"
},
{
"from": "human",
"value": "module Releaf\n module ApplicationHelper\n def i18n_options_for_select container, selected, prefix, i18n_options={}\n i18n_options = { :scope => controller_scope_name }.merg... | ruby | chosen |
[
{
"from": "system",
"value": "Use tempfile to dump output. Also cleanup on exit\n"
},
{
"from": "human",
"value": "require 'zmq'\nrequire \"msgpack\"\n\nThread.abort_on_exception = true\n\nctx = ZMQ::Context.new\nsocket = ctx.socket(:SUB)\nsocket.subscribe(\"\")\nsocket.connect(\"tcp://127.0.0.1... | ruby | chosen |
[
{
"from": "system",
"value": "Disable the background Prometheus sampler in tests\n\nThis sampler can interfere with tests and cause transient build failures,\nsuch as https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/70241683.\n"
},
{
"from": "human",
"value": "require 'prometheus/client'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Update to 1.0.0 version of image_optimizer gem\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'carrierwave-imageoptimizer/version'\n\nGem::Spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in bridged method specs\n"
},
{
"from": "human",
"value": "%x{\n var BridgeClassProto = function() {\n this.foo = 200;\n };\n\n BridgeClassProto.prototype = {\n bar: 300,\n baz: 400\n };\n}\n\nclass BridgeClassSpec < `BridgeClassProto`\n def ge... | ruby | chosen |
[
{
"from": "system",
"value": "Include util in the correct class\n"
},
{
"from": "human",
"value": "#\n# Author:: Joseph Anthony Pasquale Holsten (<joseph@josephholsten.com>)\n# Copyright:: Copyright (c) 2013 Joseph Anthony Pasquale Holsten\n# License:: Apache License, Version 2.0\n#\n# Licensed ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Polycom People + Content IP.app v1.0.1\n\nUpdated the token to follow the standards\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'people-plus-content-ip' do\n version '1.0.1'\n sha256 '4a29e7eb0901db45572e7dac108df74b52015c75d4aaa9fe774b5027b8bf9990'\n\n url \... | ruby | chosen |
[
{
"from": "system",
"value": "Update FIXME comment with all the PRs [skip ci]\n"
},
{
"from": "human",
"value": "module Ransack\n module Nodes\n class Condition\n\n def arel_predicate\n predicates = attributes.map do |attr|\n attr.attr.send(\n arel_predicate_f... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Made DRb spec depend partially on PID so multiple runs don't clash.\"\"\n\nApparently this is a supposed fix for concurrent spec runs, not for the spec failure\n\nThis reverts commit 08695d9a6940ab74f6eb8965e449a417002a42a6.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Make the version check more epxlicit\n"
},
{
"from": "human",
"value": "raise(\"twitter-text requires the $KCODE variable be set to 'UTF8' or 'u'\") unless ['u','UTF8'].include?($KCODE) || ''.respond_to?(:codepoints)\n\nrequire 'rubygems'\n\n# Needed for auto-linkin... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec file for CGI::rfc1123_date().\n\nSigned-off-by: Eero Saynatkari <0177bde8141a5cae83aa68d349f2b0f6a47123ee@projects.kittensoft.org>\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\n\ndescribe 'CGI#rfc1123_date' do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add unique index to email field on users table\n\nFrom spree/spree#1639\n"
},
{
"from": "gpt",
"value": "class MakeUsersEmailIndexUnique < ActiveRecord::Migration\n def up\n remove_index \"spree_users\", :name => \"email_idx\"\n add_index \"spree_users\", [\"e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix accessibility issue with flash aria-label\n"
},
{
"from": "human",
"value": "class Views::Layouts::Application < Views::Base\n def content\n html lang: \"en\" do\n head do\n meta content: \"text/html; charset=UTF-8\", \"http-equiv\" => \"Content-... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for associations and validations\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe PinTagVote, type: :model do\n describe 'validations' do\n it { is_expected.to validate_numericality_of :user_id}\n it { is_expected.to validate... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests to verify rule documentation\n\nThe tests check that docs for all rules exist, and that the descriptions, tags\nand parameters match what the rules say they are.\n"
},
{
"from": "gpt",
"value": "require_relative 'setup_tests'\n\n# Ensures there is documenta... | ruby | chosen |
[
{
"from": "system",
"value": "Remove uninstall line in Lastpass Universal cask\n"
},
{
"from": "human",
"value": "class LastpassUniversal < Cask\n url 'https://lastpass.com/lpmacosx.dmg'\n homepage 'https://lastpass.com/'\n version '2.5.0'\n sha1 '0efa71f9b5efb9b4bed2574025eb9c0bedc1eada'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove use of character literal\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Nanoc::Helpers\n\n # Provides support for breadcrumbs, which allow the user to go up in the\n # page hierarchy.\n module Breadcrumbs\n\n # Creates a breadcrumb trail... | ruby | chosen |
[
{
"from": "system",
"value": "AndreasTolfTolfsen: Make sure remote server is shut down before running specs on Selenium::WebDriver::Opera\n\nr13920\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n module Opera\n\n describe Driver do\n it 'raises ArgumentErr... | ruby | chosen |
[
{
"from": "system",
"value": "Add assert_raise to Test::Unit shim\n"
},
{
"from": "human",
"value": "# test/unit compatibility layer using minitest.\n\nrequire 'minitest/autorun'\nmodule Test\n module Unit\n class TestCase < Minitest::Test\n end\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to migrate user_total view to use contributions\n"
},
{
"from": "gpt",
"value": "class MigrateUserTotalViewToContributions < ActiveRecord::Migration\n def up\n execute <<-SQL\n DROP VIEW user_totals;\n CREATE OR REPLACE VIEW user_totals AS... | ruby | chosen |
[
{
"from": "system",
"value": "Replace spec tests on pages controller test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass PagesControllerTest < ActionController::TestCase\n include Devise::TestHelpers\n\n fixtures :users\n\n context 'when user signed in' do\n setup do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for HipChat for Mac beta\n"
},
{
"from": "gpt",
"value": "class HipChat < Cask\n url 'http://downloads.hipchat.com.s3.amazonaws.com/mac-beta/HipChat-0.30-01uennzomg01wmg.zip'\n homepage 'https://www.hipchat.com/'\n version '0.30'\n sha1 'df00f998e1b534d2... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for tilt v1"
},
{
"from": "human",
"value": "require 'tilt'\n\nmodule Tilt\n register_lazy :MustacheTemplate, 'tilt/mustache', 'mustache', 'ms'\n register_lazy :CssTemplate, 'tilt/css', 'css'\nend\n"
},
{
"from": "gpt",
"value": "require 't... | ruby | chosen |
[
{
"from": "system",
"value": "Handle claims_action_service keyword parameter deprecation\n\nFixes the deprecation, that will break in ruby 3.0\n```\napp/services/claims/claim_actions_service.rb:6: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call\n```... | ruby | chosen |
[
{
"from": "system",
"value": "Remove superfluous call to associate_user\n"
},
{
"from": "human",
"value": "class Spree::UserRegistrationsController < Devise::RegistrationsController\n helper 'spree/base', 'spree/store'\n\n if Spree::Auth::Engine.dash_available?\n helper 'spree/analytics'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the attribute list more flexible"
},
{
"from": "human",
"value": "object @shipment\ncache @shipment\nattributes *shipment_attributes\n\nchild selected_shipping_rate: :selected_shipping_rate do\n extends \"spree/api/shipping_rates/show\"\nend\n\nchild inventory... | ruby | chosen |
[
{
"from": "system",
"value": "Add an empty line item for new credit invoices.\n"
},
{
"from": "human",
"value": "class CreditInvoicesController < InvoicesController\n # Actions\n def new\n # Allow pre-seeding some parameters\n invoice_params = {\n :customer_id => current_tenant.comp... | ruby | chosen |
[
{
"from": "system",
"value": "Use placement_group features to assert privileges\n"
},
{
"from": "human",
"value": "class PlacementGroupController < ApplicationController\n before_action :check_privileges\n before_action :get_session_data\n after_action :cleanup_action\n after_action :set_ses... | ruby | chosen |
[
{
"from": "system",
"value": "Return account id to applications for new_user account management.\n"
},
{
"from": "human",
"value": "class RemoteSessionsController < ApplicationController\n\n def new\n @app = ClientApplication.find_by_key(params[:key], :order=>'created_at DESC')\n @access_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix first test to what view looks like now\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe 'Comment features' do\n\tcontext \"on new comment page\" do\n\t\tlet(:query) { FactoryGirl.create(:query) }\n\t\tit \"can see a form to write a new comme... | ruby | chosen |
[
{
"from": "system",
"value": "Fix double unless statement for token validation\n"
},
{
"from": "human",
"value": "#\n# This concern may be mixed into a controller to add common functinality\n# for preview rendering, and preview token validation.\n#\nmodule WpPreviewTools\n extend ActiveSupport:... | ruby | chosen |
[
{
"from": "system",
"value": "Update create cart service to accept params\n"
},
{
"from": "human",
"value": "module Shopping\n class CreateCartService < Shopping::BaseService\n\n def perform!\n Shopping::Cart.create\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "modul... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to gemspec (to satisfy Travis)"
},
{
"from": "human",
"value": "require File.expand_path('../lib/sidekiq/priority/version', __FILE__)\n\nGem::Specification.new do |s|\n s.authors = ['Tom Benner']\n s.email = ['tombenner@gmail.com']\n s.desc... | ruby | chosen |
[
{
"from": "system",
"value": "Add time_picker css class to start and end time columns\n"
},
{
"from": "human",
"value": "module AllocationsHelper\nend"
},
{
"from": "gpt",
"value": "module AllocationsHelper\n def start_time_form_column(record, options)\n options[:class] += \" tim... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sidekiq server probe spec\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\nrequire 'support/sidekiq'\n\nRSpec.describe Mnemosyne::Probes::Sidekiq::Server do\n it 'creates a trace' do\n trace = with_instrumentation do... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to be totally agnostic.\n"
},
{
"from": "human",
"value": "File.join(File.dirname(__FILE__), \"../lib/agnostic_presenters\")\nAgnosticPresenters::Base.send :include, ActionView::Helpers if defined?(Rails)\n\nclass << ActionController::Base\n def add_template_he... | ruby | chosen |
[
{
"from": "system",
"value": "Add tags for invitation emails.\n"
},
{
"from": "human",
"value": "class SuitorMailer < Devise::Mailer\n helper :application # gives access to all helpers defined within `application_helper`.\n include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_... | ruby | chosen |
[
{
"from": "system",
"value": "Make ErrorDumper to notify Honeybadger\n"
},
{
"from": "human",
"value": "class ErrorDumper\n include Callee\n\n UNDEFINED_EXCEPTION = ''.freeze\n\n option :exception, optional: true, default: -> { UNDEFINED_EXCEPTION }\n\n option :file_name, optional: true, def... | ruby | chosen |
[
{
"from": "human",
"value": "Use custom location for Carrierwave when testing\n"
},
{
"from": "gpt",
"value": "if defined?(Carrierwave)\n CarrierWave::Uploader::Base.descendants.each do |uploader|\n next if uploader.anonymous?\n\n uploader.class_eval do\n def cache_dir\n \"#{R... | ruby | chosen |
[
{
"from": "system",
"value": "Update the platform to 8.0 since 'ERROR | [iOS] Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.'\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"RSBarcodes_Swift\"\n s.version = \"0.0.4\"\n s.sum... | ruby | chosen |
[
{
"from": "system",
"value": "Change wkhtmltopdf path to a path without spaces"
},
{
"from": "human",
"value": "# config/pdfkit.rb\nPDFKit.configure do |config|\n # path to wkhtmltopdf on Windows since wkhtmltopdf-binary gem doesn't work on Windows\n config.wkhtmltopdf = 'c:/Program Files (x86... | ruby | chosen |
[
{
"from": "system",
"value": "ADD missing license in gemspec\n\nAny license mention was missing from gem. MIT license has been added\n(default from rails gem generator).\n\nClose #11\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's versio... | ruby | chosen |
[
{
"from": "system",
"value": "Add upvote route to questions\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n root 'static_pages#index'\n get 'help' => 'static_pages#help'\n get 'about' => 'static_pages#about'\n resources :topics, :only => [:index, :show, :new, :create,... | ruby | chosen |
[
{
"from": "system",
"value": "Change the users path from users to members\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'static_pages#home'\n get '/about', to: 'static_pages#about'\n get '/login', to: 'sessions#new'\n post '/login', to: 'sessions#create'\n delet... | ruby | chosen |
[
{
"from": "system",
"value": "Allow dots to be in login"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n get 'dev/log_in/:login(/:model)' => \"dev_log_in#log_in\"\n\nend\n"
},
{
"from": "gpt",
"value": "Rails.application.routes.draw do\n\n get 'dev/log_in/:logi... | ruby | chosen |
[
{
"from": "system",
"value": "Access EDITOR through Ruby's cross-platform ENV.\n\nFix the mistake of not using Ruby's ENV hash from the get go and get\nwindows support.\n"
},
{
"from": "human",
"value": "require \"active_support\"\nrequire \"rails/secrets\"\n\nmodule Rails\n module Command\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade geocoder dependency-- no reason to be locked to 1.1.9\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/congress/version', __FILE__)\n\nGem::Specification.new do |spec|\n spec.add_dependency 'faraday', '~> 0.9.0'\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Use CGI::parse to parse query parameters\n\nThis is nicer (less code) than using our hand-rolled parser, though\nCGI::parse's code is pretty similar to what we were doing.\n\nThis loses the use of Rack's KeySpaceConstrainedParams to limit the\nnumber of parameters, but this is ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some fixes in gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"oauth-rest-security/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.3.1.4 to 2.3.1.5\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '2.3.1.4'\n s.descri... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out validation spec that is not workign\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule YahooGeminiClient\n describe BaseRequest do\n\n describe \"attributes\" do\n subject { described_class }\n it { is_expected.to have_attri... | ruby | chosen |
[
{
"from": "system",
"value": "Convert specs to RSpec 3.0.4 syntax with Transpec\n\nThis conversion is done by Transpec 2.3.7 with the following command:\n transpec\n\n* 3 conversions\n from: obj.should\n to: expect(obj).to\n\n* 3 conversions\n from: obj.should_not\n to: expect(obj).not_to... | ruby | chosen |
[
{
"from": "system",
"value": "Add rpsec test for scrabble score\nreturn scrabble score of 10\nrspec success\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Game do \n\tlet!(:game) { Game.create(score: 10, scrabble_score: 10, level: 4, lines: 3, user_id: 1) }\n\n\tcontext \"... | ruby | chosen |
[
{
"from": "human",
"value": "Add start of specs for Item\n"
},
{
"from": "gpt",
"value": "require \"rails_helper\"\n\ndescribe Item do\n describe \".for_category\" do\n it \"returns items for_category\" do\n category = categories(:flip_flops)\n expect(Item.unscoped.where(category_i... | ruby | chosen |
[
{
"from": "system",
"value": "Customize gemspec file for spree extension\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_news_items'\n s.version = '2.1.3.beta'\n s.summary = 'TODO: Add ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to development dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/protobuf_descriptor/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"protobuf_descriptor\"\n gem.ver... | ruby | chosen |
[
{
"from": "system",
"value": "[vSphere] Support clusters that are located below folders\n"
},
{
"from": "human",
"value": "module Fog\n module Compute\n class Vsphere\n class Real\n def list_clusters(filters = { })\n datacenter_name = filters[:datacenter]\n\n ra... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken benchmarks so testing can continue.\n"
},
{
"from": "human",
"value": "# ----------------------------------------------------------------------------\n# Frozen-string-literal: true\n# Copyright: 2015-2016 Jordon Bedwell - MIT License\n# Encoding: utf-8\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Fix show method in user controller.\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n def index\n @users = User.all\n end\n\n def create\n user = User.new(user_params)\n if user.save\n session[:user_id] = user.id\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add default 'Portfolio' collection for user upon sign up\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n def index\n @artists = User.where(artist: true)\n end\n\n def show\n @user = User.find_by(id: params[:id])\n @co... | ruby | chosen |
[
{
"from": "system",
"value": "Change route for successul registration to login page\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def new\n @user = User.new\n render :'users/new'\n end\n\n def create\n @user = User.new(reg_params)\n if @user.sa... | ruby | chosen |
[
{
"from": "system",
"value": "Add retailer link in admin main menu\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => \"spree/layouts/admin\",\n :name => \"add_retailers_admin_tab\",\n :insert_bottom => \"[data-hook='admin_t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in vhost package\n"
},
{
"from": "human",
"value": "package :wordpress_vhost do\n sites_path = \"/etc/nginx/sites-enabled\"\n\n transfer \"files/nginx/wordpress.conf\", \"#{sites_path}/wordpress.conf\" do\n post :install, \"rm #{sites_path}/default\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where Osprey conflicted with Rails class loading\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'singleton'\nrequire 'curb'\nrequire 'CGI'\nrequire 'json'\nrequire 'sequel'\nrequire 'memcache'\nrequire 'ostruct'\n\nlib_dirs = [ 'core_ext', F... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundler as a development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'opbeat/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation to root module\n"
},
{
"from": "human",
"value": "require 'ratrix/version'\nrequire 'ratrix/errors'\nrequire 'ratrix/matrix'\n\nmodule Ratrix\nend\n"
},
{
"from": "gpt",
"value": "require 'ratrix/version'\nrequire 'ratrix/errors'\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Add a description and summary to create a valid gemspec.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'all_your/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"uninitialized class variable @@guardfile in Guard::Dsl\""
},
{
"from": "human",
"value": "module Guard\n class Dsl\n\n class << self\n attr_accessor :options\n\n def evaluate_guardfile(options = {})\n @@options = options\n @@guardfi... | ruby | chosen |
[
{
"from": "system",
"value": "Rename Responses::{retry => try_again} to avoid keyword conflict\n"
},
{
"from": "human",
"value": "module Responses\n extend self\n \n def success(payload=nil)\n response = { result: 'success' }\n response[:payload] = payload unless payload.nil?\n respo... | ruby | chosen |
[
{
"from": "human",
"value": "Add class to represent USNO data.\n"
},
{
"from": "gpt",
"value": "require 'date'\nrequire_relative 'my_data'\n\nclass USNO_Data < MyData\n attr_reader :lines\n\n def initialize(filename)\n if not File.exist?(filename)\n return nil\n end\n @lines = Fi... | 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": "Add ability to cache a filter\n"
},
{
"from": "human",
"value": "module ActiveAdmin\n module Inputs\n module Filters\n module Base\n include ::Formtastic::Inputs::Base\n include ::ActiveAdmin::Filters::FormtasticAddons\n\n extend ::Acti... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant check for tag\n\nBecause `config_param` without `default` option will set the parameter mandatory.\n"
},
{
"from": "human",
"value": "module Fluent\n class ColorStripperOutput < Output\n Fluent::Plugin.register_output('color_stripper', self)\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use variable instead of Time.now\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative '../base.rb'\nrequire_relative '../events/event.rb'\n\nmodule Fusuma\n module Plugin\n module Detectors\n # Inherite this base\n class... | ruby | chosen |
[
{
"from": "system",
"value": "Add some class variables on \"Context\" class\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Stemmer\n module Context\n class Context\n attr_reader :original_word, :current_word, :dictionary, :visitor_provider\n\n def initialize(o... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.4 to 0.1.5\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'error_data'\n s.version = '0.1.4'\n s.summary = 'Representation of an error as a data structure'\n s.descript... | ruby | chosen |
[
{
"from": "human",
"value": "Add route for comment creation\n"
},
{
"from": "gpt",
"value": "require 'json'\n\npost '/questions/:id/comments/new' do\n if question = Question.find(params[:id])\n comment = Comment.new(content: params[:content])\n question.comments << comment\n end\n if re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix double slash in ODP batch upload URL\n"
},
{
"from": "human",
"value": "module DataSift\n ##\n # Use DataSift's Open Data Processing (ODP) to upload your own data to\n # DataSift for processing\n class Odp < DataSift::ApiResource\n def ingest(source_id,... | ruby | chosen |
[
{
"from": "system",
"value": "Make components support string or symbol hash data\n"
},
{
"from": "human",
"value": "# Conventionally the engine lives in a separate file and imported here, i've\n# combined them to reduce the number of files while we work on packaging.\n\nmodule GovukFrontendAlpha... | ruby | chosen |
[
{
"from": "system",
"value": "Check if there's at least one payment in array\n\nAvoid exceptions when passing things like `payments: []` on the order\nobject\n"
},
{
"from": "human",
"value": "# require 'pry'\nmodule QBIntegration\n module Service\n class PaymentMethod < Base\n attr_rea... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using 1.9+ hash syntax.\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nremote_config_file = File.expand_path('../credentials.yml', __FILE__)\n\ndef assert(expression)\n if (!expression)\n raise RuntimeError, \"Assertion failed\"\n end\nend\n\ndef rep... | ruby | chosen |
[
{
"from": "human",
"value": "Bring user and ability related files from spree_core\n"
},
{
"from": "gpt",
"value": "Spree::Core::Engine.config.to_prepare do\n if Spree.user_class\n Spree.user_class.class_eval do\n include Spree::Core::UserBanners\n has_and_belongs_to_many :spree_rol... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"Remove trivial test suite\"\n\nThis reverts commit a6f0f583cedd9d6ceb4c949fa03b3913620a847c.\n"
},
{
"from": "gpt",
"value": "require 'coffee_script'\nrequire 'test/unit'\nrequire 'stringio'\n\nclass TestCoffeeScript < Test::Unit::TestCase\n def test_compil... | ruby | chosen |
[
{
"from": "system",
"value": "Save student searchbar json after updating\n"
},
{
"from": "human",
"value": "module Admin\n class EducatorsController < Admin::ApplicationController\n # To customize the behavior of this controller,\n # simply overwrite any of the RESTful actions.\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Add oEmbed 1.0 support for visualizations\n"
},
{
"from": "human",
"value": "\n# encoding: utf-8\n\nclass Api::Json::OembedController < Api::ApplicationController\n include CartoDB\n\n # Fetch info from the current user orgranization\n def show\n url = params[... | ruby | chosen |
[
{
"from": "system",
"value": "Fix codeclimate issue specifying with '_' that the param will not be used\n"
},
{
"from": "human",
"value": "class Users::PasswordsController < Devise::PasswordsController\n # GET /resource/password/new\n def new\n super\n end\n\n # POST /resource/password\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove allowed_push_host definition in gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rspec/hue_formatter/version'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Check in for Sagar to fix hamburger menu\n"
},
{
"from": "human",
"value": "class ApplicationGroupsController < ApplicationController\n def index\n @application_groups = ApplicationGroup.page(params[:page]).per(15)\n\n respond_to do |format|\n format.htm... | ruby | chosen |
[
{
"from": "system",
"value": "Use minitap for test output. [test]\n"
},
{
"from": "human",
"value": "abort \"Remove -realms from RUBYOPT before running these tests.\" if ENV['RUBYOPT'].index('-realms')\n\n$realms_root = File.expand_path(File.dirname(__FILE__) + '/..')\n\n#ENV['XDG_CONFIG_HOME'] ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to rack setup\n"
},
{
"from": "human",
"value": "# Somewhere in 2.3 RewindableInput was removed- rack supports it natively\nrequire 'rack/facebook'\nrequire 'rack/facebook_session'\n\nActionController::Dispatcher.middleware.insert_before( \n ActionContr... | ruby | chosen |
[
{
"from": "system",
"value": "Use English instead of Latin\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Gitlab\n module ImportExport\n class AttributeCleaner\n ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + ['g... | ruby | chosen |
[
{
"from": "system",
"value": "Fix encoding to not ignore half the bytes\n"
},
{
"from": "human",
"value": "require \"bitter/version\"\n\nmodule Bitter\n\n # Encode a String of bytes using the bitter word list.\n def self.encode byte_string\n footer = nil\n words = byte_string.each_byte.e... | ruby | chosen |
[
{
"from": "system",
"value": "Replace .build_stubbed with .build in Documents factory\n"
},
{
"from": "human",
"value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :document do\n sequence(:title) {|n| \"Title #{n}\"}\n sequence(... | ruby | chosen |
[
{
"from": "system",
"value": "Update language value for NL\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# == Schema Information\n#\n# Table name: languages\n#\n# id :integer not null, primary key\n# code :string not null\n# name ... | ruby | chosen |
[
{
"from": "human",
"value": "Test mass-assignable columns for the line model\n"
},
{
"from": "gpt",
"value": "require './spec/rb/spec_helper'\n\ndescribe Line do\n it 'whitelists mass-assignable columns' do\n whitelist = [:coordinates, :name, :description, :start_time,\n :end... | ruby | chosen |
[
{
"from": "system",
"value": "Stop requiring ActiveSupport. WTF was it there for anyway? Tests still pass.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'active_support/all'\nrequire 'tinder/connection'\nrequire 'tinder/campfire'\nrequire 'tinder/room'\nrequire 'logger'\n\nmodule... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil if jid wasn't found\n"
},
{
"from": "human",
"value": "require \"workiq/version\"\nrequire \"workiq/storage\"\nrequire \"workiq/middleware/client\"\nrequire \"workiq/middleware/server\"\nrequire \"workiq/middleware/chain\"\n\nmodule Workiq\n def self.sta... | ruby | chosen |
[
{
"from": "system",
"value": "Update everyting but the *last* current id, dummy.\n"
},
{
"from": "human",
"value": "class AddUserObservationIndexToIdentifications < ActiveRecord::Migration\n def up\n sql_query = <<-SQL\n SELECT\n user_id,\n observation_id,\n COUNT(*... | ruby | chosen |
[
{
"from": "system",
"value": "Add only to before_action in the product controller\n"
},
{
"from": "human",
"value": "class ProductsController < ApplicationController\n\n before_action :product_find\n\n def index\n @users = Product.all\n end\n\n def show\n render json: {product: @produc... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.