conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add data migration to clear change note on an Edition\n\nBEIS have published a document with a change note they'd prefer not to\ndisplay. See https://govuk.zendesk.com/agent/tickets/1391330.\n\nThis data migration sets sets minor_change to true on the edition to\nstop it being d... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up alias migration script\n"
},
{
"from": "human",
"value": "class CreateAliases < ActiveRecord::Migration\n def change\n create_table :aliases do |t|\n t.string :name\n t.references :document, index: true, foreign_key: true\n\n t.timestamps... | ruby | chosen |
[
{
"from": "human",
"value": "Add detect_spreefinery_single_sign_on for frontend UserSessionsController\n"
},
{
"from": "gpt",
"value": "Spree::UserSessionsController.class_eval do\n skip_before_action :detect_spreefinery_single_sign_on!\n\n private\n # This overrides what Spree defines, so th... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Bundler by default for Rails apps, since we're depending on the 'environment' rake task.\n"
},
{
"from": "human",
"value": "module DataMapper\n module Visualizer\n module Rake\n module Rails\n module Tasks\n #\n # Overrides ... | ruby | chosen |
[
{
"from": "system",
"value": "Add DSL to register new type-pattern mapping\n"
},
{
"from": "human",
"value": "require \"time\"\n\nmodule Rack\n class Spec\n module Validators\n class TypeValidator < Base\n def validate!(env)\n value = extract_value(env) or return\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add before content_type for api extension\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule Sidekiq\n module Statistic\n module WebApiExtension\n def self.registered(app)\n app.helpers WebExtensionHelper\n\n app.get '/api/statistic.j... | ruby | chosen |
[
{
"from": "human",
"value": "Add Session Controller test, which is mostly tests from the account_controller_test in crabgrass 0.5.\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass SessionControllerTest < ActionController::TestCase\n fixtures :users, :... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure GTypeModule is loaded before trying to get its interfaces.\n"
},
{
"from": "human",
"value": "require File.expand_path('../gir_ffi_test_helper.rb', File.dirname(__FILE__))\n\ndescribe \"The generated GObject module\" do\n before do\n GirFFI.setup :GObj... | ruby | chosen |
[
{
"from": "system",
"value": "Use syslog/logger instead of syslog_logger\n"
},
{
"from": "human",
"value": "require 'syslog_logger'\n\nmodule Foreman\n module Logging\n class SyslogAdapter\n def initialize(app_name)\n @logger = SyslogLogger.new(app_name)\n end\n\n def l... | ruby | chosen |
[
{
"from": "system",
"value": "Change host port range to 10000..19999\n"
},
{
"from": "human",
"value": "class PortMapping < ActiveRecord::Base\n belongs_to :service\n\n validates :host_port, uniqueness: true\n validates :host_port, :lb_port, :container_port, presence: true\n\n before_validat... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Remove symbols to use values correctly\n"
},
{
"from": "human",
"value": "class TaskComment < ActiveRecord::Base\n belongs_to :task # Foreign key\n belongs_to :user\n\n validates :task, presence: true\n validates :user, presence: true\n validates :recipien... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ElasticSearch plugin after arguments change\n"
},
{
"from": "human",
"value": "module RorVsWild\n module Plugin\n class Elasticsearch\n def self.setup\n return if !defined?(::Elasticsearch::Transport)\n return if ::Elasticsearch::Transport... | ruby | chosen |
[
{
"from": "system",
"value": "Prepend sqlite3 library root when cross compiling.\n"
},
{
"from": "human",
"value": "# use rake-compiler for building the extension\nrequire 'rake/extensiontask'\n\n# build sqlite3_native C extension\nRake::ExtensionTask.new('sqlite3_native', HOE.spec) do |ext|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update how dateUpdated is dealt with\n"
},
{
"from": "human",
"value": "class PhotoSet < FlickrObject\n attr_accessor :id, :primary, :secret, :server, :farm, :photos, :videos,\n :title, :description, :count_views, :count_comments,\n :d... | ruby | chosen |
[
{
"from": "human",
"value": "Add lost active record ext file.\n"
},
{
"from": "gpt",
"value": "class <<ActiveRecord::Base\n # replace blank/whitespace only strings with a nil\n def nillify_blank(*attrs)\n attrs.each do |attr|\n define_method \"#{attr}=\" do |value|\n self[attr] ... | ruby | chosen |
[
{
"from": "system",
"value": "Use key instead of token\n\nMore familiar in this context\n"
},
{
"from": "human",
"value": "# Schema: id, token, filename, content_type, metadata, byte_size, digest, created_at\nclass ActiveFile::Blob < ActiveRecord::Base\n self.table_name = \"rails_active_file_bl... | ruby | chosen |
[
{
"from": "system",
"value": "Add required packages to build nokogiri.\n"
},
{
"from": "human",
"value": "include_recipe 'cron'\n\npackage ['zlib-devel', 'xz-devel'] do\n action :install\nend\n\n# install gem backup with options --no-ri --no-rdoc before include_recipe 'backup'\ngem_package 'bac... | ruby | chosen |
[
{
"from": "system",
"value": "Use also type when querying Artifact by job_id\n\nWe have an index on (type, job_id), which is not used effectively when\nquerying only by job_id.\n"
},
{
"from": "human",
"value": "module Travis\n module Services\n class FindArtifact < Base\n register :fin... | ruby | chosen |
[
{
"from": "system",
"value": "Use system to talk to shell so that you can see output\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'pathname'\n\nmodule Battlestation\n\n # Responsible of handling all the command line interface logic.\n class CLI\n\n # Entry poi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in debian 7 test\n"
},
{
"from": "human",
"value": "require 'integration_helper'\n\nclass Debian7BootstrapTest < IntegrationTest\n def user\n \"admin\"\n end\n\n def image_id\n \"ami-0ba62d62\"\n end\n\n def prepare_server\n # Do nothing as `s... | ruby | chosen |
[
{
"from": "system",
"value": "Add coffee-rails as a 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 'marionette-dialogregion-rails/version'\n\nGem::Specification.new do |sp... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning in Rails 5\n"
},
{
"from": "human",
"value": "module Chanko\n module Controller\n extend ActiveSupport::Concern\n\n module ClassMethods\n private\n\n def inherited(base)\n if Config.auto_reload && base.name == \"Applic... | ruby | chosen |
[
{
"from": "system",
"value": "Add slight wait for gogs to start\n"
},
{
"from": "human",
"value": "describe file('/var/lib/drone/drone.sqlite') do\n it { should be_file }\nend\n\n# Gogs\ndescribe port(8080) do\n it { should be_listening }\nend\n\n# Drone\ndescribe port(9080) do\n it { should ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to change the DHCP_HOSTNAME on RedHat\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module GuestRedHat\n module Cap\n class ChangeHostName\n def self.change_host_name(machine, name)\n machine.communicate.tap do |comm|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle the event via automate first, then handle alert.\n"
},
{
"from": "human",
"value": "class EmsEventHelper\n include Vmdb::Logging\n\n def initialize(event)\n raise ArgumentError, \"event must be an EmsEvent\" unless event.kind_of?(EmsEvent)\n @event = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update to include then engine etc. in the base file\n"
},
{
"from": "human",
"value": "module FaceRecognition\nend\n"
},
{
"from": "gpt",
"value": "require \"face_recognition/engine\"\n\nmodule FaceRecognition\nend\n\n# load Rails/Railtie\nbegin\n requi... | ruby | chosen |
[
{
"from": "system",
"value": "Implement first OptionParser flag, -g\n"
},
{
"from": "human",
"value": "module Gemrat\n class Arguments\n class UnableToParse < StandardError; end\n\n ATTRIBUTES = [:gems, :gemfile, :options]\n\n ATTRIBUTES.each { |arg| attr_accessor arg }\n\n\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Fix html encoding of certain localization fields.\n\nMarkdown-ifying all the localizations turns out to be overkill and\nmesses up some things. So only markdown-ify the tooltip fields.\n"
},
{
"from": "human",
"value": "module JsLocaleHelper\n def self.output_local... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce minimum required OS version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"UIImageView-Letters\"\n s.version = \"1.1.3\"\n s.summary = \"UIImageView category that generates letter initials as image.\"\n s.descriptio... | ruby | chosen |
[
{
"from": "system",
"value": "Add FFI::IO.read as described in JRUBY-3636\n"
},
{
"from": "human",
"value": "module FFI\n module IO\n def self.for_fd(fd, mode = \"r\")\n ::IO.for_fd(fd, mode)\n end\n end\nend"
},
{
"from": "gpt",
"value": "module FFI\n module IO\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"concat should check the input if escape or not using SafeBuffer concat method\"\n\nThis reverts commit d218ae527fdb10d2228fc7c7ea860b7b5c9fedab.\n\nSigned-off-by: Jeremy Kemper <b3f594e10a9edcf5413cf1190121d45078c62290@bitsweat.net>\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove linux context; not currently supported by sprout\n"
},
{
"from": "human",
"value": "include_recipe 'sprout-git::git_hooks'\n\ngit_hooks_global_dir = node['sprout']['git']['git_hooks']['global_dir']\n\nif node['platform'] == 'mac_os_x'\n package 'git-secrets'... | ruby | chosen |
[
{
"from": "system",
"value": "Make internals public so workflow can be hacked\n"
},
{
"from": "human",
"value": "module Yarrow\n class ScanSource < Process::StepProcessor\n accepts Config::Instance\n provides Content::Graph\n\n def step(config)\n Yarrow::Content::Graph.from_source... | ruby | chosen |
[
{
"from": "system",
"value": "Remove require of removed filed\n"
},
{
"from": "human",
"value": "require 'noosfero/core_ext/string'\nrequire 'noosfero/core_ext/integer'\nrequire 'noosfero/core_ext/active_record'\nrequire 'noosfero/core_ext/action_mailer'\n\n"
},
{
"from": "gpt",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where submodule directories caused exception\n"
},
{
"from": "human",
"value": "require \"pathname\"\nrequire File.expand_path(\"../line\", __FILE__)\n\nclass CommitFile\n EXTENSION_BLACKLIST = %w(.png .jpg .gif)\n\n def self.all\n pathnames.map { |path... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure sidekiq is loaded first\n"
},
{
"from": "human",
"value": "require 'sidekiq-scheduler/client'\nrequire 'sidekiq-scheduler/worker'\nrequire 'sidekiq-scheduler/version'\n"
},
{
"from": "gpt",
"value": "require 'sidekiq'\nrequire 'sidekiq-schedule... | ruby | chosen |
[
{
"from": "system",
"value": "Allow using JsonFormatter from CLI via '-f json'\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,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove versions from development dependencies\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.name = 'memdash'\n gem.version = '0.0.1'\n\n gem.authors = ['Brian Ryckbost', 'Steve Richert']\n gem.email = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use 256-bit Safe Prime from Go\n"
},
{
"from": "human",
"value": "require 'securerandom'\n\nmodule SSSAAS\n class Secrets\n # Creates a set of shares from a given secret\n # Requires:\n # n - total number of shares to create\n # k ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a script for profiling wrap [ci skip]\n"
},
{
"from": "gpt",
"value": "require_relative 'setup'\nrequire 'hotch'\n\nrel = user_repo.tasks.limit(100).wrap(:user)\n\nrel.to_a\n\nHotch() do\n 1000.times do\n rel.each { |t| t.user.name }\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Add abstract_type to gems mutated in zombie mode\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nnamespace :metrics do\n allowed_versions = %w(mri-1.9.3 mri-2.0.0 rbx-1.9.3)\n\n begin\n require 'mutant'\n rescue LoadError\n end\n\n config = Devtools... | ruby | chosen |
[
{
"from": "system",
"value": "Update error testing for overwrites.\n"
},
{
"from": "human",
"value": "module SES::TestCases\n module Core\n class OverwritesTest < SES::Test::Spec\n describe 'Overwrites' do SES::MethodData::Overwrites end\n \n # Provides a simple mock object fo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing tests and refactor the summary request\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule DestinyTest\n describe 'Destiny Gem', 'The Destiny API Gem' do\n it 'should search for a destiny player based on platform and username' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set invalid username to ensure testing on circle ci\n"
},
{
"from": "human",
"value": "require \"application_system_test_case\"\n\nclass UsersTest < ApplicationSystemTestCase\n test \"visiting the index\" do\n visit users_url\n\n assert_selector \"h1\", text:... | ruby | chosen |
[
{
"from": "system",
"value": "Sort file list and directory list\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# -*- coding: utf-8 -*-\n\nmodule KakidameUtil\n def get_file_list(dir_path)\n is_child = dir_path != KAKIDAME_ROOT\n\n files = []\n dirs = []\n Dir.chdir(dir_path... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.3.1.0 to 0.4.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'messaging'\n s.version = '0.3.1.0'\n s.summary = 'Messaging primitives for Eventide'\n s.description = ' ... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to the gemspec, grumble grumble\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"messaging/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificatio... | ruby | chosen |
[
{
"from": "system",
"value": "Rename pod spec and add description"
},
{
"from": "human",
"value": "require 'fileutils'\n\nprint 'pod name > '\ncocoapod = gets.chop\nfile_names = Dir[\"#{Dir.pwd}/**/*.*\"]\nignored_file_types = ['.xccheckout',\n '.xcodeproj',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency on chef-metal now that we aren't default\n"
},
{
"from": "human",
"value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'chef_metal_vagrant/version'\n\nGem::Specification.new do |s|\n s.name = 'chef-metal-vagrant'\n s.version = ChefMetalVag... | ruby | chosen |
[
{
"from": "system",
"value": "Modify test for change in FactoryGirl result in Option/OptionSet\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass MissionTest < ActiveSupport::TestCase\n\n test \"all items related to that mission are removed when a mission is deleted\" do\n mis... | ruby | chosen |
[
{
"from": "system",
"value": "Update path to Whenever Capistrano integration."
},
{
"from": "human",
"value": "require \"capistrano_nrel_ext/recipes/gem_bundler\"\nrequire \"whenever/capistrano/recipes\"\n\n# This just shifts whenever's default capistrano recipes to happen slightly\n# later so i... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the message is right so the cucumber feature passes.\n"
},
{
"from": "human",
"value": "require \"rubygems/command\"\n\nclass Gem::Commands::PrecompileCommand < Gem::Command\n def initialize\n super \"precompile\", \"Create a bundle containing the comp... | ruby | chosen |
[
{
"from": "system",
"value": "Check validity of MQTT channel\n"
},
{
"from": "human",
"value": "module Api\n class RmqUtilsController < Api::AbstractController\n ALL = [:user, :vhost, :resource, :topic]\n skip_before_action :check_fbos_version, only: ALL\n skip_before_action :authentic... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error displaying the columns index\n"
},
{
"from": "human",
"value": "require_dependency \"riews/application_controller\"\n\nmodule Riews\n class ColumnsController < ApplicationController\n load_and_authorize_resource :view\n before_action :set_column, on... | ruby | chosen |
[
{
"from": "system",
"value": "Bring VCF up to spec.\n\nEliminate spaces in disease names and use commas instead of slashes\nin lists.\n"
},
{
"from": "human",
"value": "class VariantVcfRowPresenter < SimpleDelegator\n def initialize(variant, view_context)\n @view_context = view_context\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Configure gemspec for release v0.0.1\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"craiggy\"\n s.version = \"3.1.0\"\n s.date = \"2016-01-15\"\n s.summary = \"Scrape posts from Craigslist with an easy API\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for Greek letters\n\nIn 00abe551fd0c98a88c5447106e30545b234319f4 we added support for\ntransliterating Greek letters. This commit adds a test to ensure that\nprotected food & drink names made entirely of Greek letters get a\nsuitable base_path which was the original ... | ruby | chosen |
[
{
"from": "human",
"value": "Add an actual integration test for RSpec 2\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../spec_helper', __FILE__)\nrequire File.expand_path('../../common/adapter_tests', __FILE__)\n\ndescribe 'Integration with RSpec 2' do\n include AdapterTests\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add output of the fiducial_id on object creation.\n"
},
{
"from": "human",
"value": "require 'tuio-ruby'\n\n@tc = TuioClient.new\n\n@tc.on_object_creation do | to |\n puts \"New TUIO Object at x: #{to.x_pos}, y: #{to.y_pos}\"\nend\n\n@tc.on_object_update do | to |\... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for `sprockets-rails` 3 and `sprockets` 4.\n\n`sprockets-rails` 3 already precompiles any asset that is referenced by the `font-path`\nand `image-path` helpers, and `sprockets` 4 does not support Regexpes as the\n`precompile` flag.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix environment check for old versions of Rails\n\nIn some versions of Rails, the Rails module exists but the env method on\nit does not. Confirm that the Rails module exists _and_ responds to :env\nbefore calling Rails.env instead of RAILS_ENV.\n"
},
{
"from": "human",... | ruby | chosen |
[
{
"from": "system",
"value": "Add docstring for 'process' methods\n"
},
{
"from": "human",
"value": "# This is a YARD-specific handler for handler DSL syntax. It handles the \n# \"process do ... end\" syntax and translates it into a \"def process; end\"\n# method declaration.\n# \n# @since 0.5.4... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec stub syntax to fix verbose spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Cbratest do\n before do\n @puts = []\n Cbratest::Runner.any_instance.stub(:output) do |arg|\n @puts << arg\n end\n end\n\n it \"outputs... | ruby | chosen |
[
{
"from": "human",
"value": "Add GemVersionValidator to validate the fdic and ncua gem versions as being latest.\n"
},
{
"from": "gpt",
"value": "class GemVersionValidator\n\n def self.fdic_latest?\n self.latest_fdic_version == self.installed_fdic_version\n end\n\n def self.ncua_latest?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove `test_match_p` since Rails 6 requires Ruby 2.4.1 or newer\n\nFollow up of #32034.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"abstract_unit\"\nrequire \"active_support/core_ext/regexp\"\n\nclass RegexpExtAccessTests < ActiveS... | ruby | chosen |
[
{
"from": "system",
"value": "Sort movies on UI, ignoring first \"The\""
},
{
"from": "human",
"value": "module MovieScanner\n module UI\n # writes out information to HTML format\n class Html\n \n def create_ui(time, movies)\n {\"index.html\" => main_page(time, movies)}\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Net::HTTP stub to raise exceptions.\n\n[git-p4: depot-paths = \"//src/rc-rest/dev/\": change = 2812]\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nclass Net::HTTPResponse\n\n ##\n # Setter for body content\n\n attr_accessor :body\n\nend\n\nclass ... | ruby | chosen |
[
{
"from": "system",
"value": "Add description text to rake task\n"
},
{
"from": "human",
"value": "namespace :db do\n namespace :migrate do\n task :mutex do\n TIMEOUT = 5 * 60 * 60\n\n RedisClassy.redis ||= Redis.current\n\n RedisMutex.with_lock('db-migrate-mutex', block: TIME... | ruby | chosen |
[
{
"from": "human",
"value": "Add terrestrial area field to country statistics\n"
},
{
"from": "gpt",
"value": "class AddJrcTerrestrialAreaToCountryStatistics < ActiveRecord::Migration[5.0]\n def change\n add_column :country_statistics, :jrc_terr_area, :float\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "human",
"value": "Test coverate for base model operation\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass RailsOps::Operation::ModelTest < ActiveSupport::TestCase\n include TestHelper\n\n def test_always_extend_model_class_true\n cls = Class.new(RailsOps::Operation... | ruby | chosen |
[
{
"from": "system",
"value": "Update one of the migrations [ci skip]\n"
},
{
"from": "human",
"value": "class CreateCritics < ActiveRecord::Migration\n def change\n create_table :critics do |t|\n t.string :username\n t.string :password_digest\n end\n end\nend\n"
},
{
"f... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for abstract attribute\n"
},
{
"from": "gpt",
"value": "require_relative '../../spec_helper'\n\nRSpec.describe 'abstract' do\n subject(:klass) do\n klass = Class.new\n klass.send(:abstract, :abstract_method)\n klass\n end\n\n it 'is private' do\... | ruby | chosen |
[
{
"from": "system",
"value": "Change css to check pagination\n"
},
{
"from": "human",
"value": "def check_title_search_page_is_displayed\n expect(content).to include('Search for the title of any property in England and Wales')\nend\n\ndef visit_title_register_page(title_number)\n page.visit(\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add Swift version to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'CropViewController'\n s.version = '2.3.7'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.summary = 'A Swift view controller that enables cropping a... | ruby | chosen |
[
{
"from": "system",
"value": "Increase dmon cookbook version to 0.1.2\n\nChange-Id: I2f5b296dc88e672fa51109c61c40142c968adab7\n"
},
{
"from": "human",
"value": "name 'dmon'\nmaintainer 'Robert Cvitkovič'\nmaintainer_email 'robert_cvitkovic@xlab.si'\nlicense 'all_rights'\ndescription 'Installs/Co... | ruby | chosen |
[
{
"from": "system",
"value": "Save original requested path before redirecting to sign-in\n"
},
{
"from": "human",
"value": "module Admin\n class ApplicationController < ActionController::Base\n\n def current_user\n $mocked_user\n end\n helper_method :current_user\n\n def index\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix admin sale price input\n"
},
{
"from": "human",
"value": "Deface::Override.new(virtual_path: 'spree/admin/products/_form',\n name: 'add_sale_price_to_product_edit',\n insert_after: \"erb[loud]:contains('text_field :price')... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6937svn\n\nHandBrakeCLI Nightly v6937svn built 2015-02-23.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6897svn'\n sha256 '3cfd28e62a517fc5fdecd82b7fe2cb14c3ca3061694b5b0c2b0a1938f1f8b638'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move back to php-build blessed repository.\n"
},
{
"from": "human",
"value": "default[:phpbuild][:user] = \"vagrant\"\ndefault[:phpbuild][:group] = \"vagrant\"\ndefault[:phpbuild][:home] = \"/home/vagrant\"\n\ndefault[:phpbuild][:git][:repository] ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some validations for the planning application model.\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: planning_applications\n#\n# id :integer not null, primary key\n# openlylocal_id :integer ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Spree.user_class rather than hardcoded Spree::User to allow usage without Spree Auth Devise\n"
},
{
"from": "human",
"value": "module Spree::UserDecorator\n def self.prepended(base)\n base.has_many :vendor_users, class_name: 'Spree::VendorUser'\n base.has... | ruby | chosen |
[
{
"from": "system",
"value": "Remove scope resolver from application policy\n"
},
{
"from": "human",
"value": "# generated by rails g pundit:install\nclass ApplicationPolicy\n attr_reader :user, :record\n\n def initialize(user, record)\n @user = user\n @record = record\n end\n\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Add view_admin? method to ApplicationPolicy\n\nWe have numerous places in our views where we need to list admin links\nto different resources. Sometimes the logic that decides if a user can\nsee these links does not align with any of the crud verb methods that\nare used by defa... | ruby | chosen |
[
{
"from": "system",
"value": "Add proper error message to 404\n"
},
{
"from": "human",
"value": "module Fog\n module DNS\n class DNSimple\n class Real\n\n # Gets record from given domain.\n #\n # ==== Parameters\n # * domain<~String>\n # * record_id<~S... | ruby | chosen |
[
{
"from": "system",
"value": "Remove some unused things from the gem"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'rubygems-compile'\n s.version = '0.0.1'\n\n s.required_rubygems_version = '>= 1.4.2'\n s.rubygems_version =... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce query count by fetching player selections first\n"
},
{
"from": "human",
"value": "class CompositionRow\n attr_reader :player, :composition, :number\n\n def self.for_composition(composition)\n rows = []\n heroes = Hero.order(:name)\n\n composition.... | ruby | chosen |
[
{
"from": "human",
"value": "Add 2 fields that will store data objects and content partner counts per SPM in page_stats_taxa table.\n\n\ngit-svn-id: 9e5305ce09d475b8287d6587bfa7d171216f9abf@2048 78829999-583a-0410-bd01-8a9b849fd409\n"
},
{
"from": "gpt",
"value": "class AddSpmStatsFieldsInPageSt... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct environment.rb path\n"
},
{
"from": "human",
"value": "begin\n require File.expand_path('../vendor/environment', __FILE__)\nrescue LoadError\n begin\n require 'rubygems'\n require 'bundler'\n Bundler.setup\n rescue LoadError\n %w(\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set working directory for plugin as project_home\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nmodule VagrantPhpstormTunnel\n class Configurator\n def initialize(app, env)\n @app = app\n @env = env\n @vm = nil\n\n @root_path = @en... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails::TestRunner on rake test\n"
},
{
"from": "human",
"value": "require 'rake/testtask'\nrequire 'rails/test_unit/sub_test_task'\n\ntask default: :test\n\ndesc \"Runs all tests in test folder\"\ntask :test do\n Rails::TestTask.test_creator(Rake.application.to... | ruby | chosen |
[
{
"from": "human",
"value": "Add feature spec for updating a note of a config history.\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe \"notes\", stub: :daemon do\n let!(:exists_user) { build(:user) }\n include_context 'daemon has some config histories'\n\n before { login... | ruby | chosen |
[
{
"from": "system",
"value": "Update chef_gem dependency to 0.0.1.dev.4, fixes restores on HA\n"
},
{
"from": "human",
"value": "#\n# Copyright:: Copyright (c) 2014 Chef Software, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for zookeeper user\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'hadoop::zookeeper' do\n context 'on Centos 6.4 x86_64' do\n let(:chef_run) do\n ChefSpec::Runner.new(platform: 'centos', version: 6.4) do |node|\n node.... | ruby | chosen |
[
{
"from": "system",
"value": "Add a unit spec for BabySqueel.configure\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe BabySqueel do\n describe '.[]' do\n it 'accepts a model' do\n expect(BabySqueel[Post]).to be_a(BabySqueel::Relation)\n end\n\n it 'accepts an... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct domain name in fact check emails\n"
},
{
"from": "human",
"value": "# TODO: Pull this out into Plek\nmodule ExternalServices\n\n def local_environment\n ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'\n end\n\n def api_host\n case local_env... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for the Api plugin base class\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Cyclid::API::Plugins::Api do\n it 'should have a human name' do\n expect(Cyclid::API::Plugins::Api.human_name).to eq('api')\n end\n\n it 'returns a new co... | ruby | chosen |
[
{
"from": "system",
"value": "Modify logic of spec test files.\n"
},
{
"from": "human",
"value": "equire_relative '../spec_helper.rb'\n\ndescribe service('zabbix_agentd') do\n it { should be_enabled }\nend\n\ndescribe port(10_050) do\n it { should be_listening.with('tcp') }\nend\n\ndescribe 'c... | ruby | chosen |
[
{
"from": "system",
"value": "Add me to gem owners\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/datafix/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Case Commons, LLC\"]\n gem.email = [\"casecommons-de... | ruby | chosen |
[
{
"from": "system",
"value": "Add wrapper for JSON encoding exceptions because yay consistency\n"
},
{
"from": "human",
"value": "require 'resque/coder'\nrequire 'json'\n\nmodule Resque\n # Sweet jruby --1.8 hax.\n if defined?(Encoding)\n # >= 1.9 Support\n ENCODING_EXCEPTION = Encoding:... | ruby | chosen |
[
{
"from": "human",
"value": "Add a task to keep toto awake\n"
},
{
"from": "gpt",
"value": "desc \"This task is called by the Heroku cron add-on\"\ntask :call_page => :environment do\n uri = URI.parse('http://www.totoapp.com/')\n Net::HTTP.get(uri)\n end"
}
] | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.