conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update to scoped package name\n"
},
{
"from": "human",
"value": "# Install webpacker\ncopy_file \"#{__dir__}/config/webpacker.yml\", \"config/webpacker.yml\"\n\nputs \"Copying webpack core config and loaders\"\ndirectory \"#{__dir__}/config/webpack\", \"config/webpa... | ruby | chosen |
[
{
"from": "system",
"value": "Improve handling of non-strings with Group methods.\n"
},
{
"from": "human",
"value": "module Metrics\n module Rails\n class Group\n \n def initialize(prefix)\n @prefix = \"#{prefix}.\"\n end\n \n def group(prefix)\n prefix... | ruby | chosen |
[
{
"from": "system",
"value": "Return the value returned by the block\n"
},
{
"from": "human",
"value": "module Potemkin\n class Builder\n\n # No environment variables by default\n def env_vars\n {}\n end\n\n # Will build the actual APK\n def build\n logger.describe \"cr... | ruby | chosen |
[
{
"from": "system",
"value": "Update TD initializer to cope with deleting tickets\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'ticket_dispenser'\n\nRails.application.config.to_prepare do\n TicketDispenser::Ticket.class_eval do\n def sender\n user = messag... | ruby | chosen |
[
{
"from": "system",
"value": "Implement RDF::RDFa::VERSION by parsing VERSION file.\n"
},
{
"from": "human",
"value": "module RDF::RDFa::VERSION\n MAJOR = 0\n MINOR = 2\n TINY = 2\n EXTRA = nil\n\n STRING = [MAJOR, MINOR, TINY].join('.')\n STRING << \"-#{EXTRA}\" if EXTRA\n\n ##\n # @re... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up Brakeman pre-commit hook\n\nChange-Id: If8ca86338b4d85a0d761ade716c8697ad69178b8\nReviewed-on: http://gerrit.causes.com/37961\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by: Shane da Silva <6f6e68d1df92f30cb4b3ce35260ddf94a402f33... | ruby | chosen |
[
{
"from": "system",
"value": "Change new file build rule\n"
},
{
"from": "human",
"value": "module Planaria::Generator\n module Builder\n class Executer\n def initialize(name)\n @name = name\n end\n\n def run \n yaml_files.each do |yml|\n file_name = yml... | ruby | chosen |
[
{
"from": "system",
"value": "Check the use_layout variable before anything else.\n"
},
{
"from": "human",
"value": "module Salt\n module Publishable\n def write(path, context = false)\n directory_path = output_path(path)\n contents = context ? render(@contents, {this: self}.merge(... | ruby | chosen |
[
{
"from": "system",
"value": "Allow errors to be raised\n"
},
{
"from": "human",
"value": "module Traitify\n module Request\n def method_missing(meth, *args, &block)\n if [:get, :post, :put, :delete].include? meth\n request(meth, *args)\n else\n super\n end\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to republish `Attachable`\n\nThis migration republishes all documents that are `Attachable` and have\nan `HtmlAttachment`.\n\nThis will cause the `HtmlAttachment`s to be republished too allowing us\nto get an up to date view of any remaining issues with the migrati... | ruby | chosen |
[
{
"from": "human",
"value": "Add syndications controller with create/destroy actions.\n"
},
{
"from": "gpt",
"value": "require_dependency 'francis_cms/francis_cms_controller'\n\nmodule FrancisCms\n class SyndicationsController < FrancisCmsController\n before_action :require_login\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove stray bracket from string\n"
},
{
"from": "human",
"value": "module Zemanta\n class Enhancer\n # Options:\n #\n # no_duplicates (default: false) - ensures links are used once\n # skip - regexp for URLs not to be hot-linked\n # strip_query_s... | ruby | chosen |
[
{
"from": "system",
"value": "Set content-length header in the FakeMiddleware\n\nSimilar change as rails/web-console#290\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"action_view\"\nrequire \"action_dispatch\" # This is needed to use Mime::Type\nrequire \"web_cons... | ruby | chosen |
[
{
"from": "system",
"value": "Add description and summary to gemspec file\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'elasticsearch/simple/version'\n\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless assignment in secret variables specs\n"
},
{
"from": "human",
"value": "module QA\n feature 'secret variables support', :core do\n scenario 'user adds a secret variable' do\n Runtime::Browser.visit(:gitlab, Page::Main::Login)\n Page::Mai... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Chef server Nginx logrotate configuration\n- Add `copytruncate`, `notifempty` and `delaycompress` options to ensure\nwe get the behavior we actually want.\n- With `copytruncate` chosen, we can then remove the existing\n`postrotate` command and replace it with a `SIGUSR1`, k... | ruby | chosen |
[
{
"from": "system",
"value": "Add rails as development dependency\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"paperclip_waveform/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix handling spaces in filenames for gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/access2rails/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Brian Wong\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Add I18n support and capybara\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\nrequire 'active_portal/version'\n\nGem::Specification.new do |s|\n s.name = 'activeportal'\n s.version = ActivePortal::VERSION\n s.au... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 500 error when requesting the favicon when not logged in.\n"
},
{
"from": "human",
"value": "module AuthenticationBehavior\n\textend ActiveSupport::Concern\n\n\tincluded do\n\t\tbefore_action :require_netbadge\n\tend\n\n\tprivate\n\n\tdef require_netbadge\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove spec for scenario that doesn't exist in the project (no headers in CSV export file)\"\n\nThis reverts commit d2c16d9d8bf849a459900e6bc6e4b6b1a3fd27a8.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe CsvTransformer do\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "AA-8903: Allow to use older version of pg too\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = 'cranium'\n spec.version = '0.8'\n spec.authors = ['Emarsys Technologies']\n spec.email = ['smart-insight-dev@emarsys.com']\n spec.de... | ruby | chosen |
[
{
"from": "system",
"value": "Drop sass-rails dependency, so sites can use sassc-rails or sass-rails.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'effective_datatables/version'\n\n# Describe your gem and declare its d... | ruby | chosen |
[
{
"from": "system",
"value": "Send websocket work to background thread\n"
},
{
"from": "human",
"value": "require 'slack'\n\nSlack.configure do |config|\n config.token = ENV['slack_api_token']\nend\n\nclient = Slack.realtime\n\nclient.on :team_join do |data|\n welcome = \"Welcome to slashrocke... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate return adjustments source to originator\n"
},
{
"from": "gpt",
"value": "class UpdateReturnAdjustments < ActiveRecord::Migration[5.0]\n class Spree::Adjustment < ActiveRecord::Base\n belongs_to :source, polymorphic: true\n end\n\n def up\n Spree::Adj... | ruby | chosen |
[
{
"from": "system",
"value": "Increase version from 0.0.1.3 to 0.0.1.4\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client'\n s.version = '0.0.1.3'\n s.summary = 'Common code for the EventStore client'\n s.description = '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove outdated activesupport dependency\nUpdate webmock dependency version\n"
},
{
"from": "human",
"value": "# coding: utf-8\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'sms_ru/version'\n\nGem::Specification.new do |spec|\n spec.name = 'smsru'... | ruby | chosen |
[
{
"from": "system",
"value": "Add encoding: utf-8 to gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails_presenter/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak associations to better match reference implementation\n"
},
{
"from": "human",
"value": "class User\n include NoBrainer::Document\n field :name\n field :rating\n has_many :notes, foreign_key: :owner_id\nend\n\nclass Note\n include NoBrainer::Document\n f... | ruby | chosen |
[
{
"from": "system",
"value": "Add padding to test error to check party_foul title length\n\nThis is to test our assertion that party_foul is posting titles longer than 256 chars.\n"
},
{
"from": "human",
"value": "module Renalware\n module System\n class ErrorsController < ApplicationControl... | ruby | chosen |
[
{
"from": "system",
"value": "Add check for env variable.\n\nBecause:\n\nThe deploy to Heroku button is launching builds that break due to a\nmissing env variable.\n\nThis:\n\nAdds a guard clause to short circuit before redis attempts to use the\nenv variable.\n"
},
{
"from": "human",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to reflect the new github repo.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'errbit_github_plugin/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Test with another user for unicorn deployment\n"
},
{
"from": "human",
"value": "# Set your full path to application.\napp_path = \"/home/rails/current\"\n\n# Set unicorn options\nworker_processes 3\npreload_app true\ntimeout 180\nlisten \"127.0.0.1:8080\"\n\n# Spaw... | ruby | chosen |
[
{
"from": "system",
"value": "Add flash when resending invitation\n"
},
{
"from": "human",
"value": "module Manager\n class AdministrateursController < Manager::ApplicationController\n def create\n administrateur = current_administration.invite_admin(create_administrateur_params[:email]... | ruby | chosen |
[
{
"from": "system",
"value": "Update transit_facility_fta tests based on f2460cc, e4fadaf, and 6729a66\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe \"assets/_transit_facility_fta.html.haml\", :type => :view do\n\n it 'fta info' do\n test_asset = create(:bus_shelter, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add radial example of circles\n"
},
{
"from": "gpt",
"value": "require './lib/lodo'\n\nROW_COUNT = 9\nCOL_COUNT = 9\nCOLOR_COUNT = 18\n\nboard = Lodo::Board.new\n\noffset = 0.0\nspread = 1.3\nborder_brightness = 0.0\nborder_brightness_increasing = true\nborder_bright... | ruby | chosen |
[
{
"from": "system",
"value": "Update token for merchant 1"
},
{
"from": "human",
"value": "role :www, %w(deployer@vpn.framsteg.de)\nserver \"vpn.framsteg.de\", user: \"deployer\", roles: %w(www)\n\n# uncomment in case of travis, capistrano will have its own\nset :ssh_options, keys: [\"config/dep... | ruby | chosen |
[
{
"from": "system",
"value": "Set swift version no to 5.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Bulldog'\n s.version = '1.0.3'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.summary = 'Bulldog is a super-fast json parser that will keep attacking until ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace the use of constants with class methods so they can inherit an overridden home path\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nrequire 'active_support/core_ext/hash/deep_merge'\n\nrequire File.expand_path('briefcase/commands', File.dirname(__FILE__... | ruby | chosen |
[
{
"from": "system",
"value": "Put datamapper in the master class for the module\n"
},
{
"from": "human",
"value": "require \"mumblr/version\"\nrequire \"tumblr_client\"\nrequire \"pry\"\nrequire \"open-uri\"\nrequire \"progressbar\"\n\nmodule Mumblr\n def load_database(connection_string)\n m... | ruby | chosen |
[
{
"from": "system",
"value": "Use proper config option in Railtie\n"
},
{
"from": "human",
"value": "module Stairs\n class Railtie < Rails::Railtie\n load \"stairs/tasks.rb\"\n end\nend\n"
},
{
"from": "gpt",
"value": "module Stairs\n class Railtie < Rails::Railtie\n rake_ta... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant methods from QueryHash\n"
},
{
"from": "human",
"value": "module URI\n ##\n # Extends a hash with query string reordering/deleting capabilities\n module QueryHash\n def ordered_query_string(*args)\n unmentioned_keys = keys.reject { |key| ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to question mark versions of config\n\n/cc @tmaier\n"
},
{
"from": "human",
"value": "Routes = Rack::Builder.new do\n use Pliny::Middleware::RescueErrors, raise: !Config.rescue_errors?\n use Honeybadger::Rack::ErrorNotifier if Config.honeybadger_api_key\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add daemonize mode to Slatan\n"
},
{
"from": "human",
"value": "require \"slatan/version\"\nrequire \"slatan/spirit\"\nrequire \"slatan/heart\"\nrequire \"slatan/ear\"\nrequire \"slatan/buttocks\"\n\nmodule Slatan\n\n class << self\n def run\n Buttocks.init... | ruby | chosen |
[
{
"from": "system",
"value": "Update Validation Message for Lesson\n\nFix typo (stated 'Course') in the validation message for the Lesson\nvalidation.\n"
},
{
"from": "human",
"value": "class Lesson < ActiveRecord::Base\n attr_accessible :background, :title\n\n validates :title, :presenc... | ruby | chosen |
[
{
"from": "system",
"value": "Update sendgrid code for new gem\n"
},
{
"from": "human",
"value": "class Emailer\n def initialize\n @client = SendGrid::Client.new(api_key: ENV[\"SENDGRID_API_KEY\"])\n end\n\n def voicemail_notification(url, duration, phone_number)\n body = \"A new voicem... | ruby | chosen |
[
{
"from": "system",
"value": "Add steps for personal phone and address\n\n0:10\n"
},
{
"from": "human",
"value": "Given /^my first name is \"(.*?)\"$/ do |name|\n @first_name = name\nend\n\nGiven /^my last name is \"(.*?)\"$/ do |name|\n @last_name = name\nend\n\nGiven /^I do not work for anyo... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler requirement from ~> 1.7 to ~> 2.0\n\nUpdates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.\n- [Release notes](https://github.com/bundler/bundler/releases)\n- [Changelog](https://github.com/bundler/bundler/blob/mas... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy existing seeded data before re-seeding\n\nThis prevents doubling up on topics and handles.\n"
},
{
"from": "human",
"value": "require_relative \"news_seeds.rb\" #Tana\nrequire_relative \"companies_seeds.rb\" #Tana\nrequire_relative \"celebs_seeds.rb\" #Monic... | ruby | chosen |
[
{
"from": "system",
"value": "Add default admin for development environment\n"
},
{
"from": "human",
"value": "CardTemplate.delete_all\nCard.delete_all\nAdminUser.delete_all\n\ntemplate_list = [\n {\n greeting: \"Sorry you feel that way\",\n image_file: \"sorry_template_0.1.svg\"\n },\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add vocabulary for DbPedia resources\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule CubeDataModel\n # RDF vocabularies for the key concepts in the Cube data model for UKHPI\n module Vocabularies\n QB = RDF::Vocabulary.new('http://pur... | ruby | chosen |
[
{
"from": "system",
"value": "Add repo name to seed repository generator\n"
},
{
"from": "human",
"value": "require \"colorize\"\nrequire \"database_cleaner\"\nrequire \"factory_girl\"\n\nif ENV[\"CLEAR\"]\n puts \"Clear database, hold on\".yellow\n DatabaseCleaner.strategy = :truncation\n Da... | ruby | chosen |
[
{
"from": "system",
"value": "Add couple of pages to seed data.\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 rake db:seed (or created alongside the db with db:set... | ruby | chosen |
[
{
"from": "system",
"value": "Exit immediately if an exception bubbles out to Thread run\n\n- Don't want test to be corrupted by missing runs from dead threads\n"
},
{
"from": "human",
"value": "module BME\n class Runner\n class << self\n def run(threads, repetitions, &blk)\n gro... | ruby | chosen |
[
{
"from": "human",
"value": "Add CLion 1.0 with bundled JDK 1.8\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'clion-bundled-jdk' do\n version '1.0'\n sha256 '3e18c548084122e33bf2545b62425b6ae2b3fc74945133b7edd03fac34f7f2f2'\n\n url \"https://download.jetbrains.com/cpp/CLion-#{version}-custom-... | ruby | chosen |
[
{
"from": "system",
"value": "Use ActiveSupport::Concern syntax in Permalinks\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Spree\n module Core\n module Permalinks\n extend ActiveSupport::Concern\n\n included do\n class_attribute :permalink_optio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for legacy migration due to removal of Transaction class.\n"
},
{
"from": "human",
"value": "class StiForTransactions < ActiveRecord::Migration\n def self.up\n rename_table \"creditcard_txns\", \"transactions\"\n add_column \"transactions\", \"type\", :st... | ruby | chosen |
[
{
"from": "system",
"value": "Return a lambda in the translation instead of a standard value. Also adds template name as prefix key for translation\n"
},
{
"from": "human",
"value": "require 'mustache'\nrequire 'alephant/views'\nrequire 'hashie'\n\nrequire 'i18n'\n\nmodule Alephant::Views\n cla... | ruby | chosen |
[
{
"from": "system",
"value": "Add licenses, included all libs, better define thor dep in gemspec.\n"
},
{
"from": "human",
"value": "# -*- mode: ruby; encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'ls_stash'\n s.version = '0.0.1'\n s.platform = Gem::Platform::R... | ruby | chosen |
[
{
"from": "system",
"value": "Fix require readline bug. When using gem rb-readline, require 'readline' not 'rb-readline'\n"
},
{
"from": "human",
"value": "# A pure ruby readline which requires {rb-readline}[https://github.com/luislavena/rb-readline].\nclass Bond::Ruby < Bond::Readline\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out a block of code in the config code due to URL name error.\n"
},
{
"from": "human",
"value": "require 'vagrant'\nrequire 'vagrant/util/downloader'\nrequire 'tempfile'\n\nmodule VagrantPlugins\n module CaCertificates\n module Config\n class CaCert... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"trying to fix build error\"\n\nThis reverts commit e947a61f344cf01a6c073513d582e1f9ed7325f8.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'FanBeat'\n s.version = '0.1.0'\n s.summary = 'Link to your part... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in seed file\n"
},
{
"from": "human",
"value": "Post.create(title: \"Lorem ipsum\", \"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\")\n\nPost.create(title: \"Dolor sit amet\", body: \"Consectetur adipiscing ... | ruby | chosen |
[
{
"from": "system",
"value": "Update seed.rb to include username and user\n"
},
{
"from": "human",
"value": "User.create!([\n {email: \"admin@example.com\", password: \"changeme\", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 1, current_sign_i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove support for rails < 4"
},
{
"from": "human",
"value": "require \"cookieless_sessions/version\"\n\nmodule CookielessSessions\n module EnabledController\n extend ActiveSupport::Concern\n\n protected\n\n def default_url_options\n options = super.dup... | ruby | chosen |
[
{
"from": "human",
"value": "Add concern to filter by date ranges in gobierto_people controllers\n"
},
{
"from": "gpt",
"value": "module GobiertoPeople\n module DatesRangeHelper\n extend ActiveSupport::Concern\n\n included do\n helper_method :dates_range?, :filter_start_date, :filter... | ruby | chosen |
[
{
"from": "system",
"value": "Fix race condition in Capybara integration.\n\nFixes #365.\n"
},
{
"from": "human",
"value": "module Draper\n module DecoratorExampleGroup\n extend ActiveSupport::Concern\n included { metadata[:type] = :decorator }\n end\nend\n\nRSpec.configure do |config|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Support cdn_base_url. Need to improve naming. :-)"
},
{
"from": "human",
"value": "require \"dragonfly-imaginary/version\"\n\nrequire \"imaginary\"\nrequire \"open-uri\"\n\nmodule Dragonfly\n module DataStorage\n class ImaginaryStore\n include Dragonfly::Co... | ruby | chosen |
[
{
"from": "system",
"value": "Increase default max revisions to 30\n"
},
{
"from": "human",
"value": "require 'ruby-progressbar'\n\nrequire 'git_pissed/version'\nrequire 'git_pissed/git'\nrequire 'git_pissed/word_finder'\nrequire 'git_pissed/csv'\nrequire 'git_pissed/cli'\n\nmodule GitPissed\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix scope issues in new rename method\n\n"
},
{
"from": "human",
"value": "require 'net/ldap'\n# Monkey-patched in support for new superior.\nclass Net::LDAP # :nodoc:\n remove_const(:LdapError)\n class LdapError < RuntimeError # :nodoc:\n end\n\n class Connecti... | ruby | chosen |
[
{
"from": "system",
"value": "Fix source code and header paths in podspec file\n\nSource code resides in \"Sources\" and \"Sources/include\" now after spm\nrefactor\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"HTMLKit\"\n s.version = \"0.9.4\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use assert_nil to test for nil.\n"
},
{
"from": "human",
"value": "require_relative '../preamble'\n\nclass TedrahcuTest < Minitest::Test\n def test_detects_charset\n assert_equal nil, Tedrahcu.detect(nil)\n assert_equal '', Tedrahcu.detect('')\n assert_equ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable persistence for search window in GridPanel\n"
},
{
"from": "human",
"value": "module Netzke\n module Basepack\n class SearchWindow < Netzke::Basepack::Window\n\n action :search do\n { :text => I18n.t('netzke.basepack.search_window.action.sear... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the error message for missing yml file.\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule Alchemy\n module Generators\n class Base < ::Rails::Generators::Base\n class_option :template_engine, type: :string, aliases: '-e', desc: 'Template engi... | ruby | chosen |
[
{
"from": "human",
"value": "Rename the PK index to support table rename\n"
},
{
"from": "gpt",
"value": "class RenameStaffActionPk < ActiveRecord::Migration\n def up\n execute \"ALTER INDEX admin_logs_pkey RENAME TO staff_action_logs_pkey\"\n end\n\n def down\n execute \"ALTER INDEX st... | ruby | chosen |
[
{
"from": "human",
"value": "Create spec examples for DbNew button class\n"
},
{
"from": "gpt",
"value": "describe ApplicationHelper::Button::DbNew do\n let(:view_context) { setup_view_context_with_sandbox({}) }\n let(:dashboard_count) { 9 }\n let(:widgetsets) { Array.new(dashboard_count) { |... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec of ChatWork service\n"
},
{
"from": "human",
"value": "describe Qiita::Team::Services::Services::ChatworkV1 do\n include Qiita::Team::Services::Helpers::ServiceHelper\n\n it_behaves_like \"service\"\nend\n"
},
{
"from": "gpt",
"value": "descri... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec coverage for ActiveSupport::Relation =~ matcher\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"ActiveSupport::Relation =~ matcher\" do\n let!(:models) { Array.new(3) { MockableModel.create } }\n\n it \"verifies that the scope return... | ruby | chosen |
[
{
"from": "system",
"value": "Update path name to report the filename better on failure\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Mutant::Loader::Eval, '.run' do\n\n subject { object.run(node, mutation_subject) }\n\n let(:object) { desc... | ruby | chosen |
[
{
"from": "system",
"value": "Load networks for browsing and searching news items\n"
},
{
"from": "human",
"value": "class NewsItemsController < ApplicationController\n include NewsItemsHelper\n\n def index\n get_news_items\n @networks = Network.all\n end\n\n def sort_options\n rend... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug when storing binary image to database\n"
},
{
"from": "human",
"value": "class ThumbnailsController < ApplicationController\n # Turn off CSRF protection to avoid auth error only on the following method.\n #TODO: Need auth for API use. Until then, I disab... | ruby | chosen |
[
{
"from": "system",
"value": "Call uniq on the string version of mb_chars tags\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ProcessHashtagsService < BaseService\n def call(status, tags = [])\n tags = status.text.scan(Tag::HASHTAG_RE).map(&:first) if status.local?... | ruby | chosen |
[
{
"from": "system",
"value": "Add methods to dry up service classes\n"
},
{
"from": "human",
"value": "module Primer\n class BaseService\n class << self\n attr_reader :running_command\n def set_running_command command\n @running_command = command\n end\n\n def regi... | ruby | chosen |
[
{
"from": "system",
"value": "Add the Sprite to assets precompile\n"
},
{
"from": "human",
"value": "require \"plyr/rails/version\"\n\nmodule Plyr\n module Rails\n class Engine < ::Rails::Engine\n initializer :append_dependent_assets_path, :group => :all do |app|\n app.config... | ruby | chosen |
[
{
"from": "system",
"value": "Use class_method in Syoboemon::Connector module (add 'class<<self')\n"
},
{
"from": "human",
"value": "module Syoboemon\n\tmodule Connector\n\t\tURL\t\t\t= \"http://cal.syoboi.jp\"\n\t\tRSS2_PATH\t= \"/rss2.php\"\n\t\tDB_PATH\t\t= \"/db.php\"\n\t\tJSON_PATH\t= \"/js... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec file for cocopods.org\n"
},
{
"from": "gpt",
"value": "#\n# Be sure to run `pod spec lint NSRails.podspec' to ensure this is a\n# valid spec.\n#\n# Remove all comments before submitting the spec. Optional attributes are commented.\n#\n# For details see: http... | ruby | chosen |
[
{
"from": "system",
"value": "Update swift version in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Pageboy\"\n\n s.ios.deployment_target = '9.0'\n s.tvos.deployment_target = '10.0'\n s.swift_version = '4.0'\n\n s.requires_arc = true\n\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a default if a planning app has no location\n\nFixes #508\n"
},
{
"from": "human",
"value": "class PlanningApplication::IssuesController < IssuesController\n before_filter :load_planning_application\n before_filter :check_for_issue\n\n def new\n @issue = @... | ruby | chosen |
[
{
"from": "system",
"value": "Add nodoc to the Validations::Helpers [ci skip]\n"
},
{
"from": "human",
"value": "module ActiveModel\n module Validations\n module HelperMethods\n private\n def _merge_attributes(attr_names)\n options = attr_names.extract_options!.symbolize... | ruby | chosen |
[
{
"from": "system",
"value": "Extend application controller from host\n"
},
{
"from": "human",
"value": "module ImageManagement\n class ApplicationController < ActionController::Base\n protect_from_forgery\n\n # FIXME Remove filter once support for custom XML with nested resources is\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce batch size of stages we schedule for a migration\n"
},
{
"from": "human",
"value": "class ScheduleBuildStageMigration < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n MIGRATION = 'MigrateBuildStage'.freeze\n BA... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Drop another attr_accessible call\"\n\nThis reverts commit c5bcead4c75126e093ac7717886105b3bb256a1e.\n"
},
{
"from": "human",
"value": "class Mdm::User < ActiveRecord::Base\n extend MetasploitDataModels::SerializedPrefs\n\n #\n # Associations\n #\n\n h... | ruby | chosen |
[
{
"from": "system",
"value": "Add more flexible render process."
},
{
"from": "human",
"value": "module Wiselinks\n module Rendering\n\n def self.included(base)\n base.alias_method_chain :render, :wiselinks\n end\n\n protected\n\n def render_with_wiselinks(*args, &block)\n o... | ruby | chosen |
[
{
"from": "system",
"value": "Add some tasks to dump / load issues and users, in preparation for changing DB.\n"
},
{
"from": "human",
"value": "namespace :db do\n namespace :clear do\n\n desc 'Remove all votes.'\n task :votes => :environment do\n Vote.destroy_all\n end\n\n des... | ruby | chosen |
[
{
"from": "system",
"value": "Fix first feature spec sometimes timing out\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature \"Authentication\", js: true do\n include UIComponentHelper\n include AuthenticationWorkflow\n include WebHelper\n\n let(:user) { create(:user, passwo... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to change protocol and port\n"
},
{
"from": "human",
"value": "namespace :deploy do\n\n task :status do |t|\n require 'open-uri'\n system(\"git fetch -q\")\n on roles(:app) do |host|\n open(\"http://#{host}:80/deploy_status\", ssl_ver... | ruby | chosen |
[
{
"from": "system",
"value": "Include version numbers so intall generator will work\n"
},
{
"from": "human",
"value": "require \"raptor_editor_rails\"\n\nmodule RaptorEditorRails\n module Generators\n class InstallGenerator < Rails::Generators::Base\n desc \"Copies Raptor Editor #{Rapto... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop to version 0.60.0"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'anyway/version'\n\nGem::Specification.new do |s|\n s.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for backwards compatibility\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RailsLocaleDetection do\n\n describe '.locale_expiry' do\n it \"is set to 3 months by default\" do\n RailsLocaleDetection.config do |c|\n c.loca... | ruby | chosen |
[
{
"from": "system",
"value": "Use request_uri instead of path when downloading files to capture path + query string\n"
},
{
"from": "human",
"value": "require 'digest/md5'\nrequire 'fileutils'\nrequire 'net/http'\nrequire 'net/https'\nrequire 'uri'\n\nPuppet::Type.type(:remote_file).provide(:rub... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.