conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": " Fix warnings in Ruby 1.9.3 tests" }, { "from": "human", "value": "require 'minitest/autorun'\n\nrequire 'knapsack'\n\nif RUBY_VERSION == \"1.9.3\"\n Minitest = MiniTest\n Minitest::Test = MiniTest::Unit::TestCase\nend\n\nKnapsack.tracker.config({\n enable_time_o...
ruby
chosen
[ { "from": "system", "value": "Add required field display_name to the EvidenceItem fabricator\n" }, { "from": "human", "value": "Fabricator(:evidence_item) do\n variant\n evidence_type { EvidenceItem.evidence_types.keys.sample }\n evidence_level{ EvidenceItem.evidence_levels.keys.sample }\n v...
ruby
chosen
[ { "from": "system", "value": "Modify spec file to reflect the new close link\n" }, { "from": "human", "value": "shared_examples \"a popup\" do |initiator, selector|\n context \"when the popup isn't clicked\" do\n it \"should not show the popup\" do\n expect(page).to have_selector(select...
ruby
chosen
[ { "from": "system", "value": "Add (failing) spec for overriding 'needs' methods." }, { "from": "human", "value": "describe \"Fortitude method precedence\", :type => :system do\n it \"should have widget methods > need methods > helper methods > tag methods\" do\n helpers_class = Class.new do\...
ruby
chosen
[ { "from": "system", "value": "Use a class w/ static method instead of a module\n" }, { "from": "human", "value": "# CSSHTTPRequest Ruby Encoder\n#\n# Author: Cameron Walters <cameron@nb.io>\n# License: Apache License 2.0 <http://www.apache.org/licenses/LICENSE-2.0.html>\n# Copyright (c) 2008, Ca...
ruby
chosen
[ { "from": "system", "value": "Add a timeout for Ember/Rails boot time\n" }, { "from": "human", "value": "module Exhaust\n class Runner\n\n attr_reader :configuration\n def initialize(configuration=Exhaust::Configuration.new)\n @configuration = configuration\n end\n\n def run\n ...
ruby
chosen
[ { "from": "system", "value": "Use class variable rather than instance variable\n" }, { "from": "human", "value": "require 'rake'\n\nmodule TTNT\n class << self\n def root_dir\n @root_dir ||= Rake.application.find_rakefile_location[1]\n end\n\n def root_dir=(dir)\n @root_dir =...
ruby
chosen
[ { "from": "system", "value": "Fix formatting and trailing spaces\n" }, { "from": "human", "value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire 'pp'\n\ndescribe \"PP.pp\" do\n before :each do\n @original_stdout = $stdout \n end\n \n after :each do\n $stdout =...
ruby
chosen
[ { "from": "human", "value": "Add unit test for Yuba::ViewModel::Rendering\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass Yuba::ViewModel::Rendering::Test < ActiveSupport::TestCase\n dummy_rendering_module = Module.new do\n def render(*args); end\n def view_assigns\n ...
ruby
chosen
[ { "from": "system", "value": "Remove commander dependency, as it's not used\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'log_recursive/version'\n\nGem::Specification.new do |spec|...
ruby
chosen
[ { "from": "system", "value": "Make json schema a run time 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 'json/api/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "Add a helper for links generation\n\nThe metadata component expects a link of arrays and as we now have\npolicies that can have more than one Organisation it made sense to\nrefactor this out to its own helper.\n" }, { "from": "human", "value": "module ApplicationHel...
ruby
chosen
[ { "from": "system", "value": "Disable the link to Welsh (until they’re approved)\n" }, { "from": "human", "value": "module ApplicationHelper\n def page_title(header, glue = ' - ')\n [header, I18n.t(:app_title)].compact.join(glue)\n end\n\n def markdown(source)\n Kramdown::Document.new(s...
ruby
chosen
[ { "from": "system", "value": "Change require json to lowercase\n\nthis is dumb!!!!\n" }, { "from": "human", "value": "require 'highline/import'\nrequire 'colorize'\nrequire 'JSON'\n\nrequire 'failspell/version'\nrequire 'failspell/cli'\n\nmodule FailSpell\nend\n\n\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Use helpers in base class\n" }, { "from": "human", "value": "require_relative 'hairballs/version'\nrequire_relative 'hairballs/theme'\n\n\nclass Hairballs\n def self.themes\n @themes ||= []\n end\n\n def self.add_theme(name)\n theme = Theme.new(name)\n y...
ruby
chosen
[ { "from": "system", "value": "Remove logging that wasn't ready to be committed yet" }, { "from": "human", "value": "module Qu\n class Worker\n attr_accessor :queues\n\n class Abort < Exception\n end\n\n def initialize(*queues)\n @queues = queues.flatten\n self.attributes =...
ruby
chosen
[ { "from": "system", "value": "Add CLI command to list groups\n" }, { "from": "human", "value": "require 'thor'\nrequire 'sonos'\n\nmodule Sonos\n class Cli < Thor\n desc 'devices', 'Finds the IP address of all of the Sonos devices on your network'\n def devices\n system.devices.each ...
ruby
chosen
[ { "from": "system", "value": "Remove stupid include of .so file\n" }, { "from": "human", "value": "# before the\nrequire 'rbconfig'\nrequire 'yell'\nRbConfig::CONFIG['CFLAGS'] = ''\n\n# Transrate is a comprehensive transcriptome assembly\n# quality assessment tool.\nmodule Transrate\n\n # Our o...
ruby
chosen
[ { "from": "system", "value": "Add runtime dependencies to gemspec\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/courex/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Misty De Meo\"]\n gem.email = [\"misty...
ruby
chosen
[ { "from": "system", "value": "Add specs for all 64-bit architectures\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Chef::Sugar::Architecture do\n it_behaves_like 'a chef sugar'\n\n describe '#_64_bit?' do\n it 'returns true when the system is 64 bit' do\n node = ...
ruby
chosen
[ { "from": "system", "value": "Fix generation of admin poi url, as it could have changed and the id is not valid anymore." }, { "from": "human", "value": "ActiveAdmin.register ProvidedPoi do\n\n menu :label => 'Premiumeintrag', :parent => 'Premium'\n\n belongs_to :provider, :optional => true\n ...
ruby
chosen
[ { "from": "system", "value": "Increase the Publishing API timeout (4 -> 10 seconds)\n\nWe're seeing some timeouts with the 30K DFID research\noutputs that have been imported into the system. This\nisn't a very good fix so I will raise this to the\nPublishing Platform team to investigate further.\n" }, {...
ruby
chosen
[ { "from": "system", "value": "Make Voot::Vtt chill out about paths\n" }, { "from": "human", "value": "require \"voot/cue_list\"\n\nmodule Voot\n class Vtt\n attr_reader :path\n attr_accessor :header\n\n def initialize(options = {})\n @path = options.fetch(:path)\n @header = o...
ruby
chosen
[ { "from": "system", "value": "Update gem for local testing\n" }, { "from": "human", "value": "require 'braintree'\nrequire 'stripe'\nrequire 'pay/engine'\nrequire 'pay/billable'\nrequire 'pay/stripe/charge_succeeded'\nrequire 'pay/stripe/charge_refunded'\n\nmodule Pay\n # Define who owns the su...
ruby
chosen
[ { "from": "system", "value": "Stop following the github documentation about download links\n" }, { "from": "human", "value": "require \"formula\"\n\nclass Lightsd < Formula\n desc \"Daemon to control your LIFX wifi smart bulbs\"\n homepage \"https://github.com/lopter/lightsd/\"\n url \"https:...
ruby
chosen
[ { "from": "system", "value": "Add category_id to strong params for articles\n" }, { "from": "human", "value": "class ArticlesController < ApplicationController\n http_basic_authenticate_with name: ENV['HTTP_AUTH_USER'], password: ENV['HTTP_AUTH_PW']\n before_filter :set_article, only: [:edit, ...
ruby
chosen
[ { "from": "system", "value": "Fix crash when a / is in the search string\n" }, { "from": "human", "value": "class SearchesController < ApplicationController\n\n\n def index\n @results = get_sphinx_search_results params[:q]\n @results.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane\...
ruby
chosen
[ { "from": "system", "value": "Add actions and construct params\n" }, { "from": "human", "value": "class ServicesController < ApplicationController\nend\n" }, { "from": "gpt", "value": "class ServicesController < ApplicationController\n before_action :set_service, only: [:show, :edit...
ruby
chosen
[ { "from": "system", "value": "Revert \"change radius to 2\"\n\nThis reverts commit 90315b47397cae283fb38b30692096b0bc433740.\n" }, { "from": "human", "value": "# -*- encoding : utf-8 -*-\nclass StickiesController < ApplicationController\n respond_to :html, :json\n\n def index\n if params[:l...
ruby
chosen
[ { "from": "system", "value": "Change IepStorer to update records if they exist instead of always creating\n" }, { "from": "human", "value": "class IepStorer\n def initialize(file_name:,\n path_to_file:,\n local_id:,\n client:,\n lo...
ruby
chosen
[ { "from": "human", "value": "Add email debate scheduled job\n" }, { "from": "gpt", "value": "class EmailDebateScheduledJob < EmailPetitionSignatories::Job\n def self.run_later_tonight(petition)\n petition.set_email_requested_at_for('debate_scheduled', to: Time.current)\n super(petition, p...
ruby
chosen
[ { "from": "system", "value": "Add more names to the reserved list\n" }, { "from": "human", "value": "class SubdomainValidator < ActiveModel::EachValidator\n def validate_each(object, attribute, value)\n return unless value.present?\n reserved_names = %w(www ftp mail pop smtp admin ssl sft...
ruby
chosen
[ { "from": "system", "value": "Allow 2.x versions of refinery\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'refinerycms-auto_tweets'\n s.version = '0.1'\n s.description = 'Ruby on Rails Aut...
ruby
chosen
[ { "from": "system", "value": "Remove autogenerated content from ActiveAdmin\n" }, { "from": "human", "value": "ActiveAdmin.register AdminUser do\n permit_params :email, :password, :password_confirmation\n\n index do\n selectable_column\n id_column\n column :email\n column :current_...
ruby
chosen
[ { "from": "human", "value": "Add very rudimentary set of benchmarks.\n\nSigned-off-by: Krzysztof Wilczynski <9bf091559fc98493329f7d619638c79e91ccf029@linux.com>\n" }, { "from": "gpt", "value": "# -*- encoding: utf-8 -*-\n\n# :enddoc:\n\n#\n# benchmark_fizzbuzz.rb\n#\n# Copyright 2012-2013 Krzysz...
ruby
chosen
[ { "from": "system", "value": "Update signup POST route to create new user, but not yet save to DB\n" }, { "from": "human", "value": "get '/signin' do\n erb :'auth/signin'\nend\n\npost '/signin' do\n puts params\n redirect '/'\nend\n\npost '/signup' do\n\n redirect '/'\nend\n\nget '/signout' ...
ruby
chosen
[ { "from": "system", "value": "Replace chrismytton with everypolitician in 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 'date_range/version'\n\nGem::Specification.new do |sp...
ruby
chosen
[ { "from": "system", "value": "Update rubocop requirement to ~> 0.56.0\n\nUpdates the requirements on [rubocop](https://github.com/bbatsov/rubocop) to permit the latest version.\n- [Release notes](https://github.com/bbatsov/rubocop/releases)\n- [Changelog](https://github.com/bbatsov/rubocop/blob/master/CHANG...
ruby
chosen
[ { "from": "system", "value": "Fix the description and gem dep\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"toadhopper-sinatra\"\n s.version = \"0.1\"\n s.extra_rdoc_files = [\"Readme.md\"]\n s.summary = \"Posting Hoptoad notifica...
ruby
chosen
[ { "from": "system", "value": "Add mean and variance method for ConstantDistribution.\n" }, { "from": "human", "value": "require 'erv/distribution'\n\nmodule ERV\n\n class ConstantDistribution < Distribution\n def initialize(opts)\n super(opts)\n\n raise ArgumentError unless opts[:v...
ruby
chosen
[ { "from": "system", "value": "Add single quotes to pod spec.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"DeskAPIClient\"\n s.version = \"1.1.0\"\n s.summary = \"A lightweight wrapper around the Desk.com API, v2.\"\n s.license = { :type => 'BSD ...
ruby
chosen
[ { "from": "system", "value": "Use mongoo-org package for MongoDB.\n" }, { "from": "human", "value": "#\n# Cookbook Name:: dmon\n# Recipe:: mongodb\n#\n# Copyright (c) 2016 Bogdan-Constantin Irimie, All Rights Reserved.\n\n# Install the required packages.\npackage \"mos-mongodb-org\"\n\n# Start M...
ruby
chosen
[ { "from": "system", "value": "Make heat maps recipe version 0.10.4 so we can apply it in production\n\n\nFormer-commit-id: c6b9ee0d107d7fbed63c1c6bb95879de297697eb [formerly fe758180d49f32049942d79387278b1da2ede8e2] [formerly 7c5c3e4b194fa805d926e91e91b568c482e9191a [formerly 3ccb1d36a66d6913ef59de74ee86f14...
ruby
chosen
[ { "from": "system", "value": "Add rake to development dependency\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'carrierwave/azure/version'\n\nGem::Specification.new do |gem|\n gem.name = '...
ruby
chosen
[ { "from": "system", "value": "chore(rbenv): Check if .ruby-version file exists\n" }, { "from": "human", "value": "## nodenv.rb\n#\n# Adds capistrano/nodenv specific variables and tasks\n\nnamespace :load do\n task :defaults do\n\n # Set the node version using the .node-version file\n # Lo...
ruby
chosen
[ { "from": "system", "value": "Use single quotes to match existing style\n" }, { "from": "human", "value": "module RelativeTime\n class InWords\n def call(date_to, date_from)\n diff = date_from.to_time - date_to.to_time\n return 'less than a minute' if diff.abs.round <= 59\n\n ...
ruby
chosen
[ { "from": "human", "value": "Create rake task for clean projects from nobody users\n" }, { "from": "gpt", "value": "namespace :nobodies do\n desc 'Remove on projects users that have nobody postion'\n task remove: :environment do\n Project.find_each do |project|\n project.users.nobodies...
ruby
chosen
[ { "from": "system", "value": "Check if Rails.env is test instead of !production && !staging" }, { "from": "human", "value": "if ENV['S3_KEY'] && ENV['S3_SECRET']\n if !Rails.env.production? && !Rails.env.staging?\n Fog.mock!\n end\n\n $fog = Fog::Storage.new(\n :provider =...
ruby
chosen
[ { "from": "system", "value": "Remove creating the bucket from config/initializers, assume it's created already\n" }, { "from": "human", "value": "if ENV['S3_KEY'] && ENV['S3_SECRET']\n if !Rails.env.production? && !Rails.env.staging?\n Fog.mock!\n end\n\n $fog = Fog::Storage.new(\n :pro...
ruby
chosen
[ { "from": "system", "value": "Change base directory when extract backup archive\n" }, { "from": "human", "value": "tmp_dir = \"#{node['backup_restore']['tmp_dir']}/restore\"\nfull_backup_name = 'ruby_full'\nbackup_file = \"#{tmp_dir}/#{full_backup_name}.tar\"\n\n# TODO: Create LWRP\n\nbash 'extr...
ruby
chosen
[ { "from": "system", "value": "Update gem version and dependency\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"wheelhouse-banners\"\n s.platform = Gem::Platform::RUBY\n s.version = \"0.1\"\n\n s.required_ruby_version = \">= 1.8.7\"\n s.requir...
ruby
chosen
[ { "from": "system", "value": "Split system_info into smaller pieces\n" }, { "from": "human", "value": "#\n# Cookbook Name:: system_info\n# Recipe:: default\n#\n# Copyright 2014, Travis CI GmbH\n#\n# MIT License\n#\n\ngit '/usr/local/system_info' do\n repository 'https://github.com/travis-ci/sys...
ruby
chosen
[ { "from": "human", "value": "Add Hadoop data node recipe\n" }, { "from": "gpt", "value": "#\n# Cookbook Name:: hadoop-upstream\n# Recipe:: datanode\n#\n# Copyright 2016, XLAB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance...
ruby
chosen
[ { "from": "system", "value": "Update Cardo to sha256 checksums\n" }, { "from": "human", "value": "class FontCardo < Cask\n url 'http://scholarsfonts.net/cardo104.zip'\n homepage 'http://scholarsfonts.net/cardofnt.html'\n version '1.04'\n sha1 'fb156361986052071fa8df09ab6c95749c5dad07'\n fon...
ruby
chosen
[ { "from": "system", "value": "Change quality on organizations images\n" }, { "from": "human", "value": "class OrganizationUploader < ImageUploader\n\n process quality: 90\n\n version :thumb do\n process resize_and_pad: [170, 85]\n end\n\n version :large do\n process resize_and_pad: [30...
ruby
chosen
[ { "from": "system", "value": "Replace tabs with spaces\nFix Layout/Tab\n" }, { "from": "human", "value": "require \"spec_helper\"\n\nRSpec.feature \"Seeding database\", :type => :feature do\n scenario \"Loading seed data throws no errors\" do\n \tallow(STDOUT).to receive(:puts)\n \tDatabaseCl...
ruby
chosen
[ { "from": "system", "value": "Unshield: Add support for new Installshield versions\n\nUnsheild aborts when processing Installshield versions 12 and above.\nThis commit adds a patch which resolves this.\n\nCloses Homebrew/homebrew#17563.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782...
ruby
chosen
[ { "from": "system", "value": "Add method to supply random pair of socks\n" }, { "from": "human", "value": "class SockDrawer\n attr_reader :socks, :matcher\n\n def initialize(args = {})\n @socks = args.fetch(:socks) { Array.new }\n @matcher = args.fetch(:matcher)\n end\n\n def supply_ma...
ruby
chosen
[ { "from": "system", "value": "Introduce date range as this is how we will paginate\n" }, { "from": "human", "value": "require_dependency \"renalware/pathology\"\n\nmodule Renalware\n module Pathology\n class ViewHistoricalObservations\n def initialize(\n patient,\n ...
ruby
chosen
[ { "from": "system", "value": "Remove old before filter cruft\n" }, { "from": "human", "value": "class EventsController < ApplicationController\n before_action :authenticate_user!, only: :volunteer\n before_action :set_event, only: [:show, :edit, :update, :destroy, :volunteer]\n\n def index\n ...
ruby
chosen
[ { "from": "system", "value": "Handle the search request even without the kw param\n" }, { "from": "human", "value": "class SearchController < ApplicationController\n\n def index\n @games = Search.new(Game, params[:kw], current_user).results\n end\n\nend" }, { "from": "gpt", "val...
ruby
chosen
[ { "from": "system", "value": "Make path optional in menu_link helper\n" }, { "from": "human", "value": "module AppFrame\n module MenuHelper\n def menu_link(key, path, options = {}, &block)\n active = false\n highlight = options.delete(:highlights_on) || /#{path}/\n dropdown = ...
ruby
chosen
[ { "from": "system", "value": "Package version is increased from 0.0.2.0 to 0.0.2.1\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'raygun_client'\n s.version = '0.0.2.0'\n s.summary = 'Client for the Raygun API using the Obsidian HTTP cl...
ruby
chosen
[ { "from": "system", "value": "Refactor spec to use simpler let() names\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Relation::Header, '.new' do\n subject { object.new(argument) }\n\n let(:object) { described_class }\n let(:id_a...
ruby
chosen
[ { "from": "human", "value": "Add new detailed guidance category\n" }, { "from": "gpt", "value": "MainstreamCategory.create!(\n slug: \"additional-vat-guidance\",\n title: \"Additional guidance for VAT-registered businesses\",\n description: \"Specific rules for charging, reclaiming and regist...
ruby
chosen
[ { "from": "system", "value": "Change zend_extension to extension, because using zend_extension causes PHP to say:\n\"uploadprogress.so doesn't appear to be a valid Zend extension\"\n" }, { "from": "human", "value": "require 'formula'\n\nclass UploadprogressPhp < Formula\n homepage 'http://pecl....
ruby
chosen
[ { "from": "system", "value": "Store Sentry API key in ENV var\n" }, { "from": "human", "value": "require 'raven'\n\nRaven.configure do |config|\n config.dsn = 'https://b74e43fd5ce7444394d1f56c37f3d043:a74c45df1e05482088542cd516bdbaff@app.getsentry.com/13303'\nend" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "human", "value": "Add base specs for media type\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Snapcat::MediaType do\n describe '#image?' do\n describe 'when it is an image' do\n it 'returns true'\n end\n\n describe 'when it is not an image' do\n ...
ruby
chosen
[ { "from": "system", "value": "Use resourceId so the code works also for instance delete\n\nUse resourceId so the code works also for instance delete\n" }, { "from": "human", "value": "class ManageIQ::Providers::Amazon::Inventory::Targets::EventPayloadVm < ManageIQ::Providers::Amazon::Inventory::...
ruby
chosen
[ { "from": "system", "value": "Disable garbage collector during request\n\n(this is terribly hacky and may be a bad idea)\n" }, { "from": "human", "value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\n\nif ...
ruby
chosen
[ { "from": "system", "value": "Change the syntax of the nivo_slider helper\n\nNow we should pass a block to the method then call helpers to generate\nimages, captions or whatever\n" }, { "from": "human", "value": "module NivoHelper\n def slider(files, hash = {})\n options = { :theme => :defau...
ruby
chosen
[ { "from": "system", "value": "Use `time` tag for times rather than `abbr`\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule TimeHelper\n def time_ago_in_words(time)\n content_tag(:abbr, title: time) do\n t('time_ago_in_words', time: distance_of_time_in_words_to_...
ruby
chosen
[ { "from": "system", "value": "Fix creation of new create jobs.\n" }, { "from": "human", "value": "class OsmCreateJob < Struct.new(:tags, :user_id, :place_id)\n\n def self.enqueue(tags, user_id, place_id)\n # Do not enqeue job if not in production or test environment\n return unless Rails....
ruby
chosen
[ { "from": "system", "value": "Update description for the masquerade\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'devise_masquerade/version'\n\nGem::Specification.new do ...
ruby
chosen
[ { "from": "system", "value": "Drop explicitly empty community translations\n\nfixes FOO-2999\n\nChange-Id: Idd0362bb41f27a68951a7b5cc77a1719d9c8d6ed\nReviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300655\nReviewed-by: August Thornton <9adc7a1161ddf32ff608de792a7e50179545f026@instructure.com>\nRe...
ruby
chosen
[ { "from": "system", "value": "Update to Intellij Community Edition 13.1" }, { "from": "human", "value": "case node[:platform]\nwhen \"centos\", \"redhat\", \"debian\", \"ubuntu\"\n default['intellij_community_edition']['download_url']=\"http://download.jetbrains.com/idea/ideaIC-13.tar.gz\"\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix bug: debug function is left\n" }, { "from": "human", "value": "# encoding: UTF-8\n\n$LOAD_PATH.unshift File.expand_path(\"../../lib\", __FILE__)\nrequire \"syoboi_calendar\"\n\nargs = Slop.parse :help => true do\n on :u, :user=, \"Username on SyoboiCalendar\"\n...
ruby
chosen
[ { "from": "system", "value": "Add missing require for 'rspec/matchers/composable'\n" }, { "from": "human", "value": "module RSpec\n module ComposableJSONMatchers\n # @api private\n class BeJSON\n include RSpec::Matchers::Composable\n\n attr_reader :matcher, :configuration, :orig...
ruby
chosen
[ { "from": "system", "value": "Add users to the users group in an org if not already there\n" }, { "from": "human", "value": "require 'json'\nrequire 'chef_zero/rest_base'\n\nmodule ChefZero\n module Endpoints\n # /users/USER/association_requests/ID\n class UserAssociationRequestEndpoint <...
ruby
chosen
[ { "from": "system", "value": "Fix intermittently failing session timeout spec\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\ndescribe \"Session timeout\", type: :system, js: true do\n around do |example|\n original_session_timeout = Devise.tim...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to match readme\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'pushpop/version'\n\nGem::Specification.new do |s|\n\n s.name = \"pushpop\"\n s.version = Pushpop::VERSI...
ruby
chosen
[ { "from": "system", "value": "Fix the specification of version on podspec\n\nThe previous definition causes users not to install from master.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Timepiece\"\n s.version = `git describe --tags --abbrev=0`\n s.summar...
ruby
chosen
[ { "from": "system", "value": "Include backtrace in serialized exception payload\n" }, { "from": "human", "value": "module Dat\n module Science\n\n # Internal. The output of running of an observed behavior.\n class Result\n attr_reader :duration\n attr_reader :exception\n at...
ruby
chosen
[ { "from": "system", "value": "Handle case where facter is run as a non-root user\n" }, { "from": "human", "value": "require 'facter'\n\n# Author: Francois Deppierraz <francois.deppierraz@nimag.net>\n# Idea and address/version mapping comes from\n# http://virtwo.blogspot.ch/2010/10/which-esx-vers...
ruby
chosen
[ { "from": "system", "value": "Add binary upload feature for any file\n" }, { "from": "human", "value": "module Fulcrum\n class Attachment < MediaResource\n include Actions::Delete\n\n def finalize(id)\n call(:post, \"#{collection}/finalize\", {id: id})\n end\n\n def collection\...
ruby
chosen
[ { "from": "system", "value": "Remove guard require for guard 2.0\n" }, { "from": "human", "value": "require 'guard/guard'\nrequire 'rainbow'\nmodule Guard\n class Simpleshell < Plugin\n def initialize(options={})\n @command = options[:command]\n @run_on_start = options[:run_on_star...
ruby
chosen
[ { "from": "system", "value": "Add alises of example group and example DSL\n" }, { "from": "human", "value": "# coding: utf-8\n\n# Aliases by Capybara:\n# https://github.com/jnicklas/capybara/blob/2.2.0/lib/capybara/rspec/features.rb\n\nmodule Transpec\n module RSpecDSL\n EXAMPLE_GROUP_METHOD...
ruby
chosen
[ { "from": "system", "value": "Return empty array when BreadcrumbReader doesn't find the node\n" }, { "from": "human", "value": "require 'core/interactors/article_reader'\nrequire 'core/interactors/breadcrumbs_reader'\n\nclass ArticlesController < ApplicationController\n decorates_assigned :arti...
ruby
chosen
[ { "from": "system", "value": "Use employer_id instead of customer_id when building salary_params.\n" }, { "from": "human", "value": "class SalariesController < InvoicesController\n defaults :resource_class => Salary\n\n respond_to :html, :pdf\n \n # Filter/Search\n # =============\n has_sc...
ruby
chosen
[ { "from": "system", "value": "Fix redirect_to leads if user is logged\n" }, { "from": "human", "value": "class SessionsController < ApplicationController\n def new\n redirect_to leads_path if @current_user\n end\n\n def create\n auth = request.env[\"omniauth.auth\"]\n user = User.fin...
ruby
chosen
[ { "from": "system", "value": "Update yajl-ruby dependency to get the fixes in 1.2.*\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"elasticsearch/version\"\n\nGem::Specification.new do |s|\n s.name = \"elasticsearch-...
ruby
chosen
[ { "from": "system", "value": "Add fivemat as a dependency\n\nFivemat give just the right amount of verbosity for the rspec output\n\nFixes #44\n" }, { "from": "human", "value": "if RUBY_PLATFORM != \"java\"\n raise \"Only JRuby is supported\"\nend\n\nGem::Specification.new do |spec|\n files = ...
ruby
chosen
[ { "from": "system", "value": "Rewrite the supporting pages mixin.\n\nCurrently used only by Policy.\n" }, { "from": "human", "value": "module Edition::SupportingPages\n extend ActiveSupport::Concern\n\n class Trait < Edition::Traits::Trait\n def process_associations_after_save(edition)\n ...
ruby
chosen
[ { "from": "human", "value": "Add trusted proxy fix initializer.\n" }, { "from": "gpt", "value": "# This is a fix for to prevent resuest.remote_ip from returning the squid proxy IP\n# instead of the user's actual ip. This is not for security, but for comment spam \n# reporting to Askimet\n# \n# T...
ruby
chosen
[ { "from": "system", "value": "Set bundler to 1.7 which is supported by TravisCI\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/tabular/version'\n\nGem::Specification.new do |s...
ruby
chosen
[ { "from": "system", "value": "Update chef client to 12.8.1\n" }, { "from": "human", "value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [\"opscode\"]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"12.0.8-1\"\n\n# Set the d...
ruby
chosen
[ { "from": "system", "value": "Refactor reading values from SMART\n" }, { "from": "human", "value": "require 'boxcar/helpers'\n\nmodule Boxcar\n module Smart\n def temperature\n raw_temp = `smartctl -d ata -A /dev/#{device} | grep -i temperature`\n temp = raw_temp.match(/(\\d+)(?:....
ruby
chosen
[ { "from": "human", "value": "Add plugin to get absolute urls in feeds\n" }, { "from": "gpt", "value": "# https://github.com/jessecrouch/jekyll-rss-absolute-urls\nmodule Jekyll\n module RSSURLFilter\n def relative_urls_to_absolute(input,url)\n #url = \"http://blog.jbfavre.org\"\n in...
ruby
chosen
[ { "from": "system", "value": "Remove duplicated 'using' in error message" }, { "from": "human", "value": "module Camcorder\n \n class Error < StandardError; end\n \n class RecordingError < Error\n attr_reader :key\n def initialize(key)\n @key = key\n end\n def message\n ...
ruby
chosen
[ { "from": "system", "value": "Use set_list_position in update positions for products\n" }, { "from": "human", "value": "# frozen_string_literal: true\nmodule Spree\n module Admin\n class LookBookImageProductsController < ResourceController\n def update_positions\n ActiveRecord::B...
ruby
chosen