conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Rename cookie to break sessions\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\nDashboard::Application.config.session_store :cookie_store, key: '_dashboard_session', :httponly => false, domain: :all"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Disable rescue_from when considering all requests local\n"
},
{
"from": "human",
"value": "module Kracken\n module Controllers\n module JsonApiCompatible\n def self.included(base)\n base.instance_exec do\n before_action :munge_chained_param_... | ruby | chosen |
[
{
"from": "system",
"value": "Sort files to load -- hopefully less load order flakiness\n"
},
{
"from": "human",
"value": "require 'time'\nrequire 'builder'\nrequire 'httparty'\nrequire 'find'\nrequire 'logger'\nrequire 'benchmark'\nrequire 'fixed_width'\n\nmodule GlobalCollect; end\nmodule Glob... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Add xpath targeting the intro paragraph.\"\n\nThis reverts commit 197982677a0fe40f45625ba04fae9d64e2b3ac62.\n"
},
{
"from": "human",
"value": "require 'html_processor/base'\nrequire 'html_processor/node_contents'\nrequire 'html_processor/node_remover'\nrequ... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite can be over 9000 (almost) for now\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\n$:.push File.expand_path(\"../\", __FILE__)\nrequire 'twitter'\nrequire 'yaml'\nrequire 'optparse'\nrequire 'oauth'\n\n%w[config exceptions argparse actions].each do ... | ruby | chosen |
[
{
"from": "system",
"value": "Update old references in gemfile, bump version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'oc-pushy-pedant'\n s.version = '1.0.9'\n s.date = '2014-12-04'\n s.summary = \"API tests for Opscode's Private Chef ... | ruby | chosen |
[
{
"from": "system",
"value": "Set a cache time of 60 seconds for indiegogo api calls because they're expensive.\n"
},
{
"from": "human",
"value": "get '/v2/indiegogo_campaigns' do\n uri = URI('https://api.indiegogo.com/1/campaigns/964232.json?api_token=' + CDO.indiegogo_api_token)\n Net::HTTP.... | ruby | chosen |
[
{
"from": "human",
"value": "Add FireFox Beta for Japanese\n"
},
{
"from": "gpt",
"value": "class FirefoxBetaJa < Cask\n url 'https://download.mozilla.org/?product=firefox-31.0b1&os=osx&lang=ja-JP-mac'\n homepage 'http://www.mozilla.org/ja/firefox/channel/#beta'\n version '31.0b1'\n sha256 '... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to reflect Rails 3.2 compatibility\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'abracadabra/version'\n\nGem::Specification.new do |spe... | ruby | chosen |
[
{
"from": "system",
"value": "Handle prerelease formats in rubygems"
},
{
"from": "human",
"value": "require 'bundler'\nrequire 'json'\nBundler.require\n\nclass Lib2Issue < Sinatra::Base\n use Rack::Deflater\n\n configure do\n set :logging, true\n set :dump_errors, false\n set :raise_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix questions can be seen by not logged visitors\n"
},
{
"from": "human",
"value": "module AnswersHelper\n\n def user_can_vote_answer? current_user, answer\n return false unless current_user\n user_vote = Vote.find_by(user_id: current_user.id, answer_id: answ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix source_url_link to really link to the external link.\n"
},
{
"from": "human",
"value": "module SourcesHelper\n # Return HTML with a link to the the external source URL.\n def source_url_link(source)\n return link_to h(source.url), {}, { :rel => \"nofollow\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to dump track/subject info\n"
},
{
"from": "gpt",
"value": "require \"yaml\"\n\nnamespace :tracks do\n desc \"Create a yaml file with the current tracks and subjects info\"\n task current_info: :environment do\n tracks_info = {\"tracks\" => {}}\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing type annotation comment\n"
},
{
"from": "human",
"value": "class UpdateUserJob < ActiveRecord::Base\n # Kick UpdateUserWorker.java via MySQL queue\n # @param [Integer] user_id\n def self.perform_later(user_id:, token_user_id:)\n # Payload is parsed... | ruby | chosen |
[
{
"from": "system",
"value": "Use a SPDX compliant license string\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'delivery-sugar'\nmaintainer 'Chef Delivery Team'\nmaintainer_email 'delivery-team@chef.io'\nlicense 'Apache 2.... | ruby | chosen |
[
{
"from": "system",
"value": "Use greater-than cron version constraint\n"
},
{
"from": "human",
"value": "name 'et_upload'\nmaintainer 'EverTrue, Inc.'\nmaintainer_email 'jeff@evertrue.com'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures et_upload'\nlong_d... | ruby | chosen |
[
{
"from": "system",
"value": "Convert depends into a recommends\n"
},
{
"from": "human",
"value": "name 'logstash'\nmaintainer 'Peter Donald'\nmaintainer_email 'peter@realityforge.org'\nlicense 'Apache 2.0'\ndescription 'Installs/Configures logstash in agent mode'... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"remove the runit dependency\"\n\nThis reverts commit b91a2eb9154397438b7e72b03d76d777207468c6 [formerly 4916eef5d50edaf84ec39f2e87026e080e3d1315] [formerly d6a5d91d367b9aa6bac0144542660d5a3d94d7ae] [formerly 4b48d64dcf39560f4696fe824cf335c79701a25f [formerly 586cd3dd62... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for project collections\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe KeenCli::CLI do\n it 'prints help by default' do\n _, options = KeenCli::CLI.start\n expect(_).to be_empty\n end\n\n it 'prints version info if -v is used'... | ruby | chosen |
[
{
"from": "system",
"value": "Update wording of test to be more specific to what it does\n\nThis test is about persisting the model. Not just creation.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Asset do\n\n describe \"creating an asset\" do\n it \"should be valid g... | ruby | chosen |
[
{
"from": "human",
"value": "Add relative performance test for link expansion\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\nrequire 'benchmark'\n\ndescribe \"relative performance\", :type => :request do\n\n it \"does not significantly slow down when expanding links\" do\n item1 = ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct path to reader/writer for archives\n"
},
{
"from": "human",
"value": "require 'fabulator/radiant/archive'\n\nclass FabulatorEdition < ActiveRecord::Base\n validates_presence_of :name\n validates_uniqueness_of :name\n\n belongs_to :updated_by, :class_name ... | ruby | chosen |
[
{
"from": "system",
"value": "Change methods to add a answer to receive as parameter the user too\n"
},
{
"from": "human",
"value": "module Helpers\n module AnswerProcessHelper\n\n def create_an_exercise_to_user(user)\n create(:exercise, user: user)\n end\n\n def create_a_question... | ruby | chosen |
[
{
"from": "system",
"value": "Stop emptying out db with code, that's what rake db is for\n"
},
{
"from": "human",
"value": "Dir[\"#{Rails.root}/db/seeds/demo/demo_data/*.rb\"].each {|file| require file }\n\nputs \"Creating demo schools, homerooms, interventions...\"\n\nSchool.destroy_all\nhealey... | ruby | chosen |
[
{
"from": "system",
"value": "Add outputs relation to AssetId\n"
},
{
"from": "human",
"value": "module Graphdb\n module Model\n\n class AssetId < ActiveNodeBase\n property :asset_id, index: :exact, constraint: :unique\n\n validates :asset_id, :presence => true\n\n scope :with... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is incremented from patch number 0.1.0 to 0.1.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'telemetry-logger'\n s.version = '0.1.0'\n s.summary = 'Logging to STDERR with coloring and leve... | ruby | chosen |
[
{
"from": "system",
"value": "Correct ordering of blog posts for skus\n"
},
{
"from": "human",
"value": "class IslayShop::Admin::SkusController < IslayShop::Admin::ApplicationController\n helper IslayShop::Admin::CatalogueHelper\n resourceful :sku, :parent => :product\n header 'Shop'\n nav '... | ruby | chosen |
[
{
"from": "system",
"value": "Remove active_support gem tests that were copied over. Was adding in hash keys tests as well but we'll just the actual gem. It does a good job of loading only what we require.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass TestCoreExtensions < Tes... | ruby | chosen |
[
{
"from": "system",
"value": "Add documentation to ApplicationController methods\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_fo... | ruby | chosen |
[
{
"from": "system",
"value": "Allow controllers to handle token authentication\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n protect_from_forgery with: :null_session, :if => Proc.new { |c| c.request.f... | ruby | chosen |
[
{
"from": "system",
"value": "Make home query use MetaWhere!\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\n layout 'home'\n \n def index\n if current_user\n flash.keep\n redirect_to stream_path\n end\n\n # @user = User.new(:username => \"u... | ruby | chosen |
[
{
"from": "system",
"value": "Return false when denying access"
},
{
"from": "human",
"value": "# Filters added to this controller apply to all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\nclass ApplicationController < ActionControlle... | ruby | chosen |
[
{
"from": "system",
"value": "Fix unfinished block and correct typo\n"
},
{
"from": "human",
"value": "class SiteController < ApplicationController\n before_filter :authorize, only: [:admin]\n\n def index\n end\n\n def contact\n end\n\n def about\n end\n\n def speak\n end\n\n def admin... | ruby | chosen |
[
{
"from": "system",
"value": "Support different regions for the same language\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forge... | ruby | chosen |
[
{
"from": "system",
"value": "Add encrypt and decrypt method to application controller\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass ApplicationController < ActionController::Base\n protect_from_forgery with: :null_session\nend\n"
},
{
"from": "gpt",
"value... | ruby | chosen |
[
{
"from": "system",
"value": "Move to just a reusable gem name."
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"reusable/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor ConventionsController to take advantage of CanCan's load_and_authorize_resource\n"
},
{
"from": "human",
"value": "class ConventionsController < ApplicationController\n # You should always be able to get a list of conventions\n skip_authorization_check\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused association causing circluar dependencies\n\n- drugs should know about medications\n- therefore cannot know about patients\n"
},
{
"from": "human",
"value": "require_dependency 'renalware/drugs'\n\nmodule Renalware\n module Drugs\n class Drug < Act... | ruby | chosen |
[
{
"from": "system",
"value": "Remove self file line in backtrace\n"
},
{
"from": "human",
"value": "module DidYouMean\n module ExtraFeatures\n module KeyErrorWithNameAndKeys\n def fetch(name, *)\n super\n rescue KeyError => e\n e.instance_variable_set(:@name, name)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing namespace to NokogiriStreamParser\n"
},
{
"from": "human",
"value": "require \"xmlrpc/client\"\nrequire \"nokogiri/xml/sax/document\"\nrequire \"nokogiri/xml/sax/parser\"\n\nclass NokogiriStreamParser < XMLRPC::XMLParser::AbstractStreamParser\n def init... | ruby | chosen |
[
{
"from": "system",
"value": "Call reload rather than passing true, underyling api changed\n"
},
{
"from": "human",
"value": "class SourceDetailPresenter < SourcePresenter\n def as_json(opts = {})\n super.merge(\n {\n abstract: source.abstract,\n source_suggestions: source... | ruby | chosen |
[
{
"from": "system",
"value": "Correct md5 for Squid 3.1.9\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Squid <Formula\n url 'http://www.squid-cache.org/Versions/v3/3.1/squid-3.1.9.tar.bz2'\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Liquid Facebook widget tag."
},
{
"from": "gpt",
"value": "module Stumpwise\n module Liquid\n module Tags\n class FacebookWidget < ::Liquid::Tag\n def initialize(name, params, tokens)\n @attributes = {\n 'stream' => '0',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add addtional signposting of monkey-patch\n"
},
{
"from": "human",
"value": "# TODO: Explain this monkey-patch\nmodule CarrierWave\n class SanitizedFile\n def url\n CarrierWaveFilePath.new(path).to_public_path\n end\n\n class CarrierWaveFilePath\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add gemspec summary and description.\n"
},
{
"from": "human",
"value": "require_relative 'lib/json_rpc/version'\n\nGem::Specification.new do |spec|\n spec.name = 'json_rpc'\n spec.version = JsonRpc::VERSION\n spec.authors = ['Tobias Bühlmann'... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with filter not always being there\n"
},
{
"from": "human",
"value": "module Breezy\n module Helpers\n def breezy_tag\n if defined?(@breezy) && @breezy\n \"<script type='text/javascript'>Breezy.replace(#{@breezy});</script>\".html_safe\n ... | ruby | chosen |
[
{
"from": "human",
"value": "test(maze): Add 'wait' step for network requests\n"
},
{
"from": "gpt",
"value": "Then(/^I wait for a request$/) do\n step \"I wait for 1 request\"\nend\n\nThen(/^I wait for (\\d+) requests?$/) do |request_count|\n max_attempts = 300\n attempts = 0\n received = f... | ruby | chosen |
[
{
"from": "system",
"value": "Add some other stuff to the gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n\n s.name = \"bus-o-matic\"\n s.version = \"0.0.2\"\n s.authors = [\"Matt Cone\"]\n s.email = [\"matt@macinstruct.com\"]\n s.summa... | ruby | chosen |
[
{
"from": "system",
"value": "Add In More Requirements For Testing Order Import\n\nRequire the shopify_api in the lib test along with adding in the shared\ncontext that allows mocking of requests to the Shopify API.\n\nClubhouse:\nhttps://app.clubhouse.io/dynamomtl/story/48/\n"
},
{
"from": "human",... | ruby | chosen |
[
{
"from": "system",
"value": "Allow (partial) blank values for near scope\n\nhas_scope 0.8.0 has a stricter validation for blank values in\ncombination with the `:using` option. Without allowing blank values, all\nused fields must be present, otherwise the scope will not be applied.\n\nThe `:near` scoped fo... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging around running a single Agenda in StepExecutor\n\n[#153991487](https://www.pivotaltracker.com/story/show/153991487)\n"
},
{
"from": "human",
"value": "module Bosh::Director\n class StepExecutor\n def initialize(stage_name, agendas, track: true)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add earth_date method to Photo class\n"
},
{
"from": "human",
"value": "module ExploreMars\n class Photo\n attr_reader :src, :sol, :camera\n\n def initialize(src, sol, camera)\n @src = src\n @sol = sol\n @camera = camera\n end\n\n def to_... | ruby | chosen |
[
{
"from": "system",
"value": "[REFACTOR] Use instance vars defined on test/helper.rb\n"
},
{
"from": "human",
"value": "require_relative 'helper'\nrequire 'css_inliner'\n\nclass CSSInlinerTest < Test::Unit::TestCase\n def setup\n @fixtures_dir = File.join(File.dirname(__FILE__), 'fixtures')\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failz from sass and haml\n"
},
{
"from": "human",
"value": "require 'bulk/routes'\n\nmodule Bulk\n class Engine < Rails::Engine\n initializer \"do not include root in json\" do\n # TODO: handle that nicely\n ActiveRecord::Base.include_root_in_json ... | ruby | chosen |
[
{
"from": "system",
"value": "Use fully qualified namespace calls.\n"
},
{
"from": "human",
"value": "require 'timers'\nrequire 'instana/collectors/gc'\nrequire 'instana/collectors/heap'\nrequire 'instana/collectors/memory'\nrequire 'instana/collectors/thread'\n\nmodule Instana\n module Collect... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem dependency from rails to active_record only\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$:.unshift File.expand_path('../lib', __FILE__)\nrequire 'historyable/version'\n\nGem::Specification.new do |s|\n s.name = \"historyable\"\n s.v... | ruby | chosen |
[
{
"from": "system",
"value": "Add github usernames to gschool1 class\n"
},
{
"from": "human",
"value": "module GSchool\n class One\n extend Group\n\n def self.all\n [\n \"Adam Magan\",\n \"Louisa Barrett\",\n \"Katrina Engelsted\",\n \"Romeeka Gayhart\",\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove pinterest and foursquare from the available social networks\n\nNot working and not being used yet.\n"
},
{
"from": "human",
"value": "require \"mweb_events/engine\"\n\nLeaflet.tile_layer = \"http://b.tile.openstreetmap.org/{z}/{x}/{y}.png\"\nLeaflet.attributi... | ruby | chosen |
[
{
"from": "system",
"value": "Use inner class to handle sitemap write\n"
},
{
"from": "human",
"value": "class SitemapMiddleware\n def initialize(app)\n @app = app\n end\n\n def call(env)\n if env['PATH_INFO'] == '/sitemap.xml'\n generate_sitemap\n response = Rack::Response.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Switch software and hardware to hashes.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule UsesThis\n # A class that models a single interview.\n class Interview < Dimples::Post\n attr_accessor :hardware\n attr_accessor :software\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve coverage of QuestionCategory model\n"
},
{
"from": "human",
"value": "require 'spec_helper.rb'\ndescribe QuestionCategory do\n\n include Permissions::TestPermissions\n\n it \"should allow admin to create, edit, update and remove\" do\n cud_allowed([Fact... | ruby | chosen |
[
{
"from": "system",
"value": "Revert to passenger 4 on frontend servers\n"
},
{
"from": "human",
"value": "name \"web-frontend\"\ndescription \"Role applied to all web/api frontend servers\"\n\ndefault_attributes(\n :apache => {\n :mpm => \"event\",\n :event => {\n :server_limit => 4... | ruby | chosen |
[
{
"from": "system",
"value": "Use array, fails on older Ruby versions"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'natero/version'\nrequire 'pry'\n\nGem::Specification.new do |spec|... | ruby | chosen |
[
{
"from": "system",
"value": "Configure in app.after_configuration and expose internal sprockets_app"
},
{
"from": "human",
"value": "require 'middleman-core'\nrequire 'middleman/jasmine/jasmine_sprockets_proxy'\n\nmodule Middleman\n module Jasmine\n class << self\n def registered(app, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix portfolios loading screen spec via case insensitivity\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe PortfoliosController, type: :controller do\n render_views\n\n it \"shows a loading screen when there is no data for the requested ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove `activ_record` dependency from Sequel initializer (moved to config)\n"
},
{
"from": "human",
"value": "require 'active_record'\nrequire_dependency 'carto/configuration'\n\n# Make Sequel messages (SQL stastements) to have debug level.\n# They'll' appear in the... | ruby | chosen |
[
{
"from": "system",
"value": "Handle case where grade level access is empty\n\n+ Can't access the \"keys\" of a split string if the string was nil; grade level access can't be nil, must be []\n+ TODO:\n + [ ] Think about a more elegant / less hacky way to do this\n + [ ] Write a system test now that we're... | ruby | chosen |
[
{
"from": "system",
"value": "Update the API end point\n\n* ensure it expects the new attributes from the publicapp\n"
},
{
"from": "human",
"value": "module Api\n class SubmissionsController < ApplicationController\n protect_from_forgery with: :null_session, only: proc { |c| c.request.forma... | ruby | chosen |
[
{
"from": "system",
"value": "Check that users are logged in when changing password\n"
},
{
"from": "human",
"value": "class ChangepasswordsController < ApplicationController\n\n def edit_password\n #TODO: Redirect user to login, if not logged in\n @user = current_user\n end\n\n def upd... | ruby | chosen |
[
{
"from": "system",
"value": "Add flash message to homepage when library items are due soon\n"
},
{
"from": "human",
"value": "class HomeController < ApplicationController\nend\n"
},
{
"from": "gpt",
"value": "class HomeController < ApplicationController\n\tdef index\n\t\titem_due_so... | ruby | chosen |
[
{
"from": "system",
"value": "Allow all syndicate requests to the quizzes tool\n"
},
{
"from": "human",
"value": "class QuizController < EmbeddedToolsController\n protected\n def category_id\n ''\n end\n\n helper_method :category_id\nend\n"
},
{
"from": "gpt",
"value": "class ... | ruby | chosen |
[
{
"from": "system",
"value": "Use latest fog version to avoid dependency problems.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-openstack-plugin/version'\n\nGem:... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust file matching and expansion\n\nThe include_paths may or may not be ./-prefixed (they usually aren't,\nbut there's the notable case of [\"./\"]). Patterns are never ./-prefixed\n(they can't be for the purposes of relative expansion). Given this\nuncertainty, it's possible... | ruby | chosen |
[
{
"from": "system",
"value": "Fix formula name and make libbsd optional to avoid warnings\n"
},
{
"from": "human",
"value": "class Etl < Formula\n desc \"Daemon to control your LIFX wifi smart bulbs\"\n homepage \"https://github.com/lopter/lightsd/\"\n url \"https://api.github.com/repos/lopte... | ruby | chosen |
[
{
"from": "system",
"value": "Add twitter API KEY and sceret\n"
},
{
"from": "human",
"value": "Rails.application.config.middleware.use OmniAuth::Builder do\n if ENV['CONSUMER_KEY'].blank? || ENV['CONSUMER_SECRET'].blank?\n warn '*' * 80\n warn 'WARNING: Missing consumer key or secret. Fi... | ruby | chosen |
[
{
"from": "human",
"value": "Add day 08: String Overhead\n"
},
{
"from": "gpt",
"value": "CHAR = /\\\\\"|\\\\\\\\|\\\\x..|[^\\\\]/\n\ndef literal_overhead(str)\n # exclude quotes, then count chars inside quotes.\n str.size - str[1...-1].scan(CHAR).size\nend\n\ndef encoded_overhead(str)\n # 2 ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for Persistence module\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe \"DatastaxRails::Base\" do\n describe \"persistence\" do\n describe \"#create\" do\n it \"should persist at the given consistency level\" do\n DatastaxR... | ruby | chosen |
[
{
"from": "system",
"value": "Mark another spec that will fail occasionally.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"When Mingo doesn't have a collection set\" do\n\n before { @collection, Mingo.collection = Mingo.collection, nil }\n after { Mingo.collection = @... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for service object\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe ResetOrderService do\n let(:current_distributor) { double(:distributor) }\n let(:current_token) { double(:current_token) }\n let(:current_order) { double(:current_... | ruby | chosen |
[
{
"from": "system",
"value": "Set attributes on admins for new domains\n\nThis is to avoid the situation where a worker has not yet had a chance\nto execute and set the admin flags or domain relation on that user\nmodel. We have verified that the user is an admin of that domain\nalready.\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Change from define_method to class eval\n\n- This makes possible to avoid &block\n"
},
{
"from": "human",
"value": "require 'nokogiri'\r\nrequire 'nxt_builder/exceptions'\r\n\r\nmodule NxtBuilder\r\n class XML\r\n module ClassMethods\r\n def register(tag)\r... | ruby | chosen |
[
{
"from": "system",
"value": "Support uglifier 2.x option style\n"
},
{
"from": "human",
"value": "require 'tilt'\n\nmodule Sprockets\n class UglifierCompressor < Tilt::Template\n self.default_mime_type = 'application/javascript'\n\n def self.engine_initialized?\n defined?(::Uglifier... | ruby | chosen |
[
{
"from": "system",
"value": "Call const_get on the class\n"
},
{
"from": "human",
"value": "require \"tinymce/rails/asset_manifest\"\n\nrequire \"tinymce/rails/asset_installer/copy\"\nrequire \"tinymce/rails/asset_installer/compile\"\n\nmodule TinyMCE\n module Rails\n class AssetInstaller\n... | ruby | chosen |
[
{
"from": "system",
"value": "Update InVision Sync to 1.7.20-673\n"
},
{
"from": "human",
"value": "cask :v1 => 'invisionsync' do\n version '1.7.19-672'\n sha256 '16bc77a5597a56f579cdbabdde0750d5a9456c1004cae5147f46f9687b98ae43'\n\n url \"https://projects.invisionapp.com/native_app/mac/sparkl... | ruby | chosen |
[
{
"from": "system",
"value": "Change platform version to iOS 7.0\n"
},
{
"from": "human",
"value": "#\n# Be sure to run 'pod lib lint EggMobilePushNotification.podspec' to ensure this is a\n# valid spec before submitting.\n\nPod::Spec.new do |s|\n s.name = \"EggMobilePushNotificatio... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extraneous slashes from File.join() calls\n"
},
{
"from": "human",
"value": "require 'mustache'\n\nmodule Alephant\n module Renderer\n module Engine\n class Mustache\n def initialize(base_path, namespace, partials_path = nil)\n @names... | ruby | chosen |
[
{
"from": "human",
"value": "Add the game object class.\n\nThis class will be the parent of all game objects.\nUpon initialization the class registers itsel in the\nobject pool.\n"
},
{
"from": "gpt",
"value": "module Asteroids\n class GameObject\n\n def initialize(object_pool)\n @objec... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify incorrect data written to substitute error\n"
},
{
"from": "human",
"value": "class Connection\n class Substitute\n class Expectation < Struct.new :data\n dependency :logger, Telemetry::Logger\n\n def self.build(data=nil)\n instance = ne... | ruby | chosen |
[
{
"from": "system",
"value": "Use the Bundler::LockfileParser to parse the lockfile.\n"
},
{
"from": "human",
"value": "module SevenScaleDeploy\n module BundlerSupport\n def bundler_dependencies(options = {})\n root = options.delete(:root)\n\n # WARNING: This is highly Bundler 0.9 ... | ruby | chosen |
[
{
"from": "system",
"value": "Concatenate multiple recipients with commas.\n"
},
{
"from": "human",
"value": "module Postmark\n module MessageHelper\n\n extend self\n\n def to_postmark(message = {})\n message = message.dup\n\n if message[:headers]\n message[:headers] = he... | ruby | chosen |
[
{
"from": "system",
"value": "Change description and temporarily stop using FG\n\n- Updated the top description string for `describe`\n- Temporarily changed test user creation to default Rails API\n because I'm having issues with other tests and FactoryGirl\n"
},
{
"from": "human",
"value": "re... | ruby | chosen |
[
{
"from": "system",
"value": "Make modularized test filter abstract\n\nThis excludes it from the generated list of i18n types.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nrequire 'spec_helper'\n\nmodule ActiveInteraction\n class ATestFilter < ActiveInteraction::Filter; end\nend\nclass... | ruby | chosen |
[
{
"from": "human",
"value": "Add a ruby client cabable of ftp-like download\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n#\n# xsftp client terminal\n# Based on miniterm.rb\n#\n# ruby 2.0.0+ environment\n# serialport required (gem install serialport)\n\n# NOTES:\n# Get Serial Port Lis... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in spec example\n"
},
{
"from": "human",
"value": "RSpec.shared_examples_for 'a method matcher' do\n let(:node) { mutation_subject.node }\n let(:context) { mutation_subject.context }\n let(:mutation_subject) { subject.first ... | ruby | chosen |
[
{
"from": "human",
"value": "Move markdown text filter spec to its proper place\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe PublifyApp::Textfilter::Markdown do\n def filter_text(text)\n described_class.filtertext(text)\n end\n\n it 'applies markdown processing to th... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the lenght of batch_no is 24\n"
},
{
"from": "human",
"value": "module Alipay\n module Utils\n def self.stringify_keys(hash)\n new_hash = {}\n hash.each do |key, value|\n new_hash[(key.to_s rescue key) || key] = value\n end\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a descriptive message to the raised exception"
},
{
"from": "human",
"value": "require 'capybara'\nmodule Capybara\n class SlowFinderError < CapybaraError; end\n\n module Node\n class Base\n def synchronize_with_timeout_error(seconds=Capybara.default_w... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Fix for PR 945745. Update switch style value for QFX device based on Junos software version\"\n\nThis reverts commit f4ca559ffeb09c23572c18d92600a12f2e18a4b6."
},
{
"from": "human",
"value": "Junos::Ez::Facts::Keeper.define( :switch_style ) do |ndev, facts|... | ruby | chosen |
[
{
"from": "system",
"value": "[Bugzilla] Add shortcut method to find bugs\n\nTired of typing:\n\n MiqToolsServices::Bugzilla.call do\n ActiveBugzilla::Bug.find(find_options)\n end\n\nThink this looks better:\n\n MiqToolsServices::Bugzilla.call do |bugzilla|\n bugzilla.find_bugs(find_options)\n end... | ruby | chosen |
[
{
"from": "system",
"value": "Add local retracker to torrents\n"
},
{
"from": "human",
"value": "module TransmissionServer\n attr_accessor :connectors\n\n def receive_data data\n query = JSON.parse(data)\n case query['command']\n when 'add'\n respond = 'Add: ' + query['uri']... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.