conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove useless to_a from full_matrix Levenshtein\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule StringMetric\n module Levenshtein\n class IterativeWithFullMatrix\n def self.distance(from, to, options = {})\n return 0 if from == to\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use thumbnails as base for versions\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass ImageUploader < CarrierWave::Uploader::Base\n include CarrierWave::MiniMagick\n include CarrierWave::MimeTypes\n include Sprockets::Helpers::RailsHelper\n\n process... | ruby | chosen |
[
{
"from": "system",
"value": "Fix NameError when not connected\n"
},
{
"from": "human",
"value": "# rubocop:disable Style/FileName\n\n# By default, cql-rb grabs a random connection for each request. This is great for\n# keeping load distributed across the cluster. Unfortunately, it plays havoc w... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sshd test to skip cent/rhel 5\n"
},
{
"from": "human",
"value": "# Encoding: utf-8\nrequire 'spec_helper'\n\nsshd = OHAI['sshd']\n\ndescribe 'sshd Plugin' do\n\n it 'should be a Mash' do\n expect(sshd).to be_a(Mash)\n end\n\n it 'should have a value' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Vue.js documentation (2.0.8, 1.0.28)\n"
},
{
"from": "human",
"value": "module Docs\n class Vue < UrlScraper\n self.name = 'Vue.js'\n self.slug = 'vue'\n self.type = 'vue'\n self.links = {\n home: 'https://vuejs.org/',\n code: 'https://... | ruby | chosen |
[
{
"from": "system",
"value": "Add a *secret* flag to skip ember compilation\n\nFixes #17\n"
},
{
"from": "human",
"value": "module EmberCLI\n class Railtie < Rails::Railtie\n initializer \"ember-cli-rails.view_helpers\" do\n ActionView::Base.send :include, ViewHelpers\n end\n\n in... | ruby | chosen |
[
{
"from": "system",
"value": "Configure Errbit via env vars\n"
},
{
"from": "human",
"value": "# This file is overwritten on deploy\n#\nAirbrake.configure do |config|\n # Adding \"production\" to the development environments causes Airbrake not\n # to attempt to send notifications.\n config.d... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for always-save-after-request feature.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"ALWAYS_SAVE_AFTER_REQUEST\" do\n\n before :each do\n get(\"#{SETTINGS_PATH}/sessionPersistPolicies\")\n @oldSessionPersistPoliciesValue = json[... | ruby | chosen |
[
{
"from": "system",
"value": "Exit with the number of failures\n"
},
{
"from": "human",
"value": "$:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes\n\nrequire 'rubygems'\nrequire 'jasmine'\nrequire 'rspec'\n\nJasmine.load_configuration_from_yaml\n\nconfig ... | ruby | chosen |
[
{
"from": "system",
"value": "Add compatibility for recent versions of Faraday\n\nAllow the use of a Faraday version that supports ruby 2.3, while also allowing more recent versions of Faraday.\r\nThis will increase repo compatibility and enable the users of this library to follow the suggestion of using it... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActiveRecord::Migration error in generated app\n\nRails 5 isn't happy that we inherited a migration directly from the `ActiveRecord::Migration` superclass. \r\n\r\nInstead, the new Rails convention is to inherit from the versioned Migration class, `ActiveRecord::Migration[5... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ruby packages from buildserver\n"
},
{
"from": "human",
"value": "\nuser = node[:settings][:user]\n\nexecute \"apt-get-update\" do\n command \"apt-get update\"\nend\n\n%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libsaxonb-java libssl1.0.... | ruby | chosen |
[
{
"from": "system",
"value": "Use fanout exchange type instead of headers.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bunny'\n\nXMLS_FOLDER=\"/Users/alinp/work/blinkbox/zz.Distribution.Book\"\n\nabort(\"No such folder #{XMLS_FOLDER}!!!\") unless File.exist?(XMLS_FOLDER)\n\nt... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor boot code a bit.\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nmodule Rubyfox\n module SFSObject\n def self.boot!(sf_dir)\n unless $LOAD_PATH.include?(sf_dir)\n path = Pathname.new(sf_dir).join(\"*.jar\")\n jars = Dir[path]... | ruby | chosen |
[
{
"from": "human",
"value": "Add forgoten followers.created_at DB field\n"
},
{
"from": "gpt",
"value": "require 'sequel'\n\nSequel.migration do\n up do\n alter_table :followers do\n add_column :created_at, :Time, :null => false, :default => Time.now\n end\n end\n\n down do\n al... | ruby | chosen |
[
{
"from": "system",
"value": "Use local where instance variable not needed\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'facets/hash/collate'\n\nmodule SensitiveDataFilter\n module Middleware\n class ParameterScanner\n def initialize(env_parser)\n @en... | ruby | chosen |
[
{
"from": "human",
"value": "Test wb extra country data controller\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe Api::V1::WbExtraCountryDataController, type: :controller do\n context do\n let(:location) { FactoryGirl.create(:location, iso_code3: 'AFG', location_type: 'C... | ruby | chosen |
[
{
"from": "system",
"value": "Remove support for non-array IPs\n"
},
{
"from": "human",
"value": "require 'ip_checker'\n\nmodule Carto\n class DbdirectIp< ActiveRecord::Base\n belongs_to :user, inverse_of: :dbdirect_ip, foreign_key: :user_id\n\n serialize :ips, JSON\n validate :validat... | ruby | chosen |
[
{
"from": "system",
"value": "Set up associations between Plan and Assignable\n"
},
{
"from": "human",
"value": "module TaskManager\n class Plan < ActiveRecord::Base\n serialize :data, ActiveRecord::Coders::Hstore\n\n attr_accessible :autocompletable, :data, :last_task_created_at, :name\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add unique index on fingerprint\n"
},
{
"from": "gpt",
"value": "class AddUniqueIndexOnFingerprint < ActiveRecord::Migration\n\n def self.up\n add_index :gitolite_public_keys, :fingerprint, unique: true\n end\n\n def self.down\n remove_index :gitolite_public... | ruby | chosen |
[
{
"from": "system",
"value": "Make your bed and clean up your gemspecs!\n"
},
{
"from": "human",
"value": "version = File.read(File.expand_path(\"../../RAILS_VERSION\", __FILE__)).strip\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'activemodel'\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace initialize with @cards setter\n"
},
{
"from": "human",
"value": "class AddACardValue\n def initialize (cards)\n @cards = cards\n end\n\n\tdef values\n {\"Two\" => 2, \"Three\" => 3, \"Four\" => 4, \"Five\" => 5, \"Six\" => 6,\n \"Seven\" => 7, \"E... | ruby | chosen |
[
{
"from": "system",
"value": "Use Baskerville for result table and fix spacing so it's easier on the eyes.\n\ngit-svn-id: e0fade74c25be90edb0606ce8d40d6c0447cda8b@286 7a99d2f0-d533-0410-96fe-f25cb2755c1e\n"
},
{
"from": "human",
"value": "class ResultsTableView < OSX::NSTableView\n def awakeFro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix built files in Gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"govuk_frontend_toolkit/version\"\n\nGem::Specification.new do |s|\n s.name = \"govuk_frontend_toolkit\"\n s.version = GovUKFronte... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure all jms configuration is guarded in jms block\n"
},
{
"from": "human",
"value": "def generate(repository)\n constant_prefix = Domgen::Naming.uppercase_constantize(repository.name)\n\n data = {}\n\n data['environment_vars'] = {}\n\n if repository.jms?\n... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Remove return from TaskEntity other projects\n"
},
{
"from": "human",
"value": "module Api\n module Entities\n class TaskEntity < Grape::Entity\n expose :id\n expose :project_id\n expose :task_definition_id\n\n expose :status\n\n ex... | ruby | chosen |
[
{
"from": "system",
"value": "Include another concern inside of the `included` block.\n"
},
{
"from": "human",
"value": "module TwitterConcern\n extend ActiveSupport::Concern\n include Oauthable\n\n included do\n validate :validate_twitter_options\n valid_oauth_providers :twitter\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Ruby source files glob path in gemspec\n"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = 'hector-identity-blolol'\n s.version = '1.0.0'\n s.platform = Gem::Platform::RUBY\n s.authors = ['Ross Paffett']\n s.email = ['ross@ros... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spelling error in info sidebar.\n"
},
{
"from": "human",
"value": "module ArtifactsHelper\n def temportal_facet_path(params, low, high)\n artifacts_path(params.dup.update(low_date: low, high_date: high, page: 1))\n end\n\n def temporal_facet_menu_item(para... | ruby | chosen |
[
{
"from": "system",
"value": "Add a dummy user for development use\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:seed command (or created alongside the da... | ruby | chosen |
[
{
"from": "system",
"value": "Fix exception being caused by use of `public_send` in add_breadcrumb macro\n"
},
{
"from": "human",
"value": "module BootstrapSassExtras\n module BreadCrumbs\n def self.included(base)\n base.extend(ClassMethods)\n base.helper_method :breadcrumbs?,\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add trigger to update User from user_details\n"
},
{
"from": "gpt",
"value": "class UpdateUserFromUserDetails < ActiveRecord::Migration\n def up\n execute <<-SQL\n CREATE OR REPLACE FUNCTION public.update_user_from_user_details() RETURNS trigger\n LANGUAGE ... | ruby | chosen |
[
{
"from": "system",
"value": "Use \" (double quote) for string literal\n"
},
{
"from": "human",
"value": "# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>\n#\n# This library is free software; you can redistribute it and/or\n# modify it under the terms of the GNU Lesser General Public\n# L... | ruby | chosen |
[
{
"from": "system",
"value": "Add rocket icon to precompile.\n"
},
{
"from": "human",
"value": "module RocketJobMissionControl\n class Engine < ::Rails::Engine\n isolate_namespace RocketJobMissionControl\n\n require 'rocketjob'\n require 'jquery-rails'\n require 'haml'\n require ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a constant name inconsistent with its path\n"
},
{
"from": "human",
"value": "class Specinfra::Command::Ubuntu::Base::V18::Port < Specinfra::Command::Ubuntu::Base::Port\n class << self\n include Specinfra::Command::Module::Ss\n end\nend\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "system",
"value": "Remove \"Provisional\" from the registration type list\n"
},
{
"from": "human",
"value": "module WavesUtilities\n class RegistrationType\n class << self\n def in_part(part)\n case part.to_sym\n when :part_1\n [:commercial, :pleasure]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix errors on unassign_tags when is no tags\n"
},
{
"from": "human",
"value": "module Taggable\n extend ActiveSupport::Concern\n\n class TagList < Array\n cattr_accessor :delimiter\n @@delimiter = ','\n\n def initialize(list)\n list = list.is_a?(Arra... | ruby | chosen |
[
{
"from": "system",
"value": "Test that AttendanceProcessor handles a valid token for an inactive event\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TextMessage::AttendanceProcessorTest < ActiveSupport::TestCase\n test 'processes with a valid token for an active event' do\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make rails dependency 3 or higher\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/appsignal/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\n 'Robert Beekman',\n 'Steven Weller',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move deployment task name logic into it’s own method\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule CF\n class Deploy\n class EnvConfig < Hash\n def self.task_name(name)\n \"cf:deploy:#{name}\"\n end\n\n def initialize(name, de... | ruby | chosen |
[
{
"from": "system",
"value": "Check if new reports can be created during first migration\n"
},
{
"from": "human",
"value": "# encoding utf-8\n# Copyright (c) Universidade Federal Fluminense (UFF).\n# This file is part of SAPOS. Please, consult the license terms in the LICENSE file.\n\nclass Crea... | ruby | chosen |
[
{
"from": "system",
"value": "Update the pod version to 2.0"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Benchmark'\n s.version = '1.2'\n s.ios.deployment_target = '8.0'\n s.osx.deployment_target = '10.11'\n s.summary = 'The ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a Homebrew formula for Tinkey.\n\nTo install on Linux and macOS, run:\n\nbrew tap google/tink https://github.com/google/tink\nbrew install tinkey\n\nPiperOrigin-RevId: 321201344\n"
},
{
"from": "gpt",
"value": "# A Homebrew formula for Tinkey on Linux and macOS.\... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to pass on rom 0.5.0\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Commands / Delete' do\n include_context 'users and tasks'\n\n subject(:users) { rom.commands.users }\n\n before do\n setup.relation(:users) do\n def by_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in the braintree payment configuration\n"
},
{
"from": "human",
"value": "if Settings.defined?(:shop, :payment_provider)\n IslayShop::Engine.config.payments[:provider] = Settings.for(:shop, :payment_provider).to_sym\n\n if Settings.defined?(:shop, :curr... | ruby | chosen |
[
{
"from": "system",
"value": "Make spec pass when run on machines with the TZ set to UTC\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Delayed::Job do\n before(:all) do\n @backend = Delayed::Job\n end\n \n before(:each) do\n Delayed::Worker.max_priority = nil\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Apply \"use guard expression advice\" from RuboCop.\n"
},
{
"from": "human",
"value": "require 'puppet'\nrequire 'yaml'\nrequire 'faraday'\n\nPuppet::Reports.register_report(:slack) do\n desc <<-DESC\n Send notification of puppet run reports to Slack Messaging.\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add error helper to basic sparql module\n"
},
{
"from": "human",
"value": "require 'sparql/client'\n\nmodule Yummydata\n module Criteria\n class BasicSPARQL\n\n def initialize(uri)\n @client = SPARQL::Client.new(uri)\n end\n\n def count_sta... | ruby | chosen |
[
{
"from": "human",
"value": "Update tool_review_id primary and foreign keys to bigint\n"
},
{
"from": "gpt",
"value": "class ChangeToolReviewIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :tool_reviews, :id, :bigint\n\n change_column :notifications, :tool_review_id, :b... | ruby | chosen |
[
{
"from": "system",
"value": "Use builds repository to fetch requested build for console resource.\n"
},
{
"from": "human",
"value": "module Citrus\n module Web\n class BuildConsoleResource < Resource\n\n def initialize\n set_headers\n end\n\n def set_headers\n r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Screens Connect.\n"
},
{
"from": "human",
"value": "cask 'screens-connect' do\n version '3.6.1'\n sha256 '18bb65623aadff7f931456598f12ba33f5c54bad9c1f7f2a3b10f9585f8bc771'\n\n # evodia.com was verified as official when first introduce... | ruby | chosen |
[
{
"from": "system",
"value": "Use select_value instead of exec_query\n"
},
{
"from": "human",
"value": "class MiqPglogical\n module ConnectionHandling\n extend ActiveSupport::Concern\n\n included do\n delegate :logical_replication_supported?, :to => :class\n end\n\n module Clas... | ruby | chosen |
[
{
"from": "system",
"value": "Add a guardian statement on summon_date_Field.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Spectrum\n module Config\n class SummonDateField < Field\n type 'summon_date'\n\n def transform(value)\n [value.day, value.mo... | ruby | chosen |
[
{
"from": "system",
"value": "Raise if the object isn't a hash or an array"
},
{
"from": "human",
"value": "module Transcoder\n class Json < Parser\n identifier \"application/json\",\n \"application/x-javascript\",\n \"text/javascript\",\n \"text/x-j... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Updated dutch language code\"\n\nThis reverts commit 5cd60c98d21181de759b641c3dce6be6ad5ebd41.\n"
},
{
"from": "human",
"value": "module FastlaneCore\n module Languages\n # These are all the languages which are available to use to upload app metadata an... | ruby | chosen |
[
{
"from": "system",
"value": "Use debugger gem for ruby 1.9 in rails template\n"
},
{
"from": "human",
"value": "require 'alchemy/version'\n# This rails template installs Alchemy and all depending gems.\n\n# Installing Alchemy Gem\n\ngem 'alchemy_cms', \"~> #{Alchemy::VERSION}\"\ngem 'ruby-debug... | ruby | chosen |
[
{
"from": "system",
"value": "Convert < > and "e; when scanned\n"
},
{
"from": "human",
"value": "module Ruboto\n module Util\n module ScanInAPI\n ###########################################################################\n #\n # Scan the XML file. Much faster than ... | ruby | chosen |
[
{
"from": "system",
"value": "Add teardown method to transport.\n"
},
{
"from": "human",
"value": "require 'aggro/nanomsg_transport/client'\nrequire 'aggro/nanomsg_transport/publisher'\nrequire 'aggro/nanomsg_transport/server'\nrequire 'aggro/nanomsg_transport/subscriber'\n\nmodule Aggro\n # Pu... | ruby | chosen |
[
{
"from": "system",
"value": "Use puts instead of say\n\nFix #232\n"
},
{
"from": "human",
"value": "module AlgoliaSearch\n module Utilities\n class << self\n def get_model_classes\n Rails.application.eager_load! if Rails.application # Ensure all models are loaded (not necessary ... | ruby | chosen |
[
{
"from": "human",
"value": "Add first tests to likes_controller\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe LikesController, type: :controller do\n\tlet(:like){FactoryGirl.create(:like)}\n\tcontext \"With user logged in\" do\n\t\tbefore :each do\n\t\t\tsession[:use... | ruby | chosen |
[
{
"from": "system",
"value": "Test case for form_builder attachments helper\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe 'ActsAsAttachable' do\n class SampleModel < ActiveRecord::Base\n def self.columns\n []\n end\n\n acts_as_attachable\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug with @change not being set when an error occures in the new change suggestion form.\n"
},
{
"from": "human",
"value": "class ChangeSuggestionsController < ApplicationController\n resource_controller\n belongs_to :activity\n \n new_action.before { @change... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to zap annoying hard-tabs\n\nHard tabs mess up diffs and are against our coding standard. Eclipse apparently\ncannot be trusted to keep hard tabs out of files, no matter what settings you\nuse. Eclipse also likes to consider hard tabs as 4 spaces, whereas everyone\nel... | ruby | chosen |
[
{
"from": "system",
"value": "Update the compilation error message for when coffeescript isn't available\n"
},
{
"from": "human",
"value": "namespace :barista do\n\n desc \"Compiles coffeescripts from app/coffeescripts into public/javascripts\"\n task :brew => :environment do\n if !Barista:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing output formats. Add test.\n"
},
{
"from": "human",
"value": "require \"formula\"\n\nclass VasmM68kMot < Formula\n desc \"portable and retargetable assembler\"\n homepage \"http://sun.hasenbraten.de/vasm/\"\n url \"http://server.owl.de/~frank/tags/vas... | ruby | chosen |
[
{
"from": "system",
"value": "Scale down Unicorn worker count\n"
},
{
"from": "human",
"value": "preload_app true\nworker_processes 2\ntimeout 30\n\ncheck_client_connection true\n\nlisten '/u/apps/handy/shared/sockets/unicorn.sock', backlog: 2048\npid '/u/apps/handy/shared/pids/unicorn.pid'\nstd... | ruby | chosen |
[
{
"from": "human",
"value": "Create initial library database thingy.\n"
},
{
"from": "gpt",
"value": "require 'sequel'\n\nmodule Peapod\n # An object providing a connection to the URY podcast library\n class LibraryDatabase\n [ # CONSTANT SCHEMA TABLE\n %i(PODCAST uryplaye... | ruby | chosen |
[
{
"from": "system",
"value": "Remove devise config from install generator\n"
},
{
"from": "human",
"value": "module SpreeReviews\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default => false\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing name and email.\n"
},
{
"from": "human",
"value": "name 'jhdc-nameserver'\nmaintainer 'YOUR_NAME'\nmaintainer_email 'YOUR_EMAIL'\nlicense 'All rights reserved'\ndescription 'Installs/Configures caching bind server'\nlong_d... | ruby | chosen |
[
{
"from": "system",
"value": "Add contact info and license to metdata\n"
},
{
"from": "human",
"value": "name 'application_dotnet'\nmaintainer 'The Authors'\nmaintainer_email 'you@example.com'\nlicense 'all_rights'\ndescription 'Installs/Configures application_dot... | ruby | chosen |
[
{
"from": "system",
"value": "Remove content check for Jenkins config.xml\n\nRemove the two tests for the contents of the managed `config.xml` file.\n\nWe should have tests to verify that the contents are being set\ncorrectly, but I don't think these tests are helpful as they don't check\nwhich configuratio... | ruby | chosen |
[
{
"from": "system",
"value": "Check if top-level `Libnotify` is defined\n"
},
{
"from": "human",
"value": "begin\n require 'libnotify'\nrescue LoadError\nend\n\nmodule Capistrano\n module Send\n module Libnotify\n def self.supported?\n defined?(Libnotify) && Libnotify::API.insta... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper for getting origin of request for CORS\n"
},
{
"from": "human",
"value": "module Lanes\n module API\n\n module HelperMethods\n\n def lanes_application_title\n Extensions.controlling.title\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Retrieve hooks for a given repo\"\n\nThis reverts commit ed3b2845bf66768893ca37b398b2bda91599dbe0.\n"
},
{
"from": "human",
"value": "require \"httparty\"\n\nmodule GotFixed\n module Adapters\n class Github\n include HTTParty\n base_uri \"http... | ruby | chosen |
[
{
"from": "system",
"value": "Fix coin withdrawal with otp\n"
},
{
"from": "human",
"value": "require_relative \"coin_collection\"\n\nmodule Remitano\n class CoinWithdrawals < Remitano::CoinCollection\n attr_reader :coin\n\n def initialize(coin)\n @coin = coin\n end\n\n def my_... | ruby | chosen |
[
{
"from": "system",
"value": "Change users' QR code size to 6\n"
},
{
"from": "human",
"value": "require \"rqrcode\"\n\nmodule Spree\n module Admin\n UsersController.class_eval do \n\n def qr\n user = User.find(params[:id])\n code = { :profile => { :name => user.email, :se... | ruby | chosen |
[
{
"from": "system",
"value": "Update for the library and media fixes\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 |spec|\n spec.name = \"gembots\"\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix login error when password_digest is nil.\n"
},
{
"from": "human",
"value": "module AwesomeAccess::ActionControllerConcern\n\n extend ActiveSupport::Concern\n\n included do\n end\n\n private\n\n def awesome_access_restrict\n redirect_to AwesomeAccess.... | ruby | chosen |
[
{
"from": "human",
"value": "Add review controller to api.\n"
},
{
"from": "gpt",
"value": "module ApiFlashcards\n module Api\n module V1\n class ReviewController < ApiFlashcards::ApiController\n def index\n if params[:id]\n @card = current_user.cards.find(par... | ruby | chosen |
[
{
"from": "system",
"value": "Update Ruby API event documentation to make usage of msg_text argument more apparent\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'dogapi'\n\napi_key='9775a026f1ca7d1c6c5af9d94d9595a4'\napp_key='87ce4a24b5553d2e482ea8a8500e71b8ad4554ff'\n\ndog = Do... | ruby | chosen |
[
{
"from": "system",
"value": "Make search result enumerable when there is only one result.\n"
},
{
"from": "human",
"value": "module CtGov\n class SearchResultSet\n\n include Enumerable\n\n def initialize(params, response_xml)\n @params = params\n @response_xml = response_xml\n\... | ruby | chosen |
[
{
"from": "human",
"value": "Add chef-spec for backup recipe\n"
},
{
"from": "gpt",
"value": "require_relative '../spec_helper'\n\ndescribe 'backup_restore::backup' do\n let(:chef_run) do\n runner = ChefSpec::Runner.new(\n cookbook_path: %w(site-cookbooks cookbooks),\n platform: ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure :assigns are copied to the controller before checking them.\n"
},
{
"from": "human",
"value": "module ClassAction\n module RSpec\n\n # Adds support for speccing Class Actions. Sets up the example as\n module ClassActionExampleGroup\n def self.i... | ruby | chosen |
[
{
"from": "system",
"value": "Add indication of privacy of project when listing\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'json'\n\nmodule Relish\n module Command\n class Projects < Base\n \n def default\n list\n end\n \n def list\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix access grant bulk uploads\n"
},
{
"from": "human",
"value": "module Sproutvideo\n\tclass AccessGrant < Resource\n\t\t\n\t\tdef self.create(options={})\n\t\t\tpost(\"/access_grants\", options)\n\t\tend\n\t\t\n\t\tdef self.list(options={})\n\t\t\tparams = {\n\t\t\... | ruby | chosen |
[
{
"from": "system",
"value": "Change authentication mechanism for email\n"
},
{
"from": "human",
"value": "\nActionMailer::Base.smtp_settings = {\n :address => ENV[\"SMTP_MAIL_ADDR\"],\n :port => ENV[\"SMTP_MAIL_PORT\"],\n :domain => ENV[\"SMTP_MAIL_... | ruby | chosen |
[
{
"from": "system",
"value": "Update render options to remove performance implications of many render options types"
},
{
"from": "human",
"value": "module ActionController\n module RenderOptions\n extend ActiveSupport::DependencyModule\n \n included do\n extlib_inheritable_access... | ruby | chosen |
[
{
"from": "system",
"value": "Disable readline specs if rb-readline is used\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nunless MSpec.retrieve(:features).key?(:readline)\n begin\n require 'readline'\n rescue LoadError\n else\n MSpec.enab... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor account_params in order to be extended\n"
},
{
"from": "human",
"value": "module Refinery\n module Multisites\n module Admin\n class AccountsController < ::Refinery::AdminController\n\n crudify :'refinery/multisites/account',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix convert team role property methods names\n"
},
{
"from": "human",
"value": "class ConvertTeamRolePropertyToAttribute < ActiveRecord::Migration[5.0]\n def up\n teams = BusinessUnit.all\n teams.each do |team|\n convert_property_to_attribute(team)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add data migration to clean up blank outcomes\n\nThis is legacy data, created as a result of the way nested attributes\nused to be used to add/edit consultation responses.\n"
},
{
"from": "gpt",
"value": "require 'benchmark'\n\ntime = Benchmark.realtime do\n blank_o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for UART console setting\n"
},
{
"from": "human",
"value": "describe file('/boot/config.txt') do\n it { should be_file }\n it { should be_mode 755 }\n it { should be_owned_by 'root' }\n its(:content) { should match /^hdmi_force_hotplug=1/ }\n its(:cont... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning about missing null on timestamp\n"
},
{
"from": "human",
"value": "class CreateLineItemActions < ActiveRecord::Migration\n def change\n create_table :spree_line_item_actions do |t|\n t.references :line_item, index: true, null: false\n t.ref... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"DY - make app clear data before every scenario\"\n\nThis reverts commit fc0601723f2338873dfcc07d14602494b96c91bb.\n"
},
{
"from": "human",
"value": "require 'calabash-android/management/app_installation'\n\nAfterConfiguration do |config|\n FeatureNameMemor... | ruby | chosen |
[
{
"from": "system",
"value": "Return result. Needed for tests.\n"
},
{
"from": "human",
"value": "# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/\n\nrequire 'net/imap'\n\nmodule Channel::EmailSend\n def self.send(article, notification = false)\n channel = Channel.f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix frozen string literal usage.\n\n… in the off chance someone's using the latest TS with Rails 3.2 on MRI 2.3+.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# The conditions approach is only available in Rails 3. This behaviour is\n# superse... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct signature for UploadSetUpdateSuccessService\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Sufia::UploadSetUpdateSuccessService do\n let(:depositor) { FactoryGirl.find_or_create(:jill) }\n let(:batch) { UploadSet.create }\n\n let... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `around_filter` deprecation warning from Rails 5.0.\n"
},
{
"from": "human",
"value": "\nmodule ActionController\n module ActionProfiling\n extend ActiveSupport::Concern\n\n included do\n include ActiveProfiling::RubyProfiler\n include ActivePro... | ruby | chosen |
[
{
"from": "system",
"value": "Test new Configuration option to set root as an absolute path\n"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire \"rubycritic/configuration\"\n\ndescribe Rubycritic::Configuration do\n describe \"#root\" do\n before do\n @default = Rubycrit... | ruby | chosen |
[
{
"from": "system",
"value": "Transform an array of DtoLazy to an array of ActiveRecord objects\n\nTransform an array of DtoLazy to an array of ActiveRecord objects\n"
},
{
"from": "human",
"value": "class Dto\n attr_reader :dto_collection, :data\n\n def initialize(dto_collection, data)\n @... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.