conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Bump version of redcarpet to avoid memory leak\n\nSee these links for more information:\n\n* https://github.com/vmg/redcarpet/pull/516\n* http://www.be9.io/2015/09/21/memory-leak/\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to Sinatra::Application from deprecated Sinatra.application\n\nSigned-off-by: Simon Rozet <088e16a1019277b15d58faf0541e11910eb756f6@rozet.name>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'rubygems'\nrequire 'integrity'\n\n# If you want to... | ruby | chosen |
[
{
"from": "system",
"value": "Fix caching of start page, just dont do for user or admins.\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n\n caches_action :index, :expires_in => 1.hour, :if => lambda { !user_signed_in? || !admin_signed_in? }\n\n def index\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change subject to include registrar parameter.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'bra/model/component_creator'\n\nshared_examples 'a valid symbol constant' do |type, value|\n it \"returns an object whose flat representation is :#{val... | ruby | chosen |
[
{
"from": "system",
"value": "Set FIXME on the line which should be fixed.\n"
},
{
"from": "human",
"value": "require 'test/helper'\n\nclass Admin::DashboardHelperTest < ActiveSupport::TestCase\n\n include Admin::DashboardHelper\n\n include ActionView::Helpers::UrlHelper\n include ActionView:... | ruby | chosen |
[
{
"from": "system",
"value": "Make auto_migrate! specs work with dm-constraints"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"DataMapper.auto_migrate!\" do\n\n it \"should allow to automigrate the resource to be translated\" do\n lambda { Item.auto_migrate! }.should_no... | ruby | chosen |
[
{
"from": "system",
"value": "Use a local dictionary instead of scraping\n"
},
{
"from": "human",
"value": "require \"nokogiri\"\nrequire \"open-uri\"\n\nclass Letterpress\n def initialize(letters)\n @cache, @letters_hash = {}, {}\n ('a'..'z').each do |letter|\n @lett... | ruby | chosen |
[
{
"from": "system",
"value": "Print app name in stats\n"
},
{
"from": "human",
"value": "require 'heroku_log_streamer'\nrequire 'heroku_log_line'\nrequire 'dyno'\n\nclass Monitor\n def initialize(app_name, heroku_api_key)\n @app_name = app_name\n @heroku_api_key = heroku_api_key\n @dyn... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure database adapter implementation is abstracted for mutation.\n\nDatabase engine implementation might come with default sorting order for\ncertain queries. While RES adapter specifies desired order, mutant can\nremove this part of call and see that in fact result is the... | ruby | chosen |
[
{
"from": "system",
"value": "Fix merge issue for bcpc_kafka\n"
},
{
"from": "human",
"value": "name 'bach_wrapper'\nmaintainer 'Bloomberg LP'\nmaintainer_email 'compute@bloomberg.net'\nlicense 'All rights reserved'\ndescription 'Top-level chef-bach wrapper'\nlong... | ruby | chosen |
[
{
"from": "system",
"value": "Update to apt cookbook 7.x\n"
},
{
"from": "human",
"value": "name 'archiva'\nmaintainer 'EverTrue'\nmaintainer_email 'devops@evertrue.com'\nlicense 'Apache-2.0'\ndescription 'Installs/Configures Archiva'\nlong_description IO.read(Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Add source and issues url for supermarket\n\nResolves FC064 and FC065 and uses a Chef11 compatibility check\n"
},
{
"from": "human",
"value": "name 'pdns'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Ap... | ruby | chosen |
[
{
"from": "system",
"value": "Allow using the latest selinux_policy\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'squid'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix local variable env not available in controller\n"
},
{
"from": "human",
"value": "class MyDevise::SessionsController < Devise::SessionsController\n after_action :log_failed_login, :only => :new\n\n layout 'session'\n\n def create\n super\n ::Rails.logge... | ruby | chosen |
[
{
"from": "system",
"value": "Add options to createable_fields whitelist for CartPurchase\n"
},
{
"from": "human",
"value": "module Shopping\n class CartPurchaseResource < JSONAPI::Resource\n model_name 'Shopping::CartPurchase'\n \n attributes :cart_id, :created_at, :succeeded_at, :fai... | ruby | chosen |
[
{
"from": "human",
"value": "Add serializer to be used in Trade+\n"
},
{
"from": "gpt",
"value": "class Trade::ShipmentApiSerializer < ActiveModel::Serializer\n attributes :id , :year, :appendix, :taxon_name, :class_name, :order_name, :family_name, :genus_name,\n :term, :importer_... | ruby | chosen |
[
{
"from": "system",
"value": "Add rubocop to development dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'deeplink/version'\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Rename model_name to table_name in diff table\n"
},
{
"from": "human",
"value": "class CreateColumnDiffs < ActiveRecord::Migration\n def change\n create_table :column_diffs do |t|\n t.datetime :changed_at\n t.string :model_name\n t.integer :rec... | ruby | chosen |
[
{
"from": "system",
"value": "Move errors into a more common namespace\n"
},
{
"from": "human",
"value": "module Rack\n module OAuth2\n class UUIDGenerator\n # The uuid string is not valid\n class UnknownUUIDLibrary < Rack::OAuth2::Server::OAuthError\n def initialize\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Extend Stamina with its own DSL\n"
},
{
"from": "human",
"value": "module Stamina\n EXAMPLES_FOLDER = File.expand_path(\"../../examples\", __FILE__)\nend\nrequire 'stamina/ext/math'\nrequire 'stamina/version'\nrequire 'stamina/loader'\nrequire 'set'\nrequire 'enume... | ruby | chosen |
[
{
"from": "human",
"value": "Build array of hashes for API calls\n"
},
{
"from": "gpt",
"value": "require_relative './dump_reader.rb'\n\nclass Builder\n\n\tclass << self\n\n\t\tdef collect_upcs\n\t\t\tdump = DumpReader.new\n\t\t\tdump.build_hash\n\t\tend\n\n\tend\n\nend"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add support for negative positions so '-10' translates to `width - 10`.\n\nYou can now clear an image and leave a 1px edge by using:\n\n magick-erase(red, 1, 1, -1, -1)\n"
},
{
"from": "human",
"value": "module Compass::Magick::Util\n def self.number_value(numbe... | ruby | chosen |
[
{
"from": "system",
"value": "Set host for ActionMailer instances.\n\nFixes #256.\n\nI'm not happy with this, but at least it works. For now.\n"
},
{
"from": "human",
"value": "module Draper\n module ViewContext\n def self.current_controller\n Thread.current[:current_controller] || Appl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused abstract interface method\n"
},
{
"from": "human",
"value": "# Abstract class to be inherited from adapter class.\n#\n# Example:\n#\n# # Used as `ellen --adapter=my_adapter`\n# class MyAdapter < Ellen::Adapters::Base\n# def run\n# ... do ... | ruby | chosen |
[
{
"from": "system",
"value": "Add output rendering initial implementation.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule GithubCLI\n # Responsible for display and size detection.\n class Terminal\n DEFAULT_WIDTH = 120\n DEFAULT_HEIGHT = 40\n\n class << self\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Remove tests of a branch that hasn't been merged yet\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'test_helper'\n\nclass RepositoryTest < ActiveSupport::TestCase\n setup do\n @repository = create(:repository)\n end\n\n test 'must h... | ruby | chosen |
[
{
"from": "human",
"value": "Add a benchmark for API.compile!\n\nThis replicates the slowness in compiling routes via Mustermann for 2000\nroutes.\n\nPart of https://github.com/ruby-grape/grape/issues/1736\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(File.... | ruby | chosen |
[
{
"from": "system",
"value": "Test that host header is the first by default\n"
},
{
"from": "human",
"value": "Shindo.tests('Excon request methods') do\n\n with_rackup('request_headers.ru') do\n\n tests 'empty headers sent' do\n\n test('Excon.post') do\n headers = {\n :o... | ruby | chosen |
[
{
"from": "system",
"value": "Add base error class Line::Bot::API::Error\n"
},
{
"from": "human",
"value": "module Line\n module Bot\n module API\n class InvalidCredentialsError < StandardError; end\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module Line\n module ... | ruby | chosen |
[
{
"from": "system",
"value": "Use class_attribute instead of cattr_accessor for per_page attribute\n"
},
{
"from": "human",
"value": "require 'active_support/core_ext/class/attribute_accessors'\nrequire 'active_support/core_ext/hash/reverse_merge'\nrequire 'active_support/core_ext/hash/deep_merg... | ruby | chosen |
[
{
"from": "system",
"value": "Correct a spelling error in the documentation."
},
{
"from": "human",
"value": "module PusherFake\n module Channel\n class << self\n PRIVATE_CHANNEL_MATCHER = /^private-/.freeze\n PRESENCE_CHANNEL_MATCHER = /^presence-/.freeze\n\n attr_accessor :... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra comma in hash definition\n"
},
{
"from": "human",
"value": "require 'faraday_middleware'\n\nmodule TeamCity\n # @private\n module Connection\n private\n\n def connection\n options = {\n :headers => {'Accept' => \"application/#{format... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Atom to version 1.0.10.\n"
},
{
"from": "human",
"value": "cask :v1 => 'atom' do\n version '1.0.9'\n sha256 'bcbdd65d507a352f69cac7919460a91bb3ffdb94ac75db8670bfc6ebed3689f9'\n\n # github.com is the official download host per the vendor homepage\n url \"... | ruby | chosen |
[
{
"from": "system",
"value": "Add flag for assigning new experiment names\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# Requires ruby2.0+\n# Must be invoked from top-level sts directory\n\nrequire_relative 'run_cmd_per_experiment'\n\nif ARGV.length == 0\n raise RuntimeError.new(\"Us... | ruby | chosen |
[
{
"from": "system",
"value": "Change default environment to production\n"
},
{
"from": "human",
"value": "module RubyPocket\n RubyPocketError = Class.new StandardError\n\n class << self\n attr_accessor :environment\n\n def environment\n @environment || 'DEVELOPMENT'\n end\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Make creating tenants more robust.\n"
},
{
"from": "human",
"value": "class Admin::TenantsController < ApplicationController\n layout 'admin'\n skip_before_filter :authenticate_user!\n before_filter :authenticate_admin_user!\n inherit_resources\n\n # Define a s... | ruby | chosen |
[
{
"from": "system",
"value": "Add json_response to update method in materials controller\n"
},
{
"from": "human",
"value": "class Api::MaterialsController < Api::ApiController\n before_action :set_material, only: [:show, :update, :destroy]\n \n def index\n @materials = Material.all\n js... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Removed chekcing subject in converation\"\n\nThis reverts commit 66223194667170781c77d04450c8b4793a2741c6.\n"
},
{
"from": "human",
"value": "class ConversationsController < ApplicationController\n respond_to :html\n before_action :authenticate_member!\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cost in subscription URL generator\n"
},
{
"from": "human",
"value": "class SubscriptionsController < ApplicationController\n\n before_filter :get_user\n\n def new\n url = GoCardless.new_subscription_url(\n :interval_unit => \"month\",\n :interv... | ruby | chosen |
[
{
"from": "human",
"value": "test/cli: Add tests for `kbsecret pass`\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"helpers\"\n\n# Tests for KBSecret::CLI::Command::Pass\nclass KBSecretCommandPassTest < Minitest::Test\n include Helpers\n include Helpers::CLI\n\n d... | ruby | chosen |
[
{
"from": "human",
"value": "Test coverage for the SCL provider."
},
{
"from": "gpt",
"value": "#\n# Copyright 2015, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a cop... | ruby | chosen |
[
{
"from": "system",
"value": "Include correct fixtures to fix tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'invitations_controller'\n\n# Re-raise errors caught by the controller.\nclass InvitationsController; def rescue_action(e) raise e end; end\n\ndescribe Invitation... | ruby | chosen |
[
{
"from": "system",
"value": "Update the syntax for a couple environment configuration changes.\n"
},
{
"from": "human",
"value": "RailsApp::Application.configure do\n config.cache_classes = true\n config.eager_load = false\n\n config.serve_static_files = true\n config.static_cache_control =... | ruby | chosen |
[
{
"from": "human",
"value": "Add initial specs for pipeline build chain class\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Pipeline::Chain::Build do\n set(:project) { create(:project, :repository) }\n set(:user) { create(:user) }\n let(:pipeline) { Ci::Pipeli... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Shipment references in api ShipmentDecorator\n"
},
{
"from": "human",
"value": "Shipment.class_eval do\n def self.find_by_param(param)\n if param.to_i > 0\n Shipment.find(param)\n else\n Shipment.where(:number => param).first\n end\n end\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Make private the github_pull_requests method\n"
},
{
"from": "human",
"value": "class DashboardsController < ApplicationController\n\n def index\n @sprint = Sprint.current\n @absences = Absence.current\n @meetings = Meeting.today\n @this_week = Meeting.... | ruby | chosen |
[
{
"from": "system",
"value": "Install rspectacular as 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 'chamber/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the problematic xml string to the exception message.\n"
},
{
"from": "human",
"value": "require 'nokogiri'\nrequire 'meac_control/xml/exceptions'\n\nmodule MEACControl\n module XML\n class Response\n attr_reader :xml\n\n def initialize(xml)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for WQ data sometimes returning incorrect values.\n"
},
{
"from": "human",
"value": "module Audit\n class WorldQuestData\n\n def self.add(character, data)\n wq_data = data['achievements']['criteria'].index(33094)\n wqs = data['achievements']['crite... | ruby | chosen |
[
{
"from": "system",
"value": "Fix night market game display on indiespace\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass IndieSpacesController < ApplicationController\n before_action :check_is_opened\n\n def index\n @sliders = Slider.localized.indie_spaces\n @g... | ruby | chosen |
[
{
"from": "system",
"value": "Fix undefined method 'liquid_renderer' for nil:NilClass\n"
},
{
"from": "human",
"value": "module Jekyll\n # Defines the base class of AMP posts\n class AmpPost < Page\n def initialize(site, base, dir, post)\n @site = site\n @base = base\n @dir =... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused method in groups controller\n"
},
{
"from": "human",
"value": "require_relative \"../views/groups/groups_view\"\n\nclass GroupsController < ApplicationController\n include GroupsView\n\n def create\n user = @current_user\n group = Group.new(nam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for the 2010-era candidate url people redirect.\n"
},
{
"from": "human",
"value": "class PeopleController < ApplicationController\n def show\n @person = Person.friendly_find(params)\n end\n\n def redirect_show\n person = Person.find_by(name: params[:nam... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak the \"metadata\" presentation for HMRC manuals\n\nWe were showing \"Hmrc manual\" and \"Hmrc manual section\".\n"
},
{
"from": "human",
"value": "class NonEditionResult < SearchResult\n include ERB::Util\n\n def to_hash\n super.merge({\n metadata: me... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to new split recipe\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: krb5\n# Recipe:: kdc\n#\n# Copyright 2014, Continuuity, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance ... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare for 0.2.0 (swift 2.2 compatible) release\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Kakapo\"\n s.version = \"0.1.0\"\n s.summary = \"Dynamically Mock server behaviors and responses.\"\n\n s.descript... | ruby | chosen |
[
{
"from": "system",
"value": "Change default configuration of progress plugin to use only uids\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nbegin\n require \"rails/railtie\"\nrescue LoadError\nelse\n class CustomFieldsProgressPlugin\n class Railtie < Rails::Railtie\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rails version to 4.1.5\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"sendnews/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add participants default value to TournamentCode\n"
},
{
"from": "human",
"value": "require 'lol/model'\n\nmodule Lol\n class TournamentCode < Lol::Model\n attr_reader :id\n\n attr_reader :provider_id\n\n # @!attribute [r] tournament_id\n # @return [Fix... | ruby | chosen |
[
{
"from": "human",
"value": "Refresh variant cache when changing stock movements\n"
},
{
"from": "gpt",
"value": "Spree::StockMovement.class_eval do\n after_save :refresh_products_cache\n\n private\n\n def refresh_products_cache\n return if stock_item.variant.blank?\n OpenFoodNetwork::P... | ruby | chosen |
[
{
"from": "system",
"value": "Fix plain @ symbol appearing for projects w/o GitHub repo\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class ProjectSerializer < ActiveModel::Serializer\n include ApplicationHelper\n\n attributes :id, :slug, :name, :short_description, :d... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake development dependency to >= 12.3.3\n\nRemove unused development dependency on rspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"security\"\n\nGem::Specification.new do |s|\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Add vCloud Tools Tester gem development dependency\n\nAdd the vCloud Tools Tester gem as a development dependency now that\nthis gem has been released.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshi... | ruby | chosen |
[
{
"from": "system",
"value": "[importer] Fix silly args bug in Indexer\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire_relative './georeferencer'\n\nmodule CartoDB\n module Importer2\n class Indexer\n DEFAULT_SCHEMA = 'importer'\n\n def initialize(db, schema=DEFAULT_S... | ruby | chosen |
[
{
"from": "human",
"value": "Add placeholder for future Solr Rake tasks\n\ngit-svn-id: 3b1ff1236863b4d63a22e4dae568675c2e247730@510347 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# The ASF licenses this file to You under the Apache License, Version ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove printing backtrace of execeptions\n"
},
{
"from": "human",
"value": "module RySafe\n class Shell\n def initialize\n @completions = Commands::Dispatcher.commands\n init_readline\n end\n\n def prompt\n while line = Readline.readline(pro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec looking for Integer class in older Ruby\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe BetterErrors::ExceptionHint do\n let(:described_instance) { described_class.new(exception) }\n\n describe '#hint' do\n subject(:hint) { d... | ruby | chosen |
[
{
"from": "system",
"value": "Add rpec for GET /ideas/show/id\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe IdeasController, type: :controller do\n describe 'GET #index' do\n it \"renders the index template\" do\n get :index\n expect(response).to rende... | ruby | chosen |
[
{
"from": "system",
"value": "Support transpilers other than AMD\n"
},
{
"from": "human",
"value": "require 'sprockets/es6module/version'\n\nrequire 'esperanto'\nrequire 'sprockets/es6'\n\nmodule Sprockets\n class ES6Module\n def self.instance\n @instance ||= new\n end\n\n def sel... | ruby | chosen |
[
{
"from": "system",
"value": "Handle visualization with inconsistent links\n"
},
{
"from": "human",
"value": "namespace :cartodb do\n namespace :permissions do\n desc 'setup default permissions for visualizations without them'\n task fill_missing_permissions: :environment do\n # This... | ruby | chosen |
[
{
"from": "system",
"value": "Correct method for getting email,\n"
},
{
"from": "human",
"value": "desc \"This is used to generate various on demand emails.\"\n\ntask :send_donation_drive_message => :environment do\n puts \"Sending donation drive message\"\n # this is currently hardcoded for S... | ruby | chosen |
[
{
"from": "system",
"value": "Use non-interactive mode for travis lint.\n"
},
{
"from": "human",
"value": "desc 'Validate .travis.yml'\nnamespace :travis do\n task :lint do\n sh %(travis lint --exit-code) do |ok, res|\n fail(\"travis lint failed with exit status #{res.exitstatus}\") unl... | ruby | chosen |
[
{
"from": "system",
"value": "Add association from answer table to response table\n"
},
{
"from": "human",
"value": "class CreateAnswers < ActiveRecord::Migration\n def change\n create_table :answers do |t|\n t.string :answer_text, null: false\n t.references :question, null: false\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix description for rake task `unused_views`\n"
},
{
"from": "human",
"value": "desc \"Show all unused views\"\ntask :load_controllers => :environment do\n puts \"# Loading code in search of controllers\"\n Rails.application.eager_load!\nend\n\ntask :unused_views,... | ruby | chosen |
[
{
"from": "system",
"value": "Set different default prompt under Ruby 1.9.\n"
},
{
"from": "human",
"value": "# Prompt configuration\n\nbrice 'prompt' => nil do |config|\n\n class IRB::Context\n %w[prompt_i prompt_s prompt_c prompt_n return_format].each { |name|\n define_method(name) {\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in Consul Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'consul' do\n version '0.5.2'\n sha256 '87... | ruby | chosen |
[
{
"from": "human",
"value": "Add new mailer to notify requester of responder\n"
},
{
"from": "gpt",
"value": "class NewResponderMailer < BaseMandrillMailer\n def notify(request, user)\n subject = \"#{request.responder.first_name} has replied to your request!\"\n merge_vars = {\n \"RE... | ruby | chosen |
[
{
"from": "system",
"value": "Add debug info to Releases::Calcuate\n"
},
{
"from": "human",
"value": "module Releases\n class Calculate < Mutations::Command\n UP_TO_DATE = \"Already on the latest version.\"\n\n required do\n model :device, class: Device\n string :platform, in: R... | ruby | chosen |
[
{
"from": "system",
"value": "Remove port number from feed\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nport = request.port == 80 ? '' : ':' + request.port.to_s\nbase_url = request.scheme + '://' + request.host + port\n\nxml.instruct! :xml, version: '1.0'\nxml.feed(xmlns: ... | ruby | chosen |
[
{
"from": "human",
"value": "Add solution to smallest integer in array challenge\n"
},
{
"from": "gpt",
"value": "# Smallest Integer\n\n# I worked on this challenge [by myself, with: ].\n\n# smallest_integer is a method that takes an array of integers as its input\n# and returns the smallest int... | ruby | chosen |
[
{
"from": "system",
"value": "Fix detailed status for pipeline stage entity\n"
},
{
"from": "human",
"value": "class PipelineStageEntity < Grape::Entity\n include RequestAwareEntity\n\n expose :name\n expose :detailed_status, as: :status, using: StatusEntity\n\n expose :path do |stage|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Edit gem description and summary\n"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\nrequire 'annotator_store/version'\n\nGem::Specification.new do |spec|\n spec.name = 'annotator-store'\n spec.version = AnnotatorStore... | ruby | chosen |
[
{
"from": "system",
"value": "Add native extension to gemspec.\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/mxfinfo/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Steve Dierker', 'Malte Rohde']\n gem.email = ['technology@flavoursys... | ruby | chosen |
[
{
"from": "system",
"value": "Set session cookie to domain: :all\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store :cookie_store, key: '_halfstaff_session'\n"
},
{
"from": "gpt",
"value": "# Be sur... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to debeloment dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/rench/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Micah Cooper\"]\n gem.email = [\"mrmica... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Use secure cookies in production\"\n\nThis reverts commit 672310588f3c122153c99e86348fa6b5b570cf31.\n\nFor debugging purposes\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nTradeTariffAdmin::Application.con... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated call to RAILS_ROOT, use ::Rails.root.to_s instead\n"
},
{
"from": "human",
"value": "MAGMAWIKI_CONFIG = YAML::load(File.read(RAILS_ROOT + \"/config/magmawiki_config.yml\").untaint)['magmawiki'].with_indifferent_access\n\nI18n.default_locale = MAGMA... | ruby | chosen |
[
{
"from": "system",
"value": "Use the clucumber ruby gem.\n\nThis gets rid of a lot of silly code (-:"
},
{
"from": "human",
"value": "require 'cucumber'\nrequire 'spec'\n\nrequire 'singleton'\nrequire 'pty'\nrequire 'expect'\n\nrequire \"json\"\nrequire \"socket\"\n\nrequire 'beanstalk-client'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add ParseTree as a dependency for 1.8.6.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sourcify/version\"\n\nGem::Specification.new do |s|\n s.name = \"sourcify\"\n s.version = So... | ruby | chosen |
[
{
"from": "system",
"value": "Add ARC requirement to PodSpec\n\nIt was being built using Retain/Release\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name \t= \"MTDates\"\n s.version \t= \"0.6.0\"\n s.summary \t= \"A category on NSDate. 100+ date calculation me... | ruby | chosen |
[
{
"from": "system",
"value": "Fix arch ref in value_for_platform.\n"
},
{
"from": "human",
"value": "# Cookbook Name:: sys_dns\n# Recipe:: default\n\n# Copyright RightScale, Inc. All rights reserved. All access and use subject to the\n# RightScale Terms of Service available at http://www.rights... | ruby | chosen |
[
{
"from": "system",
"value": "Load Mixpanel async and at the bottom of the page\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n"
},
{
"from": "human",
"value": "if [\"production\", \"staging\"].include?(Rails.env)\n mixpanel_conf = YAML::load_file(Rails.root.join... | ruby | chosen |
[
{
"from": "human",
"value": "Add codewars (6) evil autocorrect prank\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/evil-autocorrect-prank/\n# --- iteration 1 ---\ndef autocorrect(message)\n message.gsub(/\\b(you+|u)\\b/i, \"your sister\")\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Update ruby-progressbar to the 1.0 release candidate\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"fuubar-cucumber\"\n s.version = '0.0.17'\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Marcin Ciune... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up gemspec license & nokogiri version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'teifacsimile_to_jekyll'\n s.version = '0.1.0'\n s.date = '2015-11-30'\n s.summary = \"Import TEI facsimile pages and an... | ruby | chosen |
[
{
"from": "system",
"value": "Move find into pair script\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby\n#\n# Create a list of paired somatic files taking the base path as input. The\n# assumption is that base file names are almost the same, with one different\n# character R or N for no... | ruby | chosen |
[
{
"from": "system",
"value": "Add note about inheriting from Redis.\n\nFixes #1421.\n"
},
{
"from": "human",
"value": "# This class implements a cache with simple delegation to the Redis store, but\n# when it creates a key/value pair, it also sends an EXPIRE command with a TTL.\n# It should be f... | ruby | chosen |
[
{
"from": "system",
"value": "Add wiki message to instructions\n"
},
{
"from": "human",
"value": "module Rain\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n def copy_config_file\n copy_file \"versions.yml\", \"config/ve... | ruby | chosen |
[
{
"from": "system",
"value": "Update comment from Ubuntu to Linux\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: build\n# Recipe:: default\n#\n# Copyright:: Copyright (c) 2015 Chef Software, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2... | ruby | chosen |
[
{
"from": "human",
"value": "Add a function to flatten a nested hash to an argument list\n"
},
{
"from": "gpt",
"value": "require 'shellwords'\n\nPuppet::Functions.create_function(:flatten_to_argument_list) do\n dispatch :flatten_to_argument_list do\n param 'Hash', :variable\n optional_pa... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.