conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove craft from spec helper.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire 'rubygems'\n\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nrequire 'rspec'\nrequire 'rack/test... | ruby | chosen |
[
{
"from": "system",
"value": "Add Webmock configure for Code Climate\n"
},
{
"from": "human",
"value": "require \"codeclimate-test-reporter\"\nCodeClimate::TestReporter.start\n\nDir[File.join(File.dirname(__FILE__), \"../lib/**/*.rb\")].each { |f| require f }\nrequire 'webmock/rspec'\n\nRSpec.co... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing newline from coverage message\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'erb_helper'\n\nSimpleCov.profiles.define 'gem' do\n add_filter '/spec/'\n add_filter '/features/'\n add_filter '/vendor/'\n\n add_group 'Libraries', '/lib/... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor internals of Blogger for readability\n"
},
{
"from": "human",
"value": "require 'google/api_client'\nrequire 'google/api_client/auth/installed_app'\nrequire 'google/api_client/auth/file_storage'\nrequire 'extensions/google/api_client/installed_app_flow'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Return first if mined, then sleep in Deployment.\n"
},
{
"from": "human",
"value": "module Ethereum\n\n class Deployment\n\n DEFAULT_TIMEOUT = 300.seconds\n DEFAULT_STEP = 5.seconds\n\n attr_accessor :id, :contract_address, :connection, :deployed, :mined\n... | ruby | chosen |
[
{
"from": "system",
"value": "Put all line for my pi"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire File.join(File.dirname(__FILE__), 'lib', 'traffic_light_pi_server.rb')\n\nclass TrafficLightPiServer < Sinatra::Base\n configure do\n @@line_map = {\n 0 => {\n :red ... | ruby | chosen |
[
{
"from": "system",
"value": "Verify doubles when we get to that point\n\n[skip ci]\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\n\nrequire 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Cov... | ruby | chosen |
[
{
"from": "system",
"value": "Undo the Rake magic heh.\n"
},
{
"from": "human",
"value": "require 'rubygems' unless Object.const_defined?(:Gem)\ngem 'rake', \"~> #{ENV['rake']}.0\" if ENV['rake']\n\nrequire 'van_helsing'\nrequire 'rake'\n\nputs \"Testing with Rake #{Gem.loaded_specs['rake'].vers... | ruby | chosen |
[
{
"from": "system",
"value": "Add simplecov-rcov formatter for development coverage\n"
},
{
"from": "human",
"value": "# This file was generated by the `rspec --init` command. Conventionally, all\n# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.\n# Require this file u... | ruby | chosen |
[
{
"from": "system",
"value": "Update spec coverage threshold to work for JRuby\n\n* The threshold is about 0.10% lower under JRuby, so adjust it\n downward to compensate.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n# SimpleCov MUST be started before require 'dm-mapper'\n#\nif ENV['C... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundler to setup gems in specs\n"
},
{
"from": "human",
"value": "spec_root = File.dirname(__FILE__)\n$:.unshift(File.join(spec_root, '..', 'lib'))\n$:.unshift(spec_root)\n\nrequire 'net-http-last_modified_cache'\n\nDir[File.join(spec_root, 'support/**/*.rb')].e... | ruby | chosen |
[
{
"from": "system",
"value": "Enable byebug always because supported ruby versions are >= 2.2.2\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), \"..\", \"lib\"))\n$LOAD_PATH.unshift(File.dirname(__FILE__))\nrequire \"rubygems\"\nrequire \"bundler/setup\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flakey test due to consumer thread not joining before next test starts\n"
},
{
"from": "human",
"value": "require 'codeclimate-test-reporter'\nrequire 'rabbit_feed'\nrequire 'rspec/its'\nrequire 'timecop'\nrequire 'timeout'\n\n# Send data to code climate from se... | ruby | chosen |
[
{
"from": "system",
"value": "Remove work-around that is no longer needed with the rspec expect syntax\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nif ENV['COVERAGE'] == 'true'\n require 'simplecov'\n require 'coveralls'\n\n SimpleCov.formatter = SimpleCov::Formatter::MultiFormatte... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rspec colour in jenkins\n\nSigned-off-by: Ken Barber <470bc578162732ac7f9d387d34c4af4ca6e1b6f7@bob.sh>\n"
},
{
"from": "human",
"value": "dir = File.expand_path(File.dirname(__FILE__))\n$LOAD_PATH.unshift File.join(dir, 'lib')\n\n# Don't want puppet getting the ... | ruby | chosen |
[
{
"from": "system",
"value": "Configure tests to run in random order\n"
},
{
"from": "human",
"value": "lib_path = File.expand_path('../../lib', __FILE__)\nrequire \"#{lib_path}/antimony\"\n\nRESOURCES_DIR = File.expand_path('../resources', __FILE__)\n\nRSpec.configure do |config|\n # Spec Filt... | ruby | chosen |
[
{
"from": "system",
"value": "Use transactional fixtures for tests.\n"
},
{
"from": "human",
"value": "# Configure Rails Envinronment\nENV[\"RAILS_ENV\"] = \"test\"\n\nrequire File.expand_path(\"../dummy/config/environment.rb\", __FILE__)\nrequire \"rails/test_help\"\nrequire \"rspec/rails\"\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add some more stubs to make specs pass\n\nChange-Id: I0b69ad23b1980e9854d0cfcc32038703974276c1\nReviewed-on: https://gerrit.causes.com/6792\nTested-by: Steve Dee <239b710744079cbd443875b57204a43cb15ab5d1@causes.com>\nReviewed-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d28... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Further Travis CI investigation\"\n\nThis reverts commit 4d66fe38224d5cc8ce8742fc23b6522d524ea252.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass LibC\n extend FFI::Library\n # figures out the correct libc for each platform including Window... | ruby | chosen |
[
{
"from": "system",
"value": "Remove outgoing node pipeline from NodeProxy\n"
},
{
"from": "human",
"value": "module Mementus\n class NodeProxy\n def initialize(node, graph)\n @node = node\n @graph = graph\n end\n\n def id\n @node.id\n end\n\n def label\n @nod... | ruby | chosen |
[
{
"from": "system",
"value": "Fix path default config yaml\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule PhpCop\n # This class load a files configuration to gem. So config file default and\n # customize config file in project scan\n class ConfigLoader\n attr_reader :options\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add another method definition to move forward in 1.9 support.\n"
},
{
"from": "human",
"value": "\nrequire 'monitor'\n\nmodule MonitorMixin\n #\n # FIXME: This isn't documented in Nutshell.\n #\n # Since MonitorMixin.new_cond returns a ConditionVariable, and the... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing arg to import:update_legacy_from_s3 task"
},
{
"from": "human",
"value": "require 'transition/import/hits'\nrequire 'transition/import/daily_hit_totals'\n\nnamespace :import do\n desc 'Import hits for a file or mask'\n task :hits, [:filename_or_mask] =... | ruby | chosen |
[
{
"from": "system",
"value": "Change error class declaration (thanks to oboxodo)\n\nThe declaring Invalid = Class.new(ArgumentError) has worse\nperformance than class Invalid < ArgumentError; end. As in\ntesting every nanosecond counts, this change was necessary.\n"
},
{
"from": "human",
"value"... | ruby | chosen |
[
{
"from": "system",
"value": "Use the first argument as the audit target\n"
},
{
"from": "human",
"value": "require 'thor'\n\nmodule AccessLint\n class CLI < Thor\n desc 'audit TARGET', \"Run an accessibility audit on a target file or url.\"\n def audit(target)\n puts Audit.new(targe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix detection of Rails::Engine for Rails 4\n\nThere was code saying if defined?(Rails::Engine), but that didn't work on our Rails 4 project.\nIt seems to work better as defined(::Rails::Engine).\n"
},
{
"from": "human",
"value": "require \"angularjs-rails/version\"\... | ruby | chosen |
[
{
"from": "system",
"value": "Convert list string to array\n"
},
{
"from": "human",
"value": "\r\nmodule Beaglebone\r\n module GPIO\r\n def self.list\r\n `ls /sys/class/gpio/`\r\n end\r\n end\r\nend\r\n"
},
{
"from": "gpt",
"value": "\r\nmodule Beaglebone\r\n module GPI... | ruby | chosen |
[
{
"from": "system",
"value": "Add an inversion error message\n"
},
{
"from": "human",
"value": "class Object\n attr_accessor :actual, :inverted\n\n def it(title, &block)\n block.call\n print '.'\n rescue Exception => e\n print 'F'\n puts\n puts e.to_s\n puts e.backtrace\n e... | ruby | chosen |
[
{
"from": "system",
"value": "gemspec: Update license to Apache 2.0\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'sequelizer/version'\n\nGem::Specification.new do |spec|\n spec.na... | ruby | chosen |
[
{
"from": "system",
"value": "Allow docker ENV to override markdown host"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'faraday_middleware'\n\nclass MarkdownApi\n def self.host\n return @host if @host\n config_file = Rails.root.join 'config/markdown.yml'\n config = YAML.l... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing documentation to ImplicitSchema\n"
},
{
"from": "human",
"value": "class ImplicitSchema < BasicObject\n ValidationError = ::Class.new(::RuntimeError)\n\n def initialize(hash)\n @hash = hash\n end\n\n def method_missing(sym, *args, &block)\n @ha... | ruby | chosen |
[
{
"from": "system",
"value": "Remove (now) unneeded require 'ostruct' call\n"
},
{
"from": "human",
"value": "require 'ostruct'\n\nrequire 'object_momma/class_attributes'\n\nrequire 'object_momma/builder'\nrequire 'object_momma/child'\nrequire 'object_momma/module_methods'\nrequire 'object_momma... | ruby | chosen |
[
{
"from": "system",
"value": "Allow web-consoles from anywhere, for docker containers\n"
},
{
"from": "human",
"value": "PRX::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb.\n\n # In the development environment your application's c... | ruby | chosen |
[
{
"from": "system",
"value": "Enable info logging by default\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://w... | ruby | chosen |
[
{
"from": "system",
"value": "Add highline gem to dependencies\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'serverspec/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Split parsing and building into two parts\n"
},
{
"from": "human",
"value": "require 'pathname'\n\nmodule Orbacle\n class Indexer\n def initialize(logger)\n @logger = logger\n end\n\n def call(project_root:)\n project_root_path = Pathname.new(pro... | ruby | chosen |
[
{
"from": "system",
"value": "Package version is increased from 0.3.1 to 0.3.2\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'event_store-client-http'\n s.version = '0.3.1'\n s.summary = 'HTTP Client for EventStore'\n s.description = '... | ruby | chosen |
[
{
"from": "system",
"value": "Change nokogiri dependency to hopefully work on 1.8.7 on Travis\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"simple_aws\"\n s.version = \"1.2.2\"\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Jason Roelofs\"]\n s.ema... | ruby | chosen |
[
{
"from": "system",
"value": "Add a little colour to the dance.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nmodule Tango\n class Logger\n def self.instance\n @logger ||= Logger.new\n end\n\n def initialize(io = STDERR)\n @io = io\n @depth = 0\n end\n\n de... | ruby | chosen |
[
{
"from": "system",
"value": "Add country to racer faker\n"
},
{
"from": "human",
"value": "require 'faker'\n\nnamespace :db do\n desc \"Seeds racers\"\n task seed_race: :environment do\n race = Race.create!(name: Faker::DcComics.villain, date: (DateTime.now + 1.day), registration_threshold... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct name for initializer key\n"
},
{
"from": "human",
"value": "require 'rails'\nrequire 'rails/observers/version'\n\nmodule Rails\n module Observers\n class Railtie < ::Rails::Railtie\n initializer \"active_record.observer\", :before => \"active_re... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to Buttocks class\n"
},
{
"from": "human",
"value": "require 'slatan/spirit'\nrequire 'logger'\n\nmodule Slatan\n # Wrapper class of Logger\n class Buttocks\n @@use_log = Spirit.use_log\n class << self\n def init()\n if @@use_log\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove sass/rails and coffeescript requires\n\nThey are useless and sass/rails break the build on master after\nsolidusio/solidus#2883\n"
},
{
"from": "human",
"value": "require \"solidus_core\"\nrequire \"solidus_support\"\nrequire \"active_merchant\"\nrequire \"sp... | ruby | chosen |
[
{
"from": "system",
"value": "Add API endpoint for User create\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n respond_to :html, :json\n\n def index\n @users = User.all\n respond_with @users\n end\n\n def show\n @user = User.find(params[:id])\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to version 2.0\n"
},
{
"from": "human",
"value": "\nPod::Spec.new do |s|\n\n s.name = \"HSGoogleDrivePicker\"\n s.version = \"1.0.1\"\n s.summary = \"A sane and simple file picker for Google Drive.\"\n\n s.homepage = \"https:... | ruby | chosen |
[
{
"from": "system",
"value": "Remove java dependency for netacuity\n"
},
{
"from": "human",
"value": "maintainer \"Webtrends, Inc.\"\nmaintainer_email \"tim.smith@webtrends.com\"\nlicense \"All rights reserved\"\ndescription \"Installs/Configures NetAcuity with a Webtrends ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove base title from page titles\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def to_markdown(content)\n markdown = Redcarpet::Markdown.new(\n Redcarpet::Render::HTML.new(filter_html: true),\n no_intra_emphasis: true,\n tables: ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong url set in full_url helper\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nmodule ApplicationHelper\n def full_title(page_title)\n base_title = \"CoderDojo Japan\"\n if page_title.empty?\n \"CoderDojo Japan - 子どものためのプログラミング道場\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Declare dimensions for header images\n\nThis way, the text doesn't jump around since the text loads before the\nsvg as the space is reserved for the image.\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def nav_item(text, image, url, options = {})\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean facebook extractor from debug prints\n"
},
{
"from": "human",
"value": "require 'json'\n\nclass FacebookExtractor\n def initial_urls\n token = File.read('fb.token').strip\n [\"https://graph.facebook.com/v2.3/178139872222344/feed?access_token=#{token}\"]... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Money gem to 6.13.2\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'monetizable/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for zero or one token\n"
},
{
"from": "human",
"value": "require 'spec_helper.rb'\n\nmodule RbNFA\n describe Regexp do\n it \"can be build from literal string\" do \n regexp = Regexp.new(\"a\")\n regexp.should_not be_nil\n end\n \n it... | ruby | chosen |
[
{
"from": "system",
"value": "Change file mode form dos to unix\n"
},
{
"from": "human",
"value": "http_path = \"../\"\r\ncss_dir = \"static/css\"\r\nsass_dir = \"scss\"\r\nimages_dir = \"static/images\"\r\nfonts_dir = \"static/fonts/\"\r\njavascripts_dir = \"js\"\r\nrelative_assets = true\r\n\r... | ruby | chosen |
[
{
"from": "system",
"value": "Kill only alive villagers in the night mode\n"
},
{
"from": "human",
"value": "require_relative 'wolf'\nrequire_relative 'villager'\n\n# game = Game.new(3, 9)\n# game.simulate\nclass Game\n def initialize(no_of_wolves, no_of_villagers)\n @wolves = []\n no_of_... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Patch the change in, instead.\"\n\nThis reverts commit e86f2e484e7e01eb95cbc82c87b61269b6bd9e0f.\n"
},
{
"from": "human",
"value": "require 'redmine'\n\n# Patches!\nrequire 'dispatcher'\n\nDispatcher.to_prepare :overview_view_page_forward do\n gem 'lockf... | ruby | chosen |
[
{
"from": "system",
"value": "Update project last_activity_at on creation\n"
},
{
"from": "human",
"value": "class ProjectObserver < BaseObserver\n def after_create(project)\n return true if project.forked?\n\n if project.import?\n RepositoryImportWorker.perform_in(5.seconds, project... | ruby | chosen |
[
{
"from": "human",
"value": "Add manual-migration tool for images\n\nThis tool should be run from a Rails console:\n\n ManualMigrations.move_snapshot_images!\n\nYou might see errors along the way (we haven't been good at cleaning out\nbad snapshots) but the script should always continue. It is safe to ru... | ruby | chosen |
[
{
"from": "system",
"value": "Return 404 if the request file is not there\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'sinatra/reloader'\n\nconfigure do\n set :public_folder, File.dirname(__FILE__) + '/json'\nend\n\nget '/:name' do\n content_type 'application/json'\n if para... | ruby | chosen |
[
{
"from": "system",
"value": "Set language before authenticating the user\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n before_filter :authenticate_user!\n before_filter :set_user_language\n before_filter :... | ruby | chosen |
[
{
"from": "system",
"value": "Use before_action instead of before_filter\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n protect_from_forgery with: :exception\n\n before_filter :authenticate\n\n protected\n\n def authenticate\n if Rails.env.produc... | ruby | chosen |
[
{
"from": "system",
"value": "Use an around_filter for adjusting the time zone.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n include Authentication\n\n before_filter :authenticate\n before_filter :adjust_format_for_iphone\n before_filter :adjust_t... | ruby | chosen |
[
{
"from": "system",
"value": "Change command separator to >\n\nThis is to allow the use of `.ext` when specifying a filename\n"
},
{
"from": "human",
"value": "require 'readline'\nrequire_relative 'command'\nrequire_relative 'step'\nrequire_relative 'loader'\n\nclass Runner\n attr_reader :modul... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust dist for polyglot module reshuffle.\n"
},
{
"from": "human",
"value": "puts 'building /target/build-metadata.json'\nrequire 'java'\nrequire 'rubygems'\nrequire 'json'\nrequire File.join( File.dirname( __FILE__ ), '../../../modules/core/target/immutant-core-mo... | ruby | chosen |
[
{
"from": "human",
"value": "Remove Land Registry Corporate Information Page\n\nAdds a migration to remove Land Registry Corporate Information Page.\nWhen Whitehall republishes the document, it should push everything\nthrough correctly.\n"
},
{
"from": "gpt",
"value": "class RemoveLandRegistry <... | ruby | chosen |
[
{
"from": "system",
"value": "Set homepage to Github repo\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'jquerydotdotdot/rails/version'\n\nGem::Specification.new do |spec|\n spec.n... | ruby | chosen |
[
{
"from": "system",
"value": "Allow blank to started_at on program_details\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule DB\n class ProgramDetailRowsForm\n include ActiveModel::Model\n include Virtus.model\n include ResourceRows\n\n row_model ProgramDeta... | ruby | chosen |
[
{
"from": "system",
"value": "Print blank line after entering password\n\nThis prevents the message from appearing after the \"Enter password:\"\nprompt.\n"
},
{
"from": "human",
"value": "module Arcanus::Command\n class Unlock < Base\n description 'Unlocks key so secrets can be encrypted/de... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary steps of calling CoreInterpreter in Macro Interpreter\n"
},
{
"from": "human",
"value": "require 'gene/macro/types'\nrequire 'gene/macro/handlers'\n\nclass Gene::Macro::Interpreter\n def initialize\n @handlers = Gene::Handlers::ComboHandler.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Fix assets precompile with config.assets.initialize_on_precompile = true\n"
},
{
"from": "human",
"value": "module ActiveAdmin\n module Globalize3\n class Engine < ::Rails::Engine\n initializer \"Railsyard precompile hook\", group: :assets do |app|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct key when passing destination flag\n"
},
{
"from": "human",
"value": "desc \"Create a pull request from the current branch to the application's designated deploy branch.\"\ncommand 'pull-request' do |c|\n config = Octopolo::Config.parse\n\n c.desc \... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing require statements to RequestAuthenticator.\n"
},
{
"from": "human",
"value": "# https://services.tineye.com/developers/tineyeapi/authentication.html\n\nmodule Tinplate\n class RequestAuthenticator\n\n def initialize(action, params = {}, image_name =... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Gradle daemon for user\n\nIn CI environment, Gradle daemons are discouraged.\n\nSee https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:ways_to_disable_gradle_daemon\n\nThis resolves https://github.com/travis-ci/travis-ci/issues/8205\n"
},
{
"from":... | ruby | chosen |
[
{
"from": "system",
"value": "Define Application.config.secret_key_base for the test environment\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Your secret key is used for verifying the integrity of signed cookies.\n# If you change this key, a... | ruby | chosen |
[
{
"from": "system",
"value": "Rename deprecated config.serve_static_assets to config.serve_static_files\n"
},
{
"from": "human",
"value": "Dummy::Application.configure do\n # Settings specified here will take precedence over those in config/application.rb\n\n # The test environment is used exc... | ruby | chosen |
[
{
"from": "system",
"value": "Fix cyrilic names for attach\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nclass AttachUploader < CarrierWave::Uploader::Base\n\n # Include RMagick or MiniMagick support:\n # include CarrierWave::RMagick\n # include CarrierWave::MiniMagick\n\n # Choose... | ruby | chosen |
[
{
"from": "system",
"value": "Fix image URL's when base tag is an invalid URL\n\nFixes #108.\n"
},
{
"from": "human",
"value": "require 'link_thumbnailer/scrapers/default/base'\nrequire 'link_thumbnailer/models/image'\n\nmodule LinkThumbnailer\n module Scrapers\n module Default\n class ... | ruby | chosen |
[
{
"from": "system",
"value": "Improve payment method factory in sample data by removing constantize\n"
},
{
"from": "human",
"value": "require \"tasks/sample_data/addressing\"\nrequire \"tasks/sample_data/logging\"\n\nclass PaymentMethodFactory\n include Logging\n include Addressing\n\n def c... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake to development dependencies\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), 'lib', 'jamespath', 'version')\n\nGem::Specification.new do |spec|\n spec.name = 'jamespath'\n spec.version = Jamespath::VERSION\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Install VIM and some useful tools. This was pulled from Optimize. It's\nawesome\n\n\nFormer-commit-id: f1eb9a00f5a1717a28640003b2db582d029038c9"
},
{
"from": "human",
"value": "#Make sure that this recipe only runs on ubuntu systems\nif platform?(\"ubuntu\")\n\nen... | ruby | chosen |
[
{
"from": "human",
"value": "Set RSS to serve UTF8 information"
},
{
"from": "gpt",
"value": "module Jekyll\n module Commands\n class Serve\n\n class << self\n alias :_original_webrick_options :webrick_options\n end\n\n def self.webrick_options(config)\n options ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert part of authentication for explicit returns\n"
},
{
"from": "human",
"value": "module Authenticate\n extend ActiveSupport::Concern\n\n def self.getKeyUser(token)\n ApiKey.where(access_token: token.split(\" \")[2]).pluck('user_id')\n end\n\n def self.ge... | ruby | chosen |
[
{
"from": "system",
"value": "Fix up execution click log\n"
},
{
"from": "human",
"value": "# Controller for execution logs\nclass ExecutionsController < ApplicationController\n before_action :verify_login\n\n # POST /executions\n def create\n unless GalleryConfig.instrumentation.enabled\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix | Prevent malformed XSLT documents\n"
},
{
"from": "human",
"value": "module Setup\n module XsltTemplateCommon\n def output_method(xml_doc = code)\n xml_doc ||= code\n xml_doc = Nokogiri::XML(xml_doc) unless xml_doc.is_a?(Nokogiri::XML::Document)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add testing for musical work duration\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nrequire 'test_helper'\n\nrequire 'musical_work' if !defined?(AudioFile)\n\ndescribe Api::MusicalWorkRepresenter do\n\n let(:musical_work) { FactoryGirl.create(:musical_wo... | ruby | chosen |
[
{
"from": "system",
"value": "Remove \"git pull\" called during \"convert\"\n\nI don't think we should call \"git pull\" during \"convert\" if the work\ndirectory exists, only do a reset. The reason is that \"pull\" can change\nthe source code you are working with under your hands, which is really\nbad duri... | ruby | chosen |
[
{
"from": "system",
"value": "Update Cucumber steps for within scope\n"
},
{
"from": "human",
"value": "include CustomA11yMatchers\n\nThen(/^the page should be accessible$/) do\n expect(page).to be_accessible\nend\n\nThen(/^the page should not be accessible$/) do\n expect(page).to_not be_acces... | ruby | chosen |
[
{
"from": "system",
"value": "Add respond_to_missing? on NullObject for 1.9 compatability\n"
},
{
"from": "human",
"value": "module FactoryGirl\n # @api private\n class NullObject < ::BasicObject\n def initialize(methods_to_respond_to)\n @methods_to_respond_to = methods_to_respond_to.m... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure nginx log files are in place before trying to restart it\n"
},
{
"from": "human",
"value": "namespace :ci do\n\n task :build => %w( sunspot:stop sunspot:start spec jasmine:ci cucumber:all )\n\n task :default => :build\n \n task :reload_nginx_conf do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check if Content-Type is present before running key conversion\n"
},
{
"from": "human",
"value": "module Ninetails\n class KeyConversion\n\n def initialize(app)\n @app = app\n end\n\n def call(env)\n @status, @headers, @response = @app.call(env)\... | ruby | chosen |
[
{
"from": "system",
"value": "Test that proper number of : exist\n\n\ngit-svn-id: b3d365f95d627ddffb8722c756fee9dc0a59d335@114 64fbf49a-8b99-41c6-b593-eb2128c2192d\n"
},
{
"from": "human",
"value": "# $Id$\n\n$:.unshift File.join(File.dirname(__FILE__), \"../..\", \"lib\")\n\nrequire 'test/unit'... | ruby | chosen |
[
{
"from": "system",
"value": "Update CicCode importer rake task\n"
},
{
"from": "human",
"value": "require 'csv'\ndesc \"Import Business Codes from /app/assets/csv/cic_codes.csv\"\nnamespace :import do\n task :cic_codes => :environment do\n counter = 0\n CSV.foreach(\"#{Rails.root}/app/as... | ruby | chosen |
[
{
"from": "system",
"value": "Deploy hook can now get git user email\n"
},
{
"from": "human",
"value": "require 'net/http'\nrequire 'uri'\n\nunless Capistrano::Configuration.respond_to?(:instance)\n abort \"capistrano_deploy_webhook requires Capistrano 2\"\nend\n\nCapistrano::Configuration.inst... | ruby | chosen |
[
{
"from": "system",
"value": "Support multiple versions of Swift in podspec\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n \n s.name = \"Tabman\"\n s.platform = :ios, \"9.0\"\n s.requires_arc = true\n s.swift_version = \"4.0\"\n\n s.version = \"2.4.2\"\n s.summ... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up assets on rollback\n"
},
{
"from": "human",
"value": "module Heroku::Deploy::Task\n class CompileAssets < Base\n include Heroku::Deploy::Shell\n\n def before_push\n # TODO: Recomend that this is off?\n # initialize_on_precompile = shell %{b... | ruby | chosen |
[
{
"from": "system",
"value": "Use Namespace for fetch a subset of translations\n"
},
{
"from": "human",
"value": "module Rack\n module I18n\n class Javascript\n def initialize(app)\n @app = app\n end\n\n def call(env)\n if env['PATH_INFO'] =~ /\\/javascripts\\/lo... | ruby | chosen |
[
{
"from": "system",
"value": "Install prereqs before running pep8 or pylint\n"
},
{
"from": "human",
"value": "\n[:lms, :cms, :common].each do |system|\n report_dir = report_dir_path(system)\n directory report_dir\n\n desc \"Run pep8 on all #{system} code\"\n task \"pep8_#{system}\" ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Bump NewRelic dependency to 3.5.3.25 for security\"\n\nThis reverts commit 80b6b55905067047d1a8b9c5b454a32deebb26d6.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = %q{padrino-rpm}\n \n s.version =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where new log files were not writable"
},
{
"from": "human",
"value": "class LogJob < ApplicationJob\n queue_as :default\n\n def perform(*args)\n log_files = %w[ cron delayed_job ]\n log_files << \"#{ Rails.env }\"\n\n log_files.each do |log_file|... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary utf-8 coding comment\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"flippant/version\"\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary nils, and keep code within 80 columns.\n"
},
{
"from": "human",
"value": "require 'dm-core'\n\nif RUBY_VERSION >= '1.9.0'\n require 'csv'\nelse\n require 'fastercsv' # must be ~>1.5\n CSV = FasterCSV unless defined?(CSV)\nend\n\nmodule DataMap... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.