conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix issue with generator naming\n"
},
{
"from": "human",
"value": "require 'rails/generators/base'\n\nmodule JWTKeeper\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../../../templates', __FILE__)\n\n # Copies the default c... | ruby | chosen |
[
{
"from": "system",
"value": "Update chefstyle requirement from = 2.0.9 to = 2.1.0\n\nUpdates the requirements on [chefstyle](https://github.com/chef/chefstyle) to permit the latest version.\n- [Release notes](https://github.com/chef/chefstyle/releases)\n- [Changelog](https://github.com/chef/chefstyle/blob/... | ruby | chosen |
[
{
"from": "human",
"value": "spec: Add a test for INTEROP-6784\n\nChange-Id: I73d6bcf30e177fd3d498d0dc70541e2b84c53eb5\nReviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270567\nTested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>\nQA-Review: Tucker Mcknight <... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"You must set config.secret_key_base in your app's config\""
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\nrequire 'devise_security_extension'\n\nif defined?(Bundler)\n # If you precompile assets before d... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem version to 1.6.2\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"dta_rapid\"\n spec.version = \"1.6.1\"\n spec.authors = [\"Gareth Rogers\", \"Andrew Carr\", \"Matt Chamberlain... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib file to gem:)\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = \"simple-time-select\"\n s.version = \"0.3\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.respond_to? :required... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a breaking test. Want to keep these working until we switch over to specs entirely.\n\n\ngit-svn-id: 30fef0787527f3d4b2d3639a5d6955e4dc84682e@103 c18eca5a-f828-0410-9317-b2e082e89db6\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../test_h... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with terminal not reverting to normal after running\n"
},
{
"from": "human",
"value": "require 'io/console'\n\nmodule PassFail\n\n def pass?\n begin\n system(\"stty raw -echo -icanon isig\")\n str = STDIN.getc.chr\n if str.chr == \"p\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib directory as default place for required files\n"
},
{
"from": "human",
"value": "#### Food Finder ####\n#\n# Launch this ruby file from the command line\n# to get started.\n#\n\nAPP_ROOT = File.dirname(__FILE__)\n\nrequire File.join(APP_ROOT, 'lib', 'guide')... | ruby | chosen |
[
{
"from": "system",
"value": "Change the order of plugins\n"
},
{
"from": "human",
"value": "$:.unshift(File.expand_path(File.dirname(__FILE__), \"config\"))\n$:.unshift(File.expand_path(File.dirname(__FILE__), \"app\"))\nrequire 'setup'\n\nCinch::Bot.new do\n configure do |c|\n c.server ... | ruby | chosen |
[
{
"from": "human",
"value": "Add some basic unit tests for the Strategy base class"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'doorkeeper/request/strategy'\n\nmodule Doorkeeper\n module Request\n describe Strategy do\n let(:server) { double }\n subject(:strategy)... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests to ensure proper behavior of the Multiplication Table Class\n"
},
{
"from": "human",
"value": "require_relative '../lib/multiplication_table.rb'\n\ndescribe MultiplicationTable do\n it 'outputs a prime multiplication table to a matrix'\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for reading Deadlines.recruiting_term\n\nWe currently don't actually use the recruiting_term anywhere, but it may find its way back into emails again at some point.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Improve err message in case of concurrent update\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Api::V1::ApiMdaUpdaterController < Api::ApiController\n def check_mda_update\n raise Api::StaleObjectError.new(\"Analysis has been updated ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle properly an invalid parameter"
},
{
"from": "human",
"value": "module GobiertoBudgets\n class PagesController < GobiertoBudgets::ApplicationController\n skip_before_action :authenticate, only: [:request_access]\n\n def home\n end\n\n def about\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add zap stanza to iterm2 beta\n\nUpdate license and homepage URL"
},
{
"from": "human",
"value": "cask :v1 => 'iterm2-beta' do\n version '2.9.20150626'\n sha256 '18cf11393ed81d351d739257185bc33414c440c4281e576f9d0b54405970f902'\n\n url 'https://iterm2.com/downloa... | ruby | chosen |
[
{
"from": "system",
"value": "Make plugin use full path\n"
},
{
"from": "human",
"value": "# Include hook code here\n\nrequire File.dirname(__FILE__) + \"lib/emailthing\"\nrequire \"net/http\"\nrequire \"action_mailer\"\n\nclass ActionMailer::Base\n include Emailthing\n @@emailthing_settings ... | ruby | chosen |
[
{
"from": "system",
"value": "Use absolute URL in feed items.\n"
},
{
"from": "human",
"value": "module GalleriesHelper\n def feed_item_content(picture)\n image_tag(picture.image.url(:medium), title: picture) +\n content_tag(:p, link_to(\"This picture is part of the #{@gallery} gallery ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce the number of suggestions with given number of recommendations\n"
},
{
"from": "human",
"value": "class CombinedSearch\n attr_accessor :error\n\n def initialize(full_query)\n @full_query = full_query\n @error = false\n end\n\n def search\n { reco... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec and version dependency of Globalize\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"globalize-validations/version\"\n\nGem::Specification.new do |s|\n s.name = \"globa... | ruby | chosen |
[
{
"from": "system",
"value": "Update WhatPulse from v2.5 -> v2.6"
},
{
"from": "human",
"value": "cask :v1 => 'whatpulse' do\n version '2.5'\n sha256 '415ed3d29aa233b1dc77653a29be2191a91687a04f96a43b94012377c9e5e933'\n\n url \"http://amcdn.whatpulse.org/files/whatpulse-mac-#{version}.dmg\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the index of courses render straight json"
},
{
"from": "human",
"value": "class CoursesController < ApplicationController\n \n def index\n @courses = Course.all\n\n respond_to do |format|\n format.html \n format.json {render json: @courses}\n... | ruby | chosen |
[
{
"from": "system",
"value": "Call private method to set snippet\n"
},
{
"from": "human",
"value": "class SnippetsController < ApplicationController\n\n def index\n # displays all snippets based on new or popularity\n end\n\n def new\n # show new snippet form\n end\n\n def create\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow setting of visualizations root path from module settings\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoVisualizations\n def self.root_path(current_site)\n Rails.application.routes.url_helpers.gobierto_visualizations_roo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix lookup tables to not use a default scope\n"
},
{
"from": "human",
"value": "class LocationReferenceType < ActiveRecord::Base\n \n # default scope\n default_scope { where(:active => true) }\n\n def to_s\n name\n end\n \nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add next_id and prev_id to project serializer\n"
},
{
"from": "human",
"value": "class ProjectSerializer < ActiveModel::Serializer\n attributes :id, :name, :description\n has_many :tasks_by_priority, key: 'tasks'\n has_many :messages\nend\n"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Update task factory to use traits\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :tasks_task, aliases: [:task], class: 'Tasks::Task' do\n association :taskable, factory: :verification\n\n trait(:with_verification) { association :taskable, ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow attributes to be blank so that their validations don't trigger in unrelated specs.\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\n\nclass UserTest\n include ActiveModel::Validations\n\n @@valid_permissio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warnings (update rspec matcher protocol)\n"
},
{
"from": "human",
"value": "\nif defined?(ActiveModel)\n def be_able_to(actions, object, name = nil)\n CancanMatcher.new(actions.is_a?(Array) ? actions : [actions], object, name)\n end\nend\n\nclas... | ruby | chosen |
[
{
"from": "human",
"value": "Test for displaying Trap Number\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1381969\n(transferred from ManageIQ/manageiq@50073d6bd725b8cbeea87b6aa02a5e550a48e320)\n"
},
{
"from": "gpt",
"value": "describe \"miq_policy/_alert_details.html.haml\" do\n before do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6642svn\n\nHandBrakeCLI Nightly Build 6642svn released 2014-12-22.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6605svn'\n sha256 '0c4da5c55355c5f6b8d59caa8a01bcfd5c06721b83a1bb9e09b7123c32aabd... | ruby | chosen |
[
{
"from": "system",
"value": "Prepare gemspec for 1.0.0 release\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/formatize/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'formatize'\n s.version = Formatize::VERSION\n\n s.author = 'David Heinemeier Hansso... | ruby | chosen |
[
{
"from": "system",
"value": "Disable added feature test for consistency"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.feature 'PVB1 old links', js: true do\n it 'renders an appropiate message' do\n visit(pvb1_status_path(id: 'old-id'))\n\n expect(page).to have_text('Vi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix variable numbers to use normal case\n\nVariable numbers were not using normal case. This was not in-line with\nour style guide. Fixed the variable numbers to use normal case.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire \"spec_helper... | ruby | chosen |
[
{
"from": "system",
"value": "Fix empty raw post data in ruby\n"
},
{
"from": "human",
"value": "module {{.Pkg.name}}\n\n module HttpClient\n\n # RequestHandler takes care of encoding the request body into format given by options\n class RequestHandler\n\n def self.set_body(options)\... | ruby | chosen |
[
{
"from": "system",
"value": "Increment version from 0.2.1.0 to 0.2.1.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'ops_genie_client'\n s.version = '0.2.1.0'\n s.summary = 'Client for the OpsGenie API using the Obsidian HTTP client'\... | ruby | chosen |
[
{
"from": "system",
"value": "Update date for longer run\n"
},
{
"from": "human",
"value": "require 'nokogiri'\nrequire 'open-uri'\nrequire 'mongo'\nrequire 'JSON'\n\ninclude Mongo\n\nmongo_client = MongoClient.new(\"localhost\", 27017)\ndb = mongo_client.db(\"kexp\")\ncoll = db.collection(\"pla... | ruby | chosen |
[
{
"from": "system",
"value": "[Cosmetics] Create an empty file to show upload.\n\nA xxx.gpx.uploaded file is going to be created right next\nto the uploaded file so that we know it has been uploaded without\nlooking at the logs.\n"
},
{
"from": "human",
"value": "require 'daemons'\nrequire 'temp... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec to ensure Javascript is filtered\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ApplicationHelper do\n describe '#markdown' do\n context 'string without HTML code' do\n let(:markdown_string) { '**hello**' }\n\n it 'rend... | ruby | chosen |
[
{
"from": "system",
"value": "Test password parameter for x509_cert\n"
},
{
"from": "human",
"value": "require 'puppet'\nrequire 'puppet/type/x509_cert'\ndescribe Puppet::Type.type(:x509_cert) do\n subject { Puppet::Type.type(:x509_cert).new(:path => '/tmp/foo') }\n\n it 'should not accept a n... | ruby | chosen |
[
{
"from": "system",
"value": "Update link to homepage in podspec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'RxKeyboard'\n s.version = '0.4.1'\n s.summary = 'Reactive Keyboard in iOS'\n s.homepage = 'https://github.com/devxoul/RxKey... | ruby | chosen |
[
{
"from": "system",
"value": "Return false when bad rate\n"
},
{
"from": "human",
"value": "module ActiveTax\n module States\n class WA\n API_URI = \"http://dor.wa.gov/AddressRates.aspx\"\n\n def self.tax(address={})\n # http://dor.wa.gov/AddressRates.aspx?output=text&addr=6... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hash lookup in link checker initializer\n"
},
{
"from": "human",
"value": "# This ENV var is only populated for the integration deployment environment.\nif ENV.has_key?(\"BASIC_AUTH_CREDENTIALS\")\n LinksChecker.authed_domains = { \"www.#{ENV['GOVUK_APP_DOMAIN'... | ruby | chosen |
[
{
"from": "system",
"value": "Use raw_commit helper for previous spec\n"
},
{
"from": "human",
"value": "describe Gash do\n let(:gash) { Gash.new(path) }\n\n it \"starts with an empty directory\" do\n gash.should be_empty\n end\n\n it \"should not be empty after a file has been added\" do... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a '1' that caused an error in method name\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire 'pathname'\nrequire 'figs/figfile'\ndesc 'Install Fig'\ntask :install do |task, args|\n base_dir = Pathname.new('.')\n locations = args.extras.empty? ? \"app... | ruby | chosen |
[
{
"from": "system",
"value": "Define license metadata in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'capistrano-rails-dbinit/version'\n\nGem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Add awesome print to make printing more awesome\n"
},
{
"from": "human",
"value": "\n# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"taco/version\"\n\nGem::Specification.new do |s|\n s.name = \"taco\"\n s.version = T... | ruby | chosen |
[
{
"from": "system",
"value": "Update codecov to version 0.5.1"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'lib/filewatcher'\nrequire_relative 'lib/filewatcher/version'\n\nGem::Specification.new do |s|\n s.name = 'filewatcher'\n s.version = ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove needless join from MyModuleGroup\n"
},
{
"from": "human",
"value": "class MyModuleGroup < ActiveRecord::Base\n include SearchableModel\n\n validates :name,\n presence: true,\n length: { maximum: 50 }\n validates :experiment, presence: true\n\n belon... | ruby | chosen |
[
{
"from": "system",
"value": "Switch price and times columns in payslip; style saldo lines.\n"
},
{
"from": "human",
"value": "class PayslipDocument < LetterDocument\n def salary_table(salary)\n head = [\n t_attr(:code, LineItem),\n t_attr(:title, LineItem),\n t_attr(:price, L... | ruby | chosen |
[
{
"from": "system",
"value": "Use namespace when referencing tasks\n"
},
{
"from": "human",
"value": "module RPCapistrano\n module Resque\n def self.load_into(configuration)\n configuration.load do\n after 'deploy:restart', 'rp:resque:load_god_config'\n after 'resque:load_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix feature test for kudo format\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass DashboardTest < Capybara::Rails::TestCase\n test \"shows relevant information\" do\n visit root_path\n\n within '#most-recent' do\n assert_content page, ... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve warning on assignment in conditional.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyEventStore\n class CorrelatedCommands\n\n def initialize(event_store, command_bus)\n @event_store = event_store\n @command_bus ... | ruby | chosen |
[
{
"from": "system",
"value": "Copy check_script_tags rake task from TC\n"
},
{
"from": "human",
"value": "namespace :i18n do\n\n desc \"Testing\"\n task test: :environment do\n puts \"Hello world\"\n end\n\nend\n"
},
{
"from": "gpt",
"value": "namespace :i18n do\n namespace :h... | ruby | chosen |
[
{
"from": "system",
"value": "Update homebrew formula for 0.2.1.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Dvm < Formula\n homepage 'http://fnichol.github.io/dvm'\n url 'https://github.com/fnichol/dvm/archive/v0.2.0.tar.gz'\n sha1 '509203b626f4b999418c15391f38c658a16d982c'... | ruby | chosen |
[
{
"from": "system",
"value": "Use app_name in redis to deploy to\n"
},
{
"from": "human",
"value": "require 'pry'\n\nmodule Workers\n class HerokuBuilder\n include Sidekiq::Worker\n\n def perform(user_id, url, version, options={})\n @user_id = user_id\n @url = url\n @versio... | ruby | chosen |
[
{
"from": "system",
"value": "Remove conditional definition to support preloaders, like spring\n"
},
{
"from": "human",
"value": "require 'fivemat/elapsed_time'\n\nmodule Fivemat\n autoload :Cucumber, 'fivemat/cucumber'\n autoload :MiniTest, 'fivemat/minitest/unit'\n autoload :RSpec, 'fivemat... | ruby | chosen |
[
{
"from": "system",
"value": "Enable Rollbar only on production and staging environments\n"
},
{
"from": "human",
"value": "require 'rollbar/rails'\nRollbar.configure do |config|\n config.access_token = Cartodb.config[:rollbar_api_key]\n\n # Add exception class names to the exception_level_fil... | ruby | chosen |
[
{
"from": "system",
"value": "Drop deployment target and bump\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'PINOperation'\n s.version = '1.0.2'\n s.homepage = 'https://github.com/pinterest/PINOperation'\n s.summary = 'Fast, concurrency-limited ... | ruby | chosen |
[
{
"from": "system",
"value": "fix(deprecation): Use _(obj).must_equal instead. This will fail in Minitest 6.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass FakeCalculator\n def add(x, y)\n x + y\n end\n\n def mal(x, y)\n x * y\n end\nend\n\ndescribe FakeCalculator d... | ruby | chosen |
[
{
"from": "system",
"value": "[BUGFIX] Use the correct gem name in features"
},
{
"from": "human",
"value": "When /^this gem is installed in that application$/ do\n gempath = File.expand_path('../../../', __FILE__)\n step \"I append to \\\"Gemfile\\\" with \\\"gem 'plugin-demo', :path => '#{ge... | ruby | chosen |
[
{
"from": "system",
"value": "[CocoaPods] Fix podspec for RxSwift 3.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"RxPermission\"\n s.version = \"1.0.0-beta.2\"\n s.summary = \"RxSwift bindings for Permissions API in iOS.\"\n s.descriptio... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the java cookbook version dependency in zookeeper\n\n\nFormer-commit-id: 1d2a1582cbd3f5a6f1ce5ded7e687c4957abd368 [formerly 9067d21018fb734b356a58f7522d6dea1a49f64f] [formerly 90f8f91101c433fb5c29a148ba89385b66559c10 [formerly a0a1cf1e707e80fd5dcc38cc9ddece5c601f3df0]]\nFor... | ruby | chosen |
[
{
"from": "system",
"value": "Update out of date pod spec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'SSZipArchive'\n s.version = '0.2.3'\n s.summary = 'Utility class for zipping and unzipping files on iOS and Mac.'\n s.homepage = 'h... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ES search results size to 10000\n"
},
{
"from": "human",
"value": "# This class tries to reproduce an ActiveRecord relation\nclass ElasticsearchRelation\n def initialize(params = {})\n @params = params\n end\n\n def offset(x)\n @params[:from] = x\n @... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug for form_for\n"
},
{
"from": "human",
"value": "class Story < Empirical::Client::Endpoints::Activity\n\n # attributes :body, :instructions\n\n attr_accessor :chunks, :parsed\n\n def assessment\n self\n end\n\n def chunks\n @chunks ||= GrammarChu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with RVM not being loaded correctly for Bundler\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(:must_exist).load do\n\n begin\n require 'rvm/capistrano'\n\n _cset :rvm_ruby_string, :release_path\n rescue LoadError\n puts \... | ruby | chosen |
[
{
"from": "system",
"value": "Use class_attribute instead of deprecated class_inheritable_accessor.\n"
},
{
"from": "human",
"value": "module LybSidebar\n module Controller\n extend ActiveSupport::Concern\n \n included do\n class_inheritable_accessor :sidebars\n end\n\n modu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix listing of test files in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$: << File.expand_path('../lib', __FILE__)\nrequire 'spreewald_support/version'\n\nGem::Specification.new do |gem|\n gem.authors = [\"Tobias Kraze\"]\n gem.ema... | ruby | chosen |
[
{
"from": "system",
"value": "Use https instead of http due to redirection\n"
},
{
"from": "human",
"value": "module SocialShares\n class Linkedin < Base\n URL = 'http://www.linkedin.com/countserv/count/share'\n\n def shares!\n response = get(URL, {\n params: {\n url:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where updating spatial caches would fail\n\nClass names were read as strings from the database, but were not correctly handled by utils.rb normalization methods.\n"
},
{
"from": "human",
"value": "module SpatialFeatures\n module Utils\n extend self\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rails-i18n gem as dependency\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\nrequire 'active_portal/version'\n\nGem::Specification.new do |s|\n s.name = 'activeportal'\n s.version = ActivePortal::VERSION\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add searching by tags to Idea model\n\nIdeas can be searched by their associated tags.\n"
},
{
"from": "human",
"value": "class Idea < ActiveRecord::Base\n\n belongs_to :owner, :class_name => 'User'\n\n has_many :comments, -> { order(created_at: :asc) }, :dependen... | ruby | chosen |
[
{
"from": "human",
"value": "Add preliminary attempt at doing type checking.\n"
},
{
"from": "gpt",
"value": "module Antidote\n class TypeError < StandardError\n def initialize(types)\n #@message = message\n @actual_type, @expected_type, @variable_name, @method_name = types\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to support 1.0.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CCLogSystem\"\n s.version = \"1.0.0\"\n s.summary = \"A Log system for iOS.\"\n s.description = <<-DESC\n This library provi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migrations, and still guarantee GrantStatus id=1\n"
},
{
"from": "human",
"value": "class GrantStatus < ActiveRecord::Base; end\n\nclass AddGrantStatusData < ActiveRecord::Migration\n def up\n GrantStatus.delete_all\n GrantStatus.create(description: \"Inc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix import script to work with recent API changes\n"
},
{
"from": "human",
"value": "require \"nokogiri\"\n\ndoc = Nokogiri::HTML($stdin)\ndoc.css('#content p').each do |p|\n begin\n quote = Quote.from_raw_quote(p.content)\n quote.save!\n rescue Exception =>... | ruby | chosen |
[
{
"from": "system",
"value": "Add name and password validations to User model\n\nUsers are requires to have a unique name and an encrypted password.\nRails should not attempt to create a record if these fields are not\nfilled out in the devise registration form.\n"
},
{
"from": "human",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations for signup page.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n belongs_to :movie\n belongs_to :movietheater\n has_many :tickets\n\n has_secure_password\nend\n"
},
{
"from": "gpt",
"value": "class User < ActiveRe... | ruby | chosen |
[
{
"from": "system",
"value": "Add a temporary Current_User method\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n belongs_to :district\n has_many :candidates\n\n has_many :observers, :class_name => \"Watching\", :foreign_key => \"observer_id\"\n has_many :subjects, :clas... | ruby | chosen |
[
{
"from": "system",
"value": "Update required version of gem_publisher.\n\nThis fixed a couple of issues with version matching when publishing\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to point to version that actually has some classes in it\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'Fetchable'\n spec.version = '0.0.1'\n spec.summary = 'Coming soon to a table (or collection) view near... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation identified by Rubocop\n\n"
},
{
"from": "human",
"value": "class SkillsController < ApplicationController\n def show\n @skill = skill\n @coaches = Member.includes(:skills)\n .with_skill(skill)\n .pagin... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation for EnomAPI RuntimeError classes\n"
},
{
"from": "human",
"value": "require 'xml'\nrequire 'demolisher'\n\nmodule EnomAPI\n autoload :Client, File.dirname(__FILE__) + '/enom-api/client.rb'\n autoload :Interface, File.dirname(__FILE__) + '/enom-ap... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify Location implementation using Struct\n"
},
{
"from": "human",
"value": "module ATDIS\n class Location\n attr_accessor :address, :lot, :section, :dpsp_id\n\n def self.interpret(data)\n l = Location.new\n l.address = data[:address]\n if ... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite load_file to use IO instead of StringIO. Way faster.\n"
},
{
"from": "human",
"value": "\nrequire 'strscan'\n\nmodule BEncode\n # Encodes the Ruby object +obj+ into a bencoded string.\n #\n # @param [Hash, Array, Integer, String] obj the object to encode\... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude all tax adjustments in item building\n\nIncluded taxes are ignored here, and the additional tax total is is handled separately.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass PaypalItemsBuilder\n def initialize(order)\n @order ... | ruby | chosen |
[
{
"from": "system",
"value": "Use ch instead of chr for chromosome\n"
},
{
"from": "human",
"value": "module BioVcf\n\n # This is some primarily RDF support - which may be moved to another gem\n\n module VcfRdf\n\n def VcfRdf::header\n print <<EOB\n@prefix rdf: <http://www.w3.org/1999/... | ruby | chosen |
[
{
"from": "system",
"value": "Add validations to Answer model\n"
},
{
"from": "human",
"value": "class Answer < ActiveRecord::Base\n belongs_to :user\n belongs_to :question\n has_many :votes, as: :votable\n has_many :comments, as: :commentable\n\n validates :content, presence: true, length:... | ruby | chosen |
[
{
"from": "system",
"value": "Update to 6.0.1 in library as well\n"
},
{
"from": "human",
"value": "#\n# Copyright (C) 2014-2016 Conjur Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix lambda syntax for Ruby 1.9\n"
},
{
"from": "human",
"value": "# Brimir is a helpdesk system to handle email support requests.\n# Copyright (C) 2012 Ivaldi http://ivaldi.nl\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to deal with new README files\n"
},
{
"from": "human",
"value": "require 'rubygems'\nSPEC = Gem::Specification.new do |s|\n s.name = \"yard\"\n s.version = \"0.2.1\"\n s.date = \"2007-05-20\"\n s.author = \"Loren Segal\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update release date in gemspec\n"
},
{
"from": "human",
"value": "require File.expand_path(File.dirname(__FILE__) + '/lib/yard')\nSPEC = Gem::Specification.new do |s|\n s.name = \"yard\"\n s.summary = \"Documentation tool for consistent and usable d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove type check for now\n"
},
{
"from": "human",
"value": "module Consequence\n module Utils\n def send_to_value(*args)\n ->(v) { v.send(*args) }\n end\n\n def send_to_monad(*args)\n ->(v, m) { m.send(*args) }\n end\n\n def type_check(*ar... | ruby | chosen |
[
{
"from": "system",
"value": "Fix invalid redirect when updating user\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n authorize_resource :class => false\n before_action :find_user, :only => [:edit, :update, :destroy]\n\n def index\n @users = User.all\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add some before filter guards\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_filter :prepare_user\n before_filter :prepare_user\n\n def show\n end\n\n def edit\n end\n\n def update\n if user.update_attributes para... | ruby | chosen |
[
{
"from": "system",
"value": "Add users_params for strong params. Modify new, create, update and destroy methods to perform those actions.\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_action :set_user, \n only: [\n :s... | ruby | chosen |
[
{
"from": "system",
"value": "Hide forked repos from profile pages"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def show\n find_user\n @repositories = @user.github_repositories.order('stargazers_count DESC').limit(10)\n @contributions = @user.github_... | ruby | chosen |
[
{
"from": "system",
"value": "Add the requires_login: true property to force login if trying to double-vote.\n"
},
{
"from": "human",
"value": "class VotesController < ApplicationController\n before_filter :fetch_vote, only: :destroy\n\n #TODO: this method is kinda tricky and should be tested\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug where Sinatra wouldn't work with certain file names\n"
},
{
"from": "human",
"value": "require 'find'\nrequire 'coderay'\n\n# We bring our own version of sinatra since it's not available as a gem yet\nrequire 'codebutler/sinatra'\n\nmodule CodeButler\n \n... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.