conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix a typo in test helper\n"
},
{
"from": "human",
"value": "# Make double-sure the RAILS_ENV is set to test,\n# so fixtures are loaded to the right database\nsilence_warnings { RAILS_ENV = \"test\" }\n\nrequire 'test/unit'\nrequire 'active_support/test_case'\nrequi... | ruby | chosen |
[
{
"from": "system",
"value": "Update unitwise requirement to >= 1.0.4, < 2.3.0\n\nUpdates the requirements on [unitwise](https://github.com/joshwlewis/unitwise) to permit the latest version.\n- [Changelog](https://github.com/joshwlewis/unitwise/blob/master/CHANGELOG.md)\n- [Commits](https://github.com/joshw... | ruby | chosen |
[
{
"from": "system",
"value": "Move disable prefix check into the shopify_api namespace.\n\nThis module assumes access to methods that are defined by the\nShopifyAPI::Base class and is not a generic ActiveResource extension.\n"
},
{
"from": "human",
"value": "module DisablePrefixCheck\n extend A... | ruby | chosen |
[
{
"from": "system",
"value": "Add production branch to non encryptable branches names\n"
},
{
"from": "human",
"value": "module KnapsackPro\n module Crypto\n class BranchEncryptor\n NON_ENCRYPTABLE_BRANCHES = [\n 'master',\n 'main',\n 'develop',\n 'developmen... | ruby | chosen |
[
{
"from": "system",
"value": "Fix compatibility with pre-commit gem.\n"
},
{
"from": "human",
"value": "require 'pre-commit/checks/shell'\n\nmodule PreCommit\n module Checks\n class Checkstyle < Shell\n def call(staged_files)\n staged_files = staged_files.grep(/\\.java$/)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update nfs client test for redhat\n"
},
{
"from": "human",
"value": "require_relative \"../../../../base\"\n\ndescribe \"VagrantPlugins::GuestRedHat::Cap:NFSClient\" do\n let(:caps) do\n VagrantPlugins::GuestRedHat::Plugin\n .components\n .guest_capabi... | ruby | chosen |
[
{
"from": "system",
"value": "Format value for datetime input\n"
},
{
"from": "human",
"value": "module SimpleForm\n module Inputs\n class DateTimeInput < Base\n def input\n #@builder.send(:\"#{input_type}_select\", attribute_name, input_options, input_html_options)\n html... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for organizations commands.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::Organizations do\n let(:format) { {'format' => 'table'} }\n let(:user) { 'peter-murach' }\n let(:org) { 'github'... | ruby | chosen |
[
{
"from": "system",
"value": "Change tests to reflect changes.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\nRSpec.describe FiniteMachine::Event, '#next_transition' do\n let(:object) { described_class }\n\n subject(:event) { object.new(machine, name: :test) }... | ruby | chosen |
[
{
"from": "system",
"value": "Increase time travelled to avoid intermittent test failures\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"login timeout\", type: :request, csrf: false do\n let(:user_attributes) do\n {\n first_name: \"System\",\n last_na... | ruby | chosen |
[
{
"from": "system",
"value": "Use S3 bucket specified by ENV\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'json'\n\nclass SiteBanner < ApplicationRecord\n include Rails.application.routes.url_helpers\n has_one_attached :logo\n has_one_attached :background_image\n belongs_to... | ruby | chosen |
[
{
"from": "system",
"value": "Install libcurl4-openssl-dev as part of networking_basic\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: debian_basic\n# Recipe:: default\n#\n# Copyright 2010, fredz\n#\n# All rights reserved - Do Not Redistribute\n#\n\npackages = [\n 'lsof',\n 'iptables',... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to drop `smiles` table\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass DropSmilesTable < ActiveRecord::Migration[6.1]\n def up\n drop_table :smiles\n end\n\n def down\n raise ActiveRecord::IrreversibleMigration\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Add a Ginger scenario to verify the notifier works with Rails 2.3.5\n"
},
{
"from": "human",
"value": "require 'ginger'\n\ndef create_scenario(version)\n scenario = Ginger::Scenario.new\n scenario[/^active_?support$/] = version\n scenario[/^active_?record$/] ... | ruby | chosen |
[
{
"from": "system",
"value": "Add next_link attribute to ArmrestCollection\n\nKeep track of the link from the ArmrestCollection attribute so that it\nis available for use outside of this class without needing to re-parse\nthe json_response again.\n"
},
{
"from": "human",
"value": "# Custom array... | ruby | chosen |
[
{
"from": "system",
"value": "Remove json require from the websocket example\n"
},
{
"from": "human",
"value": "#!ruby -I ../../lib -I lib\nrequire 'frankie'\nrequire 'json'\nrequire 'faye/websocket'\n\n#\n# Open localhost:9000/public/index.html in the browser\n#\n\nFaye::WebSocket.load_adapter(... | ruby | chosen |
[
{
"from": "system",
"value": "Set poltergeist as default javascript driver\n"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start 'rails'\n\nENV['RAILS_ENV'] = 'test'\n\nrequire File.expand_path('../../config/environment', __FILE__)\n\nrequire 'rails/test_help'\nrequire 'minites... | ruby | chosen |
[
{
"from": "system",
"value": "Update formula to version 4.4.1\n"
},
{
"from": "human",
"value": "class Bartycrouch < Formula\n desc \"Incrementally update/translate your Strings files\"\n homepage \"https://github.com/Flinesoft/BartyCrouch\"\n url \"https://github.com/Flinesoft/BartyCrouch.gi... | ruby | chosen |
[
{
"from": "system",
"value": "Use .fetch for extracting values from hash\n\nAlso check for unknown keys more lazily. This speeds initialization up\nby ~3x. :heart: @AMHOL\n"
},
{
"from": "human",
"value": "module ROM\n class Repository\n # @api private\n class StructAttributes < Module\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use tmp path for file storage\n"
},
{
"from": "human",
"value": "module ArchivedAttributes\n module Backends\n \n class Filesystem \n\n # Saves content and returns unique hash\n def save(content, archived_attribute)\n path = path_from(archiv... | ruby | chosen |
[
{
"from": "system",
"value": "Update Version11 Class for hosts and host_path\n\nUpdate the Version11 class to include the hosts method and host_path.\n"
},
{
"from": "human",
"value": "module ManageEngine\n module AppManager\n module Api\n class Version11\n attr_reader :connect_p... | ruby | chosen |
[
{
"from": "system",
"value": "Move validation logic from app\n"
},
{
"from": "human",
"value": "module MsfModels::ActiveRecordModels::ApiKey\n def self.included(base)\n base.class_eval{\n include Msf::DBManager::DBSave\n }\n end\nend\n"
},
{
"from": "gpt",
"value": "modu... | ruby | chosen |
[
{
"from": "system",
"value": "Update header format to match new spec\n\nCloses #8.\n"
},
{
"from": "human",
"value": "module RailsServerTimings\n module ControllerRuntime\n def process_action(*args)\n callback = lambda do |*_|\n event = ActiveSupport::Notifications::Event.new(*_)... | ruby | chosen |
[
{
"from": "system",
"value": "Change wording of Rinda Ring server start.\n"
},
{
"from": "human",
"value": "# ring_server.rb\nrequire 'rinda/ring'\nrequire 'rinda/tuplespace'\n\nDRb.start_service\n\nRinda::RingServer.new(Rinda::TupleSpace.new)\nputs \"Ringer Server listening for connections...\\... | ruby | chosen |
[
{
"from": "system",
"value": "server: Enable eager loading for lib/data_import directory\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails'\n# Pick the frameworks you want:\nrequire 'active_model/railtie'\nrequire 'active_job/railtie'\nrequire 'ac... | ruby | chosen |
[
{
"from": "system",
"value": "Change table name: Books -> Pages\n"
},
{
"from": "human",
"value": "class Init\n FILE_NAME = 'epub-search.db'\n def initialize(db_dir)\n @db_dir = Pathname.new(db_dir)\n @db_file = @db_dir + FILE_NAME\n end\n\n def run\n $stderr.puts \"create database ... | ruby | chosen |
[
{
"from": "system",
"value": "Use ::ArJdbc::MsSQL::Column to do datatype conversion\n"
},
{
"from": "human",
"value": "module ::ArJdbc\n module SybaseJtds\n def arel2_visitors\n require 'arel/visitors/sybase_jtds'\n {'sybase_jtds' => ::Arel::Visitors::SybaseJtds}\n end\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix comment after transfering code to separate module\n"
},
{
"from": "human",
"value": "module HydraAttribute\n module Model\n module Cache\n extend ActiveSupport::Concern\n\n included do\n nested_cache_keys :model\n end\n\n module Cl... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Change `rake` to runtime dependency and add a version.\"\n\nThis reverts commit ec50f88fa50651bb8be7405b2599e4f04557e5f7.\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'sidekiq-runner/version'\n\nGem::Specificat... | ruby | chosen |
[
{
"from": "human",
"value": "Add export script for Tampermonkey\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'base64'\n\nabort \"Usage: #{$0} <exported JSON file>\" if ARGV.count < 1\n\nfile = ARGV.first\nabort \"JSON file does not exist: #{file}\" unless File.... | ruby | chosen |
[
{
"from": "system",
"value": "Make click button less ambiguous, use new RSpec expectation syntax,\n\nand Ruby 1.9 hash syntax.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\nfeature 'profile settings' do\n given(:expected_flash) {\n I18n.t('flas... | ruby | chosen |
[
{
"from": "system",
"value": "Delete old local modules first\n"
},
{
"from": "human",
"value": "task :deps do\n mkdir_p 'local_modules'\n cp_r '../domain', 'local_modules/domain'\n sh 'npm install'\nend\n\ntask build: :deps do\n sh %w[inkscape\n --export-width 16 --export-height 16\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a basic Ball class.\n"
},
{
"from": "gpt",
"value": "class Ball\n\tattr_accessor :x, :y, :radius, :dx, :dy\n\n\tdef initialize(x, y, radius, dx, dy)\n\t\tsetPosition(x, y);\n\t\t@radius = radius\n\t\t@dx = dx\n\t\t@dy = dy\n\tend\n\n\tdef setPosition(x, y)\n\t\t@... | ruby | chosen |
[
{
"from": "system",
"value": "Allow net connections for the performance/integration test.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'ripple'\nrequire 'benchmark'\n\nmodule Riik\n\n class RiikDocument; include Riik::Document; property :number; end\n class RippleDocument;... | ruby | chosen |
[
{
"from": "system",
"value": "Use .capture3 not .popen3 for external parsers\n\nIn my testing, I believe this will fix the frequent timeouts we've seen\nhappen on specific files.\n\nLike other issues we'd been seeing, these were actually\nnon-deterministic, they just happened to *almost* always fail. But I ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch everything over to @output_buffer rather than _buf\"\ngit st\n\"\n"
},
{
"from": "human",
"value": "# RailsXss\nmodule RailsXss\n class Erubis < ::Erubis::Eruby\n def add_preamble(src)\n src << \"@output_buffer = _buf = ActionView::SafeBuffer.new;\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix defining display money method\n"
},
{
"from": "human",
"value": "module RdsMoney\n extend ActiveSupport::Concern\n\n def display_money(amount)\n \"#{currency}#{display_amount(amount)}\"\n end\n\n def display_amount(amount)\n amount ||= 0\n sprintf \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix mime type selection for jasper printers\n"
},
{
"from": "human",
"value": "# Adds new renderers for the internal template system\n# Adds renderers for all formats\nEkylibre::Reporting.formats.each do |format|\n ActionController::Renderers.add(format) do |object... | ruby | chosen |
[
{
"from": "system",
"value": "Load seeds in migration; remove contact pages when rolling back the migration\n"
},
{
"from": "human",
"value": "class CreateInquiries < ActiveRecord::Migration\n def self.up\n unless ::Inquiry.table_exists?\n create_table ::Inquiry.table_name, :force => tr... | ruby | chosen |
[
{
"from": "system",
"value": "Rollback of last commit, can't just remove valid, will work it out properly later"
},
{
"from": "human",
"value": "module Pxpay\n # The return notification from Payment Express \n class Notification\n require 'nokogiri'\n attr_accessor :response\n # Creat... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the Apt cache is updated.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: openvpn\n# Recipe:: install\n#\n# Copyright 2014, Xhost Australia\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for :head option\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nRSpec.describe TTY::ProgressBar, ':head' do\n let(:output) { StringIO.new('', 'w+')}\n\n it \"animates head\" do\n progress = TTY::ProgressBar.new(\"[:bar]\", output: output, head: '... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Logger class: make the methods static\n"
},
{
"from": "human",
"value": "module RubyVoluum\n class Logger\n def initialize(path = nil)\n @path = File.exist?(path.to_s) ? path : nil\n end\n\n def log(response, request, result)\n request_date =... | ruby | chosen |
[
{
"from": "system",
"value": "Improve behaviour when git command is not found\n"
},
{
"from": "human",
"value": "load File.expand_path(\"../tasks/rsync_scm.rake\", __FILE__)\n\nrequire 'capistrano/scm'\nrequire 'tmpdir'\n\n\nclass Capistrano::RsyncScm < Capistrano::SCM\n VERSION = \"0.0.1\"\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add simple description to exception \n\nAdd description to NotSupportedByDriverError exception to help tracking during debugging"
},
{
"from": "human",
"value": "class Capybara::Driver::Base\n def current_url\n raise NotImplementedError\n end\n\n def visit(pat... | ruby | chosen |
[
{
"from": "system",
"value": "Allow receiving calls without CSRF token\n"
},
{
"from": "human",
"value": "# Controller to handle General Document actions\nclass GeneralDocumentsController < ApplicationController\n def create\n begin\n created_object = persist_in_collection(params[:colle... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to modify marriage_abroad_services.yml\n\nI plan to use this script as I extract services from the templates.\n"
},
{
"from": "gpt",
"value": "country = ARGV.shift\nsex_of_partner = ARGV.shift\nresidency = ARGV.shift\npartner_nationality = ARGV.shift\nserv... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated methods from IdentityMap\n"
},
{
"from": "human",
"value": "module DataMapper\n\n # Tracks objects to help ensure that each object gets loaded only once.\n # See: http://www.martinfowler.com/eaaCatalog/identityMap.html\n class IdentityMap < Hash... | ruby | chosen |
[
{
"from": "human",
"value": "Add additional index for slight performance increase.\n"
},
{
"from": "gpt",
"value": "class AddAccountsIndex < ActiveRecord::Migration\n def self.up\n add_index 'accounts',['company_id'], {:name => 'accounts_company_idx'}\n end\n\n def self.down\n remove_in... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"fix name of missing translation exception\"\n\nThis reverts commit 7b274e010e8607e6e5a553e5a21b9761de74ae2b.\n"
},
{
"from": "human",
"value": "require \"i18n\"\n\nmodule I18n\n module Backend\n class MongoDB\n include Base, Flatten\n \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add composed attribute family_name to SwissMatch::Address\n\nAdds a #family_name method to the SwissMatch::Address appending\nthe maiden_name to the last_name if available. This is similar\nto the composed #street attribute.\n"
},
{
"from": "human",
"value": "# enco... | ruby | chosen |
[
{
"from": "system",
"value": "Swap statuses for /uptime and /cache\n\n/uptime doesn't need content, so it is the endpoint for 204\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'travis/support/logging'\nrequire 'sidekiq'\nrequire 'multi_json'\nrequire 'ipaddr'\nrequire 'metriks'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for default parameters\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'consular' do\n on_supported_os.each do |os, facts|\n context \"on #{os}\" do\n let(:facts) do\n facts\n end\n\n it { is_expected.to compi... | ruby | chosen |
[
{
"from": "system",
"value": "Update specs for newest signed_form.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe SignedForm::SimpleForm::FormBuilder do\n include ViewHelper\n\n before { SignedForm::HMAC.secret_key = \"abc123\" }\n after { SignedForm::HMAC.secret_key = ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Disable plugin test for Travis, need investigation\"\n\nThis reverts commit f4d7adf91a0ebd31b67e4837eae9e4ffad6be874.\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\nif ENV['TRAVIS']\n set :backend, :exec\nend\n\ndescribe 'vagrant Ansible role... | ruby | chosen |
[
{
"from": "system",
"value": "Use registry instead of stubbing the Lita.handlers.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Lita::Builder, lita: true do\n let(:robot) { instance_double(\"Lita::Robot\") }\n subject { plugin.new(robot) }\n\n describe \"#build_adapte... | ruby | chosen |
[
{
"from": "system",
"value": "Update Image specs to run with Swt backend\n"
},
{
"from": "human",
"value": "require 'shoes/spec_helper'\n\ndescribe Shoes::Image do\n describe \"basic\" do\n let(:parent) { double(\"parent\").as_null_object }\n subject { Shoes::Image.new(parent, \"../static... | ruby | chosen |
[
{
"from": "system",
"value": "Use Plek.current.external_url_for to get content-data\n\nPreviously I was using the wrong Plek call to get the URL\nfor content-data.\n\nThis commit corrects that.\n"
},
{
"from": "human",
"value": "module Admin::ContentDataRoutesHelper\n def content_data_base_url\... | ruby | chosen |
[
{
"from": "system",
"value": "Update capistrano lock version to 3.7.2\n"
},
{
"from": "human",
"value": "lock '3.7.1'\n\nset :application, 'evemonk'\nset :repo_url, 'git@github.com:biow0lf/evemonk.git'\n\nset :rbenv_type, :user\nset :rbenv_ruby, File.read('.ruby-version').strip\n\nset :linked_fi... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for event filtering within student school year modeling\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe StudentSchoolYearEvents, type: :model do\n let(:student) { FactoryGirl.create(:student) }\n\n let(:events) {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change root route to home page\n"
},
{
"from": "human",
"value": "Ideaegg::Application.routes.draw do\n get \"static_pages/home\"\n get \"notifications/index\"\n match '/auth/:provider/callback' => 'sessions#create', via: [:get, :post]\n delete '/log_out' => 'se... | ruby | chosen |
[
{
"from": "system",
"value": "Move definitions of default start and end years to methods\n\nWithout using methods, the default years did not get calculated\nwith the Timecop freeze in place, and tests were failing.\n"
},
{
"from": "human",
"value": "require 'smartdown/api/question'\n\nmodule Sma... | ruby | chosen |
[
{
"from": "system",
"value": "Fix GitLab detector to also detect the development version"
},
{
"from": "human",
"value": "\nmodule Versionator\n module Detector\n # Detects {GitLab}[http://gitlabhq.com].\n class Gitlab < Base\n set :app_name, \"GitLab\"\n set :project_url, \"htt... | ruby | chosen |
[
{
"from": "system",
"value": "Implement the step definitions in terms of the imaginary interface. Steps fail, so far.\n"
},
{
"from": "human",
"value": "Given /^the key stream \"(.*)\"$/ do |key_stream|\nend\n\nWhen /^I decode the string \"(.*)\"$/ do |encoded_string|\nend\n\nThen /^it should p... | ruby | chosen |
[
{
"from": "human",
"value": "Add Adyen Credit Card Gateway factory\n"
},
{
"from": "gpt",
"value": "FactoryGirl.define do\n factory :spree_gateway_adyen_credit_card,\n aliases: [:adyen_cc_gateway],\n class: \"Spree::Gateway::AdyenCreditCard\" do\n name \"Adyen Credit Card\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for clashing class variables without inheritable attributes"
},
{
"from": "human",
"value": "class TestModel\n include Formotion::Formable\n\n attr_accessor :my_name, :my_number\n\n form_property :my_name, :string, title: \"My Name\"\n form_property :my... | ruby | chosen |
[
{
"from": "system",
"value": "Make time easier to read"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Task::Comments::Cloned do\n let(:task) { create(:task) }\n let(:cloned_task) { create(:task, name: 'Original Task') }\n let(:user) { create(:user, first_name: 'Generic', ... | ruby | chosen |
[
{
"from": "system",
"value": "Add seed data for examples\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:seed command (or created alongside the database wit... | ruby | chosen |
[
{
"from": "system",
"value": "Clear old Cards and AdminUsers before seeding the db\n"
},
{
"from": "human",
"value": "CardTemplate.delete_all\n\ntemplate_list = [\n {\n greeting: \"Sorry you feel that way\",\n image_file: \"sorry_template_0.1.svg\"\n },\n {\n greeting: \"There's no r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong path of FIXTURES_FOLDER\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'minitest/rg'\nrequire 'yaml'\nrequire 'vcr'\nrequire 'webmock'\nrequire_relative '../lib/organization.rb'\n\nFIXTURES_FOLDER = 'spec/fixtures'\nCASSETTES_FOLDER... | ruby | chosen |
[
{
"from": "system",
"value": "Change to switch off coverage\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nif ENV['COVERAGE'] || ENV['TRAVIS']\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([\n SimpleCov::Formatter::H... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing spec for delete\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"spec\"\nrequire File.dirname(__FILE__) + \"/../lib/rack/test\"\n\nrequire File.dirname(__FILE__) + \"/fake_app\"\n\ndescribe \"any #verb methods\", :shared => true do\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Allow :focused w/o the '=> true'"
},
{
"from": "human",
"value": "require 'simplecov'\nSimpleCov.start\n\nrequire 'rspec'\n\nDir[File.join(File.dirname(__FILE__), '..', 'lib', 'ruby-progressbar.rb')].each {|f| require f}\nDir[File.join(File.dirname(__FILE__), '..', ... | ruby | chosen |
[
{
"from": "system",
"value": "Debug information for debugging what\"s going on at runcoderun\n"
},
{
"from": "human",
"value": "# Inspiration gained from Thinking Sphinx's test suite.\n# Pat Allan is a genius.\n\nclass TestHelper\n attr_accessor :host, :username, :password\n attr_reader :pat... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"rails logging added for workers debugging\"\n\nThis reverts commit 6668dc45ddb31e48fd047d3fb645c4ddf47f64e8.\n"
},
{
"from": "human",
"value": "# Load the Rails application.\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the Rails app... | ruby | chosen |
[
{
"from": "system",
"value": "Make lives returned in API visible only\n"
},
{
"from": "human",
"value": "class Api::V1::LivesController < Api::V1::ApplicationController\n\n def index\n @lives = Live.order_by_date\n end\n\n def show\n @live = Live.includes(:songs).find(params[:id])\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix set_uid to avoid blank uid attribute\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoCommon\n class CustomField < ApplicationRecord\n belongs_to :site\n has_many :records, dependent: :destroy, class_name: \"CustomFieldRe... | ruby | chosen |
[
{
"from": "system",
"value": "Make debugging include channel id"
},
{
"from": "human",
"value": "def anger_check(event_channel, event_timestamp)\n\tif $current_unstable.has_key?(event_channel.id.to_s)\n\t\tdebug(3, \"[ANGERCHECK] Channel has a monster in it.\")\n\t\tif $current_unstable[event_ch... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Ditched the class method. Now using extends\"\n\nThis reverts commit c2c4ac3eed09b29fdeb18d403fbb7fb8cea3ab88.\n"
},
{
"from": "human",
"value": "module Coldshoulder\n module Display\n\n def message(message)\n puts message\n end\n\n end\n ext... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to initialize `Aws::EC2::Resource` using `Aws::EC2::Client`\n"
},
{
"from": "human",
"value": "require 'aws-sdk'\n\nmodule Ec2ssh\n class Ec2Instances\n attr_reader :ec2s, :aws_keys\n\n def initialize(aws_keys, regions)\n @aws_keys = aws_keys\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove user_registration_forms.token value from Slack notification\n"
},
{
"from": "human",
"value": "module Admin\n class UserRegistrationFormsController < AdminController\n before_action -> { require_scope('write:user_registration_forms') }\n\n permits :act... | ruby | chosen |
[
{
"from": "system",
"value": "Connect to DigitalOcean instead of AWS"
},
{
"from": "human",
"value": "require 'fog'\n\nmodule FuckingScriptsDigitalOcean\n class Connection\n MissingAWSCredentials = Class.new(StandardError)\n\n def initialize(opts)\n @opts = opts\n\n if ENV[\"DIG... | ruby | chosen |
[
{
"from": "system",
"value": "[Sass] Convert Sass::Tree::MixinNode docs to YARD.\n"
},
{
"from": "human",
"value": "require 'sass/tree/node'\n\nmodule Sass::Tree\n class MixinNode < Node\n def initialize(name, args, options)\n @name = name\n @args = args\n super(options)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct error with '~', remove it\n\nSigned-off-by: Gustavo Toshi Komura <4cad6e13d165ce6dbdcf3458fc5cbc27ddef2a34@gmail.com>\n"
},
{
"from": "human",
"value": "module Gemtranslatetoenglish\n class Translatetoenglish\n\n def translate( phrase)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix restarting of search service in rake data::restore and data::fetch.\n\nPreviously these assumed you were using acts_as_solr. Now it restarts\nappropriately based on the current SearchEngine.\n"
},
{
"from": "human",
"value": "namespace :data do\n task :prepare ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove upper bound for Rails gems\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\nrequire \"active_resource/version\"\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\... | ruby | chosen |
[
{
"from": "human",
"value": "Add module for overriding some ANSIColor behaviour.\n\nExporting VAGRANT_CUCUMBER_FORCE_COLOR or VAGRANT_CUCUMBER_FORCE_COLOUR\nin the environment will force ANSI colouring in Cucumber.\n"
},
{
"from": "gpt",
"value": "require 'cucumber/term/ansicolor'\n\nFORCE_COLOU... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper for rails 4+\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'alertify/rails/version'\n\nGem::Specification.new do |gem|\n gem.name... | ruby | chosen |
[
{
"from": "system",
"value": "Fix YAML not found error, updated ruby 2.0 to 2.1.5\n"
},
{
"from": "human",
"value": "require \"active_support/all\"\n\nmodule Writer\n class Configuration\n attr_accessor :template_path, :date_format, :attributes,\n :log_level, :logger, :namer, :creator\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add sort down to name if needed\n"
},
{
"from": "human",
"value": "class Scenario < ActiveRecord::Base\n\n def long_name\n \"#{season}-#{\"%02d\" % scenario_number}: #{name}\"\n end\n\n\n def <=>(scenario)\n sorted = self.season <=> scenario.season\n if ... | ruby | chosen |
[
{
"from": "system",
"value": "Tidy up and run more of the code when disabling things.\n"
},
{
"from": "human",
"value": "module SparkleMotion\n module Simulation\n # Task to sweep through various hues on one or more bridges.\n class SweeperTask < TickTask\n attr_accessor :command_que... | ruby | chosen |
[
{
"from": "system",
"value": "Add alias from message to signm\n"
},
{
"from": "human",
"value": "class SignalException < Exception\n def initialize(message, signo)\n super(message)\n @signo = signo\n end\n\n def signo\n @signo\n end\nend\n\nclass Interrupt < SignalException\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Use jalalidate v0.3.3 and bump version\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"jekyll-jalali\"\n spec.version = \"0.1.0\"\n spec.authors = [\"Mehdi Sadeghi\"]\n spec.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use the log_type\n"
},
{
"from": "human",
"value": "class DisclaimerInfo\n attr_accessor :log_id,\n :log_label_arr,\n :log_start_page_index_arr,\n :log_level_arr,\n :purl, :catalogue_arr,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a single group to the seed file.\n\nThis will be helpful in testing the database.\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix restaurant seeding factory call\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:seed command (or created alongside the dat... | ruby | chosen |
[
{
"from": "human",
"value": "Create Seed File for Testing\n"
},
{
"from": "gpt",
"value": "#Create Admin For the Site\nUser.create(email:'nzeplowitz@gmail.com', name: 'admin', access: 'admin')\n\n#Create 5 Students\n5.times do\n User.create(email: Faker::Internet.email, name: Faker::Name.name)\... | ruby | chosen |
[
{
"from": "system",
"value": "Configure to use new chef server.\n"
},
{
"from": "human",
"value": "require 'librarian/chef/integration/knife'\n\nchef_server_url 'http://192.168.1.65:4000' # chef server url\nnode_name `whoami`.chomp # your client name\ncl... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to rspec expect syntax in AuthorizationHelpers.\n\nThis stub syntax brings up deprecation warnings in rspec 3.0. Spree\nstill operates on 2.14, but we use the auth helpers in an rspec 3\nproject.\n\nThe expect syntax is compatible with version of rspec newer than 2.11\n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert removal of second arg in autoload\n"
},
{
"from": "human",
"value": "require \"arrow_payments/version\"\nrequire \"arrow_payments/errors\"\n\nmodule ArrowPayments\n autoload :Address\n autoload :Client\n autoload :Configuration\n autoload :Connection\n a... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.