conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix build command in podspec.\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n spec.name = 'ReactantUI'\n spec.version = '0.1.0'\n spec.summary = 'Reactant extension for UI declaration in XML'\n spec.description ...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'code42/version'\n\nGem::Specification.new do |gem|\n gem...
ruby
chosen
[ { "from": "system", "value": "Add methods to fill out Check Run POST payload\n" }, { "from": "human", "value": "require 'travis/github_apps'\n\nmodule Travis\n module Addons\n module GithubCheckStatus\n class Task < Travis::Task\n\n private\n\n def headers\n {\n ...
ruby
chosen
[ { "from": "system", "value": "Verify we have errors to show if we're going to show them\n" }, { "from": "human", "value": "require \"vagrant/util/template_renderer\"\n\nmodule Vagrant\n module Action\n module Builtin\n # This class validates the configuration and raises an exception\n ...
ruby
chosen
[ { "from": "system", "value": "Update NotificationRule model to correctly validate permitted actions against their associated class\n" }, { "from": "human", "value": "class NotificationRule < ActiveRecord::Base\n include ActiveModel::ForbiddenAttributesProtection\n ACTIONS = %w( create update )...
ruby
chosen
[ { "from": "system", "value": "Fix task definition map settings\n" }, { "from": "human", "value": "class ReviewAppTarget\n include ActiveModel::Model\n\n attr_accessor :repository, :branch, :pr_number\n\n validates :repository, presence: true\n validates :branch, presence: true\n validates :...
ruby
chosen
[ { "from": "system", "value": "Fix new dependencies and Migrations\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"catarse_stripe/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new d...
ruby
chosen
[ { "from": "system", "value": "Check to see if the play list is empty first.\n\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n#\n# Copyright (C) 2008 by Nicholas J Humfrey\n#\n\n$:.unshift File.dirname(__FILE__)+'/../lib'\n\nrequire 'mpris'\n\nmpris = Mpris.new\n\n# Get the number of tracks ...
ruby
chosen
[ { "from": "system", "value": "Fix implementation of \"ArrayCache\" class\n" }, { "from": "human", "value": "module Sastrawi\n module Stemmer\n module Cache\n class ArrayCache\n attr_accessor :data\n\n def initialize\n @data = Hash.new\n end\n\n def s...
ruby
chosen
[ { "from": "system", "value": "Update gem version to 0.4.1\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nGem::Specification.new do |spec|\n spec.name = \"no-style-please\"\n spec.version = \"0.3.1\"\n spec.authors = [\"Riccardo Graziosi\"]\n spec.ema...
ruby
chosen
[ { "from": "system", "value": "Add timeout to integration tests and retry on timeout\n\n[#138839265]\n\nSigned-off-by: Dave Goddard <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@goddard.id.au>\nSigned-off-by: Anna Thornton <0e9b4a17e1cf85a71a11118ecdbc866e5f8ffc65@pivotal.io>\n" }, { "from": "human", ...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect name in gemspec\n" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'cancanright/version'\n\nGem::Specification.new do |s|\n s.name = 'blush'\n s.version = CanCanRight::Version\n s.date = '201...
ruby
chosen
[ { "from": "system", "value": "Fix breaking change in Sentry SDK\n\nThis was renamed in sentry-raven 2.7.0: https://github.com/getsentry/raven-ruby/pull/743\n\nWe updated from sentry-raven 2.4.0 to 2.9.0 in #132, but we have no test\ncoverage here, so we didn't spot it.\n" }, { "from": "human", "...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect order total from Spree to BrightPearl\n" }, { "from": "human", "value": "module Spree\n class BpOrderRow < Brightpearl\n\n def initialize(line_item)\n super()\n @line_item = line_item\n end\n\n def save\n Nacre::API::OrderRow.c...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect datetime in API\n" }, { "from": "human", "value": "object @user\n\nattributes :id,\n :household_size,\n :name\n\nnode(:mission) { |user| user.mission_id.nil? ? 'N/A' : user.mission.name }\nnode(:purchases_count) { |user| user.purcha...
ruby
chosen
[ { "from": "system", "value": "Fix variable name typo, Fix ServerInstance argument syntax\n" }, { "from": "human", "value": "service 'ReportServer' do\n action [:start, :enable]\nend\n\npowershell_script \"Configure SSRS\" do\n code <<-EOH\n $rsConfig = Get-WmiObject -namespace \"root\\\\Micro...
ruby
chosen
[ { "from": "system", "value": "Use the kernel_parameter inspec resource\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "if (os[:family] == 'redhat' && os[:release].start_with?('6')) || os[:name] == 'amazon' || os[:family] == 'suse'...
ruby
chosen
[ { "from": "human", "value": "Add Appium test for Searching Poems\n" }, { "from": "gpt", "value": "# coding: utf-8\nrequire_relative 'spec_helper'\n\ndescribe '歌を検索するテスト' do\n\n it 'アプリのタイトルが正しく表示される' do\n can_see(TITLE)\n end\n\n describe '検索窓に文字を入力すると、歌を絞り込むことができる' do\n it '歌選択画面を開く' d...
ruby
chosen
[ { "from": "human", "value": "Add shindo tests for requests methods for block storage.\n" }, { "from": "gpt", "value": "Shindo.tests('Fog::BlockStorage[:hp] | volume requests', ['hp', 'block_storage']) do\n\n @volume_format = {\n 'status' => String,\n 'displayDescription' => St...
ruby
chosen
[ { "from": "system", "value": "Update OpenRA to Release 2015-04-24\n" }, { "from": "human", "value": "cask :v1 => 'openra' do\n version '20141029'\n sha256 '421f341d324e2e360cf17facc1379b19036f7459516b84685037a041d5020e64'\n\n # github.com is the official download host per the vendor homepage\...
ruby
chosen
[ { "from": "system", "value": "Add rough description of purpose of Post model\n" }, { "from": "human", "value": "class Post < ActiveRecord::Base\n belongs_to :user\n belongs_to :content, polymorphic: true\n attr_accessible :content\nend\n" }, { "from": "gpt", "value": "# Record whe...
ruby
chosen
[ { "from": "system", "value": "Add macOS/osx target to podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'MulticastDelegateSwift'\n s.version = '2.0.1'\n s.platform = :ios, '8.0'\n s.license = { :type => 'MIT'}\n s.summary = 'Swift Multicast Delegate'\n s.hom...
ruby
chosen
[ { "from": "system", "value": "Fix parameters passed to create\n" }, { "from": "human", "value": "class User\n include Mongoid::Document\n include Mongoid::Timestamps\n\n validates :email, :presence => true, :email => true\n\n field :principal_name, type: String\n field :first_name, type: St...
ruby
chosen
[ { "from": "system", "value": "Add eager loading for authors\n" }, { "from": "human", "value": "# Zine\nclass Zine < ActiveRecord::Base\n attr_accessible :title,\n :excerpt,\n :subtitle,\n :full_text,\n :published,\n ...
ruby
chosen
[ { "from": "system", "value": "Fix name from old template name to actual Bitkassa name\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"bitkassa\"\n s.version = \"0.0.1\"\n s.summary = \"Hola!\"\n s.description = \"Ruby interface to the Bitkassa AP...
ruby
chosen
[ { "from": "system", "value": "Remove VCR as a dependency\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n#\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'hello_sign/version'\n\nGem::Specification.new do |gem|\n gem....
ruby
chosen
[ { "from": "system", "value": "Add bios to the auto-generated dev users\n\n(so they can edit proposals)\n" }, { "from": "human", "value": "Rails.application.config.middleware.use OmniAuth::Builder do\n require 'openid/store/filesystem' \n\n if %w[development preview].include?(Rails.env) && Acti...
ruby
chosen
[ { "from": "system", "value": "Add API endpoints for checking OBS project\n" }, { "from": "human", "value": "#!/usr/bin/ruby\n\nrequire \"sinatra\"\n\nrequire_relative \"../server/server_base.rb\"\n\nCERT_DIR = File.dirname(__FILE__)\n\nconfigure_sinatra\n\nget '/' do\n \"I'm the secure OBS serv...
ruby
chosen
[ { "from": "system", "value": "Revert \"Use Rake under 11\"\n\nThis reverts commit 1bb7e8bb64006e0446c765eb22d4db5f86708348.\n\nReason: We're no longer depending on RSpec 2\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unle...
ruby
chosen
[ { "from": "system", "value": "Add limit `:rubygems => \">= 2\"`\n\nBecause those specs are failed with old RubyGems.\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire \"spec_helper\"\nrequire \"bundler/installer/gem_installer\"\n\nRSpec.describe Bundler::GemInstaller do\n...
ruby
chosen
[ { "from": "system", "value": "Fix it even though it's unused\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# These are the monkeypatches to replace the default #load in order\n# to instrument the code before it gets run.\n# For now, this is not used, and may never be. The t...
ruby
chosen
[ { "from": "system", "value": "Add another test for tags\n" }, { "from": "human", "value": "include AuthHelper\n\ndescribe Admin::TagsController, type: :controller do\n let!(:admin) { Profile.create!(FactoryGirl.attributes_for(:admin)) }\n let!(:non_admin) { Profile.create!(FactoryGirl.attribut...
ruby
chosen
[ { "from": "system", "value": "Fix `Space inside {} missing` issue\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Api::V1::PlaysController < ApplicationController\n before_action :authenticate, except: [:index, :create]\n\n def index\n @plays = Play.page(params[:page...
ruby
chosen
[ { "from": "system", "value": "Add css class to taxon links.\n" }, { "from": "human", "value": "module Spree\n module BaseHelper\n\n def taxons_tree(root_taxon, current_taxon, max_level = 1)\n return '' if max_level < 1 || root_taxon.children.empty?\n content_tag :ul, class: 'taxons...
ruby
chosen
[ { "from": "system", "value": "Add version constraint on cucumber\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cucumber_tricks/version'\n\nGem::Specification.new do |spec|\n spec....
ruby
chosen
[ { "from": "system", "value": "Add key as allowed param\n\nGoogle's timezone API documentation indicates that all apps should use\nan API key for requests.\nhttps://developers.google.com/maps/documentation/timezone/#api_key\n\nThe \"key\" parameter was not in the list of allowed_params and would be\nrejected...
ruby
chosen
[ { "from": "system", "value": "Define and redefine :location to quell warnings\n" }, { "from": "human", "value": "module Minitest\n def self.plugin_fail_options opts, options\n opts.on \"--fail\", \"Fail on an empty test\" do\n Fail.fail!\n end\n end\n\n def self.plugin_fail_init op...
ruby
chosen
[ { "from": "system", "value": "Use define_method to set location\n" }, { "from": "human", "value": "module Minitest\n def self.plugin_fail_options opts, options\n opts.on \"--fail\", \"Fail on an empty test\" do\n Fail.fail!\n end\n end\n\n def self.plugin_fail_init options = {}\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug with threads not running concurrently.\n" }, { "from": "human", "value": "module Nigel\n module Commands\n class Flood\n def self.process(options)\n\n Google::Search::Image.new(\n query: 'Nigel Thornberry').each_with_index do |image,...
ruby
chosen
[ { "from": "system", "value": "Fix executables line in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)\nrequire 'radar/version'\n\nGem::Specification.new do |s|\n s.name = \"radar\"\n s.version = Radar::VER...
ruby
chosen
[ { "from": "system", "value": "Fix some incompatibilities with certain Ruby runtimes.\n" }, { "from": "human", "value": "module Songkickr\n class ResultSet\n attr_accessor :page, :per_page, :total_entries, :results, :result_type, :result_key_string, :status\n\n def initialize(result_hash =...
ruby
chosen
[ { "from": "system", "value": "Change the conditions for class loading\n" }, { "from": "human", "value": "require 'spree_core'\n\nmodule SpreeFlexiVariants\n class Engine < Rails::Engine\n\n config.autoload_paths += %W(#{config.root}/lib)\n\n def self.activate\n Dir.glob(File.join(Fil...
ruby
chosen
[ { "from": "human", "value": "Patch CanCan deprecated keyword arguments\n\nSolves an issue with use of deprecated positional args. The version of CanCan which fixes this is not currently compatible with OFN...\n" }, { "from": "gpt", "value": "module CanCanUnauthorizedMessage\n # Fix deprecated s...
ruby
chosen
[ { "from": "system", "value": "Fix specs that were dependent on Department yaml file content\n\nThese now require record creation\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe ImportContacts::ContactBuilder do\n describe '.build' do\n let(:contact_record) { build :conta...
ruby
chosen
[ { "from": "human", "value": "Add a CocoaPods podspec to the repo\n" }, { "from": "gpt", "value": "\nPod::Spec.new do |s|\n\n s.name = \"MCPopupOverlay\"\n s.version = \"0.0.1\"\n s.summary = \"A generic popup view class.\"\n s.homepage = \"http://www.mushroomcloud.co.za...
ruby
chosen
[ { "from": "system", "value": "Use the new package for java 6 that works on el capitan with rootless mode enabled.\n" }, { "from": "human", "value": "cask :v1 => 'java6' do\n version '1.6.0_65'\n sha256 '97bc9b3c47af1f303710c8b15f2bcaedd6b40963c711a18da8eac1e49690a8a0'\n\n url 'http://support....
ruby
chosen
[ { "from": "system", "value": "Update bison deb to available version\n" }, { "from": "human", "value": "arch = kernel['machine'] =~ /x86_64/ ? \"amd64\" : \"i386\"\nfilename = \"bison_2.4.1.dfsg-3_#{arch}.deb\"\n\ndefault[:bison] = {\n :filename => filename,\n :url => \"http://ftp.us.d...
ruby
chosen
[ { "from": "system", "value": "Load niceql in the test environment\nSo useful for debugging!\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"bundler/setup\"\nrequire \"pry\"\n\nrequire_relative \"../../lib/active_record_where_assoc\"\nrequire \"active_support\"\n\nre...
ruby
chosen
[ { "from": "human", "value": "Add a cumulus_bond test recipe\n" }, { "from": "gpt", "value": "#\n# Cookbook Name:: cumulus-test\n# Recipe:: bonds\n#\n# Copyright 2015, Cumulus Networks\n#\n# All rights reserved - Do Not Redistribute\n#\n\ncumulus_bond 'bond0' do\n slaves ['swp1-2', 'swp4']\n cl...
ruby
chosen
[ { "from": "system", "value": "Add rails dependency 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 'rspec_profiling/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "Stop using respond with in order to render the right view in the right circumstances\n" }, { "from": "human", "value": "class Users::NotificationRulesController < ApplicationController\n before_filter :authenticate_user!\n\n def index\n @notification_rules = cu...
ruby
chosen
[ { "from": "system", "value": "Verify ims import data params separately\n\n" }, { "from": "human", "value": "class Api::ImsImportsController < ApplicationController\n include Concerns::CanvasImsccSupport\n\n def create\n if params[:data] && params[:data][:lti_launches].present?\n lti_la...
ruby
chosen
[ { "from": "system", "value": "Add catalog configuration to display title/creator\n" }, { "from": "human", "value": "##\n# Simplified catalog controller\nclass CatalogController < ApplicationController\n include Blacklight::Catalog\n\n configure_blacklight do |config|\n config.show.oembed_fi...
ruby
chosen
[ { "from": "system", "value": "Remove unused attributes in story chapters API call\n" }, { "from": "human", "value": "json.merge! chapter.as_json\njson.node_ids chapter.nodes.pluck :id\njson.relation_ids chapter.relations.pluck :id\n" }, { "from": "gpt", "value": "json.ignore_nil!\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix code formatting in gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/dm-sqlite-adapter/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'dm-sqlite-adapter'\n gem.summary = 'Sqli...
ruby
chosen
[ { "from": "system", "value": "Update the gem spec's \"homepage\" property.\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.require_paths = ['lib']\n s.na...
ruby
chosen
[ { "from": "system", "value": "Allow cross origin requests during development\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :productio...
ruby
chosen
[ { "from": "system", "value": "Remove describe method only when defined" }, { "from": "human", "value": "ENV['RAILS_ENV'] = 'test'\nrequire 'simplecov'\n\nSimpleCov.start do\n add_filter 'test'\n command_name 'Mintest'\nend\n\nrequire 'minitest/autorun'\nrequire 'minitest/spec'\nrequire 'minite...
ruby
chosen
[ { "from": "system", "value": "Enable objectspace in JRuby for testing." }, { "from": "human", "value": "require 'shoulda'\nrequire 'rr'\nrequire 'ffi'\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n\n# Since the tests will call Gtk+ functions, Gtk+ must be initialized.\nmod...
ruby
chosen
[ { "from": "system", "value": "Include the plugin initialisation file in the test helper for the plugin." }, { "from": "human", "value": "require 'rubygems'\nrequire 'test/unit'\n" }, { "from": "gpt", "value": "RAILS_ENV = 'test'\nrequire 'rubygems'\nrequire 'test/unit'\nrequire File....
ruby
chosen
[ { "from": "system", "value": "Change rails version dependency in order to fix bundle issues\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"theme_essay/version\"\n\n# Describe your gem and declare its dependencies:\nG...
ruby
chosen
[ { "from": "system", "value": "Use the rack object instantiated in HtmlMockup" }, { "from": "human", "value": "module HtmlMockup\n module Rack\n # Listens to the \"sleep\" parameter and sleeps the amount of seconds specified by the parameter. There is however a maximum of 5 seconds.\n clas...
ruby
chosen
[ { "from": "system", "value": "Make place finding front page\n" }, { "from": "human", "value": "ActionController::Routing::Routes.draw do |map|\n\n map.root :controller => 'home'\n\n map.resources :places, :controller => 'problems', \n :except => [:update, :edit], \n ...
ruby
chosen
[ { "from": "system", "value": "Remove the Rails default route\n\nFixes #19" }, { "from": "human", "value": "Calagator::Application.routes.draw do\n match 'omfg' => 'site#omfg'\n match 'hello' => 'site#hello'\n\n match 'about' => 'site#about'\n\n match 'opensearch.:format' => 'site#opensearch'...
ruby
chosen
[ { "from": "system", "value": "Set smart_answer path route format to false.\n\nThis brings back the default rails 3.x behaviour. The new one matches\nnumbers in paths like /pension-amount/300.0 as format and throws an\nexception.\n" }, { "from": "human", "value": "SmartAnswers::Application.routes...
ruby
chosen
[ { "from": "system", "value": "Reformat messaging for postcommit. Add 'via' parameter after approval from FriendFeed\n" }, { "from": "human", "value": "service :friend_feed do |data, payload|\n repository = payload['repository']['name']\n friendfeed_url = URI.parse(\"http://friendfeed.com/api/s...
ruby
chosen
[ { "from": "system", "value": "Add before filter for CirclesController.\n" }, { "from": "human", "value": "module Socializer\n class CirclesController < ApplicationController\n def index\n @circles = current_user.circles\n end\n\n def contacts\n @circles = current_user.circles...
ruby
chosen
[ { "from": "system", "value": "Use has_css? instead of first\n\nIn older versions of Capybara, first would return nil but now it\nraises an exception.\n" }, { "from": "human", "value": "module FormHelpers\n def fill_in_fields(names_and_values)\n names_and_values.each do |field_name, value|\n ...
ruby
chosen
[ { "from": "system", "value": "Change default current_streak value in skills migration\n" }, { "from": "human", "value": "class CreateSkills < ActiveRecord::Migration\n def change\n create_table :skills do |t|\n t.string :title, null: false\n t.integer :current_streak, default: 1\n ...
ruby
chosen
[ { "from": "system", "value": "Add marker to show which file is being tested. Add gaurd if temp file disappears\n" }, { "from": "human", "value": "#! ruby\nrequire 'test/unit'\nrequire 'tempfile'\nrequire_relative '../lib/legal_markdown.rb'\n\nclass TestLegalMarkdownToMarkdown < Test::Unit::TestC...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement to ~> 0.58.1\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/rubocop/blob/mas...
ruby
chosen
[ { "from": "system", "value": "Update (all helpers, forgery protection)\n\ngit-svn-id: 688d3875d79a464202b418543870f1890916b750@629 b1a0fcd8-281e-0410-b946-bf040eef99c3\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n include ExceptionLoggable\n \n help...
ruby
chosen
[ { "from": "system", "value": "[UI] Include name, so user knows what this is about.\n" }, { "from": "human", "value": "require 'cocoapods'\n\nmodule CocoaPodsKeys\n class NameWhisperer\n\n def self.get_project_name()\n podfile = Pod::Podfile.from_file(\"Podfile\") rescue nil\n ...
ruby
chosen
[ { "from": "system", "value": "Fix for windows 2k3 gem install.\n" }, { "from": "human", "value": "require 'fileutils'\r\ninclude FileUtils\r\n\r\nmv File.dirname(__FILE__) +\"/../rakefile.rb\", File.dirname(__FILE__) +\"/../Rakefile\"\r\n\r\ncp File.dirname(__FILE__) +\"/../rhobuild.yml.example\...
ruby
chosen
[ { "from": "system", "value": "Expand erroneous response error message.\n" }, { "from": "human", "value": "module Acfs\n\n # Acfs base error.\n #\n class Error < StandardError\n end\n\n # Response error containing the responsible response object.\n #\n class ErroneousResponse < Error\n ...
ruby
chosen
[ { "from": "system", "value": "Add more code to the license metric\n\nJust started to write some code for the license metric. I will have to\nfind a good way to consolidate different data licenses and on what terms\nit is open/valid and on what terms it is not.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e208...
ruby
chosen
[ { "from": "system", "value": "Use reader instead of instance variable\n" }, { "from": "human", "value": "module Saran\n class ClassLoader\n attr_reader :files\n\n def initialize\n @files = {}\n end\n\n def load(filename)\n @files[filename] = get_file_module filename\n e...
ruby
chosen
[ { "from": "system", "value": "Use Devise.secure_compare to prevent timing attacks\n" }, { "from": "human", "value": "module Tok\n module Controller \n extend ActiveSupport::Concern\n\n helpers = %w(authenticate! resource resource_name resource_class)\n\n included do\n helper_metho...
ruby
chosen
[ { "from": "system", "value": "Drop support for Rails 4.1\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"garage/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "system", "value": "Fix warning in Rails 6\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Keepr::Group < ActiveRecord::Base\n self.table_name = 'keepr_groups'\n\n has_ancestry orphan_strategy: :restrict\n\n enum target: %i[asset liability profit_and_loss]\...
ruby
chosen
[ { "from": "system", "value": "Fix bug that branch contains new line code\n" }, { "from": "human", "value": "module Prid\n class Client\n def self.run\n repo_name = ARGV.first\n unless repo_name\n warn 'usage: prid YOUR_REPOSITORY'\n warn 'example: prid willnet/prid'...
ruby
chosen
[ { "from": "system", "value": "Use pp for printing report prettier\n" }, { "from": "human", "value": "require 'sloc/analyzer'\n\nmodule Sloc\n class Runner\n def initialize(options)\n @options = options\n end\n\n def run(paths)\n target_files = find_target_files(paths)\n\n ...
ruby
chosen
[ { "from": "system", "value": "Make CategoriesController inherit from Forem::ApplicationController\n\nFixes #186.\n\nThe issue is caused because ApplicationController is loaded first, and so Forem doesn't go up the chain looking for another ApplicationController because one's already been loaded. By being ex...
ruby
chosen
[ { "from": "system", "value": "Handle missing or unknown device id\n" }, { "from": "human", "value": "class HiveMindTv::ApiController < ApplicationController\n # This turns off CSRF verification for the API\n # TODO Provide other methods of authentication\n skip_before_action :verify_authentic...
ruby
chosen
[ { "from": "system", "value": "Fix Rails 5 deprecation warnings\n\nTo fix \"DEPRECATION WARNING: env is deprecated and will be removed from Rails 5.1\" I replaced calls to 'env' with 'request.env' in CatcherOfWats per https://github.com/rails/rails/issues/23294.\nTo fix \"DEPRECATION WARNING: around_filter i...
ruby
chosen
[ { "from": "system", "value": "Change debugger to dev + add test-unit\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sassy/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Hide follower you follow when hides_network is enable\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass Pawoo::Api::V1::FollowersYouFollowController < Api::BaseController\n before_action -> { doorkeeper_authorize! :read }\n before_action :r...
ruby
chosen
[ { "from": "system", "value": "Remove profile attributes from user factory and re annotate\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: users\n#\n# id :integer not null, primary key\n# username :string\n# cellphone_numb...
ruby
chosen
[ { "from": "system", "value": "Add controller specs for pipeline index API endpoint\n\n[ci skip]\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Projects::PipelinesController do\n include ApiHelpers\n\n let(:user) { create(:user) }\n let(:project) { create(:empty_project, ...
ruby
chosen
[ { "from": "system", "value": "Use Single Quotes for Version\n\nHas to do with the release scripts.\n" }, { "from": "human", "value": "# Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You may not...
ruby
chosen
[ { "from": "system", "value": "Add to default prefix pattern.\n" }, { "from": "human", "value": "class Ember::Appkit::Rails::Engine < ::Rails::Engine\n config.ember_appkit = ActiveSupport::OrderedOptions.new\n\n config.ember_appkit.namespace = 'appkit'\n config.ember_appkit.asset_path = confi...
ruby
chosen
[ { "from": "system", "value": "Add a cusom icon & activate the button only for members.\n" }, { "from": "human", "value": "require \"rails_admin_approve_event/engine\"\n\nmodule RailsAdminApproveEvent\nend\n\nrequire 'rails_admin/config/actions'\n\nmodule RailsAdmin\n module Config\n module A...
ruby
chosen
[ { "from": "system", "value": "Add HttpLog gem and configuration.\n" }, { "from": "human", "value": "\nif defined?(::Bundler)\n global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first\n $LOAD_PATH.concat(Dir.glob(\"#{global_gemset}/gems/*/lib\")) if\n global_gemset\nend\n\nrequi...
ruby
chosen
[ { "from": "system", "value": "Fix where eval introduced locals end up\n" }, { "from": "human", "value": "class VariableScope\n attr_reader :parent\n attr_reader :block\n\n def self=(obj)\n @self = obj\n end\n\n def dynamic_locals\n @dynamic_locals ||= LookupTable.new\n end\n\n def s...
ruby
chosen
[ { "from": "system", "value": "Add bang to can and cannot methods\n" }, { "from": "human", "value": "class Key < ActiveRecord::Base\n include FlagShihTzu\n\n belongs_to :resource, polymorphic: true\n belongs_to :user, dependent: :destroy\n\n validates :user, presence: true\n validates :resou...
ruby
chosen
[ { "from": "system", "value": "Downgrade railties version to 3.1\n" }, { "from": "human", "value": "require File.expand_path('../lib/mootools-plus/rails/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'mootools-plus'\n s.version = MootoolsPlus::Rails::VERSION\n s.aut...
ruby
chosen
[ { "from": "system", "value": "Use paths relative to rspec-rails directory in template\n" }, { "from": "human", "value": "$LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))\nrequire 'rspec/rails/version'\n\ngem 'rspec-rails', :path => File.expand_path('../../../', __FILE__)\n\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add more commands to Echo and fix wrong method called\n\nThe #say method was calling bot.send_message, which doesn't exist.\nFixed #say to call room.messaging.send_message instead.\n" }, { "from": "human", "value": "# encoding: utf-8\n# frozen_string_literal: true\n...
ruby
chosen
[ { "from": "system", "value": "Add RDoc/Yard comments to Condition class.\n" }, { "from": "human", "value": "module FilterFactory\n class Condition\n attr_reader :field_name, :value\n\n def initialize(field_name, value)\n @field_name, @value = field_name, value\n end\n end\nend" ...
ruby
chosen
[ { "from": "system", "value": "Change JS to sent highlighted text as an entry\n" }, { "from": "human", "value": "module UsersHelper\n\n def generate_bookmarklet(user)\n #Note: bookmarklet caps at 4096 chars. this is fine for now, but may need to refactor if we wanna get fancy\n #TODO: make...
ruby
chosen