conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Set configs for heroku to compile assets.\nAccording to heroku, Rails 4 dont serve my assets :eyes:\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_model/railtie\"\nrequire \"activ... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify OAuth setup - unlikely that we'll need to handle GitHub Enterprise again.\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\n# require \"active_record/railtie\"\nrequire \"action_controller/r... | ruby | chosen |
[
{
"from": "system",
"value": "Add email permission to github\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\n# require... | ruby | chosen |
[
{
"from": "system",
"value": "Use rack accessor instead of building pathname manually\n"
},
{
"from": "human",
"value": "module Homebrew\n def __cellar\n if ARGV.named.empty?\n puts HOMEBREW_CELLAR\n else\n puts ARGV.formulae.map{ |f| HOMEBREW_CELLAR+f.name }\n end\n end\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Make same product eligible variants DRY.\n"
},
{
"from": "human",
"value": "module Spree\n module ReturnItem::ExchangeVariantEligibility\n class SameProduct\n\n def self.eligible_variants(variant)\n if variant.is_master?\n Spree::Variant.whe... | ruby | chosen |
[
{
"from": "system",
"value": "Change @cells elements from Nokogiri::NodeSet to Goblin::Cell in Goblin::Sheet\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nmodule Goblin\n class Sheet\n include Enumerable\n\n def initialize(content)\n @content = content\n @cells =... | ruby | chosen |
[
{
"from": "system",
"value": "Use method syntax for accessing struct attributes.\n"
},
{
"from": "human",
"value": "module Lita\n class Handler\n extend Forwardable\n\n attr_reader :redis\n private :redis\n\n def_delegators :@message, :args, :command?, :scan\n\n class Route < Str... | ruby | chosen |
[
{
"from": "system",
"value": "Use only one ItemFactory for both items and layouts\n"
},
{
"from": "human",
"value": "module Munge\n class System\n def initialize(root_path, config)\n @root_path = root_path\n @config = config\n end\n\n def items\n return @items if @items\... | ruby | chosen |
[
{
"from": "system",
"value": "Refresh user profiles less often\n"
},
{
"from": "human",
"value": "namespace :cron do\n desc \"Updates deployed revisions\"\n task minutely: :environment do\n Stack.refresh_deployed_revisions\n end\n\n desc \"Rolls-up output chunks for completed deploys olde... | ruby | chosen |
[
{
"from": "system",
"value": "Use Ruby idioms to create the Spree module accessors\nfor endpoint\n"
},
{
"from": "human",
"value": "#\n# This module contains all the methods required to consume the Spree API.\n#\n# Refer to the modules on the Spree::API namespace for more information.\n#\n# Spre... | ruby | chosen |
[
{
"from": "system",
"value": "Fix instance varialble not initialize warning\n"
},
{
"from": "human",
"value": "require_dependency \"active_waiter/application_controller\"\n\nmodule ActiveWaiter\n class JobsController < ApplicationController\n def show\n data = ActiveWaiter.read(params[:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix disease field in AssertionBrowseRowPresenter\n"
},
{
"from": "human",
"value": "class AssertionBrowseRowPresenter\n def initialize(assertion)\n @assertion = assertion\n end\n\n def as_json\n {\n id: @assertion.id,\n gene_name: @assertion.gene_... | ruby | chosen |
[
{
"from": "system",
"value": "Raise error if IncomingMessageHook not overridden\n"
},
{
"from": "human",
"value": "module SmsBroker\n\n class IncomingMessageHook\n\n #\n # This method should be overriden\n #\n def self.execute(message)\n end\n\n end\nend"
},
{
"from": "g... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for user edit form to test Full Name field\n"
},
{
"from": "gpt",
"value": "describe 'ops/_rbac_user_details.html.haml' do\n context \"edit user\" do\n before do\n user = FactoryGirl.build(:user_with_group, :name => \"Joe Test\", :userid => \"tester... | ruby | chosen |
[
{
"from": "system",
"value": "Swap spec helper for correct one\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nfeature \"Creating Authors\" do\n let(:user) { create :user }\n let(:author) { attributes_for :author }\n\n before do\n sign_in user\n end\n\n scenario \"Visiting th... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec to specify the version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'LUFontIconControls'\n s.version = '0.1'\n s.platform = :ios\n s.license = 'MIT'\n s.summary = 'Easy way to use icon fonts to replace images in your ... | ruby | chosen |
[
{
"from": "system",
"value": "Add filtering logic to stories controller\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class StoriesController < ApiController\n def index\n stories = Story.limit(stories_limit).order(:published_at)\n\n render json: stories, eac... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Access token is in different place\n"
},
{
"from": "human",
"value": "class AuthorizationsController < ApplicationController\n\n def create\n if auth_hash\n if redirect_uri = request.env['omniauth.params']['redirect_uri'] || request.env['omniauth.origi... | ruby | chosen |
[
{
"from": "system",
"value": "Raise an error if retries are exhausted\n\nThis code would have accidentally been concealing errors.\n"
},
{
"from": "human",
"value": "module FindOrCreateLocked\n extend ActiveSupport::Concern\n\n class_methods do\n def find_or_create_locked(params)\n beg... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependency rake for bundle exec rake test\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n \n s.name = \"google-spreadsheet-ruby\"\n s.version = \"0.1.8\"\n s.authors = [\"Hiroshi Ichikawa\"]\n s.email = [\"gimite+github@gmail.... | ruby | chosen |
[
{
"from": "system",
"value": "Include mention of rake tasks in welcome message\n"
},
{
"from": "human",
"value": "#\n# Postage plugin installation script\n#\n\n$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')\n\nrequire 'postage'\n\n# -- Configuration --------------------------------------... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nil value bug when no binding for prop\n"
},
{
"from": "human",
"value": "module Pakyow\n module Presenter\n class Bindings\n attr_accessor :bindable\n attr_reader :bindings\n\n def self.for(block)\n Bindings.new(block)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "TEST: Add checks to get teaching and update breaks\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TeachingPeriodTest < ActiveSupport::TestCase\n include Rack::Test::Methods\n include TestHelpers::AuthHelper\n include TestHelpers::JsonHelper\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use a much simpler way of finding the division\n"
},
{
"from": "human",
"value": "class PolicyDivision < ActiveRecord::Base\n self.table_name = 'pw_dyn_dreamvote'\n belongs_to :policy, foreign_key: :dream_id\n\n alias_attribute :date, :division_date\n alias_attr... | ruby | chosen |
[
{
"from": "system",
"value": "Use a String for better performance"
},
{
"from": "human",
"value": "module ActionMailerWithRequest\n\n module ControllerMixin\n\n def self.included(base)\n base.class_eval do\n before_filter :store_request\n end\n end\n\n def store_reques... | ruby | chosen |
[
{
"from": "system",
"value": "Remove SPM Package file from Cocoapod sources\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SwiftDecimalNumber\"\n\n s.version = \"1.0.3\"\n\n s.summary = \"Swift extensions for NSDecimalNumber.\"\n\n s.description = <<-DESC\n SwiftDeci... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to allow releasing it ti rubygems.org\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'thread_local/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise with path, so we can see whats going wrong\n"
},
{
"from": "human",
"value": "module Blimp\n module Sources\n class DiskSource < Blimp::Source\n attr_reader :root\n\n def initialize(root)\n @root = root\n end\n\n def get_file(pat... | ruby | chosen |
[
{
"from": "human",
"value": "Add TransparencyData API Campaign Contributions support\n"
},
{
"from": "gpt",
"value": "module GovKit\n class TransparencyDataResource < Resource\n default_params :apikey => GovKit::configuration.sunlight_apikey\n base_uri GovKit::configuration.transparency_d... | ruby | chosen |
[
{
"from": "system",
"value": "Add certificate_model for user to customize model\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule LetsEncrypt\n # :nodoc:\n class Configuration\n include ActiveSupport::Configurable\n\n config_accessor :use_staging do\n !Rails... | ruby | chosen |
[
{
"from": "system",
"value": "Add pagination div to filter.\n"
},
{
"from": "human",
"value": "module Liquid\n\n module PaginationFilters\n \n def paginate(pagination_info)\n pagination_html = \"\"\n if pagination_info.is_a?(Hash) && (pagination_info[\"current_page\"] && paginatio... | ruby | chosen |
[
{
"from": "system",
"value": "Add a missing dep req\n"
},
{
"from": "human",
"value": "require_relative './enumerable/find_map'\n\n\n# Instance methods to extend {Enumerable}.\n# \nmodule Enumerable\n \n # See {NRSER.find_bounded}\n def find_bounded bounds, &block\n NRSER.find_bounded self... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue in Activity Data endpoint.\n\n- Must include the required activityId parameter.\n- Append the activity_id value instead of the required params.\n"
},
{
"from": "human",
"value": "module NikePlusGem\n class Client\n\n ACTIVITY_DATA = []\n\n def activ... | ruby | chosen |
[
{
"from": "system",
"value": "Use different hook for action_mailer config\n\nBy using the `after: \"finisher_hook\"` we are \nalleviated from the specific load order of the\ninitializers. ActionMailer allows the addition\nof delivery methods at any point during app\nexecution as long as it's there before yo... | ruby | chosen |
[
{
"from": "system",
"value": "Add feature to generate embeddable html string\n"
},
{
"from": "human",
"value": "require 'uuidtools'\nrequire 'launchy'\nrequire 'plotly/offline/html'\n\nmodule Plotly\n module Offline\n module Exportable\n # for IRuby\n def show\n # @todo unle... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust formatting of NodePattern in Lint/Debugger\n\nI find that using multiline strings to keep the node patterns on separate lines\nfrom Ruby code makes them read better.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule RuboCop\n module Cop\n mod... | ruby | chosen |
[
{
"from": "system",
"value": "Add unique index to contacts email\n"
},
{
"from": "human",
"value": "class CreateContacts < ActiveRecord::Migration\n def change\n create_table :contacts do |t|\n t.string :email, unique: true\n\n t.timestamps\n end\n end\nend\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "system",
"value": "Add yesterday's Pioneer B&R changes\n"
},
{
"from": "human",
"value": "BanList.for_format(\"pioneer\") do\n format_start(\n \"https://magic.wizards.com/en/articles/archive/news/announcing-pioneer-format-2019-10-21\",\n \"Bloodstained Mire\" => \"banned\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add new sign in test if browse direct to admin\n"
},
{
"from": "human",
"value": "require 'integration_test_helper'\ninclude Warden::Test::Helpers\n\nclass SignInFlowTest < ActionDispatch::IntegrationTest\n\n setup do\n Warden.test_mode!\n I18n.available_loca... | ruby | chosen |
[
{
"from": "system",
"value": "Add valid signup information test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UsersSignupTest < ActionDispatch::IntegrationTest\n test \"invalid signup information\" do\n\n get signup_path\n\n assert_no_difference 'User.count' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix polymorphic association and set version number\n"
},
{
"from": "human",
"value": "class Audit < Sequel::Model\n\n many_to_one :auditable, reciprocal: :audits,\n setter: (proc do |auditable|\n self[:auditable... | ruby | chosen |
[
{
"from": "system",
"value": "Change back on Order.rb to english and 10eur price\n"
},
{
"from": "human",
"value": "class Order < ActiveRecord::Base\n has_many :paypal_notifications\n belongs_to :selected, class_name: \"Lead\"\n belongs_to :selector, class_name: \"User\"\n \n validates :sel... | ruby | chosen |
[
{
"from": "system",
"value": "Update require for puppet_x to use relative path\n\nThis work should allow the code to be loaded in the puppetserver.\n"
},
{
"from": "human",
"value": "require 'puppet_x/ldapquery'\n\nbegin\n require 'net/ldap'\nrescue\n Puppet.warn(\"Missing net/ldap gem require... | ruby | chosen |
[
{
"from": "system",
"value": "Fix inconsistency; no CommandHandler inheritance\n"
},
{
"from": "human",
"value": "require_relative 'helpers/self_applier'\nrequire_relative 'helpers/uuid_helper'\n\nmodule Sequent\n module Core\n # Base class for command handlers\n # CommandHandlers are res... | ruby | chosen |
[
{
"from": "human",
"value": "Add a basic test suite for the Groups Controller.\n\nTest coverage is currently at 57%. This needs to be improved.\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe GroupsController do\n let(:user) { FactoryGirl.create(:user) }\n\n before(:each) d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra attendance row spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe AttendanceRow do\n let(:absence) { '1' }\n let(:tardy) { '0' }\n\n let!(:student) { FactoryGirl.create(:student) }\n\n let(:data) do\n {\n local_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix calling instance instead of class method\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe HipaaCrypt::Configuration do\n\n describe '#extractable_options' do\n it 'should be true' do\n expect(HipaaCrypt::Configuration.extractable_opt... | ruby | chosen |
[
{
"from": "system",
"value": "Change to remove event dependency.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule FiniteMachine\n # A class reponsible for building transition out of parsed states\n #\n # Used internally by {DSL} to\n #\n # @api private\n class TransitionBuild... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test failures on Ruby 2.2.7.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"active_model\"\n\nRSpec.describe ActiveDecorator::GraphQL do\n describe \"::VERSION\" do\n it \"has a version number\" do\n expect(ActiveDecorator::GraphQ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec of Transport module\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ElectricSheep::Transport do\n TransportKlazz = Class.new do\n include ElectricSheep::Transport\n\n attr_reader :done\n\n def do\n @done = true\n end\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add index endpoint request spec\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe \"GET /districts/:district/endpoints\", type: :request do\n let(:user) { create :user }\n let(:district) { create :district }\n\n it \"returns a list of endpoint\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test with incorrect locale name\n"
},
{
"from": "human",
"value": "RSpec.describe 'shared/_authentication', :type => :view do\n let(:logged_in) { false }\n\n before do\n allow(controller).to receive(:default_url_options) do\n { locale: I18n.default_loc... | ruby | chosen |
[
{
"from": "system",
"value": "Disable pound port checking with autotest\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Pound' do\n\n describe service('pound') do\n it { should be_enabled }\n it { should be_running }\n end\n\n describe port(443) do\n it { should... | ruby | chosen |
[
{
"from": "system",
"value": "Add require for admin listener\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'semaphore'\n\nmodule RubyRabbitmqJanus\n module Rabbit\n # Define an module for create an publisher\n module Publisher\n # @author VAILLANT Jeremy... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test of tag/title queries\n\nThis ensures that title queries match, that they match only exactly,\nand that tag queries match both single and array tags, and that matching\na missing tag works.\n"
},
{
"from": "gpt",
"value": "test_name \"non-parameter queries\... | ruby | chosen |
[
{
"from": "system",
"value": "Support iOS 6 force rotation.\n"
},
{
"from": "human",
"value": "module ProMotion\n class NavigationController < UINavigationController\n def shouldAutorotate\n visibleViewController.shouldAutorotate\n end\n end\nend\n"
},
{
"from": "gpt",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Add fotorama images to precompile\n"
},
{
"from": "human",
"value": "# Used only for Ruby on Rails gem to tell, that gem contain `lib/assets`.\nmodule Fotoramajs\n module Rails\n class Engine < ::Rails::Engine\n end\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix minor error in refactored NokogiriHandler\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nmodule LLT\n class Diff::Treebank::Parser\n class NokogiriHandler < Nokogiri::XML::SAX::Document\n\n include Diff::Helpers::Parsing::Helper\n include... | ruby | chosen |
[
{
"from": "human",
"value": "Order search result by selected condition\n"
},
{
"from": "gpt",
"value": "module FullTextSearch\n module Fetcher\n def load_result_ids\n ret = []\n # get all the results ranks and ids\n @scope.each do |scope|\n klass = scope.singularize.cam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nginx configuration with file upload and sed\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(:must_exist).load do\n\n after 'deploy:create_symlink', 'nginx:configure'\n\n namespace :nginx do\n\n desc 'Add app configuration for Mirego i... | ruby | chosen |
[
{
"from": "system",
"value": "Add factory for internal user with learner role\n"
},
{
"from": "human",
"value": "FactoryBot.define do\n factory :admin, class: 'InternalUser' do\n activated_user\n association :consumer\n email { 'admin@example.org' }\n generated_user_name\n passwo... | ruby | chosen |
[
{
"from": "system",
"value": "Save screenshots in rdb tmp dir instead redmine tmp dir."
},
{
"from": "human",
"value": "\nmodule RdbRequestHelpers\n\n def set_permissions\n role = Role.where(:name => 'Manager').first\n role.permissions << :view_dashboards\n role.permissions << :configu... | ruby | chosen |
[
{
"from": "system",
"value": "Change dependencies to be friendly to semantically versioned gems\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/axiom/types/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'axiom-types'\n gem.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Move utility methods into their own module\n"
},
{
"from": "human",
"value": "\nmodule Minx\n class << self\n\n # Map messages from +input+ to +output+.\n #\n # Provide a block that takes a single argument, and it will be called\n # with every message r... | ruby | chosen |
[
{
"from": "system",
"value": "Add reverse association of licensings\n"
},
{
"from": "human",
"value": "class License < ActiveRecord::Base #:nodoc:\n \n validates_presence_of :name\n validates_presence_of :url\n validates_inclusion_of :kind, :in => [1, 2, 3]\n \n def self.setup_licenses\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add count_opens and simple_uuid generator in config file\n"
},
{
"from": "human",
"value": "require 'notifiable/active_record'\nrequire 'notifiable/app'\nrequire 'notifiable/notifiable_concern'\nrequire 'notifiable/railtie' if defined?(Rails)\nrequire 'notifiable/en... | ruby | chosen |
[
{
"from": "system",
"value": "Implement search_tasks on the TaskClient\n"
},
{
"from": "human",
"value": "require 'voicearchive/client'\nmodule Voicearchive\n class TaskClient < Client\n def set_supplier_on_task(task_id, supplier_id)\n response = call(\"task/#{task_id}/SetSupplier\", {:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the mime_types issue once and for all.\n\nAlthough it's been difficult to reproduce, there is anecdotal evidence that this will sometimes raise an exception because `candidates` is `nil`. An extra test here won't hurt anything."
},
{
"from": "human",
"value": "... | ruby | chosen |
[
{
"from": "human",
"value": "Add a package for SafeChute.\n"
},
{
"from": "gpt",
"value": "class SafeChute < Kosmos::Package\n title 'Safe Chute'\n url 'http://genesisrage.net/ksp/SafeChute.zip'\n\n def install\n merge_directory 'GameData'\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Use generic JDBC schema parsing in MSSQL subadapter, since it handles primary keys\n"
},
{
"from": "human",
"value": "Sequel.require 'adapters/shared/mssql'\n\nmodule Sequel\n module JDBC\n # Database and Dataset instance methods for MSSQL specific\n # suppor... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust bootstrap method to spec\n"
},
{
"from": "human",
"value": "require \"disclosure/engine\"\nrequire \"disclosure/configuration\"\n\nmodule Disclosure\n class << self\n attr_accessor :configuration\n end\n\n def self.bootstrap!\n Disclosure.configurati... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration, send data to firestore\n\n[#170193041]\n"
},
{
"from": "human",
"value": "class AddMissingPlatformInfo < ActiveRecord::Migration\n def up\n runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NUL... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Mouth dependency from Ear class\n"
},
{
"from": "human",
"value": "require \"utils/string_ex\"\n\nmodule Slatan\n using StringEx\n\n class Ear\n def initialize(mouth)\n @concerns = []\n Dir[File.expand_path('../../../concerns', __FILE__) << '/*... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic doc for UrlSigner.{sign|valid?}\n"
},
{
"from": "human",
"value": "module UrlSigner\n autoload :Base, 'url_signer/base'\n autoload :Signer, 'url_signer/signer'\n autoload :Verifier, 'url_signer/verifier'\n\n module_function\n\n def sign(url, *options)... | ruby | chosen |
[
{
"from": "human",
"value": "Add SQL Power Architect JDBC (Community) v1.0.8\n"
},
{
"from": "gpt",
"value": "cask 'sql-power-architect-jdbc' do\n version '1.0.8'\n sha256 'a564e294aba5e7f4701717f8d36a898b06e6354000df332e5b6aa41377b06665'\n\n url \"http://download.sqlpower.ca/architect/#{vers... | ruby | chosen |
[
{
"from": "system",
"value": "Include Homebrew in library path\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"homebrew\" do\n let(:facts) { default_test_facts }\n\n let(:dir) { facts[:homebrew_root] }\n let(:cmddir) { \"#{dir}/Library/Taps/boxen/homebrew-brews/cmd\" ... | ruby | chosen |
[
{
"from": "human",
"value": "Add skeleton for tests on features for comments\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'Comments Panel' do\n\tit \"user can see comments on queried translation\" do\n\t\tpending\n\tend\n\n\tcontext \"when logged in\" do\n\t\tit \"user can... | ruby | chosen |
[
{
"from": "system",
"value": "Clear the @xsd error messages before validating, or else the previous document's errors get lumped in with this one's\n"
},
{
"from": "human",
"value": "module HealthDataStandards\n module Validate\n module Schema\n class Validator\n include BaseVali... | ruby | chosen |
[
{
"from": "system",
"value": "Include Rake tasks automatically for non-rails apps\n"
},
{
"from": "human",
"value": "require \"json\"\nrequire \"bundler\"\nrequire \"prospector/version\"\n\nrequire \"prospector/client\"\nrequire \"prospector/configuration\"\nrequire \"prospector/error\"\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Replace use of Note.find_by_permalink with Note.find_by\n"
},
{
"from": "human",
"value": "class NotesController < ContentController\n require 'json'\n\n layout :theme_layout\n cache_sweeper :blog_sweeper\n caches_page :index, :show, if: proc { |c| c.request.que... | ruby | chosen |
[
{
"from": "human",
"value": "Add RabbitMQ Alive check against STOMP\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n#\n# RabbitMQ check alive plugin\n# ===\n#\n# This plugin checks if RabbitMQ server is alive using the REST API\n#\n# Copyright 2013 Milos Gajdos\n#\n# Released under the sam... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for multiple teams with the same primary name\n\nChange-Id: Ie70c29e16cbe41081fe13c1a1c0ae084cbef863f\n"
},
{
"from": "human",
"value": "# Monkey Patch Commander::UI to alias password to avoid conflicts\nmodule Commander::UI\n alias :pw :password\nend\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing webrick error in ruby 3.0\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$:.unshift(lib) unless $:.include?(lib)\n\nrequire 'favicon_party/version'\n\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Use radix/base for ruby 2.1 compatibility"
},
{
"from": "human",
"value": "require 'radix'\r\nif RUBY_PLATFORM == 'java'\r\n require 'couchbase-jruby-model'\r\nelse\r\n require 'couchbase-model'\r\nend\r\nrequire 'couchbase-id/generator'\r\n\r\n\r\nmodule Couc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec from adding options to get_user\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe AngellistApi::Client::Users do\n let(:client) { AngellistApi::Client.new }\n\n describe \"#get_user\" do\n it \"gets 1/users/<id>\" do\n id = \"12... | ruby | chosen |
[
{
"from": "human",
"value": "Add very basic intersection area test\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe SpatialFeatures do\n describe '::features' do\n it 'returns the features of a class'\n it 'returns the features of a scope'\n end\n\n describe '#total_in... | ruby | chosen |
[
{
"from": "system",
"value": "Fix stopApplications error in backward core ext\n"
},
{
"from": "human",
"value": "class Array\n def startApplications\n if !self.empty? && self.all? { |v| v.class == OmfEc::Group }\n self.each { |g| g.startApplications }\n end\n end\n\n def stopApplic... | ruby | chosen |
[
{
"from": "system",
"value": "Move away from using RSpec double away from RSpec\n\nWhilst this class is only used in specs its not great practice and actually broke somehow in RSpec 3.2\n\nSimpler to just use OpenStruct\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'rspec/moc... | ruby | chosen |
[
{
"from": "system",
"value": "Use space as error delimiter, for usable links in Jenkins\n"
},
{
"from": "human",
"value": "class Reporter\n def blank_old_url(row)\n end\n\n def invalid_old_url(row)\n output [\n row['old url'],\n 'invalid old url',\n row['source'],\n row... | ruby | chosen |
[
{
"from": "system",
"value": "Add multi json as dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'guard/jasmine/version'\n\nGem::Specification.new do |s|\n s.name = 'guard-jasmine'\n s.version = Guard::Ja... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec, add moped dependency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire \"moped/turbo/version\"\n\nGem::Specification.new do |s|\n s.name = \"mo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused 'region_id' var from example\n"
},
{
"from": "human",
"value": "module CreateAuthorization\n\n def CreateAuthorization.run(client, org)\n region_id = \"can\"\n\n card = client.cards.post(org,\n ::Io::Flow::V0::Models:... | ruby | chosen |
[
{
"from": "system",
"value": "Correct example group name to be unique\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"Rapidly opening and closing lots of channels\" do\n before :all do\n @connection = Bunny.new(:automatic_recovery => false).tap do |c|\n c.start\... | ruby | chosen |
[
{
"from": "system",
"value": "Change support email from gem spec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'smartfocus/version'\n\nGem::Specification.new do |s|\n s.name = 'smartfocus'\n s.summary = \"Smartfocus\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning at bundle install\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"got_fixed/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.... | ruby | chosen |
[
{
"from": "human",
"value": "Add db_setup spec of integration test of test-kicthen\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'json'\n\ndescribe 'db_setup' do\n chef_run = ChefSpec::SoloRunner.new\n\n before(:all) do\n chef_run.node.normal_attrs = property[:chef_attribu... | ruby | chosen |
[
{
"from": "system",
"value": "Add invalid data tests for session controller\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe SessionsController do\n\n describe \"POST create\" do\n describe \"with valid params\" do\n it \"should return an auth_token\" do\n use... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests that the config factory properly reads the YAML file.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ReadingList::ConfigurationFactory do\n let(:config_path) { 'spec/resources/test_config.yml' }\n\n subject(:factory) do\n Reading... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix deprecation warning when setting table names.\"\n\nThis reverts commit af36b786776e3ceabd57ed11b4a15a04866e5a0d.\n\nThe reason for this is that Rails 3.0 does not yet support table_name=\n"
},
{
"from": "human",
"value": "module Statisfaction\n class E... | ruby | chosen |
[
{
"from": "human",
"value": "Add helpers to sign in a user during feature spec\n"
},
{
"from": "gpt",
"value": "module CapybaraHelpers\n def sign_in_as(user)\n visit new_user_session_path\n\n within \"form#new_user\" do\n fill_in \"user[login]\", :with => user.username\n fill_in... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.