README.markdown in smurf-1.0.3 vs README.markdown in smurf-1.0.4.rails3.beta2
- old
+ new
@@ -10,11 +10,11 @@
* It will never run on its own
* It requires absolutely no configuration
* Other than installing it, you don't need to do anything
* It just gets out of your way
-Smurf will work with any version of Rails `2.x`; including Rails `2.3.4` and `2.1.2`.
+Smurf will work with most versions of Rails `2.3.x` and above; including Rails `3.0.0.beta1`.
### JSmin
It's really an adaptation of Uladzislau Latynski's [jsmin.rb](http://javascript.crockford.com/jsmin.rb) port of Douglas Crockford's [jsmin.c](http://javascript.crockford.com/jsmin.c) library.
@@ -30,48 +30,38 @@
6. Remove spaces around `;`, `:`, and `,` characters
7. Ensure whitespace between closing brackets and periods
## Installation
-I like gems. So, I suggest you install Smurf as gem. It's pretty simple, assuming you have added Gem Cutter to your list of gem sources. If you have not, do this:
+You install Smurf as a gem:
- sudo gem sources -a http://gemcutter.org
+ sudo gem install smurf
-Then, install Smurf as a gem:
+Because this latest version is intended to work with Rails 3 and above, you'll need to update your Gemfile ad add:
- sudo gem install smurf
+ gem 'smurf'
Then, wherever you define `javascript_include_tag` or `stylesheet_link_tag`, make sure to add the standard `:cache => true` or `:cache => 'some_bundle'` options.
Also make sure to at least have this setting in your production.rb:
- config.action_controller.perform_caching = true
+ config.perform_caching = true
-#### As a plugin
-
-If you really feel like it, go ahead and install Smurf as a plugin. This should do it:
-
- ./script/plugin install git://github.com/thumblemonks/smurf.git
-
-Then do the other stuff for setting up Smurf in your Rails environment.
-
### Small suggestion
[bcarpenter](http://github.com/bcarpenter) reminded all of us that Rails will generate real files if you set `config.action_controller.perform_caching` to `true`. If you happen to do this while developing your fantastic Rails app you may also accidentally commit them to your development repository. This is not what you want as it can send you and your awesome developer friends down the wrong rabbit hole ... and then when you figure out the problem you may be understandably and misguidedly pissed at Smurf :)
[bcarpenter](http://github.com/bcarpenter) didn't seem too mad since he reached out to me (whew!) and suggested I add a little comment about making sure to ignore the generated cache files/directories in your SCM of choice. If you happen to be using git, be sure to do something to the effect of the following in your `.gitignore` file:
public/*/cache/*
## Testing
-If you want to test Smurf and you don't want to test with the latest version of Rails, then do something like the following (using 2.3.4 as an example):
+Simple:
- rake RAILS_GEM_VERSION=2.3.4
+ rake
-This is the mechanism I used for testing that Smurf works for all versions:
-
- rake && rake RAILS_GEM_VERSION=2.2.2 && rake RAILS_GEM_VERSION=2.1.2
+If you want to play around with different versions, you'll need to update the Gemfile version of rails. While Smurf itself should work as is with Rails 3 and Rails 2.3.x, the test setup is different enough between 3 and 2.3.x that I can't make guarantees. If you need a previous version, look for the appropriate tag in the source code.
## Meta
Author: Justin Knowlden <gus@thumblemonks.com>