conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update ENV username & password\n"
},
{
"from": "human",
"value": "SMTP_SETTINGS = {\n address: ENV.fetch(\"SMTP_ADDRESS\"), # example: \"smtp.sendgrid.net\"\n authentication: :plain,\n domain: ENV.fetch(\"SMTP_DOMAIN\"), # example: \"heroku.com\"\n enable_startt... | ruby | chosen |
[
{
"from": "system",
"value": "Return ElasticIPs if the public hostname is empty\n"
},
{
"from": "human",
"value": "require 'right_aws'\n\nunless Capistrano::Configuration.respond_to?(:instance)\n abort \"capistrano/ec2tag requires Capistrano >= 2\"\nend\n\nmodule Capistrano\n class Configurati... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for string parameter\n\nCode change from #3\n"
},
{
"from": "human",
"value": "require_relative \"../test_helper\"\n\nclass ParametersTest < Minitest::Test\n include Jujube::Components\n\n def test_validating_string\n expected = {\"validating-string\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr. readers for log_path and log_level\n"
},
{
"from": "human",
"value": "module Feed2Email\n class Logger\n def initialize(log_path, log_level)\n @log_path = log_path\n @log_level = log_level\n end\n\n def log(severity, message)\n log... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug when writing using IO.puts with different threads.\n\nIO.puts will write each passed argument using a record separator,\ntipically a newline. This might lead to the situation where a\ndifferent thread also writes to the same stream before writing the\nnewline, which in ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec file(Version number to 0.0.13).\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CMRefresh\"\n s.version = \"0.0.12\"\n s.summary = \"Some util refresh categories for UIScrollView and it's subclasses.\"\n s.de... | ruby | chosen |
[
{
"from": "system",
"value": "Update BasicTeX package id to 2014\n"
},
{
"from": "human",
"value": "class Basictex < Cask\n url 'http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg'\n homepage 'http://www.tug.org/mactex/morepackages.html'\n version 'latest'\n sha256 :no_check\n insta... | ruby | chosen |
[
{
"from": "system",
"value": "Add test helper to api tester\n"
},
{
"from": "human",
"value": "require \"tester/modules/format\"\nrequire 'tester/modules/good_case'\nrequire 'tester/modules/unused_fields'\nrequire 'tester/modules/typo'\nrequire 'rest-client'\nrequire 'json'\n\nclass ApiTester\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use MatchEvents in HaveApplied matcher\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyEventStore\n module RSpec\n class HaveApplied\n def initialize(mandatory_expected, *optional_expected, differ:, phraser:)\n @expecte... | ruby | chosen |
[
{
"from": "system",
"value": "Comment when is raised the ActionController::ParameterMissing\n"
},
{
"from": "human",
"value": "require_relative './concerns/eurocratable'\n\nmodule Eurocrats\n ##\n # This controller manages the VAT number validations\n #\n class VatNumberValidationsController... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a unneccessary class from 'Show full screen report' button\n\n* This button should be visible only when only one of reports is selected\n* No more condition is needed\n* Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1632630\n"
},
{
"from": "human",
"value... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for MTSS referral form importer\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe MtssReferralImporter do\n let!(:pals) { TestPals.create! }\n\n describe 'integration test' do\n it 'works' do\n file_text = IO.rea... | ruby | chosen |
[
{
"from": "system",
"value": "Include rake in dev dependencies\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__),'lib','passman','version.rb')\n\nspec = Gem::Specification.new do |s|\n s.name = 'passman'\n s.version = Passman::VERSION\n s.author = 'Mark A. Nicolosi'\... | ruby | chosen |
[
{
"from": "system",
"value": "Change check order, maybe faster\n"
},
{
"from": "human",
"value": "require \"active_sample/version\"\nrequire \"active_record\"\n\nmodule ActiveSample\n class NegativeSampleError < ArgumentError\n end\n\n def sample(n = 1)\n if n < 0\n raise NegativeSamp... | ruby | chosen |
[
{
"from": "system",
"value": "Create project feature is passing"
},
{
"from": "human",
"value": "Then /^I should be on the new project page$/ do\n current_path.should == new_project_path\nend\n\nWhen /^I submit valid new project details$/ do\n fill_in \"Name\", :with => \"Backyard\"\n select ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dependencies for lazy loaded gems"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire 'dandelion/version'\n\nGem::Specification.new do |s|\n s.name = 'dandelion'\n s.version = Dandelion::VERSION\n s.platfor... | ruby | chosen |
[
{
"from": "system",
"value": "Remove explicit rendering that is not needed.\n"
},
{
"from": "human",
"value": "class Admin::PublicationSubclassesController < Admin::BaseController\n\n def new\n render :controller => \"admin/#{class_identifier.to_s.pluralize}\", :action => 'new'\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up pull request 625\n\nSigned-off-by: Andrea Law <d769b6546cf1ff4ea5640f22f22af90f587f1c59@pivotal.io>\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'bosh/director/api/controllers/base_controller'\n\nmodule Bosh::Director\n module Api::Controller... | ruby | chosen |
[
{
"from": "system",
"value": "Put more cleanup code in ensure block\n"
},
{
"from": "human",
"value": "class DockerRunner\n def self.run(options)\n Docker.options[:read_timeout] = 3600\n Docker.options[:chunk_size] = 1\n\n # This will fail if there is another container with the same na... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade gem version to 0.1.0 and release date\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'ruy'\n s.version = '0.0.1'\n s.date = '2014-06-04'\n s.files = Dir['lib/**/*']\n s.author = 'Moove-IT'\n s.l... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify how gmaps api key is passed\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe GotGastro::Helpers::GoogleMapsHelpers do\n\n include GotGastro::Helpers::GoogleMapsHelpers\n\n include_context 'test data'\n\n it 'should ensure the url is n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the missile graphics z-index.\n"
},
{
"from": "human",
"value": "module Asteroids\n class MissileGraphics < Component\n\n def initialize(game_object)\n super(game_object)\n @image = Gosu::Image.new($window,\n Utils.get_image_path(\"simple_... | ruby | chosen |
[
{
"from": "system",
"value": "Use real rails logger in custom errors spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\nrequire 'custom_errors.rb'\n\ndescribe CustomErrors, type: :controller do\n controller(ApplicationController) do\n include CustomErrors\n\n def raise_404\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert single command call of capture2e\n"
},
{
"from": "human",
"value": "module Pdftotext\n class CLI\n\n DEFAULT_OPTIONS = {\n :layout => true\n }\n\n def run_command(*args)\n options = DEFAULT_OPTIONS.merge(args.pop)\n args = args.concat... | ruby | chosen |
[
{
"from": "system",
"value": "Allow more as test method suffix characters\n\nThe suffix just has to start with a number, the rest doesn't matter.\n"
},
{
"from": "human",
"value": "require \"minitest/ruby_golf_metrics/character_counter\"\n\nmodule Minitest\n\n module RubyGolfMetrics\n\n clas... | ruby | chosen |
[
{
"from": "system",
"value": "Add OAuth example from class.\n"
},
{
"from": "human",
"value": "require 'httparty'\n\nmodule Scrapr\n # You could hardcode this or grab it from an\n # Environment Variable with ENV['ACCESS_TOKEN']\n\n # Either way, at least you're not using a real password. :)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change test description to reveal intent.\n"
},
{
"from": "human",
"value": "require File.expand_path('test_helper.rb', File.dirname(__FILE__))\n\ndescribe \"The generated GObject module\" do\n before do\n GirFFI.setup :GObject\n end\n\n describe \"#type_inter... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem author and description\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'neighborly/admin/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add http schema to default hub\n"
},
{
"from": "human",
"value": "SocialStream::Ostatus.setup do |config|\n # Default to the PubSubHubbub reference Hub server\n # config.hub = 'pubsubhubbub.appspot.com'\n\n config.node_base_url = 'http://localhost:3000'\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Kill mutation through feature removal\n"
},
{
"from": "human",
"value": "module Status\n # Abstract base class for actions\n class Action\n include Adamantium::Flat, Joy::Action\n\n private\n\n # Return page response\n #\n # @param [Hash] attributes\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add SDL-less test for testing on OSX\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/ruby\n\nrequire 'lib/jiggle'\ninclude Jiggle\n\nw = World.new :ticks_per_second => 200\nw.gravity = jgv(0, 9.8)\n\nbox_shape = [jgv(0, 0),\n jgv(0, 1),\n jgv(1, 1... | ruby | chosen |
[
{
"from": "system",
"value": "Add autorun to all tests\n"
},
{
"from": "human",
"value": "require 'minitest'\nrequire_relative \"../lib/database_manager\"\nDatabaseManager.connect_test_database\n"
},
{
"from": "gpt",
"value": "require 'minitest'\nrequire 'minitest/autorun'\nrequire_r... | ruby | chosen |
[
{
"from": "system",
"value": "Make fixture inserts use safe mode to ensure they all complete before running the tests\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] = \"test\"\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\n\nclass ActiveSupport... | ruby | chosen |
[
{
"from": "system",
"value": "Undo caching: it's nice to be able to manipulate these structures\n"
},
{
"from": "human",
"value": "require \"minitest\"\nrequire \"minitest/spec\"\nrequire \"minitest/autorun\"\n#require \"pry-rescue/minitest\"\nrequire \"rack/test\"\nrequire \"rr\"\n\nrequire_rel... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundler instead of manipulating load paths.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\r\n\r\n# To make testing/debugging easier, test within this source tree versus an installed gem\r\n\r\ndir = File.dirname(__FILE__)\r\nroot = File.expand_path(File.j... | ruby | chosen |
[
{
"from": "system",
"value": "Create accessors for nested loops to simplify passing around parameters.\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nclass CommitMonitor\n include Sidekiq::Worker\n\n def self.options\n @options ||= YAML.load_file(Rails.root.join('config/commit_monitor... | ruby | chosen |
[
{
"from": "system",
"value": "Whitelist should only apply to application/json requests.\n"
},
{
"from": "human",
"value": "module Tassadar\n module Server\n class Whitelist\n def initialize(app, addresses)\n @app = app\n @whitelist = addresses\n end\n\n def call(... | ruby | chosen |
[
{
"from": "system",
"value": "Use Build::Base::CONFIG_FILE instead of wrong CONFIG_FILE constant in Task::OpenPDF\n"
},
{
"from": "human",
"value": "module Texas\n module Build\n module Task\n class OpenPDF < Base\n DEFAULT_OPEN_CMD = \"evince\"\n\n def cmd\n @cmd... | ruby | chosen |
[
{
"from": "system",
"value": "Clean asset cache before builds. Detect and print node.js versions as part of ci build\n"
},
{
"from": "human",
"value": "Rake::Task[:test].enhance(['doc:ui']) do\n puts \"[1/6] Precompiling assets\"\n Rake::Task['assets:clobber'].invoke\n Rake::Task['assets:pre... | ruby | chosen |
[
{
"from": "system",
"value": "Whitelist gem files to avoid packaging \"The World\"\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'sinatra/version'\n\nGem::Specification.new 'sinatra', Sinatra::VERSION do |s|\n s.description = \"Sinatra... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in mass-assignment module"
},
{
"from": "human",
"value": "module Virtus\n\n module Model\n\n # @api private\n def self.included(descendant)\n super\n descendant.send(:include, ClassInclusions)\n end\n\n # @api private\n def self.e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix column size to 80 in VERSION_TEXT\n"
},
{
"from": "human",
"value": "module OneApps\n\n # OpenNebula version\n VERSION = '3.8.2'\n\n VERSION_TEXT = <<EOT\nOpenNebulaApps #{OneApps::VERSION}\nCopyright 2010-2012, C12G Labs S.L\n\nLicensed under the C12G ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename payment method factory that's using BogusSimple gateway from 'authorize_net_payment_method' to 'bogus_simple_payment_method' to reduce confusion in what the factory actually does\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :payment_met... | ruby | chosen |
[
{
"from": "system",
"value": "Update the large table list in AddColumnWithDefaultToLargeTable cop\n\n- ci_builds -- 33 million rows, 55 GB\n- merge_request_diff_files -- 5 million rows, 9 GB (and growing rapidly)\n- merge_request_diffs -- 5 million rows, 190 GB\n"
},
{
"from": "human",
"value": ... | ruby | chosen |
[
{
"from": "system",
"value": "Make internal class as nodoc\n\nAlso use the new hash syntax.\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule ActiveSupport\n module LoggerThreadSafeLevel\n extend ActiveSupport::Concern\n\n def after_initialize\n @local_lev... | ruby | chosen |
[
{
"from": "system",
"value": "Rename and refactor method check_user_logged_in\n\nFix according to pull request feedback"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n\t# Prevent CSRF attacks by raising an exception.\n\t# For APIs, you may want to use :nul... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper methods to check is the current_user and logged_in?\n"
},
{
"from": "human",
"value": "require './config/environment'\n\nclass ApplicationController < Sinatra::Base\n\n configure do\n set :public_folder, 'public'\n set :views, 'app/views'\n enab... | ruby | chosen |
[
{
"from": "human",
"value": "Add image cropper asset for campaign pages controller.\n"
},
{
"from": "gpt",
"value": "# Image cropper - used on images when posting and updating campaigns and donations\nrequire 'active_support/concern'\nrequire 'open-uri'\nrequire 'RMagick'\n\nmodule ImageCropper\... | ruby | chosen |
[
{
"from": "human",
"value": "Add first basic test for responses\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nmodule RailsIds\n ##\n #\n #\n class LockPageTest < ActiveSupport::TestCase\n test 'sql injection detected' do\n assert_raises('You are locked out') { RailsIds::R... | ruby | chosen |
[
{
"from": "system",
"value": "Fix errors on unknown mime types\n"
},
{
"from": "human",
"value": "class ParticipatoryProcessAttachmentDecorator < ApplicationDecorator\n delegate_all\n translates :description\n\n def type\n submime = content_type.split(\"/\").last\n\n if [\"jpeg\", \"gif... | ruby | chosen |
[
{
"from": "system",
"value": "Allow user to specify multiple rooms\n * Rooms should be comma- and/or space-separated\n"
},
{
"from": "human",
"value": "service :irc do |data, payload|\n repository = payload['repository']['name']\n branch = payload['ref'].split('/').last\n room = dat... | ruby | chosen |
[
{
"from": "human",
"value": "Add http ready state tests.\n"
},
{
"from": "gpt",
"value": "# encoding: UTF-8\n\nrequire 'vines'\nrequire 'minitest/autorun'\n\nclass HttpReadyTest < MiniTest::Unit::TestCase\n def setup\n @stream = MiniTest::Mock.new\n @state = Vines::Stream::Http::Ready.new... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec for in_forward setting.\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"in_forward\" do\n let(:exists_user) { build(:user) }\n let(:daemon) { build(:fluentd, variant: \"td-agent\") }\n let(:port) { \"12345\" }\n\n #TODO: wa... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple mounts feature test\n"
},
{
"from": "gpt",
"value": "require 'alki/feature_test'\n\ndescribe 'Mounts' do\n it 'should attach assembly to main assembly as a group' do\n Alki.create_assembly(name: 'alki_test') do\n set :val, :test\n end\n\n as... | ruby | chosen |
[
{
"from": "system",
"value": "Add instruments.rb to the gem\n"
},
{
"from": "human",
"value": "require 'run_loop/core'\nrequire 'run_loop/version'\nrequire 'run_loop/xctools'\nrequire 'run_loop/plist_buddy'\nrequire 'run_loop/sim_control'\nrequire 'run_loop/device'\n"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for the page redirect migration\n"
},
{
"from": "human",
"value": "class UpdatePageRedirectTo < ActiveRecord::Migration\n\n def self.up\n include Rails.application.routes.url_helpers\n\n pages = Page.where('redirect_to IS NOT NULL AND redirect_to != \"\"'... | ruby | chosen |
[
{
"from": "system",
"value": "Add sqlite3 gem so we can test with a in memory database\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/delegate_all_for/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jason Rust\"]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Slack invite strategy url\n"
},
{
"from": "human",
"value": "class SlackInviteStrategy < ApplicationRecord\n validates :name, uniqueness: true\n\n has_many :slack_invites\n\n belongs_to :team,\n foreign_key: 'hackbot_team_id',\n class_... | ruby | chosen |
[
{
"from": "system",
"value": "Make it clear that the benefits covenience method is being tested\n"
},
{
"from": "human",
"value": "require_relative \"../../test_helper\"\n\nmodule SmartAnswer::Calculators\n class BenefitCapCalculatorConfigurationTest < ActiveSupport::TestCase\n context Benef... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the admin Idea 'new' action\n\nAdmins do not need an individual view for creating ideas. Remove the\naction to reduce clutter.\n"
},
{
"from": "human",
"value": "class Admin::IdeasController < Admin::AdminController\n\n before_action :set_idea, only: [:edit,... | ruby | chosen |
[
{
"from": "system",
"value": "Replace deprecated before_filter with before_action\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n# frozen_string_literal: true\n\n# Application controller.\nclass ApplicationController < ActionController::Base\n protect_from_forgery\n before_filter :authe... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper for requiring a login\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :excep... | ruby | chosen |
[
{
"from": "system",
"value": "Sort by family name and given name\n"
},
{
"from": "human",
"value": "class AttendeesController < ApplicationController\n include YearlyController\n\n # Callbacks, in order\n before_filter :require_authentication, :except => [:index, :vip]\n add_filter_restricti... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce count of projects on dashboard to 20\n"
},
{
"from": "human",
"value": "class DashboardController < ApplicationController\n respond_to :html\n\n def index\n @groups = Group.where(id: current_user.projects.pluck(:group_id))\n @projects = current_user.p... | ruby | chosen |
[
{
"from": "system",
"value": "Add pending test for stylesheets in html comments\n"
},
{
"from": "human",
"value": "klass = ImageDownloaderAdapter::Base\n\ndescribe klass do\n xit 'should download img tags with src in scheme http' do\n end\n\n xit 'should download img tags with src in scheme h... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for remote data loading\n"
},
{
"from": "human",
"value": "require 'amcharts.rb'\n\nmodule Compendium\n module ChartProvider\n # Uses the amcharts.rb gem to provide charting\n class AmCharts < Compendium::AbstractChartProvider\n def initialize(type... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to soap2r gem as it's more active than mumboe-soap4r and properly works around iconv being deprecated in Ruby 1.9\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"quickbooks_web_con... | ruby | chosen |
[
{
"from": "human",
"value": "Add a migration which fixes references to specialist-frontend\n\nThere are a few routes which still reference specialist-frontend\nwhen they should be pointing to government-frontend. We've already\napplied a migration on the content store, but there are still\nsome routes remai... | ruby | chosen |
[
{
"from": "system",
"value": "Add min required ruby version\n"
},
{
"from": "human",
"value": "name = \"active_record_inherit_assoc\"\n\nGem::Specification.new name, \"2.6.0\" do |s|\n s.summary = \"Attribute inheritance for AR associations\"\n s.authors = [\"Ben Osheroff\"]\n s.email = [\"be... | ruby | chosen |
[
{
"from": "system",
"value": "Use alias_method_chain for overriding establish_connection\n"
},
{
"from": "human",
"value": "module Octoshark\n module EstablishConnectionWithOctosharkReloading\n def establish_connection(*)\n super\n Octoshark.reload! if Octoshark.configured?\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Airbrake crash with no project key\n\nWe were checking tho project_id but not the project_key. However, in our\nexample secrets file we actually include a project_id but not a\nproject_key, and so new CONSUL installations would crash in production\nenvironments.\n\nAlthough... | ruby | chosen |
[
{
"from": "system",
"value": "Create stub Statsd object so non prod environments don't error\n"
},
{
"from": "human",
"value": "if Rails.env.production?\n require 'datadog/statsd'\n\n module GitHubClassroom\n def self.statsd\n @statd ||= ::Datadog::Statsd.new('localhost', 8125)\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Add more relationships to members on the api\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class MemberResource < BaseResource\n immutable\n\n has_many :gardens\n\n attribute :login_name\n end\n end\nend\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Remove minitest as a dev dependency from core\n"
},
{
"from": "human",
"value": "require File.expand_path('../../lib/pakyow/version', __FILE__)\nlib_path = File.exists?('pakyow-core') ? 'pakyow-core' : '.'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Make spec not count the number of links in Sotechsha\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nrequire 'rails_helper'\n\nRSpec.feature \"Sotechsha\", type: :feature, retry: 3 do\n\n describe \"GET /sotechsha/num\" do\n scenario \"Quizzes shoul... | ruby | chosen |
[
{
"from": "system",
"value": "Add integration gists and comments test.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Github::Gists do\n\nend # Github::Gists\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndesc... | ruby | chosen |
[
{
"from": "system",
"value": "Order versions by build date\n\nCloses #321.\n"
},
{
"from": "human",
"value": "class StatsController < ApplicationController\n before_filter :find_gem, :only => :show\n before_filter :ensure_hosted, :only => :show\n\n def index\n @number_of_gems = R... | ruby | chosen |
[
{
"from": "system",
"value": "Remove checking on nusnet id for creating users\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n skip_before_filter :authenticate_user_from_token!, only: :create\n\n def create\n profile = IVLE.new(auth_params[:ivleToken]).get_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Rails 5 dependency from migration file\n"
},
{
"from": "human",
"value": "class CreateReferralsIncomeHistories < ActiveRecord::Migration[5.0]\n def change\n create_table :referrals_income_histories do |t|\n t.partner :association\n t.integer :us... | ruby | chosen |
[
{
"from": "system",
"value": "Use a real unicode arrow instead of ->\n"
},
{
"from": "human",
"value": "module FlagSettingsHelper\n def flag_settings_plot_lines(start_time, end_time=Time.now)\n setting_ids = FlagSetting.where(:name => [\"max_flags\", \"min_accuracy\"]).pluck(:id)\n\n audi... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing set_pack def/filter in OAuth::AuthorizedApplicationsController.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController\n skip_before_action :authen... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for check digit is “A”\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'test_helper'\nrequire 'hkid'\n\n# Unit test for Hkid Class\nclass TestHkid < Minitest::Test\n def setup\n @hkid = Hkid.new\n end\n\n def test_check_digit\n asse... | ruby | chosen |
[
{
"from": "system",
"value": "HOTFIX: Speed up organisation worker by not regenerating email counts as the workers now run in one queue and we can know the Org worker will run last.\n"
},
{
"from": "human",
"value": "class OrganisationsWorker\n\n include Sidekiq::Worker\n include Sidekiq::Stat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Picturelife Smartloader.\n"
},
{
"from": "human",
"value": "cask 'picturelife' do\n version :latest\n sha256 :no_check\n\n url 'https://www.streamnation.com/uploader/osx/picturelife/Picturelife.dmg'\n name 'Picturelife Smartloader'\n... | ruby | chosen |
[
{
"from": "human",
"value": "Solve Pairing on nested data; write reflection\n"
},
{
"from": "gpt",
"value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts: 1\n\n# ================... | ruby | chosen |
[
{
"from": "system",
"value": "Enable chef handler at compile time.\n"
},
{
"from": "human",
"value": "# Make sure the gem is installed from compile time.\np = gem_package \"hipchat\" do\n action :nothing\nend\np.run_action(\"install\")\n\n# Likeweise, register the chef handler from compile time... | ruby | chosen |
[
{
"from": "system",
"value": "Fix building on OS X.\n"
},
{
"from": "human",
"value": "# This Makefile will get replaced by qmake.\n\nrequire 'rbconfig'\n\nif RUBY_PLATFORM =~ /darwin/i || RbConfig::CONFIG['target_os'] == 'darwin'\n # Cannot you OS X have a build system like all sane people?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update puppet-lint version to 2\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = 'puppet-lint-class_parameter-check'\n spec.version = '0.2.1'\n spec.licenses = ['MIT']\n spec.summary = \"Puppet lint check for cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry as dev dependency\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"protected_record_manager/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new d... | ruby | chosen |
[
{
"from": "system",
"value": "Address factory uses valid phone number.\n\nArea codes can not begin with 1, therefore the area code for this phone\nnumber is invalid.\n\nThis causes issues for anyone who wishes to implement some level of\nbasic phone number validation, as if they use the address factory it\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change browser access in test.\n\nChanged a test from c.browsers to c[:browsers].\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"sauce\"\nrequire \"sauce/connect\"\n\nSauce.config do |c|\n c.browsers = [\n [\"Windows 2008\", \"iexplore\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add uniqueness index to users migration\n"
},
{
"from": "human",
"value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :username, null: false\n t.string :email, null: false\n t.string :hashed_pa... | ruby | chosen |
[
{
"from": "system",
"value": "Expand compatibility to Rails >\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"job_state/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec around payload for tracker\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe PostsController do\n let(:controller) {PostsController.new}\n let(:session) {{}}\n\n describe '#tracker' do\n before(:each) do\n SecureRandom.stubs(:u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require in spec dummy\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\nrequire \"acti... | ruby | chosen |
[
{
"from": "system",
"value": "Add the project homepage to the readme\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'findrepos/version'\n\nGem::Specification.new do |spec|\n spec.na... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.0.0.0 to 0.1.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'configure'\n s.version = '0.0.0.0'\n s.summary = 'Generates class level configure methods'\n s.descriptio... | ruby | chosen |
[
{
"from": "system",
"value": "Break Ruby's built-in `leap?` function.\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire_relative 'year'\n\nclass YearTest < MiniTest::Unit::TestCase\n def test_leap_year\n assert Year.leap?(1996)\n end\n\n def test_non_leap_year\n ski... | ruby | chosen |
[
{
"from": "system",
"value": "Make environments plugin spec work when ENV[\"RACK_ENV\"] is set\n"
},
{
"from": "human",
"value": "require File.expand_path(\"spec_helper\", File.dirname(File.dirname(__FILE__)))\n\ndescribe \"environments plugin\" do \n before do\n app(:environments)\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary gem method, now handled by bundler\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire \"rubygems\"\n\ngem 'rspec', '~> 2.0'\ngem 'rspec-rails', '~> 2.0'\ngem 'rspec_tag_matchers'\ngem 'hpricot', '>= 0.6.1'\n\nrequire 'rspec_tag_matche... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.