conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Implement Base-64 encoding instead of using the Ruby stdlib\n\nThis is a naive implementation that doesn't handle '=' padding."
},
{
"from": "human",
"value": "require 'base64'\n\nmodule MatasanoCryptoChallenges\n\n module Set01; end\n\nend\n\nclass MatasanoCryptoC... | ruby | chosen |
[
{
"from": "system",
"value": "Update Jumpshare.app to version 2.1.1\n"
},
{
"from": "human",
"value": "cask :v1 => 'jumpshare' do\n version '1.0.25-3'\n sha256 'a2a2d44d858616965c8271dcfc177ec299e9592fed3abb795ddb81b533f6d818'\n\n url \"https://jumpshare.com/desktop/mac/Jumpshare_#{version}.d... | ruby | chosen |
[
{
"from": "system",
"value": "Update all of rails to version 5.2.2.1"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'each_in_batches/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "human",
"value": "Reset all NewsArticle and FatalityNotice documents\n\nThere are some erroneously versioned announcements on production that\nneed to be rolled up to be minor changes. This migration finds all\ndocuments that match those criteria and resets all their editions to the\nsame minor v... | ruby | chosen |
[
{
"from": "system",
"value": "Improve order of columns in pipeline stages table\n"
},
{
"from": "human",
"value": "class CreatePipelineStages < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def change\n create_table :ci_stages do |t|\n t... | ruby | chosen |
[
{
"from": "system",
"value": "Replace :nullable=>false by :required=>true (datamapper specific).\n"
},
{
"from": "human",
"value": "require 'dm-core'\nrequire 'dm-types'\nrequire File.dirname(__FILE__)+'/shop'\nclass Product\n include DataMapper::Resource\n def self.default_repository_name\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set specific version of rubocop-govuk\n\nThis prevents developers using different versions of rubocop depending\non when they cloned the repo (as there is no Gemfile.lock committed).\n"
},
{
"from": "human",
"value": "lib = File.expand_path(\"lib\", __dir__)\n$LOAD_... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor formula to have version in one place only\n"
},
{
"from": "human",
"value": "class BoshInit < Formula\n desc \"creates and updates the Director VM\"\n homepage \"https://github.com/cloudfoundry/bosh-init\"\n url \"https://s3.amazonaws.com/bosh-init-artif... | ruby | chosen |
[
{
"from": "system",
"value": "Use new RSpec syntax in example\n"
},
{
"from": "human",
"value": "When /^I ask Tcl to calculate fibonacci for (\\d+)$/ do |n|\n @fib_result = @fib.eval(\"fib #{n}\").to_i\nend\n\nThen /^it should give me (\\d+)$/ do |expected|\n @fib_result.should == expected.to_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix email setup bug using wrong session variable\n"
},
{
"from": "human",
"value": "class Administration::EmailSetupsController < ApplicationController\n before_filter :only_admins\n\n def show\n if OneBody.email_configured?\n @domain = OneBody.smtp_config... | ruby | chosen |
[
{
"from": "system",
"value": "Test Group sort with nested context\n"
},
{
"from": "human",
"value": "require File.expand_path('../../header', __FILE__)\n\nclass GroupTest < TestCase\n def setup\n @group = ShippingMaterials::Group.new('basename', orders)\n end\n\n def test_filter\n @grou... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration for Devise :confirmable\n"
},
{
"from": "gpt",
"value": "class AddConfirmedAtToUsers < ActiveRecord::Migration\n def change\n add_column :users, :confirmed_at, :datetime\n add_column :users, :confirmation_token, :string\n add_column :users, :c... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test for saving the email\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe RawEmail do\n it \"should record the email in the database\" do\n email = RawEmail.new(\"matthew@foo.org\", [\"mlandauer@foo.org\", \"matthew@bar.com\"], \"This t... | ruby | chosen |
[
{
"from": "human",
"value": "Fix encoding for columns serialized with YAML\n\nSee a good explanation about the problem in '4. YAML serialized columns':\nhttp://blog.rayapps.com/2013/03/11/7-things-that-can-go-wrong-with-ruby-19-string-encodings/\n"
},
{
"from": "gpt",
"value": "class FixYamlEnco... | ruby | chosen |
[
{
"from": "system",
"value": "Use a harder dependency on the Wallpapering version\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'wallpapering-rails/version'\n\nGem::Specif... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for initializing an activity data set with activity values.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RubyJawbone::DataSet::Activity do\n #\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe RubyJ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove pending spec as it is not essential yet\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Nark::Plugin::Event do\n describe \"#type\" do\n it \"stores the trigger type\" do\n event = Nark::Plugin::Event.new :type => :before_call\... | ruby | chosen |
[
{
"from": "system",
"value": "Add test against having h1's in the text\n\nThis will prevent us from adding more h1 tags. We'll have to whitelist\na few exceptions because it uses `#` in code blocks (and I don't know\nhow to get around that with a regex).\n"
},
{
"from": "human",
"value": "Dir.gl... | ruby | chosen |
[
{
"from": "system",
"value": "Add note on manual TeamCity configuration\n"
},
{
"from": "human",
"value": "module Danger\n module CISource\n class TeamCity < CI\n def self.validates?(env)\n env.key? 'TEAMCITY_VERSION'\n end\n\n def supported_request_sources\n @su... | ruby | chosen |
[
{
"from": "human",
"value": "Add some basic tests for RestClient::ParamsArray.\n"
},
{
"from": "gpt",
"value": "require_relative '_lib'\n\ndescribe RestClient::ParamsArray do\n\n describe '.new' do\n it 'accepts various types of containers' do\n as_array = [[:foo, 123], [:foo, 456], [:b... | ruby | chosen |
[
{
"from": "system",
"value": "Declare two queues with different names\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\n__dir = File.dirname(File.expand_path(__FILE__))\nrequire File.join(__dir, \"example_helper\")\n\namq_client_example \"Declare a new fanout exchange\... | ruby | chosen |
[
{
"from": "system",
"value": "Use `:` instead of `echo` in ulimit patch\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'travis/build/appliances/base'\n\nmodule Travis\n module Build\n module Appliances\n class FixContainerBasedTrusty < Base\n REDIS_IN... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for block arguments\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe StripeEvent::WebhookController do\n before do\n StripeEvent.clear_subscribers!\n @base_params = { :use_route => :stripe_event }\n end\n\n context \"with valid ... | ruby | chosen |
[
{
"from": "human",
"value": "Add NoConverge convergence strategy that just makes a node\n"
},
{
"from": "gpt",
"value": "require 'chef_metal/convergence_strategy'\nrequire 'pathname'\nrequire 'cheffish'\n\nmodule ChefMetal\n class ConvergenceStrategy\n class NoConverge < ConvergenceStrategy\... | ruby | chosen |
[
{
"from": "system",
"value": "Use class-based caching for queries in EnterpriseInjectionData\n"
},
{
"from": "human",
"value": "module OpenFoodNetwork\n class EnterpriseInjectionData\n def active_distributor_ids\n @active_distributor_ids ||=\n Enterprise.distributors_with_active_... | ruby | chosen |
[
{
"from": "human",
"value": "Add red spec for circular dependency checker\n"
},
{
"from": "gpt",
"value": "# GitCompound\n#\nmodule GitCompound\n describe Worker::CircularDependencyChecker do\n before do\n git_build_test_environment!\n\n # TODO: add circular dependency somewhere\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Typecasting to use custom methods\n"
},
{
"from": "human",
"value": "require 'time'\n\n##\n# NPR::Concern::AttrTypecast\n#\nmodule NPR\n #------------------\n # Attributes that are being typecast to Ruby classes\n ATTR_TYPES = {\n \"id\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove passenger task for copying config file\n"
},
{
"from": "human",
"value": "module RPCapistrano\n module CopyConfig\n def self.load_into(configuration)\n configuration.load do\n namespace :rp do\n namespace :config_copy do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add leap-years directory and 2 .rb files.\n"
},
{
"from": "human",
"value": "# Leap Years\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below"
},
{
"from": "gpt",
"value": "# Leap Years\n\n# I worked on this challenge [with: S... | ruby | chosen |
[
{
"from": "human",
"value": "Rename assessment opened email setting key\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nclass RenameAssessmentOpenedEmailSettingsKey < ActiveRecord::Migration\n def change_assessment_email_key(old_key, new_key)\n ActsAsTenant.without_tenant do\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow popHealth to run when not in a git repository\n\npopHealth has code that will check the .git directory for information\nabout the latest commit and tag. This change will now display\n\"Unknown\" when there is no .git directory. It should also handle the\nsituation where t... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor exception notifier's init: fix errors if Site doesn't have all columns\n"
},
{
"from": "human",
"value": "# This file is part of Mconf-Web, a web application that provides access\n# to the Mconf webconferencing system. Copyright (C) 2010-2012 Mconf\n#\n# Th... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec and version bump.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n # Gem Details\n s.name = \"compass-vgrid-plugin\"\n s.version = \"0.4.0\"\n\n s.authors = [\"Aaron Russell\"]\n s.date = \"2010-04-13\"\n s.summary = %q{Compass... | ruby | chosen |
[
{
"from": "system",
"value": "Add period to sold method spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Product, type: :model do\n product = Product.create(name: 'Widget')\n\n it 'creates successfully' do\n expect(product).to be_truthy\n end\n\n it 'has ma... | ruby | chosen |
[
{
"from": "system",
"value": "Fix in podspec, Bump to v1.2.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NMRangeSlider\"\n s.version = \"1.2.0\"\n s.summary = \"A custom range slider for iOS.\"\n s.homepage = \"https:... | ruby | chosen |
[
{
"from": "system",
"value": "Move user data fetching to separate method\n"
},
{
"from": "human",
"value": "module Travis\n module Github\n module Services\n class FindOrCreateUser < Travis::Services::Base\n register :github_find_or_create_user\n\n def run\n find ... | ruby | chosen |
[
{
"from": "system",
"value": "Add search data to product search json output\n"
},
{
"from": "human",
"value": "class ProductsController < ApplicationController\n def search\n search_term = params[:search_term]\n product = Product.find_by(upc: search_term) || Product.find_by(name: search_t... | ruby | chosen |
[
{
"from": "system",
"value": "Add warning for RUby < 1.8.0, this can take a loooong time to run.\n"
},
{
"from": "human",
"value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\n\nload 'pixels-array'\n\nputs 'This may take a few seconds...'\nimage = Magick::Image.constitute(Width, Height, \"RGB\... | ruby | chosen |
[
{
"from": "system",
"value": "Use summary as description for now\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'tries/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Drop privileges when running as root\n"
},
{
"from": "human",
"value": "zartan_root = \"/var/www/zartan\"\n\nworker_processes 4\n\nworking_directory \"#{zartan_root}/current\"\n\nlisten \"#{zartan_root}/shared/pids/.unicorn.sock\"\npid \"#{zartan_root}/shared/pids/u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix code to pass check digit is “A”\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nclass Hkid\n def check_digit(hkid)\n sum = 0\n leading_char = []\n\n hkid.downcase.reverse.split(//).each_with_index do |char, index|\n if index < 6\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change petition lists nav to use ul html element\n"
},
{
"from": "human",
"value": "module SearchHelper\n def petition_search_lists(petition_search, params)\n search_list_links = Petition::SEARCHABLE_STATES.map do |state|\n link_text = petition_list_url_lin... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for changed redirect.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Admin::RepresentativesController do\n let(:representative) { Representative.make! }\n\n context 'not logged in' do\n it 'should not be able to access the control... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec to kill mutation in Axiom::Types::Boolean\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Axiom::Types::Boolean, '.infer' do\n subject { object.infer(arg) }\n\n let(:object) { described_class }\n\n context 'when ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant condition from case statement\n\nAs far as I can see `ManualsPublisher.document_services` is now only\never invoked from the `bin/republish_withdrawn_document` script. The\nvalue of the `document_type` argument passed into it is always obtained\nfrom a call to ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Vagrant Manager.app to v2.0.1\n\nUpgraded from v1.5.5\n"
},
{
"from": "human",
"value": "class VagrantManager < Cask\n version '1.5.5'\n sha256 '778815d9b5a41e30363f8ca652fc5964beb4fbca0691feaad2595e1382870762'\n\n url \"https://github.com/lanayotech/vagr... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement from ~> 0.87.0 to ~> 0.88.0\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/rubocop-hq/r... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec regexes to be tolerant of dashes within wordlists\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "require_relative \"../spec_helper\"\n\ndescribe Politokens do\n it \"generates a n... | ruby | chosen |
[
{
"from": "system",
"value": "Add unit tests for a message with attachments.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"PostmarkRails3\" do\n let!(:api_client) { Postmark::ApiClient.new('api-key') }\n\n it \"should allow setting an api key\" do\n ActionMailer::Ba... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor deck specs to name the subject.\n\nIt just makes it easier to follow.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RubyCards::Deck do\n describe '#initialize' do\n it 'initializes 52 cards' do\n subject.cards.count.should ==... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake task for i18n resource\n"
},
{
"from": "human",
"value": "namespace :schema_comments do\n desc 'Dump schema to db/schema.rb'\n task :dump => :environment do\n require 'active_record/schema_dumper'\n filename = ENV['SCHEMA'] || Rails.root.join('db/sc... | ruby | chosen |
[
{
"from": "system",
"value": "Add kubernetes_member to white list\n"
},
{
"from": "human",
"value": "ALLOWED_ROLES = %w(\n admin\n audit_viewer\n compute_admin\n compute_viewer\n dns_viewer\n keymanager_admin\n keymanager_viewer\n kubernetes_admin\n member\n monitoring_viewer\n networ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for reconstantizing\n\nWe've always behaved this way, but we've never had a test for it.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nrequire 'spec_helper'\n\nclass Model; end\n\ndescribe ActiveInteraction::ModelFilter, :filter do\n include_cont... | ruby | chosen |
[
{
"from": "system",
"value": "Use ruby 1.8 hash syntax everywhere\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Yardstick::Rule, '#enabled?' do\n subject { described_class.new(document, options).enabled? }\n\n let(:document) { mock('document', path: 'Foo#bar') }\n let(:... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirect from /company to /company/2013\n\nResolves #90\n"
},
{
"from": "human",
"value": "require 'dashing'\nrequire 'dotenv'\n\nDotenv.load\n\nconfigure do\n set :auth_token, 'YOUR_AUTH_TOKEN'\n set :default_dashboard, 'company/2013'\n\n helpers do\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Set max Version of Rails dependency to 6\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'dynamic_fields_for_rails/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Add course classes controller config\n"
},
{
"from": "human",
"value": "class CourseClassesController < ApplicationController\n active_scaffold :course_class do |conf|\n end\nend "
},
{
"from": "gpt",
"value": "class CourseClassesController < Applicati... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Tee Time join bug and delete tee time if leave makes it empty\n"
},
{
"from": "human",
"value": "class UserTeeTimesController < ApplicationController\n\n def create\n @user_tee_time = UserTee_time.new\n authorize @user_tee_time\n @tee_time = TeeTime.fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec for the case where data fields are empty and tidy up the code\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../../spec_helper'\n\ndescribe \"Osfi::EntitiesConverter\" do\n\n before(:each) do\n @converter = Osfi::IndividualsC... | ruby | chosen |
[
{
"from": "system",
"value": "Use '*' instead of '+'\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe SimpleArel::ScopeOperators do\n context '.not' do\n context 'with singlar clauses' do\n it 'should join them with \"AND NOT\"' do\n relation = (User.where(:na... | ruby | chosen |
[
{
"from": "system",
"value": "Update serverspec tests read for testing\n\nMake them more dynamic, using variables instead of lots of duplicated tests with\nos_family-based \"if\" statements.\n"
},
{
"from": "human",
"value": "require 'serverspec'\n\n# Required by serverspec\nset :backend, :exec\... | ruby | chosen |
[
{
"from": "system",
"value": "Change 'Post' to 'Question' in cached_votes migration\n"
},
{
"from": "human",
"value": "class AddCachedVotesToQuestions < ActiveRecord::Migration\n def self.up\n add_column :questions, :cached_votes_total, :integer, :default => 0\n add_column :questions, :ca... | ruby | chosen |
[
{
"from": "system",
"value": "Move restricted_user_id from task to restriction\n"
},
{
"from": "human",
"value": "require_relative '20180107172830_add_restricted_user_to_tasks'\n\nclass AddRestrictedUsersToTasks < ActiveRecord::Migration\n def up\n revert AddRestrictedUserToTasks\n\n crea... | ruby | chosen |
[
{
"from": "system",
"value": "Add dynamic view name generation\n"
},
{
"from": "human",
"value": "module Sorcery\n module Model\n module Adapters\n module Couchbase\n extend ActiveSupport::Concern\n\n included do\n include Sorcery::Model\n end\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix publish service standard rake task\n\nSince e0891e9, the service standard no longer receives a set of points when instantiated.\n\nThe rake task was not updated as part of this change, which resulted in an ArgumentError exception being thrown when the rake task was run.\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing additional options when translating an attribute\n"
},
{
"from": "human",
"value": "module TranslateableAttributes\n module Methods\n # rubocop:disable Metrics/AbcSize\n def translate_attributes(options = {})\n options.each do |attribute, n... | ruby | chosen |
[
{
"from": "system",
"value": "Add default value to an argument in the block\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Juknife\n module Request\n # A DSL for definition target web page and request methods.\n module DSL\n HTTP_METHODS = %i[get post put ... | ruby | chosen |
[
{
"from": "system",
"value": "Set stage at the beginning to be able to use it from config/deploy.rb"
},
{
"from": "human",
"value": "include Capistrano::DSL\n\nnamespace :load do\n task :defaults do\n load 'capistrano/defaults.rb'\n end\nend\n\nstages.each do |stage|\n Rake::Task.define_ta... | ruby | chosen |
[
{
"from": "system",
"value": "Remove configuration options from Chart class (they should be specified as presenter options)\n"
},
{
"from": "human",
"value": "require 'compendium/query'\n\nmodule Compendium\n class Chart < Query\n CHART_TYPES = [:bar, :column, :pie]\n\n attr_reader :chart... | ruby | chosen |
[
{
"from": "system",
"value": "Remove overly strict dependency on sass-rails\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = \"solidus_legacy_return_authorizations\"\n s.version = \"1.0.0\"\n s.s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove this comparison - it will fail now we redirect to devise\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe AccountController do\n include HTMLCompareHelper\n fixtures :all\n\n describe '#settings' do\n it { compare('/account/settings.... | ruby | chosen |
[
{
"from": "system",
"value": "Change spec to be tolerant of countries and adjectives with dashes\n"
},
{
"from": "human",
"value": "require_relative \"../spec_helper\"\n\ndescribe Politokens do\n it \"generates a name like still-silence-5012\" do\n name = Politokens.politoke\n\n expect(na... | ruby | chosen |
[
{
"from": "system",
"value": "Add status as accessible attribute\n"
},
{
"from": "human",
"value": "class Feed < ActiveRecord::Base\n STATUSES = %w(ok error)\n\n attr_accessible :title, :description, :url, :site_url, :last_modified_at\n\n has_many :posts, dependent: :destroy\n\n validates :t... | ruby | chosen |
[
{
"from": "system",
"value": "Use \\A and \\z instead of ^ and $\n"
},
{
"from": "human",
"value": "module ActiveRecord\n module Validations #:nodoc:\n module ClassMethods\n local_part_illegal_chars = '[^@<>\\(\\)\\[\\]:;\\\\\\\\\\s\\.]'\n EMAIL_REGEXP = /^[^\\.](#{local_part_illeg... | ruby | chosen |
[
{
"from": "system",
"value": "Add timestamp to publish task ordering\n\nThis resolves an issue where you didn't get updated messages for\nre-attempts at publishing a document.\n"
},
{
"from": "human",
"value": "require \"state_machine\"\n\nclass ManualPublishTask\n include Mongoid::Document\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for attributes classes\n"
},
{
"from": "human",
"value": "describe Adminable::Attributes::Base do\n describe '#initialize' do\n it 'raise error' do\n expect { Adminable::Attributes::Base.new('user') }.to raise_error\n end\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Print errors in dev mode\n"
},
{
"from": "human",
"value": "require 'pony'\nrequire 'erb'\n\nclass ExceptionMaster\n\n attr_reader :email_config\n\n def initialize(raise_error: true, deliver_email: true, email_config: {}, environment: 'development', send_when_envi... | ruby | chosen |
[
{
"from": "system",
"value": "Add omniauth and validate omniauth signin.\n"
},
{
"from": "human",
"value": "class User < ApplicationRecord\n # Include default devise modules. Others available are:\n # :confirmable, :lockable, :timeoutable and :omniauthable\n devise :database_authenticatable, ... | ruby | chosen |
[
{
"from": "system",
"value": "Use new 'configure_plugins' task to hook into jasmine configuration\n\n[finish #58202866]\n"
},
{
"from": "human",
"value": "namespace :jasmine_selenium_runner do\n task :setup do\n require File.join('jasmine_selenium_runner', 'configure_jasmine')\n JasmineSe... | ruby | chosen |
[
{
"from": "system",
"value": "Add escape for URI in HTTPClient\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'net/http'\n\nmodule Nehm\n\n class HTTPClient\n\n ##\n # SoundCloud API client ID\n\n CLIENT_ID = '11a37feb6ccc034d5975f3f803928a32'\n\n ##\n # Exception cla... | ruby | chosen |
[
{
"from": "system",
"value": "Drop unnecessary optional argument from TreeBuilderAutomateInlineMethod\n"
},
{
"from": "human",
"value": "class TreeBuilderAutomateInlineMethod < TreeBuilderAutomateEntrypoint\n def x_get_tree_class_kids(object, count_only, _type)\n count_only_or_objects(count_... | ruby | chosen |
[
{
"from": "system",
"value": "Drop TCP6 specificity to fix CentOS testing\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\n\nshared_examples_for 'exhibitor' do\n describe port '8080' do\n it { should be_listening.with 'tcp6' }\n end\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add an asterisk to the regex to include wildcard subdomains\n"
},
{
"from": "human",
"value": "module Aquatone\n module Collectors\n class Crtsh < Aquatone::Collector\n self.meta = {\n :name => \"crtsh\",\n :author => \"Joel (@jo... | ruby | chosen |
[
{
"from": "system",
"value": "Use zone_names to improve performance\n"
},
{
"from": "human",
"value": "require 'aws-sdk'\nrequire 'contracts'\nrequire_relative 'service'\n\nmodule Cloudstrap\n module Amazon\n class Route53 < Service\n include ::Contracts::Core\n include ::Contracts... | ruby | chosen |
[
{
"from": "system",
"value": "Add `security_groups` support to OpenStack\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'racker/builders/builder'\n\nmodule Racker\n module Builders\n # This is the OpenStack builder\n class OpenStack < Racker::Builders::Builder\n def to... | ruby | chosen |
[
{
"from": "system",
"value": "Use keyword arguments in Rails 5\n\nIn Rails 5, HTTP request methods issue the following deprecation warnings:\n\n```\nActionDispatch::IntegrationTest HTTP request methods will accept only\nthe following keyword arguments in future Rails versions:\nparams, headers, env, xhr, as... | ruby | chosen |
[
{
"from": "system",
"value": "Use version 4.1.13 of the oVirt Ruby SDK\n\nThe more relevant changes in this version of the oVirt Ruby SDK are the\nfollowing:\n\n* Virtual machine remove fails due to spelling mistake\n https://bugzilla.redhat.com/1509020[#1509020].\n\n* Improve error message for empty respo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix copy to use 'cp -R' (instead of 'cp -r').. no-follow symlinks.\n\n[#102277058](https://www.pivotaltracker.com/story/show/102277058)\n\nSigned-off-by: Corey Innis <c6de6a297c7ba72017894924528d266f693d3f31@pivotal.io>\n"
},
{
"from": "human",
"value": "require 'sp... | ruby | chosen |
[
{
"from": "system",
"value": "Fix style issue in notification center spec\n"
},
{
"from": "human",
"value": "describe Nanoc::Int::NotificationCenter do\n it 'receives notification after subscribing' do\n ping_received = false\n Nanoc::Int::NotificationCenter.on :ping_received, :test do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use https for GitHub link\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/test_declarative/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'test_declarative'\n s.version = TestDeclarative::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Update Podspec to refer to 3.0.3 release and tag\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"MBCalendarKit\"\n s.version = \"3.0.2\"\n s.summary = \"An open source calendar view for iOS.\"\n s.description = <<-DESC\n... | ruby | chosen |
[
{
"from": "system",
"value": "Test existence of benefits list in YAML\n"
},
{
"from": "human",
"value": "require_relative \"../../test_helper\"\n\nmodule SmartAnswer::Calculators\n class BenefitCapCalculatorDataQueryTest < ActiveSupport::TestCase\n context BenefitCapCalculatorDataQuery do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "QUALITY: Remove mapping in get all campuses en d point\n"
},
{
"from": "human",
"value": "require 'grape'\n\nmodule Api\n class CampusesPublicApi < Grape::API\n\n desc \"Get a campus details\"\n get '/campuses/:id' do\n campus = Campus.find(params[:id])\... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod version in .podspec\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint SetNeedsReadable.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... | ruby | chosen |
[
{
"from": "system",
"value": "Use unicorn's OobGC when possible.\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\nrun Moebooru::Application\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for lmgtfy module\n\nSigned-off-by: Aki Saarinen <278bc57fbbff6b7b38435aea0f9d37e3d879167e@akisaarinen.fi>\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + '/test_helper.rb'\nrequire 'modules/module_lmgtfy.rb'\n\nclass TestModule_Lmgtfy < Te... | ruby | chosen |
[
{
"from": "system",
"value": "Test wait_for_angular with a random sleep in sample app.\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'json'\n\nclass SampleApplication < Sinatra::Base\n configure do\n disable :protection\n disable :sessions\n enable :static\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change support_email env variable name\n"
},
{
"from": "human",
"value": "class ReporterMailer < ActionMailer::Base\n default from: Cartodb.get_config(:mailer, 'from')\n layout 'mail'\n\n def trending_maps_report(mail_to, trending_visualizations)\n @subject = ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"select option label can now specify a proc.\"\"\n\nThis reverts commit 7ef04bed697d5b5d89dd8e2f57e7f2513beea93a.\n"
},
{
"from": "human",
"value": "module SwitchUserHelper\n class SelectOption < Struct.new(:label, :scope_id); end\n def switch_use... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless, failing test; cleanup whitespace\n"
},
{
"from": "human",
"value": "require 'spec_helper'\ndescribe 'apt::params', :type => :class do\n let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion => ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.