uuid 1.0.0 → 1.0.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.
Files changed (8) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/README +76 -76
  3. data/Rakefile +135 -136
  4. data/bin/uuid-setup +3 -4
  5. data/changelog.txt +6 -0
  6. data/lib/uuid.rb +407 -384
  7. data/test/test-uuid.rb +26 -26
  8. metadata +30 -24
@@ -15,34 +15,34 @@ require 'uuid'
15
15
 
16
16
  class TestUUID < Test::Unit::TestCase
17
17
 
18
- def setup
18
+ def setup
19
+ end
20
+
21
+ def teardown
22
+ end
23
+
24
+ def test_format
25
+ 10.times do
26
+ uuid = UUID.new :compact
27
+ assert uuid =~ /^[0-9a-fA-F]{32}$/, "UUID does not conform to :compact format"
28
+ uuid = UUID.new :default
29
+ assert uuid =~ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/, "UUID does not conform to :default format"
30
+ uuid = UUID.new :urn
31
+ assert uuid =~ /^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i, "UUID does not conform to :urn format"
19
32
  end
20
-
21
- def teardown
22
- end
23
-
24
- def test_format
25
- 10.times do
26
- uuid = UUID.new :compact
27
- assert uuid =~ /^[0-9a-fA-F]{32}$/, "UUID does not conform to :compact format"
28
- uuid = UUID.new :default
29
- assert uuid =~ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/, "UUID does not conform to :default format"
30
- uuid = UUID.new :urn
31
- assert uuid =~ /^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i, "UUID does not conform to :urn format"
32
- end
33
- end
34
-
35
- def test_monotonic
36
- count = 100000
37
- seen = {}
38
- count.times do |i|
39
- uuid = UUID.new
40
- assert !seen.has_key?(uuid), "UUID repeated"
41
- seen[uuid] = true
42
- print '.' if (i % 10000) == 0
43
- STDOUT.flush
44
- end
33
+ end
34
+
35
+ def test_monotonic
36
+ count = 100000
37
+ seen = {}
38
+ count.times do |i|
39
+ uuid = UUID.new
40
+ assert !seen.has_key?(uuid), "UUID repeated"
41
+ seen[uuid] = true
42
+ print '.' if (i % 10000) == 0
43
+ STDOUT.flush
45
44
  end
45
+ end
46
46
 
47
47
  end
48
48
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.3
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: uuid
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2005-11-20
6
+ version: 1.0.1
7
+ date: 2006-07-27 00:00:00 -07:00
8
8
  summary: UUID generator
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: assaf@labnotes.org
12
12
  homepage: http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/UuidGenerator
13
13
  rubyforge_project: reliable-msg
@@ -18,33 +18,39 @@ bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
25
24
  version:
26
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
27
29
  authors:
28
- - Assaf Arkin
30
+ - Assaf Arkin
29
31
  files:
30
- - bin/uuid-setup
31
- - test/test-uuid.rb
32
- - lib/uuid.rb
33
- - README
34
- - MIT-LICENSE
35
- - Rakefile
36
- - changelog.txt
32
+ - bin/uuid-setup
33
+ - test/test-uuid.rb
34
+ - lib/uuid.rb
35
+ - README
36
+ - MIT-LICENSE
37
+ - Rakefile
38
+ - changelog.txt
37
39
  test_files: []
40
+
38
41
  rdoc_options:
39
- - "--main"
40
- - README
41
- - "--title"
42
- - UUID generator
43
- - "--line-numbers"
42
+ - --main
43
+ - README
44
+ - --title
45
+ - UUID generator
46
+ - --line-numbers
44
47
  extra_rdoc_files:
45
- - README
48
+ - README
46
49
  executables:
47
- - uuid-setup
50
+ - uuid-setup
48
51
  extensions: []
52
+
49
53
  requirements: []
50
- dependencies: []
54
+
55
+ dependencies: []
56
+