conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Revert \"Revert \"Update Item Serializer\"\"\n"
},
{
"from": "human",
"value": "class ItemSerializer < ActiveModel::Serializer\n attributes :id, :title, :ward, :number\n\n has_one :item_type\n has_many :user_votes\nend\n"
},
{
"from": "gpt",
"value": ... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate political affiliation to new column\n"
},
{
"from": "gpt",
"value": "puts \"Updating political parties for historical accounts.\"\nHistoricalAccount.all.each do |historical_account|\n historical_account.political_party_ids = [historical_account.political_par... | ruby | chosen |
[
{
"from": "system",
"value": "Remove JSON as an explicit dependency\n\nTODO: bundle pure Ruby JSON implementation for Ruby 1.8\n"
},
{
"from": "human",
"value": "$:.unshift(File.join(File.dirname(__FILE__), 'lib'))\n\nrequire File.expand_path('../lib/stripe/version', __FILE__)\n\nspec = Gem::Spe... | ruby | chosen |
[
{
"from": "system",
"value": "modules/tests: Remove incorrect require in ruby tests.\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), '..', 'clipp_test')\n\nclass TestLuaPredicate < Test::Unit::TestCase\n include CLIPPTest\n\n def make_config(file, extras = {})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the version to 7.0.0.alpha\n"
},
{
"from": "human",
"value": "require 'arel/crud'\nrequire 'arel/factory_methods'\n\nrequire 'arel/expressions'\nrequire 'arel/predications'\nrequire 'arel/window_predications'\nrequire 'arel/math'\nrequire 'arel/alias_predicat... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor based on skmetz example onPR 4\n\nhttps://github.com/strand/dude/pull/4\n"
},
{
"from": "human",
"value": "class Exception\n def initialize(message)\n @message = message\n end\n\n def to_s\n \"#{@message}, dude.\"\n end\nend\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Move Bob configuration for tests in setup\n"
},
{
"from": "human",
"value": "require \"test/unit\"\nrequire \"contest\"\nrequire \"hpricot\"\n\nbegin\n require \"redgreen\"\n require \"ruby-debug\"\nrescue LoadError\nend\n\n$LOAD_PATH.unshift(File.expand_path(File... | ruby | chosen |
[
{
"from": "system",
"value": "Remove direct JSON gem dependency.\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'foodcritic/version'\nGem::Specification.new do |s|\n s.name = 'foodcritic'\n s.version = FoodCritic:... | ruby | chosen |
[
{
"from": "system",
"value": "Use a SPDX standard license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nname 'audit'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'Apa... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"remove the runit dependency\"\n\nThis reverts commit c970574c6323d61ba71ea27e770b5b5188217344 [formerly c970574c6323d61ba71ea27e770b5b5188217344 [formerly 22f0fef602c93cdf7224d09a1d3ffbccd53ae458]].\n\n\nFormer-commit-id: 6213ab53718192e50121eff248f7cb2ad2c59444\nForme... | ruby | chosen |
[
{
"from": "system",
"value": "Fix name of Readme file\n"
},
{
"from": "human",
"value": "maintainer \"Stefan Richter\"\nmaintainer_email \"stefan@02strich.de\"\nlicense \"MIT\"\ndescription \"Installs/Configures mpd\"\nlong_description IO.read(File.join(File.di... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in SMS class\n"
},
{
"from": "human",
"value": "module Cellular\n class SMS\n\n attr_accessor :recipient, :sender, :mesage, :price, :country\n\n def initialize(options = {})\n @backend = Cellular.config.backend\n\n @recipient = options[:rec... | ruby | chosen |
[
{
"from": "system",
"value": "Update LookupById to not even run the mutation if the object isn't found, since that's what we generally want anyway.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Prelay\n module LookupById\n def self.included(base)\n base.argu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hex conversion in Serializable\n"
},
{
"from": "human",
"value": "# encoding: binary\nmodule Crypto\n # Serialization features shared across all \"key-like\" classes\n module Serializable\n def to_s; to_bytes; end\n def to_str; to_bytes; end\n\n # I... | ruby | chosen |
[
{
"from": "system",
"value": "Reorder attr readers in `DiffMatch`\n"
},
{
"from": "human",
"value": "require 'delegate'\n\nmodule SubDiff\n class DiffMatch < SimpleDelegator\n attr_reader :prefix, :suffix, :replacement\n\n alias_method :match, :__getobj__\n\n def initialize(match, repl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issues with the extract options method\n"
},
{
"from": "human",
"value": "module Webdrive\n module API\n class Client\n\n # As the auth key can change depending on IP address\n # this class will provide a writer method in case\n # your IP addr... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem version to v1.3.1\n"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = \"twitter-text\"\n s.version = \"1.3.0\"\n s.authors = [\"Matt Sanford\", \"Patrick Ewing\", \"Ben Cherry\", \"Britt Selvitelle\", \"Raffi Krikorian\"]... | ruby | chosen |
[
{
"from": "system",
"value": "Remove example description from Strip charge\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'stripe'\nrequire 'digest'\n\nStripe.api_key = ENV[\"STRIPE_API_SECRET_KEY\"]\n\nclass Cashin < Sinatra::Base\n helpers do\n def h(text)\n Rack::Utils... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test if Docker Engine is installed\n\nSigned-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\n\ndescribe \"SD card image\" do\n it \"exists\" do\n image_file = file(ima... | ruby | chosen |
[
{
"from": "system",
"value": "Update OS X deployment target in pod spec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SBObjectiveCWrapper\"\n s.version = \"0.3.0\"\n s.summary = \"Objective-C wrapper and macros around SwiftyBeaver logging framew... | ruby | chosen |
[
{
"from": "system",
"value": "suppliers: Remove validation for own product\n"
},
{
"from": "human",
"value": "class SuppliersPlugin::DistributedProduct < SuppliersPlugin::BaseProduct\n\n named_scope :from_products_joins, :joins =>\n 'INNER JOIN suppliers_plugin_source_products ON ( products.... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to update `StatisticsAnnouncement` publish intent\n\nThis rake task is required to send a `publish_intent` to the\nPublishingAPI for any existing `StatisticsAnnouncement` with a release\ndate in the future. It is a follow up commit to\nhttps://github.com/alphagov/w... | ruby | chosen |
[
{
"from": "system",
"value": "Add mime type for javascript (WEBrick does not have this defined)\n"
},
{
"from": "human",
"value": "require 'webrick/httputils'\n\nmodule YARD\n module Server\n module Commands\n class StaticFileCommand < Base\n include WEBrick::HTTPUtils\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add resource to restart nginx\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: nginx_part\n# Recipe:: deploy\n#\n# Copyright 2014, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\n\nfile \"/usr/share/nginx/html/index.html\" do\n action :... | ruby | chosen |
[
{
"from": "system",
"value": "Remove mode setting from example app.\n"
},
{
"from": "human",
"value": "dir = File.expand_path(File.dirname(__FILE__))\n$:.unshift(dir + '/../lib')\n$:.unshift(dir)\n\nrequire 'oauth2/provider'\nOAuth2::Provider.realm = 'Notes App'\nOAuth2::Provider.mode = 'develo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the client uid format\n\nSo it will match what is in the hub and therefore G5Updatable\n"
},
{
"from": "human",
"value": "ENV[\"G5_HUB_ENTRIES_URL\"] ||= case Rails.env\n when \"production\" then \"https://g5-hub.herokuapp.com\"\n when \"development\" then \"... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6782svn\n\nHandBrakeCLI Nightly v6782svn built 2015-01-21.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6752svn'\n sha256 'a9b2d95e47a72b5cd918bd3b2d8f2064cec1b5f8b96b441dabc60af63aefa4d2'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandBrakeCLI Nightly to v6469svn\n\nHandBrakeCLI Nightly Build 6469svn released 2014-10-26.\n"
},
{
"from": "human",
"value": "class HandbrakecliNightly < Cask\n version '6452svn'\n sha256 'cce4733a704bab3d0314d8950b98c2cdce4ed47e4e838727f8e996a3f5cfa537'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use hash with indifferent access."
},
{
"from": "human",
"value": "require 'savon'\nrequire 'hashie'\nrequire 'active_support/core_ext'\n\nrequire 'metaforce/version'\nrequire 'metaforce/config'\nrequire 'metaforce/job'\nrequire 'metaforce/abstract_client'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Feedback Association to Session For Later Use\n"
},
{
"from": "human",
"value": "post '/session' do\n\tuser1 = User.find_by(email: params[\"user1\"][\"email\"])\n\tuser2 = User.find_by(email: params[\"user2\"][\"email\"])\n\n\tif user1.authenticate(params[\"user... | ruby | chosen |
[
{
"from": "system",
"value": "Fix poll mailer syntax error\n"
},
{
"from": "human",
"value": "class PollMailer < ActionMailer::Base\n\n def poll_create(poll)\n send_poll_mail(poll)\n end\n\n def poll_update(poll)\n send_poll_mail(poll)\n end\n\n def poll_closing_soon(poll)\n send_p... | ruby | chosen |
[
{
"from": "system",
"value": "Use loop to avoid code repetition\n"
},
{
"from": "human",
"value": "class Notification < ApplicationRecord\n belongs_to :notification_type\n belongs_to :initiator, :class_name => User, :foreign_key => 'user_id'\n belongs_to :subject, :polymorphic => true\n belo... | ruby | chosen |
[
{
"from": "system",
"value": "Include stack trace information for instrumented methods.\n\nFixes #2.\n"
},
{
"from": "human",
"value": "require 'mongo/rails/instrumentation'\n\nmodule Mongo::Rails::Instrumentation\n class Railtie < Rails::Railtie\n initializer \"mongo.rails.instrumentation\"... | ruby | chosen |
[
{
"from": "system",
"value": "Load files before linting them. It's more logical\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nmodule ProxyPacRb\n module Cli\n # Compress proxy pac\n class CompressProxyPac < Thor::Group\n include Shared\n\n class_option :proxy_pac, type: ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with environment configuration.\n"
},
{
"from": "human",
"value": "require 'delegate'\nrequire 'hashie'\nrequire 'oj'\n\nmodule Servitude\n class EnvironmentConfiguration < Servitude::Configuration\n\n def for_env\n _config.send( _config.environme... | ruby | chosen |
[
{
"from": "system",
"value": "Remove order reference from mailMethodsController spec and fix param names\n\nConflicts:\n\n\tcore/spec/controllers/spree/admin/mail_methods_controller_spec.rb\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Spree::Admin::MailMethodsController d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix crash problem in screen for Vimeo video\n\n- Adapt to new Vimeo access specifications\n => it alos needs access to 'vimeocdn.com' now\n"
},
{
"from": "human",
"value": "class InfoScreen < PM::WebScreen\n attr_accessor :url\n\n def content\n self.url\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Tuner.logs_since returning nil for Log.all_interval\n"
},
{
"from": "human",
"value": "class Tuner < ActiveRecord::Base\n has_many :tuner_info, :dependent => :destroy\n has_many :logs\n has_many :stations, :through => :logs\n\n accepts_nested_attributes_for ... | ruby | chosen |
[
{
"from": "system",
"value": "Make it easier to override how to save the results\n"
},
{
"from": "human",
"value": "module RepositoryCheck\n class SingleRepositoryWorker\n include ApplicationWorker\n include RepositoryCheckQueue\n\n def perform(project_id)\n project = Project.find... | ruby | chosen |
[
{
"from": "system",
"value": "Update Subersion to 1.6.5, add SSL support, turn off BDB support.\n"
},
{
"from": "human",
"value": "require 'brewkit'\n\nclass SubversionDeps <Formula\n @url='http://subversion.tigris.org/downloads/subversion-deps-1.6.3.tar.bz2'\n @md5='22d3687ae93648fcecf945c045... | ruby | chosen |
[
{
"from": "system",
"value": "Load local code in development.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\n\nBundler.require(:default)\n\nrequire './app'\n\nrun Nesta::App\n"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'bundler/setup'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add path to main lib.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\n\nBundler.require\n\nrequire \"try-redis.rb\"\n\nuse Rack::Static, :urls => %w( /css /images /javascripts ), :root => \"public\"\n\nrun TryRedis\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Stop log output from being buffered\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\n\nBundler.require\n\nrequire './app'\nrun Sinatra::Application"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'bundler'\n\nBundler.r... | ruby | chosen |
[
{
"from": "system",
"value": "Remove player_id param check from CreateTurnFormObject\n"
},
{
"from": "human",
"value": "class CreateTurnFormObject\n attr_reader :coordinates, :player\n\n def initialize(params)\n @params = params\n @coordinates = extract_coordinates\n @player = params.... | ruby | chosen |
[
{
"from": "system",
"value": "Add Cucumber 1.2.0 as dependency.\n\nA change in the Cucumber formatter API must be reflected in the\nGuard Cucumber notification formatter.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'guard/cu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix log statements in Encryptable\n"
},
{
"from": "human",
"value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\n module Encryptable\n def signable_... | ruby | chosen |
[
{
"from": "system",
"value": "Handle blocks passed to functions\n\nThis means we can implement getdir and walk.\n"
},
{
"from": "human",
"value": "module Fraggle\n class Client\n\n %w{rev set get del stat}.each do |cmd|\n class_eval <<-CODE\n alias :a#{cmd} :#{cmd}\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Handle exceptions when joining sleep thread in InterruptibleSleep.\n"
},
{
"from": "human",
"value": "require 'monitor'\n\nmodule Rpush\n module Daemon\n class InterruptibleSleep\n def sleep(duration)\n @thread = Thread.new { Kernel.sleep duration }\... | ruby | chosen |
[
{
"from": "system",
"value": "Use more descriptive name for arg\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'sidekiq'\nrequire 'sidekiq/worker'\n\nrequire 'travis/logs'\n\nmodule Travis\n module Logs\n module Sidekiq\n class SendTimings\n include :... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations for Season model.\n"
},
{
"from": "human",
"value": "require 'time'\n\nclass Season < ActiveRecord::Base\n def self.for(time)\n t = nil\n case time\n when :now\n t = Time.now\n when String\n t = Time.parse(time)\n when Time\... | ruby | chosen |
[
{
"from": "system",
"value": "Use controller instance helpers proxy\n"
},
{
"from": "human",
"value": "module Whitehall\n class AbbreviationExtractor\n def initialize(edition)\n @edition = edition\n end\n\n def extract\n abbr_tags\n .map { |abbr_tag|\n {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add framework and change description of podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"LineKit\"\n s.version = \"1.4.1\"\n s.summary = \"Share to Naver Line from your apps.\"\n s.homepage = \"https://github.com... | ruby | chosen |
[
{
"from": "system",
"value": "Allow using a special ssh key that doesn't prompt for a password.\n"
},
{
"from": "human",
"value": "class JenkinsCli < Formula\n desc \"Install Jenkins CLI\"\n homepage \"https://jenkins-ci.org\"\n url \"http://mirrors.jenkins-ci.org/war/1.647/jenkins.war\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation comments for TZInfo and TZInfo::Data modules.\n\nAvoids blank pages being generated by RDoc and the licence being used as\ndocumentation by YARD.\n"
},
{
"from": "human",
"value": "#--\n# Copyright (c) 2012 Philip Ross\n# \n# Permission is hereby g... | ruby | chosen |
[
{
"from": "system",
"value": "Use remote repository for assets precompiling check\n"
},
{
"from": "human",
"value": "set(:skip_assets_precompile) do\n run_locally(\"#{source.local.log(current_revision, revision)} --oneline vendor/assets/ app/assets/ | wc -l\").to_i == 0\nend\n\nnamespace :deplo... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper methods for :any, :none and :auto\n"
},
{
"from": "human",
"value": "module RubyEventStore\n class ExpectedVersion\n POSITION_DEFAULT = -1.freeze\n NOT_RESOLVED = Object.new.freeze\n\n def self.any\n new(:any)\n end\n\n attr_reader :e... | ruby | chosen |
[
{
"from": "system",
"value": "Add backtrace to error output\n"
},
{
"from": "human",
"value": "require \"colorize\"\nrequire File.expand_path(\"../document_generator.rb\", __FILE__)\n\nmodule Rambo\n class CLI\n def initialize(raml_file=nil, stdout=STDOUT)\n @stdout = stdout\n @fil... | ruby | chosen |
[
{
"from": "system",
"value": "Test db is correctly updated\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe 'tournaments', :type => :feature do\n let(:password) { 'asdfasdf' }\n let(:admin) { create :admin, :password => password }\n let!(:tournament1) { create :to... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for weather grabber\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire_relative '../../lib/weather_grabber'\n\ndescribe WeatherGrabber, :vcr do\n \n before :all do\n @weather = WeatherGrabber.new\n end\n \n it \"should give back the last... | ruby | chosen |
[
{
"from": "system",
"value": "Update ProjectView tests to validate his new behavior\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe ProjectTotal, type: :model do\n before do\n @project_id = create(:contribution, value: 10.0, payment_service_fee: 1, state: 'pending... | ruby | chosen |
[
{
"from": "system",
"value": "Fix RSpec 3 deprecation warnings\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe PlanningCenter::Base do\n describe '#method_missing' do\n it 'delegates method calls to the attrs hash' do\n attrs = { 'id' => 123 }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change to more apprioriate description\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'puppetfiler/metadata'\n\ndescribe Puppetfiler::Metadata do\n let!(:md) {\n Puppetfiler::Metadata.new('./data/simple_metadata.json')\n }\n\n desc... | ruby | chosen |
[
{
"from": "system",
"value": "Update PhpStorm-EAP.app to version 141.332.\n"
},
{
"from": "human",
"value": "cask :v1 => 'phpstorm-eap' do\n version '141.176'\n sha256 'a5c70789db4aa13c938de761029b15b2348b0a39f7ac549eaa7c82434373caed'\n\n url \"http://download.jetbrains.com/webide/PhpStorm-EA... | ruby | chosen |
[
{
"from": "system",
"value": "Add test case for stdio.\n\nCheck that reading from / writing to pipe IO objects works. This functionality\nis being used by the UCLA folks, so it seems prudent to verify that it works.\n"
},
{
"from": "human",
"value": "require './test_common'\nrequire 'stringio' \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecated method warnings in specs\n"
},
{
"from": "human",
"value": "require 'date'\nrequire 'time'\n\nmodule Support\n module TimeTravel\n def warp_to(time)\n case time\n when String\n time = Time.parse(time)\n date = Date.new(time... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce minimum test coverage to 90%\n\nZero tolerance really means zero room for common sense. There are some\nlines that are just stupid to test; doing so would inflate the tests for\nno benefit.\n\nIn the future, we will review the coverage reports and ensure that all\nlogic ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove last_name column from User table\n\nWe are not using it.\nhttps://travis-ci.org/yuki24/did_you_mean/jobs/40365201#L76-L78\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'minitest/unit'\nrequire 'did_you_mean'\n\nbegin\n MiniTest::Test... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib to the load path\n\nThis allows us to run the test suite without `bundle exec` or run a\nsingle test without having to push lib to the load path.\n"
},
{
"from": "human",
"value": "# coding: UTF-8\nEncoding.default_internal = 'UTF-8' if defined? Encoding\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make tests run in MiniTest"
},
{
"from": "human",
"value": "$:.unshift File.dirname(__FILE__) + '/../lib'\n\nbegin\n require 'rubygems'\nrescue LoadError\nend\n\nrequire 'camping'\nrequire 'test/unit'\nrequire 'rack/test'\n\nclass TestCase < Test::Unit::TestCase\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add version information to test output.\n"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start\n\nrequire 'minitest/autorun'\nrequire 'minitest/reporters'\nrequire 'rails'\nrequire \"rails/generators/test_case\"\nrequire File.expand_path('../../lib/... | ruby | chosen |
[
{
"from": "system",
"value": "Update RSpec to ~> 2.14.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/big_decimal_helper/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Sam Livingston-Gray\"]\n gem.email =... | ruby | chosen |
[
{
"from": "system",
"value": "Move reality-naming to a later version\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nGem::Specification.new do |s|\n s.name = %q{buildr_plus}\n s.version = '1.0.0'\n s.platfo... | ruby | chosen |
[
{
"from": "system",
"value": "Raise minimum Ruby version to 1.8.7.\n\nminitest v5 is not compatible with Ruby 1.8.6.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'tzinfo-data'\n s.version = '1.2014.2'\n s.summary = 'Timezone Data for TZInfo'\n s.description = '... | ruby | chosen |
[
{
"from": "system",
"value": "Update conditions under which the orders are updated\n\nDo not destroy the shipments/inventory units for cancelled orders or orders that have shipments that have either been cancelled or are ready.\n"
},
{
"from": "human",
"value": "class DeleteInventoryUnitsWithout... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Handle deprecation in ERB.new arguments\n"
},
{
"from": "human",
"value": "require \"erb\"\n\nmodule Backup\n class Template\n # Holds a binding object. Nil if not provided.\n attr_accessor :binding\n\n ##\n # Creates a new instance of the Backup::... | ruby | chosen |
[
{
"from": "system",
"value": "Remove before/after events assigning student school years\n"
},
{
"from": "human",
"value": "class Intervention < ActiveRecord::Base\n belongs_to :student\n belongs_to :educator\n belongs_to :intervention_type\n belongs_to :school_year\n belongs_to :student_sch... | ruby | chosen |
[
{
"from": "system",
"value": "fix(models/orga): Remove useless method on the orga model\n"
},
{
"from": "human",
"value": "# Model organizations\nclass Organization < ActiveRecord::Base\n validates_presence_of :name\n validates_uniqueness_of :name\n\n has_many :teams, dependent: :destroy\n h... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that locking the bare PG connection is reentrant.\n"
},
{
"from": "human",
"value": "module Que\n class PG < Adapter\n def initialize(pg)\n @pg = pg\n @mutex = Mutex.new\n end\n\n def checkout\n @mutex.synchronize { yield @pg }\... | ruby | chosen |
[
{
"from": "system",
"value": "Use instance as parameter, not class."
},
{
"from": "human",
"value": "class RegisteredPath < ActiveRecord::Base\n\n belongs_to :provider, :polymorphic => true\n\n def has_user?\n PathRegistry.users.any? { |u| u.exists? u.path_registry.foreign_key => id }\n en... | ruby | chosen |
[
{
"from": "human",
"value": "Add General. This methods have no real home ATM\n"
},
{
"from": "gpt",
"value": "module Solusvm\n class General < Base\n def nodes(type)\n type.strip!\n validate_server_type!(type)\n perform_request(:action => 'listnodes', :type => type)\n ret... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Service::DEFAULT_SCHEMA: `consumes` and `:produces` are arrays\n"
},
{
"from": "human",
"value": "module Swarker\n class Service\n DEFAULT_SCHEMA = {\n swagger: '2.0'.freeze,\n consumes: 'application/json'.freeze,\n produces: 'application/jso... | ruby | chosen |
[
{
"from": "system",
"value": "Use Mongoid's rake task to create index\n"
},
{
"from": "human",
"value": "namespace :migrate do\n task :swap_old_tag_uniqueness_index => :environment do\n Tag.collection.drop_index('tag_id_1') # this is the generated name for the unique index of tags by tag_id\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix log output statements in print job\n"
},
{
"from": "human",
"value": "module Zebra\n class PrintJob\n class UnknownPrinter < StandardError\n def initialize(printer)\n super(\"Could not find a printer named #{printer}\")\n end\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update for changed cloud_controller_ng config path\n"
},
{
"from": "human",
"value": "require \"kato/config\"\nbegin\n AppConfig = Kato::Config.get(\"aok\").symbolize_keys\n CCConfig = Kato::Config.get(\"cloud_controller_ng\").symbolize_keys\nrescue => ex\n $stde... | ruby | chosen |
[
{
"from": "system",
"value": "Deal with further side effects of stuff done outside of a transaction in tests\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\nrequire \"external_command\"\n\ndef mailin_test(email_filename)\n Dir.chdir Rai... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the debug logger for cassettes\n"
},
{
"from": "human",
"value": "require 'vcr'\nrequire 'webmock/rspec'\n\nqt_keys = ENV['QT_KEYS'].split(',')\n\nVCR.configure do |c|\n c.cassette_library_dir = 'spec/support/cassettes'\n c.default_cassette_options = { matc... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing foreign_key config for agenda day association\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass AgendaDay < ApplicationRecord\n has_many :times, class_name: 'AgendaTime', inverse_of: :day,\n dependent: :destroy\... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependent destroy to locations for soundtreks so that pins do not show up on the map when a user deletes soundtrek\n"
},
{
"from": "human",
"value": "class SoundTrek < ApplicationRecord\n validates :location_id, :title, presence: true\n belongs_to :trekker, cl... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to include credit for @ayaman & @prokizzle"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"realtime/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Speci... | ruby | chosen |
[
{
"from": "system",
"value": "Update gir_ffi and gir_ffi-gtk to 0.14.0\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nGem::Specification.new do |s|\n s.name = 'atspi_app_driver'\n s.version = '0.4.0'\n\n s.summary = 'Test GirFFI-based applications using Atspi'\n s.requir... | ruby | chosen |
[
{
"from": "system",
"value": "Add httparty as a runtime 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 'evalso/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add indexes to Attendees for some important performance. That table's gonna be biiiiiig.\n"
},
{
"from": "human",
"value": "class CreateAttendees < ActiveRecord::Migration\n def self.up\n create_table :attendees do |t|\n t.references :member\n t.refere... | ruby | chosen |
[
{
"from": "system",
"value": "Add flag to compile as C99.\n\nBecause screw C89.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby -w\n# This file is part of ruby-snowmath.\n# Copyright (c) 2013 Noel Raymond Cower. All rights reserved.\n# See COPYING for license details.\n\nrequire 'mkmf'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove packaged build directory prior to installation\n"
},
{
"from": "human",
"value": "require 'mkmf'\nrequire 'fileutils'\nrequire 'rbconfig'\nhost_os = RbConfig::CONFIG['host_os']\n\nunless find_executable('cmake')\n $stderr.puts \"\\n\\n\\n[ERROR]: cmake is re... | ruby | chosen |
[
{
"from": "system",
"value": "Convert to spaces in capacity controller\n"
},
{
"from": "human",
"value": "class CapacitiesController < ApplicationController\n\n\tdef new\n\t\t@project = Project.find(params[:project_id])\n\tend\n\n def create\n capacity = current_account.capacities.create(cap... | ruby | chosen |
[
{
"from": "system",
"value": "Convert show action to not use inherited_resources\n"
},
{
"from": "human",
"value": "class NodeTypesController < ApplicationController\n inherit_resources\n\n actions :show\n\n def index\n @node_types = NodeType.all\n\n respond_to do |format|\n format... | ruby | chosen |
[
{
"from": "system",
"value": "Add SDG local targets to development seeds\n"
},
{
"from": "human",
"value": "section \"Creating Sustainable Development Goals\" do\n load Rails.root.join(\"db\", \"sdg.rb\")\nend\n"
},
{
"from": "gpt",
"value": "section \"Creating Sustainable Developme... | ruby | chosen |
[
{
"from": "system",
"value": "Add method name to test name.\n\nAdds encode_ or decode_ as a prefix to all tests depending on the method\nbeing tested.\n\nThis fixes a name collision bug between:\ndef test_empty_string for encode\nand\ndef test_empty_string for decode\n"
},
{
"from": "human",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Set default trap functions same as CRuby\n"
},
{
"from": "human",
"value": "Signal.list.each do |sig, no|\n case sig\n when \"INT\"\n Signal.trap(sig) { raise Interrupt, \"\" }\n end\nend\n"
},
{
"from": "gpt",
"value": "Signal.list.each do |sig, n... | ruby | chosen |
[
{
"from": "system",
"value": "Use display:none to to hide secondardy contact, instead of visibility:hidden"
},
{
"from": "human",
"value": "module AddressHelper\n\n def hidden_tr_if(condition, attributes = {})\n attributes[\"style\"] = \"visibility:hidden;\" if condition\n attrs = tag_opt... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.