has_versions 0.6.0 → 0.6.1
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.
data/has_versions.gemspec
CHANGED
@@ -18,7 +18,7 @@ module HasVersions
|
|
18
18
|
|
19
19
|
def associated_versions
|
20
20
|
if versioning_configuration.associated_versions_callback
|
21
|
-
instance_eval(&versioning_configuration.associated_versions_callback)
|
21
|
+
instance_eval(&versioning_configuration.associated_versions_callback).compact
|
22
22
|
else
|
23
23
|
nil
|
24
24
|
end
|
@@ -26,11 +26,11 @@ module HasVersions
|
|
26
26
|
def test_associated_versions_when_defined
|
27
27
|
model = Class.new(VersionedRecord) do
|
28
28
|
versioning_configuration.associated_versions do
|
29
|
-
"#{name} Hendrix"
|
29
|
+
["#{name} Hendrix", nil]
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
assert_equal "Jimi Hendrix", model.new(name: "Jimi").associated_versions
|
33
|
+
assert_equal ["Jimi Hendrix"], model.new(name: "Jimi").associated_versions
|
34
34
|
end
|
35
35
|
|
36
36
|
def test_associated_versions_when_not_defined
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_versions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|