conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix failing 1.8.7 travis builds by sorting expected hash keys\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe DataMagic do\n context \"when configuring the yml directory\" do\n before(:each) do\n DataMagic.yml_directory = nil\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Check customer exists before fetching payment method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule PaymentProcessor::Braintree\n class OneClickFromUri\n attr_reader :params, :page, :member, :cookied_payment_methods\n\n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Correct docs as singlton true is not returned here\n\n[ci skip]\n"
},
{
"from": "human",
"value": "class LoadError\n REGEXPS = [\n /^no such file to load -- (.+)$/i,\n /^Missing \\w+ (?:file\\s*)?([^\\s]+.rb)$/i,\n /^Missing API definition file in (.+)$/i,... | ruby | chosen |
[
{
"from": "system",
"value": "Use mock object instead of Object instance w/ stubbed method\n\nThere doesn't seem to be any good reason to use `Object.new` here and using\na bona fide mock object has the benefit of not having to stub a non-existent\nmethod (i.e. `Object#process).\n"
},
{
"from": "hum... | ruby | chosen |
[
{
"from": "system",
"value": "Use where(...).count instead of conditions.\n"
},
{
"from": "human",
"value": "module Refinery\n module Inquiries\n module Admin\n class InquiriesController < ::Refinery::AdminController\n\n crudify :'refinery/inquiries/inquiry',\n :ti... | ruby | chosen |
[
{
"from": "system",
"value": "Change ' -> ’ in podspec summary\n\n- That is change the typewrite apostrophe to a real apostrophe.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SPTDataLoader\"\n s.version = \"1.1.0\"\n s.summary = \"SPTDataLoade... | ruby | chosen |
[
{
"from": "system",
"value": "Fix login date not showing up in login history by using “public” pack\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Settings::LoginActivitiesController < Settings::BaseController\n def index\n @login_activities = LoginActivity.where(u... | ruby | chosen |
[
{
"from": "system",
"value": "Add clearing of the session hash when game ends\n\n- save the session final score in local variable\n- clear session hash\n- show output\n"
},
{
"from": "human",
"value": "# Homepage (Root path)\nget '/' do\n redirect \"/topics\"\nend\n\nget '/topics/:id' do |id|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix regimen_item test failure in Sync::Fetch\n"
},
{
"from": "human",
"value": "module Sync\n class Fetch < Mutations::Command\n required do\n model :device, class: Device\n end\n\n def execute\n message = {\n device: device,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Git as a requirement to the gemspec"
},
{
"from": "human",
"value": "# This code is free software; you can redistribute it and/or modify it under\n# the terms of the new BSD License.\n#\n# Copyright (c) 2011, Sebastian Staudt\n\nrequire File.expand_path(File.dir... | ruby | chosen |
[
{
"from": "system",
"value": "Set default user locale on signup\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Auth::RegistrationsController < Devise::RegistrationsController\n layout :determine_layout\n\n before_action :check_enabled_registrations, only: [:new, :cre... | ruby | chosen |
[
{
"from": "system",
"value": "Use standard image tag when no value\n"
},
{
"from": "human",
"value": "module TypeStation\n class ContentPresenter < BasePresenter\n presents :content\n\n def tag(default, options = {})\n css_class = options.delete(:class) if options.include?(:class)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct last migration not to remove the body\n\nAlso added proper 'down' method\n"
},
{
"from": "human",
"value": "class MigrateNotesToEditorsOnEdition < ActiveRecord::Migration\n def up\n Edition.where('notes_to_editors !=\"\"').each do |edition| \n editi... | ruby | chosen |
[
{
"from": "system",
"value": "Check if redis is inside heroku\n"
},
{
"from": "human",
"value": "require 'hipchat'\nrequire 'redis'\nrequire 'Redditkit'\n\n$room = ENV['ROOM']\n$hipchat_api_token = ENV['HIPCHAT_TOKEN']\n\nclass Gifs\n def self.run\n hipchat = HipChat::Client.new($hipchat_api... | ruby | chosen |
[
{
"from": "system",
"value": "Save asset path before asset is removed in the DeleteAssetFileFromNfsWorker\n\nOnce the asset was removed the file path no longer existed, so it was unable to\ndelete it.\n"
},
{
"from": "human",
"value": "class DeleteAssetFileFromNfsWorker\n include Sidekiq::Worke... | ruby | chosen |
[
{
"from": "system",
"value": "Gmp4: Fix legacy (not working) compiler check.\n\n* Keg_only because of conflict with gmp.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Gmp4 < Formula\n homepage 'http://gmplib.org/'\n url 'ftp://ftp.gmplib.org/pub/gmp-4.3.2/gmp-4.3.2.tar.bz2'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump podspec version 0.3.0 -> 0.4.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"YouTubePlayer\"\n s.version = \"0.3.0\"\n s.summary = \"Swift library for embedding and controlling YouTube videos in your iOS applications\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ERROR: operator does not exist: boolean = integer with Postgres\n"
},
{
"from": "human",
"value": "class AddRepositoriesIsDiffEmailAttached < ActiveRecord::Migration\n def self.up\n add_column :repositories, :is_diff_email_attached, :boolean, :default => fa... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'activerecord' to gem dependency\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/active_model/attribute_changed_specification/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'activemodel-attribute_changed_specifi... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing gettext into MiqDialog\n"
},
{
"from": "human",
"value": "class MiqDialog < ApplicationRecord\n validates_presence_of :name, :description\n validates_uniqueness_of :name, :scope => :dialog_type, :case_sensitive => false\n\n DIALOG_DIR = Rails.root.j... | ruby | chosen |
[
{
"from": "system",
"value": "Fix param name for demo\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire_relative 'demo_base'\nrequire_relative 'forecast_io'\n\nweather = TLAW::Examples::ForecastIO\n .new(api_key: ENV['FORECAST_IO'], units: :si)\n\npp weather.forecast(49.999892, 36... | ruby | chosen |
[
{
"from": "system",
"value": "Add activesupport in the gemspec 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 'acc/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Update changes logs logic:\nFind changes in client side using json patch and send them to server.\n\n[BLT-4028]\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\nmodule BeRevisable\n module Logable\n extend ActiveSupport::Concern\n\n includ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a feature spec for the performance bar\n\nSigned-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'User can display performacne bar', :js do\n shared_examples 'performan... | ruby | chosen |
[
{
"from": "system",
"value": ":sparkles: Add a option that dump as a JSON string\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'gems_comparator'\nrequire 'optparse'\n\nmodule BundlerDiffgems\n class CLI\n DEFAULT_OPTIONS = {\n commit: 'HEAD',\n format: :... | ruby | chosen |
[
{
"from": "system",
"value": "Add Created and Updated to Summary screen\n"
},
{
"from": "human",
"value": "module GenericObjectHelper::TextualSummary\n include TextualMixins::TextualName\n\n def textual_group_properties\n TextualGroup.new(_(\"Properties\"), %i(name))\n end\n\n def textual... | ruby | chosen |
[
{
"from": "system",
"value": "Use forward slash for paths\n"
},
{
"from": "human",
"value": "describe \"sets $VERBOSE to true\", :shared => true do\n it \"sets $VERBOSE to true\" do\n ruby_exe(\"fixtures/verbose.rb\", :options => @method, :dir => \"#{File.dirname(__FILE__)}\\\\..\").chomp.ma... | ruby | chosen |
[
{
"from": "human",
"value": "Add Skill Level Attribute to PositionsUser\n\nPositionUser table already has a few rows. Migration assigns an initial value\nto the new skill_level attribute, then changes the column to not-null for\nfuture rows.\n"
},
{
"from": "gpt",
"value": "class AddSkillLevelT... | ruby | chosen |
[
{
"from": "system",
"value": "Allow users to add `db.lock` for the MongoDB database to the (global) default settings."
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Backup\n module Configuration\n module Database\n class MongoDB < Base\n class << self\n\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Use \u0001file_cache_path path to store chef-client\n\nUse \u0001file_cache_path path to store chef-client instead of /opt"
},
{
"from": "human",
"value": "default[:omnibus_updater][:version] = nil\ndefault[:omnibus_updater][:force_latest] = false\ndefault[:omnibus_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove attributes that are no longer used"
},
{
"from": "human",
"value": "#\n# Cookbook:: apache2\n# Attributes:: default\n#\n# Copyright:: 2008-2017, Chef Software, Inc.\n# Copyright:: 2014, Viverae, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \... | ruby | chosen |
[
{
"from": "system",
"value": "Define initialize_internals so you don't have to override initialize itself"
},
{
"from": "human",
"value": "module Lackeys\n class ServiceBase\n def initialize(parent)\n @parent = parent\n end\n\n def parent; @parent; end\n\n def commit\n rai... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade VMware Horizon Client to 3.5.2-3151577 to make sure it works properly under El Capitan\n"
},
{
"from": "human",
"value": "cask :v1 => 'vmware-horizon-client' do\n version '3.4.0-2769709'\n sha256 'df0ed13716d4dbd5dae7dc77f2f29668907860b205f50132b6a1533364d... | ruby | chosen |
[
{
"from": "human",
"value": "Implement the DbDelete button class\n"
},
{
"from": "gpt",
"value": "class ApplicationHelper::Button::DbDelete < ApplicationHelper::Button::Basic\n def disabled?\n @error_message = _('Default Dashboard cannot be deleted') if @db.read_only\n @error_message.pres... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the devise helper signed_in_root_path call\n\nsigned_in_root_path is a helper from devise controller\nso it needs to be called from controller and not from routes.\n\nFixes #280\n"
},
{
"from": "human",
"value": "class Spree::UserConfirmationsController < Devise... | ruby | chosen |
[
{
"from": "system",
"value": "Remove . from test matcher, adds no value\n"
},
{
"from": "human",
"value": "$: << 'cf_spec'\nrequire 'cf_spec_helper'\n\ndescribe 'Version output' do\n subject(:app) { Machete.deploy_app(app_name) }\n let(:app_name) { 'sinatra_web_app' }\n\n context 'in an onlin... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to index document column\n"
},
{
"from": "gpt",
"value": "class AddIndexToNoteDocument < ActiveRecord::Migration[6.0]\n def up\n execute 'SET statement_timeout = 0;'\n execute <<-SQL\n CREATE INDEX notes_document_gin on notes using GIN(to_ts... | ruby | chosen |
[
{
"from": "system",
"value": "Allow button to take opts\n"
},
{
"from": "human",
"value": "module DeviseAuthy\n module Views\n module Helpers\n\n def authy_request_sms_link\n link_to(\n I18n.t('request_sms', {:scope => 'devise'}),\n url_for([resource_name, :requ... | ruby | chosen |
[
{
"from": "system",
"value": "Use scope out for the model class\n"
},
{
"from": "human",
"value": "module DeviseMasquerade\n module Controllers\n module Helpers\n def self.define_helpers(mapping)\n name = mapping.name\n\n class_eval <<-METHODS, __FILE__, __LINE__ + 1\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Stop reporting 404s to Rollbar\n"
},
{
"from": "human",
"value": "require 'rollbar/rails'\nRollbar.configure do |config|\n # Without configuration, Rollbar is enabled in all environments.\n # To disable in specific environments, set config.enabled=false.\n\n conf... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n module Serverside\n class Adapter\n VERSION = \"2.0.6\"\n # For backwards compatibility, the serverside version default will be maintained until 2.1\n # It is recommended tha... | ruby | chosen |
[
{
"from": "system",
"value": "Add summary attribute to gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"growl_windows\"\n s.version = \"0.1.0\"\n\n s.authors = \"debbbbie\"\n s.date = \"2013-12-09\"\n s.description = \"Mak... | ruby | chosen |
[
{
"from": "system",
"value": "Add a pending transfer condition to daily email\n"
},
{
"from": "human",
"value": "namespace :daily_emails do\n task send: [:balance]\n\n desc 'Sends users an email if they owe someone money'\n task balance: :environment do\n User.find_each do |user|\n ba... | ruby | chosen |
[
{
"from": "system",
"value": "Create rake task that copies view files into the generator/template directory for use when updating gem views"
},
{
"from": "human",
"value": "# desc \"Explaining what the task does\"\n# task :stylin do\n# # Task goes here\n# end\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add reader to content for Template::Runner::Base\n"
},
{
"from": "human",
"value": "require 'template/helper/base'\nrequire 'template/helper/info'\n\nclass Template::Runner::Base\n include Template::Helper::Base\n include Template::Helper::Info\n\n attr_accessor ... | ruby | chosen |
[
{
"from": "system",
"value": "Use pre configured claim from factory girl instead of going through each page to complete a claim to speed up the feature."
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Quick edit' do\n include FormMethods\n\n sections = %w<claimant represent... | ruby | chosen |
[
{
"from": "system",
"value": "Check for tweets every hour\n"
},
{
"from": "human",
"value": "module TweetToToot\n class Runner\n attr_accessor :handles, :sleep_time, :logger\n\n def initialize(mastodon, twitter, handles = nil, sleep_time = 60)\n @mastodon = mastodon\n @twitter... | ruby | chosen |
[
{
"from": "system",
"value": "Improve spec for mathn on Ruby 2.5+\n"
},
{
"from": "human",
"value": "require_relative '../../spec_helper'\n\ndescribe \"mathn\" do\n ruby_version_is \"2.5\" do\n it \"is no longer part of the standard library\" do\n -> { require \"mathn\" }.should raise_e... | ruby | chosen |
[
{
"from": "system",
"value": "Add the 'new' template with a 'new task' form\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'slim'\nrequire 'data_mapper'\nrequire 'dm-postgres-adapter'\nrequire 'pathname'\n\nconfigure :development do\n require 'dm-sqlite-adapter'\nend\n\nconfigure... | ruby | chosen |
[
{
"from": "system",
"value": "Drop unnecessary db clear from api specs\n"
},
{
"from": "human",
"value": "require_relative '../../../../apps/api/controllers/users/show'\n\nRSpec.describe Api::Controllers::Users::Show do\n let(:action) { described_class.new }\n let(:params) { Hash[id: user.logi... | ruby | chosen |
[
{
"from": "system",
"value": "Change descriptions in tests for FCReminder::Providers::Base"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FCReminder::Providers::Base do\n subject(:provider) { FCReminder::Providers::Base.new }\n let(:team_name) { \"Barcelona\" }\n\n context... | ruby | chosen |
[
{
"from": "system",
"value": "Reset data_providers_for after each spec - that way\nthe specs can run for each individual API provider"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nshared_examples \"a data provider\" do\n let(:data_provider) { described_class.new() }\n\n it { should... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing spec for options\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Gregex::RegexParser do\n describe \"#original_options\" do\n describe \"checks if option i is given\" do\n it \"with i in original regex and as option given\" ... | ruby | chosen |
[
{
"from": "human",
"value": "Move shoulda-matchers config to separate file\n"
},
{
"from": "gpt",
"value": "require \"shoulda/matchers\"\n\n# See various fixes outlined here:\n# https://github.com/thoughtbot/shoulda/issues/203#issuecomment-148065421\nShoulda::Matchers.configure do |config|\n co... | ruby | chosen |
[
{
"from": "system",
"value": "Create DemographicInfo when at least one answer present\n"
},
{
"from": "human",
"value": "class DemographicInfosController < ApplicationController\n\n def create\n user = Order.find(params[:order_id]).user\n user.create_demographic_info(params[:demographic_i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix race conditions in module loading\n"
},
{
"from": "human",
"value": "require 'mongo'\nrequire 'mongoid'\nmodule Juicy\nend\n\n# Dir[File.dirname(__FILE__) + '/juicy/**.rb'].each {|file| require file }\nDir[File.dirname(__FILE__) + '/juicy/**/*.rb'].each do |fil... | ruby | chosen |
[
{
"from": "system",
"value": "Add changes skipped in previous commit\n"
},
{
"from": "human",
"value": "require \"minly/version\"\nrequire \"minly/url\"\n\nmodule Minly\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "require \"minly/version\"\nrequire \"minly/url\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Update current_user to be article creator\n"
},
{
"from": "human",
"value": "class ArticlesController < ApplicationController\n before_action :set_article, only:[:edit,:update,:show,:destroy]\n before_action :require_user, except:[:index, :show]\n before_action :... | ruby | chosen |
[
{
"from": "system",
"value": "Order contact groups filter by title\n"
},
{
"from": "human",
"value": "class ContactsController < ApplicationController\n expose(:search) {\n ContactsSearch.new search_params\n }\n\n expose(:contact_groups) {\n contact_group_ids = department.contacts.map d... | ruby | chosen |
[
{
"from": "system",
"value": "Add authorization check for dataset access\n"
},
{
"from": "human",
"value": "class DatasetsController < ApplicationController\n\n # GET /datasets/:id\n def show\n dataset = Dataset.find(params[:id])\n filename = dataset.visualization.name\n\n respond_to ... | ruby | chosen |
[
{
"from": "system",
"value": "Use OmniauthSignIn class to update user's attributes on login\n"
},
{
"from": "human",
"value": "class SessionsController < Devise::SessionsController\n include OmniauthAuthenticationControllerHelpers\n\n after_filter :attach_omniauth_authorization,\n only: :cr... | ruby | chosen |
[
{
"from": "system",
"value": "Add test coverage for Version."
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Launchy::VERSION' do\n it \"should have a #.#.# format\" do\n Launchy::VERSION.must_match( /\\d+\\.\\d+\\.\\d+/ )\n Launchy::Version.to_a.each do |n|\n n.t... | ruby | chosen |
[
{
"from": "system",
"value": "Add updated_at timestamp to Account\n"
},
{
"from": "human",
"value": "require 'data_mapper'\n\nmodule AccountBooks\n class Account\n include DataMapper::Resource\n\n property :id, Serial\n property :name, String, required: true, unique: true\n property... | ruby | chosen |
[
{
"from": "system",
"value": "Copy some message attributes to the response and add some more reasonable defaults (as seen in RubyDNS)\n"
},
{
"from": "human",
"value": "require 'resolv'\n\nmodule Celluloid\n module DNS\n class Request\n attr_reader :questions\n \n def initiali... | ruby | chosen |
[
{
"from": "system",
"value": "Fix stupid Rake task bug\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire 'rake/tasklib'\nrequire 'arst'\n\nmodule ARST\n \n class RakeTask < Rake::TaskLib\n \n attr_reader :generators\n \n def initialize(&block)\n @generators = []\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Rack:Cache store for disk space.\n"
},
{
"from": "human",
"value": "require 'chaindrive/api/v1'\n\nmodule Chaindrive\n class API < Grape::API\n default_format :json\n format :json\n\n # Define any helper methods that we want to make available inside of... | ruby | chosen |
[
{
"from": "system",
"value": "Add add_link_tag to helpers file\n"
},
{
"from": "human",
"value": "module CustomHelpers\n\n def print_title\n '- ' + current_article.title unless current_article.nil?\n end\n\n def dasherize(name)\n name.downcase.strip.gsub(' ', '-').gsub(/[^\\w-]/, '')\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add Fog Binary for Google\n"
},
{
"from": "gpt",
"value": "module Google # deviates from other bin stuff to accomodate gem\n class << self\n def class_for(key)\n case key\n when :compute\n Fog::Compute::Google\n when :dns\n Fo... | ruby | chosen |
[
{
"from": "system",
"value": "Configure fuci base with team city server\n"
},
{
"from": "human",
"value": "require 'fuci/team_city/version'\nrequire 'fuci/configurable'\n\nmodule Fuci\n module TeamCity\n include Fuci::Configurable\n\n class << self\n attr_accessor :host, :username, :... | ruby | chosen |
[
{
"from": "system",
"value": "Add DEF_DB and default path for .list.\n"
},
{
"from": "human",
"value": "# @abstract Find the default account in GMVault config\n#\n# @author Ollivier Robert <roberto@keltia.net>\n#\n# XXX Assume we use OAuth for all accounts\n\nVCS_CFG_ID = \"$Id$\"\n\n# Non-stand... | ruby | chosen |
[
{
"from": "system",
"value": "Remove exception when active support has a version we can't recognize.\n\nThe gem spec is the right place to define gem dependencies.\n"
},
{
"from": "human",
"value": "require \"hestia\"\n\nmodule Hestia\n class Railtie < ::Rails::Railtie\n # Hooks into ActionD... | ruby | chosen |
[
{
"from": "system",
"value": "Use early return instead of convoluted find\n\nRemoves double `get`"
},
{
"from": "human",
"value": "module Econfig\n class Configuration\n attr_accessor :default_write_backend\n\n def backends\n @backends ||= BackendCollection.new\n end\n\n def fe... | ruby | chosen |
[
{
"from": "system",
"value": "Use data URI as default placeholder\n\n...to avoid external http requests\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nmodule Lazyload\n module Rails\n\n # Stores runtime configuration information.\n #\n # Example settings\n # Lazyload:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove console check since we don't start at startup by default anymore\n"
},
{
"from": "human",
"value": "module Librato\n module Rails\n class Railtie < ::Rails::Railtie\n\n # don't have any custom http vars anymore, check if hostname is UUID\n on_he... | ruby | chosen |
[
{
"from": "system",
"value": "Fix io in tar writer subclass.\n"
},
{
"from": "human",
"value": "require \"rubygems/package\"\n\nmodule Metacrunch\n class TarWriter < FileWriter\n\n def write(data, options = {})\n raise ArgumentError, \"Missing option 'filename'\" if options[:filename].b... | ruby | chosen |
[
{
"from": "system",
"value": "Fix lack of spaces on lambda\n"
},
{
"from": "human",
"value": "require \"rack/attack\"\nrequire \"rack/attack/recaptcha/version\"\nrequire \"rack/attack/recaptcha/client_helper\"\nrequire \"rack/attack/recaptcha/verification_helper\"\n\nmodule Rack\n class Attack\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a method to check the status led status\n"
},
{
"from": "human",
"value": "module Sonos::Endpoint::Device\n DEVICE_ENDPOINT = '/DeviceProperties/Control'\n DEVICE_XMLNS = 'urn:schemas-upnp-org:service:DeviceProperties:1'\n\n # Turn the white status light on o... | ruby | chosen |
[
{
"from": "system",
"value": "Access MIME types by correct keys\n\nThe keys used to register the Transit MIME types in the Mime hash are\nlowercase, not uppercase, but the initializer was using uppercase\nsymbols to look them up. This lookup doesn't succeed and so Transit\nparameters were not getting correc... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec for Lita 3.0 compatibility.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"lita-catfacts\"\n spec.version = \"0.0.3\"\n spec.authors = [\"Mitch Dempsey\"]\n spec.email = [\"mrdempse... | ruby | chosen |
[
{
"from": "system",
"value": "Fix extconf.rb path in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'command-t'\n\n # see note in the Rakefile about how intermediate version numbers\n # can break RubyGems\n s.version = `git describe --abbrev=0`.chomp\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change phone number validator regex\n\n* Change regex so it do not accept letters.\n"
},
{
"from": "human",
"value": "class PhoneNumberFormatValidator < ActiveModel::EachValidator\n def validate_each(object, attribute, value)\n unless value =~ /\\A(\\+?1( |-)?)?... | ruby | chosen |
[
{
"from": "system",
"value": "Make private activities readable with link\n"
},
{
"from": "human",
"value": "class Ability\n include CanCan::Ability\n\n def initialize(user)\n # Define abilities for the passed in user here.\n #\n # See the wiki for details:\n # https://github.com/ry... | ruby | chosen |
[
{
"from": "system",
"value": "Remove not to use methods\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nclass Account < ActiveRecord::Base\n has_secure_password\n\n has_many :delegates, dependent: :destroy\n has_many :projects, through: :delegates\n accepts_nested_attributes_for ... | ruby | chosen |
[
{
"from": "system",
"value": "Update slide generator to support titles.\n"
},
{
"from": "human",
"value": "module Jekyll\n class RenderSlideTag < Liquid::Block\n def initialize(tag_name, markup, tokens)\n super\n markup = markup.strip.split(' ').first\n args = markup.nil? ? []... | ruby | chosen |
[
{
"from": "system",
"value": "Add error message if district not found\n"
},
{
"from": "human",
"value": "class Zipcode < ActiveRecord::Base\n has_many :candidates\n require 'net/http'\n require 'json'\n def self.get_polling_place(address)\n uri = URI.parse(\"https://www.googleapis.com/civ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error handling for log-in\n"
},
{
"from": "human",
"value": "get '/sessions/new' do\n erb :'sessions/new'\nend\n\npost '/sessions' do\n @user = User.find_by_email(params[:email])\n\n if @user\n login\n puts \"user has logged in!\"\n redirect \"/users... | ruby | chosen |
[
{
"from": "system",
"value": "Remove german from available locales\n"
},
{
"from": "human",
"value": "Rails.application.config.i18n.available_locales = [:en, :de]\nRails.application.config.i18n.default_locale = :en\n"
},
{
"from": "gpt",
"value": "Rails.application.config.i18n.availa... | ruby | chosen |
[
{
"from": "system",
"value": "Stop retrying sidekiq job so many times\n\nMost likely the temp file is deleted after too many retries\n"
},
{
"from": "human",
"value": "module MediaService\n DEFAULT_EXPIRE_IN = 10\n\n def create(user, friend_ids, file_path, drawing_path, expire_in = DEFAULT_EXP... | ruby | chosen |
[
{
"from": "system",
"value": "Add output messages so it shows what's happening on the command line\n"
},
{
"from": "human",
"value": "require 'rails/generators'\n\nmodule Reactify\n module Generators\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path(\"../... | ruby | chosen |
[
{
"from": "system",
"value": "Add :base_uri => nil in config for Heroku\n\nAlso, added a comment for the would-be editor.\n\nSigned-off-by: Simon Rozet <088e16a1019277b15d58faf0541e11910eb756f6@rozet.name>\n"
},
{
"from": "human",
"value": "require \"rubygems\"\ngem \"integrity\"\nrequire \"inte... | ruby | chosen |
[
{
"from": "human",
"value": "Enable basic auth if a username and password are set.\n"
},
{
"from": "gpt",
"value": "if ENV.key?(\"APP_USERNAME\") && ENV.key?(\"APP_PASSWORD\")\n Vowessly::Application.config.middleware.insert_after 'Rack::Lock', 'Rack::Auth::Basic' do |username, password|\n u... | ruby | chosen |
[
{
"from": "system",
"value": "Change session Id to string\n\nSigned-off-by: Shen Yichen <be3bb257ef8d73236feaba36cd3e5ee9095e6819@gmail.com>\n"
},
{
"from": "human",
"value": "json.video do\n json.videoUrl @video.url\n json.partial! 'watch_next_video_url', locals: { next_video: @video.next_vid... | ruby | chosen |
[
{
"from": "system",
"value": "Fix feature spec for visiting asciicast page\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature \"Asciicast lists\" do\n\n let!(:asciicast) { load_asciicast(1) }\n\n scenario 'Visiting all' do\n visit browse_path\n\n expect(page).to have_con... | ruby | chosen |
[
{
"from": "system",
"value": "Use File.join instead of hard-coding path\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'chefspec'\nrequire 'chefspec/berkshelf'\nrequire 'chefspec/cacher'\nrequire 'pathname'\nDir.glob(File.dirname(__FILE__) + '/**/*.rb', &method(:require))\n\nChefS... | ruby | chosen |
[
{
"from": "system",
"value": "Fix syntax error. Missing closing parenthesis.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TestSimpleApi < Test::Unit::TestCase\n \n def setup\n options = {\n :username => 'myusername', \n :password => 'mypassword',\n :token... | ruby | chosen |
[
{
"from": "system",
"value": "Rename rsyncs to stored_rsyncs to simplify code\n"
},
{
"from": "human",
"value": "class AddRsyncsToBackupJob < ActiveRecord::Migration\n def self.up\n add_column :backup_jobs, :rsyncs, :text\n end\n\n def self.down\n remove_column :backup_jobs, :rsyncs\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect variable in error path in change_member_class_proposals/create.\n"
},
{
"from": "human",
"value": "class ChangeMemberClassProposalsController < ApplicationController\n def create\n authorize! :create, ChangeMemberClassProposal\n \n # TODO Mak... | ruby | chosen |
[
{
"from": "system",
"value": "Use git for load path.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"acts_as_has_default/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Puma control socket URI\n"
},
{
"from": "human",
"value": "workers Integer(ENV['WEB_CONCURRENCY'] || 2)\nthreads_count = Integer(ENV['MAX_THREADS'] || 5)\nthreads threads_count, threads_count\n\ntag 'deploy-it'\nrackup DefaultRackup\nenvironment ENV... | ruby | chosen |
[
{
"from": "system",
"value": "Update Capistrano configuration for symfony3\n"
},
{
"from": "human",
"value": "# config valid only for current version of Capistrano\nlock '3.4.0'\n\nset :application, 'wallabag'\nset :repo_url, 'git@github.com:wallabag/wallabag.git'\n\nset :ssh_user, 'framasoft_ba... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.