conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add required ruby 2 to gemfile and few deps\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'radriar/version'\n\nGem::Specification.new do |spec|\n spec... | ruby | chosen |
[
{
"from": "system",
"value": "Fix warning message in rails 3.0rc\n"
},
{
"from": "human",
"value": "if defined?(Rails::Application)\n # Rails3 routes\n Rails::Application.routes.draw do |map|\n match \"/#{Jammit.package_path}/:package.:extension\",\n :to => 'jammit#package', :as => :ja... | ruby | chosen |
[
{
"from": "system",
"value": "Call new endpoint on x-api\n"
},
{
"from": "human",
"value": "module ExercismAPI\n module Routes\n class Exercises < Core\n get '/exercises' do\n require_key\n if current_user.guest?\n halt 400, {error: \"Sorry—we can't figure out who... | ruby | chosen |
[
{
"from": "system",
"value": "Add link to printed text\n"
},
{
"from": "human",
"value": "class Restaurant\n attr_reader :name, :cuisine, :link\n\n def initialize(name, cuisine, link)\n @name = name\n @cuisine = cuisine\n @link = link\n end\n\n def self.parse(event)\n self.new(\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use double quotes for Ruby stuff\n"
},
{
"from": "human",
"value": "# Template engine\ngem 'haml-rails'\n\n# Test framework\ngem 'rspec-rails'\n\n# Linters\ngem 'rubocop'\ngem 'haml-lint'\ngem 'scss-lint'\n\n# Haml application layout\ngenerate('haml:application_layo... | ruby | chosen |
[
{
"from": "system",
"value": "Use class_eval so that our modifications actually get included."
},
{
"from": "human",
"value": "# Add some investigation functionality to the User model\nclass User < ActiveRecord::Base\n has_many :investigations\n has_many :activities\n has_many :sections\n ha... | ruby | chosen |
[
{
"from": "system",
"value": "Expand dependencies to include Rails 4.0.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"rticles/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused and empty method definition\n"
},
{
"from": "human",
"value": "module Capistrano\n module DSL\n module Stages\n\n def stages\n Dir[stage_definitions].map { |f| File.basename(f, '.rb') }\n end\n\n def infer_stages_from_stage_fi... | ruby | chosen |
[
{
"from": "system",
"value": "Add core dependency set tasks.\n"
},
{
"from": "human",
"value": "# base.rb\n\ndep 'homebrew-cask.lib' do\n installs 'brew-cask'\nend\n\ndep 'dropbox.cask'\n\ndep 'htop.bin' do\n installs 'htop-osx'\nend\n\ndep 'iterm2.cask'\n\ndep 'mvim.bin' do\n installs 'macvi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug with 'create: true' option\n"
},
{
"from": "human",
"value": "module KindleManager\n class Client\n include AmazonAuth::CommonExtension\n\n attr_accessor :adapter\n\n def initialize(options = {})\n @options = options\n @client = AmazonA... | ruby | chosen |
[
{
"from": "system",
"value": "Add with_tags method and delegate more array methods to lights\n"
},
{
"from": "human",
"value": "require 'lifx/light_target'\n\nmodule LIFX\n class LightCollection\n include LightTarget\n extend Forwardable\n\n # Stores an array of lights and handles addr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad merge with master\n\nAddress https://github.com/phstc/sidekiq-statsd/commit/b7c7998d36465b55b7f75475bf6b700d3a66096d#r36336711\nand https://github.com/phstc/sidekiq-statsd/commit/b7c7998d36465b55b7f75475bf6b700d3a66096d#r36336689\n"
},
{
"from": "human",
"va... | ruby | chosen |
[
{
"from": "system",
"value": "Load the Mailman Gem instead of the file in this Gem\n"
},
{
"from": "human",
"value": "require \"mailman-rails/version\"\nrequire \"mailman\"\nrequire \"mailman/rails\"\nrequire \"mailman/rails/railtie\"\nrequire File.expand_path(\"../mailman\", __FILE__)\n\nmodule... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a extname format as File.extname\n\npng ->\n.png\n^\n"
},
{
"from": "human",
"value": "require \"gdk_pixbuf2\"\n\nmodule PixScale\n class Pic\n def self.scale_and_save(path, scale)\n new(path).scale_and_save(scale)\n end\n\n attr_reader :path, :di... | ruby | chosen |
[
{
"from": "system",
"value": "chore: Order login traits by updated_at, reversed\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'ditty/controllers/component_controller'\nrequire 'ditty/models/user_login_trait'\nrequire 'ditty/policies/user_login_trait_policy'\n\nmodul... | ruby | chosen |
[
{
"from": "system",
"value": "Clear registry when Rails reloader is invoked\n"
},
{
"from": "human",
"value": "module SuckerPunch\n class Railtie < ::Rails::Railtie\n initializer \"sucker_punch.logger\" do\n SuckerPunch.logger = Rails.logger\n end\n end\nend\n"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Change the name of the gem to match the rest of the world\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"generic_api_rails/version\"\n\n# Describe your gem and declare its dependencies:\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug of Kotsms adapter: Accept phone number in international format\n"
},
{
"from": "human",
"value": "require \"kotsms\"\nrequire_relative \"base\"\n\nmodule Unisms::Adapter\n\tclass Kotsms < Base\n\t\tdef initialize(username, password, options = {})\n\t\t\t@kot... | ruby | chosen |
[
{
"from": "system",
"value": "Remove default files from rake task because they're specified in the CLI\n"
},
{
"from": "human",
"value": "require 'rake'\nrequire 'rake/tasklib'\n\nmodule YARD\n module Rake\n \n class YardocTask < ::Rake::TaskLib\n attr_accessor :name\n attr_acce... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as a dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'perfecta/version'\n\nGem::Specification.new do |gem|\n gem.name ... | ruby | chosen |
[
{
"from": "human",
"value": "Add library for silencing warnings from 3rd party modules\n\n"
},
{
"from": "gpt",
"value": "# http://www.caliban.org/ruby/rubyguide.shtml#warnings\nclass Silently\n def self.silently(&block)\n warn_level = $VERBOSE\n $VERBOSE = nil\n result = block.call\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the description actually useful\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nGem::Specification.new do |s|\n s.name = \"pharrell\"\n s.version = \"0.4.2\"\n s.platform = Gem::Platfo... | ruby | chosen |
[
{
"from": "system",
"value": "Add depends_on spacing checks to brew_audit\n"
},
{
"from": "human",
"value": "require 'formula'\nrequire 'utils'\n\ndef ff\n if ARGV.named.empty?\n stuff = []\n Formulary.read_all do |name,k|\n stuff << Formula.factory(name)\n end\n return stuff\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add !tm command. everything is trademarked\n"
},
{
"from": "human",
"value": "class Emoji\n include Cinch::Plugin\n\n match /b (.+)/, method: :b\n match /:b: (.+)/, method: :b\n match /🅱️ (.+)/, method: :b\n match /clap (.+)/, method: :clap\n match /:clap: (.... | ruby | chosen |
[
{
"from": "system",
"value": "Define test_cases in the base to save dups\n"
},
{
"from": "human",
"value": "class Puzzle\n def initialize\n test_cases.each do |input, expected|\n test(input, expected)\n end\n puts \"-\"*50, \"\"\n puts \"Solution:\", solve(read_input)\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix SyntaxError on Ruby 2.0.0 and 2.1\n"
},
{
"from": "human",
"value": "describe Hash do\n describe '#camelize_keys!' do\n let(:underscored_hash) do\n {\n abcd_efgh_1234_ijkl_mnop: 'テスト',\n abcdEfgh_5678_ijklMnop: 'テスト',\n abcdEfgh_123... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra behavior row spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe BehaviorRow do\n\n let!(:student) { FactoryGirl.create(:student) }\n\n let(:data) do\n {\n local_id: student.local_id,\n event_date: DateTime.pa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove test for PayPalExpress UK which does not exist anymore\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Spree\n describe PaymentMethod do\n it \"orders payment methods by name\" do\n pm1 = create(:payment_method, name: 'ZZ')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing quotes in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"AdjustIO\"\n s.version = \"2.0.1\"\n s.summary = \"This is the iOS SDK of AdjustIo. You can read more about it at http://adjust.io.\"\n s.homepag... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken label uniqueness label migration\n\nThe previous implementation of the migration failed on staging because\nthe migration was attempted to remove labels from projects that did not\nactually have duplicates. This occurred because the SQL query did not\naccount for the... | ruby | chosen |
[
{
"from": "system",
"value": "Copy set_locale route from solidus_i18n\n\nOur existing route to locale#set was a GET (which it shouldn't be), this\nadds it again as a POST. The existing get route is left for\ncompatibility.\n\nThe route is named \"select_locale\" instead of \"set_locale\" to avoid a\nconflic... | ruby | chosen |
[
{
"from": "system",
"value": "Set tag in the repository correctly.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Fountain\"\n s.version = \"0.1-alpha2\"\n s.summary = \"Pluggable data sources and adapters for representi... | ruby | chosen |
[
{
"from": "human",
"value": "Add EasyTAG 2.1.8-mac-alpha-1\nThis is not an official build.\n"
},
{
"from": "gpt",
"value": "class Easytag < Cask\n url 'https://github.com/rfw/easytag-mac/releases/download/v2.1.8-mac-alpha-1/easytag-v2.1.8-mac-alpha-1.dmg'\n homepage 'http://rfw.name/easytag-ma... | ruby | chosen |
[
{
"from": "human",
"value": "Add Filebot starting with version 3.6\n"
},
{
"from": "gpt",
"value": "class Filebot < Cask\n url 'http://downloads.sourceforge.net/project/filebot/filebot/FileBot_3.6/FileBot_3.6.app.tar.gz'\n homepage 'http://www.filebot.net/'\n version '3.6'\n sha1 'ad49213222... | ruby | chosen |
[
{
"from": "system",
"value": "Support newer nokogiri as well\n\nTo address security vulnerability only resolved in nokogiri 1.10.4"
},
{
"from": "human",
"value": "$:.unshift File.expand_path(\"../lib\", __FILE__)\nrequire 'docx/version'\n\nGem::Specification.new do |s|\n s.name = 'docx'... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec for minimum griddler and mail versions\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'griddler/sendgrid/version'\n\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Use Time.zone.new for deleted_at timestamp.\n\nSigned-off-by: Rich Cavanaugh <5cb1f7e6d556f019dce85071c0a1f08204371cc3@mac.com>"
},
{
"from": "human",
"value": "module WithoutScope\n module ActsAsRevisable\n module Deletable\n def self.included(base) ... | ruby | chosen |
[
{
"from": "system",
"value": "Use stubs to avoid connecting to internet\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Unshortme' do\n \n it 'should not return the unshorted url' do\n unshorted = Unshortme.unshort(\"the url\")\n unshorted.should_not == nil\n uns... | ruby | chosen |
[
{
"from": "system",
"value": "Update indexes in SectionEdition for Mongoid 3\n\nThis avoids the following problem when running `rake`:\n\n Problem:\n Invalid index specification on SectionEdition: section_id, {}\n Summary:\n Indexes in Mongoid are defined as a hash of field name and\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix current referenced invoice not showing in select.\n"
},
{
"from": "human",
"value": "module InvoiceHelper\n def invoice_states_as_collection\n states = Invoice::STATES\n states.inject({}) do |result, state|\n result[t(state, :scope => 'invoice.state'... | ruby | chosen |
[
{
"from": "system",
"value": "Allow plugins to add contents after search results"
},
{
"from": "human",
"value": "module PluginsHelper\n\n def plugins_product_tabs\n @plugins.dispatch(:product_tabs, @product).map do |tab|\n {:title => tab[:title], :id => tab[:id], :content => instance_e... | ruby | chosen |
[
{
"from": "system",
"value": "Update call to store_in for Mongoid 3\n\nThis addresses the following error message I was seeing when running\n`rake`:\n\n Problem:\n Invalid options passed to SectionEdition.store_in:\n manual_section_editions.\n Summary:\n The :store_in macro takes only a... | ruby | chosen |
[
{
"from": "system",
"value": "Add topic to rabbitmq exchange and queue durability\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# encoding: utf-8\n\nrequire \"bunny\"\n\nclass Listener\n\n def initialize(host: \"localhost\", port: 5672, queue_name: \"gapps\", rabbitmq_user: 'gapps', r... | ruby | chosen |
[
{
"from": "system",
"value": "Update to recognize new propergate_service command options.\n"
},
{
"from": "human",
"value": "\nclass Wakame::Command::PropagateService\n include Wakame::Command\n\n #command_name='launch_cluster'\n\n def parse(args)\n @resource\n end\n\n def run(rule)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify why we modify PATH\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: practicingruby\n# Recipe:: ruby\n#\n# Installs Ruby and Bundler\n#\n\nruby_version = node[\"practicingruby\"][\"ruby\"][\"version\"]\n\n# Override default chruby attributes\nnode.set[... | ruby | chosen |
[
{
"from": "system",
"value": "Improve test coverage of index view\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"home/index.html.slim\", type: :view do\n\n include Devise::TestHelpers\n\n let(:user) { FactoryGirl.create :user }\n\n it 'contain our dashb... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant respond_to :json class method\n"
},
{
"from": "human",
"value": "module Api::V1\n class CredentialsController < ApiController\n respond_to :json\n\n def show\n render json: credentials_serializer.call\n end\n\n private\n\n def c... | ruby | chosen |
[
{
"from": "system",
"value": "Remove $SAFE level for ERB parsing\n\n$SAFE=4 level was removed from ruby 2.1.1. In general, this SAFE level\ndoes not provide enough security.\n\nSigned-off-by: Maria Shaldibina <a39f51a90bfcf8ca23756ef12127e1cf20796cba@pivotallabs.com>\n"
},
{
"from": "human",
"va... | ruby | chosen |
[
{
"from": "human",
"value": "Add dirty script to get photos out of Black Swan/Flickr\n"
},
{
"from": "gpt",
"value": "#\n# This is a really fast and dirty script that I used to migrate photos out of\n# Black Swan and Flickr and over to a Dropbox solution. I'm keeping it in the\n# source tree for... | ruby | chosen |
[
{
"from": "system",
"value": "Add chef and berkshelf dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-chefzero/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Add rexml to gemspec for Ruby 3.0\n\nrexml is no longer default gem in Ruby 3.0.\n\nWhen we use activemodel 6.1.0 or greater, it includes rexml in its\ngemspec and we don't get errors on it.\nhttps://github.com/rails/rails/pull/40281\n\nOtherwise, we can get a LoadError like th... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to clean up outdated boxes.\n\nvagrant doesn't have a way to clean up outdated boxes. I have an\nopen issue (https://github.com/mitchellh/vagrant/issues/4412).\nI will likely implement it once I get feedback from the maintainer\nas to how he would want it exposed in ... | ruby | chosen |
[
{
"from": "system",
"value": "Add linkable user groups for Collection\n"
},
{
"from": "human",
"value": "class CollectionPolicy < ApplicationPolicy\n class ReadScope < Scope\n roles_for_private_scope %i(owner collaborator contributor viewer)\n\n def public_scope\n scope.where(private... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in XAMPP Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'xampp' do\n version '5.6.3-0'\n sha256 '23... | ruby | chosen |
[
{
"from": "system",
"value": "Fix request in ClientCredentialsGrant to use_ssl if applicable\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nmodule Unimatrix\n module Authorization\n class ClientCredentialsGrant\n def initialize( args )\n @client_id = args[ :client_id ]\... | ruby | chosen |
[
{
"from": "system",
"value": "[MODIFIED] Set PodSpec to release 1.0.1.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"JDSlider\"\n s.version = \"1.0.0\"\n s.summary = \"An iOS Slider written in swift.\"\n s.description = \"A full custo... | ruby | chosen |
[
{
"from": "system",
"value": "Add purge-message patch. Switch to Debian patch sources.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Mutt < Formula\n url 'ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz'\n homepage 'http://www.mutt.org/'\n md5 'a29db8f1d51e2f10c070bf88e8a553f... | ruby | chosen |
[
{
"from": "human",
"value": "Add decorator for the Disk model with fonticons for various disktypes\n"
},
{
"from": "gpt",
"value": "class DiskDecorator < MiqDecorator\n def fonticon\n case device_type\n when 'floppy'\n 'fa fa-floppy-o'\n when 'cdrom'\n 'ff ff-cdrom'\n else... | ruby | chosen |
[
{
"from": "system",
"value": "Make the migration RemoveMetadataFromRooms faster\n"
},
{
"from": "human",
"value": "class RemoveMetadataFromRooms < ActiveRecord::Migration\n def up\n BigbluebuttonRoom.all.each do |room|\n room.metadata.where(:name => 'mconfweb-title').destroy_all\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration (delete column color instead of text)\n"
},
{
"from": "human",
"value": "Sequel.migration do\n up do\n add_column :organizations, :color, :text\n \n Rails::Sequel.connection.run(%Q{\n update organizations set color = '#227dbd' where name... | ruby | chosen |
[
{
"from": "system",
"value": "Update | using safe operator\n"
},
{
"from": "human",
"value": "module Setup\n class Oauth2Scope\n include SharedEditable\n include CustomTitle\n include BuildIn\n\n origins origins_config, :cenit\n\n build_in_data_type\n .referenced_by(:name, :... | ruby | chosen |
[
{
"from": "human",
"value": "Add a helper to easily generate sliders\n"
},
{
"from": "gpt",
"value": "module NivoHelper\n def slider(files, hash = {})\n options = { :theme => :default }\n options.merge!(hash)\n\n content_tag(:div, :class => \"slider-wrapper theme-#{options[:theme]}\") ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce huge N+1 querying for associated user IDs\n\nThis was causing a huge N+1 query through groups / assignments / users.\n"
},
{
"from": "human",
"value": "module UserHelper\n def guider_options\n groups = Group.includes(:users)\n {\n 'Groups': groups... | ruby | chosen |
[
{
"from": "system",
"value": "Update rom and dry-types deps\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rom/sql/version'\n\nGem::Specification.new do |spec|\n spec.name = 'rom-sql'\n s... | ruby | chosen |
[
{
"from": "human",
"value": "Copy ProcessMessegnerCallbackJob into spec/dummy/app/jobs folder for specs\n"
},
{
"from": "gpt",
"value": "class ProcessMessengerCallbackJob < ActiveJob::Base\n\n queue_as :messaging\n\n def perform(json)\n MessengerPlatform::CallbackParser.new(json.deep_dup).p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for ruby 1.9.2\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Coercer, '.new' do\n subject { described_class.new(&block) }\n\n let(:block) { Proc.new {} }\n\n it { should be_instance_of(Coercer) }\n\n its(:config) { should be_insta... | ruby | chosen |
[
{
"from": "system",
"value": "Remove availability zone order question\n"
},
{
"from": "human",
"value": "module JellyfishAws\n module ProductType\n class Ec2 < ::ProductType\n def self.load_product_types\n return unless super\n\n transaction do\n [\n se... | ruby | chosen |
[
{
"from": "human",
"value": "Remove MacPorts and Fink from the build environment\n\nCloses Homebrew/homebrew#13\n"
},
{
"from": "gpt",
"value": "require 'brewkit'\n\nclass AprUtil <Formula\n @url='http://www.mirrorservice.org/sites/ftp.apache.org/apr/apr-util-1.3.9.tar.bz2'\n @md5='29dd557f7bd... | ruby | chosen |
[
{
"from": "system",
"value": "Add DB seed with mock bills\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 with db:setup).\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to pass validation.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"AmazeKit\"\n s.version = \"0.13.0\"\n s.summary = \"AmazeKit is a library for rendering beautiful images in your iOS app.\"\n s.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Update fixture to give it a collection attribute\n\nhome_formats will return an array of 2 of the available home formats\n"
},
{
"from": "human",
"value": "class Movie\n attr_accessor :title, :rating, :year, :country, :seen, :star_rating\n\n def self.random_collec... | ruby | chosen |
[
{
"from": "system",
"value": "Update Trailer version to 1.3.1\n\nThis commit updates the version and SHA\n"
},
{
"from": "human",
"value": "cask :v1 => 'trailer' do\n version '1.3.0'\n sha256 '1e546d9375e761e4d3ff3a74c218f39b89b9a0e0c4731108558249f0d1e1dc0f'\n\n url \"http://ptsochantaris.git... | ruby | chosen |
[
{
"from": "human",
"value": "Add new test suite to test upgrading agent with cookbook\n\n* To properly run, the attributes in `test/cookbooks/install_old_agent/attributes/default.rb` need to be updated\n"
},
{
"from": "gpt",
"value": "require 'serverspec'\n\nset :backend, :exec\n\n# Version to e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix include grammer of ruby\n\nremove an unnecesary receiver\n"
},
{
"from": "human",
"value": "require 'helpers/dummy_data'\n\nmodule Helpers\n def self.included(base)\n base.include Dummy_data\n end\nend\n"
},
{
"from": "gpt",
"value": "require 'h... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to include in itself\n\nIt was not correctly included when rspec command is used to specify test\nfile\n"
},
{
"from": "human",
"value": "require \"helpers/dummy_data\"\n\nmodule Helpers\n def self.included(_base)\n include DummyData\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix too precise integration test\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\nrequire 'tmpdir'\nrequire 'digest/md5'\n\ndescribe Suby do\n file = 'How I Met Your Mother 3x9 - Slapsgiving.mkv'\n srt = 'How I Met Your Mother 3x9 - Slapsgiving.... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for upload model."
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\ndescribe S3Relay::Upload do\n before do\n @upload = S3Relay::Upload.new\n end\n\n describe \"associations\" do\n describe \"parent\" do\n it do\n S3Relay::Uploa... | ruby | chosen |
[
{
"from": "system",
"value": "Update brew cask formula from upstream\n"
},
{
"from": "human",
"value": "cask :v1 => 'conductor' do\n version '1.2.2'\n sha256 'a5f9ba34c258c7d6a902de86c4f14e36e0b6283ab3893d6c43a7ba95f3831e63'\n\n url 'https://github.com/keith/conductor/releases/download/1.2.2/... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor common regexp to method\n"
},
{
"from": "human",
"value": "class PeopleIdentifier\n attr_accessor :params, :people\n\n def initialize(params)\n @params = params\n end\n\n def people\n @people ||= if params[:email]\n # annoying tha... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for Air Video Server\n"
},
{
"from": "gpt",
"value": "class AirVideoServer < Cask\n url 'http://s3.amazonaws.com/AirVideo/Air+Video+Server+2.4.6-beta3u1.dmg'\n homepage 'http://www.inmethod.com/air-video/'\n version '2.4.6-beta3'\n sha1 '2293b653fea6a939... | ruby | chosen |
[
{
"from": "system",
"value": "Sort readings for quality control dedupe\n"
},
{
"from": "human",
"value": "class QualityControl\n def self.dedupe(user)\n readings = user.readings\n dupes = []\n\n (0...readings.length - 1).each do |i|\n reading1 = readings[i]\n reading2 = readi... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for Git class\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass GitTest < Minitest::Test\n def test_get_tags_sort_by_date_asc\n output = <<-EOF\nrefs/tags/0.0.1 Thu Aug 4 12:34:56 2011 +0200\nrefs/tags/1.0.0 Fri Aug 5 11:11:11 2011 +0... | ruby | chosen |
[
{
"from": "system",
"value": "Add guest role and clean roles to keep only one\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'rails/generators/migration'\nrequire 'rails/generators/active_record'\n\nmodule Georgia\n module Generators\n class UpgradeGenerator < ::Rails::Generat... | ruby | chosen |
[
{
"from": "system",
"value": "Fix generator for Rails version 3.0.x"
},
{
"from": "human",
"value": "module Pwdcalc\n module Generators\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n if ::Rails.version[0..2].to_f >= 3... | ruby | chosen |
[
{
"from": "system",
"value": "Include admin css in precompile list\n"
},
{
"from": "human",
"value": "Rails.application.config.assets.precompile += %w(\n publify.js\n publify_admin.js\n publify.css\n accounts.css\n bootstrap.css\n)\n"
},
{
"from": "gpt",
"value": "Rails.applicat... | ruby | chosen |
[
{
"from": "system",
"value": "Call the right method from the async job\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass ImportAsyncJob\n def perform(import_job)\n ::ETL::AsyncImporter.perform(import_job)\n end\nend\n"
},
{
"from": "gpt",
"value": "# froz... | ruby | chosen |
[
{
"from": "human",
"value": "Add single paper import job\n"
},
{
"from": "gpt",
"value": "class ImportPaperJob < ActiveJob::Base\n queue_as :import\n\n def perform(body, legislative_term, reference)\n fail \"No scraper found for body #{body}\" if body.scraper.nil?\n scraper = body.scrape... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure simple form recognizes from email to be required.\n"
},
{
"from": "human",
"value": "class EmailTemplate < ApplicationRecord\n include Concerns::Translatable\n translatable_fields :subject, :plain_content, :html_content\n\n include Concerns::Sortable\n\... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to remove virtual users\n"
},
{
"from": "gpt",
"value": "namespace :remove_duplicate_virtual_users do\n desc 'Remove duplicate users by redirecting all posts to a single user'\n task :remove => :environment do\n puts 'Removing duplicate users'\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Copy CMA case metadata into extra_fields\n\nThe code was updated to pull the CMA case specific metadata from\nextra_fields but the data wasn't migrated.\n"
},
{
"from": "gpt",
"value": "class PopulateExtraFieldsForCmaCases < Mongoid::Migration\n @editions = Class.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec source to point to linkedIn"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = 'ConsistencyManager'\n spec.version = '5.1.2'\n spec.license = { :type => 'Apache License, Version 2.0' }\n spec.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for custom ohai plugins\n"
},
{
"from": "human",
"value": "require \"ohai\"\n\nmodule Baton\n class Server\n\n attr_accessor :environment, :fqdn, :app_names\n\n # Public: Initialize a Server. ALso, configures the server by reading Baton's configuration\... | ruby | chosen |
[
{
"from": "system",
"value": "Include vendor images in asset pipeline\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Update Publisher to match new API within the BBC Cosmos Config gem\n"
},
{
"from": "human",
"value": "require_relative 'env'\n\nrequire 'alephant/publisher/version'\nrequire 'alephant/publisher/queue'\nrequire 'alephant/publisher/writer'\nrequire 'alephant/logger'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use directory metadata instead of crawling buckets :flushed:\n"
},
{
"from": "human",
"value": "class CFcmd::CLI\n class Ls\n attr_reader :connection, :uri\n\n def initialize(connection, uri = nil)\n @connection = connection\n @uri = URI(uri) if uri... | ruby | chosen |
[
{
"from": "system",
"value": "Delete extraneous line that wasn't helping anything\n"
},
{
"from": "human",
"value": "require \"fileutils\"\nrequire \"raml-rb\"\n\nrequire File.expand_path(\"../rspec/spec_file.rb\", __FILE__)\nrequire File.expand_path(\"../rspec/rambo_helper_file.rb\", __FILE__)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging for sudo queries\n"
},
{
"from": "human",
"value": "require 'sparql/client'\n\nmodule Mu\n module AuthSudo\n module Helpers\n def self.included(base)\n define_method(:query_sudo) { |query| Mu::AuthSudo.query(query) }\n define_metho... | ruby | chosen |
[
{
"from": "system",
"value": "Store should be returning an entire event envelope\n"
},
{
"from": "human",
"value": "require 'replay'\nrequire \"replay/rails/version\"\n\nmodule Replay\n module Rails\n class ActiveRecordEventStore \n class Event < ActiveRecord::Base\n self.table_n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo that causes AtomicParsley to fail\n"
},
{
"from": "human",
"value": "# The part that deals with metadata collection and generation.\nmodule Meta\n def self.get_metadata(file)\n atoms = `AtomicParsley \\\"#{file}\\\" -t`\n atoms.each_line.reduce({})... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n VERSION = '2.0.3'\n ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.0.1'\nend\n"
},
{
"from": "gpt",
"value": "module EY\n VERSION = '2.0.4.pre'\n ENG... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.