conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update pod spec to version 0.1.2\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'SSPPullToRefresh'\n s.version = '0.1.1'\n s.summary = 'General classes for \"Pull-To-Refresh\" concept customisation'\n\n s.descrip... | ruby | chosen |
[
{
"from": "system",
"value": "Add shorthand methods for metrics\n"
},
{
"from": "human",
"value": "require \"build_log_parser/version\"\nrequire \"build_log_parser/parser\"\nrequire \"chronic_duration\"\n\nmodule BuildLogParser\nend"
},
{
"from": "gpt",
"value": "require \"build_log_... | ruby | chosen |
[
{
"from": "system",
"value": "Return self when silencing the Rack::CommonLogger\n"
},
{
"from": "human",
"value": "require 'rack/commonlogger'\nrequire 'lines'\n\nmodule Lines\n class RackLogger < Rack::CommonLogger\n # In development mode the common logger is always inserted\n def self.s... | ruby | chosen |
[
{
"from": "system",
"value": "Fix work to take a message\n"
},
{
"from": "human",
"value": "class Messenger\n module Workers\n\n def work\n raise NotImplementedError.new('Subclass must implement work')\n end\n\n end\nend\n"
},
{
"from": "gpt",
"value": "class Messenger\n... | ruby | chosen |
[
{
"from": "system",
"value": "Check For Initial Ajax Call To Not Fail\n"
},
{
"from": "human",
"value": "get '/questions/index' do\n if @user.access == 'student'\n json questions: @user.questions\n elsif @user.access == 'coach'\n json questions: Question.all\n end\nend\n\npost '/questio... | ruby | chosen |
[
{
"from": "system",
"value": "Disable rspec autorun for rspec 2\n"
},
{
"from": "human",
"value": "# This is based on Florian Weber's TDDMate\n\nENV['TM_PROJECT_DIRECTORY'] ||= File.dirname(ENV['TM_FILEPATH'])\nrspec_rails_plugin = File.join(ENV['TM_PROJECT_DIRECTORY'],'vendor','plugins','rspec'... | ruby | chosen |
[
{
"from": "system",
"value": "Drop tvOS and watchOS config for now\n"
},
{
"from": "human",
"value": "Pod:: Spec.new do |s|\n s.name = 'SwiftMeasurement'\n s.version = '0.4.0'\n\n s.swift_version = '5.0'\n\n s.osx.deployment_target = '10.12'\n s.ios.deployment_target = '10.0'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade iTerm2 nightly to 2.9.20160207"
},
{
"from": "human",
"value": "cask 'iterm2-nightly' do\n version '2.9.20160131'\n sha256 'dd6692926e252edcccf00a7b96eb0fd3a56727e6a92207f472ad5d6903fe6c5d'\n\n url \"https://iterm2.com/downloads/nightly/iTerm2-#{version.d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove swiftoperator role from selectable roles\n"
},
{
"from": "human",
"value": "ALLOWED_ROLES = %w[\n admin\n audit_viewer\n automation_admin\n automation_viewer\n compute_admin\n compute_admin_wsg\n compute_viewer\n dns_viewer\n dns_webmaster\n image_a... | ruby | chosen |
[
{
"from": "system",
"value": "Add command parser (not used anywhere yet)\n"
},
{
"from": "human",
"value": "\n\nrequire 'json'\n\n\nmodule CBUtils\n def self.condense_name name\n name.downcase.gsub(/[^A-Za-z0-9]/, '')\n end\n \n def self.login name, pass, challenge, challengekeyid, &callb... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor the whole_body method to be simpler\n"
},
{
"from": "human",
"value": "require \"edition\"\n\nclass VideoEdition < Edition\n field :video_url, type: String\n field :video_summary, type: String\n\n @fields_to_clone = [:video_url, :video_summary]\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Make sure we add the files this time!\n"
},
{
"from": "gpt",
"value": "require 'open-uri'\n\nclass TopixGrabber < Object\n\n def query(keyphrase)\n url = \"http://www.topix.net/rss/search/article?x=0&y=0&q=\" + keyphrase\n\n open( url ).read\n end\nend\n\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix multiple definition of gitnesse:push\n"
},
{
"from": "human",
"value": "namespace :gitnesse do\n task :environment do\n end\n\n desc \"Pull features from remote repository and run cucumber.\"\n task :run => :environment do\n Gitnesse::Configuration.load_u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix removed Faraday JSON middleware.\n\nThe JSON request middleware is no longer included with Faraday. This\nseems to have already been partially fixed, since FaradayMiddleware\nwas already a dependency.\n\nThe tests are now passing on Ruby 1.9.\n"
},
{
"from": "human"... | ruby | chosen |
[
{
"from": "system",
"value": "Use Faraday 1.0 compatible configuration\n"
},
{
"from": "human",
"value": "require 'faraday_middleware'\n\nmodule AvaTax\n\n module Connection\n private\n\n def connection\n client_id = \"#{app_name};#{app_version};RubySdk;#{AvaTax::VERSION.dup};#{machi... | ruby | chosen |
[
{
"from": "system",
"value": "Use shape method to get matrix dimensions.\n"
},
{
"from": "human",
"value": "module NeuralNets\n class Math\n ##\n # The sigmoid function\n def self.sigmoid(x)\n 1.0/(1.0 + Math.exp(-x))\n end\n\n ##\n # NMatrix version of the sigmoid functi... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor and actually require parameters strongly.\n\nThis is a little more complex syntax wise but it strongly requires the\nparameters to be Strings (where proper).\n"
},
{
"from": "human",
"value": "module Chaindrive\n class APIv1 < Grape::API\n version 'v1'\... | ruby | chosen |
[
{
"from": "system",
"value": "Make Array.spit symmetrical to Array.eat\n"
},
{
"from": "human",
"value": "class Array\n\ndef nest_concat! other\n\n\teach_with_index { |arr, i| self[i].concat other[ i ] }\n\nend\n\n\ndef nest_concat other\n\n\td = map( &:dup )\n\teach_with_index { |arr, i| d[i].c... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Posts to use Query object\n"
},
{
"from": "human",
"value": "\nmodule RedditApi\n class Posts\n\n def initialize\n @client = RedditApi::Client.new\n @post_factory = RedditApi::Post\n end\n\n def top(subreddit, count)\n posts_data = ... | ruby | chosen |
[
{
"from": "system",
"value": "Move reader definition into its own method\n"
},
{
"from": "human",
"value": "require 'storext'\n\nmodule Storext\n module Override\n\n extend ActiveSupport::Concern\n\n included do\n include Storext.model\n end\n\n module ClassMethods\n def s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove temporary todo since they are now included in the ar spec helper\n"
},
{
"from": "human",
"value": "# TODO: Redefine the concerns here so we don't have to require a rabbit hole. There should be a better way. This may be affected by test order. We'll come back... | ruby | chosen |
[
{
"from": "human",
"value": "Create at least one tenant to use during specs\n"
},
{
"from": "gpt",
"value": "RSpec.configure do |config|\n # No need to create each tenant, just pick one for testing purposes\n\n config.before(:suite) do\n Apartment::Tenant.create(\"earth\")\n end\n\n confi... | ruby | chosen |
[
{
"from": "system",
"value": "Add healthcheck stanzas to generator file\n"
},
{
"from": "human",
"value": "require 'json'\nrequire 'erb'\n\nclass LoadBalancerConfig\n\n def initialize(json_config, template)\n @config = JSON.parse(json_config)\n @template = template\n end\n\n def lb_id\n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow activesupport v3.2 and v4.0\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'opml/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Validate type in properties if attribute exists\n"
},
{
"from": "human",
"value": "require 'jschematic/attributes'\n\nmodule Jschematic\n class Schema\n attr_reader :schema\n\n def initialize(schema)\n @schema = schema\n end\n\n def validate(instan... | ruby | chosen |
[
{
"from": "system",
"value": "Update markdown renderer to support new layout\n"
},
{
"from": "human",
"value": "require 'colorize'\n\nmodule HHVM\n module UserDocumentation\n class IncludeExamplesFilter < HTML::Pipeline::Filter\n def call\n base = File.dirname(context[:file])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the uri attribute from Namespace.\n\nOga won't be handling URIs any time soon. The rationale is that they server zero\npurpose when it comes to just parsing XML. Another goal of Oga is to make it\neasy to modify and reserialize documents back to XML. If namespaces would ... | ruby | chosen |
[
{
"from": "system",
"value": "Use image attributes from parsed JSON response\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule Scnnr\n class Recognition\n attr_reader :id, :objects, :state, :error\n\n def initialize(attrs = {})\n @id = attrs['id']\n @obj... | ruby | chosen |
[
{
"from": "system",
"value": "Add static module function for mapping resources to their Billing Policy class"
},
{
"from": "human",
"value": "require 'active_record'\nrequire 'logger'\n\n# Load all ruby files from 'cloud_cost_tracker' directory\nDir[File.join(File.dirname(__FILE__), \"cloud_cost... | ruby | chosen |
[
{
"from": "system",
"value": "Use can_be_empty & executed_loc_keys for If\n"
},
{
"from": "human",
"value": "require_relative 'branch'\n\nmodule DeepCover\n class Node\n class Else < Node\n include Wrapper\n has_child body: [Node, nil],\n is_statement: true\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the ask to open in browser dialog on Mac.\n\nWhy:\n\n* GitReflow::Sandbox#ask_to_open_in_browser method currently only works\n for linux.\n\nThis change addresses the need by:\n\n* Add OS.mac? to the initial if statement guarding other platforms.\n"
},
{
"from": "h... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure Conversations always have metadata and participants methods\n"
},
{
"from": "human",
"value": "module Layer\n class Conversation < Resource\n include Operations::Find\n include Operations::Paginate\n include Operations::Create\n include Operat... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Sonos.app to latest version.\n"
},
{
"from": "human",
"value": "class Sonos < Cask\n version '5.1'\n sha256 '8a54102eb13879bd361624fa013279aecd27888b9575e19d60985dd029635d8a'\n\n url 'http://update.sonos.com/software/mac/mdcr/SonosDesktopController51.dmg'... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Rails/ReflectionClassName on the class name in Viewable\n"
},
{
"from": "human",
"value": "module Viewable\n extend ActiveSupport::Concern\n\n included do\n has_many :views, class_name: self.name + 'View', dependent: :destroy\n\n def mark_read(user, ... | ruby | chosen |
[
{
"from": "system",
"value": "Change Segment events to use past tense\n"
},
{
"from": "human",
"value": "class Analytics\n class_attribute :backend\n self.backend = AnalyticsRuby\n\n def initialize(user)\n @user = user\n end\n\n def track_user_creation\n identify\n track(event: 'Cr... | ruby | chosen |
[
{
"from": "system",
"value": "Use update_column to skip callbacks\nIt avoids a redundant call\n"
},
{
"from": "human",
"value": "class Consultant < ActiveRecord::Base\n has_many :requests\n has_many :products\n has_many :customers\n has_many :sales\n\n validates :name, presence: true\n\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Increase history depth fro the analytics data\n"
},
{
"from": "human",
"value": "# == Schema Information\n#\n# Table name: data_points\n#\n# id :integer not null, primary key\n# series_id :integer\n# details :json not null\n# cre... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue where infractions sometimes didn't have a severity\n\nAnd TODO for later: Figure out why there are a few like this. For now, just rejecting them.\n"
},
{
"from": "human",
"value": "class Inspection < ActiveRecord::Base\n # Default sort for inspections: \"... | ruby | chosen |
[
{
"from": "system",
"value": "Remove hook so migrations with run\n"
},
{
"from": "human",
"value": "class Itemizable < ActiveRecord::Base\n\n belongs_to :purchase\n belongs_to :item\n belongs_to :coach\n belongs_to :swap\n\n has_one :user, through: :purchase\n\n after_save :send_swap_messa... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation of Article methods in public interface\n"
},
{
"from": "human",
"value": "# News Articles\n#\n# == Attributes\n#\n# name:: headline\n# id:: unique numerical id (starting at 1)\n# rss_log_id:: unique numerica... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure to only pull the comments we want\n"
},
{
"from": "human",
"value": "class Article < HyperactiveResource\n\n self.prefix = \"/accounts/:account_id/\"\n\n belongs_to :account, :nested => true\n\n has_many :sections\n has_many :mediafiles\n has_many :au... | ruby | chosen |
[
{
"from": "system",
"value": "Add initial method declarations for RequestList\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass RequestList\n def initialize\n @up_requests = 0b0000000000\n @down_requests = 0b0000000000\n end\nend\n\nclass Car\n attr_reader :current_level, :d... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for Todos target's state\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe 'Todos > Target State Labels' do\n let(:user) { create(:user) }\n let(:author) { create(:user) }\n let(:project) { create(:project) }\n le... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the lists of lookup values...\n"
},
{
"from": "human",
"value": "class AddLookupValues < ActiveRecord::Migration\n VALUES = {\n IncomeType => %w{\n Employment\n SSI/SSDI\n EDD\n None\n Permanently Disabled\n Temporarily Disabled... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for pending payments service\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe PendingPayments do\n let(:order1) {\n create(:order_with_totals_and_distribution,\n completed_at: 1.day.ago, state: \"complete\",\n paymen... | ruby | chosen |
[
{
"from": "system",
"value": "Check if table exists before try to use it in the Rails initializers\n\nConflicts:\n\tconfig/initializers/person_notification.rb\n"
},
{
"from": "human",
"value": "job = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', \"%ActivitiesCounterCa... | ruby | chosen |
[
{
"from": "system",
"value": "Change in checking whether a number is even -> a % 2 == 0 to a.even?\n"
},
{
"from": "human",
"value": "a = 1\nb = 2\nsum = 0\n\nwhile b <= 4_000_000\n c = a + b\n a = b\n b = c\n sum += a if a % 2 == 0\nend\n\np sum\n"
},
{
"from": "gpt",
"value": ... | ruby | chosen |
[
{
"from": "human",
"value": "Add git and all its dependencies and a few others like ant\n"
},
{
"from": "gpt",
"value": "default[:jenkins][:server][:plugins] = %w(\n ant\n nant\n mailer\n javadoc\n token-macro\n maven-plugin\n run-condition\n conditional-buildstep\n matrix-project\n re... | ruby | chosen |
[
{
"from": "system",
"value": "Move readonly load to katla\n"
},
{
"from": "human",
"value": "name \"web\"\ndescription \"Role applied to all web/api servers\"\n\ndefault_attributes(\n :accounts => {\n :users => {\n :rails => {\n :status => :role,\n :members => [ :tomh, :gr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix core dump (overlay close app)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'gtk3'\n\nDir[File.dirname(__FILE__) + '/vue/*.rb'].each {|file| require file }\nrequire_relative './class/generator_class.rb'\n\n\nwindow= Gtk::Window.new\nwindow.s... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to add tvOS support\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'RxAlamofire'\n s.version = '1.1.1'\n s.license = 'MIT'\n s.summary = 'RxSwift wrapper around the elegant HTTP networking in Swift Alamofire'\n s.homepage = 'h... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to allow ROM 4.0.x"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rom/mongo/version'\n\nGem::Specification.new do |spec|\n spec.name = \"rom-mong... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for out of date docs.\n"
},
{
"from": "human",
"value": "class ChainCli < Formula\n desc \"Command line tools for interacting with chain\"\n homepage \"https://github.com/jacob-meacham/chain-cli\"\n url \"git@github.com:jacob-meacham/chain-cli.git\", :using =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix incorrect homepage in gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ruby_enum/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "[frontend] Use flash.now for coupon application error in OrdersController\n\nOtherwise this will carry over to the next request, which is not fun.\n\nFixes #4034\n"
},
{
"from": "human",
"value": "module Spree\n class StoreController < Spree::BaseController\n in... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"TEMP: Inline redundancy_pay shared logic\"\n\nThis is no longer required now that I've used the coverage data to generate a\nset of responses that allow me to add regression tests.\n"
},
{
"from": "human",
"value": "module SmartAnswer\n class CalculateYour... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.1.5 to 0.2.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'serialize'\n s.version = '0.1.5'\n s.summary = 'Common interface for serialization and deserialization, and se... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic summary and description to gemspec"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'peat/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Test rendering of new organization form\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe OrganizationsController do\n describe 'POST create' do\n it 'creates an organization with omniauth credentials' do\n OmniAuth.config.mock_auth[:stri... | ruby | chosen |
[
{
"from": "human",
"value": "FEATURE: Add new benchmark for Active Record.\n\n* Creating a record with many string columns.\n"
},
{
"from": "gpt",
"value": "require 'bundler/setup'\nrequire 'active_record'\nrequire_relative 'support/benchmark_rails'\n\nActiveRecord::Base.establish_connection(ENV... | ruby | chosen |
[
{
"from": "system",
"value": "Fix LXC install on Ubuntu 12\n"
},
{
"from": "human",
"value": "# Ubuntu 12, not Ubuntu 14\nif node['platform'] == 'ubuntu' && node['platform_version'].to_i == 12\n package 'python-software-properties' do\n action :nothing\n end.run_action(:install)\nend\n\nexe... | ruby | chosen |
[
{
"from": "system",
"value": "Update User Fabricator to include new table columns: First name and Last name\n"
},
{
"from": "human",
"value": "Fabricator(:user) do\n first_name{ sequence(:first_name) { |i| \"user_first_name{i}\" } }\n last_name { sequence(:last_name) { |i| \"user_last_name{i}\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue when Sidekiq is not running\n"
},
{
"from": "human",
"value": "require \"active_support/core_ext/module/delegation\"\nrequire \"active_support/concern\"\n\nmodule MiqToolsServices\n module SidekiqWorkerMixin\n extend ActiveSupport::Concern\n\n inclu... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod spec to 0.1.13\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'SSPPullToRefresh'\n s.version = '0.1.12'\n s.summary = 'General classes for \"Pull-To-Refresh\" concept customisation'\n\n s.description ... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation, stub methods to CompanyFetcherBot template\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'company_fetcher_bot'\n\n# you may need to require other libraries here\n#\n# require 'nokogiri'\n# require 'openc_bot/helpers/dates'\n# requi... | ruby | chosen |
[
{
"from": "human",
"value": "Allow network port to have multiple fixed ips\n\nAllow network port to have multiple fixed ips, by extending\nunique index to contain address.\n"
},
{
"from": "gpt",
"value": "class ChangeCloudSubnetsNetworkPortsUniqueIndex < ActiveRecord::Migration[5.0]\n def chang... | ruby | chosen |
[
{
"from": "human",
"value": "Create initializer file to permit first and last name\n"
},
{
"from": "gpt",
"value": "module DevisePermittedParameters\n extend ActiveSupport::Concern\n\n included do\n before_filter :configure_permitted_parameters\n end\n\n protected\n\n def configure_permi... | ruby | chosen |
[
{
"from": "system",
"value": "Remove UIApplication.shared since it does not compile for app extensions\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Cosmos\"\n s.version = \"8.0.1\"\n s.license = { :type => \"MIT\" }\n s.homepage = \"https://github.co... | ruby | chosen |
[
{
"from": "system",
"value": "Set RAILS_ASSET_ID to expire the assets\n"
},
{
"from": "human",
"value": "# Load the rails application\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the rails application\nAcubens::Application.initialize!\n"
},
{
"from": "gpt",
"... | ruby | chosen |
[
{
"from": "human",
"value": "Add the gemspec file, still need to publish it after further testing\n"
},
{
"from": "gpt",
"value": "$LOAD_PATH.unshift File.expand_path(\"../lib\", __FILE__)\nrequire \"rets/version\"\n\nGem::Specification.new do |s|\n s.name = \"rets\"\n s.version = R... | ruby | chosen |
[
{
"from": "system",
"value": "Add initial break for any release notes based on git log"
},
{
"from": "human",
"value": "namespace :show do\n task :me do\n set :task_name, task_call_frames.first.task.fully_qualified_name\n end\nend\n\nnamespace :deploy do\n desc \"Send email notification of... | ruby | chosen |
[
{
"from": "system",
"value": "Use new Metric class to generate metric names\n"
},
{
"from": "human",
"value": "require \"librato-rack\"\n\nmodule Robin\n module Sidekiq\n ##\n # Sidekiq server middleware for measuring Sidekiq stats\n class QueueStats\n attr_reader :namespace\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix check_box and radio_button helper methods\n\nThese methods have difference signature.\n"
},
{
"from": "human",
"value": "require_relative \"./vue_options_resolver\"\n\nmodule VueFormFor\n class FormBuilder < ActionView::Helpers::FormBuilder\n include VueForm... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wpcli local and remote urls\n"
},
{
"from": "human",
"value": "set :stage, :production\n\n# Simple Role Syntax\n# ==================\n#role :app, %w{deploy@example.com}\n#role :web, %w{deploy@example.com}\n#role :db, %w{deploy@example.com}\n\n# Extended Server ... | ruby | chosen |
[
{
"from": "system",
"value": "Update render for create success\n"
},
{
"from": "human",
"value": "class Devise::RegistrationCustomController < DeviseTokenAuth::RegistrationsController\n\tdef create\n\t\tsuper\n\tend\n\n\tdef destroy\n\t\tsuper\n\tend\n\n\tdef update\n\t\tsuper\n\tend\n\n\tdef si... | ruby | chosen |
[
{
"from": "system",
"value": "Update controller helper path of Products\n"
},
{
"from": "human",
"value": "module Refinery\n module Products\n class ProductsController < ShopController\n include ControllerHelper\n\n before_filter :find_page\n before_filter :find_all_products\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update the podspec to weakly link XCTest\n\nWhen strongly linking XCTest, Cocoapods automatically adds a\nframework search path to allow the framework to be found. When\nweakly linking, it must be manually specified.\n"
},
{
"from": "human",
"value": "Pod::Spec.new ... | ruby | chosen |
[
{
"from": "system",
"value": "Change ranges to page-ranges in spec\n"
},
{
"from": "human",
"value": "describe Print do\n it 'should print commandline options' do\n print = FactoryGirl.build(:print)\n print_str = print.to_s\n expect(print_str).to include(\" -P 'HUBBEN' \")\n expect(... | ruby | chosen |
[
{
"from": "system",
"value": "Use transport_mode fixtures - wonder if we should be seeding the test db?\n"
},
{
"from": "human",
"value": "# == Schema Information\n# Schema version: 20100420102749\n#\n# Table name: routes\n#\n# id :integer not null, primary key\n# transp... | ruby | chosen |
[
{
"from": "system",
"value": "Correct some irregularities in testing suite\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Video do\n before(:each) do\n @video = Video.new(url: \"https://www.youtube.com/watch?v=-lJz8xdZQu4\")\n end\n\n let(:video) { Video.new }\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Define step for page not having certain text\n"
},
{
"from": "human",
"value": "Given(/^I am not logged in$/) do \n ensure_logged_out\nend\n\nGiven(/^I am logged in$/) do \n #\nend\n\nWhen(/^I visit the web site$/) do \n visit '/'\nend\n\nThen(/^I should see the ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded parentheses (Ruby style :D)\n"
},
{
"from": "human",
"value": "require 'find'\nrequire 'fileutils'\n\ndef convert_image(original, out, image_opts)\n\tnew_name = original.sub '_raw_img', out\n\tnew_dir = File.dirname(new_name)\n\tunless File.directory... | ruby | chosen |
[
{
"from": "system",
"value": "Set tags in the new way\n"
},
{
"from": "human",
"value": "class TwitterChannel < Channel\n def service_id_name\n 'Handle'\n end\n\n def client\n @client ||= Twitter::REST::Client.new do |config|\n config.consumer_key = ENV['TWITTER_CONSUMER_KEY... | ruby | chosen |
[
{
"from": "system",
"value": "Improve if statement readability on contribution observer\n"
},
{
"from": "human",
"value": "class ContributionObserver < ActiveRecord::Observer\n observe :contribution\n\n def after_create(contribution)\n contribution.define_key\n generate_matches(contribut... | ruby | chosen |
[
{
"from": "system",
"value": "Update of source repository location\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'KWTextStyleLabel'\n s.version = '0.1.0'\n s.summary = 'Subclass of UILabel to modify character spacing and line spacing to your ... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage and update dependecies to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'coin_market_cap/version'\n\nGem::Specification.new do |sp... | ruby | chosen |
[
{
"from": "system",
"value": "Deal with scraper deleted after ScraperAutoRunWorker job created\n"
},
{
"from": "human",
"value": "class ScraperAutoRunWorker\n include Sidekiq::Worker\n sidekiq_options backtrace: true\n\n def perform(scraper_id)\n scraper = Scraper.find(scraper_id)\n # G... | ruby | chosen |
[
{
"from": "system",
"value": "Use require_relative for Ruby 1.9 (no more 1.8!)"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\n#########################################################################\n#\n# Copyright 2011 Anders Nøklestad (noklesta; anders.noklestad@iln.uio.no)\n# Licens... | ruby | chosen |
[
{
"from": "system",
"value": "Change up the order of recipes\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), 'core_extensions.rb')\n\ninitialize_templater\n\nrequired_recipes = %w(default jquery mongoid haml rspec factory_girl remarkable)\nrequired_recipes.each {|req... | ruby | chosen |
[
{
"from": "system",
"value": "Fix format of Raven capture for JWT debugging\n"
},
{
"from": "human",
"value": "require \"#{Rails.root}/lib/importers/user_importer\"\n\n#= Controller for OmniAuth authentication callbacks\nclass OmniauthCallbacksController < Devise::OmniauthCallbacksController\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded event stream name because of user channel addition"
},
{
"from": "human",
"value": "class PaperEventStreamSerializer < ActiveModel::Serializer\n attributes :id, :short_title, :title, :body, :submitted, :paper_type, :status, :updated_at, :event_name\... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify ignored parameter in Hyrax::IIIFAuthorizationService\n\nThanks, @jeremyf!"
},
{
"from": "human",
"value": "module Hyrax\n class IIIFAuthorizationService\n attr_reader :controller\n def initialize(controller)\n @controller = controller\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Replace pluck with select in activerecord/scope_all\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'active_record'\nrequire_relative 'support/benchmark_rails'\n\ndb_setup script: \"bm_scope_all_setup.rb\"\n\nActiveRecord::Base.establish_connecti... | ruby | chosen |
[
{
"from": "system",
"value": "Remove default due time from TODOs\n"
},
{
"from": "human",
"value": "class ToDo < ActiveRecord::Base\n include MyplaceonlineActiveRecordIdentityConcern\n\n validates :short_description, presence: true\n \n def display\n short_description\n end\n \n def se... | ruby | chosen |
[
{
"from": "system",
"value": "Allow user to be specified when fetching expenses\n"
},
{
"from": "human",
"value": "require \"concur_connect/expense_report_finder\"\nrequire \"concur_connect/itinerary_finder\"\nrequire 'concur_connect/user_finder'\nrequire 'delegate'\nrequire 'faraday/request/oau... | ruby | chosen |
[
{
"from": "system",
"value": "Fix variable names in Commit command\n"
},
{
"from": "human",
"value": "java_import org.geogit.api.ObjectId\njava_import org.geogit.api.RevCommit\njava_import org.geogit.api.porcelain.CommitOp\njava_import org.geogit.api.porcelain.DiffOp\n\nmodule GeoGit\n module C... | ruby | chosen |
[
{
"from": "system",
"value": "Change to expose as method call.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Github\n class API\n\n # Returns all API public methods for a given class.\n def self.inherited(klass)\n klass.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1... | ruby | chosen |
[
{
"from": "system",
"value": "Use a constant to get the datapoint containers\n\nNo need to recompute it all the time\n"
},
{
"from": "human",
"value": "module LLT\n class Diff::Parser\n class Postag\n def initialize(postag)\n @postag = postag\n end\n\n def to_s\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug that prevented import of KMZs with folders\n\nWhen unzipping, we are tasked with creating folders for all zipfile entries. If there is a subfoldered entry, we need to also create that folder too.\n"
},
{
"from": "human",
"value": "module SpatialFeatures\n m... | ruby | chosen |
[
{
"from": "system",
"value": "Make the unicode text work regardless of smart_text option.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nif ''.respond_to?(:encoding)\n require 'helper'\n\n class TestSlimUnicode < TestSlim\n def test_unicode_tags\n source = \"Статья года\"\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.