conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Include helpers under :action_view\nLoad ActiveRecord extensions.\n"
},
{
"from": "human",
"value": "require \"loudmouth\"\nrequire \"rails/routes\"\nrequire \"extensions/helper\"\n\nmodule Loudmouth\n class Engine < Rails::Engine\n config.loudmouth = Loudmouth\... | ruby | chosen |
[
{
"from": "system",
"value": "Add date to LARA arg-block dashboard API\n\n[#112541903]\n"
},
{
"from": "human",
"value": "class DashboardRunlist\n def initialize(endpoint_urls, page_id)\n @runs = Run.where(remote_endpoint: endpoint_urls).map do |run|\n {\n endpoint_url: run.remot... | ruby | chosen |
[
{
"from": "system",
"value": "Allow public access to registered applications\n"
},
{
"from": "human",
"value": "require \"rubygems\"\nrequire \"pathname\"\n\n$:.unshift(Pathname(__FILE__).dirname.parent.expand_path.to_s)\n\nrequire \"harbor/version\"\nrequire \"harbor/application\"\nrequire \"ha... | ruby | chosen |
[
{
"from": "system",
"value": "Use absolute path in include\n"
},
{
"from": "human",
"value": "require 'json'\n# External libs\nrequire 'sinatra'\n# Internal modules\nrequire 'tradera.rb'\n\nget '/' do\n redirect '/index.html'\nend\n\nget '/users/:id/items' do\n c = Tradera.new\n response = c.... | ruby | chosen |
[
{
"from": "system",
"value": "Update min bundler specs for security\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n spec.name = \"minimal-mistakes-jekyll\"\n spec.version = \"4.4.1\"\n spec.authors = [... | ruby | chosen |
[
{
"from": "system",
"value": "Include Comparable module and delegate it to the target object\n"
},
{
"from": "human",
"value": "# Lazy object wrapper.\n#\n# Pass a block to the initializer, which returns an instance of the target\n# object. Lazy object forwards all method calls to the target. Th... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to set impl name manually using WatirSpec.implementation=\n"
},
{
"from": "human",
"value": "module WatirSpec\n class << self\n attr_accessor :browser_args, :persistent_browser, :unguarded\n\n def html\n File.expand_path(\"#{File.dirname(__FI... | ruby | chosen |
[
{
"from": "system",
"value": "Add more attr_accessors to Blob - Closes GH-33\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), \"resource\")\nmodule Octopi\n class Blob < Base\n attr_accessor :text\n include Resource\n set_resource_name \"blob\"\n\n resour... | ruby | chosen |
[
{
"from": "system",
"value": "Use gems@shopify.com email address in gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'liquid/c/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Use shorthand syntax to define custom exceptions\n"
},
{
"from": "human",
"value": "module Poms\n module Errors\n # Custom Error class to signal missing authorization attributes\n AuthenticationError = Class.new(StandardError)\n\n # Base exception for all ... | ruby | chosen |
[
{
"from": "system",
"value": "Update test to add more case with finalized order with no line items\n\nThose empty order but finalized must be returned by the API\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe SearchOrders do\n let!(:distrib... | ruby | chosen |
[
{
"from": "system",
"value": "FIx for negative balance mailer spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe 'Negative balance mailer', type: :mailer do\n it 'sends a mail when balance is negative' do\n user = FactoryGirl.create :user\n invoice = FactoryGirl.cr... | ruby | chosen |
[
{
"from": "system",
"value": "Remove class variables from Tabber\n\n@@vars are generally considered a Bad Thing in Ruby.\nSee http://bit.ly/1kcit9V for a quick rationale.\n"
},
{
"from": "human",
"value": "module Synx\n class Tabber\n\n @@options = {}\n @@tabbing = 0\n\n class << self\... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec file with summary, description, and homepage\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'keno/version'\n\nGem::Specification.new do |... | ruby | chosen |
[
{
"from": "system",
"value": "[Cucumber] Add creating of fixtures before scenarios\n\nSigned-off-by: Daniel Schmidt <95584f82d85fd95b525d0d56fac4758a79f7199d@adytonsystems.com>\n"
},
{
"from": "human",
"value": "require 'cucumber'\nrequire 'aruba/cucumber'\n\nrequire 'rspec/expectations'\n\nFIXT... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Longer timeout for travis to finish `rake bootstrap`\"\n\nThis reverts commit 846d47359e970bce0e898d82569687b7d601b6a0.\n"
},
{
"from": "human",
"value": "require 'aruba/cucumber'\n\nENV['PATH'] = \"#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}... | ruby | chosen |
[
{
"from": "system",
"value": "Work around broken Open3 on JRuby 1.7.16\n"
},
{
"from": "human",
"value": "require 'tempfile'\nrequire 'fileutils'\nrequire 'open3'\nrequire 'reek/cli/application'\n\nclass ReekWorld\n def run(cmd)\n out, err, status = Open3.capture3(cmd)\n @last_stdout = ou... | ruby | chosen |
[
{
"from": "system",
"value": "Rearrange Child and Parent definitions so Child is in scope when we delegate to it from Parent\n"
},
{
"from": "human",
"value": "require File.expand_path('../../spec_helper', __FILE__)\n\nclass Parent < ActiveRecord::Base\n def self.column_names; %w(one two) end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use Open3.popen3 in execution of engine.\n"
},
{
"from": "human",
"value": "module USI\n class Session\n attr_reader :engine\n\n def initialize(engine)\n @engine = engine\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "require \"open3\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add unit tests for TopicExchange class\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe GovukSeedCrawler::TopicExchange do\n subject { GovukSeedCrawler::TopicExchange.new(options) }\n\n let(:options) { {} }\n\n let(:mock_bunny) {\n double(:moc... | ruby | chosen |
[
{
"from": "system",
"value": "Make the UserDbManager responsible for creating user accounts"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Util::UserDbManager do\n let(:username) { 'testuser' }\n let(:original_password) { 'original_password' }\n let(:dummy_password) { ENV... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for /api/v1/playlists route\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe \"Api::V1::Playlists\", type: :request do\n\n\n before(:each) do\n @user = User.create(\n username: \"NewUser\",\n password: \"password\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set session cookie if logged in.\n"
},
{
"from": "human",
"value": "require 'net/https'\nrequire 'json'\n\nmodule BrickFTP\n class HTTPClient\n class Error < StandardError\n def initialize(response)\n error = JSON.parse(response.body)\n super ... | ruby | chosen |
[
{
"from": "system",
"value": "Add description to views generator\n"
},
{
"from": "human",
"value": "module Doorkeeper\n module Generators\n class ViewsGenerator < Rails::Generators::Base\n source_root File.expand_path('../../../../app/views/doorkeeper', __FILE__)\n\n def manifest\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused gff3 helper methods\n"
},
{
"from": "human",
"value": "require 'bio'\n\nmodule GenomerPluginView::GffRecordHelper\n\n GFF_TO_TABLE = {\n 'gene' => {\n 'ID' => 'locus_tag',\n 'Name' => 'gene'\n },\n 'CDS' => {\n 'ID' =... | ruby | chosen |
[
{
"from": "system",
"value": "Update link to list of Github Actions envs\n"
},
{
"from": "human",
"value": "# https://help.github.com/en/articles/virtual-environments-for-github-actions#environment-variables\nmodule KnapsackPro\n module Config\n module CI\n class GithubActions < Base\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Replace revision padding magic number with a constant\n\nAlso remove hard-coded table name from #revision_table? test\n"
},
{
"from": "human",
"value": "module Spontaneous\n module DataMapper\n class ContentTable\n attr_reader :name, :database\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct process exit code check\n"
},
{
"from": "human",
"value": "require 'tempfile'\nrequire 'open3'\n\nmodule Asciidoctor\n module Diagram\n # @private\n module Cli\n def self.run(*args)\n stdout, stderr, status = Open3.capture3(*args)\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Include old maruku in comparison script\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby\n\nputs \"Maruku:\"\nputs `bin/maruku -o - --html-frag #{ARGV[0]}`\n\nputs \"\\n\\nRedcarpet:\"\nputs `redcarpet #{ARGV[0]}`\n\nputs \"\\n\\nKramdown:\"\nputs `kramdown #... | ruby | chosen |
[
{
"from": "system",
"value": "Add brackets around block in Filter::create.\n"
},
{
"from": "human",
"value": "require 'active_model'\n\nmodule FilterFactory\n class Filter\n include ActiveModel::Conversion\n extend ActiveModel::Naming\n\n attr_reader :fields\n\n CONDITIONS = [:eq, :... | ruby | chosen |
[
{
"from": "system",
"value": "Add fancybox.css to precompile list\n"
},
{
"from": "human",
"value": "module FassetsPresentations\n class Engine < Rails::Engine\n isolate_namespace FassetsPresentations\n initializer :assets do |config|\n Rails.application.config.assets.precompile += %... | ruby | chosen |
[
{
"from": "system",
"value": "Add Silk (Kindle) to the user agent list\n"
},
{
"from": "human",
"value": "module Mobylette\n # List of mobile agents\n #\n MOBILE_USER_AGENTS = 'palm|blackberry|nokia|phone|midp|mobi|symbian|chtml|ericsson|minimo|' +\n 'audiovox|motorola|samsung|telit|upg1|... | ruby | chosen |
[
{
"from": "system",
"value": "Allow overriding test options for schemes\n"
},
{
"from": "human",
"value": "module Xcode\n\n class Workspace\n def to_xcodebuild_option\n \"-workspace \\\"#{self.path}\\\"\"\n end\n end\n\n class Project\n def to_xcodebuild_option\n \"-project... | ruby | chosen |
[
{
"from": "system",
"value": "Add a comment to be explicit about the cache time.\n"
},
{
"from": "human",
"value": "require \"time\"\n\nclass OrganisationRegistry\n CACHE_LIFETIME = 12 * 3600\n\n def initialize(index, clock = DateTime)\n @index = index\n @clock = clock\n @cache_update... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unintended tabs in spec.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe :complex_hash, :shared => true do\n it \"is static\" do\n Complex(1).hash.should == Complex(1).hash\n Complex(1, 0).ha... | ruby | chosen |
[
{
"from": "system",
"value": "Use the old hash syntax to support older Rubies.\n"
},
{
"from": "human",
"value": "if defined?(::Sequel)\n Appsignal.logger.info(\"Loading Sequel (#{ Sequel::VERSION }) integration\")\n\n module Appsignal\n module Integrations\n module Sequel\n # A... | ruby | chosen |
[
{
"from": "system",
"value": "Use extend instead of include.\n"
},
{
"from": "human",
"value": "module Cargo\n VERSION = \"0.0.2\"\n\n def import(file)\n unless file.match(/\\.rb$/)\n file = \"#{file}.rb\"\n end\n\n load(file, true)\n\n Thread.current[:cargo].tap do\n Thr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for EOFError NoMethodError issue\n"
},
{
"from": "human",
"value": "###########################################################################\n##\n## http_streaming_client\n##\n## Ruby HTTP client with support for HTTP 1.1 streaming, GZIP compressed\n## stream... | ruby | chosen |
[
{
"from": "system",
"value": "Add Cache-Control headers to response\n"
},
{
"from": "human",
"value": "require 'sinatra/base'\nrequire 'mountable_image_server/image_locator'\nrequire 'mountable_image_server/image_processor'\n\nmodule MountableImageServer\n class Server < Sinatra::Base\n get ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rspec mock framework adapter to new API for RSpec::Mocks\n"
},
{
"from": "human",
"value": "require 'rspec/mocks'\n\nmodule RSpec\n module Core\n module MockFrameworkAdapter\n\n include RSpec::Mocks::ExampleMethods\n\n def _setup_mocks\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix post-suffix tests for to_remove\n\nNow that we're ignoring suffixes.\n"
},
{
"from": "human",
"value": "require \"ubuntu_unused_kernels/version\"\nrequire \"open3\"\n\nmodule UbuntuUnusedKernels\n PACKAGE_PREFIXES = %w{linux-image linux-headers}\n VERSION_GLOB... | ruby | chosen |
[
{
"from": "system",
"value": "Allow several values as flow"
},
{
"from": "human",
"value": "module Vidibus\n module Oauth2Server\n class Oauth2ServerError < StandardError; end\n\n class MissingTypeError < Oauth2ServerError; end\n class UnsupportedTypeError < Oauth2ServerError; end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove dsl.rb from default required modules\n"
},
{
"from": "human",
"value": "#--\n# Copyright (C)2011 Tony Arcieri\n# You can redistribute this under the terms of the Ruby license\n# See file LICENSE for details\n#++\n\nrequire \"cool.io/version\"\nrequire \"cool.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove URL block from config.\n\nURL support is planned and this block was accidentally included in a pull request.\n"
},
{
"from": "human",
"value": "require 'vagrant'\nrequire 'vagrant/util/downloader'\nrequire 'tempfile'\n\nmodule VagrantPlugins\n module CaCerti... | ruby | chosen |
[
{
"from": "system",
"value": "Remove restrictive version stuff for rails 5.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 'kitcat/version'\n\nGem::Specification.new do |gem|\n gem... | ruby | chosen |
[
{
"from": "system",
"value": "Add require dependency so null compiler test runs with ruby directly\n"
},
{
"from": "human",
"value": "require_relative 'test_helper'\n\nmodule Rack\n module Zippy\n class NullAssetCompilerTest < TestCase\n\n def test_never_wants_to_compile_assets\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary 'rubygems' require statement.\n"
},
{
"from": "human",
"value": "require 'observer'\n\nrequire 'rubygems'\nrequire 'bundler/setup'\nBundler.require\n\nrequire 'highline'\n\nmodule Pentago; end\n\nrequire_relative 'pentago/board'\nrequire_relative ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow Verdict.discovery to be called multiple times without exceptions\n\nSince we're using `load` instead of `require`, it's important to clear\nthe repository cache before searching for experiment definitions again.\n"
},
{
"from": "human",
"value": "require 'logg... | ruby | chosen |
[
{
"from": "system",
"value": "Add the missing fileutils require\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n$LOAD_PATH.unshift(__dir__)\n\nrequire 'hashie'\nrequire 'tilt'\nrequire 'yaml'\n\nrequire 'dimples/frontable'\n\nrequire 'dimples/archive'\nrequire 'dimples/catego... | ruby | chosen |
[
{
"from": "system",
"value": "Use the full license name\n"
},
{
"from": "human",
"value": "name 'mingw'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense 'apache2'\ndescription 'Installs a mingw/msys based toolchain on windows'\nlong_description IO.read(File.join(F... | ruby | chosen |
[
{
"from": "system",
"value": "Delete queues and exchange after test run\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass TestConsumer < Msgr::Consumer\n def index\n puts \"<<< #{payload}\"\n end\nend\n\ndescribe Msgr do\n before do\n Msgr.logger = nil\n Msgr.logger.l... | ruby | chosen |
[
{
"from": "system",
"value": "Fix detailed guide test for new paths\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass DetailedGuideIntegrationTest < ActionDispatch::IntegrationTest\n test \"meta data tag is present\" do\n detailed_guide = create(:published_detailed_guide, sum... | ruby | chosen |
[
{
"from": "human",
"value": "Add content scanning test for user mail content\n\nThis commit adds a new test file with the intent of scanning content\nfor malformed patterns that may prevent certain approaches from\nworking as intended.\n\nFirst implementation of this test scans any html mail content files\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic require for operations.\n"
},
{
"from": "human",
"value": "\nmodule Sweep\n\tAPP_NAME = 'sweep'\n\tVERSION = '0.0.0'\n\tCOPYRIGHT = \"© 2013\"\n\tConfig = { \n\t\t:HostInterval => 10, \n\t\t:PortInterval => 5,\n\t\t:AliveScanners => 10,\n\t\t:TCPScanners =... | ruby | chosen |
[
{
"from": "system",
"value": "AACT-219: Add indexes to the StudyXmlRecords table"
},
{
"from": "human",
"value": "class CreateIndices < ActiveRecord::Migration\n\n def change\n\n add_index :studies, :nct_id\n add_index :reported_events, :nct_id\n add_index :reported_events, :event_typ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove deprecation warning using rails 4.0.0.rc1.\n"
},
{
"from": "human",
"value": "require 'csv'\nmodule CsvRails\n module ActiveModel\n module ClassMethods\n def to_csv(opts={})\n fields = opts[:fields] || csv_fields\n header = csv_header(f... | ruby | chosen |
[
{
"from": "human",
"value": "Patch Arel Grouping to provide more functionality\n\nThis allows arel attributes (that are groups) to be used\nin where clauses and sort clauses\n"
},
{
"from": "gpt",
"value": "# this is from https://github.com/rails/arel/pull/435\n# this allows sorting and where cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add ota42y to authors in gemspec"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"committee\"\n s.version = \"3.0.0\"\n\n s.summary = \"A collection of Rack middleware to support JSON Schema.\"\n\n s.authors ... | ruby | chosen |
[
{
"from": "system",
"value": "Set the status to pending before running checks\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'json'\nrequire 'octokit'\n\n# Set up octokit client\nbefore do\n OCTOKIT_SECRET = ENV[\"GH_AUTH_TOKEN\"]\n @client ||=Octokit::Client.new(:access_token =... | ruby | chosen |
[
{
"from": "system",
"value": "Use start_with? to detect JSON\n"
},
{
"from": "human",
"value": "class LogStashLogger < ::Logger\n \n HOST = ::Socket.gethostname\n \n def initialize(host, port, socket_type=:udp)\n super(::LogStashLogger::Socket.new(host, port, socket_type))\n end\n \n d... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to root level for the release task.\n"
},
{
"from": "human",
"value": "require \"heroku/command/base\"\n\nclass Heroku::Command::Release < Heroku::Command::Base\n # release\n #\n # Release.\n #\n def release\n puts \"Test\"\n end\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove 'require' statement loading Pry\n"
},
{
"from": "human",
"value": "require 'pry'\nmodule Servitude\n module PrettyPrint\n\n def self.configuration_lines( config, pre='', filters=[] )\n return [] if config.nil? || config.empty?\n\n formatted = fo... | ruby | chosen |
[
{
"from": "human",
"value": "Fix older versions of FreeBSD to build packages from ports.\n\nSigned-off-by: jtimberman <d6955d9721560531274cb8f50ff595a9bd39d66f@opscode.com>\n"
},
{
"from": "gpt",
"value": "#\n# Cookbook Name:: freebsd\n# Libraries:: package_provider\n#\n# Copyright 2012, ZephirW... | ruby | chosen |
[
{
"from": "system",
"value": "Use of custom objects is not necessary here\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'omniauth/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Live Interior 3D Pro.\n"
},
{
"from": "human",
"value": "cask 'live-interior-3d-pro' do\n version :latest\n sha256 :no_check\n\n url 'https://s3.amazonaws.com/belightsoft/LiveInterior3DPro.dmg'\n name 'Live Interior 3D Pro'\n homepa... | ruby | chosen |
[
{
"from": "system",
"value": "Improve RegistrationsController code organizartion and remove redundancy\n"
},
{
"from": "human",
"value": "# app/controllers/registrations_controller.rb\nclass RegistrationsController < Devise::RegistrationsController\n private\n def sign_up_params\n params.re... | ruby | chosen |
[
{
"from": "system",
"value": "Add validation tests for User\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe User do\n\n describe \"Database tests\" do\n it { should have_db_column(:user_name).of_type(:string) }\n it { should have_db_column(:email).of_type(:string) }\... | ruby | chosen |
[
{
"from": "system",
"value": "Use Pixiv.client instead of Pixiv.new\n"
},
{
"from": "human",
"value": "def init\n id = ENV['PIXIV_ID'] or warn 'PIXIV_ID is not set'\n password = ENV['PIXIV_PASSWORD'] or warn 'PIXIV_PASSWORD is not set'\n abort unless id && password\n\n proxy =\n begin\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix HyperLogLog test script for new redis-rb API.\n"
},
{
"from": "human",
"value": "# hll-err.rb - Copyright (C) 2014 Salvatore Sanfilippo\n# BSD license, See the COPYING file for more information.\n#\n# Check error of HyperLogLog Redis implementation for different... | ruby | chosen |
[
{
"from": "system",
"value": "Move Snapshooter temp file logic to a helper method\n"
},
{
"from": "human",
"value": "require 'interactor/shared'\nrequire 'tempfile'\nrequire 'fileutils'\n\nmodule Interactor\n module Snapshooter\n class << self\n include Shared\n\n def create_screen... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade to the latest development gems\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/oembed/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Alex Soulim\"]\n gem.email = [\"soulim@gmai... | ruby | chosen |
[
{
"from": "system",
"value": "Create method that takes an integer\n"
},
{
"from": "human",
"value": "# Good Guess\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Your Solution Below\n"
},
{
"from": "gpt",
"value": "# Good Guess\ndef good_guess?(integer)\n if integer == 4... | ruby | chosen |
[
{
"from": "system",
"value": "Downgrade bundler version for compatible to 1.9.x\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'noir/version'\n\nGem::Specification.new do |spec|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Define custom subject on SesAdapter\n"
},
{
"from": "human",
"value": "require 'yell'\nrequire 'aws-sdk'\nrequire 'pry-byebug'\n\nclass SesAdapter < Yell::Adapters::Base\n include Yell::Helpers::Base\n include Yell::Helpers::Formatter\n\n attr_accessor :ses, :bod... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out many lines to simplify dependency\n"
},
{
"from": "human",
"value": "require 'simplecov'\n\nmodule SimpleCov::Configuration\n def clean_filters\n @filters = []\n end\nend\n\nSimpleCov.configure do\n clean_filters\n load_adapter 'test_frameworks'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Include simplecov for future testing\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'bundler'\nbegin\n Bundler.setup(:default, :development)\nrescue Bundler::BundlerError => e\n $stderr.puts e.message\n $stderr.puts \"Run `bundle install` to insta... | ruby | chosen |
[
{
"from": "system",
"value": "Implement check for presence of access token\n"
},
{
"from": "human",
"value": "module G5AuthenticatableApi\n module GrapeHelpers\n def authenticate_user!\n throw :error, status: 401, headers: {'WWW-Authenticate' => 'Bearer'}\n end\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Remove defensive 'upcase' that errored on nil\n\nA lowercase letter shouldn't have been generated, it would\nonly ever have been typed in, so rather than a verbose fix,\nlet's not worry about it.\n"
},
{
"from": "human",
"value": "module PaginateAlphabetically\n mo... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug in deleting active record sessions\n"
},
{
"from": "human",
"value": "module RackCAS\n module ActiveRecordStore\n class Session < ActiveRecord::Base\n attr_accessible :id, :data, :cas_ticket\n end\n\n def self.destroy_session_by_cas_ticket(cas... | ruby | chosen |
[
{
"from": "system",
"value": "Allow refinerycms-core version from >= 3.0.0 to < 4.0"
},
{
"from": "human",
"value": "# Encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = %q{refinerycms-acts-as-indexed}\n s.version = %q{... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6859svn\n\nHandBrakeCLI Nightly v6859svn built 2015-02-02.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6822svn'\n sha256 '06b3024888643041779f4ac301266739ef6a6c4a30972a951aec881fb28f50c3'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Print hello world with ncurses\n"
},
{
"from": "human",
"value": "#! /usr/bin/env ruby\n\nputs \"hello world\"\n"
},
{
"from": "gpt",
"value": "#! /usr/bin/env ruby\n\nrequire 'ncurses'\n\nclass Life\n def initialise_screen\n Ncurses.initscr\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add geocoding specs for agency model\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Agency, type: :model do\n it \"is invalid without a name\" do\n agency = build(:agency, name: nil)\n expect(agency).to be_invalid\n end\n\n it \... | ruby | chosen |
[
{
"from": "system",
"value": "Add course model test (for factory)\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe Course, :type => :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n"
},
{
"from": "gpt",
"value": "require 'rails_he... | ruby | chosen |
[
{
"from": "system",
"value": "Test that description must be provided\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Invite do\n it 'should always have a key of reasonable length after creation' do\n invite = Invite.new\n invite.key.should_not be_empty\n invite.key... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete gsubbing of whitespace\n"
},
{
"from": "human",
"value": "# csv do\n# grain_type :name\n# bhc_site :state, :name => 'Site'\n# bin_grade :code\n# \n# trade_price_per_ton\n# traded_quantity\n# created_at \n# end\n\nmodule Comma\n \n c... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for the SessionsController\n\nDescribe the redirections after sign in with controller specs.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe SessionsController do\n it { is_expected.to be_kind_of Devise::SessionsController }\nend\n"
... | ruby | chosen |
[
{
"from": "human",
"value": "Add system test for conceal event group flow (currently skipped pending resolution of transactional fixtures issue).\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nrequire 'rails_helper'\n\n# Skipped pending resolution of transactional fixtures iss... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec to support faraday >= 1.0.1\n\nFaraday was updated to 1.0.0 last year- allow newer versions to be supported."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/phaxio/version', __FILE__)\n\nGem::Specification.... | ruby | chosen |
[
{
"from": "human",
"value": "Add mdJson readers for 'bearingDistanceResolution'\ninclude minitest\n"
},
{
"from": "gpt",
"value": "# mdJson 2.0 writer - bearing distance resolution\n\n# History:\n# Stan Smith 2017-10-20 original script\n\nrequire 'jbuilder'\n\nmodule ADIWG\n module Mdtransla... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for testing the webserver restart.\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe Backend::WebserverController do\n before(:each) do\n @admin = create(:admin)\n session[:admin_id] = @admin.id\n end\n\n describe 'POST restart' do... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extra contexts and create a common one\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe EmsCloudHelper do\n def role_allows(_)\n true\n end\n\n before do\n @ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zo... | ruby | chosen |
[
{
"from": "system",
"value": "Update TortoiseHg to version 3.7.2\n\nUpdate TortoiseHg to version 3.7.2\n"
},
{
"from": "human",
"value": "cask 'tortoisehg' do\n version '3.2.4'\n sha256 'c529539e20f4ff2f6d181a5c7f64ad5dcd9346605011ab4c3725c7cedf6b5a8c'\n\n url \"https://bitbucket.org/tortoise... | ruby | chosen |
[
{
"from": "system",
"value": "Make DryRunnable wrap Agent instead of extending an Agent instance\n\nThis allows DryRunnable to work with other concerns that override the\nbehavior of create_event(), such as SortableEvents.\n"
},
{
"from": "human",
"value": "module DryRunnable\n def dry_run!\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Correct order and punctuation of plain summaries\n\nPreviously punctuation was stripped as commas were inserted. Negated\npoints should also be listed immediately after the contrasting ones.\n"
},
{
"from": "human",
"value": "module Paragraphizer\n def self.generat... | ruby | chosen |
[
{
"from": "human",
"value": "Add host methods for audit.\n"
},
{
"from": "gpt",
"value": "#\n# Copyright (C) 2013 Conjur Inc\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"), to deal in\n#... | ruby | chosen |
[
{
"from": "system",
"value": "Increment version number as hotfix version doesn't work\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |gem|\n gem.name = \"pugbot\"\n gem.version = \"0.1.1.hotfix.1\"\n gem.authors = [\"Xzanth\"]\n gem.description = \"Pug bo... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to version 0.0.3\n"
},
{
"from": "human",
"value": "version = \"0.0.2\"\n\nPod::Spec.new do |s|\n s.name = \"UICollectionViewRightAlignedLayout\"\n s.version = version\n s.summary = \"A layout for UICollectionView that aligns the ... | ruby | chosen |
[
{
"from": "system",
"value": "Add playlist and request support to Nightbot API\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nclass Api::V1::NightbotController < ApplicationController\n def execute\n # Usage: !songs current/delete/list/playlist/next/request/skip/save/promo... | ruby | chosen |
[
{
"from": "system",
"value": "Add custom session controller for API-based login/logout\n"
},
{
"from": "human",
"value": "class Api::V1::SessionsController < Devise::SessionsController\n respond_to :json\n\n def create\n resource = warden.authenticate!(:scope => resource_name, :recall => :l... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.