conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make it actually make the tables (forgot the make call)\n" }, { "from": "human", "value": "require 'turntables/db_registry'\nrequire 'turntables/repository'\nrequire 'turntables/turntable_exception'\n\nmodule Turntables\n# @author Simon Symeonidis\n# The facade cont...
ruby
chosen
[ { "from": "system", "value": "Correct Vienna sha256 for version 3.0.3\n" }, { "from": "human", "value": "cask :v1 => 'vienna' do\n version '3.0.3'\n sha256 '106c25c623866b5c2fe14fb38ffb19918fb15e753d7a05c5e15121ac546b3e05'\n\n # sourceforge.net is the official download host per the vendor hom...
ruby
chosen
[ { "from": "system", "value": "Add nested logo and membership details\n" }, { "from": "human", "value": "node(:'@id') { |org| member_url(org.member) }\nnode(:'@type') {\"http://schema.org/Organization\"}\nattributes :name, :description, :url\nnode(:logo) {|org| org.logo.to_s }\nnode(:membershipId...
ruby
chosen
[ { "from": "system", "value": "Add comment to weird behaviour\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n# encoding: utf-8\nproject_dir = File.dirname(__FILE__)\n$:.unshift project_dir\n$:.unshift File.join(project_dir, \"app\")\n\nrequire 'rubygems'\nrequire 'bundle/bundler/setup'\n...
ruby
chosen
[ { "from": "system", "value": "Make compatible with Ruby 1.8.7.\n" }, { "from": "human", "value": "require 'csv'\nclass CsvDb\n class << self\n def convert_save(target_model, csv_data, role = :default, &block)\n csv_file = csv_data.read\n CSV.parse(csv_file, :headers => true, header...
ruby
chosen
[ { "from": "system", "value": "Return to deep_transform_keys so that site_key is camelized\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ConfigHelper\n def global_config\n {\n env: Rails.env.to_s,\n default_currency: Settings.default_currency,\n fac...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary use of ChromaticInterval in Circle.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# A Circle of Fifths or Fourths shows relationships between pitch classes\n# TODO: Replace or empower with IntervalCycle (?)\n# https://en.wiki...
ruby
chosen
[ { "from": "system", "value": "Fix för felaktig koll om adminkontot existerar\n" }, { "from": "human", "value": "# Bootstrapping methods for the application\nnamespace :kp do\n\n desc \"Call all bootstrap tasks\"\n task(:bootstrap) do\n Rake::Task[\"kp:bootstrap:create_system_roles\"].invoke...
ruby
chosen
[ { "from": "system", "value": "Revert \"Redirect podspec to this branch.\"\n\nThis reverts commit 6739c0cec9448a1265fd3beb6c74f5ac83bba656.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'NNNetwork'\n s.version = '0.0.2'\n s.summary = 'Networking categorie...
ruby
chosen
[ { "from": "system", "value": "Add skeleton for enhanced model specs\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../spec_helper'\n\ndescribe PrivateMessage do\n fixtures :users, :profiles, :private_messages\n \n before(:each) do\n @message = create_message\n end\n...
ruby
chosen
[ { "from": "system", "value": "Refactor seed to use new ActiveRecord's find_or_create method\n" }, { "from": "human", "value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created ...
ruby
chosen
[ { "from": "human", "value": "Patch gpg addond to fix bug\n" }, { "from": "gpt", "value": "require 'buildr/gpg'\n\nraise \"Patch applied in latest version of buildr\" if Buildr::VERSION >= '1.4.16'\n\nmodule Buildr\n module GPG\n class << self\n def sign_and_upload_all_packages(project)\...
ruby
chosen
[ { "from": "system", "value": "Make TotalRequestCountGuard count queued requests, not only currently\nrunning ones\n" }, { "from": "human", "value": "module Api2cart::Daemon\n class TotalRequestCountGuard\n def initialize\n self.request_counter = RequestCounter.new\n self.waiting_qu...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.1.0 to 0.1.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'telemetry'\n s.version = '0.1.0'\n s.summary = 'In-process telemetry based on observers'\n s.description = ' ...
ruby
chosen
[ { "from": "system", "value": "Use transactional fixtures, remove comments\n" }, { "from": "human", "value": "# This file is copied to spec/ when you run 'rails generate rspec:install'\nENV[\"RAILS_ENV\"] ||= 'test'\nrequire File.expand_path(\"../../config/environment\", __FILE__)\nrequire 'rspec...
ruby
chosen
[ { "from": "system", "value": "Tweak style of encoding magic comment" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'superstring/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "system", "value": "Fix inspect for operation logger.\n" }, { "from": "human", "value": "module Flipper\n module Adapters\n # Public: Adapter that wraps another adapter and stores the operations.\n #\n # Useful in tests to verify calls and such. Never use outside of testing.\...
ruby
chosen
[ { "from": "human", "value": "Add module to fetch grouped data from mviews\n" }, { "from": "gpt", "value": "class Trade::ComplianceGrouping\n attr_reader :query\n\n ATTRIBUTES = {\n id: 'id',\n importer: 'importer',\n exporter: 'exporter',\n term: 'term',\n unit: 'unit',\n pur...
ruby
chosen
[ { "from": "system", "value": "Put a bit more detail in failure messages" }, { "from": "human", "value": "class NoopListener\n attr_reader :results\n\n class InternalLogger\n def info(msg)\n print \"\\e[1;32m#{msg}\\e[0m\\n\"\n end\n\n def warn(msg)\n print \"\\e[1;31m#{msg}\...
ruby
chosen
[ { "from": "system", "value": "Adjust ruby ssl settings to use TLSv1.2 for connection to web server\n" }, { "from": "human", "value": "module Puppet::Parser::Functions\n newfunction(:dns_array, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|\n Returns a json array of hostnames and addres...
ruby
chosen
[ { "from": "system", "value": "Mark RunStat as being added in 0.7.0.\n" }, { "from": "human", "value": "module Nmap\n #\n # Represents the runstats of a scan.\n #\n class RunStat < Struct.new(:end_time, :elapsed, :summary, :exit_status)\n\n #\n # Converts the stats to a String.\n #\n...
ruby
chosen
[ { "from": "system", "value": "Add test to verify amplitude range\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass TestNote < MiniTest::Test\n def setup\n @test_samples = eval(File.read('test/fixtures/note_samples_array'))\n @basic_note = MusicTheory::Note.new\n @note_2...
ruby
chosen
[ { "from": "system", "value": "Delete existing test packages before testing.\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'riot'\nrequire 'riot/rr'\nrequire 'fileutils'\n\n$LOAD_PATH.unshift File.expand_path(\"../lib\", __FILE__)\nrequire 'release_packag...
ruby
chosen
[ { "from": "system", "value": "Add stripped down version of I/O routines. Sync with rbx-trepanning.\n" }, { "from": "human", "value": "# The class serves as the parent for Trepan::CmdProcessor which is\n# quite large and spans over several files. By declaring \"initialize\"\n# below, we have a co...
ruby
chosen
[ { "from": "system", "value": "Fix json version in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'zabbixapi/version'\n\nGem::Specification.new do |s|\n s.name = \"zabbixapi\"\n s.version = ZabbixApi::VERS...
ruby
chosen
[ { "from": "system", "value": "Add Rake as test dependency for Travis\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'fex/version'\n\nGem::Specification.new do |gem|\n gem....
ruby
chosen
[ { "from": "system", "value": "clipp: Add negative content length regression test.\n" }, { "from": "human", "value": "$:.unshift(File.dirname(File.dirname(__FILE__)))\nrequire 'clipp_test'\n\nclass TestRegression < CLIPPTestCase\n def test_trivial\n clipp(input: \"echo:foo\")\n end\n\n def ...
ruby
chosen
[ { "from": "human", "value": "Create Authentication HTTP Calls To Google Oauth\n" }, { "from": "gpt", "value": "get '/' do\n erb :index\nend\n\nget '/signout' do\n session[:current_user] = nil\n redirect '/'\nend\n\nget \"/auth\" do\n redirect client.auth_code.authorize_url(:redirect_uri => '...
ruby
chosen
[ { "from": "system", "value": "Upgrade gem version due pushing problems\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"cf-trade-client\"\n s.version = \"0.2.0\"\n s.summary = \"Ruby Coinfloor Client\"\n s.description = \"Client to trade on the Coi...
ruby
chosen
[ { "from": "system", "value": "Set Attachable update option on Attachments\n" }, { "from": "human", "value": "require 'attachable'\n\nclass Attachment\n include Mongoid::Document\n include Mongoid::Timestamps\n include Attachable\n\n field :title\n field :filename\n attaches :file, with_url...
ruby
chosen
[ { "from": "system", "value": "Allow assignment of configuration values through Configurable module\n" }, { "from": "human", "value": "# Module for connecting a class with the Rails configuration for easy access.\n# \n# For a class MyModule::MyClass including this module it expects rails.applicat...
ruby
chosen
[ { "from": "system", "value": "Add validation for adding the same map to a layer\n" }, { "from": "human", "value": "# To change this template, choose Tools | Templates\n# and open the template in the editor.\n\nclass LayersMap < ActiveRecord::Base\n belongs_to :layer\n belongs_to :map\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Make unit tests pass with new clearance version\n" }, { "from": "human", "value": "class Rubyforger < ActiveRecord::Base\n def authentic?(password)\n password.present? && encrypted_password == Digest::MD5.hexdigest(password)\n end\n\n def user\n @user ||= U...
ruby
chosen
[ { "from": "system", "value": "Fix Weechat always installing to /usr/local\n\nThe WeeChat devs don't know about CMAKE_INSTALL_PREFIX apparently, someone\nshould tell them. I won't. I plan on just sitting back and shacking my head\nside-to-side instead.\n" }, { "from": "human", "value": "require '...
ruby
chosen
[ { "from": "system", "value": "Add test case to confirm raising error\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"TaskHanlder::Project\" do\n describe \"#convert_projects_to_tasks\" do\n it \"converts projects to tasks as expected\" do\n project = TaskHandler::...
ruby
chosen
[ { "from": "system", "value": "Change description of recalls spec.\n" }, { "from": "human", "value": "require 'helper'\n\ndescribe USASearch do\n before do\n USASearch.configure do |config|\n config.api_key = \"badcheese\"\n end\n end\n\n describe \"search\" do\n context \"when a...
ruby
chosen
[ { "from": "system", "value": "Make change to comply with circle ci tests\n" }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe TagsController do\n before(:each) do\n @tag = create(:tag)\n @tag.questions << create(:question)\n end\n\n describe \"#index\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Make the opus dependency optional\n" }, { "from": "human", "value": "require 'opus-ruby'\n\n# Discord voice chat support\nmodule Discordrb::Voice\n # Wrapper class around opus-ruby\n class Encoder\n attr_accessor :volume, :use_avconv\n\n def initialize\n ...
ruby
chosen
[ { "from": "system", "value": "Enforce timeout in facter execution of sendmail\n" }, { "from": "human", "value": "# Fact: sendmail_version\n#\n# Get the sendmail version\n#\nFacter.add(:sendmail_version) do\n setcode do\n begin\n command = 'sendmail -d0.4 -ODontProbeInterfaces=true -bv r...
ruby
chosen
[ { "from": "system", "value": "Use `group: all` so initializer is triggered during asset comp.\n" }, { "from": "human", "value": "module FrontEndBuilds\n class Engine < ::Rails::Engine\n isolate_namespace FrontEndBuilds\n\n config.generators do |g|\n g.test_framework :rspec, fixture: ...
ruby
chosen
[ { "from": "system", "value": "Drop id column from similarities\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Similarity\n include DataMapper::Resource\n\n property :id, Serial\n property :entry_id, Integer\n property :similar_entry_id, Integer\n property :score, ...
ruby
chosen
[ { "from": "system", "value": "Allow override of cmd to enable forcing _express-checkout-mobile\n" }, { "from": "human", "value": "module Paypal\n module Express\n class Response < NVP::Response\n attr_accessor :pay_on_paypal\n\n def initialize(response, options = {})\n super...
ruby
chosen
[ { "from": "system", "value": "Add wrap_class class method or a subclass of PyObjectWrapper\n" }, { "from": "human", "value": "module PyCall\n module PyObjectWrapper\n def initialize(pyobj, pytype=nil)\n check_type pyobj, pytype\n pytype ||= LibPython.PyObject_Type(pyobj)\n @__...
ruby
chosen
[ { "from": "system", "value": "Add comment indicating reasoning for dynamic module inclusion\n" }, { "from": "human", "value": "require 'formatted_text_entry'\nrequire 'formatted_text_box_entry'\n\nmodule ResumeGenerator\n class Header\n\n attr_reader :pdf, :data\n\n def self.generate(pdf,...
ruby
chosen
[ { "from": "system", "value": "Add Some info into gemspec\n" }, { "from": "human", "value": "# Provide a simple gemspec so you can easily use your enginex\n# project in your rails apps through git.\nGem::Specification.new do |s|\n s.name = \"jam.rb\"\n s.summary = \"JSON Api Maker.\"\n s.descr...
ruby
chosen
[ { "from": "system", "value": "Fix file list due to rename of gems.rb\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'atspi_app_driver'\n s.version = '0.0.3'\n\n s.summary = 'Test GNOME applications using Atspi'\n\n s.authors = ['Matijs van Zuijlen']\n s.email = ...
ruby
chosen
[ { "from": "system", "value": "Add failing spec for PUTs and some DRY cleanup.\n" }, { "from": "human", "value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\nrequire 'webmock_spec'\n\nunless RUBY_PLATFORM =~ /java/\n require 'curb_spec_helper'\n\n describe \"Webmock with ...
ruby
chosen
[ { "from": "system", "value": "Switch to the config module, and add tests for the url method\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\ndescribe 'Post' do\n subject { Dimples::Post.new(site, source_path) }\n\n let(:site) { double }\n let(:source_path) do\n File.join...
ruby
chosen
[ { "from": "system", "value": "Fix ambiguous regular expression literal\n" }, { "from": "human", "value": "# Thanks to https://github.com/simonwhitaker/github-fork-ribbon-css\nrequire 'rack/dev-mark/theme/base'\n\nmodule Rack\n module DevMark\n module Theme\n class GithubForkRibbon < Bas...
ruby
chosen
[ { "from": "system", "value": "Update gemspec summary and description\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"sprockets\"\n s.version = \"2.0.0\"\n s.summary = \"JavaScript dependency management and concatenation\"\n s.description = \"Sprockets is a Ruby ...
ruby
chosen
[ { "from": "system", "value": "Kill requirements on dev deps\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"sprockets\"\n s.version = \"2.0.0.beta.4\"\n s.summary = \"Rack-based asset packaging system\"\n s.description = \"Sprockets is a Rack-based asset packagi...
ruby
chosen
[ { "from": "system", "value": "Add bundler as a development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"rf-rest-open...
ruby
chosen
[ { "from": "system", "value": "Fix required activemodel version from ~> 5.1 to >= 6.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 \"cavalry/version\"\n\nGem::Specification.new do...
ruby
chosen
[ { "from": "system", "value": "Remove stray characters from auto-generated formula.\n" }, { "from": "human", "value": "require 'formula'\n\nclass Dartium < Formula\n homepage \"https://www.dartlang.org\"\n\n version '1.6.0'\n url 'https://storage.googleapis.com/dart-archive/channels/stable/rel...
ruby
chosen
[ { "from": "system", "value": "Create a new DmtxEncode each time we write\n\nIt looks like calling dmtxEncodeDataMatrix more than once on the same\nDmtxEncode leaks memory.\n" }, { "from": "human", "value": "require \"dmtx/version\"\nrequire \"chunky_png\"\nrequire \"dmtx/dmtxlib\"\n\nclass Dmtx\...
ruby
chosen
[ { "from": "system", "value": "Remove map_key as a parameter for Grid\n" }, { "from": "human", "value": "class Grid\n\n def initialize(window, user, mapfile, tileset, map_key)\n @window, @user = window, user\n @map = Map.new(window, mapfile, tileset, map_key)\n end\n\n def draw\n @map...
ruby
chosen
[ { "from": "system", "value": "Fix косяка, при попытке удаления товара из корзины, удалялся вариант.\n" }, { "from": "human", "value": "class Cart < ApplicationRecord\n belongs_to :user\n belongs_to :variant, dependent: :destroy\n\n validates_presence_of :quantity, :size\n\n def size_human\n ...
ruby
chosen
[ { "from": "system", "value": "Fix account type not being set by default\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authenticatable, ...
ruby
chosen
[ { "from": "system", "value": "Change locale enum to hash with integers\n" }, { "from": "human", "value": "class User < ApplicationRecord\n devise :database_authenticatable, :registerable,\n :recoverable, :rememberable, :confirmable, :validatable\n\n enum locale: [:de, :en]\n\n has_sec...
ruby
chosen
[ { "from": "system", "value": "Remove failing test just to see" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\n# Complete the Ruby library path\n# $: << \"watir\"\n\ngem \"minitest\"\n\nrequire \"./test_template.rb\"\nrequire \"./test_installation.rb\"\nrequire \"./test_international.rb\"...
ruby
chosen
[ { "from": "system", "value": "Add homepage address of gemspec.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"wrap_excel/version\"\n\nGem::Specification.new do |s|\n s.name = \"wrap_excel\"\n s.version = WrapExce...
ruby
chosen
[ { "from": "system", "value": "Remove position from continuous trait\n" }, { "from": "human", "value": "class CreateContinuousTraitValues < ActiveRecord::Migration\n def change\n create_table :continuous_trait_values do |t|\n t.integer :position\n t.references :otu\n t.referenc...
ruby
chosen
[ { "from": "system", "value": "Fix bug in sync detection\n" }, { "from": "human", "value": "require 'puppet_x/puppetlabs/swagger/symbolize_keys'\n\nmodule PuppetX\n module Puppetlabs\n module Swagger\n class Utils\n def self.fuzzy_compare(existing, intended)\n normalized_...
ruby
chosen
[ { "from": "human", "value": "Test for the winner method\n" }, { "from": "gpt", "value": "require_relative '../leader_board'\nrequire_relative '../race'\nrequire_relative '../driver'\nrequire_relative '../self_driving_car'\ndescribe LeaderBoard do\n before :each do\n @driver_1 = Driver.new(\"...
ruby
chosen
[ { "from": "system", "value": "Add lower limit for octokit version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tachikoma/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary `.rb` extension in require statement\n" }, { "from": "human", "value": "require './gilded_rose.rb'\n\nRSpec.describe GildedRose do\n\n it \"should do something\" do\n subject.update_quality\n end\n\n\nend\n" }, { "from": "gpt", "v...
ruby
chosen
[ { "from": "human", "value": "Remove unnecessary require 'json' from specs.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe SignRequest do\n it 'has a version number' do\n expect(SignRequest::VERSION).not_to be nil\n end\n\n describe SignRequest::API do\n describe '.au...
ruby
chosen
[ { "from": "system", "value": "Remove pry statement from Rake task\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'rake'\nAutomidnight::Application.load_tasks\n\ndescribe \"Reset Task\" do\n before(:all) do\n Rake::Task['reset:voice_files'].invoke\n Rake::Task['reset:que...
ruby
chosen
[ { "from": "system", "value": "Fix for :tag value in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SKStatefulTableViewController'\n s.version = '0.0.14'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.homepage = 'http://github.com/shiki/SKStatefulTabl...
ruby
chosen
[ { "from": "system", "value": "Fix old Rubies on old addressable\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\nrequire \"gh/version\"\n\nGem::Specification.new do |s|\n s.name = \"gh\"\n s.version = GH::VERSION\n...
ruby
chosen
[ { "from": "system", "value": "Revert \"Moves data model from resource to source\"\n\nThis reverts commit b4b97ec6d092249f6882a485b6b6e4918ff8085c.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"MSSocialKit\"\n s.version = \"0.0.2\"\n s.license = 'MIT'...
ruby
chosen
[ { "from": "system", "value": "Fix NameError in seeds for production mode.\n" }, { "from": "human", "value": "Sidekiq::Testing.disable! do\n RakeHelper::Hets.create_instances\nend\n" }, { "from": "gpt", "value": "if Rails.env.production?\n RakeHelper::Hets.create_instances\nelse\n ...
ruby
chosen
[ { "from": "system", "value": "Add old logs clear method" }, { "from": "human", "value": "module ImportOMmatic\n\n class Logger < ::Logger\n attr_accessor :counters, :path\n\n def format_message(severity, timestamp, progname, msg)\n \"#{timestamp.to_formatted_s(:db)} #{severity} #{msg...
ruby
chosen
[ { "from": "system", "value": "Make code consistent with docs\n" }, { "from": "human", "value": "module MarshalledAttributes\n\n def self.included(base)\n base.extend(SingletonMethods)\n end\n\n module SingletonMethods\n\n def marshalled_attribute(*args)\n args.each do |arg|\n ...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary param from redirect.\n" }, { "from": "human", "value": "class AnswersController < ApplicationController\n include AuthsHelper\n\n def show\n @question = Question.find(params[:question_id])\n end\n\n def new\n @answer = Answer.find(params...
ruby
chosen
[ { "from": "system", "value": "Remove print from FLight controller\n" }, { "from": "human", "value": "class FlightsController < ApplicationController\n\n def index\n redirect_to search_flights_path\n end\n\n def search\n @search = SearchForm.new\n if request.xhr?\n render :'fligh...
ruby
chosen
[ { "from": "system", "value": "Fix error if food search is empty in new recipe form\n" }, { "from": "human", "value": "class RecipesController < ApplicationController\n def index\n @recipes = Recipe.all\n end\n\n def show\n @recipe = Recipe.find(params[:id])\n end\n\n def new\n @rec...
ruby
chosen
[ { "from": "human", "value": "Update the relatedness graph every 15 minutes\n" }, { "from": "gpt", "value": "set :output, {:error => 'log/cron.error.log', :standard => 'log/cron.log'}\njob_type :run_script, 'cd :path && RAILS_ENV=:environment script/:task'\n\nevery 15.minutes do\n run_script \"...
ruby
chosen
[ { "from": "system", "value": "Change store dir for static files\n" }, { "from": "human", "value": "class StaticFileUploader < BaseUploader\n\n include CarrierWave::MiniMagick\n\n version :thumb, if: :image? do\n process resize_to_fill: [32, 32]\n end\n\n version :big_thumb, if: :image? do...
ruby
chosen
[ { "from": "system", "value": "Implement order handling in to_remove\n\nJust in case `dpkg` ever gives us unordered results. We can't rely on the\nlatest being at the end.\n" }, { "from": "human", "value": "require \"ubuntu_unused_kernels/version\"\n\nmodule UbuntuUnusedKernels\n PACKAGE_PREFIXE...
ruby
chosen
[ { "from": "system", "value": "Update Cloudup.app license to Freemium.\n" }, { "from": "human", "value": "cask :v1 => 'cloudup' do\n version :latest\n sha256 :no_check\n\n url 'https://updates.cloudup.com/update?os=osx&app=Cloudup&format=zip&channel=release'\n homepage 'https://cloudup.com/do...
ruby
chosen
[ { "from": "system", "value": "Remove :app designation from Jumpcut link" }, { "from": "human", "value": "class Jumpcut < Cask\n url 'http://downloads.sourceforge.net/project/jumpcut/jumpcut/0.63/Jumpcut_0.63.tgz'\n homepage 'http://jumpcut.sourceforge.net/'\n version '0.63'\n sha1 '6ac88694f...
ruby
chosen
[ { "from": "system", "value": "Upgrade RStudio to 0.99.485: fix Safari 9 bug\n\nThere's a bug introduced with the change to Safari 9 and/or\nEl Capitan where RStudio crashes when changing project.\n\nFor reference, the specific issue is rstudio/rstudio#505.\n" }, { "from": "human", "value": "cask...
ruby
chosen
[ { "from": "system", "value": "Fix source files in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'Deferred'\n spec.version = '0.1.2'\n spec.summary = 'Promises in Swift'\n spec.homepage = 'https://github.com/remarkableio/Deferred'\n spec.license = { :type =...
ruby
chosen
[ { "from": "system", "value": "Make podspec version match the defined version\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Dopamine\"\n s.version = \"0.0.1\"\n s.summary = \"A Swift client for http://usedopamine.com/\"\n\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Remove CentOS 8 in favor of CentOS Stream 8\n\nSigned-off-by: Lance Albertson <3161cdc7bf197e4c3a35b9cbe358c79910f27e90@osuosl.org>\n" }, { "from": "human", "value": "name 'osl-php'\nmaintainer 'Anthony Miller'\nmaintainer_email 'armiller@osuosl.or...
ruby
chosen
[ { "from": "system", "value": "Document project license in gemspec" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'econfig/version'\n\nGem::Specification.new do |gem|\n gem.n...
ruby
chosen
[ { "from": "system", "value": "Clean up Pod description whitespace\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'Snippets'\n spec.version = '0.1.14'\n spec.summary = 'Snippets in Swift'\n spec.description = <<-DESCRIPTION\n A collection of Swift snippets for enhan...
ruby
chosen
[ { "from": "human", "value": "Move DataProxy to support dir\n" }, { "from": "gpt", "value": "module ROM\n module DataProxy\n attr_reader :data, :header, :tuple_proc\n\n NON_FORWARDABLE = [\n :each, :to_a, :to_ary, :kind_of?, :instance_of?, :is_a?\n ].freeze\n\n def self.included...
ruby
chosen
[ { "from": "system", "value": "Change: Make Extra Sure We're Not Loading Ruby's Time Class\n" }, { "from": "human", "value": "require 'ruby-progressbar/time'\n\nclass ProgressBar\nclass Timer\n attr_accessor :started_at,\n :stopped_at\n\n def initialize(options = {})\n sel...
ruby
chosen
[ { "from": "system", "value": "Fix markus:dev:reset rake task. See review 523.\n" }, { "from": "human", "value": "namespace :markus do\n \n namespace :dev do\n RAILS_ENV=\"development\"\n desc \"Resets a MarkUs installation. Useful for developers. This is just a rake repos:drop && rake db...
ruby
chosen
[ { "from": "system", "value": "Update Data Science Studio to v2.0.0\n" }, { "from": "human", "value": "cask :v1 => 'data-science-studio' do\n version '1.4.4'\n sha256 'bea67d377bc4df2ac109bda21b3e15dd0ca84b7c56a57836a73502476b5df5fb'\n\n url \"http://downloads.dataiku.com/public/studio/Data%20...
ruby
chosen
[ { "from": "system", "value": "Load the formatter in order\n" }, { "from": "human", "value": "require 'chef'\nrequire 'chefspec/chef_runner'\nrequire 'chefspec/version'\n\nrequire 'chef/formatters/chefspec'\n\nif defined?(RSpec)\n require 'chefspec/matchers/cron'\n require 'chefspec/matchers/ex...
ruby
chosen
[ { "from": "system", "value": "Allow real network connections to support remote_file, etc.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n#\n# Author:: Fletcher Nichol (<fnichol@nichol.ca>)\n#\n# Copyright (C) 2013, Fletcher Nichol\n#\n# Licensed under the Apache License, Version 2...
ruby
chosen
[ { "from": "system", "value": "Use time as integer for account number\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :chamber do\n sequence(:name) { |n| \"#{Faker::Company.name}-#{n}\" }\n sequence(:account_number) { |n| \"123456-#{n}\" }\n end\nend\n" }, { "fr...
ruby
chosen
[ { "from": "system", "value": "Create factories for all states\n" }, { "from": "human", "value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :project do\n name { FFaker::Product.product_name }\n association :submitter, factory: :...
ruby
chosen
[ { "from": "system", "value": "Correct the name of Mege.Gen\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'megegen/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Remove redundant setup in tests.\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass CommitTest < ActiveSupport::TestCase\n setup do\n @commit = commits(:rails_commit)\n end\n\n test \".merge_or_skip_ci? for merge commits\" do\n @commit.messag...
ruby
chosen
[ { "from": "human", "value": "Add an \"edit\" command unit test.\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\nrequire 'rubygems'; require 'require_relative'\nrequire_relative './mock-helper'\nrequire_relative './cmd-helper'\nrequire_relative '../../processor/command/edit'\n\nclass TestCo...
ruby
chosen
[ { "from": "system", "value": "Remove some more unnecessary printing" }, { "from": "human", "value": "require 'support/forking'\n\ndescribe Support::Forking do\n include Support::Forking\n\n it 'returns multiple futures for async execs' do\n future1 = async_fork_and_return do\n 4.times ...
ruby
chosen