zassets 0.1.11 → 0.1.12
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/lib/zassets/compiler.rb +7 -1
- data/lib/zassets/version.rb +1 -1
- data/spec/zassets/compiler_spec.rb +11 -2
- metadata +3 -3
data/lib/zassets/compiler.rb
CHANGED
@@ -2,6 +2,8 @@ require 'sprockets'
|
|
2
2
|
|
3
3
|
module ZAssets
|
4
4
|
class Compiler
|
5
|
+
MANIFEST_FILENAME = 'manifest.json'
|
6
|
+
|
5
7
|
attr_writer :manifest
|
6
8
|
|
7
9
|
def initialize(config)
|
@@ -13,7 +15,11 @@ module ZAssets
|
|
13
15
|
end
|
14
16
|
|
15
17
|
def manifest
|
16
|
-
@manifest ||= Sprockets::Manifest.new(environment,
|
18
|
+
@manifest ||= Sprockets::Manifest.new(environment, manifest_path)
|
19
|
+
end
|
20
|
+
|
21
|
+
def manifest_path
|
22
|
+
[@config[:compile_path], MANIFEST_FILENAME].join '/'
|
17
23
|
end
|
18
24
|
|
19
25
|
def environment
|
data/lib/zassets/version.rb
CHANGED
@@ -17,18 +17,27 @@ module ZAssets
|
|
17
17
|
it 'builds a sprockets manifest' do
|
18
18
|
Sprockets::Manifest.should_receive(:new).with(
|
19
19
|
compiler.environment,
|
20
|
-
|
20
|
+
compiler.manifest_path
|
21
21
|
)
|
22
22
|
compiler.manifest
|
23
23
|
end
|
24
24
|
|
25
|
-
it 'returns the sprockets manifest'do
|
25
|
+
it 'returns the sprockets manifest' do
|
26
26
|
manifest = double('manifest')
|
27
27
|
Sprockets::Manifest.stub(:new) { manifest }
|
28
28
|
compiler.manifest.should == manifest
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
describe '#manifest_path' do
|
33
|
+
it 'returns the manifest file path' do
|
34
|
+
compiler.manifest_path.should == File.join(
|
35
|
+
config[:compile_path],
|
36
|
+
'manifest.json'
|
37
|
+
)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
32
41
|
describe '#environment' do
|
33
42
|
it 'builds a sprockets env' do
|
34
43
|
SprocketsEnv.should_receive(:new).with(config)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zassets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|
@@ -200,6 +200,6 @@ rubyforge_project:
|
|
200
200
|
rubygems_version: 1.8.23
|
201
201
|
signing_key:
|
202
202
|
specification_version: 3
|
203
|
-
summary: zassets-0.1.
|
203
|
+
summary: zassets-0.1.12
|
204
204
|
test_files: []
|
205
205
|
has_rdoc:
|