conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add markdown filter for html\n\nprevents cross site attacks\n"
},
{
"from": "human",
"value": "module ApplicationHelper\n def page_title(*title_parts)\n if title_parts.any?\n title_parts.push(\"Admin\") if params[:controller] =~ /^admin\\//\n title_par... | ruby | chosen |
[
{
"from": "system",
"value": "Use a guard clause to return out of the method\n"
},
{
"from": "human",
"value": "# Run transcoders on the episode.\nclass TranscodeEpisodeJob < ActiveJob::Base\n queue_as :default\n\n def perform(episode)\n if episode.audio_file_url.present?\n transcoder.... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing block parameter to view helper\n"
},
{
"from": "human",
"value": "module NForm\n module Helpers\n def form_view(*args)\n NForm::Builder.new(*args).render\n end\n end\nend\n"
},
{
"from": "gpt",
"value": "module NForm\n module He... | ruby | chosen |
[
{
"from": "human",
"value": "Add Utils module for sharing special functions.\n"
},
{
"from": "gpt",
"value": "class Library\n\n module Utils\n extend self\n\n #\n # TODO: Not sure RUBYLIB environment should be included in user_path.\n #\n\n #\n # Lookup a path in locations tha... | ruby | chosen |
[
{
"from": "system",
"value": "Isolate Sidekiq's own context info into :extra.\n\nSidekiq sometimes sends a :context key as part of its error handling\ncontext hash. However, it means something entirely different than\nRaven's own :context key in options. Move all of Sidekiq's exception\ncontext into :extra ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the metadata variable again, and use the layout metadata variable for rendering a parent, if any.\n"
},
{
"from": "human",
"value": "module Salt\n class Template\n include Frontable\n\n attr_accessor :slug, :metadata, :contents, :parent\n\n def initial... | ruby | chosen |
[
{
"from": "system",
"value": "Update type, Int -> Integer\n"
},
{
"from": "human",
"value": "require 'sequel/core'\nrequire 'sequel/sql'\n\nrequire 'rom/types'\nrequire 'rom/sql/type_dsl'\n\nmodule ROM\n module SQL\n module Types\n include ROM::Types\n\n # Define a foreign key attr... | ruby | chosen |
[
{
"from": "system",
"value": "Set filename options for ES6to5.transform\n\n* `filename` is required to show the proper filename on syntax errors\n* `filenameRelative` is used to build module ids (names)\n\nWithout these options all files / modules will be named \"unknown\".\n\nExample:\nfilename: '/app/asse... | ruby | chosen |
[
{
"from": "system",
"value": "Correct plugin type in gemspec metadata.\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"lita-console\"\n spec.version = \"0.0.2\"\n spec.authors = [\"Mitch Dempsey\"]\n spec.email = [\"mrdempsey@g... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the code for Rspec2 conpatibility\n"
},
{
"from": "human",
"value": "require 'erb'\n\nrequire 'capybara_screenshot_idobata'\nrequire 'capybara_screenshot_idobata/dsl'\n\nRSpec.configure do |config|\n config.include CapybaraScreenshotIdobata::DSL, type: :feat... | ruby | chosen |
[
{
"from": "system",
"value": "Add EOL to the generator template\n\nwithout this, Git claims \"No newline at end of file\"\n"
},
{
"from": "human",
"value": "json.array!(@<%= plural_table_name %>) do |<%= singular_table_name %>|\n json.extract! <%= singular_table_name %>, <%= attributes_list %>\... | ruby | chosen |
[
{
"from": "human",
"value": "Move env-based tasks into their own rake file\n"
},
{
"from": "gpt",
"value": "require 'rake_tasks_for_rails/config'\nrequire 'rake_tasks_for_rails/envs'\n\nnamespace :envs do\n\n namespace :push do\n\n desc 'Add envs in .env and .env.staging to staging environme... | ruby | chosen |
[
{
"from": "system",
"value": "Support for cash and check as payment types\n"
},
{
"from": "human",
"value": "module RockRMS\n class Client\n module PaymentDetail\n def list_payment_details(options = {})\n res = get(payment_detail_path, options)\n Response::PaymentDetail.fo... | ruby | chosen |
[
{
"from": "system",
"value": "Update the redis part of the user\n"
},
{
"from": "human",
"value": "namespace :cartodb do\n namespace :database_host do\n desc 'Add a text in the notification field for users filtered by field'\n task :update_dbm_and_redis, [:origin_ip, :dest_ip] => [:en... | ruby | chosen |
[
{
"from": "system",
"value": "Set attribute_struct minimum dependency to 0.1.2\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) + '/lib/'\nrequire 'knife-cloudformation/version'\nGem::Specification.new do |s|\n s.name = 'knife-cloudformation'\n s.v... | ruby | chosen |
[
{
"from": "system",
"value": "Make Tagize Method Far Hashtags\n\nTagize turns an input into a more tag friendly format before it is saved. Needs to be further refined.\n"
},
{
"from": "human",
"value": "class Hashtag < ActiveRecord::Base\n\tvalidates :title, uniqueness: true \n\n\thas_many :hash... | ruby | chosen |
[
{
"from": "system",
"value": "Add TRAVIS env test for coveralls.io as well.\n"
},
{
"from": "human",
"value": "# coveralls.io and coco are incompatible. Run each in their own env.\nif ENV[\"CI\"] || ENV[\"JENKINS_URL\"] || ENV['TDDIUM'] || ENV[\"COVERALLS_RUN_LOCALLY\"]\n # coveralls.io : web b... | ruby | chosen |
[
{
"from": "system",
"value": "Update Opera Next to 18.0.1284.26\n"
},
{
"from": "human",
"value": "class OperaNext < Cask\n url 'http://get.geo.opera.com/pub/opera-next/18.0.1284.26/mac/Opera_Next_18.0.1284.26_Setup.dmg'\n homepage 'http://www.opera.com/computer/next'\n version '18.0.1284.26'... | ruby | chosen |
[
{
"from": "system",
"value": "Delete uneccessary creation of a UserInvite in the test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass UserInviteTest < ActiveSupport::TestCase\n\n def setup\n # create a mailer here and use it to call private functions\n @user_invite = Use... | ruby | chosen |
[
{
"from": "system",
"value": "Fix \"Press any key\" on Microsoft Windows\n\n`getch` throws a `Errno::EBADF: Bad file descriptor` error on Microsoft\nWindows. I am unable to fix that. Using `getc` creates the same behavior\nand also works on Microsoft Windows.\n\nThis fixes the \"Press any key\" prompts on M... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec author and email\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'stevenson/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Use aws cli to sync built files to s3.\n"
},
{
"from": "human",
"value": "desc \"publish the documentation\"\ntask :publish => :build do\n def env(key, default=nil)\n value = ENV[key].to_s.strip\n if default\n if value == ''\n value = default\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for all details on the project side\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe 'projects/index', type: :view do\n before(:each) do\n assign(:projects, [\n FactoryGirl.create(:project),\n FactoryGirl.create(:pro... | ruby | chosen |
[
{
"from": "system",
"value": "Reorder Gemfile and add yarn to setup\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass BookingsControllerTest < ActionDispatch::IntegrationTest\n setup do\n @booking = Booking.create(start: 2.hours.from_now, stop: 4.hours.from_now)\n end\n\n t... | ruby | chosen |
[
{
"from": "system",
"value": "Change location of flash player\n"
},
{
"from": "human",
"value": "module JWPlayer::Rails\n module Helper\n DEFAULT_OPTIONS = {\n id: 'jwplayer',\n flashplayer: '/swf/player.swf',\n width: '400',\n height: '300'\n }\n\n # Includes JWPla... | ruby | chosen |
[
{
"from": "system",
"value": "Add PID of process to work logger.\n"
},
{
"from": "human",
"value": "require 'ansi'\nrequire 'yell'\n\nmodule RabbitWQ\n class WorkLogger\n\n def initialize( log_level, path )\n @logger = Yell.new do |l|\n l.level = log_level\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add resource-type in StructFromHash not in StructFromXml\n"
},
{
"from": "human",
"value": "module Shapes\n module Builder\n class Struct\n\n attr_reader :data\n attr_accessor :builder_strategy, :resource\n\n def initialize(data)\n @data = ... | ruby | chosen |
[
{
"from": "system",
"value": "Make read_file a class method since it doesn't rely on state\n"
},
{
"from": "human",
"value": "module OneSheet\n class Files\n\n def self.read(type)\n new(type).read\n end\n\n private_class_method :new\n\n def initialize(type)\n @files = type... | ruby | chosen |
[
{
"from": "human",
"value": "Add initial Ruby Review files\n"
},
{
"from": "gpt",
"value": "# Introduction to Inheritance\n\n# I worked on this challenge [by myself, with: ].\n\n\n# Pseudocode\n#create global and local cohort classes\n\n#global\n# #attribute reader for name, start_date, immersiv... | ruby | chosen |
[
{
"from": "system",
"value": "Remove extended_on for missing functionality\n"
},
{
"from": "human",
"value": "require 'erb'\nrequire File.expand_path('../../../spec_helper', __FILE__)\n\ndescribe \"ERB#filename\" do\n # TODO: why does this fail on rubinius?\n it \"raises an exception if there ... | ruby | chosen |
[
{
"from": "system",
"value": "Update development dependencies 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 'buckaroo_json/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove signal handlers. Let the OS kill EM\n"
},
{
"from": "human",
"value": "require 'eventmachine'\n\nmodule Combi\n class Reactor\n def self.start(&block)\n EM::error_handler do |error|\n STDERR << \"ERROR IN EM\\n\"\n STDERR << \"\\t#{erro... | ruby | chosen |
[
{
"from": "human",
"value": "Add helper to load factories in other projects"
},
{
"from": "gpt",
"value": "module Idnow\n module Helpers\n PROJECT_ROOT = File.dirname(File.dirname(File.dirname(__FILE__)))\n\n module Factories\n Dir[File.join(PROJECT_ROOT, 'spec', 'support', 'factorie... | ruby | chosen |
[
{
"from": "system",
"value": "Break long line down a bit to fix rubocop warning\n"
},
{
"from": "human",
"value": "require 'xcodeproj'\n\nmodule Pandan\n class Parser\n attr_reader :workspace, :regex\n\n def initialize(workspace_path, filter)\n @workspace_dir = File.dirname(workspace... | ruby | chosen |
[
{
"from": "system",
"value": "Add task to process LOINC codes.\n"
},
{
"from": "human",
"value": "namespace :fhir do\n\n desc 'console'\n task :console, [] do |t, args|\n binding.pry\n end\n\nend\n"
},
{
"from": "gpt",
"value": "namespace :fhir do\n\n desc 'console'\n task :c... | ruby | chosen |
[
{
"from": "system",
"value": "Add TODO for API errors\n"
},
{
"from": "human",
"value": "require 'active_support'\nrequire 'active_support/core_ext/hash/indifferent_access'\nrequire 'active_support/core_ext/object/to_query'\nrequire 'active_support/json'\n\nrequire 'open-uri'\n\nmodule Tumblargh... | ruby | chosen |
[
{
"from": "human",
"value": "Add script to update auto-completed commands\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n\n# Use this script to update the commands auto-completed in plugin/otto.vim.\n\nrequire 'open3'\n\ncommand_re = /^\\s\\s\\s\\s(\\S+)/\nplugin_file = 'plugin/ottoprojec... | ruby | chosen |
[
{
"from": "system",
"value": "Patch stream controller to work with new bundler\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n\nrequire 'rubygems'\nrequire 'daemons'\n\nDaemons.run(File.join(File.dirname(__FILE__), 'streaming.rb'))\n"
},
{
"from": "gpt",
"value": "#!/usr/bin... | ruby | chosen |
[
{
"from": "system",
"value": "Use the command bar action class to parse the message\n"
},
{
"from": "human",
"value": "class MessagesController < ApplicationController\n before_action :authenticate_user!, :only => [:create]\n\n def create\n find_account!\n\n @message = Message.new(messag... | ruby | chosen |
[
{
"from": "system",
"value": "Add author and bump up version\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |spec|\n spec.name = \"lita-weather\"\n spec.version = \"0.1.0\"\n spec.authors = [\"Gou Furuya\"]\n spec.email = [\"innocent.zero@gmail.com\... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for releases"
},
{
"from": "gpt",
"value": "require 'integration_test_helper'\n\nclass ManagingReleasesTest < ActionDispatch::IntegrationTest\n\n setup do\n login_as_stub_user\n end\n\n context \"all releases\" do\n should \"show today's... | ruby | chosen |
[
{
"from": "system",
"value": "Correct error message returned by ChangeService\n\nPreviously the string was spanning multiple lines and included a\nneedless `\\n` character in the resulting error message.\n\nThis change also reduces duplication by assigning two variables.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Update analytics if response was successful\n"
},
{
"from": "human",
"value": "require \"net/http\"\nrequire \"uri\"\n\nclass ShareAnalyticsUpdater\n def self.update_shares\n puts \"Fetching data...\"\n\n Share::Button.all.each do |button|\n uri = 'http:... | ruby | chosen |
[
{
"from": "system",
"value": "Return a string for primes\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'digest'\nrequire 'prime'\nrequire 'json'\n\nset :bind, '0.0.0.0'\n\ndef decode(request)\n JSON.parse(request.body.read)\nend\n\nget '/' do\n 'Welcome to the \"Distributed Loa... | ruby | chosen |
[
{
"from": "system",
"value": "Apply Rails 4.1 Bundler conventions"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'action_controller/railtie'\nrequire 'action_view/railtie'\nrequire 'sprockets/railtie'\n\nBundler.require(:default, Rails.env)\n\nmodule Frontend\n class Applic... | ruby | chosen |
[
{
"from": "system",
"value": "Use asset group in development\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\n# Pick the frameworks you want:\n# require \"active_record/railtie\"\nrequire \"action_controller/railtie\"\nrequire \"action_mailer/railtie\"\nrequire... | ruby | chosen |
[
{
"from": "system",
"value": "Add osx support to podfile\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Latch\"\n s.version = \"1.2.0\"\n s.summary = \"A simple Swift Keychain Wrapper for iOS\"\n s.homepage = \"https://githu... | ruby | chosen |
[
{
"from": "system",
"value": "Remove email and add home page\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/yoga_pants/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = [\"Jack Chen (chendo)\"]\n gem.email = [\"... | ruby | chosen |
[
{
"from": "system",
"value": "Return nil if the VM is not running when looking at forwarded ports"
},
{
"from": "human",
"value": "module VagrantPlugins\n module ProviderVirtualBox\n module Cap\n # Reads the forwarded ports that currently exist on the machine\n # itself. This raise... | ruby | chosen |
[
{
"from": "human",
"value": "Add Appledoc 2.2 (build 961).\n\nCloses #204.\n\nSigned-off-by: Xiyue Deng <4900478725231961caf32165c870e05cea7389d8@gmail.com>\n"
},
{
"from": "gpt",
"value": "require 'formula'\n\n# 2.2 (build 961) introduces support for documenting enumerated and\n# bitmask types,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix redirect when inside an engine\n"
},
{
"from": "human",
"value": "module Concerns\n module ExceptionHandler\n extend ActiveSupport::Concern\n\n included do\n rescue_from ActionController::RoutingError, with: :render_404\n rescue_from Actio... | ruby | chosen |
[
{
"from": "system",
"value": "Remove references to C4Task subclasses. \n\n"
},
{
"from": "human",
"value": "class FilteringTestsController < ProductTestsController\n before_action :set_product\n\n def new\n @filtering_test = @product.product_tests.build({}, FilteringTest)\n @filtering_te... | ruby | chosen |
[
{
"from": "human",
"value": "Create view model for group assignment repo\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nclass GroupAssignmentRepoView < ViewModel\n attr_reader :assignment_repo\n\n def repo_url\n @repo_url ||= github_repo.html_url\n end\n\n def github_re... | ruby | chosen |
[
{
"from": "system",
"value": "Move mailboxer route out of authenticated scope\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n authenticated :developer do\n resources :mailbox, only: :show\n root 'developers#profile', as: :developer_root\n end\n\n authenticated :emp... | ruby | chosen |
[
{
"from": "system",
"value": "Kill warning about license file\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'JBSSettings'\n s.version = '0.1.2'\n s.summary = 'A settings object that is less annoying than NSUserDefaults'\n s.description = 'A settings ob... | ruby | chosen |
[
{
"from": "system",
"value": "Allow newer versions on Nokogiri\n\nTested and working with Nokogiri 1.7.0.1\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"postrank-uri/version\"\n\nGem::Specification.new do |s|\n s.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Use the VERSION constant in the gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n\ts.name = \"frecon\"\n\ts.email = \"sammidysam@gmail.com\"\n\ts.version = \"0.0.0\"\n\t\n\ts.summary = \"A JSON API for scouting FRC competitions.\"\n\ts.descr... | ruby | chosen |
[
{
"from": "system",
"value": "Reset preferences after spec to properly teardown test and avoid files being saved where they are not gitignored.\n\nFixes #2467\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"image settings\" do\n stub_authorization!\n\n before do\n vis... | ruby | chosen |
[
{
"from": "system",
"value": "Mark 3.7 as a valid language version\n"
},
{
"from": "human",
"value": "require 'rubygems/version'\n\nmodule SassSpec\n SPEC_DIR = File.expand_path('../../spec', __FILE__)\n LANGUAGE_VERSIONS = %w(\n 3.5\n 3.6\n 4.0\n )\n MIN_LANGUAGE_VERSION = Gem::Ver... | ruby | chosen |
[
{
"from": "system",
"value": "Use plain Ruby to implement RSpec Rake tasks\n\nUsing `RSpec::Core::RakeTask` and e.g. `sh('rspec-queue spec/')` adds different\nlayers of indirection that make the tasks hard to work with. For example, we\nused two different ways of declaring the default encoding...\n"
},
... | ruby | chosen |
[
{
"from": "system",
"value": "Add RCE update to ExportController\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n######### Exports\nclass ExportController < ApplicationController\n before_action :login_required\n\n # Callback (no view) to let reviewers change the export sta... | ruby | chosen |
[
{
"from": "system",
"value": "Fix implementation of authorize_private_channel method.\n\nWe do not have a request_id key in the params hash. Instead, I use the\nname of the channel that the user is trying to subscribe to to find the\nrequest.\n"
},
{
"from": "human",
"value": "class PusherContro... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor tracks controller; remove comments\n"
},
{
"from": "human",
"value": "class TracksController < ApplicationController\n\n def index\n @word = \"coffee\"\n url = \"http://api.musicgraph.com/api/v2/track/search?api_key=\" + ENV['MUSIC_GRAPH_API_KEY'] + ... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic new, rename, delete graph functionality\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'json'\n\nbefore do\n content_type 'application/json'\nend\n\nget '/' do\n \"List all graphs\"\n #TODO: OR list documentation\nend\n\n#TODO: List all... | ruby | chosen |
[
{
"from": "system",
"value": "Use hashed_password as an attribute\n"
},
{
"from": "human",
"value": "module Cypher\n\n class Repository\n\n attr_accessor :data\n attr_reader :path\n\n def initialize(path, hashed_password)\n @path = path\n @hashed_password = hashed_password\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sandboxed Formulary to use RepositoryImport\n"
},
{
"from": "human",
"value": "class Formulary\n\n class << self\n alias_method :original_factory, :factory\n end\n\n def self.factory(ref)\n path = nil\n repo = Repository.all.detect { |repo| path = re... | ruby | chosen |
[
{
"from": "system",
"value": "Add world travel on Rails\n"
},
{
"from": "human",
"value": "module TimeZones\n def self.travel(&block)\n Timecop.freeze(Time.new(1993, 2, 24, 12, 0, 0, \"+09:00\"))\n original = yield(nil).strftime(\"%H:%M %Z\")\n threads = Array.new\n errors = Array.n... | ruby | chosen |
[
{
"from": "human",
"value": "Add Softorino YouTube Converter.app latest version\n\nYouTube. Offline. No Ads. Background Playback. http://softorino.com/youtube-converter\n"
},
{
"from": "gpt",
"value": "cask 'softorino-youtube-converter' do\n version :latest\n sha256 :no_check\n\n # devmate.co... | ruby | chosen |
[
{
"from": "system",
"value": "Move trap signal on parent before fork in tests\n"
},
{
"from": "human",
"value": "require \"test/unit\"\nrequire \"posixlock\"\n\nclass PosilockTest < Test::Unit::TestCase\n def setup\n @file = File.new(File.expand_path('../testfile', __FILE__), File::CREAT|Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spacing in GMail filter\n"
},
{
"from": "human",
"value": "get '/' do\n @recruiters = YAML.load_file('recruiters.yml')\n filter = '*@' + [@recruiters['thirdparty'] + @recruiters['companies'] + @recruiters['other']].flatten.join('OR *@')\n erb :index, locals: ... | ruby | chosen |
[
{
"from": "system",
"value": "Validate that supporting page has > 0 policies\n"
},
{
"from": "human",
"value": "class SupportingPage < Edition\n include Edition::RelatedPolicies\n include ::Attachable\n\nend\n"
},
{
"from": "gpt",
"value": "class SupportingPage < Edition\n include... | ruby | chosen |
[
{
"from": "system",
"value": "Add Ross Paffett as a gem author\n\nSam says that I am special now\n"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = \"hector\"\n s.version = \"1.0.7\"\n s.platform = Gem::Platform::RUBY\n s.authors = [\"Sam... | ruby | chosen |
[
{
"from": "system",
"value": "Change for each to each\n"
},
{
"from": "human",
"value": "class Graph\n attr_reader :edges\n\n def initialize(graph_info, directed)\n @edges = {}\n @directed = directed\n make_edges(graph_info)\n end\n\n def make_edges(graph_info)\n graph_info.forea... | ruby | chosen |
[
{
"from": "system",
"value": "Change name to work around naming conflict\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'inky'\n s.version = '0.0.2'\n s.date = '2016-02-12'\n s.summary = 'Inky is an HTML-based templating language that conver... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor: Add with text explicit sintax context\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Element do\n context \"#create\" do\n context \"simple element\" do\n subject { Element.new(:mytag).to_s }\n it { should == \"<mytag />... | ruby | chosen |
[
{
"from": "human",
"value": "Test expected schema and values tuple mapping\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Mementus::Model do\n\n describe \"Mapping\" do\n\n class Mapping < Mementus::Model\n attribute :description, String\n attribute :number, Int... | ruby | chosen |
[
{
"from": "human",
"value": "Dir.home: Add initial tests for 1.9.2 method.\n"
},
{
"from": "gpt",
"value": "require File.dirname(__FILE__) + '/../../spec_helper'\nrequire File.dirname(__FILE__) + '/fixtures/common'\n\nruby_version_is \"1.9.2\" do\n describe \"Dir.home\" do\n it \"returns the... | ruby | chosen |
[
{
"from": "system",
"value": "Check if an object was actually updated. Dooh.\n"
},
{
"from": "human",
"value": "require 'spec_helper_integration'\n\ndescribe \"Inserting new objects with ARel\" do\n include_context 'Models and Mappers'\n\n before(:all) do\n setup_db\n\n insert_user 1, 'J... | ruby | chosen |
[
{
"from": "system",
"value": "Check for Configuration::VALID_FOOS in spec\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Skimlinks::Configuration do\n before do\n Skimlinks.configuration.reset\n end\n\n describe '.configure' do\n Skimlinks::Configuration::VALID_CON... | ruby | chosen |
[
{
"from": "system",
"value": "Test that Cronenberg::Config can list missing config items.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'cronenberg/config'\nrequire 'rspec/mocks/standalone'\n\ndescribe Cronenberg::Config do\n context \"#initialize\" do\n let(:config_hash)... | ruby | chosen |
[
{
"from": "system",
"value": "Create directories in HDFS as superuser, which already belongs to certs group and has the correct permissions to use the certificates\n"
},
{
"from": "human",
"value": "libpath = File.expand_path '../../../kagent/libraries', __FILE__\n\nbegin\n master_ip = private_... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to the 1.1 version\n\nThis has actually been on CcooaPods/Specs for months; I just forgot to commit it here too."
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"CKRefreshControl\"\n s.version = \"1.0.0\"\n s.summary ... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod spec version number.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'ResearchKit'\n s.version = '1.3.0'\n s.summary = 'ResearchKit is an open source software framework that makes it easy to create apps for medical ... | ruby | chosen |
[
{
"from": "system",
"value": "Include HISTORY.md file in gem.\nThis one should really be tagged v0.0.2 ;-)"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = 'resque-retry'\n s.version = '0.0.2'\n s.date = Time.now.strftime('%Y... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for fib[], fib.terms method\n"
},
{
"from": "gpt",
"value": "require 'minitest/autorun'\nrequire 'fibonacci'\n\nclass FibonacciTest < MiniTest::Unit::TestCase\n def setup\n @fib = Fibonacci.new\n end\n\n def test_brackets_method\n assert_equal 0, @... | ruby | chosen |
[
{
"from": "system",
"value": "Set current_user when creating AppointmentSummary\n"
},
{
"from": "human",
"value": "class AppointmentSummariesController < ApplicationController\n before_action :authenticate_user!\n\n def new\n @appointment_summary = AppointmentSummary.new\n end\n\n def cre... | ruby | chosen |
[
{
"from": "system",
"value": "Add a webpage description to the 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 'render_async/version'\n\nGem::Specification.new do |spec|\n sp... | ruby | chosen |
[
{
"from": "human",
"value": "Add Bose Soundtouch Controller 9.0.41\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'bose-soundtouch' do\n version '9.0.41.11243'\n sha256 '3eb78048bc8aa46b9d2613ff28d760fa7e47133384aca74f44aab4bc10c95f8a'\n\n url \"http://worldwide.bose.com/downloads/assets/update... | ruby | chosen |
[
{
"from": "system",
"value": "Update GURPS Character Sheet.app to v1.0.4\n\nGCS updated and the old download link is dead, so the cask needs to be updated\nto the new version.\n"
},
{
"from": "human",
"value": "class GurpsCharacterSheet < Cask\n url 'https://downloads.sourceforge.net/project/gc... | ruby | chosen |
[
{
"from": "system",
"value": "Make search case insensitive and phone number format agnostic\n"
},
{
"from": "human",
"value": "class Patient\n include Mongoid::Document\n include Mongoid::Timestamps\n include Mongoid::History::Trackable\n include Mongoid::Userstamp\n include Mongoid::Search... | ruby | chosen |
[
{
"from": "human",
"value": "Add new \"testing environment\" include.\n"
},
{
"from": "gpt",
"value": "# This software is in the public domain, furnished \"as is\", without technical\n# support, and with no warranty, express or implied, as to its usefulness for\n# any purpose.\n\n# Require this ... | ruby | chosen |
[
{
"from": "human",
"value": "Test that gem_layout renders feedback component\n\nThis imports a test from Smokey [^1][^2] that confirms that the feedback\ncomponent is present & functional.\n\nThe Smokey test does not currently meet the eligibility criteria for\ninclusion in the repository [^3], but by addin... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec description and bump minor version\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'aruba-doubles'\n s.version = '0.0.1'\n s.authors = [\"Björn Albers\"]\n s.email = [\"... | ruby | chosen |
[
{
"from": "system",
"value": "Fix skip_authorization_check gone missing for switch_circle."
},
{
"from": "human",
"value": "class User::AccountsController < ApplicationController\n\n before_action :ensure_logged_in\n before_action :ensure_circle\n before_action { load_user_instance }\n\n lay... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade fugit to 1.1.4 (thus et-orbi To 1.1.2)\n"
},
{
"from": "human",
"value": "\nGem::Specification.new do |s|\n\n s.name = 'rufus-scheduler'\n\n s.version = File.read(\n File.expand_path('../lib/rufus/scheduler.rb', __FILE__)\n ).match(/ VERSION *= *['\"](... | ruby | chosen |
[
{
"from": "system",
"value": "Expand test to show prior data\n"
},
{
"from": "human",
"value": "#encoding: utf-8\n\nrequire_relative '../spec_helper'\nrequire_relative '../support/active_record'\nrequire 'togglr/toggles'\nrequire 'togglr/active_record/repository'\n\nmodule Togglr\n describe Tog... | ruby | chosen |
[
{
"from": "human",
"value": "Add date_beginning & budget, rename due_date to date_end in projects table migration\n"
},
{
"from": "gpt",
"value": "class AddAttributesToProjects < ActiveRecord::Migration\n def change\n\t\trename_column :projects, :due_date, :date_end\n\t\tadd_column :projects, :... | ruby | chosen |
[
{
"from": "system",
"value": "[dm-tags] Support dm-constraints in explicitly defined FK\n"
},
{
"from": "human",
"value": "class Tagging\n include DataMapper::Resource\n\n property :id, Serial\n property :taggable_id, Integer, :required => true\n property :taggable_type, Class, ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix to include the indicated vcloud api version\n"
},
{
"from": "human",
"value": "module VCloud\n module RestApi\n include Session\n \n def refresh (session = current_session)\n #TODO: verify_ssl proper for prod\n request = RestClient::Request.n... | ruby | chosen |
[
{
"from": "system",
"value": "Add show method to expensesheets\n"
},
{
"from": "human",
"value": "class ExpensesheetsController < ApplicationController\n before_action :find_user, only: [:new, :create]\n\n def new\n @expenses = Expense.new\n end\n\n\n def create\n Expense.expense_she... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.