conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "DELETE view is complete for now. We only return ok\n" }, { "from": "gpt", "value": "################################################################################\n#This file is part of Dedomenon.\n#\n#Dedomenon is free software: you can redistribute it and/or modi...
ruby
chosen
[ { "from": "system", "value": "Include both app and lib in rails apps\n" }, { "from": "human", "value": "module MetricFu\n BASE_DIRECTORY = ENV['CC_BUILD_ARTIFACTS'] || 'tmp/metric_fu'\n RAILS = File.exist?(\"config/environment.rb\")\n \n if RAILS\n MetricFu::CODE_DIRS = ['app']\n else\n ...
ruby
chosen
[ { "from": "system", "value": "Add documentation for Within comparator\n" }, { "from": "human", "value": "module Linkage\n module Comparators\n class Within < Comparator\n def initialize(field_1, field_2, value)\n if field_1.ruby_type != field_2.ruby_type\n raise \"fields...
ruby
chosen
[ { "from": "human", "value": "Switch route processor based on Rails version\n" }, { "from": "gpt", "value": "require 'processors/base_processor'\nrequire 'processors/alias_processor'\nrequire 'lib/processors/lib/route_helper'\nrequire 'util'\nrequire 'set'\n\nif OPTIONS[:rails3]\n require 'lib/p...
ruby
chosen
[ { "from": "system", "value": "Upgrade Blu-ray Player.app to v2.10.4\n" }, { "from": "human", "value": "class BluRayPlayer < Cask\n version '2.10.2'\n sha256 '23105d6b8703b9ded387ba13b09d7e1b50d5bbb563fd91a7492a7ee7fd0de2bf'\n\n url 'http://www.macblurayplayer.com/user/download/Mac_Bluray_Play...
ruby
chosen
[ { "from": "system", "value": "Upgrade radiant player to v1.2.1\n" }, { "from": "human", "value": "class RadiantPlayer < Cask\n url 'https://github.com/kbhomes/google-music-mac/releases/download/v1.2.0/Radiant.Player.zip'\n homepage 'http://kbhomes.github.io/google-music-mac/'\n version '1.2.0...
ruby
chosen
[ { "from": "system", "value": "Update Sentry to ignore health check transactions\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nSentry.init do |config|\n # Do not send full list of gems with each event\n config.send_modules = false\n\n # Set tracesSampleRate to 1.0 to capt...
ruby
chosen
[ { "from": "system", "value": "Allow a model proxy to not proxy any methods.\n\nInitializer now defaults to an empty list for the method proxy list.\n" }, { "from": "human", "value": "\nmodule TavernaPlayer\n class ModelProxy\n attr_reader :class_name\n\n def initialize(class_name, method_...
ruby
chosen
[ { "from": "system", "value": "Correct default template on new content.\n" }, { "from": "human", "value": "module Grat::System\n def template_chain\n current = content\n collection = [content]\n while current.template\n current = current.template\n collection << current\n e...
ruby
chosen
[ { "from": "system", "value": "Update documentation URL for POST users/report_spam\n\nhttps://dev.twitter.com/issues/698\n" }, { "from": "human", "value": "require 'twitter/api/utils'\nrequire 'twitter/user'\n\nmodule Twitter\n module API\n module SpamReporting\n include Twitter::API::Ut...
ruby
chosen
[ { "from": "system", "value": "Add version range for ci_reporter_minitest.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'process_shared'\n s.version = File.read(File.expand_path('../VERSION', __FILE__))\n s.platform = Gem::Platform::RUBY\n s.has_rdoc = true\n s...
ruby
chosen
[ { "from": "system", "value": "Support the 4th gen kindle location format\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'chronic'\n\nmodule Kindle\n class Note\n attr_accessor :content\n attr_accessor :location\n attr_accessor :added\n\n def content\n (@content ...
ruby
chosen
[ { "from": "system", "value": "Fix \"undefined method `build_rb_world_factory` for nil:NilClass\" error when running tests on a real project\n" }, { "from": "human", "value": "# coding: UTF-8\n\nrequire 'cucumber_priority'\nrequire \"spreewald_support/field_errors\"\nrequire \"spreewald_support/v...
ruby
chosen
[ { "from": "system", "value": "Add player, x, and y ivars\n" }, { "from": "human", "value": "module Poke\n # A Camera object provides a viewport to the game window. It allows a player\n # character to move in an area of greater size than the window and still let\n # the user see the movement o...
ruby
chosen
[ { "from": "human", "value": "Add add_team_repos and prune_team_repos tasks to assist in PR handling\n" }, { "from": "gpt", "value": "namespace :git do\n\trequire 'fileutils'\n\n\tIGNORE_REPOS = [\n\t\t\"origin\",\n\t\t\"upstream\",\n\t]\n\n\tTEAM_REPOS = {\n\t\t'donthorp' => 'git@github.com:dont...
ruby
chosen
[ { "from": "system", "value": "Use the preprocessor for default parse\n" }, { "from": "human", "value": "require \"wptemplates/version\"\nrequire \"wptemplates/parser\"\n\nmodule Wptemplates\n \n def self.parse text\n parser.parse(text)\n end\n \n def self.parser\n @parser ||= Parser.n...
ruby
chosen
[ { "from": "system", "value": "Add direct dependency on minitest\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'liquid/c/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Rename sorting method. Force Mash instances into Hash.\n" }, { "from": "human", "value": "module Sensu\n def self.generate_config(node, databag)\n address = node.has_key?(:cloud) ? node.cloud.public_ipv4 : node.ipaddress\n node_config = Mash.new(\n node....
ruby
chosen
[ { "from": "system", "value": "Add missing route to Rails 4 test dummy\n" }, { "from": "human", "value": "Rails.application.routes.draw do\n get \"/users/:user_id/render_elsewhere(.:format)\", :to => \"likes#render_elsewhere\"\n get \"/users/:user_id/send_instructions\", :to => \"users#send_ins...
ruby
chosen
[ { "from": "human", "value": "Add basic browser test for Get Help request and ticket system\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe 'ticket system', type: :feature, js: true do\n let(:course) { create(:course) }\n let(:admin) { create...
ruby
chosen
[ { "from": "system", "value": "Make user entry script foolproof\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire \"./app/workers/dependency_file_fetcher\"\nrequire \"highline/import\"\nrequire \"dotenv\"\nDotenv.load\n\nrepo = ask \"Which repo would you like to bump dependenc...
ruby
chosen
[ { "from": "system", "value": "Switch to Memcachier for memcache\n" }, { "from": "human", "value": "Braumeister::Application.configure do\n config.cache_classes = true\n\n config.consider_all_requests_local = false\n config.action_controller.perform_caching = true\n\n config.serve_stati...
ruby
chosen
[ { "from": "system", "value": "Move bandcamp player iframe to https\n" }, { "from": "human", "value": "class PostPlayerCell < Cell::ViewModel\n def show\n render\n end\n\n private\n\n def iframe_src\n album_id = model.settings.bandcamp_album_id\n size = 'small'\n bgcol = 'f...
ruby
chosen
[ { "from": "system", "value": "Fix OpenSSL hostname mismatch issue with mailer\n" }, { "from": "human", "value": "class ContactMailer < ActionMailer::Base\n default from: \"Website Submission Form <webmail@tortugas-llc.com>\"\n\n def contact_us_email(options)\n @name = options[:name]\n ...
ruby
chosen
[ { "from": "system", "value": "Include jquery files in precompile list.\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n...
ruby
chosen
[ { "from": "system", "value": "Use the correct logger object\n" }, { "from": "human", "value": "#\n# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fil...
ruby
chosen
[ { "from": "human", "value": "Add header tests to check for min/max (or lack of max) client version\n" }, { "from": "gpt", "value": "# -*- coding: utf-8 -*-\n#\n# Author:: Douglas Triggs (<doug@getchef.com>)\n# Copyright:: Copyright (c) 2014 Chef, Inc.\n\ndescribe \"Headers\" do\n let (:request_...
ruby
chosen
[ { "from": "system", "value": "Add HTTP referer to the request tab\n" }, { "from": "human", "value": "module Bugsnag::Middleware\n class RackRequest\n def initialize(bugsnag)\n @bugsnag = bugsnag\n end\n \n def call(notification)\n if notification.request_data[:rack_env]\...
ruby
chosen
[ { "from": "system", "value": "Set metdata_expire to 1 second so yum updates quickly\n" }, { "from": "human", "value": "include_recipe 'java'\n\nyum_repository \"datastax\" do\n description \"DataStax Repo for Apache Cassandra\"\n url \"http://rpm.datastax.com/community\"\n gpgcheck false\n s...
ruby
chosen
[ { "from": "system", "value": "Use multi-package to speed up installs\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Cookbook:: perl\n# Recipe:: default\n#\n# Copyright:: 2009-2016, Chef Software, Inc.\n#\n# Licensed under th...
ruby
chosen
[ { "from": "system", "value": "Resolve the compile_time warnings for Chef 12.1+\n" }, { "from": "human", "value": "#\n# Cookbook Name:: dnsimple\n# Recipe:: default\n#\n# Copyright 2014-2016 Aetrion, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use th...
ruby
chosen
[ { "from": "system", "value": "Remove a case statement for no reason\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "#\n# Author:: Seth Chisamore (<schisamo@chef.io>)\n# Cookbook:: transmission\n# Recipe:: package\n#\n# Copyright::...
ruby
chosen
[ { "from": "system", "value": "Fix pessimistic dependency on Compass\n" }, { "from": "human", "value": "require './lib/quantity-queries'\n\nGem::Specification.new do |s|\n # Release Specific Information\n s.version = QuantityQueries::VERSION\n s.date = QuantityQueries::DATE\n\n # Gem Details\...
ruby
chosen
[ { "from": "system", "value": "Call clear_active_connections! or clear_all_connections! always!\n" }, { "from": "human", "value": "module ActiveRecord\n module ConnectionAdapters\n class RefreshConnectionManagement\n DEFAULT_OPTIONS = {max_requests: 1}\n\n def initialize(app, option...
ruby
chosen
[ { "from": "system", "value": "Fix for when we don't have constants defined.\n" }, { "from": "human", "value": "require 'refinerycms-testing'\n\nRSpec.configure do |config|\n config.extend Refinery::Testing::ControllerMacros::Authentication, :type => :controller\n config.include Refinery::Testi...
ruby
chosen
[ { "from": "human", "value": "Add script to add users.\n" }, { "from": "gpt", "value": "#!/usr/bin/env ruby\n\nrequire \"highline\"\nrequire \"bcrypt\"\nrequire \"yaml\"\n\ncli = HighLine.new\n\nuser = cli.ask(\"Username?\")\npass = cli.ask(\"Password?\") { |c| c.echo = false }\n\nputs \"Adding u...
ruby
chosen
[ { "from": "system", "value": "Fix an issue with CI run where 'active_support' isn't loaded.\n" }, { "from": "human", "value": "module DeviseSecurityExtension\n class Engine < ::Rails::Engine\n ActiveSupport.on_load(:action_controller) do\n include DeviseSecurityExtension::Controllers::H...
ruby
chosen
[ { "from": "system", "value": "Add gem 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 'feed_duck/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Fix for server-side rendering in production\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0...
ruby
chosen
[ { "from": "system", "value": "Update podspec with version 1.0.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'ITWLoadingPanel'\n s.version = '1.0.0'\n s.license = 'Apache 2'\n s.summary = 'Drop in classes for adding a download info panel.'\n s.homepage = 'https:...
ruby
chosen
[ { "from": "system", "value": "Update dev deps to support Rails 4.x\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'brightbytes/sendgrid/version'\n\nGem::Specification.new do |spec|\n...
ruby
chosen
[ { "from": "system", "value": "Order of precedence is enforced by parentheses\n" }, { "from": "human", "value": "module EventStore\n module Messaging\n module StreamName\n extend self\n include EventStore::Client::StreamName\n\n def self.included(cls)\n cls.extend Macro\...
ruby
chosen
[ { "from": "system", "value": "Add HTTPClient and MultiJson as deps\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/yoga_pants/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jack Chen (chendo)\"]\n gem.email ...
ruby
chosen
[ { "from": "system", "value": "Update chef client to 11.6.0-1\n" }, { "from": "human", "value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [ \"opscode\" ]\n\n# Set the default client version\ndefault[:chef][:client][:version] = \"11.4.4-1\"\n\n# A lis...
ruby
chosen
[ { "from": "system", "value": "Apply review suggestions from @nilsding\n\nCo-authored-by: Georg Gadinger <9e8f1a26fbf401b045347f083556ffd7c0b25a58@nilsding.org>" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\ndescribe Moderation::ReportsController, ty...
ruby
chosen
[ { "from": "system", "value": "Update 2.99.0 to check compatibility\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'metaweblog/version'\n\nGem::Specification.new do |spec|\n spec.name = \"me...
ruby
chosen
[ { "from": "system", "value": "Add end of line to file\n" }, { "from": "human", "value": "class JsonParser::ClassMethods::Builder\n include OptionsParser\n\n attr_reader :attr_names, :methods_def\n\n delegate :path, :cached, :compact, :type, :after, to: :options_object\n\n def initialize(attr...
ruby
chosen
[ { "from": "system", "value": "Add Treetop.load_string which loads a grammar description stored in string.\nRefactor Treetop.load and replace ruby_source with ruby_source_string which compiles\na source stored in string.\n" }, { "from": "human", "value": "module Treetop\n module Compiler\n cl...
ruby
chosen
[ { "from": "system", "value": "Add the RSpec runtime gem dependency\n" }, { "from": "human", "value": "# encoding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"rspec-wait\"\n spec.version = \"0.0.1\"\n\n spec.author = \"Steve Richert\"\n spec.email = \"steve.richert...
ruby
chosen
[ { "from": "system", "value": "Add license, vendor and zap for AppFresh.app\n" }, { "from": "human", "value": "cask :v1 => 'appfresh' do\n version :latest\n sha256 :no_check\n\n url 'http://backend.metaquark.de/download/appfresh'\n name 'AppFresh'\n appcast 'http://backend.metaquark.de/appca...
ruby
chosen
[ { "from": "system", "value": "Add rspec as a dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rack_jax/version'\n\nGem::Specification.new do |spec|\n spec.name = ...
ruby
chosen
[ { "from": "system", "value": "Fix \"Comparing Dipole-Dipole to London Dispersion\" test\n\n[#69191506]\n" }, { "from": "human", "value": "# Run basic test first.\nload 'interactive-tests/default.rb', true\n# FIXME: Clicking doesn't work on iPad, while on Android\n# pulldown menu option ca...
ruby
chosen
[ { "from": "system", "value": "Add instance methods tests for Agnet\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Agnet do\n it 'has a version number' do\n expect(Agnet::VERSION).not_to be nil\n end\n\n it 'does something useful' do\n expect(false).to eq(true)\n e...
ruby
chosen
[ { "from": "system", "value": "Add a spec for the graph instantiation (new method).\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Graph do\n\nend\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Graph do\n\n describe 'new' do\n\n it \"shoul...
ruby
chosen
[ { "from": "system", "value": "Tag donations in Stripe metadata field\n" }, { "from": "human", "value": "class DonateController < ApplicationController\n layout 'new'\n\n before_action :secure_only\n\n def index\n \n end\n\n def charge\n @amount = params[:amount]\n @amount = @amount...
ruby
chosen
[ { "from": "system", "value": "Make sign in sessions last (way, way) longer\n" }, { "from": "human", "value": "class TwitchController < ApplicationController\n\n def out\n redirect_to \"https://api.twitch.tv/kraken/oauth2/authorize?response_type=code&client_id=#{client_id}&redirect_uri=#{redi...
ruby
chosen
[ { "from": "system", "value": "Make Person resources dependent on destroy\n" }, { "from": "human", "value": "require_dependency \"gobierto_people\"\n\nmodule GobiertoPeople\n class Person < ApplicationRecord\n include ::GobiertoCommon::DynamicContent\n\n belongs_to :admin, class_name: \"Go...
ruby
chosen
[ { "from": "human", "value": "Add Twitch Desktop App latest\n\nAdd Twitch Desktop App latest\n" }, { "from": "gpt", "value": "cask 'twitch-desktop' do\n version :latest\n sha256 'e39c5c748be23cd6bf4e0164aa26575f7d86473994f9d39c13e44b5bd0fbadac'\n\n # updates.twitchapp.net was verified as offic...
ruby
chosen
[ { "from": "system", "value": "Fix tests: Rename param to :pipeline_name\n\nLooks like it was left over by changes in beea6428ab23a99dfcf8fc4e63541a6f0fe02ebf\n" }, { "from": "human", "value": "##########################################################################\n# Copyright 2016 ThoughtWor...
ruby
chosen
[ { "from": "system", "value": "Update Skitch to v. 2.5.2\n" }, { "from": "human", "value": "class Skitch < Cask\n url 'http://cdn1.evernote.com/skitch/mac/release/Skitch-2.0.5.zip'\n homepage 'http://evernote.com/skitch/'\n version '2.0.5'\n sha1 '64d61e76eb8bd2540f84b5d21ee1ac5f93c74a61'\n ...
ruby
chosen
[ { "from": "system", "value": "Update TG Pro to 2.8.7\n" }, { "from": "human", "value": "cask :v1 => 'tg-pro' do\n version '2.8.5'\n sha256 'ddffad55f0c8998323d270649f22f3e7a63ed45f867ba141a4b6df2b76bca6fc'\n\n url \"http://www.tunabellysoftware.com/resources/TGPro_#{version.gsub('.','_')}.zip...
ruby
chosen
[ { "from": "system", "value": "Set annotation hook using the hook attribute.\n" }, { "from": "human", "value": "require 'singleton'\n\nrequire 'rubygems'\ngem 'caruby-tissue'\nrequire 'catissue'\nrequire 'catissue/annotation/annotation'\n\nmodule CaTissue\n # JBridge is a convenience facade for ...
ruby
chosen
[ { "from": "system", "value": "Use module functions for easier interop\n" }, { "from": "human", "value": "##\n# reversal.rb: decompiling YARV instruction sequences\n#\n# Copyright 2010 Michael J. Edgar, michael.j.edgar@dartmouth.edu\n#\n# MIT License, see LICENSE file in gem package\n\n$:.unshift...
ruby
chosen
[ { "from": "system", "value": "Move logging code out of method to start server\n" }, { "from": "human", "value": "module Vagrant\n module Notify\n module Middleware\n class StartServer\n def initialize(app, env)\n @app = app\n end\n\n def call(env)\n ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fixed a Spree::Order ActiveRecord stub\"\n\nThis reverts commit dcde059475049a4b933442b9294c4f4090c96b7d which breaks on 2-4-stable.\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe Spree::Admin::OrdersController do\n\n context \"...
ruby
chosen
[ { "from": "human", "value": "Move city locations to initialize\n" }, { "from": "gpt", "value": "CITIES = { \"NYC\" => [40.730610, -73.935242],\n \"Boston\" => [42.364506, -71.038887],\n \"DC\" => [38.894207, -77.035507],\n \"Chicago\" => [41.881832, -87.623177],\n ...
ruby
chosen
[ { "from": "system", "value": "Increase version number to 0.1.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MGBenchmark\"\n s.version = \"0.1.0\"\n s.summary = \"This library provides an easy way to measure execution time in code.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.3.0.0 to 0.3.0.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-messaging'\n s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP ...
ruby
chosen
[ { "from": "system", "value": "Fix `Use options[:class] = config[:current_class] instead of options.merge!(class: config[:current_class]).`\n" }, { "from": "human", "value": "module Buoys\n class Link\n attr_accessor :text, :options, :options_for_config\n attr_reader :current\n\n CONFIG...
ruby
chosen
[ { "from": "system", "value": "Update Symfony documentation (3.2.1, 3.1.8, 3.0.1, 2.8.2, 2.7.9)\n" }, { "from": "human", "value": "module Docs\n class Symfony < UrlScraper\n self.name = 'Symfony'\n self.slug = 'symfony'\n self.type = 'laravel'\n self.root_path = 'namespaces.html'\n ...
ruby
chosen
[ { "from": "system", "value": "Use code rather than strings\n" }, { "from": "human", "value": "class Agreement < ActiveRecord::Base\n belongs_to :manager, class_name: 'User'\n belongs_to :jobholder, class_name: 'User'\n\n validates :manager, presence: true\n validates :jobholder, presence: tr...
ruby
chosen
[ { "from": "system", "value": "Remove fetch methods from model\n" }, { "from": "human", "value": "class Developer < ApplicationRecord\n devise :database_authenticatable, :trackable, :validatable, :omniauthable\n store_accessor :data, :bio, :html_url, :avatar_url, :company,\n :blog, :location, ...
ruby
chosen
[ { "from": "system", "value": "Update podspec file to version 0.2\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SPDebugMenu'\n s.version = '0.1'\n s.license = 'MIT'\n s.summary = 'Make your own debug menu with fully customizable actions.'\n s.homepage = 'https://...
ruby
chosen
[ { "from": "system", "value": "Update the onboarding name with the school name\n" }, { "from": "human", "value": "module Onboarding\n class SchoolDetailsController < BaseController\n before_action :set_key_stages\n before_action only: [:new, :create] do\n redirect_if_event(:school_det...
ruby
chosen
[ { "from": "system", "value": "Clean up factorial ruby file for submission\n" }, { "from": "human", "value": "# Factorial\n\n# I worked on this challenge [by myself, with: ].\n\n# Pseudocode:\n# take your number\n# create array of the number, and which changes in the number multiplied by every nu...
ruby
chosen
[ { "from": "system", "value": "Add blank lines for readability\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire \"flex_commerce_api\"\nrequire \"uri\"\n\nRSpec.describe FlexCommerce::V2::Order do\n # Global context for all specs - defines things you dont see defined in here\n ...
ruby
chosen
[ { "from": "system", "value": "Test converge on the test cookbooks\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'default recipe on Ubuntu 14.04' do\n let(:chef_run) do\n ChefSpec::ServerRunner.new do |node|\n node.automatic[:lsb][:codename] = 'trusty'\n end.con...
ruby
chosen
[ { "from": "system", "value": "Fix testing for wrong state preselected\n" }, { "from": "human", "value": "require 'application_system_test_case'\n\nclass InternExternVolunteersTest < ApplicationSystemTestCase\n def setup\n @user = create :user\n login_as @user\n end\n\n test 'Volunteer c...
ruby
chosen
[ { "from": "system", "value": "Add back support for get/post/put/delete/head module functions\n" }, { "from": "human", "value": "require 'hashie'\nrequire 'httmultiparty'\nrequire 'uri'\n\nrequire 'soundcloud/array_response_wrapper'\nrequire 'soundcloud/client'\nrequire 'soundcloud/hash_response_...
ruby
chosen
[ { "from": "system", "value": "Add source and issues url\n" }, { "from": "human", "value": "name 'safari'\nmaintainer 'Dennis Hoer'\nmaintainer_email 'dennis.hoer@gmail.com'\nlicense 'MIT'\ndescription 'Configures Safari'\nlong_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))\n...
ruby
chosen
[ { "from": "system", "value": "Allow before/after to naturally use their own defaults\n\nInstead of explicitly specifying that it should be :each.\n\n(#18)\n" }, { "from": "human", "value": "require 'with_model/model'\nrequire 'with_model/model/dsl'\nrequire 'with_model/table'\nrequire 'with_mode...
ruby
chosen
[ { "from": "human", "value": "Create script that migration prizes data from db dump\n" }, { "from": "gpt", "value": "# restore data from production\n# only contest, products(entrant), document\n# and create school\n\nrequire 'csv'\nrequire 'logger'\n\nDUMP_DIR = Rails.root.join('db', 'dump', '201...
ruby
chosen
[ { "from": "system", "value": "Modify Deck.cards.to_s to prevent recursive log output.\n" }, { "from": "human", "value": "module Anki\n class Deck\n attr_accessor :name, :desc\n attr_reader :id, :cards\n\n def initialize name\n @name = name\n @id = Time.now.to_i\n @cards ...
ruby
chosen
[ { "from": "system", "value": "Stop ID being set to the title, when title is used to look-up SEEK sample\n" }, { "from": "human", "value": "module Seek\n module Samples\n module AttributeTypeHandlers\n class SeekResourceAttributeTypeHandler < BaseAttributeHandler\n\n def test_valu...
ruby
chosen
[ { "from": "system", "value": "Use module namespace to reduce noise\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'sequel'\nrequire LicenseFinder::Platform.sqlite_load_path\n\nLicenseFinder::DB = Sequel.connect(\"#{LicenseFinder::Platform.sqlite_adapter}://#{LicenseFinder.config....
ruby
chosen
[ { "from": "system", "value": "Add methods to get camera url\n" }, { "from": "human", "value": "module MiOS\n module Services\n module Camera1\n def self.extended(base)\n base.instance_variable_set(\"@camera1_urn\", \"urn:micasaverde-com:serviceId:Camera1\")\n end\n end\n ...
ruby
chosen
[ { "from": "human", "value": "Add ShellSvnBridge for platforms where the svn bindings are not easily installable.\n" }, { "from": "gpt", "value": "require \"open3\"\nrequire \"nokogiri\"\n\nmodule CukeQ\n class Scm\n class ShellSvnBridge\n\n def initialize(url, working_copy)\n @ur...
ruby
chosen
[ { "from": "system", "value": "Update Zotero to version 4.0.16\n" }, { "from": "human", "value": "class Zotero < Cask\n url 'http://download.zotero.org/standalone/4.0.15/Zotero-4.0.15.dmg'\n homepage 'http://www.zotero.org/'\n version '4.0.15'\n sha1 'fcc66cc47a14afcb10475533b7cebcf0548d5f36'...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.29.0.6 to 0.29.0.7\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-messaging'\n s.version = '0.29.0.6'\n s.summary = 'Common primitives for platform-specific messaging...
ruby
chosen
[ { "from": "system", "value": "Add a few more block elements.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby -w\n# encoding: UTF-8\n\nrequire './markup'\n\nclass Renderer\n\n @@standard_options = {\n :block_elements => [ :h1, :p, :blockquote, :pre ]\n }\n\n def initialize(options=ni...
ruby
chosen
[ { "from": "system", "value": "Move inventory and room creation into rooms.\n" }, { "from": "human", "value": "require_relative './rooms/room'\nrequire_relative 'direction'\nrequire_relative 'rooms'\nrequire_relative 'command/parser'\n\nmodule Oo\n class HauntedHouse\n attr_reader :rooms\n\n ...
ruby
chosen
[ { "from": "system", "value": "Move Benchmark closer to the code being evaluated (inside the instance_eval)\n" }, { "from": "human", "value": "require 'benchmark'\n\nmodule Rubeuler\n include Solution\n\n class Problem < ::Rubeuler::Base\n def initialize(options)\n load_options(:number,...
ruby
chosen
[ { "from": "system", "value": "Fix bad reference to taxa fixture\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass TaxonTest < ActiveSupport::TestCase\n fixtures :taxa, :projects, :iczn_groups, :import_jobs\n # test \"the truth\" do\n # assert true\n # end\n\n test \"Child ...
ruby
chosen
[ { "from": "system", "value": "Disable nsfw filters for image search\n" }, { "from": "human", "value": "require 'open-uri'\nrequire 'json'\n\nFubot.command /image (.*)/ do\n def help\n [\"image\", \"Searches for an image\"]\n end\n\n def imageMe(bot, query, animated=false, faces=false)\n ...
ruby
chosen
[ { "from": "system", "value": "Add Time blank test for coverage\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass EmptyTrue\n def empty?\n 0\n end\nend\n\nclass EmptyFalse\n def empty?\n nil\n end\nend\n\nBLANK = [ EmptyTrue.new, nil, false, '', ' ', \" \\n\\t \\r \"...
ruby
chosen
[ { "from": "system", "value": "Fix facter mysql version unit test\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Facter::Util::Fact.to_s do\n before(:each) do\n Facter.clear\n end\n\n describe 'mysql_version' do\n context 'with value' do\n before :each do\n ...
ruby
chosen
[ { "from": "system", "value": "Fix SDVersion import for Travis.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"IRLSize\"\n s.version = \"0.5.0\"\n s.summary = \"A library for determining the actual physical size of pixels on an iOS device.\"\...
ruby
chosen
[ { "from": "system", "value": "Use lower case unless grammatically required\n" }, { "from": "human", "value": "# coding: utf-8\nI18n.available_locales.reduce({}) do |a, locale|\n a[locale] = {\n untranslated: {\n language: {\n by_code: {\n ar: \"العربية\",\n de: ...
ruby
chosen
[ { "from": "system", "value": "Remove Forwardable in favor of code (making `each` 9% faster yay)\n" }, { "from": "human", "value": "require 'forwardable'\n\nmodule RablRails\n module Nodes\n class Attribute\n extend Forwardable\n\n def_delegators :@hash, :[]=, :each\n attr_read...
ruby
chosen
[ { "from": "human", "value": "Apply patch 21285 from Morus Walter which adds RelaxNG support.\n" }, { "from": "gpt", "value": "require \"xml\"\nrequire 'test/unit'\n\nclass TestRelaxNG < Test::Unit::TestCase\n def setup\n xp = XML::Parser.new\n @doc = XML::Document.file(File.join(File.dirn...
ruby
chosen