conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change call for creating the set to 'find_or_create_by_name'\n"
},
{
"from": "human",
"value": "require 'mtgextractor'\nrequire 'yaml'\nrequire \"#{Rails.root}/app/models/mtg_card\"\nrequire \"#{Rails.root}/app/models/mtg_set\"\n\nnamespace 'mtgextractor' do\n desc... | ruby | chosen |
[
{
"from": "system",
"value": "Add block modifier for reactive response."
},
{
"from": "human",
"value": "module NoaaClient\n module Responses\n module ReactiveResponse\n def method_missing(method_name, *arguments, &block)\n if tag = source.css(method_name.to_s)\n tag.tex... | ruby | chosen |
[
{
"from": "system",
"value": "Make SyntaxHighlighter _truly_ more resilient this time.\n"
},
{
"from": "human",
"value": "module PDoc\n module Generators\n module Html\n class SyntaxHighlighter\n CODE_BLOCK_REGEXP = /(?:\\n\\n|\\A)(?:\\s{4,}lang(?:uage)?:\\s*(\\w+)\\s*\\n)?((?:\\... | ruby | chosen |
[
{
"from": "system",
"value": "Initialize fields to empty cells.\n"
},
{
"from": "human",
"value": "\nclass Conway\n attr_reader :grid\n\n def initialize\n @grid = Grid.new 53, 7\n end\nend\n\nclass Grid\n attr_reader :width, :heigth , :fields\n\n def initialize(width, heigth)\n @width... | ruby | chosen |
[
{
"from": "system",
"value": "Fix the method name for recusion\n"
},
{
"from": "human",
"value": "module ActiveRecord\n class PredicateBuilder\n\n def initialize(engine)\n @engine = engine\n end\n\n def build_from_hash(attributes, default_table)\n predicates = attributes.map ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unicode support on deprecated ruby 1.8\n"
},
{
"from": "human",
"value": "# ~*~ encoding: utf-8 ~*~\n# stdlib\nrequire 'digest/md5'\nrequire 'digest/sha1'\nrequire 'ostruct'\n\n# external\nrequire 'github/markup'\nrequire 'sanitize'\n\n# internal\nrequire Fil... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade Adobe AIR to v19.0\n"
},
{
"from": "human",
"value": "cask :v1 => 'adobe-air' do\n version '18.0'\n sha256 :no_check # required as upstream package is updated in-place\n\n url \"http://airdownload.adobe.com/air/mac/download/#{version}/AdobeAIR.dmg\"\n na... | ruby | chosen |
[
{
"from": "system",
"value": "Fix Api::RecordShow jbuilder view for records without a country\n"
},
{
"from": "human",
"value": "json.extract!(\n @record,\n :id,\n :title,\n :cat_no,\n :year,\n :image_url,\n :notes,\n :created_at,\n :updated_at\n)\n\njson.artist do\n json.id @record.ar... | ruby | chosen |
[
{
"from": "human",
"value": "Add another case-insensitive unqiue indx, this time to user_name\n"
},
{
"from": "gpt",
"value": "class UniqueUserNameIndex < ActiveRecord::Migration\n def self.up\n execute <<-SQL\n CREATE UNIQUE INDEX lower_username ON users (LOWER(user_name));\n SQL\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Use class method instead of instance method\n"
},
{
"from": "human",
"value": "require \"thor\"\nrequire \"apple_system_status\"\n\nmodule AppleSystemStatus\n class CLI < Thor\n desc \"fetch\", \"Fetch apple system status\"\n option :country, desc: \"country ... | ruby | chosen |
[
{
"from": "system",
"value": "Use block_given? instead defining block.\n"
},
{
"from": "human",
"value": "module Arel\n module Sql\n class Engine\n\n def initialize(ar = nil)\n @ar = ar\n end\n\n def connection\n @ar ? @ar.connection : nil\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure we never try to read more then the max buffer size in JRuby::Pump.\n"
},
{
"from": "human",
"value": "module ChildProcess\n module JRuby\n class Pump\n BUFFER_SIZE = 2048\n\n def initialize(input, output)\n @input = input\n @ou... | ruby | chosen |
[
{
"from": "human",
"value": "Add an event handler for TYPING_START\n"
},
{
"from": "gpt",
"value": "require 'discordrb/events/generic'\n\nmodule Discordrb::Events\n class TypingEvent\n attr_reader :channel, :timestamp\n\n def initialize(data, bot)\n @user_id = data['user_id']\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add imagemagick and ttyrec as dependencies\n"
},
{
"from": "human",
"value": "require 'formula'\n\nclass Ttygif < Formula\n homepage 'https://github.com/icholy/ttygif'\n url 'https://github.com/icholy/ttygif/archive/1.0.8.zip'\n sha1 'f8d0a56af11d3ae8e2d5e6... | ruby | chosen |
[
{
"from": "system",
"value": "Add response parsing using Faraday JSON parser.\n"
},
{
"from": "human",
"value": "module LendingClub\n # @private\n module Connection\n\n private\n\n def connection\n options = {\n :headers => {\n 'Accept' => \"application/#{format}; ch... | ruby | chosen |
[
{
"from": "human",
"value": "Add Pritunl OpenVPN Client cask\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'pritunl' do\n version '0.10.14'\n sha256 'afa302d8e95d1635584673a3c206d370c93846f519735d9898e75af43d9bd3a8'\n\n # github.com is the official download host per the vendor homepage\n url ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix sha256 on Arduino 1.6.7\n"
},
{
"from": "human",
"value": "cask 'arduino' do\n version '1.6.7'\n sha256 '20d6ecdd068930d3e74ef5de6ec3115e57b9ad7183fbee51b0d42e52cd5df5aa'\n\n url \"https://downloads.arduino.cc/arduino-#{version}-macosx.zip\"\n name 'Arduino'... | ruby | chosen |
[
{
"from": "system",
"value": "Revert my puny changes for now.\n\nWill be fixed in travis-web.\n"
},
{
"from": "human",
"value": "require 'travis/api/app'\n\nclass Travis::Api::App\n class Endpoint\n class Builds < Endpoint\n get '/' do\n name = params[:branches] ? :find_branches ... | ruby | chosen |
[
{
"from": "system",
"value": "Delete kubectl plugins that don't support apple silicon\n"
},
{
"from": "human",
"value": "krew 'ctx'\nkrew 'iexec'\nkrew 'images'\nkrew 'neat'\nkrew 'ns'\nkrew 'open-svc'\nkrew 'rolesum'\nkrew 'status'\nkrew 'tree'\nkrew 'view-secret'\n"
},
{
"from": "gpt",... | ruby | chosen |
[
{
"from": "system",
"value": "Update gem spec homepage to github\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"rally_api/version\"\n\nGem::Specification.new do |s|\n s.name = \"rally_api\"\n s.version = RallyA... | ruby | chosen |
[
{
"from": "system",
"value": "Change timestamp management to mongo-mapper built-in\n"
},
{
"from": "human",
"value": "class MmUser \n include MongoMapper::Document\n\n key :email, String, :length => (5..40), :unique => true \n key :hashed_password, String\n key :salt, String\n key :created_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix no method error on ruby-1.9.3\n"
},
{
"from": "human",
"value": "Dir.glob(File.expand_path('core_ext/*.rb', __dir__)).each do |path|\n require path\nend\n"
},
{
"from": "gpt",
"value": "Dir.glob(File.expand_path('core_ext/*.rb', File.dirname(__FILE_... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing \".should\" and fix subsequent failure\n"
},
{
"from": "human",
"value": "# -*- encoding: us-ascii -*-\n\nrequire File.expand_path('../../../../spec_helper', __FILE__)\nrequire File.expand_path('../fixtures/classes', __FILE__)\n\ndescribe \"Enumerator::L... | ruby | chosen |
[
{
"from": "system",
"value": "Add specs for yielding in procs which take block arguments.\n"
},
{
"from": "human",
"value": "describe :proc_call_block_args, shared: true do\n it \"can receive block arguments\" do\n Proc.new {|&b| b.send(@method)}.send(@method) {1 + 1}.should == 2\n lambda... | ruby | chosen |
[
{
"from": "human",
"value": "Add tests for search controller\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe SearchesController, type: :controller do\n include_context 'has all objects'\n\n # Initiate objects\n before :each do\n user\n entry\n end\n\n describ... | ruby | chosen |
[
{
"from": "system",
"value": "Load dependencies should be private\n"
},
{
"from": "human",
"value": "require 'active_support/core_ext/string/inflections'\n\npath = File.expand_path(File.dirname(__FILE__))\nDir[\"#{path}/descendants_loader/**/*.rb\"].each do |file|\n require file\nend\n\nmodule ... | ruby | chosen |
[
{
"from": "system",
"value": "Add .pre for next release\n"
},
{
"from": "human",
"value": "module EY\n VERSION = '2.1.1'\n ENGINEYARD_SERVERSIDE_VERSION = ENV['ENGINEYARD_SERVERSIDE_VERSION'] || '2.1.1'\nend\n"
},
{
"from": "gpt",
"value": "module EY\n VERSION = '2.1.2.pre'\n ENG... | ruby | chosen |
[
{
"from": "system",
"value": "Use methods instead of variables\n"
},
{
"from": "human",
"value": "module Filters\n class FilterSet\n include Enumerable\n\n attr_reader :name\n def initialize(name, selected_value, selection_policy)\n @name = name\n @selection_policy = selectio... | ruby | chosen |
[
{
"from": "system",
"value": "Use the correct header size\n"
},
{
"from": "human",
"value": "require 'socket'\n\nmodule LIFX\n class Transport\n class TCP < Transport\n def initialize(host, port)\n super\n @socket = TCPSocket.new(host, port) # Performs the connection\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Restructure tests as was done for Faraday\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'spec_helper'\nrequire 'webmock/rspec'\n\nRSpec.describe Mnemosyne::Probes::Restify::Base do\n it 'creates span' do\n trace = with_trace do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change ROW_FORMAT for utf8mb4 compatibility\n"
},
{
"from": "human",
"value": "class ConvertTrainingModulesToUtf8Mb4 < ActiveRecord::Migration[6.0]\n def change\n execute \"ALTER TABLE training_slides CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci\"... | ruby | chosen |
[
{
"from": "system",
"value": "Change Rubocup setting to only run lint and not other checks (including style)\n\nSigned-off-by: Victor Fong <95c00c4b759dfd5c0c9bab0c67fa20ed75fca00d@emc.com>\n"
},
{
"from": "human",
"value": "require 'rubocop/rake_task'\n\nnamespace :rubocop do\n desc 'Run RuboC... | ruby | chosen |
[
{
"from": "system",
"value": "Add merge test for blacklist\n"
},
{
"from": "human",
"value": "require 'tmpdir'\nrequire_relative '../../lib/yomou/blacklist'\n\nclass BlacklistTest < Test::Unit::TestCase\n setup do\n end\n\n sub_test_case \"directory\" do\n def test_directory\n Dir.mkt... | ruby | chosen |
[
{
"from": "system",
"value": "Change github /tarball/ URLs to /archive/ for formulae L-Z\n\nThis takes care of a `brew audit` complaint.\n\nCloses #18828.\n\nSigned-off-by: Adam Vandenberg <34c2b6407fd5a10249a15d699d40f9ed1782e98c@gmail.com>\n"
},
{
"from": "human",
"value": "require 'formula'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add volume directory for Plex Server\n\nThis commit adds the volume directory for the plex server recipe.\n"
},
{
"from": "human",
"value": "dmg_package \"Plex Media Server\" do\n dmg_name \"PlexMediaServer-0.9.7.22.511-4b5280f-OSX.dmg\"\n source \"http://plex.r.w... | ruby | chosen |
[
{
"from": "system",
"value": "Update upstream to 0.24.2 with two-factor support\n\n`gh` added support for two-factor auth in 0.24.2, see jingweno/gh#85 and https://github.com/jingweno/gh/commit/42e4d021cf5c5854920d386480bbbd9466a2c823\r\n\r\nWhile you can get this update by running `brew upgrade [...]` it's... | ruby | chosen |
[
{
"from": "human",
"value": "Add missing file for uint24 handling\n"
},
{
"from": "gpt",
"value": "def u8_and_u16_to_u24(eightb, sixteenb)\n (eightb << 16) + sixteenb\nend\n\ndef u24_to_u8_and_u16(twentyfourb)\n top_eight = twentyfourb >> 16\n bottom_sixteen = twentyfourb - (top_eight << 16)\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix fact have_psql for OpenBSD, the user name of the postgres system\nuser is different\n"
},
{
"from": "human",
"value": "Facter.add(:have_psql) do\n\n confine :kernel => %w{Linux OpenBSD SunOS}\n setcode do\n if Facter::Util::Resolution.exec(Facter.value('p... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug which restricted viewing ace editor\n"
},
{
"from": "human",
"value": "require 'cuba'\nrequire 'cuba/render'\nrequire 'json'\n\nCuba.plugin Cuba::Render\n\nCuba.define do\n\n on get do\n on root do\n input = hash = ''\n on param('q') do | hash ... | ruby | chosen |
[
{
"from": "human",
"value": "Add rake task to create sample countries\n"
},
{
"from": "gpt",
"value": "namespace :data do\n desc \"Create sample Countries in the database\"\n task create_sample_data: :environment do\n [\"United States of America\", \"Canada\", \"Mexico\"].\n each do |c... | ruby | chosen |
[
{
"from": "system",
"value": "Format Paraview Lion Python27 Nightly\n"
},
{
"from": "human",
"value": "class ParaviewLionPython27Nightly < Cask\n url 'http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=nightly&type=binary&os=osx&downloadFile=ParaView-Darwin-64bit-Li... | ruby | chosen |
[
{
"from": "human",
"value": "Add Amazon object storage automation model\n\nAutomation service model required for Amazon object storage manager.\n\n\n(transferred from ManageIQ/manageiq@2937fff24789b3414b60d6879f43108ad723985e)\n"
},
{
"from": "gpt",
"value": "module MiqAeMethodService\n class M... | ruby | chosen |
[
{
"from": "system",
"value": "Fix specs to test prefixes for non-base units\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Unitwise::Unit::Expression do\n it \"should handle basic units\" do\n e = Unitwise::Unit::Expression.new \"[ft_i]\"\n e.atom.must_equal '[... | ruby | chosen |
[
{
"from": "system",
"value": "Update test cases for new responses\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe XClarityClient::Discover do\n context '#responds?' do\n context 'without the correct appliance IPAddress' do\n it 'should return false' do\n resp... | ruby | chosen |
[
{
"from": "system",
"value": "Move key to /vagrant and install via remote_file\n"
},
{
"from": "human",
"value": "# Setup the server to allow pull access from git repo\n# \n\nREPO='empty-joomla-template'\nKEYNAME=\"#{REPO}_rsa\"\nGITUSER='vagrant'\nSSHDIR=\"/home/#{GITUSER}/.ssh\"\nKEYPATH=\"#{S... | ruby | chosen |
[
{
"from": "system",
"value": "Add remember me for omniauth\n"
},
{
"from": "human",
"value": "class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n before_action :failure, if: :malformed_auth?\n\n def github\n @developer = Authenticator.call(auth_hash)\n if @developer... | ruby | chosen |
[
{
"from": "system",
"value": "Remove withdrawn from filters for Assessor\n"
},
{
"from": "human",
"value": "class FormAnswerStatus::AssessorFilter\n extend FormAnswerStatus::FilteringHelper\n\n OPTIONS = {\n application_in_progress: {\n label: \"Application in progress\",\n states... | ruby | chosen |
[
{
"from": "system",
"value": "Add collection name to printout.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env ruby\nrequire 'mongo'\n\nDB = ARGV[0]\n\nif (ARGV.size != 1)\n puts \"ruby rmv-nindexes.rb <database>\"\n puts \"\"\n puts \"Removes indexes that are not {'_id''} or {'metaData.ten... | ruby | chosen |
[
{
"from": "system",
"value": "Add rake as a development dependency\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n s.name = 'postcode_software'\n s.version = '0.0.1'\n s.summary = 'Postcode Software'\n s.description = \"Ruby wrapper for PostcodeSoftware's we... | ruby | chosen |
[
{
"from": "human",
"value": "Add a spec for ar_dba\n\nhttps://trello.com/c/bRx6yN0C\n"
},
{
"from": "gpt",
"value": "describe \"ar_dba extension\" do\n let(:connection) { ApplicationRecord.connection }\n\n describe \"#primary_key?\" do\n it \"returns false for a table without a primary key\... | ruby | chosen |
[
{
"from": "system",
"value": "Tidy up expression spec to cover multiple cases\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Calyx::Production::Expression do\n specify 'construct string formatting production' do\n nonterminal = double(:nonterminal)\n allow(nontermina... | ruby | chosen |
[
{
"from": "system",
"value": "Fix WillPaginate ActiveRecord integration;\nDon't fail if the AR logger is nil\n"
},
{
"from": "human",
"value": "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib')) # make requiring from test/lib easy\n\nrequire 'fileutils'\nrequire 'rubygems'\nrequire 'th... | ruby | chosen |
[
{
"from": "system",
"value": "Drop not needed bg job after test file has finished.\n"
},
{
"from": "human",
"value": "ENV['RAILS_ENV'] = 'test'\n# rubocop:disable ClassAndModuleChildren\nrequire File.expand_path('../../config/environment', __FILE__)\nrequire 'rails/test_help'\nrequire 'cache'\nr... | ruby | chosen |
[
{
"from": "system",
"value": "Fix bug exporting families as csv file.\n"
},
{
"from": "human",
"value": "require 'csv'\nmodule ActiveRecord\n\n module Serialization\n def to_csv(options = {}, &block)\n CsvSerializer.new(self, options).to_s\n end\n end\n \n class CsvSerializer < Ac... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"Removed devise oauth in migration\"\"\n\nThis reverts commit 66eaabd008c382a0f4e5bf34a48f89fddd1416f6.\n"
},
{
"from": "human",
"value": "class DeviseCreateUsers < ActiveRecord::Migration\n def self.up\n create_table(:users) do |t|\n t.str... | ruby | chosen |
[
{
"from": "system",
"value": "Change how to get current example that return nil in ver 2.14.x\n"
},
{
"from": "human",
"value": "require 'infrataster'\nrequire 'rspec'\n\ninclude Infrataster::Helpers::ResourceHelper\n\nRSpec.configure do |config|\n config.include Infrataster::Helpers::RSpecHelp... | ruby | chosen |
[
{
"from": "system",
"value": "Allow longer uris and commands in Project\n"
},
{
"from": "human",
"value": "require 'dm-validations'\nrequire 'dm-types'\n\nmodule Integrity\n class Project\n include DataMapper::Resource\n\n property :id, Integer, :serial => true\n property :name,... | ruby | chosen |
[
{
"from": "system",
"value": "Add a default namespace that isn’t nil"
},
{
"from": "human",
"value": "require 'yaml'\n\nmodule Split\n module Cli\n class Session\n include Split::Helper\n\n attr_accessor :session_id, :options\n\n CONFIG_ERROR_MESSAGE = 'Set SPLIT_YAML_CONFIG t... | ruby | chosen |
[
{
"from": "system",
"value": "Rename rake namespace to ember\n"
},
{
"from": "human",
"value": "namespace \"ember-cli\" do\n desc \"Runs `ember build` for each App\"\n task compile: :install_dependencies do\n EmberCLI.compile!\n end\n\n desc \"Runs `ember test` for each App\"\n task test... | ruby | chosen |
[
{
"from": "system",
"value": "Add better error message when a child class doesn't implement endpoint_path.\n"
},
{
"from": "human",
"value": "class Natero::Base\n extend Natero::RequestHelper\n include Serializable\n\n BASE_URI = 'https://api.natero.com'\n VERSION_URI = '/api/v2'\n\n REQUIR... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor contact form to call deliver.\n\nthe contact form is a MailForm object and doesn't support deliver_now.\n"
},
{
"from": "human",
"value": "module Sufia\n module ContactFormControllerBehavior\n def new\n @contact_form = ContactForm.new\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove obsolete reference to AssetBundler\n"
},
{
"from": "human",
"value": "require 'social_stream'\n\nSocialStream::Rails::Common.inflections\n\nAssetBundler.paths += Array(File.join(File.dirname(__FILE__), 'app', 'assets'))\n"
},
{
"from": "gpt",
"val... | ruby | chosen |
[
{
"from": "system",
"value": "Fix when options is nil\n"
},
{
"from": "human",
"value": "Dir[File.join(File.dirname(__FILE__), '/lib/*.rb')].each { |f| require f }\nDir[File.join(File.dirname(__FILE__), '/packages/*.rb')].each { |f| require f }\n\n# Configuration\nnodes_path = File.join(File.dir... | ruby | chosen |
[
{
"from": "system",
"value": "Correct way to define default.\n\n--HG--\nbranch : 3.2.0-release\n"
},
{
"from": "human",
"value": "# If set, email_from is the address the site sends emails as. If left alone, emails\n# are sent from CONFIG[\"admin_contact\"].\nCONFIG['email_from'] ||= CONFIG['adm... | ruby | chosen |
[
{
"from": "human",
"value": "Patch for Selenium intermittent errors\n"
},
{
"from": "gpt",
"value": "# REMOVE THIS FILE WHEN\n# http://code.google.com/p/selenium/issues/detail?id=2287\n# http://code.google.com/p/selenium/issues/detail?id=2099\n# GET FIXED\n\nclass Capybara::Selenium::Driver\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Remove MathServe from prover output generator.\n"
},
{
"from": "human",
"value": "require_relative 'direct_hets_generator.rb'\n\nmodule FixturesGeneration\n class ProverOutputGenerator < DirectHetsGenerator\n NODES = %w(CounterSatisfiable Theorem)\n PROVERS =... | ruby | chosen |
[
{
"from": "system",
"value": "Update Rome formula to v0.13.0.33\n"
},
{
"from": "human",
"value": "class Rome < Formula\n desc \"A shared cache tool for Carthage on S3\"\n homepage \"https://github.com/blender/Rome\"\n url \"https://github.com/blender/Rome/releases/download/v0.12.0.31/rome.zi... | ruby | chosen |
[
{
"from": "system",
"value": "Update add_after_order_complete for non-PaymentSource sources\n\nFor any stores using legacy payment sources that do not inherit from\nPaymentSource.\n"
},
{
"from": "human",
"value": "# This class is responsible for saving payment sources in the user's \"wallet\"\n... | ruby | chosen |
[
{
"from": "system",
"value": "Use scope and includes for projects\n"
},
{
"from": "human",
"value": "class AboutController < ApplicationController\n before_filter :get_event, only: [:index, :join_us]\n def index\n @title = \"Home\"\n end\n\n def projects\n @projects = Project.all.sort_... | ruby | chosen |
[
{
"from": "system",
"value": "Update Blog Controller for update Actions\n\nUpdate the Blog controller to include all corresponding actions to\nupdate a Blog.\n"
},
{
"from": "human",
"value": "class BlogsController < ApplicationController\n before_filter :authenticate_user!\n\n def create\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Bump the version, tweak the summary and set the correct home page.\n\nSigned-off-by: Collective Idea <59bd0a3ff43b32849b319e645d4798d8a5d1e889@collectiveidea.com>"
},
{
"from": "human",
"value": "spec = Gem::Specification.new do |s|\n s.name = 'google_analyt... | ruby | chosen |
[
{
"from": "system",
"value": "Create if statement that redirects logged in users home if they try to access a profile page that isn't theirs\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n def new\n @user = User.new\n end\n\n def create\n user_params\n... | ruby | chosen |
[
{
"from": "system",
"value": "Make create controller for Users\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n\n def create\n end\n\n def new\n end\n\n def edit\n end\n\n def show\n end\n\n def update\n end\n\n def destroy\n end\n\n\nend"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Add LIKE operator to query\n"
},
{
"from": "human",
"value": "module Riews\n class FilterCriteria < ApplicationRecord\n self.table_name = 'riews_filter_criterias'\n\n def self.operators\n {\n 1 => 'NULL',\n 2 => 'NOT NULL',\n 3... | ruby | chosen |
[
{
"from": "system",
"value": "Raise exception if roles do not exist upon first user creation\n"
},
{
"from": "human",
"value": "module Fae\n class SetupController < ActionController::Base\n\n layout 'devise'\n\n def first_user\n @option = Fae::Option.instance\n return show_404 i... | ruby | chosen |
[
{
"from": "system",
"value": "Replace default engine with ThreadSafe\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n# Main Colossus module\nclass Colossus\n # Handles all the configuration\n class Configuration\n attr_accessor :ttl, :seconds_before_ttl_check, :engine,\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Task should assign target, status and assigned on save, not only on create\"\n\nThis reverts commit 6fab90c877ffa0f6f382a34603cb84705ff4a07c.\n"
},
{
"from": "human",
"value": "class Comment\n\n def before_save\n self.target ||= project\n\n set_statu... | ruby | chosen |
[
{
"from": "system",
"value": "Add a way to clear out all the values.\n"
},
{
"from": "human",
"value": "require_relative 'jekyll-gh-metadata/version'\n\nmodule Jekyll\n module GitHubMetadata\n class Client\n end\n\n class Value\n attr_reader :value\n\n def initialize(value)\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add x, y and x method to Array class.\n"
},
{
"from": "human",
"value": "#\n# Vec クラスのための Array クラス拡張メソッド\n#\nclass Array\n def to_v\n if size == 0\n Vec::new 0.0, 0.0, 0.0\n else\n x = 0.0, y = 0.0, z = 0.0\n if size > 0 then x = self[0].to_f ... | ruby | chosen |
[
{
"from": "human",
"value": "Index on slugs without type - doesn't seem to be used in same clause when looking up scoped slugs.\n"
},
{
"from": "gpt",
"value": "class AddNameScopeSequenceIndexOnSlugs < ActiveRecord::Migration\n def self.up\n add_index :slugs, [:name, :scope, :sequence], :nam... | ruby | chosen |
[
{
"from": "system",
"value": "Monitor server only if build succeeded"
},
{
"from": "human",
"value": "# Creates a server for a *prepaid* account. This was written before the create_payg_server_task\nclass CreateServerTask < BaseTask\n attr_reader :server\n\n def initialize(wizard, user)\n s... | ruby | chosen |
[
{
"from": "system",
"value": "Remove broken test to fix build.\n\nThis broke the build because this whole file wasn't being included\nin builds until I renamed the file with a `_test.rb` suffix.\n\nThe `detailed_guides_filter_path` was actually removed two months\nago: 5b2498f841af1dd1fc88015c2cf3da23b0cb7a... | ruby | chosen |
[
{
"from": "system",
"value": "Switch to do-end style block to make rubocop happy.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire 'rubycritic/cli/options/argv'\nrequire 'rubycritic/cli/options/file'\n\nmodule RubyCritic\n module Cli\n class Options\n attr_rea... | ruby | chosen |
[
{
"from": "system",
"value": "Fix rsync \"file has vanished\" bug\n\nBy not caching the hostname and ip address, a specjour listener can be\nleft running and will function correctly as it moves from one network\n(ip) to another. This was a very annoying problem, and thus, a\nsignificant fix.\n"
},
{
... | ruby | chosen |
[
{
"from": "human",
"value": "Add integration test for /help/cookies\n"
},
{
"from": "gpt",
"value": "require \"integration_test_helper\"\n\nclass HelpCookiesTest < ActionDispatch::IntegrationTest\n context \"rendering the cookies setting page\" do\n setup do\n payload = {\n base_... | ruby | chosen |
[
{
"from": "system",
"value": "Handle situations without user avatars\n\nIn case the user has no avatar, simple print the linked login\n"
},
{
"from": "human",
"value": "module UserWikiMacro\n USER_SIZES = {\n \"default\" => 24,\n \"small\" => 14,\n \"large\" => 50\n }.freeze\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unused data from rpc responses.\n"
},
{
"from": "human",
"value": "class AmfSocket::RpcRequest\n attr_reader :amf_connection\n attr_reader :state # Valid states: :initialized, replied.\n\n def initialize(object, amf_connection)\n raise RpcSocket::Invali... | ruby | chosen |
[
{
"from": "system",
"value": "Add a default backtrace_filter in MSpec\n\n* Useful when run without a .mspec config file.\n"
},
{
"from": "human",
"value": "# Initialize $MSPEC_DEBUG\n$MSPEC_DEBUG ||= false\n\nclass ExceptionState\n attr_reader :description, :describe, :it, :exception\n\n def i... | ruby | chosen |
[
{
"from": "system",
"value": "Use ENV['HOME'] instead of expanding ~\n"
},
{
"from": "human",
"value": "require 'feed2email/config'\nrequire 'feed2email/feed_list'\nrequire 'feed2email/lazy_smtp_connection'\nrequire 'feed2email/logger'\n\nmodule Feed2Email\n CONFIG_DIR = File.expand_path('~/.fe... | ruby | chosen |
[
{
"from": "system",
"value": "Correct refresh access token task. Old one was copypasta\n"
},
{
"from": "human",
"value": "desc \"refresh access tokens for google accounts\"\ntask :refresh_tokens => :environment do\n #Google \n Authorization.where(provider:\"google_oauth2\").each do |g... | ruby | chosen |
[
{
"from": "system",
"value": "Remove excess module for instance methods\n"
},
{
"from": "human",
"value": "require \"interactor/context\"\nrequire \"interactor/organizer\"\n\nmodule Interactor\n def self.included(base)\n base.class_eval do\n extend ClassMethods\n include InstanceMe... | ruby | chosen |
[
{
"from": "system",
"value": "Add map button to dessert locations\n"
},
{
"from": "human",
"value": "class DessertLocation < ApplicationRecord\n include MyplaceonlineActiveRecordIdentityConcern\n include AllowExistingConcern\n\n child_property(name: :location, required: true)\n \n def displ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove password from registration response\n\nThere does not seem to be a need for sending the password back in plain text\n[#135156275]\n"
},
{
"from": "human",
"value": "class API::V1::StudentsController < API::APIController\n\n # POST api/v1/students\n def crea... | ruby | chosen |
[
{
"from": "system",
"value": "Use for loop instead of iterator for Squeezable."
},
{
"from": "human",
"value": "module Squeezable\n\n def squeeze\n result = []\n previous = nil\n iterator = self.each\n loop do\n a = iterator.next\n result << a unless previous == a\n p... | ruby | chosen |
[
{
"from": "system",
"value": "Use non dev version for Refinery extension versions.\n"
},
{
"from": "human",
"value": "# Encoding: UTF-8\n\nGem::Specification.new do |s|\n s.name = %q{refinerycms-news}\n s.version = %q{2.1.0.dev}\n s.description = %q{A really strai... | ruby | chosen |
[
{
"from": "system",
"value": "Fix database setup in dev-env\n\nThe postgres image does not come with pre-configured osem\ndatabases per environment. Calling db:create doesn't hurt if the\ndatabases already exist, so let's do it every time we bootstrap.\n"
},
{
"from": "human",
"value": "# frozen... | ruby | chosen |
[
{
"from": "system",
"value": "Create condition to only save to database when there are new entries\n"
},
{
"from": "human",
"value": "require 'digest/md5'\n\nclass HeroesController < ApplicationController\n\n def index\n\n render \"heroes\"\n end\n\n def all\n # Marvel API only returns ... | ruby | chosen |
[
{
"from": "system",
"value": "Update cyx email, and the dependencies.\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\nGem::Specification.new do |s|\n s.name = \"redic\"\n s.version = \"0.0.2\"\n s.summary = \"Lightweight Redis Client\"\n s.description... | ruby | chosen |
[
{
"from": "system",
"value": "Fix `url` stanza comment for Protégé.\n"
},
{
"from": "human",
"value": "cask 'protege' do\n version '5.0.0'\n sha256 'cc5dc98cb41a59fb86a710a61249437f1f9d1b4b79eb989b1ff5055df0722540'\n\n # https://github.com/protegeproject/protege-distribution was verified as... | ruby | chosen |
[
{
"from": "system",
"value": "Add more test coverage for app decorator's picture_gallary method\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe AppDecorator do\n before { ApplicationController.new.set_current_view_context }\n\n describe '#participating_brigade_links' do\n\... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.