conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix spec for IPv6 environments\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire File.dirname(__FILE__) + '/../fixtures/classes'\n\ndescribe \"TCPSocket#gethostbyname\" do\n it \"should resolve a hostname to an add...
ruby
chosen
[ { "from": "system", "value": "Revert \"Do not skip tests\"\n\nThis reverts commit 40c9fac64950ee99065d1517bb1b4882253463d2.\n" }, { "from": "human", "value": "require 'minitest_helper'\n\nclass TestBlockWithDifferentTypes < Minitest::Test\n def person_class\n Class.new do\n include Sana...
ruby
chosen
[ { "from": "system", "value": "Set back variable into session to recursively go back if needed\n" }, { "from": "human", "value": "class Admin::NomenclatureChanges::BuildController < Admin::AdminController\n include Wicked::Wizard\n\n before_filter :set_nomenclature_change, :only => [:show, :upd...
ruby
chosen
[ { "from": "system", "value": "Comment on usage and expected lifetime\n" }, { "from": "human", "value": "module DataHygiene\n class FuturePolicyTaggingMigrator\n def initialize(scope, logger=NullLogger.instance)\n @scope = scope\n @logger = logger\n end\n\n def migrate!\n ...
ruby
chosen
[ { "from": "system", "value": "Add link checker api to Services\n" }, { "from": "human", "value": "require \"gds_api/asset_manager\"\nrequire \"gds_api/content_store\"\nrequire \"gds_api/organisations\"\nrequire \"gds_api/publishing_api_v2\"\n\nmodule Services\n def self.attachment_api\n @att...
ruby
chosen
[ { "from": "human", "value": "Add test for Rugged features.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe 'rugged' do\n context 'features' do\n it { expect(Rugged.features).to include :https }\n it { expect(Rugged.features).to include :ssh }\n end\nend\n" } ]
ruby
chosen
[ { "from": "system", "value": "Create and render a level requirement requested during achievement creation\n" }, { "from": "human", "value": "class RequirementsController < ApplicationController\n load_and_authorize_resource :course\n load_and_authorize_resource :requirement\n\n def render_for...
ruby
chosen
[ { "from": "system", "value": "Remove reject spec folder in gemspec\n" }, { "from": "human", "value": "require File.dirname(__FILE__) + '/lib/omniauth-remote-user/version'\n\nGem::Specification.new do |gem|\n gem.add_runtime_dependency 'omniauth', '~> 1.0'\n gem.name = 'omniauth-remote-user'\n ...
ruby
chosen
[ { "from": "system", "value": "[roda][Profile] Speed up encoding to json\n" }, { "from": "human", "value": "require './school'\nrequire './class_unit'\n\nmodule Main\n class Profile < Jsonable\n attr_reader :id,\n :user_id,\n :type,\n :enlisted_on,...
ruby
chosen
[ { "from": "system", "value": "Package version 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 = 'event_store-entity_store'\n s.version = '0.1.2'\n s.summary = 'Store of entities that are projected from Event...
ruby
chosen
[ { "from": "system", "value": "Add Parser and Astrolabe dependencies\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'safedep/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Unify ip addresses for now\"\n\nThis reverts commit f0b65d66c146ddd157ebd19aea0dbc4466c4da6d.\n" }, { "from": "human", "value": "Brain.request(path: \"/cluster-api/v1/cells/discovery\",\n method: :post,\n payload: {\n ...
ruby
chosen
[ { "from": "system", "value": "Fix migration removing duplicate stages on MySQL again\n" }, { "from": "human", "value": "class RemoveRedundantPipelineStages < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def up\n redundant_stages_ids = <<~SQL\...
ruby
chosen
[ { "from": "system", "value": "Refactor `SharedMarkers::autolink` to use `content_tag`\n" }, { "from": "human", "value": "module SharedMarkers\n def autolink(link, _link_type)\n if ALLOWED_HOSTS.include? URI(link).host\n return \"<a href=\\\"#{link}\\\" target=\\\"_blank\\\">#{link}</a>\...
ruby
chosen
[ { "from": "system", "value": "CentOS: Fix call to fpm to work with latest version\n" }, { "from": "human", "value": "# Install FPM, which will do our actual packaging for us\ninclude_recipe \"fpm\"\n\n# Set the output name\nnode[:package][:output] = ::File.join(node[:package][:output_dir],\n ...
ruby
chosen
[ { "from": "system", "value": "Allow initialization argument to be used in parent\n" }, { "from": "human", "value": "require File.expand_path(\"../version_5_0\", __FILE__)\n\nmodule VagrantPlugins\n module ProviderVirtualBox\n module Driver\n # Driver for VirtualBox 5.1.x\n class Ve...
ruby
chosen
[ { "from": "system", "value": "Add fake STAR data to fake student generation\n" }, { "from": "human", "value": "School.destroy_all\nhealey = School.create(name: \"Arthur D Healey\")\n\nHomeroom.destroy_all\nn = 0\n4.times do |n|\n Homeroom.create(name: \"10#{n}\")\n n += 1\nend\n\nStudent.destr...
ruby
chosen
[ { "from": "system", "value": "Rework spec to test mount point with and without base directory\n\n#connect shouldn't test for uniqueness\n" }, { "from": "human", "value": "require \"spec_helper\"\nrequire 'util/mount/miq_generic_mount_session'\n\ndescribe MiqGenericMountSession do\n context \"#c...
ruby
chosen
[ { "from": "system", "value": "Update updated_at if null, and created_at if null\n" }, { "from": "human", "value": "class AddConstraintsAndRemoveDuplicatesToDistributionReferences < ActiveRecord::Migration\n def up\n sql = <<-SQL\n DELETE FROM distribution_references\n USING distrib...
ruby
chosen
[ { "from": "system", "value": "Add OSX support to the podspec.\n" }, { "from": "human", "value": "#\n# Be sure to run `pod lib lint YelpAPI.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn more ab...
ruby
chosen
[ { "from": "system", "value": "Rename pod spec to match name in podspec\n" }, { "from": "human", "value": "\nPod::Spec.new do |s|\n s.name = \"Inquire\"\n s.version = \"0.0.1\"\n s.summary = \"Form creation framework for iOS\"\n s.description = \"A simple framework for ...
ruby
chosen
[ { "from": "system", "value": "Remove a unused method: last_update_time_str.\n" }, { "from": "human", "value": "module FeideeUtils\n class Record\n module Accessors\n def poid\n @field[self.class.id_field_name]\n end\n\n def last_update_time\n timestamp_to_time(@f...
ruby
chosen
[ { "from": "system", "value": "Move some once-only work out of a hot path\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire 'base64'\nrequire 'jwt'\nrequire_relative 'service'\n\nmodule JobBoard\n module Services\n class CreateJWT < Service\n def initialize(job_id...
ruby
chosen
[ { "from": "system", "value": "Add \"--no-notification\" option for start command\n" }, { "from": "human", "value": "module TrySailBlogNotification\n class Cli < Thor\n\n class_option 'log-level', desc: 'Set the logger level (fatal, error, warn, info, debug).', type: :string\n\n package_na...
ruby
chosen
[ { "from": "system", "value": "Use a better products list for catalog\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# Controller used to provide the API products for the DFC application\nmodule DfcProvider\n module Api\n class ProductsController < ::ActionController::Bas...
ruby
chosen
[ { "from": "system", "value": "Tweak to the ssl client simple example.\n\nJust closing the connection right after the the ssl handshake succeeds,\nand noting a few TODO items.\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\n# This example just shows how to call the SSLServer class with Pa...
ruby
chosen
[ { "from": "human", "value": "Add tests for non negative validator\n" }, { "from": "gpt", "value": "require \"minitest_helper\"\n\nmodule Hermod\n module Validators\n describe NonNegative do\n subject do\n NonNegative.new\n end\n\n it \"allows positive values\" do\n ...
ruby
chosen
[ { "from": "system", "value": "Add active user to the log file.\n" }, { "from": "human", "value": "module AuthenticationBehavior\n\textend ActiveSupport::Concern\n\n\tincluded do\n\t\tbefore_action :require_auth\n\tend\n\n\tprivate\n\n\tdef require_auth\n\n #\n # if the user is already sign...
ruby
chosen
[ { "from": "human", "value": "Implement lesson_plan_item type for video\n" }, { "from": "gpt", "value": "json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item\n\njson.item_path course_videos_path(current_course)\njson.description item.description\njson.edit_path edit_course_vide...
ruby
chosen
[ { "from": "system", "value": "Change Apache 2.4 tarball URL.\n" }, { "from": "human", "value": "require 'formula'\n\nclass Apache24 < Formula\n homepage 'https://httpd.apache.org/'\n url 'http://mirror.lividpenguin.com/pub/apache/httpd/httpd-2.4.4.tar.bz2'\n sha1 '0c5ab7f876aa10fbe8bfab2c34f8...
ruby
chosen
[ { "from": "human", "value": "Add keypair download button spec\n" }, { "from": "gpt", "value": "describe ApplicationHelper::Button::AuthKeyPairCloudDownload do\n describe '#disabled?' do\n it \"when a private key is available to download, then the button is not disabled\" do\n view_conte...
ruby
chosen
[ { "from": "system", "value": "Use real float object in Virtus::Coercion::Float.to_float\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Virtus::Coercion::Float, '.to_float' do\n subject { described_class.to_float(value) }\n\n let(:value) { mock('value') }\n\n it { should ...
ruby
chosen
[ { "from": "human", "value": "Add unique index for lowe spree option value name and option type id\n" }, { "from": "gpt", "value": "class AddUniqueIndexToSpreeOptionValueName < SpreeExtension::Migration[4.2]\n def change\n return if check_lower_index_exists?\n\n attributes = Spree::OptionV...
ruby
chosen
[ { "from": "system", "value": "Speed up tests with static station data.\n" }, { "from": "human", "value": "require 'rubygems' if RUBY_VERSION < '1.9'\nrequire File.join(File.expand_path(File.dirname(__FILE__) + '/../lib'), 'metar')\n\nMetar::Station.load_local\n\nRAW_EXAMPLE = \"2010/02/06 15:20\...
ruby
chosen
[ { "from": "system", "value": "Revert \"drop ruby < 2.0 support\"\n\nThis reverts commit e8167f28c667c3349e7a44bdb3c57317f11d5923.\n" }, { "from": "human", "value": "lib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'journald/modules/vers...
ruby
chosen
[ { "from": "system", "value": "Make sure certificate service is restarted on all nodes, not just the backend\n" }, { "from": "human", "value": "#\n# Author:: Adam Jacob (<adam@opscode.com>)\n# Copyright:: Copyright (c) 2011 Opscode, Inc.\n#\n# All Rights Reserved\n#\n\nopscode_certificate_dir = n...
ruby
chosen
[ { "from": "system", "value": ":+1: Add debug logging to PubsubSustainer\n" }, { "from": "human", "value": "require 'magellan/gcs/proxy'\n\nrequire 'logger'\nrequire 'json'\n\nmodule Magellan\n module Gcs\n module Proxy\n class PubsubSustainer\n include Log\n\n class << sel...
ruby
chosen
[ { "from": "system", "value": "Store content instead of fugly objects.\n\nMayhaps I should think of some helper object/technique to avoid LoD violations.\n" }, { "from": "human", "value": "module Memory\n module Persistence\n class AtomPersistence\n def persist(collection)\n colle...
ruby
chosen
[ { "from": "system", "value": "Use the site's markdown renderer instead of creating a new one each time.\n" }, { "from": "human", "value": "module Salt\n class Post < Page\n attr_accessor :slug, :date, :categories, :year, :month, :day, :markdown\n\n def initialize(path)\n super\n\n ...
ruby
chosen
[ { "from": "system", "value": "@thenathanjones: Test the published? scope on the Entry\n" }, { "from": "human", "value": "require 'rails_helper'\n\nRSpec.describe Entry, :type => :model do\n pending \"add some examples to (or delete) #{__FILE__}\"\nend\n" }, { "from": "gpt", "value":...
ruby
chosen
[ { "from": "system", "value": "Update tests for 3.0 version\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'cdap::web_app_init' do\n context 'using default cdap version' do\n let(:chef_run) do\n ChefSpec::SoloRunner.new(platform: 'centos', version: 6.6) do\n ...
ruby
chosen
[ { "from": "system", "value": "Add size options to url method\n" }, { "from": "human", "value": "class Gravatar\n\tdef self.get(email)\n\t\thash = Gravatar.hash!(email)\n\t\treturn \"http://www.gravatar.com/avatar/#{hash}\"\n\tend\n\n\tdef get(email = @@email)\n\t\thash = Gravatar.hash!(email)\n\...
ruby
chosen
[ { "from": "system", "value": "Use shorthand settings syntax to set slim-pretty\n" }, { "from": "human", "value": "require 'sinatra'\nrequire 'slim'\nrequire 'data_mapper'\nrequire 'dm-postgres-adapter'\n\nconfigure :development do\n require 'dm-sqlite-adapter'\nend\n\nconfigure do\n Slim::Engi...
ruby
chosen
[ { "from": "system", "value": "Add init collections for white and black pieces\n" }, { "from": "human", "value": "class StartGame\n POSITIONS = {::Castle => 'a1', ::Bishop => 'a2'}\n\n def call\n POSITIONS.map do |k, v|\n k.new(v)\n end\n end\nend\n" }, { "from": "gpt", ...
ruby
chosen
[ { "from": "system", "value": "Remove Activator class, rename spree_activators to spree_promotions\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :promotion, class: Spree::Promotion, parent: :activator do\n name 'Promo'\n end\nend\n" }, { "from": "gpt", "value...
ruby
chosen
[ { "from": "system", "value": "Fix problem with name recognition for Elixir functions\n" }, { "from": "human", "value": "require 'inch/language/elixir/provider/reader/object/function_parameter_object'\n\nmodule Inch\n module Language\n module Elixir\n module Provider\n module Read...
ruby
chosen
[ { "from": "system", "value": "Remove tag migration code which generates the error just fixed elsewhere.\n" }, { "from": "human", "value": "class ConvertIssueCategoriesToTags < ActiveRecord::Migration\n def up\n # Safe way to migrate data while removing category relation\n categories = exe...
ruby
chosen
[ { "from": "system", "value": "Fix bug with parsing of URI\n" }, { "from": "human", "value": "require 'json'\nrequire 'net/http'\n\nmodule Nehm\n\n class HTTPClient\n\n ##\n # SoundCloud API client ID\n\n CLIENT_ID = '11a37feb6ccc034d5975f3f803928a32'\n\n ##\n # Exception classes\...
ruby
chosen
[ { "from": "system", "value": "Add support for accepting Addressable::URI and URI::Generic URIs passed to Repository.new.\n" }, { "from": "human", "value": "require 'pullr/scm/scm'\n\nrequire 'addressable/uri'\n\nmodule Pullr\n module Repository\n protected\n\n #\n # Initializes the rep...
ruby
chosen
[ { "from": "system", "value": "Throw a few threads in example\n" }, { "from": "human", "value": "# Usage (from the repo root):\n# env FLIPPER_CLOUD_TOKEN=<token> bundle exec ruby examples/http_read_async/basic.rb\nrequire 'bundler/setup'\nrequire 'flipper/adapters/http_read_async'\n\n# Configure ...
ruby
chosen
[ { "from": "system", "value": "Return a partial error form when there is an failure in the partial app form.\n" }, { "from": "human", "value": "class AppsController < ApplicationController\n resource_controller\n \n index.before { @app = App.new }\n index.wants.atom\n \n show.wants.html do\...
ruby
chosen
[ { "from": "system", "value": "Remove auth requirement from home page\n" }, { "from": "human", "value": "class HomeController < ApplicationController\n before_filter :authenticate_user!\n \n def index\n auth = current_user.authentications.find_by(provider: 'canvas')\n api = Canvas.new(cu...
ruby
chosen
[ { "from": "system", "value": "Change the avatar alt text to empty string so that we don't see the alt text if the avatar takes a long time to load\n" }, { "from": "human", "value": "class AuthorDecorator < ApplicationDecorator\n decorates :author\n\n # Creates a div with class avatar that cont...
ruby
chosen
[ { "from": "system", "value": "Bump pod tag to 0.0.9\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"Access\"\n s.version = \"0.0.8\"\n s.summary = \"Helpers and tools for UIAccessibility\"\n\n s.description = <<-DESC\n Building accessible apps is im...
ruby
chosen
[ { "from": "system", "value": "Update rake task for environmental variable SITE_TYPE\n\n* Governs what type of site gets generated:\n * data/sites/name.yml for redirector\n * data/transition-sites/name.yml for bouncer\n" }, { "from": "human", "value": "require 'redirector'\n\ndesc 'Add a ne...
ruby
chosen
[ { "from": "system", "value": "Add compile_time false to suppress warning\n" }, { "from": "human", "value": "chef_gem 'rest-client' do\n version node['s3_file']['rest-client']['version']\n action :install\nend\n" }, { "from": "gpt", "value": "chef_gem 'rest-client' do\n version nod...
ruby
chosen
[ { "from": "system", "value": "Enable indicators for all configured years\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass GobiertoBudgets::IndicatorsController < GobiertoBudgets::ApplicationController\n\n attr_reader :selected_year\n\n before_action :load_year\n helpe...
ruby
chosen
[ { "from": "system", "value": "Change how we style redirect_to\n" }, { "from": "human", "value": "class Projects::PipelinesSettingsController < Projects::ApplicationController\n before_action :authorize_admin_pipeline!\n\n def show\n @ref = params[:ref] || @project.default_branch || 'master'...
ruby
chosen
[ { "from": "system", "value": "Add HTTP proxy support to Patron adapter\n" }, { "from": "human", "value": "module Faraday\n class Adapter\n class Patron < Faraday::Adapter\n dependency 'patron'\n\n def call(env)\n super\n\n # TODO: support streaming requests\n e...
ruby
chosen
[ { "from": "system", "value": "Add week to summary command\n" }, { "from": "human", "value": "require 'stringio'\n\nrequire 'markdo/command'\nrequire 'markdo/overdue_command'\nrequire 'markdo/star_command'\nrequire 'markdo/today_command'\nrequire 'markdo/tomorrow_command'\n\nmodule Markdo\n clas...
ruby
chosen
[ { "from": "human", "value": "Add GPS 2.3 challenge file\n" }, { "from": "gpt", "value": "# Your Names\n# 1) Ryan Ho\n# 2)\n\n# We spent [#] hours on this challenge.\n\n# Bakery Serving Size portion calculator.\n\ndef serving_size_calc(item_to_make, order_quantity)\n library = {\"cookie\" => 1, ...
ruby
chosen
[ { "from": "system", "value": "Use https on the pod spec to pass the linter\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"MBContactPicker\"\n s.version = \"0.0.1\"\n s.summary = \"A contact picker that looks like the one in Apple mail for iOS7. This i...
ruby
chosen
[ { "from": "system", "value": "Set deployment target to iOS 8\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"MRGMarqueeLabel\"\n s.version = \"1.0.5\"\n s.summary = \"A label with a marquee effect.\"\n s.homepage = \"https://github.c...
ruby
chosen
[ { "from": "human", "value": "Create a factory for category repository items\n" }, { "from": "gpt", "value": "FactoryGirl.define do\n factory :category_hash, class: Hash do\n sequence(:id) { |i| \"category-#{i}\" }\n title { id.capitalize.sub(/-/, ' ') }\n contents []\n\n initialize_...
ruby
chosen
[ { "from": "system", "value": "Add reboot\nNo need to process the response code, it's handled by Client\n" }, { "from": "human", "value": "module Squall\n class VirtualMachine < Client\n\n URI_PREFIX = 'virtual_machines'\n\n def list\n servers = []\n if get(URI_PREFIX)\n @...
ruby
chosen
[ { "from": "system", "value": "Add rake task to publish links\n\nRake task to republish all links to publishing-api.\n" }, { "from": "human", "value": "namespace :publishing_api do\n task :republish_content => [:environment] do\n puts \"Scheduling republishing of #{Edition.published.count} ed...
ruby
chosen
[ { "from": "system", "value": "Change case statement to have an else condition, and simplify the case statement\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire 'ice_nine/freezer'\nrequire 'ice_nine/freezer/array'\nrequire 'ice_nine/freezer/hash'\nrequire 'ice_nine/freezer/no_freez...
ruby
chosen
[ { "from": "system", "value": "Prepare for support of ansible installation on multiple systems\n" }, { "from": "human", "value": "module Baustelle\n module AMI\n class PackerTemplate\n def initialize(definition, ami:, region:, user: 'ubuntu')\n @definition = definition\n @a...
ruby
chosen
[ { "from": "system", "value": "Check for block here too\n" }, { "from": "human", "value": "require 'linguist/blob_helper'\nrequire 'linguist/generated'\nrequire 'linguist/heuristics'\nrequire 'linguist/language'\nrequire 'linguist/repository'\nrequire 'linguist/samples'\nrequire 'linguist/shebang...
ruby
chosen
[ { "from": "system", "value": "Stop emailing the user who did the sharing saying the notebook was shared with them\n" }, { "from": "human", "value": "# Send mail to users for notebook actions\nclass NotebookMailer < ApplicationMailer\n # Shared with users\n def share(notebook, owner, emails, me...
ruby
chosen
[ { "from": "system", "value": "Add URL to php helper script warning\n" }, { "from": "human", "value": "require_relative('update.rb')\nrequire_relative('../../tasks/check-for-latest-php-module-versions/common.rb')\n\ndef bump_version(mod)\n if !mod['version'] || mod['version'] == 'nil'\n ...
ruby
chosen
[ { "from": "system", "value": "Allow further options in Passage struct.\n" }, { "from": "human", "value": "# - encoding: utf-8 -\nrequire 'scripref/parser'\nrequire 'scripref/processor'\nrequire 'scripref/english'\nrequire 'scripref/german'\n\nmodule Scripref\n\n VERSION = '0.2.0'\n\n Passage =...
ruby
chosen
[ { "from": "system", "value": "Add webVTT style time strings" }, { "from": "human", "value": "module SRT\n class Line\n attr_accessor :display_coordinates\n attr_accessor :sequence\n attr_accessor :start_time\n attr_accessor :end_time\n attr_accessor :error\n attr_writer :text\...
ruby
chosen
[ { "from": "system", "value": "Reformat integer spec for consistency\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire \"spec_helper\"\n\ndescribe Integer do\n\n context \"when the integer is 32 bit\" do\n it_behaves_like \"a serializable bson element\" do\n let(:type) { 16.c...
ruby
chosen
[ { "from": "system", "value": "Fix routing table related things\n" }, { "from": "human", "value": "module Serverspec\n module Type\n class RoutingTable < Base\n def has_entry?(entry)\n @runner.check_routing_table(entry)\n end\n\n def to_s\n 'Routing Table'\n ...
ruby
chosen
[ { "from": "human", "value": "Move GDS API config into repo\n\nPreviously this file was only included on production deploys. It\nactually would be better for this configuration to be consistent across\nall deployments and this also reduces the risk that any bugs introduced\nby this file only exist in product...
ruby
chosen
[ { "from": "human", "value": "Establish a heartbeat sender using redis lock\n" }, { "from": "gpt", "value": "redlock = Redlock::Client.new([$redis])\n\nThread.new do\n loop do\n redlock.lock('master', 45100) do |locked|\n if locked\n counter = 1\n 45.times do\n $re...
ruby
chosen
[ { "from": "system", "value": "Change uniqueness guarantee to until_and_while_executing\n" }, { "from": "human", "value": "require 'sidekiq/worker'\nrequire 'travis/logs/services/aggregate_logs'\n\nmodule Travis\n module Logs\n module Sidekiq\n class Aggregate\n include ::Sidekiq:...
ruby
chosen
[ { "from": "human", "value": "Fix a replacement for an attachment\n\nThis is for Zendesk ticket 3882452. The chain of replaced attachments\nseems to have been broken, so the problematic attachment was left\nreplaced by a deleted attachment that was never published.\n\nTherefore, manually update it's replacem...
ruby
chosen
[ { "from": "system", "value": "Fix typo in field :description of Project\n" }, { "from": "human", "value": "class Project\n include Mongoid::Document\n\n field :name, :type => String\n field :desciption, :type => String\n\n has_many :documents\n has_and_belongs_to_many :users\nend\n" }, ...
ruby
chosen
[ { "from": "system", "value": "Add to_hash and to_json to Availability\n" }, { "from": "human", "value": "module NameChecker\n # Container class to represent the availability of a word on\n # a specific service.\n #\n # Availability.new('twitter', false)\n #\n class Availability\n attr...
ruby
chosen
[ { "from": "system", "value": "[core] Add a RoutesProxy so that we can do things like spree_core.root_path in Cucumber features\n" }, { "from": "human", "value": "module NavigationHelpers\n class RoutesProxy\n include Rails.application.routes.url_helpers\n end\n\n def spree_core\n Action...
ruby
chosen
[ { "from": "system", "value": "Set Apipie to use EN language\n" }, { "from": "human", "value": "Apipie.configure do |config|\n config.app_name = \"Glowfic\"\n config.api_base_url = \"/api/v1\"\n config.doc_base_url = \"/docs\"\n config.api_controllers_matc...
ruby
chosen
[ { "from": "system", "value": "Add precompile directive for svgs\n" }, { "from": "human", "value": "Rails.application.config.assets.paths << Rails.root.join('node_modules')\nRails.application.config.assets.precompile += ['*.png',\n '*.gif']\nRails.app...
ruby
chosen
[ { "from": "system", "value": "Add gem rake ~> 0.9.2 for dev\n" }, { "from": "human", "value": "require File.expand_path('../lib/tmdb/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'neo-tmdb'\n s.version = TMDb::VERSION\n s.author = 'Andrew Smith'\n s.summary = 'A wrapper for...
ruby
chosen