conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add Edit and Delete Feature to Question Controller\n" }, { "from": "human", "value": "get '/questions/index' do\n if @user.access == 'student'\n json questions: @user.questions\n elsif @user.access == 'coach'\n json questions: Question.all\n end\nend\n\npos...
ruby
chosen
[ { "from": "system", "value": "Reduce tag nesting on index page\n\nNot using these extra paragraph tags also means the index page will look exactly the same after we switched to `header_footer_only` template.\n" }, { "from": "human", "value": "module IndexHelper\n def title_and_url(flow_name, ti...
ruby
chosen
[ { "from": "system", "value": "Add tests for realm case sensitivity in AuthRealm\n\nAs per RFC 1945 (section 11) and RFC 2617, the realm value is case sensitive.\nThis commit adds tests for realm case sensitivity in\nMechanize::HTTP::AuthRealm.\n" }, { "from": "human", "value": "require 'mechaniz...
ruby
chosen
[ { "from": "system", "value": "Reduce SearchRecord::STORAGE_LIFETIME to 30 days" }, { "from": "human", "value": "# == Schema Information\n#\n# Table name: search_records\n#\n# id :integer not null, primary key\n# created_at :datetime not null\n#\n# Indexes\n#\n# index_...
ruby
chosen
[ { "from": "human", "value": "Remove erroneous explanation from an unpublishing\n" }, { "from": "gpt", "value": "u = Unpublishing.find_by_slug('civil-contingencies-act-a-short-guide-revised')\nif u\n print \"Removing explanation from 'civil-contingencies-act-a-short-guide-revised' unpublishing\"...
ruby
chosen
[ { "from": "system", "value": "Remove `attr_reader :table_name`\nfrom `ActiveRecord::ConnectionAdapters::OracleEnhanced::Column`\n\nAlready set at `ActiveRecord::ConnectionAdapters::Column`\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ActiveRecord\n module Connectio...
ruby
chosen
[ { "from": "system", "value": "Change the login URL expectation to a RegExp that takes logindev into account for Travis\n" }, { "from": "human", "value": "Given(/^I am logged in$/) do\n ENV['PDS_HANDLE'] = 'PDS_HANDLE'\nend\n\nGiven(/^I am not logged in$/) do\n ENV['PDS_HANDLE'] = nil\nend\n\nT...
ruby
chosen
[ { "from": "system", "value": "Fix locale select form options\n" }, { "from": "human", "value": "module ApplicationHelper\n def facet_options(form, facet)\n form.object.facet_options(facet)\n end\n\n def locale_codes\n I18n.t('language_names').keys\n end\n\n def map_locale_names\n l...
ruby
chosen
[ { "from": "system", "value": "Fix units helper for alternative units\n" }, { "from": "human", "value": "module ApplicationHelper\n \n def flash_and_model_messages\n if @show_model_errors\n message_block :on => @show_model_errors\n else\n message_block :on => []\n end\n end\...
ruby
chosen
[ { "from": "system", "value": "Use the publication date for news in the ATOM feed\n" }, { "from": "human", "value": "atom_feed(:root_url => news_url) do |feed|\n if @user\n feed.title(\"LinuxFr.org : les dépêches de #{@user.name}\")\n else\n feed.title(\"LinuxFr.org : les dépêches\")\n e...
ruby
chosen
[ { "from": "human", "value": "Add solution file for challenge 6.5\n" }, { "from": "gpt", "value": "# RELEASE 2: NESTED STRUCTURE GOLF\n# Hole 1\n# Target element: \"FORE\"\n\narray = [[1,2], [\"inner\", [\"eagle\", \"par\", [\"FORE\", \"hook\"]]]]\n\n# attempts:\n# ===============================...
ruby
chosen
[ { "from": "system", "value": "Prepare quick fix 0.6.2 release\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'Extra'\n s.version = '0.6.0'\n s.summary = 'Swift 3 library with usefull and lightfull extensions for your Cocoa Touch projects.'\n\n...
ruby
chosen
[ { "from": "system", "value": "Allow courses to be read by anyone when it is open.\n" }, { "from": "human", "value": "class Ability\n include CanCan::Ability\n\n # Initialize the ability of user.\n #\n # @param user [User] The current user.\n def initialize(user)\n return unless user\n\n ...
ruby
chosen
[ { "from": "system", "value": "Clarify spec and change of behavior for Random::DEFAULT\n" }, { "from": "human", "value": "require_relative '../../spec_helper'\n\ndescribe \"Random::DEFAULT\" do\n\n it \"returns a random number generator\" do\n Random::DEFAULT.should respond_to(:rand)\n end\n...
ruby
chosen
[ { "from": "system", "value": "Fix class name in tests\n" }, { "from": "human", "value": "require 'puppetlabs_spec_helper/module_spec_helper'\nrequire 'spec_helper'\n\ndescribe 'php' do\n\n context 'with defaults for all parameters' do\n it { should contain_class('php::install') }\n end\n\ne...
ruby
chosen
[ { "from": "system", "value": "Fix subdomain for stage w/ stage-newvpc\n" }, { "from": "human", "value": "set['apache']['listen_ports'] = %w(8080)\nset['apache']['contact'] = 'devops@evertrue.com'\n\nset['et_verify_app']['deploy_to'] = '/var/www/verify.evertrue.com'\nset['et_verify_app']['docroot...
ruby
chosen
[ { "from": "system", "value": "Use the right instance of the application\n" }, { "from": "human", "value": "require 'active_model/global_identification'\n\nmodule ActiveModel\n class Railtie < Rails::Railtie\n initializer \"active_model.globalid\" do\n config.after_initialize do |app|\n ...
ruby
chosen
[ { "from": "system", "value": "Bump up pod version number\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"BIObjCHelpers\"\n s.version = \"0.4.1\"\n s.summary = \"My collection of Objective-C helpers\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Use objects for equality spec." }, { "from": "human", "value": "require 'helper'\n\ndescribe Toy::Equality do\n uses_constants('User', 'Game', 'Person')\n\n describe \"#eql?\" do\n it \"returns true if same class and id\" do\n User.new(:id => 1).should eql...
ruby
chosen
[ { "from": "system", "value": "Send --unoptimize if Gifsicle level is 0\n" }, { "from": "human", "value": "require 'image_optim/worker'\n\nclass ImageOptim\n class Worker\n # http://www.lcdf.org/gifsicle/\n class Gifsicle < Worker\n INTERLACE_OPTION =\n option(:interlace, false, ...
ruby
chosen
[ { "from": "system", "value": "Use auth_code provided by credentials\n" }, { "from": "human", "value": "module LinkedIn\n module API\n module Authentication\n def authorize_url(**params)\n params.reverse_merge! configuration.to_h.slice :scope, :state, :redirect_uri\n params...
ruby
chosen
[ { "from": "system", "value": "Use caveats DSL in Paraview Lion Python 2.7.\n" }, { "from": "human", "value": "class ParaviewLionPython27 < Cask\n url 'http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v4.1&type=binary&os=osx&downloadFile=ParaView-4.1.0-Darwin-64bit...
ruby
chosen
[ { "from": "system", "value": "Return body unprocessed when not processable\n\nWhen strategy says our response is unprocessable, then we should not process the response." }, { "from": "human", "value": "\nmodule Sparrow\n class ResponseMiddleware < Middleware\n def call(env)\n @last_env ...
ruby
chosen
[ { "from": "system", "value": "Update project version to 1.1.0\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"Initializable\"\n s.version = \"1.0.1\"\n s.summary = \"Application Initializer protocols\"\n\n s.description = <<-DESC\n In...
ruby
chosen
[ { "from": "system", "value": "Adjust the location of the environment variables\n" }, { "from": "human", "value": "node[:deploy].each do |application, deploy|\n template \"#{deploy[:deploy_to]}/current/.env\" do\n source \".env.erb\"\n mode 0600\n owner deploy[:user]\n group deploy[:...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary reader and requires\n" }, { "from": "human", "value": "require 'allowing/helpers/scope_helpers'\nrequire 'allowing/wrapped_validation_builder'\n\nmodule Allowing\n class ValidationsGroup\n attr_reader :attribute, :validations\n\n def initia...
ruby
chosen
[ { "from": "system", "value": "Change Alamofire version in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |spec|\n\n spec.name = \"AlamofireActivityLogger\"\n spec.version = \"1.0.1\"\n spec.summary = \"A response serializer for Alamofire which logs both request ...
ruby
chosen
[ { "from": "system", "value": "Change medical conditions grid to use new search method\n" }, { "from": "human", "value": "class MedicalConditionsGrid\n include Datagrid\n\n scope do\n MedicalCondition\n end\n\n filter(:id, :string, :multiple => ',')\n filter(:name, :string) { |value| wher...
ruby
chosen
[ { "from": "system", "value": "Handle case of empty body being rescued\n" }, { "from": "human", "value": "module DeepCover\n class Node\n class ExceptionCatchVariableAssign < Node\n include NodeBehavior::CoverFromParent\n end\n\n class Resbody < Node\n include NodeBehavior::Co...
ruby
chosen
[ { "from": "system", "value": "Fixed: Use of namespace changes in Butterfli Rails\n" }, { "from": "human", "value": "class Butterfli::Instagram::Rails::ApiController < Butterfli::Controller\n layout nil\n protect_from_forgery with: :null_session, :if => Proc.new { |c| c.request.format == 'appli...
ruby
chosen
[ { "from": "system", "value": "Fix log when deploying via azure web apps using slot\n" }, { "from": "human", "value": "module DPL\n class Provider\n class AzureWebApps < Provider\n def config\n {\n \"username\" => options[:username] || context.env['AZURE_WA_USERNAME']...
ruby
chosen
[ { "from": "system", "value": "Use new :raw_info semantic instead of :user_hash.\n" }, { "from": "human", "value": "require 'omniauth-oauth2'\n\nmodule OmniAuth\n module Strategies\n class GitHub < OmniAuth::Strategies::OAuth2\n option :client_options, {\n :site => 'https://api.gi...
ruby
chosen
[ { "from": "system", "value": "Add a newline when assembling error response message so that the error\nand the backtrace don't blend together on the same line.\n\n" }, { "from": "human", "value": "class FilesController < ApplicationController\n # POST /files\n # The method name doesn't exactly ...
ruby
chosen
[ { "from": "system", "value": "Indent heredocs in Parser spec\n\nHeredocs that aren't indented are more difficult to read. Fix that by\nindenting them and using the `normalize_indent` helper to avoid a parse\nerror.\n\nChange-Id: Ia8cde89109290a548f421ad1db642e9c7926c7a4\nReviewed-on: http://gerrit.causes.co...
ruby
chosen
[ { "from": "human", "value": "Test the delete acount option.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe \"Profile account page\" do\n let(:user) { create(:user) }\n\n before do\n login_as :user\n end\n\n describe \"when signup is enabled\" do\n before do\n G...
ruby
chosen
[ { "from": "system", "value": "Fix incorrect Rubocop dependency version string\n" }, { "from": "human", "value": "module RuboCopFMT\n RUBOCOP_VERSION = [\n # Ten minor versions back is all we bother supporting.\n '>= 0.38.0',\n\n # Errors occur in the the Rails/UniqBeforePluck cop.\n ...
ruby
chosen
[ { "from": "system", "value": "Fix another bug on ScopedController." }, { "from": "human", "value": "module Saasable::ScopedController\n def self.included klass\n klass.send(:include, InstanceMethods)\n klass.class_eval do\n before_filter :fetch_current_saas\n before_filter :scop...
ruby
chosen
[ { "from": "system", "value": "Add service to remove recursive dep\n" }, { "from": "human", "value": "# Cookbook Name:: kairosdb\n# Recipe:: config_kairosdb.rb\n#\n# Copyright 2016, Abiquo\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except ...
ruby
chosen
[ { "from": "system", "value": "Fix signing of PUT requests without params\n" }, { "from": "human", "value": "require 'api_auth'\n\nmodule Weary\n module Middleware\n class HMACAuth\n\n def initialize(app, config = {})\n @app = app\n @access_id = config[:access_id]\n ...
ruby
chosen
[ { "from": "system", "value": "Add validation errors to client handshake\n" }, { "from": "human", "value": "require 'digest/sha1'\n\nmodule WebSocket\n class ClientHandshake < Http::Request\n\n def self.accept_token_for(websocket_key)\n Digest::SHA1.base64digest(websocket_key.strip + GUI...
ruby
chosen
[ { "from": "system", "value": ":bulb: Allow gem to be pushed to any host\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path(\"../lib\", __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire \"spooky/version\"\n\nGem::Specification.new do |spec|\n spe...
ruby
chosen
[ { "from": "system", "value": "Update podspec to v 1.0.3" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"TTRangeSlider\"\n s.version = \"1.0.2\"\n s.summary = \"A slider that allows you to pick a range\"\n s.description = <<-DESC\n ...
ruby
chosen
[ { "from": "system", "value": "Allow all minor updates of Rails 5.0.\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"swagger_rails/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new ...
ruby
chosen
[ { "from": "system", "value": "Use backticks to avoid hijacking execution\n" }, { "from": "human", "value": "module Approvals\n module Reporters\n class Reporter\n\n attr_reader :launcher\n\n def initialize(&launcher)\n @launcher = launcher || default_launcher\n end\n\n ...
ruby
chosen
[ { "from": "system", "value": "Handle multiple config files, fire post-config event\n" }, { "from": "human", "value": "class Batch\n\n # Adds a configure class method that can be used to load a configuration file\n # and make it available to the class and instances of it.\n module Config...
ruby
chosen
[ { "from": "system", "value": "Add deploy:start, :stop, :restart tasks. Doesn't work right now.\n" }, { "from": "human", "value": "set_default :passenger_version, \"3.0.11\"\nnamespace :passenger do\n desc \"Install Passenger with Nginx\"\n task :install, roles: :web do\n run \"gem install p...
ruby
chosen
[ { "from": "human", "value": "Add data migration to add early_disposition_request event type\n" }, { "from": "gpt", "value": "class AddMigrationForAddEarlyDispositionRequestEventTypeRakeTask < ActiveRecord::Migration\n def change\n reversible do |change|\n change.up do\n Rake::Tas...
ruby
chosen
[ { "from": "system", "value": "Add proper lookup for strategies\n" }, { "from": "human", "value": "module V1\n module SlackInvitation\n class StrategiesController < ApplicationController\n def show\n render json: {\n id: 0,\n name: 'mason',\n club_name:...
ruby
chosen
[ { "from": "system", "value": "Add tests to places controller\n" }, { "from": "human", "value": "require 'spec_helper'\n\ndescribe PlacesController do\n describe \"GET #index\" do\n it \"properly assigns all of the places to @places\" do\n # places = FactoryGirl.create_list(:place, 3)\n ...
ruby
chosen
[ { "from": "system", "value": "Copy fixture to tempdir before altering\n" }, { "from": "human", "value": "# encoding: utf-8\nrequire 'spec_helper'\n\ndescribe 'get-commit-shasums', :fly do\n before :context do\n @sha_artifacts = Dir.mktmpdir\n `git init ./spec/tasks/get-commit-shasums`\n ...
ruby
chosen
[ { "from": "human", "value": "Add a package for PreciseNode.\n" }, { "from": "gpt", "value": "class PreciseNode < Kosmos::Package\n title 'Precise Node'\n aliases 'precisenode'\n url 'http://blizzy.de/precise-node/PreciseNode-0.12.zip'\n\n def install\n merge_directory 'PreciseNode-0.12/Ga...
ruby
chosen
[ { "from": "human", "value": "Add prominence fields to outgoing message.\n" }, { "from": "gpt", "value": "class AddProminenceFieldsToOutgoingMessage < ActiveRecord::Migration\n def change\n add_column :outgoing_messages, :prominence, :string, :null => false, :default => 'normal'\n add_...
ruby
chosen
[ { "from": "human", "value": "Add forgotten filter params class\n" }, { "from": "gpt", "value": "class Search::FilterParams\n\n def self.standardise(filters)\n self.new(filters).standardise\n end\n\n def initialize(filters)\n @filters = filters\n end\n\n def standardise\n sanitise_l...
ruby
chosen
[ { "from": "system", "value": "Fix Smart strategy not setting XFA read-only properly\n" }, { "from": "human", "value": "module PDFRavager\n module Strategies\n class Smart\n def initialize(stamper)\n @acro_form = Strategies::AcroForm.new(stamper)\n @xfa = Strategies::...
ruby
chosen
[ { "from": "system", "value": "Fix product factory name sequence with Kernel.rand so it is not interpreted as a Spree::Product method\n\nFixes #1964\n" }, { "from": "human", "value": "FactoryGirl.define do\n factory :simple_product, :class => Spree::Product do\n sequence(:name) { |n| \"Produc...
ruby
chosen
[ { "from": "system", "value": "Change order so it matches PHP and is easier to visually compare\n" }, { "from": "human", "value": "xml.instruct! :xml, version: \"1.0\", encoding: \"ISO-8859-1\"\nxml.publicwhip do\n @policy_member_distances.each do |pmd|\n xml.memberinfo(\"id\" => \"uk.org.pub...
ruby
chosen
[ { "from": "system", "value": "Change gemspec to use the OS specific line break\n" }, { "from": "human", "value": "# encoding: utf-8\n\nrequire File.expand_path('../lib/axiom/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'axiom'\n gem.version = Axiom::VERSION.du...
ruby
chosen
[ { "from": "human", "value": "Fix content IDs and remove obsolete documents\n\nThe Finding Things migration checker has detected an inconsistency in\nthe state of 5 documents across Whitehall > Publishing API > Content\nStore.\n\nThese items do not exist in the content store, and have mismatched\ncontent IDs...
ruby
chosen
[ { "from": "system", "value": "Install vmware tools on windows vmware-iso boxes\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n" }, { "from": "human", "value": "# install virtualbox guest additions on vbox guests\nif vbox?\n directory 'C:/Windows/Temp/virtualbox'...
ruby
chosen
[ { "from": "system", "value": "Set up the host app to load OCW's seeds, via install generator\n" }, { "from": "human", "value": "class OpenConferenceWare::InstallGenerator < Rails::Generators::Base\n source_root File.expand_path('../templates', __FILE__)\n\n def copy_config_initializer\n cop...
ruby
chosen
[ { "from": "system", "value": "Improve output to make failures easier to spot\n" }, { "from": "human", "value": "#!/usr/bin/env ruby\nrequire \"socket\"\nrequire \"openssl\"\n\n# Simple helper class to verify to check whether a domain's SSL certificate has expired\nclass SSLChecker\n\n # PUBLIC\...
ruby
chosen
[ { "from": "human", "value": "Bring images controller from spree_backend so we can merge it with ofn's decorator\n" }, { "from": "gpt", "value": "module Spree\n module Admin\n class ImagesController < ResourceController\n before_filter :load_data\n\n create.before :set_viewable\n ...
ruby
chosen
[ { "from": "system", "value": "Allow the custom label for a foreign model to be appear in the SELECT menu that lists\nthe belongs_to options for a given model.\n" }, { "from": "human", "value": "module Locomotive\n module ContentEntriesHelper\n\n def options_for_belongs_to_custom_field(class_...
ruby
chosen
[ { "from": "system", "value": "Adjust first published at validator logic\n\nIt shouldn't be possible to set first_published_at to\na future date regardless of whether the document has\nbeen previously published. The UI would prevent the user\nfrom setting a future date if previously published was\nfalse but ...
ruby
chosen
[ { "from": "system", "value": "Update toolkit version so it pulls it from our own gem repo\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'govuk_template/version'\n\nGem::Specificatio...
ruby
chosen
[ { "from": "system", "value": "Add package.json to gemspec files so Narwhal integrations works when installed as a gem.\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'coffee-script'\n s.version = '0.1.6' # Keep version in sync with coffee-script.rb\n...
ruby
chosen
[ { "from": "system", "value": "Revert previous fix due to upstream bundler bug\n" }, { "from": "human", "value": "#\n# Copyright 2012-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...
ruby
chosen
[ { "from": "system", "value": "Disable postgresql bundle to avoid unstable build\n" }, { "from": "human", "value": "name \"td-agent\"\n#version '' # git ref\n\ndependency \"jemalloc\" unless windows?\ndependency \"ruby\"\ndependency \"nokogiri\"\ndependency \"postgresql\"\ndependency \"fluentd\"\...
ruby
chosen
[ { "from": "system", "value": "Remove unnecessary and require 'rubygems'\n" }, { "from": "human", "value": "$:.unshift File.expand_path('..', __FILE__)\n$:.unshift File.expand_path('../../lib', __FILE__)\nrequire 'rubygems'\nrequire 'rubygems/commands/webhook_command'\nrequire 'rubygems/commands...
ruby
chosen
[ { "from": "system", "value": "Make sure the number of lines tested match by explicitly testing for EOF.\n" }, { "from": "human", "value": "# Test helper.\n\n# Test coverage if enabled.\n\ndef jruby?\n defined?( RUBY_ENGINE ) and RUBY_ENGINE == 'jruby'\nend\n\nif ENV[ 'COVERAGE' ]\n require 'si...
ruby
chosen
[ { "from": "system", "value": "Update ::WebSmart::Client to handle error responses gracefully\n\n - Update key lookup to use Hash#dig\n" }, { "from": "human", "value": "module MelissaData\n module WebSmart\n class Client\n include MelissaData::WebSmart::ResponseProcessor\n include ...
ruby
chosen
[ { "from": "system", "value": "Change log name in the mongo adapter." }, { "from": "human", "value": "module Rgearmand\n class PersistentQueue\n class MongoDBQueue < Base\n def initialize(queue, options = {:hostname => `hostname`.chomp, :host => \"127.0.0.1\", :port => 27017, :persist =>...
ruby
chosen
[ { "from": "system", "value": "Exclude libxs.so from the gem build\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"ffi-rxs/version\"\n\nGem::Specification.new do |s|\n s.name = \"ffi-rxs\"\n s.version = XS::VERSI...
ruby
chosen
[ { "from": "human", "value": "Rework the way network loop notifies threads waiting on blocking Bunny::Channel methods\n\nMakes full test suite pass on both JRuby and CRuby 1.9.\n" }, { "from": "gpt", "value": "require \"spec_helper\"\n\ndescribe \"Rapidly opening and closing lots of channels\" do...
ruby
chosen
[ { "from": "system", "value": "Add support for TVOS to podspec\n\nhttp://blog.cocoapods.org/CocoaPods-0.39/\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = \"UICountingLabel\"\n s.version = \"1.2.0\"\n s.summary = \"Adds animated counting support to UILabel...
ruby
chosen
[ { "from": "system", "value": "Add helper to determine if a record is a superorder.\n" }, { "from": "human", "value": "module Metacrunch\n module UBPB\n module Transformations\n module MAB2SNR\n module Helpers\n module CommonHelper\n\n end\n end\n end...
ruby
chosen
[ { "from": "human", "value": "Add implementation of fortieth-second rule of disambiguator prefix\n" }, { "from": "gpt", "value": "module Sastrawi\n module Morphology\n module Disambiguator\n class DisambiguatorPrefixRule42\n def disambiguate(word)\n contains = /^kau(.*)$/...
ruby
chosen
[ { "from": "system", "value": "Use standardized helpers. Include alias to support currently library calls\n" }, { "from": "human", "value": "module JqGridRails\n module Helpers\n # arg:: Object\n # Does a simple transition on types from Ruby to Javascript.\n def format_type_to_js(arg)\n...
ruby
chosen
[ { "from": "system", "value": "Remove leftover, give tri-state boolean option a self-descriptive name\n" }, { "from": "human", "value": "module Filter\n class BooleanFieldBuilder\n def self.render\n lambda do |_, attr, opts|\n value = opts[:value]\n\n name = \"#{attr}_eq\"\...
ruby
chosen
[ { "from": "system", "value": "Compress served pages and assets\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\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.re...
ruby
chosen
[ { "from": "system", "value": "Fix issues properly loading AR extension; Added lazy loading if ActiveSupport is available.\n" }, { "from": "human", "value": "module PackRat\n module Extensions\n module ActiveRecord\n def included(base)\n base.extend(ClassMethods)\n end\n \n...
ruby
chosen
[ { "from": "system", "value": "Change timezones to pacific timezone.\n" }, { "from": "human", "value": "require File.expand_path('../boot', __FILE__)\n\nrequire 'rails/all'\n\n# Require the gems listed in Gemfile, including any gems\n# you've limited to :test, :development, or :production.\nBundl...
ruby
chosen
[ { "from": "system", "value": "Fix bug preventing API from returning data\n" }, { "from": "human", "value": "#\n# api_fetch.rb\n#\n\nrequire 'net/http'\nrequire 'net/https'\nrequire 'openssl'\n\nmodule Puppet::Parser::Functions\n newfunction(:api_fetch, :type => :rvalue) do |args|\n raise(Pup...
ruby
chosen
[ { "from": "system", "value": "Put more-abstract methods above less-abstract ones\n" }, { "from": "human", "value": "require 'yaml'\n\nmodule Liftoff\n class ConfigurationParser\n\n def project_configuration\n @configuration ||= evaluated_configuration\n end\n\n private\n\n def ...
ruby
chosen
[ { "from": "system", "value": "Include helper on a different way\n" }, { "from": "human", "value": "require 'twitter'\nrequire 'twitter-text'\nmodule SpreeTwitterTestimonials\n class Engine < Rails::Engine\n require 'spree/core'\n isolate_namespace Spree\n engine_name 'spree_twitter_tes...
ruby
chosen
[ { "from": "system", "value": "Set default encoding to utf8.\n" }, { "from": "human", "value": "# Load the rails application\nrequire File.expand_path('../application', __FILE__)\n\n# Initialize the rails application\nOneBody::Application.initialize!\n" }, { "from": "gpt", "value": "#...
ruby
chosen
[ { "from": "system", "value": "Exit validation with useful exit codes.\n" }, { "from": "human", "value": "module PROIEL\n module Commands\n class Validate < Command\n class << self\n def init_with_program(prog)\n prog.command(:validate) do |c|\n c.syntax 'valid...
ruby
chosen
[ { "from": "system", "value": "Fix 500s because of \"missing\" lexer\n" }, { "from": "human", "value": "class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML\n\n attr_reader :template\n alias_method :h, :template\n\n def initialize(template, options = {})\n @template = template\n ...
ruby
chosen
[ { "from": "system", "value": "Fix download link in test recipe\n" }, { "from": "human", "value": "node.set['java']['jdk_version'] = 6\n\nnode.set['jetty']['port'] = 8080\nnode.set['jetty']['version'] = '8.1.10.v20130312'\nnode.set['jetty']['link'] = 'http://eclipse.org/downloads/download.php?fil...
ruby
chosen
[ { "from": "system", "value": "Delete commented out dummy test." }, { "from": "human", "value": "require 'helper'\n$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))\nrequire 'tunes_parser_a'\n$LOAD_PATH.unshift(File.dirname(__FILE__))\n\nclass TestTunesParserA < Test::Unit::TestC...
ruby
chosen
[ { "from": "human", "value": "Add a \"live\" gemspec for production builds\n" }, { "from": "gpt", "value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"metasploit_data_models/version\"\n\nGem::Specification.new do |s|\n s.name = \"metasploit_data_m...
ruby
chosen
[ { "from": "system", "value": "Add test to check process_stage_pages are also destroyed\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nrequire \"test_helper\"\n\nmodule GobiertoAdmin\n module GobiertoParticipation\n class ArchiveProcessTest < ActionDispatch::IntegrationTe...
ruby
chosen
[ { "from": "system", "value": "Use Kaminari's total_pages instead of num_pages\n\nnum_pages has been removed in the latest version\n" }, { "from": "human", "value": "object false\nchild(@legacy_return_authorizations => :legacy_return_authorizations) do\n attributes *legacy_return_authorization_a...
ruby
chosen
[ { "from": "system", "value": "Change to Tag Index descending\n" }, { "from": "human", "value": "class TagsController < ApplicationController\n before_action :require_user\n before_action :set_current_tab, only: [:index, :show] \n\n def index\n @tags = Tag.order(name: :desc)\n end\n\n de...
ruby
chosen
[ { "from": "human", "value": "Add base for amazon object retrieval\n" }, { "from": "gpt", "value": "class AmazonRetrievalJob\n def self.get_amazon_stuff\n # Get objects from inside the the-golden-record bucket\n # Using objects' information, create and save Track objects and clean out old ...
ruby
chosen
[ { "from": "system", "value": "Fix frontpage showing follows with 0 runs\n" }, { "from": "human", "value": "require 'active_support/concern'\n\nmodule TwitchUser\n extend ActiveSupport::Concern\n\n include HTTParty\n ssl_version :SSLv3\n\n included do\n def load_from_twitch(response = nil)...
ruby
chosen
[ { "from": "system", "value": "Remove accessor de SalePromotion nao utilizado\n" }, { "from": "human", "value": "module Spree\n class SalePromotion < ActiveRecord::Base\n\n has_many :sale_prices, dependent: :destroy\n\n has_many :taxons, through: :sale_prices\n\n accepts_nested_attribut...
ruby
chosen
[ { "from": "system", "value": "Fix ruby_parser and sexp_processor requirements.\n" }, { "from": "human", "value": "name = \"gettext_i18n_rails\"\nrequire \"./lib/#{name}/version\"\n\nGem::Specification.new name, GettextI18nRails::VERSION do |s|\n s.summary = \"Simple FastGettext Rails integratio...
ruby
chosen
[ { "from": "system", "value": "Remove old flash message handling for now" }, { "from": "human", "value": "require \"dry/web/application\"\nrequire \"either_result_matcher/either_extensions\"\nrequire_relative \"container\"\n\nmodule Main\n class Application < Dry::Web::Application\n configure...
ruby
chosen
[ { "from": "system", "value": "Change the runtime dependency to `railties`, not `rails`.\n\n`rails` will bring in other gems that wicked doesn't depend on and might not be\nin use in the host app, like `activerecord`, `activejob` or `actionmailer`.\n" }, { "from": "human", "value": "# -*- encodin...
ruby
chosen