conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Exclude project information from environment entity\n"
},
{
"from": "human",
"value": "class EnvironmentEntity < Grape::Entity\n include RequestAwareEntity\n\n expose :id\n expose :name\n expose :state\n expose :external_url\n expose :environment_type\n expos... | ruby | chosen |
[
{
"from": "human",
"value": "Add routes for editing and deleting answers\n"
},
{
"from": "gpt",
"value": "get '/answers/:id/edit' do\n @answer = Answer.find(params[:id])\n erb :'/answers/edit'\nend\n\nput '/answers/:id' do\n @answer = Answer.find(params[:id])\n @answer.assign_attributes(para... | ruby | chosen |
[
{
"from": "human",
"value": "Add binary search by ruby\n"
},
{
"from": "gpt",
"value": "# x: int, xs: int[] ordered asc\ndef contains(x, xs)\n if xs.length == 0 then\n false\n else\n n = xs.length / 2\n if xs[n] == x then\n true\n elsif x < xs[n] then\n contains(x, xs.tak... | ruby | chosen |
[
{
"from": "system",
"value": "Add user integration test for valid information\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UsersSignupTest < ActionDispatch::IntegrationTest\n\n test \"invalid signup information\" do\n get signup_path\n assert_no_difference 'User.count... | ruby | chosen |
[
{
"from": "system",
"value": "Replace inject with slightly more legible select\n"
},
{
"from": "human",
"value": "module Capybara\n class << self\n def save_and_open_page(html)\n name = File.join(*[Capybara.save_and_open_page_path, \"capybara-#{Time.new.strftime(\"%Y%m%d%H%M%S\")}.html\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix span name; better debug and report http payload\n"
},
{
"from": "human",
"value": "require 'net/http'\n\nNet::HTTP.class_eval {\n\n def request_with_instana(*args, &block)\n if !Instana.tracer.tracing? || !started?\n return request_without_instana(*args... | ruby | chosen |
[
{
"from": "system",
"value": "Use official SPDX ID and correct version number\n\nhttps://spdx.org/licenses/\r\n\r\n..additionally, this code is licensed under MPL-2.0; I'm not sure there /is/ a 3.0?\r\n\r\nThis change /may/ warrant a minor version bump; if so LMK and I'll update the PR."
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Move auto pagination into the configure block\n"
},
{
"from": "human",
"value": "require 'octokit'\n\nbegin\n access_token = ENV.fetch(\"GITHUB_TOKEN\")\n hostname = ENV.fetch(\"GITHUB_HOSTNAME\")\nrescue KeyError\n puts\n puts \"To run this script, please set t... | ruby | chosen |
[
{
"from": "system",
"value": "Extend auth expiration to 3 days"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# this is tested in spec/controllers/v1/concerns/\nmodule UserAuth\n extend ActiveSupport::Concern\n\n included do |base|\n params = base.const_defined?('USER_AUT... | ruby | chosen |
[
{
"from": "system",
"value": "Add created_at field to assessment serialization.\n"
},
{
"from": "human",
"value": "class AssessmentSerializer < ActiveModel::Serializer\n embed :ids, include: true\n attributes :id, :score, :notes\n has_one :submission\n has_one :assessor\nend"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec tests with new required packages\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'rpmbuilder::packages::essential', :type => 'class' do\n\n context \"Packages which should be installed on every OS\" do\n\n packages = [\n 'crea... | ruby | chosen |
[
{
"from": "system",
"value": "Test outcome of saving future article as draft\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\nRSpec.feature 'Drafting articles', type: :feature do\n let(:admin) { create :user, :as_admin }\n\n before do\n load Rail... | ruby | chosen |
[
{
"from": "system",
"value": "Improve clean site job specs before/after.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Relais::CleanSiteJob do\n let('file_path') { Rails.root.join('public', 'deploy', 'examples', \"cached.html\").to_s }\n before do\n FileUtils.mkdir_p(... | ruby | chosen |
[
{
"from": "system",
"value": "Clear unused request test helper in users/index\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe \"Users::Index\", type: :request do\n describe \"GET /my_propsoals\" do\n\n let(:user) { FactoryGirl.create(:user) }\n let(:activity) {... | ruby | chosen |
[
{
"from": "system",
"value": "Handle deleted exercise in FilePolicy\n\nFixes CODEOCEAN-DZ\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule CodeOcean\n class FilePolicy < AdminOrAuthorPolicy\n def author?\n @user == @record.context.author\n end\n\n def sho... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Check if tutorial stream is present before serializing\n"
},
{
"from": "human",
"value": "# Doubtfire will deprecate ActiveModelSerializer in the future.\n# Instead, write a serialize method on the model.\n\nrequire 'user_serializer'\n\nclass TutorialSerializer... | ruby | chosen |
[
{
"from": "system",
"value": "Hide class under a lambda\n"
},
{
"from": "human",
"value": "# rpn.init.rb\n# Ernest Prabhakar\n# 6-APR-2016\n#\n# Wrap Eval for use by REPL\n\nrequire_relative './rpn_parse'\n\ndef rpn_init\n rpn = RPNParse.new\n \n rpn.number /\\A\\s*[+-]?\\d+\\z/ , -> s {Integ... | ruby | chosen |
[
{
"from": "system",
"value": "Support swift 5.0 on cocoapods\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'ZIPFoundation'\n s.version = '0.9.10'\n s.license = 'MIT'\n s.summary = 'Effortless ZIP Handling in Swift'\n s.homepage = 'https://github.com/weichsel/ZIPFoundati... | ruby | chosen |
[
{
"from": "system",
"value": "Use caveats DSL in Paraview Lion Nightly.\n"
},
{
"from": "human",
"value": "class ParaviewLionPython27Nightly < Cask\n url 'http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=nightly&type=binary&os=osx&downloadFile=ParaView-Darwin-64bi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug in getting server based on id.\n"
},
{
"from": "human",
"value": "module HP\n module Cloud\n class CLI < Thor\n\n desc \"servers:reboot <id>\", \"reboot a server by id\"\n long_desc <<-DESC\n Reboot an existing server by specifying its id. R... | ruby | chosen |
[
{
"from": "system",
"value": "Fix RunAll context to define modified_lines_in_file\n\nChange-Id: Ic3553043bff52a5a2893b41813f866e88ca75752\nReviewed-on: http://gerrit.causes.com/44906\nTested-by: jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@brigade.com>\nReviewed-by: Shane da Silva <67fb7bfe39f841b16a1f... | ruby | chosen |
[
{
"from": "system",
"value": "Replace array buffer with string buffer\n"
},
{
"from": "human",
"value": "require \"json\"\n\nmodule Temple\n module CoffeeScript\n class Generator < Temple::Generator\n define_options :indent => 0\n\n def call(exp)\n @indent = options[:indent]... | ruby | chosen |
[
{
"from": "system",
"value": "Determine the export file automatically\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'json'\nrequire 'base64'\n\nabort \"Usage: #{$0} <exported JSON file>\" if ARGV.count < 1\n\nfile = ARGV.first\nabort \"JSON file does not exist: #{file}\" unle... | ruby | chosen |
[
{
"from": "system",
"value": "Add json for compatibility with ruby 1.8.7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ruote/resque/version'\n\nGem::Specification.new do ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add __FILE__ and __LINE__ for better backtraces.\"\n\nThis reverts commit 1a29d89705add9753c9928cb489baeaf5d18bc9b.\n"
},
{
"from": "human",
"value": "require 'appraisal/appraisal'\nrequire 'appraisal/gemfile'\n\nmodule Appraisal\n # Loads and parses Appra... | ruby | chosen |
[
{
"from": "system",
"value": "Add libs to include path when invoking Test::Unit\n"
},
{
"from": "human",
"value": "Autotest.add_hook :initialize do |att|\n att.clear_mappings\n\n att.add_mapping(%r%^(test|spec)/.*\\.rb$%) do |filename, _|\n filename\n end\n\n att.add_mapping(%r%^lib/(.*)\... | ruby | chosen |
[
{
"from": "system",
"value": "Use AS.on_load when extending {AV,AC,AR}::Base in the initializer\n"
},
{
"from": "human",
"value": "module Chanko\n class Railtie < Rails::Railtie\n initializer \"chanko\" do |app|\n ::ActionView::Base.send(:include, Helper, Invoker, UnitProxyProvider)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Switch the new SSL-friendly bucket name."
},
{
"from": "human",
"value": "#\n# Author:: Noah Kantrowitz <noah@coderanger.net>\n#\n# Copyright 2013, Balanced, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ex... | ruby | chosen |
[
{
"from": "system",
"value": "Update thrift version to 0.9.1\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: thrift\n# Attributes:: default\n#\n# Copyright 2011, Opscode, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in c... | ruby | chosen |
[
{
"from": "system",
"value": "Add initializer to require acts_as_paranoid in the rails app\n"
},
{
"from": "human",
"value": "require \"hyper_paranoid/version\"\n\nmodule HyperParanoid\n class Railtie < Rails::Railtie\n config.app_generators do |g|\n g.templates.unshift File::expand_pat... | ruby | chosen |
[
{
"from": "system",
"value": "Use root namespace for Rails::Engine"
},
{
"from": "human",
"value": "module Konacha\n class Engine < Rails::Engine\n # Do not mess up the application's namespace.\n # http://api.rubyonrails.org/classes/Rails/Engine.html#label-Isolated+Engine\n isolate_nam... | ruby | chosen |
[
{
"from": "human",
"value": "Add podspec. Useful to have when doing local mods.\n"
},
{
"from": "gpt",
"value": "Pod::Spec.new do |s|\n s.name = 'FMDB'\n s.version = '2.0'\n s.summary = 'A Cocoa / Objective-C wrapper around SQLite.'\n s.homepage = 'https://github.com/ccgus/fmdb'\n s.l... | ruby | chosen |
[
{
"from": "system",
"value": "Add known attributes to PDC::V1::Product\n\nThis patch fixes issue 22 where fetching a product resulted in\nwarning about unknown attributes. This has now been fixed by\nadding the list of attributes to Product.\n"
},
{
"from": "human",
"value": "module PDC::V1\n c... | ruby | chosen |
[
{
"from": "system",
"value": "Remove attachments fix from the Rails 3 installation process.\n"
},
{
"from": "human",
"value": "require 'action_mailer'\nrequire 'postmark'\nrequire 'postmark_delivery_method'\n\nmodule PostmarkInstaller\n extend self\n \n def auto_detect_and_install\n if Act... | ruby | chosen |
[
{
"from": "system",
"value": "Update Railtie to use `initializer` instead of `after_initialize`\n"
},
{
"from": "human",
"value": "class Raygun::Railtie < Rails::Railtie\n after_initialize \"raygun.configure_rails_initialization\" do |app|\n if Raygun.configured?\n # Thanks Airbrake: Se... | ruby | chosen |
[
{
"from": "system",
"value": "Add requires_arc flag to podspec.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'ObjectiveSugar'\n s.version = '1.0.0'\n s.summary = 'Objective C additions for humans. Write ObjC _like a boss_.'\n s.description = '-map, -e... | ruby | chosen |
[
{
"from": "system",
"value": "[CHG] Use rails logger as default\n"
},
{
"from": "human",
"value": "require 'logger'\nrequire 'uri'\nrequire 'voltron/config/js'\n\nmodule Voltron\n class Config\n\n include ::ActiveSupport::Callbacks\n\n define_callbacks :generate_voltron_config\n\n attr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old and unused require rspec/rails line\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nrequire 'rails'\n# require 'active_record/railtie'\nrequire 'active_support/railtie'\nrequire 'action_controller/railtie'\nreq... | ruby | chosen |
[
{
"from": "system",
"value": "Return 403 by default for Pundit errors\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nstart = Time.now\nBundler... | ruby | chosen |
[
{
"from": "system",
"value": "Set config to remove deprecation warning\n"
},
{
"from": "human",
"value": "require_relative \"boot\"\n\nrequire \"rails/all\"\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.require(*Rai... | ruby | chosen |
[
{
"from": "system",
"value": "Use version of docker-api that creates images correctly with recent docker\n"
},
{
"from": "human",
"value": "$:.unshift(File.dirname(__FILE__) + '/lib')\nrequire 'chef/provisioning/docker_driver/version'\n\nGem::Specification.new do |s|\n s.name = 'chef-provisioni... | ruby | chosen |
[
{
"from": "system",
"value": "Update iOS and OS X deployment targets to respectively 8.0 and 10.10\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"XCDLumberjackNSLogger\"\n s.version = \"1.0.2\"\n s.summary = \"A CocoaLumber... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing parent class LetterDocument for PayslipDocument.\n"
},
{
"from": "human",
"value": "class PayslipDocument\n def salary_table(direct_balance, direct_account, direct_bookings)\n content = direct_bookings.inject([]) do |out, item|\n title = item.ti... | ruby | chosen |
[
{
"from": "system",
"value": "docs(example): Remove unnecessary type cast in RecordLoader example\n\nThe record's attribute reader method should already be returning\nvalues of the right type.\n"
},
{
"from": "human",
"value": "class RecordLoader < GraphQL::Batch::Loader\n def initialize(model,... | ruby | chosen |
[
{
"from": "system",
"value": "Add a version number inside Gosen\n"
},
{
"from": "human",
"value": "require 'restfully'\nrequire 'gosen/deployment_run'\nrequire 'gosen/deployment'\nrequire 'gosen/error'\n\nmodule Gosen\n # Extracts the site part of a Grid'5000 node hostname, and returns a hash i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActionView::TemplateRendererDecorator not supporting Rails 6\n\nStarting with Rails 6, ActionView::TemplateRenderer passes the\n`view` object around rather than storing it in an ivar[1]. Since\nwe need this object in `find_layout`, we need to use the previous\nbehavior in o... | ruby | chosen |
[
{
"from": "system",
"value": "Update Hydra to beta 7\n"
},
{
"from": "human",
"value": "class Hydra < Cask\n version '1.0 beta 6'\n sha256 'b1d16db3b6a38b85c7a60b81e1eab98c47ca417263672847e73021df885c16cb'\n\n url 'https://github.com/sdegutis/hydra/releases/download/v1.0.b6/Hydra-1.0.0.b6.app... | ruby | chosen |
[
{
"from": "human",
"value": "Add Kicad v2014-02-26 (bzr 4721)\n"
},
{
"from": "gpt",
"value": "class Kicad < Cask\n version '2014-02-26'\n sha256 '066520f10e9646e88c2e1d7812adf54a73a331592076f394cb439a97c228410b'\n\n # mdx4 is the official download host per the vendor homepage\n url \"http:/... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in Munki 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 => 'munki' do\n version '2.1.1.2352'\n sha256 ... | ruby | chosen |
[
{
"from": "system",
"value": "Use same terminologi as Release it!"
},
{
"from": "human",
"value": "class Cb::CircuitBreaker\n attr_reader :threshold, :error_count, :half_open_timeout\n def initialize(opts)\n @threshold = opts.fetch(:threshold)\n @half_open_timeout = opts.fetch(:half_open... | ruby | chosen |
[
{
"from": "system",
"value": "Change the variable name to 'extension'.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Dimples\n # A mixin class that allows a document to render via Tilt.\n module Renderable\n attr_accessor :rendered_contents\n\n def render(con... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration spec to handle search\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nfeature \"Search Users on Admin Dashboard\", js: true do\n let(:user) { create :user, :admin }\n let!(:journal) { create :journal }\n\n before do\n create :user, fir... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nil assignment to polymorphic belongs_to\n\nAssigning nil to a polymorphic belongs_to would nullify its _id field by\nnot its _type field.\n\nFixes failing test from c141dfc838a5dca9f197814410fa5d44c143129c.\nRegression from 1678e959e973de32287b65c52ebc6cce87148951.\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "Work some on create fulfillment order request\n"
},
{
"from": "human",
"value": "module Spree::Fulfillment::Providers::Amazon\n class CreateFulfillmentOrderRequest < PeddlerRequest\n\n end\nend"
},
{
"from": "gpt",
"value": "module Spree::Fulfillment::... | ruby | chosen |
[
{
"from": "system",
"value": "Rename f to file, use descriptive names\n"
},
{
"from": "human",
"value": "module Henshin\n\n # Compresses a set of files into one big ol' ugly file.\n #\n # @example\n #\n # compressed = Compressor.new(files)\n # compressed.compress #=> \"...\"\n #\n cl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the \"can't modify frozen array\" error with Rails 3\n"
},
{
"from": "human",
"value": "# Add a callback - to be executed before each request in development,\n# and at startup in production - to patch existing app classes.\n# See http://stackoverflow.com/questio... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up the code a bit."
},
{
"from": "human",
"value": "if defined? Pry::Plugins::VTerm\n class Pry::Plugins::VTerm\n class << self\n command = \"bash\"\n if ENV[\"SHELL\"] =~ %r!/zsh\\Z!\n command = \"zsh\"\n end\n\n @@aliases = `#{... | ruby | chosen |
[
{
"from": "system",
"value": "Update regex to use absolute anchors"
},
{
"from": "human",
"value": "class Service::Packagist < Service\n string :user\n password :token\n string :domain\n white_list :domain, :user\n\n def receive_push\n http_post packagist_url, :payload => generate_json(p... | ruby | chosen |
[
{
"from": "system",
"value": "Add a shortcut to Commander.new(...).run! -> Commander.run!(...)\n"
},
{
"from": "human",
"value": "module Songster\n\n # Super simple helper to build/run system call strings.\n class Commander < Array\n\n # Start a command chain.\n # @param [Array] *args th... | ruby | chosen |
[
{
"from": "system",
"value": "Set prompts for pry >= 0.12.0\n"
},
{
"from": "human",
"value": "require 'travis/cli'\n\nmodule Travis\n module CLI\n class Console < ApiCommand\n description \"interactive shell\"\n on '-x', '--eval LINE', 'run line of ruby' do |c, line|\n c.in... | ruby | chosen |
[
{
"from": "system",
"value": "Add file-find requirement and comment.\n"
},
{
"from": "human",
"value": "require 'rubygems' # When running under 1.8. Who knows?\n\nrequire 'mediainfo'\nrequire 'mini_exiftool'\nrequire 'spreadsheet'\n\n# Internal functions and classes\n\nrequire './lib/mediainfo.r... | ruby | chosen |
[
{
"from": "system",
"value": "Include emojis without a subpath\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\n# Add ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix configuration causing image issues\n"
},
{
"from": "human",
"value": "if defined? Refile::S3\n aws = {\n access_key_id: Rails.application.secrets.aws_access_key_id,\n secret_access_key: Rails.application.secrets.aws_secret_access_key,\n region: Rails.a... | ruby | chosen |
[
{
"from": "system",
"value": "Secure links to cross-origin destinations\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'yaml'\n\nrequire 'jekyll'\nrequire 'nokogiri'\n\nmodule Jekyll\n module Converters\n class Markdown\n # :nodoc:\n class NSHipsterProc... | ruby | chosen |
[
{
"from": "system",
"value": "Add link in display purchase helper (p91)\n"
},
{
"from": "human",
"value": "module InvoicesHelper\n def display_purchase(invoice)\n unless invoice.purchase.nil?\n invoice.purchase.description\n else\n \"(no Purchase set)\"\n end\n end\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Add setter for tagger and taggable by gid in Ecm::Tags::Tagging.\n"
},
{
"from": "human",
"value": "module Ecm::Tags\n class Tagging < ActsAsTaggableOn::Tagging\n def human\n \"#{taggable} - #{tag}\"\n end\n end\nend\n"
},
{
"from": "gpt",
"... | ruby | chosen |
[
{
"from": "system",
"value": "Update Sphinx to 2.2.3-beta & 2.1.9\n"
},
{
"from": "human",
"value": "default[:sphinx] = {\n :versions => {\n '2.2.2-beta' => '/usr/local/sphinx-2.2.2',\n '2.1.8-release' => '/usr/local/sphinx-2.1.8',\n '2.0.10-release' => '/usr/local/sphinx-2.0.10'\n },... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"[CHEF-1911] Also show the -a option\"\n\nThis reverts commit 3f7317e438ce0fc9736e6ebb22d0378a26f20c51.\n\nThe '-a' option isn't wired up. We might need some changes to\nKnife::Core::ObjectLoader to list objects in order to implement '-a' so\nwe'll just revert this one ... | ruby | chosen |
[
{
"from": "system",
"value": "Handle reminder without calendar item (test)\n"
},
{
"from": "human",
"value": "class RemindersController < MyplaceonlineController\n def footer_items_show\n super + [\n {\n title: I18n.t(\"myplaceonline.reminders.calendar_item\"),\n link: cal... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec: deployment target is iOS 5+\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"iTunesSearch\"\n s.version = \"0.0.1\"\n s.summary = \"Block based iTunes store communication for iOS and Mac OS X.\"\n s.homepage ... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to gemspec, is modified New BSD, New BSD, and MIT\n\nThe dependent gems are licensed as New BSD and MIT.\r\n\r\nThis gem's license omits a line from the New BSD. I'm not an attorney so I'm not sure what to call it, hence 'modified'"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage information to gemspec\n"
},
{
"from": "human",
"value": "# Encoding: utf-8\nrequire File.expand_path('../lib/cucumber-the/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Magnus Bergmark\"]\n gem.email = [\"magn... | ruby | chosen |
[
{
"from": "system",
"value": "Modify pod spec version to 0.5.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"EasyLayout\"\n s.version = \"0.5\"\n s.summary = \"This is an library for AutoLayout like Masonry but more, Just for fun and self-use.\"\n s.homepage = \"https:... | ruby | chosen |
[
{
"from": "system",
"value": "Add indirect queries from `User`.\n\nAllows finding a list of `Couple`s to which this `User` belongs, the `Event`s in\nwhich the `User` competed, and all of the `Competition`s the `User` took part in.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Bas... | ruby | chosen |
[
{
"from": "system",
"value": "Update KDE Phonon to 4.5.0.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass KdePhonon < Formula\n url 'ftp://ftp.kde.org/pub/kde/stable/phonon/4.4.4/src/phonon-4.4.4.tar.bz2'\n homepage 'http://phonon.kde.org/'\n md5 '1deb14ecb2185e1f2fe2741a0bd4685... | ruby | chosen |
[
{
"from": "system",
"value": "Fix pagination spec - we don't care which 25 things are returned, just that 25 are returned.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2010, Diaspora Inc. This file is\n# licensed under the Affero General Public License version 3 or later. See\n# th... | ruby | chosen |
[
{
"from": "system",
"value": "Convert symbols to status code strings\n"
},
{
"from": "human",
"value": "module JSONAPI\n class Error\n attr_accessor :title, :detail, :id, :href, :code, :source, :links, :status\n\n def initialize(options = {})\n @title = options[:title]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct the comment as the implementation\n"
},
{
"from": "human",
"value": "module Phaxio\n class Config\n DEFAULT_API_ENDPOINT = 'https://api.phaxio.com/v2.1/'.freeze\n\n class << self\n # Your Phaxio API key. This will be used for all interactions wit... | ruby | chosen |
[
{
"from": "system",
"value": "Add fallback OAuth ID and secret\n\nThis commit adds a fallback OAuth ID and secret. This will allow the signon-munging script for development to configure signon for this app locally."
},
{
"from": "human",
"value": "# This initialiser is overwritten when deployed ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix coverage for satisfication of module requirements\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Henson::Source::Generic do\n let(:instance) { Henson::Source::Generic.new }\n\n it \"can be instantiated\" do\n instance.should_not be_nil... | ruby | chosen |
[
{
"from": "system",
"value": "Update source URL to point on SPIR Repos\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"MBProgressHUD\"\n s.version = \"0.9.2\"\n s.summary = \"An iOS activity indicator view.\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix vagrant test for all users\n"
},
{
"from": "human",
"value": "module VagrantKvmHelper\n\n def create_vagrantfile\n File.open('Vagrantfile', 'w') do |file|\n file.write <<-RUBY\n Vagrant.require_plugin 'vagrant-kvm'\n\n Vagrant.configure('2... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake task name to reindex closed consultations\n"
},
{
"from": "human",
"value": "# default cron env is \"/usr/bin:/bin\" which is not sufficient as govuk_env is in /usr/local/bin\nenv :PATH, '/usr/local/bin:/usr/bin:/bin'\n\n# We need Rake to use our own enviro... | ruby | chosen |
[
{
"from": "system",
"value": "Remove required argument on prefix\n"
},
{
"from": "human",
"value": "module DisablePrefixCheck\n extend ActiveSupport::Concern\n\n module ClassMethods\n def check_prefix_options(options)\n end\n\n # `flexible = true` is hack to allow multiple things thro... | ruby | chosen |
[
{
"from": "system",
"value": "Fix order of `livecheck` in casks.\n"
},
{
"from": "human",
"value": "# typed: true\n# frozen_string_literal: true\n\nmodule RuboCop\n module Cask\n # Constants available globally for use in all cask cops.\n module Constants\n STANZA_GROUPS = [\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add existing mocks to error messages\n\nHelps debugging updating mocks with new data.\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nmodule JsonApiClientMock\n class MockConnection\n class_attribute :mocks\n self.mocks = {}\n\n # ignored\n def ... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate marks to ratings on feedbacks\n"
},
{
"from": "gpt",
"value": "require Rails.root.join(\"lib\", \"tasks\", \"task_helper\")\n\nnamespace :'2018_08_27_migrate_feedbacks' do\n task run: :environment do\n MAPPING = {\n 0 => Feedback.ratings.fetch(:unhap... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Lantern.\n"
},
{
"from": "human",
"value": "cask 'lantern' do\n version :latest\n sha256 :no_check\n\n url 'https://s3.amazonaws.com/lantern/lantern-installer-beta.dmg'\n name 'Lantern'\n homepage 'https://getlantern.org/'\n licens... | ruby | chosen |
[
{
"from": "system",
"value": "Improve front matter parsing so it actually gets removed from the document ;-)\n"
},
{
"from": "human",
"value": "require 'slodown'\nrequire 'sass'\nrequire 'tilt'\nrequire 'toml'\n\nmodule Flutterby\n class File < Entity\n attr_reader :contents, :data\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add options for icons and cancan.\n"
},
{
"from": "human",
"value": "require \"link_to_action/version\"\nrequire 'link_to_action/helpers'\nrequire 'action_view'\nrequire 'active_model'\nrequire 'active_support'\n\nmodule LinkToAction\n def self.setup\n yield sel... | ruby | chosen |
[
{
"from": "system",
"value": "Use url method rather than @url\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nclass PathProcessor\n def initialize(url, html)\n @html = html\n @url = url\n end\n\n def process_paths\n doc.xpath(\"//a[@href]\").each do |anchor|\n href = an... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor underlying implementation to use a Proc\n"
},
{
"from": "human",
"value": "class Recursive\n def initialize(&block)\n @block = block\n end\n\n def call(*args)\n step = RecursiveStep.new\n returned = @block.call(step, *args)\n\n while returned... | ruby | chosen |
[
{
"from": "system",
"value": "Load Dependencies in the Engine\n"
},
{
"from": "human",
"value": "require \"stash_datacite/engine\"\n\nmodule StashDatacite\nmattr_accessor :resource_class\n\ndef self.author_class\n @@author_class.constantize\nend\n\n class Engine < ::Rails::Engine\n isolate_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the i18n deprecation warning\n"
},
{
"from": "human",
"value": "require \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\nrequire \"sprockets/railtie\"\n\n# Views\nrequire \"haml-rails\"\nrequire \"simple_for... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirect in petitions controller\n"
},
{
"from": "human",
"value": "class PetitionsController < ApplicationController\n #\n def index\n @petitions=Petition.all\n end\n \n def new\n @petition=Petition.new\n end\n \n def create\n \n title = par... | ruby | chosen |
[
{
"from": "system",
"value": "Add question to controller for new response\n"
},
{
"from": "human",
"value": "class ResponsesController < ApplicationController\n\ndef new\n # @params = params[:question_id]\n # # @question = Question.find(params[:question])\n @response = Response.new\n\nend\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust behavior to honor reverse proxy, checks remote_ip instead of request.env['HTTP_X_REAL_IP']"
},
{
"from": "human",
"value": "class LdapController < ApplicationController\n before_action :check_token, except: [:welcome]\n\n def welcome\n render text: ''\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'derived' attribute to Visualization::Member'\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'virtus'\nrequire 'virtus/attribute/writer/coercible'\nrequire_relative '../visualization'\n\nmodule CartoDB\n class SnakeCaseString < Virtus::Attribute:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove blank option from select fields\n"
},
{
"from": "human",
"value": "module Forms::Fields\n class SelectField < Field\n include LabelledField\n include OptionedField\n include ActionView::Helpers::FormOptionsHelper\n\n property :label, String\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecated use of raise_error with to_not.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass Subscriber\n def foo; end\nend\n\ndescribe Citrus::Core::Publisher do\n\n subject { described_class.extend(described_class) }\n let(:subscrib... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.