conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update to use <relation>.facet(:foo) in controller\n"
},
{
"from": "human",
"value": "class NobelistsController < ApplicationController\n\n include Repertoire::Faceting::Controller\n\n def index\n @search = params[:search] || ''\n render\n end\n\n def visu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reference to converter positions file\n"
},
{
"from": "human",
"value": "module Api\n module V3\n class TopologyPresenter\n\n def initialize(scenario)\n @scenario = scenario\n @gql = @scenario.gql(prepare: true)\n @converters = @gql... | ruby | chosen |
[
{
"from": "system",
"value": "Make logic easier to read\n"
},
{
"from": "human",
"value": "module Concerns\n module Event\n module Comparison\n extend ActiveSupport::Concern\n\n include Comparable\n \n def ==(other)\n if self.equal?(other)\n return true\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the query format for HTTPClient\n"
},
{
"from": "human",
"value": "require 'jsonclient'\n\nmodule DoorStatusManager\n class Pesho\n def initialize\n @base_uri = Rails.application.config.door_status_manager.host\n @client = JSONClient.new\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Work on the Runtime domain.\n"
},
{
"from": "gpt",
"value": "module WebkitRemote\n\nclass Client\n\n# API for the Runtime domain.\nmodule Runtime\n # Evals a JavaScript expression.\n #\n # @param [String] expression the JavaScript expression to be evaluated\n # @... | ruby | chosen |
[
{
"from": "human",
"value": "Fix the bug with games getting duplicated\n\nwhich caused game pages to \"belong\" to the wrong game (e.g.\nsplits.io/games/sm64 going to a page called \"SM64\" with 2 runs instead\nof the proper \"Super Mario 64\" game page)\n\nThis doesn't fix the code that causes the duplicat... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to enable unaccent and trigram extensions\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass EnableUnaccentAndTrigramExtensions < ActiveRecord::Migration[5.2]\n def change\n enable_extension(\"unaccent\")\n enable_extension(\... | ruby | chosen |
[
{
"from": "system",
"value": "Add csv storage key to model\n"
},
{
"from": "human",
"value": "class InferredDatasetFileSchema\n include ActiveModel::Model\n\n attr_accessor :user_id, :name, :description, :csv_url\n\n validates_presence_of :csv_url, message: 'You must have a data file'\n vali... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken node_installer unit spec\n"
},
{
"from": "human",
"value": "require 'cf_spec_helper'\n\ndescribe LanguagePack::NodeInstaller do\n describe '#install' do\n context 'with different stacks' do\n let(:installer) { LanguagePack::NodeInstaller.new('sta... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ReactiveReSwift dependency from podspec until it is published\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ReSwiftRouter\"\n s.version = \"0.5.1\"\n s.summary = \"Declarative Routing for ReSwift\"\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop warning about grouped expr\n"
},
{
"from": "human",
"value": "include_recipe 'apt'\npackage 'curl'\n\nvarnish_install 'default' do\n package_name 'varnish'\n vendor_repo true\n vendor_version '4.0'\nend\n\nvarnish_default_config 'default'\n\nvarnish_d... | ruby | chosen |
[
{
"from": "system",
"value": "Use tap instead of returning.\n"
},
{
"from": "human",
"value": "\nmodule ActiveRecord\n module ConnectionAdapters\n # Allows access to the name, srid and coord_dimensions of a PostGIS\n # geometry column in PostgreSQL.\n class PostgreSQLGeometryColumn\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove additional link in business breadcrumbs\n"
},
{
"from": "human",
"value": "class CoronavirusLandingPageController < ApplicationController\n skip_before_action :set_expiry\n before_action -> { set_expiry(5.minutes) }\n\n def show\n @content_item = conten... | ruby | chosen |
[
{
"from": "system",
"value": "Package version increased from 0.1.7 to 0.1.8\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'error_data'\n s.version = '0.1.7'\n s.summary = 'Representation of an error as a data structure'\n s.description... | ruby | chosen |
[
{
"from": "system",
"value": "Test nested-attribute updating an user from account\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AccountTest < ActiveSupport::TestCase\n \n fixtures :all\n \n test \"accepts nested attributes for users\" do \n @account = Account.create... | ruby | chosen |
[
{
"from": "system",
"value": "Add Agenda's Reader Action Methods As APIs\n\nAdd in both the reeder action methods, show and index, in order use them\nfor read only APIs, on the Agenda. Also made sure that JSON would be the\nonly format rendering since the API is going to be render as a JSON.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix syntax issue in Contributable\n"
},
{
"from": "human",
"value": "module Contributable\n extend ActiveSupport::Concern\n\n def add_contribution(model)\n UserContribution.create(\n user_id: current_user.id,\n contribution_id: model.id,\n contri... | ruby | chosen |
[
{
"from": "system",
"value": "Add integration test for the signup page title\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass SiteLayoutTest < ActionDispatch::IntegrationTest\n test \"layout links\" do\n get root_path\n assert_template 'static_pages/home'\n assert_sele... | ruby | chosen |
[
{
"from": "system",
"value": "Correct name of the recipe.\n"
},
{
"from": "human",
"value": "node[\"unicorn\"][\"installs\"] = [{ \"app_root\" => \"/var/www/apps/redtape/current\" }]\n\ninclude_recipe \"unicorn\"\n"
},
{
"from": "gpt",
"value": "node[\"unicorn\"][\"installs\"] = [{ \... | ruby | chosen |
[
{
"from": "system",
"value": "Add favicon to precompile list\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.requ... | ruby | chosen |
[
{
"from": "system",
"value": "Add auto load paths for DCI.\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.requir... | ruby | chosen |
[
{
"from": "system",
"value": "Move login code to its own method.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\n# Sessions controller.\nclass SessionsController < ApplicationController\n def create\n user = User.auth_case_insens(params[:email], params[:password])\n\n if user\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure step 3 create works\n"
},
{
"from": "human",
"value": "class SettingsController < ApplicationController\n layout 'settings'\n helper_method :step\n\n def new\n case step\n when \"1\"\n @user = User.new\n when \"2\"\n @site = S... | ruby | chosen |
[
{
"from": "system",
"value": "Move poling place locator to model\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'json'\n\nclass ZipcodesController < ApplicationController\n def show\n @zipcode = session[:zip]\n @polling_place = get_polling_place(address)\n end\n def self... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the error uninitialized constant Lotus::VERSION of app generator\n\nThe error happens when generating a new app, because the\nlotus::VERSION is referenced by the generator templates and the\nconstant is not available.\n\nThe module has required in the generators to fix the ... | ruby | chosen |
[
{
"from": "system",
"value": "Add DB migrations setup - first try"
},
{
"from": "human",
"value": "module Rack\n module OAuth2\n class Server\n\n class ActiveRecord < ::ActiveRecord::Base\n set_table_name do\n \"oauth2_provider_#{name.split(\"::\").last.underscore}\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "JariBakken: Set method to 'unknown' if not provided in the server's stack frame.\n\ngit-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@11605 07704840-8298-11de-bf8c-fd130f914ac9\n"
},
{
"from": "human",
"value": "module Selenium\n module WebDriver\n module Rem... | ruby | chosen |
[
{
"from": "system",
"value": "Fix default url options loading\n"
},
{
"from": "human",
"value": "module Xhive\n class BasePresenter\n attr_reader :object\n\n include ActionView::Helpers\n include ActionView::Context\n include Rails.application.routes.url_helpers\n\n default_url_o... | ruby | chosen |
[
{
"from": "human",
"value": "Add a migration to remove null constraint from sites css_url\n"
},
{
"from": "gpt",
"value": "class RemoveNullConstraintFromSitesCssUrl < ActiveRecord::Migration\n def up\n change_column :sites, :css_url, :string, null: true\n end\n\n def down\n change_colum... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicated allow_reselect from TreeBuilderTemplateImagesFilter\n"
},
{
"from": "human",
"value": "class TreeBuilderTemplatesImagesFilter < TreeBuilderVmsFilter\n def tree_init_options\n super.update(:leaf => 'MiqTemplate')\n end\n\n def set_locals_for_r... | ruby | chosen |
[
{
"from": "system",
"value": "Move Slim config to configure block\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'slim'\nrequire 'data_mapper'\n\nSlim::Engine.set_default_options :pretty => true\nconfigure do\n\n pwd = File.expand_path(File.dirname(__FILE__))\n DataMapper.setup(... | ruby | chosen |
[
{
"from": "system",
"value": "Add an action for Status Code 500 in the Errors Controller.\n"
},
{
"from": "human",
"value": "class ErrorsController < ApplicationController\n def error404\n render status: :not_found\n end\nend\n"
},
{
"from": "gpt",
"value": "class ErrorsControll... | ruby | chosen |
[
{
"from": "system",
"value": "Update controller instance variable from parameter\n\nI forgot to update the instance variables if a certain record parameter\nis set. This is now done by using the same reflection methods.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up parameter wrapping script\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# This file contains settings for ActionController::ParamsWrapper which\n# is enabled by default.\n\n# Enable parameter wrapping for ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove active_record configuration from Mongoid\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire \"active_model/railtie\"\nrequire \"active_job/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railt... | ruby | chosen |
[
{
"from": "system",
"value": "Update to explicitly state that we're looking at request.env as opposed to simply implying env\n"
},
{
"from": "human",
"value": "module FederatedRails\n module ProvisioningManager\n\n def provision (subject)\n logger.debug \"Executed default NOOP provision... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for IsSecure, KeyboardType, AutocapitalizationType and AutocorrectionType customizations\n\nPass the secure, keyboard, autocapitalization and autocorrection options on and overwirte the default values when set. This allows for more customized fields like:\n\nbundle.text \... | ruby | chosen |
[
{
"from": "system",
"value": "Create file with command_prefix content\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 = @env[:root_p... | ruby | chosen |
[
{
"from": "system",
"value": "Disable automatic tests on controller backend/unreceived_purchase_orders\n"
},
{
"from": "human",
"value": "require 'test_helper'\nmodule Backend\n class UnreceivedPurchaseOrdersControllerTest < ActionController::TestCase\n test_restfully_all_actions\n end\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Update header comment (license); C: Prefer single-quoted strings when you don't need string interpolation or special symbols.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: system\n# Resource:: timezone\n#\n# Copyright (c) 2011 RightScale Inc\n#\n# Permissi... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to new style gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/jisho/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Erol Fornoles\"]\n gem.email = [\"erol.fo... | ruby | chosen |
[
{
"from": "system",
"value": "Update the description so people know?"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/pry-vterm_aliases\", __FILE__)\n\nGem::Specification.new do |spec|\n spec.name = \"pry-vterm_aliases\"\n spec.version = Pry::Plugins::VTerm.version\n spec.em... | ruby | chosen |
[
{
"from": "system",
"value": "Use an environment variable so we can point to private data.\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nclass ImporterTest < Minitest::Test\n def setup\n @i = Transmogriffy::Importer.new(:lighthouse_export_path => './americano')\n end\... | ruby | chosen |
[
{
"from": "human",
"value": "Add entities for current entities in database\n"
},
{
"from": "gpt",
"value": "class AddEntities < ActiveRecord::Migration\n def self.up\n #Add entity information for current enities like person, item etc.\n people = Person.all\n items = Item.all\n people... | ruby | chosen |
[
{
"from": "system",
"value": "Delete password field from migration\n"
},
{
"from": "human",
"value": "class CreateUsers < ActiveRecord::Migration\n def change\n create_table :users do |t|\n t.string :name\n t.integer :age\n t.string :gender\n t.string :location\n t.s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug around lexer to detect\n"
},
{
"from": "human",
"value": "require 'pygments.rb'\n\nmodule Lokka\n module Pygmentize\n def self.registered(app)\n app.before do\n assets_path = \"/plugin/lokka-pygmentize/assets\"\n\n content_for :header ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a tool to cleanup duplicate host guest_devices\n\nAs a result of the bug fixed by\n[1691109](https://bugzilla.redhat.com/show_bug.cgi?id=1691109)\nthere are a lot of duplicate guest devices. Now that the query is\ncorrect EmsRefresh finds all of these and tries to delete th... | ruby | chosen |
[
{
"from": "system",
"value": "Add hashie to gem spec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cocoatree/version'\n\nGem::Specification.new do |spec|\n spec.name = \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use camelize for class name\n"
},
{
"from": "human",
"value": "module CRE\n module Stats\n module Presenters\n #\n # returns the presenter for +resource_name+ or RootPresenter if resource_name is blank\n # e.g. EpisodesPresenter for 'episodes'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ID mismatch when cloning a repo\n"
},
{
"from": "human",
"value": "require \"securerandom\"\nrequire_relative \"provider_credential\"\n\nmodule FastlaneCI\n # Contains the metadata about a git repo\n class RepoConfig\n include FastlaneCI::Logging\n\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration so that it runs in the presence of translations\n\nWithout this change, running this migration against the most recent code\nresults in the following error:\n\n Mysql2::Error: Table 'whitehall_development.person_translations' doesn't\nexist\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "system",
"value": "Add gpio pin enable/disable spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\r\n\r\ndescribe Beaglebone::GPIO do\r\n\r\n it 'lists utilities and active pins' do\r\n expect(Beaglebone::GPIO.list(true)).to include('export', 'unexport') # List all\r\n... | ruby | chosen |
[
{
"from": "system",
"value": "Test ban against comments and adding ideas\n"
},
{
"from": "human",
"value": "require 'rails_helper'\nrequire 'spec_helper'\n\nRSpec.feature \"Banned user\", type: :feature do\n let!(:user) { FactoryGirl.create(:user_banned) }\n let!(:ideaone) { FactoryGirl.create... | ruby | chosen |
[
{
"from": "system",
"value": "Change dailies specs\nThis makes them less dependendent on the contents of the fixture, should the fixture ever change. Since the dailies change every day, if the fixture would be updated for a different day and response, the test would fail.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add factory validity spec to language model\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Language, type: :model do\n it { is_expected.to validate_presence_of :name}\n it { is_expected.to validate_uniqueness_of :name}\nend\n"
},
{... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec of Resource model\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\nrequire 'rails_helper'\n\ndescribe Resource do\n let (:user) { FactoryGirl.create(:default) }\n let (:wall) { Wall.create!(label: \"ios/news\", description: \"news\") }\n\n describe \"#st... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for dev package on 14.04\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe package('apt-transport-https') do\n it { should be_installed }\nend\n\ndescribe package('ca-certificates') do\n it { should be_installed }\nend\n\ndescribe packa... | ruby | chosen |
[
{
"from": "human",
"value": "Clean up remaining bad SFAs\n"
},
{
"from": "gpt",
"value": "class CleanUpTheBadSpecialFieldAssociations < ActiveRecord::Migration\n def up\n SpecialFieldAssociation.where(question_id: nil).delete_all\n SpecialFieldAssociation.where(\n \"questionnaire_id ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem version to 0.2.8\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |s|\n s.name = \"fluent-plugin-junipe... | ruby | chosen |
[
{
"from": "system",
"value": "Use repo_name to verify flavor existence\n"
},
{
"from": "human",
"value": "Given /^a repository '(.+)' with versions '(.+)'$/ do |basename, versions|\n repository_path = make_repo_path(basename)\n variable_table[\"#{basename}_uri\"] = make_repo_uri(basename)\n s... | ruby | chosen |
[
{
"from": "system",
"value": "PASS: Save action create new post\n"
},
{
"from": "human",
"value": "module Blog\n module PostManager\n\n DELETE = 'Delete'\n CANCEL = 'Cancel'\n\n def self.manage_post(params)\n delete(params) if delete_action?(params)\n end\n\n private\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude any test classes from the .podspec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n\n spec.name = 'KSPFetchedResultsController'\n\n spec.version = '1.0.1'\n\n spec.authors = {'Konstantin Pavlikhin' => 'k.pavlikhin@gmail.com'}\n\n spec.social... | ruby | chosen |
[
{
"from": "system",
"value": "Fix url constructor for common_phrase\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# frozen_string_literal: true\nrequire 'contact-data/text/results'\n\nmodule ContactData\n class Text\n BASE = :text\n\n class << self\n def search(text = nil, pa... | ruby | chosen |
[
{
"from": "system",
"value": "Improve simplecov config to avoid missing files\n"
},
{
"from": "human",
"value": "require 'simplecov'\n\nSimpleCov.configure do\n load_profile :rails\n\n if ENV['CI_BUILD_NAME']\n coverage_dir \"coverage/#{ENV['CI_BUILD_NAME']}\"\n command_name ENV['CI_BUIL... | ruby | chosen |
[
{
"from": "human",
"value": "Add test coverage for built-in help.\n"
},
{
"from": "gpt",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe \"Built-in help for all commands\" do\n \n it \"should list active tasks\" do\n run_command('help').should incl... | ruby | chosen |
[
{
"from": "system",
"value": "Add search query for getting posts\n"
},
{
"from": "human",
"value": "class ProjectRepository < Hanami::Repository\n def find_by_account(account_id)\n projects.where(account_id: account_id).as(Project).to_a\n end\nend\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Fix stupid case clause bug!\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nrequire 'sinatra/base'\nrequire 'yaml'\n\nclass OpenScienceRender < Sinatra::Base\n\n def initialize\n super\n\n @renderers = load_renderers\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add version.rb to gemspec files\n\nWhen calling `require \"sprockets/es6\"` you get the following error:\n`LoadError: cannot load such file -- sprockets/es6/version` because the\nversion isn't being packaged with the gem.\n"
},
{
"from": "human",
"value": "$:.unshif... | ruby | chosen |
[
{
"from": "system",
"value": "Add assignment operator to Auth::User\n"
},
{
"from": "human",
"value": "module Symgate\n module Auth\n # defines a symgate user\n class User\n attr_accessor :user_id, :is_group_admin\n\n def initialize(params = {})\n @user_id = params[:user_... | ruby | chosen |
[
{
"from": "system",
"value": "Use Resource.find_each instead of Resource.all.each\n"
},
{
"from": "human",
"value": "require 'dotenv/tasks'\nrequire 'octokit'\nrequire 'resource_loader'\n\nnamespace :resources do\n def github_public_client\n unless ENV.key?('GITHUB_CLIENT_ID') && ENV.key?('G... | ruby | chosen |
[
{
"from": "system",
"value": "Add acceptance test for managing Python 3\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'python class' do\n context 'default parameters' do\n # Using puppet_apply as a helper\n it 'works with no errors' do\n pp = <<-EOS\... | ruby | chosen |
[
{
"from": "system",
"value": "Add note about password on keychain\n"
},
{
"from": "human",
"value": "require \"econfig-keychain\"\n\nEconfig.root = __dir__\nEconfig.env = \"test\"\n\ndescribe Econfig::Keychain do\n let(:keychain_path) { File.expand_path(\"./osx.temporary.keychain\", __dir__) }\... | ruby | chosen |
[
{
"from": "system",
"value": "Update deprecated rspec 'its' syntax tests\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nrequire 'spec_helper'\n\ndescribe Innodb::LogBlock do\n before :all do\n @block = Innodb::Log.new(\"spec/data/ib_logfile0\").block(0)\n end\n\n subject { ... | ruby | chosen |
[
{
"from": "system",
"value": "Test that flat projects install and boot correctly\n"
},
{
"from": "human",
"value": "RSpec.describe \"new app\", type: :cli do\n it \"boots and displays a welcome page\" do\n with_project do\n run_app do |app|\n expect(app.get(\"/\")).to eq \"<html>... | ruby | chosen |
[
{
"from": "system",
"value": "Verify that setting Pry.input avoids loading Readline\n\nIt's kind of unfortunate that just passing the `input` option doesn't\nalso do this, but it's not obvious how to fix it without major\nrefactoring of the command history.\n"
},
{
"from": "human",
"value": "# T... | ruby | chosen |
[
{
"from": "system",
"value": "Update endpoints used by WP OAuth Server 3.1.3\n"
},
{
"from": "human",
"value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class WordpressHosted < OmniAuth::Strategies::OAuth2\n # Give your strategy a name.\n option :name, 'wo... | ruby | chosen |
[
{
"from": "system",
"value": "Add locale before setting it\n"
},
{
"from": "human",
"value": "use_inline_resources\n\n# Support whyrun\ndef whyrun_supported?\n true\nend\n\ninclude Chef::DSL::IncludeRecipe\n\naction :add do\n Array(new_resource.locales).each do |local|\n execute \"locale-ge... | ruby | chosen |
[
{
"from": "system",
"value": "Make description not required, because it becomes comments which are\noptional\n"
},
{
"from": "human",
"value": "actions :create\ndefault_action :create\n\nattribute :name, :kind_of => String, :name_attribute => true\nattribute :description, :kind_of => String, :re... | ruby | chosen |
[
{
"from": "system",
"value": "Add new validations and refactor create_with_omniauth\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_many :team_projects\n has_many :repos, through: :team_projects\n\n validates_presence_of :github_uid, :name, :github_token\n validates_... | ruby | chosen |
[
{
"from": "system",
"value": "Order by start_datetime on fixture\n"
},
{
"from": "human",
"value": "module FunkyWorldCup\n class CupGroups < Cuba\n define do\n calculate_user_rank\n\n on get, \"positions\" do\n res.write render(\"./views/layouts/application.html.erb\") {\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create test for ruby aggregation\n\nSigned-off-by: Lucas Moura <143f96f992bf3dc84afaa2cc3d6d759a2b3ef261@gmail.com>\nSigned-off-by: Johnnys Ribeiro <e28a8c0275ee127bd6f2bdac708244856a0a7106@gmail.com>\n"
},
{
"from": "gpt",
"value": "require_relative '../../spec_help... | ruby | chosen |
[
{
"from": "system",
"value": "Disable ActionView partial path prefixing\n\nIf you want to render alchemy elements in a Solidus controller\nnamespace, we need to disable prefixing of controller path to partial\npaths, or we get an extra `spree` namespace for the element partial\npaths and the elements wont r... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the test app controller\n\nThis version is more succinct and IMO a better example of Focused\nController usage.\n"
},
{
"from": "human",
"value": "module PostsController\n class Action < ApplicationController\n end\n\n class Index < Action\n expose(:po... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for epub-2-pdf.\n"
},
{
"from": "human",
"value": "cask 'epub-to-pdf' do\n version '3.1'\n sha256 'dcfc59d57f756802e844614b7dae43bca67284ec85fe6b909f244e41f20987b3'\n\n url \"https://storage.googleapis.com/google-code-archive-downloads/v2... | ruby | chosen |
[
{
"from": "system",
"value": "Use new Active Record syntax"
},
{
"from": "human",
"value": "class Admin::DashboardController < Admin::BaseController\n\n def index\n @recent_activity = []\n\n Refinery::Plugins.active.each do |plugin|\n begin\n plugin.activity.each do |activity|... | ruby | chosen |
[
{
"from": "system",
"value": "Remove irreversible migration and add comment\n"
},
{
"from": "human",
"value": "class RemoveOtherAccreditation < ActiveRecord::Migration\n class Accreditation < ActiveRecord::Base\n end\n\n def up\n Accreditation.where(name: 'Other').destroy_all\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Use ActionController::TestRequest.create instead of .new on Rails v5\n\nsee https://github.com/rails/rails/commit/78a5124bf09d0cd285d4d1a6242bd67badb2f621\n"
},
{
"from": "human",
"value": "module Draper\n module ViewContext\n # @private\n module BuildStrateg... | ruby | chosen |
[
{
"from": "system",
"value": "Remove ProcessHostIntegration (Moved to Consumer)\n"
},
{
"from": "human",
"value": "module EventStore\n module Messaging\n class Subscription < MessageReader\n def self.http_reader\n Client::HTTP::Subscription\n end\n\n module ProcessHostI... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the case where the instance exists but is being shutdown\n"
},
{
"from": "human",
"value": "require 'aws-sdk'\n\nmodule VagrantPlugins\n module Ec2\n module Actions\n class CheckState\n def initialize(app, env)\n @app = app\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Make html_safe more agnostic about rails\n"
},
{
"from": "human",
"value": "# Override the form_tag helper to add honeypot spam protection to forms.\nmodule ActionView\n module Helpers\n module FormTagHelper\n def form_tag_with_honeypot(url_for_options = {}... | ruby | chosen |
[
{
"from": "system",
"value": "Debug message for augeas resource\n"
},
{
"from": "human",
"value": "Puppet::Type.type(:augeas).provide(:augeas_file, :parent => Puppet::Type.type(:augeas).provider(:augeas)) do\n confine :feature => :augeas\n\n def need_to_run?\n # Managed by the augeas_file r... | ruby | chosen |
[
{
"from": "system",
"value": "Use Regex to search for author\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire \"English\"\n\nputs \"Checking to see if you're in CONTRIBUTORS.md...\"\n\nif ENV['TRAVIS']\n if ENV['TRAVIS_PULL_REQUEST']\n require 'httparty'\n repo = ENV['TRAVI... | ruby | chosen |
[
{
"from": "system",
"value": "Fix loading of custom logger\n"
},
{
"from": "human",
"value": "require 'digital_ocean'\nrequire File.expand_path('../authentication_middleware', __FILE__)\nrequire File.expand_path('../custom_logger', __FILE__)\n\nmodule Tugboat\n module Middleware\n # Inject t... | ruby | chosen |
[
{
"from": "human",
"value": "Delete user by email script\n"
},
{
"from": "gpt",
"value": "require 'redis'\nrequire 'pp'\nrequire 'yaml'\n\nconfig_file = File.dirname(__FILE__) + '/../config.yml'\nfail \"Configuration file \" + config_file + \" missing!\" unless File.exist?(config_file)\nCONFIG =... | ruby | chosen |
[
{
"from": "system",
"value": "Put MessageAggregator in the Danger namespace\n"
},
{
"from": "human",
"value": "class MessageAggregator\n def self.aggregate(*args)\n new(*args).aggregate\n end\n\n def initialize(warnings: [],\n errors: [],\n messages: [],\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow specifying a custom sender email address for the printed invoice.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Elmas\n # We can use the PrintedSalesInvoice to change the status of SalesInvoices from\n # Open to 'Verwerkt' while ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch inheritance for Slim's `MailerGenerator`\n\nSince the implementation is virtually the same (as noticed by @Salzig)\nI switched the inheritance to rails's own mailer generator.\n"
},
{
"from": "human",
"value": "require 'generators/slim/controller/controller_g... | ruby | chosen |
[
{
"from": "human",
"value": "Use a string/varchar column for distance\n"
},
{
"from": "gpt",
"value": "class ChangeDistanceToString < ActiveRecord::Migration\n def self.up\n change_table :races do |t|\n t.change :distance, :string\n end\n end\n\n def self.down\n change_table :ra... | ruby | chosen |
[
{
"from": "system",
"value": "Allow flash detection even in engines.\n"
},
{
"from": "human",
"value": "require 'rails/generators/rails/scaffold_controller/scaffold_controller_generator'\n\nmodule Rails\n module Generators\n class RespondersControllerGenerator < ScaffoldControllerGenerator\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make virtualbox test independent of version\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'virtualbox' do\n\n describe package('virtualbox-4.3') do\n it { should be_installed }\n end\nend\n"
},
{
"from": "gpt",
"value": "requi... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.