conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update omniauth-oauth2 to version 1.7.1"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/omniauth/vkontakte/version', __dir__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Anton Maminov']\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Make Pry available in tests when run locally\n"
},
{
"from": "human",
"value": "require \"bundler/setup\"\n\nbegin\n require \"coveralls\"\n Coveralls.wear! if ENV[\"CI\"] == true\nrescue LoadError\nend\n\nrequire \"well_read_faker\"\n\nRSpec.configure do |config|... | ruby | chosen |
[
{
"from": "system",
"value": "Replace deprecated ChefSpec::ChefRunner with ChefSpec::Runner\n"
},
{
"from": "human",
"value": "require 'chefspec'\nrequire 'berkshelf'\n\nBerkshelf.ui.mute do\n Berkshelf::Berksfile.from_file('Berksfile').install(path: 'vendor/cookbooks/')\nend\n\ndef runner(attr... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib/portability to search path\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'turnip/rspec'\nrequire 'reportability'\n\nDir.glob(\"spec/lib/**/*_steps.rb\") { |f| load f, true }\n\n$LOAD_PATH << File.expand_path('../../lib', __FILE__) # the... | ruby | chosen |
[
{
"from": "system",
"value": "Call DataMapper.finalize after model definition\n"
},
{
"from": "human",
"value": "require 'dm-core/spec/setup'\nrequire 'dm-core/spec/lib/adapter_helpers'\n\nrequire 'dm-validations'\nrequire 'dm-types'\nrequire 'dm-migrations'\n\nSPEC_ROOT = Pathname(__FILE__).dir... | ruby | chosen |
[
{
"from": "system",
"value": "Enable both `should` and `expect` in RSpec\n\ngriddler-sendgrid uses `should` everywhere, but the shared expectation from\nGriddler uses `expect`. To prevent warnings in newer versions of RSpec, enable\nboth syntaxes.\n"
},
{
"from": "human",
"value": "require 'grid... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests by removing unused ActiveRecord fixture config settings.\n\nThis got broken in fcbc5c7279be7b03ec7c994a9061a5f98eaf5d2d since we're\nno longer accidentally requiring ActiveRecord. These\nActiveRecord-specific configuration settings then broke, but since we've\nnever u... | ruby | chosen |
[
{
"from": "system",
"value": "Use documentation output for rspec\n"
},
{
"from": "human",
"value": "RSpec.configure do |c|\n c.mock_with :rspec\nend\n\nrequire 'puppetlabs_spec_helper/module_spec_helper'\nrequire 'rspec-puppet-facts'\n\nunless RUBY_VERSION =~ /^1\\.8/\n require 'simplecov'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Dir.glob instead of FileList\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'rake'\n\nlib = File.expand_path('../lib', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'sql-logging/version'\n\nGem::Specification.new do |s| \n s.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add helper methods for Reconfigure VM UI.\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1065573\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Redhat::InfraManager::Vm < ManageIQ::Providers::InfraManager::Vm\n include_concern 'Operations'\n include... | ruby | chosen |
[
{
"from": "system",
"value": "Update chef client to 13.8.5\n"
},
{
"from": "human",
"value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [\"opscode\"]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"12.13.0-1\"\n\n# Set the ... | ruby | chosen |
[
{
"from": "system",
"value": "Update chef client to 11.18.0-1\n"
},
{
"from": "human",
"value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [ \"opscode\" ]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"11.1.3-1\"\n\n# Set ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a step to emulate sharing a lockfile\n"
},
{
"from": "human",
"value": "Given 'a lockfile with:' do |content|\n steps %Q{\n Given a file named \"#{'.'.to_lockfile_path}\" with:\n \"\"\"\n #{expand(content)}\n \"\"\"\n }\nend\n\nGiven 'I delet... | ruby | chosen |
[
{
"from": "system",
"value": "Fix join table name error on generator\n"
},
{
"from": "human",
"value": "require 'rails/generators'\nrequire 'rails/generators/base'\nrequire 'rails/generators/migration'\nrequire 'rails/generators/active_record'\n\nmodule Kebapress\n module Generators\n class ... | ruby | chosen |
[
{
"from": "human",
"value": "Add initial step for integration tests\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass RequestsTest < ActionDispatch::IntegrationTest\n setup do\n Peek.adapter.reset\n Peek.reset\n end\n\n test \"the request id is set\" do\n assert_empty P... | ruby | chosen |
[
{
"from": "system",
"value": "Fix API root url link generation\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ApplicationController < ActionController::API\n include JSONAPI::Utils\n\n rescue_from JSONAPI::Exceptions::Error, :with => :jsonapi_render_errors\n rescue_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove logging from students controller\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery\n helper_method :current_student\n helper_method :current_user_students\n # after_filter :store_location\n\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Move duration check outside of content check.\n"
},
{
"from": "human",
"value": "module FeedCrawler\n class YoutubeReceiver\n include Sidekiq::Worker\n sidekiq_options queue: :parse\n\n def perform(data)\n ids = data[\"entries\"].map { |entry| entry.d... | ruby | chosen |
[
{
"from": "system",
"value": "Improve verification of whether superusers can leave spaces or not\n\nrefs #1552\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-2015 Mconf.\n#\n# ... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (6) autocomplete yay\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/5389864ec72ce03383000484\n# --- iteration 1 ---\ndef autocomplete(input, dictionary)\n input.gsub!(/[^[a-zA-Z]]/, \"\")\n dictionary.select{ |word| word.downcase.star... | ruby | chosen |
[
{
"from": "system",
"value": "Test to handle at least 100 calls\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'examples' do\n\n describe 'json' do\n it 'should handle long strings of json' do\n client = Quartz::Client.new(file_path: 'spec/examples/long_json.go')\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add Property reference in DM0.10 case so DM1'ized quote_value works.\n"
},
{
"from": "human",
"value": "module DataMapper::Salesforce\n class Type < ::DataMapper::Type\n end\n\n module Types\n end\nend\n\nrequire 'dm-salesforce/types/serial'\nrequire 'dm-salesfo... | ruby | chosen |
[
{
"from": "system",
"value": "Use implicit reference to class instead of explicit reference to improve maintainability.\n\n"
},
{
"from": "human",
"value": "require 'mocha/single_return_value'\n\nmodule Mocha # :nodoc:\n \n class ReturnValues # :nodoc:\n \n def self.build(*values)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove seemingly unused options hash.\n"
},
{
"from": "human",
"value": "require 'mtgox/version'\n\nmodule MtGox\n module Configuration\n # An array of valid keys in the options hash when configuring a {MtGox::Client}\n VALID_OPTIONS_KEYS = [\n :commissi... | ruby | chosen |
[
{
"from": "system",
"value": "Define feature as a block"
},
{
"from": "human",
"value": "require 'puppet/util/feature'\n\nPuppet.features.add(:mtik, :libs => [\"mtik\"])"
},
{
"from": "gpt",
"value": "require 'puppet/util/feature'\n\nPuppet.features.add(:mtik) do\n require \"mtik\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak river-notification observer for soft-deletes\n"
},
{
"from": "human",
"value": "require 'pebblebed'\nrequire_relative 'models/post'\n\nclass RiverNotifications < ActiveRecord::Observer\n observe :post\n\n def self.river\n river = Pebblebed::River.new\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust test expectation for 'LD'\n\nSigned-off-by: Jack Nagel <43386ce32af96f5c56f2a88e458cb94cebee3751@gmail.com>\n"
},
{
"from": "human",
"value": "require 'testing_env'\nrequire 'hardware'\n\nclass EnvironmentTests < Test::Unit::TestCase\n def test_ENV_options\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing require of onebox module\n\nWith Discourse 2.8 this does not seem to happen implicitlcy anymore\n"
},
{
"from": "human",
"value": "# name: musicbrainz-onebox\n# about: OneBox preview for MusicBrainz.org\n# version: 0.6.0\n# authors: Philipp Wolfer <ph.wo... | ruby | chosen |
[
{
"from": "system",
"value": "Use --env=super by default for Linuxbrew\n"
},
{
"from": "human",
"value": "require \"hardware\"\nrequire \"extend/ENV/shared\"\nrequire \"extend/ENV/std\"\nrequire \"extend/ENV/super\"\n\ndef superenv?\n if OS.linux?\n ARGV.env == \"super\" || (ENV[\"CI\"] || A... | ruby | chosen |
[
{
"from": "system",
"value": "Fix no longer defined variable name snafu from merge\n"
},
{
"from": "human",
"value": "require_relative 'concerns/weekly_reportable'\n\nclass SignaturesReport\n include WeeklyReportable\n\n ##\n # @private\n #\n # @return [ActiveRecord::Relation]\n def pull_j... | ruby | chosen |
[
{
"from": "system",
"value": "Update Privacy Services Manager to 1.7.2\n"
},
{
"from": "human",
"value": "cask :v1 => 'privacy-services-manager' do\n version '1.6.9'\n sha256 'd59db1d633c40f791578d7496ba3a6f94370fda24e64e6b8bafe9b4385b7a772'\n\n url \"https://github.com/univ-of-utah-marriott-... | ruby | chosen |
[
{
"from": "system",
"value": "Move unsafe regexp to a constant.\n"
},
{
"from": "human",
"value": "module Hache\n HTML_ESCAPE = {\n \"&\" => \"&\",\n \">\" => \">\",\n \"<\" => \"<\",\n '\"' => \""\",\n \"'\" => \"'\",\n \"/\" => \"/\"\n }\n\n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary directive pattern regex\n\nThe default one in Sprockets works fine\n"
},
{
"from": "human",
"value": "module Emcee\n # The `DirectiveProcessor` is responsible for parsing and evaluating\n # directive comments in a source file.\n class Directive... | ruby | chosen |
[
{
"from": "system",
"value": "Fix source images helper comment.\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n\n# Build urls for generated images.\nmodule SrcImagesHelper\n def src_image_url_for(src_image)\n url_for(\n controller: :src_images,\n action: :show,\n id: sr... | ruby | chosen |
[
{
"from": "system",
"value": "Allow 'error' to be used for normal non-mapped raises\n"
},
{
"from": "human",
"value": "require 'active_support/all'\n\nmodule Nodus\n @_error_msg_map = {}\n\n def self.def_exception(sym, msg, superclass=RuntimeError)\n klass = Class.new(superclass)\n Nodus... | ruby | chosen |
[
{
"from": "system",
"value": "Remove nginx/docker cookbook version restriction\n"
},
{
"from": "human",
"value": "name 'dokku'\nmaintainer 'Fabio Rehm'\nmaintainer_email 'fgrehm@gmail.com'\nlicense 'MIT'\ndescription 'Installs/Configures dokku'\nlong_description I... | ruby | chosen |
[
{
"from": "system",
"value": "Fix regexes to appease the rubocop\n"
},
{
"from": "human",
"value": "describe command('heroku version') do\n its(:stdout) { should match(/^heroku-toolbelt\\/\\d/) }\n its(:stdout) { should match(/^heroku-cli\\/\\d/) }\nend\n"
},
{
"from": "gpt",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Use === to know whether the object is Array or not\n"
},
{
"from": "human",
"value": "require 'singleton'\nrequire 'active_decorator/helpers'\n\nmodule ActiveDecorator\n class Decorator\n include Singleton\n\n def initialize\n @@decorators = {}\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Speed up ConditionOracle to get 131ms to 125ms"
},
{
"from": "human",
"value": "class ConditionOracle < ConditionSimple\n def initialize(text)\n @text = text\n @has_cardname = !!(@text =~ /~/)\n @normalized_text = normalize_text(@text)\n end\n\n def matc... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to v3 of the API, bump version\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance.load do\n \n namespace :pivotal_tracker do\n desc \"deliver your project's 'finished' stories\"\n task :deliver_stories do\n require 'rubygems'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add body to Appsignal error message\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass UniformNotifier\n class AppsignalNotifier < Base\n class << self\n def active?\n !!UniformNotifier.appsignal\n end\n\n protected\n... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor grades mailer to use associations."
},
{
"from": "human",
"value": "# Mailer to handle [Coursewareable::Grade] emails\nclass GradesMailer < ActionMailer::Base\n default from: Courseware.config.default_email_address\n layout 'email'\n\n # Sends an email t... | ruby | chosen |
[
{
"from": "system",
"value": "Add more info to mailman log\n"
},
{
"from": "human",
"value": "class MailReceiver\n def add_comment(message, params)\n ticket = Ticket.find_by_token(params[:token])\n user = User.find_by_email(message.from)\n\n return if ticket.nil? || user.nil?\n\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Add timeout to backup worker\n"
},
{
"from": "human",
"value": "class BackupWorker\n include Sidekiq::Worker\n\n def perform\n PgDrive.perform\n end\nend\n"
},
{
"from": "gpt",
"value": "class BackupWorker\n include Sidekiq::Worker\n\n def perfor... | ruby | chosen |
[
{
"from": "system",
"value": "Test for notification count action\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe NotificationsController, type: :controller do\n let(:user) { create(:user) }\n let(:project) { create(:project) }\n let(:notification) { create(:notification, ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for standard organisation search\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe OrganisationsController do\n\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe OrganisationsController do\n\n it \"shoul... | ruby | chosen |
[
{
"from": "system",
"value": "Change cookie serialisation method to :json\n\nThe :marshal option is potentially unsafe, and has been added to\nbrakeman as a security warning.\n\nDeploying this will invalidate everyone's cookies, but\nspecialist-publisher should just re-auth them against signon.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "EXclude test and develop environments for RescueMailer\n\nSigned-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>\n"
},
{
"from": "human",
"value": "# config/initializers/resque_mailer.rb\nResque::Mailer.excluded_environments = []#[:test, :develop... | ruby | chosen |
[
{
"from": "system",
"value": "Make methods not called by tests private\n"
},
{
"from": "human",
"value": "class Crypto\n\n def initialize(plaintext)\n @plaintext = plaintext\n end\n\n def normalize_plaintext\n @normalized ||= @plaintext.downcase.gsub(/\\W/, '')\n end\n\n def plaintext... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec version to 1.6\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'NHNetworkTime'\n s.version = '1.5'\n s.summary = 'Network time protocol NTP for iOS.'\n s.homepage = 'https://github.com/huynguyencong/NHNetwo... | ruby | chosen |
[
{
"from": "system",
"value": "Write migration code for songs table\n"
},
{
"from": "human",
"value": "class CreateSongs < ActiveRecord::Migration\n def change\n end\nend\n"
},
{
"from": "gpt",
"value": "class CreateSongs < ActiveRecord::Migration\n def change\n create_table :so... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for hash extension\n\nReference:\nhttps://github.com/peter-murach/github/blob/master/spec/github/core_ext/hash_spec.rb\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Hash do\n\n before do\n BitBucket.new\n @ha... | ruby | chosen |
[
{
"from": "human",
"value": "Add new test for service\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe NextActivitySuggester do\n let(:school) { school = create :school, enrolled: true }\n let(:activity_category) { create :activity_category }\n let!(:activity_types) { creat... | ruby | chosen |
[
{
"from": "system",
"value": "Use deployment's cluster for kubernetes prereq\n\nA deployment will have a cluster associated on creation if there is one.\n\nOtherwise fallback to deployment_platform for legacy deployments.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "# This file is maintained by a herd of rabid monkeys with Rakes.\nmodule EY\n class CloudClient\n VERSION = '1.0.12'\n end\nend\n# Please be aware that the monkeys like tho throw poo sometimes.\n"
}... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to add related link for business finder content\n\nThis adds a related link (back to the finder itself) to all content\nitems that are tagged to the EU Exit Business Readness Finder.\n"
},
{
"from": "gpt",
"value": "namespace :eu_exit_business_finder do... | ruby | chosen |
[
{
"from": "human",
"value": "Add a class for Libavformat.\n"
},
{
"from": "gpt",
"value": "class UserAgent\n module Browsers\n # The user agent utilized by ffmpeg or other projects utilizing libavformat\n class Libavformat < Base\n def self.extend?(agent)\n agent.detect do |us... | ruby | chosen |
[
{
"from": "system",
"value": "Disable plugin if a URL isn't specified\n\nRather than throw an error, this change disables vagrant-cookbook-fetcher.\nWithout this, any Vagrantfile that doesn't use vagrant-cookbook-fetcher will\nthrow an error, preventing you from using vagrant without configuring this\nplugi... | ruby | chosen |
[
{
"from": "human",
"value": "Add class spec test for govuk_logging\n"
},
{
"from": "gpt",
"value": "require_relative '../../../../spec_helper'\n\ndescribe 'govuk_logging', :type => :class do\n\n it { is_expected.to compile }\n it { is_expected.to compile.with_all_deps }\n it { is_expected.to ... | ruby | chosen |
[
{
"from": "system",
"value": "Add watir as a dependency.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/watir/rspec/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jarmo Pertman\"]\n gem.email = [\"jarmo.p@... | ruby | chosen |
[
{
"from": "system",
"value": "Fix points for fourth place\n"
},
{
"from": "human",
"value": "class PlacementPoints\n\tdef initialize(number_of_placers)\n\t\t@number_of_placers = number_of_placers\n end\n\n def firstPlace\n if @number_of_placers == 4\n return 14\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add enum, feeling_length, feeling_slopek, knowledge_length, knowledge_slope, fate_slope\n"
},
{
"from": "human",
"value": "class PalmInformation < ApplicationRecord\n belongs_to :user\n\n validates :feeling_length, numericality: { only_integer: true }, allow_nil... | ruby | chosen |
[
{
"from": "system",
"value": "Enable test now this is working since we switched to Marker\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe DivisionsHelper do\n # TODO Enable this test\n # describe '#formatted_motion_text' do\n # subject { formatted_motion_text division }... | ruby | chosen |
[
{
"from": "system",
"value": "Improve ability to retreive battery temp, battery status, snapshot.\n"
},
{
"from": "human",
"value": "begin\n require \"android\"\nrescue LoadError\n require \"mock_android\"\nend\n\nrequire \"erb\"\n\nclass Broadcast < Sinatra::Base \n\n DROID = Android.new\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Traits Controller spec tests to pass\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Api::V1::TraitsController, type: :controller do\n let!(:trait) { create(:trait) }\n\n describe \"GET #index\" do\n it \"returns http success\" d... | ruby | chosen |
[
{
"from": "system",
"value": "Allow 'in' queries is passing an array of values\n"
},
{
"from": "human",
"value": "module ContentfulModel\n module ChainableQueries\n def self.included(base)\n base.extend ClassMethods\n base.class_eval do\n attr_accessor :query\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ridscount to Gemfile from joofaq generator\n"
},
{
"from": "human",
"value": "class JoofaqGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n\n def generate_faq\n copy_file \"joofaq.yml\", \"db/faq.yml\"\n cop... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing delegations - Luke Melia/Stefan Penner"
},
{
"from": "human",
"value": "require 'weeter/plugins/notification/http'\nrequire 'weeter/plugins/notification/resque'\n\nrequire 'active_support/core_ext/string/inflections'\nrequire 'active_support/core_ext/mod... | ruby | chosen |
[
{
"from": "system",
"value": "Set podspec version to 0.5.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'AssistantKit'\n s.version = '0.5'\n s.summary = 'Easy way to detect and work with device environments written in Swift'\n\n s.descrip... | ruby | chosen |
[
{
"from": "system",
"value": "Set empty hash if params[:plugin_config] is null\n\nSigned-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>\n"
},
{
"from": "human",
"value": "class ApiController < ApplicationController\n def tree\n render json: Treeview.tree(para... | ruby | chosen |
[
{
"from": "system",
"value": "Return value as it is if not a date\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def date_format(datetime_string)\n begin\n Date.parse(datetime_string).strftime(\"%d-%m-%Y\")\n rescue ArgumentError\n ''\n end\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add new item link helper\n"
},
{
"from": "human",
"value": "module ApplicationHelper\nend\n"
},
{
"from": "gpt",
"value": "module ApplicationHelper\n def new_item_link\n if @todo_list && !@todo_list.new_record?\n text = \"Todo Item\"\n path... | ruby | chosen |
[
{
"from": "system",
"value": "Add title to user profile image\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n\n def nav_path(link_text, link_path, http_method=nil)\n css_class = \"navigation\"\n css_class << \" current\" if current_page?(link_path)\n content_tag :li, clas... | ruby | chosen |
[
{
"from": "system",
"value": "Fix version number on podspec file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"JSONRequest\"\n s.version = \"0.2,0\"\n s.summary = \"JSONRequest is a tiny Swift library for Synchronous and Asynchronous HTTP JSON reques... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundler 2.0 for Ruby 2.3+\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'queue_classic_plus/version'\n\nGem::Specification.new do |spec|\n spec.na... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec with apsis info\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jekyll/tidy/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Snapz Pro X to 2.6.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'snapz-pro-x' do\n version '2.5.4'\n sha256 'b3b7dfd27222dfc45414cf820d83d14f12f6504af0b8e9009fd4b0a771b8894c'\n\n url \"http://downloads3.ambrosiasw.com/snapzprox/essentials/SnapzProX#{ve... | ruby | chosen |
[
{
"from": "system",
"value": "Support the --version option for the Compile and Uncompile commands"
},
{
"from": "human",
"value": "module Gem\n\n module CompileMethods\n\n def execution_list\n gems_list.map do |gem|\n candidates = Gem.source_index.find_name(gem)\n\n if can... | ruby | chosen |
[
{
"from": "system",
"value": "Add Creative Asset to Campaign\n"
},
{
"from": "human",
"value": "module Sitescoutrest\n module Concerns\n module Creative\n \n def upload_asset(file, content_type, options = {})\n oauth_token = self.oauth_token || options[:oauth_token]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare the phpMyAdmin detector for the upcoming 4.0.0 release\n"
},
{
"from": "human",
"value": "\nmodule Versionator\n module Detector\n # Detects {phpMyAdmin}[http://www.phpmyadmin.net].\n class Phpmyadmin < Base\n set :app_name, \"phpMyAdmin\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make dummy API keys consistent across tests\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe BLS_API::Client do\n describe \"accepts an API key\" do\n let(:api_key) { \"definitely-not-real\" }\n\n it \"via environment variable\" do\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec to cover CheckRegistry changes\n"
},
{
"from": "gpt",
"value": "\nRSpec.describe Rack::ECG::CheckRegistry do\n class MyCheckClass; end\n subject(:check_registry) { described_class }\n\n before do\n check_registry.register(:my_check, MyCheckClass)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Include shared context in apache::mod::jk spec test\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'apache::mod::jk', :type => :class do\n it_behaves_like 'a mod class, without including apache'\n\n context \"with only required facts and no p... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite factory for burndown with metrics\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n sequence(:burndown_name) {|n| \"Burndown ##{n}\" }\n\n factory :burndown do\n name { generate(:burndown_name) }\n pivotal_token \"pi... | ruby | chosen |
[
{
"from": "system",
"value": "Update article model spec to include validations\n"
},
{
"from": "human",
"value": "require 'spec_helper'\r\n\r\ndescribe Article do\r\n it { should have_many :comments }\r\nend"
},
{
"from": "gpt",
"value": "require 'spec_helper'\r\n\r\ndescribe Articl... | ruby | chosen |
[
{
"from": "human",
"value": "Add Spec for Tomcat::Manager Module\n\nAdd an initial spec to test the Tomcat::Manager module.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Tomcat::Manager do\n subject { Tomcat::Manager }\n\n it \"can create a new instance\" do\n subject.s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old pending spec which served as a todo.\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')\n\ndescribe Typhoeus::Hydra do\n let(:base_url) { \"localhost:3001\" }\n let(:options) { {} }\n let(:hydra) { T... | ruby | chosen |
[
{
"from": "system",
"value": "Use a host that does not try to block incoming traffic in this test\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\n# mystically fails on Rubinius on CI. MK.\nif RUBY_ENGINE != \"rbx\"\n describe Bunny::Transport, \".reachable?\" do\n it \"returns ... | ruby | chosen |
[
{
"from": "system",
"value": "Deal with shoulda failure on NOT NULL column\n\nSee https://github.com/thoughtbot/shoulda-matchers/issues/194\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Organisation do\n describe 'relationships' do\n it { should have_many(:sites) }\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for read_time method. PA-2182\n"
},
{
"from": "human",
"value": "require \"read_time_estimator\"\nrequire 'rspec'\n\ndescribe \"ReadTimeEstimator\" do\n describe \"read_time\" do\n it \"should break the string into an array of words\" do\n expect(\... | ruby | chosen |
[
{
"from": "system",
"value": "Use `eq` instead of `be`\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"Microposts\", type: :request do\n describe \"GET /microposts\" do\n pending \"works! (now write some real specs)\" do\n get microposts_path\n expect(... | ruby | chosen |
[
{
"from": "system",
"value": "Handle the `name` type found in the geography_columns view.\n"
},
{
"from": "human",
"value": "\nrequire 'active_record/connection_adapters/postgresql_adapter'\n\nmodule ActiveRecord\n module ConnectionAdapters\n class PostgreSQLColumn\n def simplified_type... | ruby | chosen |
[
{
"from": "system",
"value": "Modify spec because GitRepository requires url when it initialize.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'commit_activity/git_repository'\n\ndescribe CommitActivity::GitRepository do\n subject { CommitActivity::GitRepository.new }\n it ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Courses Spec for Course Ownership\n\nUpdate the Courses controller spec to ensure that the Course being\ncreated actually belongs to the User's Club (thus allowing the user the\ncorrect privileges for editing it).\n"
},
{
"from": "human",
"value": "require 's... | ruby | chosen |
[
{
"from": "system",
"value": "Test for equality with embedded NUL chars\n\nSigned-off-by: Brian Ford <31227094f3baea959abbdb82d34f0bc93c1f3b36@engineyard.com>\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire File.dirname(__FILE__) + '/fixtures/cla... | ruby | chosen |
[
{
"from": "system",
"value": "Fix scheduled_messages_spec for proper response body\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'schedule messages' do\n let(:user_ids) { [1] }\n let(:messages) { build(:messages) }\n\n subject(:schedule_messages) do\n api.schedule_me... | ruby | chosen |
[
{
"from": "human",
"value": "Add performance spec for proxy order syncer\n"
},
{
"from": "gpt",
"value": "require 'open_food_network/proxy_order_syncer'\n\nmodule OpenFoodNetwork\n describe ProxyOrderSyncer, performance: true do\n let(:start) { Time.zone.now.beginning_of_day }\n let!(:sch... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit test for GObjectTypeInit\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\nrequire 'introspection_test_helper'\n\ndescribe GObjectIntrospection::GObjectTypeInit do\n describe 'Lib' do\n it 'represents the gobject-2.0 library' do\n GObj... | ruby | chosen |
[
{
"from": "system",
"value": "Use strings to access cookies instead of symbols\n\nDue to the cookie serialisation changes in Rails 5 cookies now need to\nbe accessed with string keys rather than symbols\n"
},
{
"from": "human",
"value": "Warden::Manager.after_authentication do |user, auth, _opti... | ruby | chosen |
[
{
"from": "system",
"value": "Add activities for creator groups\n"
},
{
"from": "human",
"value": "# @see https://developers.podio.com/doc/stream\nclass Podio::StreamActivityGroup < ActivePodio::Base\n\n property :kind, :string\n property :type, :string\n property :created_on, :datetime\n pr... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.