vidibus-uuid 0.3.9 → 0.3.10
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/VERSION +1 -1
- data/lib/vidibus/uuid/mongoid.rb +3 -1
- data/spec/vidibus/uuid/mongoid_spec.rb +13 -0
- data/vidibus-uuid.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.10
|
data/lib/vidibus/uuid/mongoid.rb
CHANGED
@@ -25,6 +25,19 @@ describe "Vidibus::Uuid::Mongoid" do
|
|
25
25
|
model.uuid.length.should eql(32)
|
26
26
|
end
|
27
27
|
|
28
|
+
it "should not generate a new UUID if a value has been set" do
|
29
|
+
new_model.uuid = "test"
|
30
|
+
new_model.save
|
31
|
+
new_model.uuid.should eql("test")
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should generate a new UUID if a blank value has been set" do
|
35
|
+
new_model.uuid = ""
|
36
|
+
new_model.save
|
37
|
+
new_model.uuid.should_not eql("")
|
38
|
+
new_model.should be_valid
|
39
|
+
end
|
40
|
+
|
28
41
|
it "should keep the UUID persistent" do
|
29
42
|
uuid = model.uuid
|
30
43
|
model.save!
|
data/vidibus-uuid.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidibus-uuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 10
|
10
|
+
version: 0.3.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Pankratz
|