conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make these gems into development dependencies.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/browscapper/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = %q{browscapper}\n s.version = Browscapper::V... | ruby | chosen |
[
{
"from": "system",
"value": "Use (name) nodes for @foo axes.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Oga::XPath::Parser do\n context 'predicates' do\n example 'parse a single predicate' do\n parse_xpath('/foo[@class=\"bar\"]').should == s(\n :xpath,\... | ruby | chosen |
[
{
"from": "system",
"value": "Online::Invoice: Test that id and sales_term_id are nil if not present\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Quickeebooks::Online::Model::Invoice\" do\n it \"can parse invoice from XML\" do\n xml = onlineFixture(\"invoice.xml\")\... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize shell and describe options.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire \"github_cli/command_template\"\nrequire \"github_cli/repositories\"\nrequire \"github_cli/issues\"\n\nmodule GithubCLI\n class CLI < ::Thor\n\n map \"repo\" =... | ruby | chosen |
[
{
"from": "system",
"value": "Add attr_accessible for site comments, and don't allow viewed_at to be set on new record creation.\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: site_comments\n#\n# id :integer not null, primary key\n# user_id ... | ruby | chosen |
[
{
"from": "system",
"value": "Work around a bug in MacRuby where yield can't be used from a block.\n"
},
{
"from": "human",
"value": "require \"bacon\"\nrequire \"mocha\"\n\nmodule Bacon\n module MochaRequirementsCounter\n def self.increment\n Counter[:requirements] += 1\n end\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Check the status of the initial index setup.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'pariah/dataset/mutations'\nrequire 'pariah/dataset/actions'\nrequire 'pariah/dataset/query'\n\nmodule Pariah\n class Dataset\n include Enume... | ruby | chosen |
[
{
"from": "system",
"value": "Move solidus_support require before the engine\n\nThis allows to use solidus support stuff into the engine file.\n"
},
{
"from": "human",
"value": "require 'solidus_core'\nrequire 'solidus_affirm/engine'\nrequire 'solidus_affirm/callback_hook/base'\nrequire 'solidus... | ruby | chosen |
[
{
"from": "system",
"value": "Put back Mizerany's as gem's author\n"
},
{
"from": "human",
"value": "# encoding:utf-8\n\nGem::Specification.new do |gem|\n gem.name = 'sinatra-activerecord'\n gem.version = '1.1.2'\n\n gem.description = \"Extends Sinatra with ActiveRecord helpers.... | ruby | chosen |
[
{
"from": "system",
"value": "Make rake task load environment\n"
},
{
"from": "human",
"value": "namespace :legacy do\n desc 'Load legacy data into database'\n task :load do\n legacy_file = File.join(Rails.root, 'db', 'legacy.rb')\n load(legacy_file) if File.exist?(legacy_file)\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Extend the git timeout for background jobs.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# vim: et ts=2 sw=2\n\nrequire \"resque/tasks\""
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# vim: et ts=2 sw=2\n\nrequire \"resque/tasks\"\n\ntas... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for rendering CT101 content after toggle\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.feature \"Clinical Trials 101\", type: :feature, js: true do\n scenario \"renders CT101 component\" do\n visit \"/\"\n page.driver.browser.swi... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to ensure choice equality considers key attribute\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nRSpec.describe TTY::Prompt::Choice, \"#==\" do\n it \"is true with the same name and value attributes\" do\n expect(described_class.new... | ruby | chosen |
[
{
"from": "system",
"value": "Add method comments to `Production::Concat` source\n"
},
{
"from": "human",
"value": "module Calyx\n module Production\n class Concat\n EXPRESSION = /(\\{[A-Za-z0-9_@\\.]+\\})/.freeze\n START_TOKEN = '{'.freeze\n END_TOKEN = '}'.freeze\n DERE... | ruby | chosen |
[
{
"from": "system",
"value": "Remove example about non existent feature\n"
},
{
"from": "human",
"value": "module DeviseInvitable\n module Schema\n # Add invitation_token and invitation_sent_at columns in the resource's database table.\n #\n # Examples\n #\n # # For a new resou... | ruby | chosen |
[
{
"from": "system",
"value": "Revert previous change.\nHandling Devise special case\n"
},
{
"from": "human",
"value": "module ActionDispatch::Routing\n class Mapper\n def multi_site_scope(&block)\n scope ':multi_site', :constraints => MultiSiteConstraints.new do\n block.call\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error inheritance so that it's catchable by default.\n"
},
{
"from": "human",
"value": "module PayrollHero\n module Api\n\n module Errors\n\n class GenericError < StandardError\n end\n\n class ServerReturnedError < GenericError\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Set up basic rake tasks.\n"
},
{
"from": "human",
"value": "# desc \"Explaining what the task does\"\n# task :tkh_menus do\n# # Task goes here\n# end\n"
},
{
"from": "gpt",
"value": "namespace :tkh_menus do\n desc \"Create migrations, locale, and othe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with in-document links\n\nDocuments imported from the publishing-api/docs folder have a\ntable-of-contents which doesn't work here.\n\nThe documents are published on github, and made available here.\nDue to a mismatch in Markdown -> HTML rendering between Github and\n... | ruby | chosen |
[
{
"from": "system",
"value": "Delete patch route for users\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n mount RedactorRails::Engine => '/redactor_rails'\n resources :snippets\n\n get '/signup', to: 'users#new'\n post '/signup', to: 'users#create', as: 'new_sign_up'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Move API url to `/i'\n"
},
{
"from": "human",
"value": "Shreds::Application.routes.draw do\n\n require 'sidekiq/web'\n mount Sidekiq::Web => '/sidekiq'\n\n resources :feeds, only: [:index, :create, :show, :destroy], path: '/', format: false do\n resources :new... | ruby | chosen |
[
{
"from": "system",
"value": "Add wildcard route that sends all /new url to the SPA to enable client-side routing.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n # Define routes for regular users\n devise_for :users, controllers: { confirmations: 'confirmations' }\n\n n... | ruby | chosen |
[
{
"from": "system",
"value": "Add exit to stop execution if tap isn't available.\n"
},
{
"from": "human",
"value": "require 'mechanize'\n\nmodule Barcade\n class Scraper\n BASE_URI = 'http://barcadebrooklyn.com/'\n\n attr_accessor :date_slug\n\n def initialize(date)\n @date_slug =... | ruby | chosen |
[
{
"from": "system",
"value": "Add method comments to `Modifiers` source\n"
},
{
"from": "human",
"value": "module Calyx\n class Modifiers\n def transform(name, value)\n if respond_to?(name)\n send(name, value)\n elsif value.respond_to?(name)\n value.send(name)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set default encoding for csv file.\n"
},
{
"from": "human",
"value": "module Dataly\n class Importer\n attr_reader :logger, :errors\n\n class_attribute :model\n\n def self.model(model)\n self.model = model\n end\n\n def logger\n @logger ||... | ruby | chosen |
[
{
"from": "system",
"value": "Use GET method to fetch user status\n"
},
{
"from": "human",
"value": "require \"detect_language/version\"\nrequire \"detect_language/errors\"\nrequire \"detect_language/configuration\"\nrequire \"detect_language/client\"\n\nmodule DetectLanguage\n class << self\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use Forwardable to define Middleware methods\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\n# The base middleware class works just like a Tracksperanto::Export::Base, but it only wraps another exporting object and does not get registered on it's own\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor to take out duplicate checking of validmove\n"
},
{
"from": "human",
"value": "$: << File.dirname(__FILE__)\nrequire 'game_engine'\n\nclass WebGameEngine < GameEngine\n\n def initialize(args)\n super\n end\n\n def versus_user(current_board, player, us... | ruby | chosen |
[
{
"from": "system",
"value": "Make the slash in schema/ optional"
},
{
"from": "human",
"value": "require 'sinatra'\n\nmodule Yogo\n class SchemaApp < ::Sinatra::Base\n before do\n content_type :json\n end\n\n get '/schema/?' do\n { :content => Schema.all.to_json(:to_json => ... | ruby | chosen |
[
{
"from": "system",
"value": "Use ARGF to read the avro file\n"
},
{
"from": "human",
"value": "require 'avro2kafka/version'\nrequire 'avro2kafka/avro_reader'\nrequire 'avro2kafka/kafka_publisher'\n\nclass Avro2Kafka\n attr_reader :input_path, :kafka_broker, :kafka_topic, :kafka_key\n\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to assert line does end with punctuation\n"
},
{
"from": "human",
"value": "require File.expand_path('test_helper', File.dirname(__FILE__))\n\nclass ChangelogTest < ActiveSupport::TestCase\n\n def setup\n path = File.join(File.dirname(__dir__), \"CHA... | ruby | chosen |
[
{
"from": "system",
"value": "Add validity check standard to IPValidator and refactor\n"
},
{
"from": "human",
"value": "module ActiveModel\n module Validations\n class IpValidator < EachValidator\n def validate_each(record, attribute, value)\n regex = case options[:format]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use TEXT field to store raw_post data\n"
},
{
"from": "human",
"value": "class CreatePayFuTransactions < ActiveRecord::Migration\n def change\n create_table :pay_fu_transactions do |t|\n t.string :type\n t.string :transaction_id\n t.string :transa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove conf parameter for render method\n\n"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'thor/group'\nrequire 'yaml'\n\nmodule OpsKit\n class OdinSon < Thor\n class_option :dry, type: :boolean\n\n desc \"render TEMPLATE [CONF]\", \"generate apach... | ruby | chosen |
[
{
"from": "system",
"value": "Create DB schemas when migrating as well\n"
},
{
"from": "human",
"value": "\n# we utilize PostgreSQL's schemas for segmenting our projects within the same database, this works with Heroku Postgres\n\nnamespace :db do\n\n def using_postgres?\n defined?(ActiveRec... | ruby | chosen |
[
{
"from": "system",
"value": "Add forgotten attr_accessor to inventory_filename\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module Vai\n class Config < Vagrant.plugin(\"2\", :config)\n attr_accessor :inventory_dir\n attr_accessor :groups\n \n def initialize... | ruby | chosen |
[
{
"from": "system",
"value": "Move Sidekiq inline requirement for debugging\n\nSince the perform_async call has changed class I had to move the inline\nrequirement if the DEBUG environment variable is set, too. Now debugging\nof Sidekiq worker is possible again.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2... | ruby | chosen |
[
{
"from": "system",
"value": "Use hexdigest for cache key.\n\nTo make the cache key small. Problems can arise if the cache key is too long.\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class SearchController < ApplicationController\n include PaginationHeaders\n inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Include empty whitehall array in formats list\n\nSo that GDS validators can work.\n"
},
{
"from": "human",
"value": "Artefact::FORMATS_BY_DEFAULT_OWNING_APP = {\n 'publisher' => [\n \"course\",\n \"news\",\n \"person\"\n ]\n}"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove spec depending on platform-dependent behavior from ungetc/lseek.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\nrequire File.expand_path('../shared/pos'... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add pry and pry debuggers to common spree dependencies\"\n\nThis reverts commit 7c367d5ca0e2f293813278a0e37d9f731aa8befb.\n\nCI breaks with these errors: (lack of ruby 2.1 apparently)\n\n [03:52:55][Step 1/1] in directory: /mnt/72aec43634788be0/core\n [03:52:55][Step... | ruby | chosen |
[
{
"from": "system",
"value": "Add down to change order migration\n"
},
{
"from": "human",
"value": "class ChangeOrderToInteger < ActiveRecord::Migration[5.1]\n def change\n change_column :dojos, :order, :string, default: '000000'\n end\nend\n\n"
},
{
"from": "gpt",
"value": "cl... | ruby | chosen |
[
{
"from": "system",
"value": "Fix name in gem authors\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/fuji/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Zeke Sikelianos\", \"Max Shoening\", \"Dominic Dagradi\"]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make this a pre-release as it depends on another prerelease\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'cassandra_object'\n s.version = '0.5.0'\n s.email = \"michael@koziarski.com\"\n s.author = \"Michael Koziarski\"\n\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for ignoring encoding options in 1.8\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"File#initialize\" do\n it \"needs to be reviewed for spec completeness\"\nend\n\nruby_version_is '1.9' do\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add test files to gemspec explicitly\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |gem|\n gem.name = \"rubyapi\"\n\n gem.authors = [\"Kim Burgestrand\"]\n gem.email = [\"kim@burgestrand.se\"]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set the environment the new-style way\n"
},
{
"from": "human",
"value": "define :rails_app, :action => :deploy, :user => \"root\", :mode => \"0755\" do\n include_recipe \"ruby\" \n \n raise \"Please provide the deploy details.\" unless params[:deploy_settings]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use table name for binding name\n"
},
{
"from": "human",
"value": "module OData\n class CreateOperation < Operation\n\n def handle_operation_response(response)\n # Grab the id, and put back into the active record instance\n if response.headers['OData-E... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to hold content in Resource container.\n"
},
{
"from": "human",
"value": "require 'base64'\nrequire 'digest'\n\nmodule Percy\n class Client\n\n # A simple data container object used to pass data to create_snapshot.\n class Resource\n attr_acc... | ruby | chosen |
[
{
"from": "system",
"value": "Use build-essential instead of build_essential\n\nWARN: node['build_essential'] has been changed to node['build-essential'] to match the\ncookbook name and community standards. I have gracefully converted the attribute\nfor you, but this warning and conversion will be removed i... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce worker load per container instance\n"
},
{
"from": "human",
"value": "#!/usr/bin/env puma\r\n\r\nroot = File.dirname(__FILE__) + '/../'\r\n\r\ndirectory root\r\nrackup root + 'config.ru'\r\nenvironment 'production'\r\nbind 'tcp://0.0.0.0:8080'\r\ndaemonize un... | ruby | chosen |
[
{
"from": "system",
"value": "Fix project main page showtype\n"
},
{
"from": "human",
"value": "class ContainerProjectController < ApplicationController\n include ContainersCommonMixin\n include Mixins::DashboardViewMixin\n\n before_action :check_privileges\n before_action :get_session_data\... | ruby | chosen |
[
{
"from": "system",
"value": "Implement a simple toolbar definition DSL.\n"
},
{
"from": "human",
"value": "class ApplicationHelper::Toolbar::Basic\n include Singleton\n \n class << self\n extend Forwardable\n delegate [:model, :register, :buttons, :definition, :button_group] => :instan... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for operations to be embedded alongside (instead of inside) process templates in JSON exports of a Process\n"
},
{
"from": "human",
"value": "module RailsWorkflow\n class ProcessImporter\n def initialize json\n @json = json['process_template']\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor with wrap_method module method\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\n\nmodule ActiveRelationTracer\n extend ActiveSupport::Concern\n\n included do\n class_eval do\n name = :where\n original_method = instance_met... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Removed registration of Paperclip.\"\n\nThis reverts commit 650db1e79ceb81af4db950302686c88ba29ea8d6.\n"
},
{
"from": "human",
"value": "require 'rails'\n\n#if ::Rails.version < '3.1' || !::Rails.application.config.assets.enabled\n\nmodule Headshot\n modul... | ruby | chosen |
[
{
"from": "system",
"value": "Fix blank? method called for nil\n"
},
{
"from": "human",
"value": "module RDStation\n class ErrorHandler\n class InvalidRefreshToken\n attr_reader :errors\n\n ERROR_CODE = 'INVALID_REFRESH_TOKEN'.freeze\n\n def initialize(errors)\n @errors... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the initiatial controller test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule RailsInvitable\n class Api::V1::UserAcceptedReferralsControllerTest < ActionDispatch::IntegrationTest\n include Engine.routes.url_helpers\n\n test \"should g... | ruby | chosen |
[
{
"from": "system",
"value": "Drop deployment target to 10.9\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"JROFBridge\"\n s.version = \"0.0.1\"\n s.summary = \"Bridge your program and OmniFocus.\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on private_ip var ref.\n"
},
{
"from": "human",
"value": "# Cookbook Name:: sys_dns\n# Recipe:: do_set_private\n\n# Copyright RightScale, Inc. All rights reserved. All access and use subject to the\n# RightScale Terms of Service available at http://www.ri... | ruby | chosen |
[
{
"from": "system",
"value": "Change Simple.new to be fully namespaced for understandability's sake\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'i18n/core_ext'\n\nmodule I18n\n module Backend\n RSpec.describe Base do\n # Since #load_erb is a protected method, this ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for multi-level proxying\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ProxyObject do\n let(:other) { [1, 2, 3] }\n let(:proxy) { klass.new(other, 'stuff') }\n\n let(:klass) do\n Class.new {\n include ProxyObject.new(:oth... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec requirement from = 3.9.0 to = 3.10.0\n\nUpdates the requirements on [rspec](https://github.com/rspec/rspec) to permit the latest version.\n- [Release notes](https://github.com/rspec/rspec/releases)\n- [Commits](https://github.com/rspec/rspec/compare/v3.9.0...v3.10.... | ruby | chosen |
[
{
"from": "system",
"value": "Add swift version to podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'WiremockClient'\n s.version = '1.2.1'\n s.summary = 'An HTTP client for Wiremock standalone instances'\n\n s.description = <<-DESC... | ruby | chosen |
[
{
"from": "system",
"value": "Allow multiple div tags, should they occur.\n"
},
{
"from": "human",
"value": "module Feedjira\n class Preprocessor\n def initialize(xml)\n @xml = xml\n end\n\n def to_xml\n process_content\n doc.to_xml\n end\n\n private\n\n def pro... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure note.system is false if created by user\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "human",
"value": "module Notes\n class CreateService < BaseService\n def execute\n note = project.n... | ruby | chosen |
[
{
"from": "system",
"value": "Raise if subshell fails in application generator\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nmodule ActiveAdmin\n class ApplicationGenerator\n attr_reader :rails_env, :template\n\n def initialize(opts = {})\n @rails_env = opts[:rails_env] |... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the gem post install message.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"oboe/version\"\n\nGem::Specification.new do |s|\n s.name = %q{oboe}\n s.version = Oboe::Version::STRING\n s.date = Time.now.str... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the message pattern matching order.\n"
},
{
"from": "human",
"value": "class Line < ActiveRecord::Base\n belongs_to :person\n belongs_to :quote\n \n validates :person, :body, presence: true\n \n MESSAGE_PATTERNS = [\n /<\\s*([^>]+)\\s*>\\s*(.*)$/,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a comment explaining the method\n"
},
{
"from": "human",
"value": "class Team < ApplicationRecord\n has_secure_password\n\n validates_presence_of :name, :password, if: :password_digest_changed?\n validates_inclusion_of :active, in: [true, false]\n\n belongs_... | ruby | chosen |
[
{
"from": "system",
"value": "Update User Model for FriendlyId Slug\n\nUpdate the User model to use the email address as the FriendlyId Slug.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n devise :async, :database_authenticatable, :registerable,\n :recoverable, :re... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional properties to school so can be used for map\n"
},
{
"from": "human",
"value": "class SchoolsController < ApplicationController\n\t# skip_before_action :verify_authenticity_token\n\tdef index\n\t\t# gon.schools = School.all\n\t\t@schools = School.all\n... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Do not use compact\" because sidebar was dissapearing.\n\nThis reverts commit c921747c11deb3fbe6c69025a7952e5ecf00961d.\n"
},
{
"from": "human",
"value": "module Admin::ResourcesHelper\n\n def search(resource = @resource, params = params)\n if (typus_se... | ruby | chosen |
[
{
"from": "system",
"value": "Add sale off to product scope\n"
},
{
"from": "human",
"value": "module Spree\n Product.class_eval do\n attr_reader :apply_sale_for_variants\n def apply_sale_for_variants=(string_value)\n @apply_sale_for_variants = (string_value == '1')\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for 'table_output', 'block_output' methods\n"
},
{
"from": "human",
"value": "require 'helper'\n\nclass TestSimplecovConsole < MiniTest::Test\n\n Source = Struct.new(:line_number)\n\n def setup\n @console = SimpleCov::Formatter::Console.new\n end\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove public header files specifier as we do not have any header files any more.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"IssueReporter\"\n s.version = \"2.0.0\"\n s.summary = \"Shake your phone to submit... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for FPM 1.0.x"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"fpm/cookery/version\"\n\nGem::Specification.new do |s|\n s.name = \"fpm-cookery\"\n s.version = FPM::Cookery:... | ruby | chosen |
[
{
"from": "system",
"value": "Use helper methods for converting fields to floats\n"
},
{
"from": "human",
"value": "name :bsa\r\n\r\nexecute do\r\n\traise FieldError.new(\"weight\", \"weight must be a number\") if !field_weight.is_float?\r\n\traise FieldError.new(\"height\", \"height must be a n... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) terminal game 2\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/55e8beb4e8fc5b7697000036/\n# --- iteration 1 ---\nclass Hero\n def initialize\n @position = [0, 0]\n end\n\n def move(dir)\n case dir\n when \"up\"\n y_... | ruby | chosen |
[
{
"from": "human",
"value": "Add first version of the SUSE Cloud / OpenStack webhook receiver\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/ruby\n#\n# Simple Sinatra (http://www.sinatrarb.com) script that handles Webhooks\n# notification from SUSE Studio (both Online and Onsite versions).\n#\n# Li... | ruby | chosen |
[
{
"from": "human",
"value": "Add bigserial as a native database type for MySQL adapter\n"
},
{
"from": "gpt",
"value": "require 'active_record/connection_adapters/abstract_mysql_adapter'\n\nmodule ActiveRecord\n module ConnectionAdapters\n class AbstractMysqlAdapter\n NATIVE_DATABASE_TY... | ruby | chosen |
[
{
"from": "human",
"value": "Fix typo for :has_embed? method\n"
},
{
"from": "gpt",
"value": "require 'time'\n\nmodule Arena\n module Connectable\n\n %w(position selected connection_id).each do |method|\n define_method method do\n instance_variable_set(\"@#{method}\", @attrs[meth... | ruby | chosen |
[
{
"from": "system",
"value": "Use single instead of double quotes for require paths\n"
},
{
"from": "human",
"value": "require \"tinytable/version\"\nrequire \"tinytable/table\"\nrequire \"tinytable/text_formatter\"\nrequire \"tinytable/layout\"\n\nmodule TinyTable\n def self.new(*args)\n Ti... | ruby | chosen |
[
{
"from": "system",
"value": "Break if the site begins returning bad data\n"
},
{
"from": "human",
"value": "require \"open-uri\"\nrequire \"json\"\n\n# Return a MongoDB-ready hash from a V&A url\ndef get_object_hash(url)\n\traw_data = get_json(url)\n\tif raw_data.nil?\n\t\treturn {\"_id\" => ur... | ruby | chosen |
[
{
"from": "system",
"value": "Select only users that have a valid login token\n"
},
{
"from": "human",
"value": "require 'mongomapper_id2'\n\nclass Helper < User\n many :helper_request, :foreign_key => :helper_id, :class_name => \"HelperRequest\"\n\n key :role, String\n \n before_create :set... | ruby | chosen |
[
{
"from": "human",
"value": "Put the gemspec under revision control.\n"
},
{
"from": "gpt",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{yahoo}\n s.version = \"2.0.0\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.respond_to? :requ... | ruby | chosen |
[
{
"from": "system",
"value": "Move attribute string into it's own method.\n"
},
{
"from": "human",
"value": "module Liner\n module Inspectable\n # A handy inspection string\n # @return [String]\n # @api public\n def inspect\n attribute_string = liner.map{|k,v| \"#{k}=#{v.inspec... | ruby | chosen |
[
{
"from": "system",
"value": "Gather daily menu data at 9:30\n"
},
{
"from": "human",
"value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\n\n# Example:\n#\n# se... | ruby | chosen |
[
{
"from": "system",
"value": "Update .podspec file for version 0.0.2.2\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"SRMModalViewController\"\n s.version = \"0.0.2.1\"\n s.summary = \"SRMModalViewController support a easy way to display a view with m... | ruby | chosen |
[
{
"from": "human",
"value": "Add 4K Video Downloader cask\n"
},
{
"from": "gpt",
"value": "class FourkVideoDownloader < Cask\n url 'http://4kdownload.googlecode.com/files/4kvideodownloader_2.8.dmg'\n homepage 'http://www.4kdownload.com/products/product-videodownloader'\n version '2.8'\n sha1... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak summary to pass linter\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Snaps\"\n s.version = \"1.0.0\"\n s.description = <<-DESC\n Snaps combines [Dials](https://github.com/aleffert/dials) and [SnapKit](https... | ruby | chosen |
[
{
"from": "human",
"value": "Add SourceSuggestions tab to admin interface\n\nCloses #266\n"
},
{
"from": "gpt",
"value": "ActiveAdmin.register SourceSuggestion do\n permit_params :source_id, :user_id, :gene_name, :disease_name, :variant_name, :initial_comment, :status\n\n filter :gene_name\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow value to be set to blank\n"
},
{
"from": "human",
"value": "module EditableHelper\n def editable(object, attribute, options = {})\n object_name = ActiveModel::Naming.singular(object)\n \n if options[:value].present?\n value = options[:value]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix justification to justify-left and select all show up."
},
{
"from": "human",
"value": "module TinyMceHelper\n\n def mce_init_string\n <<HEREDOC\ntinyMCE.init({\n theme : 'advanced',\n mode : 'textareas',\n plugins : \"paste, safari\",\n width : '... | ruby | chosen |
[
{
"from": "system",
"value": "Use Peoplefinder namespace for mock logged in user"
},
{
"from": "human",
"value": "module SpecSupport\n module Login\n def mock_logged_in_user\n controller.session[:current_user_id] =\n create(:person, email: 'test.user@digital.moj.gov.uk').id\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use HTTPS in the website gemspec"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path(\"../lib\", __FILE__)\nrequire \"clamp/version\"\n\nGem::Specification.new do |s|\n\n s.name = \"clamp\"\n s.version = Clamp::VERSION.dup\n s.platfor... | ruby | chosen |
[
{
"from": "system",
"value": "Make the podspec only require iOS 6.0.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ApplePayStubs\"\n s.version = \"0.1.2\"\n s.summary = \"Test your Apple Pay integration without Apple Pay\"\n s.description = <<-DESC\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for MR 2.3.0-beta.1\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'MagicalRecord'\n s.version = '2.2'\n s.license = 'MIT'\n s.summary = 'Super Awesome Easy Fetching for Core Data 1!!!11!!!!1!.'\n s.homepage = 'http://g... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure 'time' is required.\n"
},
{
"from": "human",
"value": "require \"uri\"\nrequire \"restclient\"\n\nrequire \"bamboo-client/version\"\nrequire \"bamboo-client/http\"\nrequire \"bamboo-client/abstract\"\nrequire \"bamboo-client/rest\"\nrequire \"bamboo-client... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to send payload to api\n"
},
{
"from": "human",
"value": "require \"faraday\"\nrequire \"json\"\nrequire \"hashie\"\n\nrequire \"magnum/client/version\"\nrequire \"magnum/client/request\"\nrequire \"magnum/client/endpoints\"\n\nmodule Magnum\n class Clie... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.