conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix tests on MRI 2.3 and 2.4\n\nClass#attr_writer is still private in those versions.\n"
},
{
"from": "human",
"value": "require \"shrine/storage/memory\"\nrequire \"dry-initializer\"\n\nmodule Support\n module ShrineHelper\n def shrine(&block)\n uploader_c... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test file for BMFF::Box::ShadowSyncSample.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:\n\nrequire_relative '../../minitest_helper'\nrequire 'bmff/box'\nrequire 'stringio'\n\nclass TestB... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple question api sample\n"
},
{
"from": "gpt",
"value": "require 'json'\nrequire 'shellwords'\n\npublished_scope_public = 0\npublished_scope_nonpublic = 2\n\nparams = {\n organization_id: ENV['CONYAC_ORGANIZATION_ID'],\n language_id: 'en',\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Node.js documentation (6.2.2, 4.4.6)\n"
},
{
"from": "human",
"value": "module Docs\n class Node < UrlScraper\n self.name = 'Node.js'\n self.slug = 'node'\n self.type = 'node'\n self.links = {\n home: 'https://nodejs.org/',\n code: 'htt... | ruby | chosen |
[
{
"from": "system",
"value": "Change name of problematic variables\n"
},
{
"from": "human",
"value": "require 'fileutils'\nrequire 'raml-rb'\n\nrequire File.expand_path('../rspec/spec_file.rb', __FILE__)\nrequire File.expand_path('../rspec/spec_helper_file.rb', __FILE__)\n\nmodule Rambo\n class... | ruby | chosen |
[
{
"from": "system",
"value": "Add examples from barcodevalidation gem\n"
},
{
"from": "human",
"value": "require \"barcodevalidation\"\n\nRSpec.describe BarcodeValidation do\n it { is_expected.to be_an_instance_of Module }\n\n it \"has a version number\" do\n expect(BarcodeValidation::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra column in database\n\n[#106964214](https://www.pivotaltracker.com/story/show/106964214)\nSigned-off-by: Danny Berger <8efccf38e9d8f361e1973ad644e1b1e50ad8ecfe@pivotal.io>\n"
},
{
"from": "human",
"value": "Sequel.migration do\n up do\n create_table ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extraneous \"Usage:\" prefix that's already output by mco.\n"
},
{
"from": "human",
"value": "class MCollective::Application::Puppetupdate < MCollective::Application\n description \"Puppet repository updates Client\"\n usage \"Usage: mco puppetupdate update... | ruby | chosen |
[
{
"from": "system",
"value": "Stop container and let it self destroy. Remove new constant.\n"
},
{
"from": "human",
"value": "require \"kitchen\"\nrequire \"elecksee/ephemeral\"\n\n::Lxc.use_sudo = true\n\nmodule Kitchen\n\n module Driver\n\n class Lxc < Kitchen::Driver::SSHBase\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Add included_plugins class method to Pluggable\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Mobility\n=begin\n\nAbstract Module subclass with methods to define plugins and defaults.\nWorks with {Mobility::Plugin}. (Subclassed by {Mobili... | ruby | chosen |
[
{
"from": "system",
"value": "Add functionality to establish connection only with the tenant name.\n"
},
{
"from": "human",
"value": "module Motel\n module MultiTenant\n extend ActiveSupport::Concern\n\n included do\n\n mattr_accessor :motel, instance_writer: false\n self.defaul... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a regression in writing core commands\n\n[Delivers #59093986]\n"
},
{
"from": "human",
"value": "module Polytexnic\n class Builder\n include Polytexnic::Utils\n\n attr_accessor :manifest, :built_files\n\n def initialize\n @manifest = Polytexnic::B... | ruby | chosen |
[
{
"from": "system",
"value": "Add rest of devs back to cc.rb notifications\n"
},
{
"from": "human",
"value": "Project.configure do |project|\n project.email_notifier.emails = [\"scott@butlerpress.com\"]\n # project.email_notifier.emails = [\"scott@butlerpress.com\", \"al.pendergrass@gmail.com\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix namespace for Shipments Controller\n"
},
{
"from": "human",
"value": "Spree::Admin::ShipmentsController.class_eval do\n def comments\n shipment\n @comment_types = Spree::CommentType.where(:applies_to => \"Shipment\")\n end\nend\n"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "system",
"value": "Fix availability zone views when infra provider is not attached\n\nWhen an OpenStack infrastructure provider is not attached to\nthe cloud provider, an \"undefined method 'infra_ems'\" error is\nthrown. This fix adds a nil check on provider. If it is nil,\nthe disk capacity is ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in new relic implmentation.\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nbegin\n require 'new_relic/agent/method_tracer'\nrescue LoadError => e\n fail LoadError, \"Can't use NewRelic instrumentation without NewRelic gem\"\nend\n\nmodule C... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake task for exporting tagged content\n\nUpdate extraction of content item details to fit new API\n"
},
{
"from": "human",
"value": "require 'csv'\n\nnamespace :taxonomy do\n desc <<-DESC\n Download content base paths from the taxonomy. Provide the content ... | ruby | chosen |
[
{
"from": "system",
"value": "Make interface a bit more restricted\n"
},
{
"from": "human",
"value": "module Cache\n attr_accessor :cache\n attr_accessor :length\n \n class BaseCache\n def initialize(size)\n @size = size\n @cache = {}\n end\n\n def [](key)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use new \"add_provisioner_options\" in chef-metal\n"
},
{
"from": "human",
"value": "require 'chef_metal'\nrequire 'chef/resource/vagrant_cluster'\nrequire 'chef/provider/vagrant_cluster'\nrequire 'chef/resource/vagrant_box'\nrequire 'chef/provider/vagrant_box'\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Add useful output for non-Windows platform\n"
},
{
"from": "human",
"value": "resource_name :security_policy\n\nproperty :template, String, required: true, default: 'C:\\Windows\\security\\templates\\chefNewPolicy.inf'\nproperty :database, String, required: true, de... | ruby | chosen |
[
{
"from": "system",
"value": "Use autoload like everywhere else\n"
},
{
"from": "human",
"value": "module Dockly::BuildCache\nend\n\nrequire 'dockly/build_cache/base'\nrequire 'dockly/build_cache/docker'\nrequire 'dockly/build_cache/local'\n\nmodule Dockly::BuildCache\n class << self\n attr_... | ruby | chosen |
[
{
"from": "system",
"value": "Add direction lock property to scrollview styler\n"
},
{
"from": "human",
"value": "module RubyMotionQuery\n module Stylers\n\n class UIScrollViewStyler < UIViewStyler\n def paging=(value) ; @view.pagingEnabled = value ; end\n def paging ; @view.isPagi... | ruby | chosen |
[
{
"from": "human",
"value": "Add GlobalController functionality to HomeController. Will refactor active_project private methods out to index action and model.\n"
},
{
"from": "gpt",
"value": "class HomeController < ApplicationController\n def index\n if !current_user\n render \"_squeeze... | ruby | chosen |
[
{
"from": "system",
"value": "Add index accessing for Collection\n"
},
{
"from": "human",
"value": "require_relative 'element'\n\nmodule Hyalite::DOM\n class Collection\n include Native\n include Enumerable\n\n def each(&block)\n `self.native.length`.times do |i|\n block.ca... | ruby | chosen |
[
{
"from": "system",
"value": "Make interface of avatar helper methods consistent.\n"
},
{
"from": "human",
"value": "module Admin::AvatarHelper\n def avatar_url(email, size)\n gravatar_id = Digest::MD5.hexdigest(email.downcase)\n \"http://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add Thomas to hair-on-fire mailer.\n\nhttps://chat.stackexchange.com/transcript/message/34885327#34885327\n"
},
{
"from": "human",
"value": "class HairOnFireMailer < ApplicationMailer\n default from: \"Hair on Fire <metasmoke@erwaysoftware.com>\"\n\n def smokey_do... | ruby | chosen |
[
{
"from": "system",
"value": "Update SplitParameters.permitted to allow distance, vert_gain, and vert_loss.\n"
},
{
"from": "human",
"value": "class SplitParameters < BaseParameters\n\n def self.permitted\n [:id, :course_id, :split_id, :distance_from_start, :distance_in_preferred_units, :ver... | ruby | chosen |
[
{
"from": "system",
"value": "Add evidence item count to source presenter\n"
},
{
"from": "human",
"value": "class SourcePresenter\n attr_reader :source\n\n def initialize(source)\n @source = source\n end\n\n def as_json(opts = {})\n {\n id: source.id,\n name: source.name,\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Update dataset_file_id primary key to bigint\n"
},
{
"from": "gpt",
"value": "class ChangeDatasetFileIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :dataset_files, :id, :bigint\n end\n\n def down\n change_column :dataset_files, :id, :inte... | ruby | chosen |
[
{
"from": "system",
"value": "Update Ruby gem version to 3.0.0.alpha.2.0.\n\nThis update conforms to our two-numbers-after-alpha scheme that allows\nus to bump the last number if we need to re-upload a gem. (Rubygems does\nnot allow re-use of a version number once a gem is uploaded.)\n\nChange-Id: Ia8e7c129... | ruby | chosen |
[
{
"from": "system",
"value": "Set some fave security hand waving options on bastion\n"
},
{
"from": "human",
"value": "include_attribute 'travis_internal_base'\n\noverride['openssh']['server']['permit_tunnel'] = 'no'\noverride['openssh']['server']['allow_tcp_forwarding'] = 'no'\noverride['openss... | ruby | chosen |
[
{
"from": "system",
"value": "Use Pony syntax for mailing\n"
},
{
"from": "human",
"value": "require 'lib/subtrigger'\n\nclass BramMatcher\n def ===(attribute)\n attribute.author == 'bram'\n end\nend\n\non /Description/ do\n puts 'Rule 1'\nend\n\non :all => BramMatcher.new do |r, m|\n put... | ruby | chosen |
[
{
"from": "system",
"value": "Add choose storage on document uploader\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass DocumentUploader < CarrierWave::Uploader::Base\n\n def store_dir\n \"uploads/project_documents/#{mounted_as}/#{model.id}\"\n end\n\n def filename\n File.ba... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify why we're testing some of these things\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "windows_feature 'install SNMP' do\n feature_name 'SNMP'\nend\n\nwindows_feature 'remove SNMP' do\n feat... | ruby | chosen |
[
{
"from": "system",
"value": "Remove mass_assignment_sanitizer config since it freaks out rails 3.1\n"
},
{
"from": "human",
"value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # The test environment is used exclusi... | ruby | chosen |
[
{
"from": "system",
"value": "Verify the contents of the ineligibility letter\n"
},
{
"from": "human",
"value": "Given(/^the customer doesn't have a defined contribution pension pot$/) do\n @appointment_summary = fixture(:populated_appointment_summary).tap do |as|\n as.has_defined_contributi... | ruby | chosen |
[
{
"from": "system",
"value": "Update preference cleaner home url.\n"
},
{
"from": "human",
"value": "cask 'preferencecleaner' do\n version :latest\n sha256 :no_check\n\n url 'http://www.echomist.co.uk/software/downloads/PreferenceCleaner.dmg'\n name 'PreferenceCleaner'\n homepage 'http://ww... | ruby | chosen |
[
{
"from": "system",
"value": "Update whitespace in one file\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nRSpec.shared_context 'for active record sets' do\n let!(:foo) { FactoryGirl.create(:foo, boolean: true, assoc: FactoryGirl.create(:assoc, bool... | ruby | chosen |
[
{
"from": "system",
"value": "Update Android Studio (Canary) to 2.0 Preview Beta 6\n"
},
{
"from": "human",
"value": "cask 'android-studio-canary' do\n version '2.0.0.13-143.2602393'\n sha256 '1af7422ddb695c257628b41232540fa34d567befd1a28756cea2628e4a146864'\n\n url \"https://dl.google.com/dl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActionController::InvalidAuthenticityToken during deploy notification.\n"
},
{
"from": "human",
"value": "class DeploysController < ApplicationController\n \n skip_before_filter :authenticate_user!, :only => :create\n \n def create\n @app = App.find_by_ap... | ruby | chosen |
[
{
"from": "system",
"value": "Use model sum to prevent having to load entire record\n"
},
{
"from": "human",
"value": "module SubjectCounts\n include ActiveSupport::Concern\n\n def subject_count\n subject_sets.map{|set| set.set_member_subjects_count}.reduce(&:+)\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add reminders that notifications need sending too.\n"
},
{
"from": "human",
"value": "class MessageThreadObserver < ActiveRecord::Observer\n def after_save(thread)\n if thread.privacy_changed?\n case thread.privacy\n when \"committee\"\n thread.... | ruby | chosen |
[
{
"from": "system",
"value": "Update a comments to make the source more clear\n"
},
{
"from": "human",
"value": "$:.unshift File.dirname(__FILE__)\n\nrequire 'boot'\n\nmodule Application\n include ActiveSupport::Configurable\nend\n\nApplication.configure do |config|\n config.root = [File.dirna... | ruby | chosen |
[
{
"from": "system",
"value": "Update config.load_defaults to reflect update to Rails 7.0\n"
},
{
"from": "human",
"value": "require_relative \"boot\"\n\nrequire \"rails\"\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_job/railtie\"\nrequire \"active_record/r... | ruby | chosen |
[
{
"from": "system",
"value": "Add fonts path to assets paths\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.\nBundler.requ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix filename typo in failling ToyRobotTest\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\n\nmodule ToyRobot\n class ToyRobotTest < MiniTest::Unit::TestCase\n def test_that_it_is_executable\n assert system('[ -x bin/toyrobots ]')\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add checkpoint to list of pebbles\n"
},
{
"from": "human",
"value": "require File.expand_path('config/site.rb') if File.exists?('config/site.rb')\n\nrequire \"bundler\"\nBundler.require\nrequire 'active_support/all'\n\nunless defined?(LOGGER)\n require 'logger'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spelling of ENV['COFFEELINT_CONFIG'] variable\n"
},
{
"from": "human",
"value": "desc \"lint application javascript\"\ntask :coffeelint do\n conf = {}\n\n config_file = [].tap {|files|\n files << ENV['COFFEELNT_CONFIG'] if ENV['COFFEELENT_CONFIG']\n file... | ruby | chosen |
[
{
"from": "system",
"value": "Use NFSv4 over TCP for NFS mounts\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: nfs\n# Recipe:: default\n#\n# Copyright 2010, OpenStreetMap Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exce... | ruby | chosen |
[
{
"from": "human",
"value": "Add Cave Story.app (English Translation) v0.0.8\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'cave-story-en' do\n version :latest\n sha256 :no_check\n\n url 'https://dl.dropboxusercontent.com/u/73366966/Cave%20Story.zip?dl=1'\n name 'Cave Story'\n homepage 'http... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec on instructeur invitation\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nfeature 'As an instructeur', js: true do\n let(:administrateur) { create(:administrateur, :with_procedure) }\n let(:procedure) { administrateur.procedures.first }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for geocoding route\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire_relative 'apply'\nrequire_relative 'login'\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\nrequire_relative 'apply'\nrequire_relative 'login'\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix IRC spec creating new settings file in bad directory.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'bot/core'\nrequire 'bot/adapter'\nrequire 'adapters/irc/irc'\nrequire 'adapters/irc/handler'\nrequire 'adapters/irc/message'\n\ndescribe Bot:... | ruby | chosen |
[
{
"from": "system",
"value": "Add multiple method to solve challenge\n"
},
{
"from": "human",
"value": "# Smallest Integer\n\n# I worked on this challenge [by myself, with: ].\n\n# smallest_integer is a method that takes an array of integers as its input\n# and returns the smallest integer in th... | ruby | chosen |
[
{
"from": "system",
"value": "Reset state before memory spec\n\nFixes\n\n```\nrspec \\\n ./spec/requests/memory_spec.rb[1] \\\n ./spec/unit/authorization/controller_authorization_spec.rb[1:1] \\\n --seed 24032\n```\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error with published status\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nclass PostBuilder\n\n def self.from_item item\n p = Post.new\n p.title = item.at_css('title').text\n p.content = item.at_css('encoded').text\n p.published = (item.a... | ruby | chosen |
[
{
"from": "system",
"value": "Update this test for recent ChefSpec matcher changes\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'spec_helper'\n\ndescribe 'rabbitmq::user_management' do\n let(:runner) { ChefSpec::ServerRunner.new(REDHAT_OPTS) }\n let(:node) { runner... | ruby | chosen |
[
{
"from": "human",
"value": "Add forgotten migration to add index.\n"
},
{
"from": "gpt",
"value": "class AddIndexForInvoicesCustomerAndCompanyId < ActiveRecord::Migration\n def self.up\n add_index :invoices, :company_id\n add_index :invoices, :customer_id\n end\n\n def self.down\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong foreign key reference table\n"
},
{
"from": "human",
"value": "class AddRevisionsUserIdConstraint < ActiveRecord::Migration\n def self.up\n execute \"ALTER TABLE `revisions` ADD CONSTRAINT revisions_user_userid FOREIGN KEY (user_id) REFERENCES revision... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to retroactively convert HttpLogs to UTF8\n"
},
{
"from": "gpt",
"value": "class Issue2100Utf8EncodeHttpLogs < ActiveRecord::Migration[5.1]\n def up\n HttpLog.where('request LIKE :enctag OR response LIKE :enctag', enctag: '%content: !binary |%')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use new RSpec routes method for defining the routes in a routing spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'QuickbooksWebConnector routing' do\n\n before do\n @routes = QuickbooksWebConnector::Engine.routes\n end\n\n it 'default... | ruby | chosen |
[
{
"from": "system",
"value": "Fix horrible initialization code in test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\ndescribe Kiitos::Kiito do\n before do\n @subject = Kiitos::Kiito.new\n @subject.title = 'Title'\n @subject.kiitos_category_id = 1\n @subject.description... | ruby | chosen |
[
{
"from": "system",
"value": "Test Donation.amount automatically set to random number\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DonationTest < ActiveSupport::TestCase\n test \"donation can return gravatar url\" do\n @d = Donation.new(email: 'test1@example.com')\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make an EditedFile look like a string\n"
},
{
"from": "human",
"value": "class Chef\n class Util\n class EditedFile\n def initialize(file, block)\n @file = file\n @block = block\n end\n\n def to_s\n ::File.new(@file).collect d... | ruby | chosen |
[
{
"from": "system",
"value": "Allow TAs to see assignment summaries page\n"
},
{
"from": "human",
"value": "class SummariesController < ApplicationController\n include SummariesHelper\n\n before_filter :authorize_only_for_admin\n\n def index\n @assignment = Assignment.find(params[:assignm... | ruby | chosen |
[
{
"from": "system",
"value": "Call anonymous functions for child abilities as well\n"
},
{
"from": "human",
"value": "module Brewery\n class AuthCore::Ability\n @@extra_classes = []\n include CanCan::Ability\n\n attr_accessor :object\n\n def self.add_extra_ability_class_name(class_n... | ruby | chosen |
[
{
"from": "system",
"value": "Extend CloudSubnetNetworkPort with Dto capabilities\n\nExtend CloudSubnetNetworkPort with Dto capabilities\n"
},
{
"from": "human",
"value": "class CloudSubnetNetworkPort < ApplicationRecord\n self.table_name = \"cloud_subnets_network_ports\"\n\n belongs_to :cloud... | ruby | chosen |
[
{
"from": "system",
"value": "Undo commit 0616e068 - needed for unit testing\n"
},
{
"from": "human",
"value": "require 'activerecord'\n\nrequire 'invoicing/class_info' # load first because other modules depend on this\nDir.glob(File.join(File.dirname(__FILE__), 'invoicing/**/*.rb')).sort.each ... | ruby | chosen |
[
{
"from": "system",
"value": "Add friends endpoint stub (TODO)\n"
},
{
"from": "human",
"value": "class UserController < ApplicationController\n def show\n user = User.find(params[:id]).to_json\n render json: user\n end\n\n def create\n user_params = params.require(:user).permit(:nam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix vizzjson error when map bounds not present\n"
},
{
"from": "human",
"value": "module MapsHelper\n def map_vizzjson(map, options = {})\n options.reverse_merge! full: true\n\n CartoDB::Logger.info(map.inspect)\n {\n version: \"0.1.0\",\n\n upda... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct postgres data directory in docker volume\n"
},
{
"from": "human",
"value": "module Conjure\n module Service\n class PostgresServer < Basic\n def initialize(host)\n @container = host.containers.create(\n label: \"postgres\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix UserMailer to work in 1.8 mode\n"
},
{
"from": "human",
"value": "class UserMailer < ActionMailer::Base\n default from: \"ascii.io <hello@ascii.io>\"\n\n def new_comment_email(user, comment)\n @comment = comment\n @author = comment.user\n @asciicast =... | ruby | chosen |
[
{
"from": "system",
"value": "Set default emoji. Require emoji.\n"
},
{
"from": "human",
"value": "class Announcement < ApplicationRecord\n validates :body, presence: true\nend\n"
},
{
"from": "gpt",
"value": "class Announcement < ApplicationRecord\n validates :body, :emoji, presen... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo and validate week day enum\n"
},
{
"from": "human",
"value": "class OpeningHour < ActiveRecord::Base\n\tTIME_FORMAT = %r(\\A\\d{2}:\\d{2}\\z)\n\tenum state: %w( Monday Tuesday Wednesday Thursday Friday Saturday Sunday )\n \n belongs_to :restaurant\n\n va... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"update to include links to the pages that they sit on and a more explanatory piece of dummy text\"\n\nThis reverts commit af3e6e627d213f492bb105258563b4c86633875a.\n"
},
{
"from": "human",
"value": "class TextElement < ActiveRecord::Base\n acts_as_textiled... | ruby | chosen |
[
{
"from": "human",
"value": "Add a FluxCapacitor class so we can capacitate our flux\n"
},
{
"from": "gpt",
"value": "module GitTimeMachine\n class FluxCapacitor\n class NoFuelError < RuntimeError; end\n\n def initialize\n @plutonium = nil\n end\n\n def setup\n @plutonium ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix DefaultCustomer permission set with CanCan 2\n\nCanCan 2 complains about not being able to merge abilities that use\nan ActiveRecord scope, so we need to use an SQL string instead.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Solidu... | ruby | chosen |
[
{
"from": "system",
"value": "Replace deprecated devise bypass option\n"
},
{
"from": "human",
"value": "# TODO store staff user via Warden\nmodule UserImpersonate\n module DeviseHelpers\n module Helpers\n # current_user changes from a staff user to\n # +new_user+; current user sto... | ruby | chosen |
[
{
"from": "system",
"value": "Define the docker LWRPs in a module and include it to make Ruby 1.9 happy\n"
},
{
"from": "human",
"value": "# Define matchers for the docker LWRPs\n# Need chef-docker to define its own LWRP matchers eventually\n\n[:pull, :build, :remove, :import].each do |meth|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update PhpStorm 8.0 EAP to 136.1672."
},
{
"from": "human",
"value": "class PhpstormEap < Cask\n url 'http://download.jetbrains.com/webide/PhpStorm-EAP-136.1575.dmg'\n homepage 'https://www.jetbrains.com/phpstorm/index.html'\n version '136.1575'\n sha256 '8f0b5a... | ruby | chosen |
[
{
"from": "system",
"value": "Remove testing pods from dependencies.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DeskAPIClient\"\n s.version = \"1.1.3\"\n s.summary = \"A lightweight wrapper around the Desk.com API, v2.\"\n s.license = { :type ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix acceptance test to work in test env\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + \"/../acceptance_test\")\n\n# :stopdoc:\nclass PagesTest < AcceptanceTest\n setup :javascript!\n\n test \"pages\" do\n login_as FactoryG... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor changes - removed multiple return\n"
},
{
"from": "human",
"value": "class AutomationTask < MiqRequestTask\n alias_attribute :automation_request, :miq_request\n has_one :container_deployment\n AUTOMATE_DRIVES = false\n\n def self.get_description(_reques... | ruby | chosen |
[
{
"from": "human",
"value": "Check if a chef node exists or not\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n#\n# check-chef-node\n#\n# DESCRIPTION:\n# Check if a node exists.\n#\n# OUTPUT:\n# <output> plain text, metric data, etc\n#\n# PLATFORMS:\n# Linux, Windows, BSD, Solari... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve syntax error: include missing END.\n"
},
{
"from": "human",
"value": "module ProjectsHelper\n\n def render_project_hierarchy(projects)\n s = ''\n if projects.any?\n ancestors = []\n original_project = @project\n projects.each do |projec... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use fetch method\n"
},
{
"from": "human",
"value": "require 'capistrano'\nrequire 'json'\nrequire 'net/http'\n\nCapistrano::Configuration.instance(:must_exist).load do\n after 'deploy', 'chatwork:notify'\n\n namespace :chatwork do\n _cset(:chatwork_ap... | ruby | chosen |
[
{
"from": "human",
"value": "Make GC.stat compatible with MRI behaviour\n"
},
{
"from": "gpt",
"value": "require_relative '../../spec_helper'\n\ndescribe \"GC.stat\" do\n it \"supports access by key\" do\n keys = [:heap_free_slots, :total_allocated_objects, :count]\n keys.each do |key|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add verbose check for file logging during build\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'set'\n\nmodule BuildTools\n class FileWriter\n\n def initialize(options)\n @directory = options.fetch(:directory)\n @custom = o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests for when config is not provided\n\n[#141401071]\n\nSigned-off-by: Vlad Stoian <3a646ed2933376f6ad3d8f73c719d7c5225000dd@pivotal.io>\n"
},
{
"from": "human",
"value": "\nRSpec.describe 'rabbit.config file generation', template: true do\n\tlet(:output) do\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow models with bsonify_attr to be saved\n"
},
{
"from": "human",
"value": "module ActiveMongoid\n module BsonId\n extend ActiveSupport::Concern\n\n included do\n class_attribute :bson_attrs\n class_attribute :primary_bson_key\n self.bson_att... | ruby | chosen |
[
{
"from": "system",
"value": "Add door drop options to WDYH\n"
},
{
"from": "human",
"value": "class WhereYouHeard\n OPTIONS = {\n '19' => 'Media - Pensions Awareness Day',\n '20' => 'Media - Leaving planning retirement finances to two years before retirement',\n '21' => 'Money and Pen... | ruby | chosen |
[
{
"from": "system",
"value": "Update the reply-to in order to not be tagged as spam.\n"
},
{
"from": "human",
"value": "class TalkMailer < ActionMailer::Base\n default from: 'no-reply@rubyparis.org'\n\n def new_talk(talk)\n @talk = talk\n mail to: ['thibaut@milesrock.com', 'scourtois@cub... | ruby | chosen |
[
{
"from": "system",
"value": "Change a few of the create user commands\n"
},
{
"from": "human",
"value": "\nuser \"codedash\" do\n supports :manage_home => true\n comment \"Code Dash User\" \n gid \"root\"\n home \"/home/codedash\"\n shell \"/bin/bash\"\n password \"$1$22bgA1YD$JgBUYEoCwq... | ruby | chosen |
[
{
"from": "human",
"value": "Rename \"Pre-Con\" events to be \"Panel\" events so they're not so Intercon-specific.\n"
},
{
"from": "gpt",
"value": "#\n# Definition of the Panel class of events. This will be used to implement\n# Intercon's Pre-Convention events.\n#\nclass Events::Panel < Event\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to fix deprecation warning.\n"
},
{
"from": "human",
"value": "\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\nrequire 'forgery/version'\n\nGem::Specification.new do |spec|\n spec.name = 'forgery'\n spec.version = Forgery::VERSION... | ruby | chosen |
[
{
"from": "system",
"value": "Use CGI.escape on search term to account for special characters!\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'oauth'\n\nclass YelpRequest\n attr_accessor :consumer_key, :consumer_secret, :token, :token_secret, :api_host\n\n def initialize(term, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some info to dashbard\n"
},
{
"from": "human",
"value": "ActiveAdmin.register_page \"Dashboard\" do\n\n menu :priority => 0, :label => proc{ I18n.t(\"active_admin.dashboard\") }\n\n content :title => proc{ I18n.t(\"active_admin.dashboard\") } do\n columns d... | ruby | chosen |
[
{
"from": "system",
"value": "Return only valid payments in CartSerializer\n"
},
{
"from": "human",
"value": "module Spree\n module V2\n module Storefront\n class CartSerializer < BaseSerializer\n set_type :cart\n\n attributes :number, :item_total, :total, :ship_total, :ad... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debugger gem - it's failing to install w/ ruby 2.1.3\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/fulcrum/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Spatial Networks\"]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change rails dependency to match analytics plugin"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"canvas_auth/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificat... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.