conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set program name for logger\n" }, { "from": "human", "value": "require 'logger'\nrequire 'uri'\n\nmodule Perpetuity\n class Configuration\n def initialize\n @logger = Logger.new(STDOUT)\n end\n\n def data_source *args\n if args.any?\n db =...
ruby
chosen
[ { "from": "system", "value": "Define default behaviour for fields method in Event::Base\n" }, { "from": "human", "value": "require 'twterm/utils'\n\nmodule Twterm\n module Event\n class Base\n include Utils\n\n def initialize(*args)\n fields.zip(args).map(&:flatten).each do ...
ruby
chosen
[ { "from": "human", "value": "Create cask for Geo Sans Light font\n" }, { "from": "gpt", "value": "class FontGeoSansLight < Cask\n url 'http://img.dafont.com/dl/?f=geo_sans_light'\n homepage 'http://www.dafont.com/geo-sans-light.font'\n version 'latest'\n sha1 'no_checksum'\n font 'GeosansLi...
ruby
chosen
[ { "from": "system", "value": "Remove entity loading from conductor\n" }, { "from": "human", "value": "require 'entities/pages/page'\nrequire 'interactors/pages/builds_page'\nrequire_relative '../../presenters/abc/page_presenter' # Need to do load path manip?\n\nmodule Abc\n module Conductors\n ...
ruby
chosen
[ { "from": "human", "value": "Test that fieri flag disabled the fieri engine routes\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\n# a :request spec instead of :feature, doesn't need full-on Capybara\ndescribe 'fieri routes', type: :request do\n describe 'GET /status' do\n it 'shou...
ruby
chosen
[ { "from": "system", "value": "Comment to remove catch after removing 'AvailabilityMixin' module\n" }, { "from": "human", "value": "class ApplicationHelper::Button::GenericFeatureButtonWithDisable < ApplicationHelper::Button::GenericFeatureButton\n needs_record\n\n def calculate_properties\n ...
ruby
chosen
[ { "from": "system", "value": "Fix deprecation warning on rescue responses\n" }, { "from": "human", "value": "class ActionController::Forbidden < StandardError\nend\nclass ActionController::Unauthorized < StandardError\nend\n\nActionDispatch::ShowExceptions.rescue_responses.update('ActionControll...
ruby
chosen
[ { "from": "system", "value": "Define the test case when wheelchair_toilet has different value\n" }, { "from": "human", "value": "require 'rails_helper'\nrequire 'poi_migration'\n\ndescribe \"PoiMigration\" do\n\n describe \"migrates pois that are tagged as wheelchair_toilet\" do\n context \"...
ruby
chosen
[ { "from": "system", "value": "Test no pasa por la configuración de peticiones remotas. Arreglo provisional.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.expand_path(File.dirname(__FILE__) + '/request_helper')\n\nfeature \"Errores\", %q{\n Para enterarme mejor cuando hay ...
ruby
chosen
[ { "from": "system", "value": "Write test for callout content method\n" }, { "from": "human", "value": "require \"nokogiri\"\nrequire \"spec_helper\"\n\ndescribe \"html output\" do \n before :all do\n newsletter = TrelloNewsletter.new\n VCR.use_cassette(\"Newsletter generate\", :allow_play...
ruby
chosen
[ { "from": "system", "value": "Fix the painful cache test to work on all platforms\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "\ndescribe package('memcached') do\n it { should be_installed }\nend\n\ndescribe service('memcached...
ruby
chosen
[ { "from": "system", "value": "Fix typo in gemspec file\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"yard-gobject-introspection\"\n s.version = \"0.0.1.pre\"\n s.licenses = [\"GPL-2.0\"]\n s.summary = \"Generate documentattion for gobject-int...
ruby
chosen
[ { "from": "system", "value": "Update gemspec with correct information\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'desktop/version'\n\nGem::Specification.new do |spec|\n spec.nam...
ruby
chosen
[ { "from": "system", "value": "Change default to phone number\n" }, { "from": "human", "value": "class SmsController < ApplicationController\n\n\tdef text_friend\n\t\t@user = current_user\n\t\tmessage = \"This is \" + @user.first_name + \" \" + @user.last_name + \". Thanks for watching that I get...
ruby
chosen
[ { "from": "system", "value": "Update Podspec to add -ObjC linker flag.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"CKRefreshControl\"\n s.version = \"1.0.0\"\n s.summary = \"A pull-to-refresh view for iOS 5, 100% API-compatible with UIRefreshControl ...
ruby
chosen
[ { "from": "system", "value": "Fix image tags to be no larger than 50\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ApplicationHelper\n STOCK_IMAGE_URL = 'https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=50'\n\n def dis...
ruby
chosen
[ { "from": "system", "value": "Use sql rather than ruby loop\n" }, { "from": "human", "value": "module Backend\n module Groups\n extend self\n def create(groupname:, usernames:)\n group = Group.new\n group.groupname = groupname\n group.users << usernames.map{ |username| User...
ruby
chosen
[ { "from": "system", "value": "Refactor External IP reterival method\n\nRemoved hacky HTML parsing for cleaner JSON responses. Need to add error checking." }, { "from": "human", "value": "# 3rd party\nrequire 'toml'\nrequire 'webrick'\nrequire 'json'\nrequire 'net/http'\nrequire 'uri'\nrequire 'a...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix RuboCop false positive\"\n\nThis reverts commit ed245d90f16d09703b2504e14454c4ab91ffa551.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RouteTranslator\n module ConfigurationHelper\n BOOLEAN_OPTIONS = {\n disable_fa...
ruby
chosen
[ { "from": "system", "value": "Raise when Payload is in pbzx stream format\n" }, { "from": "human", "value": "require \"shellwords\"\n\nmodule IESD\n class Packages\n\n # BaseSystemBinaries.pkg\n class BaseSystemBinaries < PKGUtil::PKG\n\n # Extract the mach_kernel.\n #\n # ...
ruby
chosen
[ { "from": "human", "value": "Add concatenated version column to Postgres view" }, { "from": "gpt", "value": "require File.expand_path('../settings', __FILE__)\n\nplatform = if defined?(Sequel::Postgres)\n :postgres\n elsif defined?(Sequel::MySQL)\n :mysql\n ...
ruby
chosen
[ { "from": "system", "value": "Add pending spec to cover the future configuration functionality\n" }, { "from": "human", "value": "require \"spec_helper\"\n\ndescribe Nark do\n describe \"#configure\" do\n end\nend\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe...
ruby
chosen
[ { "from": "system", "value": "Reset specs & tests before each test in Test Spec\n" }, { "from": "human", "value": "describe Kontrast::Test do\n before :each do\n Kontrast.describe(\"test\") do |spec|\n spec.before_screenshot do |test_driver, production_driver, test|\n ...
ruby
chosen
[ { "from": "system", "value": "Upgrade to more than devise 2.1.2\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'devise_uid/version'\n\nGem::Specification.new do |gem|\n ge...
ruby
chosen
[ { "from": "system", "value": "Fix File Creator spec, updating to RSpec 3\n" }, { "from": "human", "value": "require \"writer/file_creator\"\n\nmodule Writer\n describe FileCreator do\n let(:file) { stub(:file) }\n let(:creator) { FileCreator.new }\n\n before :each do\n File.stu...
ruby
chosen
[ { "from": "system", "value": "Make test pass after reworking users seeds\n" }, { "from": "human", "value": "require 'test_helper'\n\n#\n# == User model test\n#\nclass UserTest < ActiveSupport::TestCase\n setup :initialize_test\n\n #\n # == Roles\n #\n test 'should be true if user is super_a...
ruby
chosen
[ { "from": "system", "value": "Reorder the loading of rake task data" }, { "from": "human", "value": "class Download\n def self.platforms\n Repositories.descendants\n .reject { |platform| platform == Repositories::Base }\n .sort_by(&:name)\n end\n\n def self.new_github_repos\n ...
ruby
chosen
[ { "from": "system", "value": "Add explict setting for polling interval\n\n\n(transferred from ManageIQ/manageiq@029fff10f202726801137bc0bf0f345bedc7ccfd)\n" }, { "from": "human", "value": "class ManageIQ::Providers::Hawkular::DatawarehouseManager::EventCatcher < ManageIQ::Providers::BaseManager:...
ruby
chosen
[ { "from": "system", "value": "Fix version number to 3.1.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'XLSwiftKit'\n s.version = '3.0.2'\n s.license = 'MIT'\n s.summary = 'Helpers and Extensions for Swift'\n s.homepage = 'https://github.com/xmartlabs/XLSwiftKit'\n s....
ruby
chosen
[ { "from": "system", "value": "Comment out test until we add a root url." }, { "from": "human", "value": "require 'rails_helper'\n\ndescribe ApplicationController do\n describe \"#access_denied\" do\n let!(:error) { double \"error\" }\n\n before { expect(error).to receive(:message).and_ret...
ruby
chosen
[ { "from": "system", "value": "Remove flaky test that doesn't really matter that much\n\nSeems like this would happen on some machines but not on others. Not\nsure exactly what's going on, but this is such an edge case I'm just\ngoing to remove the test.\n" }, { "from": "human", "value": "describ...
ruby
chosen
[ { "from": "system", "value": "Add memory_limit context to compile tests due to memory calculator -totMemory option that must be > 0\n" }, { "from": "human", "value": "# Encoding: utf-8\n# Cloud Foundry Java Buildpack\n# Copyright 2013-2015 the original author or authors.\n#\n# Licensed under the...
ruby
chosen
[ { "from": "system", "value": "Add rake as a development dependency " }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"split/export/version\"\n\nGem::Specification.new do |s|\n s.name = \"split-export\"\n s.version =...
ruby
chosen
[ { "from": "system", "value": "Add janus plugin name in constant\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire 'json'\nrequire 'securerandom'\n\nmodule RRJ\n # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>\n # Message Janus sending to rabbitmq server\n class ...
ruby
chosen
[ { "from": "system", "value": "Fix easger loading in development issue. Include authenticatable on user in to_prepare block.\n" }, { "from": "human", "value": "module PushType\n module Auth\n class Engine < ::Rails::Engine\n isolate_namespace PushType\n engine_name 'push_type_auth'\...
ruby
chosen
[ { "from": "system", "value": "Update uri to secure connection.\n" }, { "from": "human", "value": "module Taskrabbit\n module Config\n DEFAULT_BASE_URI = 'http://www.taskrabbit.com'\n DEFAULT_END_POINT = 'api/v1'\n DEFAULT_API_SECRET = nil\n DEFAULT_API_KEY = nil\n\n VALID_O...
ruby
chosen
[ { "from": "human", "value": "Make stub spec for PlaylistReferenceParser.\n" }, { "from": "gpt", "value": "require 'bra/driver_common/requests/playlist_reference_parser'\n\n# Mock implementation of PlaylistReferenceParser.\nclass MockPrp < Bra::DriverCommon::Requests::PlaylistReferenceParser \nen...
ruby
chosen
[ { "from": "system", "value": "Add configuration.rb to gemspec files list\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = \"yubikey\"\n s.version = \"1.3.0\"\n s.description = \"A library to verify, decode, decrypt and parse Yubik...
ruby
chosen
[ { "from": "system", "value": "Update gemspec so bundle doesn't complains about missing files\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do |s|\n s.name = \"serenity\"\n s....
ruby
chosen
[ { "from": "system", "value": "Remove an unused attribute from Base\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"active_record_doctor/printers/io_printer\"\n\nmodule ActiveRecordDoctor\n module Detectors\n # Base class for all active_record_doctor detectors.\n...
ruby
chosen
[ { "from": "system", "value": "Add to myself to authors :)" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'rambutan/version'\n\nGem::Specification.new do |spec|\n spec.name = ...
ruby
chosen
[ { "from": "system", "value": "Put it to me straight: just say it.\n\nPrefer Thor's say method to Kernel's plain puts.\n" }, { "from": "human", "value": "require \"active_support\"\nrequire \"rails/secrets\"\n\nmodule Rails\n module Command\n class SecretsCommand < Rails::Command::Base # :nod...
ruby
chosen
[ { "from": "system", "value": "Change module from Activity -> Follower\n" }, { "from": "human", "value": "module FCG\n module Client\n module Activity\n ATTRIBUTES = [:follower_id, :leader_id, :approved, :created_at, :updated_at].freeze\n\n module ClassMethods\n \n end\n...
ruby
chosen
[ { "from": "system", "value": "Use public_send instead of send\n" }, { "from": "human", "value": "module Gitlab\n module GithubImport\n class BaseFormatter\n attr_reader :formatter, :project, :raw_data\n\n def initialize(project, raw_data)\n @project = project\n @raw_d...
ruby
chosen
[ { "from": "system", "value": "Use Ruby 1.8 hash syntax.\n" }, { "from": "human", "value": "require 'bundler' ; Bundler.require :development, :test\nrequire 'sassy-maps'\nrequire 'minitest/autorun'\n\nmodule SassyMaps\n class TestHelper < Minitest::Test\n\n def test_map_get\n assert_rend...
ruby
chosen
[ { "from": "system", "value": "Add ActiveRecord and ActiveSupport require methods\n" }, { "from": "human", "value": "require \"pg_audit/version\"\nrequire \"pg_audit/audit\"\nrequire \"pg_audit/logged_action\"\nrequire \"pg_audit/readonly\"\n\nmodule PgAudit\n # Your code goes here...\nend\n" ...
ruby
chosen
[ { "from": "system", "value": "Use bearer token for publishing API authentication\n" }, { "from": "human", "value": "require 'gds_api/publishing_api_v2'\nrequire 'gds_api/imminence'\nrequire 'gds_api/worldwide'\n\nmodule Services\n def self.publishing_api\n @publishing_api ||= GdsApi::Publish...
ruby
chosen
[ { "from": "system", "value": "Increase version from 0.0.1.4 to 0.0.1.5\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'settings'\n s.version = '0.0.1.4'\n s.summary = 'Settings data access and assignment'\n s.description = ' '\n\n s.au...
ruby
chosen
[ { "from": "system", "value": "Check for content security policy support in sandbox\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Define an application-wide content security policy\n# For further information see the following documentation\n# ...
ruby
chosen
[ { "from": "system", "value": "Remove WORKING_STATES again - they aren't needed anymore.\n" }, { "from": "human", "value": "module State\n STATES = %w(failed no_result pending fetching processing done)\n TERMINAL_STATES = %w(failed no_result done)\n WORKING_STATES = STATES - TERMINAL_STATES\n\...
ruby
chosen
[ { "from": "system", "value": "Disable gulp build for the moment\n" }, { "from": "human", "value": "set :application, \"symfony\"\nset :repo_url, \"git@github.com:symfony/#{fetch(:application)}.git\"\nset :branch, ENV[\"BRANCH\"] || \"master\"\n\n\n# Symfony settings\nset :symfony_directory_struc...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec to build across all platforms.\n" }, { "from": "human", "value": "$:.unshift File.expand_path('lib', File.dirname(__FILE__))\nrequire 'looksee/version'\n\nGem::Specification.new do |s|\n s.name = 'looksee'\n s.version = Looksee::VERSION\n s.authors = ...
ruby
chosen
[ { "from": "system", "value": "Use $aws_log instead of _log in Graph refresh\n\nUse $aws_log instead of _log in Graph refresh\n\nFixes BZ:\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1439257\n" }, { "from": "human", "value": "class ManageIQ::Providers::Amazon::Inventory::Collector::StorageManage...
ruby
chosen
[ { "from": "system", "value": "Fix a bug when showing a poll\n" }, { "from": "human", "value": "# == Schema Information\n# Schema version: 20090308232205\n#\n# Table name: poll_answers\n#\n# id :integer(4) not null, primary key\n# poll_id :integer(4)\n# answer :string(255)\...
ruby
chosen
[ { "from": "system", "value": "Add architecture to installing yum packages.\n" }, { "from": "human", "value": "packages = [\"#{node[:dynamodb][:local][:java][:pkg]}\"]\n\npackages.each do |pkg|\n package pkg do\n action :install\n end\nend\n\ndirectory \"#{node[:dynamodb][:local][:dir]}\" do...
ruby
chosen
[ { "from": "system", "value": "Make crash error popup its own window\n" }, { "from": "human", "value": "\nDEBUG = true\n\nbegin\n require 'Qt'\n require 'fileutils'\n require 'yaml'\n require 'logger'\n require 'pathname'\n\n require_relative 'dsvlib'\n\n require_relative 'version'\n\n re...
ruby
chosen
[ { "from": "system", "value": "Upgrade yEd.app to version 3.14.4.\n" }, { "from": "human", "value": "cask :v1 => 'yed' do\n version '3.14.3'\n sha256 '2ff232c2fd64fcfd1fc9637f231c197186df94352c19f8eb3a7dc7a3949b7101'\n\n url \"https://www.yworks.com/products/yed/demo/yEd-#{version}_with-JRE8.d...
ruby
chosen
[ { "from": "system", "value": "Tweak ugly hack in submissions test\n" }, { "from": "human", "value": "require './test/mongo_helper'\nrequire 'exercism/nit'\nrequire 'exercism/submission'\nrequire \"mocha/setup\"\n\nmodule Exercism\nend\n\nclass SubmissionTest < Minitest::Test\n\n def teardown\n ...
ruby
chosen
[ { "from": "system", "value": "Add require to make tests pass, since they don't require everything in gemfile.\n" }, { "from": "human", "value": "# Monkey patch github markup to use redcarpet with support for autolinks and tables\nmodule GitHub::Markup\n alias_method :old_render, :render\n def ...
ruby
chosen
[ { "from": "system", "value": "Make compatibility with rack v2.x explicit\n\nSo that rack-www can be used in projects that use rack v2.x, e.g.\nthose based on rails v5.x as well as with those that depend on rack\nv1.x" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name ...
ruby
chosen
[ { "from": "human", "value": "Add plugin for linking to api documentation\n" }, { "from": "gpt", "value": "module Jekyll\n #\n # A simple tag for generating url for api documentation.\n #\n # {% api_url core:ArezContext %}\n #\n class ApiUrl < Liquid::Tag\n def initialize(tag_name, marku...
ruby
chosen
[ { "from": "system", "value": "Add confirmed? method for User\n" }, { "from": "human", "value": "module Spree\n class User < Spree::Base\n include UserMethods\n\n devise :database_authenticatable, :registerable, :recoverable,\n :rememberable, :trackable, :validatable, :encryptabl...
ruby
chosen
[ { "from": "system", "value": "Make these gems into development dependencies.\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n\nrequire File.expand_path('../lib/geos/extensions/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"geos-extensions\"\n s.version = Geos::...
ruby
chosen
[ { "from": "system", "value": "Allow usage of wrapper_html option in filters" }, { "from": "human", "value": "module ActiveAdmin\n module Inputs\n module Filters\n module Base\n include ::Formtastic::Inputs::Base\n include ::ActiveAdmin::Filters::FormtasticAddons\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix obtaining the path to passenger-status command\n" }, { "from": "human", "value": "module CheckPassenger\n class PassengerStatus\n class << self\n attr_accessor :path\n\n def run\n `#{passenger_status_executable_path}`\n end\n\n pri...
ruby
chosen
[ { "from": "human", "value": "Add heading tag helper to Dough\n" }, { "from": "gpt", "value": "module HeadingTagHelper\n def heading_tag(content_or_options_with_block = nil, options = {}, &block)\n if block_given?\n options = content_or_options_with_block if content_or_options_with_block...
ruby
chosen
[ { "from": "system", "value": "Add optional options param to the FileSystemInterface initializer (it helps with integration)\n" }, { "from": "human", "value": "module Potatochop\n class FileSystemInterface\n attr_reader :source\n\n def initialize(source)\n @source = source\n end\n ...
ruby
chosen
[ { "from": "human", "value": "Add a few rake tasks to prune trial DB\n\nThese have to be used with a lot of caution!\n" }, { "from": "gpt", "value": "namespace :trial_prune do\n desc 'Delete applications for an office'\n task :office_applications, [:office_id] => :environment do |_, args|\n ...
ruby
chosen
[ { "from": "system", "value": "Build data_records first, and then build data out of it\n" }, { "from": "human", "value": "module MiqReportable\n # generate a ruport table from an array of db objects\n def self.records2table(records, only_columns)\n return Ruport::Data::Table.new if records.b...
ruby
chosen
[ { "from": "system", "value": "Update spec with custom predicates\n" }, { "from": "human", "value": "RSpec.describe Dry::Validation do\n subject(:validation) { schema.new }\n\n shared_context 'uses custom predicates' do\n it 'uses provided custom predicates' do\n expect(validation.(emai...
ruby
chosen
[ { "from": "system", "value": "Package version patch number is increased from 0.1.2 to 0.1.3\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nGem::Specification.new do |s|\n s.name = 'settings'\n s.version = '0.1.2'\n s.summary = 'Settings data access and assignment'\n s.descript...
ruby
chosen
[ { "from": "human", "value": "Add plugin to expand author usernames\n" }, { "from": "gpt", "value": "# Derived from https://divshot.com/blog/web-development/advanced-jekyll-features/#author-support\n\nmodule Jekyll\n class AuthorTag < Liquid::Tag\n \n def initialize(tag_name, attribute, token...
ruby
chosen
[ { "from": "system", "value": "Use -fPIC CFLAG for uf8proc\n" }, { "from": "human", "value": "# frozen_string_literal: true\n# rubocop:disable GlobalVars\nrequire \"mkmf\"\n\npkg_config(\"utf8proc\")\nunless have_library(\"utf8proc\")\n puts \"Compiling local libutf8proc...\"\n\n libutf8proc_di...
ruby
chosen
[ { "from": "system", "value": "Use TrySailBlogNotification::Application::NAME in Cli class\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule TrySailBlogNotification\n class Cli < Thor\n\n class_option 'log-level', desc: 'Set the logger level (fatal, error, warn, info,...
ruby
chosen
[ { "from": "system", "value": "Add option to not uppercase first letter for anchor normalize\n" }, { "from": "human", "value": "module Wptemplates\n module Utils\n module_function\n \n def normalize_link string\n normalized = string.clone\n normalized.tr!('_',' ')\n norma...
ruby
chosen
[ { "from": "system", "value": "Update error controller to use core_layout\n" }, { "from": "human", "value": "class ErrorController < ApplicationController\n slimmer_template \"wrapper\"\n\n def handler\n # defer any errors to be handled in ApplicationController\n raise request.env[:__api_...
ruby
chosen
[ { "from": "system", "value": "Define route for return votes assoc with current user\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n def new\n @user = User.new\n end\n\n def create\n @user = User.new(user_params)\n if @user.save\n session[:user_...
ruby
chosen
[ { "from": "human", "value": "Add some Java overrides for int test.\n" }, { "from": "gpt", "value": "# Set Java defaults\ndefault['java']['jdk_version'] = '8'\ndefault['java']['install_flavor'] = 'oracle'\ndefault['java']['jdk']['8']['x86_64']['url'] = 'https://vw-java.s3.amazonaws.com/jdk-8u91-l...
ruby
chosen
[ { "from": "system", "value": "Correct misnamed attribute from hostname to host\n\nI discovered this while running the app in production mode to check that\nthe smoke tests worked.\n" }, { "from": "human", "value": "Rails.application.configure do\n config.action_mailer.smtp_settings = {\n use...
ruby
chosen
[ { "from": "system", "value": "Allow resource owner credentials with devise session\n" }, { "from": "human", "value": "Doorkeeper.configure do\n orm :active_record\n\n enable_application_owner :confirmation => true\n\n default_scopes :public\n optional_scopes :user, :project, :group, :collec...
ruby
chosen
[ { "from": "system", "value": "Use the new \"sexy\" validations in Viewport\n\nAs pointed out by Rubocop. Also, this commit adds a top-level class\ndocumentation comment to this class.\n\nChange-Id: I4e4cea055c2c2284b0d742bea3ceb9ff285fa71c\n" }, { "from": "human", "value": "class Viewport < Acti...
ruby
chosen
[ { "from": "system", "value": "Use SSH instead of http. remember to add ssh key to bitbucket.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"bGraphicCommon\"\n s.version = \"1.0\"\n s.summary = \"Common gfx and other stuff for bGraphic projects.\"\n s.h...
ruby
chosen
[ { "from": "system", "value": "Support all kinds of associations in ActiveRecord adapter.\n" }, { "from": "human", "value": "require 'bricks'\nrequire 'active_record'\n\nmodule Bricks\n module Adapters\n module ActiveRecord\n def association?(name)\n @class.reflect_on_association(...
ruby
chosen
[ { "from": "system", "value": "Remove duplicate textual_group_smart_management from EmsDatawarehouse.\n" }, { "from": "human", "value": "module DatawarehouseSummaryHelper\n include TextualMixins::TextualName\n\n def textual_ems\n textual_link(@record.ext_management_system)\n end\n\n def te...
ruby
chosen
[ { "from": "system", "value": "Fix failed test: GET '/blogs/...' to '/news/...'\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nrequire 'test_helper'\n\nclass BlogTest < ActionDispatch::IntegrationTest\n def setup\n end\n\n test \"Blog post should be rendered\" do\n get \"/blogs...
ruby
chosen
[ { "from": "system", "value": "Comment change for bytesize implementation\n" }, { "from": "human", "value": "module Dewey\n module Utils #:nodoc:\n # Performs URI escaping. (Stolen from Camping via Rake).\n def escape(s)\n s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) {\n '%'+$1.unpack('...
ruby
chosen
[ { "from": "system", "value": "Fix relative lib path for verify-buildpack-binaries\n\n[#126369115]\n" }, { "from": "human", "value": "#! /usr/bin/env ruby\n\nbuildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..'))\nrequire_relative \"#{buildpacks_ci_dir}/lib/buildpack-binary...
ruby
chosen
[ { "from": "system", "value": "Use email to find Slack ID\n" }, { "from": "human", "value": "module V1\n class LeadersController < ApplicationController\n before_action :verify_club_id, only: :intake\n\n TEAM_ID = Rails.application.secrets.default_slack_team_id\n\n def intake\n lea...
ruby
chosen
[ { "from": "system", "value": "Change crudify call to be correct\n" }, { "from": "human", "value": "module Refinery\n module News\n module Admin\n class ItemsController < ::Refinery::AdminController\n\n crudify :'refinery/news_item', :order => \"publish_date DESC\"\n\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Rename method for better understanding\n" }, { "from": "human", "value": "class MatchedContributionGenerator\n attr_reader :contribution\n\n def initialize(contribution)\n @contribution = contribution\n end\n\n def create\n active_matches.each do |match|\n...
ruby
chosen
[ { "from": "human", "value": "Test for parsing ID from stream name\n" }, { "from": "gpt", "value": "require_relative '../automated_init'\n\ncontext \"Get ID\" do\n test \"Is the part of a stream name after the first dash\" do\n id = Identifier::UUID.random\n stream_name = \"someStream-#{id...
ruby
chosen
[ { "from": "system", "value": "Print out issues with expansions" }, { "from": "human", "value": "require_relative \"parser\"\nrequire_relative \"macro\"\n\nmodule Tritium\n module Parser\n class MacroExpander\n def initialize\n @macros = {}\n load_macros!\n end\n ...
ruby
chosen
[ { "from": "system", "value": "Include the delayed job id as a tag\n\nMakes it easier to see how many unique jobs are causing a\nparticular failure as opposed to retries of the same few jobs.\n" }, { "from": "human", "value": "require 'delayed_job'\n\nmodule Delayed\n module Plugins\n\n class...
ruby
chosen
[ { "from": "system", "value": "Send fewer samples to cloud trace for now\n" }, { "from": "human", "value": "# Enable tracing if GCLOUD_PROJECT_ID is set\nunless ENV[\"GCLOUD_PROJECT_ID\"].nil?\n Google::Cloud::Trace.configure do |config|\n sampler = Google::Cloud::Trace::TimeSampler.default\n...
ruby
chosen
[ { "from": "human", "value": "Create migration file for pg_search_documents\n" }, { "from": "gpt", "value": "class CreatePgSearchDocuments < ActiveRecord::Migration\n def self.up\n say_with_time(\"Creating table for pg_search multisearch\") do\n create_table :pg_search_documents do |t|\n...
ruby
chosen
[ { "from": "system", "value": "Fix migration for empty database\n" }, { "from": "human", "value": "class AddUserToProxyExercise < ActiveRecord::Migration[5.2]\n def change\n add_reference :proxy_exercises, :user, polymorphic: true, index: true\n add_column :proxy_exercises, :public, :bool...
ruby
chosen
[ { "from": "system", "value": "Fix link to most recent post in topics view\n" }, { "from": "human", "value": "Forem::TopicsHelper.class_eval do\n def new_since_last_view_text(topic)\n if forem_user\n topic_view = topic.view_for(forem_user)\n forum_view = topic.forum.view_for(forem_u...
ruby
chosen
[ { "from": "system", "value": "Use EOF flag that does not break Rubinius; inspect EOFErrors in SSLSocket\n" }, { "from": "human", "value": "require \"socket\"\n\nmodule Bunny\n begin\n require \"openssl\"\n\n class SSLSocket < OpenSSL::SSL::SSLSocket\n def read_fully(count, timeout = ...
ruby
chosen
[ { "from": "system", "value": "Change usage of DataMapper::Resource::ClassMethods to use Model\n" }, { "from": "human", "value": "# Needed to import datamapper and other gems\nrequire 'rubygems'\nrequire 'pathname'\n\n# Add all external dependencies for the plugin here\ngem 'dm-core', '~>0.9.10'\...
ruby
chosen
[ { "from": "system", "value": "Add task for retabbing all files in project\n\nReplace hard tabs with two character soft tabs.\n" }, { "from": "human", "value": "namespace :whitespace do\n desc 'Removes trailing whitespace'\n task :clean do\n sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g...
ruby
chosen