conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make sure the support methods make it into all screens\n"
},
{
"from": "human",
"value": "describe \"PM::Support\" do\n\n before do\n @app = TestDelegate.new\n @screen = BasicScreen.new\n end\n\n it \"has a convenience method for UIApplication.sharedApplica... | ruby | chosen |
[
{
"from": "system",
"value": "Bugfix: Remove a manual reference to `knowledgebase_article_id`\n\nWe changed this a while back to be performed in the base class, we just missed\nremoving this one.\n\n--------------------------------------------------------------------------------\nChange-Id: I98ec5a71a70... | ruby | chosen |
[
{
"from": "human",
"value": "Add the test suite for the Welcome Controller.\n\n100 test coverage; all tests passing.\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe WelcomeController do\n let(:user) { FactoryGirl.create(:user) }\n\n context \"user is not signed in\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"remove , from end of the test file path\"\n\nThis reverts commit 77320671361585abd43ef793a9a20628f51c87ba.\n"
},
{
"from": "human",
"value": "describe KnapsackPro::TestFileCleaner do\n describe '.clean' do\n subject { described_class.clean(test_file_pat... | ruby | chosen |
[
{
"from": "system",
"value": "Set podspec version to 0.6.0"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NuimoSwift\"\n s.version = \"0.5.1\"\n s.summary = \"Swift library for connecting and communicating with Senic's Nuimo controllers\"\n s.description... | ruby | chosen |
[
{
"from": "system",
"value": "Add rspec as a dev 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 'tinyforth/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "human",
"value": "Add solution for multiplication tables\n"
},
{
"from": "gpt",
"value": "def mult_tab(rows, cols)\n ary = []\n\n # Calculate\n (1..rows).each do |row|\n (1..cols).each do |col|\n ary << row * col\n end\n end\n\n # Print nice table\n max_dig = ary.max.... | ruby | chosen |
[
{
"from": "system",
"value": "Update Typhoeus to the latest version.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/lazy_resource/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Andrew Latimer\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homebrew download url and autocomplete scripts url\n"
},
{
"from": "human",
"value": "require \"formula\"\n\nclass Gh < Formula\n VERSION = \"0.25.0\"\n ARCH = if MacOS.prefer_64_bit?\n \"amd64\"\n else\n \"386\"\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing file in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'railsdav'\n s.version = '0.0.8'\n s.date = Time.now\n s.authors = ['Willem van Kerkhof']\n s.licenses = ['MIT']\n s.email = %q{wvk@consolving.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix podspec to get rid of frustrating AFNetworking warnings\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"SubCommander\"\n s.version = \"0.0.1\"\n s.summary = \"iOS Objective-C framework for building testable clients for J... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused data attribute accessor from Request class\n"
},
{
"from": "human",
"value": "module MyMoip\n class Request\n include HTTParty\n\n attr_reader :id, :data, :response\n\n def initialize(id)\n @id = id\n end\n\n def api_call(params, o... | ruby | chosen |
[
{
"from": "system",
"value": "Fix return in rake task\n"
},
{
"from": "human",
"value": "namespace :report do\n desc 'Print assessment families, subjects, counts'\n task assessments: :environment do\n AssessmentsReport.new(STDOUT).print_report\n end\n\n desc 'Run data integrity check'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sqlite3 dependency issue in development\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"protokoll/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 'Popular searches...' from data and add headers constant'\n"
},
{
"from": "human",
"value": "require '../stock_trend'\n\ndescribe StockTrend do\n\n let(:s) { StockTrend.new }\n\n describe 'variables' do\n # check google finance url\n it 'should have t... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Change get tests for group_sets_api\n"
},
{
"from": "human",
"value": "require 'test_helper'\nrequire 'user'\n\nclass GroupSetsApiTest < ActiveSupport::TestCase\n include Rack::Test::Methods\n include TestHelpers::AuthHelper\n include TestHelpers::JsonHelper... | ruby | chosen |
[
{
"from": "system",
"value": "Update Plex Media Server to 0.9.8.14.263\n"
},
{
"from": "human",
"value": "class PlexMediaServer < Cask\n url 'http://downloads.plexapp.com/plex-media-server/0.9.8.4.125-ffe2a5d/PlexMediaServer-0.9.8.4.125-ffe2a5d-OSX.dmg'\n homepage 'http://plexapp.com'\n versi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix properties file in podspec"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Apic\"\n s.version = \"1.1\"\n s.summary = \"Apic is a library build on top of Alamofire that parses JSON API responses into swift objects\"\n s.h... | ruby | chosen |
[
{
"from": "system",
"value": "Add failing test for rb_raise leaks\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"colorize\"\n\ndescribe \"Console\" do\n let(:console) { Console.new }\n\n it \"can log a string\" do\n expect { console.log(\"hello\") }.to println(\"hello... | ruby | chosen |
[
{
"from": "system",
"value": "Add dev dependency on nokogiri (for corpuscle)\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/chbs/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jason Heiss\"]\n gem.email = ... | ruby | chosen |
[
{
"from": "system",
"value": "Use travis branch if present"
},
{
"from": "human",
"value": "require 'heroku/api'\nrequire 'anvil/engine'\nrequire 'active_support/core_ext/object/blank'\nrequire 'rrrretry'\nrequire 'repl_runner'\n\nrequire 'json'\nrequire 'stringio'\nrequire 'fileutils'\nrequire ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'Unknown media type: \".rz\"' Errors.\n\nSinatra 1.1.0 bails violently when mime type not given explicitly."
},
{
"from": "human",
"value": "require 'sinatra/base'\n\nclass Hostess < Sinatra::Base\n def serve\n send_file(File.expand_path(File.join(Geminabox.... | ruby | chosen |
[
{
"from": "system",
"value": "ADD require time for dateTime\n"
},
{
"from": "human",
"value": "module ISO8601\n VERSION = \"0.1\"\nend\n\nrequire \"iso8601/errors\"\nrequire \"iso8601/atoms\"\nrequire \"iso8601/dateTime\"\nrequire \"iso8601/duration\"\n"
},
{
"from": "gpt",
"value":... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Judopay.logger to be set\n"
},
{
"from": "human",
"value": "require_relative 'judopay/version'\nrequire_relative 'judopay/api'\nrequire_relative 'judopay/response'\nrequire_relative 'judopay/serializer'\nrequire_relative 'judopay/error'\n\nmodule Judopay\n cl... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify the output_path and write methods, add an output_directory accessor and inspect method.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Dimples\n # A class that models a single site page.\n class Page\n include Frontable\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Android Studio.app to v0.8.4 build-135.1295215\n"
},
{
"from": "human",
"value": "class AndroidStudio < Cask\n version '0.8.3 build-135.1281642'\n sha256 'fcc6a0b4817e83bc6251764637041e90db7c8df65e7a362e50b9083664cee0f9'\n\n url 'https://dl.google.com/dl/... | ruby | chosen |
[
{
"from": "system",
"value": "Add binaries for Beyond Compare\n"
},
{
"from": "human",
"value": "cask 'beyond-compare' do\n version '4.1.6.21095'\n sha256 'ecbcf867986ab4244ca4b0c5345f087bbeb0cd84dbeb8e578145218d72d981c1'\n\n url \"http://www.scootersoftware.com/BCompareOSX-#{version}.zip\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make awesome_print a default gem in rails\n"
},
{
"from": "human",
"value": "gem 'haml-rails'\n\ngem_group :development, :test do\n gem 'rspec-rails'\n gem 'spring-commands-rspec'\n gem \"capybara\"\n gem \"factory_girl_rails\"\n gem \"rspec-rails\"\n gem \"by... | ruby | chosen |
[
{
"from": "system",
"value": "Handle spaces and dots in project names\n"
},
{
"from": "human",
"value": "module Juici\n module Router\n include Routes\n\n def build_new_path\n \"/builds/new\"\n end\n\n def build_list_path\n %r{^/builds/(?<project>[\\w\\/]+)/list$}\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Update lvm cookbook ruby-lvm dependency\n\nAs Stated in the chef-lvm cookbook, the now used lvm dependency is not the same.\r\nThis change works now on my environment and (as a bonus) bring the reproducibility of my gluster cookbook usage on bento/fedora-26.\r\nThank you for th... | ruby | chosen |
[
{
"from": "system",
"value": "Add RequiredItemMissing and DuplicateItem exceptions.\n\nNoMetadataError/NoOrganizationsError and their related \"too-many\" exceptions is too specific,\nand we would like to avoid adding those kinds of exceptions every time the standard requires\none, and only one, of some kin... | ruby | chosen |
[
{
"from": "system",
"value": "Fix I18n issue with named args.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Troy\n module Helpers\n def h(content)\n CGI.escapeHTML(content)\n end\n\n def t(*args)\n I18n.t(*args)\n end\n\n def partial(name, l... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"[ey] Let engineyard run composer\"\n\nThis reverts commit b9dbe457b0430fc17beb7fb29961713e8919bad0.\n"
},
{
"from": "human",
"value": "# prepare config files\nrun \"ln -s #{release_path}/web/app.php #{release_path}/web/index.php\"\n\n# set timezone\nsudo \"... | ruby | chosen |
[
{
"from": "system",
"value": "Use unique index in upgrade migration, too\n\nBelongs to #78\n"
},
{
"from": "human",
"value": "class UnreadPolymorphicReaderMigration < ActiveRecord::Migration\n def self.up\n remove_index :read_marks, [:user_id, :readable_type, :readable_id]\n rename_column... | ruby | chosen |
[
{
"from": "system",
"value": "Add First Tests for Rejector Class\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Rack::Rejector do\n it 'has a version number' do\n expect(Rack::Rejector::VERSION).not_to be nil\n end\n\n it 'does something useful' do\n expect(false).... | ruby | chosen |
[
{
"from": "system",
"value": "Mark versions as 0.13, add extra file to gem spec, and update change log\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.name = 'log-courier'\n gem.version = '0.12'\n gem.description = 'Log Courier library'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependency from bats to bats-core\n"
},
{
"from": "human",
"value": "class BatsSupport < Formula\n desc \"Supporting library for Bats test helpers\"\n homepage \"https://github.com/ztombol/bats-support\"\n url \"https://github.com/ztombol/bats-support/arch... | ruby | chosen |
[
{
"from": "system",
"value": "Rename gem to not conflict with an existing gem\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'mail/logger/version'\n\nGem::Specification.new do |spec|... | ruby | chosen |
[
{
"from": "system",
"value": "Add guard for frontend-based AuthenticationHelpers\n\nThese Spree::AuthenticationHelpers methods should only be available for\napps that have `solidus_frontend` available, as they are simply proxies\nfor route helpers provided by that gem.\n\nCloses #59.\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "human",
"value": "Add test to ensure all flows are visualisable\n\nWe've gone to quite some effort to ensure that the graph visualisation\ncontinues to work while we've been refactoring Smart Answers. I'm adding this\ntest to ensure that we don't undo that work in future.\n\nThis was highlighted ... | ruby | chosen |
[
{
"from": "system",
"value": "Set Braintree configurations through BraintreeRails in integration test helper\n"
},
{
"from": "human",
"value": "require File.expand_path(File.join(File.dirname(__FILE__), '../test_helper'))\nconfig = File.join(TEST_PATH, 'config/braintree_auth.yml')\nif File.exist... | ruby | chosen |
[
{
"from": "system",
"value": "Use caruby-core JRuby 1.5 bug work-around\n"
},
{
"from": "human",
"value": "module CaTissue\n # This HashCode mix-in overrides the caTissue hashCode and equality test to work around caTissue bugs.\n module HashCode\n # caTissue alert - caTissue hashCode change... | ruby | chosen |
[
{
"from": "system",
"value": "Update Host CNAMEs every hour\n\nThis will mean that the transition status for a site will be more up-to-date\nif it has transitioned today. Currently this happens at midnight when data is\nimported from Redirector.\n"
},
{
"from": "human",
"value": "# default cron ... | ruby | chosen |
[
{
"from": "system",
"value": "Add version to program name\n"
},
{
"from": "human",
"value": "require 'command_line_helper'\n\nmodule TrafficLightController\n class CLI\n include CommandLineHelper::HelpText\n\n class << self\n def run\n cli = self.new\n cli.process_comma... | ruby | chosen |
[
{
"from": "system",
"value": "Use request.fullpath as the last resort for finding a path\n\nThis is for paths that are exclusively '/', so it may just be better to hardcode it to that.\n"
},
{
"from": "human",
"value": "module Context\n module ControllerHelper\n\n # Returns the current Conte... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for non-alphanum methods.. specs to come\n"
},
{
"from": "human",
"value": "class YARD::Handlers::MethodHandler < YARD::Handlers::Base\n handles TkDEF\n \n def process\n mscope = scope\n meth = statement.tokens.to_s[/^def\\s+([\\s\\w\\:\\.]+)/... | ruby | chosen |
[
{
"from": "system",
"value": "Update error class name with camel case\n"
},
{
"from": "human",
"value": "module HubbleApiClient\n class Request\n def self.get_uuid(email)\n parse Connection::API.get_request(route: \"accounts-users\", query: build_query({\"email\" => email}))\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Nolockfile to get to compile phase\n\nNolockfile does not define a number of things that base needs in terms of subclass overrides. By simply changing the parent class, we get reasonable versions of those things and allow the build to get as far as compile, so that the er... | ruby | chosen |
[
{
"from": "human",
"value": "Add new cask for Kobito\n"
},
{
"from": "gpt",
"value": "class Kobito < Cask\n url 'http://kobito.qiita.com/download/Kobito_v1.8.2.zip'\n homepage 'http://kobito.qiita.com/'\n version '1.8.2'\n sha1 'eac47edd574380391044ea89486b14a0ec2b3a00'\n link 'Kobito.app'\... | ruby | chosen |
[
{
"from": "system",
"value": "Use new style hash syntax.\n"
},
{
"from": "human",
"value": "# Ensure the agent is started using Unicorn\n# This is needed when using Unicorn and preload_app is not set to true.\n# See http://support.newrelic.com/kb/troubleshooting/unicorn-no-data\nNewRelic::Agent.... | ruby | chosen |
[
{
"from": "human",
"value": "Patch for server gone away\n"
},
{
"from": "gpt",
"value": "require 'active_record/connection_adapters/mysql_adapter'\n\nmodule ActiveRecord::ConnectionAdapters\n class MysqlAdapter\n alias_method :execute_without_retry, :execute\n def execute(*args)\n ex... | ruby | chosen |
[
{
"from": "system",
"value": "Remove special quoting case for MySQL\n\n* DO MySQL driver configures connection to allow ANSI compliant quotes\n to be used. SQL should always be generated as ANSI compliant when\n possible, and only when there is no other choice should we support\n a special case.\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Add an error path that returns 500\n"
},
{
"from": "human",
"value": "require 'rack/handler/puma'\nrequire 'rack/builder'\nrequire 'instana/rack'\n\n::Instana.logger.info \"Booting instrumented background Rackapp on port 6511 for tests.\"\n\nThread.new do\n app = R... | ruby | chosen |
[
{
"from": "system",
"value": "Add column numbers to CheckConditionals tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe PuppetLint::Plugins::CheckConditionals do\n subject do\n klass = described_class.new\n klass.run(defined?(fullpath).nil? ? {:fullpath => ''} : {... | ruby | chosen |
[
{
"from": "human",
"value": "[meta] Add a script for resolving Dropbox conflicts\n"
},
{
"from": "gpt",
"value": "require 'fileutils'\ninclude FileUtils\n\nconflicts = `find ~/Dropbox -name \"*conflicted*\"`.split(\"\\n\")\nsame, diff = conflicts.select { |conflict|\n actual = conflict.sub(/ \\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ConfigurationFile check for non-breaking space\n\nThe regular expression used to check for non-breaking spaces is invalid,\nbut prints a warning (\"Unknown escape \\U is ignored: /\\U+A0/\") instead\nof raising an error.\n\nThis commit fixes the check (and the warning).\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for CrashPlan.\n"
},
{
"from": "human",
"value": "cask 'crashplan' do\n version '4.7.0'\n sha256 'c36d7280038e576f70bce12f11cdfe6c2519c34d4b21f1681c59bac439a2c283'\n\n url \"http://download.crashplan.com/installs/mac/install/CrashPlan/Cra... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Insomniax to 2.1.4\nChanged download link from MacUpdate to original source since MacUpdate\nsimply redirects users to the original source.\n"
},
{
"from": "human",
"value": "class Insomniax < Cask\n version '2.1.3'\n sha256 '50f41f5f40bd7a8896139c838b48d0... | ruby | chosen |
[
{
"from": "system",
"value": "Add return true to make clear the callback chain will never halt when using this in before_save instead of before_validation."
},
{
"from": "human",
"value": "module ActiveRecord\n module DatabaseValidations\n module StringTruncator\n extend ActiveSupport::... | ruby | chosen |
[
{
"from": "system",
"value": "Update git ls-files to use a separator after the options\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/adamantium/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'adamantium'\n gem.version =... | ruby | chosen |
[
{
"from": "system",
"value": "Correct menu hook for Spree v3.0.0.beta\n"
},
{
"from": "human",
"value": "Deface::Override.new(virtual_path: 'spree/admin/shared/_configuration_menu',\n name: 'print_invoice_admin_configurations_menu',\n insert_bott... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing space on sign in no_email_error flash\n"
},
{
"from": "human",
"value": "class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n\n def github\n @user = User.find_for_github_oauth(request.env[\"omniauth.auth\"], current_user)\... | ruby | chosen |
[
{
"from": "system",
"value": "Change meta tag to use parentheses around charset attribute\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'slim'\nrequire 'data_mapper'\nrequire 'dm-postgres-adapter'\nrequire 'pathname'\n\nconfigure :development do\n require 'dm-sqlite-adapter'\nen... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler (1.6.3 -> 1.7.13)\n"
},
{
"from": "human",
"value": "# container for all constants including vendor-specific ones\nmodule Configs\n\n NAME = \"ruby\"\n BUILDPACK_VERSION = \"v77\"\n DEFAULT_RUBY_VERSION = \"ruby-2.0.0\"\n\n PAAS_VENDOR_FOLDER = \... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for AssignmentsManager\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\nrequire \"#{Rails.root}/lib/assignments_manager\"\n\ndescribe AssignmentsManager do\n describe '.update_assignments' do\n it 'creates new assignments for existing artic... | ruby | chosen |
[
{
"from": "human",
"value": "Add route spec for root url\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'root' do\n describe 'routing' do\n it 'routes to home#index' do\n expect(get: '/').to route_to('home#index')\n end\n end\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Fix equate_il must be boolean error\n"
},
{
"from": "human",
"value": "class MpaController < HandleOptionsController\n before_action :set_headers, only: %i[pept2data]\n before_action :default_format_json, except: ['analyze']\n skip_before_action :verify_authentic... | ruby | chosen |
[
{
"from": "system",
"value": "Add space before note refs\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def markdown(text)\n raw(RDiscount.new(text).to_html)\n end\n\n def parse(text)\n text = find_and_replace_commit_refs(text)\n text = find_and_replace_note_refs(text)... | ruby | chosen |
[
{
"from": "system",
"value": "Add elasticsearch config to gem\n"
},
{
"from": "human",
"value": "require 'mongoid-elasticsearch'\n\nMongoid::Elasticsearch.autocreate_indexes = false\nMongoid::Elasticsearch.prefix = ENV[\"MONGOID_ENVIRONMENT\"] || \"\"\n\nmodule Searchable\n \n extend ActiveSup... | ruby | chosen |
[
{
"from": "system",
"value": "Add a lighter variant of Fira Sans, change logo to use SVG.\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n @@template = %w{plos default}[1]\n\n def logo\n src = case @@template\n when 'plos'\n 'logo.plos-alm.png'\n when 'default'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'Hash.has_key?' method to see if default values should be set. emails_disabled? method was a workaround and is not used anywhere else.\n"
},
{
"from": "human",
"value": "class Build\n module Notifications\n def send_email_notifications?\n return false u... | ruby | chosen |
[
{
"from": "system",
"value": "Add constants for `UnpublishingReason` ids\n\nConvenience to avoid non-idiomatic `UnpublishingReason::Withdrawn.id`\n"
},
{
"from": "human",
"value": "class UnpublishingReason\n include ActiveRecordLikeInterface\n\n attr_accessor :id, :name, :as_sentence\n\n Publ... | ruby | chosen |
[
{
"from": "system",
"value": "Set the default ORM generator to :datamapper"
},
{
"from": "human",
"value": "require 'dm-core'\nrequire 'dm-active_model'\n\nrequire 'rails3_datamapper/setup'\n\n# Comment taken from active_record/railtie.rb\n#\n# For now, action_controller must always be present w... | ruby | chosen |
[
{
"from": "system",
"value": "Check autoloading inside the on_inherit hook\n"
},
{
"from": "human",
"value": "module Protobuf\n module ActiveRecord\n class Railtie < Rails::Railtie\n config.protobuf_active_record = Protobuf::ActiveRecord.config\n\n ActiveSupport.on_load(:active_rec... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"cache is now a module\"\n\nThis reverts commit 9fda7b76c24bbcb1ce26b38a2480f0ba3564c514.\n"
},
{
"from": "human",
"value": "require 'dalli'\n\nmodule Sprockets\n module Cache\n # A simple Memcache cache store.\n #\n # environment.cache = Sproc... | ruby | chosen |
[
{
"from": "system",
"value": "Use the session token if it's available\n"
},
{
"from": "human",
"value": "require \"fog\"\nrequire \"log4r\"\n\nmodule VagrantPlugins\n module AWS\n module Action\n # This action connects to AWS, verifies credentials work, and\n # puts the AWS connect... | ruby | chosen |
[
{
"from": "human",
"value": "Clear document_collections links for publication\n\nThe Publishing API will resolve these links for us so clear\nany document_collections links data previously added prior\nto dependency resolution.\n"
},
{
"from": "gpt",
"value": "pub = Publication.find(124751)\n\nl... | ruby | chosen |
[
{
"from": "system",
"value": "Move gem_info route to /gems/:gem\n\nThis mirrors the rubygems.org routes, and is less limiting with possible\nroutes in the future."
},
{
"from": "human",
"value": "require 'app/libraries'\n\nmodule Gemphile\n class App < Sinatra::Base\n register Mustache::Sina... | ruby | chosen |
[
{
"from": "system",
"value": "Make checking completed box work.\n"
},
{
"from": "human",
"value": "class CardOverlay < Page\n path :paper_task\n\n def dismiss\n all('a').detect { |a| a.text == 'CLOSE' }.click\n end\n\n def assignee\n all('.chosen-assignee.chosen-container').first.text\... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod version -> 2.0.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"1.2.1\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Change podspec version -> 2.2.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |spec|\n spec.name = \"Framezilla\"\n spec.version = \"2.1.2\"\n spec.summary = \"Comfortable syntax for working with frames.\"\n\n spec.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec due to some aesthetic changes in implementation\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'msfl_visitors'\n s.version = '1.2.1'\n s.date = '2015-07-06'\n s.summary = \"Convert MSFL to other f... | ruby | chosen |
[
{
"from": "human",
"value": "Add a bench for 64bit integer parameters\n"
},
{
"from": "gpt",
"value": "require File.expand_path(File.join(File.dirname(__FILE__), \"bench_helper\"))\n\nmodule LibTest\n extend FFI::Library\n ffi_lib LIBTEST_PATH\n attach_function :bench_s64s64s64_v, [ :long_lon... | ruby | chosen |
[
{
"from": "system",
"value": "Use GDS-SSO supplied permissions check\n\nGDS-SSO provides a predicate for us to check for the presence of\npermissions.\n"
},
{
"from": "human",
"value": "class User < ApplicationRecord\n include GDS::SSO::User\n serialize :permissions, Array\n RESOURCE_MANAGER_... | ruby | chosen |
[
{
"from": "system",
"value": "Add preliminary validations and dependent destroy to User model\n"
},
{
"from": "human",
"value": "class User < ApplicationRecord\n\thas_secure_password\n\n\thas_many :plans\n\n\tvalidates :name, presence: true, length: { minimum: 5 }\nend"
},
{
"from": "gpt... | ruby | chosen |
[
{
"from": "system",
"value": "Allow other engines to be checked out parallel to stash_engine as well as in subdirectories\n"
},
{
"from": "human",
"value": "module BundlerHelp\n\n def self.find_path(dir_name)\n path = File.expand_path('.')\n path_arr = path.split(File::SEPARATOR).map {|x|... | ruby | chosen |
[
{
"from": "system",
"value": "Enable fallbacks from i18n module\n"
},
{
"from": "human",
"value": "module AwesomeHstoreTranslate\n module ActiveRecord\n module ActAsTranslatable\n def translates(*attr_names)\n options = attr_names.extract_options!\n\n bootstrap(options, at... | ruby | chosen |
[
{
"from": "system",
"value": "Put error warning on destroy/rollback of the migration.\n"
},
{
"from": "human",
"value": "class RenamingMigrationGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n argument :old_name\n argument :new_name\n argument :p... | ruby | chosen |
[
{
"from": "system",
"value": "Use Solr 5.4.1 by default\n"
},
{
"from": "human",
"value": "require 'solr_wrapper/version'\nrequire 'solr_wrapper/instance'\n\nmodule SolrWrapper\n def self.default_solr_version\n '5.4.0'\n end\n\n def self.default_instance_options\n @default_instance_opti... | ruby | chosen |
[
{
"from": "system",
"value": "Use [:type] instead of .type\n\nActionItem1733()\n"
},
{
"from": "human",
"value": "class RemovePublishedArticles < ActiveRecord::Migration\n def self.up\n select_all(\"SELECT * from articles WHERE type = 'PublishedArticle'\").each do |published|\n referenc... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to 1.0.0 for Swift 3 branch\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'FazeKit'\n s.version = '0.1.3'\n s.summary = 'A collection of helper functions and extensions for Swift iOS apps'... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundler install to trunk, not included with trunk for a while\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# ruby E:/GitHub/\\ruby-loco/install_gem_update.rb\n\n# Updates bundled gems\n#\nmodule InstallGemUpdate\n\n def self.run\n upda... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic HTTP auth only for selected environments\n"
},
{
"from": "human",
"value": "class Admin::ApplicationController < ActionController::Base\n protect_from_forgery\n\n http_basic_authenticate_with :name => CONFIG[:admin_username], :password => CONFIG[:admin_p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix not using git.bin_path in config.\n\nClosing #3614\" and \"Closing #3574.\n"
},
{
"from": "human",
"value": "require 'grit'\nrequire 'pygments'\n\nGrit::Git.git_timeout = Gitlab.config.git.timeout\nGrit::Git.git_max_size = Gitlab.config.git.max_size\n\nGrit::Blo... | ruby | chosen |
[
{
"from": "system",
"value": "Use alias instead of alias_method.\n"
},
{
"from": "human",
"value": "class String\n def symbolize\n self.gsub(/[^A-Za-z0-9]+/, \"_\").gsub(/(^_+|_+$)/, \"\").underscore.to_sym\n end\n \n def titlecase\n self.gsub(/((?:^|\\s)[a-z])/) { $1.upcase }\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow a way to disable the base cookbooks\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: coopr_base\n# Recipe:: default\n#\n# Copyright © 2013-2014 Cask Data, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use th... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Opera Beta.app to v30.0.1835.49\n"
},
{
"from": "human",
"value": "cask :v1 => 'opera-beta' do\n version '30.0.1835.47'\n sha256 '97817b3a4bbf6eb7e92493f241665012f42592b3b404e888ad3cb05f61c8b39c'\n\n url \"http://get.geo.opera.com/pub/opera-beta/#{version... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec file for Player class tests\n"
},
{
"from": "gpt",
"value": "require_relative \"player\"\n\ndescribe Player do\n\n before do\n $stdout = StringIO.new # makes sure that puts results are not printed to the console\n @initial_health = 150\n @player = ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the unused :type attribute from ResourceGroup\n"
},
{
"from": "human",
"value": "require_relative './resource'\n\nmodule Convection\n module Model\n class Template\n # A collection of different {Convection::Model::Template::Resource}s.\n class R... | ruby | chosen |
[
{
"from": "system",
"value": "Add exist generator to the project.\n"
},
{
"from": "human",
"value": "module CerberusCore\n class ExistGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n desc <<-eos \n Description:\n Given a preexisting ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.