conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add full unit spec for Flame requiring\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\ndescribe 'Flame' do\n\tit 'should require all files when flame required' do\n\t\tDir[\n\t\t\tFile.join(__dir__, '..', '..', 'lib', 'flame', '**', '*')\n\t\t].each d... | ruby | chosen |
[
{
"from": "system",
"value": "Add color to jbuilder for calendar events\n"
},
{
"from": "human",
"value": "json.array! @timeslots do |slot|\n json.id slot.id\n json.title slot.tutor.name\n json.start slot.start\n json.end slot.end\nend"
},
{
"from": "gpt",
"value": "json.... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for render show template\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe TagsController do\n before(:each) do\n @tag = create(:tag)\n @tag.questions << create(:question)\n end\n\n describe \"#index\" do\n it \"h... | ruby | chosen |
[
{
"from": "system",
"value": "Improve tests description for sending message using Twilio"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FCReminder::Gateways::Twilio do\n subject(:gateway) { FCReminder::Gateways::Twilio.new }\n let(:config) do\n {\n account_sid: \"ac... | ruby | chosen |
[
{
"from": "system",
"value": "Enable communities feature in its spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature \"Communities\" do\n before do\n omni_auth_log_in_as 'test.user@digital.justice.gov.uk'\n end\n\n scenario 'Creating a person in a community' do\n cr... | ruby | chosen |
[
{
"from": "system",
"value": "Update the test for recoveries\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature \"Resetting your password\" do\n\n scenario \"with a valid passowrd\" do\n user = FactoryGirl.create(:user)\n recovery = FactoryGirl.create(:recovery, user: use... | ruby | chosen |
[
{
"from": "system",
"value": "Fix candidates || candidates used to transaction\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Tools\n module Replaces\n # Format message request with good data to HASH format\n # @author VAILLANT... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor populate task to upsert more data to db\n"
},
{
"from": "human",
"value": "namespace :csp_reports do\n desc \"Populate CSP Violations Report\"\n task populate: :environment do\n user = User.first\n domain = user.domains.find_or_create_by(name: \"My ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor quarterly progress to include 2015\n"
},
{
"from": "human",
"value": "require 'trello'\nrequire 'trello/trello_boards'\n\nclass QuarterlyProgress\n @queue = :metrics\n\n extend MetricsHelper\n extend TrelloBoards\n\n def self.perform\n h = {\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (8) - leonardo dicaprio\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/56d49587df52101de70011e4\n# --- iteration 1 ---\ndef leo(oscar)\n return \"Leo got one already!\" if oscar > 88\n case oscar\n when 88 then \"Leo finally won the ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable secure option if https is used.\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nGitlab::Application.config.session_store(\n :redis_store, # Using the cookie_store would enable session replay attacks.\n serve... | ruby | chosen |
[
{
"from": "system",
"value": "Set cookie_store domain to :all\n\nSigned-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store :cookie_sto... | ruby | chosen |
[
{
"from": "system",
"value": "Add default action test in graphite_web_config resource specs.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nload_resource(\"graphite\", \"web_config\")\n\ndescribe Chef::Resource::GraphiteWebConfig do\n\n let(:resource_name) { \"/opt/graphite/file.py... | ruby | chosen |
[
{
"from": "system",
"value": "Make Crawl more flexible about url types\n"
},
{
"from": "human",
"value": "require 'uri'\n\nclass Crawl\n attr_reader :url\n \n def initialize(url, avoid = [])\n @url = url\n\n @avoid = avoid.map { |a|\n a = URI::join(url, a) if !a.start_with? url\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow the disabling secure cookies in Rails production environment\n\nThe publishing end to end tests run Whitehall in Rails production\nmode so we can mimic how the app will behave in production as closely\nas possible.\n\nWe haven't set up HTTPS however which means that the s... | ruby | chosen |
[
{
"from": "system",
"value": "Change session validity to 1 month\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nRails.application.config.session_store :cookie_store, key: '_code_ocean_session'\n"
},
{
"from": "gpt",
"value": "# Be su... | ruby | chosen |
[
{
"from": "system",
"value": "Remove spec that didn't actually do anything\n\nDoesn’t fail even if not mocked.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'default installation' do\n let(:chef_run) do\n runner = ChefSpec::Runner.new(platform: 'ubuntu', version: '12.0... | ruby | chosen |
[
{
"from": "system",
"value": "Use LXC stable, not daily\n"
},
{
"from": "human",
"value": "# Ubuntu 12, not Ubuntu 14\nif node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12\n execute 'apt-get update' do\n action :nothing\n end.run_action(:run)\n\n package 'python-software-... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 500 error when requesting the favicon when not logged in.\n"
},
{
"from": "human",
"value": "module AuthenticationBehavior\n\textend ActiveSupport::Concern\n\n\tincluded do\n\t\tbefore_action :require_netbadge\n\tend\n\n\tprivate\n\n\tdef require_netbadge\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for empty ETag values\n\nFog aws fails if API response contains empty ETag tags. It may cause when working with S3 clones (like minio in my case), that not provides ETags in their API answer."
},
{
"from": "human",
"value": "module Fog\n module Parsers\n mod... | ruby | chosen |
[
{
"from": "system",
"value": "Revise nudges code to refer to Student instead of User\n"
},
{
"from": "human",
"value": "class EventsController < ApplicationController\n before_filter :require_verified_user, except: :show\n\n def index\n if params[:start_time]\n @events = Event.by_time(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix possible bug empty?/any?/each on nil for anonymous user on @favorites.\n"
},
{
"from": "human",
"value": "class StaticController < ApplicationController\n respond_to :html\n\n def index\n page = (params[:id] || 'index').gsub /[^A-z0-9_\\-]/, ''\n @favori... | ruby | chosen |
[
{
"from": "system",
"value": "Update Zend Studio to 13.0.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'zendstudio' do\n version '12.0.1'\n sha256 'e8534e6b550e075b5da42c5b1789e82b3c9e04c739f055c6980783742f6e1160'\n\n url \"http://downloads.zend.com/studio-eclipse/#{version}/ZendStudio-#{v... | ruby | chosen |
[
{
"from": "system",
"value": "Update stops controller to return JSON\n"
},
{
"from": "human",
"value": "class StopsController < ApplicationController\n def index\n @stops = Stop.all\n render json: @stops\n end\n\nend\n\n\n\n"
},
{
"from": "gpt",
"value": "class StopsControlle... | ruby | chosen |
[
{
"from": "system",
"value": "Remove osx deployment target from podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'DPMeterView'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'Display gauge-style meter views in an intuitive way with smooth animations.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix order of require statements\n"
},
{
"from": "human",
"value": "require 'olson/instance_methods'\nrequire 'olson/class_methods'\nrequire 'olson/version'\nrequire 'active_support/concern'\n"
},
{
"from": "gpt",
"value": "require 'active_support/concern... | ruby | chosen |
[
{
"from": "system",
"value": "Update the awe:update action to dynamically figure out which files are available\n\nAlso, we now copy the files directly into the appropriate javascripts\ndirectory.\n"
},
{
"from": "human",
"value": "require 'rails'\n\nmodule Awe\n module Generators\n class Upd... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on some platform (my Mac)\n"
},
{
"from": "human",
"value": "require \"httpclient\"\nrequire \"multi_json\"\nrequire \"nokogiri\"\nrequire \"trollop\"\nrequire \"launchy\"\n\ndir = File.dirname(__FILE__)\n$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(d... | ruby | chosen |
[
{
"from": "system",
"value": "Put arguments to assert_equal in correct order\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\ndescribe \"validation errors\" do\n test_cases = JSON.load(File.read(File.join(\"test\", \"validation_errors.json\")))\n test_cases.each do |test_case|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for plugin activation\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\nmodule Pathway\n describe Operation do\n module SimplePlugin\n module InstanceMethods\n def foo; end\n end\n\n module ClassMethods\n def bar; en... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused long_weekday date format\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(*Rails.gro... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Include docs in static assets to be served\"\n\nThis reverts commit 383c70d57cb2cd3a931d1208eb590148c1954066.\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, in... | ruby | chosen |
[
{
"from": "system",
"value": "Change variable name to avoid confusion\n"
},
{
"from": "human",
"value": "# Copyright (C) 2016 Colin Fulton\n# All rights reserved.\n#\n# This software may be modified and distributed under the\n# terms of the three-clause BSD license. See LICENSE.txt\n# (located i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove `Date.today` from gem spec\n\nIt's the default.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative 'lib/filewatcher'\nrequire_relative 'lib/filewatcher/version'\nrequire 'date'\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump rake version for CVE\n\nMore details: https://git.io/Jmxhp\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'repeatable/version'\n\nGem::Specification.new do |spec|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix build for 2.3 and JRuby\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RSpec\n module Support\n module Body\n private\n\n def body_for(value, verb)\n return \"\" if verb.casecmp?(\"head\")\n value\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Call ActiveStorageTransfer module in FinaliserWorker\n"
},
{
"from": "human",
"value": "class ImportWorkers::FinaliserWorker\n include Sidekiq::Worker\n sidekiq_options :retry => false, :queue => :import, :backtrace => true\n\n @@can_be_started = false\n cattr_a... | ruby | chosen |
[
{
"from": "system",
"value": "Make run all method a call to the run_strategy on continuous server object."
},
{
"from": "human",
"value": "module InfinityTest\n module Framework\n module Helpers\n # Run all the strategy again.\n #\n def RunAll\n end\n\n # Run test ba... | ruby | chosen |
[
{
"from": "system",
"value": "Change method for converting numbers to ruby objects\n"
},
{
"from": "human",
"value": "module Mongoid\n module MapReduce\n module Serialization\n\n # Serialize an object to the specified class\n #\n # obj - Object to serialize\n # klass - Cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add media iq nodes to messages queue\n"
},
{
"from": "human",
"value": "require 'whatsapp/protocol/node'\n\nmodule WhatsApp\n module Protocol\n\n class IqMediaNode < Node\n\n def initialize(fingerprint, type, size, message_id = Util::IdGenerator.next)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Vue.js documentation (2.0.5, 1.0.28)\n"
},
{
"from": "human",
"value": "module Docs\n class Vue < UrlScraper\n self.name = 'Vue.js'\n self.slug = 'vue'\n self.type = 'vue'\n self.root_path = '/guide/index.html'\n self.initial_paths = %w(/api/i... | ruby | chosen |
[
{
"from": "system",
"value": "Check whether posted message is valid JSON\n"
},
{
"from": "human",
"value": "class Ircmad\n class IRCClient\n include Configurable\n\n def initialize(&block)\n instance_eval(&block) if block_given?\n\n unless @zircon\n @zircon = Zircon.new c... | ruby | chosen |
[
{
"from": "human",
"value": "Create domain name resolver plugin\n\nTakes a nameserver and resolve_address as input and raises an alert if\nresolution fails\n"
},
{
"from": "gpt",
"value": "require 'resolv'\n\nclass NameResolver < Scout::Plugin\n OPTIONS=<<-EOS\n nameserver:\n default: 8... | ruby | chosen |
[
{
"from": "system",
"value": "Add session helper module for quick session changes\n"
},
{
"from": "human",
"value": "module SessionsHelper\nend\n"
},
{
"from": "gpt",
"value": "module SessionsHelper\n def current_user\n @current_user ||= User.find_by_id(session[:user_id]) if sess... | ruby | chosen |
[
{
"from": "system",
"value": "Add license type to gemspec.\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'ruby-manta'\n s.version = MantaClient::LIB_VERSION\n s.date = '2013-06-24'\n s.sum... | ruby | chosen |
[
{
"from": "system",
"value": "Add a maybe statement to the license substitution\n\nThe license identifier might be null, hence I have added a maybe\nstatement.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>\n"
},
{
"from": "human",
"value": "module Metrics\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add title field to review table\n"
},
{
"from": "human",
"value": "class CreateReviews < ActiveRecord::Migration\n def change\n create_table :reviews do |t|\n t.integer :film_id\n t.integer :reviewer_id\n t.text :content\n\n t.timestamps null... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old rubygesm version requirement\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__) \nrequire \"simple_state_machine/version\" \n\nGem::Specification.new do |s|\n s.name = %q{simple_sta... | ruby | chosen |
[
{
"from": "system",
"value": "Update bundler requirement from ~> 1.7 to ~> 2.1\n\nUpdates the requirements on [bundler](https://github.com/bundler/bundler) to permit the latest version.\n- [Release notes](https://github.com/bundler/bundler/releases)\n- [Changelog](https://github.com/rubygems/bundler/blob/ma... | ruby | chosen |
[
{
"from": "system",
"value": "Add Banner class, add sanity check.\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\n\nclass RandomBanner\n def initialize banners\n @banners = banners\n end\n\n def pick number\n @banners.sample(number)\n end\nend\n\ndescribe RandomBanner do... | ruby | chosen |
[
{
"from": "system",
"value": "Add runtime dependency to asciidoctor-diagram\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'asciidoctor-diagram-d3js/version'\n\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "human",
"value": "Add RSS feed builder. Still to do: Add link to RSS in footer and on blog page\n"
},
{
"from": "gpt",
"value": "xml.instruct!\nxml.feed \"xmlns\" => \"http://www.w3.org/2005/Atom\" do\n xml.title \"Portland Code School News and Announcements\"\n xml.subtitle \"Stay ... | ruby | chosen |
[
{
"from": "human",
"value": "Add an acceptance test for storeconfigs queries\n\nThis tests queries against a property, both == and !=.\n"
},
{
"from": "gpt",
"value": "test_name \"collections with queries\" do\n\n exporter, *collectors = hosts\n\n dir = collectors.first.tmpdir('collections')\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop dependency version to >= 0.47.1\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"onkcop/version\"\n\nGem::Specification.new do |spec|\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use migration helper to prevent downtime migration\n"
},
{
"from": "human",
"value": "class AddRunUntaggedToCiRunner < ActiveRecord::Migration\n ##\n # Downtime expected!\n #\n # This migration will cause downtime due to exclusive lock\n # caused by the default... | ruby | chosen |
[
{
"from": "human",
"value": "Add the OmniFocus beta/test builds\n\nThis commit adds the OmniFocus beta/test stream.\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'omnifocus-beta' do\n version '2.2.x-r233653'\n sha256 '6dbec967be6ad55dc6def5c3284979257e2c10e7a6d9fa3b09c1abd587ac7172'\n\n url \"... | ruby | chosen |
[
{
"from": "human",
"value": "Add cask for VMware Fusion 7\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'vmware-fusion7' do\n version '7.1.2-2779224'\n sha256 '93e809ece4f915fcb462affabfce2d7c85eb08314b548e2cde44cb2a67ad7d76'\n\n url \"https://download3.vmware.com/software/fusion/file/VMware-F... | ruby | chosen |
[
{
"from": "system",
"value": "Make non-action controller methods private\n"
},
{
"from": "human",
"value": "class CorporateInformationPagesController < DocumentsController\n prepend_before_filter :find_organisation\n before_filter :set_slimmer_headers_for_document, only: [:show, :index]\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix themes breaking rake db:setup because RefinerySetting.table_exists? is false.\n"
},
{
"from": "human",
"value": "# Set up middleware to serve theme files\nconfig.middleware.use \"ThemeServer\"\n\n# Add or remove theme paths to/from Refinery application\n::Refine... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec summary and description\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'capistrano-nvie-git-workflow/version'\n\nGem::Specifica... | ruby | chosen |
[
{
"from": "system",
"value": "Edit user form in admin backend.\n"
},
{
"from": "human",
"value": "ActiveAdmin.register User do\n\n index do\n column :first_name\n column :last_name\n column :email\n column 'OSM ID', :osm_id\n column 'API key', :authentication_token\n column 'P... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce unnecessary blank lines from console output if there's nothing to print.\n\nWe only print the food critic reviews if there's a warning and fail with a proper message if there's any."
},
{
"from": "human",
"value": "require 'rake'\nrequire 'rake/tasklib'\n\nmo... | ruby | chosen |
[
{
"from": "system",
"value": "Use force cache only when needed\n"
},
{
"from": "human",
"value": "module Goodyear\n module QueryCache\n\n def store\n @query_cache ||= setup_store!\n end\n\n def cache_query(query)\n cache_key = sha(query)\n result = if store.exist?(cache_k... | ruby | chosen |
[
{
"from": "system",
"value": "Move validation to new line\n\nStyle for 80 char limit."
},
{
"from": "human",
"value": "class Item < ApplicationRecord\n has_attached_file :image, styles: { thumbnail: \"150x150\" }\n validates_attachment_content_type :image, content_type: /\\Aimage\\/.*\\z/\n b... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the cookie will work for subdomains\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\ncookie_options = { key: '_intercode_session' }\ndefault_host = Rails.application.config.action_mailer.default_url_options.... | ruby | chosen |
[
{
"from": "system",
"value": "Support socket path when initializing dogstatsd\n"
},
{
"from": "human",
"value": "module Datadog\n class Notifications\n class Config\n attr_accessor :hostname, :namespace, :tags, :statsd_host, :statsd_port, :reporter, :plugins\n\n def initialize\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where class methods were not being extended.\n"
},
{
"from": "human",
"value": "require 'time'\n\nmodule Oshpark\n module RemoteModel\n\n def save!\n attrs = {}\n @dirty_attributes.map do |attr|\n attrs[attr] = public_send(attr)\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Use save! in deposit/payment methods\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n attr_accessible :name, :email, :balance\n monetize :balance_cents\n default_scope order('LOWER(name)')\n\n def deposit(amount)\n self.balance_cents += am... | ruby | chosen |
[
{
"from": "system",
"value": "Handle lack of schema gracefully while booting\n\n * Fix correct class for reader registry\n * Fix inspect for Boot\n"
},
{
"from": "human",
"value": "module ROM\n\n # @api private\n class Registry\n include Enumerable\n\n attr_reader :elements\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Add and sort guides with new genre '他の構成要素' in Footer\n"
},
{
"from": "human",
"value": "require \"rails_guides/helpers\"\n\nmodule RailsGuides\n module HelpersJa\n include Helpers\n\n def finished_documents(documents)\n # Enable this line when not like ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for passing a specific filename to Middleware.save\n\nAlso return the filename instead of the return value of .open()\nThis allows for overwritting the same file when calling .save\nmanually as well as keeping track of the exact file written (using\nthe return value)\n"
... | ruby | chosen |
[
{
"from": "human",
"value": "Update document_id primary key to bigint\n"
},
{
"from": "gpt",
"value": "class ChangeDocumentIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :documents, :id, :bigint\n end\n\n def down\n change_column :documents, :id, :integer\n end\nend... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a case of the doc_values\n"
},
{
"from": "human",
"value": "module ElasticRecord\n class Index\n module Mapping\n def mapping=(custom_mapping)\n mapping.deep_merge!(custom_mapping)\n end\n\n def update_mapping(index_name = alias_name... | ruby | chosen |
[
{
"from": "system",
"value": "Put deflator in the right place\n\n-- If caching is turned on, put deflator immediately after Rack::Cache\n"
},
{
"from": "human",
"value": "require 'rack/deflater'\nrequire 'heroku_rails_deflate/serve_zipped_assets'\n\nmodule HerokuRailsDeflate\n class Railtie < R... | ruby | chosen |
[
{
"from": "system",
"value": "Change DATE to DATE_REGEX for consistency.\n"
},
{
"from": "human",
"value": "require 'date'\n\nmodule Ohm\n module DateValidations\n DATE = /\\A([0-9]{4})-([01]?[0-9])-([0123]?[0-9])\\z/\n \n def assert_date(att, error = [att, :not_date])\n if assert... | ruby | chosen |
[
{
"from": "system",
"value": "Add action strings for Twitter\n"
},
{
"from": "human",
"value": "module OpenActions\n class TweetAtTarget < OpenActions::OpenAction\n user_auth :twitter\n\n leader_fields do\n text_field :recipient\n text_area :message_text\n end\n\n action_... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude some of annotate gem's new annotations\n"
},
{
"from": "human",
"value": "if Rails.env.development?\n Annotate.set_defaults(\"exclude_tests\" => \"true\", \"sort\" => \"true\")\n\n # Annotate models\n task :annotate do\n puts \"Annotating models...\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix attribute name for edge server\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: wt_collection_services\n# Attributes:: default\n#\n# Copyright 2012, Webtrends\n#\n# All rights reserved - Do Not Redistribute\n#\n\ndefault['wt_edge_server']['user'] ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs for old Rails\n"
},
{
"from": "human",
"value": "require_relative 'spec_helper'\n\ndescribe CssController, type: :controller do\n before :all do\n cache = Rails.root.join('tmp/cache')\n cache.rmtree if cache.exist?\n end\n\n it \"integrates with R... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic requirements to lexer\n"
},
{
"from": "human",
"value": "require 'spec_helper.rb'\n\nmodule RbNFA\n describe Regexp do\n it \"can be build from literal string\" do \n regexp = Regexp.new(\"a\")\n regexp.should_not be_nil\n end\n \n i... | ruby | chosen |
[
{
"from": "system",
"value": "Change my_dawg from Dawg::Node to Dawg"
},
{
"from": "human",
"value": "module KnowsTheDomain\n\tdef my_dawg\n\t\t@my_dawg ||= Dawg::Node.new\n\tend\n\n\tdef my_file\n\t\t@my_file ||= StringIO.new\n\tend\n\nend\n\nWorld(KnowsTheDomain)\n"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the Rails 6 ActionView::Base instantiation deprecations\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule WebConsole\n # A facade that handles template rendering and composition.\n #\n # It introduces template helpers to ease the incl... | ruby | chosen |
[
{
"from": "system",
"value": "Update compare routine name\n[full ci]"
},
{
"from": "human",
"value": "Then(\"the error payload field {string} does not equal {string}\") do |field_path, string_value|\n payload_value = Maze::Helper.read_key_path(Maze::Server.errors.current[:body], field_path)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove event handlers on window and document when the page changes.\n"
},
{
"from": "human",
"value": "module RailsScript\n module LoaderHelper\n\n def include_rails_script\n javascript_tag <<-RUBY\n jQuery(function() {\n window.$this = new (App.#{ cont... | ruby | chosen |
[
{
"from": "system",
"value": "Fix booting with a rails 3.x app.\n"
},
{
"from": "human",
"value": "require 'saulabs/reportable'\nrequire 'rails'\n\nmodule Saulabs\n\n module Reportable\n\n class Railtie < Rails::Railtie\n\n GEM_ROOT = File.join(File.dirname(__FILE__), '..', '..', '..')\... | ruby | chosen |
[
{
"from": "system",
"value": "Patch keyword arguments syntax in Paperclip error handling\n"
},
{
"from": "human",
"value": "Paperclip::Attachment.default_options[:source_file_options] = {\n all: \"-auto-orient\"\n}\n\nurl_adapters = [\n \"Paperclip::UriAdapter\",\n \"Paperclip::HttpUrlProxyAd... | ruby | chosen |
[
{
"from": "system",
"value": "Convert monkey module to new format\n\nSigned-off-by: Aki Saarinen <278bc57fbbff6b7b38435aea0f9d37e3d879167e@akisaarinen.fi>\n"
},
{
"from": "human",
"value": "require \"yaml\"\n\nclass Bot\n def monkey_initialize(bot)\n @monkey = Monkey.new(@base_path, @module_... | ruby | chosen |
[
{
"from": "system",
"value": "Use :sync for git resource\n"
},
{
"from": "human",
"value": "node ||= {\n \"rbenv\" => {\n \"versions\" => [ \"2.2.1\", \"2.2.2\" ],\n \"local\" => \"2.2.2\",\n \"gems\" => [ \"bundler\", \"rake\" ],\n \"user\" => \"vagrant\",\n \"rbenv_config_file\... | ruby | chosen |
[
{
"from": "system",
"value": "Return Author Collection from create action\n"
},
{
"from": "human",
"value": "class AuthorsController < ApplicationController\n before_action :authenticate_user!\n respond_to :json\n\n def create\n author = Author.create author_params\n respond_with author... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error in locale path normalization\n"
},
{
"from": "human",
"value": "class LocalesController < ApplicationController\n # GET /locale/:locale\n def change_locale\n locale = params[:locale].downcase\n locale = I18n.default_locale unless I18n.locale_availa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix title of party proposition feed.\n"
},
{
"from": "human",
"value": "class PartiesController < ApplicationController\n hdo_caches_page :index, :show\n\n def index\n @parties = Party.order(:name).all\n end\n\n def show\n @party = Party.find(par... | ruby | chosen |
[
{
"from": "system",
"value": "Add option to copy specific views to host app\n"
},
{
"from": "human",
"value": "require 'rails/generators/base'\n\nmodule Storytime\n module Generators\n module ViewPathTemplates\n extend ActiveSupport::Concern\n\n included do\n argument :scope... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify license regex and replace . with _ character\n"
},
{
"from": "human",
"value": "module Licensee\n module Matchers\n class DistZilla < Package\n attr_reader :file\n\n LICENSE_REGEX = /\n ^license\\s*=\\s*([a-z\\-0-9\\.]+)\n /ix\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow helpers to take options for ember assets\n"
},
{
"from": "human",
"value": "module EmberCLIRailsHelper\n def include_ember_script_tags(name)\n javascript_include_tag *EmberCLI[name].exposed_js_assets\n end\n\n def include_ember_stylesheet_tags(name)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change template before_filter for only new and edit\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule ConstructorPages\n class TemplatesController < ApplicationController\n include TreeviewHelper\n\n movable :template\n\n before_filter {@roots... | ruby | chosen |
[
{
"from": "system",
"value": "Remove useless info in spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe RawInputTransformJob do\n describe '#perform' do\n context 'with a new record' do\n it 'creates that record and records the result' do\n source = Fabric... | ruby | chosen |
[
{
"from": "system",
"value": "Add <title> on user page"
},
{
"from": "human",
"value": "class ExercismApp < Sinatra::Base\n\n get '/:username' do |username|\n user = User.where(username: username).first\n halt 404 unless user\n erb :user, locals: {user: user, current: user.current_exer... | ruby | chosen |
[
{
"from": "system",
"value": "Fix remove status service sending salmons\n"
},
{
"from": "human",
"value": "class RemoveStatusService < BaseService\n def call(status)\n remove_from_self(status) if status.account.local?\n remove_from_followers(status)\n remove_from_mentioned(status)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add h1 tag to index page\n"
},
{
"from": "human",
"value": "require 'sinatra'\n\n# configurations\n# to allow connection from another computer\nset :bind, '0.0.0.0'\n# to override local port\nset :port, 3000\n\n# response to '/' url\nget '/' do\n \"This is the inde... | ruby | chosen |
[
{
"from": "system",
"value": "GPII-3671: Add Istio namespace migration code\n"
},
{
"from": "human",
"value": "require \"rake/clean\"\n\nimport \"/rakefiles/xk_config.rake\"\nimport \"/rakefiles/xk_infra.rake\"\nimport \"/rakefiles/xk_util.rake\"\n\nrequire_relative \"./secrets.rb\"\nrequire_rel... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.