conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change feedback from puts to print\n"
},
{
"from": "human",
"value": "solution = 1 + rand(1000)\nguesses = []\nputs solution # This statement is temporary while I test the game.\nputs \"Guess what number I'm thinking of. It's between 1 and 1000\"\nguess = gets.to_i\... | ruby | chosen |
[
{
"from": "system",
"value": "Use display name by default if it exists\n"
},
{
"from": "human",
"value": "module ActiveAdmin\n module Views\n module Pages\n class Show < Base\n\n def config\n active_admin_config.get_page_presenter(:show) || ::ActiveAdmin::PagePresenter.n... | ruby | chosen |
[
{
"from": "system",
"value": "Use session store instead of cookie.\n"
},
{
"from": "human",
"value": "module AuthpdsNyu\n module Session\n module Callbacks\n def pds_record_identifier\n (pds_user.respond_to?(:nyu_shibboleth) and pds_user.nyu_shibboleth) ? :uid : :id\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a BraintreeRails::Configuration.client_side_encryption_key for convenience\n"
},
{
"from": "human",
"value": "module BraintreeRails\n class Configuration\n\n module Mode\n JS = 'JS'\n S2S = 'S2S'\n TR = 'TR'\n end\n\n singleton_class.cla... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor code to handle files with spaces better\n\n* The Open3.capture method accepts the file as-is, and passes the proper\n value down to the underlying command better than if it is just\n single quoted.\n"
},
{
"from": "human",
"value": "require 'thor'\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Add respond_to and method_missing to Rounders::Mail\n"
},
{
"from": "human",
"value": "module Rounders\n class Mail\n extend Forwardable\n attr_reader :mail\n def_delegators :@mail,\n :all_parts,\n :attachment,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add full path to video\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule VideoLibrary\n\n VIDEO_FORMATS = [ :mkv, :mov, :mp4 ]\n VIDEO_LIBRARIES = YAML::load(File.open(File.join(Dir.pwd, 'config', 'video_library.yml')))['videos']\n\n def self.videos\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix translate_class_name when it does not exists in the config file\n"
},
{
"from": "human",
"value": "# coding: utf-8\nmodule GettextColumnMapping\n\n class Mapper\n attr_accessor :mappings\n delegate :[], :has_key?, :to => :mappings, :allow_nil => true\n\n\... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple tests for certificate uploader\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass CompetitionCertificateTemplateUploaderTest < ActionDispatch::IntegrationTest\n def setup\n @game = create(:active_game, enable_completion_certificates: true)... | ruby | chosen |
[
{
"from": "system",
"value": "Add Three20.bundle to pod resources\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = '320Categories'\n s.version = '0.2.2'\n s.license = 'MIT'\n s.summary = 'Maintenance it based facebook three20.'\n s.homepage = 'https://github.com/jim... | ruby | chosen |
[
{
"from": "system",
"value": "Add naive caching to partials\n\nThis commit adds caching to partials to reduce the number of disk reads\nwhen the same partial is used more than once. The mustache gem still\ndoes a lot of repeated CPU intensive work parsing the partial so I\nwould still advise against using p... | ruby | chosen |
[
{
"from": "system",
"value": "Create rsa keypair on the box\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: cookbooks/micro-qa\n# Recipe:: default\n#\n# Copyright 2014, Eucalyptus Systems\n#\n# All rights reserved - Do Not Redistribute\n#\n\npackage 'git'\ngit \"/vagrant\" do\n reposito... | ruby | chosen |
[
{
"from": "human",
"value": "Add leaderboard controller spec to check for errors for disabled component\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire 'rails_helper'\n\nRSpec.describe Course::LeaderboardsController, type: :controller do\n let!(:instance) { create(:insta... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up the RSpec/ContextWording warnings\n\nThe linted versions do read a little nicer\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'absolute_template_path' do\n let(:msg) { 'template module paths should be relative, not absolute' }\n\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"reverted back to previous require 'crypt/ISAAC' (require 'crypt-isaac' doesn't work for me)\"\n\nThis reverts commit c77a0989fa02353bfe8136a1b60b6f262396926c.\n"
},
{
"from": "human",
"value": "require 'crypt/ISAAC'\n\n# Misc utility function used throughou... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in comment controller. Moving to that feature next.\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n de index\n end\n\n def show\n end\n\n def new\n end\n\n def create\n end\n\n def destroy\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add create route to Comment\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n\n\n def new\n @comment=Comment.new\n end\n\n def create\n if params[:question_id]\n q_or_a = Question.find(params[:question_id])\n elsi... | ruby | chosen |
[
{
"from": "system",
"value": "Print a failure and also the exception\n"
},
{
"from": "human",
"value": "class Object\n def it(title, &block)\n block.call\n print '.'\n end\nend\n"
},
{
"from": "gpt",
"value": "class Object\n def it(title, &block)\n block.call\n print '... | ruby | chosen |
[
{
"from": "system",
"value": "Add system type to serializer"
},
{
"from": "human",
"value": "class CategorySerializer < ActiveModel::Serializer\n attributes :id, :name, :total, :count\n\n def count\n transactions.count\n end\n\n def total\n transactions.sum(:amount)\n end\n\nprotected... | ruby | chosen |
[
{
"from": "system",
"value": "Add empty message for sessions\n"
},
{
"from": "human",
"value": "class SessionsSerializer\n attr_accessor :sessions\n\n def initialize(sessions)\n @sessions = sessions\n end\n\n def type(session)\n # handle DUBLADO3DDUBLADO and DUBLADODUBLADO3D\n retur... | ruby | chosen |
[
{
"from": "system",
"value": "Set the same Rack version as passanger ships with in bionic\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.version = '0.1.7'\n s.name = 'talos'\n s.authors = ['Alexey Lapitsky', 'Johan Haals']\n s.email = 'alexe... | ruby | chosen |
[
{
"from": "system",
"value": "Reformat the patch slightly: 2-spaces\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule URI\n\tdef self.decode_www_form(str, separator: '&', isindex: false)\n\t\t%x{\n\t\t\tvar str = #{str};\n\t\t\tvar ary = [];\n\t\t\tif (str.length == 0) {... | ruby | chosen |
[
{
"from": "system",
"value": "Support lazy setting of config options\n\nSimilar to how the rest of Rails gained lazy config initialization\nhttps://github.com/rails/rails/commit/39d6f9e112f2320d8c2006ee3bcc160cfa761d0a\nwhich was later refactored to leverage framework-wide on_load hook\nhttps://github.com/r... | ruby | chosen |
[
{
"from": "system",
"value": "Reorder respond_to formats in deny_access\n\nOnly API requests should return a 401. Previously, a request for any\ntype that wasn't HTML would return a 401. This isn't desired in many\ncases (for instance, PDF).\n"
},
{
"from": "human",
"value": "module Clearance\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add country class based on the german csv_country_selector gem\n\nRefactored with the help of linters.\n"
},
{
"from": "gpt",
"value": "require \"csv_country_selector_en/version\"\nrequire \"csv\"\n\nmodule CsvCountrySelectorEn\n class Country\n attr_reader :code... | ruby | chosen |
[
{
"from": "human",
"value": "Add a package for Module Manager.\n"
},
{
"from": "gpt",
"value": "class ModuleManager < Kosmos::Package\n title 'ModuleManager'\n aliases 'module manager'\n url 'https://ksp.sarbian.com/jenkins/job/ModuleManager/lastBuild/artifact/jenkins-ModuleManager-36/ModuleM... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the relative_path default to point to MM root.\n"
},
{
"from": "human",
"value": "require 'middleman-build-info/updater'\n\nmodule Middleman\n class BuildInfoExtension < Extension\n\n option :filename, 'build.json', 'Build filename.'\n option :relative_pa... | ruby | chosen |
[
{
"from": "system",
"value": "search: Move region includes to profile to workaround rails bug\n"
},
{
"from": "human",
"value": "module ProductsPlugin\n class SearchController < ::SearchController\n\n helper ProductsHelper\n\n def products\n @scope = @environment.products.enabled.is_... | ruby | chosen |
[
{
"from": "system",
"value": "Replace Draper by implementing instance.decorate the same as class.decorate\n"
},
{
"from": "human",
"value": "class ApplicationRecord < ActiveRecord::Base\n class << self\n def decorate\n @_decorator ||= decorator_for(self)\n end\n\n private\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for the modified packer/unpacker defns.\n"
},
{
"from": "human",
"value": "describe Cauterize::Builders::C::Enumeration do\n let(:type_constructor) { lambda {|name|\n enumeration(name)\n }}\n\n it_behaves_like \"a buildable\"\n it_behaves_like \"a s... | ruby | chosen |
[
{
"from": "system",
"value": "Add search action to JournalEntry\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class JournalEntry\n include Support::Fields\n include Support::RecordRefs\n include Support::Records\n include Support::Actions\n in... | ruby | chosen |
[
{
"from": "system",
"value": "Fix put_json test helper to work with Rails 3.\n\nRails 3 integration stuff has some special handling for content-type,\nbut this is done before the case etc. is normalised, so if this doesn't\nmatch the case that Rails uses internally, oddness ensues.\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Fix some bad ruby in the nagios-xi recipe\n\n\nFormer-commit-id: 1df14a0d4506b057f5752c08d6fe1d390d7ce392 [formerly 16cc13ed1fbd5ca596c7b468ad9858b542dc388e] [formerly 6eb599da4a86545f6a3091e77893bfa2854e1d3d [formerly 96bacdceeb83e0cfcd6a3b393b35d84e75140f91 [formerly 723a5bd5... | ruby | chosen |
[
{
"from": "human",
"value": "Add Cask for Postgres.app version 9.3.1.0-alpha1\n"
},
{
"from": "gpt",
"value": "class PostgresApp < Cask\n url 'https://github.com/PostgresApp/PostgresApp/releases/download/9.3.1.0-alpha1/Postgres93.zip'\n homepage 'http://postgresapp.com/'\n version '9.3.1.0-al... | ruby | chosen |
[
{
"from": "human",
"value": "Add temporary rake task to fix redirect on a document\n\nThe document `/disposal-of-dredged-material-at-sea` was unpublished in\n2018 and redirected to `/guidance/do-i-need-a-marine-licence#disposing-of-dredged-material-at-sea`.\nHowever, as the redirect is implemented with segm... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for Shelwords.shelwords bug with backslash escaping\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'shellwords'\ninclude Shellwords\n\ndescribe \"Shellwords#shellwords\" do\n it \"honors quoted string... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Firehose::Server::Message to not inherit from new Struct class\n"
},
{
"from": "human",
"value": "module Firehose\n module Server\n class Message < Struct.new(:payload, :sequence)\n def json_payload\n JSON.parse payload\n end\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix irwi_wiki generator: migration file\n"
},
{
"from": "human",
"value": "require 'rails/generators/active_record'\n\nclass IrwiWikiGenerator < Rails::Generators::Base\n\n include Rails::Generators::Migration\n\n source_root File.expand_path(\"../templates\", __F... | ruby | chosen |
[
{
"from": "system",
"value": "Update use newest version of CocoaAsyncSocket\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'NHNetworkTime'\n s.version = '1.6'\n s.summary = 'Network time protocol NTP for iOS.'\n s.homepage = 'https://github.com/huyng... | ruby | chosen |
[
{
"from": "system",
"value": "Add more accessors to the Event object.\n"
},
{
"from": "human",
"value": "module KQueue\n class Event\n def watcher\n @watcher ||= @queue.watchers[[filter, @native[:ident]]]\n end\n\n def filter\n @filter ||= KQueue::Native::Flags.from_flag(\"EV... | ruby | chosen |
[
{
"from": "system",
"value": "Add FIXME to test that clears ENV\n\nI have punted this to a bug in Pivotal https://www.pivotaltracker.com/story/show/76118720.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Vcloud::Core::Fog::Login do\n let!(:mock_env) { ENV.clone }\n\n bef... | ruby | chosen |
[
{
"from": "system",
"value": "Update from should to expect syntax\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe \"gardens/show\" do\n before(:each) do\n @owner = FactoryBot.create(:member)\n controller.stub(:current_user) { @owner }\n @garden = FactoryBot.crea... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless param for memoize\n"
},
{
"from": "human",
"value": "module Rize\n module_function\n\n # Returns a memoized version of a given proc, lambda, or method.\n #\n # @param func [Proc, Lambda, Method] The proc, lambda, or method to memoize.\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Use regexps instead of Ripper's lexer\n\nNothing we can do about checks like this with Parser.\nFor now they'll be simple(and flawed) regexp checks.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Rubocop\n module Cop\n class EmptyLines < Cop\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Return whatever the yield returned\n"
},
{
"from": "human",
"value": "module Syncro\n module Scriber\n class Observer\n include Singleton\n \n class << self\n def disabled_clients\n @disabled_clients ||= []\n end\n \n... | ruby | chosen |
[
{
"from": "system",
"value": "Use string key for create_client { 'client' => params }\n"
},
{
"from": "human",
"value": "module TogglV8\n class API\n\n ##\n # ---------\n # :section: Clients\n #\n # name : The name of the client (string, required, unique in workspace)\n # wid... | ruby | chosen |
[
{
"from": "human",
"value": "Move boom to versions, fix failure to launch, add version and hash\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'boom1' do\n version '1.1'\n sha256 'fe0edcb5e0c147b948dcab0d00bb042bfa2ecb32dda7f64c2aac90785585b676'\n\n url \"http://www.globaldelight.com/boom/downl... | ruby | chosen |
[
{
"from": "system",
"value": "Change the path to where ruby will be.\n\nI'm changing the method of ruby installation in production to make\nupgrades easier.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nenv 'PATH', '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/b... | ruby | chosen |
[
{
"from": "system",
"value": "Allow fungi to have many photos\n"
},
{
"from": "human",
"value": "class FungiSample < ApplicationRecord\n\n belongs_to :user\n belongs_to :plot\n\n validates :collected_on, presence: true\n validates :location_within_plot, presence: true\n validates_numericali... | ruby | chosen |
[
{
"from": "system",
"value": "Add Foundation Sass folder to Sass load paths\n"
},
{
"from": "human",
"value": "set :css_dir, 'stylesheets'\nset :js_dir, 'javascripts'\nset :images_dir, 'images'\n\nset :markdown_engine, :redcarpet\n\nset :debug_assets, true\n\nactivate :livereload\n\nready do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add doctype and charset to the http message\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nrequire 'thread'\nrequire 'ruboty'\n\nmodule Ruboty::HTTPd\n def call(env)\n [200, {'Content-type' => 'text/html'}, ['すごい広島']]\n end\nend\nRuboty::Robot.incl... | ruby | chosen |
[
{
"from": "system",
"value": "Update Tiled.app to version 0.10.1\n"
},
{
"from": "human",
"value": "class Tiled < Cask\n version '0.9.1'\n sha256 '17560ca54389c077e80636ac96ddb905d2f5a3a1932562a0be6d91c76bf395a1'\n\n url 'https://downloads.sourceforge.net/project/tiled/tiled-qt/0.9.1/tiled-qt... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec requirement to 3.0.0.beta1.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"lita-likeaboss\"\n spec.version = \"1.0.2\"\n spec.authors = [\"Henrik Sjökvist\"]\n spec.email = [\"henrik.... | ruby | chosen |
[
{
"from": "system",
"value": "Change rake-compiler from runtime to development 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 'epeg/version'\n\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "Allow target to be nil\n\nAllow target to be nil, since it is leveraged only in targeted\nrefresh.\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Amazon::Inventory::Persister < ManagerRefresh::Inventory::Persister\n require_nested :CloudManager\n re... | ruby | chosen |
[
{
"from": "system",
"value": "Add tvOS target to podspec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SlackKit\"\n s.version = \"1.0.2\"\n s.summary = \"a Slack client library for iOS and OS X written in Swift\"\n s.homepage = \"htt... | ruby | chosen |
[
{
"from": "system",
"value": "Add Rails' file_fixture method replacement\n"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start('rails')\n\nENV['RAILS_ENV'] = 'test'\nrequire File.expand_path('../config/environment', __dir__)\n\nrequire 'rails/test_help'\nrequire 'database_clean... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure tmp directory exists for logging to. (skippy)\n"
},
{
"from": "human",
"value": "require File.join(File.expand_path(File.dirname(__FILE__) + '/../lib/mongo_mapper'))\n\ngem 'jnunemaker-matchy', '0.4.0'\ngem 'shoulda', '2.10.2'\ngem 'timecop', '0.3.1'\ngem ... | ruby | chosen |
[
{
"from": "system",
"value": "Add robot public interface test to RobotTest\n"
},
{
"from": "human",
"value": "require './lib/toy_robot_simulator/robot'\nrequire './tests/test_reporter_interface'\nrequire 'minitest/autorun'\n\nclass RobotTest < MiniTest::Unit::TestCase\n include ReporterInterfac... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rails namespace references in generators\n"
},
{
"from": "human",
"value": "require 'rails/generators/active_record'\n\nmodule Douglas\n module Generators\n class TableGenerator < ::Rails::Generators::NamedBase\n include Rails::Generators::Migration\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is incremented from 0.1.2 to\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 library'... | ruby | chosen |
[
{
"from": "system",
"value": "Use the id of the node, nto the name. Variables can have the same name and will clobber each other's node settings\n"
},
{
"from": "human",
"value": "module RbPlusPlus\n class NodeCache #:nodoc:\n # Retrieves or initializes a node's information cache\n def se... | ruby | chosen |
[
{
"from": "human",
"value": "Add very simple event handling example\n"
},
{
"from": "gpt",
"value": "class MyHandler \n def on_send_request_hdr\n puts 'on_send_request_hdr'\n c = ATS::Connection.new\n puts c.remote_ip\n end\n\n def on_read_response_hdr\n puts 'on_read_response_hdr... | ruby | chosen |
[
{
"from": "system",
"value": "Test commit.\n!{time: 0:30, orgs: [knjit, gfish]}!\n"
},
{
"from": "human",
"value": "class GithubOrgReports::Models::PullRequest < Baza::Model\n def scan_hash\n hash = {}\n self[:text].to_s.scan(/#(\\{(.+?)\\})#/) do |match|\n hash.merge!(JSON.parse(mat... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to point to 0.0.2.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Silica\"\n s.version = \"0.0.1\"\n s.summary = \"A framework for Cocoa window management.\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Reset prepared flag when running application tests"
},
{
"from": "human",
"value": "require 'test_presenter'\n\nclass TestApplication < Pakyow::Application\n configure(:development) do\n app.auto_reload = true\n app.errors_in_browser = true\n end\n \n conf... | ruby | chosen |
[
{
"from": "system",
"value": "Create finish basic sequential queue\n"
},
{
"from": "human",
"value": "module Yars\n class AtomicQueue\n def initialize\n @head = Node.new pred: @tail\n @tail = Node.new succ: @head\n end\n\n def <<(data)\n new_node = Node.new data: data, s... | ruby | chosen |
[
{
"from": "system",
"value": "Package version patch number is increased from 0.1.8 to 0.1.9\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.1.8'\n s.summary = 'HTTP Client for EventStore'\n s.de... | ruby | chosen |
[
{
"from": "human",
"value": "Add dirty group dynamic lookup example\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../example_setup', __FILE__)\n\nrequire 'flipper'\nrequire 'flipper/adapters/memory'\n\nadapter = Flipper::Adapters::Memory.new\nflipper = Flipper.new(adapter)\nstats = ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove version constraint for Sequel gem\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/flipper/version', __FILE__)\nrequire File.expand_path('../lib/flipper/metadata', __FILE__)\n\nflipper_sequel_files = ->(file) { fi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary require from gemspec\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path(\"../lib\", __FILE__)\nrequire \"hiera/backend/psql_backend\"\n\nGem::Specification.new do |s|\n s.version = \"0.1.0\"\n s.name = \"hiera-psql\"\n s.email = \"e... | ruby | chosen |
[
{
"from": "system",
"value": "Set source tag in podspec file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Wrappa'\n s.version = '0.1.0'\n s.license = { :type => 'MIT' }\n s.summary = 'UITableView and other classes wrappers to make it easier to create iOS interfa... | ruby | chosen |
[
{
"from": "system",
"value": "Stop removing metric history when running tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'metric_fu/cli/helper'\n\ndescribe MetricFu, \"running\" do\n\n let(:helper) { MetricFu::Cli::Helper.new }\n\n before do\n FileUtils.rm_rf(\"tmp/m... | ruby | chosen |
[
{
"from": "system",
"value": "Test to prevent regression of previous commit\n"
},
{
"from": "human",
"value": "require './test/helper'\n\nclass AbstractAdapterTest < Test::Unit::TestCase\n class TestAdapter < Paperclip::AbstractAdapter\n attr_accessor :tempfile\n\n def content_type\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove leftovers from context gem.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule Chillout\n module Middleware\n class CreationsMonitorTest < ChilloutTestCase\n setup do\n @env = { 'HOST' => 'example.net' }\n @logger = stub... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependencies to gemspec\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'enumerate_by/version'\n\nGem::Specification.new do |s|\n s.name = \"enumerate_by\"\n s.version = Enumera... | ruby | chosen |
[
{
"from": "system",
"value": "Add rack-test for Travis CI.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'env_notifier/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Change activerecord dependency to < 4.2\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.add_dependency 'activerecord', ['>= 3.0', '< 4.1']\n spec.add_dependency 'delayed_job', ['>= 3.0', '< 4.1']\n spec.authors ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove symbolick links and replace for the path."
},
{
"from": "human",
"value": "class RailsBackend::RegisterGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../../../../../app', __FILE__)\n\n def generate\n template \"controller.rb\", ... | ruby | chosen |
[
{
"from": "system",
"value": "Add collection to bulk edit form\n"
},
{
"from": "human",
"value": "class BatchEditForm < Sufia::Forms::BatchEditForm\n # TODO: This does not handle non-array metadata\n self.terms = [:resource_type, :creator, :contributor,\n :abstract, :description... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Travis to work offline, rescue for the win\n"
},
{
"from": "human",
"value": "module TravisHelper\n\n require 'travis'\n\n def owner_and_name_from repo\n match = repo.match(/github.com[:|\\/]([^.]+)[.git]?/)\n if match\n match.captures.first\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move today into private method\n"
},
{
"from": "human",
"value": "class PromptMailer < ActionMailer::Base\n def prompt(user, entry)\n @entry = entry\n today = I18n.l(\n Time.zone.now.in_time_zone(user.time_zone),\n format: :for_prompt\n )\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Order embed locations by view count\n"
},
{
"from": "human",
"value": "class EmbedLocation < ActiveRecord::Base\n belongs_to :contest, inverse_of: :embed_locations\n belongs_to :prediction, inverse_of: :embed_locations\n before_save :increment_view_count\n\n val... | ruby | chosen |
[
{
"from": "system",
"value": "Increase IterativeWithTwoMatrixRowsOptimized performance about 10%\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule StringMetric\n module Levenshtein\n class IterativeWithTwoMatrixRowsOptimized\n def self.distance(from, to, options = {})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Implement endpoints\n* GET\n* POST\n* PATCH\n* DELETE\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'sinatra'\nrequire File.join(File.dirname(__FILE__), 'environment')\n\nconfigure do\n set :views, \"#{File.dirname(__FILE__... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken link to resource from Tools index\n"
},
{
"from": "human",
"value": "class ResourcesController < ApplicationController\n\n def index\n @tools = Tool.all\n @resources = Resource.all\n\n respond_to do |format|\n format.html\n format.json... | ruby | chosen |
[
{
"from": "system",
"value": "Fix problem that the unit may be false\n"
},
{
"from": "human",
"value": "module Chanko\n module Invoker\n class FunctionFinder\n def self.find(context, options)\n new(context, options).find\n end\n\n attr_reader :context, :options\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change values for port and worker_processes to String\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: rubygems_app\n# Recipe:: default\n# Copyright 2014, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\n#\n\n\nuser_account 'rubygems_app'... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we have all of rspec for Travis CI.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'biburi/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix string ID issue in deleting product variants\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass Mutations::UpdateProduct < Mutations::BaseMutation\n include ProductMutationHelper\n\n field :product, Types::ProductType, null: false\n\n arg... | ruby | chosen |
[
{
"from": "human",
"value": "Add an example that shows how to receive a stream of events from varnishlog on a buffered channel.\n"
},
{
"from": "gpt",
"value": "require 'eventmachine'\nrequire 'em/varnish_log/connection'\nrequire 'em/buffered_channel'\n\nEM.run do\n count = 0\n t = nil\n\n ch... | ruby | chosen |
[
{
"from": "system",
"value": "Replace FIXME with an explanation\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule GirFFI\n # Class to represent the info for the receiver argument of a callback or\n # signal handler. Implements the necessary parts of IArgumentInfo's\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused argument for `format` in `Security/YAMLLoad` cop\n\nWith `ruby -w`, a warning is occurred in `Security/YAMLLoad` cop.\n\n```sh\n$ RUBYOPT=-w\n/home/pocke/.gem/ruby/2.4.0/gems/parser-2.3.3.1/lib/parser/lexer.rb:10922: warning: assigned but unused variable - testEof... | ruby | chosen |
[
{
"from": "human",
"value": "Add ScanSnap Manager for ix100 Scanner V6.3L32\n\nForked from scansnap-manager-ix500 Cask.\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'scansnap-manager-ix100' do\n version '6.3L32'\n sha256 'd00c23c350a9bcd5032c520234647f67dbe972c6a5ba8291ab19b40c4379091f'\n\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirect test for edit event_wine route\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe EventWinesController do\n\tdef stub_current_user user\n ApplicationController.any_instance.stub(:current_user) { user }\n end\n\n let(:user) {User.... | ruby | chosen |
[
{
"from": "system",
"value": "Add whitespace between environment variables"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Engagement::CommentCounter::Twitter do\n\n if twitter_credentials_present?\n let(:counter) { Engagement::CommentCounter::Twitter.new(twitter_credentia... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails 3.1 module order which has bug fixes.\n"
},
{
"from": "human",
"value": "require 'strobe/action_controller/haltable'\nrequire 'strobe/action_controller/param'\n\nmodule Strobe\n module ActionController\n # A configured ActionController::Metal that incl... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependencies, technically wrong since Sidekiq 2.6 doesn't have the needed APIs\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"sidekiq/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a errant newline during conflict merge."
},
{
"from": "human",
"value": "rspec_module = defined?(RSpec::Core) ? 'RSpec' : 'Spec' # RSpec 1 compatability\n\nif rspec_module == 'RSpec'\n require 'rspec/core'\n require 'rspec/expectations'\nelse\n ActiveSupport:... | ruby | chosen |
[
{
"from": "system",
"value": "Use Ruby keyword args in ManualPublishTaskAssociationMarshaller\n\nI think that using language features instead of custom code makes this\neasier to understand.\n"
},
{
"from": "human",
"value": "class ManualPublishTaskAssociationMarshaller\n def initialize(depende... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.