conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change \"From\" of notification mails\n\nMaybe it would be a good idea to make it configurable, but \"meh\" for\nnow.\n"
},
{
"from": "human",
"value": "require 'action_mailer'\n\nActionMailer::Base.raise_delivery_errors = true\nActionMailer::Base.delivery_method = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add chef15 tag to FC042\n\nWe've removed this old method from Chef 15.\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "rule \"FC042\", \"Prefer include_recipe to require_recipe\" do\n tags %w{correct... | ruby | chosen |
[
{
"from": "system",
"value": "Refinement: Allow null values in metadata column\n"
},
{
"from": "human",
"value": "class <%= class_name %> < ActiveRecord::Migration\n def self.up\n create_table \"<%= migration_table_name %>\" do |t|\n t.string :name\n t.string :description\n t.... | ruby | chosen |
[
{
"from": "system",
"value": "Monitor redis in status url\n"
},
{
"from": "human",
"value": "# coding: UTF-8\n\nclass HomeController < ApplicationController\n\n skip_before_filter :browser_is_html5_compliant?, :only => :app_status\n\n layout 'front_layout'\n\n def index\n if logged_in?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove custom new relic deploy task\n"
},
{
"from": "human",
"value": "require 'new_relic/recipes'\n\nmodule RPCapistrano\n module NewRelic\n def self.load_into(configuration)\n configuration.load do\n after 'deploy:update', 'rp:newrelic:enable_monit... | ruby | chosen |
[
{
"from": "system",
"value": "Insert the namespace into the admin path if it's different to the plural_name.\n"
},
{
"from": "human",
"value": "Refinery::Core::Engine.routes.draw do\n<% unless skip_frontend? %>\n # Frontend routes\n namespace :<%= namespacing.underscore %> do\n resources :<... | ruby | chosen |
[
{
"from": "system",
"value": "Print line if it is tainted\n"
},
{
"from": "human",
"value": "module Travis\n module Shell\n class Generator\n TaintedOutput = Class.new(StandardError)\n\n attr_reader :nodes, :level\n\n def initialize(nodes)\n @nodes = nodes\n @lev... | ruby | chosen |
[
{
"from": "system",
"value": "Use session instead env variable\n"
},
{
"from": "human",
"value": "require 'roda'\n\nmodule WebBouncer\n class Middleware < Roda\n plugin :middleware\n\n route do |r|\n r.is 'auth/failure' do\n Matcher.call(OauthContainer['oauth.failure'].call) d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wrong recipient name in greetings\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n# The mailer for course emails.\nclass Course::Mailer < ApplicationMailer\n # Sends an invitation email for the given invitation.\n #\n # @param [Course] cours... | ruby | chosen |
[
{
"from": "system",
"value": "Disable database refresh between each scenario"
},
{
"from": "human",
"value": "Before do\n CouchRestRails::Tests.setup\nend\n\nAfter do\n CouchRestRails::Tests.teardown\nend"
},
{
"from": "gpt",
"value": "\n# Before each scenario...\nBefore do\n# Cou... | ruby | chosen |
[
{
"from": "system",
"value": "Use explicit delegation from ManualWithSections to Manual\n\nInstead of the implicit delegation provided by `SimpleDelegator`.\n"
},
{
"from": "human",
"value": "require \"delegate\"\n\nclass ManualWithSections < SimpleDelegator\n attr_writer :sections, :removed_se... | ruby | chosen |
[
{
"from": "system",
"value": "Declare TZInfo as a runtime dependency."
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nGem::Specification.new do |s|\n s.name = 'delayed_job_data_mapper'\n s.summary = 'DataMapper backend for delayed_job'\n s.version ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a mock user object in email preview\n\nSecurity issue."
},
{
"from": "human",
"value": "class PagesController < ApplicationController\n skip_authorization_check\n skip_before_action :authenticate_user!\n\n # Preview html email template\n def email\n tpl =... | ruby | chosen |
[
{
"from": "system",
"value": "Add static link to the \"me\" user.\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n def show\n @user = User.find(params[:id])\n maybe_redirect(@user.check_permissions(current_user))\n @user.save_as_view(session)\... | ruby | chosen |
[
{
"from": "system",
"value": "Add WSBA admin email to cc.rb CI notifications\n"
},
{
"from": "human",
"value": "Project.configure do |project|\n project.email_notifier.emails = ['scott@butlerpress.com']\n project.build_command = \"./script/cruise_build.rb #{project.name}\"\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Use deleted boolean for active/archived scopes\n\nUse deleted boolean for active/archived scopes, since using\nboolean with a partial index is much faster.\n"
},
{
"from": "human",
"value": "module ArchivedMixin\n extend ActiveSupport::Concern\n\n included do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add restriction for non owner of dataset collection - 403\n"
},
{
"from": "human",
"value": "class DatasetFilesController < ApplicationController\n\n def index\n dataset_id = params[:dataset_id]\n @dataset = Dataset.find(dataset_id)\n @dataset_files = Data... | ruby | chosen |
[
{
"from": "system",
"value": "Add `freebsd` to supports list"
},
{
"from": "human",
"value": "name 'build-essential'\nmaintainer 'Opscode, Inc.'\nmaintainer_email 'cookbooks@opscode.com'\nlicense 'Apache 2.0'\ndescription 'Installs C compiler / build tools'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify we need at least Debian 7\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "name 'rsyslog'\nmaintainer 'Chef Software, Inc.'\nmaintainer_email 'cookbooks@chef.io'\nlicense ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Centos 6 from this Cookbook\n"
},
{
"from": "human",
"value": "name 'resource_from_hash'\nmaintainer 'Oregon State University'\nmaintainer_email 'systems@osuosl.org'\nsource_url 'https://github.com/osuosl-cookbooks/resource_from_hash'\... | ruby | chosen |
[
{
"from": "system",
"value": "Add chef as a dev dependency\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"azure-chef-extension/version\"\n\nGem::Specification.new do |s|\n s.name = \"azure-chef-extension\"\n s.vers... | ruby | chosen |
[
{
"from": "system",
"value": "Fix copy and paste error.\n"
},
{
"from": "human",
"value": "module ParsleySimpleForm\n module Validators\n class Base\n attr_reader :object, :error, :validate, :options, :attribute_name\n\n def initialize(object, validate, attribute_name)\n @ob... | ruby | chosen |
[
{
"from": "system",
"value": "Fix compatibility with puppet-lint 2.2\n\npuppet-lint 2.2 introduced the :FUNCTION_NAME token type, effectively\nbreaking the existing simple checking for :NAME. Here we check for\neither token, so the plugin will continue to work pre 2.2.\n"
},
{
"from": "human",
... | ruby | chosen |
[
{
"from": "system",
"value": "Add groups for default searches.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Default search\" do\n\n it \"Should match popular items\" do\n default_search('b3340555', 'Pubmed', 3)\n end\n\n it \"Should match partial titles\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump fast_json_api to 1.5 and loosen dependency requirement\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire_relative '../core/lib/spree/core/version.rb'\n\nGem::Specification.new do |s|\n s.authors = [\"Ryan Bigg\"]\n s.email = ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix relative links in the forums feed\n"
},
{
"from": "human",
"value": "atom_feed do |feed|\n if @user\n feed.title(\"LinuxFr.org : les posts de #{@user.name}\")\n else\n feed.title(\"LinuxFr.org : les forums\")\n end\n feed.updated(@nodes.first.try :crea... | ruby | chosen |
[
{
"from": "system",
"value": "Load optimus.rb in path and remove calls to bundle exec"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'optimus.rb' do\n let(:finished) do\n <<-eos\nPipeline finished.\n eos\n end\n\n let(:config_path) { 'spec/supports/config/test-config... | ruby | chosen |
[
{
"from": "system",
"value": "Make the fake current_user available as a helper\n"
},
{
"from": "human",
"value": "# \"Borrowed\" from the context engine\n# We fake the login process in the engine, as we don't know how the actual\n# application would have it set up. Guessing is best, currently.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Clean URLs can be done with just to_param, we don't need slugify for it.\n"
},
{
"from": "human",
"value": "class Project\n include Mongoid::Document\n include Mongoid::Slugify\n\n field :name\n field :vcs_url\n field :ssh_private_key\n field :ssh_public_key\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add service id to representer\n\nTo be able to update services, the API needs to expose the ID\n"
},
{
"from": "human",
"value": "require 'roar/representer/json'\nrequire 'roar/representer/feature/hypermedia'\n\nmodule ServiceRepresenter\n include Roar::Representer... | ruby | chosen |
[
{
"from": "system",
"value": "Fix urls in Deezer.app Cask\n\nThe old url pointed to an outdated https Deezer domain for which the\nSSL certificate has expired. This resulted in the following error\nwhen trying to run brew cask install deezer:\n\ncurl: (60) SSL certificate problem: Invalid certificate chain\... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Vienna to 3.0.0 RC8\n"
},
{
"from": "human",
"value": "class Vienna < Cask\n version '3.0.0_rc7'\n sha256 '5a7b4b20883beb8e99ec331c09892a27b3f1340d90ddb6226fa11bee24643677'\n\n url \"https://downloads.sourceforge.net/vienna-rss/Vienna#{version}.tgz\"\n a... | ruby | chosen |
[
{
"from": "human",
"value": "Add a new version of the Cask \"mpeg-streamclip\".\n\n* MPEG Streamclip 1.9.3b8\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'mpeg-streamclip-beta' do\n version '1.9.3b8'\n sha256 '42459e262e46df81228ef3859aba102d9368be3a5710514a3055dd9f49c2f234'\n\n url \"http://... | ruby | chosen |
[
{
"from": "system",
"value": "Update Phpstorm to version 10.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'phpstorm-bundled-jdk' do\n version '9.0.2'\n sha256 '38030261bb8ee17e0238b92f7d1f49671e6dc54b2b69aeaf25cbd20b94f0c479'\n\n url \"http://download-cf.jetbrains.com/webide/PhpStorm-#{ver... | ruby | chosen |
[
{
"from": "system",
"value": "Update TeXnicle to latest version 2.2.11"
},
{
"from": "human",
"value": "class Texnicle < Cask\n url 'http://www.bobsoft-mac.de/resources/TeXnicle/2.2/TeXnicle.app.2.2.9.zip'\n homepage 'http://www.bobsoft-mac.de/texnicle/texnicle.html'\n version '2.2.9'\n sha2... | ruby | chosen |
[
{
"from": "system",
"value": "Put the tour 'create your first factlink page' screenshot on pending\n\nBuild has to succeed, someone is going to fix this later.\n"
},
{
"from": "human",
"value": "require 'integration_helper'\n\ndescribe \"Check the tour\", type: :request do\n\n before do\n @u... | ruby | chosen |
[
{
"from": "system",
"value": "Fix random fails by waiting until the loading indicator has gone\n"
},
{
"from": "human",
"value": "require 'acceptance_helper'\n\ndescribe \"factlink\", type: :feature do\n include ScreenshotTest\n include FeedHelper\n\n let(:user) { create :user }\n\n it 'it r... | ruby | chosen |
[
{
"from": "system",
"value": "Fix podspec for iOS 7 only\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'DMCustomModalViewController'\n s.version = '1.0'\n s.summary = 'A cool modal transition'\n s.homepage = 'https://github.com/Dimillian/DMCustomMod... | ruby | chosen |
[
{
"from": "system",
"value": "Use root_path for crontab generation.\n"
},
{
"from": "human",
"value": "# Use this file to easily define all of your cron jobs.\n#\n# It's helpful, but not entirely necessary to understand cron before proceeding.\n# http://en.wikipedia.org/wiki/Cron\n\n# Example:\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use inherited resources to handle validation and send the email message.\n"
},
{
"from": "human",
"value": "class ContactMessagesController < ApplicationController\n\n respond_to :html\n\n def create\n if params.has_key? :contact_form\n create_contact_mess... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue flagged by brakeman\n\n Confidence: High\n Category: Cross-Site Request Forgery\n Check: ForgerySetting\n Message: 'protect_from_forgery' should be called in Kracken::SessionsController\n File: app/controllers/kracken/sessions_controller.rb\n Line: 4\n\nPer the ... | ruby | chosen |
[
{
"from": "system",
"value": "Update gemspec summary and description"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path('../lib', __FILE__)\nrequire 'ball_gag/version'\n\nGem::Specification.new do |s|\n s.name = 'ball_gag'\n s.version = BallGag::VER... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for Rails < 6\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = %q{decorators}\n s.version = %q{2.0.2}\n s.description = %q{Manages the process of load... | ruby | chosen |
[
{
"from": "system",
"value": "Test that service listener calls worker when attachment data present\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule ServiceListeners\n class AttachmentAccessLimitedUpdaterTest < ActiveSupport::TestCase\n extend Minitest::Spec::DSL\n\n let(... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spelling and add a little more info\n"
},
{
"from": "human",
"value": "default[:tz] = 'UTC'\n\n# Path to tzdata directory\ndefault['timezone']['tzdata_dir'] = '/usr/share/zoneinfo'\n\n# Path to file used by kernerl for local timezone's data\ndefault['timezone'][... | ruby | chosen |
[
{
"from": "human",
"value": "Add specs for SubmoduleStatus post-commit hook\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe Overcommit::Hook::PostCommit::SubmoduleStatus do\n let(:config) { Overcommit::ConfigurationLoader.default_configuration }\n let(:context) { double('co... | ruby | chosen |
[
{
"from": "system",
"value": "Add redis gem as dependency\n"
},
{
"from": "human",
"value": "lib = File.expand_path('../lib/', __FILE__)\n$:.unshift lib unless $:.include?(lib)\n \nrequire 'redistry/version'\n \nGem::Specification.new do |s|\n s.name = \"redistry\"\n s.version = Red... | ruby | chosen |
[
{
"from": "system",
"value": "Add initialize method to SteamValve\n"
},
{
"from": "human",
"value": "require \"steam_valve/version\"\nrequire \"steam_valve/steam_api_key\"\nrequire \"exceptions/api_key_missing_error\"\n\nmodule SteamValve\nend"
},
{
"from": "gpt",
"value": "require \... | ruby | chosen |
[
{
"from": "system",
"value": "Split the sh command in the rake task\n"
},
{
"from": "human",
"value": "require 'fileutils'\n\nnamespace :npm do\n desc \"Install npm packages\"\n task :install do\n package_file = ::Rails.configuration.npm.package_file\n output_file_path = ::Rails.root.joi... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the podspec source files pattern\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"swift-tsao\"\n s.version = \"3.0.1\"\n s.summary = \"Type-Safe Associated Objects in Swift\"\n s.description = <<-DESC\n TSAO is an im... | ruby | chosen |
[
{
"from": "system",
"value": "Make special-case creation methods private.\n\nThis allows nil check to be skipped.\n"
},
{
"from": "human",
"value": "module GirFFI\n # The InPointer class handles conversion from ruby types to pointers for\n # arguments with direction :in. This is used for argum... | ruby | chosen |
[
{
"from": "system",
"value": "Use GitHub SSH repository address in Capistrano\n"
},
{
"from": "human",
"value": "require \"bundler/capistrano\"\nset :user, \"username\"\nset :domain, \"lugia.jbhannah.net\"\n\nset :application, \"jbhannah\"\nset :repository, \"git://github.com/jbhannah/jbhannah.... | ruby | chosen |
[
{
"from": "system",
"value": "Add post method for search\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n root to: 'pages#home'\n\n resources :members, only: [:index, :show] do\n collection do\n get :popular\n get :search\n end\n end\n\nend\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Change from class method to instance method\n"
},
{
"from": "human",
"value": "require 'rails'\n\nclass LogWeasel::Railtie < Rails::Railtie\n config.log_weasel = ActiveSupport::OrderedOptions.new # enable namespaced configuration in Rails environments\n\n initiali... | ruby | chosen |
[
{
"from": "human",
"value": "Add GET test for watering controller\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\ndescribe WateringsController do\n before(:each) do\n User.create(email: \"test@test.com\", password: \"testPassword\")\n controller.session[:user_id] = User.first.i... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor NowPlayingClient to cache now playing messages\n"
},
{
"from": "human",
"value": "require 'eventmachine'\nrequire 'em/mqtt'\nrequire 'json'\n\nclass NowPlayingClient\n\n def initialize\n @server = 'test.mosquitto.org'\n @topic = 'bbc/nowplayin... | ruby | chosen |
[
{
"from": "system",
"value": "Use action from user object, default :add\n\nIn the user_management recipe, use the action from the user object if one exists, or :add if there isn't.\n\nThis allows us to specify in the collection that we want to, for example, delete users if they exist.\n"
},
{
"from"... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Drop the .html blog links\"\n\nThis reverts commit 3c18be6b539169534e1d0ced18786f2adc0d445a.\n"
},
{
"from": "human",
"value": "activate :sprockets do |c|\n c.expose_middleman_helpers = true\nend\n\nactivate :autoprefixer do |prefix|\n prefix.browsers = \... | ruby | chosen |
[
{
"from": "system",
"value": "Disable special log handling since we will deploy with Dokku\n"
},
{
"from": "human",
"value": "require 'bundler/setup'\nrequire 'sinatra'\nrequire './app'\n\nroot_dir = File.dirname(__FILE__)\n\nset :environment, (ENV['RACK_ENV'] || 'production').to_sym\n\nset :roo... | ruby | chosen |
[
{
"from": "system",
"value": "Set homepage to github repo url\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"whenever/version\"\n\nGem::Specification.new do |s|\n s.name = \"whenever\"\n s.version = Whenever::V... | ruby | chosen |
[
{
"from": "system",
"value": "Update tests, remove unnecessary (.*)\n"
},
{
"from": "human",
"value": "class GitlabRunner < Formula\n desc \"The official GitLab CI runner written in Go\"\n homepage \"https://gitlab.com/gitlab-org/gitlab-ci-multi-runner\"\n url \"https://gitlab.com/gitlab-org/... | ruby | chosen |
[
{
"from": "system",
"value": "Update KDE Phonon to 4.4.2 and add QUuid compilation fix.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass KdePhonon <Formula\n url 'ftp://ftp.kde.org/pub/kde/stable/phonon/4.4.0/phonon-4.4.0.tgz'\n homepage 'http://phonon.kde.org/'\n md5 '80544b876c... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to string for port default\n"
},
{
"from": "human",
"value": "require 'tiny_tds'\n\nclass MSSQLHelper\n attr_reader :res\n\n def initialize(opts = {})\n ENV['MSSQLPORT'] ||= 1433\n @conn = TinyTds::Client.new(:username => ENV['MSSQLUSER'], :password =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix runtime dependency in gemspec"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'csv2avro/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure DbtDriver is set of postgres build\n"
},
{
"from": "human",
"value": "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add more logging to diff task\n"
},
{
"from": "human",
"value": "require_relative '../model/cloudfile'\nrequire_relative '../model/event'\n\nmodule Convection\n module Control\n ##\n # Control tour Clouds\n ##\n class Cloud\n def configure(cloudfil... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Module as type in bean definitions\n\nAlso renamed a method for clarity. I found it hard to understand after\na long absence from the code: naming it for its side effect helps.\n"
},
{
"from": "human",
"value": "module Fabrique\n\n class BeanDefinition\n att... | ruby | chosen |
[
{
"from": "system",
"value": "Remove acknowledgement link to original feed detection code\n\nIt has changed significantly since then.\n"
},
{
"from": "human",
"value": "require 'feedzirra'\nrequire 'feed2email/http_fetcher'\n\nmodule Feed2Email\n class FeedAnalyzer\n def initialize(url)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add image and resource accessors to Mollie::API::Object::Issuer\n"
},
{
"from": "human",
"value": "module Mollie\n module API\n module Object\n class Issuer < Base\n attr_accessor :id, :name, :method\n end\n end\n end\nend\n"
},
{
"f... | ruby | chosen |
[
{
"from": "system",
"value": "Fix scheduling issue with seconds_since_midnight on DST transition day.\n"
},
{
"from": "human",
"value": "require 'ice_cube'\nrequire 'sirius/teaching_time'\n\nmodule Sirius\n class SemesterCalendar\n\n def initialize( teaching_period:, first_week_parity: )\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add error hash and error_message to exception\n"
},
{
"from": "human",
"value": "class ZabbixApi\n\n class BaseError < RuntimeError\n attr_accessor :response\n\n def initialize(message, response = nil)\n super(message)\n @response = response\n en... | ruby | chosen |
[
{
"from": "system",
"value": "Add note on how to use this\n"
},
{
"from": "human",
"value": "# template.rb\n\ngem_group :development, :test do\n gem 'rspec-rails', '~> 3.0'\n gem 'factory_girl_rails'\nend\n\ngem_group :development do\n gem 'guard-livereload', '~> 2.4', require: false\n gem '... | ruby | chosen |
[
{
"from": "system",
"value": "Use precondition to inherit params in spec test for mod::jk\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'apache::mod::jk', :type => :class do\n it_behaves_like 'a mod class, without including apache'\n\n shared_examples 'minimal resources'... | ruby | chosen |
[
{
"from": "system",
"value": "Use message expectations to speed up the build spec\n\nThis commit also removes some (very slow) tests for `build!` that are\nalready tested in the tests for individual builders.\n\n[#52758883]\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Pol... | ruby | chosen |
[
{
"from": "human",
"value": "Update 'Copy AMI' sample script\n"
},
{
"from": "gpt",
"value": "require 'logger'\nrequire 'pp'\n\n# Mocked for Audit library\nclass MockedAuditLib\n\n attr_reader :results\n\n def initialize(options)\n @fail = false\n\n raise \"Option :benchmark is required\... | ruby | chosen |
[
{
"from": "system",
"value": "devilry_theme: Use django_extjs4 instead of extjshelpers.\n"
},
{
"from": "human",
"value": "# $ext_path: This should be the path of the Ext JS SDK relative to this file\n$ext_path = \"../../../../extjshelpers/static/extjshelpers/extjs\"\n\nthis_dir = File.dirname(_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove TODOs causing gemspec errors.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/endpoint/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Adam Williams']\n gem.email = ['adam... | ruby | chosen |
[
{
"from": "system",
"value": "Split threads and tasks into Classes\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire '../OSXMemory'\nrequire 'sys/proctable'\n\nmatches = Sys::ProcTable.ps.select{|p| p.comm =~ /Calculator/ }\nabort(\"No PID\") if matches.empty?\npid = matches.first.... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for forth-coming managed account endpoint.\n"
},
{
"from": "human",
"value": "require 'faraday'\nrequire 'json'\n\nmodule AtpayRest\n class Dashboard\n def self.find_organization(session, search_string, args={})\n response = session.conn.get \"a... | ruby | chosen |
[
{
"from": "system",
"value": "Change the version from 1 to 1.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"DTMHeatmap\"\n s.version = \"1\"\n s.summary = \"An MKMapView overlay to visualize location data\"\n s.homepage = \"https://github.com/dat... | ruby | chosen |
[
{
"from": "system",
"value": "Create the database table on init of Bayes\n"
},
{
"from": "human",
"value": "require 'sequel'\nrequire 'classifier/bayes'\n\nmodule KaratSleuth::Storage\n\t\n\t# Get an instance of the SQLite sequel object\n\tdef self.db\n\t\t@db ||= Sequel.connect 'sqlite://karat-... | ruby | chosen |
[
{
"from": "system",
"value": "Set some Sinatra defaults, listen on localhost only for now.\n"
},
{
"from": "human",
"value": "module Risu\n\tmodule Web\n\t\tclass Application < Sinatra::Base\n\t\t\tset :port, 8969\n\t\t\tset :haml, :format => :html5\n\n\t\t\tget '/' do\t\n\t\t\t\thaml :index\n\t... | ruby | chosen |
[
{
"from": "system",
"value": "Allow slug to be used to display a field value\n"
},
{
"from": "human",
"value": "module FieldsHelper\n def field_help_text(field, _attribute=:default_value)\n model_key = field.model_name.i18n_key\n t(\"helpers.help.#{model_key}\")\n end\n\n def field_valu... | ruby | chosen |
[
{
"from": "human",
"value": "Load config and then test connection to API\n"
},
{
"from": "gpt",
"value": "require 'net/http'\nrequire 'yaml'\n\nmodule CheckfrontAPI\n class Client\n \n config = YAML.load_file(File.expand_path(File.dirname('__FILE__') + \"/config.yml\"))\n API_ENDPOIN... | ruby | chosen |
[
{
"from": "system",
"value": "Add a constant for OpenXML spreadsheet MIME types.\n"
},
{
"from": "human",
"value": "module Smartsheet\n module Constants\n VERSION = '1.1.0'.freeze\n\n USER_AGENT = 'smartsheet-ruby-sdk'.freeze\n API_URL = 'https://api.smartsheet.com/2.0'.freeze\n\n J... | ruby | chosen |
[
{
"from": "system",
"value": "Index the session by the handler name.\n"
},
{
"from": "human",
"value": "\nmodule OauthProvider\n\n class Base\n include HandlerActions\n\n attr_accessor :return_url, :session\n\n def self.provider(name, session)\n info = self.get_handler_info(:oauth... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecessary cruft from shell line\n"
},
{
"from": "human",
"value": "namespace :factory_girl do\n desc 'Verify that all FactoryGirl factories are valid'\n task lint: :environment do\n if Rails.env.test?\n begin\n DatabaseCleaner.start\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Reduce timeout for non-CI features\n"
},
{
"from": "human",
"value": "require 'spinach/capybara'\nrequire 'capybara/poltergeist'\n\nCapybara.javascript_driver = :poltergeist\nCapybara.register_driver :poltergeist do |app|\n Capybara::Poltergeist::Driver.new(app, js... | ruby | chosen |
[
{
"from": "system",
"value": "Test coverage for assignment score level\n"
},
{
"from": "human",
"value": "require \"active_record_spec_helper\"\n\ndescribe AssignmentScoreLevel do\n describe \"validations\" do\n subject { build(:assignment_score_level) }\n\n it \"is valid with a name, a v... | ruby | chosen |
[
{
"from": "system",
"value": "Update the pod to require arc\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"Analytics\"\n s.version = \"0.10.6\"\n s.summary = \"Segment.io analytics and marketing tools library for iOS.\"\n s.homepage = \... | ruby | chosen |
[
{
"from": "system",
"value": "Use namespaced controller name in action route.\n"
},
{
"from": "human",
"value": "require 'wash_out/engine'\nrequire 'wash_out/param'\nrequire 'wash_out/dispatcher'\nrequire 'wash_out/soap'\nrequire 'wash_out/router'\nrequire 'wash_out/type'\nrequire 'wash_out/mode... | ruby | chosen |
[
{
"from": "system",
"value": "Implement downloading of promo codes\n"
},
{
"from": "human",
"value": "require 'fastlane_core/itunes_connect/itunes_connect'\n\nmodule FastlaneCore\n class ItunesConnect\n\n def run\n #TODO: implement logic here\n end\n\n end\nend\n"
},
{
"from... | ruby | chosen |
[
{
"from": "system",
"value": "Use 'strictly_current' scope for NoEnrolledStudentAlert\n"
},
{
"from": "human",
"value": "class CourseAlertManager\n def create_no_students_alerts\n courses_to_check = Course.current\n courses_to_check.each do |course|\n next unless course.students.empt... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for duckieTV.\n"
},
{
"from": "human",
"value": "cask 'duckietv' do\n version '1.1.3'\n sha256 '4c4ee965cf39db6333dad65fe2b56ebf412af490a1b091487ef5d1fe8989b359'\n\n # schizoduckie.github.io/DuckieTV was verified as official when first in... | ruby | chosen |
[
{
"from": "system",
"value": "Remove factory girl from migration script\n\nA refrence to factory girl can fail due to validations on columns\nthat are added in app/model after this migration.\n\nSeen in https://github.com/ManageIQ/manageiq/pull/13567\n"
},
{
"from": "human",
"value": "require_mi... | ruby | chosen |
[
{
"from": "system",
"value": "Stop clearing tmp if special env key is set\n"
},
{
"from": "human",
"value": "require \"fileutils\"\n\nmodule RSpec\n module Support\n module Directory\n private\n\n def with_directory(directory)\n current = Dir.pwd\n target = Pathname.... | ruby | chosen |
[
{
"from": "system",
"value": "Set important ivars in the constructor\n"
},
{
"from": "human",
"value": "module ROM\n class Header\n # @private\n class Attribute\n include Equalizer.new(:name, :key, :type)\n\n attr_reader :name, :key, :meta\n\n def self.[](meta)\n typ... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize @url to prevent warnings\n"
},
{
"from": "human",
"value": "require 'rest_in_peace/errors'\n\nmodule RESTinPeace\n class TemplateSanitizer\n\n class IncompleteParams < RESTinPeace::DefaultError; end\n\n def initialize(url_template, params)\n @... | ruby | chosen |
[
{
"from": "human",
"value": "Make admin a column for user model\n"
},
{
"from": "gpt",
"value": "class AddAdminToUser < ActiveRecord::Migration\n def up\n add_column :users, :admin, :boolean\n say_with_time \"Migrating Admin Status.\" do\n User.all.each do |user|\n user.update... | ruby | chosen |
[
{
"from": "human",
"value": "Discard drafts of WL news page with wrong base paths\n"
},
{
"from": "gpt",
"value": "# These drafts were created with an incorrect base path structure:\n\nServices.publishing_api.discard_draft(\"d4515402-9704-4240-a0c5-38455521f3b5\", locale: \"zh-tw\")\nServices.pu... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.