conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add first full stack integration spec\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\nrequire \"cf/interface\"\nrequire \"nats/client\"\nrequire \"socket\"\n\nmodule ::CF::Interface::NatsHelper\n def with_nats_thread\n nats_thread = Thread.new do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add locale validation to test suite\n"
},
{
"from": "gpt",
"value": "RSpec.describe \"locales files\" do\n it \"should meet all locale validation requirements\" do\n checker = RailsTranslationManager::LocaleChecker.new(\"config/locales/*/*.yml\")\n expect(chec... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for batches API\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'benchmark'\n\ndescribe Mongoid::Report do\n let(:klass) { Model }\n\n it 'aggregates fields by app in threads' do\n Report = Class.new do\n include Mongoid::Report\... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec URLs to the original repo.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'BinUtils'\n s.version = '0.1.1'\n s.summary = 'Swift functions to ease working with binary formats'\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for the Lights Policy Authorizer\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe LightsPolicyAuthorizer do\n describe 'class' do\n it 'lets trusted users create' do\n user = create :trusted_member\n expect(LightsPolicyAuth... | ruby | chosen |
[
{
"from": "system",
"value": "Update controller spec setup to pass new validations\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe IepDocumentsController, type: :controller do\n\n describe '#show' do\n\n def make_request(id)\n request.env['HTTPS'] = 'on'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Pattern instead of Match\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"out_forward\", stub: :daemon do\n before { login_with exists_user }\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make CookbookDeprecatedNotifier spec more explicit\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe CookbookDeprecatedNotifier do\n it 'sends emails to cookbook owner, collaborators and followers who want to receive emails' do\n cookbook = cr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove files option from gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"bookmarker/version\"\n\nGem::Specification.new do |s|\n s.name = \"bookmarker\"\n s.version = Bo... | ruby | chosen |
[
{
"from": "human",
"value": "Set the basic structure of Certificates specs\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule FirebaseIdToken\n describe Certificates do\n describe '#download' do\n it 'downloads public keys when it have not yet' do\n end\n\n it 'd... | ruby | chosen |
[
{
"from": "system",
"value": "Patch test to workaround odd newline error in output, not worth debugging now.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe InboundMailProcessor do\n subject { InboundMailProcessor }\n\n it \"should be on the inbound mail queue\" do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add controller specs for roasters. Tests passing.\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe RoastersController, type: :controller do\n describe 'GET #index' do\n it 'collects all roasters into @roasters' do\n roasters = [creat... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration helpers to be used to create sql views from file\n"
},
{
"from": "gpt",
"value": "ActiveRecord::Migration[5.0].class_eval do\n def view_sql(timestamp, view)\n File.read(Rails.root.join(\"db/views/#{view}/#{timestamp}.sql\"))\n end\n\n def function... | ruby | chosen |
[
{
"from": "human",
"value": "Add a cask for Trailer.app.\n\n * Install version 1.0.7\n"
},
{
"from": "gpt",
"value": "class Trailer < Cask\n url 'http://dev.housetrip.com/trailer/trailer107.zip'\n homepage 'http://dev.housetrip.com/trailer/'\n version '1.0.7'\n sha1 '880b14ce4d4e6299f767aa99... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement from ~> 0.86.0 to ~> 0.87.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/rubocop-hq/r... | ruby | chosen |
[
{
"from": "system",
"value": "Add some more info to the description.\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint Delirium.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn... | ruby | chosen |
[
{
"from": "system",
"value": "Use a custom .each method for User objects\n"
},
{
"from": "human",
"value": "module ChefAPI\n class Resource::User < Resource::Base\n collection_path '/users'\n\n schema do\n attribute :username, type: String, primary: true, required: true\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Declare cookbook dependencies for Chef 11\n\nThis appears to be necessary for attributes, libraries etc. to be loaded\nin the correct order in Chef 11.\n\nSee\nhttp://docs.opscode.com/breaking_changes_chef_11.html#non-recipe-file-evaluation-includes-dependencies\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem platform for only jruby workload\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/msgpack/rpc_over_http/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Narihiro Nakamura\"]\n gem... | ruby | chosen |
[
{
"from": "system",
"value": "Include the Klarna information inside the Payment row\n\nInclude missing deface override."
},
{
"from": "human",
"value": "Deface::Override.new(\n virtual_path: \"spree/admin/payments/_list\",\n insert_after: \"[data-hook='payments_row']\",\n name: \"add_klarna_i... | ruby | chosen |
[
{
"from": "system",
"value": "Replace unicode characters with blank\n"
},
{
"from": "human",
"value": "=begin\n This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.\n\n Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>\n\n Licensed under the Apache License, Ver... | ruby | chosen |
[
{
"from": "system",
"value": "Use a bit more strict detection for the ri2 pacman repository\n"
},
{
"from": "human",
"value": "directory File.dirname(self.repo_added)\nfile self.repo_added => [File.dirname(self.repo_added)] do |t|\n msys_path = RubyInstaller::Build.msys2_installation.msys_path\... | ruby | chosen |
[
{
"from": "system",
"value": "Add modes for associate and check_authentication in Sinatra plugin\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'rack/openid-provider'\n\nmodule Sinatra\n module OpenIDProvider\n \n module Helpers\n def oip_request; Rack::OpenIDRequ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean podspec for first release\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'Logmatic'\n spec.version = '0.1.2'\n spec.authors = 'Logmatic.io'\n spec.license = 'MIT'\n spec.homepage = 'http://logmatic.io'\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ruby 2.1 digest::digest warning\n"
},
{
"from": "human",
"value": "#\n# Rainforest Authenitcation\n#\n#\n# @author Russell Smith <russ@rainforestqa.com>\n# @copyright CLDRDR Inc, 2013\nrequire 'openssl'\nrequire 'json'\n\nclass RainforestAuth\n attr_reader :key... | ruby | chosen |
[
{
"from": "human",
"value": "Add new hero, new player: Carlos\n"
},
{
"from": "gpt",
"value": "# encoding: UTF-8\ndef h88\n {\n id: 88,\n name: 'Mom',\n personaje: 'falangista',\n jugador: 'Carlos Esteban',\n nivel: 1,\n cuerpo: 7,\n mente: ... | ruby | chosen |
[
{
"from": "system",
"value": "Document attrs, make internal method private\n"
},
{
"from": "human",
"value": "module GitHub\n class Ldap\n module MembershipValidators\n class Base\n attr_reader :ldap, :groups\n\n # Public: Instantiate new validator.\n #\n # -... | ruby | chosen |
[
{
"from": "system",
"value": "Add scope-like methods to ValidationResult\n"
},
{
"from": "human",
"value": "require 'standalone_validator/validation_result_builder'\nrequire 'hamster/list'\n\nclass StandaloneValidator\n class ValidationResult\n def self.build_for(object, &block)\n build... | ruby | chosen |
[
{
"from": "system",
"value": "Change \"type\" to \"org_type\". Ruby doesn't like using \"type\". [Story1503827]"
},
{
"from": "human",
"value": "class Organization\n\n include MongoMapper::Document\n include Renderable\n\n # == Attributes\n\n key :name, String\n key :acronym, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the URL for your API token\n"
},
{
"from": "human",
"value": "module Cucumber\n module Pro\n\n module Error\n AccessDenied = Class.new(StandardError) {\n def initialize\n super \"Access denied.\"\n end\n }\n\n MissingTok... | ruby | chosen |
[
{
"from": "system",
"value": "Add a method to make a LightBot join a server\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'discordrb/api'\nrequire 'discordrb/light/data'\n\n# This module contains classes to allow connections to bots without a connection to the gatew... | ruby | chosen |
[
{
"from": "system",
"value": "Load support for iTunes parsing\n"
},
{
"from": "human",
"value": "require 'user_agent/browsers/base'\nrequire 'user_agent/browsers/chrome'\nrequire 'user_agent/browsers/gecko'\nrequire 'user_agent/browsers/internet_explorer'\nrequire 'user_agent/browsers/opera'\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warnings on Ruby 2.7\n\nRuby 2.7 emits warnings when using `Proc.new` with no block. This\ncommit just converts the code to use `&block` to avoid the warning.\n"
},
{
"from": "human",
"value": "module WillPaginate::Deprecation\n class << self\n def warn(mes... | ruby | chosen |
[
{
"from": "system",
"value": "Fix initializer for new analytics ruby\n"
},
{
"from": "human",
"value": "if ENV['SEGMENT_API_KEY']\n Analytics.init({\n secret: ENV['SEGMENT_API_KEY']\n })\nelse\n class Analytics\n def self.track(options)\n puts \"Analytics.track user:#{options[:us... | ruby | chosen |
[
{
"from": "human",
"value": "Add clause if there is no fact networking"
},
{
"from": "gpt",
"value": "require 'ipaddr'\nFacter.add(:network_zone) do\n setcode do\n # Exit with 'none' if there is no networking fact\n return 'none' unless !Facter.value(:networking).nil?\n result = 'dmz'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add some specs for IssueDecorator\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe IssueDecorator do\nend"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe IssueDecorator do\n let(:model) { Issue.make!(promise_connecti... | ruby | chosen |
[
{
"from": "human",
"value": "Add labels api commands tests.\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe GithubCLI::Commands::Labels do\n let(:format) { 'table' }\n let(:user) { 'peter-murach' }\n let(:repo) { 'github_cli' }\n let(:name) { 'bu... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Hash.ruby2_keywords_hash? and Hash.ruby2_keywords_hash\n"
},
{
"from": "gpt",
"value": "require_relative '../../spec_helper'\nrequire_relative 'fixtures/classes'\n\nruby_version_is \"2.7\" do\n describe \"Hash.ruby2_keywords_hash?\" do\n it \"return... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error handling configuration path when configuration file doesn't exist\n\nfixes #73\n"
},
{
"from": "human",
"value": "module ActiveRecord::Turntable\n class Railtie < Rails::Railtie\n rake_tasks do\n require \"active_record/turntable/active_record_ext... | ruby | chosen |
[
{
"from": "system",
"value": "Fix naming of gem in gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'jmx_client/parser/version'\n\nGem::Specification.new do |gem|\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error determines tenant on QueryCache class.\n"
},
{
"from": "human",
"value": "require 'active_record/query_cache'\n\nmodule ActiveRecord\n class QueryCache\n\n class << self\n\n # Enable the query cache within the block if Active Record is configured.... | ruby | chosen |
[
{
"from": "system",
"value": "Add shorter timeout to calabash Key Results screen detection for faster failing tests\n"
},
{
"from": "human",
"value": "# Methods exclusive to the Key Results screen go here\nclass KeyResultsScreen < Base\n\n def trait\n \"ListView id:'keyres_list_key_results'\... | ruby | chosen |
[
{
"from": "human",
"value": "Add podspec and release 0.1 🍻\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = \"TagListView\"\n s.version = \"0.1\"\n s.summary = \"Simple but highly customizable iOS tag list view, in Swift.\"\n s.homepage = \"https://gith... | ruby | chosen |
[
{
"from": "human",
"value": "Add seed for redirect rule\n"
},
{
"from": "gpt",
"value": "after \"development:redirect_rules\" do\n site = Site.find_by!(name: \"site1\")\n\n site.redirect_rules.create!(\n request_path: \"/old-about\",\n destination: \"/about\"\n )\n site.redirect_rules... | ruby | chosen |
[
{
"from": "system",
"value": "Add wendy0402 as an author\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'asciiart/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "human",
"value": "Create a script that uses all the features at full power for power-budget testing\n"
},
{
"from": "gpt",
"value": "require 'rubygems'\nrequire 'bundler/setup'\n\nrequire 'chip-gpio'\nrequire './pwm_tlc5947.rb'\nrequire './oled_ssd1306.rb'\n\n@pwm = PWM_5947::PWM.new(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix measurements to match data type\n"
},
{
"from": "human",
"value": "require 'faker'\n\n# Recipes\n\n20.times do\n recipe_info{\n title: Faker::Lorem.word,\n category_id: (1..4).to_a.sample,\n user_id: (1..10).to_a.sample,\n time: Faker::Time.between(Time.now ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix seed breakage: remove EvidenceTypes from seed\n\nEvidenceTypes table dissapeared after the \"DropLegacySourceTables\" migration\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default val... | ruby | chosen |
[
{
"from": "system",
"value": "Fix aggregation api client to send token\n"
},
{
"from": "human",
"value": "class AggregationClient\n include Configurable\n\n self.config_file = \"aggregation_api\"\n self.api_prefix = \"aggregation\"\n\n attr_reader :connection\n\n def initialize(adapter = Fa... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ced/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Set correct emulator for older VMs\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n#\n# :Author: Garry Dolley\n# :Date: 03-11-2014\n\nrequire 'rubygems'\nrequire 'nokogiri'\n\nXML_FILE_OLD=ARGV[0].to_s\nXML_FILE_NEW=ARGV[1].to_s\n\ndef usage\n puts \"./migrate-... | ruby | chosen |
[
{
"from": "system",
"value": "Fix quoting in error messages"
},
{
"from": "human",
"value": "module Fishwife\n class HijackIo\n def initialize(async_context)\n @async_context = async_context\n end\n\n def write(str)\n @async_context.response.output_stream.write(str.to_java_by... | ruby | chosen |
[
{
"from": "system",
"value": "Use the new \"sexy\" validations for Url\n\nAs pointed out by Rubocop.\n\nChange-Id: If825dd9df3496c49c4bd64671ce429b323f99da8\n"
},
{
"from": "human",
"value": "# A Url represents a page that can have Snapshots taken on it.\nclass Url < ActiveRecord::Base\n valida... | ruby | chosen |
[
{
"from": "system",
"value": "Change faraday version constraint to pessimistic\n\nThe current dependency constraint of '>=0.8.6' for faraday is causing\n`bundle outdated` to error out on a project I am working on. This is\ndue to faraday-middleware being incompatible with faraday 0.9 and\nbundler trying to ... | ruby | chosen |
[
{
"from": "system",
"value": "Add uniqueness index for follows\n"
},
{
"from": "human",
"value": "class AddFollowsMigration < ActiveRecord::Migration\n def up\n create_table :follows do |t|\n t.references :followable, polymorphic: true\n t.references :follower, polymorphic: true\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec after clean test app caches\n"
},
{
"from": "human",
"value": "require File.expand_path('../spec_helper', __FILE__)\n\ndescribe CssController, :type => :controller do\n it \"should integrate with Rails\" do\n get :test, :file => 'test'\n response.sho... | ruby | chosen |
[
{
"from": "system",
"value": "Remove rails dependency from gemspec\n\nrails_admin gem itself has the dependency.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails_admin_tag_list/version\"\n\n# Describe your gem an... | ruby | chosen |
[
{
"from": "system",
"value": "[CS] Remove a redundant explicit subject"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Adhearsion do\n subject { Adhearsion }\n\n describe \"while accessing the config method\" do\n it \"should return a Configuration instance\" do\n su... | ruby | chosen |
[
{
"from": "system",
"value": "Update example use in record spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ninclude Support::ResourceExamples\n\ndescribe Fulcrum::Record do\n include_context 'with client'\n include_context 'with resource'\n\n let(:resource) { client.records }\... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up after re-enabling transactional fixtures\n\nPrevents sync specs from starting with commit entries from examples that didn't use transactions.\n"
},
{
"from": "human",
"value": "def in_ghost_mode(&block)\n context 'in ghost mode' do\n use_configuration(:... | ruby | chosen |
[
{
"from": "system",
"value": "Add Item Type ID Search To API Items\n"
},
{
"from": "human",
"value": "class Api::ItemsController < ApiController\n def index\n \t@items = if @@query.empty?\n Item.all.order(change_query_order)\n \telse\n\t\t\tItem.where(\"lower(title) LIKE ? OR \n l... | ruby | chosen |
[
{
"from": "system",
"value": "Add note about a breaking change that should happen at some point\n"
},
{
"from": "human",
"value": "module Slimdown\n # Exception class for Slimdown errors.\n class Exception < StandardError\n end\nend\n"
},
{
"from": "gpt",
"value": "module Slimdown... | ruby | chosen |
[
{
"from": "system",
"value": "Return stacktrace if present in error\n"
},
{
"from": "human",
"value": "module Algorithmia\n\n class AlgorithmiaException\n def initialize(error)\n @error = symbolize_keys(error[\"error\"])\n parse_error\n end\n\n def parse_error\n case @er... | ruby | chosen |
[
{
"from": "human",
"value": "Add cloud example for setting up webhook\n"
},
{
"from": "gpt",
"value": "# Usage (from the repo root):\n# env FLIPPER_CLOUD_TOKEN=<token> FLIPPER_CLOUD_SYNC_SECRET=<secret> FLIPPER_CLOUD_SYNC_METHOD=webhook bundle exec rackup examples/ui/basic.ru -p 9999\n# env ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix stack too deep in EC test\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'omf_ec/dsl'\n\ndescribe OmfEc::DSL do\n describe \"when included\" do\n\n include OmfEc::DSL\n\n it \"must respond to after and every\" do\n @el = MiniTest::... | ruby | chosen |
[
{
"from": "system",
"value": "Add tvos support to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'APTimeZones'\n s.version = '1.1'\n s.platform = :ios, '6.0'\n s.homepage = 'https://github.com/Alterplay/APTimeZones'\n s.license = { :type... | ruby | chosen |
[
{
"from": "system",
"value": "Make mocha warning go away\n"
},
{
"from": "human",
"value": "require './test/test_helper'\nrequire 'app/presenters/profile.rb'\nrequire 'mocha'\n\nclass ProfileTest < Minitest::Test\n\n def setup\n super\n user1.stubs(:is?).with(user1.username).returns(true)... | ruby | chosen |
[
{
"from": "system",
"value": "Add prerelease warning while fetching API token\n\nChange-Id: I611ad411eaa5eaed90745a497a836b6a0531f5b4\nReviewed-on: http://review.engineyard.com/190\nReviewed-by: Brian Donovan <5c0e7f6634184a28b1cddd81dceb95d9113bf00f@engineyard.com>\nTested-by: Brian Donovan <5c0e7f6634184a... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant hipchat reference from set_hipchat_client task.\n"
},
{
"from": "human",
"value": "require 'hipchat'\n\nCapistrano::Configuration.instance(:must_exist).load do\n namespace :hipchat do\n task :set_hipchat_client do\n set :hipchat_client, Hip... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up token generator test\n"
},
{
"from": "human",
"value": "require_relative '../../../utils/sli_utils.rb'\nrequire 'open3'\n\nGiven /^I used the long lived session token generator script to create a token for user \"(.*?)\" with role \"(.*?)\" for edorg \"(.*?... | ruby | chosen |
[
{
"from": "system",
"value": "Update test: now paperclick don't parameterize filename\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AttachmentFileTest < ActiveSupport::TestCase\n def teardown\n @attachment.destroy rescue nil\n end\n\n test \"Set file content_type and si... | ruby | chosen |
[
{
"from": "system",
"value": " Remove Logging. Change class name.\n"
},
{
"from": "human",
"value": "require 'httparty'\nrequire \"alertr/version\"\n\nmodule Alertr\n\n def send(title, body, list, level=:info)\n\n alert = {\n :title => title,\n :body => body,\n :list => list,\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix building on FreeBSD by searching in the correct place for headers\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire \"mkmf\"\n\ndir_config(\"ffmpeg\")\n\n%w( avformat avcodec ).each do |lib|\n header = \"#{lib}.h\"\n result = false\n\n [ \"lib... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake tolk:import_assets for copying asstes to the app\n"
},
{
"from": "human",
"value": "namespace :tolk do\n desc \"Sync Tolk with the default locale's yml file\"\n task :sync => :environment do\n Tolk::Locale.sync!\n end\n\n desc \"Generate yml files fo... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as development dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'check_zfs'\n s.version = '0.0.3'\n s.authors = [\"Björn Albers\"]\n s.email = [\"bjoernalbers@google... | ruby | chosen |
[
{
"from": "human",
"value": "Add survey lesson plan partial\n"
},
{
"from": "gpt",
"value": "json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item\njson.lesson_plan_item_type [Course::Survey.model_name.human]\njson.item_path course_survey_path(current_course, item)\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Convert devicemapper ID's to logical volume names\n\nAllow for the ability to optionally convert devicemapper id's to their logical volume names."
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'rubygems' if RUBY_VERSION < '1.9.0'\nrequire 'sensu-plu... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration; Never underestimate a 10 seconds win :-)\n"
},
{
"from": "human",
"value": "class DestroyNonExistingGitHubUsers < ActiveRecord::Migration[5.1]\n def up\n unless ENV['RAILS_ENV'] == 'development'\n User.find_each do |user|\n if user.... | ruby | chosen |
[
{
"from": "system",
"value": "Include LICENSE file in the gem.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rails/controller/testing/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificatio... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded cronjobs var from nginx test\n"
},
{
"from": "human",
"value": "# Encoding: utf-8\nrequire 'spec_helper'\n\ncronjobs = OHAI['cronjobs']['root'][0]\nnginx = OHAI['nginx_config']\n\ndescribe 'Nginx Config' do\n\n it 'should be a Mash' do\n expect(n... | ruby | chosen |
[
{
"from": "system",
"value": "vagrant: Update the net-next VM image\n\nThe new image includes a new Ubuntu 20.04.4 version, updated prepulled\nDocker images, and the new Go version.\n\nSigned-off-by: Paul Chaignon <a027184a55211cd23e3f3094f1fdc728df5e0500@cilium.io>\n"
},
{
"from": "human",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Remove bundler version requirement for travis ci.\n\nTravis-CI only has bundler 1.5 instead of 1.6\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'colab... | ruby | chosen |
[
{
"from": "system",
"value": "issue-289: Move lets encrypt challenge id to an environment variable.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nRails.application.routes.draw do\n devise_for :users, controllers: { registrations: 'registrations' }\n\n scope \"/admin\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add run route so we can use this in the middleware\n"
},
{
"from": "human",
"value": "LunarShell::Engine.routes.draw do\n namespace :satellites do\n resource :clear, only: []\n resource :exit, only: []\n resource :help, only: []\n resource :history, onl... | ruby | chosen |
[
{
"from": "system",
"value": "Add more services and make work as Rails plugin\n"
},
{
"from": "human",
"value": "require 'rubymarks'\nrequire 'rubymarks/rails'\n\n# Add extensions into ActionView::Base\nActionView::Base.class_eval { include Rubymarks::Rails }\n"
},
{
"from": "gpt",
"... | ruby | chosen |
[
{
"from": "human",
"value": "Add Podspec for CocoaPods building option\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = \"RequestKit\"\n s.version = \"0.1.0\"\n s.summary = \"Networking library for OctoKit.swift\"\n s.homepage = \"https:/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove string concatenation for easier translation.\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1483936\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Button::VmWebmksConsole < ApplicationHelper::Button::VmConsole\n include VmwareConsoleHelper\n ne... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up submission test script\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SubmissionTest < ActiveSupport::TestCase\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
"from": "gpt",
"value": "# Encoding: utf-8\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for the create_action_for\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe User, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require \"rails_help... | ruby | chosen |
[
{
"from": "system",
"value": "Add index and edit action, and change redirects\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n before_action :get_question, only: [:show, :edit, :update, :destroy]\n\n before_action :authenticate_user!, only: [:create, :upda... | ruby | chosen |
[
{
"from": "system",
"value": "Use created_at for the AKIAlert today scope\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_dependency \"renalware/renal\"\n\nmodule Renalware\n module Renal\n class AKIAlert < ApplicationRecord\n include Accountable\n inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Change follower mail delivery to background task.\n"
},
{
"from": "human",
"value": "class FollowerMailerService\n\n def self.send_live_effort_mail(participant_id, split_time_ids)\n live_effort_mail_data = LiveEffortMailData.new(participant_id, split_time_ids)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where log job required log file to exist"
},
{
"from": "human",
"value": "class LogJob < ApplicationJob\n queue_as :default\n\n def perform(*args)\n log_files = %w[ cron delayed_job ]\n log_files << \"#{ Rails.env }\"\n\n log_files.each do |log_fi... | ruby | chosen |
[
{
"from": "system",
"value": "Validate presence of title, amount, state in Assets.\n"
},
{
"from": "human",
"value": "class Asset < ActiveRecord::Base\n # Invoice\n belongs_to :invoice\n\n # Bookings\n # ========\n include HasAccounts::Model\nend\n"
},
{
"from": "gpt",
"value": ... | ruby | chosen |
[
{
"from": "system",
"value": "Change recipe to support newest chef version"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: rails-bootstrap\n# Recipe:: setup\n#\n# Copyright 2013, 119 Labs LLC\n#\n# See license.txt for details\n#\nclass Chef::Recipe\n # mix in recipe helpers\n include... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the presence: true validation from the Group model.\n\nSmartyStreets will not always return this.\n"
},
{
"from": "human",
"value": "class Group < ActiveRecord::Base\n has_many :users\n has_many :requests\n\n validates :primary_number, :street_name, :stree... | ruby | chosen |
[
{
"from": "system",
"value": "Add Course Association for Club\n\nAdd the has_many Courses association for Clubs to include destroying\ndependent resources.\n"
},
{
"from": "human",
"value": "class Club < ActiveRecord::Base\n attr_accessible :name, :description, :price_cents, :logo\n\n monetize... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete Game model implementation\n"
},
{
"from": "human",
"value": "class Game < ActiveRecord::Base\n HEARTS_CHARACTER = \"♥\"\n DIAMONDS_CHARACTER = \"♦\"\n SPADES_CHARACTER = \"♠\"\n CLUBS_CHARACTER = \"♣\"\n\n attr_reader :deck\n attr_reader :hands... | ruby | chosen |
[
{
"from": "system",
"value": "Disable sorting hosts/visitors by name\n"
},
{
"from": "human",
"value": "class Role < ActiveRecord::Base\n after_create :create_availabilities # add to spec\n\n belongs_to :person\n belongs_to :event\n\n accepts_nested_attributes_for :person, :update_only => tr... | ruby | chosen |
[
{
"from": "system",
"value": "Add Devise timeout to combat Rails session cookie issues\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :token_authenticatable, :confirmable,\n # :lockable, :timeoutable and :omniau... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.