From f3512a4a6f2128bf7e92b3597979173eb05527d8 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Sat, 19 Nov 2016 20:13:51 +0100 Subject: [PATCH] tries to speed up build with knapsack --- .travis.yml | 3 ++- Gemfile | 1 + Gemfile.lock | 5 +++++ Rakefile | 1 + spec/spec_helper.rb | 6 +++--- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a45f36990..b9c8b622f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,5 @@ cache: bundler before_script: - "for i in config/*.example; do cp \"$i\" \"${i/.example}\"; done" - bundle exec rake db:setup -script: bundle exec rake +script: + - "KNAPSACK_GENERATE_REPORT=true bundle exec rspec spec" \ No newline at end of file diff --git a/Gemfile b/Gemfile index 7f2b0a878..181526f7d 100644 --- a/Gemfile +++ b/Gemfile @@ -86,6 +86,7 @@ group :development, :test do gem "bullet" gem "faker" gem 'rubocop', '~> 0.45.0', require: false + gem 'knapsack' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 4433d8458..9fd9bab1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -215,6 +215,9 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.10.0) + knapsack (1.13.0) + rake + timecop (>= 0.1.0) launchy (2.4.3) addressable (~> 2.3) letter_opener (1.4.1) @@ -405,6 +408,7 @@ GEM thread (0.2.2) thread_safe (0.3.5) tilt (2.0.5) + timecop (0.8.1) tins (1.11.0) tolk (2.0.0) rails (>= 4.0) @@ -485,6 +489,7 @@ DEPENDENCIES jquery-rails (~> 4.2.1) jquery-ui-rails kaminari + knapsack launchy letter_opener_web (~> 1.3.0) newrelic_rpm (~> 3.17.0.325) diff --git a/Rakefile b/Rakefile index ba6b733dd..ef2c381ff 100644 --- a/Rakefile +++ b/Rakefile @@ -4,3 +4,4 @@ require File.expand_path('../config/application', __FILE__) Rails.application.load_tasks +Knapsack.load_tasks if defined?(Knapsack) \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b9b01d29e..5b783ff8c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,7 +2,9 @@ require 'factory_girl_rails' require 'database_cleaner' require 'email_spec' require 'devise' +require 'knapsack' Dir["./spec/support/**/*.rb"].sort.each { |f| require f } +Knapsack::Adapters::RSpecAdapter.bind RSpec.configure do |config| config.use_transactional_fixtures = false @@ -101,6 +103,4 @@ RSpec.configure do |config| # test failures related to randomization by passing the same `--seed` value # as the one that triggered the failure. Kernel.srand config.seed - - -end +end \ No newline at end of file