diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 00d139e..e73dd6f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2015-10-03 13:56:01 -0500 using RuboCop version 0.34.1. +# on 2015-10-20 18:42:42 -0500 using RuboCop version 0.34.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 2 +# Offense count: 3 # Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: - Max: 86 + Max: 91 diff --git a/BACKLOG.md b/BACKLOG.md index a9fd03d..10a6c24 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -6,5 +6,5 @@ ## Features - Allow the user to pass arguments to Penthouse.js, i.e. Viewport size, etc. For a list of the configurable options, please see [Penthouse](https://github.com/pocketjoso/penthouse) - Improve installation process, if necessary -- Improve manual processes, if possible (i.e having to run the rake task to generate the the critical CSS) +- Improve manual processes, if possible (i.e having to run the rake task to generate the critical CSS) - Improve implementation. Is their a better solution then using Rails.cache? \ No newline at end of file diff --git a/README.md b/README.md index b545707..4100dd6 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ First, you'll need to configue a few things in the YAML file: `config/critical_p Before generating the CSS, ensure that your application is running (viewable from a browser) and the main CSS file exists. Then in a separate tab, run the rake task to generate the critical CSS. -If your main CSS file does not already exist, and you are using the Asset Pipeline, generate the main CSS file. +If you are using the Asset Pipeline, precompiling the assets will generate the critical CSS after the assets are precompiled. ``` rake assets:precompile ``` -Generate the critical path CSS: +Else you can generate the critical CSS manually using the below task: ``` rake critical_path_css:generate ``` diff --git a/lib/critical_path_css/rails/version.rb b/lib/critical_path_css/rails/version.rb index 0cf9675..38862d2 100644 --- a/lib/critical_path_css/rails/version.rb +++ b/lib/critical_path_css/rails/version.rb @@ -1,6 +1,6 @@ module CriticalPathCSS module Rails - VERSION = '0.2.0' + VERSION = '0.2.1' PENTHOUSE_VERSION = '0.3.4' end end diff --git a/lib/tasks/critical_path_css.rake b/lib/tasks/critical_path_css.rake index 7f97a67..5137a4e 100644 --- a/lib/tasks/critical_path_css.rake +++ b/lib/tasks/critical_path_css.rake @@ -6,3 +6,5 @@ namespace :critical_path_css do CriticalPathCss.generate end end + +Rake::Task['assets:precompile'].enhance { Rake::Task['critical_path_css:generate'].invoke }