conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Rename method self.db to self.all, remove old implementation class Ticketing\n"
},
{
"from": "human",
"value": "class RecordsManagement\n @@records = {}\n @@id = 0\n\n def initialize\n @@records[0] = 'init' unless @@records.keys.nil?\n end\n\n def self.db\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Ical format for grape\n"
},
{
"from": "human",
"value": "require 'grape'\nrequire 'json'\n\nrequire 'api/events_resource'\n\nmodule API\n class Base < Grape::API\n CONTENT_TYPE = \"application/vnd.api+json\"\n RACK_CONTENT_TYPE_HEADER = {\"content-type\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure multiple clients handle their own responses\n"
},
{
"from": "human",
"value": "require 'acceptance/test_helper'\nrequire 'timeout'\n\ndescribe \"Server requests info from the Client\" do\n\n before do\n @server, @client1, @client2 = self.class... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for define of subspecs.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Kiwi-KIF\"\n s.version = \"1.0.0\"\n s.summary = \"Allows to write KIF integration tests using Kiwi framework\"\n s.homepage = \"https://gith... | ruby | chosen |
[
{
"from": "system",
"value": "Make new changes part of 0.2.3 release\n"
},
{
"from": "human",
"value": "SPEC = Gem::Specification.new do |s|\n s.name = \"yard\"\n s.version = \"0.2.2\"\n s.date = \"2008-05-16\"\n s.author = \"Loren Segal\"\n s.email = ... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate locations slugs to areas\n"
},
{
"from": "gpt",
"value": "class MigrateBsfAreasToSlugs < Mongoid::Migration\n def self.up\n BusinessSupportEdition.excludes(state: 'archived').order_by(:slug).each do |bs|\n next if bs.artefact.state == 'archived'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add lastmod values for non-article pages.\n"
},
{
"from": "human",
"value": "xml.instruct!\nxml.urlset \"xmlns\" => \"http://www.sitemaps.org/schemas/sitemap/0.9\" do\n site_url = site_root_uri\n\n xml.url do\n xml.loc site_url\n xml.changefreq \"monthly\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure all of the routes are responding.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Gitometer\" do\n it \"should respond to /\" do\n get '/'\n last_response.should be_ok\n end\nend\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for raising IOError for unnamed files\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../shared/path', __FILE__)\n\ndescribe \"File#path\" do\n it_behaves_like :file_path, :path\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Rename AdminUser to Admin in admin."
},
{
"from": "human",
"value": "ActiveAdmin.register AdminUser do\n index do\n selectable_column\n id_column\n column :email\n column :current_sign_in_at\n column :sign_in_count\n column :created_at\n action... | ruby | chosen |
[
{
"from": "system",
"value": "Add small doc to hook class.\n"
},
{
"from": "human",
"value": "module RedmineRecurringTasks\n module Hooks\n class IssueSidebarHook < Redmine::Hook::ViewListener\n render_on :view_issues_sidebar_planning_bottom, partial: 'weekly_schedules/issues/sidebar'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change snapshot list name to be more consistent\n"
},
{
"from": "human",
"value": "module HashiCorp\n\n module VagrantVMwarefusion\n\n module Driver\n\n class Fusion\n\n def snapshot_take\n vmrun(\"snapshot\", \... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper to format FOD data\n"
},
{
"from": "human",
"value": "module BlacklightCornellRequests\n module RequestHelper\n\n \t# Time estimates are now delivered from the model in ranges (e.g., [1, 3])\n \t# instead of integers. This function converts the range i... | ruby | chosen |
[
{
"from": "system",
"value": "Include actual code in InvalidStatus exception\n"
},
{
"from": "human",
"value": "require 'gpg_status_parser/status_codes'\nrequire 'gpg_status_parser/arguments'\n\nmodule GPGStatusParser\n\n class NotGPGStatus < StandardError\n end\n\n class InvalidStatus < Stan... | ruby | chosen |
[
{
"from": "system",
"value": "Support objects that return valid URI strings through to_s\n"
},
{
"from": "human",
"value": "module Pact\n\n module PactFile\n\n extend self\n\n def read uri, options = {}\n pact = open(uri) { | file | file.read }\n if options[:save_pactfile_to_tmp... | ruby | chosen |
[
{
"from": "system",
"value": "Use children matching in DescribeClass cop\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module RSpec\n # Check that the first argument to the top level describe is a constant.\n #\n # @example\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix CLI tool installation in Atom Editor.\n"
},
{
"from": "human",
"value": "class Atom < Cask\n url 'http://atom.io/download/mac'\n homepage 'http://atom.io'\n version 'latest'\n no_checksum\n link 'Atom.app'\nend\n"
},
{
"from": "gpt",
"value": "c... | ruby | chosen |
[
{
"from": "system",
"value": "Add crawl method to PackagistLicenseCrawl\n"
},
{
"from": "human",
"value": "class PackagistLicenseCrawler < PackagistCrawler\n\n\n def self.crawle_package name\n return nil if name.to_s.empty?\n\n resource = \"http://packagist.org/packages/#{name}.json\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use static hippo type when migrate from hippo to contento\n"
},
{
"from": "human",
"value": "module Cms\n module HippoImporter\n class CorporatePage < HippoImporter::Base\n def hippo_type\n 'contentauthoringwebsite:Guide'\n end\n\n def layo... | ruby | chosen |
[
{
"from": "system",
"value": "Use simpler less confusing form of expression\n"
},
{
"from": "human",
"value": "module Grape\n module Formatter\n module SerializableHash\n class << self\n def call(object, _env)\n return object if object.is_a?(String)\n return Mul... | ruby | chosen |
[
{
"from": "system",
"value": "Use tx chunking in bulk job.\n"
},
{
"from": "human",
"value": "module Pacer::Routes\n\n # Additional iteration methods that allow for rapid data\n # manipulation in transactional graphs. Bulk operations automatically\n # manage transactions in larger batches rat... | ruby | chosen |
[
{
"from": "system",
"value": "Set Cocoapods version to 0.2.0\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint cf-jsmn.podspec' to ensure this is a\n# valid spec before submitting.\n#\n\nPod::Spec.new do |s|\n s.name = \"cf-jsmn\"\n s.version = \"0.1.0\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use Nokogiri::HTML in sync_check details body\n"
},
{
"from": "human",
"value": "require 'equivalent-xml'\n\nmodule SyncChecker\n module Checks\n DetailsCheck = Struct.new(:expected_details) do\n attr_reader :content_item\n def call(response)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove root_path to allow only subpages being displayed\n"
},
{
"from": "human",
"value": "LegalPages::Engine.routes.draw do\n root to: redirect('imprint')\n get 'imprint' => 'legal#index'\n get 'disclaimer' => 'legal#disclaimer'\n get 'privacy' => 'legal#... | ruby | chosen |
[
{
"from": "system",
"value": "Set up a redirect to the proper witchifier URL"
},
{
"from": "human",
"value": "MorganIo::Application.routes.draw do\n resource :witchifier, :only => :show\n root :to => 'application#index'\nend\n"
},
{
"from": "gpt",
"value": "MorganIo::Application.ro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix route to use GET instead of POST\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'home#index'\n get 'list', to: 'home#list'\n\n namespace :api do\n resources :bookmarks do\n collection do\n post 'metadata'\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Add catch-all route for ember\n"
},
{
"from": "human",
"value": "Review::Application.routes.draw do\n root to: 'ember#bootstrap'\n\n get '/auth' => 'sessions#index'\n get '/auth/:provider/callback' => 'sessions#create'\n get '/auth/failure' => 'sessions#failure'... | ruby | chosen |
[
{
"from": "system",
"value": "Update faraday_middleware dependency to ~> 0.10.0\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/congress/version', __FILE__)\n\nGem::Specification.new do |spec|\n spec.add_dependency 'faraday', '~> 0.9.0'\n spec.add_depende... | ruby | chosen |
[
{
"from": "system",
"value": "Bump the vertica adapter version\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |gem|\n gem.name = 'activerecord-vertica-adapter'\n gem.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Make redirect go back to monthly index\n"
},
{
"from": "human",
"value": "class MonthliesController < ApplicationController\n load_and_authorize_resource\n\n def new\n end\n\n def index\n\n end\n\n def edit\n end\n\n def update\n @monthly.update_attribute... | ruby | chosen |
[
{
"from": "system",
"value": "Add mark_as_best method to responses controller\n"
},
{
"from": "human",
"value": "class ResponsesController < ApplicationController\n\n before_action :set_response, only: [:edit, :update, :destroy]\n\n def new\n @response = Response.new\n end\n\n def create\... | ruby | chosen |
[
{
"from": "system",
"value": "[rollback] Fix rollback params (using to_h with assign_attributes)\n"
},
{
"from": "human",
"value": "class RollbacksController < ApplicationController\n def index\n @rollbacks = Rollback.all(page: current_page).fetch\n end\n\n def new\n @rollback = Rollbac... | ruby | chosen |
[
{
"from": "system",
"value": "Fix create action of groups controller\n"
},
{
"from": "human",
"value": "module V1\n class GroupsController < ApiController\n respond_to :json\n before_action :load_post, only: [:show]\n\n def index\n render json: current_user.groups\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add details hash to taxons in dependee expansion rules\n\nThe content-tagger app needs access to the details hash in taxon\nexpanded links so it can make use of the internal name field.\n"
},
{
"from": "human",
"value": "module Queries\n module DependeeExpansionRul... | ruby | chosen |
[
{
"from": "system",
"value": "Fix double quotes vs single quotes.\n"
},
{
"from": "human",
"value": "Vagrant.configure('2') do |config|\n if Vagrant.has_plugin?(\"vagrant-berkshelf\") then\n config.berkshelf.enabled = false\n end\nend\n"
},
{
"from": "gpt",
"value": "Vagrant.con... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ruby 1.9.3 mb_chars downcase bug\n"
},
{
"from": "human",
"value": "module Monologue\n module TagsHelper\n\n #Number of sizes defined in the css\n NUMBER_OF_LABEL_SIZES = 5\n\n def tag_url(tag)\n \"#{Monologue::Engine.routes.url_helpers.root_path}... | ruby | chosen |
[
{
"from": "system",
"value": "Create default SkillCategories for new developers in CreateUserDefaultsJob\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "class CreateUserDefaultsJob < ActiveJob::Base\n queue_as :default\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make bundler dependency a lot less strict\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../.gemspec\", __FILE__)\nrequire File.expand_path(\"../lib/buffered_logger/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"buffere... | ruby | chosen |
[
{
"from": "system",
"value": "Add an items route for reading items from Tradera\n"
},
{
"from": "human",
"value": "require 'sinatra'\n\nget '/' do\n redirect '/index.html'\nend\n"
},
{
"from": "gpt",
"value": "require 'json'\n# External libs\nrequire 'sinatra'\n# Internal modules\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Allow nested attributes to be updated\n"
},
{
"from": "human",
"value": "class Survey < ApplicationRecord\n has_many :survey_trip_stops\n\n validates :date, presence: true\n validates :shift, presence: true\nend\n"
},
{
"from": "gpt",
"value": "class ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Age Method to Tickets\n"
},
{
"from": "human",
"value": "class Ticket < ActiveRecord::Base\n # Remember to create a migration!\n belongs_to :coach, :class_name => \"User\"\n belongs_to :student, :class_name => \"User\"\n\n def self.today\n where(\"created... | ruby | chosen |
[
{
"from": "system",
"value": "Add global logged_in method to check if a user is logged in\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protec... | ruby | chosen |
[
{
"from": "system",
"value": "Move set_csrf_cookie_for_ng to private method\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n after_filter :set_csrf_cookie_for_ng\n\n def angular\n render 'layouts/application'\n end\n\n def s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the Background Jobs page dying when it finds a non-Agent run job\n"
},
{
"from": "human",
"value": "module JobsHelper\n\n def status(job)\n case\n when job.failed_at\n content_tag :span, 'failed', class: 'label label-danger'\n when job.locked_at &... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for legacy users not't having a timezone\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n before_filter :set_time_zone, if: :logged_in?\n\n include SessionsHelper\n\n private\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Rails 5 undefined method `back_url', Rails 5 has redirect_back, instead of redirect_to :back.\n"
},
{
"from": "human",
"value": "class SwitchUserController < ApplicationController\n before_action :developer_modes_only, :switch_back\n\n def set_current_user... | ruby | chosen |
[
{
"from": "system",
"value": "Validate uniqueness across file name / date\n"
},
{
"from": "human",
"value": "class IepDocument < ActiveRecord::Base\n belongs_to :student\n validates :file_name, uniqueness: true\nend\n"
},
{
"from": "gpt",
"value": "class IepDocument < ActiveRecord:... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods for checking and creating connections\n"
},
{
"from": "human",
"value": "class Relationship < ActiveRecord::Base\n belongs_to :partner\n belongs_to :student\n\n attr_accessible :status\nend\n"
},
{
"from": "gpt",
"value": "class Relationsh... | ruby | chosen |
[
{
"from": "system",
"value": "Remove published_by_id and published_at from attr_accessible\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule Georgia\n module Concerns\n module Statusable\n extend ActiveSupport::Concern\n\n included do\n\n belongs_... | ruby | chosen |
[
{
"from": "system",
"value": "Move the ActiveResource observers initializer to this gem\n"
},
{
"from": "human",
"value": "require 'rails/railtie'\n\nmodule Rails\n module Observers\n class Railtie < ::Rails::Railtie\n initializer \"active_record.observer\", :before => \"active_record.s... | ruby | chosen |
[
{
"from": "system",
"value": "Add new attributes, change aliases\n"
},
{
"from": "human",
"value": "class RI::Document\n attr_accessor :id, :local_element_id, :dictionary_id\n alias :doc_id :local_element_id\nend"
},
{
"from": "gpt",
"value": "class RI::Document\n attr_accessor :i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typos in docs of `ROM::Elasticsearch::Types`\n"
},
{
"from": "human",
"value": "require 'rom/types'\n\nmodule ROM\n module Elasticsearch\n # Elasticsearch types use by schema attributes\n #\n # @api public\n module Types\n include ROM::Types\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Call setup before rake task starts\n"
},
{
"from": "human",
"value": "require 'schema_comments'\n\nrequire 'rails'\n\nmodule SchemaScomments\n class Railtie < ::Rails::Railtie\n rake_tasks do\n SchemaComments.yaml_path = Rails.root.join(\"db/schema_comments... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing method and remove accessor."
},
{
"from": "human",
"value": "module SecretBambino\n class Bambinos\n attr_reader :bambinos\n\n def initialize(filename)\n load_from_yaml(filename)\n end\n\n def assigned_bambinos\n @assigned_bambinos... | ruby | chosen |
[
{
"from": "system",
"value": "Allow authentication strategies to refine SidekiqAuthConstraint\n"
},
{
"from": "human",
"value": "# Copyright 2013 Square Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the L... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out exe_path in generator by default\n\nThis typically isn't needed when used with the recommended\nwkhtmltopdf-binary gems, and WickedPDF tries to guess when it isn't\nspecified.\n"
},
{
"from": "human",
"value": "WickedPdf.config = {\n #wkhtmltopdf: '/usr... | ruby | chosen |
[
{
"from": "system",
"value": "Add custom paths to precompilation\n"
},
{
"from": "human",
"value": "#\n# There are a few requirement for theses tasks to work as intentended :\n#\n# - You must set :deploy_via, :remote_cache\n# - The cached copy was synced previously during deployment \n# (other... | ruby | chosen |
[
{
"from": "system",
"value": "Chore: Update to the latest gemspec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'referehencible/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "human",
"value": "Fix in-memory database schema for tests\n\nThe \"rake spec\" command does not really work with default in-memory sqlite\ndatabase:\n\n $ rake spec\n [ ... snip ... ]\n Finished in 0.01067 seconds\n 19 examples, 15 failures, 4 pending\n\nFix that by using the following trick ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct the gemspec date and github url\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{capybara-mechanize}\n s.version = File.read(\"VERSION\")\n\n s.required_rubygems_version = Gem::Requirement.new(\">... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in User migration\n"
},
{
"from": "human",
"value": "paclass CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :name\n t.string :email\n t.string :password_hash\n t.timestamps null: ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gitlab repos fetching to include only with membership\n"
},
{
"from": "human",
"value": "require 'gitlab'\nrequire 'uri'\n\nrequire_relative 'performers/gitlab_repository'\n\nmodule BackupRepos\n class BackupGitlabEndpoint\n attr_reader :endpoint, :private_t... | ruby | chosen |
[
{
"from": "system",
"value": "Add a warning for snapshots in a non-powered off state.\n\nThis is temporary until DigitalOcean returns an error from the API.\n"
},
{
"from": "human",
"value": "module Tugboat\n module Middleware\n class SnapshotDroplet < Base\n def call(env)\n ocea... | ruby | chosen |
[
{
"from": "system",
"value": "Work around Octokit parser bug\n\noctokit/octokit.rb#1004\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'octokit'\n\nmodule Dropcaster\n class << self\n def contributors\n @octokit ||= if ENV.include?('GH_TOKEN')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add NAICS import to Industry\n"
},
{
"from": "human",
"value": "class Industry < ActiveRecord::Base\n set_primary_key :naics_code\n \n has_many :merchant_category_industries, :foreign_key => 'naics_code'\n \n has_many :industry_product_lines, :foreign_key => 'n... | ruby | chosen |
[
{
"from": "system",
"value": "Change to update to latest syntax\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule FiniteMachine\n # A generic interface for executing strings, symbol methods or procs.\n class Callable\n\n attr_reader :object\n\n # Initialize a Callable\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to pass a string to fpm's input method.\n\nAvoids NoMethodError on the Path object. (encoding)\n"
},
{
"from": "human",
"value": "require 'fpm/package/dir'\nrequire 'fpm/cookery/package/package'\n\nmodule FPM\n module Cookery\n module Package\n cl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove erroneous side-effect from method\n"
},
{
"from": "human",
"value": "class LanguagePack::Ruby < LanguagePack::Base\n def rgeo_url(filename = nil)\n filename << '.tgz' if filename\n \"https://s3.amazonaws.com/camenischcreative/heroku-binaries/rgeo/#{fil... | ruby | chosen |
[
{
"from": "system",
"value": "Improve output header for readibility\n"
},
{
"from": "human",
"value": "class NprTodaysNews::Scraper\n\n def initialize(url=\"http://www.npr.org/sections/news/\")\n @url = url\n @doc = Nokogiri::HTML(open(@url))\n end\n\n def scrape_featured_stories\n n... | ruby | chosen |
[
{
"from": "system",
"value": "Add a todo for code cleaness.\n"
},
{
"from": "human",
"value": "require 'stock_fighter/api_mixin/trading_api'\nrequire 'stock_fighter/api_mixin/game_master_api'\n\nmodule StockFighter\n module ApiMixin\n def self.included base\n base.extend ClassMethods\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove \"unique identifier\" from renderer\n\nThis interferes with the custom links in the sidebar for schemas.\n"
},
{
"from": "human",
"value": "require 'middleman-core/renderers/redcarpet'\n\nclass TechDocsHTMLRenderer < Middleman::Renderers::MiddlemanRedcarpetHT... | ruby | chosen |
[
{
"from": "system",
"value": "Update source to use shared context for stubbing everything path\n"
},
{
"from": "human",
"value": "require './lib/everything/blog/source'\n\ndescribe Everything::Blog::Source do\n describe '.absolute_path' do\n before do\n expect(Everything).to receive(:pa... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust gemspec requirement on guard to allow 2.x variants as well\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'guard/phpunit2'\n\nGem::Specification.new do |s|\n s.name = \"guard-phpun... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused association on Government\n\nThis association is not used anywhere in the app. Getting rid of it\nas a pre step to refactoring the derivation of government on editions.\n"
},
{
"from": "human",
"value": "class Government < ActiveRecord::Base\n validat... | ruby | chosen |
[
{
"from": "system",
"value": "Join in a single validation both Shift date validates statements\n"
},
{
"from": "human",
"value": "class Poll\n class Shift < ActiveRecord::Base\n belongs_to :booth\n belongs_to :officer\n\n validates :booth_id, presence: true\n validates :officer_id, ... | ruby | chosen |
[
{
"from": "system",
"value": "Update ruby_parser to the lastest version (3.1.1)\n\nThis fixes a conflict with the 'tomdoc' gem."
},
{
"from": "human",
"value": "require './lib/brakeman/version'\n\nGem::Specification.new do |s|\n s.name = %q{brakeman}\n s.version = Brakeman::Version\n s.author... | ruby | chosen |
[
{
"from": "system",
"value": "Add some information to gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'gitnesse/version'\n\nGem::Specification.new do |gem|\n gem.... | ruby | chosen |
[
{
"from": "system",
"value": "Correct Amazon Linux AMI ID mapping for preset tempates\n"
},
{
"from": "human",
"value": "{\n \"us-east-1\": {\n \"AMI\": \"ami-08111162\",\n },\n \"us-west-1\": {\n \"AMI\": \"ami-c229c0a2\",\n },\n \"us-west-2\": {\n \"AMI\": \... | ruby | chosen |
[
{
"from": "system",
"value": "Change default server port to 9999 as 8080 is frequently forwarded to the guest machine\n"
},
{
"from": "human",
"value": "require_relative '../server'\n\nmodule Vagrant\n module Notify\n module Action\n class StartServer\n # TODO: This should come f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Resque Failure Backend for non Active Job workers\n"
},
{
"from": "human",
"value": "module Resque\n module Failure\n # Provides Resque integration with Airbrake.\n #\n # @since v5.0.0\n # @see https://github.com/resque/resque/wiki/Failure-Backends\... | ruby | chosen |
[
{
"from": "system",
"value": "Add extract_content file to remove comments\n"
},
{
"from": "human",
"value": "module Primix\n class Analyzer\n require \"primix/analyzer/tokenizer\"\n require \"primix/analyzer/parser\"\n\n attr_reader :project_folder\n\n def initialize(project_folder)... | ruby | chosen |
[
{
"from": "system",
"value": "Fix double .rake file ending"
},
{
"from": "human",
"value": "require 'prophet'\nrequire 'rails'\n\nclass Railtie < Rails::Railtie\n rake_tasks do\n load 'tasks/prophet.rake.rake'\n end\nend\n"
},
{
"from": "gpt",
"value": "require 'prophet'\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Use the contents method, not the @contents variable.\n"
},
{
"from": "human",
"value": "module Salt\n module Renderable\n def render(site, body, context = {})\n context[:site] ||= site\n\n begin\n output = Erubis::Eruby.new(@contents).evaluate(c... | ruby | chosen |
[
{
"from": "system",
"value": "Return empty array when there's no data\n"
},
{
"from": "human",
"value": "class ShareAnalytics\n def self.call(page, type, share)\n new(page, type, share).data\n end\n\n def initialize(page, type, share)\n @page = page\n @type = type\n @share = share... | ruby | chosen |
[
{
"from": "system",
"value": "Add debugger to print method\n"
},
{
"from": "human",
"value": "module Zebra\n class PrintJob\n class UnknownPrinter < StandardError\n def initialize(printer)\n super(\"Could not find a printer named #{printer}\")\n end\n end\n\n attr_read... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec version: 2.1.0 -> 2.1.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'POSInputStreamLibrary'\n s.version = '2.1.0'\n s.license = 'MIT'\n s.summary = 'NSInputStream implementation for ALAsset and other k... | ruby | chosen |
[
{
"from": "system",
"value": "Add required files and new instructions to the list\n"
},
{
"from": "human",
"value": "require_relative './instructions/set'\nrequire_relative './instructions/add'\nrequire_relative './instructions/sub'\n\nmodule DCPU16\n class InstructionSet\n @@basic_instructi... | ruby | chosen |
[
{
"from": "system",
"value": "Update aptitude before installing ppa\n"
},
{
"from": "human",
"value": "package :apt_sources do\n description \"Setup custom repositories\"\n\n apt \"python-software-properties\" do\n post :install, \"add-apt-repository -y ppa:git-core/ppa\"\n post :install... | ruby | chosen |
[
{
"from": "system",
"value": "Raise validation errors in a consistent way\n"
},
{
"from": "human",
"value": "module Commands\n module V2\n class PutContentValidator\n def initialize(payload, put_content)\n @payload = payload\n @put_content = put_content\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on activities page when user doesn't have any [SCI-2628]\n"
},
{
"from": "human",
"value": "class ActivitiesController < ApplicationController\n include ActivityHelper\n\n def index\n @vars = local_vars\n respond_to do |format|\n format.json d... | ruby | chosen |
[
{
"from": "system",
"value": "Add default scope to sort on sequence field\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: tracks\n#\n# id :integer not null, primary key\n# title :string(255)\n# description :string(255)\n# version :stri... | ruby | chosen |
[
{
"from": "system",
"value": "Change log output from STDOUT to file when test running\n"
},
{
"from": "human",
"value": "environment = (ENV['RACK_ENV'] || ENV['RAILS_ENV'] || :development).to_sym\n\n# log settings\ncase environment\nwhen :production\n log_file 'log/conductor_production.log'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rails version in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/registry/rails/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Juan Felipe Alvarez Saldarriaga\"]\n gem.e... | ruby | chosen |
[
{
"from": "system",
"value": "Use English name for Ruby global\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.unshift(File.expand_path('../lib/', __FILE__))\n\nrequire 'sun_times/version'\n\nGem::Specification.new do |s|\n s.name = 'ruby-sun-times'\n s.summary ... | ruby | chosen |
[
{
"from": "system",
"value": "Add redir and coverage dependences on development\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'organic-sitemap/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Make timecop a development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'logr/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Put rack profiler back in\n"
},
{
"from": "human",
"value": "# if Rails.env.development?\n# require 'rack-mini-profiler'\n\n# # initialization is skipped so trigger it\n# Rack::MiniProfilerRails.initialize!(Rails.application)\n# end"
},
{
"from": "gpt"... | ruby | chosen |
[
{
"from": "system",
"value": "Make sessions timeout after 30 minutes\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store :cookie_store, key: '_hydea_session'\n"
},
{
"from": "gpt",
"value": "# Be sur... | ruby | chosen |
[
{
"from": "system",
"value": "Update .podspec without hard-coding tag\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.ios.deployment_target = \"8.0\"\n s.osx.deployment_target = \"10.10\"\n s.name = \"SwiftyChardet\"\n s.version = \"1.0.1\"\n s.summary = \"Swif... | ruby | chosen |
[
{
"from": "system",
"value": "Make Rails dependency more lax (runtime)\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"gatemedia-dnd/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.n... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.