conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Move back to immediate sending of welcome text message since it is costing me money to run background workers on Heroku\n"
},
{
"from": "human",
"value": "class AlertsController < ApplicationController\n respond_to :json\n before_action :logged_in?\n\n def welcom... | ruby | chosen |
[
{
"from": "system",
"value": "Use test-unit gem ~> 3.1.2\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'version'\n\nGem::Specification.new do |spec|\n spec.name = \"apns-s... | ruby | chosen |
[
{
"from": "system",
"value": "Add SwCrypt dependency to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = \"SwiftJose\"\n spec.version = \"0.0.1\"\n spec.summary = \"Framework to create and parse JWT, JWS, and JWE\"\n spec.homepage = \"https://github.com/rmtmck... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade to RuboCop 0.25.0 dependency.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"finstyle/version\"\n\nGem::Specification.new do |spec|\n spec.... | ruby | chosen |
[
{
"from": "system",
"value": "Revert source changes in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SGImageCache\"\n s.version = \"1.0.1\"\n s.summary = \"A lightweight iOS image cache.\"\n s.homepage = \"http://platform.seatgeek.com\"\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Fix FC025 for Ruby 2.5\n\nThere's new elements and this is a VERY specific query which blows up\nwith the extra elements. Hopefully this is the only one.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Read env variables for Mandrill api_key, username, and password.\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nrequire 'yaml'\n\nbegin\n options = YAML.load_file(Rails.root.join('config', 'mandrill.yml'))[Rails.env]\n\n ActionMailer::Base.smtp_set... | ruby | chosen |
[
{
"from": "system",
"value": "Add yard docs for Commands::Composite\n"
},
{
"from": "human",
"value": "module ROM\n module Commands\n class Composite\n include Equalizer.new(:left, :right)\n\n attr_reader :left, :right\n\n def initialize(left, right)\n @left, @right = l... | ruby | chosen |
[
{
"from": "system",
"value": "Remove test for demo link in nav bar\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature \"Dashboard\" do\n scenario \"viewing after successful login\" do\n user = login_as_tenant\n\n expect(page).to have_content user.name\n expect(page).to... | ruby | chosen |
[
{
"from": "system",
"value": "Enable generated image to handle missing source files\n"
},
{
"from": "human",
"value": "# Generated Image\n# Represents a generated source file.\nclass GeneratedImage\n require 'mini_magick'\n require 'fastimage'\n\n def initialize(source_file:, width:, format:)... | ruby | chosen |
[
{
"from": "system",
"value": "Correct Factory bug identified by CI schema:load\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :raw_entity_id, class: EntityId do\n uri { \"#{Faker::Internet.url}/shibboleth\" }\n association :raw_entity_descriptor\n end\nend\n"
},
{... | ruby | chosen |
[
{
"from": "human",
"value": "Add basic systemd provider for debian systems\n\nVery basic systemd provider for debian systems.\n"
},
{
"from": "gpt",
"value": "module HttpdCookbook\n class HttpdServiceDebianSystemd < HttpdServiceDebian\n use_automatic_resource_name\n # This is Chef-12.0.0 ... | ruby | chosen |
[
{
"from": "system",
"value": "CHEF-882: Disable some extremely verbose debugging output slowing down chef runs.\n"
},
{
"from": "human",
"value": "#\n# Author:: Adam Jacob (<adam@opscode.com>)\n# Author:: AJ Christensen (<aj@opscode.com>)\n# Copyright:: Copyright (c) 2009 Opscode\n# License:: Ap... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry to help debugging during development\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'griddler/version'\n\nGem::Specification.new do |s|\n s.name = 'griddler'\n s.version = Griddler::VERSION\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow dots in project name for linking issues\nThis is needed at least for the homepage ('easy-rpg.org').\n"
},
{
"from": "human",
"value": "#\n# This cinch plugin is part of EV0002\n#\n# written by carstene1ns <dev @ f4ke . de> 2014\n# available under MIT license\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use assert_equal in a test\n\nSo that we can see what it's failing on.\n"
},
{
"from": "human",
"value": "require \"integration_test_helper\"\nrequire \"rest-client\"\nrequire_relative \"multi_index_test\"\n\nclass SpecialistDocumentSearchTest < MultiIndexTest\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Increase version from 0.0.1.4 to 0.0.1.5\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'subst_attr'\n s.version = '0.0.1.4'\n s.summary = 'Declare attributes that have default implementations that are subst... | ruby | chosen |
[
{
"from": "system",
"value": "Fix README detection for subdir\n"
},
{
"from": "human",
"value": "class Tree\n attr_accessor :entries, :readme\n\n def initialize(repository, sha, path = '/')\n path = '/' if path.blank?\n git_repo = repository.raw_repository\n @entries = Gitlab::Git::Tr... | ruby | chosen |
[
{
"from": "system",
"value": "Change validations on the Vote model.\n\nPresence true is redundant if another validation is being performed.\n"
},
{
"from": "human",
"value": "class Vote < ActiveRecord::Base\n after_save :update_parent_vote_total \n \n belongs_to :candidate, class_name: ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix links in atom feed\n"
},
{
"from": "human",
"value": "require 'wget_wrapper'\nrequire 'js_minifier'\nrequire 'css_minifier'\nrequire 'html_minifier'\nrequire 'file_merger'\nrequire 'less_config'\nrequire 'symlinker'\nrequire 'breadcrumb'\nrequire 'authors_helper... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old test method and add some todos\n"
},
{
"from": "human",
"value": "require 'helper'\nrequire 'hijri'\n\nclass TestHijri < MiniTest::Unit::TestCase\n\n def test_version\n version = Hijri.const_get('VERSION')\n\n assert(!version.empty?, 'should have a... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the copy for the rails generator help\n\nMakes it slightly more explicit what running the generator will do to\nyour Rails application.\n"
},
{
"from": "human",
"value": "require 'rails/generators/active_record'\n\nclass PaulRevereGenerator < Rails::Generato... | ruby | chosen |
[
{
"from": "system",
"value": "Use factory girl associations for addresses\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :parcel do\n weight 4\n volume 3\n description \"pet cat\"\n pickup_by Date.parse('1995-03-03')\n deliver_by Date.parse('1995-04-04')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for default delivery status\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Order, type: :model do\n it 'creates successfully' do\n customer = Customer.create(first_name: 'Jon', last_name: 'Chen')\n order = customer.orders... | ruby | chosen |
[
{
"from": "system",
"value": "Test operates correctly regardless of dev's ENV config\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe User do\n describe \"validations\" do\n describe \"invitation_code\" do\n it \"only accepts valid invitation codes\" do\n User... | ruby | chosen |
[
{
"from": "system",
"value": "Add checks to ensure the service is running.\n"
},
{
"from": "human",
"value": "require 'spec_helper_system'\n\ndescribe 'apache class' do\n it 'should install apache' do\n if system_node.facts['osfamily'] == 'Debian'\n system_run('dpkg --get-selections | g... | ruby | chosen |
[
{
"from": "system",
"value": "Use ‘extend self’ instead of ‘def self.’"
},
{
"from": "human",
"value": "require 'hypercuke/version'\nrequire 'hypercuke/cli'\nrequire 'hypercuke/context'\nrequire 'hypercuke/exceptions'\nrequire 'hypercuke/mini_inflector'\nrequire 'hypercuke/step_driver'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Adapter no wrapping for ActiveAny\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Adapter\n def initialize(klass)\n @klass = klass\n end\n\n def query(where_clause, limit_value)\n records = @klass.load\n\n records = records.... | ruby | chosen |
[
{
"from": "system",
"value": "Stop confusing exception when AndSon can't bind to a server\n\nPreviously, we were getting an `NoMethodError` for `close` on the\nconnection (because it could never make a connection) when a\nclient couldn't bind. This fixes that by making sure protocol\nconnection has been set... | ruby | chosen |
[
{
"from": "system",
"value": "Add class methods for license and taxonomy\n"
},
{
"from": "human",
"value": "require \"snl_admin/engine\"\n\nmodule SnlAdmin\n # This is where global configuration options can go\n mattr_accessor :user_class\n mattr_accessor :redirection_class\n\n def self.user... | ruby | chosen |
[
{
"from": "system",
"value": "Allow irb prompt for commandline slides"
},
{
"from": "human",
"value": "require 'parslet'\n\n# For parsing commandline slide content.\nclass CommandlineParser < Parslet::Parser\n\n rule(:prompt) do\n str('$') | str('#')\n end\n\n rule(:text) do\n match['[:... | ruby | chosen |
[
{
"from": "system",
"value": "Align code in Url model\n"
},
{
"from": "human",
"value": "class Url < ActiveRecord::Base\n validates_presence_of :viewport_width, :address, :name\n validates_format_of :address, :with => /https?:\\/\\/.+/\n validates_uniqueness_of :address\n\n has_many :snapsho... | ruby | chosen |
[
{
"from": "system",
"value": "Use version number to get appropriate tag\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CircleProgressBar\"\n s.version = \"0.31\"\n s.summary = \"Circle ProgressBar control for iOS.\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create factory for a minimal model object.\n"
},
{
"from": "gpt",
"value": "require 'bra/model'\n\n# A minimal mock implementation of a ModelObject.\nclass MockModelObject\n include Bra::Model::ModelObject\nend\n\nFactoryGirl.define do\n factory :model_object, clas... | ruby | chosen |
[
{
"from": "human",
"value": "Add sign out feature spec\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'sign out' do\n let!(:user) do\n Fabricate(:user, email: 'user@timeoverflow.org', password: 'papapa22')\n end\n\n it 'signs the user out' do\n visit '/login'\n fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add new file to linting whitelist\n"
},
{
"from": "human",
"value": "Dir.glob(\"source/manual/**/*.md\").each do |filename|\n RSpec.describe filename do\n raw = File.read(filename)\n frontmatter = YAML.load(raw.split('---')[1])\n\n it \"uses the correct sp... | ruby | chosen |
[
{
"from": "system",
"value": "Use a recognizable filename in ParserHelpers\n\nJust to ease debugging."
},
{
"from": "human",
"value": "require 'opal/parser'\n\nmodule ParserHelpers\n def parsed(source, file='(string)')\n Opal::Parser.new.parse(source, file)\n end\n\n def expect_parsed(sour... | ruby | chosen |
[
{
"from": "system",
"value": "Support newer syntax of Carthage\n"
},
{
"from": "human",
"value": "module Anticuado\n module IOS\n class Carthage < Anticuado::Base\n # @param [String] project Path to project directory.\n # @return [String] The result of command `carthage outdated`.\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Hopper Disassembler to version 3.10.2.2\n\nThis commit updates the version and sha256 stanzas.\n"
},
{
"from": "human",
"value": "cask :v1 => 'hopper-disassembler' do\n version '3.9.16'\n sha256 '045ee3ecba3c81388112dd038df91ffe6e4a905d9d2c8bd2650cfff43ec01... | ruby | chosen |
[
{
"from": "system",
"value": "Add error message grabbing support for JUnit\n"
},
{
"from": "human",
"value": "class JunitAdapter < TestingFrameworkAdapter\n COUNT_REGEXP = /Tests run: (\\d+)/\n FAILURES_REGEXP = /Failures: (\\d+)/\n SUCCESS_REGEXP = /OK \\((\\d+) test[s]?\\)/\n\n def self.fr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation for controller helper\n"
},
{
"from": "human",
"value": "module Context\nmodule ControllerHelper\n\n # Returns the current Context::Page for the given path.\n # Defaults to params[:path] if path is not provided.\n #\n # Can be used within custom ... | ruby | chosen |
[
{
"from": "system",
"value": "Update require statement to match new location of railtie.rb. Update to use ruby 2.5 include\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'active_support'\nrequire 'active_record'\nrequire 'delayed_job'\nrequire 'delayed_job_active_rec... | ruby | chosen |
[
{
"from": "system",
"value": "Use PlainText lexer from Rouge\n\nI got a NameError for the Text lexer, and digging into the rouge\ncodebase, it looks like this is the fix for it.\n\nI opened a ticket to verify:\n\nhttps://github.com/jayferd/rouge/issues/92\n"
},
{
"from": "human",
"value": "requi... | ruby | chosen |
[
{
"from": "system",
"value": "Revert to simple status bar."
},
{
"from": "human",
"value": "require 'playa/view'\n\nmodule Playa\n class StatusView < View\n def interface\n 'status'\n end\n\n def path\n File.expand_path('../views/status.erb', __FILE__)\n end\n\n private... | ruby | chosen |
[
{
"from": "system",
"value": "Fix reference issues in accepting multiple messages\n"
},
{
"from": "human",
"value": "require 'optparse'\nrequire 'ostruct'\n\nclass TimerCLI\n def self.parse(args)\n options = OpenStruct.new\n\n options.messages = {}\n\n opt_parser = OptionParser.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Add method for determining if adyen response is for a redirect\n"
},
{
"from": "human",
"value": "module Spree\n module Adyen\n class ApiResponse\n attr_reader :gateway_response\n\n def initialize gateway_response\n @gateway_response = gateway_r... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to import locations\n\nThis should be a one-shot affair.\n"
},
{
"from": "gpt",
"value": "require 'open-uri'\nrequire 'csv'\n\nnamespace :import do\n desc 'Import locations via the provided CSV'\n task locations: :environment do\n csv_url = ENV.fet... | ruby | chosen |
[
{
"from": "system",
"value": "Fix call to write metadata\n"
},
{
"from": "human",
"value": "module VagrantMutate\n\n class Converter\n\n # http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby\n def initialize(env)\n @env = env\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Set schema index as home if user is signed in\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n def index\n redirect_to new_user_session_path unless user_signed_in?\n end\nend\n"
},
{
"from": "gpt",
"value": "class Ho... | ruby | chosen |
[
{
"from": "system",
"value": "Change format of object sent from sever to frontend\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n\n def index\n\n end\n\n def sfdata\n @geojson = HTTParty.get(\"https://data.sfgov.org/resource/qg52-sqku?$$app_token=T... | ruby | chosen |
[
{
"from": "system",
"value": "Remove whitespace from trace IDs in the search bar\n\nThese values are often pasted from browsers, where whitespace may accidentally creep in."
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass RootController < ApplicationController\n layout 'g... | ruby | chosen |
[
{
"from": "system",
"value": "Use a 'before_action' in the Tags controller\n\nBefore the 'show' action, set the Tag to be shown with a\n'before_action.'\n"
},
{
"from": "human",
"value": "class TagsController < ApplicationController\n # GET /tags\n def index\n @tags = Tag.all\n end\n\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ignoring non ascii tag character\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass TagsController < ApplicationController\n skip_before_action :authenticate_user!\n\n def index\n year = params[:year]\n collection = []\n term = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add lachlan.hackclub.com to allowed CORS origins\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# Avoid CORS issues when API is called from the web app.\n#\n# Handle Cross-Origin Resource Sharing (CORS) in order to... | ruby | chosen |
[
{
"from": "system",
"value": "CHEF-2595: Fix -d in knife role create.\n"
},
{
"from": "human",
"value": "#\n# Author:: Adam Jacob (<adam@opscode.com>)\n# Copyright:: Copyright (c) 2009 Opscode, Inc.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (th... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo for getting default codap server url\n\n[#78742620]\n"
},
{
"from": "human",
"value": "module DocumentsHelper\n def codap_link(codap_server, document)\n data = {\n \"documentServer\" => root_url\n }\n rkey = (@runKey || document.run_key)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove confusing limit for Compare\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "human",
"value": "module Gitlab\n module Git\n class Compare\n attr_accessor :commits, :commit, :diffs, :same, :li... | ruby | chosen |
[
{
"from": "system",
"value": "Improve gem summary and description\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'private_address_check/version'\n\nGem::Specification.new do |spec|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Improve variable naming within url_formatter.\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'json'\n\nmodule Billy\n module ResourceUtils\n\n def url_formatter(url, include_params=false)\n url = URI(url)\n url_fragment = url.fragment\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow a check to see if someone is running Buffet.\n\nInteresting to note is that there is a very minor race condition in this\ncode, documented in the comment in front of `run`. This race is\nincredibly unlikely, and will not break functionality at all, so I\nhaven't prioritiz... | ruby | chosen |
[
{
"from": "system",
"value": "Make Broadcaster live in Cucumber module\n"
},
{
"from": "human",
"value": "class Broadcaster\n\n def initialize(receivers = [])\n @receivers = receivers\n end\n \n def register(receiver)\n @receivers << receiver\n end\n \n def method_missing(method_nam... | ruby | chosen |
[
{
"from": "system",
"value": "Implement Application.using so that configuration can be set directly from config.ru\n"
},
{
"from": "human",
"value": "module Racket\n class Application\n\n attr_reader :options\n\n @instance = nil\n\n def self.call(env)\n instance.instance_eval { @r... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to private method\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Rabbit\n # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>\n class Publish\n # Define Exchange operation\n def ini... | ruby | chosen |
[
{
"from": "human",
"value": "Update dependencies with dangling rubygem_id to null\n\nIdeally, these should have never existed as we update dependencies\nto unresolved_name and reset rubygem_id when a rubygem record gets\ndeleted.\nThese seems to have been created before the time we added before_destroy\nhoo... | ruby | chosen |
[
{
"from": "system",
"value": "Replace use of ::Kernel.open by a proper HTTP call\n\nIt is recommended not to use ::Kernel.open for security reason.\nAlso due to the same reason recent rubocop versions doesn't like this\nmethod.\n\nSince we need basic HTTP here, use the built-in Net/Http module.\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typos: hilight -> highlihgt\n"
},
{
"from": "human",
"value": "module EPUB\n module Search\n module Formatter\n class CLI\n def initialize(data, word, hilight=$stderr.tty?)\n @data, @word, @hilight = data, word, hilight\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Dotenv.overload to override ENV values with each new .env file\n"
},
{
"from": "human",
"value": "require 'dotenv'\nrequire 'rbconfig'\n\nmodule Dotenv\n module Beefy\n class Railtie < Rails::Railtie\n config.before_configuration { load_environments }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update chef server to 12.13.0\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.9.1-1\"\n\n# Set the ... | ruby | chosen |
[
{
"from": "system",
"value": "Add documention about the JIRA::JIRAService class"
},
{
"from": "human",
"value": "# All the remote entities as well as the SOAP service client.\nmodule JIRA\nclass JIRAService < Handsoap::Service\n include RemoteAPI\n\n attr_reader :auth_token, :user\n\n def sel... | ruby | chosen |
[
{
"from": "system",
"value": "Add locale setting from param.\n"
},
{
"from": "human",
"value": "module Brightcontent\n class ApplicationController < ActionController::Base\n add_flash_types :success, :info, :warning, :danger\n before_filter :authorize\n before_filter :set_locale\n h... | ruby | chosen |
[
{
"from": "system",
"value": "Update OmniFocus Beta to version 2.4.x-r253971\n\nThis commit updates the version and sha256 stanzas.\n"
},
{
"from": "human",
"value": "cask 'omnifocus-beta' do\n version '2.4.x-r253472'\n sha256 '3420deb1dee658e4e9e1d158fe429cb0df2eae682935a24da351bfb26fd07ca0'\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow linter for exercises 3.1.X in Python course\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Python20CourseWeek\n\n def self.get_for(exercise)\n case exercise.title\n when /Python20 Aufgabe 1/\n 1\n when /Python20 Aufgab... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs to test where error messages are printed.\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\ndescribe \"The error message caused by an exception\" do\n it \"is not printed to stdout\" do\n out = ruby_exe(\"this_d... | ruby | chosen |
[
{
"from": "system",
"value": "Use Rails.root.to_s (Rails 3 style) instead of the deprecated RAILS_ROOT variable\n"
},
{
"from": "human",
"value": "module SpreadsheetOnRails\n\n class Handler < ::ActionView::TemplateHandler\n include ActionView::TemplateHandlers::Compilable\n\n def compile... | ruby | chosen |
[
{
"from": "system",
"value": "Use TLS hack only on Ruby 1.8.4\n\n\ngit-svn-id: fbbd53e748d1d9421100d69b79e89db6c5fd213c@90 65aa75ef-ce15-0410-bc34-cdc86d5f77e6\n"
},
{
"from": "human",
"value": "require 'action_mailer'\nrequire 'cerberus/publisher/base'\nrequire 'cerberus/publisher/netsmtp_tls_f... | ruby | chosen |
[
{
"from": "system",
"value": "Bump podspec version to 0.2.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"FastEasyMapping\"\n s.version = \"0.2.0\"\n s.summary = \"Fast mapping from JSON to NSObject / NSManagedObject and back\"\n s.homepage = \"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug causing tests not to be namespaced properly\n"
},
{
"from": "human",
"value": "require_relative 'helper'\nrequire 'rake/xcscheme_task'\n\nclass TestRakeXcodebuildTask < Rake::TestCase\n include Rake\n\n def test_initialize\n xst = Rake::XCSchemeTask.new... | ruby | chosen |
[
{
"from": "system",
"value": "Add a 'documentation' comment to JsonEventLogger\n"
},
{
"from": "human",
"value": "# A machine-readable first, human-readable second logging library\nclass MicroserviceLogger\n class JsonEventLogger\n def initialize(service_name:,\n clock:,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove begining underscore of used block parameters\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire \"mongoid/relations/eager/base\"\nrequire \"mongoid/relations/eager/belongs_to\"\nrequire \"mongoid/relations/eager/has_one\"\nrequire \"mongoid/relatio... | ruby | chosen |
[
{
"from": "human",
"value": "Add constants for Unicode symbols\n"
},
{
"from": "gpt",
"value": "module Chess\n W_KING = \"\\u2654\"\n W_QUEEN = \"\\u2655\"\n W_ROOK = \"\\u2656\"\n W_BISHOP = \"\\u2657\"\n W_KNIGHT = \"\\u2658\"\n W_PAWN = \"\\u2659\"\n B_KING = \"\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for namespace issue, causes occasionally problems with rails missing constants: \nAdmin is not missing constant DefaultActions! (ArgumentError)\n"
},
{
"from": "human",
"value": "class Admin::ApplicationController < ActionController::Base\n include DefaultActio... | ruby | chosen |
[
{
"from": "system",
"value": "Include gem_downloads to remove n+1 for versions.downloads_count\n"
},
{
"from": "human",
"value": "class Api::V1::ActivitiesController < Api::BaseController\n def latest\n versions = Version.new_pushed_versions(50)\n render_rubygems(versions)\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Use constant for special error code\n"
},
{
"from": "human",
"value": "require_dependency 'cartodb/errors'\nrequire_dependency 'cartodb/import_error_codes'\n\nmodule Carto\n module DataImportCommons\n\n # Notice that this returns the entire error hash, not just ... | ruby | chosen |
[
{
"from": "system",
"value": "Change preference type from float to decimal\n\nFixes #57\n"
},
{
"from": "human",
"value": "Spree::AppConfiguration.class_eval do\n preference :use_store_credit_minimum, :float, :default => 0.0\nend\n"
},
{
"from": "gpt",
"value": "Spree::AppConfigurat... | ruby | chosen |
[
{
"from": "system",
"value": "Rename columns for mongoid orm\n"
},
{
"from": "human",
"value": "class Structure\n include Mongoid::Document\n include Mongoid::Timestamps\n include Sunrise::Models::Structure\n include PageParts::Extension\n include MetaManager::Taggable\n include PublicActi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Test::Unit adapters to ensure teardown is run if RR.verify borks\n"
},
{
"from": "human",
"value": "module RR\n module Adapters\n class TestUnit1\n module AdapterMethods\n def assert_received(subject, &block)\n block.call(received(subjec... | ruby | chosen |
[
{
"from": "system",
"value": "Remove debug RJS as recommended in RC\n"
},
{
"from": "human",
"value": "Qa::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environment your application's code is reloaded on\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error due to calling sleep with a string.\n\nargs come in off the command line as strings. We need to turn them into integers before passing them to `sleep`.\n"
},
{
"from": "human",
"value": "namespace :stagehand do\n desc \"Polls the commit entries table for ... | ruby | chosen |
[
{
"from": "system",
"value": "Rollback should happen in the same registry that received commit\n"
},
{
"from": "human",
"value": "require \"gluer/registration_hook\"\n\nmodule Gluer\n class Registration\n attr_accessor :name\n\n def initialize(definition, context, args, block)\n @def... | ruby | chosen |
[
{
"from": "system",
"value": "Add HTTP verb predicates to Request"
},
{
"from": "human",
"value": "module HTTPalooza\n class Request\n attr_reader :url, :method, :params, :payload, :headers\n\n def initialize(url, method, options = {})\n @url = url\n @method = method\n @par... | ruby | chosen |
[
{
"from": "system",
"value": "Fix version guard in __dir__ spec\n"
},
{
"from": "human",
"value": "require_relative '../../spec_helper'\n\ndescribe \"Kernel#__dir__\" do\n it \"returns the real name of the directory containing the currently-executing file\" do\n __dir__.should == File.realpa... | ruby | chosen |
[
{
"from": "system",
"value": "Delete /login for now; implement it later\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n # Accsess from CoderDojo Book\n get '/sotechsha', to: 'so_tech_sha_overview_page#index'\n get '/sotechsha/:quiz', to: 'so_tech_sha#quiz'\n\n # R... | ruby | chosen |
[
{
"from": "system",
"value": "Make real alias for posts resources\n\nTo have shorter urls for posts, we add an alias for posts to it."
},
{
"from": "human",
"value": "Fox::Application.routes.draw do\n resources :posts\n\n match 'p/:id' => 'posts#show', :as => :p\n match '/help' => 'posts#help... | ruby | chosen |
[
{
"from": "system",
"value": "Add nested resource definition to employees.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resources :projects do\n resources :activities\n end\n resources :project_states\n resources :activities\n resources :batch_activities\n\n res... | ruby | chosen |
[
{
"from": "system",
"value": "Add minitest to development dependency\n\nNow, minitest is gemified (not included in ruby-core)\n\n```\n$ bundle exec rake test\n/Users/sue445/.rbenv/versions/3.0.3/bin/ruby -w -I\"lib\" /Users/sue445/workspace/github.com/deeeki/connpass/vendor/bundle/ruby/3.0.0/gems/rake-13.0.... | ruby | chosen |
[
{
"from": "system",
"value": "Add resouce 70-persistent-net.rules to correct device names.\n"
},
{
"from": "human",
"value": "include_recipe 'yum-epel'\ninclude_recipe 'serf'\n#override template\nr = resources(template: '/etc/init.d/serf')\nr.cookbook 'cloudconductor_init'\n\n#install golang\nyu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix operation name being passed instead of operation\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass Authorizer\n class << self\n def authorize(model:, params:, operation:)\n assign_params(model, params)\n\n operation.policy_kla... | ruby | chosen |
[
{
"from": "system",
"value": "Update my name, description and summary\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'box_view/version'\n\nGem::Specification.new do |spec|\n spec.na... | ruby | chosen |
[
{
"from": "system",
"value": "Use alternate mapping when parsing sitemapindex\n"
},
{
"from": "human",
"value": "require_relative 'xml'\n\nmodule Resync\n module XMLFactory\n\n ROOT_TYPES = [\n CapabilityList,\n ChangeDump,\n ChangeDumpManifest,\n ChangeList,\n Resou... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for cassandra user, sadly comment out test that C* is actually running.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'cassandra' do\n\n it 'installs it' do\n expect(package 'dsc20').to be_installed\n end\n\n it 'is running' do... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.