conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Add documentation for the Resolution API\n"
},
{
"from": "human",
"value": "module BacklogKit\n class Client\n module Resolution\n def get_resolutions\n get('resolutions')\n end\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "m... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for lines with multiple =s"
},
{
"from": "human",
"value": "module Changit\n class Lexer\n class KeyValueToken\n attr_reader :lhs # left-hand side\n attr_accessor :rhs # right-hand side\n\n def initialize(key_value)\n @lhs, @rhs = k... | ruby | chosen |
[
{
"from": "system",
"value": "Add http basic auth to the application controller"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n has_mobile_fu\n\n def use_mobile_view\n session[:mobile_view] = true\n redirect_to root_path\n end\n\n def use_desktop... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecated attr_accessible from payment method\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\nclass PaymentMethod::MercadoPago < Spree::PaymentMethod\n attr_accessible :preferred_client_id, :preferred_client_secret\n\n preference :client_id,... | ruby | chosen |
[
{
"from": "system",
"value": "Include a private key to the user data export archive\n\nIn order to allow a user to notify his contacts of his migration\nwith a trustworthy signature the old private key must be available\nto the new pod where we import data.\n"
},
{
"from": "human",
"value": "mod... | ruby | chosen |
[
{
"from": "system",
"value": "Fix that tests run in forked processes were printing coverage reports\n\nFor a few tests, we shell out to `ruby -e \"require 'fakeweb'; ...\"` to get a\nclean environment in order to check what warnings appear when you combine\nFakeWeb with other libs. Recently these processes ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Bug: Any Simple2ch exceptions could not rescued by StandardError\n"
},
{
"from": "human",
"value": "module Simple2ch\n class Simple2chException < Exception; end\n class NotA2chUrlException < Simple2chException; end\n class KakoLogException < Simple2chExceptio... | ruby | chosen |
[
{
"from": "human",
"value": "Make DirectoryInput part of the pubic API\n\nAs clients of the gem will need to call it, to then call Api::Flow, they shouldn't\nhave to call something in the Parser directory.\n\nMoving the DirectoryInput module itself was a bit of a faff, so for now i've effectively\naliased i... | ruby | chosen |
[
{
"from": "system",
"value": "Switch from depricated require_recipe to include_recipe\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: sportngin-mongodb\n# Recipe:: default\n#\n# Copyright (C) 2013 Sport Ngin\n#\n# All rights reserved - Do Not Redistribute\n\nrequire_recipe \"sportngin-mo... | ruby | chosen |
[
{
"from": "system",
"value": "Use platform_family instead of platform\n"
},
{
"from": "human",
"value": "include_recipe \"rbenv::default\"\ninclude_recipe \"rbenv::ruby_build\"\n\n# Override /etc/profile.d/rbenv.sh\nbegin\n rbenv_template = resources(template: \"/etc/profile.d/rbenv.sh\")\n rb... | ruby | chosen |
[
{
"from": "system",
"value": "Add a little more restrictive sequel version\n\n>= 4 is too liberal. Since people are saying that 5 works, let's do < 6.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/flipper/version', __FILE__)\nrequire File.expand_p... | ruby | chosen |
[
{
"from": "system",
"value": "Add warning about unversioned development dependencies.\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"pure/version\"\n\nGem::Specification.new do |s|\n s.name = \"pure-rails\"\n s.version = Pure::Rails::V... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"add googledoc support for android command\"\n\nThis reverts commit f65af7feb9b0b4e25e61e2478fbe8e73ef8ce537.\n"
},
{
"from": "human",
"value": "require \"csvconverter/command\"\nclass Android2CSVCommand < Command\n default_task :android2csv\n\n desc \"FIL... | ruby | chosen |
[
{
"from": "system",
"value": "FIX: Update for changes to core"
},
{
"from": "human",
"value": "# name: twitter-profile-link\n# about: Link to twitter profile on user pages\n# version: 0.1\n# authors: Neil Lalonde\n# url: https://github.com/discourse/twitter-profile-link\n\nregister_asset \"javas... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic support for CC and BCC\n"
},
{
"from": "human",
"value": "require \"send_with_us\"\n\nmodule SendWithUsMailer\n class MailParams\n attr_reader :to, :from, :email_id, :email_data\n\n def initialize #:nodoc:\n @email_data = {}\n @to = {}\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make ic a class variable, rather than an instance variable.\n"
},
{
"from": "human",
"value": "require 'iconv'\nrequire 'rss/1.0'\nrequire 'rss/2.0'\nrequire 'open-uri'\nrequire 'sinatra'\n$: << File.join(File.dirname(__FILE__), 'vendor', 'ruby-oembed', 'lib')\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix description and GFM pipelines conflicting\n\nConsider this command:\n\n bundle exec rails r \"include GitlabMarkdownHelper\n puts markdown('<span>this is a span</span>', pipeline: :description)\n puts markdown('<span>this is a span</span>')\"\n\nAnd the same in the... | ruby | chosen |
[
{
"from": "system",
"value": "Add license to Gemspec file"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'state_machine/audit_trail/version'\n\nGem::Specification.new do |s... | ruby | chosen |
[
{
"from": "system",
"value": "cli: Convert rbld status usage to Ruby\n\nSigned-off-by: Dmitry Fleytman <a8cf97adadec4e1b734a39bc5aea71b5741cfca1@daynix.com>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire_relative 'rbld_envmgr'\n\nmodule Rebuild\n class RbldStatusCommand < Com... | ruby | chosen |
[
{
"from": "system",
"value": "Return empty array if no tracks are found\n"
},
{
"from": "human",
"value": "require 'playlist'\n\nclass Radiodan\nclass MPD\nmodule PlaylistParser\n def self.parse(attributes={}, tracks=[])\n options = parse_attributes(attributes)\n options[:tracks]... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug during deployment on not null column conditionning_unit in products.\n"
},
{
"from": "human",
"value": "class AddConditioningUnitToProducts < ActiveRecord::Migration\n def up\n add_column :products, :conditioning_unit_id, :integer, index: true\n add_f... | ruby | chosen |
[
{
"from": "system",
"value": "Disable random sorting of specs\n\nMakes runner specs go forever with certain seeds (e.g. --seed 6871),\ndisabled until the runner will run specs in a subshell. Ref:\nhttps://github.com/elia/rspec.tmbundle/commit/92bd792d813f79ffec8484469aa9ce3c7872382b#commitcomment-7325726\n"... | ruby | chosen |
[
{
"from": "system",
"value": "Document Gemspec summary and description.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire './lib/redimap/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add foreign key to member profile table\n"
},
{
"from": "human",
"value": "class CreateMemberProfiles < ActiveRecord::Migration\n def change\n create_table :member_profiles do |t|\n t.string :ethnicity\n t.string :height\n t.string :weight\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rake user:add task, email can't be mass assigned\n"
},
{
"from": "human",
"value": "namespace :user do\n task :add, [:user, :email, :password] => :environment do |t, args|\n u = User.new({ username: args.user,\n email: args.email,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use reference instead of revision attribute to checkout git repo with tag\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: sickbeard\n# Recipe:: default\n#\n\ninclude_recipe \"bluepill\"\n\npackage \"python-cheetah\"\n\n# Set up sabnzbd user\nuser node['sickb... | ruby | chosen |
[
{
"from": "system",
"value": "Remove logging of sensitive things.\n"
},
{
"from": "human",
"value": "helper = OpsworksMigrations::Helper.new(node)\ninclude_recipe \"deploy\"\n\nnode[:deploy].each do |application, deploy|\n node.override[:deploy][application][:deploy_to] = \"/srv/www/#{applicati... | ruby | chosen |
[
{
"from": "system",
"value": "Fix logic around include_recipe 'postfix::virtual_aliases_domains'\n\nSigned-off-by: Sean OMeara <4025b808ec3cf11e3d5c9a1a3bd1e7c4003cb3a1@opscode.com>\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# Author:: Joshua Timberman(<joshua@getchef.com>)\n# Cookboo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove duplicate compile_time on the gem\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "#\n# Cookbook:: dynect\n# Recipe:: default\n#\n# Copyright:: 2010-2016, Chef Software, Inc <legal@chef.io>\n#\n... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up server and agent configs if we do not need them (anymore).\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: chef-logstash\n# Recipe:: default\n#\n# Copyright (C) 2014 Wouter de Vos\n# \n# License: MIT\n#\n\ninclude_recipe \"logstash::yumrepo\" if pla... | ruby | chosen |
[
{
"from": "human",
"value": "Add gemspec from current gem\n"
},
{
"from": "gpt",
"value": "Gem::Specification.new do |s|\n s.name = %q{sfc-custom}\n s.version = \"0.6\"\n\n s.required_rubygems_version = Gem::Requirement.new(\">= 1.2\") if s.respond_to? :required_rubygems_version=\n s.authors... | ruby | chosen |
[
{
"from": "system",
"value": "Add explicit from hoping it takes.\n"
},
{
"from": "human",
"value": "class UserMailer < ActionMailer::Base\n default from: \"noreply@tmux.me\"\n\n def password_reset(user)\n @user = user\n mail :to => user.email, :subject => \"Password Reset\"\n end\nend\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Permission.java (killbill-api) to have clean model and fix'up CanCan to make the correct translation to KAUI models\n"
},
{
"from": "human",
"value": "module Kaui\n class Ability\n include CanCan::Ability\n\n def initialize(user)\n # user is a Kaui::... | ruby | chosen |
[
{
"from": "system",
"value": "Allow using new versions of bundler\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rb-fsevent/version\"\n\nGem::Specification.new do |s|\n s.name = \"rb-fsevent\"\n s.version = FSE... | ruby | chosen |
[
{
"from": "system",
"value": "Add Homebrew Cask Versions tap\n\nThe Versions tap has casks for some newer software (e.g. Sublime Text 3).\n\nInstall this so we have access to these versions.\n"
},
{
"from": "human",
"value": "#\n# Author:: Mike Moate (<chef@mikemoate.co.uk>)\n# Cookbook Name:: m... | ruby | chosen |
[
{
"from": "system",
"value": "Update attributes according to single_node_hadoop_claster requirements.\n"
},
{
"from": "human",
"value": "# Apt #########################################################################\n\ninclude_recipe \"apt\"\n\n# Java ###########################################... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for the Provider model.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Provider do\n before(:each) do\n @valid_attributes = {\n }\n end\n\n it \"should create a new instance given valid attributes\" do\n # pending\n # Pr... | ruby | chosen |
[
{
"from": "system",
"value": "Add cupped coffee association to scores, pass pending test.\n"
},
{
"from": "human",
"value": "class CuppedCoffee < ApplicationRecord\n belongs_to :coffee\n belongs_to :roaster\n belongs_to :cupping\n\n validates_presence_of :roast_date\nend\n"
},
{
"fro... | ruby | chosen |
[
{
"from": "system",
"value": "Update the seven day mvps\n"
},
{
"from": "human",
"value": "class SevenDayMVP\n def self.current\n Product.find_by(slug: 'gamamia')\n end\n\n def self.recent\n ['giraff', 'signupsumo'].map { |s| Product.find_by(slug: s) }\n end\nend\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "human",
"value": "Add pending resource key spec\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe ExCite::ResourceKey do\n let(:included_resource_class){ Class.new{ include ExCite::ResourceKey } }\n let(:included_resource){ included_resource_class.new }\n\n descri... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for kernel recipe (microcode updates)\n"
},
{
"from": "gpt",
"value": "describe 'sys::kernel' do\n cached(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) }\n\n context 'attributes are empty' do\n it 'does nothing' do\n expect(chef_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec result dependency for jruby.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'spec_helper'\n\nclass ApiTest < Github::API\n before_request :authorize, only: ['list']\n\n after_request :stats\n\n def list(a, b)\n (@called ||= []) << \"l... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up root parser specs\n"
},
{
"from": "human",
"value": "require 'raml/parser/root'\nrequire 'yaml'\n\ndescribe Raml::Parser::Root do\n\n describe '#parse' do\n let(:raml) { YAML.load File.read('spec/fixtures/basic.raml') }\n subject { Raml::Parser::Root... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for dependencies class\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'rbenv::dependencies' do\n let(:title) { 'rbenv::dependencies' }\n\n context 'Ubuntu' do\n let(:facts) { { :operatingsystem => 'Ubuntu' } }\n it { should includ... | ruby | chosen |
[
{
"from": "system",
"value": "Change votes table to have boolean instead of count\n"
},
{
"from": "human",
"value": "class CreateVotes < ActiveRecord::Migration\n def change\n create_table :votes do |t|\n t.integer :count, null: false, default: 0\n t.references :user\n t.refer... | ruby | chosen |
[
{
"from": "system",
"value": "Change dependency level to spree_core\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_product_expiry_date'\n s.version = '1.3.2'\n s.summary = 'TODO: Add g... | ruby | chosen |
[
{
"from": "human",
"value": "Test API authentication with simple request\n\n* Executes endpoint /me\n\n* Prints out selected elements of response\n\n"
},
{
"from": "gpt",
"value": "# Test the ability authenticate\n\nrequire 'httparty'\n\nTOKEN = '93e1e6aa56d9a1e839a40e0e2021fcef'\n\nresponse = H... | ruby | chosen |
[
{
"from": "system",
"value": "Include schnitzelstyle in gemspec dependencies."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/schreihals/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Hendrik Mans\"]\n gem.email ... | ruby | chosen |
[
{
"from": "system",
"value": "Update homepage URL and bump version number\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n\n s.name = \"bus-o-matic\"\n s.version = \"0.0.5\"\n s.authors = [\"Matt Cone\"]\n s.email = [\"matt@macinstruct.com\"]\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make test resilent to env change\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass RoutingTest < ActionDispatch::IntegrationTest\n before do\n visit root_path\n end\n\n it 'should have a root with a login form' do\n assert_equal current_path... | ruby | chosen |
[
{
"from": "system",
"value": "Include the raw user response from GitHub in OmniAuth's extra information, just like the old days\n"
},
{
"from": "human",
"value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class GitHub < OmniAuth::Strategies::OAuth2\n option :cli... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the FIXME related to URL building in websocket adapter\n"
},
{
"from": "human",
"value": "module WebsocketAdapter\n class Standard\n attr_reader :env, :url\n\n def initialize(env, sock)\n @env = env\n @sock = sock\n\n secure = Rack::Requ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dependency in Translate Quickstart spec\n"
},
{
"from": "human",
"value": "# Copyright 2016 Google, Inc\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 ... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.0.3.1 to 0.0.4.0\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'connection'\n s.version = '0.0.3.1'\n s.summary = 'TCP client/server connection library offering both bloc... | ruby | chosen |
[
{
"from": "system",
"value": "Allow source blocks in agent gemfiles\n\n* make sure to keep any end lines\n* allow whitespace in front of gem definitions"
},
{
"from": "human",
"value": "#tool to merge gem file in the sdk way\n\n# return merge Gemfile content\n# gemfiles_contents : arrawy of cont... | ruby | chosen |
[
{
"from": "system",
"value": "Add some accessors to event wrapper\n"
},
{
"from": "human",
"value": "require 'delegate'\nmodule SandthornDriverSequel\n class EventWrapper < SimpleDelegator\n\n [:aggregate_version, :event_name, :event_data].each do |attribute|\n define_method(attribute) ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test to cover lat and lon accuracy\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Muni::Route, vcr: true do\n it \"fetches all available routes\" do\n routes = Muni::Route.find(:all)\n routes.should_not be_empty\n routes.first.tag... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for xml doctype\n"
},
{
"from": "human",
"value": "describe Hamlit::Engine do\n describe 'doctype' do\n it 'renders html5 doctype' do\n assert_render(<<-HAML, <<-HTML)\n !!!\n HAML\n <!DOCTYPE html>\n HTML\n end\n end\ne... | ruby | chosen |
[
{
"from": "system",
"value": "Update path or nssm call\n"
},
{
"from": "human",
"value": "require 'win32/service'\n\npowershell_script 'install eventstore' do\n code <<-EOH\n Add-Type -assembly \"system.io.compression.filesystem\"\n wget \"#{node[:eventstore][:url]}\" -OutFile \"$env:TEMP\\\\... | ruby | chosen |
[
{
"from": "system",
"value": "Change gemspec for push to rubygems\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'ael_tracker/version'\n\nGem::Specification.new do |spec|\n spec.nam... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error message when datapoint fetch fails\n"
},
{
"from": "human",
"value": "class BeeminderAdapter < BaseAdapter\n RECENT_INTERVAL = 2.days.ago\n MAX_SLUG_LENGNTH = 250\n\n class << self\n def required_keys\n %i(token)\n end\n\n def auth_type\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use Chamber method\n"
},
{
"from": "human",
"value": "module Builders\n\n class NoBuildersRegisteredError < StandardError\n end\n\n class Registry\n\n class << self\n\n def registered_builders\n if @registered_builders.blank?\n B... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused con local var.\n"
},
{
"from": "human",
"value": "require 'cases/sqlserver_helper'\nrequire 'models/company'\n\nclass InheritanceTestSqlserver < ActiveRecord::TestCase\nend\n\nclass InheritanceTest < ActiveRecord::TestCase\n \n COERCED_TESTS = [:test... | ruby | chosen |
[
{
"from": "system",
"value": "Add functional test for markov controller\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass HomeControllerTest < ActionDispatch::IntegrationTest\n test \"should get index\" do\n get root_url\n assert_response :success\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Update summary and email in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n\nrequire 'fabrication/version'\n\nGem::Specification.new do |s|\n s.name = \"fabr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented stuff that didn't work."
},
{
"from": "human",
"value": "Haml::Template.options[:format] = :html5\nHaml::Template.options[:ugly] = RAILS_ENV == 'production'\n\n#Compass.sass_engine_options[:load_paths].unshift \"#{Rails.root}/public/stylesheets/sass... | ruby | chosen |
[
{
"from": "system",
"value": "Load all contracts -public works or not- temporarily, to inspect the data\n"
},
{
"from": "human",
"value": "class Award < ActiveRecord::Base\n belongs_to :public_body\n belongs_to :bidder\n\n def self.load_from_hash(properties)\n # Load the data only if it's ... | ruby | chosen |
[
{
"from": "system",
"value": "Rename home to evening and work to daytime and make daytime default.\n"
},
{
"from": "human",
"value": "class Phone < ActiveRecord::Base\n\n belongs_to :user\n\n enum kind: {home: 0, work: 1, cell: 2}\n\n validates :kind, :number, presence: true\n\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Validate color with uppercase notation\n"
},
{
"from": "human",
"value": "class Share < ActiveRecord::Base\n is_impressionable\n belongs_to :user\n validates_presence_of :content_url, :header_url, :header_content, :header_background_color, :header_text_color\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Allow ActiveRecord to_json options to be specified, like :only or :methods (reduces JSON payload)\n"
},
{
"from": "human",
"value": "module ExtScaffoldCoreExtensions\n module Array\n\n # return Ext compatible JSON form of an Array, i.e.:\n # {\"results\": n,... | ruby | chosen |
[
{
"from": "system",
"value": "Add BoxesReader method to read at a specific stream position\n"
},
{
"from": "human",
"value": "require_relative 'box'\n\nmodule FileData\n class BoxesReader\n def initialize(stream, start, should_stop)\n @stream = stream\n @start = start\n @shoul... | ruby | chosen |
[
{
"from": "system",
"value": "Fix using `try` on delegators in CI config entries\n\nSee:\n\nhttps://github.com/rails/rails/commit/af53280a4b5b3323ac87dc60deb2b1b781197b2b\n"
},
{
"from": "human",
"value": "module Gitlab\n module Ci\n class Config\n module Node\n ##\n # Thi... | ruby | chosen |
[
{
"from": "system",
"value": "Allow master signature kind and layout to be set\n"
},
{
"from": "human",
"value": "module Keyline\n class MasterSignature\n include Resource\n include Writeable::Resource\n \n attributes :name, :mode, :folding_pattern, :layout, :first_page, :last_page\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a more thorough spec for init command.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\nmodule Pod\n describe Command::Init do\n\n it \"runs with no parameters\" do\n lambda { run_command('init') }.should.... | ruby | chosen |
[
{
"from": "system",
"value": "Use an in-memory SQLite database to test activerecord backend\n"
},
{
"from": "human",
"value": "require 'active_record'\n\nActiveRecord::Base.establish_connection(\n :adapter => \"sqlite3\",\n :database => \"test.db\"\n)\n\nrequire \"schema.rb\"\n\nclass ExampleR... | ruby | chosen |
[
{
"from": "system",
"value": "Update RubyGems login command in rake task.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nnamespace :release do\n desc \"Release #{Bundler::GemHelper.gemspec.full_name}.gem if syntax checks and code examples pass\"\n task :safe, [:remote] do ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up some test names\n"
},
{
"from": "human",
"value": "require File.expand_path('../helper', __FILE__)\n\nclass TestRakeScope < Rake::TestCase\n include Rake\n\n def test_empty_scope\n scope = Scope.make\n assert_equal scope, Scope::EMPTY\n assert_eq... | ruby | chosen |
[
{
"from": "system",
"value": "Use pessimistic versioning for guard\n"
},
{
"from": "human",
"value": "require File.expand_path('../lib/green-button-data/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'green-button-data'\n s.version = GreenButtonData::VERSION\n\n s.... | ruby | chosen |
[
{
"from": "system",
"value": "Change gemspec website to github website\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'battle_ship/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Include license name in gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'include_any/version'\n\nGem::Specification.new do |gem|\n gem... | ruby | chosen |
[
{
"from": "system",
"value": "Update path to Kafka log file in integration tests, properly\n\nNever mind the idiot who apparently does not know how to use Git at all.\nAt least I didn’t force push master, yay me."
},
{
"from": "human",
"value": "# encoding: utf-8\n\nshared_context 'service setup... | ruby | chosen |
[
{
"from": "system",
"value": "Exclude TZInfo time zones which get cached in TimeZone.all"
},
{
"from": "human",
"value": "module GroupedTimeZones\n module ViewHelpers\n def grouped_time_zone_select(name, attribute, record=nil)\n \n select_tag(\"#{name}[#{attribute}]\", grouped_opt... | ruby | chosen |
[
{
"from": "system",
"value": "Add extconf.rb to extensions path\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'cdistance/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Change branch checking logic from timeout to checking in cycle\n"
},
{
"from": "human",
"value": "require 'timeout'\n\nmodule CodeclimateCi\n class GetGpa\n RETRY_TIMEOUT = ENV['RETRY_TIMEOUT'] || 10\n NO_BRANCH_INFO_ERROR = Class.new(Exception)\n\n def in... | ruby | chosen |
[
{
"from": "system",
"value": "Include executable delivered with gem\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.summary = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add strip_html as global filter\n"
},
{
"from": "human",
"value": "module LiquidMarkdown\n class Render\n # setup your html layout layout to wrap around your LiquidMarkdown output\n # layout = \"<html><head></head><body>{{yield}}</body></html>\"\n attr_re... | ruby | chosen |
[
{
"from": "system",
"value": "Change EC2 instance tag to Hash(key and value).\n"
},
{
"from": "human",
"value": "require 'aws-sdk'\n\nmodule Owlsync\n module Strategies\n class Ec2\n include Strategy \n\n attr_accessor :tag\n\n def initialize(options)\n self.tag = optio... | ruby | chosen |
[
{
"from": "system",
"value": "Use alternative definition for Error\n"
},
{
"from": "human",
"value": "require 'pansophy_authenticator/version'\n\nmodule PansophyAuthenticator\n def self.configure\n configurator = Configuration::Configurator.new\n yield configurator if block_given?\n @c... | ruby | chosen |
[
{
"from": "system",
"value": "Fix poster fetch rake task bug\n"
},
{
"from": "human",
"value": "desc \"migrate images to posters\"\ntask migrate_posters: :environment do\n puts \"Updating posters...\"\n Movie.connection\n Movie.all.each do |movie|\n movie.update_poster\n p movie.poster\... | ruby | chosen |
[
{
"from": "system",
"value": "Create simple config without global state\n"
},
{
"from": "human",
"value": "require 'roda'\n\nmodule WebBouncer\n class Middleware < Roda\n plugin :middleware\n\n route do |r|\n r.is 'auth/failure' do\n Matcher.call(OauthContainer['oauth.failure'... | ruby | chosen |
[
{
"from": "system",
"value": "Reorder to make the load method available\n\nWe are getting the following error when trying to use `require \"dotenv/rails-now\"`\r\n\r\n> /Users/mikaelhenriksson/.rvm/gems/ruby-2.1.8/gems/activesupport-3.2.22.6/lib/active_support/dependencies.rb:243:in `load': wrong number of ... | ruby | chosen |
[
{
"from": "system",
"value": "Complete solution for common courses.\n"
},
{
"from": "human",
"value": "# Given two arrays that contain the course IDs of two different students\n# write a function that prints to standard output (stdout) all the course IDs\n# that are contained in both arrays, sor... | ruby | chosen |
[
{
"from": "system",
"value": "Use shoes to construct GUI\n"
},
{
"from": "human",
"value": "class Konnect::Game\n attr :pairs\n\n def initialize board_size, pairs\n @board = Konnect::Board.new board_size\n @pairs = pairs\n @board.fill_in_pairs pairs\n end\n\n def find_paths\n @pa... | ruby | chosen |
[
{
"from": "system",
"value": "Correct issue with listen socket format\n"
},
{
"from": "human",
"value": "listen 'unicorn.sock', :backlog => 1024\nworker_processes ENV.fetch('WORKER_PROCESSES', 3).to_i\ntimeout 180\n\npreload_app true\n\nGC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_wr... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct reference to context through the importer\n\nFixes #366 in the correct way, hopefully.\n\nI can't cite my sources well, since Sprockets is very difficult to follow... but suffice to say the global options hash sent to the Tilt SASS template engine always has a refer... | ruby | chosen |
[
{
"from": "human",
"value": "aact-457: Add rake file to run all deployment commands from the development server. Do this to avoid having to verify MFA for each ssh command. (Need to adapt this when we get production up and running."
},
{
"from": "gpt",
"value": "task :server_deploy do\n on \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug of before_sha being inproperly evaluated to `checkout_sha`\n"
},
{
"from": "human",
"value": "module Gitlab\n module Ci\n module Pipeline\n module Chain\n Command = Struct.new(\n :source, :project, :current_user,\n :origin... | ruby | chosen |
[
{
"from": "system",
"value": "Update installer for docker 0.6.0 (closes GH-1)\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module Vocker\n module Cap\n module Debian\n module DockerInstall\n def self.docker_install(machine)\n # Inspired on https:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete comment from spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndef render(text)\n Slodown::Formatter.new(text).complete.to_s\nend\n\ndescribe 'basic formatting syntax' do\n # Just a silly little spec to get things started. I don't in... | ruby | chosen |
[
{
"from": "system",
"value": "Update code based on new Tessellator::Fetcher API.\n"
},
{
"from": "human",
"value": "require 'tessellator/fetcher'\n\nmodule HowIs\n # This entire class is a monstrous hack, because GitHub doesn't provide a good\n # API for Pulse.\n class Pulse\n def initiali... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.