conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add fix which allow create inheritance classes with 'new'\n"
},
{
"from": "human",
"value": "module IntegerInheritance\n module Extension\n extend ActiveSupport::Concern\n\n included do\n cattr_accessor :inheritance_mapping, instance_accessor: false\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add preferences to chrome maximize\n"
},
{
"from": "human",
"value": "require 'capybara'\nrequire 'capybara/cucumber'\nrequire 'selenium-webdriver'\nrequire 'site_prism'\nrequire 'rspec'\nrequire 'yaml'\nrequire 'capybara/poltergeist'\nrequire_relative 'helper.rb'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the source install checksum\n"
},
{
"from": "human",
"value": "#\n# Author:: Joshua Timberman <joshua@chef.io>\n# Copyright:: Copyright (c) 2012-2016, Chef Software, Inc. <legal@chef.io>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove stray references to uuids\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rails db:seed command (or created alongside the databa... | ruby | chosen |
[
{
"from": "system",
"value": "Disable api key creation. No such model for now.\n"
},
{
"from": "human",
"value": "a = ApiKey.create(app_id: \"tariff-web\")\na.access_token = \"86c337686edc492184c5e9869c27a0b1\"\na.save\n"
},
{
"from": "gpt",
"value": "# a = ApiKey.create(app_id: \"ta... | ruby | chosen |
[
{
"from": "system",
"value": "Add a step to verify output from CLI\n"
},
{
"from": "human",
"value": "When /^I run `vim-flavor(.*)`(?: again)?(?:,? (but))?$/ do |args, mode|\n begin\n original_home = ENV['HOME']\n ENV['HOME'] = expand('$home')\n Dir.chdir(expand('$tmp')) do\n begi... | ruby | chosen |
[
{
"from": "human",
"value": "Add a basic specification just to see it working\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\ndescribe Holding do\n let(:service_response) { }\n subject(:holding) { Holding.new(service_response) }\n it { should be_a Holding }\nend\n"
}
] | ruby | chosen |
[
{
"from": "human",
"value": "Add test to ensure mysql root login works\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n# Check to see if MySQL root password works\ndescribe command(\"mysql -uroot -p$(mdata-get mysql_pw) -e 'select version();' \") do\n it { should return_exit_status 0... | ruby | chosen |
[
{
"from": "system",
"value": "Add instructions for history dump.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\ndir = File.dirname(__FILE__) + '/../lib'\n$LOAD_PATH << dir unless $LOAD_PATH.include?(dir)\n\nrequire 'rubygems'\nrequire 'currentcost/meter'\n\nrequire 'optparse'\n\n# Com... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with jsonp_callback not being used\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'json'\n\nrequire_relative './logging.rb'\nrequire_relative './error.rb'\n\nrequire_relative './calculatorrouter.rb'\nrequire_relative './calculatorloader... | ruby | chosen |
[
{
"from": "system",
"value": "Support for 404/504 HTTP exceptions\n"
},
{
"from": "human",
"value": "module Closeio\n class Error < StandardError; end\n class NotAuthorized < Error; end\nend\n\nrequire \"faraday\"\nmodule FaradayMiddleware\n class CloseioErrorHandler < Faraday::Response::Midd... | ruby | chosen |
[
{
"from": "system",
"value": "Add Pawn possible moves and spec\n"
},
{
"from": "human",
"value": "class Pawn < Piece \nend\n"
},
{
"from": "gpt",
"value": "class Pawn < Piece\n attr_reader :initial_position\n\n def initialize(color, position)\n super(color, position)\n @initi... | ruby | chosen |
[
{
"from": "system",
"value": "Compress html, js, and css in production\n"
},
{
"from": "human",
"value": "require 'haml'\nrequire 'uglifier'\nrequire 'sprockets'\n\nrequire File.expand_path('../../app/helpers/application_helper', __FILE__)\n\nSprockets.register_engine('.haml', Tilt::HamlTemplate... | ruby | chosen |
[
{
"from": "system",
"value": "Move log.info to a right place\n\nMove log.info to a right place\n"
},
{
"from": "human",
"value": "module ManagerRefresh::SaveCollection\n module Helper\n def save_dto_inventory(ems, dto_collection)\n _log.info(\"Synchronizing #{ems.name} collection #{dto_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix branch parsing in staging task\n"
},
{
"from": "human",
"value": "\ndef stage branch, options={}\n branches = `git branch`.split(\"\\n\")\n current_branch = branches.find { |b| b.first == '*' }.split.last.to_sym\n\n changes = `git status -s`.rstrip\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve Mixins::Options. Use superclass default_options as hash default values.\n"
},
{
"from": "human",
"value": "module Temple\n module Mixins\n module Dispatcher\n def self.included(base)\n base.class_eval { extend ClassMethods }\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Select logger in initialize rather than accessor.\n"
},
{
"from": "human",
"value": "module Tocsin\n class Config\n attr_accessor :logger, :queue, :recipient_groups, :from_address, :exception_level\n\n def initialize\n @queue = :high\n @e... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we only attempt to URL encode strings\n"
},
{
"from": "human",
"value": "module TokyoApi\n class Base < Vertebrae::Model\n def normalized_base_path\n \"#{base_path}/\"\n end\n\n def url_escape(string)\n CGI.escape(string)\n end\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add CocoaPods podspec to repo\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = 'OBShapedButton'\n s.version = '1.0.0'\n s.license = 'MIT'\n s.summary = 'A UIButton subclass that works with non-rectangular button shapes.'\n s.homepage = 'ht... | ruby | chosen |
[
{
"from": "system",
"value": "Add PG&E ns1 generic namespaces\n"
},
{
"from": "human",
"value": "module GreenButtonData\n module Parser\n class Entry\n include SAXMachine\n include Utilities\n\n element :id, as: :entry_id\n\n def id\n @entry_id ||= @url\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the default template is clone from a git repo."
},
{
"from": "human",
"value": "module JekyllAndHyde\n module Generators\n class New < Thor::Group\n include Thor::Actions\n\n SLIPPY_GIT_REPO = 'git://github.com/jingweno/slippy.git'\n\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"invalid multibyte char (US-ASCII) (SyntaxError)\"\n\nThis error occurs on Ruby 1.9.\n"
},
{
"from": "human",
"value": "describe RedmineActivity::Fetcher do\n let(:fetcher) do\n described_class.new(\n url: ENV['REDMINE_ACTIVITY_URL'],\n login_id: ... | ruby | chosen |
[
{
"from": "system",
"value": "Expand the changes test to include document\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RiverNotifications do\n\n before(:each) do\n ActiveRecord::Base.add_observer RiverNotifications.instance\n end\n\n after(:each) do\n ActiveRecor... | ruby | chosen |
[
{
"from": "system",
"value": "Update the description of the gem.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/kramdown-prismic/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'kramdown-prismic'\n s.version = KramdownPrismic::... | ruby | chosen |
[
{
"from": "system",
"value": "Use the service class when inspecting RPC endpoints, not the service name."
},
{
"from": "human",
"value": "require 'active_remote/serializers/protobuf'\n\nmodule ActiveRemote\n module RPC\n def self.included(klass)\n klass.class_eval do\n extend ::A... | ruby | chosen |
[
{
"from": "system",
"value": "Add with_groups trait to DocumentCollection factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :document_collection, class: DocumentCollection, parent: :edition, traits: [:with_organisations, :with_topics] do\n trait(:with_group) do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update for new errbit version\n\nNew version added another form to page. We are interested in second form on page"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Errwipe\n module Page\n class Base\n\n FLASH_SELECTOR = '#flash-messages'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug when jquery-rails is not a dependency of the application\n"
},
{
"from": "human",
"value": "require \"oojs/version\"\nrequire 'rails_sandbox_jasmine'\nrequire 'fake-ajax-server'\nrequire 'sinon-rails'\n\nmodule Oojs\n class Engine < Rails::Engine\n confi... | ruby | chosen |
[
{
"from": "system",
"value": "Delete all of the CommandLauncher methods\n"
},
{
"from": "human",
"value": "require 'forwardable'\nrequire 'core_extensions/string/percentage'\nrequire 'pgpool/command_launcher'\nrequire 'pgpool/response'\nrequire 'pgpool/node_info'\nrequire 'pgpool/version'\n\n#\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use different file and module names\n"
},
{
"from": "human",
"value": "require \"sprockets\"\nrequire \"sprockets/traceur/version\"\nrequire \"traceur-rb\"\n\nmodule Sprockets\n module Traceur\n class Template < Tilt::Template\n self.default_mime_type = 'ap... | ruby | chosen |
[
{
"from": "system",
"value": "Add Shopstyle module with include\n"
},
{
"from": "human",
"value": "task :check_shopstyle => :environment do\n Shopstyle.checking\n # puts \"done.\"\nend\n\n# task :send_reminders => :environment do\n# User.send_reminders\n# end\n\n"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "system",
"value": "Change gemspec description so that rubygems doesn't display markdown code.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'ua-utils'\n\nGem::Specification.new do |s|\n s.name = 'ua-utils'\n s.version = UaUti... | ruby | chosen |
[
{
"from": "system",
"value": "Change revision attribute to optional when create pattern\n"
},
{
"from": "human",
"value": "module API\n module V1\n class PatternAPI < API::V1::Base\n resource :patterns do\n desc 'List patterns'\n get '/' do\n ::Pattern.all.select ... | ruby | chosen |
[
{
"from": "system",
"value": "Make it easier to add a timing event\n"
},
{
"from": "human",
"value": "class TimingsController < MyplaceonlineController\n def show_add\n false\n end\n \n def footer_items_show\n super + [\n {\n title: I18n.t('myplaceonline.timings.timing_even... | ruby | chosen |
[
{
"from": "system",
"value": "Include entire user object in ProjectSerializer\n"
},
{
"from": "human",
"value": "class ProjectSerializer < ActiveModel::Serializer\n def created_at\n object.created_at.to_datetime.utc.rfc3339\n end\n\n def expires_at\n value = object.expires_at\n if va... | ruby | chosen |
[
{
"from": "system",
"value": "Add error handling to TwilioTextMessenger class\n"
},
{
"from": "human",
"value": "class TwilioTextMessenger\n attr_reader :message, :recipient\n\n def initialize(message, recipient)\n @message = message\n @recipient = recipient\n end\n\n def call\n cli... | ruby | chosen |
[
{
"from": "system",
"value": "Make Rubocop stricter about regexp\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'visiflow/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add pseudocode to the get_grade method solution\n"
},
{
"from": "human",
"value": "# Calculate a Grade\n\ndef get_grade(average)\n\n if average >= 90\n p \"A\"\n elsif average >= 80\n p \"B\"\n elsif average >= 70\n p \"C\"\n elsif average >= 60\n p ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for defining a method within the TOPLEVEL_BINDING\n"
},
{
"from": "gpt",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"main#def\" do\n after :each do\n Object... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade SmartGitHg 6.app to v6.0.5\n"
},
{
"from": "human",
"value": "class Smartgithg < Cask\n version '6.0.4'\n sha256 '97b15bceb6af2e36a4e179c32895e9def864388d49ee82a6768547b68241d1b7'\n\n url 'http://www.syntevo.com/download/smartgithg/smartgithg-macosx-6_0_4... | ruby | chosen |
[
{
"from": "system",
"value": "Allow ftp server for integration tests 2 minutes to start on travis\n"
},
{
"from": "human",
"value": "require \"daemon_controller\"\n\nclass FtpServer\n\n INSTALL_PATH = File.expand_path(\"../../../../vendor/apache-ftpserver\", __FILE__)\n USER1_PATH = INSTALL_... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry to development dependencies.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/washingtonleg/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Ryan Wold\"]\n gem.email = [\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use atspi_app_driver version that uses Ruby-GNOME2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'mdv'\n s.version = '0.2.2'\n\n s.summary = 'Simple Markdown Viewer'\n s.description = 'Quickly view markd... | ruby | chosen |
[
{
"from": "system",
"value": "Add other dependencies into the main gem file\n"
},
{
"from": "human",
"value": "require 'active_model_serializers'\n\nrequire 'encore/version'\nrequire 'encore/config'\n\nrequire 'encore/serializer/base'\nrequire 'encore/serializer/instance'\nrequire 'encore/persis... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspect with new requirements and versioning."
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"Provocateur\"\n s.version = \"0.0.1\"\n s.summary = \"A near-control variable configuration library.\"\n\n s.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Use fully qualified recipe name\n"
},
{
"from": "human",
"value": "name 'jenkins'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'releng@chef.io'\nlicense 'Apache 2.0'\ndescription 'Installs and configures Jenkins CI master & sla... | ruby | chosen |
[
{
"from": "system",
"value": "Add maintainer and license information\n"
},
{
"from": "human",
"value": "name 'joad-ci'\nmaintainer ''\nmaintainer_email ''\nlicense ''\ndescription 'Installs/Configures joad-ci'\nlong_description 'Installs/Configures joad-ci'\nversi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove requirements of yum_cookbook version\n\nFixes some version conflict issue.\n"
},
{
"from": "human",
"value": "name 'mackerel-agent'\nmaintainer 'Hatena Co., Ltd.'\nmaintainer_email 'mackerel-developers@hatena.ne.jp'\nlicense 'Apache... | ruby | chosen |
[
{
"from": "system",
"value": "Include MTrack::ModuleMixin from within module_eval.\n"
},
{
"from": "human",
"value": "require \"mtrack/module_mixin\"\nrequire \"mtrack/version\"\n\nModule.include MTrack::ModuleMixin\n"
},
{
"from": "gpt",
"value": "require \"mtrack/module_mixin\"\nre... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo. Not releasing immediately since this typo is actually not affecting anything -- class variables are nil by default, anyway, which works as false.\n"
},
{
"from": "human",
"value": "require 'rubyXL/objects/root'\nrequire 'rubyXL/parser'\n\nmodule RubyXL\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add new API and reimplement sleeping\n"
},
{
"from": "human",
"value": "require \"sleep2/version\"\n\nclass Sleep2\n include Comparable\n\n attr_accessor :time, :time_of_instantiation\n\n def initialize time\n @time_of_instantiation = Time.now\n @time = tim... | ruby | chosen |
[
{
"from": "system",
"value": "Change double to single quoted.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'awesome_print'\nrequire 'rspec_api_documentation/dsl'\nrequire 'acceptance_helper'\n\nresource 'Registrations' do\n header \"Accept\", \"application/json\"\n header ... | ruby | chosen |
[
{
"from": "system",
"value": "Add UTF-8 test for dap reverse\n"
},
{
"from": "human",
"value": "describe Dap::Filter::FilterFlatten do\n describe '.process' do\n\n let(:filter) { described_class.new([\"foo\"]) }\n\n context 'flatten nested json' do\n let(:process) { filter.process({\... | ruby | chosen |
[
{
"from": "system",
"value": "Improve responder handler shutdown spec\n\nPrevious sleep numbers were so low that we had some flakes happening.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Freddy::ResponderHandler do\n let(:freddy) { Freddy.build(logger, config) }\n\n le... | ruby | chosen |
[
{
"from": "system",
"value": "Move intervention_role spec to factory_girl.\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nrequire 'rails_helper'\n\ndescribe InterventionRole do\n\n it { should validate_presence_of(:name).with_message(/nom/) }\n\n it { should validate_presence_o... | ruby | chosen |
[
{
"from": "human",
"value": "Add uni_color test for presentation.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\ndescribe 'ApiUniColor section tests' do\n it 'ApiUniColor | GetClassType method' do\n pptx = DocBuilderWrapper.new.build_doc_and_parse('asserts/js/pptx/smoke/ApiUniColor/... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (8) is the string uppercase\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/56cd44e1aa4ac7879200010b\n# --- iteration 1 ---\nclass String\n def is_upcase?\n delete(\"a-z\") == self\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "10479: Fix type column on reports index\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ReportsHelper\n def report_reports_index_links(_reports)\n can?(:create, Report::Report) ? [create_link(Report::Report)] : []\n end\n\n def repor... | ruby | chosen |
[
{
"from": "system",
"value": "Use attr_accessible for Rails 3.2 apps.\n"
},
{
"from": "human",
"value": "class Scorecard::Point < ActiveRecord::Base\n self.table_name = 'scorecard_points'\n\n belongs_to :user, polymorphic: true\n belongs_to :gameable, polymorphic: true\n\n validates :con... | ruby | chosen |
[
{
"from": "system",
"value": "Add license, minimum OS X for Mountain.app\n"
},
{
"from": "human",
"value": "cask :v1 => 'mountain' do\n version :latest\n sha256 :no_check\n\n url 'http://appgineers.de/mountain/files/Mountain.zip'\n appcast 'http://appgineers.de/mountain/files/mountaincast.xm... | ruby | chosen |
[
{
"from": "system",
"value": "Correct field order in gfxCardStatus"
},
{
"from": "human",
"value": "class Gfxcardstatus < Cask\n homepage 'http://gfx.io/'\n url 'http://codykrieger.com/downloads/gfxCardStatus-2.3.zip'\n version '2.3'\n sha1 '0bd1d9d5b1da69b77217949b788597a952cbd846'\n link ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Little Snitch to 3.3.1\n"
},
{
"from": "human",
"value": "class LittleSnitch < Cask\n url 'http://www.obdev.at/downloads/LittleSnitch/LittleSnitch-3.3.dmg'\n homepage 'http://www.obdev.at/products/littlesnitch/index.html'\n version '3.3'\n sha256 '1b74901... | ruby | chosen |
[
{
"from": "system",
"value": "Make the path for a UNIX domain socket shorter as it is quite limited on Linux\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../../../shared/file/socket', __FILE__)\nrequire 'socket'\n\ndescr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix some bugs for I18n fallbacks\n"
},
{
"from": "human",
"value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# the COPYRIGHT file.\n\n# The default locale is :en and all tra... | ruby | chosen |
[
{
"from": "system",
"value": "Make order of test output irrelevant and beautify comparisons\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire \"buildlog_analyzer_dispatcher\"\n\nclass SystemTest < Minitest::Test\n\n def make_comparison(dir)\n dispatcher = BuildlogAnaly... | ruby | chosen |
[
{
"from": "system",
"value": "Support Rails 4 UnknownFormat in CustomErrors\n"
},
{
"from": "human",
"value": "module Outpost\n module Controller\n module CustomErrors\n extend ActiveSupport::Concern\n \n included do\n rescue_from StandardError, with: ->(e) { render_err... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage to gemspec and update file manifests to use git\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire File.expand_path('../lib/plucky/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'plucky'\n s.homepage = 'http://g... | ruby | chosen |
[
{
"from": "system",
"value": "Add encoding comment to gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"spikor-forge\"\n s.version = '0.1.0'\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Erik Dalén\"]\n s.email = [\"dalen@spo... | ruby | chosen |
[
{
"from": "system",
"value": "Change displaying order on articles index\n"
},
{
"from": "human",
"value": "class ArticlesController < ApplicationController\n\n before_filter :authenticate_user!, :only => [:new, :create]\n\n def index\n @articles = Article.all\n end\n\n def show\n @arti... | ruby | chosen |
[
{
"from": "system",
"value": "Add /usr/local/bin path, fix multiplots\n"
},
{
"from": "human",
"value": "class GnuplotMate\n \n def path\n possible_paths = [ENV[\"TM_GNUPLOT\"], `which gnuplot`, \"/opt/local/bin/gnuplot\", \"/sw/bin/gnuplot\"]\n possible_paths.select { |x| x && File.exis... | ruby | chosen |
[
{
"from": "system",
"value": "Add json rendering to sessions controller\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n\n def new\n\n end\n\n def create\n @user = User.find_by_username(params[:session][:username])\n if @user && @user.authenticate(pa... | ruby | chosen |
[
{
"from": "system",
"value": "Add make_user_results to Tasting create route\n"
},
{
"from": "human",
"value": "class TastingsController < ApplicationController\n\n # redirect back to events show_quiz method\n def create\n event_wine = EventWine.find(params[:event_wine_id])\n event = even... | ruby | chosen |
[
{
"from": "human",
"value": "Add create user api `PUT /v3/profile`\n"
},
{
"from": "gpt",
"value": "class V3::UsersController < V3::ApiController\n if ENV['BASIC_AUTH_USERNAME'].present? && ENV['BASIC_AUTH_PASSWORD'].present?\n http_basic_authenticate_with name: ENV['BASIC_AUTH_USERNAME'],\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change relative require paths to absolute paths\n\nhttp://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/24155\n"
},
{
"from": "human",
"value": "require 'rake'\nrequire 'fileutils'\nrequire 'lib/premailer'\n\ndesc 'Default: parse a URL.'\ntask :default => [:i... | ruby | chosen |
[
{
"from": "system",
"value": "Add another interval for the cache worker\n"
},
{
"from": "human",
"value": "class CacheSyncinatorWorker\n include Sidekiq::Worker\n include Sidetiq::Schedulable\n\n recurrence { hourly.minute_of_hour(0, 5, 30, 45) }\n\n def perform\n Syncinator.all.each do |... | ruby | chosen |
[
{
"from": "system",
"value": "Fix when recievers is empty\n"
},
{
"from": "human",
"value": "class Check\n include Mongoid::Document\n include Mongoid::Timestamps\n\n TYPES = %w(http tcp heartbeat).freeze\n\n field :name, type: String\n field :uri, type: String\n field :type, type: String\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug to create node modules directory\n"
},
{
"from": "human",
"value": "execute \"Install git\" do\n command \"apt-get update\"\n user \"root\"\nend\n\nexecute \"Clean node_modules\" do\n if File.directory?('/var/www/html/node_modules')\n comma... | ruby | chosen |
[
{
"from": "system",
"value": "Use the inflector available to me!\n"
},
{
"from": "human",
"value": "module Representations\n class Base\n def ordinalize(number)\n suffix =\n case number.to_s.split(\"\").last\n when \"1\"; \"st\"\n when \"2\"; \"nd\"\n when \"... | ruby | chosen |
[
{
"from": "system",
"value": "Update the gemspec to avoid bundler warnings.\n\nSince the task file moved in f7064cea41dd0aaedcee22942ad6277942fd71d4,\nwe need to tell the gemspec. Otherwise, bundler issues the following\nwarning:\n\n Using simpleconfig (1.1) from http://github.com/lukeredpath/simpleconfi... | ruby | chosen |
[
{
"from": "system",
"value": "Add more tests to query cache\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Mongoid::QueryCache do\n\n context \"when querying in the same collection\" do\n\n before do\n Band.all.to_a\n end\n\n context \"with same selector\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Add more unimplemented features as empty tests\n"
},
{
"from": "human",
"value": "require 'cabinet'\n\ndescribe Cabinet::Local do\n cl = Cabinet::Local.new('/tmp')\n file_name = 'cabinet.test'\n file_content = (0...50).map{('a'..'z').to_a[rand(26)]}.... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for the main api methods of Commons.rb\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\nrequire \"#{Rails.root}/lib/commons\"\n\ndescribe Commons do\n describe '.get_uploads' do\n it 'should get upload data for a user with many uploads' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add and modify User unit tests\n\nAdd validations and property specs\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe User do\n it 'has valid factory' do\n expect(FactoryGirl.build(:user)).to be_valid\n end\n\n it 'responds to email' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove use of `let` in specs for compatibility\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\nrequire 'quantum_leap'\n\ndescribe Quantum do\n\n after do\n Quantum.leap_back\n end\n\n describe '.leap' do\n describe 'without a block' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix unicorn stuff for deployment\n"
},
{
"from": "human",
"value": "def template(from, to)\n erb = File.read(File.expand_path(\"../templates/#{from}\", __FILE__))\n put ERB.new(erb).result(binding), to\nend\n\ndef set_default(name, *args, &block)\n set(name, *arg... | ruby | chosen |
[
{
"from": "system",
"value": "Make the dependency on static less annoying.\n\nThis mirrors the convention established in whitehall: the preview server is\nused by default so that you only have to start up one server. If you want to\noverride this, set STATIC_DEV to a local server.\n"
},
{
"from": "h... | ruby | chosen |
[
{
"from": "system",
"value": "Enable RailsAdmin audit adapter actions\n"
},
{
"from": "human",
"value": "RailsAdmin.config do |config|\n config.main_app_name = [\"Life Is Leet\", \"Admin\"]\n\n ### Popular gems integration\n\n ## == Devise ==\n config.authenticate_with do\n warden.authent... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the autoloading error (circular dependency)\n\nSolution found at: https://github.com/sferik/rails_admin/issues/1697\n\nSigned-off-by: Siddharth Kannan <805f056820c7a1cecc4ab591b8a0a604b501a0b7@gmail.com>\n"
},
{
"from": "human",
"value": "RailsAdmin.config do |c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec in compare gpa spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule CodeclimateCi\n describe CompareGpa do\n let(:codeclimate_ci) { CodeclimateCi::CompareGpa.new('repo11', 'token1') }\n\n before do\n allow_any_instance_of(ApiR... | ruby | chosen |
[
{
"from": "system",
"value": "Increase version from 0.0.1.3 to 0.0.1.4\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'schema'\n s.summary = \"Primitives for schema and structure\"\n s.version = '0.0.1.3'\n s.description = ' '\n\n s.au... | ruby | chosen |
[
{
"from": "system",
"value": "Return first css path when route index is nil\n"
},
{
"from": "human",
"value": "require 'erb'\nmodule CriticalPathCss\n class Configuration\n def initialize(config)\n @config = config\n end\n\n def base_url\n @config['base_url']\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for modification of passed control_col option\n\nIn the markdown_textarea cell, when we attempt to build the form group\nusing the provided rails-bootstrap-forms form object, that gem then\ntries to call `#concat` on our passed in `control_col` option:\n\nhttps://github.c... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependencies to gemspec file\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'html5-beautifier/version'\n\nGem::Specification.new do |gem|\... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as development dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"word_guesser/version\"\n\nGem::Specification.new do |s|\n s.name = \"word-guesser\"\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add depot abilities and remove default comments.\n"
},
{
"from": "human",
"value": "class Ability\n include CanCan::Ability\n\n def initialize(user)\n # Create guest user aka. anonymous (not logged-in) when user is nil.\n user ||= User.new\n\n if user.has... | ruby | chosen |
[
{
"from": "system",
"value": "Rename proxy variable with an ENV variable\n"
},
{
"from": "human",
"value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\nuse Rack::Deflater\nrun Rails.application\n\nrequire ... | ruby | chosen |
[
{
"from": "human",
"value": "Add formula for Distribute for Python.\n\n\"Distribute\" is a \"setuptools\" replacement for Python, and is\na prequisite for \"pip\". Homebrew suggests using pip to install\nPython modules required by a few brews.\n\nThis brew, by design, will only install against a Homebrew-bu... | ruby | chosen |
[
{
"from": "system",
"value": "Change the tag and the version of podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"KDLoadingView\"\n s.version = \"1.0.0\"\n s.summary = \"A beautiful loading indicator inspired by material design.\"\n s.description ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Kobo.app for Japanese version (3.5.2)\n"
},
{
"from": "gpt",
"value": "class KoboJp < Cask\n url 'http://download.kobobooks.com/desktop/RakutenBooks/KoboSetup.dmg'\n homepage 'http://kobo.rakuten.co.jp'\n version 'latest'\n no_checksum\n link 'Kobo.app'\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for latest version of js-test-core.\n"
},
{
"from": "human",
"value": "dir = File.dirname(__FILE__)\nrequire \"#{dir}/lib/screw_unit\"\nScrewUnit::Server.standalone_rackup(self, \"SCREW_UNIT_SPEC_ROOT\", \"SCREW_UNIT_PUBLIC\")"
},
{
"from": "gpt",
"v... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.