conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Test loops through all healthchecks, confirming each is true.\n\n\nFormer-commit-id: ebbfcd8223572296cc0226b45a68dccd324481a0 [formerly 5049e9a44beafce59c3ad6e0d20105359bc65802] [formerly 1066ac4056f721944974b7a04ade196b72d035e8 [formerly deb1409cc3027a85f5572fe5238e667a0e38141...
ruby
chosen
[ { "from": "system", "value": "Upgrade rake to version 12.2.1" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'letter_group/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Remove required version - since it requires the pod to be at that version, spitting out 30 deprecation warnings from various libraries -- woo facebook!\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"TWReverseAuth\"\n s.version = ...
ruby
chosen
[ { "from": "system", "value": "Revert \"leave earlier if out is already done (JRuby)\"\n\nThis reverts commit ba6b0b894e796b2d1a7dc8a95bb5d2e79f662c40.\n" }, { "from": "human", "value": "\nrequire 'logi/logger'\n\nrequire 'fileutils'\n\nclass Logi; end\nclass Logi::Compiler\n include Logi::Logge...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.1.5 to 0.1.6\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'error_data'\n s.version = '0.1.5'\n s.summary = 'Representation of an error as a data structure'\n s.descript...
ruby
chosen
[ { "from": "system", "value": "Fix for Transaction model (conversion to BigDecimal)\n" }, { "from": "human", "value": "module Coinmate::Model\n class Transaction < Base\n \n DEBIT_TRANSACTION_TYPES = %w(SELL QUICK_SELL WITHDRAWAL CREATE_VOUCHER DEBIT)\n \n attr_accessor :transaction_...
ruby
chosen
[ { "from": "system", "value": "Fix public/views folder location problem\n" }, { "from": "human", "value": "require \"sinatra\"\n\nclass Hash\n def require(keys)\n Hash[keys.uniq.map { |k| [k, self[k] ] }]\n end\nend\n\nrequire_relative \"texting\"\nrequire_relative \"websockets\"\nrequire_re...
ruby
chosen
[ { "from": "system", "value": "Update cocaine to capture stdout and stderr\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/benzo/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Spike Grobstein\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Add transformer to the required files for the gem\n" }, { "from": "human", "value": "require \"omnis/version\"\n\nrequire 'omnis/nested_hash_extractor'\n" }, { "from": "gpt", "value": "require \"omnis/version\"\n\nrequire 'omnis/nested_hash_extractor'\nr...
ruby
chosen
[ { "from": "human", "value": "Add HMRC detailed guidance category\n\n'Applying for government graduate schemes' under working/finding-job\n\nhttps://www.pivotaltracker.com/story/show/45110033\n" }, { "from": "gpt", "value": "category = MainstreamCategory.create(\n title: \"Applying for governmen...
ruby
chosen
[ { "from": "system", "value": "Remove unused task to reset the vote counters\n\nThis task was added in commit 2b9b78e38. According to the notes in the\npull request introducing the change:\n\n> If you have had [map validations] in production, you might want to run\n> the rake task votes:reset_vote_counter to...
ruby
chosen
[ { "from": "system", "value": "Fix the bad content type.\n" }, { "from": "human", "value": "# Frozen-string-literal: true\n# Copyright: 2012 - 2017 - MIT License\n# Encoding: utf-8\n\nmodule Jekyll\n module Assets\n class Default\n class Img < Default\n types \"image/webp\", \"ima...
ruby
chosen
[ { "from": "system", "value": "Refactor AccountMigration::Signable spec without mocking\n" }, { "from": "human", "value": "module DiasporaFederation\n describe Entities::AccountMigration::Signable do\n let(:entity) { TestAMSignableEntity.new({}) }\n\n class TestAMSignableEntity < Entity\n ...
ruby
chosen
[ { "from": "system", "value": "Move flipper check into before_action\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass StudentIdentifierTypesController < ApplicationController\n include OrganizationAuthorization\n\n before_action :save_referer, only: [:new]\n\n def index\...
ruby
chosen
[ { "from": "system", "value": "Set configuration to new values\nchanged by the user.\n" }, { "from": "human", "value": "require_dependency \"voice_extension/application_controller\"\n\nmodule VoiceExtension\n class SettingsController < ApplicationController\n before_filter :authenticate_admin...
ruby
chosen
[ { "from": "system", "value": "Add code to skip callback_phase if we renewed an existing authorization token\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\nrequire 'omniauth/strategies/oauth2'\n\nmodule OmniAuth\n module Strategies\n class JoinMe < OmniAuth::Strategies::OAuth2\...
ruby
chosen
[ { "from": "system", "value": "Add headers to GET request\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\nrequire 'multi_json'\n\nmodule OmniAuth\n module Strategies\n class MailUp < OmniAuth::Strategies::OAuth2\n \n option :name, :mailup\n\n option :client_option...
ruby
chosen
[ { "from": "system", "value": "Remove jquery-rails from dependencies to use different jQuery gems\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire './lib/fotoramajs/version'\n\nGem::Specification.new do |s|\n s.name = 'fotoramajs'\n s.version = Fotoramajs::VERSION\n s...
ruby
chosen
[ { "from": "system", "value": "Add instance logger variable to log file searcher expression\n" }, { "from": "human", "value": "module Sidekiq\n module History\n # Heroku have read only file system. See more in this link:\n # https://devcenter.heroku.com/articles/read-only-filesystem\n c...
ruby
chosen
[ { "from": "human", "value": "Add rake task to clean multiple answer parts\n" }, { "from": "gpt", "value": "namespace :clean do\n task :answer_parts, [:questionnaire_id, :question_id] => :environment do |t, args|\n questionnaire = Questionnaire.find(args.questionnaire_id)\n\n where_questio...
ruby
chosen
[ { "from": "system", "value": "Add a test case for new action in account controller.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass AccountsControllerTest < ActionController::TestCase\n test \"should get index\" do\n get :index\n assert_response :success\n assert_not_...
ruby
chosen
[ { "from": "system", "value": "Check for iCalendar format string in body of response.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass CalendarControllerTest < ActionController::TestCase\n test \"renders icalendar\" do\n jim = users(:jim)\n get :index, token: jim.calendar_...
ruby
chosen
[ { "from": "system", "value": "Move page subclass detection into a separate method so extensions can hook it\n" }, { "from": "human", "value": "class Admin::PageTypesController < ApplicationController\n def index\n @page = Page.find(params[:page_id])\n @options = Page.descendants.sort_by(&...
ruby
chosen
[ { "from": "system", "value": "Refactor `count > 0` to `exists?`\n\nFor readability and potentially a bit of performance" }, { "from": "human", "value": "module PublicUid\n class SetPublicUid\n NewUidNotSetYet = Class.new(StandardError)\n PublicUidColumnDoesNotExist = Class.new...
ruby
chosen
[ { "from": "system", "value": "Remove empty hash param from balance method\n" }, { "from": "human", "value": "module QuadrigaCX\n module Private\n # List all account balances\n #\n def balance(params={})\n request(:post, '/balance', params)\n end\n end\nend\n" }, { "fro...
ruby
chosen
[ { "from": "system", "value": "Change to sync time reading for regular time\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Benchmark\n module Perf\n # Clock that represents monotonic time\n module Clock\n # Microseconds per second\n MICROSECONDS_PER_SE...
ruby
chosen
[ { "from": "system", "value": "Update build version and iteration for Graylog 1.2.0-rc.2\n" }, { "from": "human", "value": "name 'graylog'\nmaintainer 'Marius Sturm'\nhomepage 'https://graylog.org'\n\ninstall_dir '/opt/graylog'\nbuild_version '1.2.0-rc.1'\nbuild_iteration 1\n\noverride :ru...
ruby
chosen
[ { "from": "system", "value": "Update CentOS recipe to the latest rev to include setting up the bobo account and sudo\n\n\nFormer-commit-id: 24cfcbdf3d3c53ef1d85485bf55d51619ca7e284" }, { "from": "human", "value": "#Make sure that this recipe only runs on CentOS/RHEL systems\nif platform?(\"redha...
ruby
chosen
[ { "from": "system", "value": "Add player_count to games table, use 8 players\n" }, { "from": "human", "value": "class CreateGames < ActiveRecord::Migration\n def self.up\n create_table :games do |t|\n t.date :date\n\n # using expansions?\n t.boolean :cities\n t.boolean :l...
ruby
chosen
[ { "from": "system", "value": "Fix migration for Rails 5\n\nDirectly inheriting from ActiveRecord::Migration is not supported. We must specify the Rails release the migration was written for." }, { "from": "human", "value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_ta...
ruby
chosen
[ { "from": "system", "value": "Remove comments - not needed" }, { "from": "human", "value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :name\n t.string :email\n t.string :password_digest\n t.string :statement\n t....
ruby
chosen
[ { "from": "system", "value": "Change message for back to normal\n" }, { "from": "human", "value": "module Kuroko2\n module Workflow\n module Notifier\n module Concerns\n class ChatMessageBuilder\n def initialize(instance)\n @instance = instance\n ...
ruby
chosen
[ { "from": "human", "value": "Add some meta test plan examples\n" }, { "from": "gpt", "value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'ruby-jmeter'\n\nclass Test\n def initialize options = {}\n @users = options[:users]\n @ramp = options[:ramp]\n...
ruby
chosen
[ { "from": "system", "value": "Fix log message in migration\n\n[#170193041]\n" }, { "from": "human", "value": "class AddMissingPlatformInfo < ActiveRecord::Migration\n def up\n runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NULL').pluck(:i...
ruby
chosen
[ { "from": "system", "value": "Add project specific service endpoint selector\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Kubernetes\n class ApplicationController < DashboardController\n # authorization_context 'kubernetes'\n # authorization_required\n\n d...
ruby
chosen
[ { "from": "system", "value": "Package version is increase from 0.1.9 to 0.1.10\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-messaging'\n s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP libr...
ruby
chosen
[ { "from": "system", "value": "Change Railties and ActionPack dependency versions\n" }, { "from": "human", "value": "require File.expand_path('../lib/twitter_bootstrap_form_for/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'twitter_bootstrap_form_for'\n s.version = ...
ruby
chosen
[ { "from": "system", "value": "Add check to assessment event core fields migration to prevent migration when assessment core fields are already defined.\n" }, { "from": "human", "value": "class PopulateAssessmentEventCoreFields < ActiveRecord::Migration\n # We must collect the existing core fiel...
ruby
chosen
[ { "from": "human", "value": "Add MilkMaid - an app for Remember the Milk\n" }, { "from": "gpt", "value": "cask :v1 => 'milkmaid' do\n version '0.7.6'\n sha256 'a96702396cf80cff9d447844141648f4bbc967302dccf2a709a5b8664fc42450'\n\n url \"https://github.com/downloads/jgallen23/MilkMaid/MilkMaid-...
ruby
chosen
[ { "from": "system", "value": "Add license to CVE model\n" }, { "from": "human", "value": "class CVE < ActiveRecord::Base\n has_many :references, :class_name => \"CVEReference\"\n has_many :comments, :class_name => \"CVEComment\"\nend\n" }, { "from": "gpt", "value": "# ===GLSAMaker ...
ruby
chosen
[ { "from": "system", "value": "Add physical infra related default collections\n\nNewly added collections are used by physical infra providers when\nperforming inventory refresh.\n" }, { "from": "human", "value": "class ManagerRefresh::InventoryCollectionDefault::PhysicalInfraManager < ManagerRefr...
ruby
chosen
[ { "from": "human", "value": "Add Amazon object storage automation model\n\nAutomation service model required for Amazon object storage manager.\n" }, { "from": "gpt", "value": "module MiqAeMethodService\n class MiqAeServiceManageIQ_Providers_Amazon_StorageManager_S3 < MiqAeServiceManageIQ_Provi...
ruby
chosen
[ { "from": "system", "value": "Add min/max per page to the example" }, { "from": "human", "value": "class PostSearch\n include SearchObject.module(:model, :sorting, :will_paginate)\n\n scope { Post.all }\n\n sort_by :created_at, :views_count, :likes_count, :comments_count\n\n per_page 15\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use new middleware capabilities for OAuth example\n" }, { "from": "human", "value": "# Create custom parser\nclass TwitterSearchParser < Faraday::Response::Middleware\n METADATA_KEYS = [:completed_in, :max_id, :max_id_str, :next_page, :page, :query, :refresh_url, :...
ruby
chosen
[ { "from": "human", "value": "Add a missing Openshift container manager service model\n" }, { "from": "gpt", "value": "module MiqAeMethodService\n class MiqAeServiceManageIQ_Providers_ContainerManager < MiqAeServiceManageIQ_Providers_BaseManager\n expose :container_image_registries, :associat...
ruby
chosen
[ { "from": "system", "value": "Include complete path for the url fields\n" }, { "from": "human", "value": "require 'roar/decorator'\nrequire 'roar/json'\nrequire 'roar/xml'\n\nclass QuestionnaireRepresenter < Roar::Decorator\n include Roar::JSON\n include Roar::XML\n\n self.representation_wrap...
ruby
chosen
[ { "from": "system", "value": "Fix FormalityLevelSerializer using wrong url.\n" }, { "from": "human", "value": "class FormalityLevelSerializer < ApplicationSerializer\n class Reference < ApplicationSerializer\n attributes :iri\n attributes :name\n\n def iri\n urls.license_model_url...
ruby
chosen
[ { "from": "system", "value": "Use subscription_attributes in API subscriptions controller\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SolidusSubscriptions\n module Api\n module V1\n class SubscriptionsController < ::Spree::Api::BaseController\n befo...
ruby
chosen
[ { "from": "human", "value": "Add site column to clients\n" }, { "from": "gpt", "value": "class AddSiteToOauth2Client < ActiveRecord::Migration\n def self.up\n add_column :oauth2_clients, :site, :string\n end\n\n def self.down\n remove_column :oauth2_clients, :site\n end\nend\n" } ]
ruby
chosen
[ { "from": "human", "value": "Add missing factories for affirm payments\n" }, { "from": "gpt", "value": "FactoryBot.define do\n factory :affirm_payment, class: Spree::Payment do\n source_type \"SolidusAffirm::Checkout\"\n state 'checkout'\n end\n\n factory :captured_affirm_payment, class...
ruby
chosen
[ { "from": "system", "value": "Create route adds new collab to project\n" }, { "from": "human", "value": "class CollaborationsController < ApplicationController\nend\n" }, { "from": "gpt", "value": "class CollaborationsController < ApplicationController\n def create\n require_logi...
ruby
chosen
[ { "from": "system", "value": "Add queue to fill paper job\n" }, { "from": "human", "value": "class FillPaperPDFLastModifiedJob < ActiveJob::Base\n # Paper.where(pdf_last_modified: nil).each {|p| FillPaperPDFLastModifiedJob.perform_later(p) }\n def perform(paper)\n session = patron_session\n...
ruby
chosen
[ { "from": "system", "value": "Set quantity default value to 1\n\nThis change was made here: https://github.com/spree/spree/commit/2717e7574d2c230ec113b5f4b19db0bc4f96f1cf\n\n(seems like) they're assuming a value, so we better go with the flow here." }, { "from": "human", "value": "Spree::OrderCo...
ruby
chosen
[ { "from": "system", "value": "Tests: Add ability to SSO user to register on SSO and to log into books\n" }, { "from": "human", "value": "class SSOTestUser\n tracked_attr_accessor :username,\n :password,\n :first_name,\n :last_...
ruby
chosen
[ { "from": "system", "value": "Add initial in_check? method - need to address king_pos\n" }, { "from": "human", "value": "require_relative 'piece' #update accordingly\n\nclass Board\n\n attr_accessor :board\n\n def initialize (white_King_pos = 4, black_King_pos = 60)\n @board = {\n 0 =>...
ruby
chosen
[ { "from": "system", "value": "Include Java dependencies in gemspec.\n" }, { "from": "human", "value": "require 'harbor/ftp/version'\n\nGem::Specification.new do |s|\n s.name = \"harbor-ftp\"\n s.summary = s.description = \"Harbor FTP Server\"\n s.author = \"Sam Smoot\"\n s.homepage = \"https...
ruby
chosen
[ { "from": "system", "value": "Update podspec with new SwiftyJSON version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"AeroGearSyncClient\"\n s.version = \"0.1.0\"\n s.summary = \"An iOS Sync Client for AeroGear Differential Synchronization\"\n s.home...
ruby
chosen
[ { "from": "system", "value": "Update 10gen yum repo name/description\n" }, { "from": "human", "value": "return if skip_unsupported_platform\n\ncase node['platform']\nwhen \"ubuntu\"\n # add the mongodb PPA\n apt_repository \"mongodb\" do\n uri \"http://downloads-distro.mongodb.org/repo/ubun...
ruby
chosen
[ { "from": "system", "value": "Add admin capability to wiki_member? helper\n" }, { "from": "human", "value": "module ApplicationHelper\n\n\tdef wiki_member?(userID, wikiID)\n\t\ttest = UserWiki.where(\"user_id=? and wiki_id=?\", userID, wikiID)\n\t\ttest.length > 0\n\tend\n\nend\n" }, { "...
ruby
chosen
[ { "from": "system", "value": "Fix assign class to requirements.\n\nIf the hacker doesn't have the requirement needed the class it will be\n\"not-accomplished\".\n" }, { "from": "human", "value": "module ApplicationHelper\n def md5 string\n Digest::MD5.hexdigest string\n end\n\n def assign_...
ruby
chosen
[ { "from": "system", "value": "Handle the case where tags is a hash\n" }, { "from": "human", "value": "class Article < ActiveRecord::Base\n\tbelongs_to :user\n\tvalidates :link, :quote, presence: true\n\n\tdef tags_array\n\t\tif self.tags.kind_of?(String)\n\t\t\tif self.tags.scan(/\\-\\-\\-\\s\\[...
ruby
chosen
[ { "from": "system", "value": "Change callback to return true\n" }, { "from": "human", "value": "class Request < ActiveRecord::Base\n before_save :defaultly_unfulfilled\n\n belongs_to :requester, class_name: 'User'\n belongs_to :responder, class_name: 'User'\n\n validates :content, presence: ...
ruby
chosen
[ { "from": "system", "value": "Change capitalization of HSTS includeSubDomains\n\n The https://hstspreload.appspot.com/ warns if HSTS capitalization\n is \"nonstandard\" and wants us to use includeSubDomains.\n It doesn't matter to us, so change the capitalization to eliminate\n the warning.\n\nSigned-of...
ruby
chosen
[ { "from": "system", "value": "Delete http_proxy env variable if empty string\n" }, { "from": "human", "value": "#!/usr/bin/env rackup\n#\n# config.ru for ramaze apps\n# use thin >= 1.0.0\n# thin start -R config.ru\n#\n# rackup is a useful tool for running Rack applications, which uses the\n# Rac...
ruby
chosen
[ { "from": "system", "value": "Add documentation about roles scopes\n" }, { "from": "human", "value": "class Project < ActiveRecord::Base\n include RoleControl::Controlled\n include RoleControl::Ownable\n include RoleControl::Adminable\n include SubjectCounts\n include Activatable\n include...
ruby
chosen
[ { "from": "system", "value": "Include all Spree controller helpers" }, { "from": "human", "value": "# Include this to make Alchemy render within the Solidus layout\nAlchemy::BaseHelper.send :include, Spree::BaseHelper\nAlchemy::BaseHelper.send :include, Spree::StoreHelper\nAlchemy::BaseControlle...
ruby
chosen
[ { "from": "human", "value": "Add KeyStore Explorer 5.0.1 cask\n\nAdd a cask for the KeyStore Explorer, a gui that simplify certificate management for Java developper\n" }, { "from": "gpt", "value": "class KeystoreExplorer < Cask\n url 'http://downloads.sourceforge.net/project/keystore-explorer/...
ruby
chosen
[ { "from": "system", "value": "Convert `ENV[\"EDITOR\"]` to string before check\n\nIn order to avoid `NoMethodError` when it is nil.\n\nFollow up to 82f7dc6178f86e5e2dd82f9e528475a6acee6cd8\n" }, { "from": "human", "value": "require \"active_support\"\nrequire \"rails/secrets\"\n\nmodule Rails\n ...
ruby
chosen
[ { "from": "system", "value": "Reword a couple of tests for clarity\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass GeoHelperTest < ActionView::TestCase\n include GeoHelper\n\n test \"gets ip address\" do\n @request.headers[\"REMOTE_ADDR\"] = \"87.223.138.147\"\n ip = Ge...
ruby
chosen
[ { "from": "system", "value": "Remove CPU alert thresholds for tile caches\n\nThe bug that caused nginx to spin seems to be fixed and this\nis prone to false positives.\n" }, { "from": "human", "value": "name \"tilecache\"\ndescription \"Role applied to all tile cache servers\"\n\ndefault_attribu...
ruby
chosen
[ { "from": "system", "value": "Use the latest libarchive (3.6.0)\n\nUnpin and rely on bumping of omnibus-software to pull in the latest\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "# THIS IS NOW HAND MANAGED, JUST EDIT THE THING...
ruby
chosen
[ { "from": "system", "value": "Use a better error message if gitlab-keys gets an invalid command.\n" }, { "from": "human", "value": "require 'open3'\n\nrequire_relative 'gitlab_config'\nrequire_relative 'gitlab_logger'\n\nclass GitlabKeys\n attr_accessor :auth_file, :key\n\n def initialize\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug on JSON loading in mapnya\n" }, { "from": "human", "value": "module Nyaplot\n class MapPlot < Plot\n include Jsonizable\n define_properties(:extension)\n define_group_properties(:axis_extra_options, [:map_data, :color, :text_color, :text_size, :str...
ruby
chosen
[ { "from": "system", "value": "Load correct file with extra rake tasks\n" }, { "from": "human", "value": "require 'pathname'\n\nif defined? Merb::Plugins\n require Pathname(__FILE__).dirname.expand_path + 'merb_global/base'\n require Pathname(__FILE__).dirname.expand_path + 'merb_global/control...
ruby
chosen
[ { "from": "system", "value": "Fix Tags name searching syntax\n" }, { "from": "human", "value": "class Tag < ActiveRecord::Base\n\n has_and_belongs_to_many :ideas,\n -> { order('rating') },\n join_table: \"idea_tags\"\n\n validates :name, presence: true, uniqueness: {case_sensitive: false...
ruby
chosen
[ { "from": "system", "value": "Fix show settings in admin\n" }, { "from": "human", "value": "require \"activeadmin_settings_cached/engine\"\n\nmodule ActiveadminSettingsCached\n class Configuration\n attr_accessor :model_name, :display\n\n def model_name\n (@model_name ||= 'Settings')...
ruby
chosen
[ { "from": "system", "value": "Make Participation act like a model\n" }, { "from": "human", "value": "module FReCon\n\tclass Participation\n\t\tinclude Mongoid::Document\n\t\tinclude Mongoid::Timestamps\n\t\tinclude Mongoid::Attributes::Dynamic\n\n\t\tbelongs_to :competition\n\t\tbelongs_to :team...
ruby
chosen
[ { "from": "system", "value": "Make concat and destroy interfaces the same\n" }, { "from": "human", "value": "## This is a pretty gross hack until I figure out how make normal\n## ActiveRecord Associations work with a field that's an array of\n## foreign keys. It should be possible but that part ...
ruby
chosen
[ { "from": "system", "value": "Update help command to reflect claim-deploying\n" }, { "from": "human", "value": "require './lib/slack_commands/slack_command'\nclass HelpCommand < SlackCommand\n def self.aliases\n %w(help halp ? h -h -help --help)\n end\n\n def run\n message = <<-help\n`b...
ruby
chosen
[ { "from": "system", "value": "Fix handling of options variables\n" }, { "from": "human", "value": "module Tadpole\n module SectionProviders\n class << self\n def providers\n @providers ||= []\n end\n\n def register_provider(*provs)\n providers.push(*provs)\n ...
ruby
chosen
[ { "from": "system", "value": "Use File.exist? instead of .exists?\n" }, { "from": "human", "value": "module TinyMCE\n module Rails\n class AssetInstaller\n class Copy\n delegate :assets, :target, :manifest, :logger, :logical_path, :with_asset, :to => :@installer\n\n def in...
ruby
chosen
[ { "from": "system", "value": "Add some notes/questions about what to do with Faraday." }, { "from": "human", "value": "require 'vcr/http_stubbing_adapters/common'\nrequire 'faraday'\n\nVCR::VersionChecker.new('Faraday', Faraday::VERSION, '0.6.0', '0.6').check_version!\n\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Fix syntax error caught by Code Climate\n" }, { "from": "human", "value": "module CC\n module Analyzer\n class Filesystem\n\n def initialize(root)\n @root = root\n end\n\n def exist?(path)\n File.exist?(path_for(path))\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Disable validations so migration can pass without problems\n" }, { "from": "human", "value": "class AddFilteredMessageColumnToMessagesTable < ActiveRecord::Migration\n def self.up\n add_column :messages, :message_html, :text\n # generate all the markup for th...
ruby
chosen
[ { "from": "system", "value": "Correct path to zabbix config on windows\n" }, { "from": "human", "value": "#\n# Cookbook Name:: zabbix\n# Attributes:: default\n\ncase node['platform_family']\nwhen 'windows'\n if ENV['ProgramFiles'] == ENV['ProgramFiles(x86)']\n # if user has never logged into...
ruby
chosen
[ { "from": "system", "value": "Move to cloud_v2 ohai attribute tree\n" }, { "from": "human", "value": "default['security_monkey']['basedir'] = '/opt/secmonkey'\n\ndefault['security_monkey']['secret_key'] = nil\ndefault['security_monkey']['password_salt'] = nil\n\ndefault['security_monkey']['postg...
ruby
chosen
[ { "from": "system", "value": "Remove checksum.\nIt's failing the build for no good reason right now (even though they\nmatch)\n" }, { "from": "human", "value": "default['asp_net_core']['installer_url'] = 'https://download.microsoft.com/download/5/5/7/557D02A5-C3D0-4EF6-A570-4F75CD0DA5BF/DotNetCo...
ruby
chosen
[ { "from": "system", "value": "Add a description, summary & homepage to gemspec to avoid warning\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'db_helper/version'\n\nGem::Specificati...
ruby
chosen
[ { "from": "system", "value": "Revert to prod ironbroker url\n" }, { "from": "human", "value": "require 'learn_web/client/event/submission'\n\nmodule LearnWeb\n class Client\n module Event\n attr_reader :client\n\n #IRONBROKER_URL = 'http://ironbroker-v2.flatironschool.com'\n I...
ruby
chosen
[ { "from": "system", "value": "Use OAuth plaintext signature method\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'oauth'\nrequire 'json'\n\nmodule PlanningCenter\n class Client\n SITE = 'https://planningcenteronline.com'\n\n attr_accessor(\n :access_token,\n :a...
ruby
chosen
[ { "from": "system", "value": "Install gems in a shared location.\n\nThis way they can be reused across deployments." }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../capistrano-helpers' if ! defined?(CapistranoHelpers)\n\nCapistranoHelpers.with_configuration do\n\n namespac...
ruby
chosen
[ { "from": "system", "value": "Order uses body instead of query\n" }, { "from": "human", "value": "module CrowdFlower\n class Order\n include Defaults\n attr_reader :job\n \n def initialize(job)\n @job = job\n Order.base_uri CrowdFlower.with_domain(\"/jobs/#{@job.id}/orders...
ruby
chosen
[ { "from": "system", "value": "Fix activity icon on details page when thumbnail is not defined\n\n[#72639394]\n" }, { "from": "human", "value": "# For the purposes of searching and grouping items which appear similar to\n# end users but have different representations in the data model\nmodule Sea...
ruby
chosen
[ { "from": "system", "value": "Destroy address records along with master\n" }, { "from": "human", "value": "module Skr\n\n module BusinessEntity\n\n extend ActiveSupport::Concern\n\n included do\n has_random_hash_code\n has_code_identifier from: 'name'\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix podspec by excluding newly created Package.swift\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"AMPopTip\"\n s.version = \"4.2.0\"\n s.summary = \"Animated popover, great for subtle UI tips and onboarding.\"\n s.des...
ruby
chosen
[ { "from": "system", "value": "Rename task to be more specific\n" }, { "from": "human", "value": "namespace :opencorporates do\n desc \"Get company data from opencorporates\"\n task :get_company_data => :environment do\n require 'open-uri'\n\n oc_url_base = \"http://api.opencorporates.com...
ruby
chosen
[ { "from": "system", "value": "Change request hash to symbols\n" }, { "from": "human", "value": "class Ey::Core::Client\n class Real\n def get_costs(params={})\n request(\n \"url\" => params[\"url\"],\n \"path\" => \"/accounts/#{params[\"id\"]}/costs\"\n )\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Add plugin type metadata and bump version to 0.0.3.\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = \"lita-urban-dictionary\"\n spec.version = \"0.0.2\"\n spec.authors = [\"Jimmy Cuadra\"]\n spec.email ...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warning: redundant to_s in interpolation\n" }, { "from": "human", "value": "class String\n def set_param(placeholder, value)\n self.gsub(\"$[#{placeholder.to_s}]\", value.to_s)\n end\nend\n" }, { "from": "gpt", "value": "class String\n ...
ruby
chosen
[ { "from": "system", "value": "Fix encoding of attributes to be stored in redis\n" }, { "from": "human", "value": "module Carto\n class GCloudUserSettings\n\n REDIS_PREFIX = 'do_settings'\n\n STORE_ATTRIBUTES = [ :service_account, :bq_public_project,\n :gcp_execution_project, :bq_proj...
ruby
chosen