conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make sure the web pid directory is created at boot\n" }, { "from": "human", "value": "#\n# Cookbook Name:: web\n# Recipe:: base\n#\n# Copyright 2011, OpenStreetMap Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use ...
ruby
chosen
[ { "from": "system", "value": "Simplify edge gateway integration tests\n\nSimplify the edge gateway integration tests such that we only test the\nfunctionality implemented in vCloud Core.\n\nAfter discussion with @annashipman and @dcarley, we decided that the\nexisting tests were doing too much by duplicatin...
ruby
chosen
[ { "from": "system", "value": "Support optional traits for associaton factories\n\nMSP-13028\n\nIn 'validates at least one in association' shared examples :traits is an\nArray of trait names to use with the :factory.\n" }, { "from": "human", "value": "# validate_length_of from shoulda-matchers as...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'collectnik/version'\n\nGem::Specification.new do |gem|\n ...
ruby
chosen
[ { "from": "system", "value": "Fix name of error class.\n" }, { "from": "human", "value": "# Install hook code here\n\nplugin_path = File.expand_path(File.join(File.dirname(__FILE__), \"public\"))\nmain_app_path = File.join(RAILS_ROOT, 'public', 'alavetelitheme')\n\n# If the symlink to be created...
ruby
chosen
[ { "from": "system", "value": "Update name references in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tourbus/version'\n\nGem::Specification.new do |gem|\n gem.n...
ruby
chosen
[ { "from": "system", "value": "Make sure git is installed on master\n" }, { "from": "human", "value": "test_name \"Install Reboot and Registry Module on Master\" do\n on master, \"git clone https://github.com/joshcooper/puppetlabs-reboot /etc/puppet/modules/reboot\"\n on master, \"git clone htt...
ruby
chosen
[ { "from": "system", "value": "Adjust in Cron to clean Cahce fragments\n" }, { "from": "human", "value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\n\n# Example...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.0.4.2 to 0.0.4.3\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'connection'\n s.version = '0.0.4.2'\n s.summary = 'TCP client/server connection library offering both bloc...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to have a proper description and summary\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/dm-core/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"dm-core\"\n gem.require_pa...
ruby
chosen
[ { "from": "system", "value": "Make the PostgreSQLGeometryColumn class a proper class.\n\nMakes the documentation easier to read than using a Struct.\n" }, { "from": "human", "value": "\nmodule ActiveRecord\n\tmodule ConnectionAdapters\n\t\tclass PostgreSQLGeometryColumn < Struct.new(:name, :srid...
ruby
chosen
[ { "from": "system", "value": "Load JRuby ext under JRuby\n" }, { "from": "human", "value": "if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'\n Object.send(:remove_const, :FFI) if defined?(::FFI)\n begin\n require RUBY_VERSION.split('.')[0, 2].join('.') + '/ffi_c'\n...
ruby
chosen
[ { "from": "system", "value": "Correct typo in put route find method call in\n" }, { "from": "human", "value": "get '/' do\n # Look in app/views/index.erb\n erb :index\nend\n\nget '/user/:id' do\n @user = User.find_by(id: params[:id])\n erb :'user/user_profile'\nend\n\n\n#update(edit) a user...
ruby
chosen
[ { "from": "system", "value": "Add name method to fetch name with locale without globalize gem\n" }, { "from": "human", "value": "class TradeCode < Sapi::Base\n validates :code, :presence => true, :uniqueness => { :scope => :type }\n\n def self.search(query)\n if query.present?\n where(...
ruby
chosen
[ { "from": "system", "value": "Fix missing translations in alert\n" }, { "from": "human", "value": "class UserAlert < ApplicationRecord\n\tbelongs_to :user\n\tbelongs_to :alert\n\n\tscope :is_acknowledged, -> { where(acknowledged: true)}\n \tscope :is_not_acknowledged, -> { where(acknowledged: ...
ruby
chosen
[ { "from": "system", "value": "Test for added parameter in password reset\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe UserMailer do\n\tdescribe 'welcome_instructions' do\n\t\tlet(:user) { Factor...
ruby
chosen
[ { "from": "system", "value": "Use 'Stevia' fmk name when using Cocoapods integration\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SteviaLayout'\n s.version = \"2.3.0\"\n s.summary = \"Elegant view layout for iOS\"\n s.homepage = \"...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary seeding of Sauce.config\n" }, { "from": "human", "value": "\nrequire 'capybara/cucumber'\nrequire 'sauce/capybara'\n\nCapybara.current_driver = :sauce\n\nSauce.config do |c|\nend\n" }, { "from": "gpt", "value": "\nrequire 'capybara/cuc...
ruby
chosen
[ { "from": "system", "value": "Allow indifferent access on properties\n" }, { "from": "human", "value": "module Hubspot\n class Utils\n class << self\n # Parses the hubspot properties format into a key-value hash\n def properties_to_hash(props)\n newprops = {}\n props....
ruby
chosen
[ { "from": "system", "value": "Make DefaultSerializer include AM::Serializable so embedded_in_root_associations is always defined also there\n" }, { "from": "human", "value": "module ActiveModel\n # DefaultSerializer\n #\n # Provides a constant interface for all items\n class DefaultSerialize...
ruby
chosen
[ { "from": "system", "value": "Fix broken regexp under Opal\n\n Opal.const_get_relative($nesting, 'REPLACEMENTS').$unshift([/(^|\\n| )---( |\\n|$)/, \"&#8201;&#8212;&#8201;\", \"none\"], [new RegExp(\"\" + \"(\" + (Opal.const_get_relative($nesting, 'CG_WORD')) + \")---(?=\" + (Opal.const_get_relative($nes...
ruby
chosen
[ { "from": "system", "value": "Remove unused groups in regular expressions" }, { "from": "human", "value": "module Elastatic; end\n\nmodule Elastatic::InflectionsExtension\n \n def camelize\n self.gsub /(^(\\w)|_+(\\w))/ do |initial|\n initial.gsub('_', '').upcase\n end\n end\n \n ...
ruby
chosen
[ { "from": "system", "value": "Add .pre for next release\n" }, { "from": "human", "value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '2.0.0'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n" },...
ruby
chosen
[ { "from": "system", "value": "Apply GetText filter only when GetText is defined\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nrequire 'jpmobile/lookup_context'\n\nmodule ActionController\n class Base\n include Jpmobile::Helpers\n before_action :gettext_force_ja_for_mobile\n ...
ruby
chosen
[ { "from": "system", "value": "Update controller with search based on lat-lng\n" }, { "from": "human", "value": "class PlacesController < ApplicationController\n def index\n if params[:type].nil?\n places = Place.all\n else\n type_id = Type.find_by(name: params[:type])\n pla...
ruby
chosen
[ { "from": "system", "value": "Remove trailing whitespace in PusherController\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass PusherController < ApplicationController\n # stop rails CSRF protection for this action\n protect_from_forgery except: :auth\n\n # POST /pushe...
ruby
chosen
[ { "from": "system", "value": "Use the past_last for frontpage\n\nAwesomeness on more pages..." }, { "from": "human", "value": "class StaticController < ApplicationController\n\n skip_filter :authenticate_user!, :require_admin, :require_supervisor, :only => [:index, :aboutus, :team, :createchall...
ruby
chosen
[ { "from": "system", "value": "Replace s3_host_domain config with url & path config for Paperclip\n" }, { "from": "human", "value": "Paperclip::Attachment.default_options[:s3_host_name] = ENV[\"S3_HOST_NAME\"] || \"s3.amazonaws.com\"\n\nmodule Paperclip\n class MediaTypeSpoofDetector\n def sp...
ruby
chosen
[ { "from": "system", "value": "Update template to not receive deprecation warnings under Rails 3.\n" }, { "from": "human", "value": "\ngem \"activerecord-jdbc-adapter\",\n :lib=>'jdbc_adapter'\n\nrakefile( 'torquebox.rake' ) do\n <<-TASK\nrequire 'torquebox/tasks'\n\n# Patch db:load_config to...
ruby
chosen
[ { "from": "system", "value": "Change log formatter to use JSON\n" }, { "from": "human", "value": "Rails.application.configure do\n if Rails.env.production?\n config.lograge.enabled = true\n config.log_tags = [:uuid]\n\n config.lograge.custom_options = lambda do |event|\n params = ...
ruby
chosen
[ { "from": "human", "value": "Add migration to remove a conflicting content item\n" }, { "from": "gpt", "value": "require_relative \"helpers/delete_content_item\"\n\nclass January5RemoveConflictingContentItems < ActiveRecord::Migration[5.0]\n def up\n content_items = ContentItem.where(id: 137...
ruby
chosen
[ { "from": "system", "value": "Fix the homepage link in the gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new(\"statsd-ruby\", \"1.0.0\") do |s|\n s.authors = [\"Rein Henrichs\"]\n s.email = \"rein@phpfog.com\"\n\n s.summary = \"A Ruby StatsD client...
ruby
chosen
[ { "from": "system", "value": "Add a test for Settings initialized with a Hash.\n\nSigned-off-by: Ben Johnson <88eb237cfa35285612ca0b9d5732153118f97283@binarylogic.com>" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/test_helper.rb'\n\nclass TestSetting < Test::Unit::TestCase\...
ruby
chosen
[ { "from": "system", "value": "Test active record extensions integration\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe SP::Alerts::ActiveRecordExtension do\n describe \".alertable\" do\n it \"allows resource to be alerted\" do\n skip\n end\n end\nend\n" ...
ruby
chosen
[ { "from": "human", "value": "Add tests for export_csv admin plans controller action\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule GobiertoAdmin\n module GobiertoPlans\n class PlansControllerTest < GobiertoControllerTest\n\n def admin...
ruby
chosen
[ { "from": "system", "value": "Use proper license name in the podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Valet'\n s.version = '1.3'\n s.license = 'Apache'\n s.summary = 'Valet lets you securely store data in the iOS or OS X Keychain without knowing a th...
ruby
chosen
[ { "from": "system", "value": "Revert \":muscle: Fixed order of require\"\n\nThis reverts commit d02d45d0735c3866a1664998de307d63436e2831.\n" }, { "from": "human", "value": "$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nif ENV['TRAVIS']\n begin\n require 'codeclimate-test-repo...
ruby
chosen
[ { "from": "system", "value": "Split command and script running tests\n" }, { "from": "human", "value": "require_relative 'test_helper'\n\nclass TestBotrusDocker < Minitest::Test\n def setup\n @botrus = Botrus::Docker.new(containers: 3)\n\n @botrus.setup\n end\n\n def teardown\n @botr...
ruby
chosen
[ { "from": "human", "value": "Add spec for the bug of VersionProxy\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\nRSpec.describe RailsAdmin::Extensions::PaperTrail::VersionProxy do\n describe '#username' do\n subject { described_class.new(version, user_class).username }\n\n let(...
ruby
chosen
[ { "from": "system", "value": "Configure Mocha in a better way\n\nThis should fix some deprecation warnings:\n\n```\nMocha deprecation warning at /var/lib/jenkins/bundles/ruby/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require': Require 'mocha/test_unit', 'mocha/minitest' or ...
ruby
chosen
[ { "from": "system", "value": "Add refute method for tests\n" }, { "from": "human", "value": "if ENV[\"COVERAGE\"]\n require 'simplecov'\n require 'simplecov-rcov'\n\n SimpleCov.start 'rails'\n SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter\nend\n\nrequire 'database_cleaner'\n\nENV...
ruby
chosen
[ { "from": "system", "value": "Allow clodeclimate requests to be made\n" }, { "from": "human", "value": "require \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\nrequire \"minitest/autorun\"\nrequire 'dnsimpler'\nrequire 'webmock/minitest'\n\nclass MiniTest::Test\n\n def setup\n...
ruby
chosen
[ { "from": "system", "value": "Handle another kind of error\n" }, { "from": "human", "value": "# For the benefit of NewDomainWorker\nrequire \"nokogiri\"\n\nclass Domain < ActiveRecord::Base\n # Lookup and cache meta information for a domain\n def self.lookup_meta(domain_name)\n # TODO If th...
ruby
chosen
[ { "from": "system", "value": "Update Lesson for Free Boolean Initialize\n\nUpdate the Lesson model to include initializing the default 'free'\nboolean value.\n" }, { "from": "human", "value": "class Lesson < ActiveRecord::Base\n attr_accessible :background, :title\n\n validates :title, :p...
ruby
chosen
[ { "from": "system", "value": "Handle case when the worker name is not set for a slice\n" }, { "from": "human", "value": "module RocketJobMissionControl\n class ActiveProcessesController < RocketJobMissionControl::ApplicationController\n def index\n # The list of workers actively process...
ruby
chosen
[ { "from": "system", "value": "Make demo o error message more verbose.\n" }, { "from": "human", "value": "module V1\n module Routes\n class Legacy < Core\n ERR_PLEASE_UPGRADE = \"Please upgrade the exercism command-line client.\"\n\n get '/exercises' do\n halt 500, ERR_PLEASE...
ruby
chosen
[ { "from": "system", "value": "Set content type to text for test output\n" }, { "from": "human", "value": "require 'sinatra/base'\n\nrequire_relative 'domain/staging'\nrequire_relative 'domain/production'\n\nclass Chancellor < Sinatra::Base\n helpers do\n def production\n @productionn ||...
ruby
chosen
[ { "from": "system", "value": "Raise test coverege to 100% for an if else false scenario\n" }, { "from": "human", "value": "require 'minitest_helper'\n\ninclude CardsLib::Standard::Evaluators\n\nBlackCards = ->*c{ c.map {|face| Card.new(face, CardsLib::Standard::Rankers::BlackjackRanker) }}\n\nde...
ruby
chosen
[ { "from": "system", "value": "Make the current ngo owner of the created event\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n before_action :authenticate_ngo!, only: [:new, :create]\n\n def new\n @event = Event.new\n @event.shifts.build(volunteers_need...
ruby
chosen
[ { "from": "system", "value": "Add before_action to event controller\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n before_action :get_event, only: [:show, :edit, :update, :destroy]\n\n def new\n @event = Event.new\n end\n\n def create\n # should rep...
ruby
chosen
[ { "from": "system", "value": "Fix files picked by pod\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DSSparseArray\"\n s.version = \"1.2.1\"\n s.author = { \"David W. Stockton\" => \"stockton@syntonicity.net\" }\n s.license = 'MIT'\n s.source = { :git => \"https://gith...
ruby
chosen
[ { "from": "system", "value": "Allow to use Sismai 4.16 and above\n" }, { "from": "human", "value": "\nGem::Specification.new do |spec|\n spec.name = \"embulk-parser-sisimai\"\n spec.version = \"0.1.0\"\n spec.authors = [\"Hiroyuki Sato\"]\n spec.summary = \"Sisimai...
ruby
chosen
[ { "from": "system", "value": "Update podspec version, enable OS X support\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"JSACollection\"\n s.version = \"1.4.0\"\n s.summary = \"A framework that can parse objects from array, dictionary, & object structur...
ruby
chosen
[ { "from": "system", "value": "Test on Rails 6 rc2" }, { "from": "human", "value": "source 'https://rubygems.org'\n\ngemspec path: '../'\n\ngem 'activerecord', '~> 6.0.0.rc1'\ngem 'railties', '~> 6.0.0.rc1'\n\n# Database Configuration\ngroup :development, :test do\n platforms :jruby do\n gem ...
ruby
chosen
[ { "from": "human", "value": "Add a Versioned Cask for Mono MDK 3.2.7\n" }, { "from": "gpt", "value": "class MonoMdk327 < Cask\n url 'http://download.mono-project.com/archive/3.2.7/macos-10-x86/MonoFramework-MDK-3.2.7.macos10.xamarin.x86.pkg'\n homepage 'http://mono-project.com/'\n version '3....
ruby
chosen
[ { "from": "system", "value": "Load lib/dev/init before setting HH::PREFS\n\nWe need lib/dev/init.rb to be loaded first, because the Database\nclass needs to know HH::USER.\n" }, { "from": "human", "value": "require 'lib/database'\nrequire 'lib/preferences'\n\nmodule HH\n PREFS = Preferences.new...
ruby
chosen
[ { "from": "system", "value": "Disable selector extension for the time being.\n" }, { "from": "human", "value": "# Copyright 2014 Noel Cower\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may o...
ruby
chosen
[ { "from": "system", "value": "gemspec: Remove date field (masks actual upload date).\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n\ts.name = 'ruby-eval-in'\n\ts.version = '0.0.3'\n\ts.date = '2015-08-07'\n\ts.required_ruby_version = '>= 2.0.0'\n\ts.summary = 'ruby-eval-in - ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Revert \"Uses thread-local variables instead of a global variable for setting the configuration\"\"\n\nThis reverts commit 3fe7bd3279a58e28c10a5a5585438fbb180bcd55.\n" }, { "from": "human", "value": "require 'logging'\nrequire \"netvisor/version\"\nrequire ...
ruby
chosen
[ { "from": "system", "value": "Add platform version for chefspec\n" }, { "from": "human", "value": "#\n# Cookbook Name:: drone\n# Spec:: package\n#\n\nrequire 'spec_helper'\n\ndescribe 'drone::package' do\n context 'When all attributes are default, on an unspecified platform' do\n cached(:che...
ruby
chosen
[ { "from": "system", "value": "Add github repo as homepage\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sqlite_magic/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add the list of extended modules in Spree.\n\nFor RDoc\n" }, { "from": "human", "value": "#\n# This module contains all the methods required to consume the Spree API.\n#\n# Refer to the modules on the Spree::API namespace for more information.\n#\n# Spree::API::Prod...
ruby
chosen
[ { "from": "system", "value": "Make all methods private except to_s and constructor method\n" }, { "from": "human", "value": "module Fog\n # Fog::Formatador\n class Formatador\n attr_accessor :object, :thread, :string\n\n def initialize(obj, t)\n @object, @thread = obj, t\n thre...
ruby
chosen
[ { "from": "system", "value": "Update to latest mongo driver.\n" }, { "from": "human", "value": "# encoding: UTF-8\nmodule Plucky\n Version = '0.4.0'\n MongoVersion = '~> 1.3'\nend" }, { "from": "gpt", "value": "# encoding: UTF-8\nmodule Plucky\n Version = '0.4.0'\n MongoVersion =...
ruby
chosen
[ { "from": "system", "value": "Raise an error if a path is given for a redirect_url\n\nIf we end up with a path for an asset's `redirect_url`, then Rails\nfills in its hostname, and so redirects to `assets-origin....`, which\nis only accessible on the VPN.\n\nRather than implement a work-around in the asset ...
ruby
chosen
[ { "from": "human", "value": "Remove cache clearing from asset precompilation\n\nChatting with Edd in our office, the subject of slow asset\nprecompilation came up. As we're now considering using a set of\ndedicated stylesheets for right-to-left languages, each of which needs\ncompilation, the current poor ...
ruby
chosen
[ { "from": "system", "value": "Use %i for symbol array literal\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'test_helper'\n\nclass AkismetTest < Minitest::Test\n def setup\n Akismet.api_key = API_KEY\n Akismet.app_url = 'http://example.com'\n end\n\n [:spam...
ruby
chosen
[ { "from": "system", "value": "Make Fezzik.remote_task properly handle task dependency syntax\n" }, { "from": "human", "value": "module Fezzik\n def self.role(role_name, settings)\n @roles ||= {}\n @roles[role_name] = settings\n end\n\n def self.roles() @roles ||= {} end\n\n def self.wi...
ruby
chosen
[ { "from": "system", "value": "Add location, privacy as Album properties & set description as creation property\n" }, { "from": "human", "value": "module Mogli\n class Album < Model\n \n define_properties :id, :name, :description, :link, :count, :created_time, :updated_time\n creation_p...
ruby
chosen
[ { "from": "system", "value": "Move count down logic to it's own method\n\nLater on, this will allow the user to choose whether to count\nup or down.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nclass Timer\n# Takes the number of minutes, and a hash of messages to be said\n def self...
ruby
chosen
[ { "from": "system", "value": "Sort methods of List class in alphabetical order\n" }, { "from": "human", "value": "module Twterm\n class List\n attr_reader :id, :name, :slug, :full_name, :mode, :description, :member_count, :subscriber_count\n\n @@instances = {}\n\n def initialize(list)\...
ruby
chosen
[ { "from": "system", "value": "Handle errors with yarn parsing service gracefully\n" }, { "from": "human", "value": "require 'json'\n\nmodule Bibliothecary\n module Parsers\n class NPM\n include Bibliothecary::Analyser\n\n def self.mapping\n {\n /^package\\.json$/ =>...
ruby
chosen
[ { "from": "system", "value": "Use download instead of capture.\n\nThis solves a problem were secrets from being logged when the log level was\nset to debug.\n" }, { "from": "human", "value": "fiftyfive_recipe :dotenv do\n during \"provision\", \"update\"\n prior_to \"deploy:publishing\", \"upd...
ruby
chosen
[ { "from": "system", "value": "Allow matching version numbers with more than one digit, e.g. 3.0.11\n" }, { "from": "human", "value": "# Grab the FreeRADIUS version from the output of radiusd -v\nversion = Facter::Core::Execution.exec('radiusd -v')\nif version.nil?\n version = Facter::Core::Exec...
ruby
chosen
[ { "from": "system", "value": "Add attribute 'external' to Network\n" }, { "from": "human", "value": "module OpenStack\nmodule Network\n class Network\n\n attr_reader :id\n attr_reader :name\n attr_reader :admin_state_up\n attr_reader :status\n attr_reader :subnets\n attr_reader :shared\n ...
ruby
chosen
[ { "from": "system", "value": "Remove TODO so gem bundles\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"personal_blog/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s...
ruby
chosen
[ { "from": "system", "value": "Remove timeout loop for FSEvents\n" }, { "from": "human", "value": "require \"rb-fsevent\"\n\nmodule Vagrant\n module Syncer\n module Listeners\n class FSEvents\n\n def initialize(absolute_path, excludes, settings, callback)\n @absolute_path...
ruby
chosen
[ { "from": "system", "value": "Change glob patterns in gemspec to be more compact\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/memoizable/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'memoizable'\n gem.version = Memoi...
ruby
chosen
[ { "from": "system", "value": "Update Adobe Reader to DC version\n" }, { "from": "human", "value": "cask :v1 => 'adobe-reader' do\n version '11.0.10'\n sha256 '6aeb93bdd0da7662721e8a81493aef8bd5610d7386ac359bb35f089fbe0ee391'\n\n url \"http://ardownload.adobe.com/pub/adobe/reader/mac/#{version...
ruby
chosen
[ { "from": "human", "value": "Add tests for matrices_helper function per_page\n" }, { "from": "gpt", "value": "require 'rails_helper'\nrequire 'factories/matrix.rb'\nrequire 'support/factory_girl.rb'\n\nRSpec.describe MatricesHelper, type: :helper do\n\n describe \"per_page helper function\" do\...
ruby
chosen
[ { "from": "system", "value": "Remove unrecognized configure arg --with-fontconfig\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "human", "value": "require 'formula'\n\nclass Pango <Formula\n url 'http://ftp.gnome.org/pub/gnome/sources/pan...
ruby
chosen
[ { "from": "system", "value": "Add Create and Delete flow.\n" }, { "from": "human", "value": "class CoursesController < ApplicationController\n before_action :set_course, only: [:show, :edit, :update, :destroy]\n\n def index\n @courses = Course.all\n end\n\n def new\n end\n\n def create\...
ruby
chosen
[ { "from": "system", "value": "Call attribute via its accessor" }, { "from": "human", "value": "require_dependency \"renalware/feeds\"\n\nmodule Renalware\n module Feeds\n class Message < ActiveRecord::Base\n validates :event_code, presence: true\n validates :body, presence: true\n\...
ruby
chosen
[ { "from": "system", "value": "Add frame-src but don't spam the log with DEPRECATION warnings.\n\nThis is an ugly hack, and it should be reverted once we stop supporting\nold browsers.\n" }, { "from": "human", "value": "SecureHeaders::Configuration.default do |config|\n config.hsts = SecureHeade...
ruby
chosen
[ { "from": "system", "value": "Add specific version numbers for carrierwave and rmagick\n\nConflicts:\n\n\tspree_flexi_variants.gemspec\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_flexi_variants'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Stop using old method of marking spam\n" }, { "from": "human", "value": "class Version < DataMapper::Base\n property :content, :text\n property :content_html, :text\n property :created_at, :datetime\n property :moderated, :boolean, :default => false\n ...
ruby
chosen
[ { "from": "system", "value": "Fix ability mock to respond to signed_in?\n" }, { "from": "human", "value": "module ControllerMethods\n def authenticate_user!(user)\n request.env['warden'] = mock(Warden, :authenticate => user, :authenticate! => user)\n end\n\n def ability\n unless @abilit...
ruby
chosen
[ { "from": "system", "value": "Remove worker, update validation fields and fix nil platforms\n" }, { "from": "human", "value": "class Developer < ApplicationRecord\n devise :database_authenticatable, :trackable, :validatable, :omniauthable\n\n store_accessor :data, :html_url, :company, :blog, :...
ruby
chosen
[ { "from": "system", "value": "Add controller for twitter feed\n" }, { "from": "human", "value": "enable :sessions\nrequire \"instagram\"\n\nCALLBACK_URL = \"https://meowrisa.herokuapp.com/\"\n\nInstagram.configure do |config|\n config.client_id = \"a963ba34ecb443bcbaeafa815a9154a9\"\n config.c...
ruby
chosen
[ { "from": "system", "value": "Refactoring: Move validation in the correct position\n" }, { "from": "human", "value": "class Deployment < ActiveRecord::Base\n belongs_to :environment\n belongs_to :application_history\n\n validates_presence_of :environment, :application_history\n\n before_save...
ruby
chosen
[ { "from": "system", "value": "Modify fix to include prefix.\n" }, { "from": "human", "value": "Document.record_timestamps = false\ndocuments = Document.where(\"body like '%whitehall.staging%'\")\ndocuments.each do |document|\n fixed_body = document.body.gsub(/whitehall\\.staging/, \"whitehall.p...
ruby
chosen
[ { "from": "system", "value": "Update to use new aws bucket\n" }, { "from": "human", "value": "default[:omnibus_updater][:version] = '10.12.0-1'\ndefault[:omnibus_updater][:base_uri] = 'http://s3.amazonaws.com/opscode-full-stack'\ndefault[:omnibus_updater][:cache_dir] = '/opt'\ndefault[:omnibus_u...
ruby
chosen
[ { "from": "system", "value": "Fix download_file to include the newer i386 instead of 386" }, { "from": "human", "value": "# Overwrite this in your cookbook\ndefault['remote_syslog2']['config'] = {\n files: [],\n exclude_files: [],\n exclude_patterns: [],\n hostname: node['hostname'],\n dest...
ruby
chosen
[ { "from": "system", "value": "Add filters and groups to Simplecov report\n" }, { "from": "human", "value": "if ENV['COVERAGE']\n require 'simplecov'\n\n # Writes the coverage stat to a file to be used by Cane.\n class SimpleCov::Formatter::QualityFormatter\n def format(result)\n Simpl...
ruby
chosen
[ { "from": "system", "value": "Add README and MIT-LICENSE to gem.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"securid\"\n s.version = \"0.2.5\"\n\n s.authors = [\"Ian Lesperance\", \"Edward Holets\"]\n s.date = \"2016-03-14\"\n s.description = \"A library fo...
ruby
chosen
[ { "from": "system", "value": "Use a single query to lookup all the tags\n\n* Remove unnecessary conditional. If there are no tags passed in then\n Tag.all will return an empty collection, and tags_id will be empty.\n" }, { "from": "human", "value": "require File.expand_path('../presenter', __FI...
ruby
chosen
[ { "from": "system", "value": "Add development dependency for webmock\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'dewey/version'\n\nGem::Specification.new do |s|\n s.name = 'dewey'\n s.version = Dewey...
ruby
chosen
[ { "from": "system", "value": "Use Date instead of Time in DashboardController\n" }, { "from": "human", "value": "class DashboardController < ApplicationController\n before_action :set_date\n\n def index\n @payments = current_user.payments.ordered.by_date(@date)\n @meals = current_us...
ruby
chosen
[ { "from": "system", "value": "Update the link to Git for Windows' homepage\n\nWe followed GitHub's suggestion to use HTTPS and .io...\n\nSigned-off-by: Johannes Schindelin <53fb8db7833fca1e1746dd8592f61048d350f64c@gmx.de>\n" }, { "from": "human", "value": "class DownloadsController < Application...
ruby
chosen
[ { "from": "system", "value": "Add rake and simplecov dependencies\n" }, { "from": "human", "value": "require File.expand_path('../lib/rack/revision/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"rack-revision\"\n s.version = Rack::Revision::VERSION\n s.summary ...
ruby
chosen