conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make sure static content is loaded\n"
},
{
"from": "human",
"value": "module ActivoRails\n class Engine < Rails::Engine\n puts \"Loaded engine\"\n config.asset_path = \"/activo/%s\"\n end\nend\n"
},
{
"from": "gpt",
"value": "module ActivoRails\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to set 'other utilisation' demand to zero\n\nSet other utilisation to zero. This is a new input. In some areas it has a non-zero default value. This could result in unintended 'other use' of captured CO2 in the future.\n"
},
{
"from": "gpt",
"value": "r... | ruby | chosen |
[
{
"from": "system",
"value": "Make `brew help cat` test stricter.\n"
},
{
"from": "human",
"value": "# typed: false\n# frozen_string_literal: true\n\ndescribe \"brew\", :integration_test do\n describe \"help\" do\n it \"prints help for a documented Ruby command\" do\n expect { brew \"he... | ruby | chosen |
[
{
"from": "system",
"value": "Hide hentai on the home page.:\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n before_filter :hide_cover_image\n #caches_action :index, layout: false, :if => lambda { not user_signed_in? }\n\n def index\n @latest_reviews = Rev... | ruby | chosen |
[
{
"from": "system",
"value": "Delete orphaned/unused clinical trial records\n"
},
{
"from": "human",
"value": "class UpdateClinicalTrials < ApplicationJob\n\n def perform\n Source.eager_load(:clinical_trials).where(source_type: 'PubMed').each do |source|\n resp = Scrapers::PubMed.call_p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix argument setter/getter in Trigger::SetDueDate.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nclass Trigger::SetDueDate < Trigger::Action\n\n def days=(a)\n @argument=a\n end\n\n def days\n @argument\n end\n\n def execute(task)\n task.due_at... | ruby | chosen |
[
{
"from": "system",
"value": "Add require because when use for API\n"
},
{
"from": "human",
"value": "require \"feedcellar/version\"\n\nmodule Feedcellar\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "require \"feedcellar/version\"\nrequire \"feedcellar/groonga_dat... | ruby | chosen |
[
{
"from": "system",
"value": "Use File::ALT_SEPARATOR to test platform\n"
},
{
"from": "human",
"value": "class Hiera\n module Util\n module_function\n\n def posix?\n require 'etc'\n Etc.getpwuid(0) != nil\n end\n\n def microsoft_windows?\n return false if posix?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Thor default parameter, instead of writing it down manually\n"
},
{
"from": "human",
"value": "require 'thor'\n\nmodule Pronto\n class CLI < Thor\n require 'pronto'\n require 'pronto/version'\n\n desc 'exec', 'Run Pronto'\n\n method_option :commit,\... | ruby | chosen |
[
{
"from": "human",
"value": ":white_check_mark: Add a placeholder spec file for IMF::Image.open\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nRSpec.xdescribe IMF::Image, '.open' do\n describe 'Abnormal conditions' do\n context 'Given a non-existing pathname' do\n it 'raise E... | ruby | chosen |
[
{
"from": "system",
"value": "Send the published document to email-alert-api\n\nThis commit changes the document publisher to send the published document (rather than the in-memory instance before it is published) to email-alert-api and other classes. This means that fields that are populated by publishing-... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec broken by removing default arg\n"
},
{
"from": "human",
"value": "describe Semvergen::Bump do\n let(:semvergen) { Semvergen::Bump.new nil, nil, nil, nil, nil, nil, nil }\n\n describe :next_version do\n let(:next_version) { semvergen.next_version curren... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for the account model\n"
},
{
"from": "gpt",
"value": "# spec/unit/account.rb\n\nrequire_relative '../spec_helper'\n\ndescribe 'Character', :unit do\n before do\n Account.all.destroy\n end\n\n it \"is valid with a username and password\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make current user assignment private\n"
},
{
"from": "human",
"value": "module SessionsHelper\n\n def current_user=(user)\n # set the current user object\n @current_user = user\n end\n\n def current_user\n # find and return the current user object\n @... | ruby | chosen |
[
{
"from": "human",
"value": "Add a quick test for the graph\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\ndescribe Funk::Graph do\n it \"orders functions in dependency order\" do\n graph = Funk::Graph.new(\n a: -> (b, d) { \"#{b}, #{d}\" },\n b: -> (c, e) { \"#{c}, #{e}... | ruby | chosen |
[
{
"from": "system",
"value": "Change supported platforms to 12.04+\n"
},
{
"from": "human",
"value": "name 'exabgp'\nmaintainer 'Aetrion, LLC.'\nmaintainer_email 'ops@dnsimple.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures exabgp'\nlong_description I... | ruby | chosen |
[
{
"from": "system",
"value": "Move default brand title to a method\n\nThis moves the default brand title in AppearancesHelper#brand_title to a\nseparate method, allowing EE to redefine it without having to redefine\nthe entire #brand_title method.\n"
},
{
"from": "human",
"value": "# frozen_stri... | ruby | chosen |
[
{
"from": "system",
"value": "Support program exit and raise on unsupported command request.\n"
},
{
"from": "human",
"value": "require 'interactive_bitmap_editor/matrix/matrix'\n\nmodule InteractiveBitmapEditor\n class CommandInterpreter\n def initialize(printer)\n @printer = printer\n... | ruby | chosen |
[
{
"from": "system",
"value": "Bump spec version to 0.0.3"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"fluent-plugin-logsene\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make Static method for Dispatcher private\n"
},
{
"from": "human",
"value": "module Flame\n\tclass Dispatcher\n\t\t## Module for working with static files\n\t\tmodule Static\n\t\t\t## Find static files and try return it\n\t\t\tdef try_static(dir = config[:public_dir... | ruby | chosen |
[
{
"from": "system",
"value": "Change Engine.root to match the actual root of Forem and not the lib directory.\n\nFixes #366\n"
},
{
"from": "human",
"value": "module ::Forem\n class Engine < Rails::Engine\n isolate_namespace Forem\n\n class << self\n attr_accessor :root\n def ro... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Use \"wb\" mode string when saving screenshots (needed on Windows).\n\ngit-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@9686 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n\n #\n # @... | ruby | chosen |
[
{
"from": "system",
"value": "Fix product delete logic on variant decorator\n"
},
{
"from": "human",
"value": "Spree::Variant.class_eval do\n after_commit :mailchimp_sync\n\n private\n def mailchimp_sync\n if product && product.deleted?\n SolidusMailchimpSync::VariantSynchronizer.new(... | ruby | chosen |
[
{
"from": "human",
"value": "Add very basic sieste v2 mock instance\n"
},
{
"from": "gpt",
"value": "require 'sinatra'\nrequire 'json'\n\nrequire 'sinatra/reloader' if development?\nset :port, 1234\n\n\nsimple = [\"JISPVTWX\", \"EVVDPKOX\", \"FASXEOMD\", \"FWNDTEZZ\", \"WZBXPSXK\", \"PRBXDCLZ\"]... | ruby | chosen |
[
{
"from": "system",
"value": "Enable basic test for storing session data in Redis\n\nThis change enables the test for storing session data in Redis (rather\nthan in Tomcat's native session data store).\n\n[#64605932]"
},
{
"from": "human",
"value": "# Copyright 2014 the original author or author... | ruby | chosen |
[
{
"from": "system",
"value": "Send body params (format, body) to post requests\n"
},
{
"from": "human",
"value": "module MWS\n module API\n class Base\n attr_reader :connection, :uri, :version, :verb\n @verb = :get\n\n def initialize(connection)\n @verb ||= :get\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add class methods to set layout and view path.\n"
},
{
"from": "human",
"value": "require_relative \"../hmote\"\n\nmodule HMote::Render\n include HMote::Helpers\n\n CONTENT_TYPE = \"Content-Type\".freeze\n DEFAULT_CONTENT_TYPE = \"text/html; charset=utf-8\".freez... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to respect at_time for new view records\n"
},
{
"from": "human",
"value": "module Viewable\n extend ActiveSupport::Concern\n\n included do\n has_many :views, class_name: self.name + 'View'\n\n def mark_read(user, at_time=nil)\n view = view_for(... | ruby | chosen |
[
{
"from": "human",
"value": "Add a podspec file to make this into a CocoaPod.\n"
},
{
"from": "gpt",
"value": "#\n# Be sure to run `pod lib lint SafeUINavigationController.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# Any lines starting with... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation to Assets module\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nmodule Slippery\n module Assets\n ASSETS_PATH = '../../../assets/'\n\n def self.embed_locally\n FileUtils.cp_r(File.expand_path(ASSETS_PATH, __FILE__), './')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make cron enqueue messages debug only in enterprise\n"
},
{
"from": "human",
"value": "require \"travis/lock\"\nrequire \"redlock\"\nrequire \"metriks\"\n\nclass Travis::Api::App\n module Schedulers\n class ScheduleCronJobs < Travis::Services::Base\n regist... | ruby | chosen |
[
{
"from": "system",
"value": "Update message for name collision\n"
},
{
"from": "human",
"value": "require \"multi_logger/version\"\n\nmodule MultiLogger\n class << self\n def add_logger(name, path=nil)\n name = name.to_s\n rails_logger_class = get_rails_logger_class()\n\n if ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor and clarify help method response\n"
},
{
"from": "human",
"value": "require 'unirest'\nrequire 'open-uri'\n\nmodule Cinch\n module Plugins\n class Cafe\n include Cinch::Plugin\n\n match /(cafe) (.+)/\n match /(help cafe)$/, method: :help\... | ruby | chosen |
[
{
"from": "system",
"value": "Check if all the used ciphers are supported\n"
},
{
"from": "human",
"value": "require 'rmega/crypto/aes_ecb'\nrequire 'rmega/crypto/aes_cbc'\nrequire 'rmega/crypto/aes_ctr'\nrequire 'rmega/crypto/rsa'\n\nmodule Rmega\n module Crypto\n include AesCbc\n includ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to scope followed threads by course.\n"
},
{
"from": "human",
"value": "get \"#{APIPREFIX}/users/:user_id/notifications\" do |user_id|\n user.notifications.map(&:to_hash).to_json\nend\n\nget \"#{APIPREFIX}/users/:user_id/subscribed_threads\" do |user_id|\... | ruby | chosen |
[
{
"from": "system",
"value": "[gemspec] Add dependencies to capybara and rspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'handy_feature_helpers/version'\n\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry as development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"compath/version\"\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundler initialization to test helper\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire 'rubygems'\nrequire 'minitest/autorun'\nrequire 'mocha/setup'\n\nlib_path = (Pathname.new(__FILE__) + \"../../../lib\").cleanpath\n$LOAD_PATH.unshift(lib_path)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add neat as dependency, not sinatra..\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'middleman-neat/version'\n\nGem::Specification.new do |ge... | ruby | chosen |
[
{
"from": "system",
"value": "Extend collected information and fix regex for scan\n"
},
{
"from": "human",
"value": "#\n# gather a list of PCI devices with lspci\n#\n\nOhai.plugin(:Pci) do\n provides 'pci'\n\n collect_data(:default) do\n pci []\n `lspci -m`.each_line do |line|\n lin... | ruby | chosen |
[
{
"from": "system",
"value": "Create a new user, if there is none\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n skip_before_action :authorize\n \n def new\n end\n\n def create\n user = User.find_by(name: params[:name])\n if user and user.authent... | ruby | chosen |
[
{
"from": "human",
"value": "Allow for passing -c for config path and -j for job names\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby -w\nrequire 'optparse'\nrequire 'yaml'\n\nputs 'Fetching all data'\n\n#grab config\noptions = {}\n\nOptionParser.new do |opts|\n\topts.banner = \"Usage: ana... | ruby | chosen |
[
{
"from": "system",
"value": "Use the proper Merb root and environment constants. Thanks to Dan Gilkerson.\n\ngit-svn-id: 93069e0dc7225fbffdaa34e2b50be2112296e79e@727 7063305b-7217-0410-af8c-cdc13e5119b9\n"
},
{
"from": "human",
"value": "unless defined?(Sass::MERB_LOADED)\n Sass::MERB_LOADED =... | ruby | chosen |
[
{
"from": "system",
"value": "Include backtrace in failure message\n"
},
{
"from": "human",
"value": "require 'sensu-plugin'\nrequire 'mixlib/cli'\n\nmodule Sensu\n module Plugin\n class CLI\n include Mixlib::CLI\n\n attr_accessor :argv\n\n # Implementing classes should overri... | ruby | chosen |
[
{
"from": "human",
"value": "Change module / class naming and add documentation"
},
{
"from": "gpt",
"value": "module Merging\n # @abstract A Service for taking two sorted list, and merging them into a\n # single sorted list. Each item in the lists must be comparable, ie. It must\n # resp... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cases for ruby 1.9\n"
},
{
"from": "human",
"value": "class GitosisObserver < ActiveRecord::Observer\n observe :project, :user, :gitosis_public_key, :member, :role, :repository\n \n \n def before_create(object)\n if object.is_a?(Project)\n repo = Rep... | ruby | chosen |
[
{
"from": "system",
"value": "Remove DNA null session document\n\nIts causing issues elsewhere. Reinstate later,\n"
},
{
"from": "human",
"value": "module Renalware\n module HD\n class Session::DNA < Session\n def self.policy_class\n DNASessionPolicy\n end\n\n def immut... | ruby | chosen |
[
{
"from": "system",
"value": "Use same folder for log file if ORBIT_HOME is not set\n"
},
{
"from": "human",
"value": "# Apache 2.0 License\n#\n# Copyright (c) 2016 Sebastian Katzer, appPlant GmbH\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this softw... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up the $:.unshift expand_path a bit."
},
{
"from": "human",
"value": "$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '../lib')))\nunless defined?(Gem) then require 'rubygems' end\nrequire 'minitest/autorun'\nrequire 'minitest/pride'\nrequire 'mi... | ruby | chosen |
[
{
"from": "system",
"value": "Add when output is specified test.\n"
},
{
"from": "human",
"value": "require \"test_helper\"\r\n\r\nclass CompilerCompileTest < Test::Unit::TestCase\r\n include IronRubyInline\r\n \r\n context \"when no output is specified\" do\r\n setup do\r\n flexmock(... | ruby | chosen |
[
{
"from": "system",
"value": "Create attachment first before build the reference\n"
},
{
"from": "human",
"value": "module CoursemologyV1::Source\n def_model 'file_uploads' do\n scope :visible, ->() { where(is_public: true) }\n require 'open-uri'\n URL_PREFIX = 'http://coursemology.s3.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix down migration - need explicit cast for string -> integer\n"
},
{
"from": "human",
"value": "class ChangeSuburbPostcodeToString < ActiveRecord::Migration\n def up\n change_column :suburbs, :postcode, :string\n end\n\n def down\n change_column :suburbs,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test data to be suitable for RGB range\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nmodule Photomosaic\n describe Image do\n let(:image_path) do\n fixture_path(\"lena.png\")\n end\n\n let(:image) do\n described_class.new(imag... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up acceptance spec helper\n"
},
{
"from": "human",
"value": "require 'beaker-rspec/spec_helper'\nrequire 'beaker-rspec/helpers/serverspec'\nrequire 'beaker/puppet_install_helper'\n\nrun_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'\n\nRSpec.conf... | ruby | chosen |
[
{
"from": "system",
"value": "Use positive language for specs\n"
},
{
"from": "human",
"value": "RSpec.shared_examples \"validate valid parameter\" do |validator_class, parameter|\n subject(:valid_parameter_validator) { validator_class.new('name', validator_definition, parameter).tap {|validato... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration tests between table and basic renderer.\n"
},
{
"from": "gpt",
"value": "# -*- encoding: utf-8 -*-\n\nrequire 'spec_helper'\n\ndescribe TTY::Table, 'options' do\n let(:rows) { [['a1', 'a2'], ['b1', 'b2']] }\n let(:widths) { [] }\n let(:aligns) { ... | ruby | chosen |
[
{
"from": "system",
"value": "Change current_visitor to current_user for policy check.\n\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../../spec_helper', __FILE__)\n\ndescribe \"/dataservice/blobs/index.html.haml\" do\n include Dataservice::BlobsHelper\n\n before(:each) d... | ruby | chosen |
[
{
"from": "system",
"value": "Update bunny dependency to allow bunny 1.x.x\n\nBunny is now on version 1.6.1 without braking API changes. We should\nallow that.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PAT... | ruby | chosen |
[
{
"from": "system",
"value": "Use a more sensible mechanism to determine whether to bundle resources.\n\n(The previous one only worked by accident.)\n\nSVN-Revision: 343\n"
},
{
"from": "human",
"value": "require 'buildr'\n\n# Helper methods for building bundles using buildr-bnd.\n\nclass Buildr... | ruby | chosen |
[
{
"from": "system",
"value": ":wrench: Change name to pattern in resouce module\n"
},
{
"from": "human",
"value": "module Idcf\n module Ilb\n module Resources\n # Server resource class\n class L7route < Base\n def inspect\n o_id = object_id\n \"#<#{self.cla... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug with path matching\n"
},
{
"from": "human",
"value": "module Pronto\n module Credo\n class OutputParser\n attr_reader :output, :file\n TYPE_WARNINGS = { 'R' => :info,\n 'W' => :warning,\n 'C' => :in... | ruby | chosen |
[
{
"from": "system",
"value": "Remove `require` to avoide circular requirement\n"
},
{
"from": "human",
"value": "require 'rss/atom/feed_history'\n\nmodule RSS\n module Atom\n class Feed\n include FeedHistory\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module RSS\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add content-available key to notification json\n"
},
{
"from": "human",
"value": "module AwsSnsManager\n # = AwsSnsManager::Client\n class Client\n attr_accessor :client\n attr_accessor :arn\n\n def initialize(options = {})\n super()\n\n @client... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to merge arrays\n"
},
{
"from": "human",
"value": "module Cheffish\n class MergedConfig\n def initialize(*configs)\n @configs = configs\n end\n\n attr_reader :configs\n\n def [](name)\n result_configs = []\n configs.each do |c... | ruby | chosen |
[
{
"from": "human",
"value": "Add pending migration to drop attachment join model tables\n"
},
{
"from": "gpt",
"value": "class DropAttachmentJoinModels < ActiveRecord::Migration\n def up\n drop_table :consultation_response_attachments\n drop_table :corporate_information_page_attachments\n... | ruby | chosen |
[
{
"from": "system",
"value": "Order the drop down options\n"
},
{
"from": "human",
"value": "module ChinaRegionFu\n class FetchOptionsController < ::ActionController::Metal\n \n def index\n if params_valid?(params) and parent_klass = params[:parent_klass].classify.safe_constantize.fi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow use as gem on Rails 2\n"
},
{
"from": "human",
"value": "class Engine < Rails::Engine\n # Mimic old vendored plugin behavior, attachment_fu/lib is autoloaded.\n config.autoload_paths << File.expand_path(\"..\", __FILE__)\n\n initializer \"attachment_fu\" do... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'an' rather than 'a' as the article where the time period variance is one hour\n"
},
{
"from": "human",
"value": "module RelativeTime\n class InWords\n def call(date_to, date_from)\n diff = date_from.to_time - date_to.to_time\n return 'less than a ... | ruby | chosen |
[
{
"from": "system",
"value": "Rearrange app controllers so query mirrors finder\n"
},
{
"from": "human",
"value": "class MenuController < BaseController\n\n def viewDidLoad\n super\n\n self.title = \"Medic\"\n\n @table = UITableView.alloc.initWithFrame(self.view.bounds)\n @table.dat... | ruby | chosen |
[
{
"from": "system",
"value": "Change the priority of checking status because both installed and not installed plugins could be processing.\n"
},
{
"from": "human",
"value": "class PluginDecorator < Draper::Decorator\n delegate_all\n\n def status\n if installed?\n I18n.t(\"terms.install... | ruby | chosen |
[
{
"from": "system",
"value": "Use Ruby 1.9 hash syntax.\n\nWhenever it comes to using class as a hash key, I get a bit nervous.\n"
},
{
"from": "human",
"value": "module OrganisationHelper\n def organisation_display_name(organisation)\n if organisation.acronym.present?\n content_tag(:ab... | ruby | chosen |
[
{
"from": "system",
"value": "Use the counter for harvests\n"
},
{
"from": "human",
"value": "module CropSearch\n extend ActiveSupport::Concern\n\n included do\n searchkick word_start: %i(name alternate_names scientific_names), case_sensitive: false\n\n scope :search_import, -> { include... | ruby | chosen |
[
{
"from": "system",
"value": "Add guard for ApplicationPolicy>Scope resolve method\n"
},
{
"from": "human",
"value": "class ApplicationPolicy\n attr_reader :user, :record\n\n def initialize(user, record)\n @user = user\n @record = record\n end\n\n def index?\n user.is_a?(AdminUser)\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flash notice HTML bug\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def flash_message\n types = { :notice => 'success', :alert => 'error', :info => 'info' }\n flash.inject(\"\") do |sum, message|\n content_tag :div, :class => \"aler... | ruby | chosen |
[
{
"from": "system",
"value": "Update default from in application mailer to eightynotes.com\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass ApplicationMailer < ActionMailer::Base\n default from: \"from@example.com\"\n layout \"mailer\"\nend\n"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "system",
"value": "Handle lower case and capitalised meta tag\n"
},
{
"from": "human",
"value": "# For the benefit of NewDomainWorker\nrequire \"nokogiri\"\n\nclass Domain < ActiveRecord::Base\n # Lookup and cache meta information for a domain\n def self.lookup_meta(domain_name)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Bunny.open for short lived connections.\n"
},
{
"from": "human",
"value": "$:.unshift File.expand_path(File.dirname(__FILE__))\n\n# Ruby standard libraries\n%w[socket thread timeout].each do |file|\n\trequire file\nend\n\nrequire 'qrack/qrack'\n\nrequire 'bunny/... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation to a few methods\n"
},
{
"from": "human",
"value": "require 'gaffe/version'\nrequire 'gaffe/errors'\n\nmodule Gaffe\n def self.configure\n yield configuration\n end\n\n def self.configuration\n @configuration ||= OpenStruct.new\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add iconv as a development dependency.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"ohm-contrib\"\n s.version = \"1.2\"\n s.summary = %{A collection of decoupled drop-in modules for Ohm.}\n s.description = %{Includes a couple of ... | ruby | chosen |
[
{
"from": "system",
"value": "Add valid gemspec metadata to fix bundle errors\n\nSolves:\nhttps://github.com/pch/wellspring-example-blog/issues/2\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"wellspring/version\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to prepare for 0.1 gem release"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"with_model/version\"\n\nGem::Specification.new do |s|\n s.name = \"with_model\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Swap service_url and entry_url to play nice with ActiveMerchant's payment_service_for view helper\n"
},
{
"from": "human",
"value": "module ActiveMerchant #:nodoc:\n module Billing #:nodoc:\n module Integrations #:nodoc:\n module Ipay88\n autoload :R... | ruby | chosen |
[
{
"from": "system",
"value": "Change postal code in e.g message\n\n* This probably have to change algo in the en.yml file for each project\n"
},
{
"from": "human",
"value": "class PostalCodeFormatValidator < ActiveModel::EachValidator\n def validate_each(object, attribute, value)\n unless va... | ruby | chosen |
[
{
"from": "system",
"value": "Move codeclimate code to the top\n"
},
{
"from": "human",
"value": "ENV['RACK_ENV'] = 'test'\n\nrequire_relative './mock/app'\nrequire 'rspec'\nrequire 'rack/test'\nrequire \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "system",
"value": "Add +be_kind_of+ spec helper from Merb.\n"
},
{
"from": "human",
"value": "$TESTING=true\n$:.push File.join(File.dirname(__FILE__), '..', 'lib')\nrequire 'iniparse'\n"
},
{
"from": "gpt",
"value": "$TESTING=true\n$:.push File.join(File.dirname(__FILE__),... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Chefspecs by bumping centos platform version\n\nRecent versions of fauxhai do not support CentOS 7.2 anymore.\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nrequire 'rundeck'\n\nRSpec.configure do |config|\n config.platfo... | ruby | chosen |
[
{
"from": "system",
"value": "Edit basis of test suite.\n"
},
{
"from": "human",
"value": "require 'faker'\nrequire 'vimrunner'\nrequire 'vimrunner/testing'\nrequire_relative 'lib/cmakevim'\nrequire_relative 'lib/vimrunner/extras'\nrequire_relative 'lib/cmakevim/environment'\n\nI18n.enforce_avai... | ruby | chosen |
[
{
"from": "system",
"value": "Allow connection to Code Climate\n"
},
{
"from": "human",
"value": "require 'codeclimate-test-reporter'\nCodeClimate::TestReporter.start\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\n\nrequire 'ramesh'\nrequire 'webmock/rspec'\n\ndef fixture_path(na... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the chefspec coverage report\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'chefspec/berkshelf'\n\nChefSpec::Coverage.start!\n"
},
{
"from": "gpt",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade to the latest version of the CodeClimate test reporter\n"
},
{
"from": "human",
"value": "if ENV[\"CODECLIMATE_REPO_TOKEN\"]\n require \"codeclimate-test-reporter\"\n CodeClimate::TestReporter.start\nend\n\nrequire \"interactor/rails\"\n\nrequire \"bundler... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken initialization arguments on TruffleRuby\n\nThe `make_synchronized_on_rbx` method is used to intercept the `.new`\nmethod on Array/Hash/Set but it broke whenever the `.new` was being used\nwith arguments.\n\n(This was shown by the Array/Hash/Set specs that were added ... | ruby | chosen |
[
{
"from": "human",
"value": "Add some tests/specs for recently fixed Surface methods.\n"
},
{
"from": "gpt",
"value": "# This is mostly for regression testing and bugfix confirmation at the moment.\n\nrequire 'rubygame'\ninclude Rubygame\n\ncontext \"A Surface being created (with a Screen availa... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars - decoding a message\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/565b9d6f8139573819000056/\n# --- iteration 1 ---\ndef decode(message)\n message.chars.map do |chr|\n if chr == \" \"\n chr\n else\n (122 - chr.ord + 97... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare .podspec for next release.\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n\n s.name = \"CKCircleMenuView\"\n s.version = \"0.1.2\"\n s.summary = \"An easy-to-integrate popup menu of round buttons placed on a circle.\"\n\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Add function after for ActiveRecord connections\n"
},
{
"from": "human",
"value": "#encoding: utf-8\nrequire 'rubygems'\nrequire 'sinatra'\nrequire 'sinatra/reloader'\nrequire 'sinatra/activerecord'\n\nset :database, \"sqlite3:pizzashop.db\"\n\nclass Product < Activ... | ruby | chosen |
[
{
"from": "system",
"value": "Update xACT 2.30 to 2.31"
},
{
"from": "human",
"value": "class Xact < Cask\n version '2.30'\n sha256 '49f7770ad682bdb36f63bebaf98875c22c1ffc7bb9a14b616213039506a9cf74'\n\n url \"http://xact.scottcbrown.org/xACT#{version}.zip\"\n appcast 'http://xactupdate.scott... | ruby | chosen |
[
{
"from": "system",
"value": "Add more compiler options\nBuild executable in temporary directory\nRun executable if compile is successful\n"
},
{
"from": "human",
"value": "#run.rb\n#TODO: test on Windows\n\n`g++ #{ARGF.filename}`\n"
},
{
"from": "gpt",
"value": "#run.rb #TODO: test... | ruby | chosen |
[
{
"from": "system",
"value": "Remove apostrophe in array of regular expressions\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Stemmer\n module ConfixStripping\n class PrecedenceAdjustmentSpecification\n def satisfied_by?(value)\n regex_rules = [\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to filter sensitive environment variables for Hoptoad\n"
},
{
"from": "human",
"value": "HoptoadNotifier.configure do |config|\n config.api_key = ENV['HOPTOAD_API_KEY']\nend\n"
},
{
"from": "gpt",
"value": "HoptoadNotifier.configure do |config... | ruby | chosen |
[
{
"from": "system",
"value": "Add current admin user’s email to every log line."
},
{
"from": "human",
"value": "Rails.application.configure do\n config.lograge.enabled = true\n\n\n config.lograge.custom_payload do |controller|\n {\n application_id: controller.current_application.try(:... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.