conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add cc.rb trigger for local part of repository\n\ngit-svn-id: 96bd6241e080dd4199045f7177cf3384e2eaed71@1436 2d86388d-c40f-0410-ad6a-a69da6a65d20\n"
},
{
"from": "human",
"value": "Project.configure do |project|\n project.email_notifier.emails = ['scott@butlerpress.... | ruby | chosen |
[
{
"from": "system",
"value": "Add refactoring in the controller generator\n\nCall `respond_to?(:before_action)` to `ActionController::Base` instead of\ncall it to `ApplicationController` avoiding ask to ApplicationController\nif it is defined.\n\nKudos to @lucasmazza\n"
},
{
"from": "human",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Fix has_and_belongs_to_many scope primary key\n"
},
{
"from": "human",
"value": "module Surus\n module JSON\n class HasAndBelongsToManyScopeBuilder < AssociationScopeBuilder\n def scope\n s = association\n .klass\n .joins(\"JOIN #{j... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for a simplifiable CI/CD entry aspect\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gitlab::Ci::Config::Entry::Simplifiable do\n describe '.strategy' do\n let(:entry) do\n Class.new(described_class) do\n strategy :Someth... | ruby | chosen |
[
{
"from": "human",
"value": "Create first story for ExampleComponent\n\n - Once story has been created, still need to generate the story itself (in json file format). Help with command: `rake view_component_storybook:write_stories_json`\n"
},
{
"from": "gpt",
"value": "class ExampleComponentStor... | ruby | chosen |
[
{
"from": "system",
"value": "Fix selector in line comment reply tests\n\nGitHub changed the HTML IDs of the text areas for line comment replies.\n"
},
{
"from": "human",
"value": "RSpec.shared_examples 'a page with line comment replies' do\n context 'when clicking on the reply icon of a line c... | ruby | chosen |
[
{
"from": "system",
"value": "Update tabs for Radiant 0.9\n"
},
{
"from": "human",
"value": "class PollsExtension < Radiant::Extension\n version '0.3.1'\n description 'Radiant gets polls.'\n url 'http://github.com/nuex/radiant-polls-extension'\n\n def activate\n require_dependency 'applic... | ruby | chosen |
[
{
"from": "system",
"value": "Add view encoding settings. Set utf-8 encoding as default\n"
},
{
"from": "human",
"value": "require \"tilt\"\n\nclass Cuba\n module Rendering\n def self.setup(app)\n app.plugin Cuba::Settings\n app.set :template_engine, \"erb\"\n app.set :views, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo and grammar nit"
},
{
"from": "human",
"value": "require \"did_you_mean/spell_checker\"\n\nmodule DidYouMean\n class MethodNameChecker\n attr_reader :method_name, :receiver\n\n NAMES_TO_EXCLUDE = { NilClass => nil.methods }\n NAMES_TO_EXCLUDE.de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix executed query naming for pluck_from_sql.\n"
},
{
"from": "human",
"value": "module RelationToStruct::ActiveRecordBaseExtension\n extend ::ActiveSupport::Concern\n\n module ClassMethods\n def structs_from_sql(struct_class, sql, binds=[])\n result = con... | ruby | chosen |
[
{
"from": "system",
"value": "Fix check for installed packages\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module Ventriloquist\n module Cap\n module Debian\n module InstallPackages\n def self.install_packages(machine, packages)\n machine.commun... | ruby | chosen |
[
{
"from": "human",
"value": "Delete unused mainstream browse pages\n\nTwo childcare mainstream browse pages were created,\nbut then the content was updated and they're no longer needed.\nThey were never published, and never should be,\nbut need deleting to tidy things up.\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize Query with an empty set of params, and merge the default ones in before executing; add a reset() method which resets the parameters\n"
},
{
"from": "human",
"value": "module ContentfulModel\n class Query\n attr_accessor :parameters\n def initialize... | ruby | chosen |
[
{
"from": "system",
"value": "Add two Polygon geometries to create new MultiPolygon\n"
},
{
"from": "human",
"value": "module GeoScript\n module Geom\n JTSPolygon = com.vividsolutions.jts.geom.Polygon\n\n class Polygon < JTSPolygon\n include GeoScript::Geom\n\n attr_accessor :bo... | ruby | chosen |
[
{
"from": "system",
"value": "Change to preserve uri query params\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'uri'\nrequire 'net/http'\n\nmodule TTY\n module File\n DownloadError = Class.new(StandardError)\n\n class DownloadFile\n attr_reader :uri, :dest_path, :l... | ruby | chosen |
[
{
"from": "system",
"value": "Split PAIRS_FILE into PAIRS_FILE_NAME and PAIRS_FILE_PATH\n"
},
{
"from": "human",
"value": "require 'simple-git-pair/version'\n\nmodule SimpleGitPair\n module Helper\n class << self\n PAIRS_FILE = File.expand_path('~/.git_pairs')\n\n def show_help\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"as_transit\" instead of \"to_transit\"\n\nMatches signature of other serialized formats, e.g. as_json/as_xml\nreturn hashes.\n\nFixes #3\n"
},
{
"from": "human",
"value": "require 'transit'\nrequire 'transit/writer'\nrequire 'transit/rails/handlers'\n\nmodule ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a sessions mistake with guest mode.\n"
},
{
"from": "human",
"value": "module SessionsHelper\n def log_in(user)\n session[:logged_in] = true\n session[:current_user_id] = user.id\n end\n\n def log_in_guest\n session[:logged_in] = true\n session[:g... | ruby | chosen |
[
{
"from": "system",
"value": "Sort by stars and include readmes"
},
{
"from": "human",
"value": "class Admin::GithubRepositoriesController < Admin::ApplicationController\n def show\n @github_repository = GithubRepository.find(params[:id])\n end\n\n def update\n @github_repository = Gith... | ruby | chosen |
[
{
"from": "system",
"value": "Update subscription message to tell users how to unsubscribe\n\nUpdate subscribe message to reflect new functionality\n\nUpdate subscription message\n"
},
{
"from": "human",
"value": "class TwilioMessage\n def self.send(number, joke)\n client.messages.create(\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for map decorator methods\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\n#\n# == MapDecorator test\n#\nclass MapDecoratorTest < Draper::TestCase\n include Draper::LazyHelpers\n\n setup :initialize_test\n\n test 'should have correct AA title fo... | ruby | chosen |
[
{
"from": "system",
"value": "Update the description and replace array with has"
},
{
"from": "human",
"value": "# Write a method that takes a string and returns an array\n# whose keys are all the downcased words in the string,\n# and values are the number of times these words were seen.\n#\n# N... | ruby | chosen |
[
{
"from": "system",
"value": "Use required_rubygems_version to indicate dependency, rubygems_version indicates what the gem was built with.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\nrequire 'e... | ruby | chosen |
[
{
"from": "system",
"value": "Update to Stock Ticker - add page to Heroku site\n"
},
{
"from": "human",
"value": "#server.rb\nrequire 'sinatra'\n\nget '/' do\n File.open(\"public/hello.txt\").read\nend\n\n\nget '/wyncode' do\n \"Hello World\"\nend\n\nget '/hello' do\n\t\"Hello Bella and Mateo!... | ruby | chosen |
[
{
"from": "system",
"value": "Add a course to fully smoke test the monthly report.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe AnalyticsController do\n before do\n allow(controller).to receive(:current_user).and_return(nil)\n create(:cohort, id: 1, slug: 'first_c... | ruby | chosen |
[
{
"from": "system",
"value": "[promo] Fix boolean type SQL migration\n"
},
{
"from": "human",
"value": "class MigrateAdjustments < ActiveRecord::Migration\n def up\n execute \"UPDATE spree_adjustments SET amount = 0.0 WHERE amount IS NULL\"\n execute \"UPDATE spree_adjustments SET mandato... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.14 to 0.1.15\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-messaging'\n s.summary = 'Messaging primitives for EventStore using the EventStore Client HTTP li... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded RSpec config block\n\nSpec files individually include the module and we specify the type of\nspec in each RSpec's describe so none of this settings are needed. They\nare just Spree's legacy I bet.\n"
},
{
"from": "human",
"value": "module Authenticat... | ruby | chosen |
[
{
"from": "system",
"value": "Split process.times spec into spec of what class is returned, and spec the behavior\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\n\ndescribe \"Process.times\" do\n it \"returns current cpu times\" do\n\n t = Process::t... | ruby | chosen |
[
{
"from": "system",
"value": "Include carriage returns in output"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"midilib\"\nrequire \"ostruct\"\nrequire \"json\"\nrequire \"debugger\"\n\nclass LyricSyllable < OpenStruct\n def as_json\n {\n \"start\" => self.start,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add more dependencies for mongo install\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: appsindo\n# Recipe:: default\n# Description::\n#\n# Install default toolset that usually needed on Server\n# - Install APT\n# - Install Build Essentia... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests broken by deprecations in faker 1.1.0.\n"
},
{
"from": "human",
"value": "require 'faker'\n\nGiven(/^the requirements for registration have been fulfilled$/) do\n @organisation.members.make!(3, :director)\n @organisation.members.make!(:secretary)\n\n @o... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure mod_php is disabled when we're using FPM\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: php\n# Recipe:: apache\n#\n# Copyright:: 2020, OpenStreetMap Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use t... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Enter keyword through the terminal\"\n\nThis reverts commit 278776a9f21e84894d790f9122cc08cd409dfc62.\n\nConflicts:\ntrends.rb\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'csv'\n\n######### Define arguments #########\n\nINPUT = \"data/JSON/cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec to check for different types of submission results\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Submission do\n it { should validate_presence_of(:event) }\n it { should validate_presence_of(:proposal) }\n it { should valida... | ruby | chosen |
[
{
"from": "system",
"value": "Use env var for setup [skip ci]\n"
},
{
"from": "human",
"value": "require \"bundler/setup\"\nBundler.require(:default)\nrequire \"active_record\"\nrequire \"benchmark/ips\"\n\nActiveRecord::Base.default_timezone = :utc\nActiveRecord::Base.time_zone_aware_attributes... | ruby | chosen |
[
{
"from": "system",
"value": "Correct name of test variable\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe TicTacToe::Human do\n describe 'when validating input' do\n let(:shell) { mock_shell }\n let(:console_shell) { TicTacToe::Human.new(shell) }\n\n def mock_she... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary columns from Order\n"
},
{
"from": "human",
"value": "class CreateComableOrders < ActiveRecord::Migration\n def change\n create_table :comable_orders do |t|\n t.references :user\n t.string :guest_token\n t.string :code\n t.... | ruby | chosen |
[
{
"from": "human",
"value": "Create DB migration to add closed status to Ideas\n"
},
{
"from": "gpt",
"value": "class AddClosedStatusToIdeas < ActiveRecord::Migration\n def self.up\n add_column :ideas, :closed, :boolean, :default => false, :null => false\n end\n\n def self.down\n remove... | ruby | chosen |
[
{
"from": "system",
"value": "Change start of week to Sunday"
},
{
"from": "human",
"value": "module CalendarHelper\n def each_day_of_week(time = Time.zone.today)\n first = time.beginning_of_week\n 7.times.each do |offset|\n yield(first + offset.day)\n end\n end\n\n def today?(d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix logic in message helper method to handle no messages\n"
},
{
"from": "human",
"value": "module SessionsHelper\n def current_user\n @current_user ||= User.find(session[:user_id]) if session[:user_id]\n end\n\n def unread_message\n @conversations = Conver... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing development dependency on rake for running tests.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ar_transaction_changes/version'\... | ruby | chosen |
[
{
"from": "system",
"value": "Swap the subject() and let() methods around\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Section do\n let(:course) { double(\"Course\", :id => 1) }\n\n subject(:section) { Section.new(\n :title => \"test section\",\n :title_url => \"... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement from ~> 1.2.0 to ~> 1.3.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/rub... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug creating new custom field\n"
},
{
"from": "human",
"value": "class Administration::CustomFieldsController < ApplicationController\n before_filter :only_admins\n\n def index\n @fields = CustomField.order(:name)\n end\n\n def new\n @field = CustomFie... | ruby | chosen |
[
{
"from": "system",
"value": "Add fields to generated project\n"
},
{
"from": "human",
"value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :project do\n name { FFaker::Product.product_name }\n association :submitter, factory: :... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure that bundle install --force doesn't leave any old code on gem reinstall\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"bundle install\" do\n describe \"with --force\" do\n before :each do\n gemfile <<-G\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add passing spec for answer\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Answer do\n\n before(:each) do\n @answer = Answer.new\n @answer.content = \"Help for you\"\n end\n\n context \"with valid attributes\" do\n it \"should be save-... | ruby | chosen |
[
{
"from": "system",
"value": "Test invite always having 16 character key upon instantiation\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Invite do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'spec_h... | ruby | chosen |
[
{
"from": "system",
"value": "Use reload instead of deprecated reloads in spec\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + \"/../spec_helper\")\n\ndescribe \"reloads\" do\n it \"should reload the page with http referer\" do\n webrat_session.should_rec... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to support both iOS and OSX\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Mixpanel-OSX-Community'\n s.version = '2.0.0'\n s.license = 'Apache License'\n s.summary = 'OS X tracking library for Mixpan... | ruby | chosen |
[
{
"from": "system",
"value": "Add fallback OAuth ID and secret\n\nThis commit adds a fallback OAuth ID and secret. This will allow the signon-munging script for development to configure signon for this app locally."
},
{
"from": "human",
"value": "GDS::SSO.config do |config|\n config.user_model... | ruby | chosen |
[
{
"from": "system",
"value": "Use external signon URL for OAuth exchange\n\nI noticed that visiting the draft-assets host was resulting in a\nredirect to the internal signon URL (e.g.\nhttps://signon.integration.govuk-internal.digital). It should be\nredirecting to the external URL (e.g.\nhttps://signon.int... | ruby | chosen |
[
{
"from": "human",
"value": "Add Ricoh Aficio SP C240DN driver\n\nVersion 2.022.02\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'ricoh-driver-aficio-sp-c240dn' do\n version '2.022.02'\n sha256 'ee97bb2775f62b69785996b475ed2b599872d618c4630f543a2603ef75f73c04'\n\n url 'http://support.ricoh.com... | ruby | chosen |
[
{
"from": "system",
"value": "Add unit test to ensure that session management options are inherited and overridable in subclasses\n\n\ngit-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@1888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) ... | ruby | chosen |
[
{
"from": "system",
"value": "Make OAuth ID unique in dev\n"
},
{
"from": "human",
"value": "GDS::SSO.config do |config|\n config.user_model = \"User\"\n config.oauth_id = 'abcdefghjasndjkasnd'\n config.oauth_secret = 'secret'\n config.oauth_root_url = Plek.current.find(\"authenticatio... | ruby | chosen |
[
{
"from": "system",
"value": "Add handling of name search across cities\n\nCloses #356\n"
},
{
"from": "human",
"value": "class PeopleIdentifier\n attr_accessor :params, :people\n\n def initialize(params)\n @params = params\n end\n\n def people\n @people ||= if params[:email]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for sessions cached in memory\n\nThis change adds a test to check that if Redis loses session data\nTomcat can continue with its locally cached copy.\n\n[#64606272]"
},
{
"from": "human",
"value": "# Copyright 2014 the original author or authors.\n#\n# Lice... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing argument in on_263()\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# This file is part of the K5 bot project.\n# See files README.md and COPYING for copyright and licensing information.\n\n# IRCFirstListener is the first listener that is called a... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Bundler 2.x for development\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'lib/ddplugin/version'\n\nGem::Specification.new do |s|\n s.name = 'ddplugin'\n s.version = DDPlugin::VERSION\n s.homepage = 'http... | ruby | chosen |
[
{
"from": "system",
"value": "EDSC-476: Fix intermittent spec failure caused by unrealistic timing\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Single Granule Data Access', reset: false do\n downloadable_dataset_id = 'C183451156-GSFCS4PA'\n\n context 'when the user is ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Universal Media Server to v4.2.0\n"
},
{
"from": "human",
"value": "class UniversalMediaServer < Cask\n version '4.1.1'\n sha256 'e7e21dd12cb3884f1cdc2398f6645a583cdb893761da0172dd90b5d2e1656bc9'\n\n url \"http://downloads.sourceforge.net/sourceforge/unim... | ruby | chosen |
[
{
"from": "system",
"value": "Sort assigned cards by assigned date when exporting to csv.\n"
},
{
"from": "human",
"value": "class Administration::CheckinCardsController < ApplicationController\n\n before_filter :only_admins\n \n VALID_SORT_COLS = ['last_name,name', 'barcode_id', 'barcode_ass... | ruby | chosen |
[
{
"from": "system",
"value": "Check if product exists in redbox before migrating.\n"
},
{
"from": "human",
"value": "Spree::Api::ProductsController.class_eval do\n def update_redbox\n redbox_product = Redbox::Product.find(params[:id])\n migrator = Redbox::Migrate::Product.new\n @produc... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"system\" user for syncing SSO data"
},
{
"from": "human",
"value": "class UserSyncWorker\n include Sidekiq::Worker\n\n def perform(user_id)\n user = User.find(user_id)\n client = DiscourseApi::Client.new(ENV['DISCOURSE_API_URL'])\n client.api_key = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add worker kill priority to the AgentCoordinatorWorker\n\nThis is needed in order to seed the MiqWorkerType model\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Amazon::AgentCoordinatorWorker < MiqWorker\n require_nested :Runner\n\n include PerEmsWo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sysvinit else clauses in NFS for Arch Linux\n\nCurrently the code tries to detect if Arch uses systemd via checking\ncomm= of PID 1. As access to proc filesystem might be restricted due to\nhideproc set and systemd is default for all Arch Linux installations\nsince Octob... | ruby | chosen |
[
{
"from": "system",
"value": "Allow migration to run after removal of Issue\n"
},
{
"from": "human",
"value": "class ConstrainIssuePriorities < ActiveRecord::Migration\n def change\n Issue.where('priority < 1').update_all('priority = 1')\n Issue.where('priority IS NULL').update_all('prior... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra checks for ci_id migration\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# See http://doc.gitlab.com/ce/development/migration_style_guide.html\... | ruby | chosen |
[
{
"from": "human",
"value": "Add sample seed file for seeding external redirects.\n\nThe actual redirects will live in alphagov-deployment\n"
},
{
"from": "gpt",
"value": "######################################\n#\n# This file is run on every deploy.\n# Ensure any changes account for this.\n# XX... | ruby | chosen |
[
{
"from": "system",
"value": "Allow connections to be used more than once\n"
},
{
"from": "human",
"value": "require \"net/http\"\nrequire \"net/https\"\n\nmodule Net\n class HTTP\n private\n def connect\n D \"opening connection to #{conn_address()}...\"\n s = timeout(@ope... | ruby | chosen |
[
{
"from": "system",
"value": "Return 404 if a category is not found\n"
},
{
"from": "human",
"value": "class CategoriesController < ApplicationController\n decorates_assigned :category, with: CategoryDecorator\n\n include Navigation\n\n def show\n @category = Core::CategoryReader.new(param... | ruby | chosen |
[
{
"from": "system",
"value": "Add create method to listitem controller.\n"
},
{
"from": "human",
"value": "class ListItemsController < ApplicationController\n\n def show\n listItem = ListItem.find(params[:id]).to_json\n render json: listItem\n end\n\n def update\n @list_item = ListIt... | ruby | chosen |
[
{
"from": "human",
"value": "Add a working code example file for EM_Session\n"
},
{
"from": "gpt",
"value": "# Given that fake_pos_terminal is running on the local system and\n# listening on port 3010, this example will display a message\n# with buttons on the terminal, and after a button is sel... | ruby | chosen |
[
{
"from": "system",
"value": "Update app server control tasks to use Monit\n"
},
{
"from": "human",
"value": "set :application, \"3accounts\"\nset :repository, \"http://accounts4free.rubyforge.org/svn/3accounts/trunk\"\n\n# If you aren't deploying to /u/apps/#{application} on the target\n# serv... | ruby | chosen |
[
{
"from": "system",
"value": "Rename post route for creating user posts\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resources :requests\n \n get '/login', :to => 'sessions#new', :as => :login\n get '/logout', :to => 'sessions#destroy', :as => :logout\n get \"/a... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Mount sidekiq on subdomain\"\n\nThis reverts commit cb34b0a74be80d90fc22bd08556024818c53427f.\n"
},
{
"from": "human",
"value": "require 'sidekiq/web'\n\nRails.application.routes.draw do\n constraints subdomain: 'sidekiq' do\n mount Sidekiq::Web, at: '/... | ruby | chosen |
[
{
"from": "system",
"value": "Add route aliases for users and packages, ie u & p"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n resources :subscriptions\n resources :feeds\n resources :settings\n resources :blurbs\n resources :references\n resources :discourse_news_i... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure app load does not fail for lack of Domain table\n\nRake needs to successfully load the app before it will migrate the\ndatabase. Whether or not this is the correct behavior is up for\ndebate, but in the mean time we will leave off serving multidomains\nin the rack co... | ruby | chosen |
[
{
"from": "human",
"value": "Return array starting at 1 and ending with number it was initialized with\n"
},
{
"from": "gpt",
"value": "class OddEven\n def initialize (user_number)\n @user_number = user_number\n\nend\n\n def makearray\n numbers = 1.upto(@user_number).to_a\n\n\nend\nend"
... | ruby | chosen |
[
{
"from": "system",
"value": "Annotate ambiguous sections with their IDs.\n\nThis problem should go away as we migrate the section data in future\nand, for instance, have a single 'Children' section.\n"
},
{
"from": "human",
"value": "module SectionsHelper\n\n def all_sections\n section_tags... | ruby | chosen |
[
{
"from": "system",
"value": "Use == instead of =~ for speed.\n"
},
{
"from": "human",
"value": "module Jekyll\n module Converters\n class CoffeeScript < Converter\n safe true\n priority :low\n\n def matches(ext)\n !!(ext =~ /^\\.coffee$/i)\n end\n\n def outpu... | ruby | chosen |
[
{
"from": "system",
"value": "Update mailer method to mention problematic service\n"
},
{
"from": "human",
"value": "class NotifierMailer < ActionMailer::Base\n def send_mail(response_code)\n mail to: CONFIG.fetch(:notification_email),\n subject: 'Service Change Notifier has failed',... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Typo: Sche.do -> Sched.do\n"
},
{
"from": "human",
"value": "class PrivateMessager\n include Rails.application.routes.url_helpers\n MESSAGES_ENDPOINT = \"https://www.yammer.com/api/v1/messages.json\"\n\n def initialize(invitation)\n @template = 'invitation... | ruby | chosen |
[
{
"from": "human",
"value": "Add support for OWASP Dependency Check\n"
},
{
"from": "gpt",
"value": "require 'pipeline/tasks/base_task'\nrequire 'pipeline/util'\nrequire 'rexml/document'\nrequire 'rexml/streamlistener'\ninclude REXML\n\n# SAX Like Parser for OWASP DEP CHECK XML.\nclass Pipeline:... | ruby | chosen |
[
{
"from": "system",
"value": "IP-469: Set statement timeout, not connection timeout, for DB\n"
},
{
"from": "human",
"value": "module RooOnRails\n module Railties\n class Database < Rails::Railtie\n initializer 'roo_on_rails.database', after: 'active_record.initialize_database' do |_app... | ruby | chosen |
[
{
"from": "system",
"value": "Use OpenSSL::Digest instead of deprecated OpenSSL::Digest::Digest"
},
{
"from": "human",
"value": "module Braintree\n module Digest # :nodoc:\n def self.hexdigest(private_key, string)\n _hmac_sha1(private_key, string)\n end\n\n def self.secure_compare... | ruby | chosen |
[
{
"from": "system",
"value": "Add a helper to reference files relative to pwd\n"
},
{
"from": "human",
"value": "module Builderator\n module Util\n class << self\n def to_array(arg)\n arg.is_a?(Array) ? arg : [arg]\n end\n\n def from_tags(aws_tags)\n {}.tap { |tt... | ruby | chosen |
[
{
"from": "system",
"value": "Improve performance by dropping unused initial hash\n"
},
{
"from": "human",
"value": "require 'ethos/type'\n\nmodule Ethos\n class Attributes\n def schema\n @_schema\n end\n\n def initial\n @_initial ||= {}\n end\n\n def current\n @_c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix shadowing local variable warnings\n\nwarning: shadowing outer local variable - name\n"
},
{
"from": "human",
"value": "require 'rugged'\n\nmodule Licensee\n class Project\n attr_reader :detect_readme, :detect_packages\n alias detect_readme? detect_readme\... | ruby | chosen |
[
{
"from": "system",
"value": "Rename internal enumerable state to :members\n\nEnumerable#entries is defined by ruby itself. Overwriting it can lead\nto weird consequences if the overwritten name does not resolve to an\narray.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Subway\... | ruby | chosen |
[
{
"from": "system",
"value": "Store config in a Struct\n"
},
{
"from": "human",
"value": "module Whoopsie\n class Railtie < Rails::Railtie\n config.whoopsie = ActiveSupport::OrderedOptions.new\n\n initializer \"whoopsie.configure_middleware\" do\n Rails.application.middleware.insert_... | ruby | chosen |
[
{
"from": "system",
"value": "Add controller test to payment profile connect to check for stored keys\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe PaymentProfilesController do\n\tlet!(:user) { FactoryGirl.create(:user) }\n\n\tbefore do \n\t\tstub_login user\t\n\tend\n\n\t... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for new service class.;\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule Services\n describe MessagesControllerCreate do\n let(:u) { create :user }\n let(:v) { create :user }\n let(:s) { create :user }\n\n let(:par... | ruby | chosen |
[
{
"from": "system",
"value": "Fix PassComponent not freeze in correct time\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.describe PassComponent, type: :component do\n subject { page }\n\n let(:component) { described_class.new(plan: :persona... | ruby | chosen |
[
{
"from": "system",
"value": "Remove color from table background\n"
},
{
"from": "human",
"value": "class WindsStylesheet < ApplicationStylesheet\n def setup\n # Add stylesheet specific setup stuff here.\n # Add application specific setup stuff in application_stylesheet.rb\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the wt_streaminglogreplayer recipe to not bomb if the service won't stop\n\n\nFormer-commit-id: 7a4d8db7b93156794d7a27dc9356e9591441aee3 [formerly de0177ccfa39cdf08d5877547ce2a288eb4a4617] [formerly edc4bd0c00ece7a0185877366825e1ea85547301 [formerly 80ced9577bc84d604eca517d... | ruby | chosen |
[
{
"from": "system",
"value": "Use NumericHelper to parse lakebtc response\n"
},
{
"from": "human",
"value": "module Cryptoexchange::Exchanges\n module Lakebtc\n module Services\n class Market < Cryptoexchange::Services::Market\n class << self\n def supports_individual_ti... | ruby | chosen |
[
{
"from": "system",
"value": "Add AFNetworking as external dependency\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'QuadernoKit'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'Objective-C wrapper for Quaderno ... | ruby | chosen |
[
{
"from": "system",
"value": "Add everyone to cc.rb CI email list\n"
},
{
"from": "human",
"value": "Project.configure do |project|\n project.email_notifier.emails = [\"scott@butlerpress.com\"]\n project.build_command = \"./script/cruise_build.rb #{project.name}\"\nend\n"
},
{
"from": ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.