conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add ability to set logger attributes that exist in the Ruby Logger\n\n - previously, I manually set the level logger attr\n - instead, we'd like to support setting other attributes that\n already exist in the Ruby Logger\n - this way, a user of this gem could swap out any log...
ruby
chosen
[ { "from": "system", "value": "Change version to 3.0.0 for Swift 3\n\nIncludes switching required version of `Embassy`" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'EnvoyAmbassador'\n spec.version = '0.0.1-alpha-3'\n spec.summary = 'Lightweight web f...
ruby
chosen
[ { "from": "system", "value": "Fix unhandled myplet form editing extension\n" }, { "from": "human", "value": "class MypletsController < MyplaceonlineController\n def show_index_footer\n false\n end\n \n def show_add\n false\n end\n \n def after_create_or_update\n set_category_obj\...
ruby
chosen
[ { "from": "system", "value": "Upgrade Myo Connect.app to v0.14.0\n" }, { "from": "human", "value": "cask :v1 => 'myo-connect' do\n version '0.9.0'\n sha256 '831d997d2ca0624d01da4bba39ba859da5dfd5f20d793a484b24c978ebd7dbe3'\n\n # amazonaws.com is the official download host per the vendor homep...
ruby
chosen
[ { "from": "human", "value": "Add ProvisionQL QuickLook plugin v1.0.0\n" }, { "from": "gpt", "value": "class Provisionql < Cask\n url 'https://github.com/ealeksandrov/ProvisionQL/releases/download/1.0.0/ProvisionQL.zip'\n homepage 'https://github.com/ealeksandrov/ProvisionQL'\n version '1.0.0'...
ruby
chosen
[ { "from": "system", "value": "Fix homepage to use SSL in Web Sharing Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'web-sharing' do\n version '1.0'\n sh...
ruby
chosen
[ { "from": "system", "value": "Create a blank README file\n" }, { "from": "human", "value": "# Delete all unnecessary files\nremove_file \"README\"\nremove_file \"public/index.html\"\nremove_file \"public/favicon.ico\"\nremove_file \"public/robots.txt\"\nremove_file \"public/images/rails.png\"\n\...
ruby
chosen
[ { "from": "system", "value": "Include docker::lxc even when node['docker']['install_type'] == 'package'\n" }, { "from": "human", "value": "case node['platform']\nwhen 'debian', 'ubuntu'\n include_recipe 'apt'\n package 'apt-transport-https'\n package 'bsdtar'\n sysctl_param 'net.ipv4.ip_forw...
ruby
chosen
[ { "from": "system", "value": "Create a location where database drivers can be downloaded\n" }, { "from": "human", "value": "#\n# Copyright 2012, Peter Donald\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License...
ruby
chosen
[ { "from": "system", "value": "Fix FC002: Avoid string interpolation where not required\n\nSigned-off-by: Jacques Marneweck <381be0093c78dc23f52ac7a2357c8db4d86635b1@powertrip.co.za>\n" }, { "from": "human", "value": "#\n# Cookbook Name:: dsh\n# Recipe:: default\n#\n# Copyright 2012, Jacques Marn...
ruby
chosen
[ { "from": "system", "value": "Allow multiple receivers to accept a single text message\n" }, { "from": "human", "value": "module TextMessage::Receivable\n RECEIVERS = [ AttendanceReceiver, RegistrationReceiver ]\n\n private\n def receive\n receiver_class.new(self).receive\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add missing return comment to activate spawns clock service.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule Clock\n class ActivateSpawns\n LIMIT = 256\n\n # Activates spawns due to be activated.\n #\n # @return [void]\n de...
ruby
chosen
[ { "from": "system", "value": "Return true/false depending on delete response status code\n" }, { "from": "human", "value": "module QualtricsAPI\n class EventSubscription < BaseModel\n values do\n attribute :id, String\n attribute :scope, String\n attribute :topics, String\n ...
ruby
chosen
[ { "from": "system", "value": "Add ply relation to plaible" }, { "from": "human", "value": "require \"pliable/version\"\nrequire \"pliable/ply\"\n\nmodule Pliable\n def self.included(base)\n base.send(:include, Pliable::Ply)\n super\n end\nend\n" }, { "from": "gpt", "value": "...
ruby
chosen
[ { "from": "system", "value": "Refactor tag determination in Podspec so it's easier to update in the future" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"MBContactPicker\"\n s.version = \"0.0.1\"\n s.summary = \"A contact picker that looks like the one ...
ruby
chosen
[ { "from": "system", "value": "Clean urls and release 0.0.5\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NBNPhotoChooser\"\n s.version = \"0.0.4\"\n s.platform = :ios\n s.summary = \"NBNPhotoChooser is an example implementation of the Tumblr Photo...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for beyerdynamic Virtual Studio.\n" }, { "from": "human", "value": "cask 'beyerdynamicvs' do\n version '1.011'\n sha256 '639cfe1fa96026042030455afbaaa518f11522c3ebd86cdbde16e61af7477e15'\n\n url 'http://www.beyerdynamic.com/fileadmin/edit...
ruby
chosen
[ { "from": "system", "value": "Migrate associated accounts when changing Bank model to inherit from Person.\n" }, { "from": "human", "value": "class LegacyBank < ActiveRecord::Base\n set_table_name 'banks'\nend\n\nclass BankNowInheritsFromPerson < ActiveRecord::Migration\n def up\n add_colum...
ruby
chosen
[ { "from": "system", "value": "Fix merit order download action\n" }, { "from": "human", "value": "class Data::MeritController < Data::BaseController\n layout 'application'\n\n def index\n end\n\n def download\n\n moi = Qernel::Plugins::MeritOrder::MeritOrderInjector.new(@gql.future_graph, ...
ruby
chosen
[ { "from": "system", "value": "Fix booking update hook for debit invoices.\n" }, { "from": "human", "value": "class DebitInvoice < Invoice\n # Accounts\n # ========\n def self.direct_account\n Account.find_by_code(\"1100\")\n end\n\n def self.available_contra_accounts\n Account.by_type...
ruby
chosen
[ { "from": "system", "value": "Use a lock in CreateGame service\n" }, { "from": "human", "value": "class CreateGame\n AI_NAMES = [\n 'Bill',\n 'John',\n 'Sally',\n 'Andy',\n 'Joseph',\n \"Tony\",\n \"Jim\",\n \"Ella\",\n \"Amy\",\n \"Eric\",\n ]\n\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Update for new Bootstrap Frontend in Spree 3.0.0.beta\n" }, { "from": "human", "value": "Deface::Override.new(\n :virtual_path => \"spree/admin/users/index\",\n :name => \"referral_code_header\",\n :insert_before => \"[data-hook='admin_users_index_headers'] th:nt...
ruby
chosen
[ { "from": "system", "value": "Fix the bug that the plugin doesn't run when you are not logged in" }, { "from": "human", "value": "PostsController.class_eval do\n\n HIGHLIGHTS_TYPES = { most_liked_post: 'most_liked_post' }\n\n def highlight_post\n begin\n post = Post.find(params[:post_i...
ruby
chosen
[ { "from": "system", "value": "Fix index on parameter values" }, { "from": "human", "value": "class CreateDiscernerParameterValues < ActiveRecord::Migration\n def change\n create_table :discerner_parameter_values do |t|\n t.string :name\n t.string :database_name\n t.datetime :d...
ruby
chosen
[ { "from": "human", "value": "Add Ed Robinson's network partition check\n\nThis wasn't synced over from the monolithic repo\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n#\n# RabbitMQ Network Partitions Check\n# ===\n#\n# This plugin checks if a RabbitMQ network partition has occured.\n# ...
ruby
chosen
[ { "from": "system", "value": "Add blank line in PublishingAPIUpdateTypes\n\nTo improve readability.\n" }, { "from": "human", "value": "module PublishingAPIUpdateTypes\n UPDATE_TYPES = %w(minor major republish).freeze\n def check_update_type!(update_type)\n return if update_type.nil?\n ra...
ruby
chosen
[ { "from": "system", "value": "Add type and value_for attributes to user hash\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ActivityValuesModel\n extend ActiveSupport::Concern\n\n # rubocop:disable Style/ClassVars\n @@default_values = HashWithIndifferentAccess.new\...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec to use README.md\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails-pipeline/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n...
ruby
chosen
[ { "from": "system", "value": "Allow simplecov to use latest release\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rails-settings/version'\n\nGem::Specification.new do |ge...
ruby
chosen
[ { "from": "system", "value": "Reduce backup frequency to daily.\n\nRefs https://github.com/cyclestreets/toolkit/issues/223#issuecomment-20918204\n" }, { "from": "human", "value": "#\n# Cookbook Name:: toolkit-backups\n# Recipe:: default\n#\n# Copyright 2011, Cyclestreets Ltd\n\nbackup_directory ...
ruby
chosen
[ { "from": "system", "value": "Add bookmark breaking test for next time\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"adding an appointment\" do\n\n include Rack::Test::Methods\n\n def app\n CQalendaRS::Command::Server\n end\n\n describe \"GET /\" do\n it \"retu...
ruby
chosen
[ { "from": "system", "value": "Check if models_config exists to support migrations of existing systems.\n" }, { "from": "human", "value": "# update settings for searchable models\nif ActiveRecord::Base.connection.tables.include?('settings')\n models_current = Models.searchable.map(&:to_s)\n mod...
ruby
chosen
[ { "from": "system", "value": "Change migration file for Heroku DB creation\n" }, { "from": "human", "value": "class CreateServices < ActiveRecord::Migration[5.0]\n def change\n create_table :services do |t|\n t.string :user_id\n t.jsonb :servicedata\n\n t.timestamps\n end\n...
ruby
chosen
[ { "from": "system", "value": "Use comment instead of \"protected\" to denote internal method\n" }, { "from": "human", "value": "require 'dotenv/parser'\nrequire 'dotenv/environment'\n\nmodule Dotenv\n def self.load(*filenames)\n with(*filenames) { |f| Environment.new(f).apply if File.exist?(...
ruby
chosen
[ { "from": "human", "value": "Fix for rspec-rails and rails 4.2.5.1\n\nFixes NoMethodError: Undefined Method `cache`\n\nThis can be removed as soon as doing so doesn't cause test errors.\nSee https://github.com/rspec/rspec-rails/issues/1532\n" }, { "from": "gpt", "value": "# Fix for rspec-rails a...
ruby
chosen
[ { "from": "human", "value": "Fix unescape of parameter keys.\n" }, { "from": "gpt", "value": "if defined?(::Encoding)\n require \"rack/utils\"\n\n module Rack::Utils\n def unescape(s, encoding = Encoding::UTF_8)\n decoded_string = URI.decode_www_form_component(s, encoding)\n decod...
ruby
chosen
[ { "from": "system", "value": "Fix homepage and appcast to use SSL in TileMill Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n" }, { "from": "human", "value": "cask :v1 => 'tilemill' do\n version '0.10...
ruby
chosen
[ { "from": "system", "value": "Webstorm: Merge stanzas from versions cask (deleted)" }, { "from": "human", "value": "cask :v1 => 'webstorm' do\n version '11.0.0'\n sha256 'aecc26c2cb95d610bcb60d1224b4f8e80031cd8dd1430256173ecc35f7464f40'\n\n url \"https://download.jetbrains.com/webstorm/WebSto...
ruby
chosen
[ { "from": "human", "value": "Test generated Nginx for real_ip_header support\n\nTest to ensure that when real_ip_header is set, we get Nginx configuration\nfor it, and when it's not, we don't.\n" }, { "from": "gpt", "value": "require_relative '../../../../spec_helper'\n\ndescribe 'govuk::node::s...
ruby
chosen
[ { "from": "system", "value": "Add refactored concatenate arrays solution\n" }, { "from": "human", "value": "# Concatenate Two Arrays\n\n# I worked on this challenge by myself.\n\n\n# Your Solution Below\n\ndef array_concat(array_1, array_2)\n # Your code here\n if (array_1.length == 0) && (arr...
ruby
chosen
[ { "from": "system", "value": "JariBakken: Raise ArgumentError on invalid modifier key.\n\nr15194\n" }, { "from": "human", "value": "module Selenium\n module WebDriver\n\n # @api private\n class Keyboard\n\n def initialize(bridge)\n @bridge = bridge\n end\n\n def send...
ruby
chosen
[ { "from": "human", "value": "Add a test for Adapter.factor\n" }, { "from": "gpt", "value": "require 'spec_helper'\nmodule Alf\n describe Adapter, \".factor\" do\n\n subject{ Adapter.factor(conn_spec) }\n\n context \"on a path\" do\n let(:conn_spec){ Path.dir }\n\n it{ should be_...
ruby
chosen
[ { "from": "system", "value": "Add `small` size to thumbnails\n\nThis is the size that's actually used when generating the options dialog.\n" }, { "from": "human", "value": "Spree::OptionValue.class_eval do\n\n has_attached_file :image,\n :styles => { mini: '32x32>', normal: '128x128>'...
ruby
chosen
[ { "from": "system", "value": "Add proxy to all insecure urls of iTunes response\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Api::V1::TracksController < ApplicationController\n respond_to :xml, :json\n\n def search\n itunes = ITunes::Client.new\n songs = itunes...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary references to \"self\"\n\nNot sure how those snuck in there.\n" }, { "from": "human", "value": "class LoadProfilesController < ResourceController\n RESOURCE_ACTIONS = %i(show edit update destroy)\n\n before_filter :fetch_load_profile, only: self...
ruby
chosen
[ { "from": "system", "value": "Make OrganisationsController use the 'setup' layout.\n" }, { "from": "human", "value": "class OrganisationsController < ApplicationController\n skip_before_filter :ensure_organisation_exists\n skip_before_filter :ensure_authenticated\n skip_before_filter :ensure_...
ruby
chosen
[ { "from": "system", "value": "Update Sphinx to 2.2.4 release\n" }, { "from": "human", "value": "default[:sphinx] = {\n :versions => {\n '2.2.3-beta' => '/usr/local/sphinx-2.2.3',\n '2.1.9-release' => '/usr/local/sphinx-2.1.9',\n '2.0.10-release' => '/usr/local/sphinx-2.0.10'\n },\n :...
ruby
chosen
[ { "from": "system", "value": "Update the GDS::SSO template to use external_url_for\n\nThe oauth_root_url needs to be the external URL for Signon, so use the\nnew external_url_for method of Plek.\n" }, { "from": "human", "value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n c...
ruby
chosen
[ { "from": "system", "value": "Handle instance_methods containing Symbols in Ruby >= 1.9\n" }, { "from": "human", "value": "module ResourcesController\n # extension for any module that is used as an Actions module.\n #\n # After extending the module (say 'MyActions'), instead of doing this:\n ...
ruby
chosen
[ { "from": "system", "value": "Throw an exception if Psych can't read the template\n" }, { "from": "human", "value": "module StackMaster::TemplateCompilers\n class Yaml\n\n def self.compile(template_file_path)\n template_body = File.read(template_file_path)\n JSON.dump(YAML.load(tem...
ruby
chosen
[ { "from": "system", "value": "Update RSpec and Rake versions\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'asciimath/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix bug with concatination xml with length of packet\n" }, { "from": "human", "value": "module EPPClient\n module HostmasterConnection\n def send_frame(xml)\n @sent_frame = xml\n @socket.write([xml.bytesize + 4].pack(\"N\") + xml)\n sent_frame_to_...
ruby
chosen
[ { "from": "system", "value": "Use the version from the root 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 \"blinkbox/rubocop\"\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add additional solution to concatenate challenge\n" }, { "from": "human", "value": "# Concatenate Two Arrays\n\n# I worked on this challenge [by myself].\n\n\n# Your Solution Below\n\ndef array_concat(array_1, array_2)\n array_1 + array_2\nend\n\n\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add feature toggle for Connect+Learn homepage\n" }, { "from": "human", "value": "module OpenFoodNetwork\n class FeatureToggle\n def self.enabled? feature\n features[feature]\n end\n\n private\n\n def self.features\n {}\n end\n end\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Add support for osx 10.10\n\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SwiftEventBus'\n s.version = '2.2.0'\n s.license = 'MIT'\n s.summary = 'Publish/subscribe event bus optimized for iOS'\n s.homepage = 'https://github.com/cesarferrei...
ruby
chosen
[ { "from": "system", "value": "Convert Proxy Port explicitly to int!\n" }, { "from": "human", "value": "class HttpService < Versioneye::Service\n\n def self.fetch_response url, timeout = 60\n\n env = Settings.instance.environment\n proxy_addr = GlobalSetting.get env, 'proxy_addr'\n prox...
ruby
chosen
[ { "from": "system", "value": "Remove N+1 fetching order and li adjustments\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# This class will be used to get Tax Adjustments related to an order,\n# and proceed basic calcultation over them.\n\nclass OrderTaxAdjustmentsFetcher\n ...
ruby
chosen
[ { "from": "system", "value": "Update author info in gem spec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"short_circuit/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.2.1 to 0.2.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'set_attributes'\n s.version = '0.2.1'\n s.summary = \"Set an object's attributes from an object or hash with a...
ruby
chosen
[ { "from": "system", "value": "Make redcarpet version slightly less specific\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"contentful_rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specifi...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement from ~> 1.19.1 to ~> 1.22.1\n\nUpdates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop/rubocop/releases)\n- [Changelog](https://github.com/rubocop/rubocop/bl...
ruby
chosen
[ { "from": "system", "value": "Add a basic level of testing to the project\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Convert do\n before :each do\n @convert = Convert.new(\"1.2.3\", \"Berksfile.stub\")\n end\n\n describe \"#new\" do\n it \"takes two parameters ...
ruby
chosen
[ { "from": "system", "value": "Add spec for Devise configuration\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rails_app_helper'\n\nRSpec.describe 'rails_app project' do\n describe 'Rails.root' do\n it 'contains project path in sub directory' do\n expect(Rails.root.t...
ruby
chosen
[ { "from": "system", "value": "Set the Timezone to EST so it\\'s a least right for me :-p\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, o...
ruby
chosen
[ { "from": "system", "value": "Include docs in static assets to be served\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\n...
ruby
chosen
[ { "from": "system", "value": "Reduce retention time from 2 weeks to 3 days\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production....
ruby
chosen
[ { "from": "system", "value": "Test add for variables in config\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire \"rails\"\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"active_job/railtie\"\n# require \"active_record/railt...
ruby
chosen
[ { "from": "system", "value": "Allow workflows to be embedded in iframes.\n\nRails 4 needs the X-Frame-Options header to be set to \"ALLOWALL\" for this.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile...
ruby
chosen
[ { "from": "system", "value": "Fix test name in PathnameExistenceTest\n\nThis was likely a copy-paste typo from\nhttps://github.com/rails/rails/blob/00fb4e6bbdeefe3b4ffc48a6c74f593666f7d594/activesupport/test/core_ext/object/blank_test.rb#L32\nintroduced in 1a14bcb8cd3c9838a2d441180f5e99d34835c940\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add columns for event migration table\n" }, { "from": "human", "value": "class CreateEvents < ActiveRecord::Migration[5.0]\n def change\n create_table :events do |t|\n\n t.timestamps\n end\n end\nend\n" }, { "from": "gpt", "value": "class Cr...
ruby
chosen
[ { "from": "system", "value": "Update rubocop dependency version to >= 0.48.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 \"onkcop/version\"\n\nGem::Specification.new do |spec|\n...
ruby
chosen
[ { "from": "system", "value": "Remove id from api keys\n" }, { "from": "human", "value": "require 'json'\n\nmodule Carto\n module Api\n class ApiKeyGrantsPresenter\n def initialize(api_key_grants)\n @api_key_grants = api_key_grants\n end\n\n def to_poro\n return [...
ruby
chosen
[ { "from": "system", "value": "Remove reference to jfrog repository\n" }, { "from": "human", "value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ht...
ruby
chosen
[ { "from": "system", "value": "Use a local variable to avoid duplicate method calls" }, { "from": "human", "value": "module DataMapper\n class Relationship\n\n module Iterator\n\n # Iterate over the loaded domain objects\n #\n # TODO\n #\n # remember relationships to ...
ruby
chosen
[ { "from": "system", "value": "Fix for typo in constant name\n" }, { "from": "human", "value": "require 'devise/strategies/authenticatable'\n\nmodule Devise\n module Strategies\n class LdapAuthenticatable < Autheneticatable\n\n # Tests whether the returned resource exists in the database...
ruby
chosen
[ { "from": "system", "value": "Remove spec for .d now that it's been taken out\n" }, { "from": "human", "value": "require 'resume/decoder'\n\nmodule Resume\n RSpec.describe Decoder do\n let(:encoded_string) { '3|\\|c0D3d 1N|=0' }\n let(:decoded_string) { 'Encoded info' }\n\n before do\n...
ruby
chosen
[ { "from": "system", "value": "Fix problem with rspec double on ruby192.\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe MetricFu::Reporter do\n\n context 'given a single formatter' do\n before do\n @formatter = double('formatter')\n @reporter = Reporter.new(@...
ruby
chosen
[ { "from": "system", "value": "Add a spec for validation error message\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"password\" do\n it \"should accept nil password\" do\n u = User.new(:name => 'alice', :password => nil)\n u.should be_valid\n end\n \n it \"shoul...
ruby
chosen
[ { "from": "human", "value": "Add ChefSpec For Agent Recipe\n\nAdd ChefSpec coverage for Agent Recipe\n" }, { "from": "gpt", "value": "require 'spec_helper'\nrequire 'json'\n\ndescribe 'ossec::agent' do\n let(:data_bags_path) { File.expand_path('../../../../test/integration/default/data_bags', _...
ruby
chosen
[ { "from": "system", "value": "Update ruby version in capistrano config\n" }, { "from": "human", "value": "# config valid only for Capistrano 3.1\nlock '3.2.1'\n\nset :application, 'photo-album'\nset :repo_url, 'git@github.com:RobinClowers/photo-album.git'\nset :puma_role, :web\nset :assets_roles...
ruby
chosen
[ { "from": "system", "value": "Create drops show and maps index\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n root 'maps#index'\n\n resources :maps, only: [:index]\n\n get \"/login\", :to => 'sessions#new', :as => 'login'\n get \"/auth/auth0/callback\" => \"auth0#callb...
ruby
chosen
[ { "from": "human", "value": "Add util to merge identical party memberships\n" }, { "from": "gpt", "value": "module Hdo\n module Utils\n class PartyMembershipMerger\n def duplicates\n dups = {}\n\n reps = Representative.joins(:party_memberships).where('(select count(*) from...
ruby
chosen
[ { "from": "system", "value": "Add fold headers for sauce connect start/stop operations\n" }, { "from": "human", "value": "require 'travis/build/addons/base'\n\nmodule Travis\n module Build\n class Addons\n class SauceConnect < Base\n SUPER_USER_SAFE = true\n TEMPLATES_PATH...
ruby
chosen
[ { "from": "human", "value": "Return a list of RegisteredMobile objects\n" }, { "from": "gpt", "value": "module VoipfoneClient\n\tclass RegisteredMobile < Client\n attr_accessor :number, :name\n\n class << self\n def all\n r = RegisteredMobile.new\n request = r.browser.ge...
ruby
chosen
[ { "from": "system", "value": "Editor: Implement to_s for pretty messages in the log. [ci skip]\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire 'watch_tower/appscript'\n\nmodule WatchTower\n module Editor\n module BaseAppscript\n def self.included(base)\n b...
ruby
chosen
[ { "from": "human", "value": "Add line parsing given column sizes\n" }, { "from": "gpt", "value": "\n\n\ncolumn_sizes = [19, 16, 25, 13, 20]\nline = \" 2658187 113577 7-JAN-2008 17:52:09.0000 5 333 \"\n\n\n\ndef extract_values line, column_sizes\...
ruby
chosen
[ { "from": "system", "value": "Remove the explicit `return false` statement from the current_user helper if there is no user to return. It will return nil without this anyway, which makes sense." }, { "from": "human", "value": "class ActionController::Base\n def self.require_user(options = {})\n...
ruby
chosen
[ { "from": "system", "value": "Fix comments and ruby < 2.0 compatibility\n" }, { "from": "human", "value": "require 'image_optim/worker'\nrequire 'image_optim/option_helpers'\n\nclass ImageOptim\n class Worker\n # http://www.kokkonen.net/tjko/projects.html\n class Jpegrecompress < Worker\n...
ruby
chosen
[ { "from": "system", "value": "Make sure Tilt is required before the preprocessor is defined.\n" }, { "from": "human", "value": "require 'sprockets'\nrequire 'action_view'\nrequire 'action_view/helpers'\n\nmodule JqueryTmplRails\n class JqueryTemplate < Tilt::Template\n include ActionView::He...
ruby
chosen
[ { "from": "system", "value": "Add complete action for Fulfillment endpoint\n" }, { "from": "human", "value": "module ShopifyAPI\n class Fulfillment < Base\n self.prefix = \"/admin/orders/:order_id/\"\n\n def cancel; load_attributes_from_response(post(:cancel, {}, only_id)); end\n end\nen...
ruby
chosen
[ { "from": "human", "value": "Update reply_id primary and foreign keys to bigint\n" }, { "from": "gpt", "value": "class ChangeReplyIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :replies, :id, :bigint\n\n change_column :replies, :reply_id, :bigint\n change_column :no...
ruby
chosen
[ { "from": "system", "value": " Fix translation for Add a New Policy Button\n" }, { "from": "human", "value": "class ApplicationHelper::Toolbar::MiqPoliciesCenter < ApplicationHelper::Toolbar::Basic\n button_group('miq_policy_vmdb', [\n select(\n :miq_policy_vmdb_choice,\n nil,\n ...
ruby
chosen
[ { "from": "system", "value": "Remove respond_to :json per error messages\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery wi...
ruby
chosen
[ { "from": "system", "value": " Update author name for newer bundler\n\n it will check the value on the gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"blog/version\"\n\n# Describe your gem and declare its de...
ruby
chosen
[ { "from": "system", "value": "Update podspec to new tag version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'DeclarativeLayout'\n s.version = '0.2.0'\n s.summary = 'A declarative, expressive and efficient way to lay out your views.'\n\n s....
ruby
chosen
[ { "from": "system", "value": "Update OnyX. Switch sha1 to sha256\n" }, { "from": "human", "value": "class OnyxSnowleopard < Cask\n url 'http://www.titanium.free.fr/download/106/OnyX.dmg'\n homepage 'http://www.titanium.free.fr/downloadonyx.php'\n version '2.4.0'\n sha1 '188c15090988b379dce9f...
ruby
chosen
[ { "from": "system", "value": "Add basic Bundler::API::Plugin structure for testing\n" }, { "from": "human", "value": "require \"bundler/dependency_graph/version\"\n\nmodule Bundler\n module DependencyGraph\n # Your code goes here...\n end\nend\n" }, { "from": "gpt", "value": "re...
ruby
chosen
[ { "from": "system", "value": "Fix mapping from defined resources to URLs.\n" }, { "from": "human", "value": "module KOSapiClient\n\n class ApiClient\n include ResourceMapper\n\n # accessible resources definition\n resource :courses\n resource :course_events\n resource :parallels\...
ruby
chosen
[ { "from": "system", "value": "Add basic devise authentication for admin send mail controller\n" }, { "from": "human", "value": "class Admin::MailsController < ApplicationController\n\n before_action -> { @activity = Activity.find(params[:activity_id]) }\n\n def create\n @notification = Noti...
ruby
chosen