conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Raise railties dependency to be compatible with Rails 5\n\nSigned-off-by: Clemens Gruber <dda41f46a19317797d2fa2442dc67d1578f8ace9@gmail.com>\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/font-awesome-rails/version', ... | ruby | chosen |
[
{
"from": "system",
"value": "Make Dumper more like Handler in how it wraps around a pointer.\n"
},
{
"from": "human",
"value": "require 'pcap/ffi'\n\nrequire 'ffi'\n\nmodule FFI\n module PCap\n class Dumper < FFI::MemoryPointer\n\n def self.open(path)\n end\n\n def tell\n ... | ruby | chosen |
[
{
"from": "system",
"value": "INF-941: Add check if remore is cloned\n"
},
{
"from": "human",
"value": "require 'securerandom'\nrequire 'erb'\n\nmodule Skyed\n # This module encapsulates all the Git features.\n module Git\n class << self\n def clone_stack_remote(stack, options)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor DSL to use attr_reader instead of defining a method\n"
},
{
"from": "human",
"value": "module Spinach\n # Spinach DSL aims to provide an easy way to define steps and other domain\n # specific actions into your feature classes\n #\n module DSL\n\n # D... | ruby | chosen |
[
{
"from": "system",
"value": "Allow patch for updating products\n"
},
{
"from": "human",
"value": "module SolidusMailchimpSync\n class ProductSynchronizer < BaseSynchronizer\n self.serializer_class_name = \"::SolidusMailchimpSync::ProductSerializer\"\n self.synced_attributes = %w{name des... | ruby | chosen |
[
{
"from": "system",
"value": "Add data about winning index sets to Board\n"
},
{
"from": "human",
"value": "require \"tic_tac_toe/version\"\n\nmodule TicTacToe\n\n class Game\n\n def initialize display\n end\n\n def start\n end\n\n end\n\n class Board\n\n def initialize\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor: Replace data clump with class (in EditCommand)\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'markdo/commands/inbox_command'\n\nmodule Markdo\n describe EditCommand do\n it 'edits the Markdo root in your preferred editor' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use shoulda to test achievement validations and its associations.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Course::Achievement, type: :model do\n it { is_expected.to have_many :conditions }\n\n let!(:instance) { create(:instance)... | ruby | chosen |
[
{
"from": "human",
"value": "Test to check you can access pages when not signed in\n"
},
{
"from": "gpt",
"value": "require \"rails_helper\"\n\nfeature \"Public access to pages\", type: :feature do\n scenario \"visitor can access the home page and datasets\" do\n\n visit root_path\n\n exp... | ruby | chosen |
[
{
"from": "system",
"value": "Set default environment vars to run recorded tests without config\n\nAlso fixes the 1.8.7 killing syntax that was exploding Travis CI.\n"
},
{
"from": "human",
"value": "shared_context \"integration\" do\n let :api do\n Bigcommerce::Api.new({\n store_url: E... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning message on DumbResponder\n\nSigned-off-by: José Valim <0c2436ea76ed86e37cc05f66dea18d48ef390882@gmail.com>"
},
{
"from": "human",
"value": "module InheritedResources\n # = Dumb Responder\n #\n # This responder discards all messages sent to him.\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set a sensible limit to the allowed_children_cache column (esp important for DB/2). Fixes GH-309."
},
{
"from": "human",
"value": "class AddAllowedChildrenCacheToPages < ActiveRecord::Migration\n def self.up\n add_column :pages, :allowed_children_cache, :string,... | ruby | chosen |
[
{
"from": "human",
"value": "Set up replica identity index for Pseudonym\n\nrefs FOO-1171\nflag=none\n\ntest plan:\n - migration works up and down\n - tests pass\n\nChange-Id: I523528da85d0e3170e7b9d32b9e0a011987ae5d8\nReviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260533\nTested-by: Service Clo... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up CSV construction in specs\n"
},
{
"from": "human",
"value": "describe BulkProcessor::RowChunker::Boundary do\n it_behaves_like 'a role', 'RowChunker'\n\n describe '#ranges_for' do\n subject do\n BulkProcessor::RowChunker::Boundary.new(2, boundary_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for removed select2 on Solidus 2.3+\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe \"Store promotion rule\", js: true do\n stub_authorization!\n\n let!(:store) { create(:store, name: \"Real fake doors\") }\n let!(:promotion) { crea... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the need for a comment by rewording test\n"
},
{
"from": "human",
"value": "require \"test_helper\"\nrequire \"support/web_mocking\"\n\nclass WoeidTest < ActionDispatch::IntegrationTest\n include WebMocking\n\n it \"returns a hard 404 error if woeid is not ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency 'thor', 'milkode', 'github_api'\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mygithub/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Drop TLS support for now\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n"
},
{
"from": "human",
"value": "class Fluentd\n module Setting\n class InForward\n include Fluentd::Setting::Plugin\n\n register_plugi... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependency on rspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'i18n-hygiene'\n s.version = '0.0.0.pre'\n s.license = 'MIT'\n s.summary = \"\"\n s.description = \"Provides rake tasks to help maintain translations... | ruby | chosen |
[
{
"from": "system",
"value": "Load current_network in an ApplicationController before_filter\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n include HoptoadNotifier::Catcher\n filter_parameter_logging :password, :password_confirmation, :credit_card_num... | ruby | chosen |
[
{
"from": "system",
"value": "Update other regexes to work\n"
},
{
"from": "human",
"value": "module MarkdownHelper\n \n # Initializes a Markdown parser\n @@markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(filter_html: true), autolink: true, tables: true)\n \n def re... | ruby | chosen |
[
{
"from": "system",
"value": "Change of show-config recipe to point at new chef-server.rb\n"
},
{
"from": "human",
"value": "#\n# Author:: Adam Jacob (<adam@opscode.com>)\n# Copyright:: Copyright (c) 2012 Opscode, Inc.\n#\n# All Rights Reserved\n#\n\nif File.exists?(\"/etc/opscode/private-chef.r... | ruby | chosen |
[
{
"from": "human",
"value": "Add adapter class to get data from server\n\nParsing will be a separate class.\n"
},
{
"from": "gpt",
"value": "class SightingAdapter\n class << self\n HOST = ENV['API_URL']\n PATH = '/biomap/sightings'\n\n def all\n conn = Faraday.new(url: HOST)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a settings action to print .rusic file"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'pathname'\nrequire 'filewatcher'\n\nmodule Rusic\n class CLI < Thor\n desc \"new NAME\", \"Create a new Rusic theme\"\n def new(name)\n Rusic::Generators... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"jekyll joins the future\"\n\nThis reverts commit 19b7d2a77a425456425f6aa04e6c3aba02e81785.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'jekyll_prism'\n s.version = '0.0.3'\n s.date = Time.now.strftime(\"%... | ruby | chosen |
[
{
"from": "system",
"value": "Update Git to version 1.8.0\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: git\n# Attributes:: source\n#\n# Copyright (C) 2012 Mathias Lafeldt <mathias.lafeldt@gmail.com>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flash message in users controller, it should be fetched in block, otherwise message is fetched while loading controller, before any locales are loaded.\n"
},
{
"from": "human",
"value": "class UsersController < Spree::BaseController\n resource_controller\n\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Set rack env to dev by default\n"
},
{
"from": "human",
"value": "$LOAD_PATH << File.dirname(__FILE__)\n\nrequire 'bundler/setup'\nrequire 'yaml'\nrequire 'mongoid'\nrequire 'mongoid-pagination'\n\nrequire 'app/models/restaurant'\nrequire 'lib/restaurant_presenter'\... | ruby | chosen |
[
{
"from": "system",
"value": "Validate project Ido ID, store issue_type, provide url.\n"
},
{
"from": "human",
"value": "module IssueTrackers\n class CloudfujiTracker < ::IssueTracker\n Label = \"cloudfuji\"\n Fields = [\n [:project_id, {\n :label => \"Project Ido ID\",\... | ruby | chosen |
[
{
"from": "system",
"value": "Update UI build to fix path to node\n"
},
{
"from": "human",
"value": "name \"loom-ui\"\ndefault_version \"develop\"\n\ndependency \"nodejs\"\n\nsource :git => \"git://github.com/continuuity/loom.git\"\nrelative_path 'ui'\n\nbuild do\n command \"mkdir -p #{install_... | ruby | chosen |
[
{
"from": "system",
"value": "Make comments unnecessary by making Tokenizer's API more expressive\n"
},
{
"from": "human",
"value": "require 'forwardable'\nclass Calculator\n def add(*numbers)\n numbers.flatten.inject(0, &:+)\n end\n\n def subtract(*numbers)\n numbers.inject(numbers.shi... | ruby | chosen |
[
{
"from": "system",
"value": "Use double quotes instead of single quotes.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"yaml\"\n\nmodule HowIs\n HOME_CONFIG = File.join(Dir.home, '.config', 'how_is', 'config.yml')\n\n # Usage:\n # HowIs::Config\n # .... | ruby | chosen |
[
{
"from": "system",
"value": "Add klarnasliceit and klarnapaylater constants in Mollie::Methods\n"
},
{
"from": "human",
"value": "module Mollie\n class Method < Base\n BANCONTACT = 'bancontact'.freeze\n BANKTRANSFER = 'banktransfer'.freeze\n BELFIUS = 'belfius'.freeze\n B... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak the cron job for the nagios heartbeat\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: wt_monitoring\n# Recipe:: email_heartbeat\n#\n# Copyright 2012, Webtrends\n#\n# All rights reserved - Do Not Redistribute\n#\n# This recipe is used to send a heartbea... | ruby | chosen |
[
{
"from": "system",
"value": "Switch from get.docker.io over to apt.dockerproject.org\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: docker\n# Recipe:: default\n#\n# Copyright 2015, Travis CI GmbH\n#\n# MIT License\n#\n\ninclude_recipe 'apt'\ninclude_recipe 'travis_build_environment'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add two more Scala versions we pre-download\n\nPeople seem to be testing against them\n"
},
{
"from": "human",
"value": "# 5 minutes to install sbt's own dependencies under ~/.sbt/boot. MK.\ndefault[:sbt][:boot][:timeout] = 300\n\ndefault[:sbt][:scala][:versions] ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"require version file to make spec pass\"\n\nThis reverts commit 72ac8df5f937803c6668a87f39a6bb4b18509072.\n"
},
{
"from": "human",
"value": "require \"sidekiq/testing\"\n\nrequire \"rspec/sidekiq/configuration\"\nrequire \"rspec/sidekiq/matchers\"\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Knapsack when running engine RSpec tests\n"
},
{
"from": "human",
"value": "namespace :openfoodnetwork do\n namespace :specs do\n namespace :engines do\n def detect_engine_paths\n Pathname(\"engines/\").children.select(&:directory?)\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Improve unefficient regexp in Webtail::Stdin\n"
},
{
"from": "human",
"value": "module Webtail\n module Stdin\n extend self\n\n ENTITY_MAP = {\n \"<\" => \"<\",\n \">\" => \">\",\n }\n\n def run\n STDIN.each do |line|\n line ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migrating recent activities for news, keys were not being updated\n\nrefs #1046\n"
},
{
"from": "human",
"value": "NEWS_ID = 0\nNEWS_TITLE = 1\nNEWS_TEXT = 2\nNEWS_SPACE_ID = 3\nNEWS_CREATED_AT = 4\nNEWS_UPDATED_AT = 5\n\nclass MigrateNewsToPosts < ActiveRecord:... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate meeting stances to 'yes'\n"
},
{
"from": "gpt",
"value": "class UpdateMeetingScores < ActiveRecord::Migration[5.1]\n def change\n StanceChoice.joins(:poll)\n .where(\"polls.poll_type\": :meeting)\n .where(score: 1)\n .update_all(score: 2)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add an message about only using this for testing (for now)."
},
{
"from": "human",
"value": "#\n# Author:: Panagiotis Papadomitsos (<pj@ezgr.net>)\n# Author:: Noah Kantrowitz <noah@coderanger.net>\n#\n# Copyright 2013-2014, Panagiotis Papadomitsos\n# Copyright 2014,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken test for payload_log_entry trimming\n\n[#92367008]\n"
},
{
"from": "human",
"value": "\nrequire 'spec_helper'\n\ndescribe ProjectStatusesTrimmer do\n before do\n Project.delete_all\n ProjectStatus.delete_all\n for i in (1..4) do\n create(:p... | ruby | chosen |
[
{
"from": "human",
"value": "Add class for casting a format to string\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n # Format data with type corresponding\n class TypeData\n def initialize(type, value)\n @type = type\n @value = value\n... | ruby | chosen |
[
{
"from": "system",
"value": "Reset sequences after running creates for Postgres.\n"
},
{
"from": "human",
"value": "module SeedScatter\n class Engine < ::Rails::Engine\n paths[\"db/seeds.rb\"] = Dir.glob(\"db/seeds/*.rb\")\n def load_seed\n paths[\"db/seeds.rb\"].each do |seed_file|... | ruby | chosen |
[
{
"from": "system",
"value": "TIB: Add logger info for tib_prefix\n"
},
{
"from": "human",
"value": "class Order\n def request_from_tib\n\n case config.order_prefix\n when 'PROD'\n tib_prefix = 0\n when 'STAGING'\n tib_prefix = 1\n when 'UNSTABLE'\n tib_prefix = 2\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Correct backend_id for statistics pages\"\n"
},
{
"from": "human",
"value": "namespace :backend_ids do\n task fix: :environment do\n affected_base_paths = %w(\n /government/statistics/announcements/farming-statistics-provisional-crop-areas-yields-a... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for not published post\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SearchTest < ActionDispatch::IntegrationTest\n setup do\n setup_groonga_database\n @current_site = create(:site)\n @other_site = create(:site)\n switch_d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug where camelization did not properly force first letter to be lowercase\n"
},
{
"from": "human",
"value": "module TimestampAPI\n module Utils\n def camelize(symbol)\n symbol.to_s.split('_').each_with_index.map{ |chunk, idx| idx == 0 ? chunk : chunk... | ruby | chosen |
[
{
"from": "human",
"value": "Cover rake tasks with tests\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire 'test_helper'\nclass CodeQualityHtmlReportsRakeTaskTest < ActiveSupport::TestCase\n\n setup do \n require 'rake'\n Rake::Task.define_task :environment\n Rail... | ruby | chosen |
[
{
"from": "system",
"value": "Test the full license report\n"
},
{
"from": "human",
"value": "require 'rubygems/test_case'\nrequire 'rubygems/comparator'\n\nclass TestSpecComparator < Gem::TestCase\n def setup\n super\n\n options = { keep_all: true, no_color: true }\n versions = ['0.0.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant attr_reader from Splitter::Weight\n\nThese attributes were already declared on the superclass\n"
},
{
"from": "human",
"value": "module Spree\n module Stock\n module Splitter\n class Weight < Spree::Stock::Splitter::Base\n attr_reade... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to describe syntax in tests\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TheCommunityFarmTest < Minitest::Test\n def test_that_it_has_a_version_number\n refute_nil ::TheCommunityFarm::VERSION\n end\n\n def test_it_does_something_use... | ruby | chosen |
[
{
"from": "human",
"value": "Add ruby review 1 again\n"
},
{
"from": "gpt",
"value": "# Create a Car Class from User Stories\n\n\n# I worked on this challenge [by myself, with: ].\n\n\n# 2. Pseudocode\n# -Create Car Class with attributes of model and color.\n# -Create method distance that accp... | ruby | chosen |
[
{
"from": "system",
"value": "Convert log message to format; fails on array, int, etc.\n"
},
{
"from": "human",
"value": "def log(msg, level = :info)\n if Sidekiq::Logging.logger\n Sidekiq::Logging.logger.send level, msg\n elsif Rails.logger\n Rails.logger.send level, msg\n else\n pu... | ruby | chosen |
[
{
"from": "system",
"value": "Use fully-qualified tap name in conflicts_with\n\nSigned-off-by: Muhammad Altaf <62c4feecf50ce9eaca6c8296bee7297f5ed184af@gmail.com>\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass CfCli < Formula\n homepage 'https://github.com/cloudfoundry/cli'\n he... | ruby | chosen |
[
{
"from": "system",
"value": "Support | as spaces and ? for unmappable characters."
},
{
"from": "human",
"value": "class Morse < Linkbot::Plugin\n\n Linkbot::Plugin.register('morse', self, {\n :message => {:regex => /\\A[\\s\\/\\.-]+\\z/i, :handler => :on_message}\n })\n\n def self.on_mes... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant methods from DocumentPolicy\n\nDocumentPolicy inherits from ApplicationPolicy where these methods are\nalready defined, so we can drop them.\n"
},
{
"from": "human",
"value": "class DocumentPolicy < ApplicationPolicy\n def index?\n gds_editor? |... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'uninitialized constant Unicorn' error"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nunless defined?(PhusionPassenger)\n # Unicorn self-process killer\n require 'unicorn/worker_killer'\n\n # Max memory... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Status header from response\n\ngov.uk sends this header, but the Rack specification says\nthat it shouldn't be part of the response.\n"
},
{
"from": "human",
"value": "require 'rack/proxy'\nrequire 'uri'\n\nGOV_UK_URL = URI.parse('https://www.gov.uk')\n\nclas... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic acceptance test for event queries\n"
},
{
"from": "gpt",
"value": "require 'json'\nrequire 'time'\nrequire 'uri'\n\ntest_name \"validation of basic PuppetDB resource event queries\" do\n\n Log.notify \"Setting up manifest file\"\n manifest = <<MANIFEST\nn... | ruby | chosen |
[
{
"from": "system",
"value": "[gemspec] Fix specification warning, add cocoapods dependency"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"cocoapods-bugsnag\"\n spec.version = \"1.0.0\"\n spec.homepage = \"https://bugsnag.com\"\n spec.description = \"Config... | ruby | chosen |
[
{
"from": "system",
"value": "Allow overriding the default strategy\n"
},
{
"from": "human",
"value": "namespace :nexus do\n def strategy\n @strategy ||= Capistrano::Nexus.new(self, Capistrano::Nexus::DefaultStrategy)\n end\n\n desc 'Copy artifact contents to releases'\n task :create_rele... | ruby | chosen |
[
{
"from": "system",
"value": "Add logic to our customer dispatcher to catch 500 errors in addition to\n400 errors.\n"
},
{
"from": "human",
"value": "class CustomPublicExceptions < ActionDispatch::PublicExceptions\n def call(env)\n status = env[\"PATH_INFO\"][1..-1]\n if status == \"404\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use the proper namespace for MessageEvent\n"
},
{
"from": "human",
"value": "module Discordrb\n class MessageEvent\n attr_reader :message\n\n def initialize(message)\n @message = message\n end\n\n def author; @message.author; end\n def user; @me... | ruby | chosen |
[
{
"from": "system",
"value": "Add Provident User From Entering Blanks\n\nAdd validation to provident the User from entering blanks into the Reset\nPassword form because they should not be doing so. Also this will make\nthe site hard to use since they having if they do not enter a password\nthen they would h... | ruby | chosen |
[
{
"from": "system",
"value": "Make OperationError inherit from StandardError\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Panther\n module Operation\n class OperationError\n attr_reader :status\n\n def as_json(_options)\n metadata.merge(\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for custom params on the create retake method\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}/... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Force usage of Savon prior to 2.11.2\"\n\nThis reverts commit 3d653902f78c14788dc62e993da658f8f53f59a2.\n\nNow that we no longer need to support connect_with_credentials, we don't need to\nmonkeypatch Savon, thus we can work on newer versions as well, yay!\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Update RSpec to version 2.0.1\n"
},
{
"from": "human",
"value": "gem 'rspec-rails', '>= 2.0.0.beta.22', :group => [:development, :test]\n\nstategies << lambda do\n generate 'rspec:install'\n \n spec_helper_path = 'spec/spec_helper.rb'\n \n gsub_file spec_help... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for browse controller\n"
},
{
"from": "gpt",
"value": "require_relative \"../test_helper\"\n\nclass BrowseControllerTest < ActionController::TestCase\n context \"GET index\" do\n should \"list all categories\" do\n content_api_has_root_sections([\"... | ruby | chosen |
[
{
"from": "system",
"value": "Update api query to maximum limit\n"
},
{
"from": "human",
"value": "require 'digest/md5'\n\nclass HeroesController < ApplicationController\n\n def index\n\n render \"heroes\"\n end\n\n def all\n url = 'https://gateway.marvel.com:443/v1/public/characters?or... | ruby | chosen |
[
{
"from": "system",
"value": "Add final changes to factorial solution\n"
},
{
"from": "human",
"value": "# Factorial\n\n# I worked on this challenge Bryan Munroe.\n\n# Your Solution Below\n\ndef factorial(number)\n n = 0\n x = 1\n if number == 0\n return 1\n else\n while number > n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Review: Fix duplicate papers, lower min length for ministry name\n"
},
{
"from": "human",
"value": "class ReviewController < ApplicationController\n def index\n end\n\n def papers\n @incomplete = {}\n Body.all.each do |b|\n @incomplete[b.state] = []\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use new EngineRouteCollection in controller\n"
},
{
"from": "human",
"value": "require 'lib/route_collection'\n\nmodule Roots\n class RoutesController < ActionController::Base\n layout false\n\n def routes\n @route_collection = RouteCollection.new(app_ro... | ruby | chosen |
[
{
"from": "system",
"value": "Allow authentication with X-API-TOKEN headder\n"
},
{
"from": "human",
"value": "module AuthenticationHelper\n PUBLIC_ROUTES = {\n 'POST' => [\n '/api/users',\n '/api/authenticate'\n ]\n }\n\n def authenticate_user\n if api_token.blank?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Declare id3tag gem as runtime dependency\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/scube/cli/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'scube-cli'\n s.version = Scube::CLI::VERSION.dup\n s.summary = '... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo so that created_by in Eventables is set correctly\n"
},
{
"from": "human",
"value": "class Eventable < ActiveRecord::Base\n\n self.abstract_class = true\n\n belongs_to :person, :dependent => :destroy\n belongs_to :created_by, :foreign_key => \"created_by... | ruby | chosen |
[
{
"from": "system",
"value": "Support for non standard input classes\n\nAvoids the exception when using an input class not defined in FormtasticBootstrap namespace.\r\n\r\nFor example, this error raises when using activeadmin-select2 gem with FormtasticBootstrap form builder."
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"etc\" as the default search path for control file\n"
},
{
"from": "human",
"value": "module Luban\n module Deployment\n module Packages\n class Monit\n class Installer < Luban::Deployment::Service::Installer\n include Configurator::Pat... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused methods in TreeNode\n"
},
{
"from": "human",
"value": "class TreeNode\n attr_reader :taxon, :children\n delegate :title, :base_path, :content_id, :parent_taxons, :parent_taxons=, to: :taxon\n attr_accessor :parent_node\n delegate :map, :each, to: :... | ruby | chosen |
[
{
"from": "system",
"value": "Add LICENSE and documenation files to the gem RDoc; Bump version to 1.1.6\n"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = \"scaffolding_extensions\"\n s.version = '1.1.5'\n s.author = \"Jeremy Evans\"\n s.email = \"code@jeremye... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deployment config when there are no migrations\n"
},
{
"from": "human",
"value": "namespace :doctrine do\n namespace :schema do\n desc \"Drop doctrine schema\"\n task :drop do\n on roles(:db) do\n symfony_console \"doct... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing LICENSE, README, and example files to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{revenant}\n s.version = \"0.0.2\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 1.3... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/csv_shaper/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Paul Springett\"]\n gem.email = [\"paul@spr... | ruby | chosen |
[
{
"from": "system",
"value": "Add date to Entry factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n sequence(:email) { |n| \"user-#{n}@example.com\" }\n\n factory :user do\n email\n password 'abc123'\n end\n\n factory :entry do\n user\n body 'Entry body'\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add the PG driver as an explicit dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/chrono_model/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Marcello Barnaba\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Devise as a dependency"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'devise/dummy_authenticable/version'\n\nGem::Specification.new do |spec|\n spec.name = 'd... | ruby | chosen |
[
{
"from": "system",
"value": "Remove text for license from podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NSData+TDTImageMIMEDetection\"\n s.version = \"0.1.0\"\n s.summary = \"Category on NSData to check if it represents PNG or JPEG... | ruby | chosen |
[
{
"from": "system",
"value": "Move SeekPagination out of Sequel::Dataset to Sequel, to keep it simple.\n"
},
{
"from": "human",
"value": "require 'sequel'\nrequire 'sequel/extensions/seek_pagination/version'\n\nmodule Sequel\n class Dataset\n module SeekPagination\n def seek_paginate(co... | ruby | chosen |
[
{
"from": "system",
"value": "Update type character replacement to be regular underscore\n"
},
{
"from": "human",
"value": "require 'sparkle_formation'\n\nclass SparkleFormation\n\n # Resources helper\n class Resources\n\n # Azure specific resources collection\n class Azure < Resources\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to update taxon URLs\n"
},
{
"from": "gpt",
"value": "namespace :taxonomy do\n desc \"fixup taxon URLs\"\n task fixup_taxon_urls: :environment do\n total = RemoteTaxons.new.search.search_response[\"total\"]\n taxon_ids = RemoteTaxons.new.search(... | ruby | chosen |
[
{
"from": "system",
"value": "Debug logging and multiple Yo attempts if sending fails.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: UTF-8\nrequire 'gmail'\nrequire 'yaml'\nrequire 'yo-ruby'\n\nclass KapachowYo\n\n CONFIG = begin\n YAML.load(File.open(\"config.yml... | ruby | chosen |
[
{
"from": "system",
"value": "Change Jekyll to a runtime dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"minimal-mistakes-jekyll\"\n spec.version = \"4.1.0\"\n spec.authors = [... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure ntpd and ntpdate are enabled\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe service('acpid') do\n\tit { should be_enabled }\nend\n\ndescribe service('crond') do\n it { should be_enabled }\nend\n\ndescribe service('auditd') do\n it {... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic spec test for mod_dir\n\nNote: No package test as it seems mod_dir is distributed _with_ the Apache package.\n"
},
{
"from": "gpt",
"value": "describe 'apache::mod::dir', :type => :class do\n let :pre_condition do\n 'include apache'\n end\n context \"... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we handle PE properly.\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\n\nhosts.each do |host|\n # Install Puppet\n install_package host, 'rubygems'\n on host, 'gem install puppet --no-ri --no-rdoc'\n on host, \"mkdir -p #{host['distmoduledir... | ruby | chosen |
[
{
"from": "system",
"value": "Fix module dependencies for acceptance tests\n"
},
{
"from": "human",
"value": "require 'voxpupuli/acceptance/spec_helper_acceptance'\n\nconfigure_beaker do |host|\n if fact_on(host, 'os.name') == 'CentOS'\n install_module_from_forge('puppetlabs-apt', '>= 4.1.0 ... | ruby | chosen |
[
{
"from": "system",
"value": "Add plausible? to performance script.\n"
},
{
"from": "human",
"value": "# Rubinius profiling.\n# Run with:\n# ruby -Xprofiler.full_report -Xprofiler.graph performance/rubinius.rb\n\nrequire 'rubinius/profiler'\nrequire_relative '../lib/phony'\n\ndef profile\n pr... | ruby | chosen |
[
{
"from": "system",
"value": "Add space between question and default in ask\n"
},
{
"from": "human",
"value": "module CLI\n def warn(message)\n STDERR.puts \"*\" * 50\n STDERR.puts \"Warning: #{message}\"\n STDERR.puts \"*\" * 50\n end\n\n def error(message)\n STDERR.puts \"*\" * ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.