conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Test that classes pass through\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\nclass ClassTest < Test::Unit::TestCase\n\n @@html = %{<a href=\"http://google.com\" class=\"testing\">Testing</a>}\n\n test \"pass through classes\" do\n assert_equal @@ht... | ruby | chosen |
[
{
"from": "system",
"value": "Update homebrew recipe to fetch 0.3.1 release\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Trousseau < Formula\n homepage 'https://github.com/oleiade/trousseau'\n url 'https://github.com/oleiade/trousseau/releases/download/0.3.0/trousseau_0.3.0_da... | ruby | chosen |
[
{
"from": "system",
"value": "Add if exists to src_sets_to_tsvector_idx creation\n"
},
{
"from": "human",
"value": "class SrcSetsSearchDocumentIndices < ActiveRecord::Migration[5.0]\n def change\n if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL'\n execute 'drop index src_se... | ruby | chosen |
[
{
"from": "system",
"value": "Add show Action to DiscussionBoard Controller\n\nUpdate the DiscussionBoard controller to include the show action.\n"
},
{
"from": "human",
"value": "class DiscussionBoardsController < ApplicationController\n before_filter :authenticate_user!\n before_filter :get_... | ruby | chosen |
[
{
"from": "system",
"value": "Add | Custom notification flow execution description\n"
},
{
"from": "human",
"value": "module Setup\n class NotificationFlowExecution < Setup::Task\n\n agent_field :notification\n\n build_in_data_type\n\n belongs_to :notification, class_name: Setup::Notif... | ruby | chosen |
[
{
"from": "human",
"value": "Add booking template id to line items.\n"
},
{
"from": "gpt",
"value": "class AddBookingTemplateIdToLineItems < ActiveRecord::Migration\n def change\n add_column :line_items, :booking_template_id, :integer\n add_index :line_items, :booking_template_id\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor TubeRackResource to define children_to_stream\n"
},
{
"from": "human",
"value": "require 'lims-api/resources/container'\nrequire 'lims-api/core_resource'\nrequire 'lims-api/struct_stream'\n\nrequire 'lims-laboratory-app/laboratory/tube_rack'\nmodule Lims::L... | ruby | chosen |
[
{
"from": "system",
"value": "Stop using Dir[] in an attempt to get rid of a Github gemspec build error.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'mongo-activerecord-ruby'\n s.version = '0.0.1'\n s.platform = Gem::Platform::RUBY\n s.summary = 'ActiveRecord-... | ruby | chosen |
[
{
"from": "system",
"value": "Add correct homepage link in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/stylesheet_flipper/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jeppe Liisberg\"]\n gem.email ... | ruby | chosen |
[
{
"from": "human",
"value": "Add specifications for the richness of information\n\nSince the implementation of the richness of information detail view\nraised my suspicion about its proper implementation I have started to\nadd tests.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gemspec, is MIT"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"active_utils/version\"\n\nGem::Specification.new do |s|\n s.name = \"active_utils\"\n s.version = Active... | ruby | chosen |
[
{
"from": "system",
"value": "Use joins instead of includes when searching on term and character name\n"
},
{
"from": "human",
"value": "class LineSearch < Search\n def search\n if !@term.empty?\n query = Line.search(@term)\n if @character\n query = query.includes(:character... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Redis extension for Redis 3.x.\n"
},
{
"from": "human",
"value": "if defined?(Redis)\n Redis.class_eval do\n if Redis.methods.include?('call_command') # older versions of redis-rb\n def call_command_with_insight(*argv)\n Rack::Insight::RedisPanel... | ruby | chosen |
[
{
"from": "system",
"value": "Add upper deps version constraints\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/adequate_exposure/version\", __FILE__)\n\nGem::Specification.new do |spec|\n spec.name = \"adequate_exposure\"\n spec.version = AdequateExposure::V... | ruby | chosen |
[
{
"from": "human",
"value": "Use previous spec for the new button vm_retire_now\n"
},
{
"from": "gpt",
"value": "describe ApplicationHelper::Button::VmRetireNow do\n describe '#visible?' do\n context \"when record is retireable\" do\n before do\n @record = FactoryGirl.create(:vm_... | ruby | chosen |
[
{
"from": "system",
"value": "Rework this spec into the GWT style\n\nI'm adding other scenarios with shared contexts.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe 'Landing page for customer nudge bookings', type: :request do\n specify 'Visiting the landing page set... | ruby | chosen |
[
{
"from": "system",
"value": "Support a new bracket type\n"
},
{
"from": "human",
"value": "module Amakanize\n module Filters\n class BracketsNormalizationFilter < BaseFilter\n PAIRS = %w|\n ‹ ›\n ‾ ‾\n - -\n 〜 〜\n « »\n ( )\n [ ]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle internal server error and require nokogiri for background job\n"
},
{
"from": "human",
"value": "class Domain < ActiveRecord::Base\n # Lookup and cache meta information for a domain\n def self.lookup_meta(domain_name)\n # TODO If the last time the meta i... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize @_routes if not defined yet, avoiding more warnings.\n"
},
{
"from": "human",
"value": "module ActionController\n module UrlFor\n extend ActiveSupport::Concern\n\n include AbstractController::UrlFor\n\n def url_options\n options = {}\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add initial file for GPS 2.3\n"
},
{
"from": "gpt",
"value": "# Your Names\n# 1) Jason Milfred\n\n# We spent [#] hours on this challenge.\n\n# Bakery Serving Size portion calculator.\n\ndef serving_size_calc(item_to_make, num_of_ingredients)\n library = {\"cookie\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler requirement from ~> 1.6 to ~> 2.0\n\nUpdates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.\n- [Release notes](https://github.com/bundler/bundler/releases)\n- [Changelog](https://github.com/bundler/bundler/blob/mas... | ruby | chosen |
[
{
"from": "system",
"value": "Add return_to url to the technical feedback\n"
},
{
"from": "human",
"value": "class TechnicalFeedbacksController < ApplicationController\n def new\n session[:return_to] ||= request.referer\n end\n\n def create\n Core::FeedbackWriter.new(new_feedback).call ... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'all' filter to categories\n"
},
{
"from": "human",
"value": "module VotingApp\n class RequestsController < ApplicationController\n\n def index\n if params[:time] && params[:category]\n time = params[:time]\n category = params[:category] ... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake tasks for helper tests, and modify Rails \"rake test\" to include helper tests.\n"
},
{
"from": "gpt",
"value": "desc 'Run all unit, functional, helper and integration tests'\ntask :test do\n errors = %w(test:units test:functionals test:helpers test:integra... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"add support for 2.2/2.4 module loading\"\n\nThis reverts commit b86ff4f597508d5a38c358afcb26c756c009f50f.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: apache2\n# Recipe:: mod_pagespeed\n#\n# Copyright 2013, ZOZI\n#\n# Licensed under the Apache Li... | ruby | chosen |
[
{
"from": "human",
"value": "Create simple one file template for hanami model with sqlite adapter\n"
},
{
"from": "gpt",
"value": "begin\n require \"bundler/inline\"\nrescue LoadError => e\n $stderr.puts \"Bundler version 1.10 or later is required. Please update your Bundler\"\n raise e\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Use admin_sign_in helper on FormatTest.\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\n=begin\n\n What's being tested here?\n\n - Typus::Controller::Format\n\n=end\n\nclass Admin::EntriesControllerTest < ActionController::TestCase\n\n setup do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the gemspec so there are no more warnings during the gem build\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'marso/version'\n\nGem::Specification.... | ruby | chosen |
[
{
"from": "system",
"value": "Disable redirect handling when running Patron specs\n\nPatron's default settings allow it to automatically follow up to 5\nredirects. Since example.com has started issuing a 302 Found response,\npatron's behavior deviates from other backends.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add correct migration to update routes in db\n"
},
{
"from": "human",
"value": "class ChangeAttachmentDirName < ActiveRecord::Migration\n def up\n ActiveRecord::Base.connection.execute(\"UPDATE paperclipdb SET dir_name='/paperclipdb'+dir_name\")\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Delete :nologin: magic comment stuff in InfoController\n\nIt offends RuboCop and we can get rid of it. See https://www.pivotaltracker.com/story/show/165520354\n"
},
{
"from": "human",
"value": "# TODO: move this into a new InfoController\nclass ObserverController\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use mobil-tilbakemelding@nrk.no for author email\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Cachyr\"\n s.version = \"1.0.2\"\n s.summary = \"A thread-safe and type-safe key-value data cache written in Swift.\"\n s.desc... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to be in line with README summary\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Aardvark'\n s.version = '1.0.0'\n s.license = 'Apache'\n s.summary = 'Aardvark is a threadsafe library that makes it dead simple to create... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused default channel config\n"
},
{
"from": "human",
"value": "Rails.application.config.slack_notifier = Slack::Notifier.new ENV[\"SLACK_WEBHOOK_URL\"] do\n defaults channel: ENV.fetch(\"SLACK_DEFAULT_CHANNEL\", \"#general\"),\n username: ENV.fet... | ruby | chosen |
[
{
"from": "system",
"value": "Update configurer specs for new structure\n"
},
{
"from": "human",
"value": "require 'rspec'\nrequire 'yaml'\nrequire 'selenium-webdriver'\nrequire 'jasmine_selenium_runner/configure_jasmine'\n\ndescribe \"Configuring jasmine\" do\n\n class FakeConfig\n attr_acc... | ruby | chosen |
[
{
"from": "human",
"value": "Test for displaying Trap Number\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1381969\n"
},
{
"from": "gpt",
"value": "describe \"miq_policy/_alert_details.html.haml\" do\n before do\n @alert = FactoryGirl.create(:miq_alert)\n exp = {:eval_method => 'nothing'... | ruby | chosen |
[
{
"from": "system",
"value": "SDL: Disable assembly when compiling with Clang\n\nShould have been rolled into the last commit. Troll needs coffee badly.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Sdl < Formula\n url 'http://www.libsdl.org/release/SDL-1.2.14.tar.gz'\n head 'h... | ruby | chosen |
[
{
"from": "system",
"value": "Call 'mdash' if string to display is nil.\n"
},
{
"from": "human",
"value": "module Admin::Resources::DataTypes::StringHelper\n\n def display_string(item, attribute)\n item.send(attribute)\n end\n\n alias_method :display_decimal, :display_string\n alias_metho... | ruby | chosen |
[
{
"from": "system",
"value": "Fix siblings by date when page isn't saved\n"
},
{
"from": "human",
"value": "module PagesCore\n module PageModel\n module DatedPage\n extend ActiveSupport::Concern\n\n included do\n before_validation :set_all_day_dates\n before_validatio... | ruby | chosen |
[
{
"from": "system",
"value": "Add embedded exercises to guides api\n"
},
{
"from": "human",
"value": "class Api::GuidesController < Api::BaseController\n def index\n @guides = Guide.all\n render json: {guides: @guides.as_json(only: [:id, :name, :language_id, :path_id, :github_repository, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flaky edit performance competition spec\n"
},
{
"from": "human",
"value": "describe 'Edit performance competition event' do\n it 'updates event' do\n event = events(:published_public)\n event.update!(name: 'OLD NAME')\n new_event_name = 'NEW EVENT NAME... | ruby | chosen |
[
{
"from": "system",
"value": "Move zookeeper config recipe from role to recipe\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: bcpc_kafka\n# Recipe: zookeeper_server\n#\n\ninclude_recipe 'bcpc_kafka::default'\n\n# For the time being, this will have to be force_override.\nnode.force_overr... | ruby | chosen |
[
{
"from": "human",
"value": "Add plural rules missing in i18n\n"
},
{
"from": "gpt",
"value": "{\n # Dari - this isn't an iso code. Probably should be 'prs' as per ISO 639-3.\n dr: { i18n: { plural: { keys: %i[one other], rule: ->(n) { n == 1 ? :one : :other } } } },\n # Latin America and Car... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo, add file and user ID\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Image do\n it 'will have a key' do\n invite = Invite.create()\n invite.key should exist\n end\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for User model\n"
},
{
"from": "gpt",
"value": "# == Schema Information\n#\n# Table name: users\n#\n# id :integer not null, primary key\n# name :string(255)\n# email :string(255)\n# uid :string(255)\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove CodeClimate (does not work)\n"
},
{
"from": "human",
"value": "require 'codeclimate-test-reporter'\n## Start CodeClimate TestReporter\nCodeClimate::TestReporter.start\n\nrequire 'simplecov'\n## Start Simplecov\nSimpleCov.start 'rails' do\n add_group 'Redmine... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken JS tests by updating PhantomJS SSL options\n\nphantomjs defaults to using SSLv3, which has now been disabled\neverywhere. The protocol used can be changed with an option:\n\n> --ssl-protocol=<val> Sets the SSL protocol\n> (supported protocols: 'SSL... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused MCAS subjects from validation whitelist\n"
},
{
"from": "human",
"value": "class Assessment < ActiveRecord::Base\n has_many :student_assessments, dependent: :destroy\n has_many :students, through: :student_assessments\n validate :has_valid_subject\n... | ruby | chosen |
[
{
"from": "system",
"value": "Destroy all related OfficerAssignments when destroying a Shift\n"
},
{
"from": "human",
"value": "class Poll\n class Shift < ActiveRecord::Base\n belongs_to :booth\n belongs_to :officer\n\n validates :booth_id, presence: true\n validates :officer_id, pr... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Drush to version 7.0.0 (@brummbar)\nFixes and additions to pass `brew audit --strict` (@alanthing)\n\nCloses #1800.\n\nSigned-off-by: Alan Ivey <ee249fd9166eccef852f50ca0cbb6ff8665afe99@gmail.com>\n"
},
{
"from": "human",
"value": "require \"formula\"\n\ncla... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for validity of turn ended event\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe TurnEnded, type: :event do\n pending \"Test expecting dice roll and not\"\n pending \"Test our turn or not\"\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "human",
"value": "Add 'User can sign out' feature spec\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nfeature 'User sign out', %q{\n In order to destroy my session\n As an authenticated user\n I want to be able sign out\n} do\n\n given(:user) { create(:user) }\n\n sce... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration since leader relationship was removed\n"
},
{
"from": "human",
"value": "class AddLeaderToMemberships < ActiveRecord::Migration\n def up\n add_column :memberships, :leader, :boolean, default: false\n\n Membership.reset_column_information\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Format data by deleteing and manipulating array using format_text method\n"
},
{
"from": "human",
"value": "require '../stock_trend'\n\ndescribe StockTrend do\n\n let(:s) { StockTrend.new }\n let(:html) { s.html }\n let(:data) { html.css(s.trend_id) }\n\n descri... | ruby | chosen |
[
{
"from": "system",
"value": "Implement generate_diff method for HunkLine\n"
},
{
"from": "human",
"value": "require_relative 'hunk_base'\n\nmodule GitCrecord\n module Hunks\n class HunkLine < HunkBase\n attr_accessor :selected\n\n def initialize(line)\n @line = line\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Move InvisionUser blueprints into InvisionBridge."
},
{
"from": "gpt",
"value": "require 'machinist/active_record'\nrequire 'sham'\nrequire 'faker'\n\nmodule InvisionBridge\n InvisionUser.blueprint do\n name\n member_group_id { 1 }\n email { Faker::Internet... | ruby | chosen |
[
{
"from": "system",
"value": "[Fix] Set default Reek config to config/*.reek, per Reek docs\n\nSetting to nil would make it use .reek in the project root\n"
},
{
"from": "human",
"value": "module MetricFu\n class MetricReek < Metric\n\n def name\n :reek\n end\n\n def default_run_o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on establish_connection method in the Base class.\n"
},
{
"from": "human",
"value": "module Motel\n module Property\n module MultiTenant\n extend ActiveSupport::Concern\n\n included do\n\n mattr_accessor :motel, instance_writer: false\... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust keeping_errors to work with rails >6.1 new error objects.\n"
},
{
"from": "human",
"value": "# a simple (manual) unsaved? flag and method. at least it automatically reverts after a save!\nmodule ActiveScaffold::UnsavedRecord\n # acts like a dirty? flag, manu... | ruby | chosen |
[
{
"from": "system",
"value": "Sort person activities in descending order"
},
{
"from": "human",
"value": "module GobiertoPeople\n class PeopleController < GobiertoPeople::ApplicationController\n include PoliticalGroupsHelper\n\n def index\n @people = current_site.people.active.sorted... | ruby | chosen |
[
{
"from": "system",
"value": "Remove code related to need_ids\n\nThis field has now been replaced with the `meets_user_needs` link\ntype.\n"
},
{
"from": "human",
"value": "\nmodule GdsApi\n module TestHelpers\n module ContentItemHelpers\n def content_item_for_base_path(base_path)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade VisIt to version 2.10.1\n"
},
{
"from": "human",
"value": "cask 'visit' do\n version '2.10.0'\n sha256 'afc83987a37ab1e330b81f21e123de1f98809057717f25c305331440a940e985'\n\n # nersc.gov is the official download host per the vendor homepage\n url \"https:... | ruby | chosen |
[
{
"from": "system",
"value": "Add name, license, vendor and zap for XMind.app\n"
},
{
"from": "human",
"value": "cask :v1 => 'xmind' do\n version '3.5.1'\n sha256 '9b57dcfd1a2c0a80ff9faf296560594cd25e65e50916c0dbb96b165ecc690801'\n\n url \"http://dl3.xmind.net/xmind-macosx-#{version}.20141120... | ruby | chosen |
[
{
"from": "system",
"value": "Add vote links to /api/parliament-issues/:id\n"
},
{
"from": "human",
"value": "module Api\n class ParliamentIssueRepresenter < BaseRepresenter\n property :last_update\n property :summary\n property :description\n property :status_name\n\n link :self... | ruby | chosen |
[
{
"from": "system",
"value": "Update Java version in spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'devenv' do\n describe command('which java') do\n its(:stdout) { should eq(\"/usr/bin/java\\n\") }\n end\n\n describe command('java -version') do\n its(:stderr)... | ruby | chosen |
[
{
"from": "system",
"value": "Document project license in gemspec"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('lib', File.dirname(__FILE__))\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'xpath/version'\n\nGem::Specification.new do |s|\n s.name = \"xp... | ruby | chosen |
[
{
"from": "system",
"value": "Update Formula for new version\n"
},
{
"from": "human",
"value": "class Alb2psql < Formula\n desc \"Tool to fetch ALB request logs, and load into a local PostgreSQL instance\"\n homepage \"https://github.com/nrmitchi/alb2psql\"\n url \"https://github.com/nrmitchi... | ruby | chosen |
[
{
"from": "system",
"value": "Comment failing test to see how travis works\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'symbol_count_graph'\n\nRSpec.describe SymbolCountGraph do\n\n describe '#render' do\n it 'outputs x when x: 1' do\n graph = SymbolCountGraph.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependent babel-source version to allow 5.x\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/babel/transpiler/version.rb\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'babel-transpiler'\n s.version = Babel::Transpiler::VERS... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error of terminal format with empty outdated gems\n\n`convert': undefined method `chomp' for nil:NilClass (NoMethodError)\n"
},
{
"from": "human",
"value": "require 'tty-table'\nrequire 'bundle_outdated_formatter/formatter'\n\nmodule BundleOutdatedFormatter\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Remove timestamps from material_tags migration\n"
},
{
"from": "human",
"value": "class CreateMaterialTags < ActiveRecord::Migration[5.0]\n def change\n create_table :material_tags do |t|\n t.string :name, null: false\n t.string :display_name, null: fa... | ruby | chosen |
[
{
"from": "system",
"value": "Use env variable for webhook.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'sinatra'\nrequire 'json'\nrequire 'uri'\nrequire 'net/http'\nrequire 'dicebag'\n\n\npost '/' do\n\n puts request.POST.inspect\n\n username = request.POST[\"user_name\"]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a timestamp error in the tests\n\nThis fixes an intermittent error in the tests where Time.zone.now can\nreturn a different time if the test is run near the end of a minute:\n\n```\n 1) StepByStepPagePresenter#summary_list shows who made the most recent change\n Failur... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage URL, add licence to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"dynflow/version\"\n\nGem::Specification.new do |s|\n s.name = \"dynflow\"\n s.version = Dynf... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Use mongo to sort messages instead of ruby\"\n\nThis reverts commit b47c0e4469c124258b8a3f3fb5bd9850f6e23950.\n"
},
{
"from": "human",
"value": "class Chat::Rooms::MessagesController < ApplicationController\n \n include ActionView::Helpers::AssetTagHelper... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to help clean up stupid track names in iTunes\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\n################################################################################\nrequire('rubygems')\nrequire('appscript')\nrequire('ostruct')\nrequire('... | ruby | chosen |
[
{
"from": "system",
"value": "Correct url path for page object\n\nThe path must be correct for the page_object to accurately\nrespond to `displayed?` in tests.\n\ne.g.\n```\nexpect(@page_object).to be_displayed\n```\n"
},
{
"from": "human",
"value": "class FeeSchemeSelectorPage < BasePage\n set... | ruby | chosen |
[
{
"from": "system",
"value": "Add FastEasyMapping as sub-pod, new tag 0.0.6\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"BBBAPI\"\n s.version = \"0.0.5\"\n s.summary = \"iOS / OSX Objective-C library for communicating with the Blinkbox Books API\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove code that is no longer necessary\n\n1c52c88 takes cares of this so we don't have to do this any more.\n"
},
{
"from": "human",
"value": "module DidYouMean\n class MethodNameChecker\n include SpellCheckable\n attr_reader :method_name, :receiver\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Set minimal ruby version to 2.3\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire File.expand_path('../lib/dry/configurable/version', __FILE__)\n\nGem::Specification.new do |spec|\n spec.name = 'dry-configurable'\n spec.version = Dry::Conf... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug: forgot to include module with env var json helper\n"
},
{
"from": "human",
"value": "require \"rails/generators\"\n\nmodule Suspenders\n class ErrorReportingGenerator < Rails::Generators::Base\n source_root File.expand_path(\n File.join(\"..\", \".... | ruby | chosen |
[
{
"from": "system",
"value": "Return label for toc links.\n"
},
{
"from": "human",
"value": "module Metacrunch\n module UBPB\n module Transformations\n module MAB2SNR\n class TocLink < Metacrunch::Transformer::Step\n\n def perform\n target.add(\"link\", \"toc\... | ruby | chosen |
[
{
"from": "system",
"value": "Add flat_map spec for enumerables that yield multiple values\n"
},
{
"from": "human",
"value": "describe :enumerable_collect_concat, :shared => true do\n it \"returns a new array with the results of passing each element to block, flattened one level\" do\n numer... | ruby | chosen |
[
{
"from": "system",
"value": "Convert LoadError extension modules to class reopens\n"
},
{
"from": "human",
"value": "class MissingSourceFile < LoadError #:nodoc:\n attr_reader :path\n def initialize(message, path)\n super(message)\n @path = path\n end\n\n def is_missing?(path)\n pa... | ruby | chosen |
[
{
"from": "system",
"value": "Extend timeout for testing command output.\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nBefore do\n @aruba_timeout_seconds = 10\n @real_home = ENV['HOME']\n fake_home = File.join('/tmp', 'fakehome')\n FileUtils.rm_rf fake_home if File.exists? fake_h... | ruby | chosen |
[
{
"from": "human",
"value": "Add Cluster class and APIs\n"
},
{
"from": "gpt",
"value": "require \"Storm/Base/model\"\nrequire \"Storm/Base/sodserver\"\n\nmodule Storm\n module Storage\n class Zone < Storm::Base::Model\n attr_accessor :name\n\n def from_hash(h)\n super\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add alghoritm for Graph Topological Sort\n\nAdd alghoritm for Graph Topological Sort\n"
},
{
"from": "gpt",
"value": "module ManagerRefresh\n class Graph\n class TopologicalSort\n attr_reader :graph\n\n def initialize(graph)\n @graph = graph\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create Concern with Participant Associations\n\n* Create a concern that has the social specific\n associations for the Participant class..\n\n[Finishes: #90191388]\n"
},
{
"from": "gpt",
"value": "module SocialNetworking\n module Concerns\n # adds associations t... | ruby | chosen |
[
{
"from": "system",
"value": "Add options parameter to Card.search\n"
},
{
"from": "human",
"value": "module HearthstoneApi\n class Cards < BaseModel\n def self.all(options = {})\n get \"/cards\", options\n end\n\n def self.single(name_or_id, options = {})\n get \"/cards/#{na... | ruby | chosen |
[
{
"from": "system",
"value": "Check cookie value as well as query\n"
},
{
"from": "human",
"value": "module I18nViz\n module ViewHelpers\n\n def translate(key, options = {}) # TODO: alias\n if display_i18n_viz? && options[:i18n_viz] != false\n # TODO: ActionController::Base.perfo... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for incorrectly added hostname in Icinga check title\n\nAdds a check for the presence of the hostname in Incinga checks that run\non the `monitoring` machine class. These cannot be included as otherwise\nPuppet will attempt to install multiple versions of the check on ... | ruby | chosen |
[
{
"from": "system",
"value": "Move the constants outside the block to fix rubocop violations\n"
},
{
"from": "human",
"value": "PuppetLint.new_check(:no_symbolic_file_modes) do\n NO_SYMBOLIC_FILE_MODES_IGNORE_TYPES = Set[:VARIABLE, :UNDEF].freeze\n WARNING = 'mode should be a 4 digit octal val... | ruby | chosen |
[
{
"from": "system",
"value": "Implement for STAR data transformer as well\n"
},
{
"from": "human",
"value": "module StarCsvTransformer\n require 'csv'\n\n def transform(file)\n CSV.parse(file, headers: true, header_converters: lambda { |h| convert_headers(h) })\n end\n\n def convert_heade... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing route for supervisions list page\n"
},
{
"from": "human",
"value": "Peergroupsupervision::Application.routes.draw do\n resources :rules\n\n resources :chat_rooms do\n\n member do\n post :select_leader\n post :select_problem_owner\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up creating a game\n"
},
{
"from": "human",
"value": "class GamesController < ApplicationController\n # index, show, new, create, edit, update, destroy\n\n def index\n end\n\n def show\n @game = Game.includes(:players).find(params[:id])\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Edit callback for Spotify login\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\nroot 'sound_treks#index'\n\nget 'session/index'\n\nresources :locations do\n resources :sound_treks, except: [:new]\nend\n\nresources :sound_treks, only: [:show]\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Make preview route more important than permalink\n"
},
{
"from": "human",
"value": "ActionController::Routing::Routes.draw do |map|\n map.page_permalink 'pages/:id.:format', :controller => 'pages', :action => 'show'\n map.preview_pages 'pages/preview.:format', :co... | ruby | chosen |
[
{
"from": "system",
"value": "Add a route via which to reach the custom 404 page.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root to: 'welcome#index'\n\n resources :users, only: [:show]\n\n get '/login', :to => 'sessions#new', :as => :login\n get '/logout', :to... | ruby | chosen |
[
{
"from": "system",
"value": "Create public directory if necessary.\n"
},
{
"from": "human",
"value": "create_public_link = \"ln -sfT \\\"#{MaglevDatabaseExplorer.full_gem_path}/public\\\" \\\"#{Dir.getwd}/public/maglev-database-explorer\\\"\"\n\nputs \"Creating symlink: #{create_public_link}\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Improve performance swapping keys.each for each_key, plus line lenght comply\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe InstallationController, type: :request do\n\n describe \"consul.json\" do\n let(:test_feature_settings) do\n {... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.