Skip to content
Browse files

version to 3.0.0

updated the use the latest ruby parser based on less.js
  • Loading branch information...
1 parent e98ee4d commit adc596ae117a24287748a694177b2fb05b347583 @kellyredding kellyredding committed Aug 26, 2011
Showing with 29 additions and 28 deletions.
  1. +3 −0 Gemfile
  2. +15 −19 Gemfile.lock
  3. +9 −7 README.rdoc
  4. +2 −2 lib/rack/less/version.rb
View
3 Gemfile
@@ -2,3 +2,6 @@ source "http://rubygems.org"
# Specify your gem's dependencies in rack-less.gemspec
gemspec
+
+gem "rake", "~> 0.9.2"
+gem "differ"
View
34 Gemfile.lock
@@ -1,37 +1,31 @@
PATH
remote: .
specs:
- rack-less (2.0.2)
- less (~> 1.2)
+ rack-less (3.0.0)
+ less (~> 2.0)
rack (~> 1.0)
GEM
remote: http://rubygems.org/
specs:
- json (1.5.1)
- kelredd-useful (0.4.1)
- json
- leftright (0.9.0)
- less (1.2.21)
- mutter (>= 0.4.2)
- treetop (>= 1.4.2)
- mutter (0.5.3)
+ ansi (1.3.0)
+ assert (0.3.0)
+ ansi (~> 1.3)
+ differ (0.1.2)
+ less (2.0.6)
+ therubyracer (~> 0.9.2)
+ libv8 (3.3.10.2)
nokogiri (1.4.4)
- polyglot (0.3.1)
rack (1.2.2)
rack-test (0.5.7)
rack (>= 1.0)
- shoulda (2.11.3)
+ rake (0.9.2)
sinatra (1.2.1)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
- test-belt (0.2.1)
- kelredd-useful (~> 0.4.0)
- leftright (~> 0.9.0)
- shoulda (~> 2.11)
+ therubyracer (0.9.4)
+ libv8 (~> 3.3.10)
tilt (1.2.2)
- treetop (1.4.9)
- polyglot (>= 0.3.1)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
@@ -42,10 +36,12 @@ PLATFORMS
ruby
DEPENDENCIES
+ assert (~> 0.3.0)
bundler (~> 1.0)
+ differ
rack-less!
rack-test (>= 0.5.3)
+ rake (~> 0.9.2)
sinatra (>= 0.9.4)
- test-belt (= 0.2.1)
webrat (>= 0.6.0)
yui-compressor (>= 0.9.1)
View
16 README.rdoc
@@ -4,6 +4,8 @@
A better way to use LESS CSS in Ruby web apps.
+* Update: rack-less as of v3.x.x \ uses the latest version of the ruby less parser, https://github.com/cowboyd/less.rb (based on less.js). To use the older ruby based parse, require rack-less ~> 2.0.
+
== Installation
$ gem install rack-less
@@ -16,7 +18,7 @@ or uses Rack::Builder to construct the application pipeline, simply require
and use as follows:
require 'rack/less'
-
+
# optional - use as necessary
Rack::Less.configure do |config|
config.compress = true
@@ -49,7 +51,7 @@ Add any configs in an initializer (optional - use as necessary):
You should now see `Rack::Less` listed in the middleware pipeline:
rake middleware
-
+
== Available Configurations
* .*cache* [false]
@@ -69,7 +71,7 @@ You should now see `Rack::Less` listed in the middleware pipeline:
- :*true* - use Time.now.to_i as the explicit value (will never cache)
- :*nil* - change cache bust value if the file is modified (similar to Rails' stylesheet_link_tag)
- :*<any other value>* - add the value as "foo.css?<value>"
-
+
== Available Options
* :*root* ["."]
@@ -101,7 +103,7 @@ At times, it is useful to combine multiple stylesheets and serve them as one res
stylesheet_link_tag 'reset', 'common', 'app_web', :cache => 'web'
stylesheet_link_tag 'reset', 'common', 'iui', 'app_mobile', :cache => 'mobile'
-
+
Rack::Less uses combinations, in conjunction with the :cache config setting, to provide this function. Combinations are configured using a hash, where the key is the resource name and the value is an array of names corresponding to stylesheets to combine as the named resource. For the above example, use a configuration like this:
Rack::Less.configure do |config|
@@ -115,14 +117,14 @@ and stylesheet link tags like this:
# equivalent to: stylesheet_link_tag 'reset', 'common', 'app_web'
stylesheet_link_tag Rack::Less.stylesheet('web')
-
+
# equivalent to: stylesheet_link_tag 'reset', 'common', 'iui', 'app_mobile'
stylesheet_link_tag Rack::Less.stylesheet('mobile')
-
+
If you configure Rack::Less to cache, with something like this:
Rack::Less.config.cache = true
-
+
then the same stylesheet link tags behave like they have the :cache option set, respectively:
# equivalent to: stylesheet_link_tag 'reset', 'common', 'app_web', :cache => 'web'
View
4 lib/rack/less/version.rb
@@ -1,5 +1,5 @@
module Rack
module Less
- VERSION = '2.0.2'
+ VERSION = '3.0.0'
end
-end
+end

0 comments on commit adc596a

Please sign in to comment.
Something went wrong with that request. Please try again.