conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add a library that can automatically add view helpers to view specs.\n"
},
{
"from": "gpt",
"value": "module BootstrapHamlHelpers\n module SpecViewHelpers\n def self.included(base)\n base.class_eval do\n helper BootstrapHamlHelpers::ApplicationHelper ... | ruby | chosen |
[
{
"from": "system",
"value": "Add insurance assistance eligibility attributes. Add HbxEnrollmentExemption as embedded parent.\n"
},
{
"from": "human",
"value": "class ApplicantLink\n include Mongoid::Document\n\n embedded_in :tax_household\n embedded_in :hbx_enrollment\n embedded_in :eligib... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Fix problem of usage rabl 0.13.0 with Rails 5 and active cache\"\"\n"
},
{
"from": "human",
"value": "module Rabl\n class Digestor < ActionView::Digestor\n @@digest_monitor = Mutex.new\n\n def self.digest(name:, finder:, **options)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move default implementation to this gem\n"
},
{
"from": "human",
"value": "require \"rails/html/sanitizer/version\"\nrequire \"loofah\"\nrequire \"rails/html/scrubbers\"\nrequire \"rails/html/sanitizer\"\n\nmodule Rails\n module Html\n class Sanitizer\n cla... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicated definition of has_next_page?\n"
},
{
"from": "human",
"value": "require 'rakuten_web_service/search_result'\n\nmodule RakutenWebService\n module Travel\n class SearchResult < RakutenWebService::SearchResult\n def has_next_page?\n fa... | ruby | chosen |
[
{
"from": "system",
"value": "Clear active connections after each request\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'time'\nrequire 'sinatra/base'\nrequire 'active_record'\nrequire 'logger'\n\nmodule Sinatra\n module ActiveRecordHelper\n def database\n options.database\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add option for CSV skip_footer_rows\n"
},
{
"from": "human",
"value": "require 'stockboy/reader'\nrequire 'stockboy/candidate_record'\nrequire 'csv'\n\nmodule Stockboy::Readers\n class CSV < Stockboy::Reader\n\n dsl_attrs :skip_header_rows\n\n ::CSV::DEFAULT_... | ruby | chosen |
[
{
"from": "system",
"value": "Change simulate_queue_worker for quiet polling\n"
},
{
"from": "human",
"value": "module Vmdb\n module ConsoleMethods\n def enable_console_sql_logging\n ActiveRecord::Base.logger.level = 0\n end\n\n def disable_console_sql_logging\n ActiveRecord:... | ruby | chosen |
[
{
"from": "system",
"value": "Update InSpec test to new exe location\n"
},
{
"from": "human",
"value": "# # encoding: utf-8\n\n# Inspec test for recipe sourcetree::default\n\n# The Inspec reference, with examples and extensive documentation, can be\n# found at http://inspec.io/docs/reference/res... | ruby | chosen |
[
{
"from": "system",
"value": "Update berks gemfile groups to match reality\n\nAdd docs\nRemove guardfile / test which aren't there\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Copyright 2016 Chef Software, Inc.\n#\n# Licen... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade IntelliJ CE EAP to version 14 (build 138.777).\n\nThe version was `135.863`.\n\nhttp://confluence.jetbrains.com/display/IDEADEV/IDEA+14+EAP\nhttp://blog.jetbrains.com/idea/2014/06/intellij-idea-14-early-preview-is-available/\n"
},
{
"from": "human",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Remove lines of test code\n"
},
{
"from": "human",
"value": "class Cats < Linkbot::Plugin\n Linkbot::Plugin.register('cats', self,\n {\n :message => {:regex=> /^!cats$/i, :handler=> :on_message, :help => :help}\n }\n )\n\n def self.on_message(message, ... | ruby | chosen |
[
{
"from": "system",
"value": "Expire stream item caches more quickly.\n\nThis expires all stream item fragments rather than targeted ones, but\ngets the user on with their task more quickly. Expiring individual\nstream item caches was taking too long.\n"
},
{
"from": "human",
"value": "class Per... | ruby | chosen |
[
{
"from": "system",
"value": "Add Search option for categories\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: categories\n#\n# id :integer not null, primary key\n# title :string(255)\n# name :string(255)\n# show_in_menu ... | ruby | chosen |
[
{
"from": "system",
"value": "Use keyword arguments to simplify code\n"
},
{
"from": "human",
"value": "# typed: true\n# frozen_string_literal: true\n\n# A record of a download or an API query\nclass ApiQuery < ApplicationRecord\n extend T::Sig\n belongs_to :scraper\n belongs_to :owner\n\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Hide slides which have an area-dependency\n\nCloses #1508\n"
},
{
"from": "human",
"value": "class Interface\n def initialize(tab = 'demand', sidebar = nil, slide = nil)\n @tab = tab\n @sidebar = sidebar\n @slide = slide\n end\n\n # Returns the available... | ruby | chosen |
[
{
"from": "system",
"value": "Add debugging function to show loaded values.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby -I.\n\nrequire 'puzloader'\n\nfilename = ARGV[0] || 'Puzzles/2014-4-22-LosAngelesTimes.puz'\nloader = PuzzleLoader.new(filename, :debug)\n"
},
{
"from": "gp... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.0.0 to 0.1.1.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.1.0.0'\n s.summary = 'HTTP Client for EventStore'\n s.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Send one email to all users (not indiv. email to each user)\n"
},
{
"from": "human",
"value": "module ProtectedRecordManager\n class ChangeRequestMailer < ActionMailer::Base\n default from: ProtectedRecordManager::Configuration.default_from\n\n def notify(use... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing key to Realtime::Call class\n"
},
{
"from": "human",
"value": "module Queri\n class Realtime\n class Calls < Queri::Realtime\n include CompositeReportHelpers\n\n class << self\n def xml_code\n Realtime.xml_code + \".RTCallsB... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Camping redirects into Strings when they're URIs\n\ndarcs-hash:20070304022942-92d64-8ba8f4966041c11d53bfdd2fd356d2435808e914.gz\n"
},
{
"from": "human",
"value": "module Rack\n module Adapter\n class Camping\n def initialize(app)\n @app = app\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Monitor lescan process and kill it after timeout\n"
},
{
"from": "human",
"value": "module Radbeacon\n\n class LeScanner\n attr_accessor :duration\n\n def initialize(duration = 5)\n @duration = duration\n end\n\n def passive_scan\n devices = A... | ruby | chosen |
[
{
"from": "system",
"value": "Remove warning \"instance variable not initialized\"\n"
},
{
"from": "human",
"value": "module Redisse\n module Server::Redis\n def redis\n @redis ||= EM::Hiredis.connect(redisse.redis_server)\n end\n\n def pubsub(&on_disconnected)\n ensure_pubsu... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify error handling so we catch every bad response\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'zlib'\nrequire 'archive/tar/minitar'\nrequire 'stringio'\nrequire 'rest_client'\n\nmodule Relish\n module Command\n class Push < Base\n \n... | ruby | chosen |
[
{
"from": "system",
"value": "Make Roar::Rails::TestCase always require minitest\n\nSigned-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexbcoles.com>\n"
},
{
"from": "human",
"value": "if ::ActionPack::VERSION::MAJOR == 4\n require 'test_xml/mini_test'\nelse\n require 'test_x... | ruby | chosen |
[
{
"from": "human",
"value": "Add Raritan power metering module\n"
},
{
"from": "gpt",
"value": "module Ropian\n module Meter\n class Raritan\n def inspect\n \"#<#{self.class} #{@manager.host}@#{@manager.community}>\"\n end\n def initialize(ip_addr, community, version = ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for HTTP basic auth\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\nmodule Scanny::Checks\n describe HTTPBasicAuthCheck do\n before do\n @runner = Scanny::Runner.new(HTTPBasicAuthCheck.new)\n @message = \"Basic HTTP authentication ... | ruby | chosen |
[
{
"from": "human",
"value": "Add index on updated_at to public body versions as this is how they are retrieved in the admin timeline view.\n"
},
{
"from": "gpt",
"value": "class AddUpdatedAtIndexToPublicBodyVersions < ActiveRecord::Migration\n def self.up\n add_index :public_body_versions,... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for intersection of arrays of Pegs\n"
},
{
"from": "human",
"value": "require_relative '../peg'\nrequire_relative 'spec_helper'\n\ndescribe Peg do\n let(:peg) { Peg.new(\"red\") }\n describe '#color' do\n it 'returns the color of the peg' do\n exp... | ruby | chosen |
[
{
"from": "system",
"value": "Add a deprecation warning to Money(String)\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'money'\nrequire 'active_support/core_ext/array/extract_options'\n\ndef Money(cents)\n cents.is_a?(String) ? cents.gsub(',', '').to_money : Money.new(cents)\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Standardize format of error messages\n"
},
{
"from": "human",
"value": "module Faraday\n class Response::RaiseErrors < Response::Middleware\n def self.register_on_complete(env)\n env[:response].on_complete do |response|\n case response[:status].to_i\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix undefined method heroku_app_name issue\n"
},
{
"from": "human",
"value": "require 'heroku/client/pgbackups'\nclass Fourchette::Pgbackups\n include Fourchette::Logger\n\n def initialize\n @heroku = Fourchette::Heroku.new\n end\n\n def copy(from, to)\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Return questions length as the maxStep if student have answered all questions\n* Fixes a bug that navigation buttons greyed out in student view\n"
},
{
"from": "human",
"value": "json.submission do\n json.canGrade can_grade\n json.canUpdate can_update\n json.isCr... | ruby | chosen |
[
{
"from": "system",
"value": "Save calling method on nil if no config set\n"
},
{
"from": "human",
"value": "module Rove\n class VagrantSetting < Option\n include Support::Storer\n\n attr_reader :settings, :write_line\n\n class << self\n def [](id)\n id = id.to_sym; Vagrant... | ruby | chosen |
[
{
"from": "system",
"value": "Add functionality to persist asset to the database\n"
},
{
"from": "human",
"value": "class AssetsController < ApplicationController\n\n def new\n set_s3_direct_post\n @user = User.find(session[:user_id])\n @asset = Asset.new\n # @experience = Experienc... | ruby | chosen |
[
{
"from": "system",
"value": "[FIX] Test for root controller in generated new app"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RootController do\n\n describe \"GET 'index'\" do\n it \"returns http success\" do\n get 'index'\n expect(response).to be_success\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make test_summary actually test something\n\nAlso use better assertions, generally\n"
},
{
"from": "human",
"value": "require File.expand_path('../../test_helper', __FILE__)\n\nclass TestStarScope < Minitest::Test\n\n BASE = \"bundle exec bin/starscope --quiet\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Join Together to 7.5.1\n"
},
{
"from": "human",
"value": "cask :v1 => 'join-together' do\n version '7.5.0'\n sha256 'a6661c05b73fff78e1fcfc4e474e95f732ccc996a5bbae56f390e51a414e6867'\n\n url \"http://dougscripts.com/itunes/scrx/jointogether#{version.delete... | ruby | chosen |
[
{
"from": "system",
"value": "Fix merge diseases utility to also update assertions and source suggestions\n"
},
{
"from": "human",
"value": "module Actions\n class MergeDiseases\n include Actions::Transactional\n attr_reader :disease_to_keep, :disease_to_remove\n\n def initialize(disea... | ruby | chosen |
[
{
"from": "system",
"value": "Add Fedora 17+ NFS support.\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nmodule Vagrant\n module Hosts\n class Fedora < Linux\n def self.match?\n release_file = Pathname.new(\"/etc/redhat-release\")\n\n if release_file.exist?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong test class name\n"
},
{
"from": "human",
"value": "\nrequire \"petitest/autorun\"\nrequire \"petitest/power_assert\"\nrequire \"petitest/spec\"\nrequire \"rapa\"\n\nclass TestItemResource < Petitest::Test\n extend ::Petitest::Spec\n prepend ::Petitest::P... | ruby | chosen |
[
{
"from": "system",
"value": "Disable caching of statuses (maybe this will help with the weird bug)\n"
},
{
"from": "human",
"value": "cache\nattributes :id, :created_at, :in_reply_to_id\n\nnode(:uri) { |status| TagManager.instance.uri_for(status) }\nnode(:content) { |statu... | ruby | chosen |
[
{
"from": "system",
"value": "Choose array methods before class methods\n"
},
{
"from": "human",
"value": "module ElasticRecord\n class Relation\n module Delegation\n def to_ary\n to_a.to_ary\n end\n\n def include?(obj)\n to_a.include?(obj)\n end\n\n pr... | ruby | chosen |
[
{
"from": "system",
"value": "Change \"If\" method and change class name of generators\n"
},
{
"from": "human",
"value": "require 'rails/generators/base'\n\nmodule Pinkman\n class ModelGenerator < ::Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n argum... | ruby | chosen |
[
{
"from": "system",
"value": "Add run_as_user to service resource to work on Chef 14\n\nOn Chef 14 windows_service resource defaults to LocalSystem as a user account. So explicitly set user parameter as WinRM uses NetworkService account.\n\nSigned-off-by: d0be23622f2c81b0b5520bcd644f49a9b7446587@gmail.com\n... | ruby | chosen |
[
{
"from": "system",
"value": "Install bdb docs to correct location\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass BerkeleyDb <Formula\n @url='http://download.oracle.com/berkeley-db/db-4.8.24.tar.gz'\n @homepage='http://www.oracle.com/technology/products/berkeley-db/index.html'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"More detailed error logging\"\n\nThis reverts commit ea07e3b33312a17f6fd0f8e0ff54b358dd45278f.\n"
},
{
"from": "human",
"value": "require \"delegate\"\n\nmodule Jess\n class HttpClient\n # Wraps a Net::HTTP object to log all requests to a given Logger o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix PatchLoyaltySymbol for planeswalkers without originalText\n"
},
{
"from": "human",
"value": "# Fix loyalty symbols from +1 to [+1] etc. so they can be displayed in a pretty way\nclass PatchLoyaltySymbol < Patch\n def call\n each_printing do |card|\n nex... | ruby | chosen |
[
{
"from": "system",
"value": "Update license to make it work again"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod spec lint GTHRectHelpers.podspec' to ensure this is a\n# valid spec.\n#\n# Remove all comments before submitting the spec. Optional attributes are commented.\n#\n# For det... | ruby | chosen |
[
{
"from": "system",
"value": "update: Add select to form builder\n"
},
{
"from": "human",
"value": "class StaffPlanFormBuilder < ActionView::Helpers::FormBuilder\n\n %w[text_field text_area password_field check_box].each do |method_name|\n define_method(method_name) do |field_name, *args|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add avatar method to Dog model to return the Dog photo's url\n"
},
{
"from": "human",
"value": "class Dog < ActiveRecord::Base\n has_many :memberships\n has_many :playdates, through: :memberships\n belongs_to :owner, class_name: \"User\", foreign_key: \"user_id\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo on return value\n"
},
{
"from": "human",
"value": "module ActiveRecord::TypedStore\n\n class TypedHash < HashWithIndifferentAccess\n\n class << self\n\n attr_reader :columns\n\n def create(columns)\n Class.new(self) do\n @colum... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify password usage for mysql client\n"
},
{
"from": "human",
"value": "passwords = EncryptedPasswords.new(node, node[\"percona\"][\"encrypted_data_bag\"])\nreplication_sql = \"/etc/mysql/replication.sql\"\nserver = node.percona.server\n\n# define access grants\... | ruby | chosen |
[
{
"from": "system",
"value": "Define version of CSV gem\n\nWithout this defined, Jenkins was using the CSV version stored on the CI\nmachine (3.0.9), which is incompatible with the changes made to remove\nbyte order marks in earlier commits. Defining the version (3.2 -> 4.0)\nmeans we can ensure the CSV ver... | ruby | chosen |
[
{
"from": "system",
"value": "squash-bottle-pr: Call git show if verbose\n"
},
{
"from": "human",
"value": "require \"formula\"\n\nmodule Homebrew\n # Squash the last two commits of build-bottle-pr.\n # Usage:\n # brew build-bottle-pr foo\n # brew pull --bottle 123\n # brew squash-... | ruby | chosen |
[
{
"from": "human",
"value": "Change tagging of email alert signup content items\n\nExisting email_alert_signup items currently only relate to policy alerts.\nThese items should be tagged with some kind of reference to the policy\nthey handle signups for. Currently, this reference is stored as\n\"details\" =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix comment in SlimLint hook\n"
},
{
"from": "human",
"value": "module Overcommit::Hook::PreCommit\n # Runs `slim-lint` against any modified HAML files.\n class SlimLint < Base\n MESSAGE_TYPE_CATEGORIZER = lambda do |type|\n type.include?('W') ? :warning :... | ruby | chosen |
[
{
"from": "system",
"value": "Add columns if they don't already exist\n"
},
{
"from": "human",
"value": "class AddPinfirmableColumnsToResource < ActiveRecord::Migration[5.0]\n def change\n model = (ENV[\"MODEL\"] || \"user\").downcase.pluralize.to_sym\n add_column model, :pinfirmable_pin,... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize SkroutzApi::PaginatedCollection with parsed collection\n"
},
{
"from": "human",
"value": "class SkroutzApi::PaginatedCollection < Array\n include SkroutzApi::Parsing\n\n delegate :model_name, :client, to: :context\n\n attr_reader :response, :context\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Update the Admin user listing.\n\nAlso updated search using regex.\n"
},
{
"from": "human",
"value": "class Admin::UsersController < ApplicationController\n before_action :authenticate_user!\n before_action :authenticate_admin!\n\n def index\n @users = User.co... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"make URLs https by default\"\n\nThis reverts commit 227a95932266038ca2e1c9cc4f580adf6f24a195.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n include GDS::SSO::ControllerMethods\n \n def... | ruby | chosen |
[
{
"from": "system",
"value": "Set user variable in invitations controller too\n"
},
{
"from": "human",
"value": "class InvitationsController < ApplicationController\n before_action :authenticate!\n before_action :set_invitation!\n\n skip_before_action :validate_user_profile!\n skip_before_ac... | ruby | chosen |
[
{
"from": "system",
"value": "Add frequent exceptions to excluded exceptions\n\nCo-Authored-By: hieki <0be209aaf3c42870c0f050d1c2cc8d5026e3dbe2@gmail.com>"
},
{
"from": "human",
"value": "Raven.configure do |config|\n config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove encoding comment from gemspec."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\nrequire 'minitest-spec-rails/version'\n\nGem::Specification.new do |gem|\n gem.name = 'minitest-spec-rai... | ruby | chosen |
[
{
"from": "human",
"value": "Add active field to supplier\n"
},
{
"from": "gpt",
"value": "class AddActiveToDistributionPluginSupplier < ActiveRecord::Migration\n def self.up\n add_column :distribution_plugin_suppliers, :active, :string\n end\n\n def self.down\n remove_column :distribut... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude `~travis/.my.cnf` spec on precise\n"
},
{
"from": "human",
"value": "describe 'mysql installation' do\n before :all do\n sh('sudo service mysql start || true')\n end\n\n describe command('mysql --version') do\n its(:stdout) { should match(/^mysql /)... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor runner to pass manifest\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire_relative 'http_json/requester'\nrequire_relative 'http_json/responder'\n\nclass RunnerService\n\n class Error < RuntimeError\n def initialize(message)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add target parent to Annotations links to avoid open links inside frames\n\nCloses #261\n"
},
{
"from": "human",
"value": "json.array!(@annotations) do |annotation|\n json.extract! annotation, :id\n json.data do\n if annotation.entity\n if annotation.entit... | ruby | chosen |
[
{
"from": "system",
"value": "Include composition ID in save response\n"
},
{
"from": "human",
"value": "json.composition do\n json.name @composition.name\n json.notes @composition.notes\n json.map do\n json.name @map.name\n json.type @map.map_type\n json.segments @map.segments.pluck... | ruby | chosen |
[
{
"from": "system",
"value": "Configure with block instead of hash\n"
},
{
"from": "human",
"value": "require 'twitter/authentication_helpers'\nrequire 'yaml'\n\nclass ApplicationController < ActionController::Base\n include Twitter::AuthenticationHelpers\n protect_from_forgery\n rescue_from ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix all_other_users to be restricted to the current team\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n include Clearance::Controller\n set_current_tenant_by_subdomain(:team, :subdomain)\n\n # Prevent CSRF attacks by rai... | ruby | chosen |
[
{
"from": "system",
"value": "Remove cache. Fucking stupid implementation of api.\n"
},
{
"from": "human",
"value": "object @product\ncache [I18n.locale, @current_user_roles.include?('admin'), current_currency, root_object]\n\nattributes *product_attributes\n\nnode(:display_price) { |p| p.displa... | ruby | chosen |
[
{
"from": "system",
"value": "Add code to end campaign and redirect users who come to the site\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n\n before_filter :ref_to_cookie\n\n def mobile_device?\n if session[:mobi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix version on gemspec so it includes activerecord 4.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ar_transaction_changes/version'\n\nGem::... | ruby | chosen |
[
{
"from": "system",
"value": "Return only the directory name not the entire path\n"
},
{
"from": "human",
"value": "module Rusic\n module Uploaders\n class Template < Base\n def perform\n client[\"themes/#{theme}/templates/#{file.dirname}/#{file.filename}\"].put(params)\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak output file to write to docroot by default\n"
},
{
"from": "human",
"value": "module Yarrow\n module Tools\n # TODO: consider renaming this to OutputDocument.\n class OutputFile\n include ::Configurable\n\n WRITE_MODE = 'w+:UTF-8'.freeze\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix initialize function that didn't make the move\n"
},
{
"from": "human",
"value": "require 'cleverbot'\n\nmodule Cinch\n\tmodule Plugins\n\n\t\tclass CleverBot\n\t\t\tinclude Cinch::Plugin\n\n\t\t\tmatch lambda { |m| /(.*)\\s?@?#{m.bot.nick}[:,]?\\s*(.*)/i }, use_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix simplecov version (workaround for a bug in CodeClimate reporter)\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'lib/jenkins/peace/version'\n\nGem::Specification.new do |s|\n s.name = 'jenkins-peace'\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix getting choice/imageChoice element body returned\n"
},
{
"from": "human",
"value": "module Finicity::V1\n module Response\n \n ###\n # imageChoice and choice elements both have some text/data as well as a \"value\" attribute.\n ##\n class Choice\... | ruby | chosen |
[
{
"from": "system",
"value": "Uninstall aws-iam-authenticator to use awscli instead\n"
},
{
"from": "human",
"value": "ghg 'CircleCI-Public/circleci-cli' do\n cli_name 'circleci'\nend\nghg 'c-bata/kube-prompt'\nghg 'golang/dep'\nghg 'hyperhq/pi'\nghg 'kubernetes-sigs/aws-iam-authenticator'\nghg... | ruby | chosen |
[
{
"from": "system",
"value": "Set homepage to git repo\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.name = \"rs_user_policy\"\n gem.version = \"0.0.1\"\n gem.homepage = \"http://www.rightscale.com\"\n gem.license = \"MIT\"\n gem.summary = %Q{Manages users across ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable to fetch stories in activities\n"
},
{
"from": "human",
"value": "module PivotalTracker\n class Activity\n include HappyMapper\n class << self\n def all(project=nil, options={})\n params = self.encode_options(options)\n if project\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Monitor is now a proper Device and handles the <= method"
},
{
"from": "human",
"value": "# A device that prints out all incoming MIDI message.\n\nmodule JSound::Midi::Devices \n class Monitor\n include_package 'javax.sound.midi'\n include javax.sound.midi.R... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify ensure property of qtree type\n\nThe block passed to the ensurable method is basically the default\nbehaviour as defined in puppet/property/ensure.rb#self.defaultvalues\n\nOmmit the block and use the default\n"
},
{
"from": "human",
"value": "require 'puppe... | ruby | chosen |
[
{
"from": "system",
"value": "Reword failed operation log message\n\nClose #7\n"
},
{
"from": "human",
"value": "module RailsOps\n # This class subscribes to Rails Ops events via the ActiveSupport\n # instrumentation API.\n class LogSubscriber < ActiveSupport::LogSubscriber\n # This gets c... | ruby | chosen |
[
{
"from": "system",
"value": "Change to be more readable\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule TTY\n class Table\n # A class that represents table border options\n #\n # Used internally by {Table::Border} to manage options such as style\n #\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use anonymous model class in spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe ActiveHash::Relation do\n class Country < ActiveHash::Base\n self.data = [\n {:id => 1, :name => \"US\"},\n {:id => 2, :name => \"Canada\"}\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for dhis2 links helper\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire \"rails_helper\"\n\nRSpec.describe Dhis2Helper, type: :helper do\n let(:project) { double(dhis2_url: \"https://sample.org/dhis2\") }\n\n it \"links to dhis2 da... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the specs for terms of use and privacy policy routes as well.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"static pages\", :type => :routing do\n it \"routes about page\" do\n expect(:get => \"/about\").to route_to(\n :contr... | ruby | chosen |
[
{
"from": "system",
"value": "Use test cert for type alias rspec test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Certmgmt::X509PEM', :type => :type_alias do\n it { is_expected.to allow_value('square') }\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_h... | ruby | chosen |
[
{
"from": "system",
"value": "Add a tooltip to the home link when the user is loged, so the user can know the login name of the current user and the personal convo\n"
},
{
"from": "human",
"value": "module HomeHelper\n \n def home_menu_item\n if !logged_in?\n link_to t('ui.home'), home... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 4 more outdated helpers\n\nThese aren't used any more.\n"
},
{
"from": "human",
"value": "require 'geo_helper'\n\nmodule RootHelper\n\n include GeoHelper\n\n def has_further_information?(publication)\n publication.parts.collect(&:slug).include?('further-... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration version for Rails 6.0 support"
},
{
"from": "human",
"value": "class RemoveContactEmailFromSpreeStores < ActiveRecord::Migration[6.1]\n def change\n remove_column :spree_stores, :contact_email\n end\nend\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Set swift version for podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'TvOSMoreButton'\n s.authors = { 'Chris Goldsby' => 'cgoldsby@gmail.com' }\n s.version = '2.0.0'\n s.license = 'MIT'\n s.summary = 'tvOS \\'... More\\' Button'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add links field to Application\n"
},
{
"from": "human",
"value": "module Msplex\n module Resource\n class Application\n attr_reader :name\n attr_reader :maintainer\n\n def initialize(application_name, maintainer)\n @application_name = appli... | ruby | chosen |
[
{
"from": "system",
"value": "Handle layouts by pushing the theme path onto the class level view_paths instance before calling active_layout\n"
},
{
"from": "human",
"value": "# Extend the Base ActionController to support themes\nActionController::Base.class_eval do \n\n attr_accessor :current... | ruby | chosen |
[
{
"from": "system",
"value": "Add has_many transactions association to Subscription\n"
},
{
"from": "human",
"value": "class Subscription < ActiveRecord::Base\n extend Enumerize\n\n validates_presence_of :subscription_code, :status, :payment_method,\n :plan_id, :user_id,... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Upgrade Couchbase Server.app (Enterprise) to v3.0.4\"\n"
},
{
"from": "human",
"value": "cask :v1 => 'couchbase-server-enterprise' do\n version '3.0.4'\n sha256 '476599935a1278b71d2bee73e5a34a960901ef78e700d392d440217106c6111c'\n\n url \"http://packages.... | ruby | chosen |
[
{
"from": "system",
"value": "Set test to pending for flight name validation since logic changed.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Flight do\n\n let!(:valid_flight) { Flight.new(name: \"Fremont Beer Tour\", theme: 1) }\n let(:invalid_flight) { Flight.new(na... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs for winrm recipe\n\nUpdate winrm's specs to be able to test on linux/travis:\n* Remove references to `chef/winr32/version`\n* Mock shellout commands\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'chef/win32/version'\n\ndescribe 'powersh... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.