conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix for empty review set in session."
},
{
"from": "human",
"value": "class ReviewDeck\n def initialize(user, session)\n @session = session\n @user = user\n unless session.has_key?(:review) || session[:review].empty?\n session[:review] = user.words.re... | ruby | chosen |
[
{
"from": "system",
"value": "Access hash properly for wunderground api response\n"
},
{
"from": "human",
"value": "class WeatherMan\n @w_api = Wunderground.new(ENV[\"WUNDERGROUND_API_KEY\"])\n\n def self.current_outdoor_temp(zip_code)\n key = \"outdoor_temp_for_#{zip_code}_at_#{Time.now.st... | ruby | chosen |
[
{
"from": "system",
"value": "Change index to show current user docs\n"
},
{
"from": "human",
"value": "class DocsController < ApplicationController\n before_action :find_doc, only: [:show, :edit, :update, :destroy]\n \n def index\n @docs = Doc.all.order(\"created_at DESC\")\n end\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant test for indexing\n\nThis test was added when migrating to a new elasticsearch version. It\nno longer tests something valuable.\n"
},
{
"from": "human",
"value": "require \"integration_test_helper\"\nrequire \"cgi\"\n\nclass ElasticsearchIndexingTes... | ruby | chosen |
[
{
"from": "system",
"value": "Select only the fields needed to render the json\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n\n PAGE_SIZE = 21\n\n def index\n @min_show = Show.order(:id).pluck(:id).first\n @max_show = Show.order(id: :desc).pluck(:id).fi... | ruby | chosen |
[
{
"from": "system",
"value": "Use description from details hash\n"
},
{
"from": "human",
"value": "class SignupPresenter < Struct.new(:artefact)\n def page_title\n \"#{name} emails\"\n end\n\n def title\n \"#{name} email alert subscription\"\n end\n\n def name\n artefact.title\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Speed up the loading of the links\n"
},
{
"from": "human",
"value": "require 'bing-search'\n\ndef find_articles\n BingSearch.account_key = 'l1VfVxiJeygTtAUbcXL8O7A5Wpt3bmvH3+Z0eqX6HOE'\n results = []\n results << (BingSearch.web('yoga'))[rand(10)]\n results << (... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reordering of project items\n\nJust calling order doesn't work, reorder needs to be used.\n"
},
{
"from": "human",
"value": "class ProjectFilterQuery\n FILTER_TODO = 'to do'.freeze\n FILTER_FLAGGED = 'flagged'.freeze\n FILTER_DONE = 'done'.freeze\n FILTERS =... | ruby | chosen |
[
{
"from": "system",
"value": "Update vim version in soap_stub_adapter test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'tempfile'\n\ndescribe VSphereCloud::SoapStub, fake_logger: true do\n let(:soap_stub) { described_class.new('https://some-host/sdk/vimService', http_clien... | ruby | chosen |
[
{
"from": "system",
"value": "Fix parameterize separator deprecation warning\n"
},
{
"from": "human",
"value": "module GeoWorks\n # Attributes and methods for vector metadata files\n module ExternalMetadataFileBehavior\n extend ActiveSupport::Concern\n include ::GeoWorks::Extractors::Iso... | ruby | chosen |
[
{
"from": "system",
"value": "Read off personal time for milestones\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\njson.(milestone, :id, :title, :description, :start_at)\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\njson.(milestone, :id, :title, :... | ruby | chosen |
[
{
"from": "system",
"value": "Fix AR persistence so new records have their state set. [Joao Paulo Lins]\n\nEnsure that a state is written for a new record even if aasm_current_state or\n{state}= are never called.\n"
},
{
"from": "human",
"value": "module AASM\n module Persistence\n module Ac... | ruby | chosen |
[
{
"from": "human",
"value": "Add a recipe for disabling hibernation on WIndows\n\nNo need to have this in a vagrant box\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "gpt",
"value": "registry_key 'HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Con... | ruby | chosen |
[
{
"from": "system",
"value": "Update user model test to reflect additional email validation.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe User do\n context \"migration validations\" do\n it \"is valid with an email and password hash\" do\n user = User.new(\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Unit test validation User\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: users\n#\n# id :integer not null, primary key\n# name :string\n# email :string\n# created_at :datetime not null\n# upd... | ruby | chosen |
[
{
"from": "human",
"value": "Add monkeypatch for Ruby 2.6\n"
},
{
"from": "gpt",
"value": "if RUBY_VERSION>='2.6.0'\n if Rails.version < '5'\n class ActionController::TestResponse < ActionDispatch::TestResponse\n def recycle!\n # hack to avoid MonitorMixin double-initialize error... | ruby | chosen |
[
{
"from": "human",
"value": "Add FTP / FTPS check\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# check-ftp.rb\n# ===\n# Uses either net/ftp or optionally double-bag-ftps ruby gem to check for\n# connectivity to an FTP or FTPS server\n#\n# Author: S. Zachariah Sprackett <zac@sprackett.co... | ruby | chosen |
[
{
"from": "system",
"value": "Use dragonfly for these attributes.\n"
},
{
"from": "human",
"value": "module Wafflemix\n class Asset < ActiveRecord::Base\n image_accessor :asset\n\n attr_accessible :asset_name, :asset_mime_type, :asset_uid, :asset_size, :asset_origin\n\n after_create :s... | ruby | chosen |
[
{
"from": "system",
"value": "Add timer to content item requests\n\nThis adds tracking to the content item requests.\nThis will be available in Graphite at\nstats.timers.finder-frontend.content_store.fetch_request_time\n"
},
{
"from": "human",
"value": "require 'gds_api/content_store'\nrequire '... | ruby | chosen |
[
{
"from": "system",
"value": "Add latest player counts JSON route\n"
},
{
"from": "human",
"value": "require 'sinatra/redis'\n\nmodule Sinatra\n module TreeStats\n module Routing\n module PlayerCounts\n def self.registered(app)\n app.get '/player_counts/?' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use after commit instead of after create."
},
{
"from": "human",
"value": "class Image < ActiveRecord::Base\n attr_accessible :image\n\n belongs_to :album, counter_cache: true\n\n mount_uploader :image, ImageUploader\n\n paginates_per 100\n\n validates :md5, un... | ruby | chosen |
[
{
"from": "human",
"value": "Add a scroll for deployment with AppScrolls\n\n[#27824317]\n\ndepends on drnic/appscrolls#14 drnic/appscrolls#12"
},
{
"from": "gpt",
"value": "@name = File.basename(File.expand_path(\".\"))\n\ngem_group :development do\n gem 'shelly', '>= 0.0.62'\nend\n\n# check if... | ruby | chosen |
[
{
"from": "system",
"value": "Include is not necessary here"
},
{
"from": "human",
"value": "module Krypt\n class HMAC\n include Krypt::Helper::XOR\n\n def initialize(digest, key)\n @digest = digest\n @key = process_key(key)\n\n # hash ipad\n hash_pad(0x36)\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic mass assignment checking\n"
},
{
"from": "human",
"value": "class MassObject\n def self.my_attr_accessible(*attributes)\n end\n\n def self.attributes\n end\n\n def self.parse_all(results)\n end\n\n def initialize(params = {})\n end\nend"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to override the defaults"
},
{
"from": "human",
"value": "require 'rspec/expectations'\n\nmodule Approvals\n module RSpec\n module DSL\n def executable(command, &block)\n Approvals::Executable.new(command, &block)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce size of the gem by only including the necessary files via gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/scss/version'\n\nGem::Specification.new do |s|\n s.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Implement type aliasing in record_class\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\nrequire 'caprese/errors'\n\n# Manages type determination and checking for a given controller\nmodule Caprese\n module Typing\n extend ActiveSupport::Conc... | ruby | chosen |
[
{
"from": "system",
"value": "Add counter cache option to belongs to\n"
},
{
"from": "human",
"value": "Mailboxer.setup do |config|\n config.uses_emails = false\n config.search_enabled = false\n config.search_engine = :solr\n config.subject_max_length = 255\n config.body_max_length = 320000... | ruby | chosen |
[
{
"from": "system",
"value": "Define some Mongoid option mandatory by define if there are ENV\nconfiguration or not\n\nRevert in commit [f021f13444f727888986ea79fad36b77ca0f6ae7]\n"
},
{
"from": "human",
"value": "# Some code extract from Mongoid gem\nconfig_file = Rails.root.join(\"config\", \"... | ruby | chosen |
[
{
"from": "system",
"value": "Build a volume price so table is populated\n"
},
{
"from": "human",
"value": "Spree::Admin::VariantsController.class_eval do\n # this loads the variant for the master variant volume price editing\n def load_resource_instance\n parent\n\n if new_actions.inclu... | ruby | chosen |
[
{
"from": "system",
"value": "v2v: Disable VM transform button when op not possible\n\nBug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1473180\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Button::TransformVmButton < ApplicationHelper::Button::Basic\n needs :@record\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Update jQuery UI documentation (1.12.1)\n"
},
{
"from": "human",
"value": "module Docs\n class JqueryUi < Jquery\n self.name = 'jQuery UI'\n self.slug = 'jqueryui'\n self.release = '1.12.0'\n self.base_url = 'https://api.jqueryui.com'\n self.root_pat... | ruby | chosen |
[
{
"from": "system",
"value": "Disable autoloading for dev performance.\n"
},
{
"from": "human",
"value": "module Sass\n autoload :Script, 'sass/rails/helpers'\n\n module Rails\n autoload :CssCompressor, 'sass/rails/compressor'\n autoload :Importer, 'sass/rails/importer'\n autoloa... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for ordering categories by their structure order\n"
},
{
"from": "human",
"value": "require 'greenhorn/craft/base_model'\n\nmodule Greenhorn\n module Craft\n class CategoryGroup < BaseModel\n include Craft::FieldBehaviors\n\n def self.table... | ruby | chosen |
[
{
"from": "system",
"value": "Add task to remove all representatives.\n"
},
{
"from": "human",
"value": "namespace :db do\n namespace :clear do\n\n desc 'Remove all votes.'\n task :votes => :environment do\n Vote.destroy_all\n end\n end\nend"
},
{
"from": "gpt",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Rename find_user to find_model for the users controller.\n"
},
{
"from": "human",
"value": "class Backend::UsersController < Backend::BaseController\n include Concerns::PaginationController\n\n before_action :find_user, only: [:show, :edit, :update, :destroy]\n b... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for deprecation message when trying to pass a string an not a class to the middleware builder for Rails 5\n"
},
{
"from": "human",
"value": "require 'devise_cas_authenticatable'\nrequire 'rails'\n\nmodule DeviseCasAuthenticatable\n class Railtie < ::Rails::Rail... | ruby | chosen |
[
{
"from": "system",
"value": "Read a variable from a yaml file\n"
},
{
"from": "human",
"value": "require \"the_merger/version\"\n\nmodule TheMerger\n def self.merger\n puts 'Mail Merge test'\n end\n \n def self.merge_fields(original_body, *fields)\n\n User.all.each do |user|\n pu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix redirect back since rails 5 changed signature for this\n"
},
{
"from": "human",
"value": "require_dependency \"storytime/application_controller\"\n\nmodule Storytime\n class SubscriptionsController < ApplicationController\n before_action :set_subscription, o... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the error occurred by `Footnotes::Notes::LogNote.start!` on Rails 3\n\nOn Rails 3, `Rails.logger` is not kind of `Logger`, and\n`ActiveSupport::Logger::SimpleFormatter` is not defined. Therefore, this\nline is output to Rails log.\n\n```\nFootnotes Log Exception: uniniti... | ruby | chosen |
[
{
"from": "system",
"value": "Use feedback poll config option\n"
},
{
"from": "human",
"value": "module Rapns\n module Daemon\n class FeedbackReceiver\n FEEDBACK_TUPLE_BYTES = 38\n\n def self.start\n @thread = Thread.new do\n loop do\n break if @stop\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Content-Length header incase Transfer-Encoding header is present. This was done to get the streaming for PUT working.\n"
},
{
"from": "human",
"value": "module Fog\n module HP\n class Storage\n class Real\n\n # Create a new object\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix patch to Passenger's `accept_and_process_next_request`"
},
{
"from": "human",
"value": "module RackAfterReply\n module Adapter\n class Passenger < Base\n def apply\n PhusionPassenger::Rack::RequestHandler.module_eval do\n include RackAft... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for using eval with different filenames on a binding\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Binding#eval\" do\n ruby_version_is ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a new version 0.1.21 for CocoaPods.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CUtil\"\n s.version = \"0.1.20\"\n s.summary = \"CUtil is a common utilities collection. It is designed as a tool-box for iOS developmen... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to produce the DEVELOPER_BIN_DIR preprocessor macro\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Cedar'\n s.version = '0.11.3'\n s.license = 'MIT'\n s.summary = 'BDD-style testing using Objective-C.'\n s.homepage = '... | ruby | chosen |
[
{
"from": "system",
"value": "Allow minor versions up for faraday gems.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cardgate/version'\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Add pseudocode of separate_comma method.\n"
},
{
"from": "human",
"value": "# Numbers to Commas Solo Challenge\n\n# I spent [] hours on this challenge.\n\n# Complete each step below according to the challenge directions and\n# include it in this file. Also make sure... | ruby | chosen |
[
{
"from": "system",
"value": "Correct ruby initialize method name\n"
},
{
"from": "human",
"value": "class Graph\n def new(graph_info, directed)\n @edges = {}\n @directed = directed\n make_edges(graph_info)\n end\n\n def make_edges(graph_info)\n graph_info.foreach do |connection|\... | ruby | chosen |
[
{
"from": "system",
"value": "Change order of rack cascade\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\n\nuse Rack::Cors do\n allow do\n origins '*'\n resource '/ap... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Update tests to work for ruby 1.9\"\n\nThis reverts commit 553dbbbd1d56752ded289a8b1ad0e7496ff96afa.\n"
},
{
"from": "human",
"value": "RSpec.describe(Jekyll::Compose::FileInfo) do\n let(:open_and_closing_tag) { \"---\\n\" }\n let(:layout_content) { \"pos... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old Section seeds to avoid overwriting them\n\nThis has been deployed now.\n\nThere's a secret UI for editing these and they are subject to change,\nso let's not trash those changes on every deploy.\n"
},
{
"from": "human",
"value": "#######\n#\n# This file w... | ruby | chosen |
[
{
"from": "system",
"value": "Disable fallback locales from dev env"
},
{
"from": "human",
"value": "Halloped::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code is reloaded ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove date.today specifier in gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'delayed_job_mongo_mapper'\n s.summary = \"MongoMapper backend for delayed_job\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for immutable objects to session\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule SpecHelper\n\n def mock_model(*attributes)\n Class.new {\n include Equalizer.new(*attributes)\n\n attributes.each { |attribute| attr_accessor at... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor DbFileBackend for Rails 4 AREL conformity\n\nActiveRecord#update_all was deprecated in Rails 2.3.8 and has since been replaced by ActiveRecord::Relation#update_all. With this change the method signature (accepted parameters) and usage have also changed requiring the r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix code identation in HashObject spec.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\n# Test support object\ndescribe HashObject do\n\n subject { HashObject.new(hash) }\n let(:hash) do\n {\n :name => 'Steve', \n :address => {:street... | ruby | chosen |
[
{
"from": "system",
"value": "[Webhook] Use . as directory when testing to make Travis happy.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\nrequire 'webhook'\n\ndescribe 'Webhook' do\n\n it 'does only block for a very short time' do\n # Run web... | ruby | chosen |
[
{
"from": "system",
"value": "Make signing conditional for building the gem, so that external systems such as Travis may build it without needing to have a private key present\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) ... | ruby | chosen |
[
{
"from": "system",
"value": "Mac: Support down to Mac OS X 10.5\n"
},
{
"from": "human",
"value": "# Returns a hash of the proper CFLAGS/LDFLAGS for compiling\ndef cflags\n flags = {\n \"LDFLAGS\" => \"-I#{embedded_dir}/include -L#{embedded_dir}/lib\",\n \"CLFAGS\" => \"-I#{embedded_dir... | ruby | chosen |
[
{
"from": "system",
"value": "Use let! instead of let+before hack.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Task do\n context \"for three sample tasks in a list\" do\n let(:list) { create(:task_list) }\n let(:task1) { create(:task, list: list) }\n let(:task2... | ruby | chosen |
[
{
"from": "system",
"value": "Disable \"pending\" test for now\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe User do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe User do\n# T... | ruby | chosen |
[
{
"from": "system",
"value": "Update column names for new helpspot version."
},
{
"from": "human",
"value": "require 'sequel'\n\nmodule Opscode\n module HelpspotSSO\n DATABASE_URI = nil\n\n def helpspot_db\n @helpspot_db ||= Sequel.connect(DATABASE_URI)\n end\n\n def create_hel... | ruby | chosen |
[
{
"from": "system",
"value": "Add force_downcase: true inflect test assertion\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Minitest::Spec\n def self.it_inflects(answers)\n describe answers[0] do\n let(:inflector) { RussianInflect::Inflector.new(answers[0]) }... | ruby | chosen |
[
{
"from": "system",
"value": "Make MySqlZipFS an extension of MySqlFS\n"
},
{
"from": "human",
"value": "require 'mysql2'\nrequire 'zlib'\n\nmodule Ld4lBrowserData\n module Utilities\n module FileSystems\n class MySqlZipFS\n DEFAULT_PARAMS = {\n :host => 'localhost',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce duplication in Ruby builder code.\n"
},
{
"from": "human",
"value": "require \"metamorpher/builders/ast\"\n\nmodule Metamorpher\n module Builders\n module Ruby\n class UppercaseConstantRewriter\n include Metamorpher::Rewriter\n include ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename Doorkeeper::Request method params for clarity\n\nThe arguments are strings from the `request_type` and `grant_type`\nparameters, not strategies."
},
{
"from": "human",
"value": "require 'doorkeeper/request/authorization_code'\nrequire 'doorkeeper/request/clie... | ruby | chosen |
[
{
"from": "system",
"value": "Prepend view templates to view context.\n"
},
{
"from": "human",
"value": "class PagesController < ActionController::Base\n before_filter :update_page_resolver\n\n append_view_path Page::Resolver.instance\n\n helper_method :is_editing?\n\n def show\n @page = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update store migration for when apps already were using spree-multi-domain.\n"
},
{
"from": "human",
"value": "class CreateSpreeStores < ActiveRecord::Migration\n def change\n create_table :spree_stores do |t|\n t.string :name\n t.string :url\n t.... | ruby | chosen |
[
{
"from": "system",
"value": "Add logic to find next pair of votes\n"
},
{
"from": "human",
"value": "class VotesController < ApplicationController\n\n def new\n if flash[:prev_winner_id]\n @prev_winner = Artist.find(flash[:prev_winner_id])\n @prev_loser = Artist.find(flash[:prev_l... | ruby | chosen |
[
{
"from": "system",
"value": "Use svg/fonticons for store types in the storage decorator\n"
},
{
"from": "human",
"value": "class StorageDecorator < MiqDecorator\n def self.fonticon\n 'fa fa-database'\n end\n\n def quadicon\n {\n :top_left => {\n :fileicon => store_type_... | ruby | chosen |
[
{
"from": "system",
"value": "Add georgia_roles_collection for users form\n"
},
{
"from": "human",
"value": "module Georgia\n module UsersHelper\n\n def permissions_view\n Georgia.permissions.map{|section, actions| permission_table_tag(section, actions)}.join().html_safe\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation of text_value length [SCI-1267]\n"
},
{
"from": "human",
"value": "class RepositoryTextValue < ActiveRecord::Base\n has_one :repository_cell, as: :value\n accepts_nested_attributes_for :repository_cell\n\n validates :repository_cell, presence: true... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation for Config module\n"
},
{
"from": "human",
"value": "module LinkShrink\n module Config\n extend self\n\n attr_accessor :api_key\n\n def api=(api)\n @api = api.new\n end\n\n def api\n @api || LinkShrink::Shrinkers::Google.n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow REE to be built shared\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass RubyEnterpriseEdition <Formula\n url 'http://rubyforge.org/frs/download.php/66162/ruby-enterprise-1.8.7-2009.10.tar.gz'\n md5 '3727eef7b6b1b2f31db7d091328d966e'\n homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up ci monitor rake task to use delayed_job\n"
},
{
"from": "human",
"value": "namespace :cimonitor do\n desc \"Update the status for each active project\"\n task :fetch_statuses => :environment do\n StatusFetcher.new.fetch_all\n end\n\n desc \"Send an ema... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sign_up path from devise\n"
},
{
"from": "human",
"value": "class Admin < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authenticatable, :register... | ruby | chosen |
[
{
"from": "system",
"value": "Add AR uniquness validator on name\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "class Skill < ActiveRecord::Base\n belongs_to :skill_category\n belongs_to :user\n\n acts_as_tenant(:user)\... | ruby | chosen |
[
{
"from": "system",
"value": "Sort desc by Twitter's timestamp\n"
},
{
"from": "human",
"value": "class Tweet < ActiveRecord::Base\n default_scope order(\"created_at desc\")\n\n mount_uploader :image, ImageUploader\n\n def self.published\n where(published: true).where(\"published_at is not... | ruby | chosen |
[
{
"from": "system",
"value": "Make changes to votable_type assignment\n"
},
{
"from": "human",
"value": "class VotesController < ApplicationController\n before_action :load_votable\n\n def create\n @vote = current_user.votes.new(vote_params)\n if !!params[:question_id]\n @vote.votab... | ruby | chosen |
[
{
"from": "system",
"value": "Test for matcher error text instead\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire 'active_support/all'\n\ndescribe \"be_valid matcher\" do\n include RSpec::Rails::Matchers\n\n class TestModel\n include ActiveModel::Validations\n attr_ac... | ruby | chosen |
[
{
"from": "system",
"value": "Add sloc as runtime 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 'ruboty/sloc/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec - must include dtrace.rb\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n \n s.name = 'ruby-dtrace'\n s.version = Dtrace::VERSION\n s.platform = Gem::Platform::RUBY\n s.summary = <<-DESC.strip.gsub(/\\n\\s+/, \" \")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Sixteen Eighty as an author\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'blimp/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Use uncached. to try to cut down on runaway memory\n\nSee http://stackoverflow.com/questions/6668875/ruby-on-rails-memory-leak-when-looping-through-large-number-of-records-find-eac\n"
},
{
"from": "human",
"value": "class AddParsedUserAgentToOpenEvents < ActiveRecor... | ruby | chosen |
[
{
"from": "human",
"value": "Write tests for AngellistApi::Configuration module\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe AngellistApi::Configuration do\n class ExtendedClass; extend AngellistApi::Configuration; end\n class IncludedClass; include AngellistApi::Configu... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify helper to single method\n"
},
{
"from": "human",
"value": "module Locotimezone\n module ActiveRecordHelper\n\n def locotime(options = {})\n Locotimezone.locotime(options)\n end\n\n # def locotime(options = {})\n # data = Locotimezone.loc... | ruby | chosen |
[
{
"from": "system",
"value": "Correct raise statements to not use new.\n"
},
{
"from": "human",
"value": "module Sandthorn\n module AggregateRootSnapshot\n attr_reader :aggregate_snapshot\n\n def snapshot\n aggregate_snapshot!\n save_snapshot\n self\n end\n\n def aggr... | ruby | chosen |
[
{
"from": "system",
"value": "Update pattern to more specific (call require method)\n"
},
{
"from": "human",
"value": "module Scanny\n module Checks\n class HTTPRedirectCheck < Check\n def pattern\n [\n pattern_add_file_from_url,\n pattern_open_struct,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use let definition for assigned variable\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\n<% output_attributes = model.columns.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>\nRSpec.describe '<%= ns_table_name %>/new'... | ruby | chosen |
[
{
"from": "system",
"value": "Support showing announcements for all locales\n\nSearch API only supports documents written in English so we should\nremove the locale from the slug when querying for documents.\n"
},
{
"from": "human",
"value": "class AnnouncementsPresenter\n attr_reader :slug\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change sid to match the php implementation\n"
},
{
"from": "human",
"value": "require 'whatsapp/protocol/node'\nrequire 'whatsapp/protocol/nodes/user_node'\n\nmodule WhatsApp\n module Protocol\n\n class SyncNode < Node\n attr_reader :numbers, :mode, :contex... | ruby | chosen |
[
{
"from": "system",
"value": "Update Nokogiri version to 1.6.0.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rails/dom/testing/version'\n\nGem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Use FactoryGirl to create alerts to test exports\n"
},
{
"from": "human",
"value": "describe 'TaskHelpers::Exports::Alerts' do\n let(:data_dir) { File.join(File.expand_path(__dir__), '..', 'imports', 'data', 'alerts') }\n let(:alert) { 'Alert_Import_Test.yaml' }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure tar is installed to decompress the tarball\n\nIt won't always be there on RHEL\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "module DockerCookbook\n class DockerInstallationTarball < Dock... | ruby | chosen |
[
{
"from": "system",
"value": "Change double quotes to single quotes\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"filmbuff/version\"\n\nGem::Specification.new do |s|\n s.name = \"filmbuff\"\n s.version = FilmB... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify reviewer report task spec"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature \"Reviewer Report\", js: true do\n let(:journal) { FactoryGirl.create :journal }\n\n let!(:reviewer) { FactoryGirl.create :user }\n\n let!(:paper) do\n Factory... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old react native task\n"
},
{
"from": "human",
"value": "namespace :breezy do\n desc \"Verifies if any version of Yarn is installed\"\n task :verify_yarn do\n begin\n yarn_version = `yarn --version`\n raise Errno::ENOENT if yarn_version.blank?\... | ruby | chosen |
[
{
"from": "system",
"value": "Add new stylesheets to be precompiled\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Fix git url for libsqlite\n"
},
{
"from": "human",
"value": "name \"libsqlite3\"\ndefault_version \"3.7.7.1\"\n\nsource :git => 'git@github.com:LuaDist/libsqlite3.git'\n\nrelative_path 'libsqlite3'\n\nenv = {\n \"LDFLAGS\" => \"-L#{install_dir}/embedded/lib -I#{ins... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.