conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "human",
"value": "Test version of Fisher-Yate's array shuffle\n"
},
{
"from": "gpt",
"value": "# Cannot create a temporary array or make copies of the input array\n# Must move the elements in place\n# Two elements may swap places\n# Shouldn't be able to predict what the shuffled array... | ruby | chosen |
[
{
"from": "system",
"value": "Include Icinga alerts in Slack message again\n\nNow that we're timing the Icinga alerts to be every 6 months, we can\ninclude it again to make sure we actually review the pages.\n"
},
{
"from": "human",
"value": "class PageFreshness\n attr_reader :sitemap\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Set bindir correctly in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bumpspark'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update all gems to latest versions\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire 'castle-rb/version'\n\nGem::Specification.new do |s|\n s.name = 'castle-rb'\n s.version = Castle::VERSION\n s.summary = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update distro attribute to be dynamic\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: dev_box\n# Attributes:: default\n#\n# Copyright (C) 2016 Jason Blalock\n#\n# MIT License\n#\n\ndefault['dev_box']['user'] = 'jason'\ndefault['dev_box']['platform']['distro'... | ruby | chosen |
[
{
"from": "system",
"value": "FC001: Use strings in preference to symbols to access node attributes\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: pacman\n# Attribute:: default\n#\n# Copyright:: 2010, Opscode, Inc <legal@opscode.com>\n#\n# Licensed under the Apache License, Version 2.0 ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle to the TC db.\n"
},
{
"from": "human",
"value": "# @abstract Manages an index of message-id in a given Maildir mailbox\n#\n# @author Ollivier Robert <roberto@keltia.net>\n\nVCS_GMI_ID = \"$Id: gmindex.rb,v f3a4da3ed2d3 2012/09/12 14:13:00 roberto $\"\n\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Update GnuPG formula to 1.4.10 and include --disable-asm to prevent breakage\n"
},
{
"from": "human",
"value": "require 'brewkit'\n\nclass Gnupg <Formula\n @url='ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.9.tar.bz2'\n @homepage='http://www.gnupg.org/'\n @sha1='82... | ruby | chosen |
[
{
"from": "system",
"value": "Expire sessions after 30 minutes\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store(\n :redis_store,\n expire_after: 30.days,\n key: '_cms_session',\n redis_server: Rails.appli... | ruby | chosen |
[
{
"from": "system",
"value": "Remove internal note from appointment ticket"
},
{
"from": "human",
"value": "class AppointmentTicket\n ZENDESK_API_URL = 'https://pensionwise.zendesk.com/api/v2'\n ZENDESK_ONLINE_BOOKING_GROUP = 24_532_022\n\n def initialize(appointment)\n @appointment = appo... | ruby | chosen |
[
{
"from": "system",
"value": "Replace options hash with memoized instance vars\n"
},
{
"from": "human",
"value": "module Fabrication\n module Config\n extend self\n\n def configure\n yield self\n end\n\n def fabricator_path\n OPTIONS[:fabricator_path]\n end\n alias f... | ruby | chosen |
[
{
"from": "system",
"value": "Add tiny sleep to make idle handler work on MRI 1.9.2\n"
},
{
"from": "human",
"value": "require 'singleton'\n\nGLib.load_class :MainLoop\n\nmodule GLib\n # Overrides for GMainLoop, GLib's event loop\n class MainLoop\n # Class encepsulationg logic for running a... | ruby | chosen |
[
{
"from": "system",
"value": "Set class_name for Order addresses"
},
{
"from": "human",
"value": "require 'gecko/record/base'\n\nmodule Gecko\n module Record\n class Order < Base\n has_many :fulfillments\n has_many :invoices\n has_many :order_line_items\n belongs_to :comp... | ruby | chosen |
[
{
"from": "system",
"value": "Make dummy app's asset pipeline work\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\nreq... | ruby | chosen |
[
{
"from": "human",
"value": "Add a couple of features tests\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"index page\" do\n it \"has Highest-Rated games\" do\n visit('/')\n expect(page).to have_content(\"Highest-Rated\")\n end\n\n it \"has Recently Added games\" d... | ruby | chosen |
[
{
"from": "system",
"value": "lib: Write routes and basic url_search functionality\n"
},
{
"from": "human",
"value": "module Lita\n module Handlers\n class Snoo < Handler\n end\n\n Lita.register_handler(Snoo)\n end\nend\n"
},
{
"from": "gpt",
"value": "require 'uri'\n\nmod... | ruby | chosen |
[
{
"from": "system",
"value": "Use `plural` instead of `pluralize` with ModelName instance in `graph_data`\n\nFixes Rails 4, rails_admin 0.5.0 'undefined method `pluralize' for #<ActiveModel::Name:0x007f93a0175990>'"
},
{
"from": "human",
"value": "require 'lazy_high_charts/engine'\nrequire 'rail... | ruby | chosen |
[
{
"from": "system",
"value": "Add more error information in case of failure\n"
},
{
"from": "human",
"value": "require 'sprockets'\nrequire 'tilt'\nrequire 'pathname'\nrequire 'shellwords'\n\nmodule Sprockets\n # Postprocessor that runs the computed source of Javascript files\n # through brows... | ruby | chosen |
[
{
"from": "system",
"value": "Use human_attribute_name only if available on the model\n"
},
{
"from": "human",
"value": "module Stradivari\n\n class Generator\n class Tag\n delegate :view, :klass, to: :@parent\n delegate :t, :capture_haml, :haml_tag, :haml_concat, to: :view\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add the test cases for orders/edit.slim\n"
},
{
"from": "gpt",
"value": "describe 'comable/admin/orders/edit' do\n let(:order) { create(:order, :completed) }\n\n before { assign(:order, order) }\n\n it 'renders the edit product form' do\n render\n assert_sel... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor individual tar command classes into a single class\n\nTurned the commands into shim layer -- they will be removed in the libraries/default\n"
},
{
"from": "human",
"value": "\nclass TarUnpacker\n def initialize(resource,options = {})\n @resource = resou... | ruby | chosen |
[
{
"from": "system",
"value": "Add timing info to default output\n"
},
{
"from": "human",
"value": "require 'zombie_scout/ruby_project'\nrequire 'zombie_scout/method_finder'\nrequire 'zombie_scout/method_call_finder'\n\nmodule ZombieScout\n class Mission\n def initialize(globs)\n puts \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use the latest Ubuntu AMI\n"
},
{
"from": "human",
"value": "@description = \"Kwaai Oak DevOps\"\n@stack_name = \"devops\"\n@domain = \"\"\n@debug = \"\"\n@devops_bucket = \"\"\n@cloud = 'aws'\n@availability_zone = \"\"\n@key_name = \"\"\n@image_id = \"ami-5c120... | ruby | chosen |
[
{
"from": "system",
"value": "Use HTTP auth to restrict access\n\nWe need this because we can't use the font & crown on non-gov.uk pages.\nThe username/password are the default pseudo-secret\nGDS-username/password combo.\n"
},
{
"from": "human",
"value": "# For hosting on Heroku\nrequire 'rack'\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"run app in subdirectory\"\n\nThis reverts commit e896b7241f498d172235e56c1e197cb36e7a7e46.\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE_... | ruby | chosen |
[
{
"from": "human",
"value": "Extend the configuration options for the check.\nMake the check 1.x compliant\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n#\n# Checks ElasticSearch cluster status\n# ===\n#\n# DESCRIPTION:\n# This plugin checks the ElasticSearch cluster status, using its ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 12.0 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Update hash creation with very simple stuff\n"
},
{
"from": "human",
"value": "class Revuelog\n attr_reader :time, :nick, :message\n\n def initialize(time, nick, message)\n @time = time\n @nick = nick\n @message = message\n end\n\n def to_hash\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add sudo default recipe to fix /etc/sudoers\n"
},
{
"from": "human",
"value": "default_source :community\ndefault_source :chef_repo, '..'\ncookbook 'consul', path: '../../..'\nrun_list 'consul::default', \"consul_spec::#{name}\"\nnamed_run_list :centos, 'yum::defaul... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic success case test\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire_relative \"../lib/buienalarm_scraper\"\n\nclass TestBuienalarmScraper < Minitest::Test\n\n def test_that_scrape_raises_an_error_when_no_data_is_found\n location ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the config pattern type for the graph refresh\n"
},
{
"from": "human",
"value": "module ManageIQ::Providers::Lenovo\n class Inventory::Parser::ComponentParser::ConfigPattern < Inventory::Parser::ComponentParser\n # Mapping between fields inside [XClarityClie... | ruby | chosen |
[
{
"from": "system",
"value": "Add bunny gem for MQ connection\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'carbon/router/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add DjView4 upstream bug URL.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Djview4 <Formula\n url 'http://sourceforge.net/projects/djvu/files/DjView/4.6/djview4-4.6.tar.gz'\n homepage 'http://djvu.sourceforge.net/djview4.html'\n md5 '642105970467... | ruby | chosen |
[
{
"from": "system",
"value": "Use be_truthy instead of be(true) for Converter.matches\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe(Jekyll::Converters::Opal) do\n let(:bogus_opal) { \"hi.there( oatmeal\" }\n let(:simple_opal) { \"puts 'ohai jekyll'\" }\n let(:simple_js... | ruby | chosen |
[
{
"from": "system",
"value": "Test when `Storey.schemas` does not include `public`\n\nAlso update tests to use new RSpec syntax\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Storey, \"#schemas\" do\n context \"when suffix is set\" do\n before do\n Storey.suffix = ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify podspec to refer to version 0.3.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ASOAnimatedButton\"\n s.version = \"0.2.0\"\n s.summary = 'An easy-to-configure animated button'\n s.description = 'A... | ruby | chosen |
[
{
"from": "system",
"value": "Add a context block for the doc output\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RackJax::AppWrapper do\n\n def http_request_builder\n Java::NetZefiraizingHttp_server::RequestBuilder.new\n end\n\n def request_method(method)\n Java... | ruby | chosen |
[
{
"from": "system",
"value": "gemspec: Allow versions of sawyer >= 0.6\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nlib = File.expand_path('lib', __dir__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'buildkit/version'\n\nGem::Specification.new do |spe... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec_junit_formatter requirement from ~> 0.4.1 to ~> 0.5.1\n\nUpdates the requirements on [rspec_junit_formatter](https://github.com/sj26/rspec_junit_formatter) to permit the latest version.\n- [Release notes](https://github.com/sj26/rspec_junit_formatter/releases)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Use the release version for Go\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Go <Formula\n head 'https://go.googlecode.com/hg/'\n homepage 'http://golang.org'\n\n aka 'google-go'\n\n skip_clean 'bin'\n\n def download_strategy\n MercurialDownl... | ruby | chosen |
[
{
"from": "human",
"value": "Add a cask for Balsamiq Mockups\n\nAdds a cask for Balsamiq Mockups, a rapid wireframing tool.\n"
},
{
"from": "gpt",
"value": "class BalsamiqMockups < Cask\n url 'http://builds.balsamiq.com/b/mockups-desktop/MockupsForDesktop.dmg'\n homepage 'http://balsamiq.com/'... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Sublime Text Dev to Build 3066\n"
},
{
"from": "human",
"value": "class SublimeTextDev < Cask\n version 'Build 3064'\n sha256 '727d14b2ba577c680a2d90645db16f6f736c545820fe90d44cc85ac6808c2f03'\n\n url 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%20B... | ruby | chosen |
[
{
"from": "system",
"value": "Enable i18n fallback to zh-TW\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'boot'\n\nrequire 'rails'\n# Pick the frameworks you want:\nrequire 'active_model/railtie'\nrequire 'active_job/railtie'\nrequire 'active_record/railti... | ruby | chosen |
[
{
"from": "system",
"value": "Set sidekiq as the activejob queue\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Bulgarian as the default locale\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler... | ruby | chosen |
[
{
"from": "system",
"value": "Add parameterized name attribute to markdown header tags\n"
},
{
"from": "human",
"value": "class Forest::MarkdownRenderer < Redcarpet::Render::HTML\n def self.options\n {\n autolink: true,\n no_intra_emphasis: true,\n tables: true,\n space_a... | ruby | chosen |
[
{
"from": "system",
"value": "Update purchase create error message\n"
},
{
"from": "human",
"value": "class PurchasesController < ApplicationController\n\n def index\n @purchase = Purchase.new\n end\n\n def show\n @purchase = Purchase.find params[:id]\n end\n\n def new\n find_user\... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic CRUD to QuestionsController\n"
},
{
"from": "gpt",
"value": "class QuestionsController < ActionController::Base\n\n def index\n @question = Question.all\n end\n\n def show\n @question = Question.find(params[:id])\n end\n\n def create\n @questi... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify selection of curatable artefacts\n"
},
{
"from": "human",
"value": "require \"curated_list\"\n\nclass CuratedList\n def usable_artefacts\n artefacts.select { |a| [\"draft\", \"live\"].include?(a.state) }\n end\nend\n"
},
{
"from": "gpt",
"v... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce spec dependencies for ConfigBuilder\n\nThis test/code doesn't need the whole Rails framework.\nShave off precious time on focused spec runs :)\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\ndescribe ConfigBuilder do\n describe \".for\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for valid transportation\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Transportation, :type => :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'r... | ruby | chosen |
[
{
"from": "system",
"value": "Add social media URL to podspec\n\n- Pointing it at our Engineering account on Twitter.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SPTDataLoader\"\n s.version = \"1.1.0\"\n s.summary = \"SPTDataLoader is Spotify... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for `daimon_skycrawlers new`\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\nrequire \"daimon_skycrawlers/generator/new\"\n\nclass GenerateNewTest < Test::Unit::TestCase\n setup do\n @command = DaimonSkycrawlers::Generator::New\n @current_di... | ruby | chosen |
[
{
"from": "system",
"value": "Add escape sequence for print stdout\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# -*- coding: utf-8 -*-\n\n# IDL interactive wrapper\n# idl_iw.rb\n\nrequire 'open3'\nrequire 'readline'\n\nidlbin = 'idl'\nprompt = 'IDL-IW> '\n\nOpen3.popen2e(idlbin) do |... | ruby | chosen |
[
{
"from": "system",
"value": "Add admin field to user serializer\n"
},
{
"from": "human",
"value": "class UserSerializer < ActiveModel::Serializer\n def created_at\n object.created_at.to_datetime.utc.rfc3339\n end\n\n attributes :id,\n :bio,\n :created_at,\n :email,\n :facebook... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing documentation for the TiltDot class\n"
},
{
"from": "human",
"value": "require \"tilt\"\n\nmodule DotjsSprockets\n # New tilt template declaration, from the tilt docs:\n # Base class for template implementations Subclasses must implement\n # the #prep... | ruby | chosen |
[
{
"from": "system",
"value": "Use less confusing literal terminators"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'thread_safe'\nrequire 'connection_pool'\nrequire 'active_support'\nrequire 'active_support/core_ext/class/attribute'\n\nrequire 'faraday_persistent_excon/version'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Store initialized Orientdb4r client in global variable.\nReduces client initialization.\n"
},
{
"from": "human",
"value": "require \"orientdb4r\"\nrequire \"yaml\"\nrequire \"orientdb_schema_migrator/version\"\nrequire \"orientdb_schema_migrator/migration\"\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Make the TNA base URL a constant for shorter lines\n"
},
{
"from": "human",
"value": "require 'open-uri'\nrequire 'nokogiri'\n\nmodule Redirector\n class TNATimestamp\n def initialize(hostname)\n @hostname = hostname\n end\n\n def find\n begin\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix call-route for cases where only path is passed\n"
},
{
"from": "human",
"value": "# Calls an app route and returns a response, just like an HTTP request!\n#\nPakyow::Realtime.handler :'call-route' do |message, session, response|\n path, qs = message['uri'].spli... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec description that didn't match the code\n"
},
{
"from": "human",
"value": "require './lib/version_bomb'\n\ndescribe VersionBomb do\n describe \".bomb!\" do\n it \"blows up when the version matches the requirement\" do\n version = double\n requi... | ruby | chosen |
[
{
"from": "system",
"value": "Make the All Foods list the homepage\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'lists#index'\n resources :lists, only: [:show, :index, :edit, :update]\n\n resources :foods, only: [:new, :create, :edit, :update, :destroy]\n get \"... | ruby | chosen |
[
{
"from": "system",
"value": "Restructure reps and add Caffeine\n"
},
{
"from": "human",
"value": "def cask(name); dep name, :template => \"icelab:cask\"; end # Avoid repitition below\n\ncask \"dash\"\ncask \"fork\"\ncask \"google-chrome\"\ncask \"imageoptim\"\ncask \"iterm2\"\ncask \"launchbar\... | ruby | chosen |
[
{
"from": "system",
"value": "Use RestClient instead of OAuth2.\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/bitpagos/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"bitpagos\"\n s.version = Bitpagos::VERSION\n s.date = \"2015-12-24... | ruby | chosen |
[
{
"from": "system",
"value": "Remove locker after apply it\n"
},
{
"from": "human",
"value": "module ActiveCrew\n module Lockable\n def execute\n super unless locked?\n end\n\n def locked?\n options = context[:locker]\n return false if options.blank?\n\n model = des... | ruby | chosen |
[
{
"from": "system",
"value": "Bring comment in line with rest of initializers\n"
},
{
"from": "human",
"value": "## Change renderer defaults here.\n#\n# ApplicationController.renderer.defaults.merge!(\n# http_host: 'example.org',\n# https: false\n# )\n"
},
{
"from": "gpt",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new, shiny Jekyll.sanitized_path\n"
},
{
"from": "human",
"value": "module Jekyll\n class Sass < Converter\n safe true\n priority :low\n\n def matches(ext)\n ext =~ /^\\.s(a|c)ss$/i\n end\n\n def output_ext(ext)\n \".css\"\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 12.0 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "human",
"value": "Implement initial UW mapping for QDC\n"
},
{
"from": "gpt",
"value": "def uw_preview(identifier)\n id = identifier.rpartition(':').last.split('/')\n return nil if id.count != 2\n 'http://cdm16786.contentdm.oclc.org/utils/getthumbnail/collection/' \\\n \"#{id[0]}/... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for deprecated api key validation endpoint.\n\nJust so we have test coverage.\n"
},
{
"from": "gpt",
"value": "require_relative \"../test_helper\"\n\n# Deprecated API.\nclass Test::Apis::TestApiUsersValidate < Minitest::Test\n include ApiUmbrellaTestHelpers... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test file for BMFF::Box::DataEntryUrn.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:\n\nrequire_relative '../../minitest_helper'\nrequire 'bmff/box'\nrequire 'stringio'\n\nclass TestBMFFB... | ruby | chosen |
[
{
"from": "system",
"value": "Add option to select response format, default json\n"
},
{
"from": "human",
"value": "module Scrapinghub\n class ApiMethod\n def initialize(location, requires={})\n @location = \"#{location}.json\"\n @requires = requires\n end\n\n def build(base_... | ruby | chosen |
[
{
"from": "system",
"value": "Update comment clean up task to find comments in batches\n"
},
{
"from": "human",
"value": "desc 'Removes comments with missing targets'\ntask :fix_dangling_comments do\n [MergeRequest, MergeRequestVersion].each do |target|\n table_name = target.table_name.to_sy... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Enable patchelf.rb for HOMEBREW_DEVELOPERs.\"\n\nThis reverts commit 6106bfc4976dff2b03cf3fadbbf92dd1fd9e0f09.\n\nFix the error:\nbrew install patchelf\n==> Pouring patchelf-0.10.x86_64_linux.bottle.1.tar.gz\nError: cannot load such file -- patchelf\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Make APP_HOME have default valid for vagrant\n"
},
{
"from": "human",
"value": "worker_processes 4\n\nrails_env = 'production'\napp_home = ENV['APP_HOME']\n\n#listen \"/home/vagrant/pq/shared/unicorn.sock\", :backlog => 64\nlisten 3000\nworking_directory \"#{app_hom... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration by removing environment column from PaymentMethod."
},
{
"from": "human",
"value": "class CreateSpreeStoreCreditPaymentMethod < ActiveRecord::Migration\n def up\n return if Spree::PaymentMethod.find_by_type(\"Spree::PaymentMethod::StoreCredit\")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Return `nil` if the key doesn't exist."
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'active_support/core_ext/hash'\nrequire 'active_support/hash_with_indifferent_access'\n\nclass InatConfig\n\n def initialize(config_file)\n if config_file.is_a? Hash\... | ruby | chosen |
[
{
"from": "system",
"value": "Rename users/new path as users/signup\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resources :users\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove vestigial route for public/events/index\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n namespace :organizer do\n resources :events, only: [:new, :create, :edit, :update]\n end\n\n resource :current_user, :controller => \"current_u... | ruby | chosen |
[
{
"from": "system",
"value": "[EP] Make routing actually compatible with Rails 3"
},
{
"from": "human",
"value": "if Rails::VERSION::MAJOR == 3\n Rails.application.routes.draw do |map|\n map '/ops/version', :to => 'ops#version'\n map '/ops/heartbeat(/:name)', :to => 'ops#heartbeat'\n m... | ruby | chosen |
[
{
"from": "system",
"value": "Create new route for new users\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'items#index'\n\n get '/items', to: 'items#index'\n get '/items/new', to: 'items#new', as: 'new_item'\n post '/items', to: 'items#create'\n get '/items/:id... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade IntelliJ Idea CE with bundled JDK to 14.1\n\n- Unify with other IntelliJ-based formulas (see #879)\n"
},
{
"from": "human",
"value": "cask :v1 => 'intellij-idea-ce-bundled-jdk' do\n version '14'\n sha256 '09bb078252e2f6af6b58605ad3a380a71c8cc53f8e697e31fe0... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deployment target causing trunk validation to fail\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SGHTTPRequest\"\n s.version = \"1.8.2\"\n s.summary = \"A lightweight AFNetworking wrapper for making HTTP requests wi... | ruby | chosen |
[
{
"from": "human",
"value": "Extend cucumber with @with_and_without_javascript tag.\n\nCopied from budget_planner.\n"
},
{
"from": "gpt",
"value": "module Cucumber\n module Ast\n class Feature # http://rubydoc.info/github/cucumber/cucumber/Cucumber/Ast/Feature\n def accept(visitor)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove set_time_zone method from before_action\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forger... | ruby | chosen |
[
{
"from": "system",
"value": ":bug: Fix a bug that does not work in the migrate:redo\n"
},
{
"from": "human",
"value": "tasks = Rake.application.instance_variable_get '@tasks'\noriginal_db_dump = tasks.delete 'db:_dump'\n\nnamespace :validation do\n desc 'Generate validations from database sche... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing argument to register_plugin.\n"
},
{
"from": "human",
"value": "module Etailer\n class MysqlCleanerCloner < ::Vagrant::Cloners::Cloner\n attr_accessor :vm_db_user, :vm_db_password\n\n def name\n \"mysqlcleaner\"\n end\n\n def scripts\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Mongo Management Studio.app to v1.7.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'mongo-management-studio' do\n version '1.5.0'\n sha256 'a5bfd413ed7280b21ef353314da8ef4acac78077d872b292e91d9816fdbf79c7'\n\n url \"http://packages.litixsoft.de/mms/#{ve... | ruby | chosen |
[
{
"from": "system",
"value": "Fix VIM error (darn 'u' button)\n"
},
{
"from": "human",
"value": "Arrthorizer::RSpec::SharedExamples do\n shared_examples \"not persisting state in the role object\" do |options = {}|\n specify \"no state is maintained in the role object\" do\n the_role = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a local variable to avoid duplicate method calls\n"
},
{
"from": "human",
"value": "module DataMapper\n class Relationship\n\n module Iterator\n\n # Iterate over the loaded domain objects\n #\n # TODO\n #\n # remember relationships t... | ruby | chosen |
[
{
"from": "system",
"value": "Add collection to custom filter"
},
{
"from": "human",
"value": "module MightyGrid\n module Filters\n class CustomFilter < Base\n attr_reader :scope\n\n def initialize(options = {}, &block)\n self.class.default_options.merge!(scope: nil)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use inherited_resources methods instead of make_resourceful\n\n * Works with QT4 now\n * Can't update QT3 to this rails_core_extensions now\n"
},
{
"from": "human",
"value": "module Activatable\n\n def self.included(controller)\n controller.extend(ClassMethods)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add add method to MailAlias\n"
},
{
"from": "human",
"value": "class Specinfra::Command::Base::MailAlias < Specinfra::Command::Base\n class << self\n def check_is_aliased_to(recipient, target)\n target = \"[[:space:]]#{target}\"\n \"getent aliases #{es... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Force ok_json instead of the json_common MultiJson adapter\"\n\nThis reverts commit 6fe67aaf4380b41f14ce14576cc4dabfd0a60fd1.\n"
},
{
"from": "human",
"value": "load('heroku/helpers.rb') # reload helpers after possible inject_loadpath\nload('heroku/updater.... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for postfix::mta, do not include postfix anymore\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'postfix::mta' do\n let (:facts) { {\n :needs_postfix_class_with_params => true,\n :osfamily => 'Debian',\n } }... | ruby | chosen |
[
{
"from": "system",
"value": "Test analyze --format table data/sample.csv\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nrequire_relative '../../../lib/csv2psql/cli/cli'\n\ndescribe Csv2Psql do\n it 'help analyze' do\n run_cli(%w(help analyze))\n end\n\n it 'analyze data/cia-data-... | ruby | chosen |
[
{
"from": "system",
"value": "Update Google App Engine Launcher from 1.8.8 to 1.9.0\n"
},
{
"from": "human",
"value": "class Googleappenginelauncher < Cask\n url 'https://googleappengine.googlecode.com/files/GoogleAppEngineLauncher-1.8.8.dmg'\n homepage 'https://developers.google.com/appengine... | ruby | chosen |
[
{
"from": "system",
"value": "Patch CloudWatchLogger to not log messages about itself logging; use dyno name as log stream name\n"
},
{
"from": "human",
"value": "if ENV['CLOUDWATCH_LOG_GROUP']\n cloudwatch_logger = CloudWatchLogger.new({}, ENV['CLOUDWATCH_LOG_GROUP'])\n Rails.application.conf... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for reading time over one hour. PA-2182\n"
},
{
"from": "human",
"value": "require \"read_time_estimator\"\nrequire 'rspec'\n\ndescribe \"ReadTimeEstimator\" do\n describe \"minutes_to_read\" do\n it \"should output an amount of time given the length o... | ruby | chosen |
[
{
"from": "system",
"value": "Swap tabs for spaces and add a missing do\n\n\nFormer-commit-id: ab337109d79a480d897f4ab29e2b54bcfce8f76e [formerly e4cf84e6a326dc2429480982f6a0fef39d822d90] [formerly 3df1aeb958049434e7e85539038aa4e1760b1b63 [formerly 2c4f609998a5239f7c2647296c800bfeade5d18e]]\nFormer-commit-i... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.