dassets 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dassets/version.rb +1 -1
- data/lib/dassets.rb +5 -1
- data/test/unit/dassets_tests.rb +9 -0
- metadata +4 -4
data/lib/dassets/version.rb
CHANGED
data/lib/dassets.rb
CHANGED
@@ -19,7 +19,11 @@ module Dassets
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.init
|
22
|
-
|
22
|
+
begin
|
23
|
+
require self.config.assets_file
|
24
|
+
rescue LoadError
|
25
|
+
end
|
26
|
+
raise 'no Dassets `root_path` specified' if !self.config.required_set?
|
23
27
|
end
|
24
28
|
|
25
29
|
def self.[](digest_path)
|
data/test/unit/dassets_tests.rb
CHANGED
@@ -31,6 +31,15 @@ module Dassets
|
|
31
31
|
assert_not file.source_cache.exists?
|
32
32
|
end
|
33
33
|
|
34
|
+
should "complain if trying to init without setting the root path" do
|
35
|
+
orig_root = Dassets.config.root_path
|
36
|
+
|
37
|
+
Dassets.config.root_path = nil
|
38
|
+
assert_raises(RuntimeError){ Dassets.init }
|
39
|
+
|
40
|
+
Dassets.config.root_path = orig_root
|
41
|
+
end
|
42
|
+
|
34
43
|
end
|
35
44
|
|
36
45
|
class SourceListTests < BaseTests
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dassets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|