conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add additional properties to geo work form\n"
},
{
"from": "human",
"value": "module Hyrax\n class GeoWorkForm < Hyrax::HyraxForm\n include ::GeoWorks::BasicGeoMetadataForm\n include ::GeoWorks::ExternalMetadataFileForm\n include ::GeoWorks::GeoreferencedF... | ruby | chosen |
[
{
"from": "system",
"value": "Mark missing stuff as red\n"
},
{
"from": "human",
"value": "class Bibliographer::Base\n attr_reader :page\n\n def initialize(page)\n @page = page\n end\n\n def names(label = \"Author\")\n name_facts = page.facts.where(:label => label)\n first_name = na... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Relation.new spec to kill mutation\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Relation, '.new' do\n subject { object.new(header, body) }\n\n let(:header) { Relation::Header.coerce([ [ :id, Integer ] ]) }\n let(:o... | ruby | chosen |
[
{
"from": "human",
"value": "Add omnibus definition for Opensearch\n\nSigned-off-by: poornima <6411b1792ba899670cee160af97f12ca603a25e2@progress.com>\n"
},
{
"from": "gpt",
"value": "#\n# Copyright 2020 Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make /menu of Admin work with slugify instead of url escape\n"
},
{
"from": "human",
"value": "require 'populate_me/api'\n\nclass PopulateMe::Admin < Sinatra::Base\n # Mount assets on /__assets__\n use Rack::Static, :urls=>['/__assets__'], :root=>File.expand_path(... | ruby | chosen |
[
{
"from": "system",
"value": "Use Hash[] instead of `to_h` for Ruby 2.0 support"
},
{
"from": "human",
"value": "require 'roo/excelx/extractor'\n\nmodule Roo\n class Excelx\n class Images < Excelx::Extractor\n\n # Returns: Hash { id1: extracted_file_name1 },\n # Example: { \"rId1\"... | ruby | chosen |
[
{
"from": "system",
"value": "Disable referential integrity when deleting tables\n"
},
{
"from": "human",
"value": "module Specjour\n module DbScrub\n extend self\n\n def scrub\n load 'Rakefile'\n begin\n ActiveRecord::Base.connection\n rescue # assume the database d... | ruby | chosen |
[
{
"from": "system",
"value": "Update locations smoke test to reflect booking"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'bundler/setup'\nrequire 'date'\nrequire 'mechanize'\n\ndomain = ARGV[0]\n\nputs \">> Checking #{domain} at #{Time.now}\"\n\nmech = Mechanize.new\n\nif ENV... | ruby | chosen |
[
{
"from": "system",
"value": "Update the suse repo file in the test\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "repo_path = if os.debian?\n '/etc/apt/sources.list.d/nginx.list'\n elsif os.redhat?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable init spec, we can refactor this into rails specific specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'crash_log/rails'\n\ndescribe \"Initializer\" do\n\n let(:logger) { stub(\"Logger\") }\n let(:other_logger) { stub(\"OtherLogger\") ... | ruby | chosen |
[
{
"from": "system",
"value": "Update tests to support copy changes 2\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.feature 'User profile', type: :feature do\n\n include Warden::Test::Helpers\n Warden.test_mode!\n\n let(:user) { create :user, office: create(:office) }\n l... | ruby | chosen |
[
{
"from": "system",
"value": "[builder-spec] Tweak specs. Don't need expectation.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule RevealCK\n\n describe Builder, 'when subclassed' do\n\n it 'requires that subclasses implement #register_tasks' do\n class BadBuilder < Bu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in destinations_path in requests test\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"Destinations\", :type => :request do\n describe \"GET /destinations\" do\n it \"works! (now write some real specs)\" do\n get destin... | ruby | chosen |
[
{
"from": "system",
"value": "Add (simple) help page content test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"StaticPages\" do\n\n describe \"Home Page\" do\n\n it \"should have the content 'ShadowKeeper'\" do\n visit '/static_pages/home'\n expect(page).t... | ruby | chosen |
[
{
"from": "system",
"value": "Change to remove error condition as automatically marked as errored\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'tty-spinner'\n\nspinners = TTY::Spinner::Multi.new(\"[:spinner] Top level spinner\")\n\nsp1 = spinners.register \"[:spinner] one\"\ns... | ruby | chosen |
[
{
"from": "system",
"value": "Make show_to backwards compatible with rails 2.3.x\n"
},
{
"from": "human",
"value": "module Acl9\n module Helpers\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n def access_control(method, opts = {}, &block)\... | ruby | chosen |
[
{
"from": "system",
"value": "Check if sync with codeship\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'sinatra/activerecord'\nrequire './config/environments'\nrequire './models/user'\n\nenable :sessions\n\nget '/' do\n erb :index\nend\n\nget '/login' do\n erb :login\nend\n\np... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Ettu to be configured\n\nAllows Ettu to be disabled using the standard rails config optoins, and\nadds in a flag to workaround\n[#10791](https://github.com/rails/rails/pull/10791).\n"
},
{
"from": "human",
"value": "module Ettu\n class Railtie < Rails::Railti... | ruby | chosen |
[
{
"from": "human",
"value": "Add a GTK GUI with some general clean ups\n"
},
{
"from": "gpt",
"value": "class Freeplay::GUI\n\n ##############################################################################\n WINDOW_TITLE = 'Freeplay Game'\n\n #################################################... | ruby | chosen |
[
{
"from": "system",
"value": "Update VM semantics to fix broken tests\n"
},
{
"from": "human",
"value": "module Jamespath\n class VM\n attr_reader :instructions\n\n def initialize(instructions)\n @instructions = instructions\n end\n\n def search(object)\n @ret_flag = false... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod Spec to v7.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"HACClusterMapViewController\"\n s.version = \"2.4\"\n s.summary = \"HACClusterMapViewController iOS 7 >.\"\n s.description = <<-DESC\n HACClusterMa... | ruby | chosen |
[
{
"from": "system",
"value": "Order profiles by updated at date\n"
},
{
"from": "human",
"value": "class ProfilesController < ApplicationController\n def index\n @profiles = Profile.all\n end\n \n def show\n @user = current_user\n end\n\n def edit\n @user = current_user\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad env var reference.\n"
},
{
"from": "human",
"value": "module Percy\n class Config\n # @!attribute [w] access_token\n # @return [String] Percy repo access token.\n # @!attribute api_url\n # @return [String] Base URL for API requests. Default:... | ruby | chosen |
[
{
"from": "system",
"value": "Correct request type for create edition\n\ncontinuing with:\nhttps://github.com/alphagov/govuk_content_models/pull/245\n\nfor a create edition action the request\ntype should be recorded as 'create'. this\nensures that we show the correct message\nunder 'History and Notes', and... | ruby | chosen |
[
{
"from": "system",
"value": "Handle using pipes missing index count method :( Sloooow!!"
},
{
"from": "human",
"value": "module Pacer::Routes\n module IndexedRouteModule\n def initialize(index, key, value)\n @index = index\n @key = key\n @value = value\n initialize_path(... | ruby | chosen |
[
{
"from": "system",
"value": "Use a more expressive name for the block\n"
},
{
"from": "human",
"value": "module Spec::DSL::Main\n alias :Feature :describe\n def narrative(description)\n @description_args.push(\"\\n#{description}\\n\")\n end\nend\n\nmodule Spec::Example::ExampleGroupMethod... | ruby | chosen |
[
{
"from": "system",
"value": "Fix executables line in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/loc_scraper/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Tim Peterson']\n gem.description = %q{Scrape... | ruby | chosen |
[
{
"from": "system",
"value": "Add objects for new answer form path\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n\n\n def index\n @questions = Question.last(10)\n end\n\n def new\n end\n\n def create\n end\n\n def show\n @question = Question.f... | ruby | chosen |
[
{
"from": "human",
"value": "Add acceptance tests for onevm type\n"
},
{
"from": "gpt",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'onevm type' do\n\n describe 'when creating vm' do\n it 'should idempotently run' do\n pp = <<-EOS\n class { 'one':\n oned => tr... | ruby | chosen |
[
{
"from": "system",
"value": "Change rack spec to use rack-test library\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'rack_spec_helper'\nrequire 'tic_tac_toe/rack_shell'\n\ndescribe TicTacToe::RackShell do\n\n it 'can receive an index/root GET request' do\n app = TicTacT... | ruby | chosen |
[
{
"from": "system",
"value": "Remove empty line to appease Rubocop\n"
},
{
"from": "human",
"value": "ActiveAdmin.register AdminFlash do\n\n permit_params :message, :expires\n\n form do |f|\n f.inputs do\n f.input :message\n f.input :expires, as: :datepicker\n end\n f.action... | ruby | chosen |
[
{
"from": "system",
"value": "Undo change to gem version\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"knife-vsphere\"\n s.version = \"0.7.1\"\n s.summary = \"vSphere Support for Knife\"\n\n s.required_rubygems_version = Gem::Requi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specialist sector cleanup script\n\nTopic tags no longer have artefacts, so trying to delete them fails. We\njust need to delete the tag, now.\n"
},
{
"from": "human",
"value": "desc \"Deleting specialist sectors\"\ntask :specialist_sector_cleanup => :environme... | ruby | chosen |
[
{
"from": "system",
"value": "Use latest release of rubocop\n"
},
{
"from": "human",
"value": "\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'osm/rubocop/version'\n\nGem::Specification.new do |spec|\n spec.name = 'osm-rubocop'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Abort migration if there are post-visibilities left, so that the db is not left with no index\n"
},
{
"from": "human",
"value": "class UniqueIndexPostVisibilities < ActiveRecord::Migration\n def self.up\n sql = <<-SQL\n SELECT `post_visibilities`.post_id, `po... | ruby | chosen |
[
{
"from": "system",
"value": "Change my e-mail in .gemspec to a non-Novell one\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"scanny\"\n s.version = '0.0.1'\n s.platform = Gem::Platform::RUBY\n s.authors = ['Flavio... | ruby | chosen |
[
{
"from": "system",
"value": "Remove minimum coverage restriction if it's not Ruby.\n"
},
{
"from": "human",
"value": "require \"simplecov\"\nrequire \"vcr\"\nrequire \"rspec\"\nrequire \"factory_girl\"\n\nSimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter\nSimpleCov.start do\n add_filte... | ruby | chosen |
[
{
"from": "system",
"value": "Improve error message when rtl-sdr.h is not available\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'mkmf'\n\nhave_library('rtlsdr')\nextension_name = 'librtlsdr'\n\ndir_config('librtlsdr')\ncreate_makefile('librtlsdr/librtlsdr')\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Enable PDF rendering for books\n"
},
{
"from": "human",
"value": "class BooksController < ApplicationController\n before_filter :authentication_check\n before_filter :ominiauth_user_gate\n before_filter :secure_organizer_id, :only => [:create, :update]\n before_... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependencies for the build\n\nSome day I will remember these on the first push"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'redis/plus/ve... | ruby | chosen |
[
{
"from": "system",
"value": "Update team controller for MaintainerTeam\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass TeamsController < ApplicationController\n def show\n @branch = Branch.where(name: params[:branch], vendor: 'ALT Linux').first\n @team = Maintainer.where(lo... | ruby | chosen |
[
{
"from": "system",
"value": "Add user_id to vote creation\n"
},
{
"from": "human",
"value": "class VotesController < ApplicationController\n\n def new\n if flash[:prev_winner_id]\n @prev_winner = Artist.find(flash[:prev_winner_id])\n @prev_loser = Artist.find(flash[:prev_loser_id]... | ruby | chosen |
[
{
"from": "system",
"value": "Improve and simple categories admin test\n"
},
{
"from": "human",
"value": "require \"acceptance/webdriver_test_case\"\n\n# :stopdoc:\nclass CategoriesTest < WebDriverTestCase\n def test_edit\n login_as :administrator\n\n open \"/admin/categories\"\n\n mas... | ruby | chosen |
[
{
"from": "system",
"value": "Add functional tests for the book list"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass BooksControllerTest < ActionController::TestCase\n\n setup do\n login_as_stub_user\n end\n\n test \"should get index\" do\n get :index\n assert_respons... | ruby | chosen |
[
{
"from": "system",
"value": "Read `authorization` from header or cookie\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Api\n module Stateless\n # Api::StatelessController handles all stateless api requests\n # with token authentication.\n class StatelessContr... | ruby | chosen |
[
{
"from": "system",
"value": "Disable CORS for api_public controller\n"
},
{
"from": "human",
"value": "require_dependency \"pwb/application_controller\"\n\nmodule Pwb\n class ApiPublic::V1::PropsController < JSONAPI::ResourceController\n # Skipping action below allows me to browse to endpoi... | ruby | chosen |
[
{
"from": "system",
"value": "Add minimum Ruby version to gemspec.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename build to job in ArchiveTraceWorker\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ArchiveTraceWorker\n include ApplicationWorker\n include PipelineBackgroundQueue\n\n def perform(job_id)\n Ci::Build.find_by(id: job_id).try do ... | ruby | chosen |
[
{
"from": "system",
"value": "Move to_era method to EraJa module\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nrequire \"era_ja/version\"\nrequire File.expand_path('era_ja/date', File.dirname(__FILE__))\nrequire File.expand_path('era_ja/time', File.dirname(__FILE__))\n\nmodule EraJ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable jacoco as jenkins no longer uses it and the bytecode processing framework can not handle the size of some of our classes\n"
},
{
"from": "human",
"value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ex... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test regression after adding the create_tenant checkbox when creating tenants\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule Kaui\n class AdminTenantsControllerTest < Kaui::FunctionalTestHelper\n\n test \"should get new\" do\n post :... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade iTerm2 Beta to 2.1.1\n"
},
{
"from": "human",
"value": "cask :v1 => 'iterm2-beta' do\n version '2.1'\n sha256 '65885d3c5d9168a0742f969e091464a92fb809691951749587a84e37529e44c8'\n\n url 'https://iterm2.com/downloads/beta/iTerm2-2_1.zip'\n homepage 'http:/... | ruby | chosen |
[
{
"from": "system",
"value": "Add UIKit as a required framework.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"EPSUIFactory\"\n s.version = \"1.0.1\"\n s.summary = \"A class that provides factory methods for UIKit control set up in common w... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor tasks to do a zero-downtime rolling deployment\n\nRequires work done as part of evertrue/et_haproxy-cookbook@v3.1.0\n\nTested with siege, appears to cause no downtime\n"
},
{
"from": "human",
"value": "namespace :deploy do\n task :validate do\n on relea... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented lines in podspec\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint JVMaskView.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn mo... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.6 to 0.1.7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-messaging'\n s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP libr... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up inconsistency in require statements\n"
},
{
"from": "human",
"value": "require 'bigdecimal'\nrequire File.expand_path(File.join(File.dirname(__FILE__), *%w[big_decimal_helper version]))\nrequire 'big_decimal_helper/conversion_protocol'\nrequire 'big_decimal... | ruby | chosen |
[
{
"from": "human",
"value": "Add simple spec for sync driver.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe MrDarcy::Promise::Synchronous do\n let(:sync) { described_class.new proc {} }\n subject { sync }\n\n it { should respond_to :result }\n it { should respond_to :fin... | ruby | chosen |
[
{
"from": "system",
"value": "Use the whole client name as hostname\n\nEnable detailed graphite namespacing by using the full client name as\npart of the graphite measurement name.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n#\n# Copyright 2013 vimov, LLC. <a.gameel@vimov.com>\n#\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we test for the right release in sources.list\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe file('/etc/apt/sources.list') do\n it { should be_file }\n it { should contain \"deb http://httpredir.debian.org/debian wheezy main\" }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add VatRate.to_s returning rate and translated code.\n"
},
{
"from": "human",
"value": "class VatRate < ChargeRate\n scope :full, where(:code => 'full')\n scope :reduced, where(:code => 'reduced')\n scope :special, where(:code => 'special')\n scope :excluded, wh... | ruby | chosen |
[
{
"from": "system",
"value": "Add some play tests for RDF module\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Dbd\n module Facts\n describe Base do\n it \"module exists\" do\n described_class # should not raise error\n end\n\n it \"The RDF module i... | ruby | chosen |
[
{
"from": "system",
"value": "Change the email fromat regex to \\A \\z to correctly match string beginning and ending.\n"
},
{
"from": "human",
"value": "require 'refinery/core/base_model'\nrequire 'filters_spam'\n\nmodule Refinery\n module Inquiries\n class Inquiry < Refinery::Core::BaseMod... | ruby | chosen |
[
{
"from": "system",
"value": "Sort the tags before comparison or else we end up with Notices.\n"
},
{
"from": "human",
"value": "Puppet::Type.newtype(:boundary_meter) do\n\n @doc = \"Manage creation/deletion of Boundary meters.\"\n\n ensurable\n\n newparam(:meter, :namevar => true) do\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Move TODO from code to outline\n"
},
{
"from": "human",
"value": "Puppet::Type.newtype(:gce_targetpool) do\n desc 'targetpool'\n\n ensurable\n\n newparam(:name, :namevar => true) do\n validate do |value|\n unless value =~ /[a-z](?:[-a-z0-9]{0,61}[a-z0-9])... | ruby | chosen |
[
{
"from": "system",
"value": "Add autorequire on postfix config\n"
},
{
"from": "human",
"value": "Puppet::Type.newtype(:postconf_entry) do\n ensurable\n\n newparam(:name, :namevar => true) do\n end\n\n newproperty(:value) do\n end\n\n newparam(:confdir) do\n defaultto '/etc/postfix'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix compability with new resque\n"
},
{
"from": "human",
"value": "require 'logger'\nrequire 'redis/namespace'\nrequire 'redisk/helper'\nrequire 'redisk/stat'\nrequire 'redisk/io'\nrequire 'redisk/logger'\n\nmodule Redisk\n VERSION = '0.2.1'\n \n extend self\n \... | ruby | chosen |
[
{
"from": "system",
"value": "Use realistic values in rendering_app & publishing_app\n\nThis is required to make\nhttps://github.com/alphagov/govuk-content-schemas/pull/575 pass, which\nwill allow us to remove the overrides.\n"
},
{
"from": "human",
"value": "require \"govuk_schemas\"\n\nmodule ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix same silly grammatical mistake elsewhere\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Ack do\n\n let(:external_uid) {'post:$l0ngAndFiNeUId4U'}\n\n describe \"create_or_update_score\" do\n it \"creates an score if none exists\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[Podspec] Update to 1.0.0 and point to Venmo Org Github\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'VENTouchLock'\n s.version = '0.2.0'\n s.summary = 'A passcode framework that features touch ID'\n s.description = <<-D... | ruby | chosen |
[
{
"from": "system",
"value": "Add a (passing) class concatenation test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Kernel' do\n describe '.DOM()' do\n html <<-HTML\n <div class=\"spec\"></div>\n <div class=\"sock\"></div>\n HTML\n\n it \"parses HTML\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix can't sent report(temporary fix)\"\n\nThis reverts commit bddc12ace244f3118fc9fe88529f0e420e802077.\n"
},
{
"from": "human",
"value": "# rubocop:disable Metrics/MethodLength\n\nclass ReportsController < ApplicationController\n protect_from_forgery with... | ruby | chosen |
[
{
"from": "system",
"value": "Use a per-request cache for Pages\n"
},
{
"from": "human",
"value": "module PageHelper\n # Look for a matching Page, but if none, fall back on Rails' template rendering\n def render_page(path, options = {})\n page = Page.find_by_path(path)\n if page\n r... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement from ~> 0.59.0 to >= 0.59, < 0.72\n\nUpdates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop-hq/rubocop/releases)\n- [Changelog](https://github.com/ruboco... | ruby | chosen |
[
{
"from": "system",
"value": "Improve gem file content list to exclude Gemfile.lock\n"
},
{
"from": "human",
"value": "require 'rubygems'\n\nGem::Specification.new do |spec|\n spec.name = 'rkerberos'\n spec.version = '0.1.2'\n spec.authors = ['Daniel Berger', 'Dominic Cleal']\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional resolvers for cmok\n"
},
{
"from": "human",
"value": "name \"datahata\"\ndescription \"Role applied to all servers at DataHata\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :kom => { :status => :administrator }\n }\n },\n :ho... | ruby | chosen |
[
{
"from": "system",
"value": "Switch falkenstein cache to use render.openstreetmap.org\n"
},
{
"from": "human",
"value": "name \"tabaluga\"\ndescription \"Master role applied to tabaluga\"\n\ndefault_attributes(\n :networking => {\n :interfaces => {\n :external_ipv4 => {\n :inter... | ruby | chosen |
[
{
"from": "system",
"value": "Use rollover option when paginating\n"
},
{
"from": "human",
"value": "class Api::V1::BulletinsController < ApplicationResourceController\n before_action :authenticate_user!, except: [:show, :sunday, :next, :previous]\n before_action :fetch_bulletin, only: [:next,... | ruby | chosen |
[
{
"from": "system",
"value": "Migrate updates controller to pundit\n"
},
{
"from": "human",
"value": "class Projects::UpdatesController < ApplicationController\n inherit_resources\n load_and_authorize_resource\n\n actions :destroy\n belongs_to :project, finder: :find_by_permalink!\n\n def i... | ruby | chosen |
[
{
"from": "system",
"value": "Create signed URLs in SubmissionFilesController.\n"
},
{
"from": "human",
"value": "class SubmissionFilesController < ApplicationController\nend\n"
},
{
"from": "gpt",
"value": "class SubmissionFilesController < ApplicationController\n def signed_url\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused show method from AttachmentsController\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule V1\n class AttachmentsController < ApiController\n def create\n a = Attachment.new(type: params[:type].camelize, file: params[:fi... | ruby | chosen |
[
{
"from": "system",
"value": "Use Hiera call, instead parsing astute.yaml file.\n\nCo-Authored-By: Sergey Vasilenko <svasilenko@mirantis.com>\n\nCloses-bug: #1559255\nChange-Id: I3e25ceae69d1d7afab7a3bac1e76d13c5f88a3c1\n"
},
{
"from": "human",
"value": "# Copyright 2015 Mirantis, Inc.\n#\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Set the profile and thumbnail for the podcast\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'prx_access'\n\nclass Distributions::PodcastDistribution < Distribution\n include PRXAccess\n include Rails.application.routes.url_helpers\n\n def distribu... | ruby | chosen |
[
{
"from": "human",
"value": "Create test for `Providers::Atnd` class\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass Providers::AtndTest < ActiveSupport::TestCase\n def setup\n @atnd = Providers::Atnd.new\n end\n\n def event_hash\n {\n 'event_id' => '12345678',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix RbConfig warning in ruby-head\n"
},
{
"from": "human",
"value": "# Detect the platform we're running on so we can tweak behaviour\n# in various places.\nrequire 'rbconfig'\n\nmodule Cucumber\nunless defined?(Cucumber::VERSION)\n VERSION = '0.9.0'\n BINAR... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spelling mistake in test description\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'JLog::Writer' do\n let(:writer) { JLog::Writer.new('/tmp/junit.log') }\n\n it \"it should be able to open a log for writing\" do\n assert_kind_of JLog... | ruby | chosen |
[
{
"from": "human",
"value": "Add response tests for a Live model\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe Live, type: :model do\n let(:live) { build(:live) }\n\n subject { live }\n\n it { is_expected.to respond_to(:name) }\n it { is_expected.to respond_to(:da... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused method form Ratings controller.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire_dependency 'rateitapp/application_controller'\n\nmodule Rateitapp\n # Controller for actions involving ratings.\n class RatingsController < Appl... | ruby | chosen |
[
{
"from": "system",
"value": "Use parentheses for calling with rest arguments\n\nThis commit removes below interpreter warning.\n\n* warning: `*' interpreted as argument prefix\n"
},
{
"from": "human",
"value": "class Value\n def self.new(*fields)\n Class.new do\n attr_reader *fields\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Set bind address and port for sinatra.\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'json'\n\nrequire_relative 'geo'\n\n# NOTE: you must have redis running on localhost w/o a password.\n\ndef businesses\n unless @businesses\n @businesses = Geo::... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing column specs in down method.\n"
},
{
"from": "human",
"value": "class UpdateAlternativeNames < ActiveRecord::Migration\n def self.up\n remove_column :alternative_names, :name\n remove_column :alternative_names, :short_name\n remove_column :alte... | ruby | chosen |
[
{
"from": "system",
"value": "Fix N+1 query with Blog in sidebar\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n#\n# == OptionalModules namespace\n#\nmodule OptionalModules\n #\n # == BloggableConcern\n #\n module Bloggable\n extend ActiveSupport::Concern\n\n inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Set camera attribute by response rather than query"
},
{
"from": "human",
"value": "module ExploreMars\n class Call\n CAMERAS = [\"FHAZ\", \"RHAZ\", \"MAST\", \"CHEMCAM\", \"NAVCAM\", \"MAHLI\", \"MARDI\", \"PANCAM\", \"MINITES\"]\n BASE_URI = \"https://mars-... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for buildpack proxy usage during staging\n\n[#116609867]\n\nSigned-off-by: David Jahn <ea2208fe99a56ed20c9ae20b0a1446b61f13a269@gmail.com>\n"
},
{
"from": "human",
"value": "require 'cf_spec_helper'\n\ndescribe 'Rails 4 App' do\n subject(:app) do\n Mach... | ruby | chosen |
[
{
"from": "system",
"value": "Add equatable as a dependency.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/version'\n\nGem::Specification.new do |gem|\n gem.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused spec:rcov rake task in lib.\n"
},
{
"from": "human",
"value": "require 'rspec/core'\nrequire 'rspec/core/rake_task'\n\ndesc \"Run all specs in spec directory\"\nRSpec::Core::RakeTask.new(:spec) do |t|\n rspec_opts_file = \".rspec#{\"_ci\" if ENV['CI']... | ruby | chosen |
[
{
"from": "system",
"value": "Remove custom formatter from gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path(\"../lib/crossroadsjs/rails/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"crossroadsjs-rails\"\n s.version = C... | ruby | chosen |
[
{
"from": "system",
"value": "Make Artefact stubbing permissive on query params\n\nPreviously, requests had to have exactly the specified query params,\nnow they just have to have the params you specify.\n\nSpecific motivation is that lots of requests in frontend will soon\ninclude latitude and longitude, b... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add a rake task to set up watches for users that don't have them\"\n\nThis reverts commit 78b88630db4f28a687407956c43ad50631163ffe because\nwe don't need this now that we've run it.\n\nConflicts:\n\tlib/tasks/emergency.rake\n"
},
{
"from": "human",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Use open uri instead of path\n"
},
{
"from": "human",
"value": "namespace :proposals do\n desc \"Updates all proposals by recalculating their hot_score\"\n task touch: :environment do\n Proposal.find_in_batches do |proposals|\n proposals.each(&:save)\n ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.