conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix a problem where the Rich Editor field was not saved under Active Admin when using Firefox\n"
},
{
"from": "human",
"value": "if (Object.const_defined?(\"Formtastic\") && Gem.loaded_specs[\"formtastic\"].version.version[0,1] == \"2\")\n\n class RichInput < ::For... | ruby | chosen |
[
{
"from": "system",
"value": "Move note creation to a method\n"
},
{
"from": "human",
"value": "module Socializer\n class NotesController < ApplicationController\n before_action :set_note, only: [:edit, :update, :destroy]\n\n def new\n @note = Note.new\n @current_id = params[:id... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct key for the GitHub API access_token\n"
},
{
"from": "human",
"value": "# Fetch data from the GitHub API.\n#\n# This class interfaces to a specific API gem implementation, and allows us to\n# aggregate calls to fetch a single piece of information, whe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cities not being destructible\n"
},
{
"from": "human",
"value": "class JodelCity < ActiveRecord::Base\n has_many :jodel_posts\n validates :name, presence: true\nend\n"
},
{
"from": "gpt",
"value": "class JodelCity < ActiveRecord::Base\n has_many :... | ruby | chosen |
[
{
"from": "system",
"value": "Use pluck instead of collect\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\njson.training_modules do\n json.array! @training_modules, :name, :id, :status, :slug\nend\n\njson.training_libraries @training_libraries do |library|\n json.slug libra... | ruby | chosen |
[
{
"from": "system",
"value": "Update historical properties file unit test.\n\nGiven [issue #1636](https://github.com/druid-io/druid/issues/1636) a\nwork around is to have the historical service properties file be renamed\nas mentioned in the issues comments.\n\nThis is potentially temporary, depending on th... | ruby | chosen |
[
{
"from": "system",
"value": "Bump minimum coverage to 100%\n"
},
{
"from": "human",
"value": "require 'simplecov-rcov'\nrequire 'coveralls'\nrequire 'coverage/kit'\nCoverage::Kit.setup(minimum_coverage: 95.2)\n"
},
{
"from": "gpt",
"value": "require 'simplecov-rcov'\nrequire 'covera... | ruby | chosen |
[
{
"from": "system",
"value": "Fix due to syntax change in simplecov 0.11\n"
},
{
"from": "human",
"value": "MINIMUM_COVERAGE = 73.5\n\nunless ENV['COVERAGE'] == 'off'\n require 'simplecov'\n require 'simplecov-rcov'\n require 'coveralls'\n Coveralls.wear!\n\n SimpleCov.formatter = SimpleCov... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the N+1 on Guiders / Groups\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_action do\n authorise_user!(User::RESOURCE_MANAGER_PERMISSION)\n end\n\n def index\n @guiders = User.guiders\n @groups = Group.al... | ruby | chosen |
[
{
"from": "system",
"value": "Order methods for digital and not_digital line_items\n"
},
{
"from": "human",
"value": "Spree::Order.class_eval do\n register_update_hook :generate_digital_links\n\n # all products are digital\n def digital?\n line_items.all? { |item| item.digital? }\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing body when migrating commentaire\n"
},
{
"from": "human",
"value": "namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do\n task set: :environment do\n commentaires_to_process = Commentaire.where(file:nil).where.not(piece_justificati... | ruby | chosen |
[
{
"from": "system",
"value": "Disable syntrax tests on macos\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nSYNTRAX_CODE = <<-eos\nindentstack(10,\n line(opt('-'), choice('0', line('1-9', loop(None, '0-9'))),\n opt('.', loop('0-9', None))),\n\n line(opt(choice('e', 'E'... | ruby | chosen |
[
{
"from": "system",
"value": "Change classname reference for JSONExample"
},
{
"from": "human",
"value": "require 'rspec_api_documentation/writers/json_writer'\n\nmodule RspecApiDocumentation\n module Writers\n class CombinedJsonWriter < Writer\n def write\n File.open(configurati... | ruby | chosen |
[
{
"from": "system",
"value": "Remove orm hook from install generator for now\n"
},
{
"from": "human",
"value": "require 'rails/generators/base'\n\nmodule G5Authenticatable\n class InstallGenerator < Rails::Generators::Base\n namespace 'g5_authenticatable'\n\n desc 'Creates a migration for... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec version -> 2.4.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.4.0\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ... | ruby | chosen |
[
{
"from": "human",
"value": "Add some initial validation tests to api scope controller.\n"
},
{
"from": "gpt",
"value": "require_relative \"../../../test_helper\"\n\nclass Test::Apis::V1::ApiScopes::TestValidations < Minitest::Test\n include ApiUmbrellaTestHelpers::AdminAuth\n include ApiUmbre... | ruby | chosen |
[
{
"from": "human",
"value": "Make feature spec for sending invitations\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'inviting accepted submissions' do\n let(:setting) { FactoryGirl.build(:setting, available_spots: 2) }\n let!(:user) { FactoryGirl.create(:user) }\n\n bef... | ruby | chosen |
[
{
"from": "system",
"value": "Use https source url in podspec to prevent warning\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"HandySwift\"\n s.version = \"0.8\"\n s.summary = \"Handy Swift features that didn't make it into the Swift standard library... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n require 'engineyard/ruby_ext'\n\n VERSION = \"0.4.0\"\n\n autoload :API, 'engineyard/api'\n autoload :Collection, 'engineyard/collection'\n autoload :Config, 'engineyard/config'... | ruby | chosen |
[
{
"from": "system",
"value": "Make uploads only accessible by logged in users\n"
},
{
"from": "human",
"value": "class UploadsController < ApplicationController\n def new\n end\nend\n"
},
{
"from": "gpt",
"value": "class UploadsController < ApplicationController\n # TODO This shou... | ruby | chosen |
[
{
"from": "system",
"value": "Use 1.8.7 compatible hash syntax\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nTestRailsAdapter::Application.config.session_store :cookie_store, key: '_dummy_session'\n\n# Use the database for sessions instead of t... | ruby | chosen |
[
{
"from": "system",
"value": "Add exp claim to lesson jwt\n"
},
{
"from": "human",
"value": "require 'jwt'\n\nclass LessonsTokenCreator\n def initialize(user, classroom_activity_id)\n @user = user\n @classroom_activity_id = classroom_activity_id\n end\n\n def create\n JWT.encode(payl... | ruby | chosen |
[
{
"from": "human",
"value": "Update rummager with world news stories\n\nThis commit adds a data migration that sends all of the `NewsArticle` of\ntype `WorldNewsStory` to rummager and removes the entries for their\nprevious base path (these were recently migrated from\n`WorldLocationNewsArticle` so their pa... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite reload tests to use debug_code method\n"
},
{
"from": "human",
"value": "module Byebug\n #\n # Tests for \"reload\" command\n #\n class ReloadTestCase < TestCase\n def setup\n @example = lambda do\n byebug\n a = 9\n a += 10\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use Pry instead of Pry Nav\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'strong_routes/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove date, time, and string interpolation\n"
},
{
"from": "human",
"value": "class Kst\n include Cinch::Plugin\n\n match /(kst)$/, prefix: /^(\\.)/\n match /(help kst)$/, method: :help, prefix: /^(\\.)/\n\n def execute(m)\n utc = Time.now.utc\n kst = utc... | ruby | chosen |
[
{
"from": "system",
"value": "Use compress and decompress as method names\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/base_object'\nrequire 'zlib'\n\nclass Redis\n #\n # Class representing a simple value. You can use standard Ruby operations on it.\n #\n class Valu... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundler compatible gem path resolution\n"
},
{
"from": "human",
"value": "module Rubulex\n class App < Sinatra::Base\n helpers Sinatra::JSON\n set :json_encoder, :to_json\n set :static, true\n set :public_folder, File.join(Gem.datadir(\"rubulex\"), ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow inclusion of site sass into sheet sass by adding public site template paths. Lets extensions (and radiant) provide sass partials.\n"
},
{
"from": "human",
"value": "class SassFilter < TextFilter\n description_file File.dirname(__FILE__) + \"/../sass.html\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Make Use plugin do something reasonable by default\n"
},
{
"from": "human",
"value": "module Plugin::Use\n def use_common\n __export(\"#{name}_ROOT\", raw(\"$1\"))\n __set(\"__#{name}_path_fragment\", path_fragment)\n __export(\"PATH\", raw(\"#{path_fragme... | ruby | chosen |
[
{
"from": "system",
"value": "Use assets:clobber to remove assets before precompile.\n\nWe're not concerned with doing rolling deploys so let's just blow away the public/assets directory before precompile.\n\nFrom: http://edgeguides.rubyonrails.org/command_line.html\n\n\"You can precompile the assets in app... | ruby | chosen |
[
{
"from": "system",
"value": "Disable pipelining for Magicseaweed\nFor some reason it causes them to return malformed json\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nnamespace :msw do\n desc 'Update forecast from MagicSeaweed'\n task update: %w[environment forecasts:se... | ruby | chosen |
[
{
"from": "system",
"value": "Stop fact check response import cronjob from running\n\nThis will be returned closer to launch"
},
{
"from": "human",
"value": "set :output, {:error => 'log/cron.error.log', :standard => 'log/cron.log'}\njob_type :run_script, 'cd :path && RAILS_ENV=:environment scr... | ruby | chosen |
[
{
"from": "system",
"value": "Rebuild instead of just reindex every night"
},
{
"from": "human",
"value": "# reindex the database\nevery 1.day, :at => '3:30 am' do\n rake \"thinking_sphinx:index\"\nend\n\n# recreate the sitemap\nevery 1.day, :at => '4:30 am' do\n rake \"sitemap:refresh\"\nend"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix integrity checker rake task name\n"
},
{
"from": "human",
"value": "require 'whenever'\n\n# Learn more: http://github.com/javan/whenever\n\nenv \"MAILTO\", \"rohan@rohanmitchell.com\"\n\n# If we use -e with a file containing specs, rspec interprets it and filter... | ruby | chosen |
[
{
"from": "system",
"value": "Expire LocationBlock cache on profile's location change\n\n(ActionItem3217)\n"
},
{
"from": "human",
"value": "class MapsController < MyProfileController\n\n protect 'edit_profile', :profile\n\n def edit_location\n @profile_data = profile\n if request.post?\... | ruby | chosen |
[
{
"from": "system",
"value": "Bring WhitehallMediaController more into line with MediaController\n\nGiven that these guard conditions are all terminated in a `return`\nstatement, it doesn't really make sense to make use of an `elsif` here.\n"
},
{
"from": "human",
"value": "class WhitehallMediaC... | ruby | chosen |
[
{
"from": "system",
"value": "Fix UKRDC observations to allow for 00:00 time\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nxml = builder\n\nobservation_times = {\n pre: session.performed_on + session.start_time.seconds_since_midnight.seconds,\n post: session.performed_on ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Image2.rb to the list of unit test scripts\n"
},
{
"from": "human",
"value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\nrequire 'test/unit'\nrequire 'test/unit/ui/console/testrunner'\n\n$:.push('.')\n\nIMAGES_DIR = '../doc/ex/images'\nFILES = Dir[IMAGES_DIR+... | ruby | chosen |
[
{
"from": "system",
"value": "TEST: Write post test for new ticket\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TicketsTest < ActiveSupport::TestCase\n include Rack::Test::Methods\n include TestHelpers::AuthHelper\n include TestHelpers::JsonHelper\n\n def app\n Rails.... | ruby | chosen |
[
{
"from": "system",
"value": "Use raw_api_value in projects custom fields serialization and use cache from controller\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoPlans\n module Api\n module V1\n class ProjectsController < BaseController\n in... | ruby | chosen |
[
{
"from": "system",
"value": "Set associated model project as optional.\n"
},
{
"from": "human",
"value": "class ActivitiesController < AuthorizedController\n belongs_to :project\n\n def new\n # Allow callers specifying defaults\n if params[:activity]\n @activity = Activity.new(para... | ruby | chosen |
[
{
"from": "system",
"value": "Set identity on new landlord contact\n"
},
{
"from": "human",
"value": "class ApartmentsController < MyplaceonlineController\n \n def model\n Apartment\n end\n\n def display_obj(obj)\n obj.location.name\n end\n\n protected\n def sorts\n [\"apartm... | ruby | chosen |
[
{
"from": "system",
"value": "Handle nil ratings in sort\n"
},
{
"from": "human",
"value": "class Schools::AlertsController < ApplicationController\n load_and_authorize_resource :school\n\n def index\n authorize! :read, AlertType\n\n @gas_alerts = @school.alerts.gas.latest.sort_by { |a| ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up session controller script\n"
},
{
"from": "human",
"value": "class Users::SessionsController < Devise::SessionsController\n # before_filter :configure_sign_in_params, only: [:create]\n\n # GET /resource/sign_in\n # def new\n # super\n # end\n\n # PO... | ruby | chosen |
[
{
"from": "system",
"value": "Set dependency to rails ~> 4.2\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"blankplate-rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "Add Pinterest framework to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NKPinterestActivity\"\n s.version = \"1.0.0\"\n s.summary = \"NKPinterestActivity is a UIActivity subclass for sharing content to Pinterest, ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch the tests to use a fixture.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'helper'\n\ndescribe 'Renderer' do\n let(:source) do\n path =\n File.join(test_site.source_paths[:pages], 'escaped'... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic spec for notifications page.\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe 'visit an event group notifications page' do\n let(:user) { users(:third_user) }\n let(:owner) { users(:fourth_user) }\... | ruby | chosen |
[
{
"from": "system",
"value": "Use thor to colorize log output\n"
},
{
"from": "human",
"value": "require 'cifrado/version'\nrequire 'logger'\nrequire 'uri'\nrequire 'cifrado/utils'\n\nmodule Cifrado\n \n if !defined? Log or Log.nil?\n Log = Logger.new($stdout)\n Log.formatter = proc do |... | ruby | chosen |
[
{
"from": "system",
"value": "Define the module before requiring other files\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nrequire 'erudite/example'\nrequire 'erudite/executable'\nrequire 'erudite/outcome'\nrequire 'erudite/parser'\nrequire 'erudite/version'\n\n# Executable documentation... | ruby | chosen |
[
{
"from": "system",
"value": "Set Bulldog.logger to Rails.logger under Rails.\n"
},
{
"from": "human",
"value": "require 'bulldog'\n\nActiveRecord::Base.send :include, Bulldog::HasAttachment\nActiveRecord::Base.send :include, Bulldog::Validations\n\nBulldog.default_url_template = \"/assets/:clas... | ruby | chosen |
[
{
"from": "system",
"value": "Increase version and edit description on podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"PrettyExtensionsKit\"\n s.version = \"0.1.5\"\n s.summary = \"A pretty set of extensions for the development on Swift.\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Improve a bit FindBy's spec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe RuboCop::Cop::Rails::FindBy do\n subject(:cop) { described_class.new }\n\n shared_examples 'register_offenses' do |selector|\n it \"when using ... | ruby | chosen |
[
{
"from": "system",
"value": "Add more leeway to confirmation test\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\ndescribe GameRank do\n before do\n @game_rank = create(:game_rank)\n @user = @game_rank.user\n end\n\n describe \".not_confirmed\" do\n it \"must match gam... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up elasticsearch index created in specs\n\nCloses #148\n"
},
{
"from": "human",
"value": "describe 'elasticsearch installation', sudo: true do\n before :all do\n sh('sudo service elasticsearch start')\n tcpwait('localhost', 9200, 30)\n sh('curl -X PU... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor check mentions for xss test\n\nThe refactor consists in:\n- Better scopping preconditions and the test definition\n- Removing a variable that was being used in a single palce, and\nuse the string directly instead.\n"
},
{
"from": "human",
"value": "# frozen... | ruby | chosen |
[
{
"from": "system",
"value": "Include the license type in the .gemspec"
},
{
"from": "human",
"value": "$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'mixlib/log/version'\n\nGem::Specification.new do |gem|\n gem.name = \"mixlib-log\"\n gem.version = Mixlib::Log::VERSION\n gem.platf... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade rake dependency from 0.9.2 -> 10\n\nThis was a really old version to pin to. Upgrade so we're on the latest\nversion.\n\nChange-Id: Ie2482e12f9552a89bad4728677a453e32095dd10\nReviewed-on: http://gerrit.causes.com/37004\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix faulty syntax in specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule AWS\n describe URL do\n\n before do\n @base_url = 'http://example.com/path'\n @url = URL.new @base_url, 'key', 'secret'\n end\n\n describe '#build' do\n... | ruby | chosen |
[
{
"from": "system",
"value": "[COOK-2427] Use Ruby 1.8 hash syntax for backwards compatibility.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'sudo::default' do\n context 'usual business' do\n before { Fauxhai.mock platform: 'ubuntu' }\n let(:runner) { ChefSpec::Che... | ruby | chosen |
[
{
"from": "system",
"value": "Fix index name so Travis will be happy\n"
},
{
"from": "human",
"value": "class CreateEmailNotifications < ActiveRecord::Migration\n def change\n create_table :email_notifications do |t|\n t.references :person\n t.references :questionnaire\n t.boo... | ruby | chosen |
[
{
"from": "system",
"value": "Update program to take user input.\n"
},
{
"from": "human",
"value": "# Default tip percentages\nten_percent = 10.0\nfifteen_percent = 15.0\ntwenty_percent = 20.0\n\ndef calculate_tip(bill_total, tip_percent)\n print (\"Total is $\") + bill_total.to_s\n print \"\\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong call list in a test\n"
},
{
"from": "human",
"value": "describe :enumerable_entries, :shared => true do\n it \"returns an array containing the elements\" do\n numerous = EnumerableSpecs::Numerous.new(1, nil, 'a', 2, false, true)\n numerous.to_a.shou... | ruby | chosen |
[
{
"from": "system",
"value": "Add delete test to the test cookbook.\n"
},
{
"from": "human",
"value": "ohai_hint 'hint_at_compile_time'\n\nohai_hint 'not_at_compile_time' do\n compile_time false\nend\n\nohai_hint 'hint_with_content' do\n content Hash[:a, 'test_content']\nend\n\nohai_hint 'hint... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to reflect change to local transaction titles\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass LocalTransactionEditionTest < ActiveSupport::TestCase\n def local_transaction_edition\n lgsl = LocalTransactionsSource::Lgsl.new()\n lt... | ruby | chosen |
[
{
"from": "system",
"value": "Use fixture data for the controller test\n\nThe Portfolio loaded must be pretty complete for the page to render properly.\nThe Portfolio we were creating just wasn't cutting it.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe PortfoliosCo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix confusing parameter name in unit tests\n\nThis change fixes a confusing parameter name in unit tests which is not\nconsistent with the actual resource being tested.\n\nChange-Id: I857fdcf6da6bf62ef6fd25987a118b499eb05908\n"
},
{
"from": "human",
"value": "requir... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 2.2.7.0 to 2.2.7.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-schema'\n s.summary = \"Primitives for schema and data structure\"\n s.version = '2.2.7.0'\n s.descri... | ruby | chosen |
[
{
"from": "system",
"value": "gemspec: Reduce list of files to be included"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"akami/version\"\n\nGem::Specification.new do |s|\n s.name = \"akami\"\n s.version = Akami:... | ruby | chosen |
[
{
"from": "system",
"value": "Add yard to development dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'webpay/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test of emptying cart\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass CartsControllerTest < ActionController::TestCase\n setup do\n @cart = carts(:one)\n end\n\n test \"should get index\" do\n get :index\n assert_response :success\n... | ruby | chosen |
[
{
"from": "system",
"value": "Migrate tests to Shoulda + machinist\n\ncloses #241\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/authenticated_controller_test'\nrequire 'shoulda'\nrequire 'admins_controller'\n\nclass AdminsControllerTest < AuthenticatedControllerTest\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct arg when building has many filters\n"
},
{
"from": "human",
"value": "module FilterHasMany\n extend ActiveSupport::Concern\n\n module ClassMethods\n def page(params = {}, scope = nil, context = {})\n filters = has_many_filterable_by.map do |fil... | ruby | chosen |
[
{
"from": "system",
"value": "Set up and fixed print script\n"
},
{
"from": "human",
"value": "module PrintHelper\nend\n"
},
{
"from": "gpt",
"value": "module PrintHelper\n\tDOMAIN = \"remote1.student.chalmers.se\"\n\tSSH_FILENAME = \".print/chalmersit.dat\"\n\t#Called to upload and ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix user_name helper; update profile_image helper\n"
},
{
"from": "human",
"value": "module UsersHelper\n def profile_image(user, size=24)\n user_image = user.authorizations && !user.authorizations.empty? ? user.authorizations.first.image : 'user.png'\n image... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor AM Validations into service - to be applied across the board\n"
},
{
"from": "human",
"value": "class StartRound\n attr_reader :round, :errors\n\n def initialize(game)\n @game = game\n @round = nil\n @errors = []\n end\n\n def call\n @game.w... | ruby | chosen |
[
{
"from": "system",
"value": "Update grants registration email address\n\nThis is the correct one we need to use.\n"
},
{
"from": "human",
"value": "class FundingForm::CheckAnswersController < ApplicationController\n def show\n render \"funding_form/check_answers\"\n end\n\n def submit\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add after sign up path\n"
},
{
"from": "human",
"value": "require_dependency \"ajo_register/application_controller\"\nclass AjoRegister::RegistrationsController < Devise::RegistrationsController\n def index\n end\n\n def new\n super\n end\n\n def create\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Delete pattern now noticed unused from coverage charts.\n"
},
{
"from": "human",
"value": "module PortableBridgeNotation\n module Internals\n module SingleCharComparisonConstants\n def whitespace_allowed_in_games\n /[ \\t\\v\\r\\n]/\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency on nokogiri to gemspec\n\nprepare_nfs_settings.rb requires nokogiri, and will fail if it is\nnot available. Adding this dependency causes 'vagrant plugin install\nvagrant-xenserver' to install nokogiri in .vagrant.d/gems/gems, where it\ncan be used by the plugi... | ruby | chosen |
[
{
"from": "system",
"value": "Use exclude instead of discard in the backtrace cleaner\n\nSigned-off-by: Sam Phippen <e5a09176608998a68778e11d5021c871e8fae93c@googlemail.com>\n"
},
{
"from": "human",
"value": "module RSpec\n module Core\n class BacktraceCleaner\n\n attr_accessor :include... | ruby | chosen |
[
{
"from": "system",
"value": "Add android support for getting version from git branch"
},
{
"from": "human",
"value": "module Fastlane\n module Actions\n class GetVersionNumberFromGitBranchAction < Action\n def self.run(params)\n if Helper.test?\n branch = 'releases/rele... | ruby | chosen |
[
{
"from": "system",
"value": "Create the tmp dir in the dummy app on setup"
},
{
"from": "human",
"value": "# makes sure the dummy app is properly initialized:\n# bundles required gems\n# drops/creates the databases\n# migrates the development database\n# dumps db structure for reference\n# remo... | ruby | chosen |
[
{
"from": "system",
"value": "Add description column to providers table\n"
},
{
"from": "human",
"value": "class CreateProviders < ActiveRecord::Migration\n def change\n create_table :providers do |t|\n t.string :name, null: false, default: nil\n t.string :identifier, null: false, ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Out Extraneous Data In Chrome Extension\n"
},
{
"from": "human",
"value": "post '/session' do\n\tp params\n\tuser1 = User.find_by(email: params[\"user1\"][\"email\"])\n\tuser2 = User.find_by(email: params[\"user2\"][\"email\"])\n\n\tif user1.authenticate(pa... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate review_requested_at for editions in review\n"
},
{
"from": "gpt",
"value": "class UpdateReviewRequestedAt < Mongoid::Migration\n def self.up\n Edition.in_review.each do |edition|\n request_review_action = edition.actions.where(:request_type => Action... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite experience points record ability component\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Course::ExperiencePointsRecordsAbilityComponent\n include AbilityHost::Component\n\n def define_permissions\n if user\n allow_staff_... | ruby | chosen |
[
{
"from": "system",
"value": "Use the metaphor of conflicts rather than taken\n"
},
{
"from": "human",
"value": "class SourceResolver\n def self.resolve(new_source)\n new(new_source).resolve\n end\n\n def initialize(new_source)\n @new_source = new_source\n end\n\n def resolve\n ret... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation notice related with use of class names\n\n```\nDEPRECATION WARNING: Passing a class as a value in an Active Record\nquery is deprecated and will be removed. Pass a string instead. (called\nfrom create_or_update at\napp/models/stats/statistic.rb:28)\n```\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sha256 mismatch error for Shapes app\n"
},
{
"from": "human",
"value": "cask :v1 => 'shapes' do\n version '4.4'\n sha256 '520c4fb4dc3580f713fd98e26cadf8495febe1bd0e553d3b8dbd2ebd9cad672f'\n\n url \"http://shapesapp.com/dist/Shapes_#{version}.zip\"\n name 'Sh... | ruby | chosen |
[
{
"from": "system",
"value": "Add gingerlime as a collaborator\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"rambulance/version\"\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Update to require yum-epel for all repository releases\n\nWebtatic EL5 and EL6 will be phasing out it's syncing of EPEL packages on 20th June. The EPEL repository will need to be configured by this point."
},
{
"from": "human",
"value": "#\n# Author:: Andy Thompson ... | ruby | chosen |
[
{
"from": "system",
"value": "Update DBeaver community to v3.3.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'dbeaver-community' do\n version '3.2.0'\n\n if Hardware::CPU.is_32_bit?\n sha256 '707e83f17e2dd0906d82f95b440064142424fbe18aceb1c1c1f66a78425c9ffc'\n url \"http://dbeaver.jkis... | ruby | chosen |
[
{
"from": "system",
"value": "Remove these lines because they are unnecessary if there are no retries\n"
},
{
"from": "human",
"value": "class CreateCustomerTokenWorker\n include Sidekiq::Worker\n sidekiq_options retry: false\n\n def perform(customer_id, card_token, charge_id)\n customer =... | ruby | chosen |
[
{
"from": "system",
"value": "Edit UI module\nAdd success method\nAdd newlines to and error warning\nUse message instead of expression\n"
},
{
"from": "human",
"value": "require 'colored'\n\nmodule Nehm::UI\n def self.error(expression)\n abort expression.red\n end\n\n def self.newline\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade HandBrake CLI to v0.10.1\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli' do\n version '0.10.0'\n sha256 '84dcc20cffd2cbbe1d7804dbb8dfdb4ce7ce78b2f44ae25a998f18771a9c05f9'\n\n url \"http://download.handbrake.fr/releases/#{version}/HandBrake-#... | ruby | chosen |
[
{
"from": "human",
"value": "Add the README as some rspecs\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) +'/../lib/ampex'\ndescribe \"&X\" do\n\n it \"should work as Symbol#to_proc\" do\n [1,2,3].map(&X.to_s).should == [\"1\", \"2\", \"3\"]\n end\n\n it \"should allow you... | ruby | chosen |
[
{
"from": "system",
"value": "Update RSpec syntax to `expect`\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Confs do\n subject { Confs::Client.new }\n\n describe 'speakers' do\n it 'returns the speakers list' do\n subject.speakers.count.should eq 15\n end\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix No such file or directory - bin/stash-*\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass StashUtils < Formula\n homepage 'https://github.com/denisura/homebrew-devel'\n url 'https://github.com/denisura/homebrew-devel.git'\n\n depends_on \"git\"\n\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.