dassets 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Dassets
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
data/lib/dassets.rb CHANGED
@@ -19,7 +19,11 @@ module Dassets
19
19
  end
20
20
 
21
21
  def self.init
22
- require self.config.assets_file
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)
@@ -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: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 1
10
- version: 0.4.1
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding