conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix submission log service spec\n* due to AR serialization api change\n" }, { "from": "human", "value": "# frozen_string_literal: true\n# Authenticate the assessment and update the session_id in submission.\nclass Course::Assessment::SessionLogService\n # @param [C...
ruby
chosen
[ { "from": "system", "value": "Add option to use redis queue reader in blocking mode or not. Default is non blocking.\n" }, { "from": "human", "value": "require \"metacrunch/redis\"\n\nmodule Metacrunch\n class Redis::QueueReader\n\n def initialize(redis_connection_or_url, queue_name, options...
ruby
chosen
[ { "from": "human", "value": "Add a podspec file for CocoaPods usage\n" }, { "from": "gpt", "value": "Pod::Spec.new do |s|\n s.name = 'MZFormSheetController'\n s.version = '0.0.2'\n s.license = 'MIT'\n s.summary = 'Provides an alternative to the native iOS UIModalPresentationFormSheet....
ruby
chosen
[ { "from": "system", "value": "Support relative AND absolute paths in config files, windows (I think) and mac/*nix\n" }, { "from": "human", "value": "module Utilities\n module FileSystemHelpers\n\n def file_exists?(filename)\n return false if filename.nil? || filename.length < 1\n F...
ruby
chosen
[ { "from": "system", "value": "Fix a unit test for the ArtefactsHelper" }, { "from": "human", "value": "require_relative '../../test_helper'\n\nclass ArtefactsHelperTest < ActionView::TestCase\n include ArtefactsHelper\n\n context \"need_url\" do\n should \"build a url from the need_owning_s...
ruby
chosen
[ { "from": "system", "value": "Update gemspec to test if works with mongoid 2.4" }, { "from": "human", "value": "# coding: utf-8\nrequire File.expand_path('../lib/active_admin/mongoid/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.authors = ['Elia Schito']\n gem.email ...
ruby
chosen
[ { "from": "human", "value": "Add acceptance test for voting\n" }, { "from": "gpt", "value": "require_relative 'acceptance_helper'\n\nfeature 'Vote question', '\n In order to vote question\n As an authenticated user\n I want to be able to vote question\n' do\n\n given!(:question) { create(:qu...
ruby
chosen
[ { "from": "system", "value": "Modify rakugaki user login shell to zsh\n" }, { "from": "human", "value": "#\n# Cookbook Name:: oh-my-zsh\n# Recipe:: default\n#\n# Copyright 2014, YOUR_COMPANY_NAME\n#\n# All rights reserved - Do Not Redistribute\n#\n\npackage \"zsh\" do\n action :install\nend\n\n...
ruby
chosen
[ { "from": "system", "value": "Fix keg exception pretty output\n" }, { "from": "human", "value": "module Homebrew extend self\n def link\n ARGV.kegs.each do |keg|\n print \"Linking #{keg}... \"\n puts \"#{keg.link} symlinks created\"\n end\n end\nend\n" }, { "from": "gpt...
ruby
chosen
[ { "from": "system", "value": "Add comment about amazon linux\n" }, { "from": "human", "value": "# This should be pulled from the distro\nif node['kernel']['machine'] == 'x86_64'\n\tdefault['wkhtmltox']['arch'] = 'amd64'\nelse\n\tdefault['wkhtmltox']['arch'] = 'i386'\nend\n\n# chef-sugar would be...
ruby
chosen
[ { "from": "system", "value": "Remove source directory attribute, everything will be in /usr/src\n" }, { "from": "human", "value": "#\n# Author:: Ingo Renner (<ingo@typo3.org>)\n# Cookbook Name:: typo3\n# Attributes:: default\n#\n# Copyright 2013, Ingo Renner\n#\n# Licensed under the Apache Licen...
ruby
chosen
[ { "from": "system", "value": "Implement asset hashing and pull assets straight from Cloudfront\n" }, { "from": "human", "value": "# This file is for reference only. Actual settings for the production\n# environment are stored in the build configuation block in config.rb.\n#\n# https://middlemana...
ruby
chosen
[ { "from": "system", "value": "Clear background line when running scenarios\n" }, { "from": "human", "value": "require 'rubygems'\nrequire 'cucumber/formatter/pretty'\nrequire 'cucumber/formatter/html'\n\nmodule Crudecumber\n # Custom formatter that inherits from the standard Cucumber 'Pretty'\n...
ruby
chosen
[ { "from": "system", "value": "Add theme colors for new themes\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule ThemeHelper\n def site_theme_for_user\n current_user&.account&.user&.setting_theme || Setting.theme\n rescue\n Setting.theme\n end\n\n THEME_COLORS =...
ruby
chosen
[ { "from": "human", "value": "Add Api Spec for AppManager::Api\n\nAdd spec for the AppManager::Api class.\n" }, { "from": "gpt", "value": "require 'spec_helper'\n\ndescribe ManageEngine::AppManager::Api do\n subject { ManageEngine::AppManager::Api }\n\n it \"can create a new instance\" do\n ...
ruby
chosen
[ { "from": "human", "value": "Add feature specs that were in integration back to feature\n" }, { "from": "gpt", "value": "require 'helper'\nrequire 'flipper/feature'\nrequire 'flipper/adapters/memory'\n\ndescribe Flipper::Feature do\n subject { described_class.new(:search, adapter) }\n...
ruby
chosen
[ { "from": "system", "value": "Use a 1.8.7 compatible version of factory girl\n" }, { "from": "human", "value": "version = File.read(File.expand_path(\"../VERSION\", __FILE__)).strip\n\nGem::Specification.new do |s|\n s.platform = Gem::Platform::RUBY\n s.name = 'spree_static_content'\...
ruby
chosen
[ { "from": "system", "value": "Fix gemspec with correct values instead of TODO\n" }, { "from": "human", "value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"pathfinder/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specificati...
ruby
chosen
[ { "from": "system", "value": "Validate one one user location\n\nRollbar errors on double POSTs\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# == Schema Information\n#\n# Table name: user_locations\n#\n# id :integer not null, primary key\n# user_id :...
ruby
chosen
[ { "from": "system", "value": "Set latest to false in the controller\n" }, { "from": "human", "value": "class CampaignsController < ApplicationController\n include CampaignsHelper\n\n before_filter :authenticate_user!\n before_filter :get_campaign, except: [:index]\n\n def index\n @campaig...
ruby
chosen
[ { "from": "system", "value": "Make sure new and updated look different" }, { "from": "human", "value": "class PlatformsController < ApplicationController\n def index\n @platforms = Project.popular_platforms\n end\n\n def show\n find_platform\n @updated = Project.search('*', filters: ...
ruby
chosen
[ { "from": "system", "value": "Edit create method to read local variable question\n" }, { "from": "human", "value": "class QuestionsController < ApplicationController\n def index\n end\n\n def new\n if logged_in?\n @question = Question.new\n @tag = Tag.new\n else\n redirec...
ruby
chosen
[ { "from": "system", "value": "Remove Swift 4.2 from supported versions in podspec\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SourceKittenFramework'\n s.version = `make get_version`\n s.summary = 'An adorable little framework for ...
ruby
chosen
[ { "from": "system", "value": "Remove `Rollbar.reset_notifier` to avoid to clear scopes set in `execute` method\n" }, { "from": "human", "value": "require 'rollbar'\n\nmodule Rollbar\n class CronoTrigger\n def self.handle_exception(ex, record = nil)\n scope = {\n framework: \"Cron...
ruby
chosen
[ { "from": "system", "value": "Remove monkey patch conditional as its needed in every supported version\n" }, { "from": "human", "value": "require 'active_record/relation'\nrequire 'active_record/version'\n\nmodule ActiveRecord\n module ConnectionAdapters\n module SQLServer\n module Core...
ruby
chosen
[ { "from": "system", "value": "Fix settings, as Ruby 1.8.7 does not like keys in an array to be symbols.\n" }, { "from": "human", "value": "require 'hpcloud/commands/config/set'\n\nmodule HP\n module Cloud\n class CLI < Thor\n\n map 'config:list' => 'config'\n\n desc 'config', \"lis...
ruby
chosen
[ { "from": "system", "value": "Add back in the named route collection patch\n\nthat makes URL helper methods public.\n\nThis is not included in the upstream rails 2.3 LTS changes. Those methods there still set the visibility of these methods to protected.\n\nReference 1: https://github.com/makandra/rails/blo...
ruby
chosen
[ { "from": "system", "value": "Remove useless and inaccurate comment\n" }, { "from": "human", "value": "module Transferatu\n class TransferWorker\n\n def initialize(status)\n @status = status\n end\n\n def perform(transfer)\n @status.update(transfer: transfer)\n runner = ...
ruby
chosen
[ { "from": "system", "value": "Revert \"Use internal Frontend API\"\n" }, { "from": "human", "value": "require \"gds_api/calendars\"\n\nclass WorkingDaysCalculator\n def initialize(starting_from, in_division: :england_and_wales)\n @starting_from = starting_from\n @calendar_division = in_di...
ruby
chosen
[ { "from": "human", "value": "Add in initial empty recipe\n" }, { "from": "gpt", "value": "#\n# Copyright 2012, Peter Donald\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 copy of the ...
ruby
chosen
[ { "from": "system", "value": "Move to 2.7.2 - stable for Mountain Lion; Installer changed to a .pkg\n" }, { "from": "human", "value": "pivotal_workstation_package \"XQuartz\" do\n source \"http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.1.dmg\"\n action :install\n volumes_dir \"XQuartz...
ruby
chosen
[ { "from": "system", "value": "Make the Firebase rake tasks a bit more flexible\n" }, { "from": "human", "value": "namespace :firebase do\n desc \"TODO\"\n task :sync => :environment do\n FirebaseClient.delete(\"/\")\n Annotation.root_annotations.each{|a| a.push_to_firebase}\n end\nend\n...
ruby
chosen
[ { "from": "system", "value": "Add missing option for sorting rocotostat output by task instead of cycle.\n" }, { "from": "human", "value": "##########################################\n#\n# Module WFMStat\n#\n##########################################\nmodule WFMStat\n\n require 'workflowmgr/wor...
ruby
chosen
[ { "from": "system", "value": "Fix default in spec, add more default checks\n" }, { "from": "human", "value": "require 'spec/spec_helper'\n\ndescribe 'initialization' do\n it \"sets correct default configuration\" do\n st = Rsel::SeleniumTest.new('http://some.host.org:8070/')\n st.url.shou...
ruby
chosen
[ { "from": "system", "value": "Set correct ruby version requirement\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'wardrobe/version'\n\nGem::Specification.new do |spe...
ruby
chosen
[ { "from": "system", "value": "Add tests for bucket object\n" }, { "from": "human", "value": "require 'spec_helper'\n\nRSpec.describe DataStructures101::ChainHashTable do\n\n let!(:hash_table) { DataStructures101::ChainHashTable.new }\n\n context 'creating a new empty list' do\n it '...
ruby
chosen
[ { "from": "system", "value": "Fix error caused by nil ignore_managers\n" }, { "from": "human", "value": "class CacheCalendarPresenter\n include Sidekiq::Worker\n def perform(start_time, end_time, key, skip_publish, ignore_managers=nil)\n start_time = Time.zone.at(start_time)\n end_time =...
ruby
chosen
[ { "from": "system", "value": "Fix error code on 404 page response.\n" }, { "from": "human", "value": "class ErrorsController < ApplicationController\n skip_before_action :authorize\n\n def not_found\n render layout: nil\n end\nend\n" }, { "from": "gpt", "value": "class ErrorsCo...
ruby
chosen
[ { "from": "human", "value": "Add new fields to people network\n" }, { "from": "gpt", "value": "class AddEntityAndEntityTypeToPeopleNetwork < ActiveRecord::Migration\n def self.up\n add_column :people_networks, :entity_id, :integer\n add_column :people_networks, :entity_type_id, :integer\n...
ruby
chosen
[ { "from": "system", "value": "Handle empty image search results\n" }, { "from": "human", "value": "module BackgroundImages\n class Finder\n attr_accessor :find_image_of, :max_attempts, :results\n\n def initialize(find_image_of = \"Brad Pitt's Ghost\")\n @find_image_of = ...
ruby
chosen
[ { "from": "system", "value": "Add bundler to Gemfile and require for LockfileParser dependencies\n\nWithout this, the LockfileParser runs into undefined errors when\nreferencing other Bundler classes.\n" }, { "from": "human", "value": "require \"bundler/lockfile_parser\"\n\nclass LockfileSpecs\n...
ruby
chosen
[ { "from": "system", "value": "[ec2] Add ability to delete the underlying snapshot with the deregister command.\n" }, { "from": "human", "value": "require 'fog/model'\n\nmodule Fog\n module AWS\n module EC2\n\n class Image < Fog::Model\n\n identity :id, 'imageId...
ruby
chosen
[ { "from": "system", "value": "Use the right button class for the restart webserver button.\n" }, { "from": "human", "value": "module UdongoHelper\n # Before using: Put <%= yield(:javascripts) %> in the <head> of your app's frontend\n def javascript(file, target = :javascripts)\n js_asset_lo...
ruby
chosen
[ { "from": "system", "value": "Make bitmasks work on JRuby\n" }, { "from": "human", "value": "require 'ffi/bit_masks'\n\nmodule GObject\n # Module for attaching functions from the gobject library\n module Lib\n extend FFI::Library\n extend FFI::BitMasks\n ffi_lib 'gobject-2.0'\n att...
ruby
chosen
[ { "from": "system", "value": "Add Cache-Control header only for PHP requests.\n" }, { "from": "human", "value": "module Middleman\n class PhpMiddleware\n\n def initialize(app)\n @app = app\n end\n\n def call(env)\n status, headers, response = @app.call(env)\n\n if env['R...
ruby
chosen
[ { "from": "system", "value": "Add arm_ids to attribute accessor" }, { "from": "human", "value": "require 'simple-random'\n\nmodule MultiArmedBandit\n\n class MultiplePlayTS\n\n attr_accessor :k, :l, :alpha, :beta\n\n # k: num of arms\n # l: num of selected arms\n def initialize(k, l...
ruby
chosen
[ { "from": "system", "value": "Remove tag methods deprecated by previous commit\n" }, { "from": "human", "value": "class RoleDescriptor < Sequel::Model\n many_to_one :entity_descriptor\n many_to_one :organization\n\n one_to_many :protocol_supports\n one_to_many :key_descriptors\n one_to_many...
ruby
chosen
[ { "from": "system", "value": "Delete trailing comma for Ruby 1.8/Rails 2.3 compatibility.\n" }, { "from": "human", "value": "module UniformNotifier\n class BugsnagNotifier < Base\n def self.active?\n !!UniformNotifier.bugsnag\n end\n\n protected\n\n def self._out_of_channel_not...
ruby
chosen
[ { "from": "system", "value": "Update from insecure Rake version\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'with_env/version'\n\nGem::Specification.new do |spec|\n spec.name ...
ruby
chosen
[ { "from": "system", "value": "Use create_or_replace for put_draft_content links\n\nWhen PutContentWithLinks was changed to use create_or_replace when saving\nlinks, the corresponding functionality in PutDraftContentWithLinks was not\nchanged. Reduce the duplication between classes to fix this.\n" }, { ...
ruby
chosen
[ { "from": "system", "value": "Load groups ordered by name\n" }, { "from": "human", "value": "# frozen_string_literal: true\nclass Course::GroupsController < Course::ComponentController\n load_and_authorize_resource :group, through: :course, class: Course::Group.name\n add_breadcrumb :index, :c...
ruby
chosen
[ { "from": "system", "value": "Remove users games when account canceled\n" }, { "from": "human", "value": "class RegistrationsController < Devise::RegistrationsController\n\n def update_resource(resource, params)\n resource.update_without_password(params)\n end\nend\n" }, { "from": "...
ruby
chosen
[ { "from": "system", "value": "Delete duplicate line in api doc\n" }, { "from": "human", "value": "require 'haml/version'\n\n# The module that contains everything Haml-related:\n#\n# * {Haml::Parser} is Haml's parser.\n# * {Haml::Compiler} is Haml's compiler.\n# * {Haml::Engine} is the class used...
ruby
chosen
[ { "from": "system", "value": "Check if the uploaded file really is an image.\n\nvia http://breakthebit.org/post/77478059324/fixing-missingrequiredvalidatorerror-when\n" }, { "from": "human", "value": "class Drink < ActiveRecord::Base\n\n validates_presence_of :name, :bottle_size, :price\n\n ha...
ruby
chosen
[ { "from": "system", "value": "Order of operations gotcha fixed.\n" }, { "from": "human", "value": "module MotionKit\n # Simple class that returns data about the parent element\n # for use while setting the styles of a child element.\n class Parent\n\n attr_reader :element\n\n def initia...
ruby
chosen
[ { "from": "system", "value": "Make ejson dependency less pessimistic\n" }, { "from": "human", "value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nGem::Specification.new do |spec|\n spec.name = \"capistrano-ej...
ruby
chosen
[ { "from": "system", "value": "Add uuidtools dependency to gemspec\n" }, { "from": "human", "value": "require File.expand_path(\"../lib/sandwich/version\", __FILE__)\n\nGem::Specification.new do |gem|\n gem.name = 'chef-sandwich'\n gem.version = Sandwich::VERSION\n\n gem.summary = 'The ...
ruby
chosen
[ { "from": "system", "value": "Clarify that methods should be overridden\n" }, { "from": "human", "value": "# A base class for sending outstanding notification emails to customers in the\n# background.\nclass BackgroundNotifier\n # Sends oustanding emails to customers.\n def send_emails\n pe...
ruby
chosen
[ { "from": "system", "value": "Move adapter after middleware callback\n" }, { "from": "human", "value": "require 'uri'\nrequire 'net/http'\nrequire 'rack'\n\nrequire 'faraday_cage/rack_middleware'\n\nmodule FaradayCage\n class Server\n\n attr_reader :app\n\n def initialize(app = FaradayCag...
ruby
chosen
[ { "from": "system", "value": "Advance PC before compiling each instruction.\n" }, { "from": "human", "value": "class VM\n class InstructionSequence\n def ludicrous_compile(function, env)\n self.each do |instruction|\n # env.stack.sync_sp\n # function.debug_inspect_object i...
ruby
chosen
[ { "from": "system", "value": "Reduce public interface of CLI reporter\n" }, { "from": "human", "value": "# encoding: utf-8\n\nmodule Mutant\n class Reporter\n # Reporter that reports in human readable format\n class CLI < self\n include Concord::Public.new(:output)\n\n NL = \"\\...
ruby
chosen
[ { "from": "system", "value": "Remove extensions, etc from TinkerElements." }, { "from": "human", "value": "module Pacer\n import com.tinkerpop.blueprints.impls.tg.TinkerGraph\n import com.tinkerpop.blueprints.impls.tg.TinkerVertex\n import com.tinkerpop.blueprints.impls.tg.TinkerEdge\n impor...
ruby
chosen
[ { "from": "system", "value": "Update comment in rake task" }, { "from": "human", "value": "namespace :credentials do\n desc 'Updates the database credentials for mothership foreign tables'\n # Run this task without spaces between the args, in the following format:\n # rake credentials:update ...
ruby
chosen
[ { "from": "system", "value": "Sort tags by alphabetical order\n" }, { "from": "human", "value": "module TwibblrHelper\n def render_posts(*options, &block)\n # if they are fetching posts in the controller\n # then awesome(!) otherwise get it for them\n posts = @posts || Post.all(*option...
ruby
chosen
[ { "from": "system", "value": "Rewrite version method to return only SHA\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\n# Helpers for displaying the current code version in the views.\nmodule VersionHelper\n\n # The current release version for HEAD\n VERSION = `git describe...
ruby
chosen
[ { "from": "system", "value": "NEW: Add task definitions to the new unit\n" }, { "from": "human", "value": "class TeachingPeriod < ActiveRecord::Base\n has_many :units\n\n validates :period, length: { minimum: 1, maximum: 20, allow_blank: false }, uniqueness: true\n validates :year, length: { ...
ruby
chosen
[ { "from": "system", "value": "FIX: Make sure combination of year and period is unique\n" }, { "from": "human", "value": "class TeachingPeriod < ActiveRecord::Base\n has_many :units\n\n validates :period, length: { minimum: 1, maximum: 20, allow_blank: false }, uniqueness: true\n validates :ye...
ruby
chosen
[ { "from": "system", "value": "Include xsl file in the gem\n" }, { "from": "human", "value": "Gem::Specification.new do |s|\n s.name = 'teifacsimile_to_jekyll'\n s.version = '0.1.0'\n s.date = '2015-11-30'\n s.summary = \"Import TEI facsimile pages and annotations as Jek...
ruby
chosen
[ { "from": "system", "value": "Update Company model test to phone_kind, validated with inclusion\n" }, { "from": "human", "value": "Column = Struct.new(:type, :limit) do\n def number?\n type == (:integer || :float || :decimal)\n end\nend\nclass Company\n include ActiveModel::Model\n\n attr...
ruby
chosen
[ { "from": "system", "value": "Update MEO Cloud to 0.2.29\n" }, { "from": "human", "value": "cask :v1 => 'meocloud' do\n version '0.2.7'\n sha256 'c03824e1173d4df7ea6b79822ccd0ab5f4bc6a3e1a85a5308ecf751f31785c15'\n\n url \"https://meocloud.pt/binaries/osx/MEOCloud-#{version}.dmg\"\n appcast '...
ruby
chosen
[ { "from": "system", "value": "Add zap stanza for Namecoin\n" }, { "from": "human", "value": "cask :v1 => 'namecoin' do\n version '0.3.80-a00c33d'\n sha256 '5e2432e384b46615d34c00fbe2bcb0a9cbc4f1cc1a27cd72fbffceebcac7eb95'\n\n url \"https://namecoin.info/files/Namecoin-Qt.app-#{version}.zip\"\...
ruby
chosen
[ { "from": "human", "value": "Add 'Nylas N1' version 0.3.25-c174641.\n\n'Nylas N1' is a extensible, open source mail client.\n" }, { "from": "gpt", "value": "cask :v1 => 'nylas-n1' do\n version '0.3.25-c174641'\n sha256 '48f77c8b1a0957b4edafe201362658e8798339e29b4b639cc1cd11404daab234'\n \n #...
ruby
chosen
[ { "from": "system", "value": "Remove tab character from Transmit cask\n" }, { "from": "human", "value": "class Transmit < Cask\n url 'http://www.panic.com/transmit/d/Transmit%204.4.1.zip'\n homepage 'http://panic.com/transmit'\n version '4.4.1'\n sha1 '8878d15c0cb8913159a30f70da45bbf4fa9ee6c...
ruby
chosen
[ { "from": "system", "value": "Update React Native documentation (0.30)\n" }, { "from": "human", "value": "module Docs\n class ReactNative < React\n self.name = 'React Native'\n self.slug = 'react_native'\n self.type = 'react'\n self.release = '0.29'\n self.base_url = 'https://fac...
ruby
chosen
[ { "from": "system", "value": "Update higher minimum deployment target: ios 7\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n\n s.name = \"MatrixKit\"\n s.version = \"0.2.5\"\n s.summary = \"The Matrix reusable UI library for iOS based on MatrixSDK.\"\n\n s.descrip...
ruby
chosen
[ { "from": "system", "value": "Support Rails 7 by increasing max version constraint" }, { "from": "human", "value": "$:.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'rails_admin_rollincode/version'\n\n# Describe your gem and declare its dependencies:\nGem::...
ruby
chosen
[ { "from": "system", "value": "Add fake intstructional reading levels\n" }, { "from": "human", "value": "class FakeStarReadingResultGenerator\n\n def initialize(student)\n @test_date = DateTime.new(2010, 9, 1)\n @reading_percentile = rand(10..99)\n @student = student\n end\n\n def nex...
ruby
chosen
[ { "from": "system", "value": "[JT][113963711] Add support for locating the column for the specified browser and updating cells based on the key value for the test case\n" }, { "from": "human", "value": "module MiniAutobot\n\n class GoogleSheets\n require 'rubygems'\n require 'google/api_c...
ruby
chosen
[ { "from": "system", "value": "Use variable instead of hard-coded install_path\n" }, { "from": "human", "value": "module VagrantDNS\n module Installers\n class Mac\n attr_accessor :tmp_path, :install_path\n\n def initialize(tmp_path, install_path = \"/etc/resolver\")\n self.t...
ruby
chosen
[ { "from": "system", "value": "Return :added_subchannel activities on a User activity query\n" }, { "from": "human", "value": "class Activity < OurOhm\n module For\n def self.fact(f)\n Query.where([\n {action: [:created, :believes, :disbelieves, :doubts] ,subject: f}\n ])\n ...
ruby
chosen
[ { "from": "system", "value": "Refactor lazy load method definitions\n" }, { "from": "human", "value": "module ActiveZuora\n module LazyAttr\n\n # This is meant to be included onto an Invoice class.\n # Returns true/false on success.\n # Result hash is stored in #result.\n # If succe...
ruby
chosen
[ { "from": "system", "value": "Fix check when setting comes from environment var" }, { "from": "human", "value": "module Adhearsion\n module LDAP\n\n ##\n # Adhearsion Plugin that defines the LDAP configuration options\n # and includes a hook to start the LDAP service in Adhearsion init...
ruby
chosen
[ { "from": "system", "value": "Make sure composer is installed\n" }, { "from": "human", "value": "#\n# Capistrano defaults\n#\nset :linked_files, []\nset :linked_files, -> { [\"app/config/parameters.yml\"] }\nset :linked_dirs, []\nset :linked_dirs, -> { [\"app/logs\", \"app/sessions\", \"src/Fron...
ruby
chosen
[ { "from": "system", "value": "Change from each to select and only store 200 responses (as per @stevenjack advice)\n" }, { "from": "human", "value": "require 'alephant/logger'\n\nmodule Alephant\n module Broker\n class BatchResponse\n include Logger\n attr_reader :status, :content_t...
ruby
chosen
[ { "from": "system", "value": "Use double quotes instead of single\n" }, { "from": "human", "value": "# frozen_string_literal: true\nrequire \"graphql\"\nrequire \"graphql/client\"\nrequire \"rails/railtie\"\n\nmodule GraphQL\n class Client\n # Optional Rails configuration for GraphQL::Client...
ruby
chosen
[ { "from": "system", "value": "Remove hard-coded prefix in counter tracking.\n" }, { "from": "human", "value": "module Metrics\n module Rails\n \n class CounterCache\n extend Forwardable\n \n def_delegators :@cache, :empty?\n \n def initialize\n @cache = {}\n ...
ruby
chosen
[ { "from": "system", "value": "Add Documents to DocumentCollection sync check\n" }, { "from": "human", "value": "module SyncChecker\n module Formats\n class DocumentCollectionCheck < EditionBase\n def root_path\n \"/government/collections/\"\n end\n\n def rendering_app\n...
ruby
chosen
[ { "from": "system", "value": "Create a keepalive session just if session/thread is nil\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nmodule RubyRabbitmqJanus\n module Models\n # Add method for Janus Instance model\n module Methods\n extend ActiveSupport::Concern...
ruby
chosen
[ { "from": "system", "value": "Change context format for resque failed jobs\n" }, { "from": "human", "value": "# Resque support\n\n# How to use:\n# Resque::Failure::Multiple.classes = [Resque::Failure::Redis, Resque::Failure::Bugsnag]\n# Resque::Failure.backend = Resque::Failure::Multiple\n#\...
ruby
chosen
[ { "from": "system", "value": "Fix task delete one instance\n" }, { "from": "human", "value": "# frozen_string_literal: true\n\nnamespace :rrj do\n namespace :delete do\n desc 'Delete one instance in database and janus'\n task :one_instance, [:instance, :session] => :environment do |_task,...
ruby
chosen
[ { "from": "system", "value": "Move value.class into its own variable\n" }, { "from": "human", "value": "module SuperSettings\n # This class allows for feature toggles\n class Feature\n # TODO: Allow user to set a default value when using hashes\n def initialize(value)\n unless [::Tr...
ruby
chosen
[ { "from": "system", "value": "Update podspec version to 1.1\n" }, { "from": "human", "value": "Pod::Spec.new do |s|\n s.name = 'SDCAutoLayout'\n s.version = '1.0'\n s.license = { :type => 'MIT', :file => 'LICENSE' }\n s.authors = { 'Scott Berrevoets' => 's.berrevoets@m...
ruby
chosen
[ { "from": "system", "value": "Add asset_dir config value with full path to generated assets\n" }, { "from": "human", "value": "module Yarrow\n module HTML\n module AssetTags \n include Yarrow::Configurable\n\n # TODO: make sprockets manifest optional/pluggable\n def manife...
ruby
chosen
[ { "from": "system", "value": "Add comment (mostly taken from README)\n" }, { "from": "human", "value": "module Cucumber\n module Core\n module Report\n class Summary\n attr_reader :test_cases, :test_steps\n\n def initialize\n @test_cases = Test::Result::Summary.ne...
ruby
chosen
[ { "from": "system", "value": "Make a special include! method for CommandContainer that also allows including EventContainers\n" }, { "from": "human", "value": "module Discordrb::Commands\n # This module holds a collection of commands that can be easily added to by calling the {CommandContainer#...
ruby
chosen
[ { "from": "system", "value": "Fix style typo in Student entity.\n" }, { "from": "human", "value": "module KOSapiClient\n module Entity\n class Student < BasePerson\n\n map_data :branch, Link\n map_data :department , Link\n map_data :email\n map_data :start_date, Time\n ...
ruby
chosen
[ { "from": "system", "value": "Define methods in the right places.\n" }, { "from": "human", "value": "require \"rails/deprecated_sanitizer/version\"\nrequire \"rails/deprecated_sanitizer/html-scanner\"\nrequire \"active_support/lazy_load_hooks\"\n\nmodule Rails\n module DeprecatedSanitizer\n ...
ruby
chosen
[ { "from": "system", "value": "Change the middleware we inserted before\n" }, { "from": "human", "value": "module RooOnRails\n module Railties\n class HTTP < Rails::Railtie\n initializer 'roo_on_rails.http' do |app|\n $stderr.puts 'initializer roo_on_rails.http'\n require '...
ruby
chosen
[ { "from": "system", "value": "Add missing require for migration_helper\n" }, { "from": "human", "value": "Sequel.migration do\n up do\n create_table(:config, charset: 'utf8') do\n primary_key :id\n String :name, null: false\n String :type, null: false\n String :value, typ...
ruby
chosen
[ { "from": "system", "value": "Update the console to version 2.0.3\n\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1561075\n" }, { "from": "human", "value": "# Add gems here, in Gemfile syntax, which are dependencies of the appliance itself rather than a part of the ManageIQ application\ngem \"man...
ruby
chosen