conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add missing dependencies on Ruby 1.9 and Haml.\n"
},
{
"from": "human",
"value": "require './lib/formulate/version'\n\nGem::Specification.new do |gem|\n gem.name = 'formulate'\n gem.version = Formulate::VERSION\n gem.summary = 'Rails form builder with flexible ma... | ruby | chosen |
[
{
"from": "system",
"value": "Revert change of email address in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"has_scope/version\"\n\nGem::Specification.new do |s|\n s.name = \"has_scope\"\n s.version =... | ruby | chosen |
[
{
"from": "system",
"value": "Modify test to provide params in proper format\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DownloadControllerTest < ActionController::TestCase\n\n # RubyZip has a seemingly convenient Zip::ZipFile.open_buffer method - too bad it's totally bork... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up from Mike's suggestions\n"
},
{
"from": "human",
"value": "class MimeVersion\n def initialize(app)\n @app = app\n end\n\n def self.parse_version(content_type)\n tag = \"version=\"\n @version = @default_version\n @hash = Hash[content_type.spli... | ruby | chosen |
[
{
"from": "system",
"value": "Change the gem dependencies to simple >="
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"net-ptth\"\n s.version = \"0.0.15\"\n s.summary = \"Net::HTTP compatible reverse HTTP version\"\n s.description = \"PTTH Ruby ... | ruby | chosen |
[
{
"from": "system",
"value": "Access the resource class through Omise\n"
},
{
"from": "human",
"value": "require \"omise/attributes\"\nrequire \"omise/resource\"\n\nmodule Omise\n class OmiseObject\n include Attributes\n\n class << self\n attr_accessor :endpoint\n\n def location... | ruby | chosen |
[
{
"from": "system",
"value": "Add zip cookbook lwrp dependency\n\nThis commit adds the zip lwrp cookbook dependency to the wel-osx-apps\nmetadata file.\n"
},
{
"from": "human",
"value": "name 'wel-osx-apps'\nmaintainer 'Wide Eye Labs'\nmaintainer_email 'chris@wideeyelabs.com'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add ActiveRecord and ActiveSupport to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/whiny_validation/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Brian Morearty\"]\n gem.em... | ruby | chosen |
[
{
"from": "system",
"value": "Check for a service name referenced but not loaded from services.yml, and raise a meaningful exception.\n\n"
},
{
"from": "human",
"value": "class ServiceList\n private_class_method :new\n @@services = nil\n \n def self.get(name)\n @@services = YAML.load_file... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong ancestry for cloned fragments\n"
},
{
"from": "human",
"value": "namespace :data do\n desc 'Populate the DB with data'\n task populate: :environment do\n 100.times do |n|\n story = Story.new\n story.title = \"Story #{n}\"\n story.creato... | ruby | chosen |
[
{
"from": "system",
"value": "Remove RSpec require from rake file\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"rspec/core/rake_task\"\n\n#\n# These tasks run the turnip (migrated from cucumber) features.\n#\nnamespace :spec do\n namespace :acceptance do\n pat... | ruby | chosen |
[
{
"from": "system",
"value": "Set currently active channels on restart\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Plugins\n class CheckDCTV\n\n include Cinch::Plugin\n\n listen_to :check_dctv\n\n def initialize(*args)\n super\n end\n\n def listen(m)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove a redundant code, simple refactor."
},
{
"from": "human",
"value": "$: << \"../lib\"\nrequire 'tick_tacker'\n\nclass Cowntdown\n def timer\n @timer = TickTacker::Timer.new.with :total_time => 5.seconds\n @timer.add_observer self\n end\n\n def update(... | ruby | chosen |
[
{
"from": "system",
"value": "Add rack-test as a development dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'potatochop/version'\n\nGem::Specification.new do |ge... | ruby | chosen |
[
{
"from": "system",
"value": "Hide inactive user from top member list\n"
},
{
"from": "human",
"value": "class TopController < ApplicationController\n skip_before_action :authenticate_user!\n def index\n if user_signed_in?\n redirect_to users_path\n end\n @users = @q.result.page ... | ruby | chosen |
[
{
"from": "system",
"value": "Make the validation key configurable\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n include NavigationHelper\n\n def book_an_appointment_link?\n true\n end\n\n def link_to_guide(guide)\n capture do\n if guide.option?\n concat con... | ruby | chosen |
[
{
"from": "system",
"value": "Add .search method to ServiceStatusType, analogous to other lookup tables\n"
},
{
"from": "human",
"value": "class ServiceStatusType < ActiveRecord::Base\n \n # default scope\n default_scope { where(:active => true) }\n\n def to_s\n name\n end\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Create FormObject for plan nodes in admin\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nmodule GobiertoAdmin\n module GobiertoPlans\n class NodeForm < BaseForm\n\n attr_accessor(\n :id,\n :plan_id,\n :category_id,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow options passed to add_target!\n"
},
{
"from": "human",
"value": "class ManageIQ::Providers::Inventory::Collector\n attr_reader :manager, :target\n\n include Vmdb::Logging\n\n # @param manager [ManageIQ::Providers::BaseManager] A manager object\n # @param r... | ruby | chosen |
[
{
"from": "system",
"value": "Update dependency library minimum versions\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) + '/lib/'\nrequire 'sfn/version'\nGem::Specification.new do |s|\n s.name = 'sfn'\n s.version = Sfn::VERSION.version\n s.summa... | ruby | chosen |
[
{
"from": "system",
"value": "Add debugger gem to development environment"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'foot_stats/version'\n\nGem::Specification.new do |ge... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gemspec path to README.rb\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"formalwear/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning for time\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains migration options to ease your Rails 5.0 upgrade.\n#\n# Read the Rails 5.0 release notes for more info on each... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up the gemspec a bit."
},
{
"from": "human",
"value": "require './lib/pry-vterm_aliases'\n# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |spec|\n spec.name = \"pry-vterm_aliases\"\n spec.version = Pry::Plugins::VTerm.version\n spec.email = [\"jordon... | ruby | chosen |
[
{
"from": "system",
"value": "Update assets in pod file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"FeedMediaSamplePlayer\"\n s.version = \"1.0.0\"\n s.summary = \"Feed Media Sample Player\"\n s.description = <<-DESC\n Feed Media... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec for Lita 3.0 compatibility.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"lita-stocks\"\n spec.version = \"0.0.6.2\"\n spec.authors = [\"Mitch Dempsey\"]\n spec.email = [\"mrdempse... | ruby | chosen |
[
{
"from": "system",
"value": "Improve the summary a bit"
},
{
"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 = \"fluent-plugin-logsene\"\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Update order of called recipes\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: cookbook-ngxmgdbpy\n# Recipe:: default\n#\n# Author:: Juan Manuel Lopez\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": "Remove newline in list of pkgs to install\n"
},
{
"from": "human",
"value": "\nuser = node[:settings][:user]\n\nexecute \"apt-get-update\" do\n command \"apt-get update\"\nend\n\n%w{ant ant-contrib autoconf autopoint bison cmake expect libtool libsaxonb-java libssl... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'respect' as gem dependency.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"respect/rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s... | ruby | chosen |
[
{
"from": "system",
"value": "Load 'pixels-array' instead of requiring 'pixels.rb'\n"
},
{
"from": "human",
"value": "#! /usr/local/bin/ruby -w\nrequire 'RMagick'\n\nrequire 'pixels.rb'\n\nputs 'This may take a few seconds...'\nimage = Magick::Image.constitute(Width, Height, \"RGB\", Pixels)\n#i... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add missing km dependency\" -- There is no actual KM dependency\n\nThis reverts commit 95ca46017be6e7456ec265e2b94e10abad02ce45.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/km/resque/version', __FILE__)\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change to limit Ruby to >= 2.0.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 'necromancer/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to save multiple addresses on new org to manipulator and change not empty to present\n"
},
{
"from": "human",
"value": "module Users\n module OrganizationManipulator\n extend ActiveSupport::Concern\n\n def can_create_organization?\n super_adm... | ruby | chosen |
[
{
"from": "system",
"value": "Test that credit cards are cleared too.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe FakeBraintree::Registry do\n it { should have_hash_accessor_for(:customers) }\n it { should have_hash_accessor_for(:subscriptions) }\n it { should have_ha... | ruby | chosen |
[
{
"from": "system",
"value": "Add psuedocode to ruby review 1\n"
},
{
"from": "human",
"value": "# Reverse Words\n\n\n# I worked on this challenge [by myself, with: ].\n# This challenge took me [#] hours.\n\n# Pseudocode\n\n\n\n# Initial Solution\ndef reverse_word(words)\n\twords.split(\" \").ea... | ruby | chosen |
[
{
"from": "system",
"value": "Set recent ReportView in setup script\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nlayout = ARGV[0]\nuser = User.find_by(username: \"Kappa\")\n\nunless layout.nil?\n if layout == 'default'\n user.update!(layout: nil)\n else\n user.update!(layout... | ruby | chosen |
[
{
"from": "system",
"value": "Make change to rspec version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"dodecaphony\"\n s.version = \"0.1.0\"\n s.platform = Gem::Platform::RUBY\n s.date = \"2014-06-19\"\n s.summary = \"Tone Row Calcu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the help output, remove the exit() call\n"
},
{
"from": "human",
"value": "require 'optparse'\n\nmodule Papers\n\n class CLI\n\n def run\n if options[:generate]\n begin\n Papers::ManifestGenerator.new.generate!\n rescue Papers::Fi... | ruby | chosen |
[
{
"from": "system",
"value": "Update parameters and reset into template prior to return\n"
},
{
"from": "human",
"value": "require 'knife-cloudformation'\n\nmodule KnifeCloudformation\n module Utils\n # Helper for scrubbing stack parameters\n class StackParameterScrubber\n\n class <<... | ruby | chosen |
[
{
"from": "system",
"value": "Append .o to all object file names.\n"
},
{
"from": "human",
"value": "require 'udis86/ud'\n\nmodule Helpers\n FILES_DIR = File.expand_path(File.join(File.dirname(__FILE__),'files'))\n\n def ud_file(name)\n UD.open(File.join(FILES_DIR,name.to_s))\n end\nend\n"... | ruby | chosen |
[
{
"from": "system",
"value": "Add start_offset as an attribute to EffortSerializer.\n"
},
{
"from": "human",
"value": "class EffortSerializer < BaseSerializer\n attributes :id, :event_id, :participant_id, :bib_number, :first_name, :last_name, :full_name, :gender,\n :birthdate, :age,... | ruby | chosen |
[
{
"from": "system",
"value": "Update activerecord dependency to version 3.1.0\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |gem|\n gem.add_dependency 'activerecord', '~> 3.0.10'\n gem.add_development_dependency 'minitest', '~> 2.5'\n gem.add_development_de... | ruby | chosen |
[
{
"from": "system",
"value": "Stop keeping the migration in the enging because\n\nIt's a terrible idea for gemified engines\n"
},
{
"from": "human",
"value": "module ContentManager\n class Engine < ::Rails::Engine\n isolate_namespace ContentManager\n require 'jquery-rails'\n\n # 'leave... | ruby | chosen |
[
{
"from": "system",
"value": "Support -v and --version option\n"
},
{
"from": "human",
"value": "require \"optparse\"\nrequire \"dockerfiroonga/platform\"\n\nmodule Dockerfiroonga\n class Command\n USAGE = <<-END_OF_USAGE\nUsage: dockerfiroonga PLATFORM [Xroonga]\n PLATFORM:\n * debian:s... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing development dependency to run unit tests\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"acts_as_opengraph/version\"\n\nGem::Specification.new do |s|\n s.name = \"acts_as_ope... | ruby | chosen |
[
{
"from": "system",
"value": "Add quotes for SQL updates\n"
},
{
"from": "human",
"value": "class Database\n\n\tclass << self\n\t\tdef connect\n\t\t\tclient = TinyTds::Client.new(\n\t\t\t\t:host => CFG[\"server\"][\"host\"], \n\t\t\t\t:port => CFG[\"server\"][\"port\"], \n\t\t\t\t:username => CF... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for the main interface.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire 'spec_helper'\n\ndescribe Tytus do\n pending\nend\n"
},
{
"from": "gpt",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\ndescribe Tytus do\n\n let(:... | ruby | chosen |
[
{
"from": "system",
"value": "Set default FB_REFERENCE_IMAGE_DIR from podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"FBSnapshotTestCase\"\n s.version = \"1.8.1\"\n s.summary = \"Snapshot view unit tests for iOS\"\n s.description = <<-DESC\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add bang methods that raise exceptions when API configs are not found\n"
},
{
"from": "human",
"value": "require 'ostruct'\nrequire 'yaml'\n\nmodule APIConfig\n\n VERSION = '0.0.2'\n FILE = 'config/api.yml'\n\n class << self\n def env\n ENV['RAILS_ENV'... | ruby | chosen |
[
{
"from": "system",
"value": "Use gemspec to version deb package\n"
},
{
"from": "human",
"value": "class ProxyMgr < FPM::Cookery::Recipe\n homepage 'http://github.com/campanja/proxymgr'\n name 'proxymgr'\n version '0.1'\n source 'none', :with => :noop\n\n revision '1'... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec tests for apt-mark\n\nThis commit adds additional spec tests for mark.pp.\n\nThe tests validate the new resource name requirements\nintroduced in the previous commit.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add trip association to FactoryGirl parcel\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :parcel do\n weight 4\n volume 3\n description \"pet cat\"\n pickup_by Date.parse('1995-03-03')\n deliver_by Date.parse('1995-04-04')\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor request to hide RestClient\n"
},
{
"from": "human",
"value": "require \"nokogiri\"\nrequire \"rest-client\"\n\nmodule Scrapey\n class LinkCollector\n\n def collect_links(target)\n link_evaluator = LinkEvaluator.new(target)\n\n uri = URI.parse(... | ruby | chosen |
[
{
"from": "system",
"value": "Update ice nine spec support files to only be used with ice_nine\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'ice_nine'\n\nmodule IceNine\n\n # Freezer namespace\n class Freezer\n\n # Rspec freezer\n class RSpec < NoFreeze; end\n\n end\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to populate custom categories\n"
},
{
"from": "gpt",
"value": "namespace :cms_categories do\n desc 'Seed database tables with custom categories for the CMS'\n task import: :environment do\n groups = I18n.t('search')[:custom_categories]\n\n group... | ruby | chosen |
[
{
"from": "human",
"value": "Add a secret:replace rake task to automatically replace rails' csrf token\n\nSee: https://gist.github.com/2057660\n"
},
{
"from": "gpt",
"value": "#\n# License: WTFPL (http://sam.zoy.org/wtfpl/)\n# \n\nnamespace :secret do\n desc 'Replace the secure secret key in yo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug when user mount lib without params\n"
},
{
"from": "human",
"value": "require 'roda'\n\nmodule WebBouncer\n class Middleware < Roda\n plugin :middleware do |middleware, config, &block|\n config[:model] ||= :account\n config[:login_redirect] ||=... | ruby | chosen |
[
{
"from": "system",
"value": "Change restart method to reload configuration\n"
},
{
"from": "human",
"value": "node[:deploy].each do |application, deploy|\n if deploy['sidekiq']\n sidekiq_config = deploy['sidekiq']\n release_path = ::File.join(deploy[:deploy_to], 'current')\n start_com... | ruby | chosen |
[
{
"from": "system",
"value": "Use placekitten instead of dropbox pugs :dog:\n"
},
{
"from": "human",
"value": "avatars = [\n \"https://dl.dropboxusercontent.com/u/108831317/pug1.png\",\n \"https://dl.dropboxusercontent.com/u/108831317/pug2.png\",\n \"https://dl.dropboxusercontent.com/u/108831... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for blank type checking in fail_on_type_mismatch\n"
},
{
"from": "human",
"value": "require 'active_support/concern'\nrequire 'caprese/errors'\n\n# Manages type determination and checking for a given controller\nmodule Caprese\n module Typing\n extend Acti... | ruby | chosen |
[
{
"from": "system",
"value": "Add a spec for gathering error messages\n"
},
{
"from": "human",
"value": "require 'dry/validation/contract'\n\nRSpec.describe Dry::Validation::Contract, '#call' do\n subject(:contract) do\n Class.new(Dry::Validation::Contract) do\n params do\n requi... | ruby | chosen |
[
{
"from": "system",
"value": "Return the first when calling first (this makes .first() unchainable)\n"
},
{
"from": "human",
"value": "module ContentfulModel\n module ChainableQueries\n def self.included(base)\n base.extend ClassMethods\n base.class_eval do\n attr_accessor :... | ruby | chosen |
[
{
"from": "system",
"value": "Change dependency on berkshelf-vagrant to vagrant-berkshelf"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |gem|\n gem.authors = [\"David Calavera\"]\n gem.email = [\"david.calavera@gmail.com\"]\n gem.descripti... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the install:migrations rake task\n\nWe're automatically appending our migrations to the host app, to allow\nfor easier iteration.\n"
},
{
"from": "human",
"value": "namespace :open_conference_ware do\n desc %{Setup application's database and seed data}\n ta... | ruby | chosen |
[
{
"from": "system",
"value": "Fix regex for MRI ruby\n\nIt's error message has a couple extra spaces\n"
},
{
"from": "human",
"value": "module JSONApiResponses\n extend ActiveSupport::Concern\n\n def created_resource_response(resource)\n json_api_render(:created,\n create... | ruby | chosen |
[
{
"from": "system",
"value": "Change back to actual path\n"
},
{
"from": "human",
"value": "class TrackingDetailsController < ApplicationController\n active_tab \"tracking_details\"\n\n def new\n @tracking_detail = TrackingDetail.new\n end\n\n def create\n @tracking_detail = TrackingDe... | ruby | chosen |
[
{
"from": "system",
"value": "Add token-authentication to JWT Firebase API\n\nInstead of calling POST `api/v1/jwt/firebase` as a logged-in user, we\ncan call GET and pass a valid, unexpired authentication token in the\nheader.\n"
},
{
"from": "human",
"value": "class API::V1::JwtController < API... | ruby | chosen |
[
{
"from": "system",
"value": "Use real method to find nearby issues.\n"
},
{
"from": "human",
"value": "class DashboardsController < ApplicationController\n def show\n @user = current_user\n @groups = @user.groups\n @relevant_issues = Issue.all(limit: 2)\n end\nend\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix list of events, duh\n"
},
{
"from": "human",
"value": "class EventsController < ApplicationController\n\n # order is important here, we need to be authenticated before we can check permission\n before_filter :authenticate_user!, except: [:show, :index]\n load... | ruby | chosen |
[
{
"from": "system",
"value": "Make Tabor best 5 of 6\n"
},
{
"from": "human",
"value": "module Competitions\n # Mount Tabor Overall Series results\n class TaborOverall < Overall\n def self.parent_event_name\n \"Mt. Tabor Series\"\n end\n\n def category_names\n [\n \"C... | ruby | chosen |
[
{
"from": "system",
"value": "Truncate the ID here too\n"
},
{
"from": "human",
"value": "class YNAB::TransactionCreator\n def initialize(id: nil, date: nil, amount: nil, payee_name: nil, description: true, flag: nil, cleared: true, budget_id: nil, account_id: nil)\n @id = id\n @date = da... | ruby | chosen |
[
{
"from": "system",
"value": "Put api v3 best durations back in a best hash\n"
},
{
"from": "human",
"value": "class Api::V3::Detail::RunSerializer < Api::V3::ApplicationSerializer\n belongs_to :user, serializer: Api::V3::UserSerializer\n belongs_to :game, serializer: Api::V3::GameSerializer\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add non-GSM - to mapping\n"
},
{
"from": "human",
"value": "module GsmHelper\n # Returns a new string in GSM 03.38 encoding\n def to_gsm0338(message)\n # Replace bad characters with GSM allowed ones\n map = \n { \n \"“\" => \"\\\"\",\n \"”\" => ... | ruby | chosen |
[
{
"from": "system",
"value": "Add example of SQL injection\n"
},
{
"from": "human",
"value": "class ProductsController < ApplicationController\n before_action :set_product, only: [:show, :edit, :update, :destroy]\n\n def index\n @products = Product.order(:name)\n end\n\n def show\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add a guard against undefined/renamed Score class\n"
},
{
"from": "human",
"value": "class AddKindToScores < ActiveRecord::Migration\n def self.up\n add_column :scores, :kind, :string\n execute(\"update scores set kind='votes'\") # Set to votes for dittforsla... | ruby | chosen |
[
{
"from": "system",
"value": "Add a dependency on Railties"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"highcharts/version\"\n\nGem::Specification.new do |s|\n s.name = \"highcharts-rails\"\n s.version = Highch... | ruby | chosen |
[
{
"from": "human",
"value": "Add homebrew recipe to submit to hombrew-core\n\nThis creates a working draft homebrew recipe.\nAfter merging the changed build process this recipe\ncan be adapted to use a tagged version within the offical\ngoad repository and submitted to the homebrew-core\nrepository.\n"
},... | ruby | chosen |
[
{
"from": "system",
"value": "ExtConf: Enable compiler `ms-extensions` + removed redundant x86_32bit section\n"
},
{
"from": "human",
"value": "require 'mkmf'\nrequire 'rbconfig'\n\ntarget_cpu = RbConfig::CONFIG['target_cpu']\n\nif 1.size == 4 and target_cpu =~ /i386|x86_32/ # x86 32bit optimi... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce size of the gem by only including the necessary files via gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\nrequire 'pronto/flay/version'\n\nGem::Specification.new do |s|\n s.name = ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable /user-flair.jpg for logged-out users. Sorry!"
},
{
"from": "human",
"value": "class Ability\n include CanCan::Ability\n\n def initialize(user)\n can [:read, :day, :tagged], Post\n can :read, User\n\n if user.present?\n can :manage, Post, domai... | ruby | chosen |
[
{
"from": "system",
"value": "Set rake tags globally so that they are also available in sub-scopes\n"
},
{
"from": "human",
"value": "desc \"Execute a sub-task in a rackstash log scope\"\ntask :with_rackstash, [:task] do |t, args|\n Rake::Task[:environment].invoke if Rake::Task[:environment]\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Create a private method start_downloaders in the Waker worker to separate that logic\n"
},
{
"from": "human",
"value": "class Waker\n include Sidekiq::Worker\n\n def perform\n now = Time.now\n\n LogItem.new('sidekiq', \"#{now} Started waker\").save\n\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Update pre-installed io.js to 1.1.0\n"
},
{
"from": "human",
"value": "default[:iojs][:default] = \"1.0.4\"\ndefault[:iojs][:versions] = [ node[:iojs][:default] ]\ndefault[:iojs][:default_modules] = [\n 'grunt-cli'\n]\n"
},
{
"from": "gpt",
"value": "d... | ruby | chosen |
[
{
"from": "system",
"value": "Return false after rescueing mail chimp error\n"
},
{
"from": "human",
"value": "class MailchimpSubscription\n attr_reader :email, :username, :signup_date\n private :email, :username, :signup_date\n\n def initialize(options)\n @email = options[:email]\n @us... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for adjust_country_name method\n\n"
},
{
"from": "human",
"value": "# frozen_string_literal: false\n\nrequire 'spec_helper'\n\n\nRSpec.describe Portal::Country, type: :model do\n\n # TODO: auto-generated\n describe '.csv_filemame' do\n it 'csv_filemame... | ruby | chosen |
[
{
"from": "system",
"value": "Add of dependencies to diffy and jrubyfx\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"jruby_visualizer/version\"\n\nfiles = `git ls-files -- lib/* spec/* sample/*`.split(\"\\n\")\n\nGem::Spec... | ruby | chosen |
[
{
"from": "system",
"value": "Fix stripe and money dependencies\n"
},
{
"from": "human",
"value": "require 'open-uri'\n\nrequire 'grape'\nrequire 'sinatra'\nrequire 'stripe'\nrequire 'rack-flash'\nrequire 'jwt'\nrequire 'mongo_mapper'\nrequire 'money'\nrequire 'oauth2'\n\nconfigure do\n MongoMa... | ruby | chosen |
[
{
"from": "system",
"value": "Add role check for toppings create route\n"
},
{
"from": "human",
"value": "module Api\n module V1\n class ToppingsController < ApplicationController\n\n def index\n @toppings = Topping.all\n render json: @toppings\n end\n\n def crea... | ruby | chosen |
[
{
"from": "system",
"value": "Fix podspec validation (Use osx instead of mac)\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"UAAppReviewManager\"\n s.version = \"0.1.1\"\n s.summary = \"UAAppReviewManager is AppIRater all grow... | ruby | chosen |
[
{
"from": "system",
"value": "Update personal fork (used to test the spec file w/ lint) to find location\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod spec lint UIImage-Categories.podspec' to ensure this is a\n# valid spec and remove all comments before submitting the spec.\n#\n# T... | ruby | chosen |
[
{
"from": "system",
"value": "Add Client class attribute tests\n"
},
{
"from": "human",
"value": "require 'cryptsy/api2'\r\n\r\ndescribe Cryptsy::API2 do\r\n let(:api2) { Class.new include API2 }\r\nend\r\n"
},
{
"from": "gpt",
"value": "require 'cryptsy/api2'\r\n\r\ndescribe Crypts... | ruby | chosen |
[
{
"from": "system",
"value": "Make `LoadInterlockAwareMonitor` work in Ruby 2.7\n\nCurrently `LoadInterlockAwareMonitorTest` does not pass with Ruby 2.7 [1].\nThis is due to the refactoring of the `monitor` done in Ruby 2.7 [2].\n\nWith this refactoring, the behavior of the method has changed from the\nexpe... | ruby | chosen |
[
{
"from": "system",
"value": "Change the Gem::Specification.homepage value to reflect repo name.\n"
},
{
"from": "human",
"value": "lib_directory = File.expand_path(File.join(File.dirname(__FILE__), \"lib\"))\n$LOAD_PATH.unshift(lib_directory) unless $LOAD_PATH.include?(lib_directory)\n\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Fix AWS-SDK has key value\n"
},
{
"from": "human",
"value": "require_relative \"rodeo_clown/version\"\nrequire \"aws-sdk\"\n\nmodule RodeoClown\n\n # \n # Set aws credentials as environment variables\n # Set aws credentials in the ~/.rodeo_clown.yml\n #\n # Jus... | ruby | chosen |
[
{
"from": "system",
"value": "Fix our override of Jekyll.LogAdapter.formatted_topic\n\nBreaks under Jekyll 3.7\n"
},
{
"from": "human",
"value": "# Monkey patch the LogAdapter to change alignment of log messages\n\nmodule Jekyll\n class LogAdapter\n def formatted_topic(topic)\n \"#{topi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow for versions of json > 1.8.0"
},
{
"from": "human",
"value": "libpath = File.join(File.dirname(__FILE__), 'lib')\n$LOAD_PATH.unshift(libpath) unless $LOAD_PATH.include?(libpath)\n\nGem::Specification.new do |s|\n s.name = \"logstream\"\n s.version = \"0.0.6\... | ruby | chosen |
[
{
"from": "system",
"value": "Update description and summary 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 'github/auth/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "system",
"value": "Correct license header for attributes\n"
},
{
"from": "human",
"value": "default[:omnibus_updater][:version] = nil\ndefault[:omnibus_updater][:force_latest] = false\ndefault[:omnibus_updater][:cache_dir] = '/opt'\ndefault[:omnibus_updater][:cache_omnibus_installer] ... | ruby | chosen |
[
{
"from": "system",
"value": "Add forgotten dev dependency. Needed for updater to work.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/angularjs-rails/version', __FILE__)\n\nGem::Specification.new do |s|\n\ts.name\t\t\t= 'angularjs-rails'\n\ts.vers... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.