diff --git a/Gemfile b/Gemfile index 87a6f275..73d67499 100644 --- a/Gemfile +++ b/Gemfile @@ -110,6 +110,10 @@ group :test do gem 'capybara-screenshot' # Automatically save screen shots when a scenario fails gem 'rspec-cells' # Test cells using RSpec + + # Find unused CSS selectors by scraping the generated HTML in acceptance tests + gem 'deadweight', require: 'deadweight/hijack/rails', git: 'git://github.com/jmuheim/deadweight' + gem 'colored' # Provides colored output end # Use ActiveModel has_secure_password diff --git a/Gemfile.lock b/Gemfile.lock index 741b5e5f..e9ba5d13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,6 +5,14 @@ GIT specs: spring (1.0.0) +GIT + remote: git://github.com/jmuheim/deadweight + revision: 4067f6fb05ae10cb9034462d181870884c9c25fe + specs: + deadweight (0.2.2) + css_parser (~> 1.2.6) + nokogiri + GIT remote: git://github.com/jmuheim/rip_hashrocket revision: e500703e35598a3a1b680c7ca5d466b68faa2d9c @@ -80,6 +88,7 @@ GEM coffee-script-source execjs coffee-script-source (1.6.3) + colored (1.2) columnize (0.3.6) compass (0.12.2) chunky_png (~> 1.2) @@ -88,6 +97,9 @@ GEM compass-rails (2.0.alpha.0) compass (>= 0.12.2, < 0.14) coolline (0.4.2) + css_parser (1.2.6) + addressable + rdoc database_cleaner (1.2.0) debug_inspector (0.0.2) debugger (1.6.3) @@ -371,8 +383,10 @@ DEPENDENCIES capybara-screenshot cells coffee-rails (~> 4.0.0) + colored compass-rails (~> 2.0.alpha.0) database_cleaner + deadweight! devise email_spec factory_girl_rails diff --git a/README.md b/README.md index 4bad3ed7..99c1b717 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ - `$ powder install` - `$ powder link` -### Develop +### Developing - `$ powder open` opens [http://transition.dev/](http://transition.dev/) in the browser. - `$ guard` starts Guard, which takes care about executing tests (using [Spring application preloader](https://github.com/jonleighton/spring)), live reloading of the page, etc. @@ -29,6 +29,10 @@ - Use `@chrome` or `@selenium` flag to visually run acceptance tests in Chrome or Firefox. +## Deploying + +- Run `rake DEADWEIGHT=true` to make sure no unncecessary CSS selectors exist. + ## Backlog You can find the backlog here: [`BACKLOG.md`](./BACKLOG.md). diff --git a/bin/rails b/bin/rails index 657440d2..728cd85a 100755 --- a/bin/rails +++ b/bin/rails @@ -1,16 +1,4 @@ #!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'rails' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('railties', 'rails') +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake index 26c7a2d5..17240489 100755 --- a/bin/rake +++ b/bin/rake @@ -1,16 +1,4 @@ #!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'rake' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rake', 'rake') +require_relative '../config/boot' +require 'rake' +Rake.application.run