uuid 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,13 @@
1
+ Release 1.0.2 (Jul 28, 2006)
2
+
3
+ * Changed: Constants are not conditionally defined (removes warnings when
4
+ using in Rails.
5
+
1
6
  Release 1.0.1 (Jul 26, 2006)
2
7
 
3
8
  * Added: Regular expressions to test if a string is a UUID.
4
9
  * Changed: When used in ActiveRecord, adds as callback instead of overriding
5
- save.
10
+ save.
6
11
 
7
12
  Release 1.0.0 (Nov 20, 2005)
8
13
 
data/README CHANGED
@@ -69,7 +69,7 @@ MAC addresses in each state file.
69
69
 
70
70
  == Change log
71
71
 
72
- :include: changelog.txt
72
+ :include: CHANGELOG
73
73
 
74
74
 
75
75
  == License
data/Rakefile CHANGED
@@ -95,7 +95,7 @@ EOF
95
95
  spec.author = "Assaf Arkin"
96
96
  spec.email = "assaf@labnotes.org"
97
97
  spec.homepage = "http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/UuidGenerator"
98
- spec.files = FileList["{bin,test,lib,docs}/**/*", "README", "MIT-LICENSE", "Rakefile", "changelog.txt"].to_a
98
+ spec.files = FileList["{bin,test,lib,docs}/**/*", "README", "MIT-LICENSE", "Rakefile", "CHANGELOG"].to_a
99
99
  spec.require_path = "lib"
100
100
  spec.autorequire = "uuid.rb"
101
101
  spec.bindir = "bin"
@@ -112,48 +112,50 @@ require 'logger'
112
112
  #++
113
113
  module UUID
114
114
 
115
- VERSION = '1.0.1'
115
+ unless const_defined?(:VERSION)
116
+ VERSION = '1.0.2'
116
117
 
117
- PACKAGE = "uuid"
118
+ PACKAGE = "uuid"
118
119
 
119
- # Default state file.
120
- STATE_FILE = "uuid.state"
120
+ # Default state file.
121
+ STATE_FILE = "uuid.state"
121
122
 
122
- # Clock multiplier. Converts Time (resolution: seconds) to UUID clock (resolution: 10ns)
123
- CLOCK_MULTIPLIER = 10000000 #:nodoc:
123
+ # Clock multiplier. Converts Time (resolution: seconds) to UUID clock (resolution: 10ns)
124
+ CLOCK_MULTIPLIER = 10000000 #:nodoc:
124
125
 
125
- # Clock gap is the number of ticks (resolution: 10ns) between two Ruby Time ticks.
126
- CLOCK_GAPS = 100000 #:nodoc:
126
+ # Clock gap is the number of ticks (resolution: 10ns) between two Ruby Time ticks.
127
+ CLOCK_GAPS = 100000 #:nodoc:
127
128
 
128
- # Version number stamped into the UUID to identify it as time-based.
129
- VERSION_CLOCK = 0x0100 #:nodoc:
129
+ # Version number stamped into the UUID to identify it as time-based.
130
+ VERSION_CLOCK = 0x0100 #:nodoc:
130
131
 
131
- # Formats supported by the UUID generator.
132
- FORMATS = {:compact=>"%08x%04x%04x%04x%012x", :default=>"%08x-%04x-%04x-%04x-%012x", :urn=>"urn:uuid:%08x-%04x-%04x-%04x-%012x"} #:nodoc:
132
+ # Formats supported by the UUID generator.
133
+ FORMATS = {:compact=>"%08x%04x%04x%04x%012x", :default=>"%08x-%04x-%04x-%04x-%012x", :urn=>"urn:uuid:%08x-%04x-%04x-%04x-%012x"} #:nodoc:
133
134
 
134
- # Length (in characters) of UUIDs generated for each of the formats.
135
- FORMATS_LENGTHS = {:compact=>32, :default=>36, :urn=>45} #:nodoc:
135
+ # Length (in characters) of UUIDs generated for each of the formats.
136
+ FORMATS_LENGTHS = {:compact=>32, :default=>36, :urn=>45} #:nodoc:
136
137
 
137
- ERROR_INVALID_SEQUENCE = "Invalid sequence number: found '%s', expected 4 hexdecimal digits" #:nodoc:
138
+ ERROR_INVALID_SEQUENCE = "Invalid sequence number: found '%s', expected 4 hexdecimal digits" #:nodoc:
138
139
 
139
- ERROR_NOT_A_SEQUENCE = "Not a sequence number: expected integer between 0 and 0xFFFF" #:nodoc:
140
+ ERROR_NOT_A_SEQUENCE = "Not a sequence number: expected integer between 0 and 0xFFFF" #:nodoc:
140
141
 
141
- ERROR_INVALID_MAC_ADDR = "Invalid MAC address: found '%s', expected a number in the format XX-XX-XX-XX-XX-XX" #:nodoc:
142
+ ERROR_INVALID_MAC_ADDR = "Invalid MAC address: found '%s', expected a number in the format XX-XX-XX-XX-XX-XX" #:nodoc:
142
143
 
143
- INFO_INITIALIZED = "Initialized UUID generator with sequence number 0x%04x and MAC address %s" #:nodoc:
144
+ INFO_INITIALIZED = "Initialized UUID generator with sequence number 0x%04x and MAC address %s" #:nodoc:
144
145
 
145
- ERROR_INITIALIZED_RANDOM_1 = "Initialized UUID generator with random sequence number/MAC address." #:nodoc:
146
+ ERROR_INITIALIZED_RANDOM_1 = "Initialized UUID generator with random sequence number/MAC address." #:nodoc:
146
147
 
147
- ERROR_INITIALIZED_RANDOM_2 = "UUIDs are not guaranteed to be unique. Please create a uuid.state file as soon as possible." #:nodoc:
148
+ ERROR_INITIALIZED_RANDOM_2 = "UUIDs are not guaranteed to be unique. Please create a uuid.state file as soon as possible." #:nodoc:
148
149
 
149
- IFCONFIG_PATTERN = /[^:\-](?:[0-9A-Za-z][0-9A-Za-z][:\-]){5}[0-9A-Za-z][0-9A-Za-z][^:\-]/ #:nodoc:
150
+ IFCONFIG_PATTERN = /[^:\-](?:[0-9A-Za-z][0-9A-Za-z][:\-]){5}[0-9A-Za-z][0-9A-Za-z][^:\-]/ #:nodoc:
150
151
 
151
152
 
152
- # Regular expression to identify a 36 character UUID. Can be used for a partial match.
153
- REGEXP = /[[:xdigit:]]{8}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{12}/
153
+ # Regular expression to identify a 36 character UUID. Can be used for a partial match.
154
+ REGEXP = /[[:xdigit:]]{8}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{12}/
154
155
 
155
- # Regular expression to identify a 36 character UUID. Can only be used for a full match.
156
- REGEXP_FULL = /^[[:xdigit:]]{8}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{12}$/
156
+ # Regular expression to identify a 36 character UUID. Can only be used for a full match.
157
+ REGEXP_FULL = /^[[:xdigit:]]{8}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{4}[:-][[:xdigit:]]{12}$/
158
+ end
157
159
 
158
160
 
159
161
  @@mutex = Mutex.new
metadata CHANGED
@@ -3,8 +3,8 @@ 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.1
7
- date: 2006-07-27 00:00:00 -07:00
6
+ version: 1.0.2
7
+ date: 2006-08-19 00:00:00 -07:00
8
8
  summary: UUID generator
9
9
  require_paths:
10
10
  - lib
@@ -35,7 +35,7 @@ files:
35
35
  - README
36
36
  - MIT-LICENSE
37
37
  - Rakefile
38
- - changelog.txt
38
+ - CHANGELOG
39
39
  test_files: []
40
40
 
41
41
  rdoc_options: