simple_uuid 0.0.1 → 0.0.2
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/CHANGELOG +2 -0
- data/lib/simple_uuid.rb +6 -9
- data/simple_uuid.gemspec +2 -2
- data/test/test_uuid.rb +7 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
data/CHANGELOG
CHANGED
data/lib/simple_uuid.rb
CHANGED
@@ -112,20 +112,17 @@ class UUID
|
|
112
112
|
}" + (long ? ", version: #{version}, variant: #{variant}, guid: #{to_guid}>" : ">")
|
113
113
|
end
|
114
114
|
|
115
|
+
def to_s
|
116
|
+
@bytes
|
117
|
+
end
|
118
|
+
alias bytes to_s
|
119
|
+
|
115
120
|
def hash
|
116
121
|
@bytes.hash
|
117
122
|
end
|
118
123
|
|
119
124
|
def eql?(other)
|
120
|
-
other.
|
121
|
-
end
|
122
|
-
|
123
|
-
def ==(other)
|
124
|
-
other.respond_to?(:to_i) && self.to_i == other.to_i
|
125
|
-
end
|
126
|
-
|
127
|
-
def to_s
|
128
|
-
@bytes
|
125
|
+
other.respond_to?(:bytes) && bytes == other.bytes
|
129
126
|
end
|
130
127
|
|
131
128
|
private
|
data/simple_uuid.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{simple_uuid}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ryan King"]
|
9
9
|
s.cert_chain = ["/Users/ryan/.gemkeys/gem-public_cert.pem"]
|
10
|
-
s.date = %q{2010-01-
|
10
|
+
s.date = %q{2010-01-25}
|
11
11
|
s.description = %q{Simple UUID generation.}
|
12
12
|
s.email = %q{ryan@twitter.com}
|
13
13
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/simple_uuid.rb"]
|
data/test/test_uuid.rb
CHANGED
@@ -26,10 +26,16 @@ class UUIDTest < Test::Unit::TestCase
|
|
26
26
|
def test_types_behave_well
|
27
27
|
assert !(UUID.new() == false)
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def test_uuid_casting_error
|
31
31
|
assert_raises(TypeError) do
|
32
32
|
UUID.new({})
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
def test_equality
|
37
|
+
a = UUID.new
|
38
|
+
b = a.dup
|
39
|
+
assert_equal a, b
|
40
|
+
end
|
35
41
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_uuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan King
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
zyKMYVRO0z/58g==
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2010-01-
|
33
|
+
date: 2010-01-25 00:00:00 -08:00
|
34
34
|
default_executable:
|
35
35
|
dependencies: []
|
36
36
|
|
metadata.gz.sig
CHANGED
Binary file
|