conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Fix SimileController that broke with the plugin change\n\ngit-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@522710 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "# The ASF licenses this file to You under the Apache License, Version 2.0\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Use the gem version on the cache key\n"
},
{
"from": "human",
"value": "require 'sii_chile'\nrequire 'sinatra'\nrequire 'dalli'\nrequire 'rack/contrib/jsonp'\nrequire 'multi_json'\nrequire 'newrelic_rpm'\nrequire 'statsmix'\n\nmodule SIIChile\n class Application < ... | ruby | chosen |
[
{
"from": "system",
"value": "Use 0-9 not 0-8 for random number\n"
},
{
"from": "human",
"value": "class BenchController < ApplicationController\n before_filter :find_records\n\n private\n def find_records\n @records = (1..500).map do |n|\n rand(9)\n end\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add before_action and set_book method\n"
},
{
"from": "human",
"value": "class BooksController < ApplicationController\n\n before_action :authorize_user, only: [:new, :create, :edit, :update, :destroy]\n\n def index\n\n params[:author_id] ? set_author_books_vie... | ruby | chosen |
[
{
"from": "system",
"value": "Add charset to theme stylesheets/javascripts, as the test indicates it should be there\n\ngit-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@1313 820eb932-12ee-0310-9ca8-eeb645f39767\n"
},
{
"from": "human",
"value": "class ThemeController < ContentController\n c... | ruby | chosen |
[
{
"from": "system",
"value": "UsersController: Simplify conditions of logged_in_user filter.\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n before_filter :logged_in_user, only: [:edit, :update, :show, :index, :destroy]\n before_filter :correct_user, only: ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Auto Login After Sign Up Successfully\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def show\n @user = current_user\n end\n\n def new\n @user = User.new\n end\n\n def create\n @user = User.new(user_params)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove grouping method from helper\n\nThis is now done in the presenter.\n"
},
{
"from": "human",
"value": "require 'htmlentities'\n\nmodule TravelAdviceHelper\n def group_by_initial_letter(countries)\n groups = countries.group_by do |country|\n country.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor response when applying coupon code for DRYness\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Spree\n class CouponCodesController < Spree::StoreController\n before_action :load_order, only: :create\n around_action :lock_or... | ruby | chosen |
[
{
"from": "system",
"value": "[podspec] Make description work without link\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Imperio\"\n s.version = \"1.0.0\"\n s.summary = \"Keep the screen flow and data handling logic out of your view controllers.\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 'vendor' from s.files in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'git-up/version'\n\nGem::Specification.new do |s|\n s.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Make all elements able to be set\n"
},
{
"from": "human",
"value": "require 'rss/atom/feed_history'\nrequire 'rss/maker'\n\nmodule RSS\n module Maker\n module Atom\n module FeedHistory\n class << self\n def append_features(klass)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add new model for Config\n"
},
{
"from": "gpt",
"value": "module Schnitzelpress\n module Model\n class Config\n include DataMapper::Resource\n\n property :id, String, :key => true\n timestamps :at\n property :blog_title, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some vertical spacing between restaurant messages\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Restaurant\n class DailyMenu < ApplicationRecord\n belongs_to :restaurant, class_name: 'BaseRestaurant', foreign_key: 'restaurant_id'... | ruby | chosen |
[
{
"from": "system",
"value": "Add LICENSE and Rakefile to distributed gem\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'fabrication/version'\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration to use a reference\n"
},
{
"from": "human",
"value": "class CreateOauthClientRedirectUris < ActiveRecord::Migration\n def change\n create_table :oauth_client_redirect_uris do |t|\n t.integer :client_id\n t.string :uri\n\n t.timest... | ruby | chosen |
[
{
"from": "system",
"value": "Add post method for user login\n"
},
{
"from": "human",
"value": "# registration\nget \"/users/new\" do\n erb :register\nend\n\npost \"/users/new\" do\n @user = User.new(email: params[:email], password: params[:password])\n if @user && @user.password == params[:p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with frozen constants in RailsAdmin at v1.0.0\n\nFixes #17\n"
},
{
"from": "human",
"value": "module RailsAdmin\n module Extensions\n module PaperTrail\n class VersionProxy\n def message\n @message = @version.event\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert 'Fix to investigate cause of \"Bad file descriptor\" error on Windows and Ruby 2.7+'\n\nThis reverts commit 587f40c211f69545b3af14af7e788821f2b59e9e.\n"
},
{
"from": "human",
"value": "require 'tty-table'\nrequire 'bundle_outdated_formatter/formatter'\n\nmodu... | ruby | chosen |
[
{
"from": "system",
"value": "Add aws credential profile to s3 state configuration\n\nIt can be common for people to have to manage multiple aws accounts and being able to specify which aws credential profile when using this gem is necessary for them."
},
{
"from": "human",
"value": "require 'aw... | ruby | chosen |
[
{
"from": "human",
"value": "Add implementation of fourteenth rule of disambiguator prefix\n"
},
{
"from": "gpt",
"value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule14\n def disambiguate(word)\n contains = /^men([cdjstz])(... | ruby | chosen |
[
{
"from": "human",
"value": "Add implementation of thirtieth-sixth rule of disambiguator prefix\n"
},
{
"from": "gpt",
"value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule36\n def disambiguate(word)\n contains = /^pe([bcdfg... | ruby | chosen |
[
{
"from": "system",
"value": "Fix superclass mismatch for exception.\n\nI couldn't find where the mismatch actually was happening... will have to look harder.\n"
},
{
"from": "human",
"value": "module Vagrant\n module Exceptions\n # Raised when an action sequence is trying to be run for an u... | ruby | chosen |
[
{
"from": "human",
"value": "Create a basic article of clothing class\n"
},
{
"from": "gpt",
"value": "class Article\n attr_reader :type, :fabric_type, :color\n \n def initialize(new_type, new_fabric_type, new_color)\n @type = new_type\n @fabric_type = new_fabric_type\n @color = new_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix no method error in gemspec.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'isimud/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to pass resource name as a symbol or a string\n"
},
{
"from": "human",
"value": "require \"pokegem/version\"\nrequire 'typhoeus'\nrequire 'json'\n\nmodule Pokegem\n class << self\n BASE_URL = 'http://pokeapi.co/api/v1'\n RESOURCES = %w(pokedex po... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a silly spelling mistake\n"
},
{
"from": "human",
"value": "require \"scrunch/version\"\nrequire \"scrunch/meta\"\nrequire \"scrunch/transcode\"\nrequire \"scrunch/main\"\n\n# Scunches.\nmodule Scrunch end\n"
},
{
"from": "gpt",
"value": "require \"s... | ruby | chosen |
[
{
"from": "system",
"value": "Change 'redis_port' to 'port' for consistency\n"
},
{
"from": "human",
"value": "require 'redis'\n\nrequire \"ssearch/version\"\nrequire \"ssearch/token_former\"\nrequire \"ssearch/index\"\n\nclass Ssearch\n def initialize( segmenter: -> string { string.split /\\s... | ruby | chosen |
[
{
"from": "system",
"value": "Load action runner before all other files\n"
},
{
"from": "human",
"value": "libdir = File.dirname(__FILE__)\n$:.unshift(libdir)\nPROJECT_ROOT = File.join(libdir, '..') unless defined?(PROJECT_ROOT)\n\n# The libs which must be loaded prior to the rest\n%w{tempfile o... | ruby | chosen |
[
{
"from": "system",
"value": "Update TABLE_DUM and TABLE_DEE constants to be defined similarly\n"
},
{
"from": "human",
"value": "require 'set'\n\nrequire 'veritas/support/abstract_class'\nrequire 'veritas/support/operation/binary'\nrequire 'veritas/support/optimizable'\n\nrequire 'veritas/relat... | ruby | chosen |
[
{
"from": "system",
"value": "Enforce Rails 5.2 (beta) dependency.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nGem::Specification.new do |spec|\n spec.name = 'joiner'\n spec.version = '0.3.4'\n spec.authors = ['Pat Allan']\n spec.email = ['pat@freelancing... | ruby | chosen |
[
{
"from": "human",
"value": "Add helpers for links to archived notes\n"
},
{
"from": "gpt",
"value": "module CalendarHelper\n def archived_note_link(version_data)\n note = YAML::load(version_data.object)\n version_note_path(note.fetch(\"id\"), version_data)\n end\n\n def current_note_li... | ruby | chosen |
[
{
"from": "system",
"value": "Make smtp_enabled is looked up on each callback\n\nUsers will want to turn on and off the SMTP enabled attribute and have\nthat reflected in real-time without requiring the Rails server to be\nrebooted for them to take effect. Previous implementation would only\nlook at smtp_en... | ruby | chosen |
[
{
"from": "system",
"value": "Replace case statement with map\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nGObject.load_class :ParamSpec\n\nmodule GObject\n # Overrides for GParamSpec, GObject's base class for parameter specifications.\n class ParamSpec\n def ref\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add accessor for genres on Tracks\n"
},
{
"from": "human",
"value": "require \"active_support/all\"\nmodule RackitScrobbler\n class Track\n attr_accessor :artist, :title, :album, :route, :partner_id, :duration, :scrobbled\n def initialize(params = {})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make publishing-api rake tasks more consistent\n"
},
{
"from": "human",
"value": "require \"gds_api/publishing_api_v2\"\n\nnamespace :publishing_api do\n desc \"Publish special routes such as the homepage\"\n task publish_special_routes: :environment do\n publi... | ruby | chosen |
[
{
"from": "system",
"value": "Declare methods as abstract rather than defining them to throw.\n"
},
{
"from": "human",
"value": "module Librarian\n module Source\n # Requires that the including source class have methods:\n # #path\n # #root_module\n module Local\n\n def ins... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve return from proc issue\n"
},
{
"from": "human",
"value": "require 'ocular/mixin/from_file'\nrequire 'ocular/dsl/fog'\nrequire 'ocular/dsl/ssh'\nrequire 'ocular/dsl/logging'\n\nclass Ocular\n module DSL\n\n class EventBase\n\n class Resul... | ruby | chosen |
[
{
"from": "system",
"value": "Use last column instead of generic merge\n"
},
{
"from": "human",
"value": "require \"hash_helper\"\nmodule SplitAccounts\n module Reports\n class ExportRawTransformer\n include HashHelper\n include ActionView::Helpers::NumberHelper\n\n def transf... | ruby | chosen |
[
{
"from": "human",
"value": "Fix yarn issue during deploy\n\nWhen running `rake assets:precompile`, `railties-6.1.0/lib/rails/tasks/yarn.rake` gets called\nand since we don't have yarn installed it will cause an exception.\n\nThere is an issue on this: https://github.com/rails/rails/issues/40795.\n\nWhen fi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix loading gem in initializer\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Swagger\n module Docs\n module Generator\n class InitializerGenerator < Rails::Generators::Base\n desc 'Generate a initliazer for Swagger Docs G... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to check controller will work properly with default model and customize model\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe LetsEncrypt::VerificationsController, type: :controller do\n routes {... | ruby | chosen |
[
{
"from": "system",
"value": "Modify first argument for Grape::Endpoint.new to fix error caused by calling a method on nil.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Grape::EndpointExtension' do\n\n subject { Grape::Endpoint.new(nil, {path: '/', method: 'foo'}) }\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update queue validity to 10 minutes to expire items in the airbursh queue\n\n\ngit-svn-id: 6d9b9a8f21f96071dc3ac7ff320f08f2a342ec80@80 daa9635f-4444-0410-9b3d-b8c75a019348\n"
},
{
"from": "human",
"value": "require 'starling'\nrequire 'timeout'\n\nmodule Airbrush\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the IO interface for StingIO too"
},
{
"from": "human",
"value": "class CSV2Avro\n class Schema\n attr_reader :avro_schema, :schema_io\n\n def initialize(schema_io)\n @schema_io = schema_io\n @avro_schema = Avro::Schema.parse(schema_io)\n end... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate two topical events to correct slugs\n\nThere's a corresponding pull request in Puppet to do the honours as far\nas redirecting goes.\n\nhttps://www.pivotaltracker.com/story/show/44803437\nhttps://www.pivotaltracker.com/story/show/44911919\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Increase version in podspec to 2.0.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'KeyboardResize'\n s.version = '1.1.0'\n s.license = 'MIT'\n s.summary = 'Automatically resize the view of your con... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing uuid gem dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/grooveshark/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"grooveshark\"\n s.version = Grooveshark::VERSION... | ruby | chosen |
[
{
"from": "system",
"value": "Access control for javascript clients.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n private\n\n def records_as_json_with_itemids(records, callback = nil)\n json = (records.map {|record| \"\\... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirection method to user_path when the user edit his account\n\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n def after_sign_in_path_for(resource_or_scope)\n # your... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old (manual) cors impelementation\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::API\n before_action :allow_cross_origin_requests, if: proc { Rails.env.development? }\n before_action :authenticate_user_from_token!, except... | ruby | chosen |
[
{
"from": "system",
"value": "Add after sign out path for to redirect to Login app after signing out\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n helper :institutions\n include InstitutionsHelper\n\n def url_for_request(re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to use production endpoint"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'yaml'\nrequire 'launchy'\nrequire 'highline'\n\nmodule Gemfury\n class Command < Thor\n include Gemfury::Platform\n\n desc \"version\" ,\"Check whether the gem is up-to-d... | ruby | chosen |
[
{
"from": "system",
"value": "Stop Rake from telling us every spec it's about to run.\n\nAs per\nhttps://github.com/rspec/rspec-core/issues/266#issuecomment-1866898\n"
},
{
"from": "human",
"value": "require 'rake'\nbegin\n require 'rspec/core/rake_task'\nrescue LoadError\nend\n"
},
{
"... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Android Studio.app to v0.6.1 build-135.1224218\n"
},
{
"from": "human",
"value": "class AndroidStudio < Cask\n url 'http://dl.google.com/dl/android/studio/ide-zips/0.6.0/android-studio-ide-135.1212210-mac.zip'\n homepage 'https://developer.android.com/sdk/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sporadic test failure on sorting IDs\n\nWhen comparing whole tables we need to sort by id, this was done with\n`#sort` instead of `#sort_by` leading to sporadic failures.\n"
},
{
"from": "human",
"value": "module OvirtRefresherSpecCommon\n extend ActiveSupport:... | ruby | chosen |
[
{
"from": "system",
"value": "Change asseritve name for RescueAssay is :rescued.\n"
},
{
"from": "human",
"value": "require_relative 'assertion'\n\n# Assert that a kind of exception class is rescued\n# from the execution of a block.\n#\nclass RescueAssay < Assertion\n\n register :rescue\n\n #\... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we're getting the file we expected\n\nThis is just an MD5 hash check on the body response that the action\nreturns to simplify the comparison steps involved for the test.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"File request... | ruby | chosen |
[
{
"from": "system",
"value": "9546: Raise error if mission is nil\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Email notifier, to send various emails\nclass Notifier < ApplicationMailer\n def password_reset_instructions(user, mission: nil)\n build_reset_url(user)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some interface to ElasticSchema::CLI\n"
},
{
"from": "human",
"value": "require 'optparse'\n\nmodule ElasticSchema\n\n class CLI\n end\n\nend\n"
},
{
"from": "gpt",
"value": "require 'optparse'\n\nmodule ElasticSchema\n\n class CLI\n\n COMMANDS... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak the budget bar width\n"
},
{
"from": "human",
"value": "module BudgetBarCalculable\n extend ActiveSupport::Concern\n\n def budget_bar_calculations(line)\n expenditures = Patient.pledged_status_summary line\n default_cash_ceiling = 1_000\n\n cash_spe... | ruby | chosen |
[
{
"from": "system",
"value": "Change the bundle content observer to extract all saveables.\n"
},
{
"from": "human",
"value": "class Dataservice::BundleContentObserver < ActiveRecord::Observer\n def after_create(bundle_content)\n bundle_content.extract_open_responses\n end\n\n def after_sav... | ruby | chosen |
[
{
"from": "system",
"value": "Add form to widget requires.\n"
},
{
"from": "human",
"value": "require 'cucumber/salad/widgets/widget'\nrequire 'cucumber/salad/widgets/atom'\nrequire 'cucumber/salad/widgets/list'\nrequire 'cucumber/salad/widgets/base_table'\nrequire 'cucumber/salad/widgets/auto_t... | ruby | chosen |
[
{
"from": "system",
"value": "Handle partial messages at the end of a message set\n\nAs an optimization, Kafka brokers are allowed to include partial\nmessages at the end of a message set -- these should be ignored by\nclients.\n"
},
{
"from": "human",
"value": "module Kafka\n module Protocol\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use interactor instead of repository\n"
},
{
"from": "human",
"value": "module OmniAuth\n module Strategies\n class Hanami\n include OmniAuth::Strategy\n\n option :auth_key, ->(params) { params['user']['email'] }\n option :password_key, ->(params)... | ruby | chosen |
[
{
"from": "system",
"value": "Remove v2 in url builder\n"
},
{
"from": "human",
"value": "require 'faraday_middleware'\nrequire 'faraday/response/raise_octokit_error'\n\nmodule Octokit\n # @private\n module Connection\n private\n\n def connection(authenticate=true, raw=false, version=3, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nil coercion error in Performance Competition Series\n"
},
{
"from": "human",
"value": "class PerformanceCompetitionSeries::Scoreboard::Standings::Row\n attr_accessor :rank\n attr_reader :competitor\n\n def initialize(competitor, results, rounds)\n @compet... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec to specific dependency version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n# 1\ns.platform = :ios\ns.ios.deployment_target = '9.0'\ns.name = \"caf_ios\"\ns.summary = \"caf_ios is a common application framework written in Swift for inter... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust specs for frozen emitter registry\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Unparser::Emitter, '.visit' do\n subject { object.visit(node, buffer) }\n let(:object) { described_class }\n\n let(:node) { mock('Node', :type => type)... | ruby | chosen |
[
{
"from": "system",
"value": "Update implementation to make it work\n"
},
{
"from": "human",
"value": "module StreamRails\n\n module SyncPolicy\n\n module SyncCreate\n\n def self.included(base)\n if base.respond_to? :after_commit\n base.after_commit :add_to_feed, on: :cr... | ruby | chosen |
[
{
"from": "system",
"value": "Use HEAD instead of master to count commits\n"
},
{
"from": "human",
"value": "module RunbyPace\n VERSION = \"0.2.#{`git rev-list --count master`}\"\nend\n"
},
{
"from": "gpt",
"value": "module RunbyPace\n VERSION = \"0.2.#{`git rev-list --count HEAD`}... | ruby | chosen |
[
{
"from": "system",
"value": "Add index to posts by feed and url\n"
},
{
"from": "human",
"value": "class CreatePosts < ActiveRecord::Migration\n def change\n create_table :posts do |t|\n t.integer :feed_id, null: false\n t.string :title\n t.string :author\n t.string :url... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task for generating frames file\n"
},
{
"from": "human",
"value": "namespace :asciinema do\n namespace :generate do\n desc \"Generate frames files\"\n task :frames => :environment do\n updater = AsciicastFramesFileUpdater.new\n\n Asciicast.... | ruby | chosen |
[
{
"from": "system",
"value": "Change implementation for version file generator\n"
},
{
"from": "human",
"value": "require 'grit'\n\nmodule Versionius\n\n class Builder\n def initialize(repository_path, version_file_path)\n @repository_path = repository_path\n @version_file_path = v... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Make sure opts is empty when we validate the options passed.\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@11124 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n module Firefox\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Test for mass assigning :admin boolean on User\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe User do\n\n subject {FactoryGirl.create :user}\n\n let(:fact) {FactoryGirl.create :fact}\n let(:child1) {FactoryGirl.create :fact}\n\n context \"I... | ruby | chosen |
[
{
"from": "human",
"value": "Adjust mail_marketing_lists to use context for admin and web_user\n"
},
{
"from": "gpt",
"value": "class AddMarketingUserIdForCurrentUser < ActiveRecord::Migration\n def up\n execute %Q{\nDROP VIEW \"1\".mail_marketing_lists;\nCREATE OR REPLACE VIEW \"1\".\"mail_... | ruby | chosen |
[
{
"from": "system",
"value": "Add check for ruby version\n\nbecause we are using stabby lambda operator we need ruby version 2.0 or\nhigher. This adds that check and fails if the user is running anything\nless than 2.0.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'optparse'\... | ruby | chosen |
[
{
"from": "system",
"value": "Make the Rails example track every pageview with Keen\n"
},
{
"from": "human",
"value": "# Filters added to this controller apply to all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n\nclass ApplicationCon... | ruby | chosen |
[
{
"from": "system",
"value": "Remove implementation-specific test for inspecting sub-nanosecond times\n\nThis doesn’t look like a sub-nanosecond time (123456.789 milliseconds is\nexactly 123456789 nanoseconds) but the representation error in the IEEE\n754 double-precision float used by MRI means that the fr... | ruby | chosen |
[
{
"from": "system",
"value": "Move parser warnings to 2.4\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../spec_helper\", __FILE__)\n\ndescribe \"Warning.warn\" do\n ruby_version_is \"2.4\" do\n it \"complains\" do\n -> {\n Warning.warn(\"Chunky bacon!\")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix potential bug (attr starting with href)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'httparty'\n\nclass Links\n\tdef initialize(str)\n\t\t@link = str\n\t\t@content = \"\"\n\tend\n\tdef getLinks() #find all links in body of page\n\t\tdownloadP... | ruby | chosen |
[
{
"from": "system",
"value": "Add YARDocstring to Spotify module\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire 'ffi'\n\nrequire 'spotify/version'\n\nmodule Spotify\n \nend"
},
{
"from": "gpt",
"value": "# coding: utf-8\nrequire 'ffi'\nrequire 'spotify/version'\n\n# FFI... | ruby | chosen |
[
{
"from": "system",
"value": "Use dotfile options for TextBox *and* Dog\n"
},
{
"from": "human",
"value": "require 'core_extensions/array/padding'\nrequire 'core_extensions/string/box'\nrequire 'dogsay/version'\nrequire 'dogsay/errors'\nrequire 'dogsay/ascii_art'\nrequire 'dogsay/dog'\nrequire '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove byebug require from installed file.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby\n\nrequire 'erubis'\n\nrequire 'erbtex/version'\nrequire 'erbtex/command_line'\nrequire 'erbtex/find_binary'\nrequire 'erbtex/runner'\n\nrequire 'byebug'\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Use the custom dashboard choices when available.\n\nload_constraints will still fall back to using the Interface default\nconstraints whenever the user has not set their own constraint\npreferences.\n"
},
{
"from": "human",
"value": "# Include all Methods that are n... | ruby | chosen |
[
{
"from": "system",
"value": "Set an empty array when updating an empty content element"
},
{
"from": "human",
"value": "class Pulitzer::ContentElementsController < Pulitzer::ApplicationController\n before_filter :set_content_element, only: [:show, :edit, :update]\n\n def show\n render part... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused debug from NumberOfGasConnections"
},
{
"from": "human",
"value": "module Market::Measures\n module NumberOfGasConnections\n def self.call(node, variants)\n # Rails.logger.info [\"=============\", variants[:gas].call].inspect\n if variant... | ruby | chosen |
[
{
"from": "system",
"value": "Allow more time to recover in the fuzz test\n"
},
{
"from": "human",
"value": "describe \"Producing a lot of messages with an unreliable cluster\", fuzz: true do\n let(:logger) { Logger.new(LOG) }\n let(:kafka) { Kafka.new(seed_brokers: KAFKA_BROKERS, client_id: \... | ruby | chosen |
[
{
"from": "human",
"value": "Remove index on users emails\n"
},
{
"from": "gpt",
"value": "class RemoveIndexEmailFromUsers < ActiveRecord::Migration\n def up\n remove_index(:users, :name => 'index_users_on_email')\n end\n\n def down\n add_index(:users, :name => 'index_users_on_email')\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect method for Infrataster::Server\n"
},
{
"from": "human",
"value": "require 'unit/spec_helper'\n\nmodule Infrataster\n module Plugin\n # Infrataster plugin firewall\n module Firewall\n describe Util do\n describe 'address' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make CoverageStat a utility module\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nmodule Coco\n\n # Give statistics about an array of lines hit.\n #\n # An \"array of lines hit\" is an array of integers, possibly nil.\n # Such array is obtain fr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up generated apps unload callbacks.\n"
},
{
"from": "human",
"value": "module <%= class_name %>Dependencies\n\n #\n # Pass in a block in the plugin's init.rb that calls this.\n # Whatever is in the block will be called during each rails stack setup.\n #\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Make Contact name and groups writable\n"
},
{
"from": "human",
"value": "require 'dune/jid'\n\nmodule Dune\n class Contact\n\n def initialize(jid, pending = true, subscription = 'none', name = nil, groups = nil)\n @jid = JID.new(jid)\n @pending = pendi... | ruby | chosen |
[
{
"from": "system",
"value": "Use RAILS_ENV instead of Rails.env if that constant isnt loaded\n"
},
{
"from": "human",
"value": "require 'exlibris-primo'\n# Load Primo configuration\nExlibris::Primo.configure do |config|\n config.load_yaml File.expand_path(\"#{File.dirname(__FILE__)}/../config/... | ruby | chosen |
[
{
"from": "system",
"value": "Add a TODO for myself.\n"
},
{
"from": "human",
"value": "require 'thor'\n\nmodule Hue\n class CliBase < Thor\n def self.shared_options\n\n method_option :user,\n :aliases => '-u',\n :type => :string,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add default rules for 404 and 500\n"
},
{
"from": "human",
"value": "module Polygon\n class Base < Sinatra::Base\n\n configure do\n set :public_folder, Proc.new { 'content/static' }\n set :views, Proc.new { 'design/views' ... | ruby | chosen |
[
{
"from": "system",
"value": "Define step 'I should see the meeting creation form'\n"
},
{
"from": "human",
"value": "Given /^there are no meetings$/ do\n Meeting.count == 0\nend\n\nWhen /^I visit the \"Create a Meeting\" page$/ do \n click_link 'Add Meeting'\nend\n\nWhen /^I submit the form t... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec for change password\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe 'Change password features' do\n it 'when user successfully change password' do\n user = create(:user, email: 'me@example.com'... | ruby | chosen |
[
{
"from": "system",
"value": "Remove RSpec 2 compatibility tricks.\n"
},
{
"from": "human",
"value": "require \"rspec\"\n\nmodule Warp\n class Matcher\n # Composable matchers are new in RSpec 3.\n # Define basic helpers in their absence.\n if defined?(RSpec::Matchers::Composable)\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.