conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove rules check. Live dangerously\n"
},
{
"from": "human",
"value": "module SlackMathbot\n module Commands\n class Calculate < SlackRubyBot::Commands::Base\n operator '='\n command 'calculate'\n\n def self.call(client, data, match)\n res... | ruby | chosen |
[
{
"from": "system",
"value": "Print config file when settings are not found\n"
},
{
"from": "human",
"value": "require 'ostruct'\nrequire 'yaml'\n\nmodule APIConfig\n\n VERSION = '0.1.0'\n FILE = 'config/api.yml'\n\n class Error < StandardError\n end\n\n class << self\n def env\n ... | ruby | chosen |
[
{
"from": "system",
"value": "[Brightbox] Remove dependency on .fog in test\n\nThis isolates the tests from the values in `Fog.credentials` which is\nbased on the contents of `~/.fog`\n\nUnderlying problem is that the code (and many others) rely on the Fog\nglobal making it too tightly coupled to the enviro... | ruby | chosen |
[
{
"from": "system",
"value": "Add additional measurement units to Uom to support equipment quantities\n"
},
{
"from": "human",
"value": "#\n# Simple lookup class for distance metrics. Maybe used to add different \n# measurement units as needed.\n#\n# This implementation wraps Unitwise but always... | ruby | chosen |
[
{
"from": "human",
"value": "Create new file for GPS 2.3.\n"
},
{
"from": "gpt",
"value": "# Your Names\n# 1)\n# 2)\n\n# We spent [#] hours on this challenge.\n\n# Bakery Serving Size portion calculator.\n\ndef serving_size_calc(item_to_make, num_of_ingredients)\n library = {\"cookie\" => 1, \"... | ruby | chosen |
[
{
"from": "system",
"value": "Support Fedora when it was \"Fedora Core\"\n\nThe version_number regex was causing an error because my /etc/redhat-release looks like this:\r\n\r\nFedora Core release 6 (Zod)\r\n\r\nThis fix allowed initialize to run just fine on my ridiculously old release."
},
{
"from... | ruby | chosen |
[
{
"from": "system",
"value": "Add the Rakefile into the gemspec files\n\nSo you can inspect it if you dig around your gem files directory. Should\nyou care, that is.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path('../lib', __FILE__)\n\nrequire 'yesno/version'\n\nGem::Specification.n... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec description and summary\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'nyny/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix info hash to not be destructive.\n"
},
{
"from": "human",
"value": "require 'omniauth-oauth2'\nrequire 'net/http'\nrequire 'json'\n\nmodule OmniAuth\n module Strategies\n class Pushbullet < OmniAuth::Strategies::OAuth2\n BASE_URL = 'https://www.pushbull... | ruby | chosen |
[
{
"from": "system",
"value": "Use nice alias to fetch font map\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire File.expand_path('../test_helper.rb', File.dirname(__FILE__))\n\ndescribe Pango::Font do\n before do\n ctx = Gdk.pango_context_get\n fontmap = ctx.get... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib/** to autoload paths so we can access oo files stored in lib\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :productio... | ruby | chosen |
[
{
"from": "system",
"value": "Set FFNerd api key on start up.\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.req... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to 'sendmail' (which is really the local Postfix server)\n"
},
{
"from": "human",
"value": "RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION\n\nrequire File.join(File.dirname(__FILE__), 'boot')\n\nRails::Initializer.run do |config|\n config.time... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dependendency on Chef 11\n\nNow that Chef 12 is out, we'd like to be able to use this gem with it.\n\nEverything seems to work fine, so we'll just remove the dependency on\nChef 11.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Podspec: Set swift branch for testing release\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Clappr\"\n s.version = \"0.1.0\"\n s.summary = \"An extensible media player for iOS\"\n s.homepage = \"http:/... | ruby | chosen |
[
{
"from": "system",
"value": "Add a boolean to prometheus if current code is an error code\n"
},
{
"from": "human",
"value": "require 'prometheus/middleware/collector'\nrequire 'prometheus/middleware/exporter'\n\nmodule Prometheus::Middleware\n class CollectorWithExclusions < Collector\n def... | ruby | chosen |
[
{
"from": "system",
"value": "build-bottle-pr: Add --browse to hub pull-request\n\nColour-code messages.\n"
},
{
"from": "human",
"value": "module Homebrew\n # Submit a pull request to build a bottle for a formula.\n # Usage:\n # brew build-bottle formula ...\n # Options:\n # --remote... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing spec to use maybe_execute_command\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ExecSequenceController do\n let(:bot) { FakeBot.new }\n let(:mesh) { FakeMesh.new }\n let(:example_hash) do\n {\n \"message_type\" => \"exec... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 1.9.2 hash for testing on older rubies\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n#\n# This file contains settings for ActionController::ParamsWrapper which\n# is enabled by default.\n\n# Enable parameter w... | ruby | chosen |
[
{
"from": "system",
"value": "Update relative paths in overlay presenter\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire_relative '../../simplecov_helper'\nrequire 'ostruct'\nrequire_relative '../../../app/controllers/carto/api/overlay_presenter'\n\nrequire 'json'\n\ndescribe Carto... | ruby | chosen |
[
{
"from": "system",
"value": "Install ffmpeg to process video\n\nSolves #1"
},
{
"from": "human",
"value": "package \"git\"\n\nstarterkit = \"/home/vagrant/starterkit\"\n\ngit starterkit do\n repository \"https://github.com/dvberkel/fly-with-me-starter-kit.git\"\n user \"vagrant\"\n group \"v... | ruby | chosen |
[
{
"from": "system",
"value": "Make plugin gems depend on released publify_core\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'publify_textfilter_code/version'\n\n# Describe your gem and declare its dependencies:... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rubocop error on test\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\nrequire \"app/services/environment_variable_service\"\n\ndescribe FastlaneCI::EnvironmentVariableService do\n\n describe \"#keys_file_path\" do\n before(:each) do\n allow(... | ruby | chosen |
[
{
"from": "system",
"value": "Remove web server code that shouldn't be part of this PR"
},
{
"from": "human",
"value": "# External\nrequire \"sinatra/base\"\n\nset :server, \"thin\"\n\nrequire_relative \"./fastfile-parser/fastfile_parser\"\n\n# Internal\nrequire_relative \"services/services\"\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Add options spec for definition list for.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Toolsmith::ViewHelpers::DefinitionListForHelpers do\n subject { AbstractActionView.new }\n let(:content_block) { ->(dl) { dl.define :attribute_name } }... | ruby | chosen |
[
{
"from": "system",
"value": "Add rubyforge project and homepage to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n \nrequire 'orchard/version'\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable CSRF for other tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'api should not require csrf protection', type: :request do\n before(:each) do\n ActionController::Base.allow_forgery_protection = true\n end\n \n it 'should ret... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak the speed of the specs\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe Rack::RequestTimeTracker do\n include Rack::Test::Methods\n\n before :each do\n class SubjectClass\n include Rack::RequestTimeTracker\n\n def initializ... | ruby | chosen |
[
{
"from": "system",
"value": "Add dependencies to gemspec file\n"
},
{
"from": "human",
"value": "gem_path = File.dirname(__FILE__)\n\nGem::Specification.new do |s|\n s.name = 'pandata'\n s.version = '0.1.0'\n s.date = '2013-01-27'\n s.summary = 'A Pando... | ruby | chosen |
[
{
"from": "system",
"value": "Move rake and racc into development dependencies\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/opal/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'opal'\n s.version = Opal::VERSION\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add method to define properties\n"
},
{
"from": "gpt",
"value": "module Ecolirb\n module Base\n def define_properties(type, *symbols)\n @properties |= {}\n symbols.each do |symbol|\n define_method(symbol) {|val|\n raise \"Invailed type e... | ruby | chosen |
[
{
"from": "system",
"value": "Update R version to 3.3.1 RC\n"
},
{
"from": "human",
"value": "require \"minitest/autorun\"\nrequire \"minitest/reporters\"\nMinitest::Reporters.use! [Minitest::Reporters::JUnitReporter.new(reports_dir=\"/tmp/result/junit\")]\n\ndescribe 'check R version' do\n\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Add rdoc to error module\n"
},
{
"from": "human",
"value": "module Mongo\n # Base error class for all Mongo related errors.\n class MongoError < StandardError; end\n\n # Base error class for all errors coming from the driver.\n class DriverError < MongoError; en... | ruby | chosen |
[
{
"from": "system",
"value": "Remove old config options stuff."
},
{
"from": "human",
"value": "#\n# Copyright 2015, Noah Kantrowitz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a cop... | ruby | chosen |
[
{
"from": "system",
"value": "Solve namespace problem in Site.current\n"
},
{
"from": "human",
"value": "# Site is used to store the global configuration. Example:\n# \n# Site.config[:host] = 'example.com'\n# Site.save!\nclass Site < ActiveRecord::Base\n include SocialStream::Models::Subjec... | ruby | chosen |
[
{
"from": "system",
"value": "Generalize specs for -I so only one specs checks that -I adds in front\n"
},
{
"from": "human",
"value": "require_relative '../spec_helper'\n\ndescribe \"The -I command line option\" do\n before :each do\n @script = fixture __FILE__, \"loadpath.rb\"\n end\n\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add shindo tests for server volume request methdos for block storage service.\n"
},
{
"from": "gpt",
"value": "Shindo.tests('Fog::Compute[:hp] | volume requests', ['hp', 'block_storage']) do\n\n @list_volume_attachments_format = {\n 'volumeAttachments' => [{\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change required bundler version 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 'ltree_rails/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as development dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/discli/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Chris Hunt\"]\n gem.email = [\"c@chrish... | ruby | chosen |
[
{
"from": "system",
"value": "Remove set up of @comment in answers controller - comment model is simple enough to be created in the view\n"
},
{
"from": "human",
"value": "class AnswersController < ApplicationController\n before_filter :authenticate_user!\n before_filter :find_question\n befo... | ruby | chosen |
[
{
"from": "system",
"value": "Change Stock to 'Disponibile/Disponibilità limitata/Non disponibile'\n"
},
{
"from": "human",
"value": "class TrovaprezziFeedHelper\n include Spree::Core::Engine.routes.url_helpers\n\n def initialize(variant, host)\n @variant = variant\n @product = variant.p... | ruby | chosen |
[
{
"from": "system",
"value": "Add page and redis dependency 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 'cylinder_loader/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Revert \"Rename gemspec to traceview\"\n\nThis reverts commit e009bf97c3d942fce59915e86853ee1cb8403291.\n"
},
{
"from": "gpt",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"oboe/version\"\n\nGem::Specification.new do |s|\n s.name = %q{oboe}\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move the markov chain-storing file\n\nFrom the trigger folder to the bot folder. This encourages the idea of 'separate bots'\n"
},
{
"from": "human",
"value": "require \"./triggers/speaker/markovchains.rb\"\nrequire 'json'\nrequire 'uri'\n\nTrigger.new do |t|\n t[:... | ruby | chosen |
[
{
"from": "system",
"value": "Switch dummy app config to flatpickr\n"
},
{
"from": "human",
"value": "DatePicker.configure do |config|\n config.style = :bootstrap\n config.formats = {\n date: :default,\n datetime: :default,\n time: :only_time\n }\nend"
},
{
"from": "gpt",
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove clean_paths because it is deprecated - CocoaPods now cleans unused files by default."
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'TravisCIWrapper'\n s.version = '0.0.1'\n s.license = 'MIT'\n s.summary = 'An Objective-C Travis-C... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unreachable code re: syck\n\nIn ruby >= 2.1, the removed code was no longer reachable, because\n`YAML::ENGINE.yamler` is always psych, never syck.\n"
},
{
"from": "human",
"value": "require \"yaml\"\n\nmodule PaperTrail\n module Serializers\n # The defaul... | ruby | chosen |
[
{
"from": "system",
"value": "Update deploy script to point to app3. PL-11271.\n"
},
{
"from": "human",
"value": "# The hosts where are are deploying \nrole :app, \"monsoon.amee.com\"\nrole :db, \"monsoon.amee.com\", :primary => true\n\nset :application, \"platform-api-dev\"\nset :deploy_to, \"... | ruby | chosen |
[
{
"from": "system",
"value": "Align the Nutrella module comment with the README.\n"
},
{
"from": "human",
"value": "require \"active_support/core_ext/string\"\n\nrequire \"nutrella/cache\"\nrequire \"nutrella/command\"\nrequire \"nutrella/configuration\"\nrequire \"nutrella/options\"\nrequire \"... | ruby | chosen |
[
{
"from": "system",
"value": "Change Organisations API to use public API\n\nThis will allow this application to be compatible with version 54.0.0 of\ngds-api-adapters.\n"
},
{
"from": "human",
"value": "require \"gds_api/asset_manager\"\nrequire \"gds_api/content_store\"\nrequire \"gds_api/organ... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sshkey/version\"\n\nGem::Specification.new do |s|\n s.name = \"sshkey\"\n s.version = SSHKey::VERSION\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Add Railtie to include tasks\n"
},
{
"from": "human",
"value": "module Rateaux\nend\n"
},
{
"from": "gpt",
"value": "module Rateaux\n class Railtie < Rails::Railtie\n rake_tasks do\n Dir[File.join(File.dirname(__FILE__),'tasks/*.rake')].each { |... | ruby | chosen |
[
{
"from": "system",
"value": "Remove tests for wrong object\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass Hydrogen::GeneratorsTest < MiniTest::Unit::TestCase\n def invoke(*args)\n Hydrogen::Generators.invoke *args\n end\n\n def test_generator_lookup_against_full_name\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix ActionMailer not using SES"
},
{
"from": "human",
"value": "if Settings.email.mailer.present? && Settings.email.mailer == :aws_sdk\n require 'aws-sdk-rails'\n Aws::Rails.add_action_mailer_delivery_method(:aws_sdk)\n ActionMailer::Base.delivery_method = :aws_s... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - sum up random string\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/55da6c52a94744b379000036/\n# --- iteration 1 ---\ndef sum_from_string(str)\n str.scan(/\\d+/).reduce(0) { |acc, el| acc + el.to_i }\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to include jobs.rb\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'refried'\n s.version = '0.0.6-rc4'\n s.date = '2014-12-05'\n s.summary = \"Make Ruby objects behave like Beanstalk tubes\"\n s.d... | ruby | chosen |
[
{
"from": "system",
"value": "[TTPLAT-1117] Add legal name to organization factories.\n"
},
{
"from": "human",
"value": "FactoryBot.define do\n\n factory :organization, :class => :organization do\n customer_id { 1 }\n address1 { '100 Main St' }\n city { 'Harrisburg' }\n state { 'PA'... | ruby | chosen |
[
{
"from": "system",
"value": "Add new property specs to measurement model\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Measurement, :type => :model do\n before do\n @measurement = FactoryGirl.build(:measurement)\n end\n\n it 'has valid factory' do\n expect(@meas... | ruby | chosen |
[
{
"from": "system",
"value": "Set a heartbeat before signing in new process\n"
},
{
"from": "human",
"value": "module Sidekiq::LimitFetch::Global\n module Monitor\n extend self\n\n HEARTBEAT_PREFIX = 'heartbeat:'\n PROCESS_SET = 'processes'\n HEARTBEAT_TTL = 18\n REFRESH_TIMEOUT ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in task name\n"
},
{
"from": "human",
"value": "namespace :\"solidus-adyen\" do\n namespace :factory_girl do\n desc \"Verify that all FactoryGirl factories are valid\"\n task lint: :environment do\n if Rails.env.test?\n begin\n D... | ruby | chosen |
[
{
"from": "human",
"value": "TEST: Add tests for activity type duplication\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\n\nclass ActivityTypeTest < ActiveSupport::TestCase\n def test_default_create\n activity_type = FactoryGirl.create(:activity_type)\n assert activity_type.val... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing test by clearing the redis cache in setup method\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DownloadRouterTest < ActiveSupport::TestCase\n test '.request, called with search domain and an hash of parameters, sends a\n request to... | ruby | chosen |
[
{
"from": "human",
"value": "Add IODATA USB NFC4 driver\n"
},
{
"from": "gpt",
"value": "cask \"iodata-usb-nfc4\" do\n version \"100\"\n sha256 \"eec178e7295a7e56fa6f032880a5bfab6630bea1a235dd4f4244bf10ce4e6d8d\"\n\n url \"https://lib.iodata.jp/lib/soft/u/usbnfc4_#{version}.dmg\"\n name \"I-... | ruby | chosen |
[
{
"from": "system",
"value": "Move readonly load to katla\n"
},
{
"from": "human",
"value": "name \"web-db\"\ndescription \"Role applied to all servers needing to find the main database\"\n\ndefault_attributes(\n :web => {\n :database_host => \"katla.bm.openstreetmap.org\",\n :readonly_da... | ruby | chosen |
[
{
"from": "system",
"value": "Fix resources in spec for localization\n"
},
{
"from": "human",
"value": "# Just a simple podspec. \n\n# If you're testing locally it will ignore the source/tag reference. This could potentially\n# be used by people using `pod \"ExampleLib\", :git => \"https://githu... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Allow transactional database strategy with Selenium.\"\n\nThis reverts commit 0572d3a04e39ff5633a5f507315359363612cd80.\n"
},
{
"from": "human",
"value": "require 'database_cleaner'\n\nRSpec.configure do |config|\n config.before(:suite) do\n DatabaseCle... | ruby | chosen |
[
{
"from": "system",
"value": "Update the contact email used in gemspec.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"postmark-rails/version\"\n\nGem::Specification.new do |s|\n s.name = %q{postmark-rails}\n s.version = PostmarkRails::VERSION\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove full path to sem-apply\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# == Wrapper script to update a local postgrseql database\n#\n# == Usage\n# ./dev.rb\n#\n\ncommand = \"schema-evolution-manager/bin/sem-apply --host localhost --user %%user%% --na... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to error on login."
},
{
"from": "human",
"value": "class Uniform::SessionsController < ApplicationController\n\n unloadable\n\n def new\n @session = UserSession.new \n end\n\n def create\n\n @session = UserSession.new(params[:user_session])\n\n i... | ruby | chosen |
[
{
"from": "system",
"value": "Handle 'times' that are Strings\n"
},
{
"from": "human",
"value": "module Results\n module Renderers\n class TimeRenderer < DefaultResultRenderer\n def self.render(column, row)\n time = row[key(column)]\n return nil if time.nil?\n\n sec... | ruby | chosen |
[
{
"from": "system",
"value": "Raise error if user doesn't save\n"
},
{
"from": "human",
"value": "class EnsureGithubUserAndAccount\n def initialize(github_user)\n @github_user = github_user\n end\n\n def process!\n # NOTE: This is very similar to User.find_or_create_from_github_oauth,\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use main release id, only return main or remix\n"
},
{
"from": "human",
"value": "require 'discogs'\nrequire 'open-uri'\n\nmodule Wallbum\n class DiscogsHelper\n def initialize\n @discogs_wrapper = Discogs::Wrapper.new('wallbum')\n end\n\n def get_dis... | ruby | chosen |
[
{
"from": "system",
"value": "Add the demo.html to the list of pages that will trigger a recompile to make dev easier\n"
},
{
"from": "human",
"value": "require File.expand_path('./tasks/recipes/test')\nrequire \"rake-pipeline\"\nrequire 'rake-pipeline-web-filters'\n\nrun Proc.new { |env|\n # E... | ruby | chosen |
[
{
"from": "system",
"value": "Add json dependency 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 'fintop/version'\n\nGem::Specification.new do |s|\n s.name = \"... | ruby | chosen |
[
{
"from": "human",
"value": "Add Wondershare Video Converter.app v5.2.1\n\nAdd Wondershare Video Converter Ultimate.app v5.2.1\n"
},
{
"from": "gpt",
"value": "cask 'wondershare-video-converter-ultimate' do\n version '5.2.1'\n sha256 'ad1229e4f7aac5d9067ae3ea83d7e2e5dbeb7a6bcce1b049db9ff153b3e... | ruby | chosen |
[
{
"from": "system",
"value": "Allow passing of arguements to RMQ plugins\n"
},
{
"from": "human",
"value": "\nclass Sneakers::Queue\n attr_reader :name, :opts, :exchange\n\n def initialize(name, opts)\n @name = name\n @opts = opts\n @handler_klass = Sneakers::Config[:handler]\n end\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to generate static pages\n\n* The approach is copied from the old app\n* The task is automatically invoked as part of asset precompilation, so it should just work\n"
},
{
"from": "gpt",
"value": "Rake::Task['assets:precompile'].enhance do\n Rake::Task[... | ruby | chosen |
[
{
"from": "system",
"value": "Update license type to BSD\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"NSData+TDTImageMIMEDetection\"\n s.version = \"0.1.0\"\n s.summary = \"Category on NSData to check if it represents PNG or JPEG.\"\n s.h... | ruby | chosen |
[
{
"from": "system",
"value": "Change back to original gemspec\n"
},
{
"from": "human",
"value": "lib = File.expand_path('lib', __dir__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'active_model/jobs/version'\n\nGem::Specification.new do |spec|\n spec.name = \"acti... | ruby | chosen |
[
{
"from": "system",
"value": "Use consistent user need wording everywhere."
},
{
"from": "human",
"value": "class UserNeed < ActiveRecord::Base\n belongs_to :organisation\n\n def self.existing_content(field_type)\n UserNeed.order(field_type).pluck(field_type).uniq\n end\n\n def to_s\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Include tests that check the attendance edit page and valid/invalid edits\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass AttendancesEditTest < ActionDispatch::IntegrationTest\n # test \"the truth\" do\n # assert true\n # end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with LICENSE warning\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"UIViewController+ODStatusBar\"\n s.version = \"0.1.0\"\n s.summary = \"A utility class for managing iOS status bar state.\"\n s.homepage = \... | ruby | chosen |
[
{
"from": "system",
"value": "Hide ApiHelper.parse from public API.\n\nWe are not using it anywhere else apart from get so it can be made\nprivate.\n"
},
{
"from": "human",
"value": "require \"httparty\"\nrequire \"json\"\n\nmodule ApiHelper\n BASE_URL = 'https://api.uwaterloo.ca/v2/'\n KEY = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update MD5 hash for Cassandra package.\n"
},
{
"from": "human",
"value": "cassandra_version = \"1.2.4\"\n\ndefault[:cassandra] = {\n :version => cassandra_version,\n :tarball => {\n :url => \"http://www.apache.org/dist/cassandra/#{cassandra_version}/apache-cass... | ruby | chosen |
[
{
"from": "system",
"value": "Change path for rc.d chef-client script in FreeBSD\n"
},
{
"from": "human",
"value": "# Used by chef-client.erb template to find command interpreter\nrequire 'rbconfig'\n\n# include helper meth\nclass ::Chef::Recipe\n include ::Opscode::ChefClient::Helpers\nend\n\n... | ruby | chosen |
[
{
"from": "human",
"value": "Allow jqgrid rails to generate rails urls\n"
},
{
"from": "gpt",
"value": "module JqGridRails\n class UrlGenerator\n if(Rails.version.to_s.split('.').first == '3')\n include Rails.application.routes.url_helpers\n else\n include ActionController::UrlW... | ruby | chosen |
[
{
"from": "human",
"value": "Add instrumentation for Redis calls.\n"
},
{
"from": "gpt",
"value": "# == Redis Instrumentation\n#\n\nif defined?(::Redis) and not NewRelic::Control.instance['disable_redis']\n \n ::Redis.class_eval do \n \n include NewRelic::Agent::MethodTracer\n \n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update to newer version of erlang\n\n- This updates to a newer version of erlang\n"
},
{
"from": "human",
"value": "#\n# Author:: Joshua Timberman <joshua@chef.io>\n# Copyright:: Copyright (c) 2012, Chef Software, Inc. <legal@chef.io>\n#\n# Licensed under the Apache... | ruby | chosen |
[
{
"from": "system",
"value": "Update to a more recent logstash\n"
},
{
"from": "human",
"value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http:/... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure sudoers.d is enabled\n"
},
{
"from": "human",
"value": "# Corresponds to the $PLUGIN_PATH variable\ndefault['dokku']['plugin_path'] = '/var/lib/dokku/plugins'\n\n# Hash, key is plugin name, value is git repo URL\ndefault['dokku']['plugins'] = {}\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Fix .detect_charset override for mechanize 1.0.0\n"
},
{
"from": "human",
"value": "# Used only to launch from a jar using rawr\n\nrequire 'rubygems'\nrequire 'jruby'\n# This is needed for nokogiri to function properly under jruby\nJRuby.objectspace=true\n\nrequire ... | ruby | chosen |
[
{
"from": "human",
"value": "Add example usage of the http read async adapter\n"
},
{
"from": "gpt",
"value": "# Usage (from the repo root):\n# env FLIPPER_CLOUD_TOKEN=<token> bundle exec ruby examples/http_read_async/basic.rb\nrequire 'bundler/setup'\nrequire 'flipper/adapters/http_read_async'\... | ruby | chosen |
[
{
"from": "system",
"value": "Make the path to the kari camping proof of concept relative to the build. Use the environment instead of specifying the username and the path.\n\n\ngit-svn-id: f20da03e3c54bdd0425edde46a83a0733af7cd3b@11 7a99d2f0-d533-0410-96fe-f25cb2755c1e\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Update file to include required files\n"
},
{
"from": "human",
"value": "require \"card_sharks/version\"\nrequire \"card_sharks/card\"\nrequire \"card_sharks/deck\"\n\nmodule CardSharks\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "re... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to rename taxe's french labels in DB.\n"
},
{
"from": "gpt",
"value": "class RenameTaxeNames < ActiveRecord::Migration\n CHANGES = {\n french_vat_eu: { fra_name: \"TVA intra-communautaire\"},\n french_vat_import_export: { fra_name: \"TVA import/e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix RVM hook for updating RubyGems\n\nThe previous hook was faulty, resuling in alway attempting to\nupdate RubyGems.\n\nThis commit fixes the quoting rule, so that the hook checks\nRubyGems version correctly.\n"
},
{
"from": "human",
"value": "require 'travis/build... | ruby | chosen |
[
{
"from": "system",
"value": "Switch the Pod's platform from iOS to OSX.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"OROpenSubtitleDownloader\"\n s.version = \"0.0.1\"\n s.summary = \"An Obj-C API for Searching and Downloading Subtitles from OpenSubt... | ruby | chosen |
[
{
"from": "system",
"value": "Expand tabs before escaping for html.\n\nThis decreases the likelihood that tab expansion will be negatively influenced by\nnon-printable characters introduced by the html escaping.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8; mode: ruby; tab-width: 2; in... | ruby | chosen |
[
{
"from": "human",
"value": "Add example for auto spinning.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n\nrequire 'tty-spinner'\n\nspinner = TTY::Spinner.new(\"Loading :spinner ...\", format: :spin_2)\nspinner.start\n\nsleep 1 # Some long task\n\nspinner.stop('done')\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Update strong params for orders\n"
},
{
"from": "human",
"value": "class OrdersController < ApplicationController\nend\n"
},
{
"from": "gpt",
"value": "class OrdersController < ApplicationController\n def new\n # TODO: go over\n user = User.last\n... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.