conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix rubocop warning in TextualMixins::TextualDrift\n"
},
{
"from": "human",
"value": "module TextualMixins::TextualDrift\n def textual_drift\n return nil unless role_allows?(:feature => \"vm_drift\")\n h = {:label => _(\"Drift History\"), :icon => \"ff ff-dri... | ruby | chosen |
[
{
"from": "system",
"value": "Add images to assets precompile\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule CountryFlags\n class Railtie < ::Rails::Railtie\n initializer 'country_flags.view_helpers' do\n ActionView::Base.send :include, Helper\n end\n end\nend"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Support preparing test environment for non-installation test on Windows.\n\n* subversion/bindings/swig/ruby/test/run-test.rb: Use copy instead of\n symbolic link on Windows.\n\nSuggested by: Joe Swatosh\n\n\ngit-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@862911 13f79535-... | ruby | chosen |
[
{
"from": "human",
"value": "Drop log_id foreign key from user migrations\n\nThe log_id column is still mandatory because all the logic involves\nwriting a log. However, having a history of the logs of users migrations\nis not really needed so, this way, we can implement a retention policy\nof the logs whil... | ruby | chosen |
[
{
"from": "system",
"value": "Fix removing redundant pipeline stages on MySQL\n"
},
{
"from": "human",
"value": "class RemoveRedundantPipelineStages < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def up\n redundant_stages_ids = <<~SQL\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for readme command\n"
},
{
"from": "gpt",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\nrequire File.expand_path(\"../command_helper\", __FILE__)\n\ndescribe \"github readme\" do\n include CommandHelper\n \n specify \"rea... | ruby | chosen |
[
{
"from": "system",
"value": "Test log in from an invalid domain"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature \"Authentication\" do\n before do\n OmniAuth.config.test_mode = true\n\n OmniAuth.config.mock_auth[:gplus] = OmniAuth::AuthHash.new({\n provider: 'gplus... | ruby | chosen |
[
{
"from": "system",
"value": "Use keystone command line to check keystone health\n\nUse keystone command to check keystone heatlh\n\nRelated #30\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n#\n# Keystone\n#\ndescribe package('keystone') do\n it { should be_installed }\nend\n\ndes... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests around Windows::RootCerts.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'RestClient::Windows::RootCerts',\n :if => RestClient::Windows.windows? do\n let(:x509_store) { RestClient::Windows::RootCerts.instance.to_a }\n\n i... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Make Discourse.redis change backwards compatible\n\n25ea0b3a broke docker manager when it was run against earlier versions\nof Discourse, this attempts to work around the issue by introducing\nthe method if it is missing.\n"
},
{
"from": "human",
"value": "# fr... | ruby | chosen |
[
{
"from": "human",
"value": "Create and show the window\n"
},
{
"from": "gpt",
"value": "require \"bundler/setup\"\nrequire \"hasu\"\n\nclass Pong < Hasu::Window\n WIDTH = 768\n HEIGHT = 576\n\n def initialize\n super(WIDTH, HEIGHT, false)\n end\nend\n\nPong.run\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Use the Enumerable implementation of include?\n"
},
{
"from": "human",
"value": "class Dependencies\n include Enumerable\n\n def initialize(*args)\n @deps = Array.new(*args)\n end\n\n def each(*args, &block)\n @deps.each(*args, &block)\n end\n\n def <<(o... | ruby | chosen |
[
{
"from": "system",
"value": "Change hashified request to fallback to plain body instead of empty string."
},
{
"from": "human",
"value": "module MockServer\n module Utils\n\n private\n\n def verbose(env, options)\n if options\n interception = lazy_match(options[:routes], env[... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"add saunders' changes to shop model generator\"\n\nThis reverts commit 0ce1aff80fba056d98831dec5901623de92a8f7e.\n"
},
{
"from": "human",
"value": "class SessionStorage\n def self.store(session)\n shop = self.find_or_initialize_by(shopify_domain: sessio... | ruby | chosen |
[
{
"from": "system",
"value": "Update set balance method for effective amount"
},
{
"from": "human",
"value": "module Spree\n module DisableNegativePaymentModeAndSetBalanceAbility\n def self.included(klass) \n klass.class_eval do\n attr_accessor :disable_negative_payment_mode\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to edit a document's base_bath\n\nTrello card:\nhttps://trello.com/c/kTKWF48j/530-document-how-to-change-a-url-in-specialist-publisher\n\nHow to change a URL in Specialist Publisher wasn't a documented process.\nMaking it into a rake task seems a nicer solution tha... | ruby | chosen |
[
{
"from": "system",
"value": "Allow sending of multiple arguments to the base validator client\n"
},
{
"from": "human",
"value": "require 'json-schema'\nmodule FDIC\n module BankFind\n module SchemaValidators\n class BaseValidator\n def schema_valid?\n JSON::Validator.va... | ruby | chosen |
[
{
"from": "system",
"value": "Use Performance. toplevel namespace since gauges are already namespaced to GC. and Objects.\n"
},
{
"from": "human",
"value": "module Trashed\n module NewRelic\n def self.sample(meter, options = nil)\n ::NewRelic::Agent.instance.stats_engine.add_sampler Sam... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to check callback will work in customize model\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe LetsEncrypt::Configuration do\n describe '#use_redis?' do\n it 'reture is user enable save to red... | ruby | chosen |
[
{
"from": "system",
"value": "Include the Sinatra app instead.\n"
},
{
"from": "human",
"value": "$:.unshift '.'\nrequire 'active_record'\nrequire 'models'\n\nnumber = ARGV.first.to_i\n\nunless number > 0\n abort \"The first argument should be a positive number\"\nend\n\nnames = %w(Tom Alice ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Guard dependency to ~> 2.0\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'guard/minitest/version'\n\nGem::Specification.new do |s|\n s.name = 'guard-minitest'\n s.version = Guard::Mini... | ruby | chosen |
[
{
"from": "system",
"value": "Write model tests for an initiative_funder.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass InitiativeFunderTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "requ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in variable name\n"
},
{
"from": "human",
"value": "class RolePaymentType\n include ActiveRecordLikeInterface\n\n attr_accessor :id, :name\n\n Consultant = create!(id: 4, name: \"Paid as a consultant\")\n ParliamentarySecretary = create!(id: 2, name: \"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix CacheObserver to expire events.\n\nThe Rails API for Observers has changed back and forth over the way the\n\"observe\" call works, between having a separate call for each model and\nhaving a single call for all models, and it's apparently the later.\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve reference to link_to within controller.\n\nThere seems to be some indications that using \"link_to\" within a\ncontroller within a controller is bad practice. Most indications seem to\nbe that you could hand-roll the HTML yourself (a thousand times worse,\nin my opinion... | ruby | chosen |
[
{
"from": "human",
"value": "Add the scraper. Needs to be refactored.\n"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'mechanize'\n\n$USERNAME = ''\n$PASSWORD = ''\n\n# All the constants\n$LOGIN_URL = \"http://www.pge.com/myhome/\"\n$OVERVIEW_URL = \"https://www.pge.com/csol/actions... | ruby | chosen |
[
{
"from": "system",
"value": "Set send email as neighbor email from\n"
},
{
"from": "human",
"value": "require 'mandrill'\n\nclass BaseMandrillMailer < ActionMailer::Base\n default(\n from: \"hello@example.com\",\n reply_to: \"hello@example.com\"\n )\n\n private\n\n def send_mail(email... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to add slugs to existing tags\n\nThis will likely raise exceptions for any tag matching the reserved\nFriendlyId keywords so we need to address that too:\n\nconfig.reserved_words = %w(new edit index session login logout users admin stylesheets assets javascripts im... | ruby | chosen |
[
{
"from": "system",
"value": "Improve docs for updating mainstream slugs\n\nLets keep this documentation closer to the codebase.\n\nOriginal documentation has been updated to new usage of the higher level fabric tasks, however this rake task can document itself with a link to the main documentation for furt... | ruby | chosen |
[
{
"from": "system",
"value": "Add metrics with ids to secondary, without to primary\n"
},
{
"from": "human",
"value": "require 'meter/configuration'\n\n# A generic wrapper for Statsd-like gauges and counters.\n#\nmodule Meter\n extend self\n\n def increment(key, options = {})\n primary.incr... | ruby | chosen |
[
{
"from": "system",
"value": "Revert accidentally committed debug code.\n"
},
{
"from": "human",
"value": "require \"strut/config\"\nrequire \"strut/parser\"\nrequire \"strut/report_builder\"\nrequire \"strut/report_printer\"\nrequire \"strut/slim_client\"\nrequire \"strut/version\"\n\nmodule St... | ruby | chosen |
[
{
"from": "system",
"value": "Change attr_accessor to attr_reader for encapsulation\n"
},
{
"from": "human",
"value": "require \"trees/version\"\n\nmodule Trees\n\n class Node\n attr_accessor :value, :nodes\n def initialize (value, nodes = [])\n @value = Array(value)\n @nodes = ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce coverage threshold to 54 inorder to pass CI.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'simplecov'\n\nSimpleCov.minimum_coverage 94\nSimpleCov.start 'rails' do\n add_filter '/bin/'\n add_filter '/config/'\n add_filter '/jo... | ruby | chosen |
[
{
"from": "system",
"value": "Change test to ensure works on windows\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nRSpec.describe TTY::Prompt::Timer do\n it \"times out loop execution\" do\n timer = TTY::Prompt::Timer.new(0.03, 0.01)\n\n yielded = []\n\n timer.whi... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency on capistrano 2.15.5 and minor version bump\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'capistrano-ec2tag'\n s.version = '0.1.1'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update test for neo4j output\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ndef furbies\n @furbies ||= rand(200..299)\nend\n\ndescribe 'neo4j installation' do\n describe command('which neo4j') do\n its(:stdout) { should match 'bin/neo4j' }\... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as development dependency\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'netflix_roulette'\n s.version = '0.0.2'\n s.date = '2014-04-25'\n s.summary = \"API Wrapper for Netflix Roulette\"\n s.descript... | ruby | chosen |
[
{
"from": "human",
"value": "Add first tests for user\n"
},
{
"from": "gpt",
"value": "require './spec/spec_helper'\n\nrequire './lib/gas'\n\ndescribe Gas::User do\n it 'should be able to parse name and email from gitconfig format' do\n name = 'Fredrik Wallgren'\n email = 'fredrik.wallgre... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Settings class\n\nThese specs are partly a verification of the Settings::DSL\nfunctionality, and partly a verification that I've made the right calls\nto the DSL in the Settings class itself. For this reason, I've tried to\nwalk a middle ground of testing general f... | ruby | chosen |
[
{
"from": "system",
"value": "[cookbooks] Remove apt and yum dependencies\n\nThese cookbooks appear unused in the private-chef cookbooks. These\nwere previously used to install the add-on repository; however, that\nfunctionality was changed in 9d10dac3d3933503211217968449c38657e0f7a6\nto use mixlib-install.... | ruby | chosen |
[
{
"from": "system",
"value": "Make an assertion on the error message of a SourceControlSystem test\n"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire \"rubycritic/source_control_systems/source_control_system\"\n\ndescribe Rubycritic::SourceControlSystem do\n before do\n Ruby... | ruby | chosen |
[
{
"from": "system",
"value": "Drop the unused container member from ApplicationController::Feature\n"
},
{
"from": "human",
"value": "class ApplicationController\n Feature = Struct.new(:role, :role_any, :name, :accord_name, :title, :container) do\n def self.new_with_hash(hash)\n feature... | ruby | chosen |
[
{
"from": "system",
"value": "Add \"filename\" method for household heat CSV\n\nResolves ETENGINE-2V\n"
},
{
"from": "human",
"value": "module Api\n module V3\n # Creates CSV rows describing household heat demand and supply.\n class HouseholdHeatCSVPresenter\n def initialize(graph)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Improve performance of import mode.\n"
},
{
"from": "human",
"value": "# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/\n\nclass Observer::Ticket::UserTicketCounter < ActiveRecord::Observer\n observe 'ticket'\n\n def after_create(record)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add mailer sending after subscribing\n"
},
{
"from": "human",
"value": "#\n# == NewsletterUsersController\n#\nclass NewsletterUsersController < ApplicationController\n before_action :set_newsletter_user, only: [:unsubscribe]\n after_action :send_welcome_newsletter... | ruby | chosen |
[
{
"from": "system",
"value": "Replace unknown constant with boolean\n\nThe 'False' is an unknown constant:\n NameError: uninitialized constant OVIRT::Client::False\n\nAlso the method expects the provided value to be resolved to a string,\nso it can be concatenated to the request to be sent.\n\nFixes https:/... | ruby | chosen |
[
{
"from": "system",
"value": "Enable projects feature for pull request, i.e. review app environment\n"
},
{
"from": "human",
"value": "require_relative './staging'\n\nRails.application.configure do\n # This should probably stay empty since\n # staging + production should be the same\nend"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Fix result of Git.stage method\n"
},
{
"from": "human",
"value": "require 'open3'\n\nmodule GitCrecord\n module Git\n def self.stage(files)\n diff = files.map(&:generate_diff).join(\"\\n\")\n content, status = Open3.capture2e(\n 'git apply --cac... | ruby | chosen |
[
{
"from": "system",
"value": "Use require_relative\nIt's a bit faster when loading the gem, and it's free!\n"
},
{
"from": "human",
"value": "require \"time\"\n\nrequire \"good_migrations/version\"\nrequire \"good_migrations/load_error\"\nrequire \"good_migrations/configuration\"\nrequire \"good... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix bug when book.book_data is nil\"\n"
},
{
"from": "human",
"value": "class Admin::DashboardController < Admin::ApplicationController\n\n skip_before_filter :authentication_admin_check, if: -> { current_user and current_user.publisher? }\n\n def index\n... | ruby | chosen |
[
{
"from": "human",
"value": "Support for easily configuring Rails logging from a config/initializers\nfile\n"
},
{
"from": "gpt",
"value": "require 'log4jruby'\n\nmodule Log4jruby\n \n # Configure Rails logging from a config/initializers file\n # \n # Setting up log4j using config.logger fro... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature test for homepage\n\nAdd a sanity-check test for homepage to check if all TestJobs with\nstatuses are displayed correctly.\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass HomepageFeatureTest < Capybara::Rails::TestCase\n let(:project) { F... | ruby | chosen |
[
{
"from": "system",
"value": "Add formatting to google translate endpoint\n"
},
{
"from": "human",
"value": "require 'multi_json'\nrequire 'rest-client'\n\nmodule AbAdmin\n module I18nTools\n module GoogleTranslate\n def self.t(text, from, to)\n return '' if text.blank?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set up private IP here for local mode"
},
{
"from": "human",
"value": "require 'fog/core/collection'\nrequire 'fog/octocloud/models/compute/server'\n\nmodule Fog\n module Compute\n class Octocloud\n\n class Servers < Fog::Collection\n\n # default to ... | ruby | chosen |
[
{
"from": "system",
"value": "Use begin-end block with response if there is an exception\n"
},
{
"from": "human",
"value": "require 'nokogiri'\nrequire 'open-uri'\n\nmodule Cinch\n module Plugins\n class Arirang\n include Cinch::Plugin\n\n match /(arirang)$/\n match /(help ari... | ruby | chosen |
[
{
"from": "system",
"value": "Use qualified name for services in generate default lists service\n"
},
{
"from": "human",
"value": "module Boards\n module Lists\n class GenerateService < Boards::BaseService\n def execute\n return false unless board.lists.label.empty?\n\n Li... | ruby | chosen |
[
{
"from": "human",
"value": "Add resource actions integration so we know everything is wired up correctly.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nclass DummyResourceActions < ResourceKit::Resource\n resources do\n action :dummy, 'GET /dummy' do\n handler(200) {|resp| ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flaky nats ca test\n\n- without this change, the test would not pass on its own; it depended\non a previous test to have uploaded the test release.\n\n[#157670720](https://www.pivotaltracker.com/story/show/157670720)\n\nCo-authored-by: Joshua Aresty <18e47c05d12d69c65baf02b... | ruby | chosen |
[
{
"from": "system",
"value": "Add in ignoring state to staging\n"
},
{
"from": "human",
"value": "options = Rails.env.development? ? {provider_ignores_state: true} : {}\n\nRails.application.config.middleware.use OmniAuth::Builder do\n provider :clever, Clever::CLIENT_ID, Clever::CLIENT_SECRET, ... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct argument name for GetDead query\n"
},
{
"from": "human",
"value": "module Interactors\n module Facts\n class Destroy\n include Pavlov::Interactor\n include Util::CanCan\n\n arguments :fact_id\n\n def authorized?\n can? :man... | ruby | chosen |
[
{
"from": "human",
"value": "Reconnect to Redis on Passenger fork\n"
},
{
"from": "gpt",
"value": "if defined?(PhusionPassenger)\n PhusionPassenger.on_event(:starting_worker_process) do |forked|\n # We're in smart spawning mode.\n if forked\n # Re-establish redis connection\n re... | ruby | chosen |
[
{
"from": "human",
"value": "Tidy up artefacts whose formats have changed\n\nThe previous commit makes sure that an Artefact's kind is changed whenever\nwe change the format of an edition. This migration finds any artefacts\nwhose kind no longer matches the format of their latest edition and\nchanges it so... | ruby | chosen |
[
{
"from": "system",
"value": "Set enable_starttls_auto to true or false as appropriate and do so before applying settings to ActionMailer\n\n[#1751 state:resolved]\n"
},
{
"from": "human",
"value": "module Spree\n module MailSettings\n\n # Override the Rails application mail settings based o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bugs and show local date in Ruby script\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'time'\n\n$last_update = Time.new(0)\ndef refresh_sols\n $solutions_list = JSON.parse(`curl --user ':8+FseeDc/XZMkhiIMvA2y5xNMSCoc+DA4XWeTe/2Xz0=' \\\n https:/... | ruby | chosen |
[
{
"from": "system",
"value": "Sort gems for specs to pass on linux\n"
},
{
"from": "human",
"value": "require 'maestro_agent'\nrequire 'gemfury'\n\nmodule MaestroDev\n class GemfuryWorker < Maestro::MaestroWorker\n\n def validate_fields\n required_fields = [\"account\", \"user_api_key\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use latest Chronic and use Numerizer gem just like it does.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tickle/version'\n\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Use read_attribute instead of ||=\n"
},
{
"from": "human",
"value": "class Balance < ActiveRecord::Base\n belongs_to :account\n validates_presence_of :account, :evaluated_at, :balance\n\n def balance\n self.balance ||= calculate_balance\n end\n\n def calcula... | ruby | chosen |
[
{
"from": "system",
"value": "Change pg_search from pg_search_scope to multisearchable against\n"
},
{
"from": "human",
"value": "class Program < ActiveRecord::Base\n\tinclude PgSearch\n\tbelongs_to :school\n\n\tpg_search_scope :program_search, :against => [:program_name, :interest_area] \... | ruby | chosen |
[
{
"from": "system",
"value": "Include has_many :votes to reflect changes to votes table\n"
},
{
"from": "human",
"value": "class Request < ActiveRecord::Base\n before_create :defaultly_unfulfilled\n\n has_many :messages\n has_many :transactions\n\n belongs_to :requester, class_name: 'User'\n... | ruby | chosen |
[
{
"from": "human",
"value": "Set up tests for nodes\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"using the nodes api\" do\n include_context \"netrc\"\n\n context \"to create\" do\n When { VCR.use_cassette('nodes/create') { run \"rumm create node on loadbalancer lau... | ruby | chosen |
[
{
"from": "system",
"value": "Disable versioning during tests unless explicitly requested\n\nA bug in the Papertrail gem seems to have been fixed so we can do this\nnow.\n"
},
{
"from": "human",
"value": "RSpec.configure do |config|\n config.before(:each) do\n PaperTrail.enabled = true # REV... | ruby | chosen |
[
{
"from": "system",
"value": "Fix integrations tests for Docker Machine\n\nSigned-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe file('/usr/local/bin/docker-machine') do\n it { should be_file }\n it {... | ruby | chosen |
[
{
"from": "system",
"value": "Allow user-about page per language\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def get_title\n website_title = \"NigoroJr\"\n\n website_title = @page_title + \" - \" + website_title if @page_title\n\n return website_title\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "BUGFIX: Attach an order or shipment to a Quote so we can calculate the hash\n"
},
{
"from": "human",
"value": "require 'digest/sha1'\n\nmodule Spree\n # TemandoQuote object is a representation of the selected Quote provided by\n # the Temando API.\n class Temando... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to coupon decorator. Don't assume we have an expiration. Need test coverage on coupon decorator.\n"
},
{
"from": "human",
"value": "class CouponDecorator < ApplicationDecorator\n decorates :coupon\n\n def percent_off\n \"#{coupon.percent_off}% Off\"\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove instead of copy fix."
},
{
"from": "human",
"value": "# Uninstall hook code here\n\nFileUtils.rm_f(\n File.join(RAILS_ROOT,\"app/controllers/grid_data_controller.rb\"),\n :verbose => true\n)\n\nFileUtils.rm_rf(\n File.join(RAILS_ROOT,\"public/javascripts/j... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up endpoint spec accepted methods\n"
},
{
"from": "human",
"value": "require_relative 'url_builder'\n\nmodule Smartsheet\n module API\n class EndpointSpec\n VALID_METHODS = %i[get put post delete].freeze\n VALID_SPEC_KEYS = %i[headers body_type f... | ruby | chosen |
[
{
"from": "system",
"value": "Add totalitems into search api\n"
},
{
"from": "human",
"value": "module Api\n class SearchController < BaseController\n before_action :authenticate_user!\n respond_to :json\n\n expose(:neurons) {\n NeuronSearch.new(\n q: params[:query]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add worker for fetch developer orgs\n"
},
{
"from": "human",
"value": "class DevelopersController < ApplicationController\n before_action :authenticate_developer!, only: [:profile, :edit]\n before_action :authenticate_user!, only: :show\n before_action :set_devel... | ruby | chosen |
[
{
"from": "system",
"value": "Change default domain title to 'Outline'\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with... | ruby | chosen |
[
{
"from": "system",
"value": "Create seed data for demo\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).\n#\... | ruby | chosen |
[
{
"from": "system",
"value": "Add data to seed file to check the app behavior in development environment\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:see... | ruby | chosen |
[
{
"from": "system",
"value": "Make the dev user an admin and a member of an org\n\nThis means that they will be able to edit anything and will see the \"my\norganisation\" link in the banner header.\n"
},
{
"from": "human",
"value": "if Rails.env.development?\n # Create test user\n #\n unless... | ruby | chosen |
[
{
"from": "system",
"value": "Add simple details post handler\n"
},
{
"from": "human",
"value": "#encoding: utf-8\nrequire 'rubygems'\nrequire 'sinatra'\n#require 'sinatra/reloader'\nrequire 'sqlite3'\n\ndef init_db\n @db = SQLite3::Database.new 'leprosorium.db'\n @db.results_as_hash = true\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the keypath to be accessed from the Instructions::Entry object\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'active_support/core_ext/module/delegation'\n\nrequire_relative 'entry/keypath'\nrequire_relative 'entry/value'\n\nclass ... | ruby | chosen |
[
{
"from": "system",
"value": "Add init attribute for initializer inputs\n"
},
{
"from": "human",
"value": "module Atlas\n class Dataset::DerivedDataset < Dataset\n GRAPH_FILENAME = 'graph.yml'.freeze\n\n attribute :base_dataset, String\n attribute :scaling, Preset::Scaling\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change logging level for prod to info\n"
},
{
"from": "human",
"value": "Dashboard::Application.configure do\n config.eager_load = true\n\n config.log_level = :warn\n config.consider_all_requests_local = false\n config.cache_classes = true\n config.action_contr... | ruby | chosen |
[
{
"from": "system",
"value": "Use a shared example in the axes evaluation specs.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Oga::XPath::Evaluator do\n before do\n @document = parse('<a><b><c></c></b><d></d></a>')\n end\n\n context 'ancestor axis' do\n before do... | ruby | chosen |
[
{
"from": "human",
"value": "Use configurator to override docker host\n"
},
{
"from": "gpt",
"value": "require \"docker\"\n\nDocker.url = ENV['DOCKER_HOST'].presence || \"unix:///var/run/docker.sock\"\n\nif ENV['DOCKER_CERT_PATH'].present?\n cert_path = ENV['DOCKER_CERT_PATH']\n Docker.options... | ruby | chosen |
[
{
"from": "system",
"value": "Fix WickedPdf bug on production\n"
},
{
"from": "human",
"value": "WickedPdf.config ||= {}\n\n\n# WickedPdfHelper patch that fixes issue with including application.css\n# in environments like Heroku where assets.compile option is disabled and\n# it is not acceptable... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant self and spacing\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule Geokit\n module GeocoderControl\n extend ActiveSupport::Concern\n \n included do\n if self.respond_to? :before_action\n self.send :bef... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Hack::ProblemCommand renamed test file\n"
},
{
"from": "human",
"value": "module Hack\n class ProblemCommand < Generator\n argument :name\n\n def copy_support_files\n copy_file \"Gemfile\", \"#{name}/Gemfile\"\n copy_file \"Rakefile\", \"#{name}... | ruby | chosen |
[
{
"from": "system",
"value": "Use Parser::Converter to handle checking of code.\n"
},
{
"from": "human",
"value": "module Sourcify\n module Proc\n module Scanner #:nodoc:all\n class DString < Struct.new(:tag)\n\n # To suppress 'warning: Object#type is deprecated; use Object#class... | ruby | chosen |
[
{
"from": "system",
"value": "Improve output for the rake task that sets effort performance data\n"
},
{
"from": "human",
"value": "# This is a temporary rake task that should be deleted\n# once it has been run in all environments.\n\nrequire \"active_record\"\nrequire \"active_record/errors\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Rephrase garbage collection as a tree walk\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ViewModel::GarbageCollection\n class << self\n def garbage_collect_references!(serialization)\n return unless serialization.has_key?('refere... | ruby | chosen |
[
{
"from": "system",
"value": "Update path for CI database config\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nwhich_config = \"ci/database.#{ENV['DB'] || 'sqlite'}.yml\"\n\nputs \"Copying database configuration for CI: #{which_config}\"\nFileUtils.cp which_config, 'config/database~c... | ruby | chosen |
[
{
"from": "system",
"value": "Use a subclass for configuration specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe CarrierWave::Uploader::Base do\n let(:uploader) { CarrierWave::Uploader::Base }\n\n it 'inserts aws as a known storage engine' do\n uploader.configure do... | ruby | chosen |
[
{
"from": "system",
"value": "Update Spec to match new OrgMod output\n\nCI is failing due to changes in OrgMod's rendered output.\n\n<h1 class=\"title\"> is now rendered as <h1>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'org-ruby'\n\nverify = lambda { |output|\n output.... | ruby | chosen |
[
{
"from": "system",
"value": "Update PalletJack::Tool tests to v0.1.1 API\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'palletjack/tool'\n\ndescribe PalletJack::Tool do\n it 'is a singleton class' do\n expect{ PalletJack::Tool.new }.to raise_error NoMethodError\n expe... | ruby | chosen |
[
{
"from": "system",
"value": "Make the ruby script executable, this will simplify the systemd script as well\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'json'\n\nset :bind, ENV['WEBHOOK_LISTENER_BIND_ADDRESS']\n#'128.111.100.94'\n\n# We can have GET requests do something\nget ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.