conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Set bind_mounts values during configuration. May not be necessary but adding it for consistency.\n"
},
{
"from": "human",
"value": "require 'yaml'\nrequire 'pathname'\n\ndea_yml_file = ARGV[0]\nruby_path = Pathname.new(ARGV[1])\nironfoundry_path = Pathname.new(ARGV... | ruby | chosen |
[
{
"from": "system",
"value": "[CLOUD-413] Create symlink for builder key\n"
},
{
"from": "human",
"value": "include_recipe 'chef-marketplace::_server_enable'\n\ndirectory '/etc/delivery'\n\nprivate_key '/etc/delivery/delivery.pem' do\n cipher 'DES-EDE3-CBC'\n format :pem\... | ruby | chosen |
[
{
"from": "system",
"value": "Use a real client method to avoid stumbling on an unmet expectation.\n"
},
{
"from": "human",
"value": "require 'rspec/expectations'\n\nRSpec::Matchers.define :respond_with_slack_message do |expected|\n match do |actual|\n channel, user, message = parse(actual)\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dummy app's configuration for Sprockets 3\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_view/railtie\"\nrequire \"actio... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra case to status change event spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'torkify/status_change_event'\n\nmodule Torkify\n describe StatusChangeEvent do\n\n context \"with a pass_now_fail event\" do\n before do\n @... | ruby | chosen |
[
{
"from": "human",
"value": "Add some basic tests of cache type supplied on init\n"
},
{
"from": "gpt",
"value": "require_relative '../../test_helper'\n\nclass TestCache < Minitest::Test\n def setup\n @init_object = {\n server_url: 'http://b.com/parse',\n app_id: 'abc',\n api_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra hash from oauth data\n"
},
{
"from": "human",
"value": "class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n\n def github\n @user = User.find_for_github_oauth(request.env[\"omniauth.auth\"], current_user)\n\n if @user.... | ruby | chosen |
[
{
"from": "system",
"value": "Change of logic in image test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Reaction do\n let(:user) { User.create! login: 'some_guy', password: '123', password_confirmation: '123' }\n let(:reaction) do\n Reaction.new(\n user: user... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for calling the middleware\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Nark::Middleware do\n include Rack::Test::Methods\n let(:target_app) { mock('The target application') }\n\n def app\n target_app.stub(:call).and_return(... | ruby | chosen |
[
{
"from": "system",
"value": "Make recv_nonblock test runnable standalone.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire File.dirname(__FILE__) + '/../shared/recv_nonblock'\n\ndescribe \"Socket::BasicSocket#recv_nonblock\" do\n it_behaves_l... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration to not use default_scope on LineItem.\n"
},
{
"from": "human",
"value": "class UseXInsteadOfTimesInLineItems < ActiveRecord::Migration\n def up\n LineItem.where(:quantity => 'times').update_all(:quantity => 'x')\n end\n\n def down\n LineItem.w... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test_files in gemspecs, add glowworm executable to gemspec\n\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"ecology/version\"\n\nGem::Specification.new do |s|\n s.name = \"ecology... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust capistrano and tinder version requirements\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"campystrano/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Make toolchain variable through $env:CC\n"
},
{
"from": "human",
"value": "# MIT License\n#\n# Copyright (c) 2017 Sebastian Katzer\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation fil... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up word file sanitizer a bit\n"
},
{
"from": "human",
"value": "class WordListSanitizer\n def initialize\n @words ||= File.new(file_path).readlines.map(&:chomp)\n end\n\n def run!\n process_words\n write_file\n end\n\n private\n def file_path\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update AppCode EAP to latest build\n\nThis commit updates the sha256 and url stanzas. The version of the\napp itself has not changed.\n"
},
{
"from": "human",
"value": "cask :v1 => 'appcode-eap' do\n version '3.2.0'\n sha256 '2dd8a0a9246067ae6e092b9934cbadac6730a7... | ruby | chosen |
[
{
"from": "system",
"value": "Update RapidWeaver.app to version 6.0.3\n"
},
{
"from": "human",
"value": "cask :v1 => 'rapidweaver' do\n version '6'\n sha256 'e7b72daffa9c7809b713e05a1b518873a71a73afdd6a97f300b8bb9ab35a9361'\n\n url \"http://realmacsoftware.com/redirects/rapidweaver#{version}/... | ruby | chosen |
[
{
"from": "system",
"value": "Include CHANGELOG and README in the gem.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"castanet/version\"\n\nGem::Specification.new do |s|\n s.name = \"castanet\"\n s.version = Ca... | ruby | chosen |
[
{
"from": "system",
"value": "Update zap:delete in DropDMG cask\n"
},
{
"from": "human",
"value": "cask :v1 => 'dropdmg' do\n\tversion '3.2.7'\n\tapp 'DropDMG.app'\n\tsha256 '5f27c67364cef6569633b98e250f73119016249ec7ec06908c117a008dc6c55f'\n\n\turl 'https://c-command.com/downloads/DropDMG-3.2.7... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tenant site not found\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule TenantSite\n extend ActiveSupport::Concern\n\n included do\n helper_method :tenant_site?\n helper_method :current_site\n end\n\n def current_site\n retu... | ruby | chosen |
[
{
"from": "system",
"value": "Change property name of Track api. users -> likers\n"
},
{
"from": "human",
"value": "class V3::TracksController < V3::ApiController\n before_action :doorkeeper_authorize!\n before_action :set_track, only: [:show]\n before_action :set_tracks, only: [:list]\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundle as a dev dependency\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"chef-handler-slack\"\n s.version = \"0.1.0\"\n s.authors = [\"Derek Smith\"]\n s.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Add trailing comma to aid future diffs\n"
},
{
"from": "human",
"value": "require 'html_processor'\n\nclass ActionPlanDecorator < Draper::Decorator\n delegate :title, :description\n\n def content\n @content ||= processed_body.html_safe\n end\n\n private\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify serialisation of ActiveResource object"
},
{
"from": "human",
"value": "require 'active_resource'\nrequire 'forwardable'\n\nmodule Core\n module Repositories\n module Articles\n class ActiveResource\n extend Forwardable\n\n def initia... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify line item gift card delegate statement\n"
},
{
"from": "human",
"value": "module Spree::LineItemDecorator\n extend ActiveSupport::Concern\n\n included do\n has_many :gift_cards, class_name: Spree::VirtualGiftCard\n Spree::LineItem.delegate :gift_car... | ruby | chosen |
[
{
"from": "system",
"value": "Change CHEF Omnibus cookbook base_uri attribute because Opscode as migrated their omnibus S3 bucket."
},
{
"from": "human",
"value": "default[:omnibus_updater][:version] = '10.18.2'\ndefault[:omnibus_updater][:version_search] = false\ndefault[:omnibus_updater][:base... | ruby | chosen |
[
{
"from": "system",
"value": "Increase number of retrieved events to 12\n"
},
{
"from": "human",
"value": "module API\n class EventsController < API::ApplicationController\n def index\n @events = Event\n .includes(:performances, performances: [artist: [recordings: :track]])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tasks displayed in dashboard\n"
},
{
"from": "human",
"value": "class DashboardsController < OrganizationAwareController\n \n def index\n \n @page_title = 'Dashboard'\n \n # Select messages for this user or ones that are for the agency as a w... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to sign_in spec.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Singin in', %q{\n In order to be able ask question and answer the questions\n As an User\n I want be able to sign in\n} do\n\n given(:user) { create(:user) }\n\n sce... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec to play local directory\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule AirPlayer\n describe Playlist do\n let (:playlist) do\n AirPlayer::Playlist.new\n end\n\n describe '.add' do\n context 'with URL' do\n it '... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for escaping language fence\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe CommonMarker::Rouge do\n it 'does something useful' do\n html = CommonMarker::Rouge.render_html(<<-MD)\n# Test\n\n```\nsomecode\n```\n\n```ruby\nputs 'highl... | ruby | chosen |
[
{
"from": "system",
"value": "Make levels factory more realistic\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :course_level, class: Course::Level.name do\n course\n sequence(:experience_points_threshold)\n end\nend\n"
},
{
"from": "gpt",
"value": "Factor... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for unsupported formats\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Api::V4::ConvertsController do\n\n describe '#create' do\n context 'from Llanfair' do\n let(:file) do\n fixture_file_upload('files/llanfair')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add colorize to the gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cryptic/version'\n\nGem::Specification.new do |spec|\n spec.name =... | ruby | chosen |
[
{
"from": "system",
"value": "Build dependancies works (at least for a single dependency)\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\nrequire File.expand_path(File.dirname(__FILE__) + '/../lib/sass_partial')\n\ndescribe \"SassPartial\" do... | ruby | chosen |
[
{
"from": "system",
"value": "Implement the update method for ship physics.\n"
},
{
"from": "human",
"value": "module Asteroids\n class MissilePhysics < Component\n\n def initialize(game_object, object_pool)\n super(game_object)\n @object_pool = object_pool\n end\n\n end\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Update rails upper version limit to \"< 6.0\"\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'glipper/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Debug error in Circle CI\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Torque\n module PostgreSQL\n module Adapter\n module Quoting\n\n Name = ActiveRecord::ConnectionAdapters::PostgreSQL::Name\n Column = ActiveRec... | ruby | chosen |
[
{
"from": "human",
"value": "Add class for managing shutdown of queues\n"
},
{
"from": "gpt",
"value": "module Wilbertils\n class MessageReceiverStack\n include Singleton\n\n def self.add receiver\n Wilbertils::MessageReceiverStack.instance.add receiver\n end\n\n def self.shutd... | ruby | chosen |
[
{
"from": "system",
"value": "Fix default specs to work properly on RHEL\n\nAlso remove the old checks for the rules we removed.\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\nset :backend, :exec\n\n# rules no longer ship by default\ndescribe iptables do\n it { should_not have_rule(... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to display board and switch to global variables.\n"
},
{
"from": "human",
"value": "#! /usr/bin/ruby\n\n# Wendy Smoak | wsmoak@gmail.com | http:/wsmoak.net | October 2014\n# Connect Four game \n\n#initialize game board array\nrows, cols = 6, 7\nboard = Ar... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where not processed images cause fatal error on user photo page.\n"
},
{
"from": "human",
"value": "module PhotosHelper\n\n def photo_tag(photo, format = :thumb_iphone_retina)\n photo = Photo.new if photo.image_processing?\n image_tag(photo.image.url(... | ruby | chosen |
[
{
"from": "system",
"value": "Remove code that doesn’t make sense now that all users will have email."
},
{
"from": "human",
"value": "class Authentication < ActiveRecord::Base\n belongs_to :user\n attr_accessible :provider, :uid\n\n attr_accessor :auth_info\n [ :name, :image, :email ].each ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix example and show off the Redis engine extension\n"
},
{
"from": "human",
"value": "# finish with `exit` if running within `irb`\nrequire 'plezi'\nclass ChatServer\n def index\n render 'client'\n end\n def on_open\n return close unless params['id']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add route for user show\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\nend\n"
},
{
"from": "gpt",
"value": "Rails.application.rou... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Rails to Respond to GET or OPTIONS\n\nBy default, HAProxy uses OPTIONS for the `healtchk` up-check. This\nallows OPTIONS to not 404, while still following the Rails 4 requirement\nof disallowing unbounded `match` routes.\n"
},
{
"from": "human",
"value": "Rail... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem descriptions to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/iformat/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Karol Sarnacki']\n gem.email = ['sodercobe... | ruby | chosen |
[
{
"from": "system",
"value": "Change migration to avoid tiggering callback and use private send:\n\n* Skip :after callbacks on StockLocation and StockItem when creating\nintitial instances. Regression due to 0ba60a08f934af9d6a7f17f6e9c90a1749547e9b and 630afbb7f2549556fb1bc914e16a2e3802cc8f15\n* Use private... | ruby | chosen |
[
{
"from": "system",
"value": "Make the class of the tested factory configurable\n"
},
{
"from": "human",
"value": "ENV['NO_FACTORIES'] = \"NO FACTORIES\"\n\nrequire 'spec_helper'\nrequire 'spree/testing_support/factories/order_factory'\n\nRSpec.shared_examples_for 'an order factory' do\n it \"b... | ruby | chosen |
[
{
"from": "system",
"value": "Use soap4r-ruby1.9 instead of soap4r-ruby19. Require ruby 2.0.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'purolator_web_services/version'\n\nGem::S... | ruby | chosen |
[
{
"from": "system",
"value": "Allow creating accounts without user associated\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass Api::Auth::AccountsController < Api::AccountsController\n include ApiAuthenticated\n\n api_versions :v1\n\n represent_with Api::Auth::AccountRepresenter\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop warnings in LinkedCloneVisibilityService\n"
},
{
"from": "human",
"value": "class LinkedCloneVisibilityService\n def determine_visibility(provision_type, linked_clone, snapshot_count)\n field_names_to_show = []\n field_names_to_edit = []\n fiel... | ruby | chosen |
[
{
"from": "system",
"value": "Remove api namespace from user resources path.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n require 'sidekiq/web'\n\n devise_for :users\n\n namespace :api do\n namespace :v1 do\n mount_devise_token_auth_for 'User', at: 'users', sk... | ruby | chosen |
[
{
"from": "system",
"value": "Modify the default devise regitration controller path\n\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n devise_for :users, controllers: { registrations: 'registrations' }\n resources :users\n\n devise_scope :user do\n root :to =... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplication of home path\n\nIt was breaking pager links because kaminari missed the root\ndeclaration above\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n ActiveAdmin.routes(self)\n devise_for :users\n\n get \"home/index\"\n root \"... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to use dependency AFNetworking 2.x\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"LPGoogleFunctions\"\n s.version = \"1.0.6\"\n s.summary = \"LPGoogleFunctions is an iOS library that provides easy access to c... | ruby | chosen |
[
{
"from": "human",
"value": "Update event_id foreign key to bigint\n"
},
{
"from": "gpt",
"value": "class ChangeEventIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :user_events, :event_id, :bigint\n end\n\n def down\n change_column :user_events, :event_id, :integer\n... | ruby | chosen |
[
{
"from": "system",
"value": "Index into ES after migration\n"
},
{
"from": "human",
"value": "class AddHarvestCountToCrop < ActiveRecord::Migration[5.2]\n def change\n change_table :crops do |t|\n t.integer :harvests_count, default: 0\n t.integer :photo_associations_count, default... | ruby | chosen |
[
{
"from": "system",
"value": "Add a more thorough gem description\n"
},
{
"from": "human",
"value": "require_relative 'lib/binding_of_caller/version'\n\nGem::Specification.new do |spec|\n spec.name = \"binding_of_caller\"\n spec.version = BindingOfCaller::VERSION\n spec.authors... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to version 0.0.2\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 = 'cucumber-formatters'\n spec.summary ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable custom trigger we may not need\n\ngit-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@1437 2d86388d-c40f-0410-ad6a-a69da6a65d20\n"
},
{
"from": "human",
"value": "Project.configure do |project|\n project.email_notifier.emails = ['scott@butlerpress.com']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use tilde for user's home folder reference\n\nError: Cannot create /Users/#{user}/Developer; parent directory /Users/#{user} does not exist\r\nError: /Stage[main]/Boxen::Config/File[/Users/#{user}/Developer]/ensure: change from absent to directory failed: Cannot create /Users/#... | ruby | chosen |
[
{
"from": "human",
"value": "Add Podspec for the Wire compiler\n\nThis podspec downloads the source at a given tag and builds the proto compiler.\n\nTo publish:\n\n```\ngit tag <version>\ngit push origin <version>\nexport POD_VERSION=<version>\npod repo push WireCompiler.podspec --use-json\n```\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove factories from MigrateUserProjectView spec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\nrequire Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb')\n\ndescribe MigrateUserProjectView, :delete ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace newlines with space in description"
},
{
"from": "human",
"value": "require \"bundle_info/version\"\nrequire 'gemnasium/parser'\nrequire 'gems'\nrequire 'active_support/core_ext/string'\nrequire 'colored'\n\nmodule BundleInfo\n class CommandLine\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec of association on Comment\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Comment do\n\n describe \"mass assignment\" do\n\n context \"allowed\" do\n [:body, :proposal_id].each do |attr|\n it { should allow_mass_assignme... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Import nginx version 1.0.2\"\n\nThis reverts commit 3ea86ebbb81fd48c888eb40992ec76334ef8341d [formerly e60119e116448142a7680a4a3c91c4a051e28c88] [formerly 2b64bffc325ab90e606eff7ae7afe1378199eb8f] [formerly 72829cc41131f1c0d687d6c7c7294e0f0da8101f [formerly 4f3d7d31d0e... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the nginx attribute that breaks nginx on Windows nodes\n\n\nFormer-commit-id: d32d6e8c34b0f31f77f1caa54e3d16c581991ae1 [formerly 834c7c7a1076df6c84a0357d17f5e9bc46241d1f] [formerly e3df03a04ffb0f5c6a3628078c004142146f652e [formerly 8c9c528f0dbf1c3f151580fa006f2d4541ac189... | ruby | chosen |
[
{
"from": "system",
"value": "Drop promotion validation on PromotionRule\n\nspecs break with it enabled ..\n"
},
{
"from": "human",
"value": "# Base class for all promotion rules\nmodule Spree\n class PromotionRule < Spree::Base\n belongs_to :promotion, class_name: 'Spree::Promotion', invers... | ruby | chosen |
[
{
"from": "system",
"value": "Fix versions in Gem spec\n"
},
{
"from": "human",
"value": "require_relative 'lib/optbind/version'\n\nGem::Specification.new do |s|\n s.name = 'optbind'\n s.version = OptBind::VERSION\n s.authors = ['Pavol Zbell']\n s.email = ['pavol... | ruby | chosen |
[
{
"from": "system",
"value": "Fix controller route to add vote to question\n"
},
{
"from": "human",
"value": "post '/questions/:id/votes' do\n question = Question.find_by(id: params[:id])\n\n case params[:vote_type]\n when \"up\"\n value = 1\n when \"down\"\n value = -1\n end\n\n que... | ruby | chosen |
[
{
"from": "system",
"value": "Add some documentation / cleanup to last commit\n"
},
{
"from": "human",
"value": "module ExceptionHandler\n extend ActiveSupport::Concern\n\n included do\n include ActiveSupport::Rescuable\n rescue_from StandardError, with: :known_error\n end\n\n def hand... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate line from Host Aggregate\n"
},
{
"from": "human",
"value": "class HostAggregate < ApplicationRecord\n include SupportsFeatureMixin\n include NewWithTypeStiMixin\n include Metric::CiMixin\n include EventMixin\n include ProviderObjectMixin\n inc... | ruby | chosen |
[
{
"from": "system",
"value": "Convert setpoint to appropriate scale.\n\n"
},
{
"from": "human",
"value": "# Attributes:\n# * sensor_id [integer] - Sensor that recorded the reading\n# * value [float] - Sensor reading\n#\n# * id [integer, primary, not null] - primary key\n# * created_at [dat... | ruby | chosen |
[
{
"from": "human",
"value": "codecheck: Add script to find cradled else statements.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\n$:.unshift(File.dirname(__FILE__))\n\nrequire 'all-code'\n\nall_ironbee_code do |path|\n p path if path =~ /radix/\n system(\n 'grep',\n '-H',\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit test for page titles\n\nThis adds a simple test for the title of the second level browse page.\nTests for the other page models can be implemented after changing over\nto content-store for the source.\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Align monkey patch to sidekiq 5\n\nthe to_push section was not used and the assignment shadowed on a few\nlines below.\n"
},
{
"from": "human",
"value": "module Sidekiq\n class Client\n\n private\n\n def atomic_push(conn, payloads)\n if payloads.first['at'... | ruby | chosen |
[
{
"from": "system",
"value": "Add department to inventory adjustment item\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class InventoryAdjustmentInventory\n include Support::Records\n include Support::Fields\n include Support::RecordRefs\n include ... | ruby | chosen |
[
{
"from": "system",
"value": "Add row width and use one Automation obj\n"
},
{
"from": "human",
"value": "class Automaton\n PICTURE = [' ', '█']\n\n def display_grid(grid)\n puts grid.map { |cell| picture(cell) }.join\n end\n\n def neighbourhoods(grid)\n size = grid.size\n size.time... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec by creating uniq email addresses\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe MassEmail do\n describe \"when sending e-mails\" do\n let(:addresses) do\n Array.new(50).map do |i|\n \"example#{i}@example.com\"\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix active processes and groups in processes view\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoParticipation\n class ProcessesController < GobiertoParticipation::ApplicationController\n def index\n @processes = current_... | ruby | chosen |
[
{
"from": "system",
"value": "Include the \"default\" settings and links properly.\n\nHopefully properly.\n"
},
{
"from": "human",
"value": "require 'redmine'\n\nrequire 'update-custom-fields-commit/hooks'\n\nRedmine::Plugin.register :update_custom_fields_on_commit do\n name 'Update custom fiel... | ruby | chosen |
[
{
"from": "system",
"value": "Add caption and description to pictures\n"
},
{
"from": "human",
"value": "class CreateCaffeinePictures < ActiveRecord::Migration\n def change\n create_table :caffeine_pictures do |t|\n t.string :image_id\n t.string :image_filename\n t.string :ima... | ruby | chosen |
[
{
"from": "system",
"value": "Build the generator to setup an entity\n"
},
{
"from": "human",
"value": "module Invitational\n module Generators\n class EntityGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n argument :identity_class, t... | ruby | chosen |
[
{
"from": "system",
"value": "Add route 'toggle_interesting' to Ideas\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root to: 'campaigns#index'\n\n resources :campaigns do\n get :manage_members\n get :join_request\n resources :money_history\n resources :heroe... | ruby | chosen |
[
{
"from": "system",
"value": "Update rash dependency to version ~> 0.4\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/congress/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.add_dependency 'faraday', '~> 0.7'\n gem.add_dependency 'faraday_m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix casing for user-generated poll options in email\n"
},
{
"from": "human",
"value": "class PollOption < ApplicationRecord\n include FormattedDateHelper\n\n belongs_to :poll\n validates :name, presence: true\n\n has_many :stance_choices, dependent: :destroy\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using tap to support ruby 1.8.6\n"
},
{
"from": "human",
"value": "define :disk_monitor, :template => \"alert.sh.erb\", :bin_path => \"/usr/local/bin\" do\n application = Hash.new(\"\").tap do |a|\n a[:alert_level] = params[:name]\n a[:app_name] = params... | ruby | chosen |
[
{
"from": "system",
"value": "Fix when no database exists when using rake db:create\n"
},
{
"from": "human",
"value": "require 'foreigner/connection_adapters/abstract/schema_statements'\nrequire 'foreigner/connection_adapters/abstract/schema_definitions'\nrequire 'foreigner/connection_adapters/s... | ruby | chosen |
[
{
"from": "system",
"value": "Change engine initializer into a before_initialize hook.\n"
},
{
"from": "human",
"value": "require 'browserid/rails/base'\nrequire 'browserid/rails/helpers'\nrequire 'browserid/rails/version'\n\nmodule BrowserID\n module Rails\n # This class defines a Rails eng... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration constant not matching filename. This was breaking bootsnap in dev, changing the constant solves the issue\n"
},
{
"from": "human",
"value": "class AddIndexToDocMethods < ActiveRecord::Migration[5.1]\n def change\n add_index(:doc_methods, [:repo_id,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ballots/new spec broken by 200bbdd63e4faf1a2fe7b2bfc8136ce340efd2d.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'ballots/new' do\n\n before(:each) do\n @election = mock_model(Election)\n assign(:election, @election)\n\n @ballot... | ruby | chosen |
[
{
"from": "system",
"value": "Remove call to super class method\n"
},
{
"from": "human",
"value": "require 'active_support'\nrequire 'active_model'\nrequire 'globalid'\n\nclass GlobalID\n # Raise an exception if gid is invalid.\n def self.find!(gid, options = {})\n GlobalID.new(gid)\n fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add run count for initial load cover.\n"
},
{
"from": "human",
"value": "module Halogen\n class Railtie < Rails::Railtie\n config.before_initialize do |app|\n\n if Halogen.enabled\n # TODO: ensure cache_classes enabled.\n\n Halogen.covered_fil... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Ensure there is something to copy the origin to\"\n"
},
{
"from": "human",
"value": "module Kmc\n module PackageDsl\n def merge_directory(from, opts = {})\n destination = opts[:into] || '.'\n\n FileUtils.mkdir_p(File.dirname(File.join(self.cla... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'JSON::JWT.decode when JSON parse failed should raise JSON::JWT::InvalidFormat' spec\n"
},
{
"from": "human",
"value": "require 'securecompare'\n\nmodule JSON\n module JOSE\n extend ActiveSupport::Concern\n\n included do\n extend ClassMethods\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use File.expand_path to build paths.\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../', __FILE__)\n\nrequire \"#{lib}/mercenary/version\"\nrequire \"optparse\"\nrequire \"logger\"\n\nmodule Mercenary\n autoload :Command, \"#{lib}/mercenary/command\"... | ruby | chosen |
[
{
"from": "system",
"value": "Make MetricFu base module use module_function for simplicity\n"
},
{
"from": "human",
"value": "require 'metric_fu/version'\nmodule MetricFu\n APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__),'..'))\n LIB_ROOT = File.join(APP_ROOT,'lib/metric_fu')\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Increment version 0.0.2 -> 0.0.3: Add ...values_for_keys methods\n"
},
{
"from": "human",
"value": "require \"rake\"\n\nspec = Gem::Specification.new do |s|\n s.name = \"hash_selectors\"\n s.version = \"0.0.2\"\n s.summary = \"Some select methods f... | ruby | chosen |
[
{
"from": "system",
"value": "Use rake 13 in development\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"./lib/gemdiff/version\"\n\nGem::Specification.new do |spec|\n spec.name = \"gemdiff\"\n spec.version = Gemdiff::VERSION\n spec.authors = ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.