conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change titlebar to use » as a separator\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def title\n base_title = \"menosgrande URL Shortener\"\n if @title.nil?\n base_title\n else\n \"#{base_title} | #{@title}\"\n end\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Bit Slicer to 1.7.5"
},
{
"from": "human",
"value": "cask :v1 => 'bit-slicer' do\n version '1.7.4'\n sha256 '02766dcb88e21b39b78c91718eff5547904ad121e55b89b5bc11846a0c7e6ed4'\n\n # bitbucket.org is the official download host per the vendor homepage\n url ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure iptables opens up http ports for the web server.\n"
},
{
"from": "human",
"value": "name \"api_umbrella_web_base\"\ndescription \"A base role for API Umbrella web servers\"\n\nrun_list([\n \"role[base]\",\n\n \"role[nginx]\",\n \"role[torquebox]\",\n \... | ruby | chosen |
[
{
"from": "system",
"value": "Use \\A, \\z instead of ^, $ to validate device token\n"
},
{
"from": "human",
"value": "module Rpush\n module Client\n module ActiveModel\n module Apns\n class DeviceTokenFormatValidator < ::ActiveModel::Validator\n def validate(record)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Designate more Order attributes as readonly\n\nOrdoro doesn't want to see these in update requests. Later, we may\nswitch these to on: :create or something similar.\n"
},
{
"from": "human",
"value": "require 'ordoro/record/base'\n\nmodule Ordoro\n module Record\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[master]: Update the podspec to fix validation errors.\n\nSigned-off-by: Daniel Thorpe <2591e5f46f28d303f9dc027d475a5c60d8dea17a@blindingskies.com>\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod spec lint NAME.podspec' to ensure this is a\n# valid spec ... | ruby | chosen |
[
{
"from": "system",
"value": "Set the superjob queue as an ignored queue in Sidekiq::Monitor::Cleaner"
},
{
"from": "human",
"value": "require 'sidekiq'\n\ndirectory = File.dirname(File.absolute_path(__FILE__))\nDir.glob(\"#{directory}/superworker/**/*.rb\") { |file| require file }\nDir.glob(\"#... | ruby | chosen |
[
{
"from": "system",
"value": "Fix asset paths for the Rails asset pipeline (sprockets)\n"
},
{
"from": "human",
"value": "module Unpoly\n module Rails\n class Engine < ::Rails::Engine\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module Unpoly\n module Rails\n class E... | ruby | chosen |
[
{
"from": "system",
"value": "Use idiomatic Ruby for the counts implementation\n"
},
{
"from": "human",
"value": "class PokerHand\n \n def initialize(cards)\n @cards = cards\n end\n \n def high_card\n card = @cards.sort.last\n card.value if card\n end\n \n def pair\n pairs.ke... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to drop_schema task\n"
},
{
"from": "human",
"value": "\n# we utilize PostgreSQL's schemas for segmenting our projects within the same database, this works with Heroku Postgres\n\nnamespace :db do\n\n def using_postgres?\n defined?(ActiveRecord::Conn... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce number of pictures per page from 24 to 12\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nKaminari.configure do |config|\n config.default_per_page = 24\n # config.max_per_page = nil\n # config.window = 4\n # config.outer_window = 0\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Move to Ruby 1.9 hash syntax\n"
},
{
"from": "human",
"value": "class TagsController < ApplicationController\n respond_to :json\n\n def index\n @tags = TagRepository.load_all\n # TODO: links: [next_page, prev_page]\n respond_with(:status => 'ok', :total =... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the users_array function since we're now using collection_select instead\n"
},
{
"from": "human",
"value": "module TeamMembersHelper\n\n # Build array of users for dropdown list\n def users_array\n ary = Array.new\n\n # The first entry is an invalid n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix column type on postgres\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nSequel.migration do\n up do\n create_table(:dynflow_output_chunks) do\n primary_key :id\n\n foreign_key :execution_plan_uuid, :dynflow_execution_plans, type: ... | ruby | chosen |
[
{
"from": "system",
"value": "Put the constant at the top\n"
},
{
"from": "human",
"value": "class BlogController < ApplicationController\n before_filter :find_post, only: [:show]\n POSTS_PER_PAGE = 6\n\n def index\n unless params[:page] and params[:page].to_i >= 0\n @page = 0\n el... | ruby | chosen |
[
{
"from": "system",
"value": "Change displayed offers at Jooble XML feed\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass FeedController < ApplicationController\n respond_to :xml\n before_action :fetch_offers, except: :region_list\n\n def action_missing(name)\n fet... | ruby | chosen |
[
{
"from": "system",
"value": "Make nop do something useful.\n"
},
{
"from": "human",
"value": "require 'serialport'\nrequire 'pry'\n\nclass Lightbringer < Thor\n class_option :device, type: :string, default: Dir[\"/dev/tty.usbmodem*\"].first\n class_option :baud, type: :string, default: 9600\n... | ruby | chosen |
[
{
"from": "system",
"value": "Delete groups from gems so they're not doubled up as an option on export.\n"
},
{
"from": "human",
"value": "module Gemfiler\n class Filer\n attr_accessor :cabinet, :groups, :uncategorized\n\n def initialize(cabinet)\n @cabinet = cabinet\n @gr... | ruby | chosen |
[
{
"from": "system",
"value": "Add hh:mm format validation for Worktime\n"
},
{
"from": "human",
"value": "class Worktime < Record\n attr_accessor :time_from, :time_to, :day\n\n validates_time :time_from\n validates_time :time_to\n\n before_validation :build_record\n\n scope :user, -> (user)... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper methods to application policy\n"
},
{
"from": "human",
"value": "class ApplicationPolicy\n attr_reader :user, :record\n\n def initialize(user, record)\n @user = user\n @record = record\n end\n\n def index?\n false\n end\n\n def show?\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Check ceilometer process on controller nodes only\n\nThe process checked for by the ceilometer serverspec only exist\non controller nodes. We should only drop those checks on the node\nceilometer role is being run on if it is in the controller group.\n"
},
{
"from": "hu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Persistence.merge to use permanent storage\n\nNSUserDefaults registerDefaults: only stores values in the\nNSRegistrationDomain, which is only temporary. Setting each key\nindividually will use the applications domain, which is persisted.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "human",
"value": "Add benchmark demonstrating bad perf with enqueing a batch."
},
{
"from": "gpt",
"value": "require 'benchmark'\nrequire 'bundler/setup'\nrequire 'plines'\n\n\nmodule MyPipeline\n extend Plines::Pipeline\n\n configure do |plines|\n plines.batch_list_key { \"key\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add campaign key to search params.\n"
},
{
"from": "human",
"value": "class Admin::CampaignsController < Admin::AdminController\n \n def show\n @campaign = Campaign.find(params[:id])\n end\n \n def index\n conditions = []\n query_clauses = []\n if p... | ruby | chosen |
[
{
"from": "system",
"value": "Add default auth_token from ENV\n"
},
{
"from": "human",
"value": "require 'nestful'\nrequire 'vero/version'\n\nmodule Vero\n def self.auth_token=(value)\n Base.auth_token = value\n end\n\n def self.auth_token\n Base.auth_token\n end\n\n def self.version=... | ruby | chosen |
[
{
"from": "system",
"value": "Move Recipe DSL to Chef::DSL::Recipe\n"
},
{
"from": "human",
"value": "require 'chef_metal'\nrequire 'chef/resource/fog_key_pair'\nrequire 'chef/provider/fog_key_pair'\nrequire 'chef_metal_fog/fog_provisioner'\n\nclass Chef\n class Recipe\n def with_fog_provisi... | ruby | chosen |
[
{
"from": "system",
"value": "Add expires header to rack-gridfs.\n"
},
{
"from": "human",
"value": "require \"rack/gridfs\"\n\n# Use Rails.application.routes.prepend on Rails 3.1.\nRails.application.routes.draw do\n match \"/visits/record.gif\" => \"control_center/visits#record\", :as => \"reco... | ruby | chosen |
[
{
"from": "system",
"value": "Add a 5 digit random number to classnames\n"
},
{
"from": "human",
"value": "module NameGenerator\n\n def generate\n \"#{color}-#{animal}\"\n end\n\n def animal\n sample('animals.db')\n end\n\n def color\n sample('colors.db')\n end\n\n extend self\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"remove module_function on logger module\"\n\nThis reverts commit d3ae69f286712ef363097c4bddc251b3f29a96e1.\n"
},
{
"from": "human",
"value": "module Resque\n # Include this module in classes you wish to have logging facilities\n module Logging\n\n # Th... | ruby | chosen |
[
{
"from": "system",
"value": "Add GemInstaller support to automatically install development dependencies on CI box\n"
},
{
"from": "human",
"value": "desc 'Continuous build target'\ntask :cruise => ['geminstaller'] do\n out = ENV['CC_BUILD_ARTIFACTS']\n mkdir_p out unless File.directory? out ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the wrong parameter being used.\n"
},
{
"from": "human",
"value": "module Traitor\n class Config\n @save_method = nil\n @save_kwargs = {}\n @build_kwargs = {}\n @build_with_list = false # use (**attributes.merge(build_kwargs)) instead of (attribut... | ruby | chosen |
[
{
"from": "system",
"value": "Rename the PFTrack exporter for better capitalization\n"
},
{
"from": "human",
"value": "# Export for PFTrack .2dt files\nclass Tracksperanto::Export::Pftrack < Tracksperanto::Export::Base\n \n # Should return the suffix and extension of this export file (like... | ruby | chosen |
[
{
"from": "system",
"value": "Define our custom resource using the new ChefSpec syntax.\n"
},
{
"from": "human",
"value": "#\n# Author:: Douglas Thrift (<douglas.thrift@rightscale.com>)\n# Cookbook Name:: chef_handler\n# Library:: matchers\n#\n# Copyright 2014, Chef Software, Inc.\n#\n# Licensed... | ruby | chosen |
[
{
"from": "system",
"value": "Remove haml require all together.\n"
},
{
"from": "human",
"value": "require File.expand_path('guard/reload_meta_wordpress.rb', File.dirname(__FILE__))\nrequire 'haml'\n\n# we need to be able to reload the view helper\nload File.expand_path('haml/helpers.rb', File.d... | ruby | chosen |
[
{
"from": "system",
"value": "Add String camelization and `stringify_keys!` to Hash\n\n* Normally part of activesupport, but the library is dependency-free\n so they needed to be mixed in\n"
},
{
"from": "human",
"value": "module ObjectSchemas\n\tclass MethodNotDefined < StandardError; end\n\tc... | ruby | chosen |
[
{
"from": "system",
"value": "Add successful? for a more flexible vernacular"
},
{
"from": "human",
"value": "require 'simple_command/version'\nrequire 'simple_command/errors'\n\nmodule SimpleCommand\n attr_reader :result\n\n module ClassMethods\n def call(*args)\n new(*args).call\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix weird tab vs spacing formatting"
},
{
"from": "human",
"value": "require \"sobriety_check/version\"\n\nmodule SobrietyCheck\n\tclass Base\n\t\tdef initialize(env:)\n\t\t\t@env = env\n\t\tend\n\n\t\tdef call\n\t\t\treturn env if non_production_env?\n\t\t\tcan_you... | ruby | chosen |
[
{
"from": "system",
"value": "Correct return value for Order when getting created.\n"
},
{
"from": "human",
"value": "class Synapsis::Order < Synapsis::APIResource\n include Synapsis::Utilities\n\n attr_accessor :balance, :balance_verified, :success, :account_type, :amount, :date, :date_settle... | ruby | chosen |
[
{
"from": "system",
"value": "Set log level to info\n"
},
{
"from": "human",
"value": "RailsBase::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # Add Rack::LiveReload to the bottom of the middleware stack with the default opt... | ruby | chosen |
[
{
"from": "system",
"value": "Increase polling frequency to avoid delays sending emails\n"
},
{
"from": "human",
"value": "Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'dj.log'))\nDelayed::Worker.destroy_failed_jobs = false\nDelayed::Worker.sleep_delay = Rails.env.development... | ruby | chosen |
[
{
"from": "system",
"value": "Use req.ip for throttling if present\n\nMostly so things don't break when working locally.\n"
},
{
"from": "human",
"value": "class Rack::Attack\n throttle('registrations', limit: 10, period: 1.day) do |req|\n if req.path == '/' && req.post?\n req.env['HTTP... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the stock_transfer_status helper method\n\nThis is no longer in use after switching this display to use the pill\ncomponent.\n"
},
{
"from": "human",
"value": "module Spree\n module Admin\n module StockTransfersHelper\n def handle_stock_transfer(stoc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix S3 directory name to match new project name\n"
},
{
"from": "human",
"value": "CarrierWave.configure do |config|\n config.storage = :fog\n config.fog_credentials = {\n :provider => 'AWS',\n :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct asset host\n"
},
{
"from": "human",
"value": "#\n# Carrier Wave configuration block\n#\nCarrierWave.configure do |config|\n\n if Rails.env.production? or Rails.env.staging?\n\n config.storage = :fog\n config.root = Rails.root.join('tmp')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add hot reload of code changes for Resque\n"
},
{
"from": "human",
"value": "require 'resque'\nrequire 'resque/failure/base'\nrequire 'resque/failure/multiple'\nrequire 'resque/failure/redis'\n\n# Load automatically all resque files from lib/resque\nDir[Rails.root.j... | ruby | chosen |
[
{
"from": "system",
"value": "Disable sass sourcemap. In master.\n"
},
{
"from": "human",
"value": "Encoding.default_external = 'utf-8'\n\n# Set this to the root of your project when deployed:\nhttp_path = \"\" # use if other than /\ncss_dir = \"../static/css\"\nsass_dir = \"sass\"\nimages_dir =... | ruby | chosen |
[
{
"from": "system",
"value": "Add Tobi as an author\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"statsd-instrument\"\n s.version = '1.3.1'\n s.authors = [\"Jesse Storimer\"]\n s.email = [\"jesse@shopify.com\"]\n s.homepage = \"http://... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Futuniuniu.app to v2.16.354, and linking the app with official Chinese name\n"
},
{
"from": "human",
"value": "class Futuniuniu < Cask\n version '2.14.316'\n sha256 'abe44dc80551e6cfaea7bc2265997766fd3fadd68a2f859193db732598516028'\n\n url 'http://www.fut... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Light Table.\n"
},
{
"from": "human",
"value": "cask 'lighttable' do\n version '0.8.1'\n sha256 '423e9caf6db4dfe26a0167ea6ba998d747f233e2cd9cd97b7fee027c5c0c3992'\n\n url \"https://github.com/LightTable/LightTable/releases/download/#{... | ruby | chosen |
[
{
"from": "human",
"value": "Add Not Pacman v1004 cask\n\nSee <http://stabyourself.net/notpacman/> for more info.\n"
},
{
"from": "gpt",
"value": "class NotPacman < Cask\n version '1004'\n sha256 '4a2c4d84ad713f505a89a14eea5184e76ea5378eb08698da41afc6c4021ead13'\n\n url 'http://stabyourself.n... | ruby | chosen |
[
{
"from": "system",
"value": "Package dependency is increased from 0.1.0 to 0.1.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'controls'\n s.version = '0.1.0'\n s.summary = 'Test controls'\n s.description = ' '\n\n s.authors = ['Obs... | ruby | chosen |
[
{
"from": "system",
"value": "Update magic_shell dependency to >= 1.0.0\n"
},
{
"from": "human",
"value": "name 'aliases'\nmaintainer 'Oregon State University'\nmaintainer_email 'rudy@grigar.net'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures aliases'\nlo... | ruby | chosen |
[
{
"from": "system",
"value": "Use displaystring as slug but fall back to the object ID if displaystring is not available\n"
},
{
"from": "human",
"value": "module FactHelper\n def friendly_fact_path(fact)\n frurl_fact_path(fact.to_s.parameterize, fact.id)\n end\nend"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "system",
"value": "Update Ap-Grapher URL and Homepage\n"
},
{
"from": "human",
"value": "class ApGrapher < Cask\n url 'http://www.chimoosoft.com/downloads/current/APGrapher.dmg'\n homepage 'http://www.chimoosoft.com/products/apgrapher/'\n version 'latest'\n no_checksum\n link 'AP... | ruby | chosen |
[
{
"from": "system",
"value": "Add uninstall and zap for Flashlight.app\n"
},
{
"from": "human",
"value": "cask :v1 => 'flashlight' do\n version :latest\n sha256 :no_check\n\n # appspot.com is the official download host for the latest version, per the developer\n # Original discussion: https:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove prerelease flag for release\n\nChange-Id: I60950e73161382c85190f9c7c5820ac3ea7f6304\nReviewed-on: http://review.engineyard.com/88\nReviewed-by: Andy Delcambre <dceae9ae498de7d794de551710d5e4d9b952cadb@engineyard.com>\nTested-by: Andy Delcambre <dceae9ae498de7d794de551710... | ruby | chosen |
[
{
"from": "system",
"value": "Add silversearcher to default package set, for code search\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: bcpc\n# Recipe:: packages\n#\n# Copyright 2017, Bloomberg Finance L.P.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you m... | ruby | chosen |
[
{
"from": "system",
"value": "Modify test to ensure correct location and timezone data is getting returned.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass LocotimezoneTest < Minitest::Test\n def test_that_it_has_a_version_number\n refute_nil ::Locotimezone::VERSION\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Split long lines to new line\n"
},
{
"from": "human",
"value": "#graph_user_ids_following_fact_spec.rb\nrequire_relative '../../../../app/interactors/queries/activities/graph_user_ids_following_fact'\nrequire 'pavlov_helper'\n\ndescribe Queries::Activities::GraphUse... | ruby | chosen |
[
{
"from": "system",
"value": "Remove custom way of finding teams\n"
},
{
"from": "human",
"value": "# lib/frecon/controllers/teams_controller.rb\n#\n# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part of FReCon, an ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix an order of move and write to kifu\n\n1.kifu 2.move ->\n1.move 2.kifu\n\n棋譜に書くタイミングを修正(moveに成功した場合のみ書く)\n"
},
{
"from": "human",
"value": "module Shogi\n class Game\n attr_accessor :default_format\n attr_reader :turn\n def initialize(format=:csa, turn=... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra filtering code for exceptions\n\nIn https://github.com/alphagov/collections/pull/388 I fixed a bug and\nintroduced another: the `e` argument to the proc isn't an exception,\nbut a `Raven::Event`. To make sure we don't do this again, this commit\nreverts the changes... | ruby | chosen |
[
{
"from": "system",
"value": "Allow configuring the default branch from an ENV var"
},
{
"from": "human",
"value": "require 'bundler'\nrequire 'json'\nBundler.require\n\nclass TravisRebuilder < Sinatra::Base\n use Rack::Deflater\n\n configure do\n set :logging, true\n set :dump_errors, f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix remaining ARGF flaky tests by isolating ARGF.set_encoding.\n\n* ARGF.read and ARGF.gets expect default ARGF encodings.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"ARGF.set_encoding\" do\n before :e... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for font/glyphs extents.\n"
},
{
"from": "human",
"value": "require './test/helpers'\n\nmodule Harfbuzz\n\n class TestFont < Minitest::Test\n\n include Setup\n\n def test_scale\n scale = @font.scale\n assert scale.kind_of?(Array)\n as... | ruby | chosen |
[
{
"from": "system",
"value": "Add a sleep to select2 so that taxons_spec works\n"
},
{
"from": "human",
"value": "module CapybaraExt\n def page!\n save_and_open_page\n end\n\n def click_icon(type)\n find(\".icon-#{type}\").click\n end\n\n def within_row(num, &block)\n within(\"tabl... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix spec that depends on environment variable\"\n\nThis reverts commit df23a8cc7f588c5335592561cee5baa49da9c27d.\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe ContactMailer, type: :mailer do\n describe \"#send_contact_messag... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec to support monthly salary calculation\n"
},
{
"from": "human",
"value": "RSpec.describe Wpcc::SalaryPerYear do\n describe '#convert' do\n subject(:convert) do\n described_class.new(\n salary: salary,\n salary_frequency: salary_frequen... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Validate token for API requests to CanvasUsersController\n\n"
},
{
"from": "human",
"value": "class Api::CanvasUsersController < ApplicationController\n include Concerns::CanvasSupport\n\n def index\n canvas_response = canvas_api.proxy(\n \"LIST_USERS... | ruby | chosen |
[
{
"from": "system",
"value": "Remove updated_at from the list of changes\n"
},
{
"from": "human",
"value": "class SandboxShipmentSerializer < ActiveModel::Serializer\n attributes :id, :appendix, :taxon_name, #:reported_taxon_name, :accepted_taxon_name,\n :term_code, :quantity, :unit_code, :t... | ruby | chosen |
[
{
"from": "system",
"value": "Handle more than 1 page of IAM policies\n\nFog partially takes care of pagination for managed policies. Make sure\nto use a method - each() - where the pagination is accounted for.\nPrevious implementation used select() which only considered the first\npage of results.\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": ":bug: Fix regexp to recognize git repository\n"
},
{
"from": "human",
"value": "module Circler\n class BaseCommand\n class << self\n def setup_token\n CircleCi.configure do |config|\n config.token = ENV['CIRCLE_CI_TOKEN'] || ask('Circle CI t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing image error (hopefully)\n"
},
{
"from": "human",
"value": "module GraphStarter\n module ApplicationHelper\n def asset_path(asset, options = {})\n graph_starter.asset_path({id: asset, model_slug: asset.class.model_slug}.merge(options))\n end\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add worker that run check result against assertion\n"
},
{
"from": "gpt",
"value": "class CheckToCreateIncidentWorker\n include Sidekiq::Worker\n\n # @param sting check id\n # @param Hash result\n # - total_time\n # - body\n # - total_si... | ruby | chosen |
[
{
"from": "system",
"value": "[gemspec] Update basic list view gemspec to include views, oops.\n"
},
{
"from": "human",
"value": "# Encoding: UTF-8\n\nGem::Specification.new do |s|\n s.name = %q{imagine-basic_list_view}\n s.version = %q{0.1.3}\n s.summary = %q... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"nil layout should fallback to application\"\n\nThis reverts commit 4e6505e26cf398591247bd3e7137e10f955ba18f.\n"
},
{
"from": "human",
"value": "module Pjax\n extend ActiveSupport::Concern\n\n included do\n layout proc { |c| pjax_request? ? pjax_layout ... | ruby | chosen |
[
{
"from": "system",
"value": "Use single quotes for PG strings in migration\n\n* PG uses double quotes as table/column signifiers\n"
},
{
"from": "human",
"value": "class DeleteAbsoluteFilenameImportedHitsFiles < ActiveRecord::Migration\n def up\n command = 'DELETE FROM imported_hits_files W... | ruby | chosen |
[
{
"from": "system",
"value": "Add reflection section to ruby file.\n"
},
{
"from": "human",
"value": "# Full Name Greeting\nputs \"What is your first name?\"\nfirst = gets.chomp\nputs \"What is your middle name?\"\nmiddle = gets.chomp\nputs \"What is your last name?\"\nlast = gets.chomp\nputs \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use User.friendly scope to find user in integration sessions controller.\n"
},
{
"from": "human",
"value": "class IntegrationSessionsController < ActionController::Base\n def new\n @user_id = params[:user_id]\n render 'features/support/integration_sessions_fo... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.28.0.0 to 0.28.0.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.28.0.0'\n s.summary = 'Common primitives for platform-specific messaging... | ruby | chosen |
[
{
"from": "system",
"value": "Order payments to update the gateway_data\n"
},
{
"from": "human",
"value": "desc \"Migrate payments data using first payment notification\"\ntask :migrate_payment_data => :environment do\n payments = Payment.all\n\n payments.each do |payment|\n first_notificat... | ruby | chosen |
[
{
"from": "system",
"value": "Make engine optional -- only include in build if including something that requires it\n"
},
{
"from": "human",
"value": "##\n## WebBlocks Blockfile (experimental)\n## https://github.com/WebBlocks/WebBlocks\n##\n\n##\n## INCLUDES\n##\n## When building with WebBlocks ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec file to 0.9.3\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'PJLinkCocoa'\n s.version = '0.9.2'\n s.license = 'MIT'\n s.summary = 'A Cocoa Library for communicating with projectors and other devices that... | ruby | chosen |
[
{
"from": "system",
"value": "Comment asso key by default\n"
},
{
"from": "human",
"value": "<%= assoc -%> :<%= ref -%><%= ref =~ /_/ ? \", key: :#{ref.camelize(:lower)}\" : '' -%>\n"
},
{
"from": "gpt",
"value": "<%= assoc -%> :<%= ref -%><%= ref =~ /_/ ? \"#, key: :#{ref.camelize(:... | ruby | chosen |
[
{
"from": "human",
"value": "Implement a bare-bones Generator for the generic Lucene view\n"
},
{
"from": "gpt",
"value": "require 'rails/generators/couchrest_model'\n\nmodule CouchrestModel\n module Generators\n class LuceneViewGenerator < Base\n desc %[Creates a generic Lucene view th... | ruby | chosen |
[
{
"from": "system",
"value": "Add patch file and url attributes\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: rbenv\n# Resource:: ruby\n#\n# Author:: Fletcher Nichol <fnichol@nichol.ca>\n#\n# Copyright 2011, Fletcher Nichol\n#\n# Licensed under the Apache License, Version 2.0 (the \"Li... | ruby | chosen |
[
{
"from": "system",
"value": "Update InventoryTransferInventoryList to use Support::Sublist\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class InventoryTransferInventoryList\n include Support::RecordRefs\n include Support::Records\n include Support::Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Set up Rack to gzip responses\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\nrun Joinplato::Application\n"
},
{
"from": "gpt",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Add another namespace to deprecate\n"
},
{
"from": "human",
"value": "# Mostly copied from:\n# https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/deprecation/method_wrappers.rb\ndef deprecate_methods(target_module, *method_names)\n opti... | ruby | chosen |
[
{
"from": "human",
"value": "Rename providers to match cookbook name\n"
},
{
"from": "gpt",
"value": "#\n# Copyright:: Copyright (c) 2015 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ex... | ruby | chosen |
[
{
"from": "human",
"value": "Add day 10: Look and Say\n"
},
{
"from": "gpt",
"value": "rounds = [40, 50]\n\nx = !ARGV.empty? && !File.exist?(ARGV.first) ? ARGV.first : ARGF.read\n\nrounds.max.times { |i|\n x = x.scan(/((.)\\2*)/).map { |list, char| \"#{list.size}#{char}\" }.join\n puts x.lengt... | ruby | chosen |
[
{
"from": "system",
"value": "Update nokogiri dependency to allow higher version\n\nIs there any reason for restricting nokogiri here? Thanks."
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nGem::Specification.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary default scope ordering\n"
},
{
"from": "human",
"value": "class Activity < ApplicationRecord\n belongs_to :user, optional: true\n belongs_to :appointment\n\n default_scope { order(created_at: :desc) }\n\n def to_partial_path\n \"activities/... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to the newest bundler version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"seasoning\"\n s.version = \"0.1.1\"\n s.author = \"Aaron Kalin\"\n s.email = \"akalin@martinisoftware.com\"\n s.home... | ruby | chosen |
[
{
"from": "system",
"value": "Fix HasMany manual association preloader\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule ActiveRecord::Associations::Preloader::ManualAssociationPreloader\n def initialize(klass, owners, reflection, records)\n super(klass, owners, reflec... | ruby | chosen |
[
{
"from": "system",
"value": "Fix integer being passed from functional test.\n"
},
{
"from": "human",
"value": "class TagsController < ApplicationController\n\n def show\n @tag = params[:id] =~ /^\\d+$/ ? Tag.find(params[:id]) : Tag.find_by_name(params[:id])\n end\n\nend\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Add Snappy support for HBase\n"
},
{
"from": "human",
"value": "package \"hbase-regionserver\" do\n action :install\nend\n\nservice \"hbase-regionserver\" do\n supports :status => true, :restart => true, :reload => false\n action [:enable, :start]\n subscribes :... | ruby | chosen |
[
{
"from": "system",
"value": "Handle documents without SVG root elements\n"
},
{
"from": "human",
"value": "module InlineSvg::TransformPipeline::Transformations\n class PreserveAspectRatio < Transformation\n def transform(doc)\n doc = Nokogiri::XML::Document.parse(doc.to_html)\n sv... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate notifications template name to contribution\n"
},
{
"from": "gpt",
"value": "class MigrateNotificationsTemplateNameToContribution < ActiveRecord::Migration\n TEMPLATE_NAMES = [ [:backer_confirmed_after_project_was_closed, :contribution_confirmed_after_projec... | ruby | chosen |
[
{
"from": "system",
"value": "Use `next` instead of `return`, which has a side effect\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nrequire 'sinatra'\nrequire 'sinatra/json'\nrequire 'mongo'\n\nget '/' do\n redirect to('/index.html')\nend\n\ndef do_with_db\n mongo_uri = ENV['MONGOLAB... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.