conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix regexp in facter to work with non numeric versioning\n"
},
{
"from": "human",
"value": "Facter.add(\"oracle_webgate_exists\") do\n setcode do\n if File.exists? '/opt/netpoint/webgate/access/.puppet-oracle_webgate-configured'\n true\n else\n fals... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation in product controller override\n"
},
{
"from": "human",
"value": "module Spree\n module Api\n module V1\n\n ProductsController.class_eval do\n def index\n @products = Spree::Product.all\n\n # Filter products by... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up adapter class code ID:866\n"
},
{
"from": "human",
"value": "class ActiveRecord::Base\n class << self\n def relativity_connection( config )\n config[:port] ||= 1583\n config[:url] ||= \"jdbc:relativity://#{config[:host]}:#{config[:port]}/#{ co... | ruby | chosen |
[
{
"from": "system",
"value": "Update Docker Compose to v1.23.2\n"
},
{
"from": "human",
"value": "namespace :host do\n\n desc 'Setup Docker'\n task setup_docker: [:docker_install, :docker_configure, :docker_enable]\n\n\n task :docker_configure do\n on roles(:all) do\n sudo :usermod, '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a puts left from debugging\n"
},
{
"from": "human",
"value": "module HerokuRequestId\n class Middleware\n\n def initialize(app)\n @app = app\n end\n\n @@html_comment = false\n\n def self.html_comment\n @@html_comment\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade ios sdk to v6.6.0\n"
},
{
"from": "human",
"value": "require 'json'\n\npackage = JSON.parse(File.read(File.join(__dir__, '../../package.json')))\n\nPod::Spec.new do |s|\n s.name = package['name']\n s.version = package['version']\n s.summary ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for views as requirements\n"
},
{
"from": "human",
"value": "module ZendeskAppsSupport\n class AppRequirement\n TYPES = %w(automations macros targets ticket_fields triggers user_fields).freeze\n end\nend\n"
},
{
"from": "gpt",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Create a note about strange ruby behaviour\n"
},
{
"from": "human",
"value": "module ShallowAttributes\n module Type\n # Abstract class for typecast object to Date type.\n #\n # @abstract\n #\n # @since 0.1.0\n class Date\n # Convert value to... | ruby | chosen |
[
{
"from": "human",
"value": "ADD : annotate config file\n"
},
{
"from": "gpt",
"value": "# NOTE: only doing this in development as some production environments (Heroku)\n# NOTE: are sensitive to local FS writes, and besides -- it's just not proper\n# NOTE: to have a dev-mode tool do its thing in... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake tasks for importing and data migration\n"
},
{
"from": "gpt",
"value": "namespace :iom do\n desc \"Mark projects with 'Humanitarian Aid' sector as humanitarian\"\n task migrate_humanitarian_projects: :environment do\n Project.find_each do |project|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add id & priority to `Annotation`\n"
},
{
"from": "human",
"value": "module Watnow\n class Annotation\n\n @@instances = []\n\n attr_accessor :file, :lines\n\n def self.all\n @@instances\n end\n\n def initialize(opts)\n super()\n @file ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable ToC UI in staging\n"
},
{
"from": "human",
"value": "\nFeatureFlipper.features do\n \n in_state :development do\n feature :alert, :description => \"Journal and search alerts\"\n end\n\n in_state :staging do\n feature :nal_map, :description => \"Sho... | ruby | chosen |
[
{
"from": "human",
"value": "Add exception notifier for background jobs (sidekiq)\n\nhttps://github.com/smartinez87/exception_notification#background-notifications\n"
},
{
"from": "gpt",
"value": "require 'exception_notification/rails'\n\nrequire 'exception_notification/sidekiq'\n\nExceptionNoti... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"10 minutes => 60minutes\"\n\nThis reverts commit 666cfafb15be7b6f8571212517ed0ea8cf190ec7 [formerly 1c9e18bccd293e02bd8bc866073c625c8596271a] [formerly 9cfd17456dc4b208b676ae91c64ed20f38df337d] [formerly 626665c2bc7faa60b82a76cbbb4b6579ce8d3076 [formerly 26845000ae94de... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Centos 6.6 and 6.7\n\nThis will indeed work with Centos 6.6 and 6.7 it turns out."
},
{
"from": "human",
"value": "include_recipe 'yum'\n\ncase node['platform_version'].to_f\n when 6.4, 6.5\n remote_file '/tmp/epel.rpm' do\n source 'http://f... | ruby | chosen |
[
{
"from": "system",
"value": "Move logic to named method for clarity\n"
},
{
"from": "human",
"value": "require 'bosh/dev/infrastructure'\nrequire 'bosh/dev/pipeline'\n\nmodule Bosh::Dev\n class BatHelper\n attr_reader :infrastructure\n\n def initialize(infrastructure)\n @infrastruct... | ruby | chosen |
[
{
"from": "system",
"value": "Update description to remove gem build warning\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"warden/strategies/doorkeeper\"\n\nGem::Specification.new do |s|\n s.name = \"warden-doorkeeper\"\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename route features_all to features_update_all\n"
},
{
"from": "human",
"value": "if Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR == 0\n Rails.application.routes.draw do\n scope \"/arturo\" do\n resources :features, :controller => \"arturo/features... | ruby | chosen |
[
{
"from": "system",
"value": "Add back some old redirects\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n get 'resume' => 'resume#resume', :as => :resume\n get 'cv' => 'resume#cv', :as => :cv\n get 'portfolio' => 'folios#portfolio', :as => :portfolio\n root :to ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove route for VMR tracks.\n"
},
{
"from": "human",
"value": "Dippam::Application.routes.draw do\n resources :summary_documents, :vmr_tracks, :vmr_interviews,\n :eppi_lc_subjects, :ied_institutions\n resources :eppi_documents do\n resources :eppi_p... | ruby | chosen |
[
{
"from": "system",
"value": "Add route for welcome page\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n devise_for :users, :controllers => { registrations: 'registrations', sessions: 'sessions' }\n resources :skills\n\n root 'skills#index'\n get 'refresh' => 'skills#re... | ruby | chosen |
[
{
"from": "system",
"value": "Add article index as root\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resources :posts\n\n root to: \"users#index\"\n\n resources :users\n\n mount Pancakes::Engine, at: \"/pg\"\nend\n"
},
{
"from": "gpt",
"value": "Rails.app... | ruby | chosen |
[
{
"from": "system",
"value": "Fix datetime format when migrating new notification settings on MySQL\n"
},
{
"from": "human",
"value": "# This migration will create one row of NotificationSetting for each Member row\n# It can take long time on big instances.\n#\n# This migration can be done onlin... | ruby | chosen |
[
{
"from": "system",
"value": "Use parent strategy for factories\n\nSetting FactoryBot.use_parent_strategy = true allows objects made with\nthe build strategy to use build instead of create for any\nassociations. Using this setting will generally reduce the number of\ncalls to `create`, and makes `build` gen... | ruby | chosen |
[
{
"from": "system",
"value": "Fix scoping of helper function - add helpers.*\n"
},
{
"from": "human",
"value": "class MatricesController < ApplicationController\n\n ### Resources methods ########################################################\n\n def index\n @filterrific = initialize_filte... | ruby | chosen |
[
{
"from": "system",
"value": "Allow user email on sessions.\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n include Api\n def create\n session = Session.new(session_params)\n session.app = @app\n session.save\n render_api_create_response sessio... | ruby | chosen |
[
{
"from": "system",
"value": "Add encryptable to old migration\n"
},
{
"from": "human",
"value": "class DeviseCreateUsers < ActiveRecord::Migration\n def self.up\n create_table :users do |t|\n t.database_authenticatable :null => false\n t.recoverable\n t.rememberable\n t.... | ruby | chosen |
[
{
"from": "system",
"value": "Add note regarding the lack of 410 status\n"
},
{
"from": "human",
"value": "class DocumentsController < PublicFacingController\n include CacheControlHelper\n include PublicDocumentRoutesHelper\n\n before_filter :find_document, only: [:show]\n before_filter :red... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails HTML sanitizer to strip tags\n\nWe used to have a custom HTML sanitizer that does not work\nany more with Rails 4.2\n\nNow we use the default html sanitizer shipped with rails.\n\nFixes #1017\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Add direct repository getting method\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'docker_registry'\nrequire 'docker_registry/client'\nrequire 'docker_registry/repository'\nrequire 'docker_registry/tag'\n\nclass DockerRegistry::Registry\n attr_reader :... | ruby | chosen |
[
{
"from": "system",
"value": "Fix undefined method message_processor error by removing unnecessary dependency injection\n"
},
{
"from": "human",
"value": "require 'fact_check_message_processor'\n\n# A class to pull messages from an email account and send relevant ones \n# to a processor.\n#\n# I... | ruby | chosen |
[
{
"from": "system",
"value": "Use Sets, because we can.\n"
},
{
"from": "human",
"value": "module GitCleanser\n class SmartThing\n def initialize(config)\n @config = config\n @compiled_files = sh(@config['compiled_files_command']).split\n @ignored_and_untracked_files = git_ls_... | ruby | chosen |
[
{
"from": "system",
"value": "Add the GAPI routes regardless of rails version\n"
},
{
"from": "human",
"value": "require 'generators/generic_api_rails/helpers'\n\nmodule GenericApiRails\n module Generators\n class InstallGenerator < Rails::Generators::Base\n include GenericApiRails::Gen... | ruby | chosen |
[
{
"from": "system",
"value": "Make Postfix filter generator include \"REJECT\".\n\nSigned-off-by: brian m. carlson <738bdd359be778fee9f0fc4e2934ad72f436ceda@crustytoothpaste.net>\n"
},
{
"from": "human",
"value": "require 'set'\n\nclass IPAddr\n attr_reader :mask_addr\nend\n\nmodule Extruder\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add protobuf:clean task for external use\n\nTo get this task simply `require ‘protobuf/tasks’` in your Rakefile.\n\nClean will ask for confirmation of removing previously compiled pb.rb\nsource files. You can skip the confirmation step by providing\nPB_FORCE_CLEAN=1. A force cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add new associations to Cheatsheet model\n"
},
{
"from": "human",
"value": "class Cheatsheet < ActiveRecord::Base\n belongs_to :user\nend\n"
},
{
"from": "gpt",
"value": "class Cheatsheet < ActiveRecord::Base\n belongs_to :user\n has_many :cheatsheet_... | ruby | chosen |
[
{
"from": "system",
"value": "Add parse_mode to OutMessage for markdown\n"
},
{
"from": "human",
"value": "module TelegramBot\n class OutMessage\n include Virtus.model\n attribute :chat, Channel\n attribute :text, String\n attribute :reply_to, Message\n\n def send_with(bot)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix transactions query for the category"
},
{
"from": "human",
"value": "class CategorySerializer < ActiveModel::Serializer\n attributes :id, :name, :system_type, :matcher_ids\n\n def attributes\n data = super\n trans_ids = transaction_ids\n data[:count] ... | ruby | chosen |
[
{
"from": "system",
"value": "Use record's primary key instead of hardcoded `id`\n\nEnable caching for records which primary key is not `id`.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ReactiveCachingWorker\n include ApplicationWorker\n\n # rubocop: disable CodeR... | ruby | chosen |
[
{
"from": "system",
"value": "Load services for the prometheus library test\n"
},
{
"from": "human",
"value": "require 'chef_helper'\n\ndescribe Prometheus do\n it 'should return a list of known services' do\n expect(Prometheus.services).to match_array(%w(\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for module trying to reopen a class\n"
},
{
"from": "human",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\nmodule LangModuleSpec\n module Sub1; end\nend\n\nmodule LangModuleSpec::Sub2; end\n\ndescribe \"module\" do\n it \"has the ri... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper method for generating MetricRollups\n"
},
{
"from": "human",
"value": "module Spec\n module Support\n module ChargebackHelper\n def set_tier_param_for(metric, param, value, num_of_tier = 0)\n tier = chargeback_rate.chargeback_rate_details.... | ruby | chosen |
[
{
"from": "system",
"value": "Add home route for voting namespace\n\nFix missing route for voting home (#4):\r\n\r\n* add home for voting namespace"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n namespace 'admin' do\n resources :proposals\n\n root 'proposals#index'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Copy all images to artwork folder\n"
},
{
"from": "human",
"value": "require 'soundcloud'\nrequire 'json'\n\nmodule Jekyll\n class Playlister < Liquid::Tag\n def initialize(tag_name, playlist, tokens)\n super\n # Register a client wit... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve merge conflict by keeping the newest upvote POST route.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n resources :sessions, only: [:new, :create, :destroy]\n get '/login' => 'sessions#new', as: 'login'\n post '/login' => 'sessions... | ruby | chosen |
[
{
"from": "system",
"value": "Use itsf backend backend_resource method.\n"
},
{
"from": "human",
"value": "Ecm::Pictures::Backend::Engine.routes.draw do\n resources :galleries\n resources :pictures\n\n root to: 'home#index'\nend\n"
},
{
"from": "gpt",
"value": "Ecm::Pictures::Back... | ruby | chosen |
[
{
"from": "system",
"value": "Add notification when file is opened.\n"
},
{
"from": "human",
"value": "if defined?(Konacha)\n require 'rspec'\n require 'ci/reporter/rake/rspec_loader'\n require 'yarjuf'\n Konacha.configure do |config|\n config.spec_dir = \"spec/javascripts\"\n conf... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec coverage on azure provider specific resource insertion\n"
},
{
"from": "gpt",
"value": "require_relative '../../../spec'\n\ndescribe 'Azure templates' do\n\n describe 'Basic template structure' do\n\n it 'should automatically reformat resources' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to build model class.\n"
},
{
"from": "human",
"value": "require 'test/unit'\nrequire File.expand_path '../../../../assert_helper.rb', __FILE__\nrequire File.expand_path '../../../../../lib/support/supported_programming_languages.rb', __FILE__\nrequire Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Test updated to reflect the new use of Base64\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire_relative 'pipeline_helper'\n\ndescribe RailsPipeline::IronmqPublisher do\n before do\n @default_emitter = DefaultIronmqEmitter.new({foo: \"baz\"}, wit... | ruby | chosen |
[
{
"from": "system",
"value": "Update homepage, summary, & description in .gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"cerializable/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Speci... | ruby | chosen |
[
{
"from": "human",
"value": "Add day 10: Balance Bots\n"
},
{
"from": "gpt",
"value": "Bot = Struct.new(:id, :nums, :low_to, :high_to) {\n def <<(n)\n nums << n\n nums.sort!\n puts id if nums == [17, 61]\n end\n\n def ready?\n nums.size == 2\n end\n\n def run!\n [low_to, high... | ruby | chosen |
[
{
"from": "system",
"value": "Delete test for capitalized title\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule PrLog\n describe Formatter do\n describe '#entries' do\n it 'interpolates entry templates with pull request data' do\n data = [{ title: 'Feature 1', ... | ruby | chosen |
[
{
"from": "system",
"value": "Add Debian Jessie to whitelist for apt.postgresql.org repo\n"
},
{
"from": "human",
"value": "if not %w(squeeze wheezy sid lucid precise saucy trusty utopic).include? node['postgresql']['pgdg']['release_apt_codename']\n raise \"Not supported release by PGDG apt rep... | ruby | chosen |
[
{
"from": "system",
"value": "Update projects when locking/unlocking user\n"
},
{
"from": "human",
"value": "module RedmineGitHosting\n module Patches\n module UserPatch\n\n def self.included(base)\n base.send(:include, InstanceMethods)\n base.class_eval do\n unlo... | ruby | chosen |
[
{
"from": "system",
"value": "Allow non bundle exec `$ ruby -I\"test:lib\" ...` test style to work.\n"
},
{
"from": "human",
"value": "require 'bundler'\nBundler.require :development, :test\nrequire 'second_base'\nrequire 'active_support/test_case'\nrequire 'active_support/testing/autorun'\nrequ... | ruby | chosen |
[
{
"from": "human",
"value": "Remove old ban fields from user table\n"
},
{
"from": "gpt",
"value": "class RemoveBanRelatedFieldFromUsers < ActiveRecord::Migration[6.1]\n def change\n remove_column :users, :permanently_banned, :boolean, default: false\n remove_column :users, :ban_reason, :... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify instrumentation for exception tests"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ActiveSupportTestCase < IntegrationTest\n def test_a_gauge_is_logged\n ActiveSupport::Notifications.instrument \"gauge_test.harness\", :gauge => true do ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for style attribute scrubbing\n"
},
{
"from": "human",
"value": "require \"helper\"\n\nclass UnitHTML5Scrub < Loofah::TestCase\n include Loofah\n\n def test_scrub_css\n assert Loofah::HTML5::Scrub.scrub_css(\"background: #ABC012\"), \"background: #ABC0... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with Tempfile in test being deleted\n"
},
{
"from": "human",
"value": "require \"tempfile\"\n\nrequire \"support/isolated_environment\"\n\nshared_context \"unit\" do\n # This creates an isolated environment so that Vagrant doesn't\n # muck around with yo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 'assigned but unused variable' warning\n\nRuby 2.0.0-preview2\n"
},
{
"from": "human",
"value": "require 'helper'\n\nclass TestGirlFriday < MiniTest::Unit::TestCase\n\n describe 'GirlFriday' do\n after do\n GirlFriday.shutdown!\n end\n\n descri... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for non existing relation_type\n"
},
{
"from": "human",
"value": "class RelationInfoSerializer < BaseSerializer\n cached\n self.version = 9\n\n def attributes\n data = super\n data['start_date'] = object.start_date.to_date.iso8601 if object.start_da... | ruby | chosen |
[
{
"from": "system",
"value": "Add rescue block and remove unless\n"
},
{
"from": "human",
"value": "class FetchDeveloperLanguagesWorker\n include Sidekiq::Worker\n sidekiq_options queue: 'critical', retry: 5\n\n def perform(login, access_token)\n api = Github::Api.new(access_token)\n la... | ruby | chosen |
[
{
"from": "system",
"value": "Use some other existing constant for verifier\n"
},
{
"from": "human",
"value": "class RegistrationsController < ApplicationController\n\n respond_to :html\n\n skip_before_action :authenticate!, only: [:new, :confirm, :create]\n before_action :redirect_authentica... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor override of impressionist_count for mongoid compatibility to fit the same style as the default AR version\n"
},
{
"from": "human",
"value": "module Impressionist\n module Impressionable\n\n # extends AS::Concern\n include Impressionist::IsImpressionable\... | ruby | chosen |
[
{
"from": "human",
"value": "Add support for ChargeAndShipOrder command\n"
},
{
"from": "gpt",
"value": "#--\n# Project: google_checkout4r \n# File: test/unit/charge_order_command_test.rb\n# Author: George Palmer <george.palmer at gmail dot com>\n# Copyright: (c) 2010 by George Palmer\... | ruby | chosen |
[
{
"from": "system",
"value": "Use anonymous feedback for the dummy app\n"
},
{
"from": "human",
"value": "Feedy.anonymous_feedback = false\nFeedy.user_class = \"User\"\nFeedy.current_user_helper = :current_user\n"
},
{
"from": "gpt",
"value": "Feedy.anonymous_feedback = true\nFeedy.u... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for 'too many articles' handling on Campaign articles tab\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe 'campaign articles page', type: :feature, js: true do\n let(:slug) { 'spring_2016' }\n let(:u... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Attributes::Association class\n"
},
{
"from": "gpt",
"value": "describe Adminable::Attributes::Association do\n let!(:reflection) do\n User.reflect_on_all_associations.find { |a| a.name == :blog_posts }\n end\n let!(:association) { Adminable::Attr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deploy_env from required secrets. It is now optional as an extra secret.\nNuclear secrets now allows optional extra secrets."
},
{
"from": "human",
"value": "# rubocop:disable BlockLength\nNuclearSecrets.configure do |config|\n config.required_secrets = {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use find_page as a before filter and use @page.\n\nThe method find_page does not always returns the page. It returns he params hash in the case of hash assignation (preview existing pages).\n\nThis break previews view view_templates as object methods are called in RenderOptions... | ruby | chosen |
[
{
"from": "system",
"value": "Fix initialization if Spree.user_class is not set\n\nFor example, when running the install generator.\n"
},
{
"from": "human",
"value": "# Ensure that Spree.user_class includes the UserMethods concern\n# Previously these methods were injected automatically onto the ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove import organisations from db:seed\n\nImportOrganisations.new.call involves pulling data dynamically in from\nGOV.UK. This makes it an extremely complicated approach to seeding a\ndatabase, and causes a bunch of misery in spinning up a production-like\nenvironment for GOV... | ruby | chosen |
[
{
"from": "system",
"value": "Add user and experience to seed file\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with db:... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for including only *.css files\n"
},
{
"from": "gpt",
"value": "require 'cc/engine/csslint'\nrequire 'tmpdir'\n\nmodule CC\n module Engine\n describe CSSlint do\n let(:code) { Dir.mktmpdir }\n let(:lint) { CSSlint.new(directory: code, io: nil, ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dependencies out of gem spec to avoid gems confliction\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"ehjob_authentication/version\"\n\n# Describe your gem and declare its depende... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Check if relic has a valid place\n"
},
{
"from": "human",
"value": "json.(relic,\n :id,\n :nid_id,\n :identification,\n :description,\n :categories,\n :state,\n :register_number,\n :dating_of_obj,\n :street,\n :latitude,\n :longitude,\n :tags,\n :c... | ruby | chosen |
[
{
"from": "system",
"value": "Use tr instead of gsub\n"
},
{
"from": "human",
"value": "When(/^I visit the (.*) path$/) do |route|\n visit eval(route.gsub(' ', '_') + '_path')\nend\n\nWhen(/^I click \"([^\"]*)\"$/) do |arg|\n click_on arg\nend\n"
},
{
"from": "gpt",
"value": "When(... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for creatoin of initial admin for tournament\n\nThe functionality was there, but was not tested\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Tournament, type: :model do\n describe \"destroy\" do\n let(:tournament) {Factory... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up acceptance spec helper\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\nrequire 'beaker-puppet'\nrequire 'beaker/puppet_install_helper'\nrequire 'beaker/module_install_helper'\n\nrun_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix another intermittent spec failure.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe Que::ResultQueue do\n let :result_queue do\n Que::ResultQueue.new\n end\n\n describe \"#push and #clear\" do\n it \"... | ruby | chosen |
[
{
"from": "human",
"value": "Set up proof of concept program\n"
},
{
"from": "gpt",
"value": "require 'yaml'\n\ninformation = YAML.load(File.open(\"data.yml\"))\n\n# Extract from corpus and save in variables\ndef extract_paragraphs(hash)\n array = []\n hash.keys.each do |key|\n array << has... | ruby | chosen |
[
{
"from": "system",
"value": "gemspec: Add sahara to runtime dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\nrequire 'vagrant-cucumber/version'\n\nGem::Specification.new do |s|\n s.name = 'vagrant-cucumber'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add integration tests for etckeeper\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\n# write up RSpec integration tests here\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n# write up RSpec integration tests here\n%w{\n git\n etcke... | ruby | chosen |
[
{
"from": "system",
"value": "[master] Add lint test to spec.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Resque::Plugins::JobLogger do\ninclude PerformJob\n\n it \"supplies the around_perform_log_job hook\" do\n LoggedJob.methods.should include :around_perform_log_j... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing dependency for Beaker tests\n"
},
{
"from": "human",
"value": "require 'beaker-rspec/helpers/serverspec'\nrequire 'beaker-rspec/spec_helper'\nrequire 'beaker/puppet_install_helper'\n\nrun_puppet_install_helper\n\nSUPPORTED_PLATFORMS = ['Debian'].freeze\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add monitoring facts to acceptance tests\n"
},
{
"from": "human",
"value": "require 'beaker-rspec'\n\ninstall_puppet_agent_on hosts, {} unless ENV['BEAKER_provision'] == 'no'\n\nRSpec.configure do |c|\n # Project root\n proj_root = File.expand_path(File.join(File.... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for sequential queue\n"
},
{
"from": "gpt",
"value": "describe Yars::AtomicQueue do\n let(:q) { Yars::AtomicQueue.new }\n let(:data){ %w(one two three four) }\n\n describe '#push' do\n it 'can be pushed to' do\n data.each { |num| q << num }\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Increase snippet content column size.\n\nThis will fix issue #3904\n"
},
{
"from": "gpt",
"value": "class IncreaseSnippetTextColumnSize < ActiveRecord::Migration\n def up\n # MYSQL LARGETEXT for snippet\n change_column :snippets, :content, :text, :limit => 429... | ruby | chosen |
[
{
"from": "system",
"value": "Fix integrations tests for kernel version\n\nSigned-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe command('uname -r') do\n its(:stdout) { should match /4.4.39(-v7)?+/ }\n... | ruby | chosen |
[
{
"from": "system",
"value": "[promo] Use join_table, not join_table name in user decorator\n"
},
{
"from": "human",
"value": "if Spree.user_class\n Spree.user_class.class_eval do\n has_and_belongs_to_many :roles, :class_name => \"Spree::Role\", :foreign_key => :user_id, :join_table_name => ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing organism and medication to episode\n\n- these are required when the episode is revised"
},
{
"from": "human",
"value": "Given(/^Patty is being treated for a peritonitis episode$/) do\n record_peritonitis_episode_for(\n patient: @patty,\n user: @cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add gem description & homepage\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'env_bang/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "human",
"value": "Add validation tests for votes\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Vote do\n\n it \"is valid with a user_id and question_id\" do\n vote = Vote.new(user_id: 1, question_id: 1)\n expect(vote).to be_valid\n end\n\n it \"should be ... | ruby | chosen |
[
{
"from": "system",
"value": "Add unix-crypt gem to generate hashes\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'edurange/version'\n\nGem::Specification.new do |gem|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Test connection closing in an SSL compliant way\n"
},
{
"from": "gpt",
"value": "require_relative './connection_spec_init'\n\ncontext 'Connection' do\n test 'Closing' do\n socket = StringIO.new\n io = StringIO.new\n\n connection = Connection.new socket, io,... | ruby | chosen |
[
{
"from": "system",
"value": "Make Alert Layout, add provider, uid, first/last name to users\n"
},
{
"from": "human",
"value": "class AddColumnsToUsers < ActiveRecord::Migration\n def change\n add_column :users, :provider, :string\n add_column :users, :uid, :string\n add_column :users,... | ruby | chosen |
[
{
"from": "system",
"value": "Remove and re-add values column\n"
},
{
"from": "human",
"value": "class StatisticsPrecision < ActiveRecord::Migration\n def change\n change_column :device_statistics, :value, :decimal, precision: 10, scale: 10\n end\nend\n"
},
{
"from": "gpt",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Speed up mass assignment by avoiding extra loops.\n"
},
{
"from": "human",
"value": "module ActiveModel\n module MassAssignmentSecurity\n class Sanitizer\n # Returns all attributes not denied by the authorizer.\n def sanitize(attributes, authorizer)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set client_secret, grant_type, create fake application\n"
},
{
"from": "human",
"value": "\nmodule GlomeOauth\n class Oauth2Controller < ActionController::Base \n\n def invalid_request\n render template: \"oauth2/invalid_request\"\n end\n\n def grant\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.