conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Delete some stuff from gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'materialize_it/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec for RSpec 3\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Generative::ORDERING do\n let(:ordering) { Generative::ORDERING }\n\n around do |example|\n previous = ENV['GENERATIVE_COUNT']\n ENV['GENERATIVE_COUNT'] = '10'\n\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec to latest rom\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nrequire 'virtus'\n\ndescribe 'Mongo adapter' do\n let(:rom) { ROM.setup(mongo: 'mongo://127.0.0.1:27017/test') }\n\n after do\n rom.mongo.connection.drop\n end\n\n it 'works... | ruby | chosen |
[
{
"from": "human",
"value": "Add request spec for happy-path creating a ListItem\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe \"ListItems\", type: :request do\n let(:headers) {\n { \"ACCEPT\" => \"application/json\" }\n }\n\n context \"Creating a ListItem\" do\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec file from when renaming to RubySyntaxChecker\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe MountainBerryFields::Test::SyntaxChecker do\n it 'implements the SyntaxChecker interface' do\n Mock::SyntaxChecker.should substitute_for de... | ruby | chosen |
[
{
"from": "system",
"value": "Fix foreign key errors when resetting DB in tests\n\nProblem\n\nI couldn't get the test suite passing because of foreign key errors when\nresetting the DB. For example,\n\n```\nFailures:\n\n 1) customer show page links to the customer's orders\n Failure/Error: DatabaseClea... | ruby | chosen |
[
{
"from": "system",
"value": "Clean with truncation at the start of each suite.\n\nThis keeps things working properly for mongo which does not support\ntransactions. The strategy is still properly configured to use\ntransactions where supported, though, so this should not affect\nthe speed of the test suite... | ruby | chosen |
[
{
"from": "system",
"value": "Update to Android SDK r22.2.1\n"
},
{
"from": "human",
"value": "default['android-sdk']['name'] = 'android-sdk'\ndefault['android-sdk']['owner'] = 'root'\ndefault['android-sdk']['group'] = 'root'\ndefault['android-sdk']['setup_root'] ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the C extension is compiled before running benchmarks\n\n* Otherwise, the C extension from the gem might be picked instead.\n"
},
{
"from": "human",
"value": "require 'benchmark'\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'ffi'\... | ruby | chosen |
[
{
"from": "system",
"value": "Update summary and description in .gemspec.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"mingo/version\"\n\nGem::Specification.new do |s|\n s.name = \"mingo\"\n s.version = Mingo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove permitted params code that was throwing an error\n"
},
{
"from": "human",
"value": "module Admin\n class EducatorsController < Admin::ApplicationController\n # To customize the behavior of this controller,\n # simply overwrite any of the RESTful action... | ruby | chosen |
[
{
"from": "human",
"value": "Update user exercise column on submission\n"
},
{
"from": "gpt",
"value": "class RenameUserExerciseReferenceOnSubmissions < ActiveRecord::Migration\n def change\n remove_index :submissions, :user_exercise\n rename_column :submissions, :user_exercise, :user_exe... | ruby | chosen |
[
{
"from": "system",
"value": "Move control options to the bottom\n"
},
{
"from": "human",
"value": "require 'chef/environment'\n\nactions :create, :delete, :nothing\ndefault_action :create\n\nattribute :complete, :kind_of => [TrueClass, FalseClass]\n\nattribute :name, :kind_of => String, :regex ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing stanzas to Adium Nightly15"
},
{
"from": "human",
"value": "cask :v1 => 'adium-nightly15' do\n version '1.5.11b2r5922'\n sha256 '828c2e2f21a2e500aeb580d018afba0f360956334d655a8280d4f9ba09af7b9d'\n\n url \"http://nightly.adium.im/adium-adium-1.5.11/Adi... | ruby | chosen |
[
{
"from": "system",
"value": "Update Firefox Nightly to 36.0a1"
},
{
"from": "human",
"value": "class FirefoxNightly < Cask\n version :latest\n sha256 :no_check\n\n url 'http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-35.0a1.en-US.mac.dmg'\n homepage 'https://nigh... | ruby | chosen |
[
{
"from": "system",
"value": "Update KeepingYouAwake to latest release\n"
},
{
"from": "human",
"value": "cask :v1 => 'keepingyouawake' do\n version '1.3'\n sha256 'edc08fa7e8504035ab721cc6a2c8fb2c482c5cc82d6666410444738eacaa0748'\n\n url \"https://github.com/newmarcel/KeepingYouAwake/release... | ruby | chosen |
[
{
"from": "system",
"value": "Fix QA group creation by filling required fileds\n"
},
{
"from": "human",
"value": "module QA\n module Page\n module Group\n class New < Page::Base\n def set_path(path)\n fill_in 'group_path', with: path\n end\n\n def set_descr... | ruby | chosen |
[
{
"from": "system",
"value": "Move macos deployment target to 10.10.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ReactiveCocoaApply\"\n s.version = \"0.2.5\"\n s.summary = \"ReactiveCocoa Singal and SignalProducer extensions for RAC4 for ... | ruby | chosen |
[
{
"from": "system",
"value": "Use expect syntax for Configuration specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ::Configuration do\n\n before do\n @config = FactoryGirl.build(:configuration, name: 'a_config', value: 'a_value')\n end\n\n it{ should validate_pres... | ruby | chosen |
[
{
"from": "human",
"value": "Add Adobe Reader 11 Polish version\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'adobe-reader-pl' do\n version '11.0.00'\n sha256 'cfeeef917cec3175ab7673c9afd9df081794d952c5e919e29a962df21e041b37'\n\n url \"http://ardownload.adobe.com/pub/adobe/reader/mac/#{versio... | ruby | chosen |
[
{
"from": "system",
"value": "Apply fix on put request spec\n"
},
{
"from": "human",
"value": "RSpec.describe Sisecommerce::Produto do\n describe '#get' do\n context 'having 10 produtos available' do\n it 'lists produtos available' do\n produtos = Sisecommerce::Produto.get\n ... | ruby | chosen |
[
{
"from": "system",
"value": "rpearce: Modify standalone app tests from image_size to modify_storage\n"
},
{
"from": "human",
"value": "require 'stacks/test_framework'\n\ndescribe_stack 'tim' do\n given do\n stack 'tim' do\n standalone_appserver 'timcyclic' do\n self.application ... | ruby | chosen |
[
{
"from": "system",
"value": "Update specs to the latest platform versions\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'default recipe' do\n let(:chef_run) do\n runner = ChefSpec::ServerRu... | ruby | chosen |
[
{
"from": "human",
"value": "Test `ShareWorker`'s handling of deleted records\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\ndescribe ShareWorker do\n let(:user) { FactoryBot.create(:user) }\n let(:answer) { FactoryBot.create(:answer, user: user) }\... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 1.1.0.0 to 2.1.0.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'evt-log'\n s.version = '1.1.0.0'\n s.summary = 'Logging to STD IO with levels, tagging, and coloring'\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Update validation to contain an error message\n"
},
{
"from": "human",
"value": "require 'bcrypt'\n\nclass User < ApplicationRecord\n validates :username, presence: true, length: { in: 4..15 }, uniqueness: true\n validates :email, presence: true, uniqueness: true\... | ruby | chosen |
[
{
"from": "system",
"value": "Move new_child to pages resources.\n"
},
{
"from": "human",
"value": "ConstructorPages::Engine.routes.draw do\n scope '/admin' do\n resources :pages, except: [:show]\n resources :templates, except: [:show] do\n resources :fields, except: [:show, :index]\... | ruby | chosen |
[
{
"from": "system",
"value": "Update to have last seen device with not found manufacturers\n"
},
{
"from": "human",
"value": "require 'uri'\nrequire 'net/http'\nrequire 'json'\n# require_relative '../models/device.rb'\n\ncurrent_valuation = 0\n\nDashing.scheduler.every '3s' do\n last_valuation ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Link Model to remove duplicate code\n"
},
{
"from": "human",
"value": "require 'open-uri'\nrequire 'open_uri_redirections'\n\nclass Link\n\n attr_reader :title\n\n def initialize(url)\n @url = url\n @title = self.grab_title\n end\n\n def grab_titl... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the name uniqueness contraint\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: users\n#\n# id :integer not null, primary key\n# name :string\n# email :string\n# age :integer\n# country :in... | ruby | chosen |
[
{
"from": "system",
"value": "Add association User has many Items thru UserVotes\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n authenticates_with_sorcery!\n\n has_many :user_votes\n\n validates :password, length: { minimum: 8}\n validates :password, confirmation: true\... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"remove ENV variables from the delayed jobs config. It's just unnecessary\"\n\nThis reverts commit 8674d728bd106bafd2375a563aeadce76d04d9c5.\n"
},
{
"from": "human",
"value": "# config/initializers/delayed_job_config.rb\nDelayed::Worker.backend = :active_rec... | ruby | chosen |
[
{
"from": "system",
"value": "Update brad table to add column for logo path\n"
},
{
"from": "human",
"value": "class CreateBrands < ActiveRecord::Migration\n def change\n create_table :brands do |t|\n t.string :brand_name, null: false\n t.text :brand_description\n t.text :spon... | ruby | chosen |
[
{
"from": "system",
"value": "Use indifferent access for config hash in actioncable postgresql test\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule ChannelPrefixTest\n def test_channel_prefix\n server2 = ActionCable::Server::Base.new(conf... | ruby | chosen |
[
{
"from": "system",
"value": "Bump the podspec file to 0.1.1 to reflect changes\n\nPlease add a tag `0.1.1` and push it to the Cocopods specs repo using `pod spec push`"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"ARSlidingPanel\"\n s.version = \"0.1.0\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Modify comment to use YARD\n"
},
{
"from": "human",
"value": "module Fireap::ViewModel\n ##\n # A view object which has info of a particular Application and a Node.\n class ApplicationNode\n attr :appname, :version, :semaphore, :updated_at, :remote_node\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Call original ssh_communicate for non windows vm\n"
},
{
"from": "human",
"value": "#-------------------------------------------------------------------------\n# Copyright (c) Microsoft Open Technologies, Inc.\n# All Rights Reserved. Licensed under the Apache 2.0 Li... | ruby | chosen |
[
{
"from": "system",
"value": "Make the pod spec open source friendly\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"BFRImageViewer\"\n s.version = \"1.0.7\"\n s.summary = \"BFRImageViewer.\"\n s.homepage = \"https://bufferapp.com\"\n s.l... | ruby | chosen |
[
{
"from": "system",
"value": "Update webmock requirement from ~> 3.5.1 to ~> 3.6.0\n\nUpdates the requirements on [webmock](https://github.com/bblimke/webmock) to permit the latest version.\n- [Release notes](https://github.com/bblimke/webmock/releases)\n- [Changelog](https://github.com/bblimke/webmock/blob... | ruby | chosen |
[
{
"from": "human",
"value": "Apply monkey patch for CVE-2013-6414.\n"
},
{
"from": "gpt",
"value": "# Temporary patches for Rails security alert made on 03/12/2013\n\n# CVE-2013-6414 https://groups.google.com/forum/#!topic/rubyonrails-security/A-ebV4WxzKg\n\nActiveSupport.on_load(:action_view) d... | ruby | chosen |
[
{
"from": "system",
"value": "Add more user model tests for following, unfollowing\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe User do\n\n describe 'Following' do\n before(:each) do\n @user1 = create(:user)\n @user2 = create(:user)\n @user1.follow(@us... | ruby | chosen |
[
{
"from": "system",
"value": "Check that RoundRobin.add returns an ActiveRecord object"
},
{
"from": "human",
"value": "require 'spec_helper'\ndescribe RoundRobin do\n describe \"#add\" do\n it \"should add a job when calling add\" do\n lambda do\n RoundRobin.add(MyJob, 42)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update method signature for delayed cancel\n"
},
{
"from": "human",
"value": "# Testing changes to chargify_api_ares gem for \n# https://github.com/chargify/chargify_api_ares/issues/100\n\n# Use my locally built preview of the next version\ngem 'chargify_api_ares', ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove stale dependency on xcodeproj"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'hawk/version'\n\nGem::Specification.new do |gem|\n gem.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Invoke perlbrew-installer with bash\"\n\nThis reverts commit dcf629c3a43d84d815d36c71ed06d11f6faa71ed.\n\nhttps://github.com/gugod/App-perlbrew/issues/407 has been fixed.\n"
},
{
"from": "human",
"value": "# Make sure that the package list is up to date on ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rails 4.1 and 4.0 compatibility\n"
},
{
"from": "human",
"value": "module LocalizableRoutes\n module Extensions\n module ActionDispatch\n module NamedRouteCollection\n extend ActiveSupport::Concern\n\n def define_localized_url_helper(name,... | ruby | chosen |
[
{
"from": "system",
"value": "Remove development dependencies from gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'alki/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to look at deleted configs\n"
},
{
"from": "human",
"value": "module Aptible\n module Api\n class Database < Resource\n belongs_to :account\n belongs_to :database_image\n belongs_to :current_configuration\n embeds_one :last_operat... | ruby | chosen |
[
{
"from": "system",
"value": "Update Spices dependency in Podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"TastyTomato\"\n s.version = \"0.16.0\"\n s.summary = \"The Tasty Tomato.\"\n s.description = <<-DESC \n Get all the awesome custom UI elemen... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the last useless initialization bit :yum:\n"
},
{
"from": "human",
"value": "module ChronoModel\n class Railtie < ::Rails::Railtie\n ActiveRecord::Tasks::DatabaseTasks.register_task /chronomodel/, ActiveRecord::Tasks::PostgreSQLDatabaseTasks\n\n setup ... | ruby | chosen |
[
{
"from": "system",
"value": "Add :output to whenever job definitions\n"
},
{
"from": "human",
"value": "# This file is overwritten on deploy\nset :output, {:error => 'log/cron.error.log', :standard => 'log/cron.log'}\njob_type :rake, 'cd :path && /usr/local/bin/govuk_setenv publisher bundle exe... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to delete a token\n"
},
{
"from": "human",
"value": "require 'securerandom'\n\nmodule CruLib\n class AccessToken < ActiveModelSerializers::Model\n attr_accessor :key_guid, :email, :first_name, :last_name, :token\n\n def initialize(attributes = {})\... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sleep from refine_results method to make page load faster\n"
},
{
"from": "human",
"value": "class EventsController < ApplicationController\n\n def index\n\n end\n\n def search\n @city = params[:city]\n @art_events = art_event_results\n @art_event... | ruby | chosen |
[
{
"from": "system",
"value": "Change trace sorting in UI\n\nTraces are not sorted by stop date instead of start date to avoid\nhaving slow requests not being shown because start date is already\nlate by too many other traces.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\ncl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 1.8.7 parsing and skip\n"
},
{
"from": "human",
"value": "require \"webmock/minitest\"\n\nmodule SupportsResourceLocking\n def self.included(base)\n base.class_eval do\n let(:collection_name) { subject.collection_name }\n\n def test_responds_to_loc... | ruby | chosen |
[
{
"from": "system",
"value": "Update to install Parallels Desktop 10\n"
},
{
"from": "human",
"value": "class Parallels < Cask\n version '9.0.24237.1028877'\n sha256 'da71645ff1f0076ab5b2f8fa5eefb63bcd921e5f52161fd4dd85e6fb19ae2c57'\n\n url \"http://download.parallels.com/desktop/v9/update2.h... | ruby | chosen |
[
{
"from": "system",
"value": "Use unf_ext even on Ruby >=2.2 if it is preloaded.\n"
},
{
"from": "human",
"value": "begin\n require 'unf_ext'\nrescue LoadError\n String.method_defined?(:unicode_normalize) or raise\n\n class String\n [:nfc, :nfd, :nfkc, :nfkd].each { |form|\n eval %{\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add the MIT-LICENSE to the Active Resource gemspec\n"
},
{
"from": "human",
"value": "version = File.read(File.expand_path(\"../../RAILS_VERSION\", __FILE__)).strip\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'activeres... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct reference to context through the importer\n\nFixes #366 in the correct way, hopefully.\n\nI can't cite my sources well, since Sprockets is very difficult to follow... but suffice to say the global options hash sent to the Tilt SASS template engine always has a refer... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra params to the download method too\n"
},
{
"from": "human",
"value": "module ClioClient\n module Api\n class DocumentVersion < Base\n\n attr_accessor :document_id\n\n include ClioClient::Api::Crudable\n\n def download(id)\n session... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that we use whatever the default form builder for the app, in case it's been overridden by the user in rails environment.rb, instead of just assuming it's always the ActionView form builder\n"
},
{
"from": "human",
"value": "module Erector\n class RailsFo... | ruby | chosen |
[
{
"from": "system",
"value": "Add cloud_volume_types to storage manager persister\n"
},
{
"from": "human",
"value": "module ManageIQ::Providers\n class Inventory::Persister\n class Builder\n class StorageManager < ::ManageIQ::Providers::Inventory::Persister::Builder\n def cloud_v... | ruby | chosen |
[
{
"from": "system",
"value": "Update Gambit Scheme to v4.5.3\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass GambitScheme <Formula\n url 'http://www.iro.umontreal.ca/~gambit/download/gambit/v4.5/source/gambc-v4_5_2.tgz'\n homepage 'http://dynamo.iro.umontreal.ca/~gambit/wiki/inde... | ruby | chosen |
[
{
"from": "system",
"value": "Make attr_readers protected in Difference\n\nMatch the existing pattern from other Expressions.\n"
},
{
"from": "human",
"value": "module Repeatable\n module Expression\n class Difference < Base\n def initialize(included:, excluded:)\n @included = in... | ruby | chosen |
[
{
"from": "system",
"value": "Exit with non-zero status on failure\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\n# quick & dirty script for running all available tests for each module\n# Author: Joachim Glauche\n\nrequire \"rbconfig\"\nrequire \"pathname\"\n\nruby = File.join(RbConfi... | ruby | chosen |
[
{
"from": "system",
"value": "Set queue name correctly for Worker\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'sidekiq'\nrequire 'sidekiq/worker'\n\nrequire 'travis/logs'\n\nmodule Travis\n module Logs\n module Sidekiq\n class SendTimings\n include... | ruby | chosen |
[
{
"from": "system",
"value": "Fix yellow jersey on homepage\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n def index\n @yellow_jersey = Trip.group(:user).order('sum_distance_in_meter DESC').sum(:distance_in_meter)\n end\nend\n"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"makes the \"default\" url for logged-in users the spending proposals welcome\"\n\nThis reverts commit 26ded993378c7554954a2b2392d27bd0f17d73f4.\n"
},
{
"from": "human",
"value": "class WelcomeController < ApplicationController\n skip_authorization_check\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify by using Rails tools\n"
},
{
"from": "human",
"value": "Spree::Address.class_eval do\n has_one :enterprise\n belongs_to :country, class_name: \"Spree::Country\"\n\n after_save :touch_enterprise\n\n geocoded_by :geocode_address\n\n delegate :name, to: :... | ruby | chosen |
[
{
"from": "system",
"value": "Implement method_or_callable pattern for transformer\n"
},
{
"from": "human",
"value": "class ExchangerValidator < ActiveModel::EachValidator\n def validate_each(record, attribute, value)\n record.errors.add(attribute, :invalid) unless is_valid_exchanger? record... | ruby | chosen |
[
{
"from": "system",
"value": "Set gem.required_ruby_version to >= 1.9.3\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'unparser'\n s.version = '0.1.6'\n\n s.authors = ['Markus Schirp']\n s.email = 'mbj@schir-dso.com'\n s.su... | ruby | chosen |
[
{
"from": "system",
"value": "Correct link to the repo\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/git_awesome_diff/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Max Prokopiev\", \"Timur Vafin\", \"FlatStack, L... | ruby | chosen |
[
{
"from": "system",
"value": "Add helpful method root in HashMap module\n"
},
{
"from": "human",
"value": "require \"hash_map/version\"\n\nrequire 'active_support/all'\nmodule HashMap\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "require \"hash_map/version\"\n\nre... | ruby | chosen |
[
{
"from": "human",
"value": "[Webhook] Add a minimal webhook implementation.\n"
},
{
"from": "gpt",
"value": "class WebHook\n\n # List of attached web hook URLs.\n #\n URLs = [\n \"http://metrics.cocoapods.org/hooks/trunk/#{ENV['OUTGOING_HOOK_PATH']}\"\n ]\n\n # Fifo file location.\n #\... | ruby | chosen |
[
{
"from": "system",
"value": "Make gui clients yaml to be read in every request in non-production environments\n"
},
{
"from": "human",
"value": "class GuiPresenter\n\n attr_reader :guis_info\n\n def initialize\n yaml = YAML.load_file('resources/guis.yml')\n @guis_info = yaml[\"guis\"]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove file date from validation\n"
},
{
"from": "human",
"value": "class IepDocument < ActiveRecord::Base\n belongs_to :student\n validates :file_name, uniqueness: { scope: :file_date, message: \"one unique file name per date\" }\nend\n"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bytesize check, closes GH-36\n"
},
{
"from": "human",
"value": "require 'dalli/client'\nrequire 'dalli/ring'\nrequire 'dalli/server'\nrequire 'dalli/version'\nrequire 'dalli/options'\n\nunless String.respond_to?(:bytesize)\n class String\n alias_method :byte... | ruby | chosen |
[
{
"from": "system",
"value": "Allow blank user request status (defaults to pending on the database).\n"
},
{
"from": "human",
"value": "class UserRequest < ActiveRecord::Base\n belongs_to :team\n belongs_to :user\n\n enum status: [ :Pending, :Accepted, :Rejected ]\n\n validates :status, incl... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependency on glimpse now that it's on RubyGems\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'glimpse-dalli/version'\n\nGem::Specificati... | ruby | chosen |
[
{
"from": "human",
"value": "Patch YAML to allow only some Gem classes to be unmarshalled\n"
},
{
"from": "gpt",
"value": "# XXX: This is purely a monkey patch to close the exploit vector for now, a more\n# permanent solution should be pushed upstream into rubygems.\n\nrequire \"rubygems\"\n\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove --verbose option, INFO log level is now default\n\nRemove:\n * The --verbose option\n\nChange:\n * Default log level to INFO\n"
},
{
"from": "human",
"value": "require 'docuvator/initialize'\n\nmodule Docuvator\n class CLI\n attr_reader :options\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as a development dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8; mode: Ruby -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"whiteout/version\"\n\nGem::Specification.new do |s|\n s.name = \"whiteout\"\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Return status in Attachments Controller\n"
},
{
"from": "human",
"value": "module ArtversityServer\n class AttachmentsController < Base\n get '/pictures' do\n erb :index\n end\n\n post '/pictures' do\n upload = Attachment.new performance_id: 4\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update functionality of remove item from shopping cart\n"
},
{
"from": "human",
"value": "class CartController < ApplicationController\n def index\n end\n\n def edit\n current_user\n @cart = @current_user.shopping_cart\n end\n\n # This method is under con... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ruby 1.8 syntax issues\n"
},
{
"from": "human",
"value": "class MainController < ApplicationController\n respond_to :html, :json\n before_filter :require_user, :only => :index\n\n caches_page :index\n caches_action :index\n\n def index\n @pro... | ruby | chosen |
[
{
"from": "system",
"value": "Remove attr_accessible and tidy up"
},
{
"from": "human",
"value": "require \"priceable/version\"\n\nmodule Priceable\n SUFFIXES = [\"_in_cents\", \"_in_pennies\", \"_as_integer\"]\n def priceable(*price_fields)\n price_fields.each do |price_field|\n suffi... | ruby | chosen |
[
{
"from": "system",
"value": "Update docs and minor corrections.\n"
},
{
"from": "human",
"value": "require 'digest/md5'\n\nmodule Rack\n # Automatically sets the ETag header on all String bodies.\n #\n # The ETag header is skipped if ETag or Last-Modified headers\n # are sent or if a sendfi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for redirects on production (consider_all_requests_local = false)\n"
},
{
"from": "human",
"value": "module SpreeRedirects\n class RedirectMiddleware\n \n def initialize(app)\n @app = app\n end\n \n def call(env)\n status, headers, body ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 1.9 messaging on gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{deep_merge}\n s.version = \"1.0.1\"\n\n s.authors = [\"Steve Midgley\"]\n s.date = %q{2011-07-28}\n s.description = %q{Re... | ruby | chosen |
[
{
"from": "system",
"value": "Update ASM mangled package to reflect JRuby 1.6.0.RC3 and higher.\n"
},
{
"from": "human",
"value": "require 'java'\n\nmodule BiteScript\n module ASM\n begin\n # try mangled names for the version included with JRuby\n java.lang.Class.for_name 'jruby.ob... | ruby | chosen |
[
{
"from": "system",
"value": "Use HOMEBREW_REPOSITORY instead of HOMEBREW_PREFIX to derive tapspath\n"
},
{
"from": "human",
"value": "module Cask::Locations\n def self.included(base)\n base.extend(ClassMethods)\n end\n\n module ClassMethods\n def tapspath\n HOMEBREW_PREFIX.join \"... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for email validator.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\n\ndescribe \"EmailValidator\" do\n\n before(:each) do\n @validator = EmailValidator.new({:attributes => {}})\n @mock = mock('model')\n @mock.stub(\"errors\").and_return(... | ruby | chosen |
[
{
"from": "system",
"value": "Apply scope to Blood Taste notification\n"
},
{
"from": "human",
"value": "module Effect\n\tclass BloodTaste\n\n\t\tattr_reader :amount\n\n\t\tdef initialize(parent, amount)\n\t\t\t@parent = parent\n\t\t\t@amount = amount\n\t\tend\n\n\t\tdef intent_combat_hook(inten... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cases in rbx + mysql where .table_exists? is called on the virtual model before it even has a table name.\n"
},
{
"from": "human",
"value": "module Globalize\n module ActiveRecord\n class Translation < ::ActiveRecord::Base\n class << self\n def w... | ruby | chosen |
[
{
"from": "system",
"value": "Store keys as symbol in characters.json\n"
},
{
"from": "human",
"value": "require 'json'\n\nmodule KvgCharacterRecognition\n class JSONDatastore\n def initialize filename = 'characters.json'\n @data = load_file(filename)\n @filename = filename\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Fix shortening to work on multiline strings\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def markdown(text)\n renderer = Redcarpet::Render::HTML.new(filter_html: true, hard_wrap: true)\n Redcarpet::Markdown.new(renderer, { auto_link: true, ta... | ruby | chosen |
[
{
"from": "system",
"value": "Support config_locale settings in set_user_language override\n\nFixes spree/spree#3915\n"
},
{
"from": "human",
"value": "module SpreeI18n\n # The fact this logic is in a single module also helps to apply a custom\n # locale on the spree/api context since api base... | ruby | chosen |
[
{
"from": "system",
"value": "Add scope for default order\n"
},
{
"from": "human",
"value": "class Dojo < ApplicationRecord\n NUM_OF_COUNTRIES = \"75\"\n NUM_OF_WHOLE_DOJOS = \"1,500\"\n NUM_OF_WHOLE_EVENTS = \"1,555\"\n NUM_OF_JAPAN_DOJOS = Dojo.count.to_s\n\n belongs_to :prefecture\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Reset URL if invalid; check validity via http(s)://\n"
},
{
"from": "human",
"value": "class Icon < ActiveRecord::Base\n belongs_to :user\n belongs_to :template\n has_and_belongs_to_many :galleries\n\n validates_presence_of :url, :user, :keyword\n validate :url... | ruby | chosen |
[
{
"from": "system",
"value": "Remove use of deprecated dynamic finder\n"
},
{
"from": "human",
"value": "class LineParserError < Exception\nend\n\nclass Line < ActiveRecord::Base\n belongs_to :person\n belongs_to :quote, touch: true\n \n validates :person, presence: true\n \n default_scope... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.