conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Improve reconciliation of service categories by label matching\n" }, { "from": "human", "value": "PREFIX isvz: <http://linked.opendata.cz/ontology/isvz.cz/>\nPREFIX scheme: <http://linked.opendata.cz/resource/concept-scheme/eur-lex.europa.eu/service-categories>\nP...
ruby
chosen
[ { "from": "human", "value": "Add content IDs for unpublished statistics announcements\n\nContent IDs were added to almost all statistics announcements as\npart of https://github.com/alphagov/whitehall/pull/2457. However,\nthe ActiveRecord query used in the data migration wasn't `unscoped`\nand `StatisticsAn...
ruby
chosen
[ { "from": "human", "value": "Add an example for init command\n" }, { "from": "gpt", "value": "require 'ec2ssh/command/init'\n\ndescribe Ec2ssh::Command::Init do\n describe '#run' do\n let(:command) do\n described_class.new(cli).tap do |cmd|\n allow(cmd).to receive(:ssh_config_pat...
ruby
chosen
[ { "from": "system", "value": "Fix notice to go to source.\n" }, { "from": "human", "value": "module Vapebot\nclass Bot\n include Command\n include Handler\n include Trapper\n\n attr_reader :connection\n def initialize\n @connection = Connection.new\n Logger.init(Config[:channels])\n ...
ruby
chosen
[ { "from": "system", "value": "Update gem description and homepage.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/yomu/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Erol Fornoles\"]\n gem.email = [\"erol....
ruby
chosen
[ { "from": "system", "value": "Move the logic into a separate module.\n" }, { "from": "human", "value": "require \"source_code/version\"\n\nclass Method\n def source_code\n file = source_location[0]\n starting_point = source_location[1] - 1\n\n lines = File.read(file).lines\n indenta...
ruby
chosen
[ { "from": "system", "value": "Make sure the task is actually ran before running the after callback\n" }, { "from": "human", "value": "require 'rdoc/task'\n\nmodule Camping\n # Adds after_running_rdoc\n class RDocTask < RDoc::Task\n def after_running_rdoc(&block)\n @after_running_rdoc =...
ruby
chosen
[ { "from": "system", "value": "Modify registration to send pass to nickserv.\n" }, { "from": "human", "value": "module Vapebot\nmodule IRC\n def register\n send_pass\n send_nick\n send_user\n end\n\n def send_pass\n if Config[:password]\n send \"PASS #{Config[:password]}\"\n ...
ruby
chosen
[ { "from": "system", "value": "Add a quicker running example.\n" }, { "from": "human", "value": "require 'sidetiq'\n\n# We're only loading this so we don't actually have to connect to redis.\nrequire 'sidekiq/testing'\n\nclass ExampleWorker\n include Sidekiq::Worker\n include Sidetiq::Schedulab...
ruby
chosen
[ { "from": "system", "value": "Update Podespec for version 1.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'RxAlamofire'\n s.version = '0.3.3'\n s.license = 'MIT'\n s.summary = 'RxSwift wrapper around the elegant HTTP networking in Swift Alamofire'\n s.homepage = 'http...
ruby
chosen
[ { "from": "system", "value": "Add support for the current status in the github status executable.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n\nrequire 'github_status'\nrequire 'optparse'\n\nmodule StatusPresenter\n def self.print(statuses)\n statuses.each { |s| puts \"#{s.create...
ruby
chosen
[ { "from": "system", "value": "Update the gem spec to use spree-core 1.0. Also give it a more consistent name" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'mail_chimp'\n s.version = '1.3.0'\n s.summary = 'Mail C...
ruby
chosen
[ { "from": "system", "value": "Use newer version of rake\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"gem-browse\"\n s.version = \"1.0.0\"\n s.authors = [\"Tim Pope\"]\n...
ruby
chosen
[ { "from": "system", "value": "Add constraint ruby version because rake 10.2 does not support Ruby 1.8\nanymore\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'serverspec/version'\n\n...
ruby
chosen
[ { "from": "system", "value": "Change default log level to :detail\n" }, { "from": "human", "value": "class Batch\n\n module Logging\n\n class StdOutLogger\n\n\n # @return [String] The name of this logger\n attr_reader :name\n # @return [Symbol] The curr...
ruby
chosen
[ { "from": "system", "value": "Remove method duplicated in parent class\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Mutant\n class Mutator\n class Node\n # Abstract mutator for literal AST nodes\n class Literal < self\n include AbstractType\n\n private...
ruby
chosen
[ { "from": "system", "value": "Move paths to instance variables\n\nMove path_to_locales and path_to_pluralizations to instance variables\n" }, { "from": "human", "value": "##\n# A utility class to check locale files with locales.thor\n# and rspec\n# Needs to inherit from Thor: https://github.com/...
ruby
chosen
[ { "from": "system", "value": "Update rake requirement from ~> 12.3 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [...
ruby
chosen
[ { "from": "human", "value": "Add spec for piece class.\n" }, { "from": "gpt", "value": "require 'piece'\n\ndescribe Piece do\n let(:piece) {\n piece = Piece.new(true)\n piece.row = 5\n piece.col = 6\n piece\n }\n\n it \"can calculate a relative position\" do\n expect(piece.rel(...
ruby
chosen
[ { "from": "human", "value": "Add rspec to test creation of a Rover instance\n" }, { "from": "gpt", "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(\"cur...
ruby
chosen
[ { "from": "system", "value": "Remove spec ambiguation in Comments controller spec\n\nSpec is already executing the block before each test. However, this\nshould be made clearer by passing the '(:each)' argument.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe CommentsControl...
ruby
chosen
[ { "from": "system", "value": "Use hanami project from rc file instead hardcored value\n" }, { "from": "human", "value": "module Dry\n module Hanami\n module Resolver\n def register_folder!(folder)\n all_files_in_folder(folder).each do |file|\n register_name = file.sub('o...
ruby
chosen
[ { "from": "system", "value": "Set the layout on application\n" }, { "from": "human", "value": "module Georgia\n class ApplicationController < ActionController::Base\n\n # Required otherwise get the error 'uninitialized Ability'\n # require 'devise'\n\n helper 'georgia/ui'\n helper '...
ruby
chosen
[ { "from": "system", "value": "Fix wrong devise parameter sanitizer's parameters\n" }, { "from": "human", "value": "class Users::RegistrationsController < Devise::RegistrationsController\n before_filter :configure_permitted_parameters\n\n protected\n\n def configure_permitted_parameters\n d...
ruby
chosen
[ { "from": "system", "value": "Remove sneaky remaining progress bar\n" }, { "from": "human", "value": "class BehaviorImporter\n\n def initialize(options:)\n @school_scope = options.fetch(:school_scope)\n @log = options.fetch(:log)\n end\n\n def import\n return unless remote_file_name\...
ruby
chosen
[ { "from": "system", "value": "Update thor dependency to latest version\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/version'\n\nGem::Specification.new do |s|\n s.name = 'pronto'\n s.version = Pronto::VE...
ruby
chosen
[ { "from": "human", "value": "Add unit test for Checklists::Question class\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Checklists::Question do\n describe '#show?' do\n let(:criteria) { [] }\n subject { described_class.new('depends_on' => dependencies).show?(criteria)...
ruby
chosen
[ { "from": "system", "value": "Add account test for deposits\n" }, { "from": "human", "value": "require 'rails_helper'\n\nfeature 'Accounting' do\n background do\n @alice = create(:user)\n @bob = create(:user)\n end\n\n scenario 'user must have a default account' do\n expect(@alice.ac...
ruby
chosen
[ { "from": "system", "value": "Revert \"need the whole list of gemspecs available when using the modern index\"\n\nThis reverts commit a8e4badc3197c582750955dc5510a838fc10f4ce.\n" }, { "from": "human", "value": "require File.expand_path(\"../../path.rb\", __FILE__)\ninclude Spec::Path\n\nfiles = ...
ruby
chosen
[ { "from": "system", "value": "Create at least a file in our stubbed filesystem\n" }, { "from": "human", "value": "def stub_filesystem!\n FileUtils.mkdir_p '/root/app/assets/javascripts'\n FileUtils.mkdir_p '/root/app/assets/stylesheets'\n FileUtils.mkdir_p '/root/app/assets/images'\n FileUti...
ruby
chosen
[ { "from": "human", "value": "Add push vs run switch spec\n" }, { "from": "gpt", "value": "\n#\n# specifying flor\n#\n# Wed Jan 18 17:09:05 SGT 2017 Singapore\n#\n\nrequire 'spec_helper'\n\n\ndescribe 'Flor unit' do\n\n before :each do\n\n @unit = Flor::Unit.new('envs/test/etc/conf.json')\n ...
ruby
chosen
[ { "from": "human", "value": "Create test for `Providers::Zusaar` class\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass Providers::ZusaarTest < ActiveSupport::TestCase\n def setup\n @zusaar = Providers::Zusaar.new\n end\n\n def event_hash\n {\n 'event_id' => '1234567...
ruby
chosen
[ { "from": "system", "value": "Add response to json objs\n" }, { "from": "human", "value": "class ApplicationController < ActionController::API\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n # protect_from_forgery with: :exception\n...
ruby
chosen
[ { "from": "system", "value": "FIX: Use correct uniqueness validator in activity type model\n" }, { "from": "human", "value": "class ActivityType < ActiveRecord::Base\n # Relationships\n has_many :unit_activity_sets\n\n before_destroy :can_destroy?\n\n validates :name, presence: true,...
ruby
chosen
[ { "from": "system", "value": "Fix default_url_options in IssueTracker model\n" }, { "from": "human", "value": "class IssueTracker\n include Mongoid::Document\n include Mongoid::Timestamps\n include HashHelper\n include Rails.application.routes.url_helpers\n default_url_options[:host] = Errb...
ruby
chosen
[ { "from": "system", "value": "Fix in String class test\n" }, { "from": "human", "value": "describe \"Some Ruby Classes\" do\n\n #----- String, Fixnum, Float ------\n\n it \"Should be a String\" do\n 9.class.should == Fixnum\n end\n\n it \"Should be a Fixnum\" do\n 9.class.should == Fix...
ruby
chosen
[ { "from": "system", "value": "Check if java is available instead of calling the java binary\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'jslint'\n\n%x[java]\nif $? == 0 # Only run the JS Lint test if Java is installed\n describe \"Javascript\" do\n before do\n @lin...
ruby
chosen
[ { "from": "system", "value": "Add travis-lint as development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\n\nGem::Specification.new do |spec|\n spec.name = \"lob\"\n ...
ruby
chosen
[ { "from": "human", "value": "Add a very simple test for a ticket number\n" }, { "from": "gpt", "value": "require 'sinatra'\nrequire 'json'\nrequire 'octokit'\n\n# Set up octokit client\nbefore do\n OCTOKIT_SECRET = ENV[\"GH_AUTH_TOKEN\"]\n @client ||=Octokit::Client.new(:access_token => OCTOKI...
ruby
chosen
[ { "from": "system", "value": "Add signup and logout routes\n" }, { "from": "human", "value": "get '/login' do\n\terb :login\nend\n\npost '/login' do\n\t@user = User.find_by( username: params[:user][:username] )\n\n\tif @user.try(:authenticate, params[:user][:password])\n\t\tsession[:id] = @user....
ruby
chosen
[ { "from": "system", "value": "Change to using an Array of Strings from an Array of Symbols\n" }, { "from": "human", "value": "require 'dm-ambition/collection'\nrequire 'dm-ambition/model'\nrequire 'dm-ambition/query'\nrequire 'dm-ambition/version'\n\nmodule DataMapper\n [ :Collection, :Model, :...
ruby
chosen
[ { "from": "system", "value": "Update bundler dependency to handle CVE 2013-0334.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'sicuro/version'\n\nGem::Specification.new do |s|\n s.name = 'sicuro'\n s.version = Si...
ruby
chosen
[ { "from": "system", "value": "Make php-fpm directly available in the PATH.\n" }, { "from": "human", "value": "include_recipe \"bison\"\ninclude_recipe \"libreadline\"\n\ninclude_recipe \"phpenv\"\ninclude_recipe \"phpbuild\"\n\nphpbuild_path = \"#{node.travis_build_environment.home}/.php-build\"...
ruby
chosen
[ { "from": "human", "value": "Add first of the c tests.\n\nThis only includes preemphasizer at the moment.\n" }, { "from": "gpt", "value": "require 'noyes'\nrequire 'tu_extensions'\nrequire 'c_impl/preemphasis'\nrequire 'common'\nrequire 'tc_preemphasis'\n\nmodule NoyesC\n class Preemphasizer\n ...
ruby
chosen
[ { "from": "system", "value": "Correct version number on iExplorer" }, { "from": "human", "value": "class IExplorer < Cask\n url 'http://downloads.macroplant.com/iExplorer-3.2.2.0.dmg'\n homepage 'http://www.macroplant.com/'\n version '3.2.2.2'\n sha1 '12c27e47611b1c34276eb53baa68a1e6bcf77a1d...
ruby
chosen
[ { "from": "system", "value": "Configure nesting of bags in pd regime\n" }, { "from": "human", "value": "class PdRegime < ActiveRecord::Base\n\n belongs_to :patient\n\n has_many :pd_regime_bags\n has_many :bag_types, through: :pd_regime_bags\n\n accepts_nested_attributes_for :pd_regime_bags\n...
ruby
chosen
[ { "from": "system", "value": "Add comment for debugging JavaScript error\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n" }, { "from": "human", "value": "require \"test_helper\"\n\nclass ApplicationSystemTestCase < ActionDispatch::SystemTestCase\n dri...
ruby
chosen
[ { "from": "system", "value": "Order stop times by the route_stop index, otherwise timetable output is in time order which breaks when we hit midnight\n" }, { "from": "human", "value": "class StopTime < ActiveRecord::Base\n belongs_to :route_stop\n belongs_to :route\n belongs_to :origin_stop_t...
ruby
chosen
[ { "from": "human", "value": "Add wxPython as separate formula\n\nCloses Homebrew/homebrew#25651.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n" }, { "from": "gpt", "value": "require 'formula'\n\nclass FrameworkPython < Requirement\n fatal true\n\n sat...
ruby
chosen
[ { "from": "system", "value": "Add test for momentjs version string\n\nThis should help prevent that situation moving forward...\n" }, { "from": "human", "value": "require 'test_helper'\n\nclass NavigationTest < ActionDispatch::IntegrationTest\n test 'can access momentjs' do\n get '/assets/mo...
ruby
chosen
[ { "from": "system", "value": "Add fields to display in admin panel.\n" }, { "from": "human", "value": "ActiveAdmin.register Report do\n# See permitted parameters documentation:\n# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters...
ruby
chosen
[ { "from": "human", "value": "Add a basic recipe that loads postgis\n" }, { "from": "gpt", "value": "#\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 obtain a copy of the License at\n# \n# htt...
ruby
chosen
[ { "from": "system", "value": "Reorder recipes putting DB first.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: racktables\n# Recipe:: default\n#\n# Copyright (C) 2013, Oregon State University\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this...
ruby
chosen
[ { "from": "system", "value": "Update extract resource name so it's less generic\n" }, { "from": "human", "value": "install = node['remote_syslog2']['install']\nbin_file = \"#{install['bin_path']}/#{install['bin']}\"\n\nremote_file install['download_path'] do\n source install['download_file']\n ...
ruby
chosen
[ { "from": "system", "value": "Add client recipes to role\n\nLooks like I missed a couple.\n\nChange-Id: I26d5009b3bfe1777a4934808c01d6c3f520d1e12\nImplements: blueprint openstack-client\n" }, { "from": "human", "value": "name 'os-client'\ndescription 'Roll-up role for client interfaces.'\nrun_li...
ruby
chosen
[ { "from": "system", "value": "Remove no longer existent dependencies\n" }, { "from": "human", "value": "name 'drone'\nmaintainer 'Jacob McCann'\nmaintainer_email 'jmccann.git@gmail.com'\nlicense 'Apache-2.0'\ndescription 'Installs/Configures Drone'\nlong_descripti...
ruby
chosen
[ { "from": "human", "value": "Add integration test for disk_launcher\n\nExtremely simple -- just test that YAML reading is working, and that\nthe calls to vCloud Director via vCloud Core is as expected.\n\nAll we need to do this is add a single small disk.\n\nNaturally, clean up after ourselves.\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Check for database foreign keys\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe CreatesApplicationFromDraft do\n let(:application_draft) { build_stubbed :application_draft }\n\n subject { described_class.new application_draft }\n\n desc...
ruby
chosen
[ { "from": "system", "value": "Add ngui to standalone symlink loop\n" }, { "from": "human", "value": "name 'coopr-standalone'\ndefault_version 'feature/refactor-l2c'\n\nsource :git => 'git://github.com/continuuity/loom.git'\nrelative_path 'standalone'\n\nbuild do\n mkdir \"#{install_dir}/bin\"\n...
ruby
chosen
[ { "from": "system", "value": "Sort the world's largest decency list\n" }, { "from": "human", "value": "maintainer \"Webtrends Inc\"\nmaintainer_email \"hostedops@webtrends.com\"\nlicense \"All rights reserved\"\ndescription \"Installs/Configures ondemand_base\"\nlong_descript...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to take gem VERSION\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'auctionet-stats/version'\n\nGem::Specification.new do |spec|\n spec....
ruby
chosen
[ { "from": "human", "value": "Add feature test for schema search\n" }, { "from": "gpt", "value": "require \"test_helper\"\n\nclass SchemaSearchTest < Capybara::Rails::TestCase\n include Warden::Test::Helpers\n after { Warden.test_reset! }\n\n test \"succesful search using schema name\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Add development dependency test-unit family\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'shogi/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "Add after(:each) block in Options test file\n" }, { "from": "human", "value": "require \"test_helper\"\n\ndescribe SrtShifter do\n\n\tdescribe \"Options\" do\n\t\t\n\t\tdescribe \"validate_args\" do\n\n\t\t\tbefore(:each) do\n\t\t\t\t@args = {:operation => \"add\", ...
ruby
chosen
[ { "from": "system", "value": "Add skipio gem home page\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = 'skipio_api'\n spec.version = '0.0.8'\n...
ruby
chosen
[ { "from": "system", "value": "Comment out active record configuration.\n" }, { "from": "human", "value": "Undersky::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # The test environment is used exclusively to run your applicati...
ruby
chosen
[ { "from": "system", "value": "Break out reporter dispatching test into 3 cases" }, { "from": "human", "value": "require_relative 'tunit/test_case'\nrequire 'tunit'\n\nclass TunitTest < Tunit::TestCase\n def setup\n Tunit::Runnable.runnables = [PassingTest]\n Tunit.io = io...
ruby
chosen
[ { "from": "system", "value": "Update rails dependency due to vulnerability\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"nopassword/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification....
ruby
chosen
[ { "from": "human", "value": "Test cases written for brocade config.\n" }, { "from": "gpt", "value": "#! /usr/bin/env ruby\r\n\r\nrequire 'spec_helper'\r\nrequire 'yaml'\r\nrequire 'puppet/provider/brocade_fos'\r\nrequire 'puppet/util/network_device/brocade_fos/device'\r\nrequire 'puppet/util/net...
ruby
chosen
[ { "from": "human", "value": "Add .podspec file for native module integration.\n" }, { "from": "gpt", "value": "require 'json'\nversion = JSON.parse(File.read('package.json'))[\"version\"]\n\nPod::Spec.new do |s|\n\n s.name = \"react-native-webview-bridge\"\n s.version = vers...
ruby
chosen
[ { "from": "system", "value": "Fix multiple curl commands testing\n" }, { "from": "human", "value": "require 'open3'\nrequire 'json'\nrequire_relative 'base_language_handler'\n\nmodule LanguageHandler\n class CurlLanguageHandler < BaseLanguageHandler\n private\n\n def execute(file)\n ...
ruby
chosen
[ { "from": "system", "value": "Make LogTrimmer trim job logs.\n\nNext up: save them.\n" }, { "from": "human", "value": "require 'celluloid'\n\nclass LogTrimmer\n include Celluloid\n\n def process(job)\n end\nend\n" }, { "from": "gpt", "value": "require 'celluloid'\n\n##\n# The pipe...
ruby
chosen
[ { "from": "system", "value": "Save files before refreshing line endings\n" }, { "from": "human", "value": "require 'test/unit'\nextend Test::Unit::Assertions\n\ndef getInfo(test=false)\n\tputs \"What's your name?\"\n\tname = test ? \"max\" : gets.chomp()\n\n\tputs \"What's your age?\"\n\tage = t...
ruby
chosen
[ { "from": "system", "value": "Update to the latest versin of mashed\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rep/version'\n\nGem::Specification.new do |gem|\n gem.n...
ruby
chosen
[ { "from": "system", "value": "Use SQL in the migration from da55f0a90\n\nrefs #1402\n" }, { "from": "human", "value": "class MigrateJoinedActivityToAccepted < ActiveRecord::Migration\n def up\n RecentActivity.where(:key => 'space.join').each do |act|\n puts \"Converting :join activity t...
ruby
chosen
[ { "from": "system", "value": "Add rake as a dev 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 'bitmap'\n\nGem::Specification.new do |gem|\n gem.name =...
ruby
chosen
[ { "from": "human", "value": "Add model back for migration\n" }, { "from": "gpt", "value": "class ShoppingCartPlugin::PurchaseOrder < Noosfero::Plugin::ActiveRecord\n\n belongs_to :customer, :class_name => \"Profile\"\n belongs_to :seller, :class_name => \"Profile\"\n\n validates_presence_of :...
ruby
chosen
[ { "from": "system", "value": "Remove 'authorization' group from shared spec; redundant\n" }, { "from": "human", "value": "RSpec.shared_examples \"requiring authentication\" do\n it \"redirects the user to the sign-in page for CRUD actions\" do\n single_params = { organization_id: object.orga...
ruby
chosen
[ { "from": "system", "value": "Use puma for browser specs\n" }, { "from": "human", "value": "require 'selenium-webdriver'\nrequire 'loadable_component'\n\nrequire_relative 'pages/page'\nrequire_relative 'pages/menu'\nrequire_relative 'pages/front_page'\nrequire_relative 'pages/votes_page'\n\nmodu...
ruby
chosen
[ { "from": "human", "value": "Add spec tests for pe_version facts\n\nThis commit adds some basic spec tests for the pe_version facts. There are\nbasic postitive and negative cases.\n" }, { "from": "gpt", "value": "#!/usr/bin/env rspec\n\nrequire 'spec_helper'\n\ndescribe \"PE Version specs\" do\n...
ruby
chosen
[ { "from": "system", "value": "Put nccn_guideline back in the params.permit list for assertion moderations\n" }, { "from": "human", "value": "class AssertionModerationsController < ModerationsController\n private\n def moderated_object\n Assertion.view_scope.find_by!(id: params[:assertion_id...
ruby
chosen
[ { "from": "human", "value": "Add specs to juntos_subscription service\n" }, { "from": "gpt", "value": "require 'rails_helper'\n\nRSpec.describe RecurringContribution::JuntosSubscription do\n include RecurringContributionsHelper\n\n describe '#process' do\n let(:project) { create(:project) }...
ruby
chosen
[ { "from": "system", "value": "Add flux in cask list\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n# Install / update Homebrew and Cask packages\npackages = %w[\n vim\n coreutils\n findutils\n rbenv\n ruby-build\n zsh\n pngquant\n imagemagick\n openvpn\n ack\n wget\n bcrypt\...
ruby
chosen
[ { "from": "system", "value": "Add an explicit .to_s for rare instances where the resource type could be nil.\n" }, { "from": "human", "value": "module ManageIQ::Providers::Azure::CloudManager::EventParser\n extend ManageIQ::Providers::Azure::EventCatcherMixin\n\n INSTANCE_TYPE = \"microsoft.co...
ruby
chosen
[ { "from": "system", "value": "Bugfix: Use absolute path for module lookup\n" }, { "from": "human", "value": "Dir[\"#{File.dirname(__FILE__)}/lib/**/*.rb\"].each { |fn|\n require fn\n\n # E.g. \"./lib/active_record/scopes/limit.rb\" -> ActiveRecord::Scopes::Limit\n module_name = fn.sub(\"./lib...
ruby
chosen
[ { "from": "human", "value": "Add Unity iOS Build Support v5.3.1\n" }, { "from": "gpt", "value": "cask 'unity-ios-support-for-editor' do\n version '5.3.1f1'\n sha256 '8de18e8b4703ea4b3f71c8e83d3751f1f568a680a8460cd134c1c6f22a323908'\n\n url \"http://netstorage.unity3d.com/unity/cc9cbbcc37b4/Ma...
ruby
chosen
[ { "from": "system", "value": "Add refactored largest integer solution\n" }, { "from": "human", "value": "# Largest Integer\n\n# I worked on this challenge by myself.\n\n# largest_integer is a method that takes an array of integers as its input\n# and returns the largest integer in the array\n#\n...
ruby
chosen
[ { "from": "system", "value": "Add tilt as runtime dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"petroglyph/version\"\n\nGem::Specification.new do |s|\n s.name = \"petroglyph\"\n s.version = Petrogly...
ruby
chosen
[ { "from": "system", "value": "Add file extension on file upload.\n\nThis was causing errors on user import, for example.\n" }, { "from": "human", "value": "module UploadProcessable\n extend ActiveSupport::Concern\n\n protected\n\n def store_uploaded_file(uploaded)\n file_name = \"#{con...
ruby
chosen
[ { "from": "system", "value": "Fix minor bug with dependency failures.\n\nWe're only showing 1/2 on the enablements count if they're not all\nenabled properly. But the logic I was using would cause it to display\n2/2 if a depended on feature wasn't enabled.\n" }, { "from": "human", "value": "modu...
ruby
chosen
[ { "from": "system", "value": "Add orders and user to Account serializer\n" }, { "from": "human", "value": "class AccountSerializer < ActiveModel::Serializer\n attributes :id, :first_name, :last_name, :company, :slug, :account_type\n has_many :phones\n has_many :addresses\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Update rake tast to use sales contact worker\n" }, { "from": "human", "value": "desc \"Trigger segment events for automatic sales events\"\ntask :trigger_auto_sales_events => :environment do\n User.joins(:school).where('users.role = ?', 'teacher').find_each do |tea...
ruby
chosen
[ { "from": "system", "value": "Paste existing extension lookup code\n\nNo tests…yet. Also, what to do with the ActiveLdap class?" }, { "from": "human", "value": "class ExtensionsController < Adhearsion::CallController\n def run\n answer\n \n puts call.inspect\n end\nend" }, { ...
ruby
chosen
[ { "from": "system", "value": "Add page titles to the styleguide controller\n" }, { "from": "human", "value": "class StyleguideController < ApplicationController\n layout 'styleguide.html.erb'\n\n def show\n end\n\n def article_page\n end\nend\n" }, { "from": "gpt", "value": "cla...
ruby
chosen
[ { "from": "system", "value": "Use Sets instead of arrays for doc. collections\n" }, { "from": "human", "value": "class TaggedContentValidator\n def valid?(document)\n return valid_document_collection?(document) if document.document_collection?\n\n valid_content_item?(document)\n end\n\np...
ruby
chosen
[ { "from": "system", "value": "Add missing `.first` to relation object\n" }, { "from": "human", "value": "require \"daimon_skycrawlers/storage/base\"\nrequire \"active_record\"\n\nmodule DaimonSkycrawlers\n module Storage\n class RDB < Base\n def initialize\n ActiveRecord::Base.es...
ruby
chosen
[ { "from": "human", "value": "Add - Add uploader by product_banner\n" }, { "from": "gpt", "value": "class ProductBannerUploader < CarrierWave::Uploader::Base\n\n # Include RMagick or MiniMagick support:\n # include CarrierWave::RMagick\n # include CarrierWave::MiniMagick\n\n # Choose what kin...
ruby
chosen
[ { "from": "system", "value": "Fix previous and next page links\n" }, { "from": "human", "value": "json.version \"0.1\"\njson.licence \"http://opendatacommons.org/licenses/odbl/\"\njson._links do\n json.self validation_index_url(:page => @validations.current_page)\n json.first validation_index_...
ruby
chosen
[ { "from": "system", "value": "Set unique_expiration timeout for course update workers\n\nBy default, unique job locks expire after 30 minutes, so duplicate jobs have been accumulating on P&E Dashboard, where updating all current courses takes longer than that.\n" }, { "from": "human", "value": "...
ruby
chosen
[ { "from": "system", "value": "Add new apache 2 alias\n" }, { "from": "human", "value": "class LicenseFinder::License::Apache2 < LicenseFinder::License::Base\n self.alternative_names = [\"Apache 2.0\", \"Apache2\", \"Apache-2.0\", \"Apache Software License\"]\n self.license_url = \"http:/...
ruby
chosen