conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove to_json from toolbar data as it's not needed\n\nAfter https://github.com/ManageIQ/manageiq-ui-classic/pull/5997 `to_json` is not needed and will break the data format.\n\nRelated to https://github.com/ManageIQ/manageiq-ui-classic/pull/6289 fix\n"
},
{
"from": "hu... | ruby | chosen |
[
{
"from": "system",
"value": "Add transpec as a development dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"akami/version\"\n\nGem::Specification.new do |s|\n s.name = \"akami\"\n s.version = Akami::V... | ruby | chosen |
[
{
"from": "system",
"value": "Move builder.build! into before(:all) block for MOBI\n\n[#52758883]\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Polytexnic::Builders::Mobi do\n context \"in valid TeX directory\" do\n before(:all) do\n if `which kindlegen` == ''\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add factory for gds_editor User\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user do\n sequence(:uid) { |n| \"uid-#{n}\"}\n sequence(:name) { |n| \"Joe Bloggs #{n}\" }\n sequence(:email) { |n| \"joe#{n}@bloggs.com\" }\n if defined?(G... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dependencies in acceptance tests\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'freeradius::mod' do\n context 'when running puppet code' do\n pp = <<-EOF\n class { 'freeradius': }\n freeradius::mod { 'perl':\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for untaints and taint queries\n\nThey're not particularly thorough, but they sound pretty enterprise."
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire File.expand_path(\"../../lib/taint_aliases\", __FILE__)\n\nmodule TaintAliasesSpec\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Use camelCase in JBuilder output\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "# Load the Rails application.\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the Rails ap... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to nobble the brain\n"
},
{
"from": "gpt",
"value": "namespace :after_party do\n desc 'Deployment task: update_the_brain'\n task update_the_brain: :environment do\n puts \"Running deploy task 'update_the_brain'\"\n\n # Put your task implementati... | ruby | chosen |
[
{
"from": "system",
"value": "Replace method_missing with explicit methods\n\nReplace the use of method_missing in Onfido::API with explicit methods\nfor each resource. This allows users to create verifying doubles in\nrspec tests, as well as making it clearer what methods are available on\nthe class.\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Add newline in logger message\n"
},
{
"from": "human",
"value": "require \"rottendesk/version\"\n\nrequire 'rottendesk/helpers/class'\nrequire 'rottendesk/helpers/hash'\n\nrequire 'rottendesk/models/dirty'\nrequire 'rottendesk/models/model'\nrequire 'rottendesk/mode... | ruby | chosen |
[
{
"from": "system",
"value": "Use dynamic method definition in User\n"
},
{
"from": "human",
"value": "module C2y\n class DSL::Context::User\n attr_reader :result\n\n def initialize(name, &block)\n @result = OpenStruct.new(\n name: name\n )\n\n instance_eval(&block)\... | ruby | chosen |
[
{
"from": "human",
"value": "Add queue latency for Sidekiq jobs in NR\n"
},
{
"from": "gpt",
"value": "class NewRelicQueueLatencyLogger\n def call(worker, job, queue)\n queue_latency = Time.now.utc - Time.at(job[\"enqueued_at\"], in: \"+00:00\")\n ::NewRelic::Agent.add_custom_attributes({... | ruby | chosen |
[
{
"from": "system",
"value": "Raise a NameError if a resource can not be found\n"
},
{
"from": "human",
"value": "module JSONAPI\n module ResourceFor\n def self.included base\n base.extend ClassMethods\n end\n\n module ClassMethods\n # :nocov:\n if RUBY_VERSION >= '2.0'\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix resource cloning deprecation warnings\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n#\n# Cookbook Name:: rabbitmq\n# Recipe:: cluster\n#\n# Author: Sunggun Yu <sunggun.dev@gmail.com>\n# Copyright (C) 2015 Sunggun Yu\n#\n# Licensed under the A... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the DNF workaround since Chef supports DNF now\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: openvpn\n# Recipe:: install\n#\n# Copyright:: 2014, Xhost Australia\n#\n# Licensed... | ruby | chosen |
[
{
"from": "system",
"value": "Add json endpoint for users\n"
},
{
"from": "human",
"value": "class Users::ProfilesController < Devise::SessionsController\n# before_filter :configure_sign_in_params, only: [:create]\n\n def show\n @user = User.find(params[:id])\n render :'devise/profiles/sh... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused executables line in gemspec\n"
},
{
"from": "human",
"value": "lib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'aptly/version'\n\nGem::Specification.new do |s|\n files = Dir.glob... | ruby | chosen |
[
{
"from": "system",
"value": "Use get_ prefix as per changes in serverspec\n"
},
{
"from": "human",
"value": "module Serverspec::Type\n class User < Base\n def exists?\n @runner.check_user_exists(@name)\n end\n\n def belongs_to_group?(group)\n @runner.check_user_belongs_to_gr... | ruby | chosen |
[
{
"from": "system",
"value": "Set default timestamp in handle, not key\n"
},
{
"from": "human",
"value": "require 'date'\n\nmodule Bluecap\n class Event\n def clean_name(name)\n name.strip.downcase.gsub(/[^a-z0-9]/, '.')\n end\n\n def date(timestamp)\n Time.at(timestamp).strf... | ruby | chosen |
[
{
"from": "system",
"value": "Modify expected block input + add TranslationHelper for content_tag\n"
},
{
"from": "human",
"value": "require 'cortex/snippets/webpage'\nrequire 'addressable/uri'\n\nmodule Cortex\n module Snippets\n class Client\n def initialize(cortex_client)\n @c... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"need to parse out preferences before adding/removing favorites\"\n\nThis reverts commit 4b8ecce1c2f19662e7c96f6272ad90482e4f89b2.\n"
},
{
"from": "human",
"value": "\nclass NilClass\n def method_missing(name, *args, &block)\n end\nend\n\nclass Sequel::Mod... | ruby | chosen |
[
{
"from": "system",
"value": "Remove references to unecessary Integer and Float (in the DM1 case).\n"
},
{
"from": "human",
"value": "module DataMapper::Salesforce\n module Property\n end\nend\n\nrequire 'dm-salesforce/property/serial'\nrequire 'dm-salesforce/property/boolean'\nrequire 'dm-sal... | ruby | chosen |
[
{
"from": "system",
"value": "Use non dev versions for Refinery's extension dependencies.\n"
},
{
"from": "human",
"value": "# Encoding: UTF-8\nrequire 'date'\n\nGem::Specification.new do |s|\n s.name = %q{refinerycms-inquiries}\n s.version = %q{2.1.0.dev}\n s.date ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Sinatra as a run time dependency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.name = 'memdash'\n gem.version = '0.0.1'\n\n gem.authors = ['Brian Ryckbost', 'Steve Richert']\n gem.email = ['bryckbo... | ruby | chosen |
[
{
"from": "system",
"value": "Use amount, not cost, to compute a shipment in default tax calculator\n"
},
{
"from": "human",
"value": "require_dependency 'spree/calculator'\n\nmodule Spree\n class Calculator::DefaultTax < Calculator\n def self.description\n Spree.t(:default_tax)\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Add id to created users\n"
},
{
"from": "human",
"value": "class FakeServer\n include DeboxServer::App\nend\n\ndef server\n @server ||= DeboxServer::Core.new\nend\n\ndef create_user(opt={ })\n email = opt[:email] || 'test@indeos.es'\n password = opt[:password] |... | ruby | chosen |
[
{
"from": "system",
"value": "Replace implicit SQL literal in filter method.\n\nSequel 4.46 deprecated implicitly treating strings in filter methods as\nSQL literals, and encourages explicitly using Sequel.lit.\n\nhttps://github.com/jeremyevans/sequel/blob/master/CHANGELOG#L237\n"
},
{
"from": "huma... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary filtering on historical obs"
},
{
"from": "human",
"value": "require_dependency \"renalware/pathology\"\n\nmodule Renalware\n module Pathology\n class ViewHistoricalObservations\n def initialize(patient, descriptions: RelevantObservationD... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for the orphean tag on html_tag_helper\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\ninclude Nanoc::Toolbox::Helpers::HtmlTag\n\ndescribe Nanoc::Toolbox::Helpers::HtmlTag do\n describe \"#tag\" do\n it \"returns an simple self-closing tag ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow unordered lists with four-space indentation\n\nBy default, Markdown lint expects unordered lists to be indented using\ntwo spaces, but all lists here already use four:\n<https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md#md007---unordered-list-indentat... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for integer nodes\n\nSomehow this spec file was missed\n"
},
{
"from": "gpt",
"value": "require \"minitest_helper\"\n\nmodule Hermod\n describe XmlSection do\n\n IntegerXml = XmlSection.build do |builder|\n builder.integer_node :day_of_the_week, ra... | ruby | chosen |
[
{
"from": "system",
"value": "Return back inspect for datetime type cast\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActiveRecord\n module ConnectionAdapters\n module Clickhouse\n module OID # :nodoc:\n class DateTime < Type::DateTime # :nodoc:\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Patch ProxyPacRb to disallow use of proxypac on file system (for security)\n"
},
{
"from": "human",
"value": "# patch to correct utf8 string wrongly encoded as ASCII-8BIT\n# tested on linux with ruby 2.2.7-p470\nmodule ProxyPacRb\n # Encodes strings as UTF-8\n mod... | ruby | chosen |
[
{
"from": "human",
"value": "Send POST data and cookies with Sentry\n"
},
{
"from": "gpt",
"value": "Raven.configure do |config|\n config.processors -= [Raven::Processor::PostData] # Send POST data\n config.processors -= [Raven::Processor::Cookies] # Send cookies\n\n config.sanitize_fields =... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Travis to pass upload test\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Dir\n def self.tmpdir\n OpenWebslides.config.tmpdir.to_s\n end\nend\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nunless R... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage and remove development dependency 'rake-compiler'\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'whitesimilarity/version'\n\nGem::Specific... | ruby | chosen |
[
{
"from": "system",
"value": "Set the default number of threads\n"
},
{
"from": "human",
"value": "port ENV['PORT'] || 3000\nenvironment ENV['RAILS_ENV'] || 'development'\n"
},
{
"from": "gpt",
"value": "port ENV['PORT'] || 3000\nenvironment ENV['RAILS_ENV'] || 'development'\nthreads... | ruby | chosen |
[
{
"from": "system",
"value": "Add cascade to foreign key\n"
},
{
"from": "human",
"value": "class AddDailyMenus < ActiveRecord::Migration[5.1]\n def change\n create_table :daily_menus do |t|\n t.datetime :date, null: false\n t.string :content, null: false\n t.references :resta... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple specs around boxen::osx_defaults\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'boxen::osx_defaults' do\n let(:title) { 'example' }\n let(:domain) { 'com.example' }\n let(:key) { 'testkey' }\n let(:value) { 'yes' }\n\n let(:p... | ruby | chosen |
[
{
"from": "system",
"value": "Add User Helper Spec File\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\n# Specs in this file have access to a helper object that includes\n# the UsersHelper. For example:\n#\n# describe UsersHelper do\n# describe \"string concat\" do\n# it \"con... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure English localization is working.\n\nA common mistake for translators is to forget to change the YAML file's\nroot key from en to their own locale (as people tend to use the English\nfile as template for a new translation).\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Send POST with connection key as HTTP basic auth password when enabled\n"
},
{
"from": "human",
"value": "module Cangaroo\n module Webhook\n class Client\n include HTTParty\n\n format :json\n\n attr_accessor :connection, :path\n\n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Put back code commented out\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Helper class to set Opengraph meta-tags for use with Comfy CMS @cms_page's\nclass ComfyOpengraph\n include Rails.application.routes.url_helpers\n\n attr_accessor :map... | ruby | chosen |
[
{
"from": "system",
"value": "Add a require statement so that the vagrant-winrm-syncedfolders plugin is loaded\n\nThis will force the `vagrant-winrm-syncedfolders` plugin to be loaded."
},
{
"from": "human",
"value": "require \"pathname\"\n\nrequire \"vagrant-managed-servers/plugin\"\n\nmodule V... | ruby | chosen |
[
{
"from": "system",
"value": "Convert relation to array to be able to use sum\n"
},
{
"from": "human",
"value": "module OpenFoodNetwork\n class UserBalanceCalculator\n def initialize(email, distributor)\n @email = email\n @distributor = distributor\n end\n\n def balance\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add default value for crontab\n"
},
{
"from": "human",
"value": "# Librato username\nset :librato_username, false\n\n# Librato token\nset :librato_token, false\n\n# htpasswd user\nset :htpasswd_user, \"admin.#{fetch(:application)}\"\n\n# htpasswd password\nset :h... | ruby | chosen |
[
{
"from": "system",
"value": "Make cap task db2local more robust and verbose\n\n- \"--password=\" instead of \"-p \" for compatibility with different mysql versions\n- log all locally executed commands\n"
},
{
"from": "human",
"value": "desc 'Copy database from the server to your local database'... | ruby | chosen |
[
{
"from": "human",
"value": "Add Art History role with OIV dock attribute\n"
},
{
"from": "gpt",
"value": "name \"osx-ah\"\ndescription \"This role is specific to machines require the software loadset for the Center for the Arts\"\n\n # Include the classlab role, which contains the base... | ruby | chosen |
[
{
"from": "system",
"value": "Fix parsing and decoding of UTF-16 layer name.\n"
},
{
"from": "human",
"value": "require_relative '../layer_info'\n\nclass PSD\n class UnicodeName < LayerInfo\n @key = 'luni'\n\n def parse\n pos = @file.tell\n len = @file.read_int * 2\n @data ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for create thread keepalive\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# :reek:NilCheck\n\nmodule RubyRabbitmqJanus\n module Models\n # Add method for Janus Instance model\n module Methods\n extend ActiveSupport::Concern... | ruby | chosen |
[
{
"from": "system",
"value": "Add example of nullable options to Types::Relay::BaseConnection\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GraphQL\n module Types\n module Relay\n # Use this to implement Relay connections, or take it as inspiration\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify Lint/UselessComparison to use NodePattern\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Lint\n # This cop checks for comparison of something with itself.\n #\n # @example\n #\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependency on json-schema\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'csv_to_popolo/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add chef-spec for configuire_ruby recipe\n"
},
{
"from": "gpt",
"value": "require_relative '../spec_helper'\n\ndescribe 'backup_restore::configure_ruby' do\n let(:chef_run) do\n runner = ChefSpec::Runner.new(\n cookbook_path: %w(site-cookbooks cookbooks),\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Insert the files and codes\n"
},
{
"from": "human",
"value": "# Good Guess\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below\n"
},
{
"from": "gpt",
"value": "# Good Guess\n\n# I worked on this challenge Abe and Brian.\ndef g... | ruby | chosen |
[
{
"from": "system",
"value": "Move back cancan only as a dev dependency"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"pulitzer/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 12.3 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Expand $SETTINGS or ~/.bosh_inception path before using\n"
},
{
"from": "human",
"value": "require \"settingslogic\"\n\nmodule Bosh::Inception::CliHelpers\n module Settings\n # The base directory for holding the manifest settings file\n # and private keys\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the RSpec context method.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'helpers/examples'\n\nrequire 'yard-parameters/parameter_handler'\nrequire 'yard-parameters/legacy/parameter_handler'\n\ndescribe \"ParameterHandler\" do\n include Helpe... | ruby | chosen |
[
{
"from": "system",
"value": "Use Base instead of NamedBase.\n"
},
{
"from": "human",
"value": "class AnonymousUserGenerator < Rails::Generators::NamedBase\n source_root File.expand_path('../templates', __FILE__)\n include Rails::Generators::Migration\n \n def files\n class_collisions 'An... | ruby | chosen |
[
{
"from": "human",
"value": "Add test to assert errors are raised when returend by service\n"
},
{
"from": "gpt",
"value": "describe 'Error' do\n\n it 'raises returned errors' do\n\n http_client = double(MessageBird::HttpClient)\n client = MessageBird::Client.new('', http_client)\n\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Enable Ruby warnings during spec suite\n"
},
{
"from": "human",
"value": "class ExampleSuite\n def run\n run_core_examples\n run_rspec_examples\n run_test_unit_examples\n end\n\n def run_core_examples\n system(\"ruby #{dir}/core_spec_suite.rb #{spec_o... | ruby | chosen |
[
{
"from": "system",
"value": "Add dotenv as a development dependency\n\nSigned-off-by: Aymeric Brisse <a462d6a602eb500679b027b39ff035d803cbe1e9@perfect-memory.com>"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_P... | ruby | chosen |
[
{
"from": "system",
"value": "Use git existing files to build gem files manifest\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.require_paths = ['lib']\n s.rubygems_version = '1.3.7'\n s.name = 'tiny_tds'\n s.summary = 'TinyTDS - A mo... | ruby | chosen |
[
{
"from": "human",
"value": "Add container spec from lux.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe BootstrapHamlHelpers::Scaffolding::Container do\n let(:content) { 'content' }\n subject { BootstrapHamlHelpers::Scaffolding::Container.new(content) }\n\n context 'given... | ruby | chosen |
[
{
"from": "system",
"value": "Apply JRuby loading logic to rbx as well\n"
},
{
"from": "human",
"value": "if !defined?(RUBY_ENGINE) || RUBY_ENGINE == \"ruby\"\n begin\n if RUBY_VERSION =~ /1.8/\n require '1.8/ffi_c'\n elsif RUBY_VERSION =~ /1.9/\n require '1.9/ffi_c'\n else\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add a new HP provider.\n"
},
{
"from": "human",
"value": "module Fog\n\n def self.providers\n @providers ||= []\n end\n\nend\n\nrequire 'fog/providers/aws'\nrequire 'fog/providers/bluebox'\nrequire 'fog/providers/brightbox'\nrequire 'fog/providers/dnsimple'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Use configure block to setup defaults\n"
},
{
"from": "human",
"value": "require 'pagelime'\nrequire 'rack/pagelime'\n"
},
{
"from": "gpt",
"value": "require_relative 'pagelime'\nrequire_relative 'pagelime/s3_client'\nrequire_relative 'pagelime/xml_proce... | ruby | chosen |
[
{
"from": "system",
"value": "Add check for the word export in .env\n"
},
{
"from": "human",
"value": "# imports contents of .env file into ENV\nfile = File.expand_path(\"../../.env\", __FILE__)\nif File.exists?(file)\n File.read(file).split(\"\\n\").map {|x| x.split(\"=\") }.each do |k,v|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use exists? to test for presence of a role.\n"
},
{
"from": "human",
"value": "module Royce\n module Methods\n\n # Called when module included in a class\n # includer == User\n # includer.class == Class\n def self.included includer\n # With instanc... | ruby | chosen |
[
{
"from": "system",
"value": "Add SimpleCov for development dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/test/page/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jarmo Pertman\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task to titleize existing data\n"
},
{
"from": "human",
"value": "namespace :metro do\n desc \"Import metro data from go-metro.com\"\n task import: :environment do\n Metro::Importer.new(logger: Logger.new(STDOUT)).import!\n end\nend\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Remove some duplication in steps\n\nStubbing the content store again in these steps isn't needed.\n"
},
{
"from": "human",
"value": "Given(/^a collection of documents exist$/) do\n content_store_has_mosw_reports_finder\n stub_rummager_api_request\nend\n\nThen(/^I ... | ruby | chosen |
[
{
"from": "system",
"value": "Add capybara dependencies to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'pagelapse/version'\n\nGem::Specification.new do |spec|\n spec.name... | ruby | chosen |
[
{
"from": "system",
"value": "Fix project name in comments in project file\n"
},
{
"from": "human",
"value": "name \"ansible-dk\"\nmaintainer \"OmniTI\"\nhomepage \"https://github.com/omniti-labs/ansible-dk\"\n\n# Defaults to C:/ansibledk on Windows\n# and /opt/ansibledk on all other platforms\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set default task of Maven2 builder to 'test'\n\n\ngit-svn-id: 6b26ca77393dff49db3326cae3426b51e4e94954@65 65aa75ef-ce15-0410-bc34-cdc86d5f77e6\n"
},
{
"from": "human",
"value": "class Cerberus::Builder::Maven2\n attr_reader :output\n\n def initialize(config)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change arg from binding to bound\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nclass HTMLRendererTest < Minitest::Test\n def setup\n @template = File.expand_path('helper_files/simple.html.erb', File.dirname(__FILE__))\n end\n\n def test_... | ruby | chosen |
[
{
"from": "system",
"value": "Allow activesupport 5.x in dependencies\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'lib')\nrequire 'upcoming/version'\n\nGem::Specification.new do |s|\n s.name = 'upcoming'\n s.version = Upcoming::VERSION\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update specs: use factory instead of magic numbers in TaskUser spec.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe TaskUser do\n before(:each) do\n @valid_attributes = {\n :user_id => 1,\n :task_id => 1,\n :unread => false,\... | ruby | chosen |
[
{
"from": "system",
"value": "Add CORS headers to API endpoints\n"
},
{
"from": "human",
"value": "module Api::V1\n class BaseControllerV1 < ApplicationController\n\n respond_to :json\n \n end\nend"
},
{
"from": "gpt",
"value": "module Api::V1\n class BaseControllerV1 < Appl... | ruby | chosen |
[
{
"from": "system",
"value": "Enable authorization in Report API\n\n[#114840697]\n"
},
{
"from": "human",
"value": "class API::V1::ReportsController < API::APIController\n rescue_from Pundit::NotAuthorizedError, with: :pundit_user_not_authorized\n\n def pundit_user_not_authorized(exception)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Load todos for course students in course homepage\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass Course::CoursesController < Course::Controller\n include Course::ActivityFeedsConcern\n\n def index # :nodoc:\n @courses = Course.publicly_... | ruby | chosen |
[
{
"from": "system",
"value": "Add info messages to s3 site\n\n"
},
{
"from": "human",
"value": "require_relative 'output/stylesheet'\nrequire_relative 'output/index'\nrequire_relative 'output/media'\nrequire_relative 'output/page'\nrequire_relative 'remote/html_file'\nrequire_relative 'remote/st... | ruby | chosen |
[
{
"from": "system",
"value": "Fix include Enumerable to honor interface\n"
},
{
"from": "human",
"value": "module Restulicious\n class Collection\n include Enumerable\n include Attributes\n\n attr_accessor :collection_key\n def self.from_parser(klazz, collection_key, data)\n se... | ruby | chosen |
[
{
"from": "system",
"value": "Set value when val is not nil.\n\nBefore fixing it, we cannot set false with this condition\n"
},
{
"from": "human",
"value": "module Specinfra\n module Configuration\n class << self\n VALID_OPTIONS_KEYS = [\n :backend,\n :env,\n :path,... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak causal delivery test case.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bud'\nrequire 'test/unit'\nrequire 'delivery/causal'\n\nclass CausalAgent\n include Bud\n include CausalDelivery\nend\n\nclass TestCausalDelivery < Test::Unit::TestCas... | ruby | chosen |
[
{
"from": "system",
"value": "Add check to prevent unwanted block_type parameter\n"
},
{
"from": "human",
"value": "module Api\n module V1\n\n class Blocks < Grape::API\n\n resource :profiles do\n segment '/:profile_id' do\n resource :blocks do\n resource :pre... | ruby | chosen |
[
{
"from": "system",
"value": "Use be_within RSpec matcher to make spec example less brittle\n\nMongoid rounds Time objects to 3 decimal places. By using the be_within\nmatcher we can make this assertion less flakey.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Asse... | ruby | chosen |
[
{
"from": "system",
"value": "Drop unneeded begin/end and add more info to logging\n"
},
{
"from": "human",
"value": "require \"spreadsheet\"\nrequire \"stringio\"\nrequire \"tempfile\"\n\nclass Export\n attr_reader :error_message\n\n def initialize\n return unless block_given?\n\n begin... | ruby | chosen |
[
{
"from": "system",
"value": "Throw self to ground and GET me\n"
},
{
"from": "human",
"value": "class Wizard < BaseEntity\n attr_accessor :in_shoes\n\n def id\n :me\n end\n\n alias_method :current_location, :parent\n\n def describe\n <<-HTML\n I am Grumbles the lame Wizard! *fle... | ruby | chosen |
[
{
"from": "system",
"value": "Update OCaml recipe per spicyj suggestion.\n"
},
{
"from": "human",
"value": "require 'brewkit'\n\nclass ObjectiveCaml <Formula\n @url='http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.1.tar.bz2'\n @homepage='http://caml.inria.fr/ocaml/index.en.html'\n @md5... | ruby | chosen |
[
{
"from": "system",
"value": "Create a new rule: GROUP_MANAGE_GROUPS.\n"
},
{
"from": "human",
"value": "module Rules\n\n WATCHER = 'WATCHER'\n \n USER_MANAGE_STATUS = 'USER_MANAGE_STATUS'\n USER_CREATE_ACCOUNT = 'USER_CREATE_ACCOUNT'\n USER_DELETE_ACCOUNT = 'US... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing public header files\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ENVLicenseParser\"\n s.version = \"1.0.0\"\n s.summary = \"A parser for AAMVA license barcode formats\"\n s.homepage... | ruby | chosen |
[
{
"from": "human",
"value": "Create GPS week 5 file\n"
},
{
"from": "gpt",
"value": " items = \"carrots apples cereal pizza\"\n\ndef groceries(items)\n word_array = items.split(' ')\n grocery_list = Hash.new\n word_array.each do |item|\n grocery_list[item] = 1\n end\n # TODO: Update with... | ruby | chosen |
[
{
"from": "system",
"value": "Remove lower and greater than symbols from curl snippets when testing\n"
},
{
"from": "human",
"value": "require 'open3'\nrequire 'json'\nrequire_relative 'base_language_handler'\n\nmodule LanguageHandler\n class CurlLanguageHandler < BaseLanguageHandler\n priva... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec test to check flash message for Analysis Profile to be created\n"
},
{
"from": "human",
"value": "describe OpsController do\n describe '#ap_set_record_vars_set' do\n let(:scanitemset) { double }\n\n context 'missing description' do\n it 'sets sc... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to include a published_version column in gplan_nodes\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass AddPublishedVersionToGplanNodes < ActiveRecord::Migration[5.2]\n def change\n add_column :gplan_nodes, :published_version, :... | ruby | chosen |
[
{
"from": "system",
"value": "Edit executable settings in gemfile"
},
{
"from": "human",
"value": "$:.push(File.expand_path(\"../lib\", __FILE__))\nrequire 'veritrans/version'\n\nGem::Specification.new do |s|\n s.name = \"veritrans\"\n s.version = Veritrans::VERSION\n s.author = ... | ruby | chosen |
[
{
"from": "system",
"value": "Install anaconda as vagrant user\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: universe-ubuntu\n# Recipe:: default\n#\n# Copyright (c) 2016 The Authors, All Rights Reserved.\n\ninclude_recipe 'apt::default'\n\nif node['platform_version'] == '14.04'\n apt_... | ruby | chosen |
[
{
"from": "system",
"value": "Hide footer advert in forum threads.\n"
},
{
"from": "human",
"value": "Forem::TopicsController.class_eval do\n def show\n if find_topic\n register_view\n\n if user_signed_in? and (current_user.ninja_banned? or current_user.admin?)\n @posts = @t... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.