conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add erubis as dev dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'lifx/version'\n\nGem::Specification.new do |spec|\n spec.name = \... | ruby | chosen |
[
{
"from": "system",
"value": "Add information about the author\n"
},
{
"from": "human",
"value": "# The MIT License (MIT)\n# \n# Copyright (c) 2017 Jakaria Blaine\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a more robust directory handling\n"
},
{
"from": "human",
"value": "module Surely\n class Daemon\n def initialize(env)\n @env = env\n end\n\n def start\n directory = @env['SURELY_DIRECTORY'] || `defaults read com.apple.screencapture location`... | ruby | chosen |
[
{
"from": "system",
"value": "Add Cli class to handle user interactions\n"
},
{
"from": "human",
"value": "require \"drawing_tool/version\"\n\nmodule DrawingTool\n # Your code goes here...\nend\n"
},
{
"from": "gpt",
"value": "require 'drawing_tool/version'\nrequire 'drawing_tool/ca... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for Gitlab::Plugin [ci skip]\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Gitlab::Plugin do\n describe '.execute' do\n let(:data) { Gitlab::... | ruby | chosen |
[
{
"from": "system",
"value": "Sort directories to iterate through.\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nmodule FileHelpers\n #\n # Directory Paths\n #\n \n def default_input_directory\n File.join root_directory, 'docs'\n end\n \n def default_output_directory\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move basic matcher initialization into a module\n"
},
{
"from": "human",
"value": "# Copyright (C) 2016 Colin Fulton\n# All rights reserved.\n#\n# This software may be modified and distributed under the\n# terms of the three-clause BSD license. See LICENSE.txt\n# (l... | ruby | chosen |
[
{
"from": "system",
"value": "Add defined words create route\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n devise_for :users\n # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html\nend\n"
},
{
"from": "gpt",
"va... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec file for planned deprecations\n"
},
{
"from": "gpt",
"value": "require_relative '../spec_helper'\n\ndescribe 'Deprecations' do\n def self.changed_constant(from:, to:)\n describe to do\n it 'is still accessible by its old name' do\n expect(f... | ruby | chosen |
[
{
"from": "system",
"value": "Remove license length check; it interferes with storing incomplete forms\n"
},
{
"from": "human",
"value": "class Project < ActiveRecord::Base\n STATUS_CHOICE = ['?', 'Met', 'Unmet']\n validates :license, length: {minimum: 2}\n\n validates_inclusion_of :license_l... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Remove extraneous condition for Erubi\"\n\nThis reverts commit c0827b2fff1b561abac620a6b2a548fb25b1bbc9.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire 'haml/template/options'\n\n# check for a compatible Rails version when Haml is... | ruby | chosen |
[
{
"from": "system",
"value": "Add dictionary name to the config defaults.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'thread'\nrequire 'csv'\nrequire 'twitter'\nrequire 'marky_markov'\n\n$:.unshift(File.dirname(__FILE__))\n\nrequire 'ebooks/version'\nrequire 'ebooks/core_ext'... | ruby | chosen |
[
{
"from": "system",
"value": "Modify block to require constants so it uses a relative require path\n"
},
{
"from": "human",
"value": "module Faker\n VERSION = \"1.23.0\"\n\n require 'ffaker/utils/array_utils'\n require 'ffaker/utils/module_utils'\n\n extend ModuleUtils\n\n BASE_LIB_PATH = F... | ruby | chosen |
[
{
"from": "system",
"value": "Use autoload to avoid conflicts.\n"
},
{
"from": "human",
"value": "require 'selenium/webdriver'\n\nrequire 'nativedriver/version'\nrequire 'nativedriver/android'\nrequire 'nativedriver/ios'\n\nmodule NativeDriver\n def self.for(sym, opts = {})\n bridge = case s... | ruby | chosen |
[
{
"from": "system",
"value": "Create reader for ProgramPath lines\n"
},
{
"from": "human",
"value": "class ProgramPath\n\n include ReadMap\n\n def initialize(pathfile)\n get_lines(pathfile)\n end\n\nend\n"
},
{
"from": "gpt",
"value": "class ProgramPath\n\n include ReadMap\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add something that works…rebase brain from Java\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\n#!/usr/bin/env ruby -w\n\nrequire 'rdf'\nrequire 'rdf/ntriples'\n\nclass Munger\n\n model = null\n\n def initialize ()\n get_new_model\n end\n\n def create_n... | ruby | chosen |
[
{
"from": "system",
"value": "Handle case where a Reviewer also does transcription\n"
},
{
"from": "human",
"value": "class PagesController < ApplicationController\n before_action :authenticate_user!\n\n def checkout\n @page = Page.not_checked_out.first\n current_user.checkout(@page)\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Votes controller and actions\n"
},
{
"from": "gpt",
"value": "class VotesController < ApplicationController\n before_action :require_login, only: [:create, :update]\n\n def create\n question = Question.find(params[:question_id])\n # For upvotes\n vote ... | ruby | chosen |
[
{
"from": "system",
"value": "Use CSS-only piecharts in the decorator for infra datastores\n"
},
{
"from": "human",
"value": "class StorageDecorator < MiqDecorator\n def self.fonticon\n 'fa fa-database'\n end\n\n def fileicon\n percent = v_free_space_percent_of_total == 100 ? 20 : ((v_f... | ruby | chosen |
[
{
"from": "system",
"value": "Read yaml instead of json\n"
},
{
"from": "human",
"value": "Thread.abort_on_exception = true\nrequire 'yaml'\nrequire 'timers'\nrequire 'docker'\nrequire 'discordrb'\nrequire './lib/listeners/minecraft'\nrequire './lib/handlers/discord'\n\n# I'm listening\nmodule L... | ruby | chosen |
[
{
"from": "system",
"value": "Use pessimistic versioning of builder and multipart-post\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"sendregning/version\"\n\nGem::Specification.new do |s|\n s.name = 'sendregning'\n s.ve... | ruby | chosen |
[
{
"from": "system",
"value": "Tag xdpyinfo spec `dev:true` (for now)\n"
},
{
"from": "human",
"value": "describe 'xserver installation' do\n describe command('Xorg -version') do\n its(:exit_status) { should eq 0 }\n end\n\n describe command('DISPLAY=:99.0 xset -q') do\n its(:stdout) { s... | ruby | chosen |
[
{
"from": "system",
"value": "Make random IDs with the same seed consistent\n\nThe order of the array before being shuffled needs to be the same if we\nwant to have the same array after being shuffled with a certain seed.\n\nWe were using `pluck(:id)`, which doesn't guarantee the order of the\nelements retu... | ruby | chosen |
[
{
"from": "system",
"value": "Fix unless statement in art museum migration\n\nChange guard after loading node_type because previous guard did not handle the nil case properly\n"
},
{
"from": "human",
"value": "class ChangeArtMuseumToMuseumArt < ActiveRecord::Migration\n class LocalNodeType < Ac... | ruby | chosen |
[
{
"from": "human",
"value": "Complete Day 14 - Reindeer Racing\n"
},
{
"from": "gpt",
"value": "require 'pp'\n\ninput = File.read 'input.txt'\n\nspeeds = {}\n\ninput.each_line do |line|\n next if line =~ /^\\s+$/\n\n name, speed, run_time, rest_time = line.match(/(\\w+) can fly (\\d{1,2}) km\\... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging to omniauth controller\n"
},
{
"from": "human",
"value": "class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n\tdef facebook\n @user = User.find_for_oauth(request.env[\"omniauth.auth\"], current_user)\n\n if @user.persis... | ruby | chosen |
[
{
"from": "system",
"value": "Set filename at `faml render` command\n"
},
{
"from": "human",
"value": "require 'faml'\nrequire 'thor'\n\nmodule Faml\n class CLI < Thor\n desc 'render FILE', 'Render haml template'\n def render(file)\n puts eval(compile_file(file))\n end\n\n desc... | ruby | chosen |
[
{
"from": "system",
"value": "Make Carrierwave work locally in dev without aws credentials\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nunless File.basename($PROGRAM_NAME) == 'rake' # we don't want to setup this stuff for every rake task\n CarrierWave.configure do |config... | ruby | chosen |
[
{
"from": "system",
"value": "Fix logging path for cron jobs.\n"
},
{
"from": "human",
"value": "# Use this file to easily define all of your cron jobs.\n\nset :output, File.join(File.expand_path(File.dirname(__FILE__)), \"log\", \"cron_log.log\")\n\njob_type :rake, \"cd :path && RAILS_E... | ruby | chosen |
[
{
"from": "human",
"value": "Add script for changing max_team_size from 0 to 1\n"
},
{
"from": "gpt",
"value": "class AlterMaxTeamSize\n def self.run\n improper_assignments = Assignment.all(:conditions => 'max_team_size = 0')\n improper_assignments.map do |assignment|\n assignment.ma... | ruby | chosen |
[
{
"from": "system",
"value": "Add updated .rb and spec files\n"
},
{
"from": "human",
"value": "# I worked on this challenge [by myself, with: Marcel Galang ].\n\n\n# Your Solution Below\n\ndef leap_year?(number)\n if ((number % 4) == 0) && ((number % 100) != 0)\n \tp true\n \t # puts \"This ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove runit requirement from wt_netacuity\n\n\nFormer-commit-id: 1431c6235b4c30284e924802af7ea85d55ddb2fb [formerly 48205cf7404de8c065b8d0976d337bb2c88e5417] [formerly c134ceac1c24dbfd069bfa864effc7f107ae41de [formerly 27e03f0c6e01b6b14f17175f3fa4317780093524 [formerly 60ca1fc... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused Variable in CalendarsController\n"
},
{
"from": "human",
"value": "#encoding: utf-8\nclass CalendarsController < ApplicationController\n\n def show\n raise ActionController::RoutingError.new('Not Found') if current_region.nil?\n\n @categories ... | ruby | chosen |
[
{
"from": "system",
"value": "Update PasswordsController to Discard Flash\n\nDiscard the flash message in the Passwords Controller in order to ensure\nthat the flash alert is not displayed for follow-on modals.\n"
},
{
"from": "human",
"value": "class PasswordsController < Devise::PasswordsContr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a bug with parameter defaults."
},
{
"from": "human",
"value": "require 'we_the_people'\nclass PetitionsController < ApplicationController\n\n def show\n @id = params[:id]\n @petition = Petition.find(@id)\n\n respond_to do |format|\n format.html {... | ruby | chosen |
[
{
"from": "system",
"value": "Allow tag_ids to be submitted as an array\n"
},
{
"from": "human",
"value": "class QuestionsController < ApplicationController\n before_filter :authenticate_user!\n respond_to :html, :js, :json\n\n def index\n @activities = PublicActivity::Activity.order('crea... | ruby | chosen |
[
{
"from": "system",
"value": "Modify Inventory base class to align with Amazon usecase\n\nModify Inventory base class to align with Amazon usecase\n"
},
{
"from": "human",
"value": "module ManagerRefresh\n class Inventory\n require_nested :Collector\n require_nested :Parser\n require_n... | ruby | chosen |
[
{
"from": "system",
"value": "Make it run the client and response specs.\n"
},
{
"from": "human",
"value": "require File.join(File.dirname(__FILE__), %w[helper])\n\ndescribe Calais do\n it \"provides a version number\" do\n Calais::VERSION.should_not be_nil\n end\nend"
},
{
"from": ... | ruby | chosen |
[
{
"from": "system",
"value": "Migrate from `factory_girl` to `factory_bot`\n"
},
{
"from": "human",
"value": "require 'factory_girl'\nrequire 'coveralls'\nrequire 'simplecov'\n\nCoveralls.wear!('rails')\nSimpleCov.formatters = [\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Fo... | ruby | chosen |
[
{
"from": "system",
"value": "Add the ability to skip tests\n"
},
{
"from": "human",
"value": "require 'listen'\n\nENV[\"TEST_LATENCY\"] ||= \"0.25\"\n\nDir[\"#{File.dirname(__FILE__)}/support/**/*.rb\"].each { |f| require f }\n\n# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Code Climate env var check.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n# Generate code coverage metrics, unless we're running a CI build that doesn't report the results.\nunless ENV[\"CI\"] && ENV[\"CC_TEST_REPORTER_ID\"].nil?\n requ... | ruby | chosen |
[
{
"from": "system",
"value": "Change SimpleCov behaviour to stop reporting\n\nChange the SimpleCov behaviour so that it no longer reports coverage\nwhen `rake` completes and acts only as a 'red light' if coverage drops\nsignificantly (by 20%) or drops below a percentage (80%).\n\nNote that to silence the 'C... | ruby | chosen |
[
{
"from": "system",
"value": "Fix test coverage testing on travis by adding filters. So we can set it to 94% again, which is what we get locally\n"
},
{
"from": "human",
"value": "ENV[\"RACK_ENV\"] = \"test\"\n\nrequire \"rspec\"\nrequire \"pry\"\nrequire \"simplecov\"\n\nSimpleCov.start do\n #... | ruby | chosen |
[
{
"from": "system",
"value": "Allow tag releases on ArezIntegration branch\n"
},
{
"from": "human",
"value": "require 'mcrt'\n\ndesc 'Publish release on maven central'\ntask 'publish_to_maven_central' do\n project = Buildr.projects[0].root_project\n password = ENV['MAVEN_CENTRAL_PASSWORD'] || ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable guessing the anomaly notification that triggered the user feedback\n"
},
{
"from": "human",
"value": "class UserExerciseFeedback < ActiveRecord::Base\n include Creation\n\n belongs_to :exercise\n has_one :execution_environment, through: :exercise\n\n vali... | ruby | chosen |
[
{
"from": "system",
"value": "Remove redundant assignment of `mailbox`\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Voicemail \n class MailboxCleanerController < ApplicationController\n def run\n menu_prompt = metadata[:new_or_saved].to_s == \"new\" ? config.mailbox.cl... | ruby | chosen |
[
{
"from": "system",
"value": "Add electric vehicle to list of promotions\n\nThis allows it to be included in the content item and rendered on the\nfrontend.\n"
},
{
"from": "human",
"value": "module Formats\n class CompletedTransactionPresenter < EditionFormatPresenter\n private\n\n PROMOTI... | ruby | chosen |
[
{
"from": "system",
"value": "Use define_method in LiveEventFramework to define methods for selecting and counting efforts of various categories.\n"
},
{
"from": "human",
"value": "class LiveEventFramework\n\n attr_reader :times_container\n delegate :multiple_laps?, to: :event\n\n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Update search for start page."
},
{
"from": "human",
"value": "class Spree::StartController < Spree::StoreController\n helper \"spree/products\"\n helper \"spree/base\"\n\n respond_to :html\n\n def index\n @schweine = Spree::Schwein.order('position ASC').limi... | ruby | chosen |
[
{
"from": "human",
"value": "Add limit and FK to JourneyFrequency\n"
},
{
"from": "gpt",
"value": "class AddLimitAndForeignKeyToJourneyFrequencies < ActiveRecord::Migration\n def up\n change_column :journey_frequencies, :vehicle_journey_id, :integer, limit: 8\n change_column :journey_freq... | ruby | chosen |
[
{
"from": "system",
"value": "Add logging on publishing side\n"
},
{
"from": "human",
"value": "require \"bunny\"\nrequire \"eventmachine\"\nrequire \"json\"\nrequire \"rake\"\n\nrequire \"hearst/version\"\nrequire \"hearst/dispatcher\"\nrequire \"hearst/listener\"\nrequire \"hearst/logging\"\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Transform client token to JSON format\n"
},
{
"from": "human",
"value": "# The route for getting Braintree client tokens\nclass KWApi < Sinatra::Base\n post '/walkmydog/braintree/client_token/?' do\n verify_login(params[:payload])\n\n profile = Profile.get(JS... | ruby | chosen |
[
{
"from": "system",
"value": "Remove gemspec date so that it gets updated\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\ninclude_files = [\"README*\", \"MIT-LICENSE\", \"Rakefile\", \"init.rb\", \"AddTrustExternalCARoot\", \"{lib,tasks,spec,features,rails}/**/*\"].map do |glob|\... | ruby | chosen |
[
{
"from": "system",
"value": "Use Array.wrap to an argument which expect Array\n"
},
{
"from": "human",
"value": "module Akashi\n class Rds\n class SubnetGroup\n class << self\n def create(subnets:)\n response = Akashi::Aws.rds.client.create_db_subnet_group(\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change version to match gem version on RubyGems\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'themis-attack-result'\n s.version = '2.0.0'\n s.date = '2015-08-08'\n s.summary = 'Themis::Attack::Result constants'\n s.descr... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Screen to not be so awful.\n"
},
{
"from": "human",
"value": "class Screen\n def self.draw(coordinate_system)\n new(coordinate_system).draw\n end\n\n def initialize(coordinate_system)\n @coordinate_system = coordinate_system\n end\n\n attr_reader... | ruby | chosen |
[
{
"from": "system",
"value": "Add Joe Mattiello into Podspec authors for publishing\n\nSigned-off-by: Joe Mattiello <46f1a0bd5592a2f9244ca321b129902a06b53e03@joemattiello.com>\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nPod::Spec.new do |s|\n s.name = 'Hero'\... | ruby | chosen |
[
{
"from": "human",
"value": "Add codewars (6) ten minute walk\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/take-a-ten-minute-walk/\n# --- iteration 1 ---\ndef isValidWalk(walk)\n return false unless walk.count == 10\n dir_counts = ['n', 's', 'e', 'w'].reduce({}) do |acc, dir... | ruby | chosen |
[
{
"from": "system",
"value": "Enable live streaming output from execute resources\n"
},
{
"from": "human",
"value": "name 'delivery_rust'\nmaintainer 'adam@getchef.com'\nmaintainer_email 'adam@getchef.com'\nlicense 'All Rights Reserved'\ndescription 'Installs/Conf... | ruby | chosen |
[
{
"from": "human",
"value": "Add CalDigit USB-C Dock Driver.\n"
},
{
"from": "gpt",
"value": "cask 'caldigit-usb-c-dock-driver' do\n version :latest\n sha256 :no_check\n\n url 'http://www.caldigit.com/support/USB-C-Dock-mac.zip'\n name 'CalDigit USB-C Dock Driver'\n homepage 'http://www.cal... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecated current_user assignment in testing helper\n"
},
{
"from": "human",
"value": "module Clearance\n module Testing\n module Helpers\n def setup_controller_request_and_response\n super\n @request.env[:clearance] = Clearance::Session.... | ruby | chosen |
[
{
"from": "system",
"value": "Use \"new_constants_in\" as \"load_missing_constant\" wouldn't work for files loaded via `require_dependency`\n\n- TODO: Write spec for this case\n"
},
{
"from": "human",
"value": "module Dry\n module Types\n module Rails\n module TypesRegistration\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove errant commas when extracting email addresses from From fields\n"
},
{
"from": "human",
"value": "class ExtractEmailAddresses < MethodObject\n\n def call *strings\n Mail::AddressList.new(strings.compact.map { |string| filter_invalid_characters(string) }.j... | ruby | chosen |
[
{
"from": "human",
"value": "Add plugin to report CPU usage\n"
},
{
"from": "gpt",
"value": "require_plugin 'linux::cpu'\n\ncpu[:all] = Mash.new\n\nstatus, stdout, stderr = run_command(:no_status_check => true,\n :command => \"mpstat -P ALL\")\n\nstdout.lines ... | ruby | chosen |
[
{
"from": "system",
"value": "Add add_groups and remove_groups params\n"
},
{
"from": "human",
"value": "module DiscourseApi\n module API\n module SSO\n def sync_sso(params={})\n sso = DiscourseApi::SingleSignOn.new\n sso.sso_secret = params[:sso_secret]\n sso.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused method. My bad :P\n"
},
{
"from": "human",
"value": "module LightService\n module Organizer\n def self.included(base_class)\n base_class.extend ClassMethods\n end\n\n module ClassMethods\n def with(data)\n new.with(data)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add therubyracer as runtime dependency (implicitly required by less-rails)\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\r\n$LOAD_PATH.push File.expand_path('../lib', __FILE__)\r\nrequire 'kube/rails/version'\r\n\r\nGem::Specification.new do |s|\r\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix version number lookup on Ubuntu\n"
},
{
"from": "human",
"value": "# Grab the FreeRADIUS version from the output of radiusd -v\nversion = Facter::Core::Execution.exec('radiusd -v')\nif version.nil?\n version = Facter::Core::Execution.exec('freeradius -v')\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Improve readability using vertical spacing\n"
},
{
"from": "human",
"value": "require 'topic_exchange'\n\nmodule GovukSeedCrawler\n class Seeder\n def self.seed(options = {})\n urls = GetUrls.new.urls\n\n topic_exchange = TopicExchange.new(options)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we're returning responses as a Rack response array."
},
{
"from": "human",
"value": "module Happy\n class Controller\n module Rackable\n extend ActiveSupport::Concern\n\n def handle_request\n r = catch :done do\n serve!(route)... | ruby | chosen |
[
{
"from": "system",
"value": "Check completeness before setting the processing flag"
},
{
"from": "human",
"value": "module Hydrant\n\tmodule Batch\n\t\tclass Package\n\t\t\tattr_reader :dir, :manifest\n\n\t\t\tdef initialize(manifest)\n\t\t\t\t@dir = File.dirname(manifest)\n\t\t\t\t@manifest = ... | ruby | chosen |
[
{
"from": "system",
"value": "Update HandbrakeCLI Nightly to v6590svn\n\nHandBrakeCLI Nightly Build 6590svn released 2014-12-05.\n"
},
{
"from": "human",
"value": "cask :v1 => 'handbrakecli-nightly' do\n version '6575svn'\n sha256 '61484a7c5b24c9ac25dfe545050968b351d393c8406e6035fee9d18009d98d... | ruby | chosen |
[
{
"from": "system",
"value": "Make ObjectSchemas::Schema an abstract class\n\n* Only subclasses can be created.\n"
},
{
"from": "human",
"value": "module ObjectSchemas\n\tclass Schema\n\t# The base class for the schema types that can be defined.\n\t#\n\t# It is responsible for the following:\n\t... | ruby | chosen |
[
{
"from": "system",
"value": "Remove atom Dashboard spec that no longer applies\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Dashboard Feed\" do\n describe \"GET /\" do\n let!(:user) { Factory :user }\n\n context \"projects atom feed via private token\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement to ~> 0.54.0\n\nUpdates the requirements on [rubocop](https://github.com/bbatsov/rubocop) to permit the latest version.\n- [Release notes](https://github.com/bbatsov/rubocop/releases)\n- [Changelog](https://github.com/bbatsov/rubocop/blob/master/CHANG... | ruby | chosen |
[
{
"from": "human",
"value": "Create sessions helper with current user helper method\n"
},
{
"from": "gpt",
"value": "module SessionsHelper\n def current_user\n User.find_by(id: session[:user_id]) if session[:user_id]\n end\n\n def logged_in?\n current_user != nil\n end\nend"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Use an array for failed.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'fileutils'\n\npulled, skipped, failed = [], [], {}\n\nroot = ARGF.argv[0]\n\nraise ArgumentError.new(\"Please pass a root directoy!\") if root.nil?\n\nDir.foreach(root) do |dire... | ruby | chosen |
[
{
"from": "system",
"value": "Update chef client to 11.12.8-2\n"
},
{
"from": "human",
"value": "# Add the opscode APT source for chef\ndefault[:apt][:sources] = node[:apt][:sources] | [ \"opscode\" ]\n\n# Set the default server version\ndefault[:chef][:server][:version] = \"11.0.12-1\"\n\n# Set... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Ok, Ok.. I'll turn off package creation for now\"\n\nI _think_ since we moved past the initial long queue of emails,\nwe should be good to keep going now :fingerscrossed:\n\nThis reverts commit 2077fcac631f16b0b14a27d58d7e84c5736d3b68.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "AACT-219: Modify the way we retrieve study xml records that haven't yet been loaded"
},
{
"from": "human",
"value": "class StudyXmlRecord < ActiveRecord::Base\n belongs_to :study, foreign_key: \"nct_id\"\n\n def self.not_yet_loaded\n where(:created_study_at=>... | ruby | chosen |
[
{
"from": "system",
"value": "Add type signatures to `Cask::Cache`.\n"
},
{
"from": "human",
"value": "# typed: true\n# frozen_string_literal: true\n\nmodule Cask\n # Helper functions for the cask cache.\n #\n # @api private\n module Cache\n module_function\n\n def path\n @path ||... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missed ref to Castlight\n"
},
{
"from": "human",
"value": "require 'csv'\n\nmodule Castlight\n class MenuImporter\n class << self\n def import(filename)\n menu_items_by_restaurant = CSV.read(filename).group_by { |item| item.shift }\n menu_... | ruby | chosen |
[
{
"from": "system",
"value": "Implement FARM_ENV. Don't memoize @payload_object.\n"
},
{
"from": "human",
"value": "require 'cgi'\nrequire 'farm/http'\nrequire 'yaml'\n\nmodule Farm\n class Runner\n def self.run(*args)\n @payload_object ||= args.shift[:payload_object]\n\n unless @p... | ruby | chosen |
[
{
"from": "system",
"value": "Update String to use internal reference for Core\n\nThis will make implementation of CoreSimulator easier later.\n"
},
{
"from": "human",
"value": "module Lodo\n class String\n LED_COUNT = 100\n\n def initialize\n @device = Core.open_device\n @buffe... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor `Yardstick::RuleConfig` to use concord\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Yardstick\n # Config class for rules\n #\n # It is used to check if document should be validated or not.\n #\n class RuleConfig\n METHOD_SEPARATOR ... | ruby | chosen |
[
{
"from": "system",
"value": "Mark NAKPlaybackIndicatorStyle.h as a public header file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'NAKPlaybackIndicatorView'\n s.version = '0.0.3'\n s.summary = 'A view that mimics the music playback indicator in the Mu... | ruby | chosen |
[
{
"from": "system",
"value": "Add Bookis as an Author\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'dropbox_api_v2/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Allow 'transition' to be used as a property\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'style/separator'\n\nclass Style::Thick < Style::Separator\n def initialize\n super '⮀ ', ' ⮂'\n end\n\n def flatten(current_formatting)\n @separator_f... | ruby | chosen |
[
{
"from": "system",
"value": "Verify ownership of specific domain\n\nModels would erroneously be created before if an arbitrary domain was\nspecified as the URL parameter.\n"
},
{
"from": "human",
"value": "require 'playhouse/context'\n\n# Constructs a client for the Google Apps privileged APIs\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix EC2 config to stop trying to SSH in as root\n"
},
{
"from": "human",
"value": "# See https://docs.chef.io/config_rb_knife.html for more information on knife configuration options\n\ncurrent_dir = File.dirname(__FILE__)\nlog_level :info\nlog_locati... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing spec for transport execution\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe ElectricSheep::Transport do\n TransportKlazz = Class.new do\n include ElectricSheep::Transport\n\n attr_reader :project, :logger, :metadata, :hosts, :do... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'Create Question' feature spec\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Create question', %q{\n In ordere to get answer from community\n As an authenticated user\n I want to be able to ask question\n} do\n\n given(:user) { create... | ruby | chosen |
[
{
"from": "system",
"value": "Use false to be consistent with the early return"
},
{
"from": "human",
"value": "module RackRequestIPStrategies\n class Base\n def self.call(env, config = Config.default)\n new(env, config).call\n end\n\n def initialize(env, config)\n @env = env... | ruby | chosen |
[
{
"from": "system",
"value": "Change exit status to a numeric comapre.\n"
},
{
"from": "human",
"value": "module Specinfra\n class HostInventory\n class Facter < Base\n require 'yaml'\n\n def get\n begin\n ret = backend.run_command('facter --puppet --yaml')\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a ruby unit test that made wrong use of Caca::Display.driver_list.\n\ngit-svn-id: 3f9eced0add15b5a9fa491ea3f7f263c10f60fd6@3483 92316355-f0b4-4df1-b90c-862c8a59935f\n"
},
{
"from": "human",
"value": "require 'caca'\n\nclass TC_Canvas < Test::Unit::TestCase\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix gem date for future publishing.\n"
},
{
"from": "human",
"value": "\nfile_list = Dir[\"lib/*.rb\"]\ntest_file_list = Dir[\"test/*.rb\"]\n\nGem::Specification.new do |s|\n s.name = \"tracery\"\n s.version = \"0.7.2\"\n s.date = \"2016-02-27\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use Class.new block instead of instance_eval\n"
},
{
"from": "human",
"value": "class Value\n def self.new(*fields)\n value_class = Class.new\n value_class.instance_eval do\n attr_reader *fields\n define_method(:initialize) do |*input_fields|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change homepage to github page.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/hijri/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = \"hijri\"\n gem.version = Hijri::VERSION\n ge... | ruby | chosen |
[
{
"from": "system",
"value": "Change feed adress to rss 2\n"
},
{
"from": "human",
"value": "class ImportStories\n require 'rss'\n require 'open-uri'\n\n def call(reset = false)\n cleanup if reset\n\n import_stories\n end\n\n private\n\n def cleanup\n Story.delete_all\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix magic key in webfinger XRD href\n"
},
{
"from": "human",
"value": "Nokogiri::XML::Builder.new do |xml|\n xml.XRD(xmlns: 'http://docs.oasis-open.org/ns/xri/xrd-1.0') do\n xml.Subject @canonical_account_uri\n xml.Alias TagManager.instance.url_for(@account)\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.