From 234ca71f0ac288c81be9ed1d9c8498509ccc6c68 Mon Sep 17 00:00:00 2001 From: zmagod Date: Thu, 6 Jul 2017 09:45:59 +0200 Subject: [PATCH] removes unneded gems, fixes hound --- Gemfile | 2 -- Gemfile.lock | 10 ---------- lib/tasks/cucumber.rake | 31 ++++++++++++++++++------------- spec/rails_helper.rb | 2 +- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/Gemfile b/Gemfile index e33b7df19..7e0ca64d9 100644 --- a/Gemfile +++ b/Gemfile @@ -92,7 +92,6 @@ group :development, :test do end group :test do - gem 'minitest-reporters' gem "shoulda-context" gem 'shoulda-matchers' gem 'cucumber-rails', require: false @@ -106,7 +105,6 @@ end group :production do gem 'puma' gem 'rails_12factor' - gem 'skylight' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/Gemfile.lock b/Gemfile.lock index 4b26a7fc2..766fbe3e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -65,7 +65,6 @@ GEM public_suffix (~> 2.0, >= 2.0.2) ajax-datatables-rails (0.3.1) railties (>= 3.1) - ansi (1.5.0) arel (8.0.0) aspector (0.14.0) ast (2.3.0) @@ -238,11 +237,6 @@ GEM mimemagic (0.3.2) mini_portile2 (2.2.0) minitest (5.10.2) - minitest-reporters (1.1.14) - ansi - builder - minitest (>= 5.0) - ruby-progressbar momentjs-rails (2.17.1) railties (>= 3.1) multi_json (1.12.1) @@ -398,8 +392,6 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.1) - skylight (1.3.1) - activesupport (>= 3.0.0) slop (3.6.0) sourcemap (0.1.1) spinjs-rails (1.4) @@ -491,7 +483,6 @@ DEPENDENCIES kaminari listen (~> 3.0) logging (~> 2.0.0) - minitest-reporters momentjs-rails (~> 2.17.1) nested_form_fields newrelic_rpm @@ -524,7 +515,6 @@ DEPENDENCIES silencer simple_token_authentication (~> 1.15.1) simplecov - skylight sneaky-save! spinjs-rails starscope diff --git a/lib/tasks/cucumber.rake b/lib/tasks/cucumber.rake index 23d9b3eb4..4f49402f2 100644 --- a/lib/tasks/cucumber.rake +++ b/lib/tasks/cucumber.rake @@ -4,8 +4,8 @@ # instead of editing this one. Cucumber will automatically load all features/**/*.rb # files. - -unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks +# Don't load anything when running the gems:* tasks +unless ARGV.any? { |a| a =~ /^gems/ } vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first $LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil? @@ -14,48 +14,53 @@ begin require 'cucumber/rake/task' namespace :cucumber do - Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t| + Cucumber::Rake::Task.new({ ok: 'test:prepare' }, + 'Run features that should pass') do |t| t.binary = vendored_cucumber_bin # If nil, the gem's binary is used. t.fork = true # You may get faster startup if you set this to false t.profile = 'default' end - Cucumber::Rake::Task.new({:wip => 'test:prepare'}, 'Run features that are being worked on') do |t| + Cucumber::Rake::Task.new({ wip: 'test:prepare' }, + 'Run features that are being worked on') do |t| t.binary = vendored_cucumber_bin t.fork = true # You may get faster startup if you set this to false t.profile = 'wip' end - Cucumber::Rake::Task.new({:rerun => 'test:prepare'}, 'Record failing features and run only them if any exist') do |t| + Cucumber::Rake::Task.new({ rerun: 'test:prepare' }, + 'Record failing features and run only them if any exist') do |t| t.binary = vendored_cucumber_bin t.fork = true # You may get faster startup if you set this to false t.profile = 'rerun' end desc 'Run all features' - task :all => [:ok, :wip] + task all: [:ok, :wip] task :statsetup do require 'rails/code_statistics' ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features') - ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features') + ::CodeStatistics::TEST_TYPES << 'Cucumber features' if File.exist?('features') end task :annotations_setup do Rails.application.configure do if config.respond_to?(:annotations) config.annotations.directories << 'features' - config.annotations.register_extensions('feature') { |tag| /#\s*(#{tag}):?\s*(.*)$/ } + config.annotations.register_extensions('feature') do |tag| + /#\s*(#{tag}):?\s*(.*)$/ + end end end end end desc 'Alias for cucumber:ok' - task :cucumber => 'cucumber:ok' + task cucumber: 'cucumber:ok' - task :default => :cucumber + task default: :cucumber - task :features => :cucumber do + task features: :cucumber do STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***" end @@ -63,9 +68,9 @@ begin task 'test:prepare' do end - task :stats => 'cucumber:statsetup' + task stats: 'cucumber:statsetup' - task :notes => 'cucumber:annotations_setup' + task notes: 'cucumber:annotations_setup' rescue LoadError desc 'cucumber rake task not available (cucumber not installed)' task :cucumber do diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index b0435ba1b..6c59bf3e2 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -5,7 +5,7 @@ require 'database_cleaner' ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) # Prevent database truncation if the environment is production -abort("The Rails environment is running in production mode!") if Rails.env.production? +abort('The Rails environment is running in production mode!') if Rails.env.production? require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point!