sprockets-rails 2.0.0.rc4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/rails/task.rb +39 -1
- data/lib/sprockets/railtie.rb +1 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d271ba7763932c67dc00e93a3d19edf2ff7ffb4
|
4
|
+
data.tar.gz: 82c38b9ef100ad90cb8dbd44a5b27547269d8c1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6920457524ba530f05b148d7e4be9b4d75a73052e1fd511ac442555a011b70d1ae04c646ea8e090f444dd4439fe04105990fecb93ebf69d42ee530e3df4da267
|
7
|
+
data.tar.gz: f8ab08f41162fab0a1565405d58f77967ab6bc83b1ccf733a2fc88f3c7c984d5640f66a2c4473770019e01bd1debdbbc504d51fdab3b81ea9d7c880b5abb1305
|
data/lib/sprockets/rails/task.rb
CHANGED
@@ -5,7 +5,45 @@ require 'sprockets'
|
|
5
5
|
module Sprockets
|
6
6
|
module Rails
|
7
7
|
class Task < Rake::SprocketsTask
|
8
|
-
attr_accessor :
|
8
|
+
attr_accessor :app
|
9
|
+
|
10
|
+
def initialize(app = nil)
|
11
|
+
self.app = app
|
12
|
+
super()
|
13
|
+
end
|
14
|
+
|
15
|
+
def environment
|
16
|
+
if app
|
17
|
+
app.assets
|
18
|
+
else
|
19
|
+
super
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def output
|
24
|
+
if app
|
25
|
+
File.join(app.root, 'public', app.config.assets.prefix)
|
26
|
+
else
|
27
|
+
super
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def assets
|
32
|
+
if app
|
33
|
+
app.config.assets.precompile
|
34
|
+
else
|
35
|
+
super
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def cache_path
|
40
|
+
if app
|
41
|
+
"#{app.config.root}/tmp/cache/assets"
|
42
|
+
else
|
43
|
+
@cache_path
|
44
|
+
end
|
45
|
+
end
|
46
|
+
attr_writer :cache_path
|
9
47
|
|
10
48
|
def define
|
11
49
|
namespace :assets do
|
data/lib/sprockets/railtie.rb
CHANGED
@@ -58,13 +58,7 @@ module Sprockets
|
|
58
58
|
|
59
59
|
rake_tasks do |app|
|
60
60
|
require 'sprockets/rails/task'
|
61
|
-
|
62
|
-
Sprockets::Rails::Task.new do |t|
|
63
|
-
t.environment = lambda { app.assets }
|
64
|
-
t.output = File.join(app.root, 'public', app.config.assets.prefix)
|
65
|
-
t.assets = app.config.assets.precompile
|
66
|
-
t.cache_path = "#{app.config.root}/tmp/cache/assets"
|
67
|
-
end
|
61
|
+
Sprockets::Rails::Task.new(app)
|
68
62
|
end
|
69
63
|
|
70
64
|
config.after_initialize do |app|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Peek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -93,9 +93,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- - '
|
96
|
+
- - '>='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
98
|
+
version: '0'
|
99
99
|
requirements: []
|
100
100
|
rubyforge_project:
|
101
101
|
rubygems_version: 2.0.2
|