conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add new citi service account email to Notifier"
},
{
"from": "human",
"value": "class Notifier < ApplicationMailer\n\n def self.report_event(event)\n admin_addresses.each do |email|\n send_msg(email, event).deliver_now\n end\n end\n\n def send_msg(emai... | ruby | chosen |
[
{
"from": "system",
"value": "Send Sidekiq errors to Sentry\n"
},
{
"from": "human",
"value": "if Supermarket::Config.sentry_url.present? && !Rails.env.test?\n require 'raven'\n\n Raven.configure do |config|\n config.dsn = Supermarket::Config.sentry_url\n end\nend\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Change method call to compact.\n"
},
{
"from": "human",
"value": "require 'rdf/turtle'\r\nrequire 'umakadata/data_format'\r\nrequire 'umakadata/logging/log'\r\n\r\nmodule Umakadata\r\n\r\n class VoID\r\n\r\n include Umakadata::DataFormat\r\n ##\r\n # retur... | ruby | chosen |
[
{
"from": "system",
"value": "Modify DefaultMission to be reusable, add ivars to default completion\n"
},
{
"from": "human",
"value": "# This is the mission called when none of the others match.\nclass Bond::DefaultMission < Bond::Mission\n ReservedWords = [\n \"BEGIN\", \"END\", \"alias\", ... | ruby | chosen |
[
{
"from": "system",
"value": "[DOCS] Complete documentation of function arguments\n"
},
{
"from": "human",
"value": "module Fulmar\n module Service\n # Provides internal helper methods\n class HelperService\n class << self\n ##\n # Reverse file lookup in path\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Test to ensure 5 second grub timout. IMAGE-543\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe file('/etc/default/grub') do\n\tit { should be_file }\n\tit { should contain \"tsc=reliable\" }\n it { should contain \"divider=10\" }\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Use fail instead of raise\n"
},
{
"from": "human",
"value": "module Endpoints\n class Health < Base\n namespace '/health' do\n get do\n encode({})\n end\n\n get '/db' do\n database?\n database_available?\n encode({})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the way the list of types is readen by relaying on classes"
},
{
"from": "human",
"value": "class VirtualAttributes::Base\n module Casts\n extend ActiveSupport::Concern\n\n TYPES = ActiveRecord::Base.connection.native_database_types.keys - [:primary_ke... | ruby | chosen |
[
{
"from": "system",
"value": "Fix timeout test for grok\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Grok do\n describe 'API requests' do\n it 'should get page view data for a given article' do\n VCR.use_cassette 'grok/pageview_data' do\n title = 'History... | ruby | chosen |
[
{
"from": "human",
"value": "Write Most of Tree Specs\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe Tree do\n let(:tree) { Tree.new }\n\n describe \"readable attributes\" do\n describe \"data\" do\n it \"should be a hash\" do\n expect(tree.data).to be_a_ki... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for 1.8.7 and instance methods\n"
},
{
"from": "human",
"value": "module KPI\n module Report\n module DynamicDefinitions\n module ClassMethods\n def method_added(name)\n unless self.method_blacklisted?(name) || suppressed_memoization?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue reference number splitting\n\nSplit on one or more whitespace characters, not one whitespace character\nand a space.\n"
},
{
"from": "human",
"value": "# Handles the various git-interactions\nmodule GitInfo\n require 'open3'\n\n class << self\n def cu... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to use or disable ncurses\n"
},
{
"from": "human",
"value": "require './lib/Server'\nrequire 'yaml'\nrequire './lib/GameStatistics'\nrequire 'curses'\nrequire './lib/CursesStatsPrinter'\n\nserver = Server.new '0.0.0.0', RobotState::Server::PORT\nsettings... | ruby | chosen |
[
{
"from": "system",
"value": "Set some offsets for the Concord data."
},
{
"from": "human",
"value": "(21..21).each do |day|\n\tdate = \"#{\"%02d\" % day}.09.2010\"\n\tputs \"date = #{date}\"\n\t\n\tstarting_offset_x = 0\n\tstarting_offset_y = 0\n\t\n\tsize = 4000\n\tputs `rp5 run dance_diagram.... | ruby | chosen |
[
{
"from": "system",
"value": "Add Fog Region When upload\n"
},
{
"from": "human",
"value": "CarrierWave.configure do |config|\n if Rails.env.production? and Configuration[:aws_access_key]\n config.fog_credentials = {\n provider: 'AWS',\n aws_access_key_id: Configuration[:aws_access... | ruby | chosen |
[
{
"from": "system",
"value": "Purge cpufrequtils instead of removing\n"
},
{
"from": "human",
"value": "\n# Cookbook Name:: bcpc\n# Recipe:: cpupower\n#\n# Copyright 2015, Bloomberg Finance L.P.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ... | ruby | chosen |
[
{
"from": "system",
"value": "Split npm and bower install commands"
},
{
"from": "human",
"value": "execute \"npm install\" do\n command \"su -c \\\"cd /vagrant; npm install --save-dev; ./node_modules/.bin/bower install\\\" vagrant\"\nend\n"
},
{
"from": "gpt",
"value": "execute \"n... | ruby | chosen |
[
{
"from": "system",
"value": "Set Gem description and summary.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'aarons_gnuplot/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Standard as a development dependency\n\nhttps://github.com/testdouble/standard\n\nLet's just adhere to a common standard for Ruby style without\nconfiguration and discussions.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.push Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve Chef 14 deprecation warning\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: nscd\n# resource:: clear_cache\n#\n# Copyright:: 2015-2016, Chef Software, Inc.\n#\n# Licensed under... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up Postgres bits of connection spec\n"
},
{
"from": "human",
"value": "require 'oculus'\n\ndescribe Oculus::Connection do\n describe \"non-nonexistent adapter\" do\n it \"raises an adapter not found error\" do\n lambda {\n Oculus::Connection.co... | ruby | chosen |
[
{
"from": "system",
"value": "Include enumerable and each method implementation\n"
},
{
"from": "human",
"value": "module DataStructures101 \n module Hash\n class BaseHashTable\n\n attr_reader :size, :hash_lambda\n\n def initialize(capacity, prime, hash_lambda = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a string for mode to preserve the leading 0"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: iptables\n# Definition:: iptables_rule\n#\n# Copyright 2008-2009, Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you... | ruby | chosen |
[
{
"from": "human",
"value": "Add very basic integration test for local transaction creation\n"
},
{
"from": "gpt",
"value": "require 'integration_test_helper'\n\nclass LocalTransactionCreationTest < ActionDispatch::IntegrationTest\n test \"creating a local transaction from panopticon requests a... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for initialize method\n"
},
{
"from": "gpt",
"value": "require_relative '../lib/statistics'\n\ndescribe Workerholic::Statistics do\n it 'initializes attributes with without an argument' do\n statistics = Workerholic::Statistics.new\n expect(statistics... | ruby | chosen |
[
{
"from": "system",
"value": "Update source files in podspec template"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"{PROJECT}\"\n s.version = \"0.1\"\n s.summary = \"\"\n s.description = <<-DESC\n DESC\n s.homepage = \"{URL}\"\n s.license =... | ruby | chosen |
[
{
"from": "system",
"value": "Use Yahoo as Geocoding API in Tests. They know no limits.\n"
},
{
"from": "human",
"value": "Geocoder::Configuration.lookup = :yahoo\nGeocoder::Configuration.api_key = \"FZGMCffV34GyRHDpvcpT8NrASJtqaZ5_mdzn0gL5tAFGQg8Rv7Mgi5fkWHWyRgDU7A\"\n"
},
{
"from": "gp... | ruby | chosen |
[
{
"from": "system",
"value": "Configure Google auth to be less obnoxious.\n\nAlso asking a properly-sized avatar image with a a square ratio.\n"
},
{
"from": "human",
"value": "OmniAuth.config.logger = Rails.logger\n\nRails.application.config.middleware.use OmniAuth::Builder do\n provider :goog... | ruby | chosen |
[
{
"from": "system",
"value": "Verify that there's only a single branch in request body\n"
},
{
"from": "human",
"value": "require File.expand_path('../helper', __FILE__)\n\nclass AppHarborTest < Service::TestCase\n def setup\n @stubs = Faraday::Adapter::Test::Stubs.new\n end\n\n def test_p... | ruby | chosen |
[
{
"from": "system",
"value": "Remove invitation link from admin user list\n"
},
{
"from": "human",
"value": "ActiveAdmin.register User do\n actions :index, :edit, :update\n filter :name\n filter :email\n\n index :download_links => false do\n column :name\n column :email\n column \"I... | ruby | chosen |
[
{
"from": "system",
"value": "Use dynamic method definition in Update\n"
},
{
"from": "human",
"value": "module C2y\n class DSL::Context::Update\n attr_reader :result\n\n def initialize(&block)\n @result = OpenStruct.new({\n group: \"alpha\",\n reboot_strategy: \"off\",... | ruby | chosen |
[
{
"from": "human",
"value": "Add copy of fire_hazard.rb to rewrite\n"
},
{
"from": "gpt",
"value": "require 'pp'\n\n@light_grid = []\n\n\n@light_grid = 1000.times.map do |x|\n 1000.times.map{ |y| false }\nend\n\n\nFile.open('data/dec6/input.txt').each do |line|\n line.match(/([a-z\\ ]+)([0-9]+... | ruby | chosen |
[
{
"from": "system",
"value": "Add more backward compatibility options\n"
},
{
"from": "human",
"value": "module Dhis2\n module Api\n class DataElement < Base\n class << self\n def create(client, elements)\n elements = [elements].flatten\n category_combo... | ruby | chosen |
[
{
"from": "system",
"value": "Allow ports to be specified from the `Vagrantfile`\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module DockerProvider\n class Config < Vagrant.plugin(\"2\", :config)\n attr_accessor :image, :cmd, :ports, :volumes, :privileged\n\n def init... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up the User tests\n"
},
{
"from": "human",
"value": "require 'faker'\n\nFactoryGirl.define do\n factory :user do\n email { Faker::Internet.email }\n password \"testpassword1\"\n password_confirmation \"testpassword1\"\n role { [\"user\", \"admin\", ... | ruby | chosen |
[
{
"from": "system",
"value": "Expire application cache key when purging cache from admin screen\n"
},
{
"from": "human",
"value": "class Admin::CachePurgeController < Admin::ForestController\n def index\n authorize :dashboard, :index?\n\n logger.info \"[Forest] Performing user-issued cach... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flash notice on material preview page\n\n- Fix flash notice for anonymous users on material preview page.\n"
},
{
"from": "human",
"value": "class Browse::ActivitiesController < ApplicationController\n \n # GET /browse/activity/1\n def show\n @back_url = n... | ruby | chosen |
[
{
"from": "system",
"value": "Add first and last class method to Document model\n"
},
{
"from": "human",
"value": "class Document\n attr_reader :id, :filename\n DIR_PATH = 'db/docs'\n URL_PATH = 'docs'\n\n class << self\n def all\n Dir.glob(\"#{DIR_PATH}/*.md\").sort.map do |filename... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem spec to pull in version form the source\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire 'semantic_logger/version'\n\n# Describe your gem and declare its dependencies:\nGem::Speci... | ruby | chosen |
[
{
"from": "system",
"value": "Add Questionnaire association to User model\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authenticatable... | ruby | chosen |
[
{
"from": "system",
"value": "Add hours\n_spent instance method\n"
},
{
"from": "human",
"value": "class User < ApplicationRecord\n\n mount_uploader :avatar, AvatarUploader\n\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\... | ruby | chosen |
[
{
"from": "system",
"value": "Update password vallidation to only check length\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_many :user_plans\n has_many :plans, through: :user_plans\n has_many :comments\n\n before_save { self.email = email.downcase }\n validates :... | ruby | chosen |
[
{
"from": "system",
"value": "Use a SPDX standard license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'apache2'\nsource_url 'https://github.com/sous-chefs/apache2' if respond_to?(:source_url)\nissues_url 'https://g... | ruby | chosen |
[
{
"from": "system",
"value": "Add amazon to the list of supported operating systems\n"
},
{
"from": "human",
"value": "name 'hadoop'\nmaintainer 'Continuuity, Inc.'\nmaintainer_email 'ops@continuuity.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures Had... | ruby | chosen |
[
{
"from": "system",
"value": "Allow setting a check_name and prepend to the output (default to class name)\n"
},
{
"from": "human",
"value": "require 'mixlib/cli'\n\nEXIT_CODES = {\n 'OK' => 0,\n 'WARNING' => 1,\n 'CRITICAL' => 2,\n 'UNKNOWN' => 3,\n}\n\nclass Sensu\n class Plugin\n clas... | ruby | chosen |
[
{
"from": "system",
"value": "Fix format of DataImport error text\n"
},
{
"from": "human",
"value": "require_dependency 'cartodb/errors'\nrequire_dependency 'cartodb/import_error_codes'\n\nmodule Carto::DataImportCommons\n\n # Notice that this returns the entire error hash, not just the text\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary storing of results in locator method\n"
},
{
"from": "human",
"value": "module TeamCity\n class Client\n # Defines some common methods shared across the other\n # teamcity api modules\n module Common\n\n private\n\n def assert_... | ruby | chosen |
[
{
"from": "system",
"value": "Use Count.call instead of incrementing the count inline\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Veritas\n class Aggregate\n\n # The mean of a sequence of numbers\n class Mean < Aggregate\n\n DEFAULT = [ 0, nil ].freeze\n\n # R... | ruby | chosen |
[
{
"from": "system",
"value": "Implement a basic integration test.\n"
},
{
"from": "human",
"value": "module Nutrella\n vcr_options = { cassette_name: \"command\", record: :new_episodes }\n\n RSpec.describe Command, vcr: vcr_options do\n pending\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for sessions controller including 2FA\n\nThis also contains specs for a bug described in #14900\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe SessionsController do\n describe '#create' do\n before do\n @request.env['devise.map... | ruby | chosen |
[
{
"from": "human",
"value": "Bring SMSSelector somewhat under test\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe SetMemberSubjectSelector do\n let(:count) { create(:subject_workflow_count) }\n let(:user) { create(:user) }\n\n before do\n count.workflow.subject_sets = [... | ruby | chosen |
[
{
"from": "system",
"value": "Update to support newer version of cucumber\n"
},
{
"from": "human",
"value": "require 'rack/test'\nrequire 'capybara'\nrequire 'capybara/cucumber'\nrequire 'rspec'\nrequire 'capybara/poltergeist'\nrequire 'rspec/expectations'\nrequire 'cucumber/rspec/doubles'\nrequ... | ruby | chosen |
[
{
"from": "human",
"value": "Patch Rubydora to deal with external datastream content.\n"
},
{
"from": "gpt",
"value": "module Rubydora\n class Datastream\n def entity_size(response)\n if content_length = response[\"content-length\"]\n content_length.to_i\n else\n resp... | ruby | chosen |
[
{
"from": "system",
"value": "Update tests to reflect changes to user verification\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Api::UsersController do\n let(:user) { FactoryGirl.create(:user, verified_at: nil) }\n include Devise::Test::ControllerHelpers\n\n it 'crea... | ruby | chosen |
[
{
"from": "system",
"value": "Add @ilyapuchka as author in the Podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Dip\"\n s.version = \"3.1.0\"\n s.summary = \"A simple Dependency Resolver: Dependency Injection using Protocol resolution.... | ruby | chosen |
[
{
"from": "system",
"value": "Add YARD_ROOT and YARD_TEMPLATE_ROOT constants for later\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'yard')\n\n['logger'].each do |file|\n require File.join(File.dirname(__FILE__), 'yard', file)\nend\n\nmodule YARD\n VE... | ruby | chosen |
[
{
"from": "system",
"value": "Remove description method from PlaceholderInExtend\n\nThe `description` method is being deprecated.\n\nChange-Id: I755e28a599f1cccdd38dafec1bf549e3f6b7e664\nReviewed-on: http://gerrit.causes.com/36723\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nRe... | ruby | chosen |
[
{
"from": "system",
"value": "Use attribute accessor for checking for test environment\n"
},
{
"from": "human",
"value": "require 'faraday_middleware'\n\nmodule Cardgate\n\n class Gateway\n\n class << self\n attr_accessor :environment\n\n attr_accessor :merchant\n\n attr_acces... | ruby | chosen |
[
{
"from": "system",
"value": "Add naive bundler support to app runner\n"
},
{
"from": "human",
"value": "module CloudKit\n class Command\n include CloudKit::Generator\n\n def run(args)\n return help unless command = args.first\n case command\n when 'run'\n run_app\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Result to use a custom base class (stdlib Struct is SLOW)\n"
},
{
"from": "human",
"value": "module Dry\n module Types\n module Result\n class Success < ::Struct.new(:input)\n def success?\n true\n end\n\n def failure?... | ruby | chosen |
[
{
"from": "human",
"value": "Remove unnecessary documentation for void return values\n\nThese aren't necessary when the return value isn't intended to be used.\n"
},
{
"from": "gpt",
"value": "module HamlLint\n # Encapsulates all communication to an output source.\n class Logger\n # Whether... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec coverage for class inheritance propagating rules.\n\nThis occurs at inheritance time, so descendants do not automatically receive rules declared in ancestors after inheritance occurs.\n\nRelated to #2 and #3.\n"
},
{
"from": "gpt",
"value": "require_relative... | ruby | chosen |
[
{
"from": "system",
"value": "Remove leading space of command stdout"
},
{
"from": "human",
"value": "module Kanaveral\n module Output\n \n def self.password remote\n ask \"Password for #{remote} : \"\n password = STDIN.noecho(&:gets).chop\n cr\n password\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the issue with reordeing RSS items\n"
},
{
"from": "human",
"value": "class Notification < ActiveRecord::Base\n\n\tdef generate\n\n latestNotification = Notification.last(1).first\n require 'open-uri'\n require 'twilio-ruby' \n output ... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations and nested attributes writer\n"
},
{
"from": "human",
"value": "class Professional < ActiveRecord::Base\n has_many :partners, :through => :employments\n has_many :employments\n\n has_many :students, :through => :mentorships\n has_many :mentorship... | ruby | chosen |
[
{
"from": "system",
"value": "Move from 7.8.3 to 7.8.4 version of ghc\n"
},
{
"from": "human",
"value": "default[:haskell][:multi] = {\n :ghcs => [\"7.8.3\",\"7.6.3\",\"7.4.2\",\"7.0.4\"],\n :default => \"7.6.3\"\n}\n"
},
{
"from": "gpt",
"value": "default[:haskell][:multi] = {\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create application controller spec, add tests for new authentication methods\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe ApplicationController, type: :controller do\n describe 'authentication methods' do\n let(:classroom) { create(:classro... | ruby | chosen |
[
{
"from": "system",
"value": "Stop depending on bundler for development\n\nNot sure that's a common practice? It was way outdated anyway.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequi... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for github crawler.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe GithubCrawler do\n\n\n describe 'crawl' do\n it 'crawles cakephp and skips all branches' do\n Product.delete_all\n expect( License.count ).to eq(0)\n ex... | ruby | chosen |
[
{
"from": "system",
"value": "Allow devices to be reactivated on the same account.\n\n"
},
{
"from": "human",
"value": "module Activation\n\n def self.start( device_id )\n device = Device.where( hardware_identifier: device_id ).first\n\n unless device\n token = create_token\n de... | ruby | chosen |
[
{
"from": "human",
"value": "Add CocoaPods podspec for v1.0.2"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = 'OBShapedButton'\n s.version = '1.0.2'\n s.license = 'MIT'\n s.summary = 'A UIButton subclass that works with non-rectangular button shapes.'\n s.homepage = 'h... | ruby | chosen |
[
{
"from": "system",
"value": "Make runit a dependency since out of the box it's needed\n"
},
{
"from": "human",
"value": "name \"graphite\"\nmaintainer \"Heavy Water Software Inc.\"\nmaintainer_email \"ops@hw-ops.com\"\nlicense \"Apache 2.0\"\ndescription \"Instal... | ruby | chosen |
[
{
"from": "system",
"value": "Add explicit name to cookbook\n\nBetter than relying on cookbook directory and plays better with Berkshelf."
},
{
"from": "human",
"value": "maintainer \"Bryan Berry\"\nmaintainer_email \"bryan.berry@gmail.com\"\nlicense \"Apache 2.0\"\ndescription ... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations spec to Vote\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Vote do\n let(:proposal) { FactoryGirl.create(:proposal) }\n let(:user) { FactoryGirl.create(:user) }\n\n describe \"mass assignment\" do\n\n context \"not allowe... | ruby | chosen |
[
{
"from": "system",
"value": "Add minimal specs for Mutant.zombify\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Mutant do\n describe '.singleton_subclass_instance' do\n let(:object) { described_class }\n\n subject { object.singleton_subclass_instance(name, supercla... | ruby | chosen |
[
{
"from": "system",
"value": "Add custom rspec matcher have_format\n"
},
{
"from": "human",
"value": "RSpec::Matchers.define :generate_palette do |expected|\n expected.map!(&:paint)\n\n match do |actual|\n actual == expected\n end\nend\n"
},
{
"from": "gpt",
"value": "RSpec::Ma... | ruby | chosen |
[
{
"from": "system",
"value": "Add ATRA in as a test\n\ngit-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@1422 2d86388d-c40f-0410-ad6a-a69da6a65d20\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\np \"My project name is: #{ARGV.inspect}\"\n"
},
{
"from": "gpt",
"value": "#... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem description and author details to gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"nested_sortable-rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem... | ruby | chosen |
[
{
"from": "system",
"value": "Add a description to the spec Helper module\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Copyright 2016 New Context Services, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in... | ruby | chosen |
[
{
"from": "system",
"value": "[Sass] Convert Sass::Script::Bool docs to YARD.\n"
},
{
"from": "human",
"value": "require 'sass/script/literal'\n\nmodule Sass::Script\n class Bool < Literal # :nodoc:\n def to_s\n @value.to_s\n end\n\n def to_bool\n @value\n end\n end\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Add method missing to application controller\n\nIt notifies users that they should use main_app object if they\nwant to access their named routes."
},
{
"from": "human",
"value": "module Doorkeeper\n class ApplicationController < ActionController::Base\n private... | ruby | chosen |
[
{
"from": "system",
"value": "Add new column \"categories\" in db\n"
},
{
"from": "human",
"value": "class CreateTrends < ActiveRecord::Migration\n def change\n create_table :trends do |t|\n t.string :description\n t.string :links # link of the feed itself\n t.string :titles\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to load shapefile into bikeway_segments table\n"
},
{
"from": "gpt",
"value": "class LoadShapefile < ActiveRecord::Migration\n\n SHAPEFILE = Rails.root.join('vendor', 'opendata', 'CENTRELINE_BIKEWAY_OD')\n\n def up\n BikewaySegment.delete_all\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the 4 new fields to the increasingly misnamed OpcCustomer."
},
{
"from": "human",
"value": "require 'active_model'\nrequire 'active_model/validations'\n\nrequire 'opscode/models/base'\n\nmodule Opscode\n module Models\n class OpcCustomer < Base\n includ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Travis box without hostname\n"
},
{
"from": "human",
"value": "# A type definition for xtreemfs_volume\nPuppet::Type.newtype(:xtreemfs_volume) do\n\n desc \"The xtreemfs_volume type\"\n\n ensurable\n\n newparam(:name) do\n isnamevar\n\n validate do ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task to cache version numbers in the right places\n"
},
{
"from": "human",
"value": "require 'whole_edition_translator'\n\nnamespace :editions do\n desc \"Take old publications and convert to new top level editions\"\n task :extract_to_whole_editions => :... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake not creating triggers\n\nIf the test environment used only a single connection, and the rake task was run in that environment, the extended version of create_table would not create triggers because it found that it was migrating the production database (which was also ... | ruby | chosen |
[
{
"from": "system",
"value": "Write a very basic do_turn method\n"
},
{
"from": "human",
"value": "module TicTacToe\n class Game\n\n def initialize display\n @display = display\n end\n\n def start\n @display.printf \"Welcome to Tic Tac Toe\"\n end\n\n end\n\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on mongoid load when object is nil\n"
},
{
"from": "human",
"value": "module Tod\n module Mongoization\n\n # Converts an object of this instance into a database friendly value.\n def mongoize\n to_s\n end\n\n module ClassMethods\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Sort visits in reverse date order\n"
},
{
"from": "human",
"value": "require_dependency \"renalware/clinics\"\n\nmodule Renalware\n module Clinics\n class VisitQuery\n attr_reader :visits, :query\n\n def initialize(q = {})\n @q = q\n @q[:... | ruby | chosen |
[
{
"from": "system",
"value": "[BUGFIX] Extend strawberry to second strip\n"
},
{
"from": "human",
"value": "require 'ws_light/set/color_set'\n\nmodule WSLight\n module Set\n # Creates a strawberry set, some green, lots of pinkish red with a few greenish dots\n class StrawberrySet < ColorS... | ruby | chosen |
[
{
"from": "human",
"value": "Check if wotkout is being async updated before changes.\n"
},
{
"from": "gpt",
"value": "module WorkoutsChecker\n extend ActiveSupport::Concern\n\n included do\n private\n\n # before_action\n def check_if_workout_is_async_updating\n redirect_to(workou... | ruby | chosen |
[
{
"from": "system",
"value": "Apply fix for locale param being repeated in engines."
},
{
"from": "human",
"value": "class EmbeddedToolsController < ApplicationController\n\n def parent_template\n 'layouts/engine'\n end\n\n helper_method :parent_template\n\nend\n"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Change method name to all_acks? to pass rubocop coding style evaluation.\n"
},
{
"from": "human",
"value": "class ErrataReportsController < ApplicationController\n # GET /errata_reports\n # GET /errata_reports.json\n def index\n @need_acks = []\n @have_acks... | ruby | chosen |
[
{
"from": "system",
"value": "Add version to example app.\n"
},
{
"from": "human",
"value": "ShopifyApp.configure do |config|\n config.application_name = 'Example App'\n config.api_key = ENV['SHOPIFY_CLIENT_API_KEY']\n config.secret = ENV['SHOPIFY_CLIENT_API_SECRET']\n config.scope = 'read_c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ugly option being set being set incorrectly\n"
},
{
"from": "human",
"value": "require 'haml/template/options'\nrequire 'haml/engine'\nrequire 'haml/helpers/action_view_mods'\nrequire 'haml/helpers/action_view_extensions'\nrequire 'haml/helpers/xss_mods'\n\nmodu... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we download lein2 w.r.t. the version we want\n"
},
{
"from": "human",
"value": "default[:leiningen][:lein1][:version] = \"1.7.1\"\ndefault[:leiningen][:lein1][:install_script] = \"https://github.com/technomancy/leiningen/raw/#{leiningen[:lein1][:ver... | ruby | chosen |
[
{
"from": "system",
"value": "Modify spec descriptions to read better\n"
},
{
"from": "human",
"value": "require 'pathname'\n$:.unshift Pathname(__FILE__).dirname.expand_path.to_s\nrequire 'spec_base.rb'\n\ndescribe MrVersion do\n\n it 'should have a version number' do\n MrVersion::VERSION.s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the malformed xml spec, which after all tests the parser rather than roxml\n"
},
{
"from": "human",
"value": "require_relative './../spec_helper.rb'\n\ndescribe ROXML::XML do\n it \"should raise on malformed xml\" do\n if ROXML::XML_PARSER == 'libxml' # n... | ruby | chosen |
[
{
"from": "system",
"value": "Update railties dependency to > 3.1\n\nDepending on ~> 3.1 prevents this gem from being used with Rails 4 for\nno good reason.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/chart-js-rails/version', __FILE__)\n\nGem::S... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.