conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make references to Server consistent\n\nChange-Id: I4e1857a198b73160a2a7f6e9e48b4e62ee1a6731\nReviewed-on: http://review.engineyard.com/97\nReviewed-by: Andre Arko <84de7f247766c9f87e4737d92fee235e10beaf0d@engineyard.com>\nTested-by: Andre Arko <84de7f247766c9f87e4737d92fee235e...
ruby
chosen
[ { "from": "system", "value": "Remove unused method in UserInfoScrubber" }, { "from": "human", "value": "class UserInfoScrubber\n\n DELETED_USER_NAME = 'deleted_user'\n DELETED_USER_EMAIL_DOMAIN = '@zooniverse.org'\n\n class ScrubDisabledUserError < StandardError; end\n\n def self.scrub_pers...
ruby
chosen
[ { "from": "system", "value": "Remove some oldies in Type.\n" }, { "from": "human", "value": "module Qrb\n class Type\n\n def initialize(name)\n unless name.nil? or name.is_a?(String)\n raise ArgumentError, \"String expected for type name, got `#{name}`\"\n end\n @name =...
ruby
chosen
[ { "from": "system", "value": "Add github repo as homepage\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"thermos/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name...
ruby
chosen
[ { "from": "system", "value": "Add version info to backend.\n" }, { "from": "human", "value": "ActiveAdmin.register_page \"Dashboard\" do\n\n menu :priority => 1, :label => proc{ I18n.t(\"active_admin.dashboard\") }\n\n content :title => proc{ I18n.t(\"active_admin.dashboard\") } do\n column...
ruby
chosen
[ { "from": "system", "value": "Add authors and email details to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/searcher/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"searcher\"\n s.version = Searcher::VERSI...
ruby
chosen
[ { "from": "system", "value": "Add recommendation report request + output\n" }, { "from": "human", "value": "require 'tiny_tds'\nrequire 'mws-rb'\nrequire 'yaml'\n\nrequire_relative 'fba_reconcile/tools'\nrequire_relative 'fba_reconcile/process'\nrequire_relative 'fba_reconcile/api'\nrequire_rela...
ruby
chosen
[ { "from": "system", "value": "Configure worker mpm parameters on ironbelly\n" }, { "from": "human", "value": "name \"planet\"\ndescription \"Role applied to all planet servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :bretth => { :status => :user },\n :planet => {\...
ruby
chosen
[ { "from": "human", "value": "Add code wars (7) - radio dj helper function\n" }, { "from": "gpt", "value": "# http://www.codewars.com/kata/561bbcb0fbbfb0f5010000ee/\n# --- iteration 1 ---\ndef longest_possible(playback)\n short_enough_songs = songs.select{ |s| num_secs(s[:playback]) <= playback ...
ruby
chosen
[ { "from": "system", "value": "Handle complete lack of changelog, not just no entry in the changelog.\n" }, { "from": "human", "value": "require 'tessellator/fetcher'\nrequire 'json'\nrequire 'kramdown'\n\nclass PuppyRun\n class GitHub\n class << self\n def changelog(repo, tag)\n ...
ruby
chosen
[ { "from": "system", "value": "Remove code for CIRCLECI, we use gitlab CI\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'simplecov'\n\nSimpleCov.start 'rails' do\n # TODO: interactors\n add_group 'Interactions', 'app/interactions'\nend\n\nif ENV['CIRCLE_ARTIFACTS']...
ruby
chosen
[ { "from": "system", "value": "Add index service standard rake task\n\nAlso index the service standard whenever we index all guides.\n" }, { "from": "human", "value": "namespace :rummager do\n desc \"index all published documents in rummager\"\n task index: :environment do\n Guide.all.each d...
ruby
chosen
[ { "from": "system", "value": "Handle the case when stream is no longer available and returns 404 error\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire \"rest-client\"\nrequire \"json\"\n\nmodule Twitchus\n class Checker\n def initialize(config = nil)\n @config = config\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug where we only want to delete an allele registry link if we don't have a matching CIViC variant (anymore)\n" }, { "from": "human", "value": "require 'rbconfig'\n\nclass UpdateAlleleRegistryIds < AlleleRegistryIds\n def perform(recurring = true)\n begin\n ...
ruby
chosen
[ { "from": "system", "value": "Use autodetected location. See b/116968956" }, { "from": "human", "value": "# Copyright 2018 Google, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a c...
ruby
chosen
[ { "from": "human", "value": "Add tests for connection caching\n" }, { "from": "gpt", "value": "require_relative 'test_helper'\n\nclass BaseTest < Test::Unit::TestCase\n context \"\" do\n teardown do\n reset_all\n end\n\n should \"reuse clients when the api key is the same\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Fix license type and tag\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"NSObject-SafeExpectations\"\n s.version = \"0.0.1\"\n s.summary = \"No more crashes getting unexpected values from a NSDictionary.\"\n s.homepage ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.0.2.7 to 0.0.2.8\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'raygun_client'\n s.version = '0.0.2.7'\n s.summary = 'Client for the Raygun API using the Obsidian HTTP cl...
ruby
chosen
[ { "from": "human", "value": "Drop postgresql databases even if there are active sessions.\n\nNeed to use `rake environment db:drop` for the initializer to be picked up.\n\nFrom http://www.krautcomputing.com/blog/2014/01/10/how-to-drop-your-postgres-database-with-rails-4/\n" }, { "from": "gpt", "...
ruby
chosen
[ { "from": "system", "value": "Use a random secret token\n\nWe don't use sessions in this application, but Rails needs a secret key\nbase anyway. A random value that changes between app deploys is fine.\n\nThis will stop brakeman from complaining.\n\nhttps://trello.com/c/aOOWxMxu\n" }, { "from": "hum...
ruby
chosen
[ { "from": "system", "value": "Add outputs accessor to allow iteration\n" }, { "from": "human", "value": "module CalcJSON\n\n class Calculation\n\n def initialize(model,options)\n @model = model\n options.each do |key,value|\n \tdefinition = @model.definitions.find {|definition...
ruby
chosen
[ { "from": "system", "value": "Use dereferenced schema by default\n\nWhy: So that building the schema does not take as long and works offline.\n" }, { "from": "human", "value": "module Circuitdata\n # SHOULD ONLY HOUSE COMMON FUNCTIONS ONLY\n\n require \"active_support/all\"\n require \"json-s...
ruby
chosen
[ { "from": "human", "value": "Add some indexes to diary entries to let recent entries be found\nefficiently for the various diary entry lists and feeds.\n\n\n" }, { "from": "gpt", "value": "class AddDiaryCreationIndexes < ActiveRecord::Migration\n def self.up\n add_index :diary_entries, [:cre...
ruby
chosen
[ { "from": "system", "value": "Create migration for adding Currents to schema\n\nMigration adds the Currents table and a column in ideas to reference a\ncurrent the idea belongs to.\n" }, { "from": "human", "value": "class CreateCurrents < ActiveRecord::Migration\n def change\n create_table :...
ruby
chosen
[ { "from": "system", "value": "Fix Answers controller to accept array for values\n" }, { "from": "human", "value": "class AnswersController < ApplicationController\n\n def create\n @answer = Content.find(params[:content_id]).answers.create(answer_params)\n end\n\n private\n def answer_para...
ruby
chosen
[ { "from": "system", "value": "Fix typo in environment variables\n" }, { "from": "human", "value": "require 'faraday'\nrequire 'json'\n\nclass SessionController < ApplicationController\n def callback\n if Rails.env == \"test\"\n session[:current_user_id] = \"123\"\n redirect_to root...
ruby
chosen
[ { "from": "system", "value": "Support fix amounts for charge templates.\n" }, { "from": "human", "value": "class ChargeBookingTemplate < BookingTemplate\n # Charge Rates\n def charge_rate(date = nil)\n ChargeRate.current(charge_rate_code, date)\n end\n \n def amount(date = nil)\n retu...
ruby
chosen
[ { "from": "system", "value": "Fix mysql issue when creating tables\n" }, { "from": "human", "value": "class RolifyCreateRoles < ActiveRecord::Migration[5.0]\n def change\n create_table :roles, options: 'ROW_FORMAT=DYNAMIC' do |t|\n t.string :name\n t.references :resource, polymorph...
ruby
chosen
[ { "from": "human", "value": "Set prediction data for existing planting and crops\n" }, { "from": "gpt", "value": "class SetPredictionData < ActiveRecord::Migration\n def change\n say \"Updating all plantings time to first harvest\"\n Planting.all.each(&:update_harvest_days)\n say \"Upd...
ruby
chosen
[ { "from": "system", "value": "Update ruby-graphviz dependency to ~> 1.2\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rails_erd/version\"\n\nGem::Specification.new do |s|\n s.name = \"rails-erd\"\n s.version = RailsERD::VERSION\n s.aut...
ruby
chosen
[ { "from": "system", "value": "Fix spec errors related to the StudentRegisteredForCourse model due to factory refactoring, all specs passes\n" }, { "from": "human", "value": "describe StudentRegisteredForCourse do\n let(:given_course) { create(:given_course) }\n let(:user) { create(:user) }\n ...
ruby
chosen
[ { "from": "system", "value": "Sort editable channels by authority\n" }, { "from": "human", "value": "class ChannelManager\n def initialize(gu)\n @gu = gu\n end\n\n def editable_channels(limit=nil)\n @channels = @gu.channels.to_a\n # TODO: wtf?\n @username = @gu.user.username\n ...
ruby
chosen
[ { "from": "system", "value": "Move JsonParser Module to Class\n" }, { "from": "human", "value": "module JsonParser\n def self.parse(input)\n if input == '[]'\n []\n elsif input == '{}'\n {}\n else\n nil\n end\n end\nend\n" }, { "from": "gpt", "value": "cl...
ruby
chosen
[ { "from": "human", "value": "Define slug_path and slug_url helpers" }, { "from": "gpt", "value": "module SlugHelper\n \n def slug_path(content)\n if content.respond_to?(:slug)\n slug_engine.permalink_path(content.slug)\n else\n polymorphic_path(content)\n end\n end\n \n d...
ruby
chosen
[ { "from": "system", "value": "Improve subject line of new event emails\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass EventEmailSubscriberMailer < ApplicationMailer\n default from: 'Hack Club Hackathons <hackathons@hackclub.com>'\n\n def confirm_email(subscriber)\n ...
ruby
chosen
[ { "from": "system", "value": "Reduce complexity of events handler\n" }, { "from": "human", "value": "module V1\n module Hackbot\n class WebhooksController < ApplicationController\n def interactions\n payload = JSON.parse(params[:payload], symbolize_names: true)\n event = i...
ruby
chosen
[ { "from": "system", "value": "Use request path for World Location News\n\nWe are currently using a path that doesn't contain the locale when\nrequesting World Location News from the content store.\n\nThis means we can't currently show anything other than English content.\n\nChanging to `request.path` means ...
ruby
chosen
[ { "from": "system", "value": "Tag for removal : API's :secret, Milord.\n" }, { "from": "human", "value": "module Mashery\n class API\n attr_accessor :region, :secret, :key\n\n def initialize args\n args.each do |k,v|\n instance_variable_set(\"@#{k}\", v) unless v.nil?\n e...
ruby
chosen
[ { "from": "system", "value": "Update Delayed Job dependency to 3.0.0.pre2" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'delayed_job_mongoid'\n s.summary = \"Mongoid backend for delayed_job\"\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Remove gems we don't need\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'baseball_stats/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Add the shell for the code that will hand the success and failure of the callback\n" }, { "from": "human", "value": "class Auth0Controller < ApplicationController\n<<<<<<< HEAD\ndef callback\n # This stores all the user information that came from Auth0\n # and...
ruby
chosen
[ { "from": "system", "value": "Fix routing error on heroku\n" }, { "from": "human", "value": "class PagesController < ApplicationController\n\ndef create\n @page = Page.create()\n @css = Csscode.create(page_id: @page.id, code:params['csscode']['code'])\n @html = Htmlcode.create(page_id: @page...
ruby
chosen
[ { "from": "system", "value": "Correct redirect to in rates controller to fix bug\n" }, { "from": "human", "value": "class RatesController < ApplicationController\n def create\n value = Integer(params[:value])\n submission_id = Integer(params[:submission_id])\n user_id = current_user.id...
ruby
chosen
[ { "from": "system", "value": "Add logic to votes controller\n" }, { "from": "human", "value": "class VotesController < ApplicationController\n\n def create\n @vote = Vote.new(vote_params)\n @vote.voter_id = current_user.id\n if vote.save\n flash[:success] = \"T...
ruby
chosen
[ { "from": "system", "value": "Create skip channel array for scanner\n\nSome channels are black holes, requiring the remote to continue.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire_relative '../rlib/sky_commands.rb'\n\nsky_cli = SkyCommands.new\n\n#Look for channels not in my ...
ruby
chosen
[ { "from": "human", "value": "Add knife digital_ocean image destroy -I <id>\n" }, { "from": "gpt", "value": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ...
ruby
chosen
[ { "from": "system", "value": "Fix rackup file to use new app path\n" }, { "from": "human", "value": "require File.expand_path('../pakyow', __FILE__)\n\napp = Pakyow::App\napp.builder.run(app.stage(ENV['APP_ENV'] || ENV['RACK_ENV']))\nrun app.builder.to_app\n" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "system", "value": "Add created_at to project search result\n" }, { "from": "human", "value": "class ProjectSearchResult\n include Status\n\n attr_reader :language\n attr_reader :platform\n attr_reader :name\n attr_reader :description\n attr_reader :status\n attr_reader :latest_...
ruby
chosen
[ { "from": "system", "value": "Fix iteration order on summary page\n\nThe iterations were being listed in reverse order (\"Iteration 1\" being\nthe last submission and \"Iteration 7\" being the first).\n" }, { "from": "human", "value": "class ExercismApp < Sinatra::Base\n\n get '/user/:language/...
ruby
chosen
[ { "from": "system", "value": "Switch back to switching locale forth and back." }, { "from": "human", "value": "class Task::Comments::Base < Mutations::Command\n required do\n model :task\n model :user\n string :message\n end\n\n def execute\n attrs = { item: task, commenter: Task:...
ruby
chosen
[ { "from": "system", "value": "Add a method to all products\n" }, { "from": "human", "value": "class Business < ActiveRecord::Base\n has_many :products\n\n has_many :business_staffs\n has_many :business_urls\n\n image_accessor :logo\n\n accepts_nested_attributes_for :business_urls, :reject_i...
ruby
chosen
[ { "from": "system", "value": "Remove code associated with trains\n\ngit-svn-id: 580bd9fa1c05b46825c6f0daa1e3fea71c2c7222@5484 b293a2d2-da53-4cb3-b1bf-c591e3edcd7a\n" }, { "from": "human", "value": "class Delivery < ActiveRecord::Base\n \n include AmeeCarbonStore\n has_carbon_data_stored_in_am...
ruby
chosen
[ { "from": "system", "value": "Include 'true' and 'false' in statistics\n\nhttp://chat.stackexchange.com/transcript/message/26994116#26994116" }, { "from": "human", "value": "class Feedback < ActiveRecord::Base\n belongs_to :post\n\n def is_positive?\n self.feedback_type.include? \"tp\"\n e...
ruby
chosen
[ { "from": "system", "value": "Allow for nil country in country_name\n" }, { "from": "human", "value": "class Location < ActiveRecord::Base\n belongs_to :space, touch: true\n\n has_many :members\n has_many :resources\n has_many :plans\n\n def description\n self.name || \"#{self.address}, ...
ruby
chosen
[ { "from": "system", "value": "Change validation for type from format_of to inclusion_of; For now, if the item isn't found we're gonna create it. This could lead to all kinds of invalid Item entries being created.\n" }, { "from": "human", "value": "class Wishlist < ActiveRecord::Base\n # Relatio...
ruby
chosen
[ { "from": "system", "value": "Add command-line option to print version.\n" }, { "from": "human", "value": "require 'thor'\nrequire 'launchy'\n\nmodule Rdb\n class CommandLine < Thor\n desc '[--host <host>] [--port <port>]', 'Start debug server.'\n options :port => :integer, :host => :stri...
ruby
chosen
[ { "from": "human", "value": "Move HashBag to it's own class files\n" }, { "from": "gpt", "value": "# Hash that keeps a count for each key\nclass HashBag < Hash\n\n def initialize\n @counts = {}\n super\n end\n\n def []=(key, value)\n count = count(key)\n count = count + 1\n @co...
ruby
chosen
[ { "from": "system", "value": "Add lib directory to autoload paths\n\nSince the upgrade to Rails 6 RSpec can no longer load files in the lib\ndirectory when running their tests, so this adds the lib directory to\nautoload_paths config to resolve this.\n" }, { "from": "human", "value": "require_re...
ruby
chosen
[ { "from": "system", "value": "Support :empty handling in header mode\n" }, { "from": "human", "value": "module Dap\nmodule Input\n\n require 'csv'\n\n #\n # CSV\n #\n class InputCSV\n\n include FileSource\n\n attr_accessor :has_header, :headers\n\n def initialize(args)\n self....
ruby
chosen
[ { "from": "system", "value": "Make `TimedQueue` use `pop`/`push` for better performance.\n" }, { "from": "human", "value": "require 'thread'\nrequire 'timeout'\n\nclass TimedQueue\n def initialize(size = 0)\n @que = Array.new(size) { yield }\n @mutex = Mutex.new\n @resource = Condition...
ruby
chosen
[ { "from": "system", "value": "Fix search session with instance\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n # @author VAILLANT jeremy <jeremy.vaillant@dazl.tv>\n\n # # RubyRabbitmqJanus - Task\n #\n # This class is used with rake task.\n cla...
ruby
chosen
[ { "from": "system", "value": "Return launcher-compatible (ie non-animated) image in playlist API response.\n" }, { "from": "human", "value": "json.title game.title\njson.slug game.slug\njson.min_players game.min_players\njson.max_players game.max_players\njson.descri...
ruby
chosen
[ { "from": "system", "value": "Define NSW in the PublicBody Module\n" }, { "from": "human", "value": "# Add a callback - to be executed before each request in development,\n# and at startup in production - to patch existing app classes.\n# Doing so in init/environment.rb wouldn't work in developm...
ruby
chosen
[ { "from": "human", "value": "Add utility script to emit list of file sizes after minification/gzip." }, { "from": "gpt", "value": "files = Dir[\"lib/sproutcore-runtime/lib/**/*.js\"] + Dir[\"lib/sproutcore-views/**/*.js\"]\n\ndef uglify(string)\n IO.popen(\"uglifyjs\", \"r+\") do |io|\n io.p...
ruby
chosen
[ { "from": "system", "value": "Add --editor option to CLI\n" }, { "from": "human", "value": "require 'projector'\nrequire 'thor'\n\nmodule Projector\n class CLI < Thor\n attr_accessor :projections\n\n def initialize(*)\n @projections = Projector::Projections.new\n @projections.lo...
ruby
chosen
[ { "from": "system", "value": "Fix crash. When not exist id\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nmodule Redisable\n module Key\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n # return model_name:id:field_name\n d...
ruby
chosen
[ { "from": "system", "value": "Introduce default_https.\r\nThis gives us the possibility to configure if https should be used to connect to the satellite.\r\n\r\nThis is change 2/2 to enable the one of the workaround in https://github.com/kyzh/ruby-rhn_satellite/issues/1\r\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Add destroy method of User Controller\n" }, { "from": "human", "value": "class UserController < ApplicationController\n before_action :logged_in?, except: [:new,:create,:user_params]\n def new\n\t\t@user = User.new\n @user.build_department_assistant\n @user....
ruby
chosen
[ { "from": "system", "value": "Put back syncer command as a synonym for rsync-auto\n" }, { "from": "human", "value": "module Vagrant\n module Syncer\n class Plugin < Vagrant.plugin(2)\n\n name \"Syncer\"\n\n description <<-DESC\n Watches for changed files on the host and rsyncs...
ruby
chosen
[ { "from": "system", "value": "Handle empty profiles from oauth\n" }, { "from": "human", "value": "class OauthController < ApplicationController\n\n def create\n auth = request.env[\"omniauth.auth\"]\n user = User.find_by_provider_and_uid(auth[\"provider\"], auth[\"uid\"])\n\n if user.n...
ruby
chosen
[ { "from": "system", "value": "Add another useful rake task\n" }, { "from": "human", "value": "namespace :roles do\n desc 'Add a role to a user, e.g. `rake roles:add[yehudah.ns@zoho.com,admin]`'\n task :add, [:email, :role] => [:environment] do |t, args|\n raise ArgumentError.new('No email s...
ruby
chosen
[ { "from": "system", "value": "Make whenever properly read the S3 bucket\n\nFor unknown reasons the magic\n[Figaro](https://github.com/laserlemon/figaro) does to turn keys in\n`config/application.yml` into ENV vars that can be read through Ruby's\n`ENV[]` is not working in `config/schedule.rb`.\n\nAs a resul...
ruby
chosen
[ { "from": "system", "value": "Convert config method into a one liner\n" }, { "from": "human", "value": "require \"webhookr/engine\"\n\nmodule Webhookr\n extend ActiveSupport::Autoload\n\n autoload :InvalidPayloadError\n autoload :AdapterResponse\n autoload :Service\n autoload :VERSION\n\n ...
ruby
chosen
[ { "from": "human", "value": "Add Redis Desktop Manager 0.6.2\n" }, { "from": "gpt", "value": "class RedisDesktopManager < Cask\n url 'https://github.com/uglide/RedisDesktopManager/releases/download/0.6.2/rdm-0.6.2.dmg'\n homepage 'http://redisdesktop.com'\n version '0.6.2'\n sha1 '9b76691d37...
ruby
chosen
[ { "from": "system", "value": "Use of custom objects is not necessary here\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cheat/version'\n\nGem::Specification.new do |spec|\n spec.a...
ruby
chosen
[ { "from": "system", "value": "Add github homepage to 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 'keyword_curry/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Reset global state properly (calculator was cached)" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe RackRequestIPStrategies do\n describe 'default config' do\n it 'uses results from X-Forwarded-For when available' do\n env = { 'HTTP_X_FOR...
ruby
chosen
[ { "from": "system", "value": "Fix for Rails 3.1 Beta.\n" }, { "from": "human", "value": "module InheritedResourcesViews\n module ActionView\n def self.included(base)\n base.class_eval do\n def self.process_view_paths(value)\n PathSet.new(Array.wrap(value))\n end\n...
ruby
chosen
[ { "from": "system", "value": "Address review feedback, minimize returned data\n\nSigned-off-by: Stuart Preston <1c8c08db85a36cc69d975124539be839dea91342@chef.io>\n" }, { "from": "human", "value": "#\n# Author:: Stuart Preston (<stuart@chef.io>)\n# Copyright:: Copyright (c) 2018, Chef Software In...
ruby
chosen
[ { "from": "system", "value": "Add integration test to see that PHP version is not exposed in app page header\n\n[#95368312]\n\nSigned-off-by: Colin Jackson <a89a308d481f83b953c5ad185298958072312fde@gmail.com>\n" }, { "from": "human", "value": "$: << 'cf_spec'\nrequire 'cf_spec_helper'\n\ndescrib...
ruby
chosen
[ { "from": "system", "value": "Add close dispute and update dispute request handlers\n" }, { "from": "human", "value": "module StripeMock\n module RequestHandlers\n module Disputes\n\n def Disputes.included(klass)\n klass.add_handler 'get /v1/disputes/(.*)', :get_dispute\n ...
ruby
chosen
[ { "from": "system", "value": "Add ActiveRecord 3+ as a dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'metricular/version'\n\nGem::Specification.new do |spec|\n spec.name...
ruby
chosen
[ { "from": "system", "value": "Fix passenger app restart command for capistrano.\n" }, { "from": "human", "value": "server '0.0.0.0', user: 'myuser', roles: [:web, :app, :db], primary: true, asset_host_syncher: true\n\nset :rails_env, 'production'\n\nset :application, 'sp-gestion.fr'\n\n# ask :br...
ruby
chosen
[ { "from": "human", "value": "Add script to push all non-specialist-guides back to draft.\n\nThis script will find all documents (except Specialist Guides), and\nensure that there is only one version of each, set to draft. This\nwill help writers/editors re-use any still-useful content, whilst\npreventing st...
ruby
chosen
[ { "from": "system", "value": "FIX: Add missing HelpdeskSessions class call\n" }, { "from": "human", "value": "require 'grape'\n\nmodule Api\n module Helpdesk\n #\n # Helpdesk session system endpoints\n #\n class Stats < Grape::API\n helpers AuthHelpers\n helpers Authorisat...
ruby
chosen
[ { "from": "system", "value": "Add new message when rendering conversation\n" }, { "from": "human", "value": "# controller for the dashboard\nclass DashboardController < ApplicationController\n before_action :authenticate_user!\n\n def account\n end\n\n def billing\n end\n\n def inbox\n ...
ruby
chosen
[ { "from": "system", "value": "Complete new action, create create and show actions\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n before_filter :authenticate_user!\n\n def index\n @questions = Question.all\n end\n\n def new\n end\nend\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Change flash message to be a now alert to match current css styling\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n def index\n end\n\n def new\n if logged_in?\n @question = Question.new\n @tag = Tag.new\n el...
ruby
chosen
[ { "from": "system", "value": "Add session[:current_user] driver test to see if it is nil.\n" }, { "from": "human", "value": "class ResponsesController < ApplicationController\n\n before_action :set_response, only: [:edit, :update, :destroy]\n\n def new\n @response = Response.new\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix render conditionals for timeslot show\n" }, { "from": "human", "value": "class TimeslotsController < SecuredController\n def show\n @timeslot = Timeslot.find(params[:id])\n render '/timeslots/show'\n end\n\n def update\n @timeslot = Timeslot.find_by(...
ruby
chosen
[ { "from": "system", "value": "Use slug as ID in Idea request specs\n\nSince Ideas use FriendlyID, the slug of the Idea must be used as the ID\nwhen requesting the 'edit' Idea path.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe \"IdeaRequests\" do\n before do\n @user = ...
ruby
chosen
[ { "from": "system", "value": "Fix warning raised when building 4.2 version\n\nFix README extensions on gemspec, raising a warning when building the gem.\nThis was introduced by this commit c548aa4.\n" }, { "from": "human", "value": "Gem::Specification.new do |spec|\n spec.name = 'prototype-...
ruby
chosen
[ { "from": "system", "value": "Correct helper for group LFS status.\n" }, { "from": "human", "value": "module GroupsHelper\n def can_change_group_visibility_level?(group)\n can?(current_user, :change_visibility_level, group)\n end\n\n def group_icon(group)\n if group.is_a?(String)\n ...
ruby
chosen
[ { "from": "system", "value": "Allow env for DistrictConfigLog.seed_for_development_and_test! for demo\n" }, { "from": "human", "value": "# Stores configuration that folks in the district ideally would manage on their\n# own. In other words, this shouldn't be config that handles internals about\...
ruby
chosen
[ { "from": "system", "value": "Disable LOINC validator for answer codes\n\nOur validator is still missing this functionality.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass LabTestValue < ApplicationRecord\n has_many :lab_test_value_option_joints, dependent: :destroy\n...
ruby
chosen
[ { "from": "system", "value": "Remove now unnecessary `additional_rules!` method from GroupPolicy\n\nThe intention was for this to be used to override group policy in\nEE. This led to all sort of strange problems in practice - for\nexample, https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1025\nneeded ...
ruby
chosen
[ { "from": "system", "value": "Add config.secret_key_base to remove deprecation warning.\n" }, { "from": "human", "value": "# This is an absolute minimal Rails application\n\nrequire 'rails'\nrequire 'action_controller/railtie'\n\nclass Dummy < Rails::Application\n config.session_store :cookie_s...
ruby
chosen
[ { "from": "system", "value": "Add test-unit as development dependency for ruby 2.2\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n\nGem::Specification.new do |spec|\n spec.name = \"fluent-plugin-buffer-ephemeral\"\n spec.version =...
ruby
chosen
[ { "from": "system", "value": "Change the podspec to tag 0.0.9\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CUtil\"\n s.version = \"0.0.8\"\n s.summary = \"CUtil is a common utilities collection. It is designed as a tool-box for iOS development.\"\n s...
ruby
chosen
[ { "from": "system", "value": "Add description, summary, and homepage\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'webtrends/version'\n\nGem::Specification.new do |spec|\n spec.na...
ruby
chosen