conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use RubyCritic's version as a cache key in the name of the revision file\n\nBasically without this change, updating to a new version of the gem\nwould sometimes cause things to blow up since in the Serializer we're\nloading old code with `Marshal.load`. This a terrible way to k... | ruby | chosen |
[
{
"from": "system",
"value": "Move mandb section sanitizing to RDoc generator.\n"
},
{
"from": "human",
"value": "require \"rubygems/command\"\nrequire \"rdoc\"\nrequire \"rdoc/generator/mdoc\"\n\nclass Gem::Commands::GmanCommand < Gem::Command\n def initialize\n super \"gman\", \"Generate a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec to add right executable script\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"tau/version\"\n\nGem::Specification.new do |s|\n s.name = \"tau\"\n s.version = Tau::VERSI... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for deployable validation\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Deployable do\n\n it \"should have automatically generated uuid after validation\" do\n d = Factory.build(:deployable)\n d.uuid = nil\n d.save\n d.u... | ruby | chosen |
[
{
"from": "system",
"value": "Modify pg search scope method to take one more field\n"
},
{
"from": "human",
"value": "class School < ActiveRecord::Base\n\tinclude PgSearch\n\tmultisearchable :against => [:dbn, :school]\n\tpg_search_scope :search_schools, \n\t\t\t\t\t\t\t\t\t:against => [:dbn, :s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove forgotten require of pry.\n"
},
{
"from": "human",
"value": "require 'pry'\n\nclass Search\n def self.find(query, opts = {})\n if plos?\n SearchPlos.new(query, opts).run\n elsif crossref?\n SearchCrossref.new(query, opts).run\n end\n end\... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for latest version\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'CacheIsKing'\n s.version = '0.0.2'\n s.license = 'MIT'\n s.summary = 'A simple cache that can hold anything, including Swift items'\n s.homepage = 'https://git... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec tag version specifier\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'FastEasyMapping'\n spec.version = '1.0'\n spec.summary = 'Fast mapping from JSON to NSObject / NSManagedObject and back'\n spec.homep... | ruby | chosen |
[
{
"from": "system",
"value": "Update Allegro dependency to 1.2.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Convertible\"\n s.version = \"1.0.9\"\n s.summary = \"Swift Framework For Conversions Between JSON, Data And More\"\n s.description = <<-DE... | ruby | chosen |
[
{
"from": "system",
"value": "Set default claimant to John Smith Reynolds\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 rake db:seed (or created alongside the db w... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad Answer create parameter\n"
},
{
"from": "human",
"value": "\n10.times do\n User.create(name: TubularFaker.name, password: '123')\nend\n\n10.times do\n question = Question.create(title: TubularFaker.company, content: TubularFaker.lingo, user: User.find(User... | ruby | chosen |
[
{
"from": "system",
"value": "Add definition check to PersonalInfoPolicySetting for safe.\n"
},
{
"from": "human",
"value": "class PersonalInfoPolicySetting\n attr_accessor :show, :title, :partial_name\n\n def initialize\n @show = PERSONAL_INFO_POLICY_SHOW\n @title = PERSONAL_INFO_POLIC... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up Mapping specs a bit\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule SteppingStone\n module TextMapper\n describe Mapping do\n describe \"#call\" do\n let(:receiver) { double(\"dispatch receiver\") }\n\n it \"invokes... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation in selenium browser error reporter"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass SeleniumBrowserErrorReporter\n SEVERE_LOG_LEVEL = 'SEVERE'\n\n def self.call(page)\n new(page).report!\n end\n\n def initialize(page)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to demonstrate faulty spread\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire \"spec_helper\"\n\ndescribe GraphQL::StaticValidation::FragmentsAreOnCompositeTypes do\n include StaticValidationHelpers\n\n let(:query_string) {%|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to automatically point to the last version\n\nOtherwise it’s quite easy to forget to update the commit pointer.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nPod::Spec.new do |s|\n s.name = 'MASShortcut'\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for API::Responder group of classes."
},
{
"from": "human",
"value": "require_relative '../../../test_helper'\n\nmodule Troo\n module API\n describe Response do\n let(:described_class) { Response }\n let(:parameters) { {} }\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Call user's rbenv bundle command directly\n"
},
{
"from": "human",
"value": "define :bundle_config do\n execute \"bundle config #{params[:name]}\" do\n user node['current_user']\n environment({\n 'PATH' => \"#{node['etc']['passwd'][node['current_user']][... | ruby | chosen |
[
{
"from": "system",
"value": "ENHANCE: Add tutorial enrolment in project factory\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :project do\n unit\n campus\n user\n\n after(:build) do |project|\n project.tutorial = FactoryGirl.create(:tutorial, campus: proje... | ruby | chosen |
[
{
"from": "system",
"value": "Test hash loading and saving of annotations\n"
},
{
"from": "human",
"value": "require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helper.rb')\nrequire 'rbbt/annotations'\n\nclass TestAnnotation < Test::Unit::TestCase\n def test_marshal\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add personal infos to the gemspec file.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"active_form/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Add routes for ajax and remove unneeded routes.\n"
},
{
"from": "human",
"value": "require 'redis'\nrequire 'sinatra'\nrequire 'sinatra/reloader'\n\nget '/' do\n redirect '/overview'\nend\n\nget '/overview' do\n erb :index\nend\n\nget '/details' do\n erb :details... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor the test a bit\n\nLess one off classes in the global scope and more open structs.\n\nWay more open structs.\n"
},
{
"from": "human",
"value": "require_relative '../../test_helper.rb'\nclass Comment\n def id\n 1 \n end\nend\n\nclass User\n def id\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add respond_to_missing to allow keys to fully act as methods \n"
},
{
"from": "human",
"value": "module SuperSettings\n # The SuperSettings::AutoCallable module allows an object mixing this module\n # in to override the method_missing. To use AutoCallable, your cl... | ruby | chosen |
[
{
"from": "system",
"value": "Raise the pod deployment target to 10.6.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.platform = :osx\n s.osx.deployment_target = \"10.5\"\n s.name = \"MASPreferences\"\n s.version = \"1.1.2\"\n s.summa... | ruby | chosen |
[
{
"from": "system",
"value": "Use phpunserialize in unit test\n\n`bundle exec rspec` to launch the test"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'spec_helper'\nrequire \"logstash/filters/phpunserialize\"\n\ndescribe LogStash::Filters::Phpunserialize do\n describe \"Set to Hel... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for BorgBackup.\n"
},
{
"from": "human",
"value": "cask 'borgbackup' do\n version '1.0.3'\n sha256 '72c13b51be987560159cb8801e1a7bdfa31d50225c2691a6f129859dc103f04e'\n\n url \"https://github.com/borgbackup/borg/releases/download/#{version... | ruby | chosen |
[
{
"from": "system",
"value": "Allow `require`-ing of vendored mappings to traverse symlinks\n\nThis should make deployment potentially easier in some cases, especially when\nworking with a local working copy not in a VM.\n"
},
{
"from": "human",
"value": "Dir[Rails.root.join('vendor/mappings/**/... | ruby | chosen |
[
{
"from": "system",
"value": "Remove checks to allow updating of config and service files.\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: dmon\n# Recipe:: start_frontend\n#\n# Copyright (c) 2016 Bogdan-Constantin Irimie, All Rights Reserved.\n\n# Create config file.\ntemplate node['star... | ruby | chosen |
[
{
"from": "system",
"value": "Change the deployment target to 8.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'PercentEncoder'\n s.version = '0.8.0'\n s.license = 'MIT'\n s.summary = 'PercentEncoder is a lightweight library to escape string using so called URL encoding... | ruby | chosen |
[
{
"from": "system",
"value": "Update Rome formula to v0.10.2.24\n"
},
{
"from": "human",
"value": "class Rome < Formula\n desc \"A shared cache tool for carthage on S3\"\n homepage \"https://github.com/blender/Rome\"\n url \"https://github.com/blender/Rome/releases/download/v0.10.1.22/rome.zi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo for STI column. Should be a string\n"
},
{
"from": "human",
"value": "require 'active_record/connection_adapters/abstract/schema_definitions'\n\nmodule ActsAsShoppingCart\n module Schema\n def shopping_cart_item_fields\n integer :owner_id # Holds... | ruby | chosen |
[
{
"from": "system",
"value": "Add options for view helper\n"
},
{
"from": "human",
"value": "module AlternateRails\n module ViewHelpers\n\n def alternate_url(new_params)\n url_for params.merge(new_params)\n end\n \n def alternate_button(format)\n icons = {\n json: 'ic... | ruby | chosen |
[
{
"from": "system",
"value": "Use the right base class\n"
},
{
"from": "human",
"value": "module Foreman\n module Export\n class Nginx\n VERSION = \"0.0.1\"\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module Foreman\n module Export\n class Nginx < Foreman::Expo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove date from the gemspec\n"
},
{
"from": "human",
"value": "require File.expand_path(\"../lib/active_record/safer_migrations/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"activerecord-safer_migrations\"\n gem.version = A... | ruby | chosen |
[
{
"from": "system",
"value": "Fix display of postgresql version info\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n def index\n @total_invoiced = Invoice.all.map{|i| i.total}.sum\n @total_payments_received = Payment.sum :amount\n @total_invoices_un... | ruby | chosen |
[
{
"from": "system",
"value": "Change default stock to 'Disponibile'\n"
},
{
"from": "human",
"value": "class TrovaprezziFeedHelper\n include Spree::Core::Engine.routes.url_helpers\n\n def initialize(variant, host)\n @variant = variant\n @product = variant.product\n @host = host\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Add json/jsonp service to enable cross-site usage.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler/setup'\nBundler.require :default, (ENV['RACK_ENV'] || :development)\n\nrequire './update'\n\nconfigure do\n MONGO = Mongo::Connection.\n fr... | ruby | chosen |
[
{
"from": "system",
"value": "Make Rails requirements less restrictive.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"datatable_state/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificatio... | ruby | chosen |
[
{
"from": "system",
"value": "Put wikidata stats under a www.wikidata.org key in CourseStat\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_dependency \"#{Rails.root}/lib/wikidata_summary_parser\"\n\nclass UpdateWikidataStats\n def initialize(course)\n @course = c... | ruby | chosen |
[
{
"from": "system",
"value": "Allow update user without password\n"
},
{
"from": "human",
"value": "module Cdx\n module Admin\n class UsersController < ResourceController\n\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module Cdx\n module Admin\n class UsersController... | ruby | chosen |
[
{
"from": "human",
"value": "Add test script to extract version from URL/path.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/ruby\n$:.push(File.expand_path(__FILE__+'/../..'))\nrequire 'extend/pathname'\n\np = Pathname.new(ARGV[0])\nv = p.version\nputs v\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Bump to 1.0.1 after fixes and yanked version.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"access... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing \"private\" for strong parameters\n"
},
{
"from": "human",
"value": "class SearchController < ApplicationController\n def search\n @query = Query.new(search_params[:query])\n @query.site_id = current_site.id\n searcher = PostSearcher.new\n @... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"Move requirejs test to the appropriate gem\"\n\nThis reverts commit 67de0c0b73e31e46039e8815399b631a0d166014.\n"
},
{
"from": "gpt",
"value": "require \"./lib/html_mockup/release.rb\" \nrequire \"./lib/html_mockup/release/processors/requirejs\"\nrequire \"te... | ruby | chosen |
[
{
"from": "system",
"value": "Use after_create for test environments and after commit for rest.\n\nCommit '18cb7212f7' changed the NotificationsObserver trigger method\nto after_commit. In environments, such as cucumber where transactions\nare disabled, this means that the notifications_observer would never... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Schedule id to 4-digit\n"
},
{
"from": "human",
"value": "require 'securerandom'\n\nmodule Slappy\n class Schedule\n include Slappy::Debuggable\n\n class OverScheduleError < StandardError; end\n class InvalidFormatError < StandardError; end\n\n DEFA... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependencies: surrogate ~>0.5.3 (to enable rpsec 2.11)\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |gem|\n gem.authors = [\"Josh Cheek\"]\n gem.email = [\"josh.cheek@gmail.com\"]\n gem.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Access Worldwide API via whitehall-frontend\n\nTo simplify the migration of Whitehall to AWS, calls to the Worldwide\nAPI should be directed to whitehall-frontend, not whitehall-admin.\n\nCo-authored-by: Christopher Baines <c14e4e2094dd20d1d0dcfc7ec4547168bcc89be2@digital.cabin... | ruby | chosen |
[
{
"from": "system",
"value": "Use existing association to find stops\n"
},
{
"from": "human",
"value": "class Route < ApplicationRecord\n validates :number, presence: true, uniqueness: true\n has_many :bus_stops_routes\n has_many :bus_stops, through: :bus_stops_routes\n default_scope { order... | ruby | chosen |
[
{
"from": "system",
"value": "Add Childcare and Parenting prefix\n"
},
{
"from": "human",
"value": "class Theme\n def self.taxon_path_prefixes\n [\n '/education',\n ]\n end\nend\n"
},
{
"from": "gpt",
"value": "class Theme\n def self.taxon_path_prefixes\n [\n '/... | ruby | chosen |
[
{
"from": "system",
"value": "Support basic auth for k8s API\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nrequire 'active_support'\nrequire 'kubr'\n\n# Setup load paths\nBundler.require\n$: << File.expand_path('../', __FILE__)\n\nKubr.configure do |config|\n config.... | ruby | chosen |
[
{
"from": "system",
"value": "Enable serving static assets from the public dir\n"
},
{
"from": "human",
"value": "require 'roda'\nrequire 'rack/indifferent'\nrequire 'haml'\n\nclass App < Roda\n plugin :hooks\n plugin :render, engine: 'haml'\n plugin :json\n plugin :assets, css: 'application... | ruby | chosen |
[
{
"from": "system",
"value": "Add a simple healthcheck endpoint\n"
},
{
"from": "human",
"value": "require 'bundler'\n\nBundler.require\n\nrequire_relative 'lib/cartfile_parser'\n\nclass CarthageParser < Sinatra::Base\n use Rack::Deflater\n\n configure do\n set :dump_errors, false\n set ... | ruby | chosen |
[
{
"from": "system",
"value": "Order events in reverse time and use new finder methods\n"
},
{
"from": "human",
"value": "class EventsController < ApplicationController\n\n def index\n @events = Event.all(:include => :eventable).map{|event| event.eventable}\n end\n\nend\n"
},
{
"from... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test for invalid root operator error detail\n"
},
{
"from": "human",
"value": "require_relative 'helper'\n\ndescribe ConceptQL::Query do\n it \"should handle errors in the root operator\" do\n query(\n :foo\n ).annotate.must_equal(\n [\"invalid\... | ruby | chosen |
[
{
"from": "system",
"value": "Set cap roles to explicitly be primary.\n"
},
{
"from": "human",
"value": "# Deploy your application to TextDrive with...\n# cap deploy\n#\n# Or rollback with...\n# cap rollback\nrole :app, 'teamsquad.com'\nrole :web, 'teamsquad.com'\nrole :db, 'teamsquad.com'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to override the path after resending confirmation instructions.\n"
},
{
"from": "human",
"value": "class Devise::ConfirmationsController < ApplicationController\n include Devise::Controllers::InternalHelpers\n\n # GET /resource/confirmation/new\n def new\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Raise exception on missing Link Checker scores\n\nI am raising the no scores exception if there are no Link Checker metric\nresults to display.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>\n"
},
{
"from": "human",
"value": "cl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix logging of DM-generated SQL statements\n\nSigned-off-by: Alex Coles <60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcolesportfolio.com>\n"
},
{
"from": "human",
"value": "# Use Bundler (preferred)\nbegin\n require File.expand_path('../../.bundle/environment', __F... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated RR Adapter, silencing warning\n"
},
{
"from": "human",
"value": "if RUBY_PLATFORM == 'java'\n require 'rubygems'\nend\n\nif RUBY_VERSION >= \"1.9\" and ENV[\"SIMPLECOV\"]\n require 'simplecov'\n SimpleCov.start\nend\n\nrequire 'minitest/autorun'... | ruby | chosen |
[
{
"from": "system",
"value": "Remove out of date comment\n"
},
{
"from": "human",
"value": "require 'docker_cloud'\nrequire 'base64' # left out of DockerCloud gem\n\nmodule KumoDockerCloud\n class DockerCloudApi\n # Note: DockerCloud handles the options in a \"very\" different way.\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Use guard classes for ConfigSetupService.call\n"
},
{
"from": "human",
"value": "require 'test_changes/inferred_config'\n\nmodule TestChanges\n module ConfigSetupService\n def self.call\n config = Config.new('.test_changes.yaml')\n\n unless config.exis... | ruby | chosen |
[
{
"from": "system",
"value": "Add some debug logging for Slack.\n\nNot working on .com currently.\n"
},
{
"from": "human",
"value": "module Travis\n module Addons\n module Slack\n\n # Publishes a build notification to Slack rooms as defined in the\n # configuration (`.travis.yml`).... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration due to PG being strict on unique key constraint.\n\nTo allow adding a column we need to turn off its unique constraint first.\nAlso give order as id asc to ensure pos is correct.\n"
},
{
"from": "human",
"value": "class AddPosToPosts < ActiveRecord::Mi... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test for OCF\n"
},
{
"from": "gpt",
"value": "require_relative 'helper'\nrequire 'nokogiri'\nrequire 'epub/constants'\nrequire 'epub/maker/ocf'\n\nclass TestMakerOCF < Test::Unit::TestCase\n def setup\n @container = EPUB::OCF::Container.new\n rootfile = ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Deployment Target specified in podspec\n\nSomewhere in the past we have bumped Deployment Target for the framework\nto 10.10, but forgot to also bump the Deployment Target setting in the podspec,\nleading to CocoaPods building the framework with different options. This lead... | ruby | chosen |
[
{
"from": "system",
"value": "Add a note about building header files\n"
},
{
"from": "human",
"value": "Jekyll::Hooks.register :posts, :post_render do |post|\n if post[\"theme\"] && post[\"theme\"][\"color\"]\n color = post[\"theme\"][\"color\"]\n mainfile = \"theme/style_#{color}.scss\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Add myself to the gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"aac_translation/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow pushes to ruby gems\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'unit_trust/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix indentation for Spree::Auth.config method\n"
},
{
"from": "human",
"value": "require 'spree_core'\nrequire 'devise'\nrequire 'cancan'\n\nrequire 'spree/token_resource'\n\nmodule Spree\n module Auth\n\t\tdef self.config(&block)\n\t yield(Spree::Auth::Config)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add methos to send mail to users from today draw\n"
},
{
"from": "human",
"value": "class Notifier < ActionMailer::Base\n default from: \"donotreply@lotifyme.co\"\n layout 'mailer'\n\n def welcome_email(user)\n @user = user\n mail(to: @user.email, subject:'... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in seed for authors\n"
},
{
"from": "human",
"value": "after 'development:sites' do\n site1 = Site.find_by!(name: 'site1')\n\n site1.authors.create!(\n name: 'name11',\n description: \"description11\"\n )\n site1.authors.create!(\n name: 'nam... | ruby | chosen |
[
{
"from": "system",
"value": "Add display name for acmg codes\n"
},
{
"from": "human",
"value": "class AcmgCode < ActiveRecord::Base\n has_and_belongs_to_many :assertions\n\n def name\n code\n end\nend\n"
},
{
"from": "gpt",
"value": "class AcmgCode < ActiveRecord::Base\n has_... | ruby | chosen |
[
{
"from": "system",
"value": "Stop type maps type codes to modes of transport\n"
},
{
"from": "human",
"value": "class StopType < ActiveRecord::Base\n belongs_to :transport_mode\nend\n"
},
{
"from": "gpt",
"value": "# == Schema Information\n# Schema version: 20100414172905\n#\n# Tab... | ruby | chosen |
[
{
"from": "human",
"value": "Create get_suggestion program to intereact with the suggestions endpoints of the twitter API\n"
},
{
"from": "gpt",
"value": "require_relative '../requests/UsersSuggestions'\nrequire_relative '../requests/UsersSuggestionsCategories'\n\nrequire 'trollop'\n\nUSAGE = %Q... | ruby | chosen |
[
{
"from": "human",
"value": "Add example describer for FlockDB edges schema\n"
},
{
"from": "gpt",
"value": "class Innodb::RecordDescriber::Edges < Innodb::RecordDescriber\n def self.cursor_sendable_description(page)\n bytes_per_record = (page.record_space / page.page_header[:n_recs])\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Use `File.expand_path` instead of `File.join`\n\ncc/ @carlosantoniodasilva"
},
{
"from": "human",
"value": "require 'action_dispatch/routing/inspector'\n\nclass Rails::InfoController < ActionController::Base\n self.view_paths = File.join(File.dirname(__FILE__), 'te... | ruby | chosen |
[
{
"from": "system",
"value": "Make redirect spec for ETMoses independent of the domain name\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe TestingGroundsController do\n let(:scenario_mock) { ete_scenario_mock }\n let(:user){ FactoryGirl.create(:user) }\n\n describe \"#cr... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage property to gemspec\n\nThis makes it possible to find the project source and README from Rubygems"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$: << File.expand_path('../lib', __FILE__)\n\nrequire 'kafka/clients/version'\n\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec as a development 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 'attr_deprecated/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add Jeff Dean to pairs list\n"
},
{
"from": "human",
"value": "node.default[\"git_pairs_authors\"] = [\n {\"initials\" => \"mk\", \"name\" => \"Matthew Kocher\", \"shortname\" => \"mkocher\"},\n {\"initials\" => \"bc\", \"name\" => \"Brian Cunnie\", \"shortname\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Whitelist keys we will accept for config options"
},
{
"from": "human",
"value": "if File.exists?(\"#{::Rails.root.to_s}/config/mailer.yml\") || ::Rails.env == \"test\" || ::Rails.env == \"cucumber\"\n require \"action_mailer\"\n if ::Rails.env == \"test\" || ::Ra... | ruby | chosen |
[
{
"from": "system",
"value": "Set VCR to record once\n"
},
{
"from": "human",
"value": "require 'vcr'\nrequire 'webmock/cucumber'\n\nVCR.configure do |c|\n # Automatically filter all secure details that are stored in the environment\n ignore_env = %w{SHLVL RUNLEVEL GUARD_NOTIFY DRB COLUMNS USE... | ruby | chosen |
[
{
"from": "system",
"value": "Add version to podspec dependency\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"LVGSwiftSystemSoundServices\"\n s.version = \"2.0.1\"\n s.summary = \"A Swift wrapper around Audio Toolbox's System Sound Services... | ruby | chosen |
[
{
"from": "system",
"value": "Check if NSURLSessionTask is defined\n"
},
{
"from": "human",
"value": "module AFMotion\n class HTTPResult\n attr_accessor :operation, :object, :error, :task\n\n def initialize(operation_or_task, responseObject, error)\n if operation_or_task.is_a?(NSURLS... | ruby | chosen |
[
{
"from": "system",
"value": "Create an initializer for RawEvent\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'discordrb/events/generic'\n\n# Event classes and handlers\nmodule Discordrb::Events\n # Event raised when any dispatch is received\n class RawEvent < Ev... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect behaviour in YAML config loading\n\nFiles specified in YAML are set and not appended.\n"
},
{
"from": "human",
"value": "module Inch\n class Config\n # Stores the configuration for an individual single codebase\n class Codebase\n attr_reade... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect header nesting in redcarpet patch\n\nSpotted by @moizjv, thanks!\n"
},
{
"from": "human",
"value": "module RedcarpetHeaderFix\n def header(text, level, id)\n clean_id = id.gsub(/[\\.]/, '-').gsub(/[^a-zA-Z0-9\\-_]/, '')\n \"<h#{level} id='#{clea... | ruby | chosen |
[
{
"from": "system",
"value": "Update TODO notice with the correct nokogiri version\n"
},
{
"from": "human",
"value": "module Roadie\n class AssetScanner\n attr_reader :dom, :asset_providers\n\n def initialize(dom, asset_providers)\n @dom = dom\n @asset_providers = asset_provider... | ruby | chosen |
[
{
"from": "system",
"value": "Add alias method to display resource name simply\n"
},
{
"from": "human",
"value": "module Serverspec\n module Type\n class Base\n def initialize(name=nil)\n @name = name\n end\n\n def to_s\n type = self.class.name.split(':')[-1]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for flagging answers\n"
},
{
"from": "human",
"value": "class FlagsController < ApplicationController\n before_filter :login_required\n before_filter :moderator_required, :only => [:index, :dismiss]\n\n def index\n @flags = Flag.active.all\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove :email from previous debugging test.\n"
},
{
"from": "human",
"value": " class PicksController < ApplicationController\n\n def new\n @pick = Pick.new\n end\n\n\n\n def create\n @user = User.find_by(email: params[:pick][:email])\n if !@user\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add will_paginate functionality to the user controller\n\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n before_action :set_user, only: [:edit, :update, :destroy, :show]\n\n # GET /users\n def index\n @users = Use... | ruby | chosen |
[
{
"from": "system",
"value": "Add BETWEEN operator to query\n"
},
{
"from": "human",
"value": "module Riews\n class FilterCriteria < ApplicationRecord\n self.table_name = 'riews_filter_criterias'\n\n def self.operators\n {\n 1 => 'NULL',\n 2 => 'NOT NULL',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix redirect when submitting blank comment\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n before_action :authenticate_user!\n before_action :set_comment, only: [:show, :edit, :update, :destroy]\n\n def new\n @comment = Co... | ruby | chosen |
[
{
"from": "system",
"value": "Use `any` orientation for web app manifest.\n"
},
{
"from": "human",
"value": "class MetadataController < ApplicationController\n layout false\n skip_before_filter :preload_json, :check_xhr, :redirect_to_login_if_required\n\n def manifest\n render json: defaul... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing a revision key param"
},
{
"from": "human",
"value": "class IndexController < ApplicationController\n def show\n render text: redis.get(index_key)\n end\n\n private\n\n def index_key\n redis.get(params[:revision] || 'bus-detective:current')\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add some verification of whether the post submitted successfully or not\n"
},
{
"from": "human",
"value": "class PostsController < ApplicationController\n def show\n @post = Post.find(params[:id])\n end\n\n def new\n\n end\n\n def create\n begin\n po... | ruby | chosen |
[
{
"from": "system",
"value": "Add a destroy action for votes\n"
},
{
"from": "human",
"value": "class VotesController < ApplicationController\n before_filter :require_login\n\n def create\n @vote = current_user.votes.new(vote_params)\n if @vote.save\n render json: {\n content... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.