conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use `File` instead of `StringIO`.\n"
},
{
"from": "human",
"value": "module BrickFTP\n module Utils\n class ChunkIO\n include Enumerable\n\n attr_reader :io, :chunk_size\n\n # Wrap IO object.\n #\n # @param [IO] io an IO object.\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Remove remaining traces of LOG_DIR var\n"
},
{
"from": "human",
"value": "module ChatopsDeployer\n WORKSPACE = ENV['DEPLOYER_WORKSPACE'] || '/var/www'\n DEPLOYER_HOST = ENV['DEPLOYER_HOST'] || '127.0.0.1.xip.io'\n NGINX_SITES_ENABLED_DIR = ENV['NGINX_SITES_ENABLE... | ruby | chosen |
[
{
"from": "system",
"value": "Use Pliny::Metrics.count instead of assuming l2met\n"
},
{
"from": "human",
"value": "module Pliny::Sidekiq::Middleware\n module Server\n class Log\n def initialize(metric_prefix: nil)\n @metric_prefix = metric_prefix\n end\n\n def call(wor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken test for rendering @login_path\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n\nclass UsersLoginTest < ActionDispatch::IntegrationTest\n def setup\n login = LoginPage.instance\n @login_path = \"/\"+login.slug+\"-\"+login.id\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix that loading the message descriptor grammar file only worked from certain working directories\n"
},
{
"from": "human",
"value": "module Protopuffs\n\n # The Protopuffs::Parser module holds wrapper classes that parse input\n # strings using Treetop. They also s... | ruby | chosen |
[
{
"from": "system",
"value": "[Sass] Convert Sass::Tree::MixinDefNode docs to YARD.\n"
},
{
"from": "human",
"value": "module Sass\n module Tree\n class MixinDefNode < Node\n def initialize(name, args, options)\n @name = name\n @args = args\n super(options)\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add color providers to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DMHeatmap\"\n s.version = \"1\"\n s.summary = \"An MKMapView overlay to visualize location data\"\n s.homepage = \"https://github.com/datami... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the table of contents from listing pages\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# LinuxFr Flavored Truncator\n#\nclass LFTruncator < HTML_Truncator\n DEFAULT_OPTIONS = { :ellipsis => \"[...](suite)\", :length_in_chars => false }\n\n def self.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove poshgit from unit tests\n"
},
{
"from": "human",
"value": "RSpec.describe 'chefdk_bootstrap::git' do\n context 'On a Windows machine' do\n include_context 'windows_2012'\n\n it 'installs the correct version of Git' do\n expect(windows_chef_run).to... | ruby | chosen |
[
{
"from": "human",
"value": "Create an XCode Project from the commandline.\n"
},
{
"from": "gpt",
"value": "require 'xcodeproj'\nrequire 'trollop'\n\nopts = Trollop::options do\n opt :name, \"The name of the project\", type: String \nend\n\nname = opts[:name]\n\nTrollop::die :name, \"name must... | ruby | chosen |
[
{
"from": "system",
"value": "Define rspec version - tests don't work with rspec 3+\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/puppet-parse/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Johan van den Dorpe\"]\... | ruby | chosen |
[
{
"from": "system",
"value": "Change NSIndexPath to IndexPath in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'CascadingTableDelegate'\n s.version = '1.2.0'\n s.summary = 'A no-nonsense way to write cleaner `UITableViewDelegate` and ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Pinegrow Web Designer.app to verion 2.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'pinegrow-web-designer' do\n version :latest\n sha256 :no_check\n\n # amazonaws.com is the official download host per the vendor homepage\n url 'https://pinegrow.s3.ama... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Clean up file finder spec since it no longer scans for class keyword match\"\n\nThis reverts commit 57d28a47210f561daf6c0fe4184bb012cef92063.\n"
},
{
"from": "human",
"value": "require 'fileutils'\nrequire 'abcing/class_file_finder'\n\ndescribe ABCing::Clas... | ruby | chosen |
[
{
"from": "human",
"value": "[GemTasks] Add a basic spec that the relevant tasks are installed\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"require 'bundler/gem_tasks'\" do\n before :each do\n bundled_app(\"foo.gemspec\").open(\"w\") do |f|\n f.write <<-GEMSPEC... | ruby | chosen |
[
{
"from": "system",
"value": "Fix repo max version spec work for the foreseeable future.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"Pod::Command::Repo\" do\n extend SpecHelper::Command\n\n before do\n @command = command('repo'... | ruby | chosen |
[
{
"from": "system",
"value": "Remove excess quotes, they are in the method now\n"
},
{
"from": "human",
"value": "module Impasta\n class MissingMethod < ::NoMethodError\n def initialize spy, parent_exception\n @spy, @parent_exception = spy, parent_exception\n @secrets = spy.impasta... | ruby | chosen |
[
{
"from": "system",
"value": "Change minimum version to iOS 9\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n\n spec.name = \"Raccoon\"\n spec.version = \"0.2.0\"\n spec.summary = \"A nice Alamofire serializer that convert JSON into CoreData or Realm objects.\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor TracedMethod to defer const_lookup somewhat"
},
{
"from": "human",
"value": "require 'thread'\n\nmodule SLG\n module Meta\n class TracedMethod\n attr_reader :base, :method, :type, :call_count\n\n def self.for(method_id_string)\n method_... | ruby | chosen |
[
{
"from": "system",
"value": "Update the homepage url in the gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/opal/jquery/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'opal-jquery'\n s.version = Opal::JQuery::V... | ruby | chosen |
[
{
"from": "system",
"value": "Allow proper loading of failed Bencoded data\n\nWhen returned with a failure of a response, originally this will raise a\nMalformedResponseError well, erroneously. The response is proper, and\nshould carry on to raise the next error later, for proper debugging\npurposes.\n"
}... | ruby | chosen |
[
{
"from": "system",
"value": "Make writing word search to file actually work\n"
},
{
"from": "human",
"value": "module WordSearch\n class Plane\n class Base < Hash\n include ActiveModel::Validations\n\n attr_accessor :x, :y, :catalog\n\n validates :x, :y, numericality: { great... | ruby | chosen |
[
{
"from": "system",
"value": "Revert to being more generalised\n"
},
{
"from": "human",
"value": "namespace :iso do\n namespace :maintenance do\n task :repair_image_permissions => :environment do\n bucket = $s3_client.buckets.find(ENV['S3_BUCKET'])\n to_fix = []\n Photograph.f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SHA2 mismatch for Cyberduck 4.5.2.\n\nError: SHA2 mismatch\r\nExpected: 94afaf396b4fddfb1bacbe9a8f648492949dde437579be273c0a752470d577c1\r\nActual: cff337f880b6ebbcc7f2e246b677fa5346fd225ae83289dca71ab35cf4b6eb8f\r\nArchive: /Library/Caches/Homebrew/cyberduck-4.5.2.zip"
}... | ruby | chosen |
[
{
"from": "system",
"value": "Update Cask: Textadept 6.0 beta 3.\n"
},
{
"from": "human",
"value": "class Textadept < Cask\n url 'http://foicica.com/textadept/download/textadept_5.4.osx.zip'\n homepage 'http://foicica.com/textadept/'\n version '5.4'\nend\n"
},
{
"from": "gpt",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Add a default admin user to db:seed\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:seed command (or created alongside the dat... | ruby | chosen |
[
{
"from": "system",
"value": "Update seed for negative members bug\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\npage_num = 1\n\nwhile page_num < 501 # First 500 Pages\n item_num = 0\n page = Nokogiri::HTML(open(\"http://top.cafe.daum.net/_c21_/category_list?type=sub&page=#{page_num... | ruby | chosen |
[
{
"from": "system",
"value": "Update select common reply helper with hack to handle missing translations for chinese char sets\n\nSigned-off-by: Scott Miller <ee4be419d3f845eb9ce4e4ef3aeee8bd8acd07cf@gmail.com>\n"
},
{
"from": "human",
"value": "module AdminHelper\n\n\n def assigned_to(topic)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update test setup in Packer spec.\n\nThis is the correct way to set a variant's weight.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nmodule OrderManagement\n module Stock\n describe Packer do\n let(:order) { c... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for version 2.1.0.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"TEQuickPageViewController\"\n s.version = \"2.0.0\"\n s.summary = \"Add pages to a PageViewController directly in Storyboard.\"\n s.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Add myself as an author.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'fakefs/version'\n\nGem::Specification.new do |spec|\n spec.name = \"f... | ruby | chosen |
[
{
"from": "system",
"value": "Use cancancan instead of cancan\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"feeder/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add view_admin? method to user policy\n"
},
{
"from": "human",
"value": "class UserPolicy < ApplicationPolicy\n\n def index?\n if user.has_role?( @accepted_admin_roles )\n return true\n end\n false\n end\n\n def create?\n true\n end\n\n def new... | ruby | chosen |
[
{
"from": "system",
"value": "Use Time.parse instead of Time.new for ruby-3.1.0-preview1.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'nmap/scanner'\n\ndescribe Scanner do\n describe \"#to_s\" do\n let(:name) { 'nmap' }\n let(:version) { '6.01' }\n let(:args) ... | ruby | chosen |
[
{
"from": "system",
"value": "Annotate the example a bit\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Jazz\n module Models\n Ensemble = Struct.new(:name)\n Instrument = Struct.new(:name)\n end\n\n class Ensemble < GraphQL::Object\n model Models::Ensemble\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use apt-repo as cookbook name instead of chef-apt-repo\n"
},
{
"from": "human",
"value": "include_recipe \"chef-apt-repo::grml\"\n\ndirectory \"/etc/apt/preferences.d\"\ncookbook_file \"grml-pin\" do\n path \"/etc/apt/preferences.d/grml-pin\"\n source \"etc-apt-pr... | ruby | chosen |
[
{
"from": "system",
"value": "Use slop v4 or higher because some options couldn't work\n"
},
{
"from": "human",
"value": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"ruboty/version\"\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Syncthing.\n"
},
{
"from": "human",
"value": "cask 'syncthing' do\n version '0.13.7'\n sha256 '58c0063cecef9d2969b96223e4cacfabb91f2df0f7a7bf43860a50a344b487f7'\n\n url \"https://github.com/syncthing/syncthing/releases/download/v#{ver... | ruby | chosen |
[
{
"from": "system",
"value": "Remove metadata option on gemspec\n\nAllows for easier releasing / deployment to any server\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'temperature_... | ruby | chosen |
[
{
"from": "system",
"value": "Change the activerecord dependency lock\nto work both with 4.0 and 4.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"acts_as_shopping_cart/version\"\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update variable name to reflect intention"
},
{
"from": "human",
"value": "# encoding: UTF-8\nmodule MongoMapper\n module Plugins\n module Inspect\n extend ActiveSupport::Concern\n\n module InstanceMethods\n def inspect(include_super=false)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify javascript loading and execution\n\n- accesslint.js now handled the loading and execution.\n"
},
{
"from": "human",
"value": "module AccessLintHelper\n def include_access_lint\n javascript_include_tag(\"accesslint\") +\n javascript_tag(<<-JS.strip_he... | ruby | chosen |
[
{
"from": "system",
"value": "Improve thumbnail helpers by three methods: thumbnail_path, thumbnail_image_tag, thumbnail_image_link\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def bootstrap_class_for flash_type\n { success: \"alert-success\", error: \"alert-danger\", alert:... | ruby | chosen |
[
{
"from": "system",
"value": "Use helper argument intead of instance variable.\n"
},
{
"from": "human",
"value": "module InvestmentsHelper\n\n def investment_image_full_url(investment, version)\n URI(request.url) + investment.image.url(version)\n end\n\n def investment_image_file_name(inve... | ruby | chosen |
[
{
"from": "system",
"value": "Update development version to 1.0.2\n"
},
{
"from": "human",
"value": "name 'frog'\nmaintainer 'Nick Downs'\nmaintainer_email 'nickryand@gmail.com'\nlicense 'MIT'\ndescription 'Installs and configures the Frog Media Server'\nlong_description IO.read(File.join(File.d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix occasionally failing test: wait for stdin\n"
},
{
"from": "human",
"value": "require 'support/test_case'\nrequire 'jekyll/minibundle/asset_bundle'\n\nmodule Jekyll::Minibundle::Test\n class AssetBundleTest < TestCase\n def test_raise_exception_if_bundle_comm... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake development dependency to fix CVE\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"salest... | ruby | chosen |
[
{
"from": "system",
"value": "Attach a region to every new factory'd game\n"
},
{
"from": "human",
"value": "Factory.define :game do |g|\n g.regulation_type :unregulated\nend\n\nFactory.define :invalid_game, :parent => :game do |g|\n g.max_players -2\nend\n\nFactory.define :huge_game, :parent ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix admin login integration spec\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\ndescribe 'Login' do\n include_context 'in site'\n before { FactoyrGirl.create(:user, name: 'te... | ruby | chosen |
[
{
"from": "human",
"value": "Move feeds association to HasAFeed concern and check if assoc. exists\n"
},
{
"from": "gpt",
"value": "module HasAFeed\n extend ActiveSupport::Concern\n\n included do\n\n has_many :entities_imported_from_feed, as: :entity\n has_many :feeds, through: :entities... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage URL in gemspec."
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'net/socket/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Delete whitespace to fix test.\n"
},
{
"from": "human",
"value": "module Key::Fingerprint\n extend ActiveSupport::Concern\n\n included do\n before_validation :generate_fingerpint\n validates :fingerprint, uniqueness: true, presence: true\n end\n\n\n def ge... | ruby | chosen |
[
{
"from": "human",
"value": "Add A Better Finder Rename 10.app beta\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'a-better-finder-rename-beta' do\n version '10'\n sha256 'df4208eb01c25434b5c93c65ae82c12b2bab893a63d5c286f8c89cf4ae7b7137'\n\n url \"http://www.publicspace.net/download/ABFRX#{ver... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up gemspec again grrr\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/noodall/ui/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"noodall-ui\"\n s.version = Noodall::UI::VERSION\n s.platform ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove support for macOS and tvOS.\n"
},
{
"from": "human",
"value": "# Be sure to run `pod lib lint WhiteLabel.podspec' to ensure this is a\n# valid spec before submitting.\n\nPod::Spec.new do |s|\n s.name = 'WhiteLabel'\n s.version = '3.0.0'... | ruby | chosen |
[
{
"from": "system",
"value": "Update Podspec for new minor version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"MockInject\"\n s.version = \"1.0.0\"\n s.summary = \"A library that allows developers to globally mock any ObjectiveC class' initialization... | ruby | chosen |
[
{
"from": "system",
"value": "Add description and summary to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.unshift File.expand_path(\"../lib\", __FILE__)\nrequire 'snapme/version'\n\nGem::Specification.new do |gem|\n gem.name = 'snapme'\n gem.version... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to require Vagrant 0.9.4+\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/vagrant-bindfs/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"vagrant-bindfs\"\n s.version = Vag... | ruby | chosen |
[
{
"from": "system",
"value": "Verify that Georgia roles have been created\n"
},
{
"from": "human",
"value": "require \"georgia/version\"\nrequire \"georgia/paths\"\nrequire \"georgia/engine\"\nrequire \"georgia/uploader/adapter\"\nrequire \"georgia/permissions\"\n\nmodule Georgia\n\n mattr_acce... | ruby | chosen |
[
{
"from": "system",
"value": "Update RSpec version for development\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/conjure/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"conjure\"\n s.version = Conjure::VERSION\n s.platform = Gem::Platform::RUBY\n s.a... | ruby | chosen |
[
{
"from": "system",
"value": "Write simple description in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/weather_hacker/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Ryo NAKAMURA\"]\n gem.email = ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests for Ruby 1.9\n"
},
{
"from": "human",
"value": "require 'lib/generators/social_stream/templates/migration'\nCreateSocialStream.up\n\nrequire File.expand_path(\"../../dummy/db/seeds\", __FILE__)\n"
},
{
"from": "gpt",
"value": "require File.join... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for clearing the ar counts\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndefine ActiveRecordRecord::SummaryGeneration do\n define \"#clear_ar_counts\" do\n before do\n Thread.current[:ar_counts] = { test: \"I love ar_counts\" }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow focus for specs when not on CI\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire \"bundler/setup\"\nrequire \"glosbe/translate\"\n\nrequire \"pry\"\n\nrequire \"vcr\"\nrequire \"webmock/rspec\"\n\nRSpec.configure do |config|\n config.e... | ruby | chosen |
[
{
"from": "system",
"value": "spec: Disable Lita 3 compatibility mode\n"
},
{
"from": "human",
"value": "require \"lita-ascii-art\"\nrequire \"lita/rspec\"\n"
},
{
"from": "gpt",
"value": "require \"lita-ascii-art\"\nrequire \"lita/rspec\"\n\nLita.version_3_compatibility_mode = false... | ruby | chosen |
[
{
"from": "system",
"value": "Disable `should` syntax in Rspec\n\n`should` syntax is deprecated as of Rspec version 3.0 and the previous\ncommit converts all of our tests to use `expect` for consistency.\n\nTo prevent regressions, this change disables `should` syntax for this\ngem.\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Add MockFailureBackend for test mode\n"
},
{
"from": "human",
"value": "$:.push(File.expand_path(File.dirname(__FILE__)))\n$:.push(File.expand_path(File.dirname(__FILE__)) + '/../lib')\n\nrequire 'failsafe'\n\nRSpec.configure do |config|\n config.mock_with :mocha\n... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce test timeout to 0.5 seconds\n\nHave tests time out after half the time, especially now that\nrspec-eventually is out of the picture and we don't have polling going\non.\n"
},
{
"from": "human",
"value": "RSpec.configure do |config|\n config.around(:each) { |... | ruby | chosen |
[
{
"from": "system",
"value": "Reimplement the single function used by activesupport.\n\nInstead of adding a test dependency over activesupport, rewrite the same\nfunction here. The dependency over activesupport would be way exaggerated\nfor just this.\n"
},
{
"from": "human",
"value": "# encodin... | ruby | chosen |
[
{
"from": "system",
"value": "Remove confy until we sync env vars\n"
},
{
"from": "human",
"value": "Confy::Config.env(ENV['CONFY_URL']) if ENV['CONFY_URL']\n\nmodule Helpful\n extend self\n\n def incoming_email_domain\n ENV['INCOMING_EMAIL_DOMAIN'] || 'helpful.io'\n end\n\n def outgoing_... | ruby | chosen |
[
{
"from": "system",
"value": "Use the event's payload to get the proper values.\n"
},
{
"from": "human",
"value": "module Travis\n module LogSubscriber\n class ActiveRecordMetrics < ActiveSupport::LogSubscriber\n def sql(event)\n return if 'SCHEMA' == event[:name]\n name, ... | ruby | chosen |
[
{
"from": "human",
"value": "Upgrade rake to version 12.3.1"
},
{
"from": "gpt",
"value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'oauth2/version'\n\nGem::Specification.new do |spec|\n spec.add_dependency '... | ruby | chosen |
[
{
"from": "system",
"value": "Fix pspell module for PHP 5.4 (wrong build path)\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Php54Pspell < Formula\n homepage 'http://php.net/manual/en/book.pspell.php'\n url 'http://www.php.net/get/php-5.4.3.tar.bz2/from/this/mirror'\n md5 '51f... | ruby | chosen |
[
{
"from": "system",
"value": "Allow a prefix for paths"
},
{
"from": "human",
"value": "module CapybaraPageObject\n class Base\n include Extractors::Common\n\n attr_accessor :source\n\n def initialize(source=nil)\n source ||= Capybara.current_session\n @source = source\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Update Solr Formula to 3.1.0\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Solr < Formula\n url 'ftp://ftp.fu-berlin.de/unix/www/apache/lucene/solr/1.4.1/apache-s... | ruby | chosen |
[
{
"from": "system",
"value": "Update on user folder creation.\n"
},
{
"from": "human",
"value": "require 'dropbox_sdk'\nrequire 'twitter'\nrequire 'open-uri'\n\nget '/sources/new' do \n @user = current_user \n erb :'sources/new'\nend\n\nget '/sources/add-image' do\n @user = current_user\n cl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning in coerce_input/coerce_result\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nScalarTypes::DateTime = GraphQL::ScalarType.define do\n name \"DateTime\"\n\n coerce_input ->(value) { Time.zone.parse(value) }\n coerce_resu... | ruby | chosen |
[
{
"from": "system",
"value": "Include category to fix N+1 problem for search result set\n\nThe following queries are run:\n\n Category Load (0.1ms) SELECT \"categories\".* FROM \"categories\" WHERE \"categories\".\"id\" = $1 LIMIT 1 [\n [\"id\", 2]]\n Rendered posts/_summary.html.haml (11.7ms)... | ruby | chosen |
[
{
"from": "system",
"value": "Remove usage of Spree::Store.current from GiftCardMailer\n"
},
{
"from": "human",
"value": "class Spree::GiftCardMailer < Spree::BaseMailer\n def gift_card_email(gift_card)\n @gift_card = gift_card.respond_to?(:id) ? gift_card : Spree::VirtualGiftCard.find(gift_... | ruby | chosen |
[
{
"from": "system",
"value": "Add port_mappings to service serializer\n"
},
{
"from": "human",
"value": "class ServiceSerializer < ActiveModel::Serializer\n attributes :name, :command, :cpu, :memory, :load_balancer, :status\n\n belongs_to :heritage\n\n def load_balancer\n lb = object.fetch... | ruby | chosen |
[
{
"from": "system",
"value": "Use translations for error messages, which requires hacking into ActiveModel::Validations a bit.\n\nSee http://yehudakatz.com/2010/01/10/activemodel-make-any-ruby-object-feel-like-activerecord/\nfor an explanation of read_attribute_for_validation\n\n[#28089551]\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation for institution codes and make institution code\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n devise :omniauthable, omniauth_providers: [:nyulibraries]\n\nend\n"
},
{
"from": "gpt",
"value": "class User < ActiveReco... | ruby | chosen |
[
{
"from": "system",
"value": "Stop logging emails without valid tokens\n\nThis is filling the resque logs\n"
},
{
"from": "human",
"value": "class InboundMailProcessor\n def self.queue\n :inbound_mail\n end\n\n def self.perform(mail_id)\n mail = InboundMail.find(mail_id)\n to_address... | ruby | chosen |
[
{
"from": "system",
"value": "Add cucumber as a development dependency.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'dill/version'\n\nGem::Specification.new do |s|\n s.name = \"dill\"\n s.version = Dill::VERSIO... | ruby | chosen |
[
{
"from": "human",
"value": "10173: Add basic test for existing UserGroup abilities\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\n# Tests for abilities related to UserGroup object.\nrequire \"rails_helper\"\n\ndescribe \"abilities for user_groups\" do\n context \"for coordin... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit test for zabbix_hostgroup type\n\nReally basic test to make sure type has expected parameters.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Puppet::Type.type(:zabbix_hostgroup) do\n describe 'when validating attributes' do\n [:name,... | ruby | chosen |
[
{
"from": "system",
"value": "Update Minitest::Test class with setup and teardown\n\nProtect our test runs from tests that manipulate the\nclass methods and don't reset them."
},
{
"from": "human",
"value": "require \"rubygems\"\n\nbegin\n require \"bundler\"\nrescue LoadError => e\n STDERR.pu... | ruby | chosen |
[
{
"from": "system",
"value": "[FIX] Send test logger output to log/sklik_api_test.log"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nrequire 'fakeweb'\n\nbegin\n Bundler.setup(:default, :development)\nrescue Bundler::BundlerError => e\n $stderr.puts e.message\n $stder... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to update submitted timestampss\n"
},
{
"from": "gpt",
"value": "class RemoveIsDoneFromReportUploadsAndUpdateSubmittedTimestamps < ActiveRecord::Migration\n def up\n ActiveRecord::Base.connection.execute(\n <<-SQL\n UPDATE trade_annual_r... | ruby | chosen |
[
{
"from": "system",
"value": "Add test path to LOAD_PATH to fix load error\n"
},
{
"from": "human",
"value": "$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')\n\nrequire 'test/unit'\nrequire 'rbconfig'\nrequire 'active_support/core_ext/kernel/reporting'\nrequire 'abstract_unit'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Change ezborrow search to known title search\n"
},
{
"from": "human",
"value": "module EZBorrowHelper\n def can_ezborrow?\n current_user.present? && ezborrow_authorizer.authorized?\n end\n\n def ezborrow_url(holding)\n @ezborrow_url ||=\n \"#{HoldingRe... | ruby | chosen |
[
{
"from": "system",
"value": "Add error for being unable to conclude enrollment for Course Completion tool\n"
},
{
"from": "human",
"value": "module Adhesion\n module Exceptions\n class ScormImport < StandardError\n def initialize(msg = \"Error with Scorm Import\")\n super(msg)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add proper newline after gitignore-ing vendored gems"
},
{
"from": "human",
"value": "remove_file \"README\"\nremove_file \"doc/\"\nremove_file \"public/index.html\"\nremove_file \"public/images/rails.png\"\nremove_file \"config/database.yml\"\nappend_file '.gitigno... | ruby | chosen |
[
{
"from": "system",
"value": "Support OpsWorks app environment variables\n\nPass environment variables from OpsWorks to the upstart job, so the\napplication may pick it up. Restart is necessary to make upstart\nre-read the config, so changes take effect.\n"
},
{
"from": "human",
"value": "app = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update migrations to avoid crashing if constants already exist\n"
},
{
"from": "human",
"value": "# This migration comes from data_uploader (originally 20181024100559)\nclass UniqueConstraintsOnPlatformsSectionsAndDatasets < ActiveRecord::Migration[5.2]\n def up\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove adult_validated cookie when Adult OptionalModule is disabled\n"
},
{
"from": "human",
"value": "ActiveAdmin.register OptionalModule do\n menu parent: 'configuration'\n\n permit_params :id,\n :name,\n :enabled\n\n decorate_with... | ruby | chosen |
[
{
"from": "system",
"value": "Update Page::update_visuals: update in recent order\n"
},
{
"from": "human",
"value": "require 'rest_client'\n\nclass Page < ApplicationRecord\n belongs_to :user\n has_many :stickies\n\n def fetch_visual_url\n params = { url: url };\n response = RestClien... | ruby | chosen |
[
{
"from": "system",
"value": "Clear tags before updating them\n"
},
{
"from": "human",
"value": "class Post < ActiveRecord::Base\n belongs_to :user\n has_and_belongs_to_many :tags\n has_many :comments, as: :parent\n\n validates_presence_of :user, :title, :body_markdown\n\n before_save do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy Site when has no bookmarks\n"
},
{
"from": "human",
"value": "class Site < ApplicationRecord\n has_many :bookmarks\nend\n"
},
{
"from": "gpt",
"value": "class Site < ApplicationRecord\n has_many :bookmarks, dependent: :destroy\n\n after_touch ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec to check the get method for Rover class\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe MarsPhotos::Rover do\n\tlet(:rover) { MarsPhotos::Rover.new(\"curiosity\") }\n\n\tit \"creates a curiosity rover\" do\n\t\texpect(rover.name).to eq... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.