conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Handle tags not always being present on a manual\n\nEven though all already-published manuals in Production with tags in\nPanopticon have been published again to pick up the tags to send to Rummager,\nsome published manuals in a database replicated from Preview 2 days ago didn'...
ruby
chosen
[ { "from": "system", "value": "Use ridley.search instead of ridley.<thing>.all\n" }, { "from": "human", "value": "##\n# Class: Cleaver::Model::Cluster\n#\nrequire \"ridley\"\nrequire \"cleaver/model/entity\"\n\nmodule Cleaver\n module Model\n ##\n # Cluster Entity\n ##\n class Cluste...
ruby
chosen
[ { "from": "system", "value": "Handle ISON command only for nickserv.\n" }, { "from": "human", "value": "class IsonCommand < Command\n register_command :ISON\n\n def set_data(args)\n @data = args\n end\n\n def valid?\n !!@data\n end\n\n def execute!\n available_nicks = []\n ison...
ruby
chosen
[ { "from": "system", "value": "Add StringScanner failing specs to bugs\n\nEmerged after fixing the encoding of the phantomjs runner page." }, { "from": "human", "value": "opal_filter \"StringScanner\" do\n fails \"StringScanner#[] calls to_int on the given index\"\n fails \"StringScanner#[] rai...
ruby
chosen
[ { "from": "system", "value": "Use updated name for UUID field in valid_user spec\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'cs/error'\n\nmodule CS\n module EndPoint\n describe User do\n def valid_user\n {\n id: 1, email: \"foo@bar.com\", username:...
ruby
chosen
[ { "from": "system", "value": "Refactor expression specs to more clearly represent the wrapped atom\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Calyx::Production::Expression do\n let(:production) do\n double(:production)\n end\n\n it 'evaluates a value' do\n allo...
ruby
chosen
[ { "from": "system", "value": "[ExternalSources] Fix specs for compacting of external sources hash\n" }, { "from": "human", "value": "require File.expand_path('../../spec_helper', __FILE__)\n\nmodule Pod\n describe ExternalSources do\n before do\n @subject = ExternalSources\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use KriKri as a development dependency\n" }, { "from": "human", "value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'krikri/spec/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name = 'kr...
ruby
chosen
[ { "from": "system", "value": "Add an option to respond with body for PATCH\n" }, { "from": "human", "value": "module Garage::OptionalResponseBodyResponder\n protected\n\n def api_behavior(*)\n case\n when put? && options[:put] && options[:put][:body]\n display resource, status: opti...
ruby
chosen
[ { "from": "system", "value": "Update to latest 2.7.6 patch\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"samfundet_domain/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|...
ruby
chosen
[ { "from": "system", "value": "Remove usless private access modifier.\n" }, { "from": "human", "value": "class Udongo::ObjectPath\n def self.find(object)\n unless object.is_a?(Array)\n return cleanup(\"#{object.class.name.underscore}_path\")\n end\n\n object.map do |item|\n it...
ruby
chosen
[ { "from": "system", "value": "Add rake to the gemspec file\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.authors = [\"Wael M. Nasreddine\"]\n gem.email = [\"wael.nasreddine@gmail.com\"]\n gem.description = 'Capistrano rec...
ruby
chosen
[ { "from": "system", "value": "Fix minor typo in aliases.\n" }, { "from": "human", "value": "module HP\n module Cloud\n class CLI < Thor\n\n map %w(securitygroups:rules:revoke, securitygroups:rules:delete securitygroups:rules:del) => 'securitygroups:rules:remove'\n\n desc \"security...
ruby
chosen
[ { "from": "system", "value": "Add command to list all supported services\n" }, { "from": "human", "value": "require 'thor'\n\nmodule Namesies\n class CLI < Thor\n\n desc \"search QUERY\", \"search all services for QUERY\"\n def search(q)\n puts \"Searching for #{q}...\"\n puts \...
ruby
chosen
[ { "from": "system", "value": "Make it safe for Rails 3 compatibility." }, { "from": "human", "value": "module PaginateAlphabetically\n module ViewHelpers\n def alphabetically_paginate(collection)\n return \"\" if collection.empty?\n available_letters = collection.first.class.pagina...
ruby
chosen
[ { "from": "system", "value": "Update user spec to test properties\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire \"jotform/report\"\n\nmodule JotForm\n describe User do\n let(:api) { API.new(ENV[\"JOTFORM_API_KEY\"]) }\n\n context \"#reports\" do\n it \"returns a...
ruby
chosen
[ { "from": "system", "value": "Add missing spec for KnapsackPro module\n" }, { "from": "human", "value": "describe KnapsackPro do\n describe '.load_tasks' do\n let(:task_loader) { instance_double(KnapsackPro::TaskLoader) }\n\n it do\n expect(KnapsackPro::TaskLoader).to receive(:new).a...
ruby
chosen
[ { "from": "system", "value": "Set a config option that caused deprecation warnings in specs with the current rails and i18n stack.\n" }, { "from": "human", "value": "# Initializes the rails application used for\n# testing.\n\n# Do not output schema loading\nActiveRecord::Migration.verbose = fals...
ruby
chosen
[ { "from": "system", "value": "Add comment to initializer that includes BettertabsHelper\n" }, { "from": "human", "value": "require 'rails'\n\nmodule Bettertabs\n class Engine < Rails::Engine\n initializer 'bettertabs.action_controller' do |app|\n ActiveSupport.on_load :action_controller...
ruby
chosen
[ { "from": "system", "value": "Fix methods with the same name\n" }, { "from": "human", "value": "# coding: utf-8\nrequire \"open-uri\"\nrequire \"json\"\n\nmodule Cosmicbot\n module Grebige\n class Plugin\n include Cinch::Plugin\n set :react_on, :channel\n\n match \"grébige\"\n...
ruby
chosen
[ { "from": "system", "value": "Improve spec for clone recipe\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe CloneRecipeController, type: :controller do\n let(:recipe) { Recipe.create(recipe_attributes) }\n let(:beerxml) { file_fixture('beerxml.xml').read }\n let(:r...
ruby
chosen
[ { "from": "human", "value": "Add tests for submodule edit" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe Gitlab::Client do\n describe '.edit_submodule' do\n let(:api_path) { '/projects/3/repository/submodules/submodule' }\n let!(:request_...
ruby
chosen
[ { "from": "human", "value": "Drop languages table, now it's useless\n" }, { "from": "gpt", "value": "class DropLanguages < ActiveRecord::Migration\n def self.up\n drop_table :languages\n end\n\n def self.down\n create_table :languages do |t|\n t.string :name\n t.string :short_...
ruby
chosen
[ { "from": "system", "value": "Add manual attribute to payouts db table\n" }, { "from": "human", "value": "class CreatePayouts < ActiveRecord::Migration\n def change\n create_table :payouts do |t|\n t.string :payment_service\n t.references :project, index: true, null: ...
ruby
chosen
[ { "from": "system", "value": "Add support for application codes\n" }, { "from": "human", "value": "module Litmus\n class EmailTest < Test\n def self.list\n super.reject{|test| test[\"service\"] != 'email'}\n end\n\n def self.create(email={}, name = nil, sandbox = false)\n bui...
ruby
chosen
[ { "from": "system", "value": "Fix the executable, closes GH-106\n" }, { "from": "human", "value": "require \"mongo_browser\"\n\nrequire \"thor\"\nrequire \"thin\"\n\nmodule MongoBrowser\n RACK_CONFIG = File.expand_path(\"config.ru\")\n\n class CLI < Thor\n desc :start, \"Starts the applicat...
ruby
chosen
[ { "from": "system", "value": "Add shortcut for border radius to uiview\n" }, { "from": "human", "value": "motion_require 'observable'\nmotion_require 'resizable'\n\nmodule Loco\n \n module UI\n \n class Button < UIButton\n include Resizable\n include Observable\n end\n \n ...
ruby
chosen
[ { "from": "system", "value": "Rename method php_unserialize to unserialize and create two alias to it: load and restore\n" }, { "from": "human", "value": "$:.unshift(File.dirname(__FILE__))\nrequire 'php_serialization/parser'\n\nmodule PhpSerialization\n def self.unserialize(str)\n Parser.ne...
ruby
chosen
[ { "from": "system", "value": "Load transaction providers by default." }, { "from": "human", "value": "require_relative 'helpers/helpers'\nrequire_relative 'record_sessions/record_sessions'\nrequire_relative 'aggregate_repository'\nrequire_relative 'aggregate_root'\nrequire_relative 'base_command...
ruby
chosen
[ { "from": "human", "value": "Add rake task to run all forecast updates\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nnamespace :forecasts do\n desc 'Update forecasts from all sources'\n multitask update: ['surfline:update', 'msw:update', 'spitcast:update']\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Add ability to use erb syntax in config file\n" }, { "from": "human", "value": "module CouchRestAdapter\n module DbConfig\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n attr_accessor :config_file\n\n def...
ruby
chosen
[ { "from": "system", "value": "SEARCH-649: Add a join argument to the 'concat' field type.\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule Spectrum\n module Config\n class ConcatField < Field\n type 'concat'\n\n def value(data, request = nil)\n @field...
ruby
chosen
[ { "from": "system", "value": "Add log output to VM customization\n" }, { "from": "human", "value": "module Vagrant\n module Actions\n module VM\n class Customize < Base\n def execute!\n # Run the customization procs over the VM\n Vagrant.config.vm.run_procs!(@ru...
ruby
chosen
[ { "from": "system", "value": "Remove redundant const_missing class method.\n\nThis code was added as a workaround to fix namespace issues in one of\nthe acceptance specs when running with Ruby 1.9.2. [1]\n\nSince then Ruby's constant resolver has been updated and this\nnon-standard behaviour of `Decorator` ...
ruby
chosen
[ { "from": "system", "value": "Fix tests to work in Rails 3.2\n" }, { "from": "human", "value": "describe 'comable/admin/themes/index' do\n helper Comable::ApplicationHelper\n\n let!(:themes) { create_list(:theme, 2) }\n\n before { assign(:themes, Comable::Theme.all) }\n\n it 'renders a list ...
ruby
chosen
[ { "from": "system", "value": "Fix `Workflow`s access to `command_service`\n" }, { "from": "human", "value": "require_relative 'helpers/self_applier'\n\nmodule Sequent\n module Core\n class Workflow\n include Helpers::SelfApplier\n\n def execute_commands(*commands)\n Sequent....
ruby
chosen
[ { "from": "system", "value": "Add env and log options to stop command\n" }, { "from": "human", "value": "module ServiceRunner\n class Runner < Thor\n include Thor::Actions\n\n map '-e' => :env\n map '-p' => :pid\n map '-l' => :log\n map '-t' => :test\n\n class_option :pid, :ty...
ruby
chosen
[ { "from": "system", "value": "Simplify fix for RSpec 2.x\n" }, { "from": "human", "value": "module Spring\n module Commands\n class RSpec\n def env(*)\n \"test\"\n end\n\n def exec_name\n \"rspec\"\n end\n\n def gem_name\n \"rspec-core\"\n e...
ruby
chosen
[ { "from": "system", "value": "Fix small exception message typo\n\nWhy you made the change:\n\nHow the change addresses the need:\n" }, { "from": "human", "value": "module Togls\n class RuleRepository\n def initialize(drivers)\n if !drivers.is_a?(Array)\n raise Togls::InvalidDrive...
ruby
chosen
[ { "from": "system", "value": "Add auto reloader to Tab::SearchTab\n" }, { "from": "human", "value": "module Twterm\n module Tab\n class SearchTab\n include StatusesTab\n include Dumpable\n\n attr_reader :query\n\n def initialize(query)\n super()\n\n @query =...
ruby
chosen
[ { "from": "system", "value": "Use predicate method instead of raw comparison\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule VagrantBindfs\n module Bindfs\n SOURCE_VERSION = '1.14.0'\n SOURCE_URLS = [\n 'https://bindfs.org/downloads/%<basename>s.tar.gz...
ruby
chosen
[ { "from": "human", "value": "Create a module to initialise the govuk_ab_testing gem\n" }, { "from": "gpt", "value": "module AbTests::NewBrowseAbTestable\n CUSTOM_DIMENSION = 47\n\n ALLOWED_VARIANTS = %w[A B Z].freeze\n\n def new_browse_test\n @new_browse_test ||= GovukAbTesting::AbTest.new...
ruby
chosen
[ { "from": "system", "value": "Fix for \"ArgumentError: invalid byte sequence in US-ASCII\" when creating github issue" }, { "from": "human", "value": "class IssueTrackers::GithubIssuesTracker < IssueTracker\n Label = \"github\"\n Fields = [\n [:project_id, {\n :label => \"Account...
ruby
chosen
[ { "from": "human", "value": "Add stub rspec test to ecryptfs module\n" }, { "from": "gpt", "value": "require_relative '../../../../spec_helper'\n\ndescribe 'ecryptfs', :type => :class do\n\n it { is_expected.to compile }\n\n it { is_expected.to compile.with_all_deps }\n\n it { is_expected.to ...
ruby
chosen
[ { "from": "system", "value": "Allow automatic width, and height.\n" }, { "from": "human", "value": "# Frozen-string-literal: true\n# Copyright: 2012 - 2018 - MIT License\n# Encoding: utf-8\n\nrequire \"jekyll/assets\"\n\nmodule Jekyll\n module Assets\n class Default\n class Img < Defaul...
ruby
chosen
[ { "from": "system", "value": "Fix xib files being part of the source files instead of resource files\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Foursquare-API-v2\"\n s.version = \"1.2.0\"\n s.summary = \"Foursquare API v2 For iOS.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Change airline program sort direction\n" }, { "from": "human", "value": "class AirlineProgramsController < MyplaceonlineController\n def split_link(obj)\n if !obj.password.nil? && !obj.password.url.blank?\n ActionController::Base.helpers.link_to(\n I...
ruby
chosen
[ { "from": "system", "value": "Add region to AWS in DownloadLink\n" }, { "from": "human", "value": "class DownloadButton < LinkButton\n include ActionView::Helpers\n \n def initialize(path)\n s3 = Aws::S3::Resource.new()\n obj = s3.bucket(\"pbogardcom-files\").object(path)\n\n puts pa...
ruby
chosen
[ { "from": "system", "value": "Swap tabs for spaces and add a missing do\n" }, { "from": "human", "value": "#\n# Cookbook Name:: ntp\n# Recipe:: windows_client\n# Author:: Timothy Smith (<tim.smith@webtrends.com>)\n#\n# Copyright 2012, Webtrends, Inc\n#\n# Licensed under the Apache License, Versi...
ruby
chosen
[ { "from": "system", "value": "Add spec for initializing a Thread multiple times\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n" }, { "from": "gpt", "value": "require File.expan...
ruby
chosen
[ { "from": "human", "value": "Add VWO tracking and snippet (uses page-wide jQuery)\n" }, { "from": "gpt", "value": "module Blog\n module VwoHelper\n\n # TODO Make it customizable\n def vwo_javascript\n (<<-VWO\n<!-- Start Visual Website Optimizer Asynchronous Code -->\n<script type='t...
ruby
chosen
[ { "from": "system", "value": "Fix invalid html in comments list." }, { "from": "human", "value": "module CommentsHelper\n\n def comments_list_for(resource)\n haml_tag 'ol.unstyled#comments-list' do\n haml_concat(render(resource.comments))\n\n if resource.comments.empty?\n ha...
ruby
chosen
[ { "from": "system", "value": "Remove redundant li_tag on profile link on menu bar\n" }, { "from": "human", "value": "module MenuBarHelper\n def menu_bar_links\n [\n link_to_profile,\n link_to_classroom,\n link_to_bibliotheca,\n solve_discussions_link,\n user_discussi...
ruby
chosen
[ { "from": "system", "value": "Send uploaded feedback as attachment\n" }, { "from": "human", "value": "class FeedbackMailer < ActionMailer::Base\n default :from => RUBYRIC_EMAIL\n default_url_options[:host] = RUBYRIC_HOST\n \n # Sends the review by email to the students\n def review(review)\...
ruby
chosen
[ { "from": "system", "value": "Check that HOMEBREW_TEMP permits executing programs\n" }, { "from": "human", "value": "require \"tempfile\"\nrequire \"utils/shell\"\nrequire \"os/linux/diagnostic\"\n\nmodule Homebrew\n module Diagnostic\n class Checks\n def check_tmpdir_sticky_bit\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor setting teams in controller\n" }, { "from": "human", "value": "module Oversight\n module Concerns::Controllers::TeamsController\n extend ActiveSupport::Concern\n\n included { before_action :set_user }\n\n def index\n @teams = if @user\n ...
ruby
chosen
[ { "from": "system", "value": "Fix delivery_settings was not working\n\nneeded to symbolize\n" }, { "from": "human", "value": "require \"alerty/plugin/mail/version\"\n\nrequire 'alerty'\nrequire 'mail'\n\nclass Alerty\n class Plugin\n class Mail\n def initialize(config)\n raise Co...
ruby
chosen
[ { "from": "system", "value": "Add Generator for Keyboard Button\n" }, { "from": "human", "value": "require 'ayanami/hacks'\n\nmodule Ayanami\n # Generator contains Telegram objects that are used as arguments\n module Generator\n def self.inline_keyboard_markup(inline_keyboard: [])\n __...
ruby
chosen
[ { "from": "system", "value": "Fix for handling STI table\n" }, { "from": "human", "value": "require 'bitmask_attributes/definition'\nrequire 'bitmask_attributes/value_proxy'\n\nmodule BitmaskAttributes\n extend ActiveSupport::Concern\n\n module ClassMethods\n def bitmask(attribute, options=...
ruby
chosen
[ { "from": "system", "value": "Use RbConfig, not deprecated Config\n" }, { "from": "human", "value": "require \"calculated_attributes/version\"\nrequire \"active_record\"\n\nActiveRecord::Base.extend Module.new {\n def calculated(*args)\n @config ||= Config.new\n @config.calculated(args.fi...
ruby
chosen
[ { "from": "system", "value": "Add search parameters for flash notice\n" }, { "from": "human", "value": "class ProfilesSearchController < ApplicationController\n def show\n @profiles = ProfilesSearch.new(params[:search]).results.page(params[:page]).per(16)\n\n if params[:search].include? :...
ruby
chosen
[ { "from": "system", "value": "Comment out SubnetTopologyService from SubnetTopologyController\n\nThe class SubnetTopologyService isn't defined anywhere and this line\nwould cause parsing error for gettext model attribute extraction task.\n" }, { "from": "human", "value": "class SubnetTopologyCon...
ruby
chosen
[ { "from": "system", "value": "Raise an error when failed to find provider\n" }, { "from": "human", "value": "module Hocho\n module Utils\n module Finder\n def self.find(const, prefix, name)\n retried = false\n constant_name = name.to_s.gsub(/\\A.|_./) { |s| s[-1].upcase }\...
ruby
chosen
[ { "from": "human", "value": "Add parser for cli arguments\n" }, { "from": "gpt", "value": "require 'rubygems'\nrequire 'mixlib/cli'\n\nclass CliParser\n include Mixlib::CLI\n\n option :output,\n :short => \"-o OUTPUT\",\n :long => \"--output OUTPUT\",\n :description => \"Name of the f...
ruby
chosen
[ { "from": "system", "value": "Add myself to gem authors.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"middleman-disqus/version\"\n\nGem::Specification.new do |s|\n s.name = \"middleman-disqus\"\n s.version = ...
ruby
chosen
[ { "from": "system", "value": "Remove the NavBar builder from coverage metrics" }, { "from": "human", "value": "class NavbarTabBuilder < TabsOnRails::Tabs::Builder\n def open_tabs(options = {})\n options[:class] ||= \"nav navbar-nav\"\n @context.tag(\"ul\", options, open = true)\n end\n\n...
ruby
chosen
[ { "from": "system", "value": "Move git log format to constant\n" }, { "from": "human", "value": "module Releasecop\n class Comparison\n attr_accessor :lines, :behind, :ahead\n\n def initialize(ahead, behind)\n @ahead = ahead\n @behind = behind\n end\n\n def check\n @l...
ruby
chosen
[ { "from": "system", "value": "Remove logger from windows hostname cap\n" }, { "from": "human", "value": "require \"log4r\"\n\nmodule VagrantPlugins\n module GuestWindows\n module Cap\n module ChangeHostName\n def self.change_host_name(machine, name)\n change_host_name_an...
ruby
chosen
[ { "from": "system", "value": "Check for existence of mongomodel.yml in Railtie\n" }, { "from": "human", "value": "module MongoModel\n class Railtie < Rails::Railtie\n initializer \"mongomodel.logger\" do\n MongoModel.logger ||= ::Rails.logger\n end\n \n initializer \"mongomodel...
ruby
chosen
[ { "from": "system", "value": "Select quoting by parameter instead of user agent\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'uri'\nrequire 'active_support'\n\nmodule Plaintweet\n class WebApp < Sinatra::Base\n set :root, File.join(File.dirname(__FILE__), '..', '..')\n se...
ruby
chosen
[ { "from": "system", "value": "Stop trying to run seo_meta_engine:install:migrations because it doesn't exist.\n" }, { "from": "human", "value": "module Refinery\n class PagesGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n def generate_pages...
ruby
chosen
[ { "from": "human", "value": "Add NOT NULL constraints to some cookbook tables\n\nThese columns are part of foreign key constraints,\nand really should never be NULL. What is a cookbook_version\nwithout a cookbook? What is a cookbook_version_checksum\nwithout a cookbook_version?\n" }, { "from": "gp...
ruby
chosen
[ { "from": "human", "value": "Add Migration for Mercury Images\n\nAdd a migration to include the Mercury images table.\n" }, { "from": "gpt", "value": "class CreateMercuryImages < ActiveRecord::Migration\n def change\n create_table :mercury_images do |t|\n t.string :image_file_name\n ...
ruby
chosen
[ { "from": "human", "value": "Add RSpec Test Quiz Model Validations\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe Quiz, type: :model do\n def valid_attributes(new_attributes = {})\n attributes = {\n title: \"Super Fly\",\n body: \"The CodeCore Q quiz app\...
ruby
chosen
[ { "from": "system", "value": "Add a warning if the user didn't implement the on_refresh method or they specified a callback method but didn't implement it.\n" }, { "from": "human", "value": "module ProMotion::MotionTable\n module RefreshableTable\n def make_refreshable(params={})\n pull...
ruby
chosen
[ { "from": "system", "value": "Update compatiblity with Rails 4.0 and Mongoid" }, { "from": "human", "value": "require 'delayed_job'\n\nmodule Delayed\n module Workless\n module Scaler\n \n class Base\n def self.jobs\n Delayed::Job.all(:conditions => { :failed_at => nil ...
ruby
chosen
[ { "from": "system", "value": "Add case for progress event\n" }, { "from": "human", "value": "# encoding: utf-8\n\nRSpec.describe TTY::ProgressBar, 'events' do\n let(:output) { StringIO.new('', 'w+') }\n\n it \"emits :done event\" do\n events = []\n bar = TTY::ProgressBar.new(\"[:bar]\", ...
ruby
chosen
[ { "from": "system", "value": "Make ordering index shorter so it doesn't break the 62 character limit\n" }, { "from": "human", "value": "class CreateOrdering < ActiveRecord::Migration\n def self.up\n\n create_table :orderings do |t|\n\n t.references :orderable, :polymorphic => true\n\n ...
ruby
chosen
[ { "from": "system", "value": "Set access to public folder\n" }, { "from": "human", "value": "require \"webrick\"\nrequire \"tehranjs/web/controller\"\nrequire \"tehranjs/web/servlet\"\n\nmodule Tehranjs\n class CLI < Thor\n class Serve < Thor::Group\n\n\n\n desc \"Serve start server\"\n...
ruby
chosen
[ { "from": "system", "value": "Fix a couple of issues with subject\n" }, { "from": "human", "value": "class CommonDocumentsController < InheritedResources::Base\n belongs_to_subjects :optional => true\n\n load_and_authorize_resource\n\n def index\n @activities = subject.wall(:profile,\n ...
ruby
chosen
[ { "from": "system", "value": "Remove Unnecessary disabling of Metrics/AbcSize\n" }, { "from": "human", "value": "module Users\n module OrderManipulator\n extend ActiveSupport::Concern\n\n def can_create_order_at?(organization)\n super_admin? || member_at?(organization)\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add `generate` command to CLI\n" }, { "from": "human", "value": "require 'thor'\n\nmodule Asphalt\n class CLI < Thor\n option :sass, :type => :boolean\n desc \"init /path/to/stylesheets\", \"bootstrap directory with a set of Sass files\"\n def init(target_...
ruby
chosen
[ { "from": "system", "value": "Tackle gzip error for when using Faraday >= 0.9.2" }, { "from": "human", "value": "require \"google/api_client\"\n\nrequire \"google_apis/core_ext\"\nrequire \"google_apis/connection\"\nrequire \"google_apis/api\"\nrequire \"google_apis/version\"\n\nmodule GoogleApi...
ruby
chosen
[ { "from": "system", "value": "Set log level by INFRATASTER_LOG.\n" }, { "from": "human", "value": "require \"infrataster/version\"\nrequire \"infrataster/resources\"\nrequire \"infrataster/server\"\nrequire \"infrataster/helpers\"\nrequire \"infrataster/browsermob_proxy\"\nrequire \"infrataster/...
ruby
chosen
[ { "from": "human", "value": "Add in the CLI, and have it set the global options" }, { "from": "gpt", "value": "require 'optparse'\n\nmodule Launchy\n class Cli\n\n attr_reader :options\n def initialize\n @options = {}\n end\n \n def parser\n @parser ||= OptionParser.new d...
ruby
chosen
[ { "from": "system", "value": "Revert \"chomp looks better then gsub\" - does not work with ruby1.8.7\n\nThis reverts commit e5f15f0f1992f14a53cc2e5f8c7d34953d9496d2.\n" }, { "from": "human", "value": "begin\n require 'sha1'\nrescue LoadError\n # ruby1.9.x\n require 'digest/sha1'\n SHA1 = Dig...
ruby
chosen
[ { "from": "system", "value": "Change syntax for class method\n" }, { "from": "human", "value": "module Skmz\n class Schema\n include ActiveModel::Model\n attr_accessor :tables\n\n def self.load\n schema = Skmz::Schema.new(tables: [])\n table_names.each do |name|\n sche...
ruby
chosen
[ { "from": "system", "value": "Allow valutec variables to be defined in app\n" }, { "from": "human", "value": "require 'httparty'\nrequire 'singleton'\n\nmodule Valutec\n class Api\n include HTTParty\n include Singleton\n\n base_uri 'https://ws.valutec.net/Valutec.asmx'\n\n attr_acce...
ruby
chosen
[ { "from": "system", "value": "Fix signal code to allow easy modifications.\n" }, { "from": "human", "value": "require \"vapebot/command\"\nrequire \"vapebot/handler\"\nrequire \"vapebot/logger\"\n\nclass Bot\n include Command\n include Handler\n attr_reader :connection\n def initialize\n ...
ruby
chosen
[ { "from": "system", "value": "Add --warn option to CLI\n" }, { "from": "human", "value": "require 'thor'\nrequire 'clint_eastwood'\n# Clint Eastwood\nmodule ClintEastwood\n # Clint Eastwood command line interface\n class CLI < Thor\n option :path\n option :lint, type: :array\n option ...
ruby
chosen
[ { "from": "system", "value": "Fix uninitialized constant when used with Rails 3\n" }, { "from": "human", "value": "require 'action_dispatch'\nrequire 'exception_notifier/notifier'\n\nclass ExceptionNotifier\n def self.default_ignore_exceptions\n [].tap do |exceptions|\n exceptions << Ac...
ruby
chosen
[ { "from": "system", "value": "Reset digest instance before generating derived bytes\n" }, { "from": "human", "value": "module Krypt\n class PBKDF2\n include Krypt::Helper::XOR\n \n MAX_FACTOR = (2 ** 32) - 1\n\n def initialize(digest)\n @digest = digest\n @block_size = dig...
ruby
chosen
[ { "from": "system", "value": "Fix module inclusion order on Base\n" }, { "from": "human", "value": "module MotionRecord\n class Base\n include Persistence\n include ScopeHelpers\n include Serialization\n\n def initialize(attributes={})\n initialize_from_attribute_hash(attribute...
ruby
chosen
[ { "from": "system", "value": "Handle calling parent on top level concept\n" }, { "from": "human", "value": "class Types::ConceptType < Types::BaseObject\n graphql_name 'Concept'\n\n field :id, ID, null: false\n field :uid, String, null: false\n field :name, String, null: false\n field :pare...
ruby
chosen
[ { "from": "system", "value": "Add memoization to items in benchmarks.\n" }, { "from": "human", "value": "require 'tilt'\n\nclass ComplexView\n def header\n \"Colors\"\n end\n\n def item\n items = []\n items << { :name => 'red', :current => true, :url => '#red' }\n items << { :name...
ruby
chosen
[ { "from": "system", "value": "Add description for force update task and only update enabled projects\n" }, { "from": "human", "value": "namespace :cimonitor do\n desc \"Update the status for each active project\"\n task :fetch_statuses => :environment do\n if Delayed::Job.count.zero?\n ...
ruby
chosen
[ { "from": "system", "value": "Include more details on /etc/nochef\n" }, { "from": "human", "value": "## aborts a chef run if /etc/nochef exists. this allows for manual maintenance\n## to be performed without worrying about someone (or some *thing*) coming along\n## and restarting chef on you.\n...
ruby
chosen
[ { "from": "system", "value": "Update ruby-kafka version to v0.4\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.authors = [\"Hidemasa Togashi\", \"Masahiro Nakagawa\"]\n gem.email = [\"togachiro@gmail.com\", \"repeatedly@gmail...
ruby
chosen
[ { "from": "system", "value": "Fix NoMethodError when using format.any responder\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire \"uri\"\n\nmodule Railsdav\n class Renderer\n class ResponseCollector\n attr_writer :controller\n\n delegate :subresources,\n :to...
ruby
chosen
[ { "from": "system", "value": "Improve integration test for Secret::Schema\n" }, { "from": "human", "value": "require 'gir_ffi_test_helper'\n\ndescribe \"The generated Secret module\" do\n describe \"Secret::Schema\" do\n it \"has a working constructor\" do\n begin\n GirFFI.setup ...
ruby
chosen