conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add missing method and skip_authorization_check to taxons controller\n"
},
{
"from": "human",
"value": "module Api\n class TaxonsController < Api::BaseController\n respond_to :json\n\n skip_authorization_check only: :index\n\n def index\n if taxonomy\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix set flash messages with array\n"
},
{
"from": "human",
"value": "require_dependency \"tent/application_controller\"\n\nmodule Tent\n class SitesController < ApplicationController\n\n def index\n @sites = Site.all\n end\n\n def new\n @site = S... | ruby | chosen |
[
{
"from": "system",
"value": "Allow editing of access token\n"
},
{
"from": "human",
"value": "ActiveAdmin.register ApiKey do\n\n index do\n column :id\n column :access_token\n default_actions\n end\n\n filter :access_token\n \n show do |user|\n attributes_table do\n row :i... | ruby | chosen |
[
{
"from": "system",
"value": "Use project.add_developer insetad of <<\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Projects::BuildsController do\n include ApiHelpers\n\n let(:project) { create(:empty_project, :public) }\n\n describe 'GET trace.json' do\n let(:pipeli... | ruby | chosen |
[
{
"from": "system",
"value": "Add some rdoc to Messages::Message::Serialization\n"
},
{
"from": "human",
"value": "require 'cucumber/messages/message/utils'\n\nmodule Cucumber\n module Messages\n class Message\n include Cucumber::Messages::Message::Utils\n\n module Serialization\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing admin/variants controller spec\n"
},
{
"from": "human",
"value": "RSpec.describe Spree::Admin::VariantsController, type: :controller do\n stub_authorization!\n\n context 'PUT #update' do\n it 'creates a volume price' do\n variant = create :vari... | ruby | chosen |
[
{
"from": "system",
"value": "Add uip (client ip address) and ua (client user agent) params to google analytics report.\n"
},
{
"from": "human",
"value": "class ApiController < ApplicationController\n protect_from_forgery with: :null_session\n skip_before_action :verify_authenticity_token, if:... | ruby | chosen |
[
{
"from": "system",
"value": "Update ARM gcc to `5.0-2015-q4-major`\n\nUpdate the official ARM gcc distribution on Launchpad to the 2015Q4\nversion.\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass ArmNoneEabiGcc < Formula\n\n homepage 'https://launchpad.net/gcc-arm-embedded'\n ve... | ruby | chosen |
[
{
"from": "system",
"value": "Fix statements timeout in manual actions migration\n"
},
{
"from": "human",
"value": "class MigrateLegacyManualActions < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n def up\n execute <<-EOS\n UPDATE ci_buil... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for return deletion, updating.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../test_helper', __FILE__)\n\nmodule Stripe\n class OrderReturnTest < Test::Unit::TestCase\n should \"return_order should be listable\" do\n @mock.expec... | ruby | chosen |
[
{
"from": "system",
"value": "Set a default from email address.\n"
},
{
"from": "human",
"value": "Rails.application.configure do\n config.cache_classes = true # Code is not reloaded between requests.\n config.eager_load = true # Eager load code on boot.\n\n config.consider_all_requests_local... | ruby | chosen |
[
{
"from": "system",
"value": "Add correct mime type for .odp files\n\nWe're currently serving `application/octet-stream` instead which makes Internet Explorer think the files are zip files."
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Add new ... | ruby | chosen |
[
{
"from": "system",
"value": "Change link url convention, add servers.\n"
},
{
"from": "human",
"value": "SimpleNavigation::Configuration.run do |navigation|\n navigation.items do |primary|\n primary.item :login, 'Login', new_user_session_path\n primary.item :login, 'Logout', destroy_user... | ruby | chosen |
[
{
"from": "system",
"value": "Handle sales order not found case"
},
{
"from": "human",
"value": "Spree::Admin::OrdersController.class_eval do\n def fishbowl\n e = params[:e]\n case e\n when 'create'\n create_fishbowl_sales_order(params[:force].present?)\n when 'fetch'\n fe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove delete/add nodes that are nil in tree\n"
},
{
"from": "human",
"value": "module Mixins\n module CustomButtonDialogFormMixin\n def set_custom_button_dialog_presenter\n presenter ||= ExplorerPresenter.new(\n :active_tree => x_active_tree,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use environment variables for Pingdom credentials, by default.\n"
},
{
"from": "human",
"value": "\nrequire \"base64\"\nrequire \"multi_json\"\nrequire \"open-uri\"\nrequire \"sass\"\nrequire \"sinatra\"\nrequire \"sinatra/json\"\nrequire \"sinatra/reloader\" if dev... | ruby | chosen |
[
{
"from": "system",
"value": "Add the default database connection.\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'sinatra/base'\nrequire 'lib/interview'\nrequire 'slim'\n\nclass TheSetup < Sinatra::Base\n \n configure do\n Slim::Engine.set_default_op... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure new register should provide new username\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'sinatra/activerecord'\nrequire './config/environments'\nrequire './models/user'\n\n# might need to implement sessions?\nhelpers do\n def protected!\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update support_controller to use new Support API.\n"
},
{
"from": "human",
"value": "module Hovercard\n class SupportsController < ApplicationController\n\n before_filter :authenticate_user!, :only => [:create]\n before_filter :find_challenge\n\n def creat... | ruby | chosen |
[
{
"from": "system",
"value": "Add scoped method to catalog controller\n"
},
{
"from": "human",
"value": "module PowerShop\n class CatalogController < ApplicationController\n # Public: show all products with pagination\n #\n # Returns: text/html\n def index\n @products = ::Produ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we don't double render if auth fails\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule V1\n class ChallengePostsController < ApiController\n USER_AUTH = { except: %i[index] }.freeze\n include UserAuth\n\n def index\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check value whether if it's empty given from config.yml\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire_relative './filter.rb'\nrequire_relative '../../device.rb'\n\nmodule Fusuma\n module Plugin\n module Filters\n # Filter devic... | ruby | chosen |
[
{
"from": "system",
"value": "Create elasticsearch indices if Tire is present\n"
},
{
"from": "human",
"value": "# encoding: UTF-8\nrequire 'rails/generators/migration'\nrequire 'rails/generators/active_record'\n\nmodule Georgia\n module Generators\n class InstallGenerator < ::Rails::Generat... | ruby | chosen |
[
{
"from": "system",
"value": "Change urls for newrelic repo to https\n"
},
{
"from": "human",
"value": "module Barcelona\n module Plugins\n class NewrelicPlugin < Base\n def on_container_instance_user_data(_instance, user_data)\n user_data.add_file(\"/etc/newrelic-infra.yml\", \"... | ruby | chosen |
[
{
"from": "system",
"value": "Remove context and href again, they are fucking slow\n"
},
{
"from": "human",
"value": "require 'csv'\n\nmodule DocumentExporter\n def export_people\n export(:people_found,\n %w{ _id document_id text context href lemma tag prob pos sentence_pos })\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Fix assets lookup with multiple paths\n"
},
{
"from": "human",
"value": "\nmodule Spontaneous::Rack::Back\n class SiteAssets < Base\n def initialize(site)\n @roots = site.paths(:compiled_assets)\n end\n\n def call(env)\n app.call(env)\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Refactoring: Use available reader method instead of ivar\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule RubyEventStore\n module RSpec\n class HaveApplied\n def initialize(mandatory_expected, *optional_expected, differ:, phraser:,... | ruby | chosen |
[
{
"from": "system",
"value": "Use rodjek's librarian-puppet since maestrodev is not deprecated\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'vagrant-librarian-puppet/version'\n\nGe... | ruby | chosen |
[
{
"from": "system",
"value": "Allow to encrypt test files for test-unit\n"
},
{
"from": "human",
"value": "require 'knapsack_pro'\n\nnamespace :knapsack_pro do\n task :encrypted_test_file_names, [:adapter] do |_, args|\n adapter = args[:adapter]\n\n adapter_class = case adapter\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests for nginx module\n"
},
{
"from": "human",
"value": "require_relative '../../../../spec_helper'\n\ndescribe 'nginx', :type => :class do\n let(:params) { {'node_type' => 'redirect'} } \n let(:name) { 'blah' } \n \n it { should contain_package('nginx'... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to redhat update certificate action to say thats its not currently idempotent.\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module CaCertificates\n module Cap\n module Redhat\n # Capability for configuring the certificate bu... | ruby | chosen |
[
{
"from": "system",
"value": "Add unit tests for LoadBalancerConfigurationDiffer\n\nThis also highlighted that we were displaying the wrong output from the\ndiff: we were testing diff ok, but showing the HashDiff of the unstripped\ndestination\n"
},
{
"from": "human",
"value": "require 'vcloud'\... | ruby | chosen |
[
{
"from": "system",
"value": "Convert epoch seconds to datetime for :token_expires_at\n"
},
{
"from": "human",
"value": "<% module_namespacing do -%>\nclass <%= class_name %>Authentication < ActiveRecord::Base\n belongs_to :<%= class_name.downcase %>\n belongs_to :authentication_provider\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix regression with bad manifest shared examples\n"
},
{
"from": "human",
"value": "shared_examples 'invalid manifest application' do |instances|\n context \"bad #{instances.count}-node manifest\" do\n let(:applied_manifest) do\n manifest + instances.map do... | ruby | chosen |
[
{
"from": "human",
"value": "Validate only latest version of post appears in posts_feed\n"
},
{
"from": "gpt",
"value": "module TentValidator\n class PostsFeedEdgeValidator < TentValidator::Spec\n\n require 'tent-validator/validators/support/post_generators'\n include Support::PostGenerat... | ruby | chosen |
[
{
"from": "system",
"value": "Add config/amqp.yml to .gitignore in generator."
},
{
"from": "human",
"value": "require 'rails/generators'\n\nmodule Hare\n class InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n def create_executable_fi... | ruby | chosen |
[
{
"from": "system",
"value": "Drop first two rows of table\n"
},
{
"from": "human",
"value": "require 'nokogiri'\n\nmodule Skymorph\n class ObservationTableParser\n def self.parse(raw)\n doc = Nokogiri::HTML(raw)\n binding.pry\n #this should get us the first table more cleanly... | ruby | chosen |
[
{
"from": "system",
"value": "Test should check for port 8080 (not 80)\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'Nginx' do\n describe service 'nginx' do\n it { should be_running }\n it { should be_enabled }\n end\n\n describe port '80' do\n it { should be_... | ruby | chosen |
[
{
"from": "system",
"value": "Remove Tod namespace from tests\n"
},
{
"from": "human",
"value": "require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))\nrequire File.expand_path(File.join(File.dirname(__FILE__),'..','support/active_record'))\n\nclass Order < ActiveRecord:... | ruby | chosen |
[
{
"from": "system",
"value": "Add layout: splash to render line\n"
},
{
"from": "human",
"value": "class HubController < ApplicationController\n def index\n if !is_authenticated?\n @user = User.new\n render :splash\n else\n @user = current_user\n @users_near_me = User.... | ruby | chosen |
[
{
"from": "system",
"value": "Set condition for nested infection_organisms to be rejected if fields are blank.\n"
},
{
"from": "human",
"value": "class PeritonitisEpisode < ActiveRecord::Base\n\n belongs_to :patient\n belongs_to :episode_type\n belongs_to :fluid_description\n \n has_many :me... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we load defaults.\n"
},
{
"from": "human",
"value": "# Frozen-string-literal: true\n# Copyright: 2012 - 2017 - MIT License\n# Encoding: utf-8\n\n# --\n# External\n# --\nrequire \"sprockets\"\nrequire \"extras/all\"\nrequire \"jekyll/sanity\"\nrequire \"pat... | ruby | chosen |
[
{
"from": "system",
"value": "build: Fix aux build failure in script/rlint\n\nParser::CurrentRuby hadn't been loaded in some cases, requiring\nexplicitly makes sure it's always available here.\n\nTEST PLAN:\n 1) aux build should pass\n\nChange-Id: Ic5d2ef0ebbd8673e9ccec0c6617be49ef451f617\nReviewed-on: http... | ruby | chosen |
[
{
"from": "system",
"value": "Change delimiter check order: first check if it is present\n\nThis reads a lot better, and we won't need to try start_with? for blank\ndelimiters.\n\nAlso rename method name to read better.\n"
},
{
"from": "human",
"value": "module ActiveSupport\n module NumberHelp... | ruby | chosen |
[
{
"from": "system",
"value": "Use case-insensitive match for filenames\n"
},
{
"from": "human",
"value": "module Surely\n class Daemon\n def initialize(env)\n @env = env\n end\n\n def start\n directory = @env['SURELY_DIRECTORY']\n directory ||= `defaults read com.apple.s... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to ensure shipping method categories are unique\n\nRelated to #4103\n"
},
{
"from": "gpt",
"value": "class UniqueShippingMethodCategories < ActiveRecord::Migration\n def change\n klass = Spree::ShippingMethodCategory\n columns = %w[shipping_cat... | ruby | chosen |
[
{
"from": "human",
"value": "Add unique constraint to viz.permission_id (1:1 relation)\n"
},
{
"from": "gpt",
"value": "Sequel.migration do\n up do\n alter_table :visualizations do\n add_unique_constraint :permission_id\n end\n end\n\n down do\n alter_table :visualizations do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure AcceptJSON is a Faraday::Middleware\n"
},
{
"from": "human",
"value": "module Her\n module Middleware\n # This middleware adds a \"Accept: application/json\" HTTP header\n class AcceptJSON\n def add_header(headers) # {{{\n headers.merge!... | ruby | chosen |
[
{
"from": "system",
"value": "Replace multiple instances of %{locale} in path"
},
{
"from": "human",
"value": "module I18n::Tasks\n module LocalePathname\n extend self\n\n def replace_locale(path, from, to)\n path && path.sub(path_locale_re(from), to)\n end\n\n private\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add site statistics recount to the post migiration\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass MigrateNullWikiAccessLevels < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n class ProjectF... | ruby | chosen |
[
{
"from": "system",
"value": "Add 'missing' to the nil values keyword list\n"
},
{
"from": "human",
"value": "module LightspeedRestaurant\n class Base\n def initialize(data = {})\n self.class.attributes.each do |attribute|\n data = data.each_with_object({}) { |(k, v), h| h[k.to_... | ruby | chosen |
[
{
"from": "system",
"value": "Make options optionnal in check_file primitive\n\nChange-Id: Ia07dce96d183338979865a3636ddf186ce03b56e\n"
},
{
"from": "human",
"value": "require_relative 'primitive'\n\nmodule Choregraphie\n class CheckFile < Primitive\n def initialize(file_path, options)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Move test code, alter description\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'pry'\nrequire 'uuidtools'\n\ndescribe \"user_tracking\" do\n\n before(:each) do\n Railitics::Request.delete_all\n end\n\n it \"creates one request record based... | ruby | chosen |
[
{
"from": "system",
"value": "[aphrodite] Add mentions info to entitieS\n"
},
{
"from": "human",
"value": "collection @entities\nattributes :id, :name, :mentions"
},
{
"from": "gpt",
"value": "collection @entities\nattributes :id, :name\n\nnode :mentions do |entity|\n entity.mention... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust organisation \"Follow us\" links hidden text\n\nAmends the hidden text for the organisation social media links. The\nhidden text will now be empty when the link contains the words \"Sign\nup\". An example of this is one organisation page has a \"Sign up for\ne-bulletin\"... | ruby | chosen |
[
{
"from": "human",
"value": "Add ruby cookbook for arch\n"
},
{
"from": "gpt",
"value": "case node['platform']\nwhen 'arch'\n pacman_aur 'chruby'\nelse\n raise \"ruby recipe only supports platforms 'arch', not '#{node['platform']}'\"\nend\n\nexecute \"chown -R #{ENV['SUDO_USER']}:#{ENV['SUDO_U... | ruby | chosen |
[
{
"from": "system",
"value": "Change the sudo recipe so it doesn't try to do an upgrade on every run. This takes forever on CentOS\n\n\nFormer-commit-id: bf91f36cda6822d668e733832811ad3305067aea [formerly 7f6332604b3c3657d74ac86ae38a0a03f392ed59] [formerly 9aa9e35ec4bd39dfde0f4f71b80ab66b064d17b5 [formerly... | ruby | chosen |
[
{
"from": "system",
"value": "Add another test on check digit\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'test_helper'\nrequire 'hkid'\n\n# Unit test for Hkid Class\nclass TestHkid < Minitest::Test\n def setup\n @hkid = Hkid.new\n end\n\n def test_check_digit\n asse... | ruby | chosen |
[
{
"from": "system",
"value": "Use TaskRouterClient in test for realism\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nclass Twilio::REST::TaskRouter::StatisticsTestHarnessStatistics\n def initialize(*args)\n end\nend\n\nclass StatisticsTestHarness\n include Twilio::REST::TaskRout... | ruby | chosen |
[
{
"from": "human",
"value": "Add data migration to move PHE contacts to UKHSA\n\nUKHSA is a new organisation which replaces PHE. We have a support\nticket to move all the PHE contacts to UKHSA, because there are far\ntoo many of them (200+) to do it by hand.\n"
},
{
"from": "gpt",
"value": "phe... | ruby | chosen |
[
{
"from": "system",
"value": "Add another spec for WalletPaymentSource\n\nThe \"inverse_of\" relationship required some extra work for this\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Spree::WalletPaymentSource, type: :model do\n subject { Spree::WalletPaymentSource }\n... | ruby | chosen |
[
{
"from": "system",
"value": "Set rspec-expectations dependency to < 3.8.5\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'rspec-puppet'\n s.version = '2.7.5'\n s.homepage = 'https://github.com/rodjek/rspec-puppet/'\n s.summary = 'RSpec tests for your Puppet mani... | ruby | chosen |
[
{
"from": "human",
"value": "Add github_id to users and repositories\n"
},
{
"from": "gpt",
"value": "class AddGithubIdToUsersAndRepositories < ActiveRecord::Migration\n def change\n add_column :repositories, :github_id, :integer\n add_column :users, :github_id, :integer\n\n add_index ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration script for Masterfile.display_aspect_ratio\n\nIf there is no workflow to reference to find the display_aspect ratio, Mediainfo is ranon the absolute_location of a derivative instead.\nIf that fails, the user is warned that setting the display_aspect_ratio failed f... | ruby | chosen |
[
{
"from": "human",
"value": "Add show default users recipe.\n"
},
{
"from": "gpt",
"value": "#\n# Copyright:: Copyright (c) 2015 GitLab B.V.\n# License:: Apache License, Version 2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in com... | ruby | chosen |
[
{
"from": "human",
"value": "Check for nil on association preload\n"
},
{
"from": "gpt",
"value": "module ::ActiveRecord\n\n module AssociationPreload\n\n module ClassMethods\n\n def add_preloaded_records_to_collection_with_nil_check parent_records, reflection_name, associated_record\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Quadriga CX timestamp check\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nRSpec.describe 'Quadrigacx integration specs' do\n let(:client) { Cryptoexchange::Client.new }\n\n it 'fetch pairs' do\n pairs = client.pairs('quadrigacx')\n expect(p... | ruby | chosen |
[
{
"from": "human",
"value": "Add Komoju credit card spec\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe Spree::Gateway::KomojuCreditCard, type: :model do\n subject { described_class.new }\n\n describe \"#purchase\" do\n let(:money) { 1000.0 }\n let(:source) do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the EMS fallback decorator's single_quad definition\n"
},
{
"from": "human",
"value": "class ExtManagementSystemDecorator < MiqDecorator\n def self.fonticon\n 'pficon pficon-server'\n end\n\n def fonticon\n nil\n end\n\n def fileicon\n \"svg/vendor... | ruby | chosen |
[
{
"from": "system",
"value": "Remove forgery protection as it conflicts with caching\n"
},
{
"from": "human",
"value": "# Filters added to this controller apply to all controllers in the application.\n# Likewise, all the methods added will be available for all controllers.\n\nclass ApplicationCo... | ruby | chosen |
[
{
"from": "system",
"value": "Comment out prod profiler method\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Prevent CSRF attacks by raising an exception.\n # For APIs, you may want to use :null_session instead.\n protect_from_forgery with: :excep... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak \"you must be an admin\" message"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n include GDS::SSO::ControllerMethods\n protect_from_forgery\n before_filter :authenticate_user!\n before_filter :require_signin_permissi... | ruby | chosen |
[
{
"from": "system",
"value": "Correct debugging value to actual value\n"
},
{
"from": "human",
"value": "require 'net/ldap'\n\nclass ApplicationController < ActionController::Base\n helper :all # include all helpers, all the time\n protect_from_forgery # See ActionController::RequestForgeryPro... | ruby | chosen |
[
{
"from": "system",
"value": "Add a helper for rendering a 403 page\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n # Use PublicActivity's StoreController so that we can default to all\n # activities belonging to the current_user\n include PublicActiv... | ruby | chosen |
[
{
"from": "system",
"value": "Add lib directory to `config.eager_load_paths` as well as `config.autoload_paths`.\n\nWith Rails 5, autoloading is now completely disabled in environments where\nconfig.eager_load = true.\n"
},
{
"from": "human",
"value": "module BlocklyInterpreter\n class Engine <... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to use absolute path for wsdl instead.\n"
},
{
"from": "human",
"value": "require 'savon' \n\nmodule DataMapper\n module Adapters\n module Soap\n \n class Connection\n \n WSDL_FILE_NAME = 'wsdl.xml'\n DEFAULT_WSDL_PATH = Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Set endpoint_key from ENV if defined\n"
},
{
"from": "human",
"value": "module EndpointBase\n module Sinatra\n class Base < ::Sinatra::Base\n include EndpointBase::Concerns::TokenAuthorization\n include EndpointBase::Concerns::ParamProcessor\n inc... | ruby | chosen |
[
{
"from": "system",
"value": "Support multiple values for one header\n"
},
{
"from": "human",
"value": "module HTTP\n class Response\n attr_reader :headers, :cookies\n\n def initialize(native_response, cookies)\n @native_response = native_response\n @headers = Headers.new(native... | ruby | chosen |
[
{
"from": "system",
"value": "Tweak to the summary generation.\n\nI'll have to run this manually in preview and production, unfortunately.\n"
},
{
"from": "human",
"value": "class PopulateSummariesForPolicies < ActiveRecord::Migration\n def up\n ActiveRecord::Base.record_timestamps = false\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration that is blowing up\n"
},
{
"from": "human",
"value": "class AddOwnedByFieldsToComments < ActiveRecord::Migration[4.2]\n def change\n add_column :flyover_comments_comments, :commenter_id, :integer\n add_column :flyover_comments_comments, :comment... | ruby | chosen |
[
{
"from": "human",
"value": "Add ability to choose the layout/views of the current account\n"
},
{
"from": "gpt",
"value": "begin\n Refinery::Admin::PagesController.class_eval do\n def account_layout_templates_pattern\n if Dir.exist?( Rails.root.join('accounts', current_account.subdomai... | ruby | chosen |
[
{
"from": "system",
"value": "Use `ActiveSupport.on_load` to hook into `ActiveRecord::Base`\n\nRefer https://github.com/rails/rails/issues/23589\nand https://github.com/plataformatec/devise/commit/c2c74b0a39238e7d997486814a1c8f75fdaf276f\n\nFollow up #1547\n"
},
{
"from": "human",
"value": "# fr... | ruby | chosen |
[
{
"from": "human",
"value": "Add implementation of twenty-fourth rule of disambiguator prefix\n"
},
{
"from": "gpt",
"value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule24\n def disambiguate(word)\n contains = /^per([bcdfgh... | ruby | chosen |
[
{
"from": "system",
"value": "Add \\n to html headers\n"
},
{
"from": "human",
"value": "module RedminePusherNotifications\n module Hooks\n class AddPusherLibJavascript < Redmine::Hook::ViewListener\n\n def view_layouts_base_html_head(context={})\n if User.current.logged?\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Work around \"uncaught throw :warden\" issue in Rails 4\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass StreamingController < ApplicationController\n include ActionController::Live\n\n before_action :authenticate_user!\n\n def index\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add data migration to add logo to ERDF guides\n\nCurrently the ERDF logo is shown with CSS, via a detailed guide\ncategory.\n"
},
{
"from": "gpt",
"value": "slugs = [\n 'erdf-programmes-and-resources',\n 'erdf-programmes-progress-and-achievements',\n 'applying-for... | ruby | chosen |
[
{
"from": "human",
"value": "Test Organization against real data\n\nTests against Estonia popolo\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass OrganizationTest < Minitest::Test\n def organizations\n @organizations ||= Everypolitician::Popolo.read('test/fixtures/estonia-ep-p... | ruby | chosen |
[
{
"from": "system",
"value": "Change single quotes to double\n"
},
{
"from": "human",
"value": "require 'gosu'\nDir['./lib/modules/*.rb'].each { |file| require file }\nDir['./lib/[^_]*.rb'].each { |file| require file }\nDir['./lib/_*.rb'].each { |file| require file }\n\nWindow.new.show if $0 == ... | ruby | chosen |
[
{
"from": "system",
"value": "Add color specification code (Bash, curl related)\n"
},
{
"from": "human",
"value": "require 'sinatra'\nrequire 'sinatra/base'\nrequire_relative 'license_list'\nrequire 'active_support'\nrequire 'active_support/core_ext'\n\nclass LicenseDownload < Sinatra::Base\n p... | ruby | chosen |
[
{
"from": "human",
"value": "Migrate url to api_key and channel_ids\n"
},
{
"from": "gpt",
"value": "class ApiRiverChannelsSupport < ActiveRecord::Migration\n def up\n add_column :rivers, :channel_ids, :string\n add_column :rivers, :api_key, :string\n River.all.each do |river|\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove tests for synchronous ContentStore calls…\n\nThese tests are no longer relevant because we call\nthe content store asynchronously for the /v2\nendpoints.\n\nThe /v1 endpoints are still synchronous\nso we changed these tests to use the /publish-intents\nendpoint because t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix update for server templates\n\n- options/attributes were not being sent to the server (oops)\n"
},
{
"from": "human",
"value": "module Fog\n module Compute\n class Brkt\n class Real\n def update_server_template(id, attributes)\n request(... | ruby | chosen |
[
{
"from": "human",
"value": "Add acceptance test for retrying commands\n\nThis adds an acceptance test which causes some intentional\ncommand submission failures, verifies that they are queued\nto disk, runs the puppetdb face to flush the queue, and\nverifies that they were flushed successfully.\n"
},
{... | ruby | chosen |
[
{
"from": "system",
"value": "Call RSpec.configure only if RSpec is defined\n"
},
{
"from": "human",
"value": "require \"specinfra/version\"\nrequire \"specinfra/helper\"\nrequire \"specinfra/backend\"\nrequire \"specinfra/configuration\"\n\ninclude SpecInfra\n\nmodule SpecInfra\n class << self... | ruby | chosen |
[
{
"from": "system",
"value": "Check the shift event action in the spec.\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nRSpec.describe 'Checking in at a worksite', type: :feature do\n it 'saves the shift event' do\n work_site = WorkSite.create! address: '101 Main Street'\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for renaming class\n"
},
{
"from": "human",
"value": "describe Rename do\n around do |example|\n MemFs.activate { example.run }\n end\n\n describe 'rename Cat to Dog' do\n before do\n File.open('./tmp/cat.rb', 'w') { |f| f.puts \"hello world\"... | ruby | chosen |
[
{
"from": "system",
"value": "Remove broken spec for now\n"
},
{
"from": "human",
"value": "require \"rails_helper\"\n\nRSpec.describe \"Updating an article\" do\n let(:article) { create(:article) }\n before { visit edit_article_path(article) }\n\n context \"with valid parameters\" do\n be... | ruby | chosen |
[
{
"from": "system",
"value": "Use module name for describe block title\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe 'String primitives' do\n include Klam::Primitives::Strings\n\n describe '(pos Str N)' do\n it 'returns the character at zero-based index N' do\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Enable LoadPaperDetails to overwrite empty/forced keys\n"
},
{
"from": "human",
"value": "class LoadPaperDetailsJob < ActiveJob::Base\n queue_as :meta\n\n def perform(paper)\n return unless paper.body.scraper.const_defined? :Detail\n\n Rails.logger.info \"Lo... | ruby | chosen |
[
{
"from": "system",
"value": "Add optional true to user supplier\n\nIf we don't have optional true , we will get a failed validation in every non suppliers users."
},
{
"from": "human",
"value": "Spree.user_class.class_eval do\n\n belongs_to :supplier, class_name: 'Spree::Supplier'\n\n has_man... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.