conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use to_shipwire instead of passing parameter\n"
},
{
"from": "human",
"value": "module SolidusShipwire\n module Proxy\n def self.prepended(base)\n klass = Class.new SolidusShipwire::ShipwireObject\n base.const_set 'ShipwireObject', klass\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use common class to manage apache service in beaker job\n\nDepends-on: https://review.opendev.org/#/c/745246/\nChange-Id: Ifae5666938cb38ea2698787f5c01f5b55a704448\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'basic ironic' do\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use `attributes_for` to generate test data\n\nThe `contact` model here isn't used as an object, it's just created to\nhave test values. `attributes_for` can be used to get a hash with the\nsame information. This makes it clear we won't be using the `Contact`\nobject.\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare for the beta release\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'dumbcli/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add new development dependency - rake\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path('lib', File.dirname(__FILE__))\nrequire 'astute/version'\n\nGem::Specification.new do |s|\n s.name = 'astute'\n s.version = Astute::VERSION\n\n s.summary = 'Orche... | ruby | chosen |
[
{
"from": "system",
"value": "Change the url parameter name on assets endpoint\n"
},
{
"from": "human",
"value": "#encoding: UTF-8\nclass Api::Json::AssetsController < Api::ApplicationController\n ssl_required :index, :create, :destroy\n\n def index\n @assets = current_user.assets\n rend... | ruby | chosen |
[
{
"from": "system",
"value": "Allow all users access to the tagging history\n"
},
{
"from": "human",
"value": "class TaggingHistoryController < ApplicationController\n before_action :ensure_user_can_access_tagathon_tools!\n\n def index\n render :index,\n locals: { link_changes: Ta... | ruby | chosen |
[
{
"from": "system",
"value": "Update amazon_auth (chrome driver is default)\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'kindle_manager/version'\n\nGem::Specification.new do |spec... | ruby | chosen |
[
{
"from": "human",
"value": "Add task which fixes dangling repositories\n"
},
{
"from": "gpt",
"value": "desc 'Removes repositories with missing projects'\ntask :fix_dangling_repositories do\n [User, Project].each do |model|\n table_name = model.table_name.to_sym\n name = model.name... | ruby | chosen |
[
{
"from": "human",
"value": "Remove all published news articles from search, then add again\n\nThis so we can put the new search_format_types for government response (née rebuttal) type news.\n"
},
{
"from": "gpt",
"value": "# Re-index all news articles to pick up new, slightly different\n# sear... | ruby | chosen |
[
{
"from": "system",
"value": "Make the hovercards cuke more reliable\n"
},
{
"from": "human",
"value": "When(/^I activate the first hovercard$/) do\n first('.hovercardable').hover\nend\n\nThen(/^I should see a hovercard$/) do\n page.should have_css('#hovercard', visible: true)\nend\n\nWhen(/^I... | ruby | chosen |
[
{
"from": "system",
"value": "Handle asset pipeline enabled vs. disabled scenarios\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule Awe\n module Generators\n class InstallGenerator < ::Rails::Generators::Base\n\n desc \"This generator installs AWE (Artefact Web Extensions) i... | ruby | chosen |
[
{
"from": "system",
"value": "Add order for searched projects\n"
},
{
"from": "human",
"value": "class ProjectRepository < Hanami::Repository\n def find_by_account(account_id, search = {})\n query = projects.where(account_id: account_id)\n query = text_search(query, search[:text])\n qu... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify tests for document preparer\n\nThis will allow us to add tests more easily.\n"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire \"indexer\"\n\ndescribe Indexer::DocumentPreparer do\n describe \"#prepared\" do\n let(:doc_hash) { {\"link\"... | ruby | chosen |
[
{
"from": "system",
"value": "Allow overwriting logger and config\n"
},
{
"from": "human",
"value": "module Appsignal\n class AuthCheck\n ACTION = 'auth'.freeze\n\n attr_reader :config\n attr_accessor :transmitter\n delegate :uri, :to => :transmitter\n\n def initialize(environmen... | ruby | chosen |
[
{
"from": "system",
"value": "Use dynamic method definition in File\n"
},
{
"from": "human",
"value": "module C2y\n class DSL::Context::File\n attr_reader :result\n\n def initialize(path, &block)\n @result = OpenStruct.new(\n path: path\n )\n\n instance_eval(&block)\... | ruby | chosen |
[
{
"from": "human",
"value": "Create Teams class and methods\n"
},
{
"from": "gpt",
"value": "module Githubber\n\tclass Teams\n\t\tinclude HTTParty\n\t\tbase_uri \"https://api.github.com\"\n\n\t\tdef initialize(auth_token)\n\t\t\t@headers = {\n\t\t\t\t\"Authorization\"\t\t=> \"token #{auth_token}... | ruby | chosen |
[
{
"from": "system",
"value": "Make LightProfile include UserAttributes so it can be used similarly to User\n"
},
{
"from": "human",
"value": "module Discordrb::Light\n # Represents the bot account used for the light bot, but without any methods to change anything.\n class LightProfile\n # @... | ruby | chosen |
[
{
"from": "system",
"value": "Update Erlang documentation (19.0, 18.3)\n"
},
{
"from": "human",
"value": "module Docs\n class Erlang < FileScraper\n self.type = 'erlang'\n self.root_path = 'doc/index.html'\n self.links = {\n home: 'https://www.erlang.org/',\n code: 'https://g... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing in of arguments\n"
},
{
"from": "human",
"value": "module Peek\n module Views\n class Host < View\n # Returns Peek::Views::Host\n def initialize\n @hostname = hostname\n end\n\n def hostname\n `hostname`\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Make `rake` run specs and static checks by default\n"
},
{
"from": "human",
"value": "require 'rake'\nbegin\n require 'rspec/core/rake_task'\n task(:spec).clear\n RSpec::Core::RakeTask.new(spec: ['db:create', 'db:test:prepare']) do |t|\n t.verbose = false\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"don't try to load rubypants\"\n\nThis reverts commit a860f857c7050cbfb04f3520101396864e2d4784.\n"
},
{
"from": "human",
"value": "begin\n require 'rdiscount'\nrescue LoadError\n # If RDiscount is not available, use packaged BlueCloth\n $LOAD_PATH.unshift... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Put classes in a separate files\"\n\nThis reverts commit b306c487c810b1909a952a73134e7b4048a567df.\n\nConflicts:\n\tlib/mobile-money/pesapal.rb\n"
},
{
"from": "human",
"value": "module Pesapal\n require 'order_url'\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add method calls to associated collection\n"
},
{
"from": "human",
"value": "require 'her'\n\nmodule Userbin\n class Model\n include Her::Model\n use_api Userbin::API\n\n def initialize(args = {})\n # allow initializing with id as a string\n args... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade savon dependency to 2.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/exactly/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jacob Atzen\"]\n gem.email = [\"jacob@inc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec.description in the gemspec.\n\nOn rubygems.org, our description currently reads:\n\"Write a longer description. Optional.\"\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib... | ruby | chosen |
[
{
"from": "system",
"value": "Make one call for all applicable labels\n"
},
{
"from": "human",
"value": "class PullRequestMonitorHandlers::PathBasedLabeler\n include Sidekiq::Worker\n sidekiq_options :queue => :miq_bot\n\n include BranchWorkerMixin\n\n def perform(branch_id)\n return unle... | ruby | chosen |
[
{
"from": "system",
"value": "Include all files from generated engine if the user wants to make a gem.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'refinerycms-<%= plural_name %>'\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add created_by scope to Auditable concern.\n"
},
{
"from": "human",
"value": "module Auditable\n extend ActiveSupport::Concern\n\n included do\n # Assigns created_by_id and updated_by_id upon included Class initialization\n before_validation :add_created_by_... | ruby | chosen |
[
{
"from": "system",
"value": "Validate poll answers so people can't just add their own\n"
},
{
"from": "human",
"value": "class SimplePollAnswer < Eventable\n\n attr_accessible :answer, :created_by, :person_id, :simple_poll_id\n\n belongs_to :person\n belongs_to :simple_poll\n\n delegate :qu... | ruby | chosen |
[
{
"from": "system",
"value": "Stop results causing error when no results yet\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'open-uri'\nrequire 'nokogiri'\n\nclass FixtureScrapper\n def self.fixtures(url)\n new(url).fixtures\n end\n\n private_class_method :new\... | ruby | chosen |
[
{
"from": "system",
"value": "Add the necessary modular gems as *runtime* dependencies\n"
},
{
"from": "human",
"value": "#-*- mode: ruby -*-\n\nrequire File.expand_path( '../lib/leafy/rack/version', __FILE__ )\n\nGem::Specification.new do |s|\n s.name = 'leafy-rack'\n s.version = Leafy::Rack:... | ruby | chosen |
[
{
"from": "system",
"value": "Return 404 for unrecognized door ids in PUT\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'sinatra'\nrequire_relative './garage'\n\nclass GarageWatch < Sinatra::Application\n # api\n before do\n content_type :json\n response['Access-Contr... | ruby | chosen |
[
{
"from": "system",
"value": "Make conditionals flow more readable in exception notification initializer\n"
},
{
"from": "human",
"value": "airbrake_api_key = Gitorious::Configuration.get(\"airbrake_api_key\")\n\nif airbrake_api_key\n require 'airbrake'\n\n Airbrake.configure do |config|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make use of new framework defaults\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Read the Rails 5.0 rel... | ruby | chosen |
[
{
"from": "system",
"value": "Add .rb to generated migration file\n"
},
{
"from": "human",
"value": "require 'rails/generators/migration'\nrequire 'rails/generators/active_record'\n\nclass MakeFlaggableGenerator < Rails::Generators::Base\n include Rails::Generators::Migration\n\n desc \"Genera... | ruby | chosen |
[
{
"from": "human",
"value": "Add deactivated_at column into user_details\n"
},
{
"from": "gpt",
"value": "class AddDeactivatedAtToUserDetails < ActiveRecord::Migration\n def up\n execute <<-SQL\n DROP VIEW \"1\".user_details;\n\n CREATE VIEW \"1\".user_details AS\n SELECT u.... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor conversion process to numeric\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'bigdecimal'\n\nmodule Thinreports\n module Core\n module Shape\n module TextBlock\n module Formatter\n class Number < Formatt... | ruby | chosen |
[
{
"from": "system",
"value": "Correct field name in responses migration\n"
},
{
"from": "human",
"value": "class CreateResponses < ActiveRecord::Migration\n def change\n create_table :responses do |t|\n t.integer :potential_reply_id, null: false\n t.integer :response_id, null: fals... | ruby | chosen |
[
{
"from": "system",
"value": "Check current user for nil.\n\n"
},
{
"from": "human",
"value": "module Spree\n class DiscourseSsoController < Spree::StoreController\n def sso\n redirect_to login_path unless spree_current_user\n \n sso = SingleSignOn.parse(request.query_string)\... | ruby | chosen |
[
{
"from": "system",
"value": "Use the background job plugin to process bundle_contents"
},
{
"from": "human",
"value": "class Dataservice::BundleContentObserver < ActiveRecord::Observer\n def after_create(bundle_content)\n bundle_content.extract_saveables\n end\n\n def after_save(user)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Remove reverted detailed guides from search index.\n\nThe `20121008103408_revert_detailed_guides_to_draft.rb` data migration\nneglected to remove the no-longer-published detailed guides from the\nsearch index.\n\nThis data migration runs through all the same detailed guides and\... | ruby | chosen |
[
{
"from": "human",
"value": "Add person id to person name -migraatio.\n"
},
{
"from": "gpt",
"value": "class AddPersonIdToPersonName < ActiveRecord::Migration\n def self.up\n add_column :person_names, :person_id, :string\n end\n\n def self.down\n remove_column :person_names, :person_id\... | ruby | chosen |
[
{
"from": "human",
"value": "Add unique index to posts_tags to boost join performace.\n"
},
{
"from": "gpt",
"value": "class AddUniqueIndexToPostsTag < ActiveRecord::Migration\n def self.up\n add_index :posts_tags, [:post_id, :tag_id], :unique => true\n end\n\n def self.down\n remove_in... | ruby | chosen |
[
{
"from": "human",
"value": "Update timestamp of the RPA migration so it runs\n\nThe RPA migration was run in a previous (buggy) form in production, and\nneeds to have its timestamp updated so that the corrected migration will\nrun.\n"
},
{
"from": "gpt",
"value": "class RemoveRpaSpecialistSecto... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"not using Hash.new for Eventable fixes the retain cycle until this\"\n\nThis reverts commit 98f6c18efc422f30b29ecc96b3267b077fcd1f24.\n"
},
{
"from": "human",
"value": "module BubbleWrap\n module Reactor\n # A simple mixin that adds events to your objec... | ruby | chosen |
[
{
"from": "system",
"value": "GoogleFors: Add additional fields to district_meetings\n"
},
{
"from": "human",
"value": "class V1::Google::DistrictMeetingsController < V1::Google::ApplicationController\n FORM_ID = '13Fvsp8EVE-2wgwM1GqeWQD9XXqr15U29HOv5GcoZH8A'\n FORM_FIELDS = %i[volunteer_tasks... | ruby | chosen |
[
{
"from": "system",
"value": "Update 'Completed' message. Colorize status code\n"
},
{
"from": "human",
"value": "require 'action_controller/log_subscriber'\nrequire 'colorize'\nrequire 'awesome_print'\n\nclass ActionController::LogSubscriber\n def start_processing(event)\n return unless log... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to development dependency for gem release task\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/vhdl_doctest/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"tomykaira\"]\n gem.e... | ruby | chosen |
[
{
"from": "system",
"value": "Insert rails_admin inside the app_express gem group on installation\n"
},
{
"from": "human",
"value": "class ExpressAdmin::InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n desc \"mount express_admin engine; mi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix logic of config sample validator test\n\nMore succinct, and the `if value.length` condition would have always evaluated to `true` anyway.\n"
},
{
"from": "human",
"value": "module LiveEditor\n module Cli\n module Validators\n class ConfigSampleValidator... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Clicker to do button down and up\n\nThat fixed some random occurrences of clicks not\ntriggering the action clicked.\n\nFor example clicking a label of a checkbox was not\nmarking the checkbox.\n"
},
{
"from": "human",
"value": "require 'interactor/shared'\n\nmo... | ruby | chosen |
[
{
"from": "human",
"value": "Add enqueue service for canceling jobs and builds\n"
},
{
"from": "gpt",
"value": "module Travis\n module Enqueue\n module Services\n\n class CancelModel\n\n attr_reader :current_user, :source, :target\n\n def initialize(current_user, params)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update ichannel dependency to version 8.0.0.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ifuture/version'\n\nGem::Specification.new do |ge... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Rendering extension.\n\nSigned-off-by: Dane Jensen <7caf4fada912172ae38c6555f73b0fcf5f41c218@rightscale.com>\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Praxis::Extensions::Rendering do\n\n let(:test_class) do\n Struct.new(:me... | ruby | chosen |
[
{
"from": "human",
"value": "Write test for new dropdown menu\n\nI hope this time the whole dropdown thing is solved altogether. I have\nwritten a test for the new design. By using two parameters, everything\nshould be satisfiable.\n\nA entities array with objects and arrays of objects. The objects will\nbe... | ruby | chosen |
[
{
"from": "system",
"value": "Apply styleguide rules to OperationalFieldTest\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass OperationalFieldTest < ActiveSupport::TestCase\n test \"should be invalid without a name\" do\n operational_field = build(:operational_field, name:... | ruby | chosen |
[
{
"from": "system",
"value": "Use the expected class name...\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ProgrammeTest < ActiveSupport::TestCase\n def template_programme\n g = Programme.new(:slug=>\"childcare\", :name=>\"Something\")\n edition = g.editions.first\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use failure_message without the deprecated \"_for_should\".\n"
},
{
"from": "human",
"value": "module RSpec\n module Matchers\n module BuiltIn\n class AndComposite < Composite\n\n def matches?(actual)\n matchers.all? do |matcher|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependencies to the 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 'query_matchers/version'\n\nGem::Specification.new do |spec|\n spec.name... | ruby | chosen |
[
{
"from": "system",
"value": "Add id to initialize parameters for community presenter\n\n"
},
{
"from": "human",
"value": "module Dspace\n\tclass CommunityPresenter\n\t\tdef root_communities\n\t\t\t@root_communities ||= Dspace::Community.where('community_id NOT IN (select child_comm_id from comm... | ruby | chosen |
[
{
"from": "system",
"value": "Raise on not found table.\n"
},
{
"from": "human",
"value": "class CassandraClient\n attr_reader :client, :transport, :tables, :host, :port, :block_for\n\n # Instantiate a new CassandraClient and open the connection.\n def initialize(host = '127.0.0.1', port = 91... | ruby | chosen |
[
{
"from": "system",
"value": "Fix PF reporting active as inactive and inactive as active\n"
},
{
"from": "human",
"value": "module PatronusFati\n module DataModels\n module ReportedAttributes\n def self.included(klass)\n klass.extend RAClassMethods\n klass.property :repor... | ruby | chosen |
[
{
"from": "system",
"value": "Use File.binread instead of File.read(:mode=>'rb')"
},
{
"from": "human",
"value": "require 'tempfile'\n\nrequire_relative '../util/java'\nrequire_relative '../util/which'\n\nmodule Asciidoctor\n module Diagram\n # @private\n module CliGenerator\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust CSP to fix image resizing\n"
},
{
"from": "human",
"value": "# Define an application-wide content security policy\n# For further information see the following documentation\n# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy\n... | ruby | chosen |
[
{
"from": "human",
"value": "Enforce git author name and email\n\nWhen developing on our dev boxes, especially as a new hire it's possible\nto accidentally commit some code using your personal email address.\n\nThis hook prevents this problem by checking to make sure all email\naddresses end with '@causes.c... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Correct issue with double adding user if to auth token\n"
},
{
"from": "human",
"value": "class MoveAuthTokenOutOfUsers < ActiveRecord::Migration\n def up\n create_table :auth_tokens do |t|\n t.string :authentication_token, null: false, limi... | ruby | chosen |
[
{
"from": "human",
"value": "Add data migration to set all tags to live"
},
{
"from": "gpt",
"value": "class SetAllTagsToLive < Mongoid::Migration\n def self.up\n Tag.update_all(state: 'live')\n end\n\n def self.down\n Tag.all.each {|tag|\n tag.unset(:state)\n }\n end\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove trailing whitespace on migration\nFixes Layout/TrailingWhitespace\n"
},
{
"from": "human",
"value": "class MoveSettingToTags < ActiveRecord::Migration[5.0]\n def up\n print \"\\nMigrating...\\n\"\n cached_settings = {}\n total = Character.where.not(... | ruby | chosen |
[
{
"from": "system",
"value": "Add homebrew dependency to git cookbook\n"
},
{
"from": "human",
"value": "maintainer \"Jan Andersson\"\nmaintainer_email \"jan.andersson@gmail.com\"\nlicense \"MIT\"\ndescription \"Install git and configuration\"\nversion \"1.0.0\"... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"fix for service name change in latest misty\"\"\n\nThis reverts commit f5fdd91\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ServiceLayerNg\n module DnsServiceServices\n # This module implements Openstack Designate ... | ruby | chosen |
[
{
"from": "system",
"value": "Update for compatibility with ruby 3.0\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"slugworth/version\"\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem version to 0.0.4\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\nGEMSPEC = Gem::Specification.new do |spec|\n spec.name = 'smartview'\n spec.summary = 'A library for communicating with Hyperion SmartView providers'\n spec.description = %... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Add support all ruby versions\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'sequel'\nrequire 'ditty/services/logger'\n\nif ENV['DATABASE_URL'].nil?\n Ditty::Services::Logger.instance.error 'No database connection set up'\n retur... | ruby | chosen |
[
{
"from": "system",
"value": "Declare requirement on Ruby >= 1.9.2\n\nSee #1\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'scatter'\n\nGem::Specification.new do |spec|\n spec.add_development_depe... | ruby | chosen |
[
{
"from": "system",
"value": "Add 4.6.6 Count the Numbers in a Range\n"
},
{
"from": "human",
"value": "# Count Between\n\n# I worked on this challenge [by myself, with: ].\n\n# count_between is a method with three arguments:\n# 1. An array of integers\n# 2. An integer lower bound\n# 3. An... | ruby | chosen |
[
{
"from": "system",
"value": "Set GEM_PATH to Specinfra config.\n\nOr, Serverspec can't find gems Ansible playbooks install.\n"
},
{
"from": "human",
"value": "require \"spec_helper_#{ENV['SPEC_TARGET_BACKEND']}\"\n\ndescribe package('ruby'), :if => os[:family] == 'darwin' do\n it { should be_i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix mutator registry use from specs\n"
},
{
"from": "human",
"value": "RSpec.describe do\n\n specify 'mutant should not crash for any node parser can generate' do\n Mutant::AST::Types::ALL.each do |type|\n Mutant::Mutator::Registry.lookup(s(type))\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove require option from coveralls in gemspec file\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'formup/version'\n\nGem::Specification.new do |spec|... | ruby | chosen |
[
{
"from": "system",
"value": "Change makefile name from RocksDB to RocksDB/RocksDB to prevent runtime error\n"
},
{
"from": "human",
"value": "require \"mkmf\"\n\ndir_config('rocksdb')\nRbConfig::CONFIG[\"CPP\"] = \"g++ -E -std=gnu++11\"\n\nif have_header('rocksdb/db.h') and have_library('rocksd... | ruby | chosen |
[
{
"from": "system",
"value": "Add dir_config to allow user customization of paths.\n"
},
{
"from": "human",
"value": "require 'mkmf'\n\nhave_library( 'htp', 'htp_connp_create' ) || abort( \"Can't find HTP library.\" )\nhave_header( 'htp/htp.h' ) || abort( \"Can't find htp.h\" )\ncreate_makefile(... | ruby | chosen |
[
{
"from": "system",
"value": "Save all new contributors in one sql transaction\n"
},
{
"from": "human",
"value": "class AddNewContributors\n def call\n contributors = repo.all\n new_contributors = AllContributors.new.call\n\n new_contributors.each do |contributor|\n unless contrib... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency on rake for development\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"gadafi/version\"\n\nGem::Specification.new do |s|\n s.name = \"gadafi\"\n s.version = Gadafi::... | ruby | chosen |
[
{
"from": "system",
"value": "Increase timeout in pubchem service.\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nmodule PubChem\n include HTTParty\n\n debug_output $stderr\n\n def self.get_record_from_molfile(molfile)\n @auth = {:username => '', :password => ''}\n options = {... | ruby | chosen |
[
{
"from": "system",
"value": "Fix params of post_request method.\n"
},
{
"from": "human",
"value": "module Fakturoid\n class Api\n module HttpMethods\n def get_request(path, params = {})\n Request.new(:get, path, self).call(params)\n end\n \n def post_request(params ... | ruby | chosen |
[
{
"from": "human",
"value": "test/cli: Add tests for `kbsecret types`\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"helpers\"\n\n# Tests for KBSecret::CLI::Command::Types\nclass KBSecretCommandTypesTest < Minitest::Test\n include Helpers\n include Helpers::CLI\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for alternate HFM filter syntax on Essbase provider\n\nThe Essbase and HFM providers use a different syntax for filters.\nFor the three filters that are common (Children, Descendants, and\nBase), we support the alternate HFM syntax on the Essbase provider.\n"
},
... | ruby | chosen |
[
{
"from": "human",
"value": "Add a rake task to validate all the link sets\n\nIt turns out that the schemas are not at all descriptive of the data\nwe actually have, because we haven't been validating patch links requests.\n\nI'm going to raise a separate PR to update the schemas so that they are\nin sync a... | ruby | chosen |
[
{
"from": "system",
"value": "Make Pango integration test work with older introspection data\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire 'gir_ffi_test_helper'\n\nrequire 'gir_ffi'\n\nGirFFI.setup :Pango\n\n# Tests generated methods and functions in the Pango namespace.\ndescribe ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a RuboCop violation in SimpleAD test\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'json'\n\ndescribe 'AWS::DirectoryService' do\n let(:simple_ad_template) do\n ::Convection.template do\n directoryservice_simple_ad 'SimpleActiveDirec... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for checking that the creator/updater fields are set before validation.\n"
},
{
"from": "human",
"value": "class Post < ActiveRecord::Base\n stampable :stamper_class_name => :person\n has_many :comments\n \n # override destroy to get soft delete like ac... | ruby | chosen |
[
{
"from": "system",
"value": "Add required `wrapper_options` to input method\n\nSimple Form gem now requires that any implementation of the input\nmethod now accepts a `wrapper_options` argument. The method definition\nwithout the argument is deprecated and will be removed in the next\nSimple Form version. ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"fix migration for postgresql\"\n\nThis reverts commit 653731f7c0a0b1d40e20bc1ac10dc3b203a3de5e.\n"
},
{
"from": "human",
"value": "class AddUploadsCountToComments < ActiveRecord::Migration\n def self.up\n add_column :comments, :uploads_count, :integer, ... | ruby | chosen |
[
{
"from": "system",
"value": "Change migration to avoid setting a \"not null\" constraint on the name column while some records still have a null value there.\n\nThis should fix a MySQL error while deploying.\n"
},
{
"from": "human",
"value": "class ChangeNameNotNullInUsers < ActiveRecord::Migra... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake dependency to gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'paperclip-watermark/version'\n\nGem::Specification.new do |gem|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add format! to json initializer\n"
},
{
"from": "human",
"value": "require_relative 'reader'\n\nmodule JsonResume\n\tclass << self\n\t\tdef new(json_input)\n\t\t\tJsonResume::Core.new(json_input)\n\t\tend\n\tend\n\n\tclass Core\n\t\tattr_accessor :reader\n\t\t\n\t\t... | ruby | chosen |
[
{
"from": "system",
"value": "Make control flow more obvious by getting rid of multiple returns\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule Mongoid #:nodoc\n module Fields #:nodoc:\n\n module Internal #:nodoc:\n end\n\n # This module maps classes used in field type def... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the name argument when calling exit_if_cannot_access\n"
},
{
"from": "human",
"value": "require 'orats/commands/common'\nrequire 'orats/commands/new/ansible'\nrequire 'orats/commands/new/rails'\nrequire 'orats/commands/new/server'\n\nmodule Orats\n module Co... | ruby | chosen |
[
{
"from": "system",
"value": "Handle leading whitespace in airport search without throwing an error. MA-301"
},
{
"from": "human",
"value": "class AirportsController < ApplicationController\n \n def search\n if !params[:airport].blank?\n @airports = Rails.cache.fetch(\"airport-search-#... | ruby | chosen |
[
{
"from": "system",
"value": "Add before filter to articles controller\n"
},
{
"from": "human",
"value": "class ArticlesController < ApplicationController\n\n def index\n @articles = Article.all\n end\n\n def new\n @article = Article.new\n end\n\n def create\n @article = Article.ne... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.