rails2_asset_pipeline 0.1.16 → 0.1.17
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/Gemfile.lock +1 -1
- data/Readme.md +10 -0
- data/lib/rails2_asset_pipeline.rb +2 -2
- data/lib/rails2_asset_pipeline/version.rb +1 -1
- data/spec/rails2_asset_pipeline_spec.rb +11 -0
- data/spec/spec_helper.rb +1 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -96,6 +96,16 @@ end
|
|
96
96
|
### Static code
|
97
97
|
You can also use `Rails2AssetPipeline::ViewHelpers.asset_path("application.js")`
|
98
98
|
|
99
|
+
### Fast tests
|
100
|
+
To not compile assets during testing you can overwrite the manifest.
|
101
|
+
```Ruby
|
102
|
+
# spec/fixtures/empty_manifest.json
|
103
|
+
{"assets": {}, "files": {}}
|
104
|
+
|
105
|
+
# spec/spec_helper.rb
|
106
|
+
Rails2AssetPipeline.manifest = Rails.root.join("spec/fixtures/empty_manifest.json")
|
107
|
+
```
|
108
|
+
|
99
109
|
### Sass
|
100
110
|
- add `sass` to your gems for sass parsing
|
101
111
|
- add `sprockets-sass` to your gems for sass @import support
|
@@ -5,7 +5,7 @@ module Rails2AssetPipeline
|
|
5
5
|
STATIC_ENVIRONMENTS = ["production", "staging"]
|
6
6
|
|
7
7
|
class << self
|
8
|
-
attr_accessor :dynamic_assets_available
|
8
|
+
attr_accessor :dynamic_assets_available, :manifest
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.env
|
@@ -38,7 +38,7 @@ module Rails2AssetPipeline
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.manifest
|
41
|
-
"#{Rails.root}/public/assets/manifest.json"
|
41
|
+
@manifest ||= "#{Rails.root}/public/assets/manifest.json"
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.warn_user_about_misconfiguration!
|
@@ -51,4 +51,15 @@ describe Rails2AssetPipeline do
|
|
51
51
|
@mapped.should == nil
|
52
52
|
end
|
53
53
|
end
|
54
|
+
|
55
|
+
describe ".manifest" do
|
56
|
+
it "can be set" do
|
57
|
+
Rails2AssetPipeline.manifest = "xxx"
|
58
|
+
Rails2AssetPipeline.manifest.should == "xxx"
|
59
|
+
end
|
60
|
+
|
61
|
+
it "is there" do
|
62
|
+
Rails2AssetPipeline.manifest.should =~ %r{/spec/fake_rails/public/assets/manifest.json$}
|
63
|
+
end
|
64
|
+
end
|
54
65
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails2_asset_pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
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-06-
|
12
|
+
date: 2012-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
segments:
|
69
69
|
- 0
|
70
|
-
hash:
|
70
|
+
hash: -4391513140897719135
|
71
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
segments:
|
78
78
|
- 0
|
79
|
-
hash:
|
79
|
+
hash: -4391513140897719135
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
82
|
rubygems_version: 1.8.24
|