romo-av 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/lib/romo-av/dassets.rb +6 -1
- data/lib/romo-av/version.rb +1 -1
- data/test/unit/dassets_tests.rb +25 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
|
4
|
-
|
3
|
+
data.tar.gz: f3f6ea009716a42cfdc4f31ae7406796fe54403e
|
4
|
+
metadata.gz: e616ef64cfed9fa16f7f46aefb663e6b9a19d0cb
|
5
5
|
SHA512:
|
6
|
-
|
7
|
-
|
6
|
+
data.tar.gz: 3b1e586a6e7df6f7cf0faf2e3d6853ff74484f527c4b01a82ffc4c3f58c2cdd80f49726c19ebdd8c438563438c0424638d54bd54d76fd4a9648e5d1b14bbd4a5
|
7
|
+
metadata.gz: 8ceb6efdb3ede3ef37d945827c30d62d1305393a5a64140faff5401c91244f2e71a3c31fc4f3b15454f8e4f2fcbdaaacb4d016f7877103f095eb5df3b0518f82
|
data/lib/romo-av/dassets.rb
CHANGED
@@ -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
|
data/lib/romo-av/version.rb
CHANGED
data/test/unit/dassets_tests.rb
CHANGED
@@ -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.
|
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-
|
13
|
+
date: 2017-10-04 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: assert
|