conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove limit in point value and fix error messages\n"
},
{
"from": "human",
"value": "class Hint < ActiveRecord::Base\n validates :hint, presence: true, length: { maximum: 500 }\n validates :priority, presence: true, numericality: true\n validates :points, prese... | ruby | chosen |
[
{
"from": "human",
"value": "Add tasks to generate hourly aggregations.\n"
},
{
"from": "gpt",
"value": "namespace :aggregate do\n namespace :hourly do\n desc \"Aggregate hourly impressions for every impression every recorded.\"\n task all: :environment do\n Rails.logger.level = :inf... | ruby | chosen |
[
{
"from": "system",
"value": "Remove after_save callback which seemed to be causing infinite loop\n"
},
{
"from": "human",
"value": "require 'nokogiri'\nrequire 'open-uri'\nrequire 'dreadnought'\n\nclass Page < ActiveRecord::Base\n validates :url, presence: true, url: true\n after_save :popula... | ruby | chosen |
[
{
"from": "system",
"value": "Update DSL for options hash requirement"
},
{
"from": "human",
"value": "##\n# DO NOT USE THIS API!\n# This file is temporary, to help make testing Punchblock easier.\n# THIS IS IMPERMANENT AND WILL DISAPPEAR\nmodule Punchblock\n class DSL\n def initialize(conne... | ruby | chosen |
[
{
"from": "system",
"value": "Remove several CLI flags that need to be set via config in Bundler 2\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"bundler/installer/gem_installer\"\n\nRSpec.describe Bundler::GemInstaller do\n let(:installer) { instance_double(\"Ins... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for QLStephen.\n"
},
{
"from": "human",
"value": "cask 'qlstephen' do\n version '1.4.3'\n sha256 '73f9a467ba2eb4244ffe1dbf9be435d3481a438c8ec64d2bd9bb1ba60d576a66'\n\n # github.com/downloads/whomwah/qlstephen was verified as official when... | ruby | chosen |
[
{
"from": "system",
"value": "Add auto_updates flag to Tangerine!\n"
},
{
"from": "human",
"value": "cask 'tangerine' do\n version '1.4.8'\n sha256 'dea00674331b1aa663cf00f64b0ce208638a136575987e1a7f50bd135117f2d9'\n\n url 'http://distrib.karelia.com/downloads/Tangerine!-4008.zip'\n appcast ... | ruby | chosen |
[
{
"from": "human",
"value": "Implement the 'Reset' instruction, but don't expose it via the CLI\n"
},
{
"from": "gpt",
"value": "require 'yubioath'\nrequire 'bindata'\n\nmodule YubiOATH\n class Reset\n def self.send(to:)\n ::YubiOATH::Response.read(to.transmit(Request.new.to_binary_s))\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix uninitialized constant during db setup\n\nFixes #92\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongs... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in CORS initializer"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# Avoid CORS issues when API is called from the web app.\n#\n# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Data form admin view of Documents\n\nData is generally large and it is not useful to load it. Increases page\nload time and transfers a lot of data to browser\n"
},
{
"from": "human",
"value": "RailsAdmin.config do |config|\n\n ### Popular gems integration\n... | ruby | chosen |
[
{
"from": "system",
"value": "Move guard into helper method\n"
},
{
"from": "human",
"value": "module Xapi\n module Routes\n class Exercises < Core\n get '/exercises' do\n unless params[:key]\n halt 401, {error: \"Please provide your Exercism.io API key\"}.to_json\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable garbage collector when benchmarking\n"
},
{
"from": "human",
"value": "module BenchPress\n class Runnable\n attr_reader :name, :code_block, :run_time\n attr_accessor :percent_slower, :fastest\n\n class << self\n def repetitions\n @repet... | ruby | chosen |
[
{
"from": "system",
"value": "[Platform] Print out an exact version from the lockfile\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nmodule Bundler\n class CLI::Platform\n attr_reader :options\n def initialize(options)\n @options = options\n end\n\n def run\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make config guessing the same on the client as the server\n"
},
{
"from": "human",
"value": "module Chart\n module Receivers\n class Line\n def initialize\n @configs = {}\n @cache = {}\n end\n\n def config_for(topic)\n @config... | ruby | chosen |
[
{
"from": "system",
"value": "Work around mysterious test failure\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\nRSpec.feature 'User tracking what they have and have not already read' do\n it 'sees that a new topic is unread' do\n topic = unread_... | ruby | chosen |
[
{
"from": "system",
"value": "Add jruby-openssl as a dependency for jruby in the gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"spec_support/version\"\n\n# Describe your gem and declare its dependencies:\nGem... | ruby | chosen |
[
{
"from": "system",
"value": "Send emails in dev too, use letter_opener in main app\n"
},
{
"from": "human",
"value": "module Georgia\n class Notifier < ActionMailer::Base\n\n include SendGrid\n\n def notify_support(message)\n @message = message\n mail(\n from: \"#{@messa... | ruby | chosen |
[
{
"from": "system",
"value": "Add a stacktrace if present from Bower\n"
},
{
"from": "human",
"value": "module Build\n # Encapsulate Bower errors\n # parsed from Bower JSON output\n class BowerError < BuildError\n attr_reader :path, :command, :details, :code\n\n ENOTFOUND = 'ENOTFOUND'.... | ruby | chosen |
[
{
"from": "system",
"value": ":open_hands: Support EOL Ruby versions by locking Nokogiri to pre v1.7\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire 'approvals/version'\n\nGem::Specification.new do |s|\n s.name = \"a... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gem spec lib path\n"
},
{
"from": "human",
"value": "require \"rubygems\"\n\n$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])\nrequire \"erm/version\"\n\nGem::Specification.new do |s|\n s.name = \"erm\"\n s.version = Erm::VERSION\n s.license = \"MIT\... | ruby | chosen |
[
{
"from": "system",
"value": "Use hash condition in where.\n"
},
{
"from": "human",
"value": "class AdhocMailer < ActionMailer::Base\n include MailerHelper\n default from: ENV.fetch('FROM_EMAIL')\n\n def send_adhoc_email(subject, body, user_ids)\n users = User.where(\"id IN (?)\", user_ids... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for geocoding with STI models\n"
},
{
"from": "human",
"value": "require 'geocoder'\n\nmodule Geocoder\n\n ##\n # Methods for invoking Geocoder in a model.\n #\n module Model\n module Base\n\n def geocoder_options\n if defined?(@geocoder_optio... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability for group api to page results\n"
},
{
"from": "human",
"value": "class Gitlab::Client\n # Defines methods related to groups.\n module Groups\n def groups\n get(\"/groups\")\n end\n\n def group(group_id)\n get(\"/groups/#{group_id}\")... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused topic section scope\n"
},
{
"from": "human",
"value": "class TopicSection < ActiveRecord::Base\n belongs_to :topic\n has_many :guides, through: :topic_section_guides\n\n has_many :topic_section_guides, -> { order(position: :asc) }, dependent: :destr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove require \"relevance functionality\" from news controller "
},
{
"from": "human",
"value": "require_relative 'news_service'\nrequire_relative 'news_repository'\nrequire_relative 'relevance/relevance_command'\n\nclass NewsController\n\n\tdef analyze_content(con... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem version now that all comparison fields and AND are parseable\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'msfl_visitors'\n s.version = '0.1.0.rc0'\n s.date = '2015-05-06'\n s.summary = \"Convert MS... | ruby | chosen |
[
{
"from": "system",
"value": "Add various version sizes similar to imgur."
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass ImageUploader < CarrierWave::Uploader::Base\n include CarrierWave::MiniMagick\n include CarrierWave::MimeTypes\n include Sprockets::Helpers::RailsHelper\n\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to publish 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 'absorb_api/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add some tests for cf-manifest oauth\n\nSigned-off-by: Toby Lorne <527052641d65eef236eeef9545b2acac74c35d57@digital.cabinet-office.gov.uk>\n"
},
{
"from": "human",
"value": "RSpec.describe \"Google OAuth\" do\n let(:properties) { manifest.fetch(\"instance_groups.ua... | ruby | chosen |
[
{
"from": "system",
"value": "Use outer join onto addresses when searcing for practice\n\nOtherwise a pratice with no address will not show up.\nUnlikely to have that I know, but useful for testing.\n"
},
{
"from": "human",
"value": "module Renalware\n module Patients\n class PracticeSearchQ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove out of date comment\n"
},
{
"from": "human",
"value": "# typed: strict\n# frozen_string_literal: true\n\nclass OwnerAbility\n extend T::Sig\n\n include CanCan::Ability\n\n sig { params(user: T.nilable(Owner)).void }\n def initialize(user)\n # You can l... | ruby | chosen |
[
{
"from": "system",
"value": "Add learner method to InstallerReports\n"
},
{
"from": "human",
"value": "class InstallerReport < ActiveRecord::Base\n\n # some helpers for extracting info out of the body text dump\n def cache_dir\n find /^Writeable cache dir: (.*)$/\n end\n\n def saved_jar\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix style lint destroying action\n"
},
{
"from": "human",
"value": "require_relative \"base\"\n\nmodule Suspenders\n class StylelintGenerator < Generators::Base\n def install_stylelint\n dependencies = [\"stylelint@10\", # FIXME: config-recommened is not re... | ruby | chosen |
[
{
"from": "system",
"value": "Update Yourkit Java Profiler to 2015-build-15050\n"
},
{
"from": "human",
"value": "cask :v1 => 'yourkit-java-profiler' do\n version '2015-build-15044'\n sha256 '4a1ccfe84645026701dd45414e53ddfb948b2dd0fa88aaf5dece2fcd0c244037'\n\n url \"http://www.yourkit.com/do... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure code extract is always a hash\n"
},
{
"from": "human",
"value": "module ActionDispatch\n class ExceptionWrapper\n def extract_sources\n exception.backtrace.map do |trace|\n file, line = trace.split(\":\")\n line_number = line.to_i\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Include test cases for all cops, and then emit failure tags only for those with offences\n"
},
{
"from": "human",
"value": "require 'rexml/document'\n\nmodule RuboCop\n module Formatter\n class JUnitFormatter < BaseFormatter\n def started(target_file)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change to update dependencies and lock ruby version\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'tty/file/version'\n\nGem::Specification.new do |spec... | ruby | chosen |
[
{
"from": "system",
"value": "Add a way to disable transactional factories for a single test."
},
{
"from": "human",
"value": "module TransactionalFactories\n module ClassMethods\n def suite_with_transactions\n method_names = public_instance_methods(true)\n tests = method_names.del... | ruby | chosen |
[
{
"from": "system",
"value": "Expand Float divmod array equality comparisons to use be_close with a default tolerance.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\n\ndescribe \"Float#divmod\" do\n it \"returns an [quotient, modulus] from dividing sel... | ruby | chosen |
[
{
"from": "system",
"value": "Add java_home to current session\n"
},
{
"from": "human",
"value": "#\n# Copyright:: Copyright (c) 2018, Aerobase Inc\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for displaying credits in page 2\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass PostShowTest < ActionDispatch::IntegrationTest\n setup do\n @post = create(:post, :whatever, :with_credit, body: <<~EOS.encode(crlf_newline: true))\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Test exceptions with all lookups.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'test_helper'\n\nclass ErrorHandlingTest < Test::Unit::TestCase\n\n def setup\n Geocoder::Configuration.set_defaults\n end\n\n def test_does_not_choke_on_timeout\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Print error if binary not run from git repo\n"
},
{
"from": "human",
"value": "require \"fit_commit/installer\"\nrequire \"fit_commit/version\"\n\nmodule FitCommit\n class Cli\n EXIT_CODE_SUCCESS = 0\n EXIT_CODE_FAILURE = 1\n\n attr_accessor :args\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Mark initiation of v5.0 development\n\nTo prevent users from pointing their Gemfile to the repository and breaking their site."
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Jekyll\n VERSION = \"4.3.0\"\nend\n"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add Policy button to enable tagging of Ansible Credential\n\nFixes https://bugzilla.redhat.com/show_bug.cgi?id=1526219\n\nAdd Policy toolbar button to enable tagging of any Ansible Credential\nfrom its summary page.\n"
},
{
"from": "human",
"value": "class Applicati... | ruby | chosen |
[
{
"from": "system",
"value": "Add constraint for system only resources in admin\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n # Devise\n devise_for :admin_users, path: :admin\n\n root 'pages#index'\n\n namespace :admin do\n root 'dashboard#index'\n\n resources :... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration\n- schema to come, after upgrading mysql to try to get rid of all the trivial changes\n"
},
{
"from": "gpt",
"value": "class ChangeColumnTypeControlOnSample < ActiveRecord::Migration\n CONTROL_DATA_MAPPING_UP = {\n '0' => 'no_control',\n '1' => '... | ruby | chosen |
[
{
"from": "system",
"value": "Make admins get multi enterprise dashboard\n"
},
{
"from": "human",
"value": "Spree::Admin::OverviewController.class_eval do\n def index\n # TODO was sorted with is_distributor DESC as well, not sure why or how we want ot sort this now\n @enterprises = Enterp... | ruby | chosen |
[
{
"from": "system",
"value": "Move SERVICES within the class\n"
},
{
"from": "human",
"value": "require \"singleton\"\nrequire \"forwardable\"\n\nSERVICES = [Walkman::Service::Rdio]\n\nmodule Walkman\n class Player\n include Singleton\n\n def services\n @services ||= begin\n H... | ruby | chosen |
[
{
"from": "system",
"value": "Add some explicit assertions to list tests\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass ListTest < Test::Unit::TestCase\n def setup\n Clever.api_key = \"DEMO_KEY\"\n end\n\n should \"retrieve districts\" do\n VCR.use_cassette(\"district... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dash18, which is becoming the new archive machine\n"
},
{
"from": "human",
"value": "set :rails_env, 'production'\nserver 'dash1.code.org', :app, :web, :db, :primary => true\nserver 'dash5.code.org', :app, :web\nserver 'dash6.code.org', :app, :web\nserver 'da... | ruby | chosen |
[
{
"from": "system",
"value": "Make gemspec text consistent with repo text\n"
},
{
"from": "human",
"value": "require './lib/tablerize/version'\n\nGem::Specification.new do |gem|\n gem.name = 'tablerize'\n gem.summary = 'Convert YAML to HTML tables.'\n gem.description = <<-END... | ruby | chosen |
[
{
"from": "system",
"value": "Enable (explicitly) static file access\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'sinatra'\nrequire 'rdf'\nrequire 'json/ld'\nrequire_relative './RESTService.rb'\n\nset :bind, '0.0.0.0'\n\nget '/' do\n \"Catalinker\"\nend\n\nget '/work' do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor controller to include new connection creating methods\n"
},
{
"from": "human",
"value": "class RelationshipsController < ApplicationController\n before_filter :authenticate_user!\n\n #TODO: Use ajax?\n def create\n relationship = Relationship.new(stat... | ruby | chosen |
[
{
"from": "human",
"value": "Introduce AnsibleTower's Job subclassed from OrchestrationStack\n\n\n(transferred from ManageIQ/manageiq@2cfe41f01bb6120f4f6f8c50a0e3a4762c415ec5)\n"
},
{
"from": "gpt",
"value": "module MiqAeMethodService\n class MiqAeServiceManageIQ_Providers_AnsibleTower_Configur... | ruby | chosen |
[
{
"from": "system",
"value": "Add net/http to panopticon slug validator so that we can create things again\n\nnet/http must have been required in some of the frontend code that we've now removed\n"
},
{
"from": "human",
"value": "class PanopticonSlugValidator < ActiveModel::EachValidator\n def ... | ruby | chosen |
[
{
"from": "human",
"value": "TEST: Add test for unit ilo progress\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass UnitTest < ActiveSupport::TestCase\n test 'ensure valid response from unit ilo data' do\n unit = Unit.first\n details = unit.ilo_progress_class_details\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Create unit test for Game.deal\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Game, type: :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nR... | ruby | chosen |
[
{
"from": "system",
"value": "Add examples for testing precision is set\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Numeric do\n describe '#inches' do\n before :context do\n clear_defined_inches\n Dims.define(:inches)\n end\n\n shared_context 'returni... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test database connection string setup\n"
},
{
"from": "human",
"value": "require 'sequel'\nrequire 'rspec/sequel'\n\nmodule RSpec::Sequel::Test\n def self.postgres\n @pg_db ||= connect_to_postgres\n end\n \n private\n DEFAULT_TEST_DATABASE = 'postgres://... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error message for duplicate email validation attempts\n"
},
{
"from": "human",
"value": "class UserAccountValidation\n \n # success message\n ACCOUNT_VERIFICATION_COMPLETE = {\n \"status\" => \"Registration Complete!\",\n \"message\" => \"An administrat... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure hassel has been compiled\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# Requires ruby2.0+\n# Must be invoked from top-level sts directory\n\nrequire_relative 'run_cmd_per_experiment'\n\noptions = {}\nparser = OptionParser.new do |opts|\n option... | ruby | chosen |
[
{
"from": "human",
"value": "Implement CommandMatcherMoveTest to guide design\n\nThis class is intended to test and document the development of a\ncommand matching object, which understands the 'MOVE' command.\n"
},
{
"from": "gpt",
"value": "require './lib/toy_robot_simulator/command/matcher/ba... | ruby | chosen |
[
{
"from": "human",
"value": "Add default configuration to stores in a migration\n"
},
{
"from": "gpt",
"value": "class AddBraintreeConfigurationToStores < ActiveRecord::Migration\n def up\n Spree::Store.all.each(&:create_braintree_configuration)\n end\n\n def down\n SolidusPaypalBraintr... | ruby | chosen |
[
{
"from": "system",
"value": "Use -k option on iostat: Display statistics in kilobytes per second instead of blocks per second\n"
},
{
"from": "human",
"value": "Ohai.plugin(:DiskStats) do\n provides 'disk_stats'\n collect_data(:linux) do\n disk_stats Mash.new\n so = shell_out(\"iost... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the attr_accessor, which was preventing me from updating changes when saving the database\n"
},
{
"from": "human",
"value": "class Item < ApplicationRecord\n attr_accessor :category_id\n\n validates :name, presence: { message: \"Name field can't be left bla... | ruby | chosen |
[
{
"from": "system",
"value": "Add uniqueness validation to User model\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_many :memberships\n has_many :groups, through: :memberships\n has_many :created_groups, class_name: \"Group\", foreign_key: \"creator_id\"\n has_many... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade activemodel version from 4.x to 5.x\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"color-sc... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for default settings\n"
},
{
"from": "human",
"value": "describe ::ActionSubscriber::Configuration do\n describe \"default values\" do\n specify { expect(subject.allow_low_priority_methods).to eq(false) }\n specify { expect(subject.default_exchange)... | ruby | chosen |
[
{
"from": "system",
"value": "Test for question title validation\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Question do\n\n it \"has a valid factory\" do\n expect(build(:question)).to be_valid\n end\nend"
},
{
"from": "gpt",
"value": "require 'rails_he... | ruby | chosen |
[
{
"from": "system",
"value": "Switch slimmer middleware insertion to be less specific about placement\n"
},
{
"from": "human",
"value": "Panopticon::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # In the development environmen... | ruby | chosen |
[
{
"from": "system",
"value": "Install logrotate file into correct location\n"
},
{
"from": "human",
"value": "name 'loom-server'\ndefault_version 'develop'\n\nsource :git => 'git://github.com/continuuity/loom.git'\nrelative_path 'server'\n\nbuild do\n mkdir \"#{install_dir}/bin\"\n copy \"#{pr... | ruby | chosen |
[
{
"from": "system",
"value": "Format date to give month in short form\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class UpdateSerializer < ActiveModel::Serializer\n attribute :category\n attribute :link\n attribute :description\n attribute :updated_at, key... | ruby | chosen |
[
{
"from": "system",
"value": "Add required ruby version in gemspec\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/rack/secure_upload/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"rack-secure-upload\"\n gem.version = Rack::SecureUpload::VE... | ruby | chosen |
[
{
"from": "system",
"value": "Update for new version of RubyGems\n\nChanged Gem.searcher.find to Gem::Specification.find_by_name\n"
},
{
"from": "human",
"value": "module Boson\n # This library loads a gem by the given name. Unlike FileLibrary or ModuleLibrary, this library\n # doesn't need a ... | ruby | chosen |
[
{
"from": "system",
"value": "Make slice each value configurable to accommodate 3 for 1"
},
{
"from": "human",
"value": "module Rule\n class Product\n DEFAULT_RULE = {product_code:\"FR1\", qty:2, price:3.11}\n def initialize(rule={})\n @rule = DEFAULT_RULE.merge(rule)\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add provisioned_id attribute to ServerUsage\n"
},
{
"from": "human",
"value": "class Ey::Core::Client::ServerUsage < Ey::Core::Model\n extend Ey::Core::Associations\n\n attribute :start_at, type: :time\n attribute :end_at, type: :time\n attribute :report... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bad copy paste job\n"
},
{
"from": "human",
"value": "module LearnWeb\n module AttributePopulatable\n def self.included(base)\n base.class_eval do\n def parse!\n case response.status\n when 200\n self.data = Oj.load(r... | ruby | chosen |
[
{
"from": "system",
"value": "Convert SeparatorItem to use Coordinates.\n"
},
{
"from": "human",
"value": "#\n# SMELL: the attribute 'date_ranges'. Use a message instead, such as #min_and_max_date.\n# SMELL: #calc_layout and #render seem to split the responsibility of retrieving dimension infor... | ruby | chosen |
[
{
"from": "system",
"value": "Use rack body proxy for the identity map middleware.\n"
},
{
"from": "human",
"value": "module Toy\n module Middleware\n class IdentityMap\n class Body\n def initialize(target, original)\n @target = target\n @original = original\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add class docstrings for command error classes\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule VagrantPlugins\n module AnsibleAuto\n # Error classes for the +ansible_auto+ provisioner and +ansible+ command\n module Errors\n # A... | ruby | chosen |
[
{
"from": "human",
"value": "Add Not Tetris 2 cask\n"
},
{
"from": "gpt",
"value": "class NotTetris < Cask\n version '2'\n sha256 'ddb4df7f9169e1a03cb5f81e67b972cca4470e4925973af452f6e467830aaea8'\n\n url 'http://stabyourself.net/dl.php?file=nottetris2/nottetris2-osx.zip'\n homepage 'http://... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Opera Beta.app to v30.0.1835.18\n"
},
{
"from": "human",
"value": "cask :v1 => 'opera-beta' do\n version '29.0.1795.41'\n sha256 'e7f013637993189ee96409fd647bbc00fa94bde544e2604c36cde230ad717063'\n\n url \"http://get.geo.opera.com/pub/opera-beta/#{version... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to dalli store instead of file store for Rails' cache\n"
},
{
"from": "human",
"value": "AlmReport::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # The test environment is used exclusively ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix displaying of draft tags in forms.\n\nAn change in one of the gems has meant that the Form facade methods\nare no longer being called when displaying the form, so draft tags are\nnot being displayed. Adding a public_send alias fixes it.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Edit response migration to include question_id\n"
},
{
"from": "human",
"value": "class CreateResponses < ActiveRecord::Migration\n def change\n create_table :responses do |t|\n t.integer :option_id, null: false, index: true\n t.integer :surveys_user_i... | ruby | chosen |
[
{
"from": "system",
"value": "Use dhclient instead of dhcpcd\n"
},
{
"from": "human",
"value": "package 'acpid'\npackage 'alsa-utils'\npackage 'aws-cli'\npackage 'colordiff'\npackage 'ctags'\npackage 'docker'\npackage 'exa'\npackage 'fish'\npackage 'fwupd'\npackage 'fzf'\npackage 'git'\npackage ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for table instead of class\n"
},
{
"from": "human",
"value": "class FixIdentities < ActiveRecord::Migration\n def up\n # Up until now, legacy 'ldap' references in the database were charitably\n # interpreted to point to the first LDAP server specified i... | ruby | chosen |
[
{
"from": "system",
"value": "Remove log message for every run\n"
},
{
"from": "human",
"value": "# require ENV[\"RAILS_ENV_PATH\"]\nrequire File.expand_path(File.join(File.dirname(__FILE__), '../..', 'config', 'environment'))\nrequire 'rubygems'\n\nloop do\n puts \"Fetching at #{ Time.now.to_s... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec version and iOS target\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'BowerLabs'\n s.version = '1.1.2'\n s.platform = :ios\n s.license = 'MIT'\n s.summary = 'Common frameworks used by Bower Labs projects.'\n s.homepag... | ruby | chosen |
[
{
"from": "system",
"value": "Set the deployment target to iOS 8.1.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'BowerLabs'\n s.version = '1.5.0'\n s.platform = :ios\n s.license = 'MIT'\n s.summary = 'Common frameworks used by Bower Labs projects.'\n s.homepag... | ruby | chosen |
[
{
"from": "system",
"value": "Check against instance methods rather than class methods before generating delete helpers.\n"
},
{
"from": "human",
"value": "module ActiveScaffold\n module Bridges\n module Paperclip\n module Lib\n module PaperclipBridgeHelpers\n mattr_acce... | ruby | chosen |
[
{
"from": "system",
"value": "Add HTTP basic auth with fake backend that authenticates user 'todd'\n"
},
{
"from": "human",
"value": "# Filters added to this controller will be run for all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix namespace to use Payout\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass IncludePublisherInPayoutReportJob\n include Sidekiq::Worker\n sidekiq_options queue: 'scheduler'\n\n GEMINI = :gemini\n PAYPAL = :paypal\n UPHOLD = :uphold\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update to latest eventmachine/firering releases\n\nCloses #29, closes #35\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"camper_van/version\"\n\nGem::Specification.new do |s|\n s.name =... | ruby | chosen |
[
{
"from": "human",
"value": "Add SessionsHelper & UserSession helper methods\n"
},
{
"from": "gpt",
"value": "module CherryTomato\n class SessionsHelper < Sinatra::Base\n configure do\n enable :sessions\n end\n\n module UserSession\n def logged_in?\n not session[:user]... | ruby | chosen |
[
{
"from": "system",
"value": "Allow template to be nested\n"
},
{
"from": "human",
"value": "module TemplateHelper\n\n def template(collection:, &block)\n content_for :kindred_script do\n js(\n args: {\n template: capture(&block),\n collection: collection.to_jso... | ruby | chosen |
[
{
"from": "system",
"value": "Use gmt date to ignore wordpress timezone settings\n"
},
{
"from": "human",
"value": "module WpPost\n extend ActiveSupport::Concern\n\n included do\n serialize :acf_fields\n end\n\n # TODO (cies): rename to update_wp_post_attributes\n def update_post(json)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add markdown pattern for uploads to file uploader\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nclass FileUploader < CarrierWave::Uploader::Base\n include UploaderHelper\n\n storage :file\n\n attr_accessor :project, :secret\n\n def initialize(project, se... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.