conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add very basic spec test for gluster::volume\n\nNot much to see, but better than nothing.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe 'gluster::volume', type: :define do\n let(:title) { 'storage1' }\n let(:params) do\n {\n replica: 2,... | ruby | chosen |
[
{
"from": "system",
"value": "Mark failing spec feature as pending\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\nfeature 'Login page' do\n scenario 'when visiting /login' do\n visit admin_login_path\n\n expect(page).to have_content('Iniciar sesión con GitHub')\n end\nend\... | ruby | chosen |
[
{
"from": "system",
"value": "Add testd for all postitions\n"
},
{
"from": "human",
"value": "require 'rails_helper'\n\ndescribe Project do\n let!(:project) { FactoryGirl.create(:project) }\n\n describe '#rate=' do\n it 'returns Money' do\n project.update_attributes!(rate: 20)\n e... | ruby | chosen |
[
{
"from": "system",
"value": "Add index to AR spec setup\n"
},
{
"from": "human",
"value": "require 'active_record'\n\nActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')\nActiveRecord::Base.logger = Delayed::Worker.logger\nActiveRecord::Migration.verbose = fa... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug where release.version format did not match current_device.fbos_version\n"
},
{
"from": "human",
"value": "module Api\n # ReleasesController accepts device information from an FBOS\n # device seeking to update its firmware.\n # It uses the information prov... | ruby | chosen |
[
{
"from": "system",
"value": "Add test-unit as dev dependency\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = \"enom\"\n s.version = \"1.1.2\"\n s.authors = [\"James Miller\"]\n s.summary = %q{Ruby wrapper for the Enom API}\n s.description = %q{Enom is a Ruby wra... | ruby | chosen |
[
{
"from": "system",
"value": "Print water before first in git CLI\n"
},
{
"from": "human",
"value": "# A bit of ruby comments\n\noldrev, newrev, refname = gets.split\n\nif refname.split(\"/\").last != \"master\"\n puts \"You did not push to master, so water doesn't process your commits\"\n exi... | ruby | chosen |
[
{
"from": "system",
"value": "Add Rake as dev dependency\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\n\nrequire 'middleman-bootstrap-navbar/version'\n\nGem::Specification.new do |gem|\... | ruby | chosen |
[
{
"from": "human",
"value": "Change activity_log.activity to longtext to handle long process logs. mirrors uploads table\n"
},
{
"from": "gpt",
"value": "class ChangeActivityLogActivityToLongText < ActiveRecord::Migration\n def change\n change_column :activity_logs, :activity, :text, :limit... | ruby | chosen |
[
{
"from": "human",
"value": "Remove the null constraint on several spree tables\n\nAs with globalize 5.0 the original table column won't be updated\nanymore (https://github.com/globalize/globalize/pull/396#issuecomment-70192861),\nwe need to remove the null constraints from the `spree_taxonomies.name`\n`spr... | ruby | chosen |
[
{
"from": "system",
"value": "fix: Load the application if present\n"
},
{
"from": "human",
"value": "# https://nandovieira.com/creating-generators-and-executables-with-thor\nrequire 'dotenv/load'\nrequire 'thor'\nrequire 'ditty'\nrequire 'ditty/rake_tasks'\nrequire 'rack'\nrequire 'rake'\n\nmod... | ruby | chosen |
[
{
"from": "system",
"value": "Use Default Scope with a block\n"
},
{
"from": "human",
"value": "class Article < ActiveRecord::Base\n include Utils\n\n default_scope order('created_at DESC')\n belongs_to :user\n has_many :recommendations, :dependent => :destroy\n\n dragonfly_accessor :cover ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix --format available options to be strings instead of symbols\n"
},
{
"from": "human",
"value": "require 'thor'\nrequire 'npmdc'\n\nmodule Npmdc\n class Cli < Thor\n default_task :check\n\n desc 'check', 'Run check'\n method_option :path, desc: 'Path to ... | ruby | chosen |
[
{
"from": "system",
"value": "Add catch for no intent in request and fix syntax error in creating new request with AlexaRubykit\n"
},
{
"from": "human",
"value": "class AlexaInterfaceController < ApplicationController\n def recommend\n respond_to do |f|\n f.json {\n case params[\... | ruby | chosen |
[
{
"from": "system",
"value": "Use proper index for recipes grid.\n\nAlways choose the last one, in order to skip both collection and staff picks\n"
},
{
"from": "human",
"value": "class PageParser\n\n def initialize(page)\n @page = page\n @recipes = []\n get_recipes\n end\n\n def rec... | ruby | chosen |
[
{
"from": "system",
"value": "Throw away unneeded CMake artifacts\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\n# CMake Refuckulator\n# Converts CMake projects into Autotools projects\n# Copyright 2014 Robert D. French\n\nclass Logger\n\tdef initialize\n\t\t@log_count = 0\n\tend\n\n\td... | ruby | chosen |
[
{
"from": "system",
"value": "Fix missing part of implementation of \"PrefixDisambiguator\" class\n"
},
{
"from": "human",
"value": "module Sastrawi\n module Stemmer\n module Context\n module Visitor\n class PrefixDisambiguator\n attr_accessor :disambiguators\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use can_be_empty for Module and Class\n"
},
{
"from": "human",
"value": "require_relative 'const'\n\nmodule DeepCover\n class Node\n class ModuleName < Node\n has_child scope: [Node, nil]\n has_child const_name: Symbol\n\n def flow_completion_coun... | ruby | chosen |
[
{
"from": "system",
"value": "Use bundle from user's rbenv\n"
},
{
"from": "human",
"value": "define :bundle_config do\n execute \"bundle config #{params[:name]}\" do\n user node['current_user']\n end\nend\n"
},
{
"from": "gpt",
"value": "define :bundle_config do\n execute \"bu... | ruby | chosen |
[
{
"from": "system",
"value": "Use latest bundler and rspec gems\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'dayoneme/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Update the jruby installation package generator\n\nUpdates:\n* works with current version of rubyrep\n* adds isolation from existing ruby installations\n* builds the jruby installation package from scratch including\n jruby download & gem installation\n"
},
{
"from": "... | ruby | chosen |
[
{
"from": "system",
"value": "Extend Enumerable instead of Array\n"
},
{
"from": "human",
"value": "class Array\n def quicksort\n return self if self.size <= 1\n pivot = self.shift\n left, right = self.partition { |n| n < pivot }\n left.quicksort + [pivot] + right.quicksort\n end\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add auto rebooting on system crashes with dump creation and event log logging.\n\n\nFormer-commit-id: 9c40ab5f06d152e679ce85ac177096813140ed5c"
},
{
"from": "human",
"value": "# Webtrends Windows system setup\n\n#Install SNMP feature\nwindows_feature \"SNMP-Service\... | ruby | chosen |
[
{
"from": "system",
"value": "Rename 'answer' variable to 'solution'\n"
},
{
"from": "human",
"value": "answer = 1 + rand(1000)\nputs answer # This statement is temporary while I test the game.\nputs \"Guess what number I'm thinking of. It's between 1 and 1000\"\nguess = gets.to_i\nwhile guess !... | ruby | chosen |
[
{
"from": "system",
"value": "Update description and summary in gemspec\n"
},
{
"from": "human",
"value": "$:.push File.expand_path(\"../lib\", __FILE__)\n\n# Maintain your gem's version:\nrequire \"subscriptions/version\"\n\n# Describe your gem and declare its dependencies:\nGem::Specification.... | ruby | chosen |
[
{
"from": "system",
"value": "Replace hub installation with gem\n"
},
{
"from": "human",
"value": "namespace :virtualenv do\n VIRTUALENV_HOME = File.join(HOME, \".virtualenvs\")\n BIN = File.join(HOME, \"bin\")\n HUB = File.join(BIN, \"hub\")\n\n task :setuptools do\n pkg = %w{ python-set... | ruby | chosen |
[
{
"from": "system",
"value": "Move the blinky code into this gem.\n"
},
{
"from": "human",
"value": "require 'starting_blocks'\nrequire 'blinky'\n\nStartingBlocks::Publisher.subscribers << StartingBlocks::Extensions::BlinkyLighting.new\n"
},
{
"from": "gpt",
"value": "require 'starti... | ruby | chosen |
[
{
"from": "system",
"value": "Rewrite ip address gathering out of new facter hash\n"
},
{
"from": "human",
"value": "require 'ipaddress'\nmodule Puppet::Parser::Functions\n newfunction(:get_ipaddress, :type => :rvalue) do |args|\n if args[0] and !args[0].empty?\n interface = args[0].to_... | ruby | chosen |
[
{
"from": "system",
"value": "Bring Payment object up to date\n"
},
{
"from": "human",
"value": "module Xeroid\n module Objects\n class Payment\n attr_reader :invoice, :account, :amount, :date, :currency_rate\n\n def initialize(attributes)\n @invoice = attributes[:invoice]\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add comment to postgresql test\n"
},
{
"from": "human",
"value": "require 'test-unit'\nrequire_relative '../lib/relationizer/postgresql.rb'\n\nclass PostgresqlTest < Test::Unit::TestCase\n include Relationizer::Postgresql\n\n test \"postgresql\" do\n schema = {... | ruby | chosen |
[
{
"from": "system",
"value": "Fix how the reverse proxy interacts with SSL hosts\n"
},
{
"from": "human",
"value": "class AppProxy\n def self.new(*_args)\n # Construct a Rack app that only runs the reverse proxy middleware and\n # does nothing else.\n Rack::Builder.new do\n use Ra... | ruby | chosen |
[
{
"from": "system",
"value": "Add support for specifying container, setup block and browser.\n"
},
{
"from": "human",
"value": "require File.expand_path(\"page/version\", File.dirname(__FILE__))\n\nmodule Test\n class Page\n attr_reader :container\n\n def initialize(container)\n @con... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to import taggings from panopticon.\n\nRequires bump to govuk_content_models."
},
{
"from": "gpt",
"value": "class ImportTopicTaggingsFromPanopticon < Mongoid::Migration\n def self.up\n Artefact.where(owning_app: 'publisher').each do |artefact|\n ... | ruby | chosen |
[
{
"from": "human",
"value": "Add Flipper Cache Store .gemspec\n\n* Has an ActiveSupport dependency so publish as own gem\n"
},
{
"from": "gpt",
"value": "# -*- encoding: utf-8 -*-\nrequire File.expand_path('../lib/flipper/version', __FILE__)\n\nflipper_cache_store_files = lambda do |file|\n fil... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake tasks to dump files from command line\n"
},
{
"from": "gpt",
"value": "VALID_DUMPER_OPTIONS = [:filename, :file_extension, :target_type,\n :only, :except, :methods, :procs, :find, :records,\n :header, :text_format, :root]\n\nnamespace :dumper do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove constraint on Rubygems version in gemspec (thanks @aishafenton for pointing that out.)\n"
},
{
"from": "human",
"value": "# coding: utf-8\nrequire File.expand_path(\"../lib/gcoder/version\", __FILE__)\n\nGem::Specification.new do |s|\n s.name = 'gcode... | ruby | chosen |
[
{
"from": "system",
"value": "Add seed data for \"root\"\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nUser.create(\n screen: \"NigoroJr\",\n username: \"naoki\",\n hashed_password: \"$2a$10$9sK8ojTvFTtfyxqgE/GW2.YAvTuxVc5Nuwbp3W4t9uFyRt8ucNz5q\",\n)\n\nUser.create(\n screen: \"TestU... | ruby | chosen |
[
{
"from": "system",
"value": "Raise an error to help finding an issue on CI"
},
{
"from": "human",
"value": "require \"pathname\"\nrequire \"thor\"\n\nmodule Dry\n module Web\n module Roda\n class Generate\n TEMPLATES_DIR = \"templates\".freeze\n SOURCE_DIR = Pathname(__FI... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken fact for enforcing full disk encryption\n\nThe core fact we want to check is called `osfamily`, not `os_family`:\nhttp://docs.puppetlabs.com/facter/1.7/core_facts.html#osfamily\n\nRight now this fact is never being run, so the code from the sample\nBoxen project to e... | ruby | chosen |
[
{
"from": "system",
"value": "Add error for assigning over previous assignment\n"
},
{
"from": "human",
"value": "module RubyOS::Memory\n class Error < RuntimeError\n end\n\n # When a process cannot be allocated in memory because none is available.\n # NOTE NoMemoryError might be more succi... | ruby | chosen |
[
{
"from": "system",
"value": "Update Batch.new_from_xml to now parse date strings as DateTime instances.\n"
},
{
"from": "human",
"value": "module SalesforceBulk\n class Batch\n \n attr_accessor :apex_processing_time\n attr_accessor :api_active_processing_time\n attr_accessor :ended... | ruby | chosen |
[
{
"from": "system",
"value": "Allow user to set false values\n"
},
{
"from": "human",
"value": "class EnterprisePlugin\n\n def initialize(name)\n @name = name\n @enabled_by_default = false\n end\n\n def set_or_return(name, value=nil)\n if value\n instance_variable_set(\"@#{name}... | ruby | chosen |
[
{
"from": "system",
"value": "Clean up asset initialization script\n"
},
{
"from": "human",
"value": "# Be sure to restart your server when you modify this file.\n\n# Version of your assets, change this if you want to expire all your assets.\nRails.application.config.assets.version = '1.0'\n\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the bundle path, fix the build\n"
},
{
"from": "human",
"value": "require 'simplecov'\nrequire 'coveralls'\n\nSimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[\n SimpleCov::Formatter::HTMLFormatter,\n Coveralls::SimpleCov::Formatter\n]\nSimpleCov.sta... | ruby | chosen |
[
{
"from": "system",
"value": "Allow ERB in YAML config.\n"
},
{
"from": "human",
"value": "require \"rails\"\nrequire \"browse_everything/version\"\nrequire \"browse_everything/engine\"\nrequire \"browse_everything/retriever\"\n\nmodule BrowseEverything\n class InitializationError < RuntimeErro... | ruby | chosen |
[
{
"from": "human",
"value": "Fix consular service offices with the wrong office type\n"
},
{
"from": "gpt",
"value": "WorldwideOffice.all.each do |office|\n unless [\"Embassy\", \"Consulate\", \"High Commission\"].include?(office.worldwide_office_type.name)\n case office.slug\n when /^bri... | ruby | chosen |
[
{
"from": "human",
"value": "Make data column of notifications table big enough for long titles\n"
},
{
"from": "gpt",
"value": "class IncreaseDataLengthOnNotifications < ActiveRecord::Migration\n def up\n execute \"ALTER TABLE notifications ALTER COLUMN data TYPE VARCHAR(1000)\"\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change landing page to automatically send to user sign in if user is not signed in, or to send to user profile if the user is signed in\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n\n get 'users/profile'\n\n get 'teams/index'\n\n#resolve th... | ruby | chosen |
[
{
"from": "system",
"value": "Resolve the routing deprecation warnign\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do |map|\n match '/js_named_routes' => 'named_routes#generate', :method => :get\nend\n"
},
{
"from": "gpt",
"value": "Rails.application.routes.draw ... | ruby | chosen |
[
{
"from": "system",
"value": "Add students as nested resource within section to aid section-student creation\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n devise_for :students\n devise_for :teachers\n # For details on the DSL available within this file, see http://guid... | ruby | chosen |
[
{
"from": "system",
"value": "Add answers as nested resources for questions\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resources :questions\nend\n"
},
{
"from": "gpt",
"value": "Rails.application.routes.draw do\n root 'questions#index'\n resources :quest... | ruby | chosen |
[
{
"from": "system",
"value": "Move Blind Date overall to Calculator\n"
},
{
"from": "human",
"value": "module Competitions\n class BlindDateAtTheDairyOverall < Overall\n def self.parent_event_name\n \"Blind Date at the Dairy\"\n end\n\n def category_names\n [\n \"Begin... | ruby | chosen |
[
{
"from": "human",
"value": "Create a special purpose not scored section for CIS CentOS7 v1.1.0.\n"
},
{
"from": "gpt",
"value": "# 3.4 Disable Print Server - CUPS (Not Scored)\nservice 'cups' do\n action [:stop, :disable]\nend\n# 3.7 Remove LDAP (Not Scored)\npackage 'openldap-servers' do\n a... | ruby | chosen |
[
{
"from": "system",
"value": "Change class Info comment description\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"gemstash\"\nrequire \"puma/control_cli\"\n\nmodule Gemstash\n class CLI\n # This implements the command line setup task:\n # $ gemstash info\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use module_function instead of extend self\n"
},
{
"from": "human",
"value": "module Geokit\n module Inflector\n require \"cgi\"\n\n extend self\n\n def titleize(word)\n humanize(underscore(word)).gsub(/\\b([a-z])/u) { Regexp.last_match(1).capitalize ... | ruby | chosen |
[
{
"from": "system",
"value": "Move provider config test into describe block."
},
{
"from": "human",
"value": "require \"minitest_helper\"\n\nclass Thincloud::Authentication::ConfigureTest < ActiveSupport::TestCase\n setup do\n Thincloud::Authentication.configure do |config|\n config.pro... | ruby | chosen |
[
{
"from": "human",
"value": "Add self referential 1:1 veritas integration specs"
},
{
"from": "gpt",
"value": "require 'spec_helper_integration'\n\ndescribe 'Relationship - Self referential One To One' do\n include_context 'Models and Mappers'\n\n before(:all) do\n setup_db\n\n insert_pe... | ruby | chosen |
[
{
"from": "system",
"value": "Remove test. It's not helping\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\n\ndescribe UsersController, type: :controller do\n fixtures :users\n let(:user) { FactoryBot.create(:user) }\n # TODO: Shouldn't need a confer... | ruby | chosen |
[
{
"from": "system",
"value": "Document now requires unique file name\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../test_helper'\n\nclass DocumentTest < ActiveSupport::TestCase\n\n\tassert_should_require(:title)\n\tassert_should_require_unique(:document_file_name)\n\n\t... | ruby | chosen |
[
{
"from": "system",
"value": "Update Star Learning Communities Registration mailer\n\nAdds Jennifer Williams to the admin list that receives notifications\nwhen someone registers for a STAR Learning Community.\n"
},
{
"from": "human",
"value": "class StarLearningCommunityRegistrationMailer < App... | ruby | chosen |
[
{
"from": "system",
"value": "Change module comment to be less specific\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nmodule Axiom\n class Attribute\n\n # A mixin for attributes that have comparable values\n module Comparable\n include Function::Predicate::GreaterThan::Meth... | ruby | chosen |
[
{
"from": "system",
"value": "Update fpm-cookery to avoid installing Puppet 4.x\n\nhttps://github.com/bernd/fpm-cookery/commit/f1a5762e6e93a3933273e3b54c98ac030448f906\n"
},
{
"from": "human",
"value": "require \"buildtasks/mixins/dsl\"\n\nmodule BuildTasks\n module FPMCookery\n class DSL\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update output options to produce progressive JPEGs\n"
},
{
"from": "human",
"value": "module Spaceholder\n class Image\n def initialize(width, height)\n @width = width.to_i\n @height = (height || width).to_i\n end\n\n def to_blob\n ImageProc... | ruby | chosen |
[
{
"from": "system",
"value": "Load deprecated methods until version 1.1\n"
},
{
"from": "human",
"value": "require 'rspec/expectations'\nrequire 'shellwords'\n\nrequire 'aruba/version'\nrequire 'aruba/extensions/string/strip'\n\nrequire 'aruba/platform'\nrequire 'aruba/api/core'\nrequire 'aruba/... | ruby | chosen |
[
{
"from": "system",
"value": "Stop processing if no instances are available\n"
},
{
"from": "human",
"value": "module Awsam\n module Ec2\n\n def self.find_instance(acct, instance_id)\n logger = Logger.new(File.open(\"/dev/null\", \"w\"))\n ec2 = RightAws::Ec2.new(acct.access_key, a... | ruby | chosen |
[
{
"from": "human",
"value": "Add migration to allow longer key and document values for precomputed queries\"\n"
},
{
"from": "gpt",
"value": "class IncreasePrecomputedQueryDocSize < ActiveRecord::Migration\n def change\n change_column :precomputed_query_docs, :key, :text, :limit => nil\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Kaomoji.\n"
},
{
"from": "human",
"value": "cask 'kaomoji' do\n version '1.9'\n sha256 '04f7e6dc47b469eb90a74d5c569959f2218cc8f3b354edf85117b9f52574b071'\n\n url 'https://kaomojiformac.github.io/download/Kaomoji.zip'\n appcast 'https... | ruby | chosen |
[
{
"from": "system",
"value": "Fix homepage to use SSL in NodeBox Cask\n\nThe HTTP URL is already getting redirected to HTTPS. Using the HTTPS URL directly\nmakes it more secure and saves a HTTP round-trip.\n"
},
{
"from": "human",
"value": "cask :v1 => 'nodebox' do\n version '3.0.43'\n sha256 ... | ruby | chosen |
[
{
"from": "system",
"value": "Update Users Factory for description and icon\n\nUpdate the Users factory to include the description and icon attributes.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user do\n name { Faker::Name.name }\n email ... | ruby | chosen |
[
{
"from": "system",
"value": "Update YouView app path and license\n"
},
{
"from": "human",
"value": "cask :v1 => 'youview' do\n version :latest\n sha256 :no_check\n\n url 'http://download.mrgeckosmedia.com/YouView.zip'\n appcast 'http://mrgeckosmedia.com/applications/appcast/YouView'\n name... | ruby | chosen |
[
{
"from": "system",
"value": "Add spec for ratio and total division.\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nRSpec.describe TTY::ProgressBar, 'ratio=' do\n let(:output) { StringIO.new('', 'w+') }\n\n it \"allows to set ratio\" do\n progress = TTY::ProgressBar.new(\"[:bar]\", o... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor association scope support to eliminate SystemStackError\n"
},
{
"from": "human",
"value": "module ThinkingSphinx\n module ActiveRecord\n module CollectionProxyWithScopes\n def self.included(base)\n base.class_eval do\n alias_method_... | ruby | chosen |
[
{
"from": "system",
"value": "Modify district migration fields to be jurisdiction name, number and borough - can add more due to info in API\n"
},
{
"from": "human",
"value": "class CreateDistricts < ActiveRecord::Migration\n def change\n create_table :districts do |t|\n t.string :name\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix route for commenting on reviews\n"
},
{
"from": "human",
"value": "class CommentsController < ApplicationController\n\n def new\n @commentable_id = params[:commentable_id]\n @commentable_type = params[:commentable_type]\n if !session[:user_id]\n r... | ruby | chosen |
[
{
"from": "system",
"value": "Add home button to status page\n"
},
{
"from": "human",
"value": "class StatusesController < MyplaceonlineController\n protected\n def insecure\n true\n end\n\n def default_sort_direction\n \"desc\"\n end\n\n def additional_sorts\n [\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for groups helper.\n"
},
{
"from": "gpt",
"value": "# -*- encoding : utf-8 -*-\nrequire 'spec_helper'\n\ndescribe GroupsHelper do\n\n describe \"#permission_icon\" do\n\n subject { permission_icon(authorized) }\n\n context \"authorized\" do\n\n l... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wording in conditon spec\n"
},
{
"from": "human",
"value": "require_relative '../../../lib/passman/condition'\n\ndescribe Passman::Condition do\n subject { condition.evaluate(record) }\n let(:conditions) { { a: 'foo', b: 'bar' } }\n\n describe \"And Condition... | ruby | chosen |
[
{
"from": "system",
"value": "Add to Accessors strong_attr_accessor method\n"
},
{
"from": "human",
"value": "module Accessors\n def self.included(base)\n base.extend ClassMethods\n end\n\n module ClassMethods\n def attr_accessor_with_history(*args)\n args.each do |arg|\n va... | ruby | chosen |
[
{
"from": "human",
"value": "Delete all redis keys starting with \"Basefact:\"\n"
},
{
"from": "gpt",
"value": "class DeleteBasefactRemnants < Mongoid::Migration\n def self.up\n db = Redis.current\n basefact_keys = db.keys(\"Basefact:*\")\n deleted_key_count = db.del(*basefact_keys)\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix spec on JRUBY 1.8 mode\n"
},
{
"from": "human",
"value": "Sequel.migration do\n\n change do\n alter_table :users do\n add_column :twitter_handle, String, text: true\n end\n end\n\nend\n"
},
{
"from": "gpt",
"value": "Sequel.migration do\... | ruby | chosen |
[
{
"from": "human",
"value": "Create db migration for conversation subscriptions\n\nSee #2771\n"
},
{
"from": "gpt",
"value": "class CreateConversationSubscriptions < ActiveRecord::Migration\n def change\n create_table :conversation_subscriptions do |t|\n t.integer :user_id, nu... | ruby | chosen |
[
{
"from": "system",
"value": "Increase logging around bad link reporting\n"
},
{
"from": "human",
"value": "desc \"Generates a report on bad links found in whitehall documents based on a local mirror of the site.\"\ntask :generate_bad_link_reports, [:mirror_directory, :reports_dir, :email_addres... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo in will_paginate support\n"
},
{
"from": "human",
"value": "module ApiPagination\n class Hooks\n def self.init\n begin; require 'rails'; rescue LoadError; end\n if defined?(ActionController::Base)\n require 'rails/pagination'\n A... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that graphql-client is 0.11.3 or later\n\nFixes #7\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'nidobata/version'\n\nGem::Specification.new... | ruby | chosen |
[
{
"from": "system",
"value": "Revert change to stop method\n"
},
{
"from": "human",
"value": "module Bundle\n class BrewServices\n attr_accessor :started_services\n\n def initialize()\n @started_services = []\n started = `brew services list`.lines.grep(/started/)\n for f in... | ruby | chosen |
[
{
"from": "system",
"value": "Add generators configurations to example app\n"
},
{
"from": "human",
"value": "require_relative 'boot'\n\nrequire 'rails/all'\n\nBundler.require(*Rails.groups)\nrequire \"model_base\"\n\nmodule Dummy\n class Application < Rails::Application\n # Settings in conf... | ruby | chosen |
[
{
"from": "human",
"value": "Add generator for copying assets for customization\n"
},
{
"from": "gpt",
"value": "class FancyboxRailsGenerator < Rails::Generators::Base\n source_root File.expand_path(\"../../../vendor/assets\", __FILE__)\n\n desc \"Copy FancyBox into lib/ for customization\"\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make workdir option name the same as with local storage\n"
},
{
"from": "human",
"value": "require 'fog'\n\nmodule Executor\n module NFSStorage\n def stage_in\n @job.inputs.each do |file|\n Executor::logger.debug \"[#{@id}] Copying #{file.name} to tm... | ruby | chosen |
[
{
"from": "system",
"value": "Add repo name to Slug\n"
},
{
"from": "human",
"value": "module LearnWeb\n class Client\n module ValidateRepo\n class Slug\n attr_accessor :data, :repo_slug, :lab, :lesson_id, :later_lesson\n attr_reader :response\n\n include Attribut... | ruby | chosen |
[
{
"from": "system",
"value": "Make the directory if it don't exist\n"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule Opsicle\n module CredentialConverterHelper\n def convert_fog_to_aws\n # open/make new credentials file, read, and gather the groups of aws credentials already i... | ruby | chosen |
[
{
"from": "system",
"value": "Fix broken routes so application can now boot\n"
},
{
"from": "human",
"value": "# -*- encoding : utf-8 -*-\n# Here you can override or add to the pages in the core website\n\nRails.application.routes.draw do\n # Additional help pages\n match '/help/help_out' => '... | ruby | chosen |
[
{
"from": "system",
"value": "Raise InvalidConstellationFileError if the setup is wrong\n"
},
{
"from": "human",
"value": "require \"thor\"\n\nmodule Constellation\n\n class Runner < Thor\n include Thor::Actions\n\n def initialize(*)\n super\n @config = Config.new\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add ability to pass custom collection of block to render_blocks method\n"
},
{
"from": "human",
"value": "module BlockHelper\n def render_blocks(record, options = {})\n return if (record.blank? || !record.respond_to?(:blocks))\n\n begin\n block_layout = ... | ruby | chosen |
[
{
"from": "system",
"value": "Add comments to match dummy Rails 6 app\n"
},
{
"from": "human",
"value": "class ApplicationJob < ActiveJob::Base\nend\n"
},
{
"from": "gpt",
"value": "class ApplicationJob < ActiveJob::Base\n # Automatically retry jobs that encountered a deadlock\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure time-warp also works in Rails projects with a lib/core_ext.rb file\n"
},
{
"from": "human",
"value": "require 'core_ext'\n\nmodule Test # :nodoc:\n module Unit # :nodoc:\n class TestCase\n\n ##\n # Time warp to the specified time for the dura... | ruby | chosen |
[
{
"from": "system",
"value": "Remove pry from coinmate orderbook\n"
},
{
"from": "human",
"value": "require 'pry'\n\nmodule Cryptoexchange::Exchanges\n module Coinmate\n module Services\n class OrderBook < Cryptoexchange::Services::Market\n class << self\n def supports_i... | ruby | chosen |
[
{
"from": "system",
"value": "Downgrade bundler version for travis\n"
},
{
"from": "human",
"value": "$LOAD_PATH.push File.expand_path('../lib', __FILE__)\n\n# Maintain your gem's version:\nrequire 'pg_ltree/version'\n\n# Describe your gem and declare its dependencies:\nGem::Specification.new do... | ruby | chosen |
[
{
"from": "system",
"value": "Add :test_paths option to set the default path to the tests.\n"
},
{
"from": "human",
"value": "require 'thread'\nrequire 'guard'\nrequire 'guard/guard'\nrequire 'spinoff/client'\nrequire 'spinoff/server'\n\nmodule Guard\n class Spinoff < Guard\n class Runner\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue in \"-i\" with path\n"
},
{
"from": "human",
"value": "# Gyro Infos\n#\nmodule Gyro \n module LiquidGen\n module Infos\n def self.listTemplates\n Gyro.templates_dir.children.select(&:directory?).each do |entry|\n puts \" - #{entry.... | ruby | chosen |
[
{
"from": "system",
"value": "Call the new script for ssh push registration via tunnel\n"
},
{
"from": "human",
"value": "# Copyright (c) 2013 Novell, Inc.\n# Licensed under the terms of the MIT license.\n\nrequire 'tempfile'\n\n# Class for generating expect files to interactively run spacewalk-... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.