conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Update User Model for Devise Async\n\nAdd the async property to the Devise attribute of the User model to\nenable asynchronous mailers.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n devise :database_authenticatable, :registerable,\n :... | ruby | chosen |
[
{
"from": "system",
"value": "Remove commented out Gravatastic code in User model until needed.\n"
},
{
"from": "human",
"value": "class User < ActiveRecord::Base\n has_secure_password\n has_many :projects\n validates :email, :password_digest, presence: true\n validates :email, length: { min... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Enable loading FFI gem on rubinius\"\n\nThis reverts commit 195e12f3ee52a8f5620fd8286c2b94737b6b4fc2.\n\nRemoving constants is contrary to expectation.\nIt was introduced to replace Rubinius internal FFI in favor of the gem.\nWe no longer test on Rubinius and Rubinius ... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for TLS (port 443)\n\n- Add port resource to make sure apache is listening on port 443\n"
},
{
"from": "human",
"value": "describe service('apache2-default') do\n it { should be_enabled }\n it { should be_running }\nend\n\ndescribe port(80) do\n it { sho... | ruby | chosen |
[
{
"from": "system",
"value": "Add extra data to notify() call in specs\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nrequire 'onesignal'\n\nRSpec.describe 'One Signal API client' do\n let(:device_type) { 0 }\n let(:identifier) { 'ce777617da7f548fe7a9ab6febb56cf39fba6d382000c0395666... | ruby | chosen |
[
{
"from": "human",
"value": "Add of skeleton for ast visitor on building tree view\n"
},
{
"from": "gpt",
"value": "require 'java'\n\njava_import org.jruby.ast.visitor.AbstractNodeVisitor\n\nclass ASTTreeViewBuilder < AbstractNodeVisitor\n attr_accessor :tree_view\n \n def initialize(tree_vie... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor ServiceSerializer to store schema in HashWithIndifferentAccess\n"
},
{
"from": "human",
"value": "module Swarker\n module Serializers\n class ServiceSerializer\n attr_reader :schema\n\n def initialize(service)\n @service = service\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Update tests to verify methods call"
},
{
"from": "human",
"value": "require File.expand_path('../test_helper', __FILE__)\n\nclass CacheDynamicAssetTest < UnitTest\n class App < UnitTest::App\n register Sinatra::AssetPack\n\n set :reload_templates, true\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add required Ruby version to gemspec\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'prius/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix wsse-header: remove unwanted spaces\n"
},
{
"from": "human",
"value": "module Emarsys\n class Client\n\n def username\n raise ArgumentError, \"Emarsys.api_username is not set\" if Emarsys.api_username.nil?\n Emarsys.api_username\n end\n\n def... | ruby | chosen |
[
{
"from": "system",
"value": "Switch debug to be a different color and add a success color\n"
},
{
"from": "human",
"value": "require 'highline'\n\nmodule Opsicle\n module Output\n def self.terminal\n HighLine.color_scheme = color_scheme\n @terminal ||= HighLine.new\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for Mongoid DB compatibility\n\nNeed to check for whether `.find_each`is supported or not."
},
{
"from": "human",
"value": "require \"rolify/configure\"\n\nmodule Rolify\n module Dynamic\n def load_dynamic_methods\n # newer Rails version should probably... | ruby | chosen |
[
{
"from": "system",
"value": "Drop views in reverse order\n"
},
{
"from": "human",
"value": "namespace :db do\n namespace :etc do\n task :load => :environment do\n puts \"Loading views, functions, and triggers...\"\n execute File.read(Rails.root.join 'db', 'etc.sql')\n end\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Test controller helper won't render a console twice\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nmodule WebConsole\n class ControllerHelperTest < ActionController::TestCase\n class TestController < ActionController::Base\n def render_console_... | ruby | chosen |
[
{
"from": "system",
"value": "Enforce limits to robot name pattern\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire_relative 'robot'\n\nclass RobotTest < MiniTest::Unit::TestCase\n def test_has_name\n assert_match /[a-zA-Z]{2}\\d{3}/, Robot.new.name\n end\n\n def test... | ruby | chosen |
[
{
"from": "system",
"value": "Add Minitest to gemspec for continuous integration builds"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = \"hurley\"\nlib_file = File.expand_path(\"../lib/#{lib}.rb\", __FILE__)\nFile.read(lib_file) =~ /\\bVERSION\\s*=\\s*[\"'](.+?)[\"']/\nversion = $1\n\nre... | ruby | chosen |
[
{
"from": "human",
"value": "Remove WW Priorities from Rummager\n\nRemove Worldwide Priorities using the Rummager api\n"
},
{
"from": "gpt",
"value": "BASE_PATH_ROOT = \"/government/priority\"\n\nSLUGS = [\n \"supporting-uk-business-to-develop-opportunities-in-the-eastern-caribbean\",\n \"uk-a... | ruby | chosen |
[
{
"from": "system",
"value": "[FIX] Add better test coverage for the attributes in the elasticsearch.yml file\n\nRelated: #39\n"
},
{
"from": "human",
"value": "describe_recipe 'elasticsearch::default' do\n\n include MiniTest::Chef::Assertions\n include MiniTest::Chef::Context\n include MiniT... | ruby | chosen |
[
{
"from": "human",
"value": "Add a new recipe to create mysql jar link\n"
},
{
"from": "gpt",
"value": "link \"#{node[:hannibal][:install_dir]}/hannibal/lib/mysql-connector-java.jar\" do\n to \"/usr/share/java/mysql-connector-java.jar\"\nend\n"
}
] | ruby | chosen |
[
{
"from": "system",
"value": "Define a spree_login_path method in BaseController that is overridable\n"
},
{
"from": "human",
"value": "require 'cancan'\n\nclass Spree::BaseController < ApplicationController\n include Spree::Core::ControllerHelpers\n include Spree::Core::RespondWith\n\n # gra... | ruby | chosen |
[
{
"from": "system",
"value": "Update podspec for AFNetworking 1.3.0"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"MACachedImageView\"\n s.version = \"1.1.0\"\n s.summary = \"Load images from a URL into a local cache before displaying them and show a fanc... | ruby | chosen |
[
{
"from": "system",
"value": "Add all dependacies to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'webex_client/version'\n\nGem::Specification.new do |gem|\n gem... | ruby | chosen |
[
{
"from": "system",
"value": "Stop outputting stuff to stdout"
},
{
"from": "human",
"value": "ENV[\"BUNDLE_GEMFILE\"] = ::File.join(::File.dirname(__FILE__), \"../Gemfile\")\nrequire 'bundler'\n\nbegin\n Bundler.setup(:default)\n Bundler.require(:default)\n puts \"Initialized...\"\nrescue Ex... | ruby | chosen |
[
{
"from": "system",
"value": "Change api lookup delay to 4 hours\n"
},
{
"from": "human",
"value": "require \"datamapper\"\nrequire \"date\"\nrequire \"rest_client\"\n\nKLOUT_URL = \"http://api.klout.com/1/klout.json\"\n\n#DataMapper::Logger.new(STDOUT, :debug)\nDataMapper.setup(:default, ENV[\"... | ruby | chosen |
[
{
"from": "system",
"value": "Use the same confidence interval for ordering ratings\n"
},
{
"from": "human",
"value": "class Glicko2Rating < ActiveRecord::Base\n belongs_to :user\n belongs_to :tournament\n\n validates_presence_of :user_id, :tournament_id\n\n def self.with_defaults\n where... | ruby | chosen |
[
{
"from": "system",
"value": "Fix insert before destroy on blank comment saving\n"
},
{
"from": "human",
"value": "module MxCommentable\n extend ActiveSupport::Concern\n\n included do\n after_save :save_comment\n has_one :mx_comment, as: :mx_commentable, dependent: :destroy\n end\n\n d... | ruby | chosen |
[
{
"from": "system",
"value": "Add pry and pry-doc to development dependency\n"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'konjak/version'\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure a valid authentication method has been specified.\n"
},
{
"from": "human",
"value": "#!/usr/bin/ruby -w\n\nrequire 'rubygems'; require 'cgi'; require 'yaml'\nrequire 'authenticate'; require 'engine'; require 'twitter'\n\n\n# configuration is done entirely ... | ruby | chosen |
[
{
"from": "system",
"value": "Change name pod to moipSDK\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n\n s.name = \"MoipEncryptSDK\"\n s.version = \"1.0.3\"\n s.summary = \"Cliente iOS para integração com as APIs v2 Moip, possibilita a criptografia de dados sensí... | ruby | chosen |
[
{
"from": "system",
"value": "Add myself as an author\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"five_mobile_push/version\"\n\nGem::Specification.new do |s|\n s.name = \"five_mobile_push\"\n s.version = Fiv... | ruby | chosen |
[
{
"from": "system",
"value": "Use RealSpinner instead of TextField to update flight controls\n\nThe spinner has a granularity of 5 degrees.\n"
},
{
"from": "human",
"value": "class FlightControlsGroup < FXGroupBox\n def initialize(parent, window, control_name)\n @window = window\n @contro... | ruby | chosen |
[
{
"from": "human",
"value": "Monitor overall CPU usage, and disk0 throughput (assumed capacity of 750MB/s).\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n# require \"bignum\"\nrequire \"rubygems\"\nrequire \"bundler/setup\"\nBundler.require(:default, :development)\n\nrequire \"launchpad\... | ruby | chosen |
[
{
"from": "system",
"value": "Add failing spec for find method\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe DeAldiFernbus,\".find\" do \n \nend\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe DeAldiFernbus,\".find\" do \n\n it 'return an a... | ruby | chosen |
[
{
"from": "human",
"value": "Add a more complex spec that ties the various mixins together\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe IPTables::Rule do\n context \"when creating complex rules\" do\n describe \"like allow traffic in on eth1 from 10.0.0.0/24 on port 443... | ruby | chosen |
[
{
"from": "human",
"value": "Add the Spec for the MiniTransformer module\n\nUse a simple Spec to test if version works to make sure system is ok.\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\nrequire 'mini_transformer'\nrequire 'nokogiri'\n\ndescribe MiniTransformer do\n FIXTURES_DIR ... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for wordlist model\n"
},
{
"from": "gpt",
"value": "require 'rails_helper'\n\nRSpec.describe WordList, type: :model do\n let(:name) { \"testing\" }\n\n context \"when I create a new wordlist\" do\n subject(:wordlist) { WordList.create!(name: name) }\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing mailer preview for comment (created, signalled, validated)\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\n#\n# == MailingMessage Mailer preview\n# Preview all emails at http://localhost:3000/rails/mailers/comment_preview\n#\nclass Co... | ruby | chosen |
[
{
"from": "system",
"value": "Add nocov to Rails version-specific code to prevent false failures\n"
},
{
"from": "human",
"value": "When(/I have an authorized Controller defined as/) do |controller_code|\n require 'action_controller'\n require 'eaco/controller'\n\n @controller_class = Class.n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix flaky test for authors by checking each author\n\nRather than testing the author order, test that each author's name is on\nthe page.\n"
},
{
"from": "human",
"value": "require 'spec_helper'\nfeature 'Browsing Zines' do\n let(:authors) { create_list :author_wit... | ruby | chosen |
[
{
"from": "human",
"value": "Test that the model can be valid\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\ndescribe ComponentValidations do\n before do\n @params = {\n :account_name => \"Foo Company\",\n :account_subdomain => \"foo-company\",\n :user_name => \"J... | ruby | chosen |
[
{
"from": "system",
"value": "Add pending for self-tests without names\n"
},
{
"from": "human",
"value": "require_relative '../../lib/recog/db'\n\ndescribe Recog::DB do\n Dir[File.expand_path File.join('xml', '*.xml')].each do |xml_file_name|\n\n describe \"##{File.basename(xml_file_name)}\"... | ruby | chosen |
[
{
"from": "system",
"value": "Update specs for physical road\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ActiveRoad::PhysicalRoad do\n\n subject { create(:physical_road) }\n\n it \"should validate objectid uniqueness\" do\n other_road = build :physical_road, :object... | ruby | chosen |
[
{
"from": "system",
"value": "Add new respondent admin role\n"
},
{
"from": "human",
"value": "# This file should contain all the record creation needed to seed the database with its default values.\n# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).... | ruby | chosen |
[
{
"from": "system",
"value": "Add support of parsing of `Column.equal_width?`\n"
},
{
"from": "human",
"value": "require_relative 'columns/column'\nmodule OoxmlParser\n class Columns < OOXMLDocumentObject\n attr_accessor :separator\n attr_accessor :count\n attr_accessor :column_array\n... | ruby | chosen |
[
{
"from": "human",
"value": "Add reflection to variable method.rb\n"
},
{
"from": "gpt",
"value": "Full name greeting. Write a program that asks for a person’s first name, then middle, and then last. Finally, it should greet the person using their full name.\nputs 'What is your first name?'\nfir... | ruby | chosen |
[
{
"from": "human",
"value": "Create cask for Google Earth Pro\n\nFreely available as of 2015-01-31.\n"
},
{
"from": "gpt",
"value": "cask :v1 => 'google-earth-pro' do\n version :latest\n sha256 :no_check\n\n url 'https://dl.google.com/earth/client/advanced/current/GoogleEarthProMac-Intel.dmg'... | ruby | chosen |
[
{
"from": "system",
"value": "Update PS3 Media Server URL\n\nUpdate from non-conformative Sourceforge url to downloads.sourceforge.net"
},
{
"from": "human",
"value": "class Ps3MediaServer < Cask\n url 'http://sourceforge.net/projects/ps3mediaserver/files/pms-1.90.1-setup-macosx.tar.gz'\n home... | ruby | chosen |
[
{
"from": "system",
"value": "Update listened socket in unicorn config\n"
},
{
"from": "human",
"value": "root_dir = \"/home/deploy/apps/copycopter-server/current\"\nworking_directory root_dir\n\npid \"#{root_dir}/tmp/pids/unicorn.pid\"\n\nstderr_path \"#{root_dir}/log/unicorn.log\"\nstdout_path... | ruby | chosen |
[
{
"from": "human",
"value": "Write script for migrating old registers data to the new models\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env ruby\n##\n# Migrate a JSON dump of old `registers` collection to the new collections for\n# storing registers of facts and relations. You need a dump of `... | ruby | chosen |
[
{
"from": "system",
"value": "Fix nested exposures under Rails 3.1\n\nFixes the problem demonstrated in:\n\n https://github.com/acumenbrands/decent_exposure_bug\n\nand alluded to in some comments on #67.\n\nWhen nested exposures mapping to a has_many association are\ninstantiated, the fast-path code introd... | ruby | chosen |
[
{
"from": "system",
"value": "Fix consul service file location\n\nWe were installing systemd unit files in distribution-dependent\nfolder, which is not the best way of doing thins to put it mildly.\n\nChange-Id: I43ffbfb4da0a1d22df5c6a6188336af20605de93\n"
},
{
"from": "human",
"value": "#\n# Co... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor CashRefundItemList to use Support::Sublist\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class CashRefundItemList\n include Support::Fields\n include Namespaces::TranCust\n\n fields :item\n\n def initialize(at... | ruby | chosen |
[
{
"from": "human",
"value": "Rename duplicate pacbio id lims\n"
},
{
"from": "gpt",
"value": "# frozen_string_literal: true\n\nnamespace :pac_bio_run_table do\n desc 'Update pac_bio_run_name column with the values from id_pac_bio_run_lims'\n\n task rename_duplicate_pac_bio_runs: :environment d... | ruby | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning for integration test\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass PlacesControllerTest < ActionDispatch::IntegrationTest\n test 'GET /places' do\n assert_raise AbstractController::ActionNotFound do\n get places_p... | ruby | chosen |
[
{
"from": "system",
"value": "Add link to phase assets\n"
},
{
"from": "human",
"value": "#-------------------------------------------------------------------------------\n# Draft Budgets Controller\n#\n# Basic Draft ProjectCRUD management\n#\n#---------------------------------------------------... | ruby | chosen |
[
{
"from": "system",
"value": "Change to use array.first(5) instead of array[0..4]\n"
},
{
"from": "human",
"value": "require \"fluent/config/v1_parser\"\n\nclass Fluentd::SettingsController < ApplicationController\n before_action :login_required\n before_action :find_fluentd\n before_action :... | ruby | chosen |
[
{
"from": "system",
"value": "Use ternary operator instead of if/else\n"
},
{
"from": "human",
"value": "class OrganisationFeatureListPresenter < FeatureListPresenter\n \n delegate_instance_methods_of FeatureList\n\n def initialize(organisation, view_context)\n @organisation = organisation... | ruby | chosen |
[
{
"from": "system",
"value": "284: Add placeholder for option set example spreadsheet action\n"
},
{
"from": "human",
"value": "class OptionSetImportsController < ApplicationController\n include UploadProcessable\n\n load_and_authorize_resource\n\n def new\n render('form')\n end\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a test for workflow_dispatch\n"
},
{
"from": "human",
"value": "require 'helper'\n\ndescribe Octokit::Client::ActionsWorkflows do\n before do\n Octokit.reset!\n @client = oauth_client\n end\n\n describe '.workflows', :vcr do\n it 'returns the reposit... | ruby | chosen |
[
{
"from": "system",
"value": "Use squiggly arrow version for AIQCoreLib\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"AIQJSBridge\"\n s.version = \"1.0.2\"\n s.summary = \"Provides JavaScript access to AppearIQ cloud services.\"\n s.homepa... | ruby | chosen |
[
{
"from": "system",
"value": "Add heart + smiley tests\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe RbLibText do\n it 'has a version number' do\n expect(RbLibText::VERSION).not_to be nil\n end\n\n it 'does something useful' do\n sentance = \"RT @RGA: The most hor... | ruby | chosen |
[
{
"from": "human",
"value": "Add initial specs for the monitor\n"
},
{
"from": "gpt",
"value": "require 'spec_helper'\n\ndescribe WDM::Monitor do\n let(:callback) { Proc.new { @called = true } }\n\n before { @called = false }\n\n it 'runs the block when there are changes' do\n watch_fixtur... | ruby | chosen |
[
{
"from": "system",
"value": "Set capistrano rbenv ruby to 2.1.1.\n"
},
{
"from": "human",
"value": "require File.expand_path('../../config/environment', __FILE__)\n\nset :application, Rails.application.class.parent_name.downcase\nset :hostname, Settings.host\n\nset :repo_url, 'https://github.c... | ruby | chosen |
[
{
"from": "system",
"value": "Set Capistrano version to 3.11.0\n"
},
{
"from": "human",
"value": "# config valid only for current version of Capistrano\nlock \"3.7.2\"\n\nset :log_level, 'info'\n\nset :application, \"etlocal\"\nset :repo_url, \"git@github.com:quintel/etlocal.git\"\n\n# Set up rb... | ruby | chosen |
[
{
"from": "system",
"value": "Remove the troublesome catch-all-not-found route\n"
},
{
"from": "human",
"value": "Asciinema::Application.routes.draw do\n\n get \"/browse\" => \"asciicasts#index\", :as => :browse\n get \"/browse/popular\" => \"asciicasts#popular\", :as => :popular\n\n resource... | ruby | chosen |
[
{
"from": "system",
"value": "Remove pagination parameters from user controller.\n\n"
},
{
"from": "human",
"value": "class UsersController < ApplicationController\n before_action :authenticate_user!, PQUserFilter\n\n def index\n @users = User.active_list\n .order(deleted: :... | ruby | chosen |
[
{
"from": "system",
"value": "Switch root back to about page for now.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n devise_for :users\n \n root 'subjects#random'\n\n get '/about' => 'subjects#about'\n get '/resources' => 'subjects#resources'\n\n resources :subjects\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix parent_page_collection when no title\n"
},
{
"from": "human",
"value": "module Georgia\n module FormsHelper\n\n def sortable(column, title=nil)\n title ||= column.humanize\n direction = (column.to_s == params[:o] && params[:dir] == \"asc\" ? \"desc... | ruby | chosen |
[
{
"from": "system",
"value": "Add bundler as development dependency\n"
},
{
"from": "human",
"value": "lib = 'pilfer'\nlib_file = File.expand_path(\"../lib/#{lib}.rb\", __FILE__)\nFile.read(lib_file) =~ /\\bVERSION\\s*=\\s*[\"'](.+?)[\"']/\nversion = $1\n\nGem::Specification.new do |spec|\n spe... | ruby | chosen |
[
{
"from": "system",
"value": "Make gemspec work with $SAFE = 3\n"
},
{
"from": "human",
"value": "Gem::Specification.new do |s|\n\n s.name = %q{be_valid_asset}\n s.version = \"0.9.0\"\n\n s.description = %q{Provides be_valid_xhtml and be_valid_css matchers for rspec controller and view tests.... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hostname setting also in Debian\n\nSame fix as #2334.\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module GuestDebian\n module Cap\n class ChangeHostName\n def self.change_host_name(machine, name)\n machine.communicate.tap ... | ruby | chosen |
[
{
"from": "system",
"value": "Change permission to edit when viewing specific user runs\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n\n protect_from_forgery\n\n before_filter :configure_permitted_devise_params, if: :devise_controller?\n\n def runs\n... | ruby | chosen |
[
{
"from": "system",
"value": "Raven: Use to_unsafe_h instead of to_hash whichi is deprecated.\n"
},
{
"from": "human",
"value": "class ApplicationController < ActionController::Base\n def no_resp_redir(dest)\n respond_to do |format|\n format.html { redirect_to dest }\n format.json ... | ruby | chosen |
[
{
"from": "system",
"value": "Add functionality to instantiate a restaurant.\n"
},
{
"from": "human",
"value": "class RestaurantsController < ApplicationController\n include RestaurantsHelper\n\n def show\n end\n\n def index\n restaurants = search_by_zip(\"94552\")\n end\n\n def create\... | ruby | chosen |
[
{
"from": "system",
"value": "Fix migration for empty databases\n"
},
{
"from": "human",
"value": "class UpdateCurrentPageVersion < ActiveRecord::Migration[5.0]\n def change\n print \"loading\\n\"\n max_id = Page.last.id\n\n 0.upto(max_id / 1000) do |i|\n GC.start\n base_id =... | ruby | chosen |
[
{
"from": "system",
"value": "Add summary to Atom feed.\n"
},
{
"from": "human",
"value": "xml.instruct!\nxml.feed \"xmlns\" => \"http://www.w3.org/2005/Atom\" do\n site_url = site_root_uri\n xml.title blog_title\n xml.subtitle blog_subtitle\n xml.id URI.join(site_url, blog.options.prefix.to... | ruby | chosen |
[
{
"from": "system",
"value": "Add factories for admins and superadmins to be able to test authorizations.\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user do\n name 'Test User'\n email 'example@example.com'\n password 'please'\n password_confirmation 'please'... | ruby | chosen |
[
{
"from": "system",
"value": "Disable for now full rebuild\n"
},
{
"from": "human",
"value": "env :MAILTO, nil\n\nevery 3.hours do\n runner \"UpdateScheduler.perform_async\"\nend\n"
},
{
"from": "gpt",
"value": "env :MAILTO, nil\n\n# every 3.hours do\n# runner \"UpdateScheduler.pe... | ruby | chosen |
[
{
"from": "system",
"value": "Increase gem limit for v1 dependencies controller\n"
},
{
"from": "human",
"value": "class Api::V1::DependenciesController < Api::BaseController\n before_action :check_gem_count\n GEM_REQUEST_LIMIT = 200\n\n def index\n deps = GemDependent.new(gem_names).to_a\... | ruby | chosen |
[
{
"from": "system",
"value": "Add in logic to restart NetworkManager if it is enabled.\n"
},
{
"from": "human",
"value": "module VagrantPlugins\n module GuestRedHat\n module Cap\n class ChangeHostName\n def self.change_host_name(machine, name)\n comm = machine.communicat... | ruby | chosen |
[
{
"from": "system",
"value": "Update pod to ios 5.0\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"LPGoogleFunctions\"\n s.version = \"1.0.0\"\n s.summary = \"LPGoogleFunctions is an iOS library that provides easy access to certain Google API functions.... | ruby | chosen |
[
{
"from": "system",
"value": "Use a protocol-relative URL for embeds\n\n…thus avoiding \"insecure content\" warnings on HTTPS-transmitted pages.\n"
},
{
"from": "human",
"value": "module HasVimeoVideo\n class VimeoVideo\n \n def self.regex\n /https?:\\/\\/(www\\.)?vimeo.com\\/(\\d+)/... | ruby | chosen |
[
{
"from": "system",
"value": "[podspec] Update source tag and remove superfluous public headers.\n\nBy default all headers in the `source_files` are assumed to be public.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = 'PSTCollectionView'\n s.version = '1.0.0'\n s.summary =... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue related to command output filling up the IO pipe.\n\nIf command being run had output of more than 64k,the pipe would fill and\nthe process would hang waiting for room to write more data into the pipe.\nReading the pipe synchrously eliminates the problem.\nSee the foll... | ruby | chosen |
[
{
"from": "system",
"value": "Support for count of detached volumes\n"
},
{
"from": "human",
"value": "class Ec2Info\n def initialize(regions, credentials)\n @regions = regions\n @credentials = credentials\n end\n\n def print_ec2info\n @regions.each{ |region|\n ec2_client = Aws:... | ruby | chosen |
[
{
"from": "system",
"value": "Upgrade acme-client to drop dependencies\n"
},
{
"from": "human",
"value": "#\n# Author:: Thijs Houtenbos <thoutenbos@schubergphilis.com>\n# Cookbook:: letsencrypt\n# Recipe:: default\n#\n# Copyright 2015 Schuberg Philis\n#\n# Licensed under the Apache License, Vers... | ruby | chosen |
[
{
"from": "system",
"value": "Use correct names for LWRPs"
},
{
"from": "human",
"value": "bash_it_version = version_string_for('bash_it')\n\ngit \"#{Chef::Config[:file_cache_path]}/bash_it\" do\n repository node['bash_it']['repository']\n revision bash_it_version\n destination \"#{Chef::Conf... | ruby | chosen |
[
{
"from": "system",
"value": "Modified: Change template path from /tmp to :file_cache_path\n"
},
{
"from": "human",
"value": "#\n# Cookbook Name:: hadoop\n# Recipe:: default\n#\n# Copyright 2013, Keiji Matsuzaki\n#\n# All rights reserved - Do Not Redistribute\n#\n\nuser \"hadoop\" do\n home ... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify this condition since we're only using the one ENV variable for the moment\n"
},
{
"from": "human",
"value": "module Neo4j\n module Core\n module TxMethods\n def tx_methods(*methods)\n methods.each do |method|\n tx_method = \"#{metho... | ruby | chosen |
[
{
"from": "system",
"value": "Replace string SQL with FantasyPlayer class method\n"
},
{
"from": "human",
"value": "class FantasyLeague < ActiveRecord::Base\n DEFAULT_LEAGUE_ID = 1\n\n has_many :fantasy_teams\n\n validates :year, presence: true\n validates :division, presence: true\n\n def ... | ruby | chosen |
[
{
"from": "system",
"value": "SCALRCORE-11162: Fix memcached attributes for ubuntu1804\n"
},
{
"from": "human",
"value": "default[\"memcached\"][\"memory\"] = 64\ndefault[\"memcached\"][\"port\"] = 11211\ndefault[\"memcached\"][\"listen\"] = \"0.0.0.0\"\ndefault['memcached']['maxconn'] = 1024\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Make the caching conditional to a setting which defaults to true (fast by default, set it to false if you're unhappy e.g. if you have any dynamic content on your pages)\n"
},
{
"from": "human",
"value": "class PagesController < ApplicationController\n\n caches_acti... | ruby | chosen |
[
{
"from": "human",
"value": "Add created_at and updated_at to ResponseMap\n"
},
{
"from": "gpt",
"value": "class UpdateResponseMaps < ActiveRecord::Migration\n def self.up\n add_column :response_maps, :created_at, :datetime\n add_column :response_maps, :updated_at, :datetime\n end\n\n d... | ruby | chosen |
[
{
"from": "human",
"value": "Add address to user model, serialized hash\n"
},
{
"from": "gpt",
"value": "class AddAddressToUsers < ActiveRecord::Migration\n def up\n add_column :users, :address, :text\n say_with_time \"Migrating User department.\" do\n User.all.each do |user|\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Format Beyond Compare 4 Beta\n"
},
{
"from": "human",
"value": "class BeyondCompare4Beta < Cask\n url 'http://www.scootersoftware.com/BCompareOSX-4.0.0.17905.zip'\n homepage 'http://www.scootersoftware.com/beta.php'\n version '4.0.0.17905'\n sha256 'f67490c52cf1... | ruby | chosen |
[
{
"from": "system",
"value": "Use the ruby dev package for native gem compiles\n"
},
{
"from": "human",
"value": "default['smith-packages']['install'] = %w(iotop unzip curl wget ruby1.9.3)\ndefault['smith-packages']['remove'] = %w(popularity-contest whoopsie landscape-common command-not-found co... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hook parrent method args\n"
},
{
"from": "human",
"value": "module Rundock\n module Hook\n class Base\n HookNotImplementedError = Class.new(NotImplementedError)\n\n attr_reader :name\n attr_reader :contents\n\n def initialize(name, conten... | ruby | chosen |
[
{
"from": "system",
"value": "Update migration to handle duplicate likes\n"
},
{
"from": "human",
"value": "class LikesOnComments < ActiveRecord::Migration\n def self.up\n remove_foreign_key :likes, :posts\n\n add_column :likes, :target_type, :string, :null => false\n rename_column :li... | ruby | chosen |
[
{
"from": "system",
"value": "Fix db:seed adding a class method in Decidim::Ldap::Configuration\n"
},
{
"from": "human",
"value": "module Decidim\n module Ldap\n class Configuration\n\n attr_writer :ldap_username, :ldap_password\n\n def ldap_username\n @ldap_username or fail... | ruby | chosen |
[
{
"from": "system",
"value": "Add index of the table.\n"
},
{
"from": "human",
"value": "class J7W1ApplicationDevices < ActiveRecord::Migration\n def change\n create_table :j7w1_application_devices do |t|\n t.string :owner_type, null: false\n t.integer :owner_id, ... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.