conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Create new match with number of players\n"
},
{
"from": "human",
"value": "class Api::V1::MatchesController < ApplicationController\n\n def index\n matches = Match.by_players(current_user.players)\n render json: { matches: matches.serialize_with(MatchesSerial... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust expectation to unparser change\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mutant::Loader::Eval, '.run' do\n\n subject { object.run(node, mutation_subject) }\n\n let(:object) { described_class ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for index on medical_condition and user for an condition.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n# ConditionTest is the model test and validations for a condition\nclass ConditionTest < ActiveSupport::TestCase\n def setup\n @conditi... | ruby | chosen |
[
{
"from": "system",
"value": "Set dassie rails defaults to 6.0\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.require(*Rails.groups)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Put CookieMonster before ActionDispatch::Cookies - that way Rack::Cache won't come between them and mess things up"
},
{
"from": "human",
"value": "require 'dragonfly'\nrequire 'rails'\n\nmodule Dragonfly\n class Railtie < ::Rails::Railtie\n initializer \"dragon... | ruby | chosen |
[
{
"from": "system",
"value": "Deal with zero offsets for an FSEG entry\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\n\n# An InnoDB file segment entry, which appears in a few places, such as the\n# FSEG header of INDEX pages, and in the TRX_SYS pages.\n\nclass Innodb::FsegEntry\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add the runner class into the report message\n"
},
{
"from": "human",
"value": "require 'pronto'\nrequire 'foodcritic'\n\nmodule Pronto\n class FoodCritic < Runner\n def run\n return [] if paths[:cookbook_paths].none? && paths[:role_paths].none?\n\n @l... | ruby | chosen |
[
{
"from": "system",
"value": "Add some better documentation to the hack.\n"
},
{
"from": "human",
"value": "module Spree\n class UserClassHandle\n # Super hack to get around load order.\n def to_s\n Spree.user_class.to_s\n end\n end\nend\n"
},
{
"from": "gpt",
"value"... | ruby | chosen |
[
{
"from": "system",
"value": "Add Validations to ActiveModel for reusability\n"
},
{
"from": "human",
"value": "module Sluggable\n class Railtie < Rails::Railtie\n initializer 'sluggable.configure_rails_initialization' do\n ActiveRecord::Validations.send :include, Sluggable::Validations... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task that generates fake logs\n\n[#101889132]\n"
},
{
"from": "gpt",
"value": "namespace :fake_logs do\n desc \"Generates fake logs entries\"\n task generate: :environment do\n count = ENV[\"COUNT\"].to_i\n set_uuid = SecureRandom.uuid\n count.tim... | ruby | chosen |
[
{
"from": "system",
"value": "Add Saimon to author list"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'mock_server'\n s.version = '0.1.5'\n s.summary = \"Mock you're entire application\"\n s.author = 'Charles Barbier'\n s.email = 'unixch... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the \".\" in the summary to conform to the rest of the CP commands"
},
{
"from": "human",
"value": "module Pod\n class Command\n class Keys < Command\n include ProjectDirectory\n\n require 'pod/command/keys/list'\n require 'pod/command/keys... | ruby | chosen |
[
{
"from": "system",
"value": "Make Bower module methods private\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule SassPaths\n module Bower\n\n PERMITTED_FILE_EXTENSIONS = ['.scss', '.sass'].freeze\n\n def get_bower_sass_paths(bower_path)\n sass_paths = []\n Dir[\"#{bow... | ruby | chosen |
[
{
"from": "system",
"value": "Use timeout as documentation states\n"
},
{
"from": "human",
"value": "module Slowpoke\n class Railtie < Rails::Railtie\n\n initializer \"slowpoke\" do\n Rack::Timeout.service_timeout = Slowpoke.timeout\n ActiveRecord::Base.logger.class.send(:include, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActiveRecord 5 deprecation warning\n"
},
{
"from": "human",
"value": "require 'active_record'\n\nmodule WithModel\n class Table\n def initialize name, options = {}, &block\n @name = name.freeze\n @options = options.freeze\n @block = block\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary check and parentheses.\n"
},
{
"from": "human",
"value": "class CorporateInformationPagesController < DocumentsController\n prepend_before_filter :find_organisation\n\n def show\n @corporate_information_page = @document\n\n if @organisatio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix post cache when doing state transitions\n"
},
{
"from": "human",
"value": "module Crowdblog\n module Admin\n class TransitionsController < Crowdblog::Admin::BaseController\n respond_to :json\n before_filter :load_post, only: [:create]\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Add fuzziness as AUTO to ES query\n"
},
{
"from": "human",
"value": "class Business < ActiveRecord::Base\n #Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL'], log: true\n include Elasticsearch::Model\n include Elasticsearch::Mod... | ruby | chosen |
[
{
"from": "system",
"value": "Use include? over regex matching for mappings\n"
},
{
"from": "human",
"value": "module TimeLogRobot\n module JIRA\n class IssueKeyParser\n class << self\n def parse(entry)\n matches = entry['description'].match(/(\\[(?<issue_key>[^\\]]*)\\]... | ruby | chosen |
[
{
"from": "system",
"value": "Add % to VatRate.to_s output.\n"
},
{
"from": "human",
"value": "class VatRate < ChargeRate\n scope :full, where(:code => 'full')\n scope :reduced, where(:code => 'reduced')\n scope :special, where(:code => 'special')\n scope :excluded, where(:code => 'excluded'... | ruby | chosen |
[
{
"from": "system",
"value": "Bump podspec version to 1.0.0 :tada:\n"
},
{
"from": "human",
"value": "version = \"0.0.3\"\n\nPod::Spec.new do |s|\n s.name = \"UICollectionViewLeftAlignedLayout\"\n s.version = version\n s.summary = \"A layout for UICollectionView that aligns ... | ruby | chosen |
[
{
"from": "human",
"value": "Add SilentAssay to compliment OutputAssay.\n"
},
{
"from": "gpt",
"value": "require_relative 'output_assay'\n\n# Assert that there is no output, either from stdout or stderr.\n#\n# SilentAssay.pass?{ puts 'foo!' } #=> false\n#\nclass SilentAssay < OutputAssay\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "test/cli: Add tests for `kbsecret commands`\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"helpers\"\n\n# Tests for KBSecret::CLI::Command::Commands\nclass KBSecretCommandCommandsTest < Minitest::Test\n include Helpers\n include Helpers... | ruby | chosen |
[
{
"from": "human",
"value": "Create unique addresses by default.\n"
},
{
"from": "gpt",
"value": "require 'spree/testing_support/factories'\nrequire 'securerandom'\n\nFactoryGirl.modify do\n # Modify the address factory to generate unique addresses.\n factory :address do\n address2 { Secure... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec test to verify zlib1g-dev package is installed\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'xml::default' do\n let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }\n\n it 'installs the XML package' do\n expect(ch... | ruby | chosen |
[
{
"from": "system",
"value": "Handle can_edit? with no person\n"
},
{
"from": "human",
"value": "module PeopleHelper\n # Is current Person an administrator?\n def administrator?\n current_person.try :administrator?\n end\n\n # Is current Person a promoter?\n def promoter?\n current_pe... | ruby | chosen |
[
{
"from": "system",
"value": "Edit git secrets --register-aws to allow re-running\n"
},
{
"from": "human",
"value": "include_recipe 'sprout-git::git_hooks'\n\ngit_hooks_global_dir = node['sprout']['git']['git_hooks_global_dir']\n\nif node['platform'] == 'mac_os_x'\n package 'git-secrets'\nelse\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a to_s method so that Presenters being dumped (ie. in exceptions) aren't 8 billion lines long\n"
},
{
"from": "human",
"value": "module Compendium::Presenters\n class Base\n def initialize(template, object)\n @object = object\n @template = template... | ruby | chosen |
[
{
"from": "system",
"value": "Add SSO to all controllers."
},
{
"from": "human",
"value": "require 'specialist_publisher_wiring'\n\nclass ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n SpecialistPublisherWiring.inject_into(self)\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak invitation finding for controller\n"
},
{
"from": "human",
"value": "class InvitationsController < OrganizationController\n skip_before_filter :publically_accessible\n before_filter :find_invitation, only: [:accept, :decline, :show]\n\n def index\n @invi... | ruby | chosen |
[
{
"from": "system",
"value": "Add hysteresis to the allowed params.\n"
},
{
"from": "human",
"value": "class ThermostatsController < ApplicationController\n respond_to :html, :json\n\n def update\n @thermostat = Thermostat.find( params[:id] )\n\n @thermostat.update_attributes( thermostat... | ruby | chosen |
[
{
"from": "system",
"value": "Remove indent of product description on iPhone\n\nOur HTML formatting plugin for product descriptions adds whitespace to\nthe beginning of the description text. While that shouldn't be rendered\nin HTML, Safari on iPhone was showing a whitespace and therefore moving\nthe text a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue when checking original_user for deleting envelopes\n"
},
{
"from": "human",
"value": "require 'administrative_account'\n\n# Validates that the same public key is used when updating/deleting an envelope\nclass OriginalUserValidator < ActiveModel::Validator\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded Gem::Text import statement\n"
},
{
"from": "human",
"value": "require \"rubygems/text\"\n\nclass GemTypo\n attr_reader :protected_gem\n\n include Gem::Text\n\n def initialize(rubygem_name)\n @rubygem_name = rubygem_name\n end\n\n def protecte... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Put this in `/usr/bin` because the test box has a weird PATH var\"\n\nThis reverts commit 5a802ee0a2aa68d172c1aca5b8819de9e6d74d54 [formerly 74bf92c9d52527f5736aad44cbe46606f10f329f].\n\n\nFormer-commit-id: 6bcbb39edca2943be3b7ed62c5606fffdf2def1d"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Update get_help feature so that current builds pass\n"
},
{
"from": "human",
"value": "Then /^the output should say the file \"([^\"]*)\" was created$/ do |file|\n steps %{Then \"the output should match /create(.+)#{file}/\"}\nend\n\nThen /^the file \"([^\"]*)\" sh... | ruby | chosen |
[
{
"from": "system",
"value": "Use more typical pavlov for integration tests.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Interactors::Users::Delete do\n include PavlovSupport\n\n it 'persistant stores the delete flag' do\n user = create :full_user\n initial_usern... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing files from last commit\n"
},
{
"from": "gpt",
"value": "module DissociatedIntrospection\n class RubyClass\n class Def\n\n def initialize(ast:)\n @ast = ast\n end\n\n def name\n ast.children[0]\n end\n\n def argum... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the search builder to be injectable\n"
},
{
"from": "human",
"value": "module Qa::Authorities\n class FindWorks < Qa::Authorities::Base\n def search(_q, controller)\n # The FindWorksSearchBuilder expects a current_user\n return [] unless controll... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for session hash loading\n"
},
{
"from": "gpt",
"value": "require 'minitest/autorun'\nrequire 'rack/session/abstract/id'\n\ndescribe Rack::Session::Abstract::SessionHash do\n attr_reader :hash\n\n def setup\n super\n store = Class.new do\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise ArgumentError if block is missing.\n"
},
{
"from": "human",
"value": "module Metacrunch\n class Job::Dsl\n require_relative \"dsl/helper\"\n require_relative \"dsl/bundler_support\"\n require_relative \"dsl/option_support\"\n\n def initialize(job)... | ruby | chosen |
[
{
"from": "system",
"value": "Move 'Photos' framework from required framework list to optional one.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'POSInputStreamLibrary'\n s.version = '2.0.0'\n s.license = 'MIT'\n s.summary = 'NSInputStream impleme... | ruby | chosen |
[
{
"from": "system",
"value": "Set up table view with NSFetchedResultsController as data source\n"
},
{
"from": "human",
"value": "class RootViewController < UITableViewController\nend\n"
},
{
"from": "gpt",
"value": "class RootViewController < UITableViewController\n def viewDidLoad... | ruby | chosen |
[
{
"from": "system",
"value": "Add test-unit dependency to the gemspec\n"
},
{
"from": "human",
"value": "lib = File.expand_path('.', File.dirname(__FILE__))\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'metasm'\n\nGem::Specification.new do |s|\n s.name = 'metasm'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gemspec, is MIT\n\nCloses #7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nGem::Specification.new do |s|\n s.name = \"vast\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable turbolinks for edit page link"
},
{
"from": "human",
"value": "module Refinery\n module SiteBarHelper\n\n # Generates the link to determine where the site bar switch button returns to.\n def site_bar_switch_link\n link_to_if(admin?, t('.switch_to... | ruby | chosen |
[
{
"from": "system",
"value": "Set default criteria for FilterTypes::Records\n"
},
{
"from": "human",
"value": "module ReportsKit\n module Reports\n module FilterTypes\n class Records < Base\n DEFAULT_CRITERIA = {}\n\n def apply_conditions(records)\n case criteria[... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded small caps module\n"
},
{
"from": "human",
"value": "module Typeset\n # Holds convenience methods for acronym detection\n module SmallCaps\n def self.remove_cruft(word)\n trailing = \"\"\n leading = \"\"\n\n if word =~ /([A-Z][A-Z... | ruby | chosen |
[
{
"from": "system",
"value": "Fix shadowing outer variable warning\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nclass Nokogiri::HTML::Document\n # Returns an array of lower-cased <meta name=\"ROBOTS\"> tokens. If\n # no tag is found, returns an empty array. An optional\n # +cust... | ruby | chosen |
[
{
"from": "system",
"value": "Add descriptions to rake tasks\n"
},
{
"from": "human",
"value": "require 'lib/init'\n\n@server_names = []\n\nSERVERS.each do |k,v|\n @server_names << k\nend\n\n@message = ENV[\"m\"] || ENV[\"M\"]\n\ndef message\n unless @message\n $stdout.print \"Enter a commi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove uniquness requirement on HRDs b/c it's incompatible with Paranoid\n"
},
{
"from": "human",
"value": "class CreateHrds < ActiveRecord::Migration[5.0]\n def change\n create_table :hrds do |t|\n t.string :year, null: false\n t.integer :status, defa... | ruby | chosen |
[
{
"from": "system",
"value": "Use head instead of render nothing: true\n"
},
{
"from": "human",
"value": "module TwoFactorAuthentication\n module Controllers\n module Helpers\n extend ActiveSupport::Concern\n\n included do\n before_action :handle_two_factor_authentication\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Install generator actions order fixed\n"
},
{
"from": "human",
"value": "module SuperbTextConstructor\n module Generators\n # Generator that installs all the parts of gem\n class InstallGenerator < ::Rails::Generators::Base\n\n def generate_migrations\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update other instances of module_eval to module_exec if it needed parameters\n"
},
{
"from": "human",
"value": "require 'naught/null_class_builder/command'\n\nmodule Naught\n class NullClassBuilder\n module Commands\n class PredicatesReturn < Naught::NullCl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redis server patch for container-based trusty\n\nas it is no longer needed.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class FixCont... | ruby | chosen |
[
{
"from": "system",
"value": "Check if admin is authenticated.\n"
},
{
"from": "human",
"value": "class AdminController < ApplicationController\n layout 'admin'\n # TODO:30 add devise auth verification in order to prevent normal users to have access\n def index\n end\nend\n"
},
{... | ruby | chosen |
[
{
"from": "system",
"value": "Fix plugin webpack watched paths\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nbegin\n require \"rails/railtie\"\nrescue LoadError\nelse\n class CustomFieldsProgressPlugin\n class Railtie < Rails::Railtie\n base_path = File.join(File.... | ruby | chosen |
[
{
"from": "system",
"value": "Make our instance helper to dealing with tar files use our tar_helper. Remove the extracted mess if requested.\n"
},
{
"from": "human",
"value": "# This will not download Java from anywhere.\n# Take the path to a compress tarball containing Java\n# Extract Java to d... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade to bundler v2.1.4 so that Github Actions will work.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jsonapi/matchers/version'\n\nGem::Specificat... | ruby | chosen |
[
{
"from": "system",
"value": "Remove specific version from pry\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails_sortable/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure vendor dir exists.\n"
},
{
"from": "human",
"value": "namespace :configure do\n task :\"3rdparty\" do\n system \"make -C vendor -f ../Sourcefile\"\n end\n\n # desc \"Install dependencies\"\n task :dependencies do\n binaries = %w(daemon monit sshd... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in s.source version number\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"TDNotificationPanel\"\n s.version = \"0.3\"\n s.summary = \"TDNotificationPanel is a drop in class that displays a notification panel.\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Create 1 enrolment to avoid duplicate error\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :project do\n unit\n campus\n user\n\n after(:create) do |project|\n create_list(:tutorial_enrolment, 3, project: project)\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Read the percentage from the config file.\n"
},
{
"from": "human",
"value": "require 'construct'\n\nmodule Bruce\n module ::ActionView\n class Config\n attr_reader :percent\n\n def load\n @percent = 20\n end\n\n def save\n # Cre... | ruby | chosen |
[
{
"from": "system",
"value": "Handle possible invalid URIs in Wayback Machine collector\n"
},
{
"from": "human",
"value": "require 'uri'\n\nmodule Aquatone\n module Collectors\n class WaybackMachine < Aquatone::Collector\n self.meta = {\n :name => \"Wayback Machine\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move Common.cmd(:systemctl) calls to a private method\n"
},
{
"from": "human",
"value": "module LinuxAdmin\n class SystemdService < Service\n def running?\n Common.run(Common.cmd(:systemctl),\n :params => {nil => [\"status\", name]}).exit_st... | ruby | chosen |
[
{
"from": "system",
"value": "Update validation for Rails 3\n"
},
{
"from": "human",
"value": "namespace :db do\n desc \"Change all location report emails to fake addresses\"\n\n task :fake_location_report_emails => :environment do\n task_start_time = Time.now\n\n puts \"Start changing e... | ruby | chosen |
[
{
"from": "system",
"value": "Use sort_by instead of order when sorting the categories\n\nThe command 'order' did not work in the staging database\n(maybe because of different database versions)\nso we changed that to the ruby command sort_by\n"
},
{
"from": "human",
"value": "class Category < A... | ruby | chosen |
[
{
"from": "system",
"value": "Use association as a uniqueness scope not the actual column name\n"
},
{
"from": "human",
"value": "class Notebook < ActiveRecord::Base\n belongs_to :user\n\n validates :name, presence: true\n validates :name, uniqueness: { scope: :user_id }\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Validate To Ensure User Doesn't Add Same Photo\n"
},
{
"from": "human",
"value": "class Question < ActiveRecord::Base\n\n belongs_to :user\n has_many :responses, dependent: :destroy\n\n validates :image_path, presence: true\n validates_format_of :image_path, :wi... | ruby | chosen |
[
{
"from": "system",
"value": "Correct error that appears and added refund controller\n"
},
{
"from": "human",
"value": "Spree::Core::Engine.routes.append do\n namespace :admin do\n scope :barcode do\n get \"/print/:id\" => \"barcode#print\"\n get \"/code/:id\" => \"barcode#code\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Consider locales in route of Places\"\n\nThis reverts commit a0a6592c4dc1fabab4d531f92c1b703b39f89efd.\n"
},
{
"from": "human",
"value": "NanoApi::Engine.routes.draw do\n resources :searches, only: [:show, :new, :create] do\n resources :clicks, only: :s... | ruby | chosen |
[
{
"from": "system",
"value": "Correct call to Spree::Dash::Config.configured? within Admin::OverviewController\n"
},
{
"from": "human",
"value": "module Spree\n class Admin::OverviewController < Admin::BaseController\n before_filter :check_last_jirafe_sync_time, :only => :index\n\n JIRAFE... | ruby | chosen |
[
{
"from": "human",
"value": "Make it possible to generate every variation of sentence structure\n"
},
{
"from": "gpt",
"value": "require 'rule_based'\n\ndef generate_all(phrase)\n case phrase\n when []\n [[]]\n when Array\n combine_all(generate_all(phrase[0]),\n generate_... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for G in size munger\n"
},
{
"from": "human",
"value": "module EasyType\n\tmodule Mungers\n\t\tmodule Integer\n\n\t\t ##\n\t\t #\n\t\t #\n\t\t\tdef munge(value)\n\t\t\t\tInteger(value)\n end\n\n\t\tend\n\n\t\tmodule Size\n\n\t\t\tdef munge(size)\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to use built-in matrix operations\n"
},
{
"from": "human",
"value": "require 'matrix'\n\nmodule GameOfLife\n class Grid < Matrix\n\n def adjacent(row, column)\n x_min, x_max = [row - 1, 0].max, [row + 1, column_size - 1].min\n y_min, y_max = [... | ruby | chosen |
[
{
"from": "system",
"value": "Allow you to customize the default branch to compare against\n"
},
{
"from": "human",
"value": "module Glimpse\n module Views\n class Git < View\n def initialize(options = {})\n @sha = options.delete(:sha)\n @nwo = options.delete(:nwo)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to work bundle install on Travis-CI\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'poteti/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new d... | ruby | chosen |
[
{
"from": "system",
"value": "Check for Rails::Railtie instead of Rails"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\n\nrequire 'mongoid/userstamp'\nrequire 'mongoid/userstamp/version'\nrequire 'mongoid/userstamp/config/gem_config'\nrequire 'mongoid/userstamp/config/model_config'\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix eager loading decrepation warning\n\nThis commit changes the inclusion of the ControllerMixin to be loaded after ActionController::Base is loaded."
},
{
"from": "human",
"value": "module RailsOps\n # @private\n class Railtie < Rails::Railtie\n initializer '... | ruby | chosen |
[
{
"from": "system",
"value": "Use UTF-8 as default when decoding gzip\n"
},
{
"from": "human",
"value": "require 'zlib'\n\nmodule RestSpy\n module Encoding\n extend self\n\n def decode(input, encoding)\n case encoding\n when 'gzip'\n ungzip(input)\n when 'defla... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to handle custom delimiters\n"
},
{
"from": "human",
"value": "class StringCalculator\n def add(pattern=\"\")\n sum(extract_numbers(pattern))\n end\n\n private\n def extract_numbers(pattern)\n pattern.split(allowed_delimiters).compact.map(&:to_i) << ... | ruby | chosen |
[
{
"from": "system",
"value": "Add as(user) method to the step runner.\n"
},
{
"from": "human",
"value": "module Tango\n # A step's block is instance_execed against one of these. It provides all the\n # methods accessible from within the step.\n class StepRunner\n\n def initialize(dance = n... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundler as the only development dependency"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/substation/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"substation\"\n gem.version = S... | ruby | chosen |
[
{
"from": "system",
"value": "Arq3: Fix license, add name stanza"
},
{
"from": "human",
"value": "cask :v1 => 'arq3' do\n version '3.3.4'\n sha256 '2b4317b83d14090764f2134d4cc0fa3ee18b102974cff935f47a8afb4b3860a2'\n\n url \"http://www.haystacksoftware.com/arq/Arq_#{version}.zip\"\n homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Atom to version 1.0.11.\n"
},
{
"from": "human",
"value": "cask :v1 => 'atom' do\n version '1.0.10'\n sha256 'afa74f10054c9bea5eb5d43f792a211449d26f56ec9aeabf0fd1dcf3ac7149db'\n\n # github.com is the official download host per the vendor homepage\n url \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix download links for Onyx on Mountain Lion, Mavericks, and Yosemite; Add tests and links for Onyx under Tiger and Leopard\n"
},
{
"from": "human",
"value": "cask :v1 => 'onyx' do\n version :latest\n sha256 :no_check\n\n if MacOS.version == :snow_leopard\n ur... | ruby | chosen |
[
{
"from": "system",
"value": "Add typhoeus as a dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cropster/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add tvos platform to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Gloss\"\n s.version = \"0.5.3\"\n s.summary = \"A shiny JSON parsing library in Swift\"\n s.description = \"A shiny JSON parsing library in Swift... | ruby | chosen |
[
{
"from": "human",
"value": "Add a 'gitlab-ctl deploy-page' command\n"
},
{
"from": "gpt",
"value": "#\n# Copyright:: Copyright (c) 2014 GitLab B.V.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file excep... | ruby | chosen |
[
{
"from": "system",
"value": "Add .gitkeeps for stylesheet and javascript directories\n"
},
{
"from": "human",
"value": "class Rafters::ComponentGenerator < Rails::Generators::NamedBase\n source_root File.expand_path(\"../templates\", __FILE__)\n class_option :stylesheet, type: :boolean, defau... | ruby | chosen |
[
{
"from": "system",
"value": "Add to install generators default_request action\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Generators\n # Create an class for generate a installing\n class InstallGenerator < Rails::Generators::Base\... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude test files from the gem package\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n# frozen_string_literal: true\n\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'action_args/version'\n\nGem::Specification.new do |s|\n s.name = '... | ruby | chosen |
[
{
"from": "system",
"value": "Fix scary search behavior on terms containing dash character\n"
},
{
"from": "human",
"value": "module ChefZero\n module Solr\n module Query\n class RegexpableQuery\n def initialize(regexp_string, literal_string)\n @regexp_string = regexp_st... | ruby | chosen |
[
{
"from": "system",
"value": "Use the same db other tests use.\n"
},
{
"from": "human",
"value": "require_relative 'helper'\n\ndescribe 'Adapter' do\n supported_by Swift::DB::Postgres do\n describe 'async operations' do\n it 'can runs queries async' do\n rows = []\n pool =... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec to demonstrate that disabled features are not included in get_all\n"
},
{
"from": "human",
"value": "require 'helper'\nrequire 'flipper/adapters/active_record'\nrequire 'flipper/spec/shared_adapter_specs'\n\n# Turn off migration logging for specs\nActiveRec... | ruby | chosen |
[
{
"from": "system",
"value": "Add a link_to_infowindow helper method\n"
},
{
"from": "human",
"value": "module MapItHelper\n \n def add_map(div, points, options = {})\n points = points.to_markers unless points.compact.first.class == Hash\n content_for :mapit do\n <<-END\n <sc... | ruby | chosen |
[
{
"from": "system",
"value": "Check before accidentally blowing away a shared database\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'database_cleaner'\n\nlogfile = File.expand_path('log/test.log')\nFileUtils.mkdir_p File.dirname(logfile)\nActiveRecord::Base.logger = Logger.n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debugging code in failing spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Search for product' do\n let!(:product) { FactoryGirl.create(:product, name: 'Organic Cotton Romper') }\n\n background do\n FactoryGirl.create(:website)\... | ruby | chosen |
[
{
"from": "system",
"value": "Work on Posts controller--protections and new posts\n"
},
{
"from": "human",
"value": "class PostsController < ApplicationController\n def index\n end\n\n def show\n end\n\n def new\n \tredirect_to root_url if !logged_in?\n \t@post = Post.new\n end\n\n def ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.