conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove autoload to unused constant\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n#--\n# Copyright (c) 2014-2022 David Heinemeier Hansson\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SMTP Authentification not exist in smtp config\n\nForget {{}} in smtp file and :login not replaced by init script"
},
{
"from": "human",
"value": "if Rails.env.production?\r\n ActionMailer::Base.delivery_method = :smtp\r\n ActionMailer::Base.perform_deliveries... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify commit author import collaborators\n\nThese specs now document which messages we expect to send to\ncollaborators. They're also more protected from changes to the internals\nof the collaborators.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nde... | ruby | chosen |
[
{
"from": "system",
"value": "Change gemspec for push to rubygems\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ael_tracker/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add deprecation notice to fetch_artefact method\n"
},
{
"from": "human",
"value": "require 'gds_api/publisher'\nrequire 'gds_api/imminence'\nrequire 'gds_api/panopticon'\n\nmodule GdsApi\n module Helpers\n def content_api\n @content_api ||= GdsApi::ContentA... | ruby | chosen |
[
{
"from": "system",
"value": "Rename GDS SSO env vars\n\nThese were renamed in Puppet [1] to better explain usage in their name,\nand this change has been deployed to production already. Most applications\ndon't use these env vars manually and instead use the\ngds-sso gem [2], however as Search API is a Sin... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing order to inventory_unit factory\n"
},
{
"from": "human",
"value": "require 'spree/testing_support/factories/line_item_factory'\nrequire 'spree/testing_support/factories/variant_factory'\nrequire 'spree/testing_support/factories/order_factory'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for symlinks or submodules\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Quality is a tool that runs quality checks on Ruby code using cane,\n# reek, flog, flay and rubocop and makes sure your numbers don't get\n# any worse over time.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix some regex at controller render method\n"
},
{
"from": "human",
"value": "class String\n def to_snake_case\n self.gsub(\"::\", \"/\").\n gsub(/([A-Z]+)([A-Z][a-z])/, '\\1_\\2'). # FOOBar => foo_bar\n gsub(/([a-z\\d])(A-Z)/, '\\1_\\2'). #FO86OBar =>... | ruby | chosen |
[
{
"from": "system",
"value": "Fix regex that creates migration class\n\nPreviously the regex would be incorrect if the migration name included a digit and a underscore, e.g. 'add_foo1_to_products'.\n"
},
{
"from": "human",
"value": "require 'slim_migrations/version'\n\nmodule SlimMigrations\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Use default params for DNS zones\n"
},
{
"from": "human",
"value": "module Squall\n # OnApp DNS Zones\n class DnsZone < Base\n # Public: List DNS zones.\n #\n # Returns an Array.\n def list\n response = request(:get, \"/dns_zones.json\")\n re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the 'Git failing without warning' bug when the current rev hasn't been pushed.\n"
},
{
"from": "human",
"value": "namespace :git do\n desc \"Clones the Git repository to the release path.\"\n task :clone do\n settings.revision ||= `git rev-parse HEAD`.strip... | ruby | chosen |
[
{
"from": "system",
"value": "Add attr_accessible for JwtToken fields.\n"
},
{
"from": "human",
"value": "class JwtToken < ActiveRecord::Base\n <% if database_name.present? %>\n databases = YAML::load(IO.read('config/database_<%= database_name %>.yml'))\n establish_connection databases[Rails.... | ruby | chosen |
[
{
"from": "system",
"value": "Update around_perform syntax for ApplicationJob\n"
},
{
"from": "human",
"value": "require 'newrelic_rpm'\n\nclass ApplicationJob < ActiveJob::Base\n around_perform :use_db_pool\n\n rescue_from(StandardError) do |e|\n NewRelic::Agent.notice_error(e)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix photo list in admin backend.\n"
},
{
"from": "human",
"value": "ActiveAdmin.register Photo do\n belongs_to :poi, :optional => true\n belongs_to :user, :optional => true\n\n controller do\n def collection\n super.with_user.with_poi # include user and ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow a page to be at the root url\n"
},
{
"from": "human",
"value": "require_dependency \"storytime/application_controller\"\n\nmodule Storytime\n class PagesController < ApplicationController\n before_action :ensure_site, unless: ->{ params[:controller] == \"s... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Thread.new takes arguments. That's handy.\"\n\nThis reverts commit e7780633ac2473d3265903c4f680171b17217ee4.\n\nIt didn't work so well in Ruby 1.8.7.\n"
},
{
"from": "human",
"value": "require \"lazily/prefetching\"\n\nmodule Lazily\n\n module Enumerable\n... | ruby | chosen |
[
{
"from": "human",
"value": "Make RSpec controller specs work with OrganisationResolvers.\n"
},
{
"from": "gpt",
"value": "# This is an altered version of the #install_organisation_resolver\n# method in ApplicationController proper. It is necessary in order\n# for RSpec's controller specs to wor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake task to actually send emails\n"
},
{
"from": "human",
"value": "namespace :user do\n\n # rake user:downgrade_expired\n task :downgrade_expired => :environment do\n User.pro_only.not_forever.joins(:payments).having(\"MAX(payments.date) < ?\", 1.year.ago... | ruby | chosen |
[
{
"from": "system",
"value": "Set Content-Type to JSON only when sending JSON\n"
},
{
"from": "human",
"value": "require 'dm-serializer/to_json'\nrequire 'sinatra/base'\nrequire 'thyme/photo'\nrequire 'thyme/set'\n\nmodule Thyme\n class Server < Sinatra::Base\n set :root, File.expand_path(Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add line feed at last\n"
},
{
"from": "human",
"value": "require 'honyomi'\nrequire 'tmpdir'\n\nmodule Honyomi\n class Pdf\n def initialize(filename)\n @filename = filename\n\n Dir.mktmpdir do |dir|\n outfile = File.join(dir, \"pdf.txt\")\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move YARD.logger into Logger class (make it a proper Singleton)\n"
},
{
"from": "human",
"value": "require \"logger\"\n\nmodule YARD\n class Logger < ::Logger\n def initialize(*args)\n super\n self.level = INFO\n self.formatter = method(:format_lo... | ruby | chosen |
[
{
"from": "system",
"value": "Change initializer to ruby 1.8.7 hash syntax\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains settings for ActionController::ParamsWrapper which\n# is enabled by default.\n\n# Enable parameter wr... | ruby | chosen |
[
{
"from": "system",
"value": "Increase default Lucene limit to 50K\n"
},
{
"from": "human",
"value": "# An aspect class that adds a search query term\nclass SearchAspect < Aspect\n def add_clause( query, preferences )\n present?( preferences ) ? add_search_clause( query, preferences ) : quer... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new \"sexy\" validations for SnapshotDiff\n\nAs pointed out by Rubocop. This resolves all of the cops for this file.\n\nChange-Id: Id82cf7a6ba34c6de958ed3064ceae683a14f5fdf\n"
},
{
"from": "human",
"value": "# Models the difference between two snapshots\ncla... | ruby | chosen |
[
{
"from": "system",
"value": "Support setting the storage not using default_options\n\nWhen paperclip was configured to use s3 by accessing the attachment definition\r\ndirectly, the settings would not be picked up."
},
{
"from": "human",
"value": "module Spree\n class Digital < ActiveRecord::B... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to call authorize.\n"
},
{
"from": "human",
"value": "class SpreedlyCore\n\n include HTTParty\n headers 'Accept' => 'text/xml'\n headers 'Content-Type' => 'text/xml'\n base_uri \"http://core.dev:3003/v1\"\n format :xml\n \n def self.configure(api_... | ruby | chosen |
[
{
"from": "system",
"value": "Use Mixlib::ShellOut; Chef::ShellOut is deprecated\n"
},
{
"from": "human",
"value": "#\n# Copyright:: Copyright (c) 2012 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us... | ruby | chosen |
[
{
"from": "system",
"value": "Use raw poll option name for dtstart\n"
},
{
"from": "human",
"value": "class CalendarInvite\n include PrettyUrlHelper\n include FormattedDateHelper\n\n def initialize(outcome = Outcome.new)\n @calendar = build_calendar(outcome)\n end\n\n def to_ical\n @c... | ruby | chosen |
[
{
"from": "system",
"value": "Modify CA button sequence to one that more consistently seems to work\n"
},
{
"from": "human",
"value": "class StateHandler::CA < StateHandler::Base\n PHONE_NUMBER = '+18773289677'\n ALLOWED_NUMBER_OF_EBT_CARD_DIGITS = [16]\n\n def button_sequence(ebt_number)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Connect to Philly Tapfinder via https\n\nAt some point recently, Philly Tapfinder rolled out https support\nand added 301s to redirect http => https, which caused errors in\nbeer_bot. This updates to connect via https now that we can.\n"
},
{
"from": "human",
"valu... | ruby | chosen |
[
{
"from": "human",
"value": "Create a method that returns the missing value in the sequence\n"
},
{
"from": "gpt",
"value": "#Pseudocode\n=begin\nINPUT: Obtain a string\nSTEPS:\nCreate a letter array containing [a-z]\nSplit the word into seperate characters\nStore the first character into the fi... | ruby | chosen |
[
{
"from": "human",
"value": "Add new example for Gtk::FlowBox\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n=begin\n flowbox.rb Ruby/GTK script\n\n Adapted (or stolen) from http://python-gtk-3-tutorial.readthedocs.org/en/latest/layout.html#flowbox\n\n Copyright (c) 2004-2015 Ruby-G... | ruby | chosen |
[
{
"from": "system",
"value": "Remove :app designation from Fluid link"
},
{
"from": "human",
"value": "class Fluid < Cask\n url 'http://fluidapp.com/dist/Fluid_1.6.1.zip'\n homepage 'http://fluidapp.com/'\n version '1.6.1'\n sha1 '7de2fe4372e9d055bd2bb6f5afcefa549740a7ce'\n link :app, 'Flui... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for either upper or lower case approval.\n"
},
{
"from": "human",
"value": "require 'capistrano-deploytags'\n\nmodule Capistrano\n module DetectMigrations\n\n def last_git_tag_for(stage)\n `git tag -l #{stage}-[0-9]*`.split(/\\n/).last\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check if Hexdump::ModuleMethods is included into Kernel.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'hexdump/core_ext'\n\ndescribe \"Hexdump core_ext\" do\n it \"should include Hexdump into String\" do\n expect(String).to include(Hexdump::... | ruby | chosen |
[
{
"from": "system",
"value": "Check directory can be configured\n"
},
{
"from": "human",
"value": "require \"local_geocoder\"\n\ndescribe LocalGeocoder::Geocoder do\n\n let(:gc) { LocalGeocoder::Geocoder.new }\n let(:sf) { [-122.4022462, 37.7892022] }\n let(:auckland) { [174.7758815, -36.7764... | ruby | chosen |
[
{
"from": "system",
"value": "Correct progress spec to match API.\n"
},
{
"from": "human",
"value": "require 'woodhouse/progress'\n\ndescribe Woodhouse::Progress do\n\n describe \"JobWithProgress\" do\n subject { Object.new.tap do |obj| obj.extend Woodhouse::Progress::JobWithProgress end }\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add default value address client\n"
},
{
"from": "gpt",
"value": "class AddDefaultValueAddressClient < ActiveRecord::Migration\n def self.up\n change_column_default :clients, :address, \"\"\n end\n\n def self.down\n change_column_default :clients, :address, ... | ruby | chosen |
[
{
"from": "human",
"value": "Add module to transfer ActiveStorage tables from backup db\n"
},
{
"from": "gpt",
"value": "module ActiveStorageTransfer\n def self.transfer only_dump=false\n config = ActiveRecord::Base.connection_config\n\n backup_path = Rails.root.join(\"tmp/active_storage.... | ruby | chosen |
[
{
"from": "system",
"value": "Use root_url from main_app when redirecting the user in authenticate\n"
},
{
"from": "human",
"value": "module ShopifyApp\n module SessionsController\n extend ActiveSupport::Concern\n\n def new\n authenticate if params[:shop].present?\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Change default timeout to 2 seconds.\n"
},
{
"from": "human",
"value": "require \"nest\"\n\nmodule Ost\n VERSION = \"0.1.1\"\n TIMEOUT = ENV[\"OST_TIMEOUT\"] || 0\n\n class Queue\n attr :key\n attr :backup\n\n def initialize(name)\n @key = Nest.new(... | ruby | chosen |
[
{
"from": "system",
"value": "Update Node.js documentation (7.5.0, 6.9.5, 4.7.3)\n"
},
{
"from": "human",
"value": "module Docs\n class Node < UrlScraper\n self.name = 'Node.js'\n self.slug = 'node'\n self.type = 'node'\n self.links = {\n home: 'https://nodejs.org/',\n cod... | ruby | chosen |
[
{
"from": "system",
"value": "Make it possible to annotate non wrapped collections"
},
{
"from": "human",
"value": "module Domgen\n module JAXB\n module Helper\n def namespace_annotation_parameter(element)\n return '' unless element.namespace\n \", namespace=\\\"#{element.... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n VERSION = '2.3.0'\n ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.3.1'\nend\n"
},
{
"from": "gpt",
"value": "module EY\n VERSION = '2.3.1.pre'\n ENG... | ruby | chosen |
[
{
"from": "system",
"value": "Use port parameter instead of hardcoded number for connection\n"
},
{
"from": "human",
"value": "module Fluent\n\n class LogioOutput < Output\n\n Plugin.register_output('logio', self)\n\n config_param :output_type, :default => 'json'\n config_param :host, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix integration with arbre-style active admin form tag\n\nFields are added after the form has been rendered, so the signature needs to be updated\n"
},
{
"from": "human",
"value": "module SignedForm\n module ActiveAdmin\n class Railtie < ::Rails::Railtie\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Node: Add fqdn and default to empty hashes.\n\nPlus comment/stub magic.\n"
},
{
"from": "human",
"value": "require 'elasticsearch/persistence/model'\nrequire 'hashie'\n\nclass Node\n include Elasticsearch::Persistence::Model\n\n attribute :name, String\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Complete node and linked list implementation\n"
},
{
"from": "human",
"value": "class Node\n attr_accessor :value, :next\n\n def initialize(value, next_node = nil)\n @value = value\n @next = next_node\n end\n\n def to_s\n value.to_s\n end\nend\n\nclass... | ruby | chosen |
[
{
"from": "system",
"value": "Solve problem with city and state validation\n"
},
{
"from": "human",
"value": "class CityAndStateValidator < ActiveModel::Validator\n def validate(record)\n begin\n if record.address_city.present? && record.address_state.present?\n result = Geocoder... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ohm version on gemspec.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"ohm-contrib\"\n s.version = \"1.2\"\n s.summary = %{A collection of decoupled drop-in modules for Ohm.}\n s.description = %{Includes a couple of core functi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing a block to Moltrio::Config.fetch to compute a default\n"
},
{
"from": "human",
"value": "module Moltrio\n module Config\n class Storage\n def [](key)\n raise NotImplementedError\n end\n\n def []=(key, value)\n raise Not... | ruby | chosen |
[
{
"from": "system",
"value": "Fix docs image dir plugin\n"
},
{
"from": "human",
"value": "class MyCustomCommand < Jekyll::Command\n class << self\n\n # As the docs get precompiled before being sent up to jekyll,\n # and they sit inside Chameleon, the images folder needs to be\n # copi... | ruby | chosen |
[
{
"from": "system",
"value": "Load ActiveSupport only when available\n"
},
{
"from": "human",
"value": "require \"active_support\"\nrequire \"active_support/notifications\"\n\nmodule Sapience\n module Extensions\n class Notifications\n attr_reader :tags, :metric_name\n\n def self.u... | ruby | chosen |
[
{
"from": "system",
"value": "Add plist in resources list in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"AGEmojiKeyboard\"\n s.version = \"0.1.0\"\n s.summary = \"An emoji keyboard view that can replace the default iOS keyboard.\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add best_answer getter method to Question model\n"
},
{
"from": "human",
"value": "class Question < ActiveRecord::Base\n include Votable\n\n belongs_to :user\n has_many :answers\n has_many :comments, as: :commentable\n has_many :votes, as: :votable\n\n validat... | ruby | chosen |
[
{
"from": "human",
"value": "Add analysis script of showing account statuses\n"
},
{
"from": "gpt",
"value": "#!/bin/sh ruby\n# -*- encoding: utf-8 -*-\n\n###\n### Show account statuses\n### Kazuki Hamasaki (ashphy@ashphy.com)\n### \n\nrequire 'rubygems'\nrequire 'active_record'\n\nrequire_relat... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade the version of podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"RSSKit\"\n s.version = \"1.0.6\"\n s.license = {:type => \"MIT\", :file => \"LICENSE\"}\n s.summary = \"A RSS/Atom Parser in Swift\"\n s.homepage = \"https://git... | ruby | chosen |
[
{
"from": "system",
"value": "Use find_each instead of all to be more memory friendly\n\nUse find_each instead of all to be more memory friendly\n"
},
{
"from": "human",
"value": "class MoveNetworkPortCloudSubnetIdToNetworkPortsCloudSubnets < ActiveRecord::Migration[5.0]\n class NetworkPort < A... | ruby | chosen |
[
{
"from": "system",
"value": "Use string for relationship class name"
},
{
"from": "human",
"value": "class Buy\n include DataMapper::Resource\n \n property :id, Serial\n property :contract_id, Integer, :required => true\n property :start_time, String\n property :end_time, String\n proper... | ruby | chosen |
[
{
"from": "human",
"value": "Add a utility to unzip all files\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/ruby\n\n\nrequire './downloader.rb'\nrequire 'zip'\n\nmodule Unziper\n\n\n def self.unzip(file) \n Zip::File.open(file) do |zipfile|\n zipfile.each do |entry|\n # The 'next i... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct hostname for file uploads\n"
},
{
"from": "human",
"value": "require 'net/dav'\n\nmodule CarrierWave\n module Storage\n class Webdav < Abstract\n\n class File\n attr_reader :path\n def server_name\n ENV['WEBDAV_SERVER'... | ruby | chosen |
[
{
"from": "system",
"value": "Make test insensitive to field ordering\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass Search::IndexTest < ActiveSupport::TestCase\n test \"concatenates multiple keywords\" do\n author = items(:one_author_stephen_king)\n data = Search::In... | ruby | chosen |
[
{
"from": "system",
"value": "Speed up performance on jruby\n"
},
{
"from": "human",
"value": "require 'aruba/cucumber'\n\nPROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')).freeze\n\nBefore do\n @aruba_timeout_seconds = 3600\nend\n"
},
{
"from": "gpt",
"... | ruby | chosen |
[
{
"from": "system",
"value": "MISC: Add github projet page as the home page.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"capistrano/technogate/version\"\n\nGem::Specification.new do |s|\n s.name = \"capistrano-te... | ruby | chosen |
[
{
"from": "system",
"value": "Allow asynchronous methods to be private\n\nChange-Id: Ib552811667570f212b2eba78a0a852dee488b293\n"
},
{
"from": "human",
"value": "module Delayed\n class PerformableMethod < Struct.new(:object, :method, :args)\n def initialize(object, method, args = [])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove gemspec dependency on Jekyll\n\nSo that it can be bundled with Jekyll directly\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift File.expand_path(\"lib\", __dir__)\nrequire \"jekyll-commonmark/version\"\n\nGem::Specificati... | ruby | chosen |
[
{
"from": "system",
"value": "Create page folder if is not a front project\n"
},
{
"from": "human",
"value": "require 'thor'\n\nmodule Cukestart\n module Generator\n class Structure < Thor::Group\n include Thor::Actions\n argument :project_name, :desc => \"Name of the root director... | ruby | chosen |
[
{
"from": "system",
"value": "Consolidate ensure_leading_slash to 2 lines.\n"
},
{
"from": "human",
"value": "module Jekyll\n module Filters\n module URLFilters\n # Produces an absolute URL based on site.url and site.baseurl.\n #\n # input - the URL to make absolute.\n #\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the Unicode strings for Ruby 1.8.7\n\nCan’t use \\u{xxxx} :(\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nShindo.tests('AWS | signed_params', ['aws']) do\n returns( Fog::AWS.escape( \"'Stöp!' said Fred_-~.\" ) ) { \"%27St%C3%B6p%21%27%20said%20Fred_-... | ruby | chosen |
[
{
"from": "system",
"value": "Fix syntax error, use $stdin for getting input, and add welcome message so there's some output from the task\n"
},
{
"from": "human",
"value": "module Dropbox\n module Archive\n class Authorization\n\n def initialize\n DropboxOAuth2FlowNoRedirect.new... | ruby | chosen |
[
{
"from": "system",
"value": "Fix form helper not closing it's tags\n"
},
{
"from": "human",
"value": "def form_at(route, fields, opts={})\n form = \"\"\n form << %Q{<form class=\"well\" action=\"#{route}\" method=\"post\">\\n}\n\n fields.each do |name, value|\n form << %Q{<input type=\"hi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix find templates for namespaced controllers\n"
},
{
"from": "human",
"value": "# wrap find_template to search in ActiveScaffold paths when template is missing\nmodule ActionView #:nodoc:\n class PathSet\n attr_accessor :active_scaffold_paths\n\n def find_te... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the RDoc for the SingleConnectionPool\n"
},
{
"from": "human",
"value": "# This is the fastest connection pool, since it isn't a connection pool at all.\n# It is just a wrapper around a single connection that uses the connection pool\n# API.\nclass Sequel::Singl... | ruby | chosen |
[
{
"from": "system",
"value": "Improve error checking and messages on Cask load\n\nOther Cask sources ultimately invoke the `load` method in the\nabstract class Cask::Source::PathBase, so these changes apply\nto all other sources.\n"
},
{
"from": "human",
"value": "class Cask::Source::PathBase\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Use colors for pack exceptions, too\n"
},
{
"from": "human",
"value": "require 'heroku/command/base'\n\n# deploys applications\nclass Heroku::Command::Deploy < Heroku::Command::Base\n\n # Raised when a command failed to abort deployment\n class CommandExecutionFai... | ruby | chosen |
[
{
"from": "system",
"value": "Include credential details in the `auth_hash` when creating a user\n\nThis will pass the credential details to the host app, allowing them to\ncollect the tokens needed for API access.\n"
},
{
"from": "human",
"value": "module Kracken\n class Authenticator\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Make main module global when handling more than one file at the same time."
},
{
"from": "human",
"value": "module Modulr\n class SyncCollector < Collector\n def add_module_from_path(path)\n js_module = super(path)\n modules << js_module unless modules... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add conversion to_* methods to ColorModes classes\"\n\nThis reverts commit 6a0b0ddd60932e3fda7acb26383954976e9f911c.\n"
},
{
"from": "human",
"value": "module Chroma\n module ColorModes\n class << self\n private\n\n def build(name, *attrs)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix not to assign unnecessary instance variables\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire 'yaml'\n\nclass Convergence::Config\n attr_accessor :adapter, :database, :host, :port, :username, :password\n\n def initialize(attributes)\n attributes.ea... | ruby | chosen |
[
{
"from": "system",
"value": "Move form argument to instance call scoped method (thread safe)\n"
},
{
"from": "human",
"value": "module Rasti\n class App\n class Interaction\n\n def self.build_form(params)\n constants.include?(:Form) ? const_get(:Form).new(params) : Form.new\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add attr_accessors in Batch class called created_at, updated_at and processed_records.\n"
},
{
"from": "human",
"value": "module SalesforceBulk\n class Batch\n \n attr_accessor :id\n attr_accessor :job_id\n attr_accessor :state\n \n# <id>751D00000000... | ruby | chosen |
[
{
"from": "system",
"value": "Rename rake task migrate_organisation_logos -> migrate_assets\n"
},
{
"from": "human",
"value": "namespace :asset_manager do\n desc \"Migrates Organisation logos to Asset Manager.\"\n task migrate_organisation_logos: :environment do\n MigrateAssetsToAssetManage... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic rake task to report sidekiq queue status\n\nThe task will be cron'd so that sidekiq status info\ncan be logged and shipped to kibana.\n"
},
{
"from": "gpt",
"value": "require 'sidekiq/api'\n\ndesc 'report basic sidekiq stats'\ntask :sidekiq_stats do\n stat... | ruby | chosen |
[
{
"from": "system",
"value": "Allow validations to be organized into subdirs\n"
},
{
"from": "human",
"value": "module TentValidator\n module Runner\n\n class Results\n attr_reader :results\n def initialize\n @results = {}\n end\n\n def merge!(validator_results)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Drop reliance on .value_date on including class for has_accounts.\n"
},
{
"from": "human",
"value": "module HasAccounts\n module Model\n extend ActiveSupport::Concern\n \n included do\n class_inheritable_accessor :direct_account\n\n has_many :boo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix MathJax path in self-contained HTML\n\n[#53728737]\n"
},
{
"from": "human",
"value": "module Polytexnic\n module Mathjax\n def self.config(options = {})\n chapter_number = if options[:chapter_number]\n options[:chapter_number].in... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr_accessor instead of methods\n"
},
{
"from": "human",
"value": "# Retryable Typheous\n# Inspiration: https://gist.github.com/kunalmodi/2939288\n# Patches the request and hydra to allow requests to get resend when they fail\n\nmodule RetryableTyphoeus\n requ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove exit method from Options\n"
},
{
"from": "human",
"value": "require 'optparse'\n\nmodule SrtShifter\n class Options\n\n attr_accessor :options\n\n def initialize(args)\n @arguments = args\n\n @operations = [\"ADD\", \"SUB\"]\n\n @options... | ruby | chosen |
[
{
"from": "system",
"value": "Change result variable to input\n"
},
{
"from": "human",
"value": "module Transproc\n class Function\n attr_reader :fn, :args\n\n def initialize(fn, args = [])\n @fn = fn\n @args = args\n end\n\n def call(value)\n fn[value, *args]\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor mdJson writer module for 'dictionary'\ninclude minitest modules\n"
},
{
"from": "human",
"value": "# mdJson 2.0 writer - dictionary\n\n# History:\n# Stan Smith 2017-03-11 refactored for mdJson/mdTranslator 2.0\n# Josh Bradley original script\n\n# TODO C... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to gemfile for Travis\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'qtrix/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Authorization test to Jenkins (GitHub) hook\n"
},
{
"from": "human",
"value": "require File.expand_path('../helper', __FILE__)\n\nclass JenkinsGitHubTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_push\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix symbolizing keys in NSDictionary instances"
},
{
"from": "human",
"value": "motion_require \"module/delegation\"\n\nclass NSDictionary\n def to_hash\n Hash.new(self)\n end\n \n delegate :symbolize_keys, :to => :to_hash\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove spec related files from gemspec\n\n* This will reduce the number of files packaged. A good practice\n although for this small a gem, it probably wouldn't make much\n difference.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../... | ruby | chosen |
[
{
"from": "system",
"value": "Set RAILS_ENV before loading config/environment\n"
},
{
"from": "human",
"value": "require 'optparse'\nrequire 'irb'\nrequire \"irb/completion\"\n\nmodule Rails\n class Console\n def self.start\n new.start\n end\n\n def start\n options = {}\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec for Bundler gem style\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/omniauth-cabify/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Michael Koper\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the vendored directory to load Ruby-OEmbed\n"
},
{
"from": "human",
"value": "require 'iconv'\nrequire 'rss/1.0'\nrequire 'rss/2.0'\nrequire 'open-uri'\nrequire 'sinatra'\n\n@@rss_url = \"http://feeds.pinboard.in/rss/u:evaryont/\"\nic = Iconv.new('UTF-8//IGNORE'... | ruby | chosen |
[
{
"from": "system",
"value": "Use a less stringent version number for the Bundler dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'em-scheduled-timer/version'\n\nGem::Speci... | ruby | chosen |
[
{
"from": "system",
"value": "Remove before(:all) causing random spec error\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nmodule Renalware\n describe HD::FindOrCreateDiaryByWeekQuery do\n before(:all) do\n @unit = create(:hospital_unit)\n @user = create(:user)\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.