conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add a test file for BMFF::Box::Edit.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:\n\nrequire_relative '../../minitest_helper'\nrequire 'bmff/box'\nrequire 'stringio'\n\nclass TestBMFFBoxEdit <... | ruby | chosen |
[
{
"from": "human",
"value": "Add PERSON JOIN event type\n"
},
{
"from": "gpt",
"value": "class AddNewEventType < ActiveRecord::Migration\n def self.up\n # insert news feed related event types\n event_types = [\n { :id => 39, :name => \"PERSON JOIN\" }\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create migration to add slugs to Ideas\n"
},
{
"from": "gpt",
"value": "class AddSlugsToIdeas < ActiveRecord::Migration\n def self.up\n add_column :ideas, :slug, :string, :unique => true, :null => false\n end\n\n def self.down\n remove_column :ideas, :slug\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow client id and secret to be provided in token call"
},
{
"from": "human",
"value": "module Peat\n module TokenManager\n module_function\n\n def token\n fetch_token do\n connection.post do |req|\n req.url 'requestToken'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[hephaestus] Fix the way form is stored\n"
},
{
"from": "human",
"value": "class EntitiesExtractionTask < Base\n @queue = :entities_extraction_task\n\n attr_reader :document\n\n def self.perform(document_id)\n new(document_id).call\n end\n\n def initialize(i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with database transactions in specs.\n\nIt seems that since upgrading to Rails 3.1 and a newer version of the\nsqlite3 gem that we need to reconnect to the database after each spec,\notherwise the DDL operations are no longer being reset properly.\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning when adding error to Active Record object\n\nIn Rails 6.1, adding an error to an Active Record object using `<<`\nwill raise the following deprecation warning:\n\nDEPRECATION WARNING: Calling `<<` to an ActiveModel::Errors message\narray in order to add ... | ruby | chosen |
[
{
"from": "system",
"value": "Add search index to capistrano\n"
},
{
"from": "human",
"value": "set :application, \"symfony\"\nset :repo_url, \"git@github.com:symfony/#{fetch(:application)}.git\"\nset :branch, ENV[\"BRANCH\"] || \"master\"\n\n\n# Symfony settings\nset :symfony_directory_structur... | ruby | chosen |
[
{
"from": "system",
"value": "Mark OSX as supported (via homebrew)\n"
},
{
"from": "human",
"value": "name \"mosquitto\"\nmaintainer \"Daniel O'Connor\"\nmaintainer_email \"daniel.oconnor@gmail.com\"\nlicense \"MIT\"\ndescription \"Installs and configures mosquitto, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a basic mailer preview for the alert emails\n"
},
{
"from": "gpt",
"value": "class AlertMailerPreview < ActionMailer::Preview\n def alert_email\n user = User.first\n broken_scrapers = Scraper.first(2)\n successful_scrapers = Scraper.last(2)\n\n Alert... | ruby | chosen |
[
{
"from": "system",
"value": "Automate model changes for event switchboard.\n\nAll MiqEvent and EmsEvent are sent to automate for process.\nAdd EventStream#event_namespace to category the event object.\n\n\n(transferred from ManageIQ/manageiq@559bd25f277d9ec169a82bdebd8d52f10cc00f82)\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Test not adding existing meta tags\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass HelperMethodsTest < ActionView::TestCase\n include Metamagic::HelperMethods\n\n test \"meta tags generation\" do\n meta title: \"My Title\",\n descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Add an event to the calendar test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe EventsController do\n describe \"GET 'index'\" do\n it \"returns http success\" do\n get 'index'\n response.should be_success\n end\n end\n\n de... | ruby | chosen |
[
{
"from": "human",
"value": "Add prelim spec for route_params\n\nSpec passes, but issue still persists. Hmm...\n"
},
{
"from": "gpt",
"value": "require File.join(File.dirname(__FILE__), \"spec_helper\")\nrequire 'rack/mock'\nrequire 'stringio'\nMerb.start :environment => 'test', \n :a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test coverage reporting during CI\n"
},
{
"from": "human",
"value": "if ENV['SIMPLECOV']\n require 'simplecov'\n SimpleCov.start\nend\n\nif ENV['JENKINS_URL']\n require 'codeclimate-test-reporter'\n CodeClimate::TestReporter.start\n\n require 'coveralls'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use whittle gem for parsing\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pgn/version'\n\nGem::Specification.new do |spec|\n spec.name = \"p... | ruby | chosen |
[
{
"from": "system",
"value": "Add dualstack_hint field on Image\n"
},
{
"from": "human",
"value": "module Aptible\n module Api\n class Image < Resource\n belongs_to :app\n\n field :id\n field :git_repo\n field :git_ref\n field :docker_repo\n field :docker_ref\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Decrease importance of persistent warnings on controllers\n\nNotices set in another actions should overwrite the persistent ones.\n"
},
{
"from": "human",
"value": "module Concerns\n module PersistentWarnings\n extend ActiveSupport::Concern\n\n included do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a user_id column to the pureftpd_users table.\n"
},
{
"from": "gpt",
"value": "class AddUserIdToPureftpdUsers < ActiveRecord::Migration\n def self.up\n add_column :pureftpd_users, :user_id, :integer\n end\n\n def self.down\n remove_column :pureftpd_users... | ruby | chosen |
[
{
"from": "system",
"value": "Correct documented type of arg."
},
{
"from": "human",
"value": "module DataMapper\n module Constraints\n module Adapters\n module Extension\n # Include the corresponding Constraints module into a adapter class\n # \n # @param [String] ... | ruby | chosen |
[
{
"from": "system",
"value": "Create empty dir in controllers at install\n"
},
{
"from": "human",
"value": "module Brightcontent\n module Generators\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path(\"../templates\", __FILE__)\n\n desc \"Creates a Br... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration check for rails 3\n"
},
{
"from": "human",
"value": "# Lifted from Advanced Rails Recipes #38: Fail Early --\n# Check to make sure we've got the right database version;\n# skip when run from tasks like rake db:migrate, or from Capistrano rules\n# th... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs that were regressed by the validations on password confirmation\n"
},
{
"from": "human",
"value": "module RequestSpecHelpers\n def logon(project, release)\n # We need to 'grant' permissions UserSession#current_user in order to bypass authorisation rule... | ruby | chosen |
[
{
"from": "system",
"value": "Add a bit more structure.\n"
},
{
"from": "human",
"value": "require \"sinatra/base\"\nrequire \"httparty\"\nrequire \"pry\"\n\nrequire \"myhub/version\"\nrequire \"myhub/github\"\n\nmodule Myhub\n class App < Sinatra::Base\n set :logging, true\n\n # Your cod... | ruby | chosen |
[
{
"from": "system",
"value": "Improve test coverage for options reset for images engine\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Refinery\n describe Images::Options do \n describe \".reset!\" do\n it \"should set options back to their default values\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr_accessor to be 1.8 friendly\n"
},
{
"from": "human",
"value": "require 'eventmachine'\nrequire 'em-http-request'\nrequire 'yajl'\n\nrequire \"scamp/version\"\nrequire 'scamp/connection'\nrequire 'scamp/channels'\nrequire 'scamp/users'\nrequire 'scamp/matche... | ruby | chosen |
[
{
"from": "system",
"value": "Add test 'can be a member of a set'\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\ndescribe 'Redis::Breadcrumb' do\n class TestBreadcrumb < Redis::Breadcrumb\n tracked_in 'tracking_key'\n\n owns :a_owned_key\n end\n\n before do\n redis = Moc... | ruby | chosen |
[
{
"from": "system",
"value": "Use concat instead of push to avoid stack too deep error\n\narray.push *foo will break if foo is too long, because it adds each item to the stack.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n#= Utilities\nclass Utils\n # Take a list of items... | ruby | chosen |
[
{
"from": "system",
"value": "Use the same variable for affected visualization invalidation\n"
},
{
"from": "human",
"value": "module Carto\n class VisualizationInvalidationService\n def initialize(visualization)\n @visualization = visualization\n @invalidate_affected_maps = false\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix ruby installation with RVM\"\n\nThis reverts commit 37eab68f0e31a6f4d5e1191920cebe43f3f79ecc.\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module Ventriloquist\n module Cap\n module Linux\n module RvmInstallRuby\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the test for a deprecated feature\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass NameErrorExtensionTest < Minitest::Test\n SPELL_CHECKERS = DidYouMean::SPELL_CHECKERS\n\n class TestSpellChecker\n def initialize(*); end\n def correct... | ruby | chosen |
[
{
"from": "system",
"value": "Make a test comparing times use seconds since the epoch to avoid dealing with date formats\n"
},
{
"from": "human",
"value": "require_relative '../test_helper'\n\ndescribe UpdateJsonDecorator do\n include TestHelper\n\n describe '#to_json, which implicitly calls a... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependencies for cookbook name change\n"
},
{
"from": "human",
"value": "name 'python-webapp-test'\nmaintainer 'OSU Open Source Lab'\nmaintainer_email 'chef@osuosl.org'\nlicense 'Apache 2.0'\ndescription 'Used to test the python-webapp cookbook'\nlong_descrip... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in products/controller when `Config.show_products_without_price == true`\n"
},
{
"from": "human",
"value": "class Sprangular::ProductsController < Sprangular::BaseController\n def index\n @products = product_scope.where(\"spree_prices.amount IS NOT NULL\... | ruby | chosen |
[
{
"from": "system",
"value": "Bring PurchaseOrderAccount in line with CreditCardAccount\n"
},
{
"from": "human",
"value": "class PurchaseOrderAccount < Account\n include AffiliateAccount\n\n belongs_to :facility\n\n validates_presence_of :account_number\n\n\n def to_s(with_owner = false)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug if statement(always true)\n\nThe if statement in platform/ubuntu/password.rb is always true."
},
{
"from": "human",
"value": "# Copyright (c) 2009-2012 VMware, Inc.\n\nmodule Bosh::Agent\n class Platform::Ubuntu::Password\n\n def update(settings)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change podfile to point to develop branch.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DeskAPIClient\"\n s.version = \"1.1.0\"\n s.summary = \"A lightweight wrapper around the Desk.com API, v2.\"\n s.license = { :t... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to account for updated id format in controls.\n"
},
{
"from": "human",
"value": "require_relative './spec_init'\n\ndescribe 'Generating write events' do\n template = EventStore::EventGenerator::Controls::Template.example\n generator = EventStore::Event... | ruby | chosen |
[
{
"from": "system",
"value": "Test Round.winner returns nil if no donations\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass RoundTest < ActiveSupport::TestCase\n test \"newly created round has randomly generated url string\" do\n r = Round.new\n assert_not_nil r.url\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add optparsing to CLI class\n"
},
{
"from": "human",
"value": "require \"torrent/blaze/version\"\n\nmodule Torrent\n module Blaze\n # Your code goes here...\n end\nend\n"
},
{
"from": "gpt",
"value": "require \"blaze/version\"\nrequire \"optparse\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Set warden with account and user info\n"
},
{
"from": "human",
"value": "require_dependency \"subscribem/application_controller\"\n\nmodule Subscribem\n class AccountsController < ApplicationController\n def new\n @account = Subscribem::Account.new\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Make day 9 a bit more functional.\n"
},
{
"from": "human",
"value": "def day9(filename)\n lines = File.readlines(\"data/input9.txt\").map(&:strip)\n short_graph = parse_day9_lines(lines, 2 ** 31)\n long_graph = parse_day9_lines(lines, 0)\n puts \"Shortest path: ... | ruby | chosen |
[
{
"from": "system",
"value": "Include name_status on the trade admin interface\n"
},
{
"from": "human",
"value": "class Trade::TaxonConceptSerializer < ActiveModel::Serializer\n attributes :id, :full_name, :author_year, :rank_name\nend\n"
},
{
"from": "gpt",
"value": "class Trade::T... | ruby | chosen |
[
{
"from": "system",
"value": "chore: Remove memoization from Authentication helper.\n\nThis is an attempt to make ditty more thread safe. If you need caching, using memcache or something\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'ditty/models/user'\nrequire 'dit... | ruby | chosen |
[
{
"from": "system",
"value": "Added: Support for 64-bit Ubuntu Lucid (10.04)\n"
},
{
"from": "human",
"value": "require 'rbconfig'\nrequire 'fileutils'\n\nmodule Yurei\n\n class << self\n \n def phantomjs_path\n bin_path = File.join vendor_path, 'phantomjs', '1.7.0', 'macosx', 'bin',... | ruby | chosen |
[
{
"from": "system",
"value": "Change gemspec to avoid subshells [ci skip]\n\nMore information at\nhttp://tenderlovemaking.com/2011/12/05/profiling-rails-startup-with-dtrace/\n\nThanks @rafaelfranca\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\",... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration of notified users\n"
},
{
"from": "human",
"value": "class CreateNotifications < ActiveRecord::Migration\n def change\n create_table :notifications do |t|\n t.references :notifiable, polymorphic: true, index: true\n t.references :user, in... | ruby | chosen |
[
{
"from": "system",
"value": "Fix realtime content type check\n"
},
{
"from": "human",
"value": "Pakyow::App.before :route do\n # we want to hijack websocket requests\n #\n if req.env['HTTP_UPGRADE'] == 'websocket'\n if Pakyow::Config.realtime.enabled\n socket_connection_id = params[:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove facebook admins from SocialHelpersHandler\n\nMaybe we have better solution for this in the future. But, for sure, we\ndon't want any person managing every page on Neighborly's project and\nforks.\n"
},
{
"from": "human",
"value": "require 'uservoice_sso'\nmod... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Extend ActionController::Base instead of the ::ApplicationController\"\n\nThis reverts commit 974d9bfabb9ae0d446d158a122ee70f336c6d222.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule Contentr\n class ApplicationController < ActionController::... | ruby | chosen |
[
{
"from": "system",
"value": "Improve toc generator to remove \" in the anchors\n\n[ci skip]\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\n# Source: https://gist.github.com/albertodebortoli/9310424\n# Via: http://stackoverflow.com/a/22131019/873282\n\nFile.open(\"Code-Howtos.md\", 'r... | ruby | chosen |
[
{
"from": "system",
"value": "Add GP Webpay direct link for payment."
},
{
"from": "human",
"value": "module ActiveMerchant #:nodoc:\n module Billing #:nodoc:\n module Integrations #:nodoc:\n module GpWebpay \n autoload :Helper, File.dirname(__FILE__) + '/gp_webpay/helper.rb'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for async observer on compose\n"
},
{
"from": "human",
"value": "class CovalenceNotification < ActiveRecord::Base\n belongs_to :producer, :polymorphic => true\n belongs_to :consumer, :polymorphic => true\n\n # validates_presence_of :flavor # I haz a flavor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix model authentication for Rails < 4\n"
},
{
"from": "human",
"value": "<% module_namespacing do -%>\nclass <%= class_name %>Authentication < ActiveRecord::Base\n belongs_to :<%= class_name.downcase %>\n belongs_to :authentication_provider\n\n serialize :params... | ruby | chosen |
[
{
"from": "system",
"value": "Check for all :blank cases.\n"
},
{
"from": "human",
"value": "module Metacrunch\n module UBPB\n module Transformations\n module MAB2SNR\n class Status < Metacrunch::Transformer::Step\n\n NEW_STATE = \"A\".freeze\n DELETE_STATE =... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation to Google class\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule LinkShrink\n module Shrinkers\n # @author Jonah Ruiz <jonah@pixelhipsters.com>\n # Implements Google's URL Shortener API\n class Google < Base\n def base_url... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"an_exclude\" instead of \"a_exclude\". Grammar is important.\n\nSigned-off-by: Sam Phippen <e5a09176608998a68778e11d5021c871e8fae93c@googlemail.com>\n"
},
{
"from": "human",
"value": "module RSpec\n module Core\n class BacktraceCleaner\n\n attr_access... | ruby | chosen |
[
{
"from": "system",
"value": "Use test build action for schemes\n"
},
{
"from": "human",
"value": "module Xcode\n\n class Workspace\n def to_xcodebuild_option\n \"-workspace \\\"#{self.path}\\\"\"\n end\n end\n\n class Project\n def to_xcodebuild_option\n \"-project \\\"#{s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix finder methods of Collection\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nmodule GoogleSpreadsheets\n module Enhanced\n class Collection < ActiveResource::Collection\n def find(*args)\n if block_given?\n to_a.find{|*block_args... | ruby | chosen |
[
{
"from": "system",
"value": "Fix no quote in connecion :<\n"
},
{
"from": "human",
"value": "require 'identity/importer/tasks/members'\n\nmodule Identity\n module Importer\n module Tasks\n module CiviCRM\n class Members < Identity::Importer::Tasks::Members\n\n def self.... | ruby | chosen |
[
{
"from": "system",
"value": "Add HTTParty dependency, fix homepage URL\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'sparkpost_rails'\n s.version = '0.0.1'\n s.date = '2015-02-28'\n s.summary = \"Sparkpost for Rails\"\n s.description = \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug loading nil email config\n"
},
{
"from": "human",
"value": "# Mix this module into the main application module to provide\n# information about the current email configuration\n#\n# In config/application.rb:\n#\n# module OneBody\n# extend EmailConfi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a pluralization bug. Thanks Randy!\n"
},
{
"from": "human",
"value": "module Jukeberx\n class Searcher\n include Enumerable\n\n def initialize(dir)\n @songs = []\n self.get_mp3s(dir)\n end\n\n def each\n @songs.each { |x| yield(x) }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update DBeaver enterprise to v3.2.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'dbeaver-enterprise' do\n version '3.1.5'\n\n if Hardware::CPU.is_32_bit?\n sha256 '5e7ebc0b2f2a3ebb25eba0ff9032fa0bc2ca78354cc8bd2fe2b85262da73df54'\n url \"http://dbeaver.jk... | ruby | chosen |
[
{
"from": "system",
"value": "Set sha1 to 'no_checksum' for Lastpass Universal cask\n"
},
{
"from": "human",
"value": "class LastpassUniversal < Cask\n url 'https://lastpass.com/lpmacosx.dmg'\n homepage 'https://lastpass.com/'\n version 'latest'\n install 'lpmacosx.pkg'\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Update user+group lists for new base image (ubuntu-16.10) per 'rake update_lists'\n"
},
{
"from": "human",
"value": " # DO NOT EDIT - This file is generated per 'rake update_lists'\n module RakeCompilerDock\n PredefinedUsers = [\"root\", \"daemon\",... | ruby | chosen |
[
{
"from": "system",
"value": "Deploy recipe changed to git.\n"
},
{
"from": "human",
"value": "set :application, \"lincomp\"\nset :repository, \"http://code.zhdk.ch/svn-auth/lincomp/trunk\"\nset :scm, :subversion\n# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove if statements rename scalene_ratio and only initialize what is needed\n"
},
{
"from": "human",
"value": "class Triangle\n attr_reader :first_side, :second_side, :third_side, :sorted_lengths, :multiplied_lengths\n\n def initialize(side_lengths)\n @sorted_... | ruby | chosen |
[
{
"from": "system",
"value": "Disable downstream response buffering of stream\n"
},
{
"from": "human",
"value": "module ActiveAdmin\n class ResourceController < BaseController\n\n # This module overrides CSV responses to allow large data downloads.\n # Could be expanded to JSON and XML in... | ruby | chosen |
[
{
"from": "system",
"value": "Fix auto_link helper after method signature change\n"
},
{
"from": "human",
"value": "module ActiveAdmin\n module ViewHelpers\n module AutoLinkHelper\n\n # Automatically links objects to their resource controllers. If\n # the resource has not been regi... | ruby | chosen |
[
{
"from": "system",
"value": "Make uilink shortcut work for categories\n"
},
{
"from": "human",
"value": "class UiLink < SsbeModel\n service_type :kernel\n resource_name :AllUiLinks\n\n persists :category, :title, :target, :id\n\n def self.[](title)\n self.detect { |l| l.title == title }\... | ruby | chosen |
[
{
"from": "system",
"value": "Convert Template::Types.type_klass to instance ivar\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"active_support/core_ext/module/attribute_accessors\"\n\nmodule ActionView\n class Template #:nodoc:\n class Types\n class Type\... | ruby | chosen |
[
{
"from": "system",
"value": "Add missed mb_chars.to_s to TagController (1.9.3 compatibility)\n"
},
{
"from": "human",
"value": "class Monologue::TagsController < Monologue::ApplicationController\n def show\n @tag = retrieve_tag\n if @tag\n @page = nil\n @posts = @tag.posts_with... | ruby | chosen |
[
{
"from": "system",
"value": "Add shindo dependencies, tidy up the gemspec file.\n"
},
{
"from": "human",
"value": "# encoding: ascii-8bit\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"gossiperl_client/version\"\n\nGem::Specification.new do |s|\n s.name = \"gossiperl_client\... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rack middleware in older versions of Rails 3 (3.1.3 for example)\n"
},
{
"from": "human",
"value": "require 'raven'\nrequire 'rails'\n\nmodule Raven\n class Railtie < ::Rails::Railtie\n initializer \"raven.use_rack_middleware\" do |app|\n app.config.mid... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop version to 0.52.1\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'deka_eiwakun/version'\n\nGem::Specification.new do |spec|\n spec.name = 'deka_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bootstrap attributes generated by Html renderer.\n\nWe don't want to mary bootstrap here...\n"
},
{
"from": "human",
"value": "module Alf\n class Renderer\n class Html < Renderer\n\n def self.mime_type\n \"text/html\"\n end\n\n def e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix array matching to avoid flaky result\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe IterationOperations do\n describe '::Read' do\n let(:project) do\n create(:project, :with_past_iteration, users: [user], teams: [user.teams.first]... | ruby | chosen |
[
{
"from": "system",
"value": "Fix method sample for create token\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\n# Option token has disabled do response is automatically an error\ndescribe 'RubyRabbitmqJanus::RRJAdmin -- add_token', type: :request,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add debug! method to hook up\n"
},
{
"from": "human",
"value": "require 'tracable'\nrequire 'whinable'\n\nmodule Defly\nend\n\nNoMethodError.send(:include, Defly::Whinable)\n"
},
{
"from": "gpt",
"value": "require 'tracable'\nrequire 'whinable'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to Undefined = Module.new.freeze\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'concord'\nrequire 'anima'\nrequire 'lupo'\nrequire 'procto'\nrequire 'adamantium'\nrequire 'abstract_type'\n\nrequire 'axiom'\nrequire 'axiom-types'\nrequire 'ax... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redcarpet dependency as it not being used\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path(\"../../mustermann/lib\", __FILE__)\nrequire \"mustermann/version\"\n\nGem::Specification.new do |s|\n s.name = \"support\"\n s.version = \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test to expect string \"0\"\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass ServicesAndInformationFinderTest < ActiveSupport::TestCase\n test \"#find searches rummager for the services and information for an org\" do\n organisation = buil... | ruby | chosen |
[
{
"from": "system",
"value": "Support missing kramdown coderay option\n"
},
{
"from": "human",
"value": "module Jekyll\n module Converters\n class Markdown\n class KramdownParser\n def initialize(config)\n require 'kramdown'\n @config = config\n rescue Lo... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we don't register routes via panopticon\n\nSending an empty array for `paths` and `prefixes` will make sure we\ndon't register routes in Panopticon.\n\nWe don't want to register routes anymore because we will be using the\npublishing-api for this.\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "system",
"value": "Use large page sizes in API requests to use requests efficiently\n"
},
{
"from": "human",
"value": "# Fetch data from the GitHub API.\n#\n# This class interfaces to a specific API gem implementation, and allows us to\n# aggregate calls to fetch a single piece of inf... | ruby | chosen |
[
{
"from": "system",
"value": "Use guard statement in Lit::Locale\n"
},
{
"from": "human",
"value": "module Lit\n class Locale < ActiveRecord::Base\n ## SCOPES\n scope :ordered, proc { order('locale ASC') }\n scope :visible, proc { where(is_hidden: false) }\n\n ## ASSOCIATIONS\n h... | ruby | chosen |
[
{
"from": "system",
"value": "Add distinct to sources list.\n"
},
{
"from": "human",
"value": "class Goal < ActiveRecord::Base\n has_many :users, :through => :usergoals\n has_many :usergoals\n \n has_many :notes, :through => :notegoals\n has_many :notegoals\n\n validates_uniqueness_of :nam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in log when showing pictures.\n"
},
{
"from": "human",
"value": "module Administration::LogItemsHelper\n \n def log_item_path(log_item)\n send(log_item.loggable_type.underscore + '_path', log_item.loggable_id)\n end\n \n def log_item_change_value(log... | ruby | chosen |
[
{
"from": "system",
"value": "Replace deprecated `update_attributes` with `update` method\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass PermissionsController < ActionController::Base\n include Clearance::Controller\n\n before_action :require_login, only: :show\n\n def new\... | ruby | chosen |
[
{
"from": "system",
"value": "Test data changes within edit\n"
},
{
"from": "human",
"value": "\nrequire 'spec_helper'\n\ndescribe 'editing a bus stop as a user' do\n let!(:user) { create :user }\n let!(:edit_stop) { create :bus_stop }\n before :each do\n when_current_user_is user\n vis... | ruby | chosen |
[
{
"from": "system",
"value": "Add meta data to relics/clusters API\n"
},
{
"from": "human",
"value": "leafs = leafs_of(@relics.polish_facets_tree)\n\njson.relics @relics.map{ |r| relic_to_widget_data(r, false) }\njson.clusters leafs.map{ |f| facet_to_marker(f) }\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod spec to 1.0.3\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"X4ImageViewer\"\n s.version = \"1.0.2\"\n s.summary = \"A ios easy-to-use image viewer.\"\n s.description = <<-DESC\n\t\t * X4ImageViewer is a easy... | ruby | chosen |
[
{
"from": "system",
"value": "Set iOS and mac deployment targets to 7 and 10.9, respectively\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"TRVSEventSource\"\n s.version = \"0.0.1\"\n s.summary = \"Server-sent events EventSource client using NSURLSessio... | ruby | chosen |
[
{
"from": "system",
"value": "Package warehouse creation tools in the tools gem\n"
},
{
"from": "human",
"value": "#-*- ruby -*-\nGem::Specification.new do |s|\n s.name\t= 'palletjack-tools'\n s.summary\t= 'Tools for the Pallet Jack Lightweight Configuration Management Database'\n s.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up password resets controller\n"
},
{
"from": "human",
"value": "# Hartl-Style. See https://www.railstutorial.org/book/password_reset\nclass PasswordResetsController < ApplicationController\n before_action :get_user, only: [:edit, :update]\n before_action :c... | ruby | chosen |
[
{
"from": "system",
"value": "Send manual slug to to rummager for manual sections\n\nSo that search results can be scoped to sections within a manual.\n"
},
{
"from": "human",
"value": "class ManualSectionIndexableFormatter\n def initialize(section, manual)\n @section = section\n @manual ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused associations from serializer and add custom methods\n"
},
{
"from": "human",
"value": "class ProgressUpdateSerializer < ActiveModel::Serializer\n attributes :id, :content, :words, :hours\n belongs_to :user, serializer: ProgressUpdateUserSerializer\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Bring error highlighting test up to date\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'support/editor'\n\nRSpec.feature \"Highlighting the output\", type: :feature, js: true do\n before do\n visit '/'\n editor.set(code)\n within('.head... | ruby | chosen |
[
{
"from": "system",
"value": "Use POST instead of GET\n"
},
{
"from": "human",
"value": "module Gemini\n module Executions\n def self.me(options = {})\n Gemini.sanity_check!\n executions = Gemini::Net.get(\"/v1/mytrades\", options, true)\n JSON.parse(executions).map do |execut... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.