rack-asset-compiler 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Readme.md CHANGED
@@ -24,7 +24,7 @@ in and the compiled output is expected to be returned.
24
24
  :url => '/uppercase',
25
25
  :content_type => 'text/plain',
26
26
  :source_extension => 'lower',
27
- :compiler => lamba { |source_file|
27
+ :compiler => lambda { |source_file|
28
28
  File.read(source_file).upcase
29
29
  }
30
30
  )
@@ -66,11 +66,23 @@ On Rails
66
66
  # Insert the new middleware
67
67
  Rails.application.config.middleware.use Rack::SassCompiler,
68
68
  :source_dir => 'app/sass',
69
- :url => '/javascripts',
69
+ :url => '/css',
70
70
  :syntax => :scss # :sass or :scss, defaults to :scss
71
71
 
72
+ ## Contribute
73
+
74
+ Contributions must be accompanied by passing tests. To run the test suite for
75
+ the gem you need the following gems installed:
76
+
77
+ [sudo] gem install rack rack-test haml coffee-script rspec
78
+
79
+ After installing the required gems and before beginning development,
80
+ ensure your environment is properly configured and all tests pass by
81
+ running `rake`.
82
+
72
83
  ## Thanks
73
84
  asset-compiler was inspired by [rack-coffee] by [Matthew Lyon][mattly]
85
+ ruby 1.9.2 compatibility added by [Derek Prior][derekprior]
74
86
 
75
87
  [rack-coffee]: https://github.com/mattly/rack-coffee
76
- [mattly]: https://github.com/mattly/rack-coffee
88
+ [mattly]: https://github.com/mattly/rack-coffee
@@ -68,7 +68,7 @@ module Rack
68
68
  if env['HTTP_IF_MODIFIED_SINCE']
69
69
  cached_time = Time.parse(env['HTTP_IF_MODIFIED_SINCE'])
70
70
  if last_modified_time <= cached_time
71
- return [304, {}, "Not modified\r\n"]
71
+ return [304, {}, ["Not modified\r\n"]]
72
72
  end
73
73
  end
74
74
 
@@ -85,7 +85,7 @@ module Rack
85
85
  headers['Cache-Control'] = "public,max-age=#{@cache_ttl}"
86
86
  end
87
87
 
88
- return [200, headers, body]
88
+ return [200, headers, [body]]
89
89
  end
90
90
  end
91
91
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rack-asset-compiler'
3
- s.version = "0.0.2"
3
+ s.version = "0.1.0"
4
4
  s.author = 'Jonathan Baudanza'
5
5
  s.email = 'jon@jonb.org'
6
6
  s.summary = 'Rack Middleware to facilitate the generic compiling static assets.'
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 2
10
- version: 0.0.2
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Baudanza
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-25 00:00:00 -08:00
18
+ date: 2011-04-14 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  requirements: []
93
93
 
94
94
  rubyforge_project:
95
- rubygems_version: 1.5.0
95
+ rubygems_version: 1.6.2
96
96
  signing_key:
97
97
  specification_version: 3
98
98
  summary: Rack Middleware to facilitate the generic compiling static assets.