conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add an engine to make sure views are installed\n"
},
{
"from": "human",
"value": "require 'administrate/field/base'\nrequire 'rails'\n\nmodule Administrate\n module Field\n class Select < Base \n def choices\n options.fetch(:choices, []).\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check environment to exclude PDF generation test.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass Cf0925Test < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\n test 'generation of a PDF' do\n rtp = cf0925s(:one)\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Only run tariff sync once a day at 01:23\"\n\nThis reverts commit b21cac649e2907a53784fb0f15fdf8ae08441552.\n"
},
{
"from": "human",
"value": "set :output, { error: 'log/cron.error.log', standard: 'log/cron.log'}\n\n# We need Rake to use our own environment... | ruby | chosen |
[
{
"from": "system",
"value": "Update XCTest to weak framework"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'XLTestLog'\n s.version = '1.0.1'\n s.license = 'MIT'\n s.summary = 'Styling and coloring your XCTest logs on Xcode Console.'\n s.description... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the rest of the things with '-'\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ndescribe 'sshd configuration' do\n describe command('sudo sshd -T') do\n its(:stdout) { should include(*EXPECTED_SSHD_CONFIG) }\n end\nend\n\nEXPECTED_SSH... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary import of helper\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\n#\n# == UserHelper Test\n#\nclass UserHelperTest < ActionView::TestCase\n include Devise::TestHelpers\n include UserHelper\n\n test 'should return true if user is supe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneded comment in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'composition'\n s.version = '0.0.1'\n s.authors = ['Markus Schirp']\n s.email = ['mbj@seonic.net']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gemspec, is Apache-2.0\n\nper http://spdx.org/licenses/\r\nCloses #7"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'send_with_... | ruby | chosen |
[
{
"from": "system",
"value": "Add the filterable legend back in\n"
},
{
"from": "human",
"value": "module StatisticsHelper\n\n def mttr_by_month\n stock_chart mttr_by_month_charts_path, basic_opts('Mean Time to Resolution (MTTR) by Month', 'months')\n end\n\n def mtta_by_month\n stock_c... | ruby | chosen |
[
{
"from": "system",
"value": "Make the rails version in the gemspec more restrictive\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"transam_accounting/version\"\n\n# Describe your gem and declare its dependencies:\nG... | ruby | chosen |
[
{
"from": "system",
"value": "Change AssetRemoverTest to use one of the new methods\n\nI want to delete some of the tasks that have already been run\nincluding `AssetRemover#remove_organisation_logo`. Changing the tests\nto use one of methods I won't remove will let me do that.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Add a sanity check to make sure the override methods aren't screwing up normal behavior\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AttendeeSlotTest < ActiveSupport::TestCase\n def test_nil_defaults_to_zero\n slot = AttendeeSlot.new(:max =>... | ruby | chosen |
[
{
"from": "system",
"value": "Change the way the command pipe read the commands\n"
},
{
"from": "human",
"value": "module CultomePlayer\n module Plugins\n module KeyboardSpecialKeys\n def init_plugin_keyboard_special_keys\n Thread.new do\n start_cmd = \"tail -f #{command... | ruby | chosen |
[
{
"from": "system",
"value": ":panda_face: Create nodes and roles during init chef project..\n"
},
{
"from": "human",
"value": "class ChefProjectGenerator\n\n BASE_FOLDER = Rails.root.join('projects')\n TEMPLATE_PATH = File.expand_path('../templates', __FILE__)\n\n attr_accessor :name\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "chore(): Add focus support on rspec\n"
},
{
"from": "human",
"value": "ENV[\"RAILS_ENV\"] ||= 'test'\n\nrequire File.expand_path(\"../dummy/config/environment\", __FILE__)\nrequire 'rspec/rails'\nrequire 'spec_helper'\nrequire 'factory_girl_rails'\nrequire 'shoulda-... | ruby | chosen |
[
{
"from": "system",
"value": "Add SDG relations to development seeds\n"
},
{
"from": "human",
"value": "section \"Creating Sustainable Development Goals\" do\n load Rails.root.join(\"db\", \"sdg.rb\")\n\n SDG::Target.sample(30).each do |target|\n title = \"Title for default locale\"\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Set correct host for get service operation\n"
},
{
"from": "human",
"value": "module Fog\n module AWS\n class Storage\n class Real\n require 'fog/aws/parsers/storage/get_service'\n\n # List information about S3 buckets for authorized user\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update endpoints used by WP OAuth Server 3.1.3\n"
},
{
"from": "human",
"value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class WordpressHosted < OmniAuth::Strategies::OAuth2\n # Give your strategy a name.\n option :name, 'wo... | ruby | chosen |
[
{
"from": "system",
"value": "Add comments to `ArrayDictionary` class\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Dictionary\n class ArrayDictionary\n attr_reader :words\n\n def initialize(words = [])\n @words = []\n\n add_words(words)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add type declaration for MakeBinding\n"
},
{
"from": "human",
"value": "require 'ostruct'\nrequire 'erb'\n\nmodule Template\n # An example class that can be used to return a binding context\n class Namespace\n def initialize(hash)\n hash.each do |key, valu... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec sources to include all swift files\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"GestureRecognizerClosures\"\n s.version = \"1.0.1\"\n s.license = \"MIT\"\n s.summary = \"Closure support for handling g... | ruby | chosen |
[
{
"from": "system",
"value": "Allow people to bring their own asset management solutions to the party\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule Historyjs\n module Generators\n class InstallGenerator < ::Rails::Generators::Base\n desc \"This generator installs HistoryJ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with admin interface when assigning a rep to a party\n"
},
{
"from": "human",
"value": "ActiveAdmin.register Rep do\n scope :all\n scope :unassigned\n\n index do\n column :id\n column :user_name\n column :party\n column :topics do |rep|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Silicon Labs VCP Driver\n"
},
{
"from": "human",
"value": "cask :v1 => 'silicon-labs-vcp-driver' do\n version :latest\n sha256 :no_check\n\n url 'http://www.silabs.com/Support%20Documents/Software/Mac_OSX_VCP_Driver.zip'\n name 'Silicon Labs VCP Driver'\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add Ruby Hamming Distance algorithm.\n"
},
{
"from": "gpt",
"value": "# take two binary strings and returns the Hamming Distance between them\ndef hamming_distance(string1, string2)\n if string1.length != string2.length\n return \"Strings must be the same length.... | ruby | chosen |
[
{
"from": "system",
"value": "Make cookie secret token actually a secret\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key for verifying the integrity of signed cookies.\n# If you change this key, all old signed cookies will becom... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure AutoRun saves before reporting\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'core_ext/exec_callbacks'\nrequire_relative 'tools/after_tests'\n\nmodule DeepCover\n module AutoRun\n class Runner\n include Tools... | ruby | chosen |
[
{
"from": "system",
"value": "Update OmniOutliner Beta to version 4.4.x-r244801\n\nThis commit updates the version and sha256 stanzas.\n"
},
{
"from": "human",
"value": "cask :v1 => 'omnioutliner-beta' do\n version '4.3.x-r238997'\n sha256 '7abf46e9183ba617edc9d80e7587a32e3e555d5ca5868668f5bb7... | ruby | chosen |
[
{
"from": "system",
"value": "Make Unicorn check consistent with other integrations\n"
},
{
"from": "human",
"value": "if defined?(::Unicorn) && defined?(::Unicorn::HttpServer)\n Appsignal.logger.info('Loading Unicorn integration')\n\n # We'd love to be able to hook this into Unicorn in a less... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement to ~> 0.51.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": "Use current environment not production\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(:must_exist).load do\n after 'deploy', 'deploy:notify_hoptoad'\n after 'deploy:migrations', 'deploy:notify_hoptoad'\n\n namespace :deploy do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Code School avatar fallback.\n\nIt made it harder to see who didn't have a photo.\n"
},
{
"from": "human",
"value": "class AuthorDecorator < ApplicationDecorator\n delegate_all\n \n def email\n source.try :email || \"No Email\"\n end\n\n def name\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Fix RAID array boot-time mapping bug"
},
{
"from": "gpt",
"value": " \n# Cookbook Name:: mh-opsworks-recipes\n# Recipe:: fix-raid-mapping\n\n# Fix RAID array boot-time mapping bug: http://ubuntuforums.org/showthread.php?t=1764861&page=2\nexecute 'fix RAID array bo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bundler setup block, since RSpec2 supports activating Bundler.\n"
},
{
"from": "human",
"value": "<%= render_template 'bundler_setup.erb' %>\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Vim modeline from files\n"
},
{
"from": "human",
"value": "# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2\n\nmodule Puppet::Parser::Functions\n newfunction(:smooth, :type => :rvalue) do |args|\n raise(Puppet::ParseError, \"smooth(): Wrong number of... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for passing custom attributes to Riemann\n\nThe attributes are passed in through options on the middleware\nand are sent to Riemann on every event.\n"
},
{
"from": "human",
"value": "require 'riemann/client'\n\nmodule RailsRiemannMiddleware\n\n class Ev... | ruby | chosen |
[
{
"from": "system",
"value": "Add ID to title of club application\n"
},
{
"from": "human",
"value": "class ClubApplicationMailer < ApplicationMailer\n default from: 'Hack Club Team <team@hackclub.com>'\n\n def application_confirmation(application)\n @application = application\n\n to = Ma... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for dashboard not displaying score correctly.\n"
},
{
"from": "human",
"value": "class AssessmentSerializer < ActiveModel::Serializer\n embed :ids, include: true\n attributes :id, :score, :exemplary, :notes, :published, :created_at, :updated_at\n has_one :sub... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on nil user model\n"
},
{
"from": "human",
"value": "module Users\n\tclass AcountLinkCell < Cell::ViewModel\n\t\tproperty :id\n\t\tproperty :name\n\t\tproperty :email\n\t\tproperty :person\n\n\tend\nend\n"
},
{
"from": "gpt",
"value": "module U... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rollbar bug report 74\n"
},
{
"from": "human",
"value": "module Api\n class TokensController < Api::AbstractController\n skip_before_action :authenticate_user!, only: :create\n skip_before_action :check_fbos_version, only: :create\n CREDS = Auth::Cr... | ruby | chosen |
[
{
"from": "system",
"value": "Make the Gem.bin_path even if there is a Gemfile.lock in a parent dir\n"
},
{
"from": "human",
"value": "require_relative '../../../spec_helper'\nrequire 'rubygems'\n\ndescribe \"Gem.bin_path\" do\n it \"finds executables of default gems, which are the only files s... | ruby | chosen |
[
{
"from": "system",
"value": "Handle Rummager not returning description\n\nIf a record in Rummager's search index doesn't have a description then\nit will omit the field completely rather than returning a blank value.\nThat causes the `fetch` to blow up, so default it to `nil`.\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Allow using UsedFile decorator in Active Record queries\n\nDelegate low level methods to make it look like the original record.\n"
},
{
"from": "human",
"value": "module Pageflow\n class UsedFile < SimpleDelegator\n def initialize(file, usage = nil)\n super... | ruby | chosen |
[
{
"from": "system",
"value": "Update hiredis dependency to 0.4.x\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"em-hiredis/version\"\n\nGem::Specification.new do |s|\n s.name = \"em-hiredis\"\n s.version = Even... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate include in CurationConcerns::Collection\n"
},
{
"from": "human",
"value": "module CurationConcerns\n module Collection\n extend ActiveSupport::Concern\n extend Deprecation\n include Hydra::Works::CollectionBehavior\n include Hydra::With... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra ivar in spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe StripeEvent::WebhookController do\n before do\n StripeEvent.clear_subscribers!\n @base_params = { :use_route => :stripe_event }\n end\n\n context \"with valid eve... | ruby | chosen |
[
{
"from": "system",
"value": "Set DEFAULT_PLUGIN_REGISTRATION as false when undefined\n"
},
{
"from": "human",
"value": "class CampaignPageBuilder\n attr_reader :params\n\n class << self\n def create_with_plugins(params)\n new(params).create_with_plugins\n end\n end\n\n def initia... | ruby | chosen |
[
{
"from": "system",
"value": "Sort all orders by progress\n"
},
{
"from": "human",
"value": "require_relative \"config\"\nrequire_relative \"order_request\"\nrequire_relative \"order_parser\"\nrequire_relative \"order\"\n\nclass OrdersFinder\n attr_reader :email, :order_numbers\n\n def self.fi... | ruby | chosen |
[
{
"from": "system",
"value": "Change trend count on page to 30 instead of 10\n"
},
{
"from": "human",
"value": "class MapController < ApplicationController\n def index\n @current_trends = Trend.most_popular\n @mapped_trend = @current_trends.first\n end\n\n def show\n render :nothing ... | ruby | chosen |
[
{
"from": "system",
"value": "Add linkable headings to markdown\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def gravatar_image_url(email, size = 16)\n hash = Digest::MD5.hexdigest(email.strip.downcase)\n \"https://secure.gravatar.com/avatar/#{hash}?s=#{size}&d=identico... | ruby | chosen |
[
{
"from": "system",
"value": "Fix code style (parenthesized method arguments)\n"
},
{
"from": "human",
"value": "module ProjectNavHelper\n\n def next_project_id project\n return if is_last_project? project\n\n all_keys = chapter_projects_keys(project)\n index_next_project = all_keys.in... | ruby | chosen |
[
{
"from": "system",
"value": "Add a reply_to field for the helpdesk email\n"
},
{
"from": "human",
"value": "class ApplicationMailer < ActionMailer::Base\n default from: ENV[\"MAILER_FROM\"] || \"no-reply@queens-awards-enterprise.service.gov.uk\"\n layout \"mailer\"\nend\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Change mailer from address Jira GORGMAIL-227"
},
{
"from": "human",
"value": "class ApplicationMailer < ActionMailer::Base\n default from: \"support@gadz.org\"\n layout 'mailer'\nend\n"
},
{
"from": "gpt",
"value": "class ApplicationMailer < ActionMail... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a mistake in the comment.\n"
},
{
"from": "human",
"value": "# this class has 2 sub-classes: CourseSurveyResponseMap and AssignmentSurveyResponseMap\n# The reviewed_object id is either assignment or course id;\n# The reviewer_id is either assignment participant ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"cleanup: rely on rubinius-compiler gem\"\n\nThis reverts commit 03e3c6294bd59882e925775918bedfbe05fe52ed.\n"
},
{
"from": "human",
"value": "# The fancy_ext directory contains Rubinius-specific code (mostly\n# extension methods) for existing classes that ne... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Add definition for custom exception class\n\nIn `app/controllers/api/graphql_controller.rb` on line 24, we raise an\n`Exceptions::UnAuthorizedGraphQLCanvasRequest` error. However,\nthis exception class isn't defined.\n"
},
{
"from": "human",
"value": "module Ex... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary timeout requiring from GetGpa\n"
},
{
"from": "human",
"value": "require 'timeout'\n\nmodule CodeclimateCi\n class GetGpa\n RETRY_COUNT = ENV['RETRY_COUNT'] || 3\n SLEEP_TIME = ENV['SLEEP_TIME'] || 5\n\n def initialize(codeclimate_api, b... | ruby | chosen |
[
{
"from": "system",
"value": "Create the responsibility for the curation\n"
},
{
"from": "human",
"value": "# CanCan Abilities\n#\n# See the wiki for details:\n# https://github.com/ryanb/cancan/wiki/Defining-Abilities\n\nclass Ability\n include CanCan::Ability\n\n def initialize(user = User.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Copy & paste is evil\n"
},
{
"from": "human",
"value": "# TODO: Switch to Vagrant.require_version before 1.0.0\n# see: https://github.com/mitchellh/vagrant/blob/bc55081e9ffaa6820113e449a9f76b293a29b27d/lib/vagrant.rb#L202-L228\nunless Gem::Requirement.new('>= ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify gemspec to prepare for publishing.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'bucketkit/version'\n\nGem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'brightness' effect (borrowed from CamanJS).\n"
},
{
"from": "human",
"value": "module Compass::Magick\n module Functions\n # Methods for performing various visual effects on a\n # {Compass::Magick::Canvas}, e.g., fade, desaturate, etc.\n module Effect... | ruby | chosen |
[
{
"from": "system",
"value": "Remove rake version becaouse 0.9.2 is out of date\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/gem-search/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"rochefort\"]\n gem.email = [\"terasawan@gmail.c... | ruby | chosen |
[
{
"from": "system",
"value": "Move PHP default threshold to 28\n\nWhen analyzing the WordPress project at the current default mass\nthreshold of 10, it was observed that Duplications found only by\nPlatform had masses of 27 or less, while Duplications found by both\nPlatform and Classic had masses of 28 or ... | ruby | chosen |
[
{
"from": "system",
"value": "Set .sync to true, so notifications are logged in development\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.require\n\nuse Rack::HTTPLogger\nrun lambda { [404, {'Content-Type' => 'text/html'}, ['Page Not Found']] }\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Use https for Flickr oembed API"
},
{
"from": "human",
"value": "AutoHtml.add_filter(:flickr).with(:maxwidth => nil, :maxheight => nil, :link_options => {}) do |text, options|\n require 'uri'\n require 'net/http'\n require 'rexml/document'\n\n regex = %r{https?:... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up alias test script\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AliasesControllerTest < ActionController::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "# Encoding: utf-8... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to pessimistic version constraints.\n"
},
{
"from": "human",
"value": "require './lib/formulate/version'\n\nGem::Specification.new do |gem|\n gem.name = 'formulate'\n gem.version = Formulate::VERSION\n gem.summary = 'Rails form builder with flexible markup... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for error occurrence selecting on error page\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ViewsIntegrationTest < ActionDispatch::IntegrationTest\n\n include Errdo::Helpers::ViewsHelper\n\n context \"views\" do\n setup do\n get... | ruby | chosen |
[
{
"from": "system",
"value": "Change what should be changed to protect the innocent\n"
},
{
"from": "human",
"value": "Given(/^I have viewed the details of a specific occupation$/) do\n visit scrapbook_occupation_path(scrapbook_id: scrapbook_id,\n soc_code: spec... | ruby | chosen |
[
{
"from": "system",
"value": "Drop timeouts to sane defaults\n"
},
{
"from": "human",
"value": "module BookingRequests\n class Api\n def create(booking_request)\n connection.post '/api/v1/booking_requests', booking_request\n\n true\n end\n\n private\n\n def connection\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for named timezones\n"
},
{
"from": "human",
"value": "require 'date'\n\nmodule AddParserToDateTime\n def new(*args)\n return super if args.length != 1\n value = args.first\n return if value.nil?\n return value if value.is_a?(DateTime)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix lint issue in snap test\n\nSigned-off-by: Gene Wood <554b3cd6285944658d6dcd5ab0d58c8e35cd6701@cementhorizon.com>\n"
},
{
"from": "human",
"value": "package \"snapd\" do\n action :upgrade\nend\n\nservice \"snapd\" do\n action :start\nend\n\nexecute \"sleep 5\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Add method for setting the type of a package in the config. This will be used for importing repositories as packages.\n"
},
{
"from": "human",
"value": "require 'dotter/utilities'\nrequire 'inifile'\nmodule Dotter\n\tclass Configuration\n\t\tinclude Utilities\n\t\ta... | ruby | chosen |
[
{
"from": "system",
"value": "Update test after changes build page css\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "human",
"value": "class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps\n include SharedAuthenticati... | ruby | chosen |
[
{
"from": "system",
"value": "Disable screenshots when calabash tests fail to increase speed of test run\n"
},
{
"from": "human",
"value": "require 'calabash-android/management/adb'\nrequire 'calabash-android/operations'\n\nBefore do |scenario|\n start_test_server_in_background\nend\n\nAfter do... | ruby | chosen |
[
{
"from": "system",
"value": "Use host for get bucket location operation\n"
},
{
"from": "human",
"value": "module Fog\n module AWS\n class Storage\n class Real\n require 'fog/aws/parsers/storage/get_bucket_location'\n\n # Get location constraint for an S3 bucket\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use stable_sort_by from more_core_extensions repo in Ruport::Data::Table\n"
},
{
"from": "human",
"value": "# Monkey patched version of sort_rows_by from ruport (1.2.0) gem\n# => Force case insensitive sort.\n# => Enable sorting of booleans.\n#\nrequire 'ruport'\nmo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove junk params added by Sinatra\n"
},
{
"from": "human",
"value": "require \"forwardable\"\n\nclass SinatraAdapter\n extend Forwardable\n def initialize(sinatra_app)\n @sinatra_app = sinatra_app\n end\n\n def success(content)\n status(200)\n json_bo... | ruby | chosen |
[
{
"from": "system",
"value": "Add pngs to precompile only in Rails 4"
},
{
"from": "human",
"value": "# Used only for Ruby on Rails gem to tell, that gem contain `lib/assets`.\nmodule Fotoramajs\n class Railtie < Rails::Railtie\n initializer 'fotorama.config' do |app|\n app.config.asset... | ruby | chosen |
[
{
"from": "system",
"value": "Remove minor bug in delete branch\n"
},
{
"from": "human",
"value": "require 'open3'\nrequire 'git_merge_executor'\n\nclass StashMergeExecutor < GitMergeExecutor\n\n # Merges the branch associated with a build using the Stash REST api.\n # If an API error is raise... | ruby | chosen |
[
{
"from": "system",
"value": "Use CoreExtention Rounding based on BigDecimal.\n"
},
{
"from": "human",
"value": "module Accounting #:nodoc:\n module CoreExtensions #:nodoc:\n module Rounding\n # Rounds the float according to currency rules.\n # Currently targeted to Swiss Francs (C... | ruby | chosen |
[
{
"from": "human",
"value": "Add RAM sampler for Linux\n"
},
{
"from": "gpt",
"value": "module Custodian\n module Samplers\n\n class RAM < Custodian::Samplers::Sampler\n describe \"RAM usage\"\n\n def sample\n free = `free`.match /Mem: +([0-9]+) +([0-9]+) +([0-9]+) +([0-9]+)... | ruby | chosen |
[
{
"from": "human",
"value": "Implement related posts by Groonga\n"
},
{
"from": "gpt",
"value": "class PostSearcher\n def initialize\n @posts = Groonga['Posts']\n end\n\n def related_post_ids(post, limit: 5)\n related_posts = @posts.select do |record|\n conditions = (record.index('... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require for 'cgi'\n"
},
{
"from": "human",
"value": "require 'uri'\n\nrequire 'typhoeus'\nrequire 'nokogiri'\n\nrequire 'market_bot/version'\nrequire 'market_bot/exceptions'\nrequire 'market_bot/util'\nrequire 'market_bot/play/constants'\nrequire 'market... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for submission job\n"
},
{
"from": "gpt",
"value": "require \"rails_helper\"\n\nRSpec.describe SubmissionJob, type: :job do\n include ActiveJob::TestHelper\n\n let(:aru){ FactoryGirl.create(:annual_report_upload) }\n let(:submitter) { FactoryGirl.create(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix project lookup for git over http + rails4\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "human",
"value": "module Grack\n module Helpers\n def project_by_path(path)\n if m = /^\\/([\\w\\.\\/-]... | ruby | chosen |
[
{
"from": "system",
"value": "Add usage to 'select' command\n"
},
{
"from": "human",
"value": "require 'nehm/tracks_view_command'\n\nmodule Nehm\n\n ##\n # This command gets likes/posts from user's account,\n # Prints as menu, and downloads selected tracks\n\n class SelectCommand < TracksVie... | ruby | chosen |
[
{
"from": "system",
"value": "Set @invalid_whodunnit and define getter/setter for it\n"
},
{
"from": "human",
"value": "require 'singleton'\n\nmodule PaperTrailScrapbook\n # Global configuration affecting all threads.\n class Config\n include Singleton\n\n DEFAULT_TIME_FORMAT = '%A, %d %... | ruby | chosen |
[
{
"from": "system",
"value": "Add some overview documentation for the NoyesJava module.\n"
},
{
"from": "human",
"value": "require 'common'\nrequire 'java'\nrequire 'java_impl/dct'\nrequire 'java_impl/delta'\nrequire 'java_impl/filter'\nrequire 'java_impl/mel_filter'\nrequire 'java_impl/hamming_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove direct require for now.\n\nHave to figure out how to deal with these circular dependencies\nbetter. For now, it relies on the file being loaded by gatekeeper.\n"
},
{
"from": "human",
"value": "require 'sidekiq/worker'\nrequire 'travis/services/requests/recei... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Ruby 2.3 deprecation, timeout=>Timeout.timeout\n"
},
{
"from": "human",
"value": "module VCR\n # Ruby 1.8 provides Ping.pingecho, but it was removed in 1.9.\n # So we try requiring it, and if that fails, define it ourselves.\n begin\n require 'ping'\n P... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug showing Prayer Request in activity feed.\n"
},
{
"from": "human",
"value": "module FeedsHelper\nend\n"
},
{
"from": "gpt",
"value": "module FeedsHelper\n def prayer_request_path(prayer_request)\n group_prayer_request_path(prayer_request.group... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Get Top Ten job\n"
},
{
"from": "human",
"value": "class GetTopTenJob < ActiveJob::Base\n after_perform do |job|\n GetTopTenJob.set(wait: 5.minute).perform_later\n end\n queue_as :default\n\n def perform(*args)\n Subscriber.save_top_ten\n end\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Remove mutation variables from Convert\n"
},
{
"from": "human",
"value": "module Build\n module Convert\n def convert!(opts = {}, &block)\n Rails.logger.tagged(\"build\") do\n @opts = opts\n\n if @opts[:debug]\n dir = \"/tmp/build\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Load files only after requiring initializer\n"
},
{
"from": "human",
"value": "module RailsConfig\n module Integration\n module Rails3\n if defined?(Rails::Railtie)\n class Railtie < Rails::Railtie\n\n # manually load the custom initializer ... | ruby | chosen |
[
{
"from": "system",
"value": "[bugfix] Substitute _ for decimal values\n"
},
{
"from": "human",
"value": "module SafeYAML\n class Transform\n class ToInteger\n MATCHERS = Deep.freeze([\n /\\A[-+]?(0|([1-9][0-9_,]*))\\Z/, # decimal\n /\\A0[0-7]+\\Z/, # octa... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we update existing taxons' internal name\n\nThe Publishing API returns both a details hash containing the internal\nname, and an internal name field in the content item.\n\nWe use the latter throughout the code base.\n\nThe behaviour on the publishing API is as follow... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to import CPI config\n"
},
{
"from": "gpt",
"value": "# rubocop:disable Metrics/BlockLength\n\nnamespace :cpi do\n desc \"Import OpenStack Cloud Proivider options\"\n task :openstack, [:config] => :environment do |_, args|\n config_file = args[:con... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails.root.join instead of string concatenation.\n"
},
{
"from": "human",
"value": "require 'rbconfig'\n\nnamespace :job do\n ruby_exec = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])\n job_controller = \"#{Rails.root}/script/dae... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary code since AS beta1 is out.\n"
},
{
"from": "human",
"value": "module Arel\n module ObjectExtensions\n def bind(relation)\n Arel::Value.new(self, relation)\n end\n\n def find_correlate_in(relation)\n bind(relation)\n end\n\n... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.