conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update VLAN ID for external network in Dublin\n"
},
{
"from": "human",
"value": "name \"idris\"\ndescription \"Master role applied to idris\"\n\ndefault_attributes(\n :networking => {\n :interfaces => {\n :internal_ipv4 => {\n :interface => \"bond0\"... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify method calls to what is required\n"
},
{
"from": "human",
"value": "module Vcloud\n module EdgeGateway\n class ConfigurationDiffer\n\n def initialize local, remote\n @local = local\n @remote = remote\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix strange full text search lookup error\n"
},
{
"from": "human",
"value": "class Cashback < ApplicationRecord\n include MyplaceonlineActiveRecordIdentityConcern\n\n validates :cashback_percentage, presence: true\n\n has_one :credit_card_cashback\n \n def expi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow fill in the blank concept results\n"
},
{
"from": "human",
"value": "class ConceptResult < ActiveRecord::Base\n\n belongs_to :concept\n belongs_to :activity_session\n belongs_to :activity_classification\n\n validates :concept, presence: true\n validates :... | ruby | chosen |
[
{
"from": "system",
"value": "Set default content type to markdown\n"
},
{
"from": "human",
"value": "class Revision < ActiveRecord::Base\n has_many :revision_fields, inverse_of: :revision\n has_many :revision_tags, inverse_of: :revision\n belongs_to :tiddler, inverse_of: :revisions\n\n vali... | ruby | chosen |
[
{
"from": "system",
"value": "Fix circular argument reference warning"
},
{
"from": "human",
"value": "module SVGPath\n # Capital letters means absolutely positioned, lower cases means relatively positioned.\n COMMANDS = {\n moveto: \"M\",\n lineto: \"L\",\n horizontal_lineto: \"H\",\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor notifications to Timeslot Model\n\nMove tutor and student scheduling notification logic to Timeslot model.\n"
},
{
"from": "human",
"value": "class Timeslot < ActiveRecord::Base\n belongs_to :tutor, class_name: 'User'\n belongs_to :student, class_name: 'U... | ruby | chosen |
[
{
"from": "system",
"value": "Fix update statement for Rails 4 preparation\n"
},
{
"from": "human",
"value": "class UserBlocker\n\n def initialize(user, by_user=nil, opts={})\n @user, @by_user, @opts = user, by_user, opts\n end\n\n def self.block(user, by_user=nil, opts={})\n UserBlocke... | ruby | chosen |
[
{
"from": "human",
"value": "Add sample spec in order to throw some requirements out there\n"
},
{
"from": "gpt",
"value": "our_watcher = ScoreButt.new\n\nour_watcher.watch do\n host '192.168.1.5' do\n http\n smtp\n ftp\n telnet\n ssh\n end\n host '192.168.2.5' do\n https\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove an old TODO that has already been DONE"
},
{
"from": "human",
"value": "#TODO: set a requirement on the handsoap version\nrequire 'handsoap'\nrequire 'logger'\nrequire 'time'\nrequire 'uri'\n\nrequire 'jiraSOAP/handsoap_extensions.rb'\nrequire 'jiraSOAP/remot... | ruby | chosen |
[
{
"from": "system",
"value": "Update Podspec, someone has become case-sensitive.\n\nCloning the URL in Cocoapods no longer seems to work properly"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'MOLAuthenticatingURLSession'\n s.version = '2.2'\n s.platform = ... | ruby | chosen |
[
{
"from": "system",
"value": "Make Quickpay initialization exception more idiomatic\n\nCloses #1982\n"
},
{
"from": "human",
"value": "require 'rexml/document'\nrequire 'digest/md5'\n\nrequire 'active_merchant/billing/gateways/quickpay/quickpay_v10'\nrequire 'active_merchant/billing/gateways/qui... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"only add should[_not] to ActiveRecord classes if AR defined\"\n\nThis reverts commit 07d6a1a7159f1707bfeac3098ec5984ab9bb5b3d.\n"
},
{
"from": "human",
"value": "RSpec.configure do |rspec|\n # Delay this in order to give users a chance to configure `expect... | ruby | chosen |
[
{
"from": "system",
"value": "Fix compatibility with chef < 12\n"
},
{
"from": "human",
"value": "name 'cumulus'\nmaintainer 'Cumulus Networks'\nmaintainer_email 'ce-ceng@cumulusnetworks.com'\nlicense 'Apache v2.0'\ndescription 'Manage Cumulus Networks specific co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix default file location setter so ActiveRecord::Base does not get set\n"
},
{
"from": "human",
"value": "module PackRat\n module CacheHelper\n extend ActiveSupport::Concern\n\n included do\n extend Cacher\n include Cacher\n cattr_accessor :up... | ruby | chosen |
[
{
"from": "system",
"value": "Migrate currency converter to new SMS api\n"
},
{
"from": "human",
"value": "require \"nokogiri\"\nrequire \"open-uri\"\n\nclass CurrencyConverter < Dumbstore::App\n\tname 'CurrencyConverter'\n\tauthor 'Arnav Roy'\n\tauthor_url 'http://www.arnavroy.com/'\n\tdescript... | ruby | chosen |
[
{
"from": "system",
"value": "Revert to previous behavior of preparation of the lib_directory.\n\nThis matches changes made to bin/frecon.\n"
},
{
"from": "human",
"value": "lib_directory = File.class_eval('expand_path(join(dirname(__FILE__), \"lib\"))')\n$LOAD_PATH.unshift(lib_directory) unless... | ruby | chosen |
[
{
"from": "system",
"value": "Add module comment for HandlerBundle.\n"
},
{
"from": "human",
"value": "require 'bra/driver_common/requests/handler'\nrequire 'bra/driver_common/requests/player_handler'\nrequire 'bra/driver_common/requests/playlist_handler'\n\nmodule Bra\n module DriverCommon\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check whether extend method is already defined\n"
},
{
"from": "human",
"value": "require 'nkf'\n\nmodule FileEncoder\n class EncodeProxy\n def initialize(obj)\n @obj = obj.dup\n @obj.extend(FileEncoder::Proxy::Nkfable)\n end\n\n def method_missi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix syntax error; don't analyze jobs that can't be found.\n"
},
{
"from": "human",
"value": "require File.expand_path('../log_update_listener', __FILE__)\nrequire File.expand_path'../job', __FILE__)\n\nclass LogAnalyzer < LogUpdateListener\n def on_receive(ident)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add my name and link to gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.name = 'square'\n gem.version = File.read('VERSION').delete(\"\\n\\r\")\n gem.authors = ['nov']\n gem.email = ['nov@matake.jp']\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on using in Rails\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire \"active_model\"\nrequire \"active_support/i18n\"\nrequire \"detox/validations/ordering\"\nrequire \"detox/validations/possession\"\nrequire \"detox/validations/values_uniqueness... | ruby | chosen |
[
{
"from": "system",
"value": "Remove active_support/concern require, it's not needed and breaks apps that don't use ActiveSupport\n"
},
{
"from": "human",
"value": "require 'capistrano/all'\nrequire 'active_support/concern'\n\nrequire 'aws-sdk-autoscaling'\nrequire 'aws-sdk-ec2'\n\nrequire 'elba... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure clever credentials hash exists before looking for nested data\n"
},
{
"from": "human",
"value": "module CleverIntegration::Parsers::Student\n\n def self.run(hash)\n puts \"Clever Student Hash\"\n puts hash\n name_hash = hash[:name]\n name = se... | ruby | chosen |
[
{
"from": "system",
"value": "Add code comments to CSP config\n"
},
{
"from": "human",
"value": "SecureHeaders::Configuration.default do |config|\n\n # Unblock PDF downloading for student report\n config.x_download_options = nil\n config.csp = {\n default_src: %w('self' https:),\n scrip... | ruby | chosen |
[
{
"from": "system",
"value": "Fix DoS randomizable boss ids\n"
},
{
"from": "human",
"value": "\nNONRANDOMIZABLE_PICKUP_GLOBAL_IDS =\n [0x42, 0x91] + # unequip dummy items (bare knuckles, casual clothes)\n [0xCD] # chaos ring (placed separately by the randomizer logic)\n\nSPAWNER_ENEMY_IDS = [... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem dependencies to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/immutable/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'immutable'\n gem.version = Immutable::VERSION... | ruby | chosen |
[
{
"from": "system",
"value": "Update options for notification rule helper to use Disclosure collections\n"
},
{
"from": "human",
"value": "module Users::NotificationRulesHelper\n def class_name_options_for_select\n Inquest::Application.config.notifiable_classes.map { |nc| [nc.name.pluralize,... | ruby | chosen |
[
{
"from": "system",
"value": "Use Ruby keyword args in CreateManualDocumentService\n\nI think that using language features instead of custom code makes this\neasier to understand.\n"
},
{
"from": "human",
"value": "class CreateManualDocumentService\n def initialize(dependencies)\n @manual_re... | ruby | chosen |
[
{
"from": "system",
"value": "Test that drug searches work correctly wth existing meds\n\nConflicts:\n\tfeatures/ruby/step_definitions/drug_search_steps.rb\n"
},
{
"from": "human",
"value": "When(/^I search for a drug by name$/) do\n fill_in \"Drug\", :with => \"Red\"\n page.execute_script %Q(... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce to a single entry point\n"
},
{
"from": "human",
"value": "class Ratatool < Formula\n desc \"Tool for random data sampling and generation\"\n homepage \"https://github.com/spotify/ratatool\"\n url \"https://github.com/spotify/ratatool/releases/download/v0.... | ruby | chosen |
[
{
"from": "system",
"value": "Change test_access_coordinates again to support different exiftool outputs.\n"
},
{
"from": "human",
"value": "# -- encoding: utf-8 --\nrequire 'helpers_for_test'\n\nclass TestReadCoordinates < TestCase\n\n def setup\n @data_dir = File.dirname(__FILE__) + '/data... | ruby | chosen |
[
{
"from": "system",
"value": "Use admin endpoint for get_network\n\nAPI provides both api/admin/network and api/network for GET\nrequest of the orgVdcNetwork. The admin endpoint also returns\nthe attached EdgeGateway, which comes in useful when re-writing\nthe output to POST back as a new network.\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove refunded paymentDetails from ExpenseItem export\n"
},
{
"from": "human",
"value": "class Exporters::PaymentDetailsExporter\n attr_accessor :expense_item\n\n def initialize(expense_item)\n @expense_item = expense_item\n end\n\n def headers\n [\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust date, and adjust version number---this should be a change in the second digit, not the third.\n"
},
{
"from": "human",
"value": "# In the top directory\n# gem build rdl.gemspec\n# gem install rdl-1.0.0.beta.1.gem\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gem specification\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nrequire \"./lib/protest/version\"\n\nGem::Specification.new do |s|\n s.name = \"protest\"\n s.version = Protest::VERSION\n s.summary = \"Protest is... | ruby | chosen |
[
{
"from": "system",
"value": "Add the MIT-LICENSE to the Active Support gemspec\n"
},
{
"from": "human",
"value": "version = File.read(File.expand_path(\"../../RAILS_VERSION\", __FILE__)).strip\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'activesupp... | ruby | chosen |
[
{
"from": "human",
"value": "Make sure that ActionController::Api can include helpers\n\nCloses #28554\n"
},
{
"from": "gpt",
"value": "require \"abstract_unit\"\n\nmodule ApiWithHelper\n def my_helper\n \"helper\"\n end\nend\n\nclass WithHelpersController < ActionController::API\n include... | ruby | chosen |
[
{
"from": "system",
"value": "Fix model name, it was renamed to Store during refactoring.\n"
},
{
"from": "human",
"value": "require_dependency \"datatable_state/application_controller\"\n\nmodule DatatableState\n class StoreController < ApplicationController\n respond_to :json\n before_f... | ruby | chosen |
[
{
"from": "human",
"value": "Add search support for Settings engine.\n"
},
{
"from": "gpt",
"value": "require 'acts_as_indexed'\n\nbegin\n Refinery::Setting.class_eval do\n # Docs for acts_as_indexed http://github.com/dougal/acts_as_indexed\n acts_as_indexed :fields => [:name]\n end\nres... | ruby | chosen |
[
{
"from": "system",
"value": "Update user_params to accept email from register form\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def new\n @user = User.new\n end\n\n def create\n @user = User.new(user_params)\n if (@user.save)\n redirect_to ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Eve::Race's with locale :en\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Eve\n class RacesImporter\n def import\n ActiveRecord::Base.transaction do\n esi = EveOnline::ESI::UniverseRaces.new\n\n etag = Eve::... | ruby | chosen |
[
{
"from": "system",
"value": "Improve logging on a validation error.\n"
},
{
"from": "human",
"value": "require 'slack-gamebot/error'\n\nmodule SlackRubyBot\n module Commands\n class Base\n class << self\n alias_method :_invoke, :invoke\n\n def invoke(client, data)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comma between block args\n"
},
{
"from": "human",
"value": "class Nwmls::SchoolDistrict\n include Nwmls::Model\n\n def self.attribute_names\n if expand_attributes?\n [:code, :description]\n else\n [:Code, :Description]\n end\n end\n\n attr... | ruby | chosen |
[
{
"from": "system",
"value": "Switch test_configuration to return a hash with symbols.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'simplecov'\nSimpleCov.start\n\nrequire 'minitest/autorun'\nrequire 'dimples'\nrequire 'tilt/redcarpet'\nrequire 'tilt/erubis'\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests so they actually call bookmark-toolbox.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire \"test/unit\"\n\nclass BasicTests < Test::Unit::TestCase\n def test_simple\n assert_equal(1, 1)\n end\nend\n"
},
{
"from": "gpt",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Update point action test in cashes controller\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# == License\n# Ekylibre - Simple agricultural ERP\n# Copyright (C) 2008-2011 Brice Texier, Thibaud Merigon\n#\n# This program is free software: you can redistr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix comment test, change ficture name\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule GobiertoParticipation\n class CommentTest < ActiveSupport::TestCase\n def comment\n @comment ||= gobierto_participati... | ruby | chosen |
[
{
"from": "system",
"value": "Remove group option as Rails 4 removed assets group\n"
},
{
"from": "human",
"value": "require 'activeadmin'\n\nmodule ActiveAdmin\n module Sortable\n class Engine < ::Rails::Engine\n engine_name 'activeadmin_sortable_tree'\n\n initializer \"Rails prec... | ruby | chosen |
[
{
"from": "human",
"value": "Add bootstrap form builder spec\n"
},
{
"from": "gpt",
"value": "require 'spec_helper.rb'\nrequire 'bootstrap_form_builder.rb'\n\nclass TestHelper < ActionView::Base; end\n\ndescribe BootstrapFormBuilder do \n \n describe '#checkbox' do\n\n let(:helper) { TestHe... | ruby | chosen |
[
{
"from": "system",
"value": "Add drug-safety-update to X-Robots exclusions\n"
},
{
"from": "human",
"value": "class FindersController < ApplicationController\n\n before_filter :set_robots_headers\n\n def show\n @results = ResultSetPresenter.new(finder, facet_params)\n\n respond_to do |f... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dead code from LookupsController.\n\nThe course is not used at all, and the user method doesn't get called from anywhere. These all get called through the Lookup component, which is ultimately called from the cohort_button (for cohort lookup), the tag_button for tag look... | ruby | chosen |
[
{
"from": "system",
"value": "Use key from ~/.carbon_middleware if it's there\n"
},
{
"from": "human",
"value": "module Carbon\n module Cli\n def execute(*)\n $emitters = {}\n IRB.start_session(Shell.new.get_binding)\n end \n module_function :execute\n end\nend\n\nrequire 'c... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fixed problem with Google Authenticator / QR Code\"\n\nThis reverts commit dbf8989378e881cac489f6d355f021cdb6f60113.\n"
},
{
"from": "human",
"value": "class QrcodesController < ApplicationController\n skip_before_filter :authenticate_user!\n \n ALLOWED_... | ruby | chosen |
[
{
"from": "system",
"value": "Update octokit version to 2.6.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/version'\n\nGem::Specification.new do |s|\n s.name = 'pronto'\n s.version = Pronto::VERSION\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix GithubProject url parser name\n"
},
{
"from": "human",
"value": "module GithubProject\n def github_name_with_owner\n GitlabURLParser.parse(repository_url) || GitlabURLParser.parse(homepage)\n end\nend\n"
},
{
"from": "gpt",
"value": "module Gith... | ruby | chosen |
[
{
"from": "system",
"value": "Make image URL extraction safe\n"
},
{
"from": "human",
"value": "class NewfluxNormalizer < FeedjiraNormalizer\n class FetchError < StandardError; end\n\n protected\n\n def comments\n [summary]\n end\n\n def attachments\n [image_url]\n end\n\n private\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant Feed2Email module prefix\n"
},
{
"from": "human",
"value": "require 'cgi'\nrequire 'feedzirra'\nrequire 'fileutils'\nrequire 'logger'\nrequire 'mail'\nrequire 'net/smtp'\nrequire 'sanitize'\nrequire 'singleton'\nrequire 'yaml'\n\nmodule Feed2Email\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add singleton to root library file.\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n$LOAD_PATH << './github_api'\n\nrequire 'net/http'\nrequire 'uri'\nrequire 'yaml'\nrequire 'base'\nrequire 'user'\nrequire 'browser'\n\nbegin\n $user = GitHub::User.new\n $user... | ruby | chosen |
[
{
"from": "system",
"value": "Add readers for subtitle, content and url\n"
},
{
"from": "human",
"value": "\nclass Post\n attr_reader :title\n \n def initialize(title, subtitle, content, url)\n @title = title\n @subtitle = subtitle\n @content = content\n @url = url\n end\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Use order.currency instead of fixed value\n"
},
{
"from": "human",
"value": "class PayuOrder\n include Rails.application.routes.url_helpers\n\n def self.params(order, ip, order_url, notify_url, continue_url)\n products = order.line_items.map do |li|\n {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add base module with exceptions"
},
{
"from": "human",
"value": "require \"eventmachine\"\nrequire \"em-rtmp/version\"\n"
},
{
"from": "gpt",
"value": "require \"eventmachine\"\n\nrequire \"em-rtmp/buffer\"\nrequire \"em-rtmp/connection\"\nrequire \"em-r... | ruby | chosen |
[
{
"from": "system",
"value": "Add `play` and `board` to CLI for placing pieces and viewing the board\n"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'colorize'\n\n\nmodule TTT\n class CLI < Thor\n desc 'create PATH', 'start a new tic tac toe repo'\n def create(path)\n abso... | ruby | chosen |
[
{
"from": "system",
"value": "Add debug logging to water\n"
},
{
"from": "human",
"value": "class Watcher\n\n def initialize(bot, handler_symbol, sleep_seconds=10)\n @bot = bot\n @handler_symbol = handler_symbol\n @sleep_seconds = sleep_seconds\n end\n\n def start\n puts 'ping'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "@thenathanjones: Put the missing end in\n"
},
{
"from": "human",
"value": "class MakeCommonCategory < ActiveRecord::Migration\n def change\n if Category.count > 0\n first_category = Category.find_by_id 1\n last_category = Category.last\n\n first_c... | ruby | chosen |
[
{
"from": "system",
"value": "Change dependencies so that portfolios are now deleted when their corresponding portfolio names are deleted\n"
},
{
"from": "human",
"value": "class PortfolioName < ActiveRecord::Base\n attr_accessible :name, :global, :portfolio_products, :portfolio_products_attrib... | ruby | chosen |
[
{
"from": "system",
"value": "Fix iPhone 6 Plus scaling issue\n"
},
{
"from": "human",
"value": "module HBFav2\n class HatenaStarView < UIImageView\n @@blank_image = UIImage.imageNamed('blank')\n @@is_retina = UIScreen.mainScreen.scale == 2.0\n\n def initWithFrame(frame)\n if su... | ruby | chosen |
[
{
"from": "system",
"value": "Gather all RubyEventStore under Error class\n\nIt might be convenient to be able to catch all RES errors by rescuing\nonly RubyEventStore::Error instead of getting acknowledged with all\npresent and future errors.\n\n[#620]\n"
},
{
"from": "human",
"value": "module ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor use of resolver in rack endpoint"
},
{
"from": "human",
"value": "require 'rack/request'\nrequire 'rack/response'\nrequire 'rack/file'\n\nrequire File.dirname(__FILE__) + '/../resolver'\n\nmodule HtmlMockup\n module Rack\n \n class HtmlMockup\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix data update, use ordering by updated_at\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Ossert\n module Workers\n class RefreshFetch\n include Sidekiq::Worker\n include ForkProcessing\n sidekiq_options unique: :until_e... | ruby | chosen |
[
{
"from": "human",
"value": "Add site cookbook for jenkins\n"
},
{
"from": "gpt",
"value": "#\n# Cookbook Name:: jenkins\n# Recipe:: _proxy_apache2\n#\n# Author:: Fletcher Nichol <fnichol@nichol.ca>\n#\n# Copyright 2011, Fletcher Nichol\n#\n# Licensed under the Apache License, Version 2.0 (the \... | ruby | chosen |
[
{
"from": "system",
"value": "Add a new Post class to the tests. Just to test normal instances.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nrequire \"bundler/setup\"\nBundler.require\nrequire 'store_configurable'\nrequire 'active_record/base'\nrequire 'minitest/auto... | ruby | chosen |
[
{
"from": "system",
"value": "Convert test class to anonymous class\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Virtus::Options, '#accept_options' do\n class Model\n extend DescendantsTracker\n extend Virtus::Options\n end\n\n let(:object) { Model.dup ... | ruby | chosen |
[
{
"from": "system",
"value": "Add survey, question, answer, response, and response set to migration that adds uuids for rows missing that.\n"
},
{
"from": "human",
"value": "class QG < ActiveRecord::Base\n set_table_name 'question_groups' \nend\n\nclass UpdateBlankApiIdsOnQuestionGroup < Active... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure gemspec reflects correct development dependencies.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'missingly/version'\n\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to separate enrollments by renewal/initial\n"
},
{
"from": "gpt",
"value": "# Takes a list of enrollment group IDs in an array and filters them into initial and shop renewals.\neg_ids = %w()\n\npolicies = Policy.where(:eg_id => {\"$in\" => eg_ids})\n\nfoun... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure dummy is required inside teaspoon\n"
},
{
"from": "human",
"value": "Teaspoon.configure do |config|\n config.mount_at = \"/teaspoon\"\n config.root = Spree::Backend::Engine.root\n config.asset_paths = [\"spec/javascripts\", \"spec/javascripts/stylesheet... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic accounts API controller spec.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Api::V1::AccountsController do\n describe '#index' do\n context 'when not authenticated' do\n it 'returns with unauthorized' do\n xhr :get, :ind... | ruby | chosen |
[
{
"from": "system",
"value": "Update VyprVPN cask to v2.6.1.2422\n"
},
{
"from": "human",
"value": "class Vyprvpn < Cask\n version '2.6.0.2408'\n sha256 'eafade7cd1ed880cefb412f67015d9bdc259670f83cae269913d5dfa97b502e4'\n\n url \"https://www.goldenfrog.com/downloads/vyprvpn/desktop/mac/produc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs for Rails < 5.1\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe Spree::Admin::OrdersController do\n\n context \"with authorization\" do\n stub_authorization!\n\n before do\n request.env[\"HTTP_REFERER\"] = \"http://lo... | ruby | chosen |
[
{
"from": "system",
"value": "clipp: Add a basic rule test.\n"
},
{
"from": "human",
"value": "$:.unshift(File.dirname(File.dirname(__FILE__)))\nrequire 'clipp_test'\n\nclass TestBasic < CLIPPTestCase\n def test_trivial\n clipp(input: \"echo:foo\")\n end\n\n def test_body_before_header\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec with required libraries\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Futility\"\n s.version = \"1.0.1\"\n s.summary = \"Some reusable iOS goodness, brought to you by Futurice.\"\n s.homepage = \"https:... | ruby | chosen |
[
{
"from": "system",
"value": "Change ldownload link to s3\n"
},
{
"from": "human",
"value": "# Microsoft Visual C++ redistributable\n\nname \"vc_redist\"\ndefault_version \"90\"\n\n# TODO: same for 32 bits\n# source :url => \"https://s3.amazonaws.com/dd-agent-omnibus/msvcrntm_x64.tar.gz\",\nsour... | ruby | chosen |
[
{
"from": "system",
"value": "Update the gemspec with a quick description\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/velcro/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'velcro'\n gem.version = Velcro::VERSION\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix interaction step with generic username regex.\n"
},
{
"from": "human",
"value": "And(\"show me the page\") do\n save_and_open_page\nend\n\nGiven(/^I am on the sign in page$/) do\n visit new_user_session_path\nend\n\nWhen(/^I go to the homepage$/) do\n visit r... | ruby | chosen |
[
{
"from": "system",
"value": "Change gem version to 1.0.2\n"
},
{
"from": "human",
"value": "specifications = Gem::Specification.new do |spec| \n spec.name = \"central_notifications\"\n spec.version = \"1.0.1\"\n spec.author = \"Philippe Cantin\"\n spec.homepage = \"http://github.com/anoiaqu... | ruby | chosen |
[
{
"from": "system",
"value": "Add coverage on new behavior of FileChecksum\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../../../base\", __FILE__)\nrequire 'digest/md5'\nrequire 'digest/sha1'\n\nrequire 'vagrant/util/file_checksum'\n\ndescribe FileChecksum do\n include_context ... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirect to github page from root\n"
},
{
"from": "human",
"value": "require 'open-uri'\nrequire 'sinatra'\n\nget '/feed' do\n\turl = 'https://xkcd.com/rss.xml'\n\tmatch = /(<img.*? alt=\"(?<alt>.*?)\".*?>)/\n\treplace = \"\\n\\\\0\\n<p>alt-text: \\\... | ruby | chosen |
[
{
"from": "system",
"value": "Set username / email on server side\n"
},
{
"from": "human",
"value": "User.class_eval do\n attr_accessible :system, :inmate_number\n\n def new(params)\n Rails.logger.debug('in new')\n super\n end\n\n\n def inmate_number\n if actor and actor.profile\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in task that marks deleted future events as drafts\n"
},
{
"from": "human",
"value": "module GobiertoPeople\n class AgendasIntegration\n\n def self.sync_all_agendas\n Site.with_agendas_integration_enabled.each do |site|\n site.people.with_syn... | ruby | chosen |
[
{
"from": "system",
"value": "Disable a spree social override\n"
},
{
"from": "human",
"value": "if Rails.application.railties.all.map(&:railtie_name).include? \"spree_social\"\n\n Deface::Override.new(:virtual_path => \"spree/user_registrations/new\",\n :name => \"add_soc... | ruby | chosen |
[
{
"from": "system",
"value": "Add Gosu to gemspec. Add myself to authors.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'nyan/version'\n\nGem::Specification.new do |spec|\n spec.na... | ruby | chosen |
[
{
"from": "human",
"value": "Add heurisitcs script for reference. [admin]\n"
},
{
"from": "gpt",
"value": " def guess_color_availability\n return false unless @output.tty?\n case ENV[\"TERM\"]\n when /term(?:-color)?\\z/, \"screen\"\n true\n else\n return tru... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing packages for SoftLayer image\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: cloudstack\n# Recipe:: install_cloustack\n#\n# Copyright 2012 Ryan J. Geyer\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use th... | ruby | chosen |
[
{
"from": "human",
"value": "Add solution to ruby file\n"
},
{
"from": "gpt",
"value": "first_name = \"Liz\"\nlast_name = \"Roche\"\nage = 26\ndescribe 'first_name' do\n it \"is defined as a local variable\" do\n expect(defined?(first_name)).to eq 'local-variable'\n end\n\n it \"is a Strin... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test for forum_params in Admin::ForumsController\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Forem::Admin::ForumsController do\n let(:user) { FactoryGirl.create(:user, forem_admin: true) }\n\n before do\n controller.stub current_user... | ruby | chosen |
[
{
"from": "system",
"value": "Make homepage GitHub repo, so gem information is easily accessible\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire 'resqutils/version'\n\nGem::Specification.new do |s|\n s.name = \"resquti... | ruby | chosen |
[
{
"from": "system",
"value": "Make test results more compact.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'tempfile'\n\ndef show_errors(name,type,errors)\n if errors.match /\\S/\n puts \"Differences found in #{type} test for #{name}: -reference, +ours\"\n puts errors... | ruby | chosen |
[
{
"from": "system",
"value": "Change spec to not instance eval frozen objects\n\n* Some objects will throw an exception when #instance_eval is\n called on them.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nshared_examples 'IceNine::Freezer::NoFreeze.deep_freeze' do\n before do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug introduced in previous commit (again)\n"
},
{
"from": "human",
"value": "require_relative \"../../../helper\"\nrequire_relative \"../../../db_helper\"\n\ndescribe ConceptQL::DataModel::Omopv4Plus do\n describe \"#related_concept_ids\" do\n let(:dm) do\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.