conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Move remote_ids into its own method so apps can create their own queries if they like\n"
},
{
"from": "human",
"value": "module SocialLogin\n module ActsAsSocialUser\n extend ActiveSupport::Concern\n\n included do\n\n def friends_that_use_the_app\n ... | ruby | chosen |
[
{
"from": "human",
"value": "[TAV-346] Add a rake task to delete embedded runs.\n\nCleans up all completed embedded runs.\n"
},
{
"from": "gpt",
"value": "namespace :taverna_player do\n desc \"Delete all completed embedded workflow runs.\"\n task :delete_completed_embedded_runs => :environment... | ruby | chosen |
[
{
"from": "system",
"value": "Add message about how to submit request for apt whitelist\n"
},
{
"from": "human",
"value": "require 'travis/build/addons/base'\n\nmodule Travis\n module Build\n class Addons\n class AptPackages < Base\n SUPER_USER_SAFE = true\n\n def after_pr... | ruby | chosen |
[
{
"from": "system",
"value": "Update Rubygems specification after transfer\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'vagrant_cloud'\n s.version = '1.1.0'\n s.summary = 'HashiCorp Atlas API client'\n s.description = 'Minimalistic ruby client f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix placement of gem require\n"
},
{
"from": "human",
"value": "$: << File.expand_path(File.join(__FILE__, '../../support/rails/lib'))\n\nrequire \"ember_devise_simple_auth/engine\"\n\nmodule EmberDeviseSimpleAuth\nend\n\n"
},
{
"from": "gpt",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is incremented from patch number 0.1.4 to 0.1.5\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'telemetry-logger'\n s.version = '0.1.4'\n s.summary = 'Logging to STDERR with coloring and leve... | ruby | chosen |
[
{
"from": "system",
"value": "Add runtime dependency to thor\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'upstream/tracker/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to check that the callback is called correctly.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe ActivitySessionsController, type: :controller do\n\n\n\n let!(:activity) { create(:activity) }\n let!(:classroom) { create(:classroom)}\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make method public so it can be used in an observer\n"
},
{
"from": "human",
"value": "module AfterCommitQueue\n extend ActiveSupport::Concern\n\n included do\n after_commit :_run_after_commit_queue\n after_rollback :_clear_after_commit_queue\n end\n\n pro... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare directory before creating chroot tree\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nmodule Akabei\n class ChrootTree\n def initialize(root, arch)\n @root = Pathname.new(root)\n @arch = arch\n end\n\n BASE_PACKAGES = %w[base bas... | ruby | chosen |
[
{
"from": "system",
"value": "Handle divergent JRuby logic in test\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'minitest/pride'\nrequire 'vcr'\nrequire_relative '../lib/vacuum'\n\nVCR.configure do |c|\n c.hook_into :excon\n c.cassette_library_dir = 'test/cassettes'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Improve Plist Acknowledgements unit testing a little\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../../spec_helper\", __FILE__)\n\ndescribe Pod::Generator::Plist do\n before do\n @podfile = Pod::Podfile.new do\n platform :ios\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for `.module.es6` with sprockets 3\n\nIt is too strict to content type.\n"
},
{
"from": "human",
"value": "require 'ember/es6_template/version'\n\nrequire 'sprockets'\nrequire 'babel/transpiler'\n\nmodule Ember\n module ES6Template\n case Sprockets::VERSION\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec to expect all variants instead of only ones with option_values\n"
},
{
"from": "human",
"value": "\nrequire 'spec_helper'\n\ndescribe Spree::ProductsController, type: :controller do\n let!(:product) { create(:product) }\n let!(:variant) { create(:master_v... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in Serf Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'serf' do\n version '0.6.4'\n sha256 '8f1cd3... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak the cron job for the nagios heartbeat\n\n\nFormer-commit-id: f1df6c478f62b9bf6f2526c176ef225d07b2c863 [formerly 2f27ef241098d754005e40498259303876d2497c] [formerly 972bf819f651da59f633e2e82084dc136fd48692 [formerly a1d0fa0644b4cd0ffb88e7361a1adbbbb8b24612 [formerly 96715a... | ruby | chosen |
[
{
"from": "system",
"value": "Remove accessors in favour of nil object for forms\n"
},
{
"from": "human",
"value": "module GiveyRails\n class User\n include GiveyModel\n\n attr_accessor :email, :password, :givey_tag, :password_confirmation, :remember_me\n\n #validates_presence_of :emai... | ruby | chosen |
[
{
"from": "system",
"value": "Correct alphabetical ordering of fields on WebContentItem\n"
},
{
"from": "human",
"value": "fields = %i{\n id\n analytics_identifier\n content_id\n description\n details\n document_type\n first_published_at\n last_edited_at\n need_ids\n phase\n public_up... | ruby | chosen |
[
{
"from": "system",
"value": "Reformat min key spec for consistency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire \"spec_helper\"\n\ndescribe BSON::MinKey do\n\n describe \"#as_json\" do\n\n let(:object) do\n described_class.new\n end\n\n it \"returns the binary da... | ruby | chosen |
[
{
"from": "system",
"value": "Add = to runit version constraint\n"
},
{
"from": "human",
"value": "name \"private-chef\"\nmaintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription \"Installs and configures Chef Server fr... | ruby | chosen |
[
{
"from": "system",
"value": "Use klass.translates? per clemens suggestion.\n"
},
{
"from": "human",
"value": "require 'active_record/serializers/xml_serializer'\n\nActiveRecord::XmlSerializer::Attribute.class_eval do\n def compute_type_with_translations\n klass = @serializable.class\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Remove IDE image upload spec\n\nCloses https://gitlab.com/gitlab-org/gitlab-ce/issues/45045\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'Multi-file editor upload file', :js do\n let(:user) { create(:user) }\n let(:project) { create(:project... | ruby | chosen |
[
{
"from": "system",
"value": "Fix array element indentation in spec\n\nChange-Id: I1fa1332fa682e0ce0521ffdf10cfbe03bf53dbb8\nReviewed-on: http://gerrit.causes.com/37394\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a40... | ruby | chosen |
[
{
"from": "system",
"value": "Test uses the store's cache, rather than creating an independant cache object\n"
},
{
"from": "human",
"value": "require_relative './store_init'\n\ndescribe \"Get Entity Using the Immediate Refresh Policy\" do\n stream_name = EventStore::EntityStore::Controls::Writ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify podspec to allow non-arc and ios 6\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ImageFormatInspector\"\n s.version = \"0.1.0\"\n s.summary = \"Inspect NSData to figure out its image format.\"\n s.homep... | ruby | chosen |
[
{
"from": "system",
"value": "Use actual exceptions for handler errors\n"
},
{
"from": "human",
"value": "require 'eventmachine'\n\nmodule OSC\n Channel = EM::Channel.new\n\n class Connection < EventMachine::Connection\n def receive_data(data)\n ip_info = get_peername[2,6].unpack(\"nC4... | ruby | chosen |
[
{
"from": "system",
"value": "Hide httparty & httparty= methods from Gitlab.actions - just like endpoint, private_token, etc.\n"
},
{
"from": "human",
"value": "require 'gitlab/version'\nrequire 'gitlab/objectified_hash'\nrequire 'gitlab/configuration'\nrequire 'gitlab/error'\nrequire 'gitlab/re... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation from Country call\n"
},
{
"from": "human",
"value": "require 'countries/version'\n\nrequire 'iso3166'\n\nrequire 'countries/mongoid' if defined?(Mongoid)\n\nclass Country < ISO3166::Country\n def to_s\n warn \"[DEPRECATION] `Country` is deprec... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify that this file must be required.\n"
},
{
"from": "human",
"value": "module RSpec\n module Core\n # A sandbox isolates the enclosed code into an environment that looks 'new'\n # meaning globally accessed objects are reset for the duration of the\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Define COUNTRIES constant with Sweden mapping."
},
{
"from": "human",
"value": "require 'klarna/version'\nrequire 'klarna/client'\nrequire 'klarna/configuration'\nrequire 'klarna/connection'\n\nmodule Klarna\n def self.configure\n yield configuration if block_gi... | ruby | chosen |
[
{
"from": "system",
"value": "Add a message to warn users about the deprecation"
},
{
"from": "human",
"value": "`Opal.exit = process.exit`\n\nmodule Kernel\n NODE_REQUIRE = `require`\n\n def caller(*args)\n %x{\n var stack;\n try {\n var err = Error(\"my error\");\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve task which remove consecutive blank lines\n"
},
{
"from": "human",
"value": "namespace :whitespace do\n desc 'Removes trailing whitespace'\n task :cleanup do\n sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`;\n do cat... | ruby | chosen |
[
{
"from": "system",
"value": "Update TwitterPagination class for new will_paginate\n\nAnd just as a side note, \"Wow\" at the new will_paginate. Made this stupid-easy."
},
{
"from": "human",
"value": "# Modified from flow_pagination gem\nmodule TwitterPagination\n\n # TwitterPagination renderer... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - split the bill\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/split-the-bill/\n# --- iteration 1 ---\ndef split_the_bill(x)\n avg = (x.values.reduce(:+)).fdiv(x.keys.size)\n x.each { |k, v| x[k] = (v - avg).round(2) }\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Update description used in generator"
},
{
"from": "human",
"value": "module EnumerateIt\n module Generators\n class EnumGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n\n argument :attributes, type: '... | ruby | chosen |
[
{
"from": "human",
"value": "Add Arabic font Kacst One\n\nfrom Arabeyes project\n"
},
{
"from": "gpt",
"value": "class FontKacstone < Cask\n url 'http://downloads.sourceforge.net/project/arabeyes/kacst_fonts/kacst_one_5.0.tar.bz2'\n homepage 'http://projects.arabeyes.org/project.php?proj=Khoto... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Intellij IDEA to 14.1.4\n\nSigned-off-by: Koichi Shiraishi <41a18128582fec5418c0a92661f7d4b13d21d912@gmail.com>\n"
},
{
"from": "human",
"value": "cask :v1 => 'intellij-idea' do\n version '14.1.3'\n sha256 'a7045dd58a6d632724a0444b46b71de55ee237a8f8fa31aa9... | ruby | chosen |
[
{
"from": "system",
"value": "Use school id rather than school object\n"
},
{
"from": "human",
"value": "module Alerts\n class CollateBenchmarkData\n def perform(schools = School.process_data)\n benchmarks = {}\n\n latest_run = BenchmarkResultGenerationRun.order(created_at: :desc).... | ruby | chosen |
[
{
"from": "system",
"value": "Use new context in dynamic spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Ladder::Resource::Dynamic do\n before do\n class Thing\n include Ladder::Resource::Dynamic\n end\n end\n\n after do\n Object.send(:remove_const, 'Th... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure each host has all options.\n"
},
{
"from": "human",
"value": "namespace :capistrano do\n after 'deploy:finalize_update', 'capistrano:write_roles'\n after 'deploy:finalize_update', 'capistrano:write_servers'\n\n desc 'Write roles config file'\n task :wr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dependency on httpclient gem\n"
},
{
"from": "human",
"value": "\nGem::Specification.new do |s|\n\n s.name = 'flack'\n\n s.version = File.read(\n File.expand_path('../lib/flack.rb', __FILE__)\n ).match(/ VERSION *= *['\"]([^'\"]+)/)[1]\n\n s.platform =... | ruby | chosen |
[
{
"from": "system",
"value": "Update Bitwig Studio cask to 1.3.5\n\nAdd Bitwig Studio auto_updates stanza\n"
},
{
"from": "human",
"value": "cask 'bitwig-studio' do\n version '1.3.3'\n sha256 '6d614095b1b39e387ed4c96a70342c5d982a6d4a5c71e6a4498f25b7898b909b'\n\n url \"https://downloads.bitwig... | ruby | chosen |
[
{
"from": "human",
"value": "Add 'rutty scp' tests file\n"
},
{
"from": "gpt",
"value": "require 'helper'\n\nclass TestActionSCP < Test::Unit::TestCase\n context \"The 'rutty scp' action\" do\n setup { ensure_fresh_config! }\n teardown { clean_test_config! }\n \n end\nend\n "
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for club model\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Club do\n skip \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Club do\n let(:creator... | ruby | chosen |
[
{
"from": "system",
"value": "Add required packages to build nokogiri.\n"
},
{
"from": "human",
"value": "include_recipe 'cron'\n# install gem backup with options --no-ri --no-rdoc before include_recipe 'backup'\ngem_package 'backup' do\n version node['backup']['version'] if node['backup']['ver... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify link :app, to link\n"
},
{
"from": "human",
"value": "class Gitbox < Cask\n url 'http://d1oa71y4zxyi0a.cloudfront.net/gitbox-1.6.2-ml.zip'\n homepage 'http://gitboxapp.com/'\n version '1.6.2'\n sha1 '20fdea01bf3b26f6ba23fa2b909a7d56cddb6250'\n link :ap... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for endpoint building\n"
},
{
"from": "human",
"value": "module Blocktrain\n describe Client do\n\n let(:query) {\n JSON.parse File.read 'spec/support/fixtures/query.json'\n }\n\n it 'performs a search', :vcr do\n expect(described_class.... | ruby | chosen |
[
{
"from": "system",
"value": "Add optional arg include_private to TINAMI.method_missing\n"
},
{
"from": "human",
"value": "require 'tinami/client'\nrequire 'tinami/configuration'\nrequire 'tinami/version'\n\nmodule TINAMI\n extend TINAMI::Configuration\n\n # Alias for TINAMI::Client.new\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add description to avoid bundler throwing exception during install\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'acapi/version'\n\nGem::Specification.... | ruby | chosen |
[
{
"from": "system",
"value": "Update .podspec version to 4.2.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n\n spec.name = \"EliteFramework\"\n spec.version = \"4.0.1\"\n spec.summary = \"UI and NS extended, write shortcode do more.\"\n spec.homepage = \"https://github.com/Lif... | ruby | chosen |
[
{
"from": "human",
"value": "Add test 'can register owned keys for a specific object'\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\ndescribe 'Redis::Breadcrumb' do\n before do\n Redis::Breadcrumb.redis = MockRedis.new\n end\n\n it 'can register owned keys for a specific object'... | ruby | chosen |
[
{
"from": "system",
"value": "Add metrics listing to metrics controller when no metric given\n\nLogic and API RESTfulness to follow\n"
},
{
"from": "human",
"value": "class MetricsController < ApplicationController\n\tinclude Layouts::ApplicationLayoutHelper\n\n\tSTART = 60*60*3\n\tSTOP = 0\n\t... | ruby | chosen |
[
{
"from": "system",
"value": "Add permissions check when submitting sources form\n"
},
{
"from": "human",
"value": "class SourcesController < ApplicationController\n expose(:sources) { Source.order(:name) }\n expose(:source)\n\n expose(:ordered_sources) do\n {\n email_rank: Source.ord... | ruby | chosen |
[
{
"from": "system",
"value": "Set New Relic to only run on prod\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.require\n\n# setup environment variables\nrequire 'dotenv'\nDotenv.load\n\n# setup load paths\n$: << File.expand_path('../', __FILE__)\n$: << File.expand_path('../lib', _... | ruby | chosen |
[
{
"from": "human",
"value": "Add scope for get variant data\n"
},
{
"from": "gpt",
"value": "Spree::Variant.class_eval do\n\n scope :complete_order, -> { joins(:orders).where.not(spree_orders: { completed_at: nil }) }\n\n def self.sales_sku\n select(\"spree_variants.id, spree_variants.sku, ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old comments from gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n#lib = File.expand_path('../lib/', __FILE__)\n$:.push File.expand_path(\"../lib\", __FILE__) #lib unless $:.include?(lib)\nrequire 'has_magic_columns/version'\n\nGem::Spec... | ruby | chosen |
[
{
"from": "system",
"value": "Add NULL_VALUE constant in GetGpa class\n"
},
{
"from": "human",
"value": " class CodeclimateCi::GetGpa\n def initialize(api_requester, branch)\n @api_requester, @branch = api_requester, branch\n end\n\n def gpa\n retry_count.times do\n re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bugs in dummy weather app\n"
},
{
"from": "human",
"value": "require 'sinatra'\n\n# dumblib\nclass App\n @@text_id = nil\n def self.text_id *args\n if args.empty?\n @@text_id\n else\n @@text_id = args.first\n end\n end\nend\n\nmodule Dumbst... | ruby | chosen |
[
{
"from": "system",
"value": "Change name to avoid RubyGems conflict\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'imgur/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Set minimum iOS version on `platform` in the podspec file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"TreasureData-iOS-SDK\"\n s.version = \"0.1.17\"\n s.summary = \"TreasureData SDK for iOS.\"\n s.license = \"Apac... | ruby | chosen |
[
{
"from": "system",
"value": "Install 'hub' from community package\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: git\n# Recipe:: default\n#\n# Copyright (C) 2013 Logan Koester\n# \n# All rights reserved - Do Not Redistribute\n#\n\ninclude_recipe 'pacman'\n\npackage('git') { action :ins... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new format for notifies\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: ubuntu\n# Recipe:: default\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure resource name is unique on each loop run\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: swap_device\n# Recipe:: default\n#\n# Copyright (C) 2013 EverTrue, Inc.\n#\n# All rights reserved - Do Not Redistribute\n#\n\nrequire 'chef/mixin/shell_out'\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Add more development packages for SmartOS\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: build-essential\n# Recipe:: smartos\n#\n# Copyright 2008-2013, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Bundler 1.2.5 for Ruby 1.0.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\n\nrequire 'justice/version'\n\nGem::Specification.new do |s|\n s.name = 'justice'\n s.version = Justice::V... | ruby | chosen |
[
{
"from": "system",
"value": "Update schema information for site when update tenant name\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass AddTenantNameToSites < ActiveRecord::Migration[5.1]\n def change\n add_column(:sites, :tenant_name, :string)\n add_index(:site... | ruby | chosen |
[
{
"from": "system",
"value": "Update to support any 3.x version of rspec\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'version'\n\nGem::Specification.new do |spec|\n spec.name = \"yertle_... | ruby | chosen |
[
{
"from": "system",
"value": "Improve a bit the message of DuplicateCaseCondition\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Lint\n # This cop checks that there are no repeated conditions\n # used in case 'when' expressi... | ruby | chosen |
[
{
"from": "system",
"value": "Switch validation error to StandardError\n"
},
{
"from": "human",
"value": "require 'httparty'\nrequire 'json'\n\nmodule SlackbotFrd\n module SlackMethods\n module ValidateSlack\n def self.response(response)\n if response['ok']\n response\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move everything into autoloads that can be.\n"
},
{
"from": "human",
"value": "require \"ruby_hue/version\"\nrequire \"ruby_hue/client\"\nrequire \"ruby_hue/model\"\nrequire \"ruby_hue/light\"\nrequire \"ruby_hue/light/basic_state\"\nrequire \"ruby_hue/light/state\"... | ruby | chosen |
[
{
"from": "system",
"value": "Change bundler version spec in Gemfile\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'scss_toolkit_rails/version'\n\nGem::Specification.new do |spec|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update sha256 for ScanSnap Manager\n"
},
{
"from": "human",
"value": "class ScansnapManager < Cask\n url 'http://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV62L10WW.dmg'\n homepage 'http://www.fujitsu.com/global/support/computing/peripheral/s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove LadderHelper::dynamic chunk; default to 1000 docs/chunk\n"
},
{
"from": "human",
"value": "#\n# Static class for helper methods\n# FIXME: refactor these into the appropriate classes if possible\n#\n\nclass LadderHelper\n\n def self.dynamic_chunk(klass_or_col... | ruby | chosen |
[
{
"from": "system",
"value": "Set the column default after the data migration…\n\nThis makes it so that the table isn’t locked during\nthe slow data migration (about 15 seconds or so)"
},
{
"from": "human",
"value": "class ChangeDescriptionColumnTypes < ActiveRecord::Migration\n def change\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Make it easier to require all of RTrail\n"
},
{
"from": "gpt",
"value": "[\n 'api',\n 'case',\n 'client',\n 'entity',\n 'exceptions',\n 'plan',\n 'project',\n 'result',\n 'run',\n 'suite',\n 'test'\n].each do |file|\n require_relative \"rtrail/#{file}\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use the mysql gem required for testing\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"transam_spatial/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Improve version reference for Faraday\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"omniauth-teamsnap/version\"\n\nGem::Specification.new do |spec|\n spec.name = \"omniauth-teamsnap\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade PromiseKit dependency to '~> 3.2.1'\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SwiftlySalesforce\"\n s.version = \"2.0.0\"\n s.summary = \"An easy-to-use framework for rapid development of native iOS... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for publisher validation\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Citygram::Models::Publisher do\n it 'has many subscriptions' do\n type = Publisher.association_reflections[:subscriptions][:type]\n expect(type).to eq :one_... | ruby | chosen |
[
{
"from": "system",
"value": "Return html nokogiri objects back\n"
},
{
"from": "human",
"value": "require '../stock_trend'\n\ndescribe StockTrend do\n\n let(:s) { StockTrend.new }\n\n # check google finance url\n it 'should have the google url' do\n webpage = 'https://www.google.com/finan... | ruby | chosen |
[
{
"from": "system",
"value": "Use string instead of regexp\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'ttnt/test_to_code_mapping'\n\nmodule TTNT\n class IntegrationTest < TTNT::TestCase\n def test_saving_anchored_commit\n anchored_sha = @repo.head.target_id\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.3.0 to 0.3.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.3.0'\n s.summary = 'HTTP Client for EventStore'\n s.description = '... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing depend for sdl_mixer\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass ChocolateDoom <Formula\n url 'http://downloads.sourceforge.net/project/chocolate-doom/chocolate-doom/1.2.1/chocolate-doom-1.2.1.tar.gz'\n homepage 'http://www.chocolate-... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra output in system tests\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\n# Set up ApplicationSystemTestCase system tests.\nclass ApplicationSystemTestCase < ActionDispatch::SystemTestCase\n driven_by :seleni... | ruby | chosen |
[
{
"from": "system",
"value": "Add FactoryGirl helpers to tests\n"
},
{
"from": "human",
"value": "require 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Configure Mocha to prevent stubbing of non-existent methods\n\nStubbing non-existent methods can lead to tests which don't test the real\ninteractions between objects. Dangerous!\n"
},
{
"from": "human",
"value": "\nENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand... | ruby | chosen |
[
{
"from": "system",
"value": "Update to remedy after upgrade to 0.36.1 of cocoapods\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"TilllessBCScanner\"\n s.version = \"0.0.2\"\n s.summary = \"TBarcodeScannerViewController suitable for working... | ruby | chosen |
[
{
"from": "system",
"value": "Add headers to avoid error.\n"
},
{
"from": "human",
"value": "# require \"benchmark_email_api/version\"\nrequire \"net/http\"\nrequire \"net/https\"\nrequire \"openssl\"\nrequire \"xmlrpc/client\"\n\nmodule BenchmarkEmailApi\n class Client\n def initialize(user... | ruby | chosen |
[
{
"from": "system",
"value": "[FileList] Remove unnecessary monkey patch and move definition of Pod::FileList\n"
},
{
"from": "human",
"value": "if RUBY_VERSION >= \"1.9\"\n require 'rake/file_list'\nelse\n require 'rake'\nend\n\n# This makes Rake::FileList usable with the Specification attrib... | ruby | chosen |
[
{
"from": "system",
"value": "Apply some Sandi Metz rules for refactoring\n\n* a lot more readable now :-)\n* spefically the paragraph below from\n http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers\n is relevant:\n\n \"Having only one line per branch urged us to use well-nam... | ruby | chosen |
[
{
"from": "system",
"value": "Update CMake documentation (3.7.0, 3.6.3, 3.5.2)\n"
},
{
"from": "human",
"value": "module Docs\n class Cmake < UrlScraper\n self.name = 'CMake'\n self.type = 'sphinx_simple'\n self.links = {\n home: 'https://cmake.org/',\n code: 'https://cmake.o... | ruby | chosen |
[
{
"from": "system",
"value": "Create each table in a separate method\n\nSRP\n"
},
{
"from": "human",
"value": "require 'sequel'\n\nmodule Feed2Email\n class Database\n attr_reader :connection\n\n def initialize(connect_options)\n setup_connection(connect_options)\n setup_schema\... | ruby | chosen |
[
{
"from": "system",
"value": "Add some validations for the Robot\n"
},
{
"from": "human",
"value": "# lib/frecon/models/robot.rb\n#\n# Copyright (C) 2014 Christopher Cooper, Sam Craig, Tiger Huang, Vincent Mai, Sam Mercier, and Kristofer Rye\n#\n# This file is part of FReCon, an API for scouting... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded method and call to Sanitize::array\n"
},
{
"from": "human",
"value": "require 'honey_format/columns'\n\nmodule HoneyFormat\n # Represents a header\n class Header\n attr_reader :column_names\n\n # @return [Header] a new instance of Header.\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add noop mutator for Rubinius::AST::Self\n"
},
{
"from": "gpt",
"value": "module Mutant\n class Mutator\n # Mutator for Rubinius::AST::Self \n class Self < Mutator\n\n handle(Rubinius::AST::Self)\n \n private\n\n # Emit mutations\n #\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix problem with level calculation in Bookmark\n"
},
{
"from": "human",
"value": "module PDF\n class Reader\n class Bookmark\n attr_reader :title, :children, :page_number\n\n def initialize(object)\n @children = []\n @title = object[:Titl... | ruby | chosen |
[
{
"from": "system",
"value": "Change json parser to check for 'application/json' not 'json'\n"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'json'\nrequire 'smartsheet/api/faraday_adapter/faraday_response'\n\nmodule Smartsheet\n module API\n module Middleware\n # Wraps res... | ruby | chosen |
[
{
"from": "system",
"value": "Replace module_name attribute with header_mappings_dir.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'POSLMDB'\n s.version = '0.9.22'\n s.license = 'MIT'\n s.summary = 'Cocoapod for LMDB.'\n s.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Add default to user notifications\n"
},
{
"from": "human",
"value": "Sequel.migration do\n change do\n create_table :user_notifications do\n foreign_key :user_id, :users, type: :uuid, null: false, on_delete: :cascade, primary_key: true\n String :notifi... | ruby | chosen |
[
{
"from": "system",
"value": "Use version 1.3.9 of cloud watch installer as its broken in newer release\n"
},
{
"from": "human",
"value": "default[:logs][:region] = 'eu-west-1'\ndefault[:logs][:symfony] = true\ndefault[:logs][:apache] = true\ndefault[:logs][:symfony_datetime] = '[%Y-%m-%d %H:%M:... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.