romo-av 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da04b1393eaaa32ff310a192f04f89ee643ec9e5
4
- data.tar.gz: d2927e26502fcf3235576843727d0a7f1065bf43
3
+ data.tar.gz: f3f6ea009716a42cfdc4f31ae7406796fe54403e
4
+ metadata.gz: e616ef64cfed9fa16f7f46aefb663e6b9a19d0cb
5
5
  SHA512:
6
- metadata.gz: a685ee0145a6a6a03ac17ba8b35a9c57025f48aeaddf292999c1cc6499acdca946a8acbd65ef7ff42a41cd8ec557ae258d139727033669b8a7589905a525bb65
7
- data.tar.gz: caaeafa949115c06160f61e009e699fb1005c7864e618a592267688f4b537cd7085d69854f06c41501287d3007a3836a07e920fab5e9f9379d1c176a18661485
6
+ data.tar.gz: 3b1e586a6e7df6f7cf0faf2e3d6853ff74484f527c4b01a82ffc4c3f58c2cdd80f49726c19ebdd8c438563438c0424638d54bd54d76fd4a9648e5d1b14bbd4a5
7
+ metadata.gz: 8ceb6efdb3ede3ef37d945827c30d62d1305393a5a64140faff5401c91244f2e71a3c31fc4f3b15454f8e4f2fcbdaaacb4d016f7877103f095eb5df3b0518f82
@@ -9,6 +9,8 @@ module Romo::Av::Dassets
9
9
  # loading this combination.
10
10
 
11
11
  def self.configure!
12
+ return if @configured
13
+
12
14
  Dassets.configure do |c|
13
15
  c.source Romo::Av.gem_assets_path do |s|
14
16
  s.filter{ |paths| paths.reject{ |p| File.basename(p) =~ /^_/ } }
@@ -31,8 +33,11 @@ module Romo::Av::Dassets
31
33
  'js/romo-av-audio.js',
32
34
  'js/romo-av-video.js'
33
35
  ]
34
-
35
36
  end
37
+
38
+ @configured = true
36
39
  end
37
40
 
41
+ def self.reset!; @configured = false; end
42
+
38
43
  end
@@ -1,4 +1,4 @@
1
1
  module Romo; end
2
2
  module Romo::Av
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
@@ -7,8 +7,16 @@ module Romo::Av::Dassets
7
7
 
8
8
  class UnitTests < Assert::Context
9
9
  desc "Romo::Av::Dassets"
10
+ setup do
11
+ Romo::Av::Dassets.reset!
12
+ end
13
+ teardown do
14
+ Romo::Av::Dassets.reset!
15
+ end
10
16
  subject{ Romo::Av::Dassets }
11
17
 
18
+ should have_imeths :configure!, :reset!
19
+
12
20
  should "configure Romo::Av with Dassets" do
13
21
  subject.configure!
14
22
 
@@ -36,6 +44,23 @@ module Romo::Av::Dassets
36
44
  assert_equal exp_js_sources, Dassets.config.combinations['js/romo-av.js']
37
45
  end
38
46
 
47
+ should "only configure itself once unless reset" do
48
+ subject.configure!
49
+
50
+ dassets_call_count = 0
51
+ Assert.stub(::Dassets, :configure){ dassets_call_count += 1 }
52
+
53
+ assert_equal 0, dassets_call_count
54
+ subject.configure!
55
+ assert_equal 0, dassets_call_count
56
+
57
+ subject.reset!
58
+
59
+ assert_equal 0, dassets_call_count
60
+ subject.configure!
61
+ assert_equal 1, dassets_call_count
62
+ end
63
+
39
64
  end
40
65
 
41
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: romo-av
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2017-06-19 00:00:00 Z
13
+ date: 2017-10-04 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: assert