conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use company addresses for all authors\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'webpay/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update sprout v3-cli-plugin download url.\n\nSigned-off-by: Tim Hausler <0e2fe13acea22d58959d12c030372eeff089f09b@pivotal.io>\n"
},
{
"from": "human",
"value": "replay_plugin_config_path = \"#{node['sprout']['home']}/.cf/plugins/CmdSetRecords\"\n\n[\n ::File.join(n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug related to nonexistant signup_path route\n"
},
{
"from": "human",
"value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n def all\n user = User.from_omniauth(request.env[\"omniauth.auth\"])\n if user.persisted?\n flash... | ruby | chosen |
[
{
"from": "system",
"value": "Enforce available locales in dummy app to avoid deprecation warning\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\nrequire \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Set state to :finish when denying an interaction to a non-admin\n"
},
{
"from": "human",
"value": "module Hackbot\n module Interactions\n class AdminCommand < Command\n before_handle :ensure_admin\n\n protected\n\n def ensure_admin\n return... | ruby | chosen |
[
{
"from": "system",
"value": "Modify calculator to tax by tax cloud based rate\n"
},
{
"from": "human",
"value": "require_dependency 'spree/calculator'\n\nmodule Spree\n class Calculator::PromotionTax < Calculator::DefaultTax\n def self.description\n I18n.t(:promotion_tax)\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set asset debug to true.\n"
},
{
"from": "human",
"value": "require 'awesome_print'\nLoomio::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code ... | ruby | chosen |
[
{
"from": "system",
"value": "Make latitude and longitude required, clean up other validations\n"
},
{
"from": "human",
"value": "class Plot < ApplicationRecord\n validates :plot_id, presence: true\n validates_numericality_of :latitude, greater_than: 0, allow_nil: true\n validates_numericalit... | ruby | chosen |
[
{
"from": "system",
"value": "Add the page feedback id on the API\n"
},
{
"from": "human",
"value": "class PageFeedbackSerializer < ActiveModel::Serializer\n attributes :page_id, :liked, :session_id\nend\n"
},
{
"from": "gpt",
"value": "class PageFeedbackSerializer < ActiveModel::Se... | ruby | chosen |
[
{
"from": "system",
"value": "Use require_dependency instead, so that it interacts with rails better."
},
{
"from": "human",
"value": "load RAILS_ROOT + \"/vendor/plugins/rites_portal/app/models/user.rb\"\n\nclass User < ActiveRecord::Base\n has_many :investigations\n has_many :activities\n h... | ruby | chosen |
[
{
"from": "system",
"value": "Add the fav moment to attr accessible\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n # Include default devise modules. Others available are:\n # :token_authenticatable, :confirmable,\n # :lockable, :timeoutable and :omniauthable\n devise :d... | ruby | chosen |
[
{
"from": "system",
"value": "Add error message for missing project name\n"
},
{
"from": "human",
"value": "namespace :cleanup do\n desc 'Clean up all related vms and other stuff after/before build'\n task vms: 'environment:local:base' do\n # Remove packaged box\n FileUtils.rm_f 'package... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration for rails 5\n"
},
{
"from": "human",
"value": "class CreateAssetAttachments < ActiveRecord::Migration[5.1]\n def change\n create_table :assetable_asset_attachments do |t|\n t.references :asset\n t.references :assetable, :polymorphic => tr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant namespace attribute, add encoding attribute\n"
},
{
"from": "human",
"value": "xml.rss(\"version\" => \"2.0\", \"xmlns:dc\" => \"http://purl.org/dc/elements/1.1/\") do\n xml.channel do\n xml.title(\"Travel Advice Summary\")\n xml.link(:rel =>... | ruby | chosen |
[
{
"from": "system",
"value": "Set a limit for split.\n"
},
{
"from": "human",
"value": "module Repository::Access\n extend ActiveSupport::Concern\n\n OPTIONS = %w[public_r public_rw private_r private_rw]\n DEFAULT_OPTION = OPTIONS[0]\n\n def self.as_read_only(access)\n access.split('_').f... | ruby | chosen |
[
{
"from": "system",
"value": "Support passing an ignore_fields parameter to Vcard.directory_lookup and .directory_match?.\n"
},
{
"from": "human",
"value": "module Vcard::SwissMatch\n def self.included(base)\n base.extend ClassMethods\n end\n\n def directory_lookup\n search = {}\n se... | ruby | chosen |
[
{
"from": "human",
"value": "[P-3] Add sample route for grape\n"
},
{
"from": "gpt",
"value": "require 'grape'\n\n\n\n\nmodule Routes\n class Auth < Grape::API\n namespace :sites do\n route_param :site do\n # POST /api/sites/:site/auth\n post :auth do\n process_re... | ruby | chosen |
[
{
"from": "system",
"value": "Add namespace to generated factory.\n"
},
{
"from": "human",
"value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :engine_setup_test_post, :class => 'Post' do\n title \"MyString\"\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Use more specific dependencies than rails\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ar_lookups/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper methods for stubbing run and run! in both good and bad cases.\n"
},
{
"from": "human",
"value": "module AwesomeSpawn\n module SpecHelper\n def disable_spawning\n allow(Open3).to receive(:capture3)\n .and_raise(\"Spawning is not permitted i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in help formatter introduced in 4.3.6\n"
},
{
"from": "human",
"value": "module Commander\n module HelpFormatter\n autoload :Base, 'commander/help_formatters/base'\n autoload :Terminal, 'commander/help_formatters/terminal'\n autoload :TerminalCompa... | ruby | chosen |
[
{
"from": "system",
"value": "Update SHA256 for xScope 4.1.4\n"
},
{
"from": "human",
"value": "cask :v1 => 'xscope' do\n version '4.1.4'\n sha256 '6617f7ec94e22d3e1e137bf6386188c827575e7778f8d1d69dce8817efa752f2'\n\n url \"https://iconfactory.com/assets/software/xscope/xScope-#{version}.zip\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Bowery.app to version 3.2.11\n"
},
{
"from": "human",
"value": "class Bowery < Cask\n version '3.2.9'\n sha256 'fbcc62c54f24b75ade5b43037fea20d388c3a61aaf458d3295fc51975eb27c16'\n\n url \"http://desktop.bowery.io/#{version}_darwin_amd64.zip\"\n homepage '... | ruby | chosen |
[
{
"from": "system",
"value": "Return ascii dragonfly if '/' or '' "
},
{
"from": "human",
"value": "module Dragonfly\n class SimpleEndpoint\n\n include Endpoint\n include Loggable\n\n # Instance methods\n\n def initialize(app)\n @app = app\n use_same_log_as(app)\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Raise Error on Empty Body\n"
},
{
"from": "human",
"value": "require \"faraday\"\nrequire \"faraday_middleware\"\n\nmodule FayeSimpleClient\n class CustomError < StandardError; end\n class Client\n\n class << self\n attr_accessor :endpoint, :secret\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add route to view a single user.\n"
},
{
"from": "human",
"value": "get '/signup' do\n # if user is logged in, redirect, else\n erb :'users/signup'\nend\n\npost '/users' do\n @user = User.new(params[:user])\n\n if @user.save\n redirect '/'\n else\n @error... | ruby | chosen |
[
{
"from": "system",
"value": "Return gene/variant name and id for assertions\n"
},
{
"from": "human",
"value": "class AssertionIndexPresenter\n attr_reader :assertion\n\n def initialize(assertion)\n @assertion = assertion\n end\n\n def as_json(opts = {})\n {\n id: assertion.id,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update the Podspec for the 1.5.0-rc.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Swifter\"\n s.version = \"1.4.7\"\n s.summary = \"Tiny http server engine written in Swift programming langua... | ruby | chosen |
[
{
"from": "system",
"value": "Implement equality method for Ratings\n"
},
{
"from": "human",
"value": "module AppReputation\n class Ratings\n attr_reader :statistics\n \n def initialize(*statistics)\n # statistics start from one star to top stars\n @statistics = statistics\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update state-machines_yard patch for wider syntax support\n"
},
{
"from": "human",
"value": "require 'state_machines/graphviz'\n\nclass StateMachine::YARD::Handlers::Transition\n def process\n if [StateMachines::Machine, StateMachines::Event, StateMachines::Stat... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude erb files from prefer single quotes linting rule\n"
},
{
"from": "human",
"value": "# Borrowed from customink's foodcritic rules\n# See https://github.com/customink-webops/foodcritic-rules/blob/master/rules.rb\n\nrule 'RALY001', 'Prefer single-quoted strings... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the safe navigation operator, in order to support older Ruby versions.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'health_monitor/configuration'\n\nmodule HealthMonitor\n STATUSES = {\n ok: 'OK',\n error: 'ERROR'\n }.f... | ruby | chosen |
[
{
"from": "human",
"value": "Add an Opscode SemVer class\n"
},
{
"from": "gpt",
"value": "require 'opscode/semver'\n\nmodule Opscode\n \n # Defines the format of the semantic version scheme used for Opscode\n # projects. They are SemVer-2.0.0-rc.1 compliant, but we further\n # constrain the... | ruby | chosen |
[
{
"from": "system",
"value": "Disable MethodLength cop in inevitably long method\n"
},
{
"from": "human",
"value": "require \"optparse\"\n\nmodule Rubycritic\n module Cli\n class Options\n def initialize(argv)\n @argv = argv\n @parser = OptionParser.new\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant lazy_attr_reader and alias collection to resuts\n"
},
{
"from": "human",
"value": "require 'twitter/base'\n\nmodule Twitter\n class SearchResults < Twitter::Base\n\n lazy_attr_reader :results, :completed_in, :max_id, :max_id_str, :next_path, :pa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix access of class level attrs"
},
{
"from": "human",
"value": "module Vidibus\n module Sysinfo\n class Result\n include Helper\n\n def initialize(options)\n @@attrs.each do |attr|\n instance_variable_set(\"@#{attr}\", options[attr])\n... | ruby | chosen |
[
{
"from": "system",
"value": "Disable index.html caching until login resolved.\n\n"
},
{
"from": "human",
"value": "class DisplaysController < ApplicationController\n\n caches_page :index\n\n def index\n render :layout => 'full_map'\n end\n \n def kml\n #Generate route information\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Rearrange ProjectsController to match life cycle\n"
},
{
"from": "human",
"value": "class ProjectsController < ApplicationController\n def new\n @project = Project.new\n end\n def create\n @project = Project.new(project_params)\n\n if @project.save\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve error message on login\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n skip_before_action :authenticate_user_from_token!\n\n def create\n @user = User.find_for_database_authentication(email: params[:email])\n ret... | ruby | chosen |
[
{
"from": "system",
"value": "Add tasting_notes to strong params\n"
},
{
"from": "human",
"value": "class TastingsController < ApplicationController\n\n # redirect back to events show_quiz method\n def create\n event_wine = EventWine.find(params[:event_wine_id])\n event = event_wine.even... | ruby | chosen |
[
{
"from": "system",
"value": "Handle variations in floating point precision between ruby versions\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass NearTest < Test::Unit::TestCase\n\n def test_near_scope_options\n result = Event.near_scope_options(1.0, 2.0, 5)\n expected =... | ruby | chosen |
[
{
"from": "system",
"value": "Remove leftover awesome_print debug code\n"
},
{
"from": "human",
"value": "require 'rest-client'\nrequire 'json'\n\nmodule AppleVPP\n class Request\n\n def self.submit( url, s_token = nil, body = {} )\n body['sToken'] = s_token\n body.delete_if { |_k,... | ruby | chosen |
[
{
"from": "system",
"value": "Make it work with JRuby\n"
},
{
"from": "human",
"value": "# Maintain your gem's version:\nrequire_relative 'lib/rocket_job_mission_control/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name = 'rocketjob_mis... | ruby | chosen |
[
{
"from": "system",
"value": "Add the homepage in the 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 'proteus/version'\n\nGem::Specification.new do |gem|\n gem.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add simplecov to development dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'wptemplates/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Increase minor version to 1.0.4\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"BluemixAppID\"\n s.version = '1.0.3'\n s.summary = \"AppID Swift SDK\"\n s.homepage = \"https://github.com/ibm-bluemix-mobile-servi... | ruby | chosen |
[
{
"from": "system",
"value": "Update references to component guide\n"
},
{
"from": "human",
"value": "class ContentItemRetriever\n def self.fetch(slug)\n Services.content_store.content_item(\"/#{slug}\")\n .to_hash.with_indifferent_access\n\n rescue GdsApi::HTTPNotFound, GdsApi::HTTPGo... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to rename some heater keys\n"
},
{
"from": "gpt",
"value": "class RenameHeaters < ActiveRecord::Migration[5.0]\n RENAMED_KEYS = {\n \"energy_import_heat_demand\" => \"energy_heat_import_steam_hot_water_demand\",\n \"input_energy_heater_for_he... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to allow other videos to be embedded\n\nIN addition to vimeo and youtube videos, this will allow other video\nurls to be used. This will not be publicly announced for now.\n"
},
{
"from": "human",
"value": "module ArticlesHelper\n def embed(video_url)\n retu... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper to convert time\n"
},
{
"from": "human",
"value": "module ServicesHelper\n def show_time(string)\n Time.zone.parse(string).strftime('%l:%M%p').squish unless string.nil?\n end\nend\n"
},
{
"from": "gpt",
"value": "module ServicesHelper\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"unraveling more stuff that is preventing migrations\"\n\nThis reverts commit dcdaae7160a348a2b40ac7f6fe234d3fd0f35620.\n"
},
{
"from": "human",
"value": "module Hanuman\n class Question < ActiveRecord::Base\n has_paper_trail\n belongs_to :answer_type... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundler in application, simplify devel trick (after Gemfile development gem of self, Dir.pwd is the same as loaded_spec full_gem_path), don't require progressbar.\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby\n\nrequire 'rubygems'\ngem 'github-api-client'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add a POST route to example.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\nrequire './lib/dolphy'\n\napp = DolphyApplication.app do\n get '/hello' do\n haml :index, :body => \"hello\"\n end\n\n get '/wat' do\n erb :what, :bo... | ruby | chosen |
[
{
"from": "system",
"value": "Set DB encoding to UTF8"
},
{
"from": "human",
"value": "require 'fileutils'\nrequire 'logger'\nrequire 'sequel'\nrequire 'pact_broker'\n\n# Create a real database, and set the credentials for it here\nDATABASE_CREDENTIALS = {database: \"pact_broker_database\", adap... | ruby | chosen |
[
{
"from": "system",
"value": "Write more specs for config\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Friendable do\n it { should respond_to :redis }\n it { should respond_to :resource_class }\n it { should respond_to :resource_class= }\n its(:redis) { should be_a(Re... | ruby | chosen |
[
{
"from": "system",
"value": "Fix unit tests for server\n"
},
{
"from": "human",
"value": "describe Calabash::Server do\n let(:url) {'URL'}\n\n it 'should initialize using a url as its first and only parameter' do\n Calabash::Server.new(url)\n end\n\n it 'should save the url given when in... | ruby | chosen |
[
{
"from": "system",
"value": "Add unit tests for stashes\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Stash do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Stash do\n\n bef... | ruby | chosen |
[
{
"from": "human",
"value": "Add test cases for new example\n"
},
{
"from": "gpt",
"value": "require_relative \"../launch.rb\"\nrequire 'minitest/autorun'\nrequire 'rack/test'\n\ninclude Rack::Test::Methods\n\ndef app\n Sinatra::Application\nend\n\ndescribe \"Example\" do\n describe 'HelloWorl... | ruby | chosen |
[
{
"from": "system",
"value": "Put this in it's own method.\n"
},
{
"from": "human",
"value": "module Mactag\n module Tag\n ##\n #\n # Tags plugins in current Rails application.\n #\n # ==== Examples\n # Mactag::Table.generate do\n # # Tag single plugin\n # plug... | ruby | chosen |
[
{
"from": "system",
"value": "Add minor typing time for Slack\n"
},
{
"from": "human",
"value": "require \"meuh\"\n\nmodule Meuh\n module SlackPlugin\n def self.extended(base)\n base.class_eval do\n @@meuh = Meuh::Brain.new\n\n match /^.*$/ do |client, data, match|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some much needed documentation.\n"
},
{
"from": "human",
"value": "module Octonore\n\n # A gitignore template. Templates consist of a name and source.\n class Template\n\n attr_accessor :name, :source\n\n include HTTParty\n\n USER_AGENT = \"octocore/#... | ruby | chosen |
[
{
"from": "system",
"value": "Add more information in SubTenant Clients\n"
},
{
"from": "human",
"value": "json.sub_tenant do\n json.partial! 'sub_tenant', sub_tenant: @sub_tenant\n\n json.clients @sub_tenant_clients do |org|\n json.id org.id\n json.uid org.uid\n json.name org.name\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade FileZilla.App to v3.10.0.2 and add name\n\nUpgrade FileZilla.app to v3.10.0.2 and added name\n\nUpgrade FileZilla.app to v3.10.0.2 and added name\n\nMy last commit used wrong '' instead of \"\", making it fail.\n"
},
{
"from": "human",
"value": "cask :v1 => ... | ruby | chosen |
[
{
"from": "human",
"value": "Bring the tests into version control\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass REPLTest < ActiveSupport::TestCase\n setup do\n @dummy1 = @dummy = WebConsole::REPL::Dummy.new\n @dummy2 = WebConsole::REPL::Dummy.new\n end\n\n test 'sendin... | ruby | chosen |
[
{
"from": "system",
"value": "Add bluecloth to global gems\n"
},
{
"from": "human",
"value": "\nrequire_relative 'lib/homebrew'\nrequire_relative 'lib/rbenv'\n\ntask :rbenv => 'rbenv:update'\n\nnamespace :rbenv do\n\n GLOBAL_GEMS = %w{bundler pry rspec rake}\n\n task :install do\n u... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for RuboCop `$LOAD_PATH`.\n"
},
{
"from": "gpt",
"value": "require \"open3\"\n\ndescribe \"RuboCop\" do\n context \"when calling `rubocop` outside of the Homebrew environment\" do\n before do\n ENV.keys.each do |key|\n ENV.delete(key) if key.... | ruby | chosen |
[
{
"from": "human",
"value": "Add the beginning of a feature spec for the student role\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'Student users', type: :feature do\n before do\n include Devise::TestHelpers, type: :feature\n Capybara.current_driver = :selenium\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for the contact_details helper"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe PeopleHelper, :type => :helper do\n it \"should return a name for each day\" do\n expect(day_name(:works_wednesday)).to eql(\"Wednesday\")\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Print time taken to the log in CI as well as locally.\n"
},
{
"from": "human",
"value": "module PerformanceHelper\n require 'ruby-prof'\n\n def start_profiling(measure_mode = RubyProf::PROCESS_TIME)\n RubyProf.measure_mode = measure_mode\n RubyProf.start\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the Apache-2.0 license code to the 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 'rspec/tabular/version'\n\nGem::Specification.new do |spec... | ruby | chosen |
[
{
"from": "system",
"value": "Store exported file in a shared location\n\nThis means historical exports are stored in a consistant location\n"
},
{
"from": "human",
"value": "require \"analytics_data\"\nrequire \"csv\"\n\nnamespace :analytics do\n desc \"\n Export all indexed pages to a CSV su... | ruby | chosen |
[
{
"from": "system",
"value": "Change to cprice404 namespace for puppetdb module\n\nLooks like there might be one more small bug in the\npuppetdb module. I've fixed it and released it\nto cprice404 namespace; changing the acceptance\ntests to point to that so that we can test it out\nbefore pushing it up to... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - russian postal code checker\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/552e45cc30b0dbd01100001a/\n# --- iteration 1 ---\ndef zipvalidate(postcode)\n /\\A[123460]\\d{5}\\Z/ === postcode\nend\n# --- iteration 2 ---\ndef zipvali... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Iterator from OneToMany since it was moved to a separate file\n"
},
{
"from": "human",
"value": "module DataMapper\n class Relationship\n\n class OneToMany < self\n\n module Iterator\n\n # Iterate over the loaded domain objects\n #\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Default alert in Redis to a string\"\n\nThis reverts commit e1dae71224796e27b3e24664f75a410c15f82ebb.\n"
},
{
"from": "human",
"value": "module Rpush\n module Client\n module Redis\n module Apns\n class Notification < Rpush::Client::Redis::N... | ruby | chosen |
[
{
"from": "system",
"value": "Move report setup to a before_filter so it can be overridden\n"
},
{
"from": "human",
"value": "module Compendium\n class ReportsController < ::ApplicationController\n helper Compendium::ReportsHelper\n\n before_filter :find_report\n before_filter :run_rep... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging for oEmbed error\n"
},
{
"from": "human",
"value": "Spree::ProductsController.class_eval do\n\n helper 'spree/products'\n\n def oEmbed\n id = params[:url].scan(/https?:\\/\\/(.*)?\\/products\\/(.*)/).first.last\n @product = Spree::Product.find_by... | ruby | chosen |
[
{
"from": "system",
"value": "Use tap command for better readability\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Clusters\n module Concerns\n module ApplicationCore\n extend ActiveSupport::Concern\n\n included do\n belongs_to :cluster, class_na... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake development dependency to >= 12.3.3\n\nhttps://github.com/advisories/GHSA-jppv-gw3r-w3q8\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 's3_... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests for the help command\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Tugboat::CLI do\n include_context \"spec\"\n\n describe \"help\" do\n it \"shows a help message\" do\n @cli.help\n expect($stdout.string).to match(\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use shared examples for array-like behavior\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Verso::EditionList do\n use_vcr_cassette :record => :new_episodes\n\n before(:each) do\n @editions = Verso::EditionList.new\n end\n\n describe 'ar... | ruby | chosen |
[
{
"from": "system",
"value": "Use ERB same as ActiveRecord rake task\n"
},
{
"from": "human",
"value": "require \"daimon_skycrawlers/storage/base\"\nrequire \"active_record\"\n\nmodule DaimonSkycrawlers\n module Storage\n #\n # Storage for RDBMS\n #\n class RDB < Base\n def ini... | ruby | chosen |
[
{
"from": "human",
"value": "Add env_var filtering to Squash::Ruby via monkey-patch\n"
},
{
"from": "gpt",
"value": "require \"squash/ruby\"\n\nmodule Squash::Ruby\n\n # You need to set a configuration :filter_env_vars and :filter_argv\n # These are supposed to contain lambdas/procs that will ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary source range in AnyInstance\n\nThis is the entire send node so we don't have to specify the range\n"
},
{
"from": "human",
"value": "module RuboCop\n module Cop\n module RSpec\n # Pefer instance doubles over stubbing any instance of a cla... | ruby | chosen |
[
{
"from": "system",
"value": "Rename actual to process for readability\n"
},
{
"from": "human",
"value": "RSpec::Matchers.define :be_running do\n match do |actual|\n ret = ssh_exec(commands.check_running(actual))\n if ret[:exit_code] == 1 || ret[:stdout] =~ /stopped/\n ret = ssh_exec... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare for using Paperclip 4\n"
},
{
"from": "human",
"value": "class UserFile < ActiveRecord::Base\n has_attached_file :attachment, :path => ':rails_root/uploads/:rails_env/:id/:style/:id', :restricted_characters => RESTRICTED_CHARACTERS\n\n belongs_to :folder\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add IntelliJ IDEA Ultimate recipe\n"
},
{
"from": "gpt",
"value": "intellij_version = \"10.5.2\"\npivotal_workstation_package \"IntelliJ IDEA 10\" do\n source \"http://download.jetbrains.com/idea/ideaIU-#{intellij_version}.dmg\"\n action :install\n checksum \"667c... | ruby | chosen |
[
{
"from": "system",
"value": "Change haml gem dependency to be pessimistic\n\nThis is better practice.\n\nChange-Id: Ia9d2a840cec784c0ef3ebf108fb478f4c76376c9\nReviewed-on: http://gerrit.causes.com/40431\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@causes.com>\nReviewed-by: Shane da Silva <... | ruby | chosen |
[
{
"from": "system",
"value": "Configure test to use named params\n"
},
{
"from": "human",
"value": "require './test/test_helper'\n\nclass ScraperTest < Minitest::Test\n\n def test_exists\n assert Scraper\n end\n\n def test_scrapes_element\n # https://www.hipmunk.com/flights#f=YVR;t=NYC;... | ruby | chosen |
[
{
"from": "system",
"value": "Apply safeware patterns for middleware.\n\nRationale: https://gist.github.com/raggi/4463147\n"
},
{
"from": "human",
"value": "module Chillout\n module Middleware\n class CreationsMonitor\n def initialize(app, client)\n @app = app\n @client = ... | ruby | chosen |
[
{
"from": "system",
"value": "Test that serif -h|--help exits.\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass Serif::Commands\n def exit(code)\n \"Fake exit with code #{code}\"\n end\nend\n\ndescribe Serif::Commands do\n def expect_method_call(arg, method)\n c = Ser... | ruby | chosen |
[
{
"from": "system",
"value": "Move rake and rspec to development dependencies. See CP-1663.\n\ngit-svn-id: 7938b9a47192f562a30bc1d60d71b5a3b9844587@7080 bc291798-7d79-44a5-a816-fbf4f7d05ffa\n"
},
{
"from": "human",
"value": "\n# -*- encoding: utf-8 -*-i\nlib = File.expand_path('../lib/', __FILE... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused methods eq? eql? and hash from Card\n\nLeaving in == so that one may do set operations on Card Arrays\n"
},
{
"from": "human",
"value": "class Card < Struct.new(:rank, :suit)\n RANKS = %w( 2 3 4 5 6 7 8 9 10 jack queen king ace ).freeze\n SUITS = %w(... | ruby | chosen |
[
{
"from": "system",
"value": "Change OrganisationWriter to write UID rather than name\n"
},
{
"from": "human",
"value": "module RotaGeneration\n class OrganisationWriter\n def initialize(organisations, container_path)\n @organisations = organisations\n @container_path = container_p... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for button tenant manage quota in OpsController\n"
},
{
"from": "gpt",
"value": "describe ApplicationHelper::Button::Basic do\n context \"Button Manage Tenant Quota in OpsController\" do\n let(:controller) { OpsController.new }\n\n let(:button) { Appl... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce allocations in action_view cache expiry\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActionView\n class CacheExpiry\n class Executor\n def initialize(watcher:)\n @cache_expiry = CacheExpiry.new(watcher: watcher)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Copy pasting got me. Correcting folder name\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'SigmaticUI'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'Coaoa UI Platform and Utilities.'\n s.homepage = 'https://github.com/Sigm... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod version for 3.1.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SwiftyJSON\"\n s.version = \"3.0.0\"\n s.summary = \"SwiftyJSON makes it easy to deal with JSON data in Swift\"\n s.homepage = \"https://github.co... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Remove extra param to fix circular dependency warning\n"
},
{
"from": "human",
"value": "class Campus < ActiveRecord::Base\n # Relationships\n has_many :tutorials, dependent: :delete_all\n has_many :projects, dependent: :delete_all\n\n validates :nam... | ruby | chosen |
[
{
"from": "system",
"value": "Define default_test for 1.8 test/unit\n"
},
{
"from": "human",
"value": "require 'test/unit'\n\nrequire 'active_support/dependencies'\nrequire 'action_view'\nrequire 'action_view/mustache'\nrequire 'action_view/template/handlers/mustache'\nrequire 'action_view/helpe... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.