conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Include email_alert_type value in details hash for email alert signup\n\nIncluding this will help email-alert-frontend construct the correct payload\nto send to the email-alert-api for subscriptions.\n"
},
{
"from": "human",
"value": "class EmailAlertSignupContentIt... | ruby | chosen |
[
{
"from": "system",
"value": "Use ActiveSupport::Concern to reduce complexity\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n#\n# Funcionality related to model stats\n#\nmodule Statable\n def self.included(base)\n base.extend ClassMethods\n\n base.class_eval do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use each instead of map.\n"
},
{
"from": "human",
"value": "module Repository::Access\n extend ActiveSupport::Concern\n\n OPTIONS = %w[public_r public_rw private_r private_rw]\n DEFAULT_OPTION = OPTIONS[0]\n\n def self.as_read_only(access)\n access.split('_',... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade install generator for Rails 4"
},
{
"from": "human",
"value": "require 'rails/generators'\nrequire 'rails/generators/migration'\nrequire 'rails/generators/active_record'\n\nmodule UpdateableViewsInheritance\n module Generators\n class InstallGenerator < ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix failing tests for quick_jump_targets_controller\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass QuickJumpTargetsControllerTest < ActionController::TestCase\n setup do\n QuickJumpTarget.update_all Project, Page\n end\n\n test \"should rend... | ruby | chosen |
[
{
"from": "system",
"value": "Add pointer to GSA docs"
},
{
"from": "human",
"value": "require 'hawk/http'\n\nmodule GSA\n\n class Client < Hawk::HTTP\n def initialize(hostname:, username:, password:)\n super(hostname)\n\n @username = username\n @password = password\n\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Call subject filter before examples run\n"
},
{
"from": "human",
"value": "require 'rubygems'\nrequire 'rspec'\nrequire 'serverspec/version'\nrequire 'serverspec/matchers'\nrequire 'serverspec/backend'\nrequire 'serverspec/helper'\nrequire 'serverspec/setup'\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Stabilize sms deployment. Eliminates service start returning (1) error.\n\n\nFormer-commit-id: b8bb2ad41e65f970d60480355998ba7080b87712 [formerly 2ba817cc6f8bc426fc75f3fed72d3e1c3d49ba5f] [formerly 5a9f228817c40c0c69c7d65f5f458bd34b624275 [formerly 3a411715a91657dc6fa02bf91123c... | ruby | chosen |
[
{
"from": "human",
"value": "Add code wars (7) - case swapping\n"
},
{
"from": "gpt",
"value": "# http://www.codewars.com/kata/5590961e6620c0825000008f/\n# --- iteration 1 ---\ndef swap(str)\n str.tr(\"a-zA-Z\", \"A-Za-z\")\nend\n\n# --- iteration 2 ---\ndef swap(str)\n str.swapcase\nend\n"
... | ruby | chosen |
[
{
"from": "system",
"value": "Add version dependency of dry-types to fix error\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"yuba/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.ne... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Relation::Mapper.from spec under 1.8 rubies"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Relation::Mapper, '.from' do\n subject { described_class.from(other, name) }\n\n let(:model) {\n mock_model(:TestModel)\n }\n\n let(:other) {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update hash syntax to Ruby 1.9 symbol notation\n"
},
{
"from": "human",
"value": "module SpreeLookBook\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default => false\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update feature spec to check for new content.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nfeature 'cookbook owners can undeprecate a cookbook' do\n let(:cookbook) { create(:cookbook, deprecated: true, replacement: create(:cookbook)) }\n let(:user) ... | ruby | chosen |
[
{
"from": "human",
"value": "Add file generate for admin\n"
},
{
"from": "gpt",
"value": "require 'rails/generators/migration'\nrequire 'bundler'\n\nmodule Tracking\n module Generators\n class AdminGenerator < ::Rails::Generators::Base\n include Rails::Generators::Migration\n sourc... | ruby | chosen |
[
{
"from": "system",
"value": "Update callback syntax for compatibility\n"
},
{
"from": "human",
"value": "module Adminpanel\n class Image < ActiveRecord::Base\n include Adminpanel::Base\n\n belongs_to :model, polymorphic: true\n\n before_save :store_file_size_and_content_type\n afte... | ruby | chosen |
[
{
"from": "system",
"value": "Add model methods for installer report info\n"
},
{
"from": "human",
"value": "class InstallerReport < ActiveRecord::Base\nend\n"
},
{
"from": "gpt",
"value": "class InstallerReport < ActiveRecord::Base\n\n # some helpers for extracting info out of the ... | ruby | chosen |
[
{
"from": "system",
"value": "Add the generation of the migration file\n"
},
{
"from": "human",
"value": "class RefinerycmsTranslations < Refinery::Generators::EngineInstaller\n \n source_root File.expand_path('../../', __FILE__)\n engine_name \"translations\"\n \nend"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Include ampersand in UnnecessaryParentReference description\n\nThis will make it more obvious what the linter is complaining about.\n\nChange-Id: I1f73c86d9d970bdc73854dbf150d0f4c1fcf23b0\nReviewed-on: http://gerrit.causes.com/40991\nReviewed-by: Shane da Silva <67fb7bfe39f841b... | ruby | chosen |
[
{
"from": "system",
"value": "Check for existence rather than catching an exception\n"
},
{
"from": "human",
"value": "class DocumentListExportRequestController < ApplicationController\n before_action :check_authorisation\n def show\n begin\n response = DocumentListExportRequest.find(p... | ruby | chosen |
[
{
"from": "human",
"value": "Add duplicate attachment filename finder\n\nWe can use this to generate a report detailing the attachments that\ncurrently have duplicate filenames and also in the data migration that\nwill fix the duplicates\n"
},
{
"from": "gpt",
"value": "require 'csv'\n\nmodule D... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sha256 checksum for MAMP 3.3\n"
},
{
"from": "human",
"value": "cask :v1 => 'mamp' do\n version '3.3'\n sha256 '4ae0a04bfd3db982969410045f9297f7b6647b4c0366687c413cfb0da5d90e71'\n\n url \"http://downloads.mamp.info/MAMP-PRO/releases/#{version}/MAMP_MAMP_PRO_#... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec to not exclude CDROTestRunner on iOS\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'Cedar'\n s.version = '0.9.6'\n s.license = 'MIT'\n s.summary = 'BDD-style testing using Objective-C.'\n s.homepage = 'https://github.c... | ruby | chosen |
[
{
"from": "human",
"value": "Add mail_methods controller from spree_backend related to config\n"
},
{
"from": "gpt",
"value": "module Spree\n module Admin\n class MailMethodsController < Spree::Admin::BaseController\n after_filter :initialize_mail_settings\n\n def update\n i... | ruby | chosen |
[
{
"from": "human",
"value": "Add first unit test for IosRatingsFetcherForItunesConnect\n"
},
{
"from": "gpt",
"value": "require 'test_helper'\n\nclass IosRatingsFetcherForItunesConnectTest < Minitest::Test\n def setup\n @ios_ratings_fetcher = AppReputation::IosRatingsFetcherForItunesConnect.... | ruby | chosen |
[
{
"from": "system",
"value": "Remove warning when including Kaminari\n"
},
{
"from": "human",
"value": "require 'encore/version'\n\nrequire 'active_model_serializers'\nrequire 'active_record'\nrequire 'active_support'\nrequire 'kaminari'\n\nrequire 'encore/config'\n\nrequire 'encore/serializer/b... | ruby | chosen |
[
{
"from": "system",
"value": "Fix running specs twice if zeus is available but some specs fail.\n"
},
{
"from": "human",
"value": "LAST_RUN_FILENAME = \"/tmp/textmate_rspec_last_run\"\n\ndef run_rspec(*args)\n save_as_last_run(args)\n seed = rand(65535)\n args += %W(--format textmate --order ... | ruby | chosen |
[
{
"from": "system",
"value": "Change path for itsisu staging.\n\n"
},
{
"from": "human",
"value": "#############################################################\n# Application\n#############################################################\n\nset :deploy_to, \"/web/staging/itsisu_investigations\... | ruby | chosen |
[
{
"from": "human",
"value": "Fix redirect back from Google\n\nThis seems to be the problem:\nhttps://github.com/intridea/omniauth/issues/101\n"
},
{
"from": "gpt",
"value": "# Set the `full_host` value in production so that we\n# are correctly redirected back to the site after\n# authenticating ... | ruby | chosen |
[
{
"from": "system",
"value": "Use string key instead of symbol for setting.\n"
},
{
"from": "human",
"value": "Settings.defaults = {\n :payment_period => 30.days,\n\n 'modules.enabled' => []\n}\n"
},
{
"from": "gpt",
"value": "Settings.defaults = {\n 'payment_period' => 30.days,... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error in category overview.\n"
},
{
"from": "human",
"value": "module IslayShop\n module Admin\n class ProductCategoriesController < IslayShop::Admin::ApplicationController\n helper CatalogueHelper\n\n resourceful :product_category\n header 'S... | ruby | chosen |
[
{
"from": "system",
"value": "Rename variable from 'factory' to 'resource'\n\nAn ActiveModel is object is returned when `FactoryGirl.create` is\ninvoked. ‘factory’ implies that a factory_girl object is returned, and\nthis is misleading.\n"
},
{
"from": "human",
"value": "module RemoteFactoryGirl... | ruby | chosen |
[
{
"from": "system",
"value": "Increase pod version to 0.4.0\n\n"
},
{
"from": "human",
"value": "#\n# Be sure to run `pod lib lint Heyou.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 abou... | ruby | chosen |
[
{
"from": "system",
"value": "Use the deployer class method\n"
},
{
"from": "human",
"value": "require 'kumade/deployer'\n\nclass Kumade\n def self.load_tasks\n Deployer.new.load_tasks\n end\n\n def self.ensure_clean_git\n if git_dirty?\n raise \"Cannot deploy: repo is not clean.\"... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for getting team by name and getting gist contents.\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nrequire 'pry'\nrequire 'httparty'\n\nrequire \"issues/version\"\n\nmodule Issues\n class Github\n include HTTParty\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add definition for highline gem\n"
},
{
"from": "gpt",
"value": "#\n# Copyright 2014 Chef Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a co... | ruby | chosen |
[
{
"from": "system",
"value": "[aphrodite] Add index action to api/documents\n"
},
{
"from": "human",
"value": "class Api::V1::DocumentsController < Api::V1::BaseController\n before_filter :authenticate_user!\n\n def update\n document = current_user.documents.find(params[:id])\n document.... | ruby | chosen |
[
{
"from": "system",
"value": "Add mapcap load to embeds\n"
},
{
"from": "human",
"value": "require_dependency 'carto/api/vizjson3_presenter'\n\nmodule Carto\n module Editor\n module Public\n class EmbedsController < EditorController\n include VisualizationsControllerHelper\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "DEAL WITH RECIEVING JSON AND NOT A HSH"
},
{
"from": "human",
"value": "module ServiceImportExport\n \n def export_service(service_hash) \n SystemDebug.debug(SystemDebug.export_import, :export_service,service_hash) \n r = @core_api.export_service(service_hash... | ruby | chosen |
[
{
"from": "system",
"value": "Change the ratios so one can see how many times MRI is faster than Rubinius.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\ntype1 = ARGV[0][1..-1]\nfile1 = File.open(ARGV[1])\ntype2 = ARGV[2][1..-1]\nfile2 = File.open(ARGV[3])\n\nrehearsal = true\n\nwhile t... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning about Capybara\n"
},
{
"from": "human",
"value": "# Define a bare test case to use with Capybara\nclass ActiveSupport::IntegrationCase < ActiveSupport::TestCase\n include Capybara\n include Rails.application.routes.url_helpers\nend"
},
... | ruby | chosen |
[
{
"from": "human",
"value": "Add test for smartd recipe\n"
},
{
"from": "gpt",
"value": "describe 'sys::smartd' do\n let(:chef_run) { ChefSpec::SoloRunner.new.converge(described_recipe) }\n\n context 'without related attributes' do\n it 'does nothing' do\n expect(chef_run.run_context.r... | ruby | chosen |
[
{
"from": "system",
"value": "Use explicit list of non-statements\n\nIt was allowing types such as ImportedAwaitingType to appear.\n"
},
{
"from": "human",
"value": "class SpeechType\n include ActiveRecordLikeInterface\n\n attr_accessor :id, :name, :genus, :explanation\n\n def slug\n name.... | ruby | chosen |
[
{
"from": "system",
"value": "Drop Ruby 1.8 compat code"
},
{
"from": "human",
"value": "require 'rack/protection'\n\nmodule Rack\n module Protection\n ##\n # Prevented attack:: Directory traversal\n # Supported browsers:: all\n # More infos:: http://en.wikipedia.org/wiki/... | ruby | chosen |
[
{
"from": "system",
"value": "Update example app's breadcrumbs logger config\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundler.require(*R... | ruby | chosen |
[
{
"from": "system",
"value": "Remove author doc from method\n"
},
{
"from": "human",
"value": "# Top level module for resume CLI utility and PDF generation\n#\n# @author Paul Fioravanti\nmodule Resume\n # Resume version\n VERSION = \"1.3\".freeze\n\n module_function\n\n # Entry point for gen... | ruby | chosen |
[
{
"from": "system",
"value": "Include described_class explicitly in spec\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe \"Mobility::ActiveModel::AttributeMethods\", orm: :active_record do\n before do\n model = stub_const 'BaseModel', Class.new\n model.class_eval do... | ruby | chosen |
[
{
"from": "system",
"value": "Modify to with indifferent access\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright 2014 TIS Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You... | ruby | chosen |
[
{
"from": "system",
"value": "Remove stage index concurrently on migration rollback\n"
},
{
"from": "human",
"value": "class CreateIndexInPipelineStages < ActiveRecord::Migration\n include Gitlab::Database::MigrationHelpers\n\n DOWNTIME = false\n\n disable_ddl_transaction!\n\n def up\n ad... | ruby | chosen |
[
{
"from": "system",
"value": "Make numbers case insensitive (for custom cards compatibility)\n"
},
{
"from": "human",
"value": "class PatchSecondary < Patch\n def call\n each_printing do |card|\n next unless card[\"names\"]\n # https://github.com/mtgjson/mtgjson/issues/227\n i... | ruby | chosen |
[
{
"from": "human",
"value": "Create a tool to start the useful folder or something fast.\n"
},
{
"from": "gpt",
"value": "class WindowsCommander\n def self.path_check path_to_check\n formatted_path = path_to_check.gsub(/\\//,\"\\\\\") \n end\n\n def self.start_path path_to_open\... | ruby | chosen |
[
{
"from": "system",
"value": "Make test pass - behavior slightly changed\n\nabout Performing a GET /{url}, read\nhttps://developers.facebook.com/docs/graph-api/changelog#v2_10_changes\nwhen we use version 2.10 this test might not be needed.\n"
},
{
"from": "human",
"value": "require 'spec_helper... | ruby | chosen |
[
{
"from": "system",
"value": "Add cancellation notification preview methods\n\nAdd methods to allow browser preview of notification to student and\ntutor that a session has been canceled.\n"
},
{
"from": "human",
"value": "# Preview all emails at http://localhost:3000/rails/mailers/timeslot_mail... | ruby | chosen |
[
{
"from": "system",
"value": "Remove index from Category->Expense reference\n"
},
{
"from": "human",
"value": "class AddCategoryRefToExpense < ActiveRecord::Migration[5.0]\n def change\n add_reference :expenses, :category, index: true\n end\nend\n"
},
{
"from": "gpt",
"value": "... | ruby | chosen |
[
{
"from": "system",
"value": "Sort list of emails on address page by date\n"
},
{
"from": "human",
"value": "class AddressesController < ApplicationController\n def index\n @addresses = Address.order(\"text\").paginate(:page => params[:page])\n end\n\n def show\n @address = Address.find... | ruby | chosen |
[
{
"from": "system",
"value": "Send email when creating denuncia.\n"
},
{
"from": "human",
"value": "class DenunciasController < ApplicationController\n def create\n @denuncia = Denuncia.new(denuncia_params)\n @denuncia.ip = request.remote_ip\n\n if @denuncia.save\n redirect_to den... | ruby | chosen |
[
{
"from": "system",
"value": "Add homepage redirect for self hosted users.\n"
},
{
"from": "human",
"value": "class MarketingController < ApplicationController\n def home; end\nend\n"
},
{
"from": "gpt",
"value": "class MarketingController < ApplicationController\n def home\n if... | ruby | chosen |
[
{
"from": "system",
"value": "Convert params[:vehicle_id] to integer for safety\n\nHi!\r\n\r\nPassing parameters directly to `exists?` is dangerous, as explained here: http://rails-sqli.org/#exists"
},
{
"from": "human",
"value": "class PositionsController < ApplicationController\n\n # POST /po... | ruby | chosen |
[
{
"from": "system",
"value": "Use status 404 when the redirects controller can't find the redirect.\n"
},
{
"from": "human",
"value": "class RedirectsController < ActionController::Base\n def go\n redirect = ::Redirect.find_by(source_uri: source_uri)\n\n if redirect && redirect.enabled?\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs to check that assignee filter contains all members."
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe \"Taskboard/Filter/Assignee\", :js => true do\n fixtures :projects, :projects_trackers, :users, :members,\n :member_roles, :issues, :... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra metadata for AAIB reports\n"
},
{
"from": "human",
"value": "class AaibReportPresenter < DocumentPresenter\n\n delegate :date_of_occurrence,\n :aircraft_category,\n :report_type,\n to: :\"document.details\"\n\n def format_name\n \"Air Acciden... | ruby | chosen |
[
{
"from": "system",
"value": "Send valid content to publishing-api\n\nThe content schemas require a `details` hash, and `format` has been\nreplaced by `document_type` and `schema_name`.\n\nThis should have been picked up by the branch tests on\ngovuk-content-schemas, but it seems we don't run the tests for ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the errant catch block\n"
},
{
"from": "human",
"value": "require_relative \"step_decorators/class_step_decorator\"\nrequire_relative \"step_decorators/method_step_decorator\"\nrequire_relative \"step_decorators/proc_step_decorator\"\n\nmodule Porch\n class ... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust grep regexp for setters, to avoid matching hashrockets.\n"
},
{
"from": "human",
"value": "module ZombieScout\n class MethodCallFinder\n\n def initialize(ruby_project)\n @ruby_project = ruby_project\n end\n\n def count_calls(method_name)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove utf8 encoding for sql payload\n"
},
{
"from": "human",
"value": "module Appsignal\n class EventFormatter\n module ActiveRecord\n class SqlFormatter < Appsignal::EventFormatter\n register 'sql.active_record'\n\n def format(payload)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use a more descriptive block variable\n"
},
{
"from": "human",
"value": "require 'octokit'\n\nbegin\n access_token = ENV.fetch(\"GITHUB_TOKEN\")\n hostname = ENV.fetch(\"GITHUB_HOSTNAME\")\nrescue KeyError\n puts\n puts \"To run this script, please set the follo... | ruby | chosen |
[
{
"from": "system",
"value": "Update expected JSON Web Token\n\nThe upgrade of the jwt gem means that this has changed.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass PathsHelperTest < ActionView::TestCase\n context \"#preview_edition_path\" do\n setup do\n Rails.stub... | ruby | chosen |
[
{
"from": "system",
"value": "Fix 'send current_user to notifier'\n"
},
{
"from": "human",
"value": "module VotingApp\n module Notifications\n extend ActiveSupport::Concern\n\n class Notification\n attr_accessor :submission, :options\n\n def initialize(submission, options)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix dashboard to show subscribed threads ordered by latest message.\n"
},
{
"from": "human",
"value": "class DashboardsController < ApplicationController\n def show\n @user = current_user\n @groups = @user.groups\n\n @relevant_issues = IssueDecorator.decor... | ruby | chosen |
[
{
"from": "system",
"value": "Use certificate desctruction for revocation\n"
},
{
"from": "human",
"value": "module Carto\n class DbdirectCertificate < ActiveRecord::Base\n belongs_to :user, inverse_of: :dbdirect_certificates, foreign_key: :user_id\n validates_uniqueness_of :name, scope: ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ham and spam scopes\n"
},
{
"from": "human",
"value": "require 'refinery/core/base_model'\nrequire 'filters_spam'\n\nmodule Refinery\n module Inquiries\n class Inquiry < Refinery::Core::BaseModel\n\n if Inquiries.filter_spam\n filters_spam messag... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration for splitted model\n"
},
{
"from": "human",
"value": "require 'carto/db/migration_helper'\n\ninclude Carto::Db::MigrationHelper\n\nmigration(\n Proc.new do\n create_table :oauth_authorizations do\n Uuid :id, primary_key: true, defaul... | ruby | chosen |
[
{
"from": "system",
"value": "Update xACT 2.29 to 2.30\n\nUpdate xACT 2.29 to 2.30"
},
{
"from": "human",
"value": "class Xact < Cask\n version '2.29'\n sha256 'bc8805f94b9f2320da64ca23b53e1b029fd65920ded2bc56c0291f0a73866674'\n\n url \"http://xact.scottcbrown.org/xACT#{version}.zip\"\n appc... | ruby | chosen |
[
{
"from": "system",
"value": "Adjust tolerance on concurrent edit (avoiding error for same user rapid edit actions)\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nclass Api::V1::ApiMdaUpdaterController < Api::ApiController\n def check_mda_update\n errmsg = \"Analysis has... | ruby | chosen |
[
{
"from": "system",
"value": "Use IssuesFinder instead of project.issues.visible_to_user\n"
},
{
"from": "human",
"value": "module Projects\n module Boards\n class IssuesController < Boards::ApplicationController\n before_action :authorize_read_issue!, only: [:index]\n before_actio... | ruby | chosen |
[
{
"from": "system",
"value": "Add error check for order before redirect to paysio\n"
},
{
"from": "human",
"value": "module Spree\n OrdersController.class_eval do \n before_filter :paysio_redirect\n\n private\n def paysio_redirect\n if session[:paysio_redirect]\n redirect_to ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix run_rspec to work with recent TextMate versions.\n\nWorking directory is no longer the project directory, so we have to set it ourselves.\n"
},
{
"from": "human",
"value": "LAST_RUN_FILENAME = \"/tmp/textmate_rspec_last_run\"\n\ndef run_rspec(*args)\n save_as_l... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for file name normalization\n"
},
{
"from": "gpt",
"value": "# Copyright 2016 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Lice... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify blue monday example by using with_synth_defaults"
},
{
"from": "human",
"value": "def drums\n 6.times do\n sample :heavy_kick, :rate, 0.8\n sleep 0.5\n end\n\n 8.times do\n sample :heavy_kick, :rate, 0.8\n sleep 0.125\n end\nend\n\ndef snare... | ruby | chosen |
[
{
"from": "system",
"value": "Use a better URL in gemspec\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"dozen\"\n s.version = '1.1.0'\n s.authors = [\"Rob Fletcher\"]\n s.email = [\"rob@terraflubb.com\"]\n s.date = \"2013-09-13\"\n... | ruby | chosen |
[
{
"from": "human",
"value": "Test ViewHelpers main methods: `file_path` and `asset_path`\n"
},
{
"from": "gpt",
"value": "require \"test_helper\"\nrequire \"rubycritic/report_generators/view_helpers\"\nrequire \"pathname\"\n\ndescribe Rubycritic::ViewHelpers do\n context \"when the file is in t... | ruby | chosen |
[
{
"from": "system",
"value": "EventTest: Make sure to rollback Gridhook.config to default state\n"
},
{
"from": "human",
"value": "require 'helper'\n\n# http://sendgrid.com/docs/API_Reference/Webhooks/event.html\n\nclass EventTest < TestCase\n\n def setup\n @events = []\n Gridhook.config.... | ruby | chosen |
[
{
"from": "human",
"value": "Add test file for Input."
},
{
"from": "gpt",
"value": "require_relative \"../../test_helper\"\n\nmodule Trlo\n describe Input do\n describe \".get\" do\n subject { Input.get(id) }\n\n it \"gets user's input via $EDITOR\" do\n skip(\"Please write... | ruby | chosen |
[
{
"from": "system",
"value": "Add tests for frozen string\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\nrequire_relative '../test/test_helper'\n\nclass PragmaEnabledTest < Minitest::Test\n def test_frozen_string\n # マジックコメント(Pragma)がtrueなのでStringは freeze している\n e = ass... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deleting projects using puppet\n\nChange-Id: Ia21de5ba7f7b613eed5f2f6bd9ea73f46e51f148\n"
},
{
"from": "human",
"value": "require 'pathname'\nrequire Pathname.new(__FILE__).dirname.dirname.expand_path + 'rbuilder'\n\nPuppet::Type.type(:rbuilder_project).provide(... | ruby | chosen |
[
{
"from": "system",
"value": "Add fields for container-containers summary screen\n"
},
{
"from": "human",
"value": "module ContainerHelper::TextualSummary\n #\n # Groups\n #\n\n def textual_group_properties\n items = %w(image)\n items.collect { |m| send(\"textual_#{m}\") }.flatten.comp... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"use Chef, not shell-out, to fix directory permissions\"\n\nThis reverts commit c1a4ceed261dfe368fda441af5343b0c4d43baa9.\n\nTurns out, the recursive directory permission applied by Chef's\ndirectory resource was insufficient to fix `.bundle/cache` being\ncreated and po... | ruby | chosen |
[
{
"from": "human",
"value": "_plugin: Add tag to link articles\n"
},
{
"from": "gpt",
"value": "#\n# Provides a tag for linking articles\n#\n\nmodule Jekyll\n\n module Article\n\n class LinkTag < Liquid::Tag\n\n def initialize tag_name, text, tokens\n super\n @text = text\... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the file list has no redundant files.\n"
},
{
"from": "human",
"value": "module YARD\n VERSION = \"0.2.2\"\n ROOT = File.join(File.dirname(__FILE__), 'yard')\n TEMPLATE_ROOT = File.join(File.dirname(__FILE__), '..', 'templates')\n\n def self.parse(path... | ruby | chosen |
[
{
"from": "system",
"value": "Use memory store for cache in dummy app\n"
},
{
"from": "human",
"value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\nBundler.require(*Rails.groups)\nrequire \"rails_identity\"\n\nmodule Dummy\n class Application < Rails::Application\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix error on signup page visits\n\nUsers were getting errors when visiting the signup page. It seems\nthat clicking around in the \"guest area\" (e.g. forgot my password\npage) would cause the layout to be set to the application layout\nwhich would then error because it was try... | ruby | chosen |
[
{
"from": "system",
"value": "Drop unnecessary fonticon from ConfigurationProfileDecorator\n"
},
{
"from": "human",
"value": "class ConfigurationProfileDecorator < MiqDecorator\n def fonticon\n if id.nil?\n 'pficon pficon-folder-close'\n else\n 'fa fa-list-ul'\n end\n end\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Clarify separation of bearer tokens in initializer.\n\nThis file is overwritten on deploy, so this change won't affect\nproduction etc, but it's good to make it clear that the panopticon and\nasset-manager clients use different tokens.\n"
},
{
"from": "human",
"valu... | ruby | chosen |
[
{
"from": "system",
"value": "Consolidate the Sidekiq config with production\n\nTaking the redis URL from the environment will allow to have one common\nconfig and not replace the initializer in 'alphagov-deployment'.\n"
},
{
"from": "human",
"value": "# This file is overwritten on deploy\n\nSid... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure the last frame of the animatead failure gif is captured\n"
},
{
"from": "human",
"value": "module EffectiveTestBotMinitestHelper\n # This is run before every test\n # def before_setup\n # end\n\n # This gets called after every test. Minitest hook for ... | ruby | chosen |
[
{
"from": "system",
"value": "Update rake requirement from ~> 10.0 to ~> 12.3\n\nUpdates the requirements on [rake](https://github.com/ruby/rake) to permit the latest version.\n- [Release notes](https://github.com/ruby/rake/releases)\n- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)\n- [... | ruby | chosen |
[
{
"from": "human",
"value": "Add the sengrid information for ActionMailer\n"
},
{
"from": "gpt",
"value": "ActionMailer::Base.smtp_settings = {\n :address => 'smtp.sendgrid.net',\n :port => '587',\n :authentication => :plain,\n :user_name => ENV['SENDGRID_USERNAME'],\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add development dependencies for testing\n\n% bundle install\n% test/run-test.rb\n\nSo, you can meet kinotan. :)\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add semantic.gem as a 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 'hatena/bookmark/restful/version'\n\nGem::Specification.new do |spec|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add first draft of view to be used for data in target dashboard\n"
},
{
"from": "gpt",
"value": "class AddCountriesAndRegionsViewForAichi11TargetDashboard < ActiveRecord::Migration[5.0]\n def up\n execute \"DROP VIEW IF EXISTS aichi11_target_dashboard_view\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update feature spec to enter ISO and ISO3 details then save."
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule Spree\n describe 'Countries', type: :feature do\n stub_authorization!\n\n it 'deletes a state', js: true do\n visit spree.admin_... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.