conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add certs dir symlink to cap shared dirs\n"
},
{
"from": "human",
"value": "# config valid only for current version of Capistrano\nlock '3.4.0'\n\nset :application, 'umasstransit.rodeo'\nset :repo_url, 'git@github.com:umts/umasstransit.rodeo.git'\nset :rails_env, :p... | ruby | chosen |
[
{
"from": "system",
"value": "Use https for repository url\n"
},
{
"from": "human",
"value": "set :application, 'github-ranking'\nset :repo_url, 'git@github.com:k0kubun/github-ranking.git'\nset :log_level, :info\n\nnamespace :deploy do\n desc 'Restart application'\n task :restart do\n invok... | ruby | chosen |
[
{
"from": "system",
"value": "Update setup's example project and page\n"
},
{
"from": "human",
"value": "class Outline::CreateExampleResources < Outline::Setup::CreateResources\n def run\n project :title => \"Example Project\" do\n page :title => \"Example Page\" do\n tag_list \"... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unneeded hash for grains_data"
},
{
"from": "human",
"value": "require \"#{Vagrant.source_root.join(\"plugins\")}/provisioners/salt/provisioner\"\n\nrequire 'tempfile'\nrequire 'yaml'\n\nclass VagrantPlugins::Salt::Provisioner\n alias_method :upload_configs_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix issue with trying to redirect and render\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n skip_before_filter :authenticate_user!, :only => :new\n\n def new\n redirect_to buckets_path if current_user\n\n render :layout... | ruby | chosen |
[
{
"from": "system",
"value": "Implement log_in helper method on successful login\n"
},
{
"from": "human",
"value": "class SessionsController < ApplicationController\n def new\n end\n\n def create\n user = User.find_by(email: params[:session][:email].downcase)\n if user && user.authentic... | ruby | chosen |
[
{
"from": "system",
"value": "Add redirect for GET requests to the 'admin' namespace\n"
},
{
"from": "human",
"value": "Osra::Application.routes.draw do\n\n root to: \"dashboard#index\"\n match \"/hq/*path\", to: redirect(\"%{path}\"), via: :get\n\n devise_for :admin_users,\n path: '',\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Change allowed auth hosts to list\n"
},
{
"from": "human",
"value": "require \"cgi\"\nrequire \"uri\"\n\nrequire_relative \"../client\"\n\nmodule VagrantPlugins\n module LoginCommand\n class AddAuthentication\n VCLOUD = \"vagrantcloud.com\".freeze\n AT... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor solution to use sort_by method\n"
},
{
"from": "human",
"value": "# Longest String\n\n# I worked on this challenge [by myself].\n\n# longest_string is a method that takes an array of strings as its input\n# and returns the longest string\n#\n# +list_of_word... | ruby | chosen |
[
{
"from": "system",
"value": "Add execution interrupt logic when given invalid credentials in GetGpa class\n"
},
{
"from": "human",
"value": "module CodeclimateCi\n class GetGpa\n NULL_VALUE = 0\n\n def initialize(api_requester, branch)\n @api_requester, @branch = api_requester, bran... | ruby | chosen |
[
{
"from": "system",
"value": "Add controller tests for a funder.\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\nclass FundersControllerTest < ActionDispatch::IntegrationTest\n\n def setup\n @user = users(:david)\n log_in_as(@user)\n end\n\n test \"should get index\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Enable busy track jobs on the Que sample app\n\nHaving it always enabled in the sample app will help test this feature\nand ensure it continues to work in the long run.\n"
},
{
"from": "human",
"value": "Judoscale.configure do |config|\n # Open https://judoscale-ad... | ruby | chosen |
[
{
"from": "human",
"value": "Add BasicObject for Ruby < 1.9\n\nWill be needed for Promise as the base class.\n"
},
{
"from": "gpt",
"value": "# coding: utf-8\n\nunless defined?(BasicObject)\n module Tweetwine\n # Adapted from\n # <http://sequel.heroku.com/2010/03/31/sequelbasicobject-and-... | ruby | chosen |
[
{
"from": "system",
"value": "Undo previous tests, does not fix the issue\n"
},
{
"from": "human",
"value": "def mkdir_p(path)\n complete_path = '.'\n path.split(/\\/|\\\\/).each do |folder|\n complete_path = File.join(complete_path, folder)\n FileUtils.mkdir(complete_path) unless Dir.ex... | ruby | chosen |
[
{
"from": "system",
"value": "Add 2 tests. Employee and adding to Department\n"
},
{
"from": "human",
"value": "require 'minitest/autorun'\nrequire 'minitest/pride'\nrequire './department'\nrequire './employee'\nrequire './review'\n\nclass EmployeeTest < Minitest::Test\n\nend\n"
},
{
"fr... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify page_entries_info by adding entry_name interface to each ORM\n"
},
{
"from": "human",
"value": "module Kaminari\n module DataMapperCollectionMethods\n def limit_value #:nodoc:\n query.options[:limit] || 0\n end\n\n def offset_value #:nodoc:\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove compatibility module from docs [ci skip]\n\nThis module exists to warn old users. I think we should remove\nit from the docs so we don't advertise it.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule ActionController\n module Templa... | ruby | chosen |
[
{
"from": "human",
"value": "Add spec for failing Paypal checkout\n\nhttps://github.com/openfoodfoundation/openfoodnetwork/issues/4233\n"
},
{
"from": "gpt",
"value": "require \"spec_helper\"\n\nfeature \"Checking out with Paypal\", js: true do\n include ShopWorkflow\n include CheckoutWorkflow... | ruby | chosen |
[
{
"from": "system",
"value": "Add require on tests and prepare constants with response status\n"
},
{
"from": "human",
"value": "require 'simplecov'\n# $: << File.expand_path(\"../../lib\", __FILE__)\n\n$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)\nrequire 'organic-sitemap'\nrequir... | ruby | chosen |
[
{
"from": "system",
"value": "Enable net connection after all specs\n"
},
{
"from": "human",
"value": "# Run codeclimate-test-reporter only in CI\nif ENV['CI']\n require 'codeclimate-test-reporter'\n CodeClimate::TestReporter.start\nend\n\nrequire 'rspec'\nrequire 'codeclimate_ci'\nrequire 'we... | ruby | chosen |
[
{
"from": "system",
"value": "Replace include epel recipe by yum_repository provider\n"
},
{
"from": "human",
"value": "# apt_repository 'nginx' do\n# uri 'ppa:nginx/stable'\n# distribution node['lsb']['codename']\n# end\n\ncase node['platform']\nwhen 'ubuntu', 'debian'\n apt_repos... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"Disable webmock since it causes an issue with Net::HTTP responses caching\"\n\nThis reverts commit 36c8168cebe3aaf5bf499fff27cb729f306bb06a.\n"
},
{
"from": "human",
"value": "require 'simplecov'\n\nSimpleCov.profiles.define 'social_media' do\n add_filter ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix CI on itamae 1.10.4+\n\nhttps://github.com/itamae-kitchen/itamae/commit/aea48c1bf0f5958184bc27feecc9045d1689f6ee\n"
},
{
"from": "human",
"value": "require 'serverspec'\nrequire 'docker'\n\nset :backend, :docker\n\nset :docker_image, ENV['DOCKER_IMAGE']\nset :do... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor DbFileBackend to utilize hash rocket (i.e. =>) style delimiter\n\nFor backwards compatibility between older and newer Ruby versions."
},
{
"from": "human",
"value": "module Technoweenie # :nodoc:\n module AttachmentFu # :nodoc:\n module Backends\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Set default paginator in ENV so specs don't fail without it\n"
},
{
"from": "human",
"value": "require 'support/numbers_controller'\nrequire 'support/numbers_api'\nrequire 'api-pagination'\n\nif ENV['PAGINATOR']\n require ENV['PAGINATOR']\n ApiPagination.config.pa... | ruby | chosen |
[
{
"from": "system",
"value": "Remove unnecesary slug generation trigger\n"
},
{
"from": "human",
"value": "class Admin::BudgetGroupsController < Admin::BaseController\n include FeatureFlags\n feature_flag :budgets\n\n def create\n @budget = Budget.find params[:budget_id]\n @budget.group... | ruby | chosen |
[
{
"from": "system",
"value": "Fix setting of Errbit host.\n\nWe can't use Plek for this because it needs to work on the draft frontends\nas well, and Plek gives 'draft-errbit.<domain>' on those machines.\n"
},
{
"from": "human",
"value": "if ENV['ERRBIT_API_KEY'].present?\n errbit_uri = Plek.fi... | ruby | chosen |
[
{
"from": "human",
"value": "Add WP IMDB Profile Widget File Read Vuln Module\n"
},
{
"from": "gpt",
"value": "##\n# This module requires Metasploit: http://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'msf/core'\n\nclass MetasploitModu... | ruby | chosen |
[
{
"from": "system",
"value": "Replace stabby lambda for 1.9.3 compatibility\n"
},
{
"from": "human",
"value": "module BrowserifyRails\n class Railtie < Rails::Engine\n config.browserify_rails = ActiveSupport::OrderedOptions.new\n\n # Which paths should be browserified?\n config.browser... | ruby | chosen |
[
{
"from": "system",
"value": "Make add_provisioner_options succeed when there are no options yet\n"
},
{
"from": "human",
"value": "require 'cheffish/with_pattern'\nrequire 'chef/mixin/deep_merge'\n\nmodule ChefMetal\n class ChefRunData\n extend Cheffish::WithPattern\n with :provisioner\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add task to pregenerate ingredient pictures thumbs\n\nThis allows to eagerly generate picture thumbnails for all picture ingredients.\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nnamespace :alchemy do\n namespace :generate do\n desc \"Gene... | ruby | chosen |
[
{
"from": "system",
"value": "Add options to routing constraints"
},
{
"from": "human",
"value": "module Warden\n module GitHub\n module Rails\n module Routes\n # Enforces an authenticated GitHub user for the routes. If not\n # authenticated, it initiates the OAuth flow.\n... | ruby | chosen |
[
{
"from": "system",
"value": "Fix complexity in the coverage helper.\n"
},
{
"from": "human",
"value": "require 'simplecov'\n\nmodule CoverageHelper\n # Helper to include Coveralls/Code Climate coverage, but not require developers to install the\n # gem.\n #\n # @param name [String] The name... | ruby | chosen |
[
{
"from": "system",
"value": "Add user factory with expenses\n"
},
{
"from": "human",
"value": "FactoryGirl.define do\n factory :user do\n name \"Expensive User\"\n sequence(:email) { |n| \"mail_#{n}@example.com\" }\n password_digest \"awesome_password_digest_123\"\n end\nend\n"
},
... | ruby | chosen |
[
{
"from": "human",
"value": "Add a test for when the contents of the input stream can't all be read at once\n"
},
{
"from": "gpt",
"value": "require File.expand_path(File.dirname(__FILE__) + '/spec_helper')\nrequire 'rack/rewindable_input'\nrequire 'rack_jetty/java_input'\nrequire 'java'\njava_i... | ruby | chosen |
[
{
"from": "system",
"value": "Use own mktmpname method because Dir::Tmpname is >1.8.7 only.\n"
},
{
"from": "human",
"value": "require 'tmpdir'\n\nmodule MultiDir\n\n # Provide additional function to operate\n # on directories.\n #\n module PathnamePatch\n\n def glob(*patterns)\n Dir... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor Ipsum class per updated internal classes\n"
},
{
"from": "human",
"value": "require_relative 'paragraph.rb'\nrequire_relative 'text_paragraph.rb'\nrequire_relative 'haml_paragraph.rb'\nrequire_relative 'html_paragraph.rb'\n\nclass Ipsum\n def text_paragrap... | ruby | chosen |
[
{
"from": "system",
"value": "Return the attribute set after shoveling\n"
},
{
"from": "human",
"value": "module Perpetuity\n class AttributeSet\n include Enumerable\n\n def initialize\n @attributes = {}\n end\n\n def << attribute\n @attributes[attribute.name] = attribute\... | ruby | chosen |
[
{
"from": "system",
"value": "Update rubocop requirement from ~> 1.24.1 to ~> 1.25.0\n\nUpdates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.\n- [Release notes](https://github.com/rubocop/rubocop/releases)\n- [Changelog](https://github.com/rubocop/rubocop/bl... | ruby | chosen |
[
{
"from": "system",
"value": "Set openssh client attributes correctly\n"
},
{
"from": "human",
"value": "include_attribute 'travis_internal_base'\n\noverride['openssh']['client']['match']['Host 10.10.*']['user_known_hosts_file'] = '/dev/null'\noverride['openssh']['client']['match']['Host 10.10.*... | ruby | chosen |
[
{
"from": "system",
"value": "Update exception handler for dummy app\n\n`t` helper behaves now in the same way in Rails 3, 4 and 4.1\n"
},
{
"from": "human",
"value": "if ::Rails::VERSION::MAJOR == 3 ||\n (::Rails::VERSION::MAJOR == 4 && ::Rails::VERSION::MINOR == 0)\n require 'i18n'\n\n # ... | ruby | chosen |
[
{
"from": "system",
"value": "Disable Rack::MiniProfiler for Jasmine's specs route\n"
},
{
"from": "human",
"value": "if Rails.env.development?\n require 'rack-mini-profiler'\n\n # initialization is skipped so trigger it\n Rack::MiniProfilerRails.initialize!(Rails.application)\n Rack::MiniPr... | ruby | chosen |
[
{
"from": "system",
"value": "Hotfix: Adjust field for Challenge to ensure db:recreate works properly\n"
},
{
"from": "human",
"value": "challenge = Challenge.create!(title: 'The First Challenge',\n headline: 'This is the first challenge - what\\'s not working for y... | ruby | chosen |
[
{
"from": "system",
"value": "Add missing policy_scope call in JSON Resume controller\n"
},
{
"from": "human",
"value": "module Api\n module JsonResume\n class ResumesController < ::Api::BaseController\n def show\n authorize resume\n render json: resume, serializer: Resume... | ruby | chosen |
[
{
"from": "system",
"value": "Fix unknown method authenticate_admin! when accessing application admin app\n"
},
{
"from": "human",
"value": "module Doorkeeper\n class ApplicationsController < ApplicationController\n respond_to :html\n\n before_filter :authenticate_admin!\n\n def index\... | ruby | chosen |
[
{
"from": "system",
"value": "Add method to get all tasks with defined search options\n"
},
{
"from": "human",
"value": "require 'voicearchive/client'\nmodule Voicearchive\n class TaskClient < Client\n def set_supplier_on_task(task_id, supplier_id)\n response = call(\"task/#{task_id}/Se... | ruby | chosen |
[
{
"from": "system",
"value": "Add more translations for \"choke\"\n"
},
{
"from": "human",
"value": "require \"dakine/version\"\nrequire \"engtagger\"\n\nmodule Dakine\n extend self\n\n def translate(text)\n tagged_word_pairs = tag_words(text)\n\n translated_text = tagged_word_pairs.map ... | ruby | chosen |
[
{
"from": "system",
"value": "Fix for symlink task name deprecation in new version of capistrano.\n"
},
{
"from": "human",
"value": "Capistrano::Configuration.instance(true).load do\n #\n # Hooks\n #\n before \"deploy:symlink\", \"deploy:finalize_permissions\"\n\n #\n # Tasks\n #\n names... | ruby | chosen |
[
{
"from": "system",
"value": "Refactor BillingScheduleMilestoneList to use Support::Sublist\n"
},
{
"from": "human",
"value": "module NetSuite\n module Records\n class BillingScheduleMilestoneList\n include Support::Fields\n include Namespaces::ListAcct\n\n fields :billing_sch... | ruby | chosen |
[
{
"from": "system",
"value": "Fix a typo in textual summary test for SecurityGroup.\n"
},
{
"from": "human",
"value": "describe SecurityGroupHelper::TextualSummary do\n describe \".textual_group_firewall\" do\n before do\n login_as FactoryGirl.create(:user)\n end\n\n subject { tex... | ruby | chosen |
[
{
"from": "system",
"value": "Add acceptance test of stns::repo in RedHat\n"
},
{
"from": "human",
"value": "require 'spec_helper_acceptance'\n\ndescribe 'stns class' do\n let(:manifest) {\n <<-EOS\n include ::stns\n EOS\n }\n\n it \"should work without errors\" do\n result = ap... | ruby | chosen |
[
{
"from": "system",
"value": "Remove whitespace for hound test.\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\ndescribe YertleFormatter do\n let(:output) { StringIO.new }\n let(:notification) { double }\n let(:execution_result) { double }\n let(:example) { double }\n let(:met... | ruby | chosen |
[
{
"from": "system",
"value": "Fix generators for spree 2.3.0\n"
},
{
"from": "human",
"value": "module SpreeIpay88\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n class_option :auto_run_migrations, :type => :boolean, :default => false\n\n def add_javascri... | ruby | chosen |
[
{
"from": "system",
"value": "Add jquery UI autocomplete files in install generator"
},
{
"from": "human",
"value": "module SpreeAutosuggest\n module Generators\n class InstallGenerator < Rails::Generators::Base\n\n def add_javascripts\n append_file \"vendor/assets/javascripts/sp... | ruby | chosen |
[
{
"from": "human",
"value": "Add tool to list all classes and their inheritance.\n"
},
{
"from": "gpt",
"value": "require 'set'\n\ninclude Helpers::ModuleHelper\n\nMANIFEST_FILENAME = 'coverage.manifest'.freeze\n\ndef init\n list_all_classes\nend\n\n\ndef all_objects\n run_verifier(Registry.al... | ruby | chosen |
[
{
"from": "system",
"value": "Add a step to verify output with template\n"
},
{
"from": "human",
"value": "Then 'it should pass' do\n steps %Q{\n Then it should pass with:\n \"\"\"\n \"\"\"\n }\nend\n\nThen /^it succeeds$/ do\n @last_error.should be_nil\nend\n\nThen /^it fails wi... | ruby | chosen |
[
{
"from": "system",
"value": "Add pending spec for cleanup of tags\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\nmodule LIFX\n describe \"tags\", integration: true do\n it 'Clearing, setting and using tags' do\n light.tags.each do |tag_label|\n light.remove_tag(tag_... | ruby | chosen |
[
{
"from": "system",
"value": "Fix typo--the correct spelling is \"around\", not \"arond\".\n"
},
{
"from": "human",
"value": "require \"spec_helper\"\n\nmodule RSpec::Core\n describe Hooks do\n describe \"#around\" do\n context \"when not running the example within the arond block\" do\... | ruby | chosen |
[
{
"from": "system",
"value": "ENHANCE: Use factory girl for project test\n"
},
{
"from": "human",
"value": "require \"test_helper\"\n\nclass ProjectTest < ActiveSupport::TestCase\n def get_campus\n data = {\n name: 'Melbourne',\n mode: 'automatic',\n abbreviation: 'Melb'\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Add a couple specs for killing/raising in a thread blocked on accept.\n"
},
{
"from": "human",
"value": "require File.dirname(__FILE__) + '/../../../spec_helper'\nrequire File.dirname(__FILE__) + '/../fixtures/classes'\n\ndescribe \"TCPServer#accept\" do\n before(:... | ruby | chosen |
[
{
"from": "system",
"value": "Add visualizations association to DatasetMetaSerializer\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nmodule GobiertoData\n class DatasetMetaSerializer < DatasetSerializer\n has_many :queries\n\n attribute :data_summary do\n {\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for index url params\n"
},
{
"from": "human",
"value": "require 'test_helper'\n\ndescribe Api::Auth::AccountMinRepresenter do\n\n let(:account) { create(:account) }\n let(:representer) { Api::Auth::AccountMinRepresenter.new(account) }\n let(:json) { JSON.pa... | ruby | chosen |
[
{
"from": "system",
"value": "Add test for confirmation page\n"
},
{
"from": "human",
"value": "# frozen_string_literal: true\n\nrequire \"application_system_test_case\"\n\n# System tests for devise pages.\nclass DeviseTest < ApplicationSystemTestCase\n test \"visit registration page\" do\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Make user url case insensitive\n"
},
{
"from": "human",
"value": "class ExercismApp < Sinatra::Base\n\n get '/:username' do |username|\n please_login\n user = User.where(username: username).first\n if user\n title(user.username)\n erb :user, loca... | ruby | chosen |
[
{
"from": "system",
"value": "Change accessor to reader for config\n"
},
{
"from": "human",
"value": "require \"bandicoot/version\"\nrequire \"bandicoot/dsl\"\nrequire \"bandicoot/processor\"\nrequire 'active_support/all'\n\n# Your code goes here...\nmodule Bandicoot\n attr_accessor :config\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Remove random exit(3) from eof\n"
},
{
"from": "human",
"value": "module Breaktime\n lib_dir = File.dirname(__FILE__) + File::SEPARATOR + 'breaktime'\n $:.unshift lib_dir\n\n require 'rubygems'\n require 'bundler/setup'\n require 'version'\n require 'main'\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add sidekiq route if user is admin\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n resource :account\n resources :authorizations, only: [:destroy]\n\n devise_for :users, controllers: { omniauth_callbacks: \"users/omniauth_callbacks\" }\n\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Revert \"route :users as :volunteers\"\n\nThis reverts commit d908e859e42ef47f79f10dc305be7e8a5b71da58.\n"
},
{
"from": "human",
"value": "ActionController::Routing::Routes.draw do |map|\n map.resources :users, :volunteers\n \n map.resource :user_session, :only =... | ruby | chosen |
[
{
"from": "system",
"value": "Move dashboard route in a `collection`"
},
{
"from": "human",
"value": "Courseware::Application.routes.draw do\n\n get 'signup' => 'users#new', :as => 'signup'\n get 'login' => 'sessions#new', :as => 'login'\n get 'logout' => 'sessions#destroy', :as => 'logout'\n... | ruby | chosen |
[
{
"from": "system",
"value": "Change topic route to tag route.\n"
},
{
"from": "human",
"value": "Rails.application.routes.draw do\n root 'home#index'\n devise_for :users, controllers: {omniauth_callbacks: \"users/omniauth_callbacks\"}\n\n resources :users, only: [:show] do\n resources :re... | ruby | chosen |
[
{
"from": "system",
"value": "Update faraday dependency to version ~> 0.8.7\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nrequire File.expand_path('../lib/congress/version', __FILE__)\n\nGem::Specification.new do |gem|\n gem.add_dependency 'faraday', '~> 0.7'\n gem.add_dependency 'fara... | ruby | chosen |
[
{
"from": "system",
"value": "Fix hd option fetching for spec\n"
},
{
"from": "human",
"value": "class Kuroko2::SessionsController < Kuroko2::ApplicationController\n skip_before_action :require_sign_in\n\n def new\n render layout: false\n end\n\n def create\n return_to = params[:state]... | ruby | chosen |
[
{
"from": "system",
"value": "Change location of checkout delivery page cms from /delivery to /distribution\n"
},
{
"from": "human",
"value": "Deface::Override.new(:virtual_path => \"spree/checkout/_delivery\",\n :insert_before => \"fieldset#shipping_method\",\n ... | ruby | chosen |
[
{
"from": "system",
"value": "Expand jshint file match regex to include erb.\n"
},
{
"from": "human",
"value": "module AssetPipeline\n module Processors\n class JsHint < Sprockets::Processor\n class ErrorsFound < StandardError; end\n\n REGEX = /#{Regexp.quote(Rails.root.to_s)}\\/ap... | ruby | chosen |
[
{
"from": "system",
"value": "Replace mocha syntax in Facter test\n\nPresumably changed by the upgrade to rspec/rspec-mocks. Fixes:\n```\nFailure/Error: Facter.fact(:fqdn).expects(:value).returns(fqdn)\nNoMethodError:\n undefined method `expects' for #<Facter::Util::Fact:0x007fe85a5930b8>\n```\n"
},
{
... | ruby | chosen |
[
{
"from": "system",
"value": "Simplify the platform logic in the init service recipe\n\nSigned-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>\n"
},
{
"from": "human",
"value": "# include helper methods\nclass ::Chef::Recipe\n include ::Opscode::ChefClient::Helpers\nend\n\n... | ruby | chosen |
[
{
"from": "system",
"value": "Add MIT license to gemspec\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n$:.push File.expand_path(\"../lib\", __FILE__)\nrequire \"video_info/version\"\n\nGem::Specification.new do |s|\n s.name = \"video_info\"\n s.version = VideoInfo::V... | ruby | chosen |
[
{
"from": "system",
"value": "Fix tests to point to the right partial\n"
},
{
"from": "human",
"value": "RSpec.describe 'shared/_sign_in_box', :type => :view do\n let(:logged_in) { false }\n\n before do\n allow(view).to receive(:user_signed_in?) { logged_in }\n render\n end\n\n context... | ruby | chosen |
[
{
"from": "system",
"value": "Add description to the project"
},
{
"from": "human",
"value": "# coding: utf-8\nlib = File.expand_path('../lib', __FILE__)\n$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)\nrequire 'csv2avro/version'\n\nGem::Specification.new do |spec|\n spec.name ... | ruby | chosen |
[
{
"from": "system",
"value": "Drop NOT NULL constraint on log_input_url\n"
},
{
"from": "human",
"value": "Sequel.migration do\n up do\n alter_table :transfers do\n drop_column :unencrypted_from_url\n drop_column :unencrypted_to_url\n\n set_column_not_null :from_url\n set... | ruby | chosen |
[
{
"from": "system",
"value": "Allow GCC to be detected via CONFIG[\"CC\"].\n"
},
{
"from": "human",
"value": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | ruby | chosen |
[
{
"from": "system",
"value": "Use File.join to construct final path\n"
},
{
"from": "human",
"value": "require 'mkmf'\n\ndir_config('R')\n\nsome_paths = ENV['PATH'].split(File::PATH_SEPARATOR) + %w[\n /usr/local/lib64/R\n /usr/local/lib/R \n /usr/lib64/R \n /usr/lib/R \n /Library/Frameworks... | ruby | chosen |
[
{
"from": "system",
"value": "Add to be explicit about setting it\n"
},
{
"from": "human",
"value": "module Tito\n class Base < JsonApiClient::Resource\n self.site = ENV['TITO_SITE'] || \"https://api.tito.io/v2\"\n end\nend"
},
{
"from": "gpt",
"value": "module Tito\n class Ba... | ruby | chosen |
[
{
"from": "system",
"value": "Make sure that we have a @solr variable\n"
},
{
"from": "human",
"value": "require 'rsolr-ext'\n\n# Module for Utbildningsradion AB (http://ur.se/)\nmodule UR \n # Search for products and populate from the metadata cache\n class Search\n # Setup\n if !defin... | ruby | chosen |
[
{
"from": "system",
"value": "Test that adding children anchors correctly\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe ChildBenefitTaxController do\n\n describe \"GET 'landing'\" do\n it \"returns http success\" do\n get 'landing'\n response.should be_succes... | ruby | chosen |
[
{
"from": "system",
"value": "Use glob in podspec, so that subfolders are also possible.\n"
},
{
"from": "human",
"value": "Pod::Spec.new do |s|\n s.name = \"ContentfulManagementAPI\"\n s.version = \"0.1.0\"\n s.summary = \"Objective-C SDK for Contentful's Conten... | ruby | chosen |
[
{
"from": "system",
"value": "Update the way files are added in the gemspec\n\nSince the gem is packaged based on this file list, it seems pertinent to\nonly include files that users might want to see when they install the\ngem, so let's explicitly list those files from the root that we want to\ninclude.\n\... | ruby | chosen |
[
{
"from": "system",
"value": "Add a nil check to matches_all\n"
},
{
"from": "human",
"value": "module Discordrb::Events\n module Utility\n def matches_all(attributes, to_check, &block)\n # First case: there's only a single attribute\n unless attributes.is_a? Array\n return ... | ruby | chosen |
[
{
"from": "system",
"value": "Remove default_scope, retain previous behavior of published\n"
},
{
"from": "human",
"value": "class Tweet < ActiveRecord::Base\n default_scope { order(\"published_at desc\") }\n\n mount_uploader :image, ImageUploader\n\n def self.published\n where(published: ... | ruby | chosen |
[
{
"from": "system",
"value": "Check for existence before copying assets. Warn if not found.\n"
},
{
"from": "human",
"value": "module Sprockets\n class Manifest\n def compile_with_non_digest *args\n compile_without_non_digest *args\n\n files.each do |(digest_path, info)|\n f... | ruby | chosen |
[
{
"from": "system",
"value": "Update parser with more of a bird's eye view\n"
},
{
"from": "human",
"value": "require \"parslet\"\n\nclass Smashcut\n class FountainParser < Parslet::Parser\n rule(:line_break) { match(\"\\n\") }\n rule(:scene_heading) { match(\"[A-Z \\-\\. ]\").repeat(1) >... | ruby | chosen |
[
{
"from": "system",
"value": "Use VirtualHost instead of AppManager\n"
},
{
"from": "human",
"value": "module Yeb\n class HTTPRequestHandler\n attr_reader :app_manager\n\n def initialize\n @app_manager = AppManager.new\n end\n\n def get_response(request)\n hostname = Hostn... | ruby | chosen |
[
{
"from": "system",
"value": "Fix base64 decoding issue with unpack m\n"
},
{
"from": "human",
"value": "require_relative '../../spec_helper'\n\nrequire 'base64'\n\ndescribe \"Base64#decode64\" do\n it \"returns the Base64-decoded version of the given string\" do\n Base64.decode64(\"U2VuZCBy... | ruby | chosen |
[
{
"from": "human",
"value": "Add codewars - greed is good\n"
},
{
"from": "gpt",
"value": "# https://www.codewars.com/kata/5270d0d18625160ada0000e4/\ndef score(dice)\n result = 0\n\n if dice.count(1) >= 3\n result += (1000 + ((dice.count(1) - 3) * 100))\n dice.delete(1)\n end\n\n (2..6... | ruby | chosen |
[
{
"from": "system",
"value": "Update the create action to add location to the header\n"
},
{
"from": "human",
"value": "class Api::CribsController < ApplicationController\n\n def index\n \t@cribs = Cribb.all\n end\n\n def create\n owner = Owner.find(crib_params[:owner_id])\n if owner \... | ruby | chosen |
[
{
"from": "system",
"value": "Fix merge conflict with merge upstream master\n"
},
{
"from": "human",
"value": "<<<<<<< HEAD\nclass LanguagesController < ApplicationControllerg\n=======\nclass LanguagesController < ApplicationController\n\tdef index\n\tend\n\n\tdef show\n\t\t@language = Language.... | ruby | chosen |
[
{
"from": "system",
"value": "Add updated_at in updated_all since this will not be updated by default\n"
},
{
"from": "human",
"value": "class DocumentCollectionOrder\n\n def initialize(event_id)\n @event_id = event_id\n end\n\n def show\n Document.\n joins('LEFT JOIN languages ON ... | ruby | chosen |
[
{
"from": "system",
"value": "Add basic specs for optimistic locking mixin\n"
},
{
"from": "human",
"value": "require 'spec_helper'\n\ndescribe Gitlab::OptimisticLocking, lib: true do\n describe '#retry_lock' do\n let!(:pipeline) { create(:ci_pipeline) }\n let!(:pipeline2) { Ci::Pipeline.... | ruby | chosen |
[
{
"from": "system",
"value": "Change the perform action to make it smaller\n\nAs suggested in the CR, the logic is put in private methods so it's\neasier to read the code and know what it does.\n"
},
{
"from": "human",
"value": "module Shopify\n class ProductUpdater\n def initialize(spree_pr... | ruby | chosen |
[
{
"from": "system",
"value": "Discard DeviantArt.new what was for backward compatibility\n"
},
{
"from": "human",
"value": "require 'deviantart/version'\nrequire 'deviantart/client'\nrequire 'deviantart/base'\nrequire 'deviantart/deviation'\nrequire 'deviantart/user'\nrequire 'deviantart/status'... | ruby | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.