revs-utils 1.0.15 → 1.0.16
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 +8 -8
- data/lib/revs-utils/version.rb +1 -1
- data/lib/revs-utils.rb +1 -0
- data/spec/revs-utils_spec.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjQxMTA0MjgxNDRjNzJkOGU4OTJmNDI2NTBlZmMzYzBmMTNkZGJlOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWRiOGFmN2I4OTJhZDRjNjUxNWE3Yzk4YmM4OWRlZTcyOWYwNDdkOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzYzNTIzYzczYTE4OWI1Yjk1YzdhZWY0MzJiMmFmN2FlNzgxNzE0YjA0ZDNm
|
10
|
+
YmIyMTE4NDdkMzljYzViNjQwMjIwNjlmNTM5ZWE4YTU5YTBiOGEzMzAxMGVm
|
11
|
+
NDEwMDhiZjA0ODdjOTFhMThhN2QxZDgzNWYyOGQzZDJiYTU5ZWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmJlZDhiODE0OGJiOWE1NjdjM2JmNmM4YjQ5YTQzOTBiNGY5NzZiMzdmY2Yx
|
14
|
+
NGE3NGFhM2YxMWUzZDk5ZDYzOTg3MTQzYzIyYzkxM2FjZTcxMDZlNzgzNDcx
|
15
|
+
OWE0MjdmZTA1NDNjYjg2YjQ3MDk4ZTYzN2JmNzJmODUzNGI3NTU=
|
data/lib/revs-utils/version.rb
CHANGED
data/lib/revs-utils.rb
CHANGED
@@ -171,6 +171,7 @@ module Revs
|
|
171
171
|
|
172
172
|
# checks to see if we have a valid format
|
173
173
|
def revs_is_valid_format?(format)
|
174
|
+
return true if format.nil? || format.blank?
|
174
175
|
formats=format.split("|").collect{|f| f.strip}
|
175
176
|
!formats.collect {|f| revs_known_formats.include?(f)}.uniq.include?(false)
|
176
177
|
end
|
data/spec/revs-utils_spec.rb
CHANGED
@@ -110,6 +110,8 @@ describe "Revs-Utils" do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
it "should indicate if we have unknown formats" do
|
113
|
+
@revs.revs_is_valid_format?(nil).should be_true
|
114
|
+
@revs.revs_is_valid_format?('').should be_true
|
113
115
|
@revs.revs_is_valid_format?('slides').should be_true
|
114
116
|
@revs.revs_is_valid_format?('slide').should be_false
|
115
117
|
@revs.revs_is_valid_format?('slides | slide').should be_false
|