conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Speed up main rspec suite\n" }, { "from": "human", "value": "module Spec\r\n module Rails\r\n module VERSION #:nodoc:\r\n BUILD_TIME_UTC = 20080522063005\r\n end\r\n end\r\nend\r\n\r\n# Verify that the plugin has the same revision as RSpec\r\nif Spec::R...
ruby
chosen
[ { "from": "system", "value": "Change version to 0.9.0 - not sure yet.\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n name = \"SHGestureRecognizerBlocks\"\n url = \"https://github.com/seivan/#{name}\"\n git_url = \"#{url}.git\"\n s.name = name\n s.version = \"1...
ruby
chosen
[ { "from": "system", "value": "Fix build error caused by seed-fu expecting RAILS_ENV to be set\n" }, { "from": "human", "value": "SeedFu.quiet = true if ENV['RAILS_ENV'] == 'production'\n\n# SeedFu is confused. Fixtures should be handled by the test suite.\nSeedFu.fixture_paths.reject! { |i| i.ma...
ruby
chosen
[ { "from": "system", "value": "Improve Instance Getter/Setter Method Definitions\n\nSwitch from the condensed brace ({}) style to the easier to read do|end style.\n" }, { "from": "human", "value": "module MaskableAttribute\n module ActsAsMaskableAttribute\n extend ActiveSupport::Concern\n\n ...
ruby
chosen
[ { "from": "system", "value": "Remove default from text column\n\nFixes error on some systems where running migration throws\n\n`Mysql2::Error: BLOB/TEXT column 'text_feedback' can't have a default value`" }, { "from": "human", "value": "class CreatePortalLearnerActivityFeedbacks < ActiveRecord::...
ruby
chosen
[ { "from": "system", "value": "Add missing require to fix the CI\n" }, { "from": "human", "value": "require 'cases/helper'\n\nclass TimestampTest < ActiveRecord::TestCase\n def test_load_infinity_and_beyond\n unless current_adapter?(:PostgreSQLAdapter)\n return skip(\"only tested on post...
ruby
chosen
[ { "from": "system", "value": "Add blank event team memberships table to fix old migrations\n" }, { "from": "human", "value": "class MergePeopleWithSameNameAndEmail < ActiveRecord::Migration\n def change\n Person.current = RacingAssociation.current.person\n\n Person.transaction do\n D...
ruby
chosen
[ { "from": "system", "value": "Allow setting of cms page part visibility\n" }, { "from": "human", "value": "require_dependency \"pwb/application_controller\"\n\nmodule Pwb\n class Api::V1::PageController < ApplicationApiController\n # protect_from_forgery with: :null_session\n def get\n ...
ruby
chosen
[ { "from": "human", "value": "Change keyword_searches count type from integer to float.\n\nChange-Id: I7f070a238db8529e52d25584a2fc1aa0cb9fd0d3\n" }, { "from": "gpt", "value": "class ChangeKeywordSearchCountType < ActiveRecord::Migration\n def up\n change_column :keyword_searches, :count, :fl...
ruby
chosen
[ { "from": "system", "value": "Add test-unit 3.0.0 or later development dependency\n\nBecause Ruby 2.2 does not export 'test/unit' library.\ntest-unit has compatible APIs against Ruby bundled 'test/unit'.\n" }, { "from": "human", "value": "# coding: utf-8\n\nGem::Specification.new do |spec|\n sp...
ruby
chosen
[ { "from": "system", "value": "Index sorted array in a better way\n" }, { "from": "human", "value": "# coding: utf-8\n\nmodule StringMetric\n module Levenshtein\n class IterativeWithTwoMatrixRowsOptimized\n def self.distance(from, to, options = {})\n return 0 if from == to\n ...
ruby
chosen
[ { "from": "human", "value": "Move capybara helpers in a separate template file\n" }, { "from": "gpt", "value": "module CapybaraHelper\n def page!\n save_and_open_page\n end\n\n def screenshot!\n save_and_open_screenshot\n end\nend\n\nRSpec.configure do |config|\n config.include Capyba...
ruby
chosen
[ { "from": "system", "value": "Add sub-message to title using «\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule ApplicationHelper\n\n def title\n base_title = \"menosgrande\"\n if @title.nil?\n base_title\n else\n \"#{@title} » #{base_title}\"\n end\n end\n\...
ruby
chosen
[ { "from": "system", "value": "Introduce cucumber namespace on parallel tasks\n" }, { "from": "human", "value": "require 'parallel'\nrequire_relative \"application_generator\"\n\ndesc \"Run the full suite using parallel_tests to run on multiple cores\"\ntask parallel_tests: [:setup_parallel_tests...
ruby
chosen
[ { "from": "system", "value": "Add Array.range, Array.median, and Array.occurences\n" }, { "from": "human", "value": "class Array\n\n\tdef sum\n\t\treturn inject { |sum, n| sum + n }\n\tend\n\n\tdef mean\n\t\treturn sum.to_f/size\n\tend\n\n\talias :average :mean\n\nend\n" }, { "from": "gp...
ruby
chosen
[ { "from": "human", "value": "test/cli: Add initial tests for `kbsecret session`\n" }, { "from": "gpt", "value": "# frozen_string_literal: true\n\nrequire \"helpers\"\n\n# Tests for KBSecret::CLI::Command::Session\nclass KBSecretCommandSessionTest < Minitest::Test\n include Helpers\n include He...
ruby
chosen
[ { "from": "system", "value": "Enable netplan for all Equinix machines\n" }, { "from": "human", "value": "name \"equinix\"\ndescription \"Role applied to all servers at Equinix\"\n\ndefault_attributes(\n :networking => {\n :nameservers => [\"66.28.0.45\", \"66.28.0.61\", \"2001:978:1:1::d\", ...
ruby
chosen
[ { "from": "human", "value": "Add Fill Paper PDF Last-Modified Job\n" }, { "from": "gpt", "value": "class FillPaperPDFLastModifiedJob < ActiveJob::Base\n # Paper.where(pdf_last_modified: nil).each {|p| FillPaperPDFLastModifiedJob.perform_later(p) }\n def perform(paper)\n session = patron_ses...
ruby
chosen
[ { "from": "system", "value": "Fix file paths outside gem\n" }, { "from": "human", "value": "require \"json/api/version\"\nrequire 'json'\nrequire 'json-schema'\n\nmodule JSON\n module Api\n def self.parse(source, opts={})\n json = JSON.parse(source, opts)\n\n validate(json, opts)\n...
ruby
chosen
[ { "from": "system", "value": "Remove old 'rake acceptance' task\n" }, { "from": "human", "value": "# Copyright (c) 2008-2013 Michael Dvorkin and contributors.\n#\n# Fat Free CRM is freely distributable under the terms of MIT license.\n# See MIT-LICENSE file or http://www.opensource.org/licenses/...
ruby
chosen
[ { "from": "system", "value": "Revert change meant to help in multi-user environments." }, { "from": "human", "value": "module Docsplit\n\n # Include a method to transparently convert non-PDF arguments to temporary\n # PDFs. Allows us to pretend to natively support docs, rtf, ppt, and so on.\n ...
ruby
chosen
[ { "from": "system", "value": "Add :to_json as delegated method to @param for resource mocks\n\nThis aids in JSON serialization.\n" }, { "from": "human", "value": "require 'ostruct'\nrequire 'delegate'\nrequire 'active_support/concern'\nrequire 'active_support/core_ext/hash/deep_merge'\n\nclass F...
ruby
chosen
[ { "from": "system", "value": "Make API key optional in MapQuest lookup\n\nMapQuest doesn't require a key for the \"open\" API, but the\ngeocoder throws an error if you don't provide one anyway.\nThis edit makes the API key optional.\n" }, { "from": "human", "value": "require 'cgi'\nrequire 'geoc...
ruby
chosen
[ { "from": "system", "value": "Add next link to pagination.\n" }, { "from": "human", "value": "module Liquid\n\n module PaginationFilters\n \n def paginate(pagination_info)\n pagination_html = \"\"\n if pagination_info.is_a? Hash\n if pagination_info[\"current_page\"] && (pa...
ruby
chosen
[ { "from": "system", "value": "Refactor issue details into variable\n" }, { "from": "human", "value": "require_relative 'jira_gateway'\n\nmodule Lita\n module Handlers\n class JiraIssues < Handler\n\n def initialize(*args)\n super(args)\n @jira = JiraGateway.new(http, confi...
ruby
chosen
[ { "from": "system", "value": "Add decorators path to Padrino.require_dependencies\n" }, { "from": "human", "value": "module Padrino\n module Decorator\n ##\n # Registers helpers into your application\n #\n # @param [Sinatra::Application] app\n # The specified padrino applicatio...
ruby
chosen
[ { "from": "system", "value": "Add a subspec for HTColor\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"HTPressableButton\"\n s.version = \"1.1.0\"\n s.summary = \"Pressable button with ease of use for iOS developers.\"\n s.homepage = \"http://git...
ruby
chosen
[ { "from": "human", "value": "Add spec for monitor condition variables.\n" }, { "from": "gpt", "value": "require_relative '../../spec_helper'\nrequire 'monitor'\n\ndescribe \"Monitor#new_cond\" do\n it \"creates a MonitorMixin::ConditoinVariable\" do\n m = Monitor.new\n c = m.new_cond\n ...
ruby
chosen
[ { "from": "system", "value": "Build status - fix to display for specific build\n" }, { "from": "human", "value": "module ApplicationHelper\n\n def icon_for_status(status)\n if @build\n case @build.build_status\n when 'success'\n '<i class=\"fa fa-check fa-fw\" style=\"color:...
ruby
chosen
[ { "from": "system", "value": "Allow inline html on markdown\n" }, { "from": "human", "value": "module ApplicationHelper\n\n def m(text)\n require 'redcarpet_pygmentize'\n renderer = PygmentizeHTML.new(hard_wrap:true, filter_html:true)\n extensions = { space_after_headers: true,\n ...
ruby
chosen
[ { "from": "system", "value": "Replace views generator with btgen gem\n" }, { "from": "human", "value": "module Riews\n module ViewsHelper\n\n def generate_view_content_for(view)\n content_tag :table do\n generate_header_for(view) + generate_body_for(view)\n end\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix integrations tests for Docker Machine\n\nSigned-off-by: Dieter Reuter <554783fc552b5b2a46dd3d7d7b9b2cce9a82c122@me.com>\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe package('docker-machine') do\n it { should be_installed }\nend\n\ndescri...
ruby
chosen
[ { "from": "human", "value": "Add snippets for method collision on :name and :method_name\n" }, { "from": "gpt", "value": "if __FILE__ =~ /^snippets/\n fail \"Snippets are supposed to be run from their own directory to avoid side \" \\\n \"effects as e.g. the root `Gemfile`, or `spec/spec_...
ruby
chosen
[ { "from": "system", "value": "Stop DataImportWorker jobs from recurring\n" }, { "from": "human", "value": "#\n# Responsible for migrating data from the Opscode Community Site to Supermarket\n#\nclass DataImportWorker\n include Sidekiq::Worker\n include Sidetiq::Schedulable\n\n recurrence do\n...
ruby
chosen
[ { "from": "system", "value": "Add some examples for the planning application model.\n" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: planning_applications\n#\n# id :integer not null, primary key\n# openlylocal_id :integer ...
ruby
chosen
[ { "from": "system", "value": "Fix Amazon SNS optional target test to pass without AWS client configuration\n" }, { "from": "human", "value": "require 'activity_notification/optional_targets/amazon_sns'\ndescribe ActivityNotification::OptionalTarget::AmazonSNS do\n let(:test_instance) { Activity...
ruby
chosen
[ { "from": "system", "value": "Comment out the photo tag on the atom feed\n\nIt's not a valid tag according to\nhttp://feedvalidator.org/check.cgi\\?url\\=http%3A%2F%2Fblog.crowdint.com%2Fatom.xml\n" }, { "from": "human", "value": "atom_feed do |feed|\n feed.title 'Crowd Interactive Tech Blog'\n...
ruby
chosen
[ { "from": "system", "value": "Use Ruby keyword args in OrganisationalManualDocumentAttachmentServiceRegistry\n\nI think that using language features instead of custom code makes this\neasier to understand.\n" }, { "from": "human", "value": "class OrganisationalManualDocumentAttachmentServiceRegi...
ruby
chosen
[ { "from": "system", "value": "Fix IPv6 detection in CI environment.\n" }, { "from": "human", "value": "IPV6_SUPPORT = File.exist?(\"/proc/net/if_inet6\")\n\nclass Minitest::Test\n private\n\n def skip_unless_ipv6_support\n unless IPV6_SUPPORT\n message = \"WARNING: Skipping test_static...
ruby
chosen
[ { "from": "system", "value": "Add MIT license to gemspec." }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path '../lib/deck-of-cards', __FILE__\nrequire 'card'\nrequire 'version'\n\nGem::Specification.new do |s|\n s.name = 'deck-of-cards'\n s.version ...
ruby
chosen
[ { "from": "system", "value": "Make a spec not use aruba\n" }, { "from": "human", "value": "require 'rack/test'\nrequire 'boulevard/host_app'\nrequire 'json'\n\ndescribe 'Using Boulevard from Ruby', type: :aruba do\n include Rack::Test::Methods\n let(:app) { Boulevard::HostApp.new(secret_key) }...
ruby
chosen
[ { "from": "system", "value": "Add test for peg equality method\n" }, { "from": "human", "value": "require_relative '../peg'\nrequire_relative 'spec_helper'\n\ndescribe Peg do\n let(:peg) { Peg.new(\"red\") }\n describe '#color' do\n it 'returns the color of the peg' do\n expect(peg.col...
ruby
chosen
[ { "from": "system", "value": "Fix json/xml output for searches with one results." }, { "from": "human", "value": "class SiteController < ApplicationController\n respond_to :html, :xml, :json, :only => [:search]\n\n def index\n page_title false\n\n events_count_path = 'tmp/calagator_event...
ruby
chosen
[ { "from": "system", "value": "Remove helper function that ended up being unnecessary\n" }, { "from": "human", "value": "module ApplicationHelper\n # Returns the full title on a per-page basis.\n def full_title(page_title = '')\n base_title = \"SuiteSparse Matrix Collection\"\n if page_ti...
ruby
chosen
[ { "from": "system", "value": "Update so that json is 'pretty' printed too\n\nFor some reason, the tailing code markdown code was being rendered\nso it has been removed. Not sure what was happening.\n" }, { "from": "human", "value": "module ApplicationHelper\n\n def organization_options\n cur...
ruby
chosen
[ { "from": "system", "value": "[Fix] Fix profile job for travis\n" }, { "from": "human", "value": "class ExtractGithubProfile\n include Sidekiq::Worker\n sidekiq_options queue: :low\n\n\n def perform(id)\n client = Octokit::Client.new\n if client.ratelimit[:remaining] < 1000\n # If...
ruby
chosen
[ { "from": "system", "value": "Add owner name back to serializer\n" }, { "from": "human", "value": "class UserSerializer\n include RestPack::Serializer\n attributes :id, :login, :display_name, :credited_name, :email, :created_at, :updated_at\n can_include :projects, :collections, :classificati...
ruby
chosen
[ { "from": "system", "value": "Add inject/concat benchmark as recommended by @yujinakayama.\n\n[ci skip]" }, { "from": "human", "value": "require 'benchmark/ips'\nrequire 'rspec/core/flat_map'\n\nwords = %w[ foo bar bazz big small medium large tiny less more good bad mediocre ]\n\nBenchmark.ips d...
ruby
chosen
[ { "from": "system", "value": "Remove hardcoded use of c:\\program files to access iexplore.exe used by IE.new_process. \n\n" }, { "from": "human", "value": "require 'win32/process'\r\n\r\nmodule Watir\r\n class IE\r\n class Process\r\n def self.start\r\n # TODO: make this portabl...
ruby
chosen
[ { "from": "system", "value": "Allow loading mailer config from a file\n\nMaintains backwards compatibility with the Capistrano deploy until the\napp is moved over to the Docker-based servers.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nif (Rails.env.staging? || Rails.env....
ruby
chosen
[ { "from": "human", "value": "Add recipe to make ES optionally AZ aware\n" }, { "from": "gpt", "value": "# Add this recipe to the run list to make this node AZ aware\nnode.default[:elasticsearch][:custom_config] = {'node.rack_id' => \"#{node[:ec2][:placement_availability_zone]}\"}\n" } ]
ruby
chosen
[ { "from": "system", "value": "Bump version for podspec fix\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MD5Digest\"\n s.version = \"1.0.0\"\n s.summary = \"An Objective-C NSString category for MD5 hex digests.\"\n s.homepage = \"https://github.co...
ruby
chosen
[ { "from": "system", "value": "Change rsync path on server\n" }, { "from": "human", "value": "#!/usr/bin/env ruby1.9\n# Constants and common code for generator and uploader.\n\nUPLOAD_TO = 'sitnik@sitnik.ru:/home/sitnik/data/www/sitnik.ru/'\n\n\nrequire 'pathname'\nROOT = Pathname.new(__FILE__...
ruby
chosen
[ { "from": "system", "value": "Remove unused error handling in API\n" }, { "from": "human", "value": "module V1\n module Helpers\n module Errors\n GITHUB_PLEASE = \"Please post an issue on GitHub so we can figure it out.\"\n\n def friendly_500\n {\n error: \"%s %s %s...
ruby
chosen
[ { "from": "human", "value": "Increase datetime precision on Mysql\n\nAfter increasing the datetime precision during time serialization, we\nstarted to see issues with the execution_plan.real_time being negative\nnumber.\n\nThe calculation of the real_time value takes serialized value of\nexecution_plan.star...
ruby
chosen
[ { "from": "system", "value": "Use emoji shortcuts for bitbucket cloud\n\nUsing unicode emojis makes bitbucket render them as unicode emojis, and\nbrowsers don't generally seem to support the unicode variation selector\n16 - so the warning emoji turns up as a text symbol instead of an emoji\n" }, { "...
ruby
chosen
[ { "from": "system", "value": "Fix dependency on mocha and rake\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\nrequire \"pigtail/version\"\n\nGem::Specification.new do |s|\n s.name = \"pigtail\"\n s.version = Pigtail::VERSION\n s.authors ...
ruby
chosen
[ { "from": "system", "value": "Use instance_exec instead of own hack.\n" }, { "from": "human", "value": "require 'alf'\n\nclass Database < Alf::Database\n\n helpers do\n\n def orders\n Relation(\n Tuple(oid: \"O1\", city: \"London\", amount: 100.00),\n Tuple(oid: \"O2\", ci...
ruby
chosen
[ { "from": "system", "value": "Fix spacing for action printer\n" }, { "from": "human", "value": "module Dox\n module Printers\n class ActionPrinter < BasePrinter\n\n def print(action)\n @output.puts \"### #{action.name} [#{action.verb.upcase} #{action.path}]\\n\\n#{print_desc(acti...
ruby
chosen
[ { "from": "system", "value": "Change minor version since we're removing the init teplate.\n" }, { "from": "human", "value": "name 'varnish'\nmaintainer 'Sous Chefs'\nmaintainer_email 'help@sous-chefs.org'\nlicense 'Apache 2.0'\ndescription 'Installs and configures varnish'\nversion '3.0.2'\nsour...
ruby
chosen
[ { "from": "human", "value": "Update pg_search_document_id primary key to bigint\n" }, { "from": "gpt", "value": "class ChangePgSearchDocumentIdToBigint < ActiveRecord::Migration[6.0]\n def up\n change_column :pg_search_documents, :id, :bigint\n end\n\n def down\n change_column :pg_searc...
ruby
chosen
[ { "from": "human", "value": "Fix api shipment controller spec to set a shipment to 'ready' state before it can be shipped\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Spree::Api::V1::ShipmentsController do\n let!(:shipment) { Factory(:shipment) }\n let!(:attributes) { [:i...
ruby
chosen
[ { "from": "system", "value": "Change author details and email. Minor update\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_pos'\n s.version = '1.2'\n s.summary = 'Point of sale screen for Spree'\n s.req...
ruby
chosen
[ { "from": "system", "value": "[Podpsec] Revert version to 3.7.0 until release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"SkyFloatingLabelTextField\"\n s.version = \"3.8.0\"\n s.summary = \"A beautiful, flexible and customizable textfield that minimizes space...
ruby
chosen
[ { "from": "system", "value": "Kill mutations for MultipleDescribes cop\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n module RSpec\n # Checks for multiple top level describes. They should be nested if it is\n # for the same class o...
ruby
chosen
[ { "from": "system", "value": "Add the mysql gem for the database cookbook\n" }, { "from": "human", "value": "#\n# Cookbook Name:: mariadb\n# Recipe:: ruby\n#\n# Author:: Jesse Howarth (<him@jessehowarth.com>)\n# Author:: Jamie Winsor (<jamie@vialstudios.com>)\n#\n# Copyright 2008-2013, Opscode, ...
ruby
chosen
[ { "from": "system", "value": "Fix the bug that push log to logger when logger is nil\n" }, { "from": "human", "value": "require 'umakadata/http_helper'\nrequire 'umakadata/logging/criteria_log'\n\nmodule Umakadata\n module Criteria\n module ContentNegotiation\n\n include Umakadata::HTTP...
ruby
chosen
[ { "from": "human", "value": "Add an bag made of an array\n" }, { "from": "gpt", "value": "# Implementation of a bag using an array\n# It supports the usual add and each operation\n#\n# Author:: Tristan Claverie\n# License:: MIT\nclass ArrayBag\n\n # Initialize an empty bag\n def initialize...
ruby
chosen
[ { "from": "system", "value": "Handle truncated results for iam_user enumeration\n\nWithout this change, truncated results from the AWS API are not handled\ncorrectly, leaving some user resources undiscovered. This results in an\nincomplete picture of what already exists. Here we extend the iam_user\nprovi...
ruby
chosen
[ { "from": "system", "value": "Provision zones earlier in the vagrant process\n" }, { "from": "human", "value": "module Vagrant\n module Smartos\n module Zones\n class Plugin < Vagrant.plugin(\"2\")\n manage_zones = lambda do |hook|\n require_relative 'action'\n ...
ruby
chosen
[ { "from": "human", "value": "Add Enolsoft CHM View latest version.\n" }, { "from": "gpt", "value": "class EnolsoftChmView < Cask\n version 'latest'\n sha256 :no_check\n\n url 'http://www.enolsoft.com/download/enolsoft-chm-view.dmg'\n homepage 'http://www.enolsoft.com/chm-view-for-mac.html'\n...
ruby
chosen
[ { "from": "system", "value": "ENHANCE: Validate campus must be same\n" }, { "from": "human", "value": "class TutorialEnrolment < ActiveRecord::Base\n belongs_to :tutorial\n belongs_to :project\n\n validates :tutorial, presence: true\n validates :project, presence: true\n\n # Always add a u...
ruby
chosen
[ { "from": "human", "value": "Add test suite for Nordea renew certificate\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass NordeaRenewCertApplicationRequestTest < ActiveSupport::TestCase\n setup do\n params = nordea_renew_certificate_params\n\n # Convert the keys here since ...
ruby
chosen
[ { "from": "system", "value": "Use class update method to bypass locking\n" }, { "from": "human", "value": "class RetirementWorker\n include Sidekiq::Worker\n\n sidekiq_options queue: :high, retry: 3\n \n def perform(sms_id, workflow_id)\n sms = SetMemberSubject.find(sms_id)\n if sms.re...
ruby
chosen
[ { "from": "system", "value": "Make a helper for the current session\n" }, { "from": "human", "value": "require 'json'\n\nmodule Ldash\n module RestHelpers\n def fail_invalid(ldash_message, status = 400, discord_message = '')\n halt status, %Q({\"message\": \"#{discord_message}\", \"l-\"...
ruby
chosen
[ { "from": "system", "value": "Install zoomus with Homebrew Casks\n" }, { "from": "human", "value": "cask '1password'\ncask 'alacritty'\ncask 'alfred'\ncask 'appcleaner'\ncask 'bartender'\ncask 'docker'\ncask 'gitify'\ncask 'google-chrome'\ncask 'google-cloud-sdk'\ncask 'gyazo'\ncask 'minikube'\n...
ruby
chosen
[ { "from": "system", "value": "Remove java dependency for netacuity\n\n\nFormer-commit-id: d1255a9c38b9fc99af33e4dbc2ef0a9c5aa55dac [formerly 5bcda3eb4b752ccfded46b2f836b1cd3183e2e58] [formerly 19719f66e5d2280fb7d642b0bf91b24718cdf5a0 [formerly fa4488c196041b0ee0db860738d918032134520a [formerly e86a5e5ebc51a...
ruby
chosen
[ { "from": "system", "value": "Create Public Activity on messages postings\n" }, { "from": "human", "value": "module Georgia\n module Mailer\n class MessagesController < ::ApplicationController\n\n def create\n @message = Message.new(message_params)\n if @message.save\n ...
ruby
chosen
[ { "from": "system", "value": "Add minitest as development dependency\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'duckduckgo/version'\n\nGem::Specification.new do |spec|\n spec.n...
ruby
chosen
[ { "from": "system", "value": "DATA-80: Clean up code and exit early if URL is not provided\n" }, { "from": "human", "value": "\nclass SimplePlugin < Scout::Plugin\n needs 'net/http'\n needs 'uri'\n\n OPTIONS=<<-EOS\n url:\n name: URL\n notes: The URL to be used for health check\...
ruby
chosen
[ { "from": "system", "value": "Update the link to \"Is my device compatible?\"\n" }, { "from": "human", "value": "# coding: utf-8\n# This file is part of Mconf-Web, a web application that provides access\n# to the Mconf webconferencing system. Copyright (C) 2010-2015 Mconf.\n#\n# This file is lic...
ruby
chosen
[ { "from": "system", "value": "Fix sap link helper for global links (documentation)\n" }, { "from": "human", "value": "module UrlHelper\n # prefixed to not interfere with ActionDispatch::Routing::UrlFor\n def sap_url_for(servicename)\n return \"https://#{servicename}.#{current_region}.#{requ...
ruby
chosen
[ { "from": "system", "value": "Set newsletter to false for demo users." }, { "from": "human", "value": "class DemoController < ApplicationController\n\n def new\n if user_signed_in?\n flash[:notice] = \"You need to be logged out for this\"\n else\n pass = SecureRandom.hex(8)\n ...
ruby
chosen
[ { "from": "system", "value": "Modify new and create actions\n" }, { "from": "human", "value": "class DocsController < ApplicationController\n \n def index\n end\n\n def show\n end\n\n def new\n end\n\n def create\n end\n\n def edit\n end\n\n def update\n end\n\n def destroy\n end\...
ruby
chosen
[ { "from": "system", "value": "Disable rubocop for longer method\n" }, { "from": "human", "value": "module Users\n module OrganizationManipulator\n extend ActiveSupport::Concern\n\n def can_create_organization?\n super_admin?\n end\n\n def can_update_organization?\n admin?\...
ruby
chosen
[ { "from": "system", "value": "Fix broken link in source files page\n" }, { "from": "human", "value": "module SourceFilesHelper\n def print_status(source_file)\n case source_file.parse_status\n when 0\n \"File parsing underway\"\n when 1\n \"File successfully parsed\"\...
ruby
chosen
[ { "from": "system", "value": "Check parent_id not parent to avoid loading parent\n" }, { "from": "human", "value": "module Concerns\n module Event\n module Names\n extend ActiveSupport::Concern\n\n module ClassMethods\n def friendly_class_name\n name.underscore.huma...
ruby
chosen
[ { "from": "system", "value": "Add whitespace around default parameter equals sign\n" }, { "from": "human", "value": "class AccountablePolicy < ApplicationPolicy\n def initialize(token, resource, scope=nil)\n super(token, resource)\n @scope = scope\n end\n\n def create?\n update?\n e...
ruby
chosen
[ { "from": "system", "value": "Return a better avatar url from user serializer.\n" }, { "from": "human", "value": "class UserSerializer < ApplicationSerializer\n\n attribute :name, key: :display_name\n attribute :symbolic_role, key: :role_name\n\n attributes :username, :status, :role,...
ruby
chosen
[ { "from": "system", "value": "Change the name of the class of the installation file\n" }, { "from": "human", "value": "module SpreeBrazilianFields\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default =>...
ruby
chosen
[ { "from": "system", "value": "Fix to clear Rails schema cache\n\nDue to Rails caching the schema this migration brakes on a migration\n" }, { "from": "human", "value": "class MigrateUrlFromProviderToEndpoints < ActiveRecord::Migration\n class Provider < ActiveRecord::Base\n self.inheritance_...
ruby
chosen
[ { "from": "system", "value": "Change vagrant plugin test regex\n" }, { "from": "human", "value": "require 'serverspec'\n\nif ENV['TRAVIS']\n set :backend, :exec\nend\n\ndescribe 'vagrant Ansible role' do\n\n # Declare variables\n executable = ''\n packages = Array[]\n\n if ['debia...
ruby
chosen
[ { "from": "system", "value": "Fix typo in url default\n" }, { "from": "human", "value": "# default env vars that may not be set\nENV['ID_ROOT'] ||= 'https://id.prx.org/'\nENV['CMS_ROOT'] ||= 'https://cms.prx.org/api/vi/'\nENV['PRX_ROOT'] ||= 'https://beta.prx.org/stories/'\nENV['CRIER_ROOT'] ||=...
ruby
chosen
[ { "from": "system", "value": "Remove pdf mime registration, already in action_dispatch\n" }, { "from": "human", "value": "# Be sure to restart your server when you modify this file.\n\n# Add new mime types for use in respond_to blocks:\n# Mime::Type.register \"text/richtext\", :rtf\nMime::Type.r...
ruby
chosen
[ { "from": "system", "value": "Update target commit in podspec" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.ios.deployment_target = \"6.0\"\n s.requires_arc = true\n \n s.name = \"LLReactiveMatchers\"\n s.version = \"0.0.1\" \n s.summary = \"Expecta matchers ...
ruby
chosen
[ { "from": "system", "value": "Modify page_header helper to display note path if name is empty.\n" }, { "from": "human", "value": "module ApplicationHelper\n def markdown(text)\n options = {\n filter_html: true,\n hard_wrap: true, \n link_attributes: { rel: 'nofollow'...
ruby
chosen
[ { "from": "system", "value": "Add in helper methods curret user, logged in? and check logged in\n" }, { "from": "human", "value": "module ApplicationHelper\nend\n" }, { "from": "gpt", "value": "module ApplicationHelper\n def current_user\n @current_user ||= User.find(session[:use...
ruby
chosen
[ { "from": "system", "value": "Revert some of the \"Passing the format in the template name is deprecated\" fixes, because the new syntax doesn't seem to work always\n" }, { "from": "human", "value": "module ApplicationHelper\n\n def nav_link\n render :partial => \"shared/navi_link\", :locals...
ruby
chosen
[ { "from": "system", "value": "Revert \"Add https to survey link\"\n\nThis reverts commit 351d8d9478e50221c04d3a2a405cc2a893ab7de5.\n\nThis broke the specs. I should instead enable HTTPS redirection in production.\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule SurveysU...
ruby
chosen
[ { "from": "system", "value": "Install mime-types gem along with fog\n\nVersion 1.35.0 of fog-core dropped the explicit dependency on the\nmime-types gem [1], but the storage drivers still need it. Using the\nrackspacecloud_file resource without it will raise an exception. This\ninstalls it alongside fog a...
ruby
chosen