conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add a test for importing a type\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'support/editor'\nrequire 'support/playground_actions'\n\nRSpec.feature \"Editor assistance for common code modifications\", type: :feature, js: true do\n include Play... | ruby | chosen |
[
{
"from": "system",
"value": "Stop trying so hard to make the migration reversible.\n"
},
{
"from": "human",
"value": "class ManyToManyStarsUsers < ActiveRecord::Migration\n def self.up\n create_table :stars_users, :id => false do |t|\n t.integer :user_id, :null => false\n t.intege... | ruby | chosen |
[
{
"from": "system",
"value": "Use resources to get the latest ca bundle\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: gitlab\n# Recipe:: gems\n#\n\ngitlab = node['gitlab']\n\n# To prevent random failures during bundle install, get the latest ca-bundle\nexecute \"Fetch the latest ca-bun... | ruby | chosen |
[
{
"from": "system",
"value": "Change license and list OS support.\n"
},
{
"from": "human",
"value": "# coding: UTF-8\nname 'macbook_setup'\nmaintainer 'Sean Fisk'\nmaintainer_email 'sean@seanfisk.com'\nlicense 'All rights reserved'\ndescription 'Setup my personal ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace deprecated parent method with module_parent\n"
},
{
"from": "human",
"value": "require 'active_support'\nrequire 'active_support/core_ext/module'\n\nusing_source_path(File.expand_path(__dir__)) do\n # Comment out the default mailer stuff\n comment_lines 'c... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused load path related logic from gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'date'\n\nGem::Specification.new do |s|\n s.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Apply minor tweaks to \"git\" file scanner\n\n- use `ensure` to make sure that we restore the 'wildignore' setting in\n the event of an error\n- kill unused `command` variable\n- prefer single quotes over doubles\n- change a `#select` + `not` to a `#reject`\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Node to v.4.4.1 LTS\n"
},
{
"from": "human",
"value": "cask 'node' do\n version '4.4.0'\n sha256 '13eb21a569218815b37893af9f6080eaa8156d0e66c38ed15e5bed4abac739e4'\n\n url \"https://nodejs.org/dist/v#{version}/node-v#{version}.pkg\"\n name 'Node.js'\n h... | ruby | chosen |
[
{
"from": "system",
"value": "Make the uploader use the updated folder\n"
},
{
"from": "human",
"value": "class GitlabUploader < CarrierWave::Uploader::Base\n def self.absolute_path(upload_record)\n File.join(CarrierWave.root, upload_record.path)\n end\n\n def self.root_dir\n 'uploads'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add configuration for i18n 1.1.x.\n"
},
{
"from": "human",
"value": "# Copy database.yml to .example and add .gitigrore\ndatabase_yml_src = 'config/database.yml'\ndatabase_yml_dst = database_yml_src + '.example'\ncopy_file database_yml_src, database_yml_dst unless F... | ruby | chosen |
[
{
"from": "human",
"value": "Add distance to OR TT Cup events\n"
},
{
"from": "gpt",
"value": "Race.where(event_id: 24520).update_all(distance: 11.2)\nRace.where(event_id: 24649).update_all(distance: 22.8)\nRace.where(id: [ 576807, 576808, 576809, 576810, 576811, 576812, 576813, 576814 ]).update... | ruby | chosen |
[
{
"from": "system",
"value": "Change Result of PriceSack Calculation from Integers to Floats\n"
},
{
"from": "human",
"value": "require 'spree/localized_number'\n\nmodule Spree\n Calculator::PriceSack.class_eval do\n extend Spree::LocalizedNumber\n\n localize_number :preferred_minimal_amo... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to include rspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rails_legit/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove version from Homebrew formula\n"
},
{
"from": "human",
"value": "class Watchexec < Formula\n desc \"Execute commands when watched files change\"\n homepage \"https://github.com/mattgreen/watchexec\"\n url \"https://github.com/mattgreen/watchexec/releases/d... | ruby | chosen |
[
{
"from": "system",
"value": "Make child classes available in Entry as well as Article.\n"
},
{
"from": "human",
"value": "class Entry < HyperactiveResource\n\n belongs_to :blog, :nested => true\n\n def comments\n Comment.find_all_by_content_id(self.id)\n end\n \n def to_liquid(options =... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra presence validations to Track\n"
},
{
"from": "human",
"value": "class Track < ActiveRecord::Base\n belongs_to :record\n validates :title, presence: true\n\n default_scope { order(:ord) }\nend\n"
},
{
"from": "gpt",
"value": "class Track < A... | ruby | chosen |
[
{
"from": "human",
"value": "Add codility training - tie ropes\n"
},
{
"from": "gpt",
"value": "def solution(k, arr)\n sum, count = 0, 0\n\n arr.each do |i|\n sum += i\n if sum >= k\n sum = 0\n count += 1\n end\n end\n\n count\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Remove Simplcov from test helper\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] ||= \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\nrequire 'capybara/rails'\nrequire './test/helpers/minitest_helper'\nSimple... | ruby | chosen |
[
{
"from": "system",
"value": "Test helper: Use new Mocha setup method\n\n - this avoids this warning: Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'\n"
},
{
"from": "human",
"value": "require \"bundler/setup\"\n\nrequire \"active_support\"\nrequire \"active_... | ruby | chosen |
[
{
"from": "system",
"value": "Add optional redgreen gem for testing\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] = 'test'\nENV['RAILS_ROOT'] ||= File.dirname(__FILE__) + '/../../../..'\n\n# Load the testing framework\nrequire File.expand_path(File.join(ENV['RAILS_ROOT'], 'config/environme... | ruby | chosen |
[
{
"from": "system",
"value": "Remove implicit dependencies from the gemspec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/rom/session/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'rom-session'\n gem.description = 'Session... | ruby | chosen |
[
{
"from": "system",
"value": "Use Actor.all in pool spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Celluloid.pool\" do\n before do\n class ExampleError < StandardError; end\n\n class MyWorker\n include Celluloid\n\n def process(queue = nil)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify time unit; no printing.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe DynamoDBMutex::Lock do\n\n let(:locker) { DynamoDBMutex::Lock }\n let(:lockname) { 'test.lock' }\n\n describe '#with_lock' do\n\n def run(id, ms)\n print ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a random option to email sequence in FactoryGirl\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n sequence(:name) { |i| \"Name_#{i}\" }\n\tsequence(:email) { |i| \"user_#{i}@mail.com\" }\n sequence(:title) { |i| \"Title_#{i}\" }\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Modify tasks feature specs to fill in name as well\n"
},
{
"from": "human",
"value": "require_relative '../feature_helper'\n\nfeature 'Tasks' do\n around(:each) do |example|\n ActiveRecord::Base.connection.transaction do\n User.create(\n username: 'p... | ruby | chosen |
[
{
"from": "system",
"value": "Make page stubs work again in trigger spec after change to Rails 2.3.5.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../spec_helper'\n\ndescribe 'With the contents fixture' do\n before(:each) do\n @page = mock('fake_page')\n @page.stu... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure SSP is evaluated last.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'syllable_rules'\n\nmodule Pronounce\n describe SyllableRules do\n describe '.evaluate' do\n let(:syllables) { [] }\n let(:phones) { make_phones %w{K AA1... | ruby | chosen |
[
{
"from": "system",
"value": "Update test files in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s| \n s.name = 'rack-cerberus'\n s.version = \"0.3.1\"\n s.platform = Gem::Platform::RUBY\n s.summary = \"A Rack middleware for form-based authentication\"\n s.descriptio... | ruby | chosen |
[
{
"from": "system",
"value": "Test error display in presenter\n"
},
{
"from": "human",
"value": "require 'consolePresenter'\n\nRSpec.describe ConsolePresenter do\n context \"With stubbed input and output\" do\n let(:input) { double(\"STDIN\") }\n let(:output) {\n output = double(\"S... | ruby | chosen |
[
{
"from": "system",
"value": "Fix time format in home page.\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n def index\n @datetime = Time.now.strftime(\"%I:%M %p %A, %B %d, %Y\")\n end\nend\n"
},
{
"from": "gpt",
"value": "class HomeController < ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow loading only active kegs\n"
},
{
"from": "human",
"value": "class KegsController < ApplicationController\n respond_to :html, :json\n\n def index\n @kegs = Keg.order('started_at DESC NULLS FIRST')\n respond_to do |wants|\n wants.html\n wants.j... | ruby | chosen |
[
{
"from": "system",
"value": "Return OK after enqueuing run\n"
},
{
"from": "human",
"value": "class RunsController < ApplicationController\n skip_before_filter :verify_authenticity_token\n\n def run\n Resque.enqueue(Runner, params[:bot_name], params[:run_id], params[:run_uid])\n end\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Use correlation example in save controller to demonstrate saving both correlations and quantities\n"
},
{
"from": "human",
"value": "class SaveController < BaseController\n\n def viewDidLoad\n super\n\n self.view.backgroundColor = UIColor.purpleColor\n sel... | ruby | chosen |
[
{
"from": "system",
"value": "Use strong params for Tags\n\n(Fix tag#update)\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass TagsController < ApplicationController\n before_filter :login_required, except: [:index, :show]\n before_filter :find_tag, except: :index\n befo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove fix for Draper pre-1.3.x\n"
},
{
"from": "human",
"value": "class AuthorDecorator < ApplicationDecorator\n delegate_all\n \n def email\n source.try :email || \"No Email\"\n end\n\n def name\n source.try :name || \"Anonymous\"\n end\n\n def image\... | ruby | chosen |
[
{
"from": "system",
"value": "Add doctype to load paper details job\n"
},
{
"from": "human",
"value": "class LoadPaperDetailsJob < ActiveJob::Base\n queue_as :meta\n\n OVERWRITEABLE = [:originators, :answerers]\n\n def perform(paper)\n return unless paper.body.scraper.const_defined? :Detai... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for Opera Mobile Emulator\n"
},
{
"from": "gpt",
"value": "class OperaMobileEmulator < Cask\n url 'http://get.geo.opera.com/pub/opera/sdlbream/1210/Opera_Mobile_Emulator_12.1_Mac.dmg'\n homepage 'http://www.opera.com/developer/mobile-emulator'\n version '... | ruby | chosen |
[
{
"from": "system",
"value": "Comment emails should have a subject line starting with \"RE: \"\n"
},
{
"from": "human",
"value": "# Fat Free CRM\n# Copyright (C) 2008-2011 by Michael Dvorkin\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the G... | ruby | chosen |
[
{
"from": "system",
"value": "Add rich text snippet to test page content."
},
{
"from": "human",
"value": "module World\n module Cms\n attr_accessor :site, :layout, :root, :page\n\n def cms_site\n self.site ||= Comfy::Cms::Site.create(identifier: identifier)\n end\n\n def cms_l... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded :partial from override\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => \"spree/admin/shared/_configuration_menu\",\n :name => \"add_cms_admin_to_admin_configurations_menu\",\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add ActiveRecord spec support file which sets up our in memory database\n"
},
{
"from": "gpt",
"value": "ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:'\nActiveRecord::Migration.create_table :parents do |t|\n t.string :one\n t.strin... | ruby | chosen |
[
{
"from": "system",
"value": "Allow gemspec to be based on rails version for travis\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/flipper/version', __FILE__)\n\nflipper_mongo_files = lambda { |file|\n file =~ /active_record/\n}\n\nGem::Specificat... | ruby | chosen |
[
{
"from": "human",
"value": "Fix a document 404ing with a redirect\n\nwww.agileplannerapp.com/boards/173808/cards/5678\n\nit seems 2 editors started working on separate\ndrafts for the same content, hence there were\nduplicate documents. the content lives at the\nurl that contains the slug with a sequence\n... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using the v* prefixed tags in the podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = File.basename(__FILE__, \".podspec\")\n s.version = %x(git describe --tags --abbrev=0).chomp.sub(/^v/, '')\n s.summary = %x(curl -s... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust test now using grid.\n"
},
{
"from": "human",
"value": "require 'conway'\n\ndescribe Conway do\n\n before(:each) do\n @conway = Conway.new\n end\n\n describe \"when initialized\" do\n it \"should have the correct field dimensions\" do\n expect(@... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec config to allow describe \"foo\", :focus do\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] ||= 'test'\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire 'rspec/rails'\nrequire 'rspec/autorun'\nrequire 'factory_girl_rail... | ruby | chosen |
[
{
"from": "system",
"value": "Use a SPDX compliant license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'kubernetes'\nmaintainer 'Andre Elizondo'\nmaintainer_email 'andre@chef.io'\nlicense ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debugging statement from Submit step\n"
},
{
"from": "human",
"value": "Given(/^I choose \"(.*?)\" as my pickup location$/) do |pickup_location|\n select(pickup_location, from: 'Select pickup location:')\nend\n\nGiven(/^I accept \"(.*?)\" as my pickup locati... | ruby | chosen |
[
{
"from": "system",
"value": "Use main app's auth method"
},
{
"from": "human",
"value": "module LeanDashboard\n class ApplicationController < ActionController::Base\n end\nend\n"
},
{
"from": "gpt",
"value": "module LeanDashboard\n class ApplicationController < ::ApplicationContr... | ruby | chosen |
[
{
"from": "system",
"value": "Update avs_response code to be risky\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Order Risk Analysis', :type => :feature do\n stub_authorization!\n\n let!(:order) do\n create(:completed_order_with_pending_payment)\n end\n\n def visit... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency of groonga gem\n"
},
{
"from": "human",
"value": "\nGem::Specification.new do |spec|\n spec.name = \"embulk-output-groonga\"\n spec.version = \"0.1.0\"\n spec.authors = [\"Hiroyuki Sato\"]\n spec.summary = \"Groonga outp... | ruby | chosen |
[
{
"from": "system",
"value": "Fix podspec by excluding Example\n"
},
{
"from": "human",
"value": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, 'package.json')))\n\nPod::Spec.new do |s|\n s.name = 'ReactNativePermissions'\n s.version = package['... | ruby | chosen |
[
{
"from": "human",
"value": "Add a simple key retrieval benchmark.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby -wKU\n\nrequire \"benchmark\"\nrequire \"thread_safe\"\n\nhash = {}\ncache = ThreadSafe::Cache.new\n\n10_000.times do |i|\n hash[i] = i\n cache[i] = i\nend\n\nTESTS = 40_00... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure raw_email is initialised with some data.\n\nThis is to make sure that the file that is used to store the data is\ncreated and written to before any attempt to read from it.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n\n factory :incoming_m... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Quicker mongo testing timeout when mongo not running\"\n\nThis reverts commit 1aee20e77ab82f9265a3b41ec92ebe0d0baed41d.\n"
},
{
"from": "human",
"value": "require 'helper'\nrequire 'timeout'\nrequire 'flipper/adapters/mongo'\nrequire 'flipper/spec/shared_ad... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate, add nginx conf"
},
{
"from": "human",
"value": "name 'rails'\ndescription 'This role configures a Rails stack using Unicorn'\nrun_list(\n \"role[base]\",\n \"recipe[packages]\",\n \"recipe[nginx]\",\n \"recipe[rails]\",\n \"recipe[ruby_build]\... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration tests for Scenario imports\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe ScenarioImportsController do\n let(:user) { users(:bob) }\n\n before do\n login_as(user)\n end\n\n it 'renders the import form' do\n visit new_sce... | ruby | chosen |
[
{
"from": "system",
"value": "Store the country price in the Rails cache\n"
},
{
"from": "human",
"value": "Spree::Variant.class_eval do\n\n def country_price(country_id)\n prices.find_by(country_id: country_id)\n end\n\n def country_price_or_default(country_id, currency)\n country_pric... | ruby | chosen |
[
{
"from": "human",
"value": "Add generator for default view\n"
},
{
"from": "gpt",
"value": "require 'rails/generators/base'\n\n\nmodule AasmProgressable\n module Generators\n class ViewsGenerator < Rails::Generators::Base\n desc 'Install a copy of the default aasm_progressable views'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Rename ModelProcessor -> Processor for consistency across inspectors\n"
},
{
"from": "human",
"value": "# require 'pp'\n# require 'pry'\n\n# Much of this script borrowed from:\n# https://github.com/whitequark/parser/blob/master/lib/parser/runner.rb and friends\n\nmo... | ruby | chosen |
[
{
"from": "system",
"value": "Add parenthesis to binary infix operators\n\n* Add comments explaining the algorithm I will used to properly\n parenthesize the operators based on their precedence rules\n compared to the parent, as well as associativity compared to their\n position relative to their sibling... | ruby | chosen |
[
{
"from": "system",
"value": "Exit when no gem is found; expand on error message\n\ngit-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@4114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de\n"
},
{
"from": "human",
"value": "# Don't change this file. Configuration is done in config/environment.rb and confi... | ruby | chosen |
[
{
"from": "system",
"value": "Update TeX Live Utility to 1.23\n"
},
{
"from": "human",
"value": "cask :v1 => 'tex-live-utility' do\n version '1.21'\n sha256 '51fb396fa1bcb73af575c653415d16f422d842a6f8029f75c85ce1a6e0f92cf0'\n\n url \"https://github.com/amaxwell/tlutility/releases/download/#{v... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for passing in XML strings to Nessus::Parse.new"
},
{
"from": "human",
"value": "require 'nessus/log'\nrequire 'nessus/Version1/version1'\nrequire 'nessus/Version2/version2'\n\nrequire 'nokogiri'\nrequire 'date'\nrequire 'enumerator'\nrequire 'time'\n\nm... | ruby | chosen |
[
{
"from": "system",
"value": "Add a comment explaining about the log register\n"
},
{
"from": "human",
"value": "require 'logger'\nrequire 'fileutils'\nmodule XClarityClient\n\n class XClarityLogger\n \n def initialize(global_log=nil)\n @log = $lenovo_log ||= $log ||= global_log\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add process_routes method to Rails 3 route processor\n"
},
{
"from": "human",
"value": "#Processes the Sexp from routes.rb. Stores results in tracker.routes.\n#\n#Note that it is only interested in determining what methods on which\n#controllers are used as routes, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActionView::MissingTemplate exception when rendering custom 404s\n"
},
{
"from": "human",
"value": "module Refinery\n module Pages\n module InstanceMethods\n\n def error_404(exception=nil)\n if (@page = ::Refinery::Page.where(:menu_match => \"^/4... | ruby | chosen |
[
{
"from": "system",
"value": "Add gemspec metadata for allowed_push_host\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"active_utils/version\"\n\nGem::Specification.new do |s|\n s.name = \"active_utils\"\n s.versio... | ruby | chosen |
[
{
"from": "human",
"value": "Remove relationship to stats data set\n\nThis DfT publication has an association to a statistical data set\nfrom DCLG on a completely irrelevant subject. We're assuming this\nis not intended. The data set is also superseded so remove the\nrelationship.\n"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "system",
"value": "Update method call in broken link count migration\n\nThis method was renamed so this migration would have failed.\n"
},
{
"from": "human",
"value": "class AddBrokenLinkCountToLocalAuthority < ActiveRecord::Migration[5.0]\n def up\n add_column :local_authorities,... | ruby | chosen |
[
{
"from": "system",
"value": "Add error messages for bootstrap commands.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nunless Dir.exists? \".project/common\"\n system(*%W{mkdir -p .project})\n system(*%W{git clone https://github.com/dmohs/project-management.git .project/common})\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Configure OmniAuth to get the GitHub user's email\n\nGitHub Apps don't use scopes, but OmniAuth GitHub library still needs\nthis option, to know to hit the GitHub API to fetch the email for the\nuser that is logging in.\n"
},
{
"from": "human",
"value": "OmniAuth.co... | ruby | chosen |
[
{
"from": "system",
"value": "Add in homepage to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mongo_rates/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Use to_s to ensure non-String values show up on page\n"
},
{
"from": "human",
"value": "module EditableHelper\n def editable(object, attribute, options = {})\n object_name = ActiveModel::Naming.singular(object)\n \n if options[:value].present?\n value... | ruby | chosen |
[
{
"from": "system",
"value": "Update logout to clear soundcloud id from session\n"
},
{
"from": "human",
"value": "module SessionsHelper\n\n\tdef sign_in(user)\n\t\tremember_token = User.new_remember_token\n\t\tcookies.permanent[:remember_token] = remember_token\n\t\tuser.update_attribute(:remem... | ruby | chosen |
[
{
"from": "system",
"value": "Install amanda-client before other resources to ensure amandabackup user\n"
},
{
"from": "human",
"value": "Chef::Recipe.send(:include, CloudConductor::CommonHelper)\nChef::Recipe.send(:include, CloudConductor::AmandaPartHelper)\n\ngem_package 'aws-sdk-core' do\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Question Error Messages to Be More Explicit\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n before_action :set_question, only: [:show, :edit, :update, :destroy]\n\n def index\n @questions = Question.all\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Add questions show route in questions controller\n"
},
{
"from": "human",
"value": "get '/questions/new' do\n @survey = Survey.find_by(id: params[:survey_id])\n erb :'questions/new'\nend\n\npost '/questions' do\n @question = Question.new(params[:question])\n @su... | ruby | chosen |
[
{
"from": "system",
"value": "Use the class methods to defined attributes for plugins\n"
},
{
"from": "human",
"value": "module OneshotSpec\n class FooPlugin < Observed::Observer\n default :timeout_in_milliseconds => 5000\n default :number_of_trials => 10\n\n def sample\n sleep_du... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for unicode table indentation.\n"
},
{
"from": "gpt",
"value": "# -*- encoding: utf-8 -*-\n\nrequire 'spec_helper'\n\ndescribe TTY::Table::Renderer::Unicode, 'indentation' do\n let(:header) { ['h1', 'h2', 'h3'] }\n let(:rows) { [['a1', 'a2', 'a3'], ['... | ruby | chosen |
[
{
"from": "system",
"value": "Drop into pry when a scenario fails\n\nTODO this should prob be behaind a switch or ENV\nvar or something in the future.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n# frozen_string_literal: true\n\n# Requirements\n# ========================================... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional Rails error logging\n"
},
{
"from": "human",
"value": "Bugtracker::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # In the development environment your application's code is reloade... | ruby | chosen |
[
{
"from": "system",
"value": "Add quoted-printable to ActionMailer Content-Transfer-Encoding\n"
},
{
"from": "human",
"value": "begin\n if Rails.env.production?\n ActionMailer::Base.smtp_settings = {\n address: 'smtp.mandrillapp.com',\n port: '587',\n authentication: :plain,\n us... | ruby | chosen |
[
{
"from": "system",
"value": "Add final CR to make hound happy\n"
},
{
"from": "human",
"value": "class Rack::Attack\n ### Throttle Spammy Clients ###\n # Throttle all requests by IP (60rpm)\n throttle('req/ip', limit: 300, period: 5.minutes) do |req|\n req.ip\n end\n\n ### Prevent Brute... | ruby | chosen |
[
{
"from": "system",
"value": "Connect to database in show action.\n"
},
{
"from": "human",
"value": "module Pancakes\n class DatabasesController < ApplicationController\n def show\n # connect to pg/database/:database\n end\n\n def index\n redirect_to database_path(Rails.env)\... | ruby | chosen |
[
{
"from": "system",
"value": "Use remote seeds per default.\n"
},
{
"from": "human",
"value": "class SeedsProxy < Rack::Proxy\n USE = :local\n LOCAL_URL = 'localhost:3001'\n REMOTE_URL = 'cocoa-tree.github.io:80'\n\n def rewrite_env(env)\n if USE == :remote\n env[\"HTTP_HOST\"] = REM... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundle 1.5 for travis\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'service_layer/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up and flesh out transaction validation specs\n\nThese didn't include phone or email, both of which are required.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe SolidusPaypalBraintree::Transaction do\n describe \"#valid?\" do\n let(:val... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning in Rails 6.x\n\nfixes #10\n"
},
{
"from": "human",
"value": "require \"pry-rails\"\nrequire \"awesome_print\"\n\nmodule AwesomeRailsConsole\n class Railtie < Rails::Railtie\n initializer \"awesome_rails_console.initialize\" do |app|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a new tag for CocoaPods.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CUtil\"\n s.version = \"0.1.9\"\n s.summary = \"CUtil is a common utilities collection. It is designed as a tool-box for iOS development.\"\n s.au... | ruby | chosen |
[
{
"from": "system",
"value": "Fix garbled text in README in non-UTF-8 system\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'fileutils'\nrequire 'erb'\n\nmodule RubyWarrior\n class PlayerGenerator\n def initialize(level)\n @level = level\n end\n \n def level\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration to work with multiple schema\n"
},
{
"from": "human",
"value": "class AddTimeZoneAndLocaleToTenant < ActiveRecord::Migration\n def change\n add_column :tenants, :default_time_zone, :string, default: 'Amsterdam'\n add_column :tenants, :ignore_use... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor test to be more simple\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Chatroid do\n describe \"#set\" do\n context \"when given a hash\" do\n it \"should set it to config\" do\n described_class.new { set :key => \"val... | ruby | chosen |
[
{
"from": "system",
"value": "Store Sentry API key in ENV var\n"
},
{
"from": "human",
"value": "require 'raven'\n\nRaven.configure do |config|\n config.dsn = 'https://c22240edb1ba4972bf5007bd1cbf1aa3:707c4fc8872046738fa86eeaf60d5938@app.getsentry.com/11938'\nend"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix securerandom not being required\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Warden\n module JWTAuth\n # Encodes a payload into a JWT token, adding some configurable\n # claims\n class TokenEncoder\n include JWTAuth::... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test so it works with Ruby 1.9.1.\n"
},
{
"from": "human",
"value": "require File.expand_path('test_helper.rb', File.dirname(__FILE__))\n\ndescribe GirFFI::Builder::Type::Interface do\n before do\n info = get_function_introspection_data 'GObject', 'TypePlugi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test which was not passing on Windows\n\n(Not that it matters much, really...)\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\ndescribe \"Rubycritic version\" do\n it \"is defined\" do\n Rubycritic::VERSION.wont_be_nil\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Return if there is no advisory instead of raise.\n"
},
{
"from": "human",
"value": "# reopen Redmine Mailer\nclass Mailer < ActionMailer::Base\n # Sends notification to specified administrator\n #\n # @param [Gem::Version] redmine_version\n # The version to co... | ruby | chosen |
[
{
"from": "system",
"value": "Disable wavedrom specs in CI for now\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nWAVEDROM_CODE = <<-eos\n{ signal : [\n { name: \"clk\", wave: \"p......\" },\n { name: \"bus\", wave: \"x.34.5x\", data: \"head body tail\" },\n { name: ... | ruby | chosen |
[
{
"from": "system",
"value": "Use wt_haproxy as cookbook name instead of haproxy\n\n\nFormer-commit-id: 88afa05ed72046d35b251a7a14887b91b8790235 [formerly 4d5596a4cbe4bb5af10cb24205a9b2d0d9b3c07c] [formerly bc7f30c4c916a3d7b31498cb0e9505dbd37e12c1 [formerly e2ff41ada0fcc20ef65fdee4d80bc95bcb040fd4 [formerly... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.