conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix depracated be_true method by be_truthy\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Authentication do\n include Authentication\n\n describe '#restricted_for_current_user' do\n let(:exercise) { create(:exercise) }\n let(:result) { ...
ruby
chosen
[ { "from": "system", "value": "Use Rack::ThumbNailer in the site's rackup\n" }, { "from": "human", "value": "#require 'pp'\nrequire 'eee.rb'\nrequire 'rubygems'\nrequire 'sinatra'\nrequire 'rack/cache'\n\nuse Rack::Cache,\n :verbose => true,\n :metastore => 'file:/var/cache/rack/meta',\n ...
ruby
chosen
[ { "from": "system", "value": "Fix .gemspec not setting test_files due to /bin/sh not handling {} expansion\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/pdf_ravager/version', __FILE__)\n\nGem::Specification.new do |s|\n s.name = \"pdf_rava...
ruby
chosen
[ { "from": "system", "value": "Revert \"Bump database_cleaner to 0.9.1\"\n\nDue to randomly failures with SQLite3's locked DB, I have to revert\nthis commit until database_cleaner sort this out\n\nThis reverts commit a726fa2c437e2408d095f6b2b339a61aba3a1ed3.\n" }, { "from": "human", "value": "# B...
ruby
chosen
[ { "from": "system", "value": "Update SHA for Navicat Premium Essentials 11.1.13\n" }, { "from": "human", "value": "cask :v1 => 'navicat-premium-essentials' do\n version '11.1.13'\n sha256 '1627233be58058f5b10fccc8ec9dfbf1f71b0051a3dcdc96916398e12f4061f5'\n\n url \"http://download.navicat.com/...
ruby
chosen
[ { "from": "system", "value": "Exclude the decorator from the model name.\n" }, { "from": "human", "value": "module Concerns\n module Backend\n module TranslatableController\n extend ActiveSupport::Concern\n\n included do\n before_action :find_models, only: [:edit_translation...
ruby
chosen
[ { "from": "human", "value": "Add test for service search/filter\n" }, { "from": "gpt", "value": "require \"test_helper\"\nrequire_relative 'support/ui_test_helper'\n\nclass FilterOrganizationServicesTest < Capybara::Rails::TestCase\n include UITestHelper\n include Warden::Test::Helpers\n afte...
ruby
chosen
[ { "from": "system", "value": "Add description to rake task\n" }, { "from": "human", "value": "namespace :legacy do\n desc \"Drop and recreate legacy test database, then import legacy data\"\n task :setup => :environment do\n Legacy.connection.execute \"DROP DATABASE IF EXISTS chorus_legacy_...
ruby
chosen
[ { "from": "system", "value": "Add before_action to authenticate token to AuthController\n" }, { "from": "human", "value": "class Api::V1::AuthController < ApplicationController\n\n def login\n @user = User.find_by(username: params[:user][:username])\n\n if !@user\n\n render json: {\n...
ruby
chosen
[ { "from": "system", "value": "Fix output of custom log attributes" }, { "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: :exce...
ruby
chosen
[ { "from": "system", "value": "Update string matching for appearance panel showing.\n" }, { "from": "human", "value": "class ApplicationController < ActionController::Base\n before_filter :set_seed_code\n helper_method :current_user, :add_starlight, :page_is_mine?\n protect_from_forgery\n\n d...
ruby
chosen
[ { "from": "system", "value": "Clean up the code a bit\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: :exception\n\n ...
ruby
chosen
[ { "from": "system", "value": "Fix AJAX calls for VESR cleanup.\n" }, { "from": "human", "value": "class EsrRecordsController < AuthorizedController\n before_filter :only => [:index] do\n EsrRecord.update_unsolved_states\n end\n\n # Scopes\n def index\n @esr_records = EsrRecord.unsolved...
ruby
chosen
[ { "from": "system", "value": "Use respond_with_json on information controller\n" }, { "from": "human", "value": "class InformationController < ApplicationController\n def data\n data = Information.data\n\n respond_to do |format|\n format.json { render json: data }\n end\n end\nen...
ruby
chosen
[ { "from": "system", "value": "Use mass assignment attributes protection introduced it Rails 5\n\nYou have to allowlist the params you need now with .require and .permit.\n\nThis is implemented here to fix the spec/features/suggestion_spec.rb\n" }, { "from": "human", "value": "class SuggestionsCo...
ruby
chosen
[ { "from": "system", "value": "Fix subtle bug with incorrect driver.\n" }, { "from": "human", "value": "class AgileTimer\n def initialize params\n @drive_time = drive_time_in_seconds(params[:drive_time])\n @participants = params[:participants]\n @current_driver_index = -1\n end\n\n de...
ruby
chosen
[ { "from": "human", "value": "Create serverspec file for all_configure.\n" }, { "from": "gpt", "value": "require_relative '../spec_helper.rb'\n\ndescribe service('zabbix_agentd') do\n it { should be_enabled }\nend\n\ndescribe port(10050) do\n it { should be_listening.with('tcp') }\nend\n\ndescr...
ruby
chosen
[ { "from": "system", "value": "Return a JSON object describing the app health\n" }, { "from": "human", "value": "require 'time'\r\nclass ServiceStatusController < ApplicationController\r\n def index\r\n query_start = Time.now\r\n @products = Products.all\r\n @query_timing = ((Time.now.t...
ruby
chosen
[ { "from": "system", "value": "Update top level gem include file.\n" }, { "from": "human", "value": "require \"arug/trader/version\"\n\nmodule Arug\n module Trader\n # Your code goes here...\n end\nend\n" }, { "from": "gpt", "value": "require \"arug/trader/line_item\"\nrequire \"...
ruby
chosen
[ { "from": "system", "value": "Switch to requesting https version of shields.io badge\n\nThey appear to have turned on force ssl and when generating the badge we dont allow redirects > this fixes that fixes #12\n" }, { "from": "human", "value": "class BadgeUrlRatingPresenter\n BASE_URI = \"http:...
ruby
chosen
[ { "from": "system", "value": "Fix compatibility issue with rake on travis\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"valid_email2/version\"\n\nGem::Specification.new do |spec|\...
ruby
chosen
[ { "from": "system", "value": "Use different Google API key for server\n" }, { "from": "human", "value": "Geocoder.configure(\n # Geocoding options\n timeout: 3, # geocoding service timeout (secs)\n lookup: :google, # name of geocoding service (symbol)\n # language:...
ruby
chosen
[ { "from": "system", "value": "Remove tmp-file storage provider, switch to in-memory provider.\n" }, { "from": "human", "value": "require 'openid/store/filesystem'\n\nRails.application.config.middleware.use OmniAuth::Builder do\n provider :developer unless Rails.env.production?\n provider :open...
ruby
chosen
[ { "from": "system", "value": "Reset the local production branch when we switch to it.\n" }, { "from": "human", "value": "module Heroku::Deploy::Task\n class PrepareProductionBranch < Base\n include Heroku::Deploy::Shell\n\n def before_deploy\n @previous_branch = git \"rev-parse --abb...
ruby
chosen
[ { "from": "system", "value": "Add proper serializer for dashboard author\n" }, { "from": "human", "value": "class Api::DashboardSerializer < ActiveModel::Serializer\n attributes :id, :title, :slug, :summary, :content, :attribution, :published,\n :user_id, :production, :preproduction...
ruby
chosen
[ { "from": "system", "value": "Remove alias from LGA factory\n" }, { "from": "human", "value": "# Read about factories at https://github.com/thoughtbot/factory_girl\n\nFactoryGirl.define do\n factory :local_government_area do\n sequence(:name) { |n| \"LGA #{n}\" }\n sequence(:alias) { |n| ...
ruby
chosen
[ { "from": "system", "value": "Make sure Avalon::Lti::Configuration is set when there is no config file\n" }, { "from": "human", "value": "# You also need to explicitly enable OAuth 1 support in the environment.rb or an initializer:\nAUTH_10_SUPPORT = true\n\nmodule Avalon\n module Lti\n begi...
ruby
chosen
[ { "from": "system", "value": "Remove keep-awake ping on heroku\n\nHeroku's new Free tier requires applications to sleep for at least\nsix hours a day, thus we can not keep huginn awake.\nEvery paid tier does not but the application to sleep at all.\n" }, { "from": "human", "value": "require \"ne...
ruby
chosen
[ { "from": "system", "value": "Make sure the validators load in the correct order.\n" }, { "from": "human", "value": "require 'rubygems'\n\nif begin\n Gem::Specification::find_by_name('multi_json')\n rescue Gem::LoadError\n false\n rescue\n Gem.available?('multi_json')\n end\n require ...
ruby
chosen
[ { "from": "system", "value": "Switch to the :json cookie serializer\n\nAs this avoids security issues with the :marshal serialization\napproach. The :hybrid approach will have migrated the old cookies to\nthe new JSON approach, so this shouldn't cause any issues.\n" }, { "from": "human", "value"...
ruby
chosen
[ { "from": "human", "value": "Add P::Item class as Item Data producer\n" }, { "from": "gpt", "value": "class Poloxy::Item\n include Poloxy::GroupFunction\n\n def initialize config: nil\n @config = config || Poloxy::Config.new\n @data_model = Poloxy::DataModel.new\n end\n\n def create ar...
ruby
chosen
[ { "from": "system", "value": "Return all the reports properly.\n" }, { "from": "human", "value": "require_relative \"snowreports/version\"\nrequire_relative \"snowreports/builder\"\nrequire_relative \"snowreports/endpoint\"\nrequire_relative \"snowreports/fetcher\"\n\nmodule Snowreports\n def s...
ruby
chosen
[ { "from": "system", "value": "Add RecordSlackStatsJob to heroku scheduler\n" }, { "from": "human", "value": "namespace :heroku_scheduler do\n desc 'Schedule UpdateFromStreakJob'\n task queue_update_from_streak: :environment do\n UpdateFromStreakJob.perform_later\n end\n\n desc 'Schedule U...
ruby
chosen
[ { "from": "system", "value": "Use \"respond_to\" method for returning status \"ok\" or \"not_found\"\n" }, { "from": "human", "value": "require \"string_utils\"\n\nclass AboutController < ApplicationController\n def index\n url = request.original_fullpath.slice(7..-1) unless params[:url].bla...
ruby
chosen
[ { "from": "system", "value": "Make sure only admins can access the Admin panel.\n" }, { "from": "human", "value": "class AdminController < ApplicationController\n\n include Pundit\n\n layout :determine_layout\n\n rescue_from Pundit::NotAuthorizedError do |message|\n redirect_to root_path\n...
ruby
chosen
[ { "from": "system", "value": "Add user creation and pick creation logic to pick controller\n" }, { "from": "human", "value": " class PicksController < ApplicationController\n \n def new\n @pick = Pick.new\n @user = User.new\n end\n\n def create\n @user = User.find_or_create_by...
ruby
chosen
[ { "from": "system", "value": "Add authorization to user page\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n\n def index\n @users = User.all\n\n respond_to do |format|\n format.html\n format.json { render json: @users }\n end\n end\n \n d...
ruby
chosen
[ { "from": "system", "value": "Fix double render issue with if else statement\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n def new\n @user = User.new\n end\n\n def create\n @user = User.new(user_params)\n if @user.save\n session[:user_id] = @...
ruby
chosen
[ { "from": "system", "value": "Fix User Update, Invalid User Will Get Error Page\n\nFix the user update when a user submits an invalid user update this\nwill result in geting an error page.\n" }, { "from": "human", "value": "class UsersController < ApplicationController\n def show\n @user = c...
ruby
chosen
[ { "from": "system", "value": "Use decorator to load newsletter_user subscription form in footer\n" }, { "from": "human", "value": "#\n# == Setting Decorator\n#\nclass SettingDecorator < ApplicationDecorator\n include Draper::LazyHelpers\n delegate_all\n\n def title_subtitle(header = :h1, link...
ruby
chosen
[ { "from": "system", "value": "Fix missing translation in webapp manifest\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nclass ManifestsController < ApplicationController\n include ThemeHelper\n\n def show\n render json: {\n name: APP_CONFIG[\"site_name\...
ruby
chosen
[ { "from": "system", "value": "Add show action for questions\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n\n def show\n\n end\n\n def create\n\n end\n\n def destroy\n\n end\n\nend" }, { "from": "gpt", "value": "class QuestionsController <...
ruby
chosen
[ { "from": "system", "value": "Edit update method to fix typo.\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n\n def index\n @questions = Question.all\n end\n\n def new\n @question = Question.new\n end\n\n def create\n @question = Question.new...
ruby
chosen
[ { "from": "system", "value": "Add the to back to the mail\n" }, { "from": "human", "value": "class NotificationsMailer < ActionMailer::Base\n default from: 'team@speakerinnen.org'\n #default to: 'team@speakerinnen.org'\n\n def new_message(message, to)\n @message = message\n @url = 'http...
ruby
chosen
[ { "from": "system", "value": "Address OutputSafety cop with safe_join\n" }, { "from": "human", "value": "require 'html_processor'\n\nclass AmpArticleDecorator < Draper::Decorator\n def initialize(object, options = {})\n super\n end\n\n def content\n body = object.body\n\n html_proces...
ruby
chosen
[ { "from": "system", "value": "Fix the serializer to return the submitting user with a paper, this should probably be extended in to a number of users who have recognized roles on the paper " }, { "from": "human", "value": "class PaperSerializer < ActiveModel::Serializer\n attributes :id, :user_...
ruby
chosen
[ { "from": "system", "value": "Fix README markdown file reference\n\nREADME.markdown doesn’t exist" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = \"symmetric_file\"\n s.version = \"0.1.0\"\n s.summary = \"Create and edit encrypted tex...
ruby
chosen
[ { "from": "system", "value": "Remove the host restriction on the Agent for the WSOC.\n" }, { "from": "human", "value": "require 'wsoc/config'\nrequire 'open-uri'\nrequire 'json'\n\nrequire 'helpers/history'\n\nmodule Helpers\n module WSOC\n include History\n\n SERVER_URL = URI::HTTP.build...
ruby
chosen
[ { "from": "system", "value": "Add picture to user's edit info\n" }, { "from": "human", "value": "class RegistrationsController < Devise::RegistrationsController\n before_filter :configure_permitted_parameters, :only => [:create, :update]\n\n\t\t# POST /users/sign_up\n\t\tdef create\n\t\t\tsuper...
ruby
chosen
[ { "from": "system", "value": "Make freezing work with Windows\n\ngit-svn-id: afc9fed30c1a09d8801d1e4fbe6e01c29c67d11f@2615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de\n" }, { "from": "human", "value": "desc \"Lock this application to the current gems (by unpacking them into vendor/rails)\"\ntask :freez...
ruby
chosen
[ { "from": "system", "value": "Send namespace in revisions object\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\njson.course do\n json.revisions @revisions do |revision|\n json.call(revision, :id, :characters, :views, :date, :url,\n :user_id, :mw_rev_id, :mw_...
ruby
chosen
[ { "from": "human", "value": "Create spec examples for DbSeqEdit button class\n" }, { "from": "gpt", "value": "describe ApplicationHelper::Button::DbSeqEdit do\n let(:view_context) { setup_view_context_with_sandbox({}) }\n let(:dashboard_count) { 2 }\n let(:widgetsets) { Array.new(dashboard_co...
ruby
chosen
[ { "from": "system", "value": "Fix specs to run under 1.8.7\n\n* For some reason the block passed to Class.new is not being\n evaluated under 1.8.7, causing the specs to fail.\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe Axiom::Types::Object, '.finalize' do\n subject { o...
ruby
chosen
[ { "from": "system", "value": "Fix ordering of domain params to match spec\n" }, { "from": "human", "value": "class DomainsController < ApplicationController\n before_filter :admin_required\n before_filter :find_domain, except: [:index, :new, :create]\n\n def index\n @domains = Domain.order...
ruby
chosen
[ { "from": "system", "value": "Fix can't sent report(temporary fix)\n" }, { "from": "human", "value": "# rubocop:disable Metrics/MethodLength\n\nclass ReportsController < ApplicationController\n def index\n @contests = Contest.all\n @report = Report.new\n @sections_enum = { '競技部門': 0, '...
ruby
chosen
[ { "from": "system", "value": "Update gemspec: include renamed files [ci skip]\n" }, { "from": "human", "value": "require './lib/rgeo/active_record/version'\n\n::Gem::Specification.new do |spec|\n spec.name = 'rgeo-activerecord'\n spec.summary = 'An RGeo module providing spatial extensions to A...
ruby
chosen
[ { "from": "system", "value": "Resolve `already initialized constant VERSION` warning\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n#require File.expand_path('../lib/frank-webview-extras/version', __FILE__)\n$:.unshift File.expand_path(\"../lib\", __FILE__)\nrequire 'frank-webview...
ruby
chosen
[ { "from": "human", "value": "Enable to export stock and dollar prices.\n" }, { "from": "gpt", "value": "require \"csv\"\nrequire \"pg\"\n\nconnection = PG::connect(:host => \"localhost\", :user => \"osa\", :dbname => \"stock_and_exchange\")\n\nbegin\n codes = connection.exec(\"SELECT distinct c...
ruby
chosen
[ { "from": "system", "value": "Change version number to 0.3.1\n" }, { "from": "human", "value": "\nGem::Specification.new do |spec|\n spec.name = \"embulk-output-bigobject\"\n spec.version = \"0.3.0\"\n spec.authors = [\"cchuang\"]\n spec.summary = \"Bigobject outpu...
ruby
chosen
[ { "from": "system", "value": "Add the whole module pathname\n" }, { "from": "human", "value": "\nrequire 'test_helper'\n\nclass HTML::Pipeline::RequireHelperTest < Minitest::Test\n def test_works_with_existing\n HTML::Pipeline.require_dependency('rake', 'SomeClass')\n end\n\n def test_rais...
ruby
chosen
[ { "from": "human", "value": "Add home page layout tests\n" }, { "from": "gpt", "value": "require 'test_helper'\n\nclass HomePageLayoutTest < ActionDispatch::IntegrationTest\n test \"layout links\" do\n \tget root_path\n \tassert_template \"home_page/home\"\n \tassert_select \"a[href=?]\", \"...
ruby
chosen
[ { "from": "system", "value": "Split parse method into logical checks\n" }, { "from": "human", "value": "module Headlines\n module SecurityHeaders\n class StrictTransportSecurity < SecurityHeader\n def parse\n {}.tap do |results|\n results[:max_age] = Regexp.last_match[1]...
ruby
chosen
[ { "from": "human", "value": "Add specs for application helper." }, { "from": "gpt", "value": "require 'rails_helper'\n\ndescribe ApplicationHelper do\n describe '#page_title' do\n it 'should provide content for title' do\n expect(helper).to receive(:content_for).with(:title, 'DuckRails ...
ruby
chosen
[ { "from": "system", "value": "Include default recipe via run_context within action\n" }, { "from": "human", "value": "def load_current_resource\n node.include_recipe 'control_group::default'\n ControlGroups.config_struct_init(node)\n new_resource.group new_resource.name unless new_resource.gr...
ruby
chosen
[ { "from": "system", "value": "Remove require; new RSpec knows about actioncable\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nENV['RAILS_ENV'] ||= 'test'\nrequire File.expand_path('../config/environment', __dir__)\n\nrequire 'spec_helper'\n\nrequire 'action_cable/testing/rs...
ruby
chosen
[ { "from": "system", "value": "Use float for exchange rate\n" }, { "from": "human", "value": "class CreateSpreeFxRates < ActiveRecord::Migration\n def change\n create_table :spree_fx_rates do |t|\n t.string :currency\n t.decimal :value, precision: 10, scale: 2, default: 1.00\n\n ...
ruby
chosen
[ { "from": "system", "value": "Add (basic) tests for init class\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe 'marathon' do\n on_supported_os.each do |os, facts|\n context \"on #{os}\" do\n let(:facts) do\n facts\n end\n\n it { should compile }\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix contact email in gemspec\n" }, { "from": "human", "value": "# encoding: UTF-8\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_social'\n s.version = '2.1.0'\n s.summary = 'Adds social network login service...
ruby
chosen
[ { "from": "system", "value": "Write test for raising error\n" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'input_stream_module/input_stream'\n\ndescribe InputStream do\n \n describe \".prompt\" do\n let(:string_output) { InputStream.prompt(\"--- Please input your text bel...
ruby
chosen
[ { "from": "system", "value": "Remove spec helper overhead from registry spec" }, { "from": "human", "value": "require 'spec_helper'\nrequire 'registry'\n\ndescribe Registry do\n let(:type) { double }\n let(:object) { double }\n\n describe 'when registering an object for a given type' do\n ...
ruby
chosen
[ { "from": "system", "value": "Define necessary methods instead of method_missing.\n" }, { "from": "human", "value": "require 'capybara'\nrequire 'capybara/rspec/matchers'\nrequire 'capybara/poltergeist'\n\nmodule Infrataster\n module Contexts\n class CapybaraContext < BaseContext\n def ...
ruby
chosen
[ { "from": "system", "value": "Modify the .NET 4 detection logic so it's less likely to fail in the future\n" }, { "from": "human", "value": "#\n# Cookbook Name:: ms_dotnet4\n# Recipe:: default\n#\n# Copyright 2012, Webtrends Inc.\n#\n# All rights reserved\n#\n# Code based off the PowerShell cook...
ruby
chosen
[ { "from": "system", "value": "Add section of 'work' to the flexible working flow\n\nSmart Answers require a section or registering in\nPanopticon will fail. We should also update the\ntests to ensure we don't commit flows that are\nmissing their sections." }, { "from": "human", "value": "status ...
ruby
chosen
[ { "from": "system", "value": "Fix misleading method name for the cop generator\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RuboCop\n module Cop\n class Generator\n # A class that injects a require directive into the root RuboCop file.\n # It looks for...
ruby
chosen
[ { "from": "system", "value": "Make the application run at the relative root URL" }, { "from": "human", "value": "# This file is used by Rack-based servers to start the application.\n\nrequire ::File.expand_path('../config/environment', __FILE__)\nrun Rails.application\n" }, { "from": "g...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to latest ruby_parser stuff\n" }, { "from": "human", "value": "require './lib/brakeman/version'\n\nGem::Specification.new do |s|\n s.name = %q{brakeman}\n s.version = Brakeman::Version\n s.authors = [\"Justin Collins\"]\n s.summary = \"Security vu...
ruby
chosen
[ { "from": "system", "value": "Check out the xml-to-csv script for us\n" }, { "from": "human", "value": "package libxml-xpath-perl\rpackage gdal-bin" }, { "from": "gpt", "value": "package libxml-xpath-perl\rpackage gdal-bin\r\rgit \"/root/xml-to-csv\" do\r repository \"https://github...
ruby
chosen
[ { "from": "human", "value": "Add unit specs for header visitor\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Veritas::Adapter::Arango::Visitor::Header, '#root' do\n subject { object.root }\n\n let(:node) { base.header }\n let(:context) { mock('Context', :local_name => AQL...
ruby
chosen
[ { "from": "system", "value": "Change package name for install of datastax and cassandara\n" }, { "from": "human", "value": "include_recipe 'java'\n\nyum_repository \"datastax\" do\n description \"DataStax Repo for Apache Cassandra\"\n url \"http://rpm.datastax.com/community\"\n gpgcheck false...
ruby
chosen
[ { "from": "system", "value": "Correct permissions for lumberjack input's key\n" }, { "from": "human", "value": "include_recipe 'logstash-stack::_common'\n\nunless tagged?('logstash-elasticsearch')\n node.set['logstash']['indexer']['output']['50-elasticsearch']['variables']['host'] =\n search...
ruby
chosen
[ { "from": "system", "value": "Fix failing spec on CI environments\n" }, { "from": "human", "value": "require 'rails_helper'\n\n# This module tests functionality related with custom application files\n# TODO test models, controllers, etc...\n\ndescribe 'Customization Engine' do\n\n let(:test_key...
ruby
chosen
[ { "from": "system", "value": "Fix spec for authorization lock on employer resource\n" }, { "from": "human", "value": "module ControllerMacros\n def login_user\n before(:each) do\n @request.env[\"devise.mapping\"] = Devise.mappings[:user]\n user = create :user\n sign_in user\n ...
ruby
chosen
[ { "from": "system", "value": "Add chefspecs for push-jobs and platform support\n" }, { "from": "human", "value": "#\n# Cookbook Name:: delivery-base\n# Spec:: default\n#\n# Copyright (c) 2015 The Authors, All Rights Reserved.\n\nrequire 'spec_helper'\n\ndescribe 'delivery-base::default' do\n co...
ruby
chosen
[ { "from": "system", "value": "Fix operations order in upgrade docs.\n" }, { "from": "human", "value": "# This script migrates the authpwn 0.20 token codes and user IDs to the new\n# 0.21 format.\n# It should be run in a rails console.\n\nUser.all.each do |user|\n user.exuid = nil\n user.set_de...
ruby
chosen
[ { "from": "system", "value": "Refactor Axiom::Types::Encodable to add constraint in small methods\n\n* The ascii and non-ascii compatible constraints are setup by\n different methods.\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Axiom\n module Types\n\n # Add encoding cons...
ruby
chosen
[ { "from": "system", "value": "Drop view assigns from context\n" }, { "from": "human", "value": "require 'action_view'\nrequire 'mustache'\n\nmodule ActionView\n class Mustache < ::Mustache\n class Context < ::Mustache::Context\n undef_method :partial, :escapeHTML\n end\n\n def ini...
ruby
chosen
[ { "from": "system", "value": "Fix visibility of toolbar buttons\n\nMake some disabled toolbar buttons visible which weren't visible but\nthey should be. The core of the problem was class inheritance.\n" }, { "from": "human", "value": "class ApplicationHelper::Button::GenericFeatureButtonWithDisa...
ruby
chosen
[ { "from": "system", "value": "Remove TODO note relating to the recent changes\n" }, { "from": "human", "value": "require \"rack/test\"\nrequire \"sinatra\"\nrequire 'capybara/cucumber'\n\nclass DummyApp < Sinatra::Base\n get '/' do\n 'the best response eva!'\n end\nend\n\nBefore('@http-repo...
ruby
chosen
[ { "from": "system", "value": "Adjust default keep_alive to reduce overhead\n" }, { "from": "human", "value": "require 'active_support/core_ext/class/attribute'\n\nmodule ElasticRecord\n class Config\n class_attribute :connection_options, default: {}\n class_attribute :default_index_se...
ruby
chosen
[ { "from": "human", "value": "Add controller test for Public::PagesController\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe Sevenpages::Public::PagesController do\n describe 'GET #show' do\n before do\n get :show, use_route: :sevenpages\n end\n\n it { should re...
ruby
chosen
[ { "from": "system", "value": "Change to stop modifying frozen strings\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule FiniteMachine\n module Logger\n module_function\n\n def debug(message)\n FiniteMachine.logger.debug(message)\n end\n\n def info(messa...
ruby
chosen
[ { "from": "system", "value": "Make sure Restful has json required\n" }, { "from": "human", "value": "class HabitClient\n\n class Restful < ApiBase\n\n class ServerError < IOError; end\n\n module ClassMethods\n\n def parse(client, attributes)\n new(client, remap(attributes))\n ...
ruby
chosen
[ { "from": "system", "value": "Allow additional bulk api options to be set.\n" }, { "from": "human", "value": "require \"metacrunch/elasticsearch\"\n\nmodule Metacrunch\n class Elasticsearch::Destination\n\n DEFAULT_OPTIONS = {\n raise_on_result_errors: false,\n result_callback: nil...
ruby
chosen
[ { "from": "system", "value": "Fix description that shows up in Radiant Admin\n" }, { "from": "human", "value": "module RadiantRadiantValidatorsExtension\n VERSION = \"1.1.1\"\n SUMMARY = \"Radiant Validators for Radiant CMS\"\n DESCRIPTION = \"Makes Radiant better by adding radiant_va...
ruby
chosen
[ { "from": "system", "value": "Set default cache directory to public/\n" }, { "from": "human", "value": "require 'fileutils'\nrequire 'rack'\n\nmodule Rack\n\n class FunkyCache\n \n def initialize(app, settings)\n @app = app \n @settings = settings\n end\n\n def call(...
ruby
chosen
[ { "from": "system", "value": "Revert \"Fix problem of usage rabl 0.13.0 with Rails 5 and active cache\"\n" }, { "from": "human", "value": "module Rabl\n class Digestor < ActionView::Digestor\n end\nend\n" }, { "from": "gpt", "value": "module Rabl\n class Digestor < ActionView::Dig...
ruby
chosen
[ { "from": "human", "value": "Fix typo in score and smell column\n" }, { "from": "gpt", "value": "class RenameColumnsInScores < ActiveRecord::Migration\n def change\n rename_column :scores, :score_soucre_id, :score_source_id\n rename_column :smells, :smell_soucre_id, :smell_source_id\n en...
ruby
chosen
[ { "from": "system", "value": "Fix typo in shared_examples' class name regular expressions\n" }, { "from": "human", "value": "if ENV['COVERAGE'] || ENV['TRAVIS']\n require 'simplecov'\n \n if ENV['TRAVIS']\n require 'coveralls'\n SimpleCov.formatter = Coveralls::SimpleCov::Formatter\n e...
ruby
chosen
[ { "from": "system", "value": "Enable Rspec :should syntax because Webmock doesn't support :expect yet\n" }, { "from": "human", "value": "require_relative '../lib/judopay'\nrequire 'i18n'\n\n#require 'factory_girl'\n#require 'factories'\nrequire 'webmock/rspec'\n\n# Added to counter deprecation w...
ruby
chosen
[ { "from": "system", "value": "Add filter for simplecov to exclude bundled files\n" }, { "from": "human", "value": "$:.unshift File.expand_path(\"../..\", __FILE__)\n\nrequire \"simplecov\"\nSimpleCov.start\n\nrequire \"webmock\"\nrequire \"webmock/rspec\"\nrequire \"json\"\nrequire \"magnum/clie...
ruby
chosen