conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Comment to make it clear why we picked START\n" }, { "from": "human", "value": "#\n# Cookbook Name:: coopr_hosts\n# Recipe:: default\n#\n# Copyright © 2013-2014 Cask Data, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us...
ruby
chosen
[ { "from": "system", "value": "Use let instead of instance variable and rename namespaced dummy class to X::Y::Z.\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Refinery::Activity do\n before do\n module Y\n module Y\n class Z\n end\n end\n e...
ruby
chosen
[ { "from": "system", "value": "Change the podspec version -> 2.8.0\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.7.0\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homep...
ruby
chosen
[ { "from": "system", "value": "Use Redis' BRPOP to block when poping\n\nRemoves the need to sleep\n" }, { "from": "human", "value": "require 'redis'\n\nRedisMessage = Struct.new(:body)\n\nclass RedisQueue\n def initialize\n @redis = Redis.new\n end\n\n def poll(&block)\n loop do\n i...
ruby
chosen
[ { "from": "system", "value": "Use HasAccounts::Model concern for Invoice.\n" }, { "from": "human", "value": "class Invoice < ActiveRecord::Base\n # Aspects\n include ApplicationHelper\n \n # Associations\n belongs_to :customer, :class_name => 'Person'\n belongs_to :company, :class_name => ...
ruby
chosen
[ { "from": "system", "value": "Drop fileicon for configuration script decorator\n" }, { "from": "human", "value": "module ManageIQ::Providers::AnsibleTower\n class AutomationManager::ConfigurationScriptDecorator < MiqDecorator\n def self.fonticon\n 'pficon pficon-template'\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Use smartypants - enables en, em dashes.\n" }, { "from": "human", "value": "require 'bluecloth'\n\nmodule Awestruct\n\n module Blueclothable\n def render(context)\n rendered = ''\n begin\n doc = BlueCloth.new( context.interpolate_string( raw_pag...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix ForkTracker on ruby <= 2.5.3\"\n\nThis reverts commit 332a2909d417fdc0f42ab7672a3cd0aaaf8752d6.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ActiveSupport\n module ForkTracker # :nodoc:\n module CoreExt\n def fork(...
ruby
chosen
[ { "from": "system", "value": "Check odd hostname error that happens during image creation\n" }, { "from": "human", "value": "require 'spec_helper'\n\n# Ensure hostname is not carried over from live-cd build\ndescribe command('hostname') do\n it { should_not return_stdout 'debian-7' }\nend\n\n" ...
ruby
chosen
[ { "from": "system", "value": "Use Poltergeist to run browser specs\n\nChromedriver is slow, the browser window is annoying, and it doesn't\nwork properly on CircleCI since upgrading Rails.\n\nIf BS_BROWSER is defined, then we're running under Browserstack, and\nshould use the Selenium driver. Otherwise, we'...
ruby
chosen
[ { "from": "system", "value": "Format help command so that descriptions are always aligned\n" }, { "from": "human", "value": "require 'prompt/dsl'\n\nmodule Prompt\n module Console\n\n class Builtins\n extend DSL\n\n group \"Console commands\"\n\n command \"help\", \"List all c...
ruby
chosen
[ { "from": "system", "value": "Split to long line into several lines" }, { "from": "human", "value": "module Raph\n # This module consists of argument parsers for Humans\n module Parser\n # Base class for all argument parsers.\n #\n # You can create a custom parser by subclassing\n ...
ruby
chosen
[ { "from": "system", "value": "Reboot don't shutdown on provisioning\n\nDon't break the chain. Copy paste error from intake shutdown command.\n" }, { "from": "human", "value": "class ProvisionSuccess\n include Genesis::Framework::Task\n run do\n collins.set_status!(facter['asset_tag'], :prov...
ruby
chosen
[ { "from": "system", "value": "Add last-modified header to response.\n\nThis involved a pretty big refactoring of the app. Previously, we were\nonly storing (in redis) the calculated state of each pull request. Now\nwe're storing the entire response.\n" }, { "from": "human", "value": "#!/usr/bin/...
ruby
chosen
[ { "from": "system", "value": "Use guard clause instead of if else.\n" }, { "from": "human", "value": "require_relative \"bundle/bundler/setup\"\nrequire_relative \"app/lib/printer.rb\"\nrequire_relative \"app/lib/validator.rb\"\nrequire 'bundler'\nBundler.require :default\n\nrequire_relative \"s...
ruby
chosen
[ { "from": "system", "value": "Allow for prefixes for metrics\n" }, { "from": "human", "value": "require 'yajl'\nrequire 'librato/metrics'\nrequire 'scrolls'\n\nmodule P2met\n class App < Sinatra::Base\n get '/' do\n \"200\\n\"\n end\n\n post '/submit' do\n librato_user = par...
ruby
chosen
[ { "from": "system", "value": "Raise a 503 when the service is unavailable\n" }, { "from": "human", "value": "require 'bundler/setup'\nrequire 'sinatra'\nrequire 'active_support/core_ext/object/blank'\nrequire './brain'\n\nhelpers do\n include Rack::Utils\n alias_method :h, :escape_html\n \n ...
ruby
chosen
[ { "from": "system", "value": "Update rake version from 10.0 to 10.4\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'everyday/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Allow builder greater than 3.0\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'akamai_api/version'\n\nGem::Specification.new do |gem|\n gem.n...
ruby
chosen
[ { "from": "system", "value": "Remove trailing slash from mirror url\n" }, { "from": "human", "value": "#\n# Cookbook Name:: thrift\n# Attributes:: default\n#\n# Copyright 2011, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exce...
ruby
chosen
[ { "from": "system", "value": "Bump the number of iterations for the get/set benchmark.\n" }, { "from": "human", "value": "require 'benchmark'\nrequire File.dirname(__FILE__) + '/../harness'\n\nLARGE_NUMBER = 20_000\n\nBenchmark.bmbm do |b|\n b.report('get/set remix-stash') do\n LARGE_NUMBER....
ruby
chosen
[ { "from": "system", "value": "Update file list included within gem\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) + '/lib/'\nrequire 'sparkle_formation/version'\nGem::Specification.new do |s|\n s.name = 'sparkle_formation'\n s.version = SparkleFo...
ruby
chosen
[ { "from": "system", "value": "Exclude Xcode boilerplate from the pod.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"UAFilterableResultsController\"\n s.version = \"1.0.0\"\n s.summary = \"A NSFetchedResultsController-style class using NSMutableArray as...
ruby
chosen
[ { "from": "system", "value": "Fix class resource references in spec tests\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'realmd' do\n context 'supported operating systems' do\n on_supported_os.each do |os, facts|\n context \"on #{os}\" do\n let(:facts) do\n...
ruby
chosen
[ { "from": "system", "value": "Fix rubocop warning in AutoPlacementVisibilityService\n" }, { "from": "human", "value": "class AutoPlacementVisibilityService\n def determine_visibility(auto_placement_enabled)\n field_names_to_hide = []\n field_names_to_edit = []\n\n auto_placement_values...
ruby
chosen
[ { "from": "system", "value": "Update CSV export limit in controller\n" }, { "from": "human", "value": "ActiveAdmin.register User do\n actions :index, :show, :edit, :destroy, :update, :new, :create\n index do\n column :name\n column :email\n column :referral_code\n column :infusions...
ruby
chosen
[ { "from": "system", "value": "Add validation for latitude and longitude and before_validation action that copies lat and long from place if there is one\n" }, { "from": "human", "value": "class Drop < ActiveRecord::Base\n\n has_many :votes, dependent: :destroy\n belongs_to :place\n\n validate...
ruby
chosen
[ { "from": "system", "value": "Remove redundant call to update\n" }, { "from": "human", "value": "require 'core_audio'\n\ngraph = AudioToolbox::AUGraph.new\ngraph.add_node(:type => 'aumu', :sub_type => 'dls ', :manufacturer => 'appl')\ngraph.add_node(:type => 'auou', :sub_type => 'def ', :manufac...
ruby
chosen
[ { "from": "system", "value": "Use 'before_create' instead of 'after_initialize`\n" }, { "from": "human", "value": "require_relative '../concepts/game_state'\nrequire_relative '../concepts/player_state'\nrequire_relative '../services/apply_action'\n\nclass Game < ActiveRecord::Base\n has_many :p...
ruby
chosen
[ { "from": "system", "value": "Update rspec requirement to ~> 3.7.0\n\nUpdates the requirements on [rspec](https://github.com/rspec/rspec) to permit the latest version." }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire File.expand_path(\"../lib/active_record/safer_migratio...
ruby
chosen
[ { "from": "system", "value": "Add attr_accessible back to User model\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable\n ...
ruby
chosen
[ { "from": "system", "value": "Add `/topics` route, and logic\n" }, { "from": "human", "value": "# Homepage (Root path)\nget '/' do\n erb :index\nend\n" }, { "from": "gpt", "value": "# Homepage (Root path)\nget '/' do\n erb :index\nend\n\nget '/topics' do\n @topics = Topic.all.orde...
ruby
chosen
[ { "from": "system", "value": "Update spec to version 2.1.15\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.14\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectur...
ruby
chosen
[ { "from": "system", "value": "Save fail in last commit\n" }, { "from": "human", "value": "class GitosisPublicKey < ActiveRecord::Base\n STATUS_ACTIVE = true\n STATUS_LOCKED = false\n\n belongs_to :user\n validates_uniqueness_of :title, :scope => :user_id\n validates_uniqueness_of :identifie...
ruby
chosen
[ { "from": "system", "value": "Fix no versioned method for instrument bug\n" }, { "from": "human", "value": "class InstrumentVersion\n attr_accessor :instrument, :version\n\n def method_missing(method, *args, &block)\n if Instrument.method_defined?(method) \n if @version\n @versi...
ruby
chosen
[ { "from": "system", "value": "Add 'set' load to the ParamFilter class\n\nResolves issue #977\n" }, { "from": "human", "value": "require 'pathname'\n\nmodule Aws\n module Log\n class ParamFilter\n\n # A managed list of sensitive parameters that should be filtered from\n # logs. This...
ruby
chosen
[ { "from": "system", "value": "Refactor CreateListItem: extract method (item_attached?)\n" }, { "from": "human", "value": "class CreateListItem\n include Immedialist::ItemTypeConversion\n\n def self.call(list_item)\n new(list_item).call\n end\n\n def initialize(list_item)\n @list_item =...
ruby
chosen
[ { "from": "system", "value": "Add test code for Travis-CI.\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nrequire 'spec_helper'\n\ndescribe AssetsController, :js => true do\n self.use_transactional_fixtures = false\n fixtures :users, :accounts, :preferences\n set_fixture_class...
ruby
chosen
[ { "from": "system", "value": "Edit answer_params method for user_id and question_id params.\n" }, { "from": "human", "value": "class AnswersController < ActionController::Base\n\n# Add in voting logic\n# Add in comments logic\n def index\n @answers = Answer.all\n end\n\n def show\n @ans...
ruby
chosen
[ { "from": "system", "value": "Update edit fail to alert\n" }, { "from": "human", "value": "class ClinicsController < ApplicationController\n before_action :confirm_admin_user\n before_action :find_clinic, only: [:update, :edit, :destroy]\n rescue_from Mongoid::Errors::DocumentNotFound, with: ...
ruby
chosen
[ { "from": "system", "value": "Allow all emails to be disabled\n\nUntil sending emails from Heroku is resolved, we need a mechanism to\ndisable all emails. This might never be merged… we’ll see how long\nsolving this takes.\n" }, { "from": "human", "value": "class SubmissionMailer < ApplicationMa...
ruby
chosen
[ { "from": "system", "value": "Update gc_ruboconfig requirement from ~> 2.30.0 to ~> 2.31.0\n\nUpdates the requirements on [gc_ruboconfig](https://github.com/gocardless/ruboconfig) to permit the latest version.\n- [Release notes](https://github.com/gocardless/ruboconfig/releases)\n- [Changelog](https://githu...
ruby
chosen
[ { "from": "system", "value": "Update sys-proctable requirement from ~> 0.9 to >= 0.9, < 2.0\n\nUpdates the requirements on [sys-proctable](https://github.com/djberg96/sys-proctable) to permit the latest version.\n- [Release notes](https://github.com/djberg96/sys-proctable/releases)\n- [Changelog](https://gi...
ruby
chosen
[ { "from": "system", "value": "Use standard Rails layout for gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"activestorage\"\n s.version = \"0.1\"\n s.authors = \"David Heinemeier Hansson\"\n s.email = \"david@basecamp.com\"\n s.summary = \"Att...
ruby
chosen
[ { "from": "system", "value": "Change the Gem email to the Google Groups mailing list.\n" }, { "from": "human", "value": "lib_directory = File.class_eval('expand_path(join(dirname(__FILE__), \"lib\"))')\n$LOAD_PATH.unshift(lib_directory) unless $LOAD_PATH.include?(lib_directory)\n\nrequire \"frec...
ruby
chosen
[ { "from": "system", "value": "db: Create limited varchar to be able to add index.\n" }, { "from": "human", "value": "class AddUniqueIndexOnInvitationServiceAndInvitationIdentifierToUsers < ActiveRecord::Migration\n def self.up\n add_index(:users, [:invitation_service, :invitation_identifier]...
ruby
chosen
[ { "from": "system", "value": "Use the PNG icon for Slack notifications\n" }, { "from": "human", "value": "class WebhookNotifier\n BOT_NAME = \"Beggar\"\n ICON_URL = \"http://tbot-beggar.herokuapp.com/beggar-slack-icon.svg\"\n\n def initialize(pull_request)\n @pull_request = pull_request\n ...
ruby
chosen
[ { "from": "system", "value": "Remove typo from tweet spec\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Mingle::Twitter::Tweet do\n describe \"#author\" do\n it 'should be the user handle' do\n expect(subject.author).to eq subject.user_handle\n end\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Comment out resource check, for testing\n" }, { "from": "human", "value": "#\n# Cookbook Name:: coopr_service_manager\n# Recipe:: default\n#\n# Copyright © 2013-2014 Cask Data, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n...
ruby
chosen
[ { "from": "system", "value": "Fix some refs in gemspec\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n# require 'lib/zebra/zpl/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Change controller to retrieve API info for creating objects\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'rest-client'\nrequire 'json'\n\n# All of these endpoints should use https://www.inaturalist.org as the base URL, particularly endpoints that r...
ruby
chosen
[ { "from": "system", "value": "Add other SSL challenge response\n" }, { "from": "human", "value": "class PagesController < ApplicationController\n def letsencrypt\n case params[:id]\n when \"gTrmpuvlhFtL3v0N2Rkhk9GBxkzXsnkfwyf_-XWRsj0\"\n render text: \"#{params[:id]}.3agPbEGMW8yyXAdN...
ruby
chosen
[ { "from": "system", "value": "Remove some comments from users controller\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n\n\t\t# May try to make custom 404 page later\n\t# def index\n\t# \tnot_found\n\t# end\n\n\tdef new\n\tend\n\n\tdef show\n\t\t@user = User.fi...
ruby
chosen
[ { "from": "system", "value": "Create action for user edit\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n\n def create\n @user = User.new(user_params)\n if @user.save\n sesssion[:user_id] = @user.user_id\n redirect_to user_show_path(@user)\n ...
ruby
chosen
[ { "from": "system", "value": "Add specify_paypal Action to the Users Controller\n\nUpdate the Users controller to include the specify_paypal action.\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n def show\n @user = User.find params[:id]\n\n redirect_to ...
ruby
chosen
[ { "from": "system", "value": "Fix bug in related content form." }, { "from": "human", "value": "module Admin::ArticleHelper\n def possible_related_articles(article)\n Article.published.order('title ASC').where('id != ?', article)\n end\nend\n" }, { "from": "gpt", "value": "modul...
ruby
chosen
[ { "from": "system", "value": "Use 'arel_table' instead of the (apparently-incorrect) 'table'" }, { "from": "human", "value": "module Spree\n Order.class_eval do\n has_many :fishbowl_logs\n attr_accessible :fishbowl_id, :so_number\n\n scope :fishbowl_submitted, lambda { where(table[:fis...
ruby
chosen
[ { "from": "system", "value": "Update error messages to use correct class name\n" }, { "from": "human", "value": "module ContentManager\n module ClassResolution\n\n def self.content_class(name)\n content_class_name(name).constantize\n end\n\n def self.content_class_name(class_name)...
ruby
chosen
[ { "from": "system", "value": "Add dest-dir arg when building book\n" }, { "from": "human", "value": "module Static\n class Generator < Jekyll::Generator\n def generate(site)\n # Generate book\n `mdbook build intecture_book`\n\n # Generate Rust docs\n `cargo doc --...
ruby
chosen
[ { "from": "system", "value": "Update Podspec for latest tag\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\ns.name = \"CVCalendar\"\ns.version = \"1.1.4\"\ns.summary = \"A custom visual calendar for iOS 8 written in Swift.\"\ns.homepage = \"https://github.com/Moz...
ruby
chosen
[ { "from": "human", "value": "Add new cask for AirParrot\n" }, { "from": "gpt", "value": "class Airparrot < Cask\n url 'http://download.airsquirrels.com/AirParrot/Mac/AirParrot.dmg'\n homepage 'http://www.airsquirrels.com/airparrot/'\n version '1.5.3'\n sha1 '94449aa750077ccd244959d9e092bd4f3...
ruby
chosen
[ { "from": "system", "value": "Update LaunchBar formula to version 6.3.\n\nThe LaunchBar formula is currently failing on post-mountain-lion versions of OS X because LaunchBar 6.3 has been released and the link to 6.2 is no broken. Fixes this updating the URL and SHA." }, { "from": "human", "value...
ruby
chosen
[ { "from": "system", "value": "Fix `url` stanza comment for StepMania.\n" }, { "from": "human", "value": "cask 'stepmania' do\n version '5.0.10'\n sha256 '7e852089ff4cb13217e4a8debb76b1bffb3d8ff6ca31c903ff768577742b50a0'\n\n url \"https://github.com/stepmania/stepmania/releases/download/v#{ver...
ruby
chosen
[ { "from": "system", "value": "Fix a migration class name\n" }, { "from": "human", "value": "##\n# Copyright 2012 Twitter, Inc\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy o...
ruby
chosen
[ { "from": "system", "value": "Update podspec for file location\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"AsyncOpKit\"\n s.version = \"0.0.5\"\n s.summary = \"AsyncOpKit provides Swift subclasses of NSOperation to help manage asynchronou...
ruby
chosen
[ { "from": "human", "value": "Add smoke test for Customer Totals report\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\nRSpec.describe OpenFoodNetwork::OrdersAndFulfillmentsReport::CustomerTotalsReport do\n let!(:distributor) { create(:distributor_enterprise) }\n\n let!(:customer) {...
ruby
chosen
[ { "from": "system", "value": "Fix down vote method not actually down\n" }, { "from": "human", "value": "class ArticlesController < ApplicationController\n before_action :article, only: [:up_vote, :down_vote]\n around_action :render_back, only: [:up_vote, :down_vote]\n\n def index\n @articl...
ruby
chosen
[ { "from": "system", "value": "Return empty string if filters do not exist\n" }, { "from": "human", "value": "module Concerns::Searchable\n extend ActiveSupport::Concern\n\n included do\n private\n\n def ignore_empty_query\n @query = params['search_term'] rescue nil\n redirect_t...
ruby
chosen
[ { "from": "system", "value": "Add responders on products controller\n" }, { "from": "human", "value": "class ProductsController < ApplicationController\n before_action :authenticate_member!\n load_and_authorize_resource\n respond_to :html\n\n def index\n @products = Product.all\n respo...
ruby
chosen
[ { "from": "system", "value": "Remove path restriction on assignment cookie\n\nFixes issue with Internet Explorer.\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n before_filter :redirect_to_buses, only: :new\n\n def new\n @session = ContactId.new\n end\...
ruby
chosen
[ { "from": "system", "value": "Create home page when creating a new website\n" }, { "from": "human", "value": "class WebsitesController < ApplicationController\n def index\n @websites = Website.find(:all)\n end\n \n def new\n @website = Website.new\n end\n \n def edit\n @website =...
ruby
chosen
[ { "from": "system", "value": "Add ES mappings for plantings\n" }, { "from": "human", "value": "module PlantingSearch\n extend ActiveSupport::Concern\n\n included do\n searchkick\n\n scope :search_import, -> { includes(:owner, :crop) }\n\n def search_data\n {\n slug: slug,\...
ruby
chosen
[ { "from": "system", "value": "Use symbol instead of string in RedisCacheable attribute definitions\n" }, { "from": "human", "value": "module RedisCacheable\n extend ActiveSupport::Concern\n include Gitlab::Utils::StrongMemoize\n\n CACHED_ATTRIBUTES_EXPIRY_TIME = 24.hours\n\n class_methods do...
ruby
chosen
[ { "from": "system", "value": "Add 'dependent destroy' option to Dojo model:\n\nSee the following discussion for details.\nhttps://github.com/coderdojo-japan/coderdojo.jp/pull/163#issuecomment-340276197\n" }, { "from": "human", "value": "class Dojo < ApplicationRecord\n NUM_OF_COUNTRIES = \"75...
ruby
chosen
[ { "from": "system", "value": "Update Sqlectron to version 1.2.0\n" }, { "from": "human", "value": "cask 'sqlectron' do\n version '1.1.1'\n sha256 '9f604513342e4ce3f4bfedeca58f9d9d7b86f36640a0f2e603ae741b7cd6e1bc'\n\n url \"https://github.com/sqlectron/sqlectron-gui/releases/download/v#{versio...
ruby
chosen
[ { "from": "system", "value": "Use the original file's width and height instead of assuming 640x480" }, { "from": "human", "value": "require 'iiif_manifest'\n\nmodule Hyrax\n # This gets mixed into FileSetPresenter in order to create\n # a canvas on a IIIF manifest\n module DisplaysImage\n ...
ruby
chosen
[ { "from": "system", "value": "Add a foreign_key option to the User model, specifying how to link\nitself with the votes.\n" }, { "from": "human", "value": "class User < ActiveRecord::Base\n before_save :count_votes\n \n belongs_to :group\n has_many :made_requests, class_name:...
ruby
chosen
[ { "from": "system", "value": "Use https as default URL protocol\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\"\nrequir...
ruby
chosen
[ { "from": "system", "value": "Delete the deprecated `documentation` attribute\n" }, { "from": "human", "value": "Pod::Spec.new do |f|\n\n f.name = 'Fingertips'\n f.version = '0.3.0'\n\n f.summary = 'Touch indicators on external displays for iOS applications.'\n f.description = 'A UIWi...
ruby
chosen
[ { "from": "system", "value": "Fix typo in failing test.\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule PushType\n class WysiwygFieldTest < ActiveSupport::TestCase\n\n class TestPage < PushType::Node\n field :foo, :wysiwyg, toolbar: 'text'\n end\n\n let(:node) ...
ruby
chosen
[ { "from": "system", "value": "Use git-ls-files to list files in the gemspec.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'jsrebuild/version'\n\nGem::Specification.new do |gem|\n gem....
ruby
chosen
[ { "from": "system", "value": "Update spec to version 2.1.9\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"LightRoute\"\n s.version = \"2.1.8\"\n s.summary = \"LightRoute is easy transition between view controllers and support many popylar arhitectures...
ruby
chosen
[ { "from": "system", "value": "Fix logic to work with nil in get()\n\nFixes the following error:\nGoogle::Apis::ClientError: invalid: Invalid value for field 'filter': 'name eq '. Invalid list filter expression.\n" }, { "from": "human", "value": "module Fog\n module Compute\n class Google\n ...
ruby
chosen
[ { "from": "system", "value": "Make duplicate key check test more robust\n" }, { "from": "human", "value": "# Copyright (c) 2009-2012 VMware, Inc.\n\nrequire \"spec_helper\"\n\ndescribe Bosh::Cli::YamlHelper do\n subject { Bosh::Cli::YamlHelper }\n\n describe \"#check_duplicate_keys\" do\n c...
ruby
chosen
[ { "from": "system", "value": "Set pessimistic version for bundler dev dependency so we stop getting warnings from rubygems\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Update pod spec to 0.0.7\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"RSBarcodes\"\n s.version = \"0.0.6\"\n s.summary = \"1D and 2D barcodes scanner and generators for iOS 7 with delightful controls.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Rename variable to match class name\n" }, { "from": "human", "value": "#! /usr/bin/env ruby\n\n# Note: This assumes we're running from the root of the stash-harvester project\n$LOAD_PATH << File.dirname(__FILE__)\nrequire 'lib/stash/harvester'\n\nlist_records_config...
ruby
chosen
[ { "from": "human", "value": "Gather all compiler data into one object to enable traceability between\n\nRuby <-> AST <-> IR (without GUI)\n\nThis is the main model\n" }, { "from": "gpt", "value": "require 'jrubyfx'\n\nclass CompilerData\n include JRubyFX\n \n @@ir_builder = nil\n \n attr_ac...
ruby
chosen
[ { "from": "system", "value": "Add authenticate resque rack app with devise\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n mount ActionCable.server => '/cable'\n mount Resque::Server.new, :at => \"/resque\"\n\n devise_for :users\n\n root 'dashboards#index'\n\n namespac...
ruby
chosen
[ { "from": "system", "value": "CONFIG: Set binding to 0.0.0.0 port 3000 on dev start\n\nTo allow connections to all developmental devices, including\nmobile devices that want to connect.\n" }, { "from": "human", "value": "require 'rubygems'\n\n# Set up gems listed in the Gemfile.\nENV['BUNDLE_GEM...
ruby
chosen
[ { "from": "system", "value": "Use the system temp-dir for the file cache.\n\nSince I'm using Vagrant to build VMs for linux installers and\nVirtualBox SF don't support symlinks, I can't depend on the \"cache\"\ndir in the source.\n" }, { "from": "human", "value": "require 'pathname'\nroot_dir = ...
ruby
chosen
[ { "from": "system", "value": "Replace `match` routing methods with `get` in dummy app\n" }, { "from": "human", "value": "Dummy::Application.routes.draw do\n root to: \"dummy#dummy\"\n\n match \"about\" => \"dummy#dummy\", as: :about\n match \"about/contact\" => \"dummy#dummy...
ruby
chosen
[ { "from": "system", "value": "Send those testing mails for real\n" }, { "from": "human", "value": "require 'test_helper'\n\nmodule SGMailer\n class BaseTest < Minitest::Test\n class SendGridMailer < SGMailer::Base\n template_id 'e0d26988-d1d7-41ad-b1eb-4c4b37125893'\n def welcome_m...
ruby
chosen
[ { "from": "system", "value": "Use Rails methods for max number retrieval.\n" }, { "from": "human", "value": "module Numbering\n extend ActiveSupport::Concern\n\n included do\n before_create :generate_number\n end\n\n module ClassMethods\n def numbering_parent_column(column_name)\n ...
ruby
chosen
[ { "from": "human", "value": "Install a newer version of cabal into the environment\n\nThis ensures that we don't have anything getting put into the system\naccidentally. I also ran into odd issues with older versions of cabal.\n" }, { "from": "gpt", "value": "name \"cabal-install\"\ndefault_vers...
ruby
chosen
[ { "from": "system", "value": "Add some constants for the ANSI and unicode sequences\n" }, { "from": "human", "value": "require 'io/console'\n\nclass ConsoleIO\n attr_reader :input\n attr_reader :output\n\n def initialize(input: STDIN, output: STDOUT)\n @input = input\n @output = output\...
ruby
chosen
[ { "from": "system", "value": "Add message to showup in cron email when clearing otu demo data\n" }, { "from": "human", "value": "class DailyJobs\n def self.run\n self.regenerate_intervention_reports\n end\n\n def self.regenerate_intervention_reports\n District.all.each do |d|\n Cre...
ruby
chosen
[ { "from": "system", "value": "Add nmap to osx development\n\nThis commit adds nmap to the osx development recipe.\n" }, { "from": "human", "value": "include_recipe \"wel_station::github_for_mac\"\ninclude_recipe \"wel_station::homebrew\"\ninclude_recipe \"wel_station::iterm2\"\ninclude_recipe \"...
ruby
chosen
[ { "from": "system", "value": "Use build for testing HasRef\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe HasRef do\n describe '#branch?' do\n let(:pipeline) { create(:ci_pipeline) }\n\n subject { pipeline.branch? }\n\n context 'is...
ruby
chosen
[ { "from": "system", "value": "Remove placeholder comment. =S [ci skip]" }, { "from": "human", "value": "require \"rack/alive/version\"\n\nmodule Rack\n class Alive\n # Your code goes here...\n\n def initialize(app, conditional_block = nil)\n @app, @path, @conditional_block = app, \"/...
ruby
chosen