conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Handle Rails load order issue with generator\n"
},
{
"from": "human",
"value": "require \"thor\"\n\nmodule Thincloud\n class ThorBase < ::Thor::Group\n include ::Thor::Actions\n end\n\n GeneratorBase = defined?(Rails) ? ::Rails::Generators::Base : ThorBase\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Check for abuse flag before restarting a build\n"
},
{
"from": "human",
"value": "module Travis\n module Enqueue\n module Services\n\n class RestartModel\n attr_reader :current_user, :target\n\n def initialize(current_user, params)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change socket path to env var\n"
},
{
"from": "human",
"value": "# 8 workers and 1 master\nworker_processes(8)\n\npreload_app true\n\n# Restart any workers that haven't responded in 30 seconds\ntimeout 30\n\n# Listen on a Unix data socket\nlisten '/data/fyi/sockets/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to work with DATABASE_URL\n"
},
{
"from": "human",
"value": "# 8 workers and 1 master\nworker_processes(8)\n\npreload_app true\n\n# Restart any workers that haven't responded in 30 seconds\ntimeout 30\n\n# Listen on a Unix data socket\nlisten ENV['UNICORN_SOCKET... | ruby | chosen |
[
{
"from": "system",
"value": "Add timer and make file path absolute\n"
},
{
"from": "human",
"value": "# Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over\n# five-thousand first names, begin by sorting it into alphabetical order. Then working out the\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert deployment target bump, 8.0 is still supported by Texture 2.6\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'ASDKFluentExtensions'\n spec.version = '0.8.1'\n spec.license = { :type => 'MIT' }\n spec.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant `&.` since `**options` cannot be nil\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActiveSupport\n module Messages\n class RotationConfiguration # :nodoc:\n attr_reader :signed, :encrypted\n\n def initializ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Document for jquery instance\n"
},
{
"from": "human",
"value": "require 'opal-jquery/element'\n\nclass Element\n\n # Returns a jquery wrapped version of document\n def self.document\n @_doc ||= Element.find(`document`)\n end\nend\n\nclass << $document\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove use of git for resolving files in the gem\n\nNot all systems have git!\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/pushy_client/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\... | ruby | chosen |
[
{
"from": "system",
"value": "Check if xcrun command exists\n"
},
{
"from": "human",
"value": "module Fastlane\n module Actions\n class WaitXcrunAction < Action\n def self.run(params)\n UI.message \"Waiting for Xcode toolchain ...\"\n # Try running 'xcrun simctl help' subc... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove doc files from gemspec, since Bundler or Rubygems seems to get confused.\"\n\nThis reverts commit d4f58b72bfd91e7e58620942afd32a20d219deeb.\n"
},
{
"from": "human",
"value": "require File.expand_path( '../../lib/m4dbi/version', __FILE__ )\n\nspec = G... | ruby | chosen |
[
{
"from": "system",
"value": "Update Xamarin Studio to v5.5.0.227-0"
},
{
"from": "human",
"value": "class XamarinStudio < Cask\n version '5.4.0.240-0'\n sha256 'bd5a3d28889a776190836c7cf3c19bbf749a01f2a45f74a118a535967ca3cc8a'\n\n url \"http://download.xamarin.com/studio/Mac/XamarinStudio-#{... | ruby | chosen |
[
{
"from": "system",
"value": "Rename locations_updated_since to updated_since for brevity\n"
},
{
"from": "human",
"value": "require 'dotenv'\nDotenv.load\nrequire 'base64'\nrequire 'openssl'\nrequire 'cgi'\nrequire 'json'\nrequire 'request'\n\nmodule Singleplatform\n class Client\n HOST = E... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple custom message script\n\nStill requires Ruby with JSON and HTTParty gems.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# coding: utf-8\n\nrequire 'json'\nrequire 'httparty'\n\nURL = 'http://:'\nSOURCE = ''\n\nif ARGV.length < 1\n STDERR.puts \"Us... | ruby | chosen |
[
{
"from": "system",
"value": "Use a string key to merge into options\n"
},
{
"from": "human",
"value": "module Dnsimple\n class Client\n module VanityNameServers\n\n # Enable vanity name servers for a domain. \n #\n # @see https://developer.dnsimple.com/nameservers/vanity-name... | ruby | chosen |
[
{
"from": "system",
"value": "Handle VM creation & ready check better.\n"
},
{
"from": "human",
"value": "require 'fog/core/model'\n\nmodule Fog\n module Compute\n class Octocloud\n\n class Server < Fog::Model\n\n identity :id\n\n attribute :memory\n attribute :name... | ruby | chosen |
[
{
"from": "system",
"value": "Return the connection to the pool after exceptions\n"
},
{
"from": "human",
"value": "require 'perpetuity/postgres/connection'\nrequire 'thread'\n\nmodule Perpetuity\n class Postgres\n class ConnectionPool\n attr_reader :connections, :size\n\n def init... | ruby | chosen |
[
{
"from": "system",
"value": "Add some diagnostics to a log file\n"
},
{
"from": "human",
"value": "=begin\n# Taken from http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/\n# license http://creativecommons.org/publicdomain/zero/1.0/\n=end\n\nroot ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing spaces for import flash messages\n"
},
{
"from": "human",
"value": "class ImportsController < ApplicationController\n before_filter :authenticate_user!\n\n def new\n @import = Import.new\n end\n\n def create\n import = Import.new(import_params.... | ruby | chosen |
[
{
"from": "system",
"value": "Add ?level={level} filter on member list\n"
},
{
"from": "human",
"value": "class MembersController < ApplicationController\n respond_to :html, :json\n\n def index\n @organizations = Organization.includes(:member).where(:'members.cached_active' => true).order(:... | ruby | chosen |
[
{
"from": "human",
"value": "Add method to adjust line_item price for personalization\n"
},
{
"from": "gpt",
"value": "module Spree\n Variant.class_eval do\n\n def line_item_personalization_attributes_price_modifier_amount_in(currency, options)\n calc = self.product.product_personalizat... | ruby | chosen |
[
{
"from": "system",
"value": "Update SublimeText 2 to 2.0.2"
},
{
"from": "human",
"value": "class SublimeText < Cask\n url 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.dmg'\n homepage 'http://www.sublimetext.com/2'\n version '2.0.1'\n sha1 'b5f91ee4f62d36c0490c021d5fb134b9e7cb... | ruby | chosen |
[
{
"from": "system",
"value": "Add my info to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"license-generator/version\"\n\nGem::Specification.new do |s|\n s.name = \"license-generator\"\n s.version = Li... | ruby | chosen |
[
{
"from": "system",
"value": "Patch migration moving offer location to locations table\n\nSorry! Patching old migration! But it hasn't been run in production yet.\nThere is probably a better way to migrate data like this, though.\n"
},
{
"from": "human",
"value": "class MoveOfferLocationToTableL... | ruby | chosen |
[
{
"from": "system",
"value": "Introduce GW2_POOL_SIZE to setup concurrency\n"
},
{
"from": "human",
"value": "\nrequire 'rest-gw2'\n\nwarmup do\n RestCore.eagerload\n RestCore.eagerload(RestGW2)\n RestGW2::Client.new\nend\n\nrun RestGW2::Server\n"
},
{
"from": "gpt",
"value": "\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Add app name for honeycomb\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# This file is used by Rack-based servers to start the application.\n\nrequire 'honeycomb-beeline'\n\nHoneycomb.init(writekey: ENV['HONEYCOMB_API_KEY'], dataset: 'rails-da... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec such that roger 1.1 can be used\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.authors = ['Hans Krutzer', 'Flurin Egger']\n s.email = ['info@digitpaint.nl', 'hans@digitpaint.nl', 'flurin@digitpaint.... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 10.0 to ~> 13.0\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra slashes in path.\n\n Just do a quick gsub to switch // in the paths to /.\n"
},
{
"from": "human",
"value": "require \"yaml\"\nrequire \"sinatra\"\nrequire \"sinatra/base\"\n\nclass ClientCMS < Sinatra::Base\n def self.add_project(p)\n @@project ||... | ruby | chosen |
[
{
"from": "system",
"value": "Add awesmoe alindeman hack to run bot\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'lib')\nrequire 'tech404/index'\n\nrun Tech404::Index::Application\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift File.join... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cache bug in project JSON output\n\nSigned-off-by: David A. Wheeler <9ae72d22d8b894b865a7a496af4fab6320e6abb2@dwheeler.com>\n"
},
{
"from": "human",
"value": "json.cache! @project, expires_in: 10.minutes do\n json.partial! 'project', project: project\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning about variable shadowing\n"
},
{
"from": "human",
"value": "class Spree::ShippingManifest\n ManifestItem = Struct.new(:line_item, :variant, :quantity, :states)\n\n def initialize(inventory_units:)\n @inventory_units = inventory_units\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Change the migration completely, so it's right.\n\nThis was so far wide of the mark originall, it couldn't even see the mark.\nThe fact that this worked on sqlite shows that it must do no checking or something.\nTested on PostgreSQL now as well as sqlite.\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Remove json gem package as it's already included with chef\n"
},
{
"from": "human",
"value": "#\n# Author:: Cameron Johnston <cameron@needle.com>\n# Cookbook Name:: loggly\n# Recipe:: default\n#\n# Copyright 2011 Needle, Inc.\n#\n# Licensed under the Apache License,... | ruby | chosen |
[
{
"from": "system",
"value": "Use minitest version compatible with other 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 'acts_as_paranoid/version'\n\nGem::Specification.... | ruby | chosen |
[
{
"from": "system",
"value": "fix:dev: Use job instance's queue_name instead of class's\n\nTwo good reasons:\n- The job instance can be enqueued with a different queue_name than its\nclass normally has.\n- The job class can pass a Proc to queue_name to dynamically determine\nthe name. The queue_name is stil... | ruby | chosen |
[
{
"from": "system",
"value": "Support older method of setting HostSite\n"
},
{
"from": "human",
"value": "# Copyright 2015 CareerBuilder, LLC\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain... | ruby | chosen |
[
{
"from": "system",
"value": "Change pod owner email address\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"HandySwift\"\n s.version = \"2.5.0\"\n s.summary = \"Handy Swift features that didn't make it into the Swift standard library\"\n\n s.descript... | ruby | chosen |
[
{
"from": "system",
"value": "Remove non-existant regions and add existing ones\n"
},
{
"from": "human",
"value": "require \"helpers/integration_test_helper\"\n\nclass TestRegions < FogIntegrationTest\n NAMES = %w(asia-east1 europe-west1 us-central1 us-central2)\n\n def setup\n @subject = F... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out yet another test that won't work on travis. Sigh.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe 'error pages' do\n # These steps are necessary to actually load the error pages in rspec.\n # See http://stackoverflow.com/questions... | ruby | chosen |
[
{
"from": "system",
"value": "Add enhanced spec tests for ConnectParams\n"
},
{
"from": "human",
"value": "describe FFI::VixDiskLib::API do\n let(:major_version) { described_class::VERSION_MAJOR }\n let(:minor_version) { described_class::VERSION_MINOR }\n let(:log) { lambda { |_stri... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the HTML fam spec for now (altough it will probably be removed soon).\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Manage farms' do\n\n context 'when the user is signed in' do\n\n before(:each) do\n @user = create(:user)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix attempt one for windows push-jobs unit testing\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: win_base\n# Spec:: default\n#\n# Copyright:: 2017, The Authors, All Rights Reserved.\n\nrequire 'spec_helper'\n\ndescribe 'win_base::default' do\n context 'When we... | ruby | chosen |
[
{
"from": "system",
"value": "Remove resource_bundles section to provide linting\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint APMRatingControl.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is en... | ruby | chosen |
[
{
"from": "system",
"value": "BAU: Fix failing test with new Welsh translation\n"
},
{
"from": "human",
"value": "require 'feature_helper'\nrequire 'api_test_helper'\n\nRSpec.describe 'When the user visits the Verify will not work for you page' do\n before(:each) do\n set_session_and_session... | ruby | chosen |
[
{
"from": "system",
"value": "Add a missing ID guard up front\n"
},
{
"from": "human",
"value": "namespace :data_migration do\n desc \"Backfill all service upload IDs\"\n task backfill_service_upload_ids: :environment do\n puts \"Updating service upload records...\"; puts;\n\n ActiveReco... | ruby | chosen |
[
{
"from": "system",
"value": "Update pods version to 1.0\n\nUse tag version instead of commit\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'DoActionSheet'\n s.version = '0.0.1'\n s.author = { 'JackShi' => 'shiguifei@gmail.com' }\n s.homepage = 'https://github.com... | ruby | chosen |
[
{
"from": "system",
"value": "Make Provision set the package_url for the environment\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: build_cookbook\n# Recipe:: provision\n#\n# Copyright:: 2017, Jp Robinson, All Rights Reserved.\n"
},
{
"from": "gpt",
"value": "#\n# Cookbook:: buil... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec for viewing list of players\n"
},
{
"from": "gpt",
"value": "require 'spec_helper.rb'\n\nfeature \"Viewing a list of Players\", js: true do\n let(:player_list){FactoryGirl::create_list(:player, 10)}\n\n scenario \"View all Players\" do\n player_... | ruby | chosen |
[
{
"from": "system",
"value": "Podspec: Add 'MK' as acceptable prefix for MKAnnotationView category\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'SDWebImage'\n s.version = '2.7'\n s.platform = :ios\n s.license = 'MIT'\n s.summary = 'Asynchronous image downloader ... | ruby | chosen |
[
{
"from": "system",
"value": "Add uninstall stanza for Logitech Unifying\n"
},
{
"from": "human",
"value": "class LogitechUnifying < Cask\n url 'http://www.logitech.com/pub/controldevices/unifying/unifying1.10.421.dmg'\n homepage 'http://www.logitech.com/en-us/promotions/6072'\n version '1.10... | ruby | chosen |
[
{
"from": "system",
"value": "Add text file resources in podspec file\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint IJMRandomName.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with a # are optional, ... | ruby | chosen |
[
{
"from": "system",
"value": "Change license to be singular in gemspec\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/axiom/adapter/data_objects/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'axiom-do-adapter'\n gem.version... | ruby | chosen |
[
{
"from": "system",
"value": "Update Google Analytics dependence to the new reference\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n \n s.name = 'JohnnyEnglish'\n s.version = '0.0.3'\n s.summary = 'A light-weight AOP-based analytics binder'\n s.homepage = \"https://github.c... | ruby | chosen |
[
{
"from": "system",
"value": "Update cuke css selector for Continue button on summary page.\n"
},
{
"from": "human",
"value": "class ClaimSummaryPage < SitePrism::Page\n set_url \"/external_users/claims/{claim_id}/summary\"\n\n element :continue, \"div.claim-summary-sidebar > div.claim-summary... | ruby | chosen |
[
{
"from": "system",
"value": "Fix runit cookbook for Oracle Linux 6\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: runit\n# Recipe:: default\n#\n# Copyright 2008-2010, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exce... | ruby | chosen |
[
{
"from": "system",
"value": "Remove process_action.action_controller from logs panel notifications because this informations are from the previous request\n"
},
{
"from": "human",
"value": "Log = Struct.new(:name, :duration, :payload)\n\nclass LogsPanel < Panel\n def initialize\n @logs = []... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spacing from two commits ago\n"
},
{
"from": "human",
"value": "class Deed < ApplicationRecord\n belongs_to :user\n validate :something_was_done,\n if: ->(deed) { deed.miles.present? && deed.trash_bags.present? }\n validates :miles, :trash_bags, presence: ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up and update hash syntax\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: teams\n#\n# id :integer not null, primary key\n# name :string\n# created_at :datetime not null\n# updated_at :datetime ... | ruby | chosen |
[
{
"from": "system",
"value": "Deal with jobs that aren't stored as hashes in the yaml.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'rubygems'\nrequire 'beanstalk-client'\n\nBS=Beanstalk::Pool.new $*\n\nsaw={}\n\nloop do\n job = BS.reserve\n code = job.ybody[:code]\n if s... | ruby | chosen |
[
{
"from": "system",
"value": "Add parameter override for Collection Factory\n"
},
{
"from": "human",
"value": "class CollectionFactory\n PREFIX = \"fog-test\".freeze\n\n def initialize(subject, example)\n @subject = subject\n @example = example\n @resource_counter = 0\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure User.default_agent is agent-level or higher"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_many :tickets\n has_many :comments\n\n before_create :set_default_role\n\n # Include default devise modules. Others available are:\n # :... | ruby | chosen |
[
{
"from": "system",
"value": "Allow (default) iOS 4.3 in CocoaPods"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SRMonthPicker\"\n s.version = \"0.1.1\"\n s.summary = \"Like UIDatePicker, but without the days.\"\n s.homepage = \"https://www.github.c... | ruby | chosen |
[
{
"from": "system",
"value": "Change to please code climate\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass AnalyticsController < ApplicationController\n before_action :check_for_admin_or_analyst, only: %i[show index]\n\n def show; end\n\n def index\n @last_days =... | ruby | chosen |
[
{
"from": "system",
"value": "Sort people by surname in admin view\n"
},
{
"from": "human",
"value": "class Admin::PeopleController < Admin::BaseController\n def index\n @people = Person.order(\"CONCAT_WS(' ', title, forename, surname, letters)\")\n end\n\n def new\n @person = Person.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Allow overriding of starting id from command line\n"
},
{
"from": "human",
"value": "# Fetch the official party register and writes parsed data into 'partidos.csv'.\n\n# Argh, the official web site seems to be rejecting connections from Morph.io...\n\nrequire 'mecha... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete require for static pages\n"
},
{
"from": "human",
"value": "require 'core/interactors/static_page_reader'\nrequire 'core/interactors/category_parents_reader'\n\nclass StaticPagesController < ApplicationController\n\n decorates_assigned :static_page,... | ruby | chosen |
[
{
"from": "system",
"value": "Use ya2yaml for generating yaml from web\n"
},
{
"from": "human",
"value": "module Tolk\n class LocalesController < Tolk::ApplicationController\n before_filter :find_locale, :only => [:show, :all, :update, :updated]\n before_filter :ensure_no_primary_locale, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add blank select to redirect configuration\n"
},
{
"from": "human",
"value": "module Admin::ConfigurationsHelper\n ROOT_CHOICES = {\n :listing => \"Catalog list (default)\",\n :redirect => \"Redirect to a catalog\",\n :custom => \"Custom\"\n }.freeze\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add script for generating code from a shorthand.\n"
},
{
"from": "gpt",
"value": "require 'pp'\nrequire 'set'\n\nMusicGraph = Struct.new(:bands, :musicians, :connections)\nConnection = Struct.new(:source, :target, :label)\n\ndef musician_variable_name(human_name)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for the answers controller\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe AnswersController do\n\n let(:question) { create :question }\n\n describe 'GET #show' do\n it 'response successfully' do\n expect(get :show, question).t... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra assertions in settings spec\n"
},
{
"from": "human",
"value": "feature \"User changes settings\" do\n scenario \"time zone from Pacific Time to Melbourne\" do\n user = create(:user, time_zone: \"Pacific Time (US & Canada)\")\n create(:entry, user... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ShellExecutor test due to random way the tests are performed"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'os'\n\ndescribe Puppet_X::Coi::Jboss::Internal::Executor::ShellExecutor do\n describe '#run_command' do\n let(:instance) { described... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"only library header files should be available via cocoa pods\"\n\nThis reverts commit c77fb8ce5b224b2d91e545af7ed3ea211db4a465.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"NGBAccountStore\"\n s.version = \"0.1.0\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Support images for the Telega normalizer\n"
},
{
"from": "human",
"value": "module Normalizers\n class TelegaBasicNormalizer < Normalizers::RssNormalizer\n protected\n\n def text\n Service::Html.post_excerpt(\n content,\n link: sanitized_li... | ruby | chosen |
[
{
"from": "system",
"value": "Add `feedback` to forbidden screen names\n"
},
{
"from": "human",
"value": "class ScreenNameValidator < ActiveModel::EachValidator\n FORBIDDEN_SCREEN_NAMES = %w(justask_admin retrospring_admin admin justask retrospring about public\n no... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing alt to profile_picture helper\n"
},
{
"from": "human",
"value": "module PeopleHelper\n\n def profile_picture(person)\n image_tag \"people/#{person.friendly_id}.jpg\"\n end\nend"
},
{
"from": "gpt",
"value": "module PeopleHelper\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest as a dev dependency\n\nEventually we're gong to test the testing framework in itself, _metametameta_\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\... | ruby | chosen |
[
{
"from": "system",
"value": "Change set_table_name for self.table_name= so it's compatible with ActiveRecord 3.2"
},
{
"from": "human",
"value": "module Ponch\n class Delivery < ActiveRecord::Base\n set_table_name :ponch_deliveries\n\n validates_presence_of :to, :from, :sent_at\n\n sc... | ruby | chosen |
[
{
"from": "human",
"value": "Add check for skipping CSRF with :except\n\ninstead of using :only.\nThis is essentially a blacklist vs. whitelist issue.\n"
},
{
"from": "gpt",
"value": "require 'brakeman/checks/base_check'\n\n#At the moment, this looks for\n#\n# skip_before_filter :verify_authent... | ruby | chosen |
[
{
"from": "system",
"value": "Clear rails cache and warn about restarting server\n\nInstalls can include changes to how resources are compiled,\nand since the files themselves don't change, their cached\ncopies may become invalid.\n\nRails server caches the cache in memory for performance,\nso it should be ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert removing named_tag default on _client_ side\n"
},
{
"from": "human",
"value": "require 'shipitron'\nrequire 'shipitron/post_build'\n\nmodule Shipitron\n module Client\n class LoadApplicationConfig\n include Metaractor\n\n required :application\n... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the code style a bit in Lint/SafeNavigationChain\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module Lint\n # Safe navigation operator returns nil if the receiver is nil.\n # So if you chain ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to not install plugin if it is installing\n"
},
{
"from": "human",
"value": "class GemInstaller\n include SuckerPunch::Job\n workers 16\n\n WORKING = []\n\n def perform(gem_name, version = nil)\n SuckerPunch.logger.info \"install #{gem_name} #{version}\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Save original requested path before redirecting to sign-in\n"
},
{
"from": "human",
"value": "require_dependency \"admin/application_controller\"\n\nmodule Admin\n\n class AdminController < ApplicationController\n\n before_filter :authenticate_admin!\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Include flash notice when admin is required\n"
},
{
"from": "human",
"value": "# Filters added to this controller apply to all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n\nclass ApplicationController < ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove DWP from accessible request format pilot Rake task\n"
},
{
"from": "human",
"value": "desc \"Republish all documents with attachments for organisations in accessible format request pilot\"\ntask repubish_docs_with_attachments_for_accessible_format_request_pil... | ruby | chosen |
[
{
"from": "system",
"value": "Remove UrlHelpers from ApplicationController as it was breaking tests\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove blank entry in PostReceiveUrls triggers\n"
},
{
"from": "human",
"value": "require 'uri'\n\nclass RepositoryPostReceiveUrl < ActiveRecord::Base\n unloadable\n\n STATUS_ACTIVE = true\n STATUS_INACTIVE = false\n\n ## Attributes\n attr_accessible :url, :m... | ruby | chosen |
[
{
"from": "system",
"value": "Add deployment target to podspec.\n\nSummary: Without specifying the deployment target, it was default to iOS 4.3. This would cause a build error because we are `unable to synthesize weak properties` which didn't come around until iOS 5. Setting default target to iOS 8.\n\nRevi... | ruby | chosen |
[
{
"from": "system",
"value": "Update count for all members, THIS COULD GET EXPENSIVE\n"
},
{
"from": "human",
"value": "class Task < ActiveRecord::Base\n include Authority::Abilities\n self.authorizer_name = 'TaskAuthorizer'\n\n include Concerns::DateWriter\n\n acts_as_list scope: :group\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using the deprecated CurationConcerns::SearchBuilder.\n\nFixes #1911\n"
},
{
"from": "human",
"value": "class DepositSearchBuilder < CurationConcerns::SearchBuilder\n # includes the depositor_facet to get information on deposits.\n # use caution when combini... | ruby | chosen |
[
{
"from": "system",
"value": "Change cells loading in report repository helper\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Reports::Docx::RepositoryHelper\n include InputSanitizeHelper\n\n def prepare_row_columns(repository_data)\n result = [repository_data[:h... | ruby | chosen |
[
{
"from": "system",
"value": "Add name and URL param to JWT\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n extend FriendlyId\n friendly_id :slug_canditates, use: :slugged\n\n belongs_to :preferred_service, :class_name => 'Service'\n has_many :services\n has_many :playe... | ruby | chosen |
[
{
"from": "system",
"value": "Make phone number signups unique\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n VICE_THRESHOLD = -2\n VIRTUE_THRESHOLD = +2\n\n has_one :champion\n has_many :karma_events\n validates :vice, :name, :phone_number, presence: :true\n\n def ph... | ruby | chosen |
[
{
"from": "system",
"value": "Order User Sites by host\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: users\n#\n# id :integer not null, primary key\n# email :string(64) not null\n# encrypted_password :string... | ruby | chosen |
[
{
"from": "system",
"value": "Add EventStream event when new items are received via PSHB\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# Pubsubhubbub callback\n\n# Subscription verification\nget '/pshb/callback/:id' do\n\tfeed = Feed.get(params[:id])\n\n\tif feed.pshb_topic != params['hu... | ruby | chosen |
[
{
"from": "system",
"value": "Raise a usable error if username or password are not set."
},
{
"from": "human",
"value": "module DNSimple\n class Client\n def self.debug?\n @debug\n end\n def self.debug=(debug)\n @debug = debug\n end\n\n def self.username\n @@userna... | ruby | chosen |
[
{
"from": "system",
"value": "Add some pending tests on where to go next\n"
},
{
"from": "human",
"value": "require 'bigdecimal'\nrequire 'ynab'\n\ndescribe Ynab do\n let(:ynab) { Ynab.open('./spec/fixtures/Test~E8570C74.ynab4') }\n\n describe '.transactions' do\n let(:transactions) { ynab.... | ruby | chosen |
[
{
"from": "system",
"value": "Rename in test as well.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Category do\n\n describe 'find or create category' do\n it 'should create a new category if it doesnt exist' do\n root = Category.create!(:name => \"root\")\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.