lexical_uuid 0.0.1 → 0.1.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/README.rdoc CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  UUIDs that are byte-ordered lamport clocks (timestamp, worker_id). Much simpler than type-1 UUID's crappy, weirdo layout.
4
4
 
5
+ = Disclaimer
6
+
7
+ This won't work on 32bit platforms. Fuck 32bit platforms.
8
+
5
9
  = Install
6
10
 
7
11
  sudo gem install lexical_uuid
@@ -21,6 +25,11 @@ r ee-1.8.7-2010.02 > LexicalUUID.new(LexicalUUID.new.to_bytes)
21
25
  r ee-1.8.7-2010.02 > LexicalUUID.new(Time.now)
22
26
  => #<LexicalUUID:0x10192df18 @worker_id=2842420286492008582, @timestamp=1281991847641387>
23
27
 
28
+ == Credits
29
+
30
+ - The idea was basically stolen from Coda Hale (@coda).
31
+ - I borrowed some code from simple_uuid by @evan, @rk, etc.
32
+
24
33
  == Copyright
25
34
 
26
35
  Copyright (c) 2010 James Golick. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.1.1
@@ -0,0 +1,58 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{lexical_uuid}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["James Golick"]
12
+ s.date = %q{2010-08-19}
13
+ s.description = %q{UUIDs that are byte-ordered lamport clocks (timestamp, worker_id). Much simpler than type-1 UUID's crappy, weirdo layout.}
14
+ s.email = %q{jamesgolick@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lexical_uuid.gemspec",
27
+ "lib/lexical_uuid.rb",
28
+ "spec/lexical_uuid_spec.rb",
29
+ "spec/spec.opts",
30
+ "spec/spec_helper.rb"
31
+ ]
32
+ s.homepage = %q{http://github.com/jamesgolick/lexical_uuid}
33
+ s.rdoc_options = ["--charset=UTF-8"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.3.7}
36
+ s.summary = %q{UUIDs that are byte-ordered lamport clocks (timestamp, worker_id). Much simpler than type-1 UUID's crappy, weirdo layout.}
37
+ s.test_files = [
38
+ "spec/lexical_uuid_spec.rb",
39
+ "spec/spec_helper.rb"
40
+ ]
41
+
42
+ if s.respond_to? :specification_version then
43
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
+ s.specification_version = 3
45
+
46
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
48
+ s.add_runtime_dependency(%q<RubyInline>, ["= 3.8.4"])
49
+ else
50
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
51
+ s.add_dependency(%q<RubyInline>, ["= 3.8.4"])
52
+ end
53
+ else
54
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
55
+ s.add_dependency(%q<RubyInline>, ["= 3.8.4"])
56
+ end
57
+ end
58
+
data/lib/lexical_uuid.rb CHANGED
@@ -39,7 +39,9 @@ class LexicalUUID
39
39
 
40
40
  private
41
41
  def create_worker_id
42
- Socket.gethostbyname(Socket.gethostname).first.fnv1a
42
+ fqdn = Socket.gethostbyname(Socket.gethostname).first
43
+ pid = Process.pid
44
+ "#{fqdn}-#{pid}".fnv1a
43
45
  end
44
46
  end
45
47
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lexical_uuid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Golick
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-16 00:00:00 -07:00
18
+ date: 2010-08-19 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -66,6 +66,7 @@ files:
66
66
  - README.rdoc
67
67
  - Rakefile
68
68
  - VERSION
69
+ - lexical_uuid.gemspec
69
70
  - lib/lexical_uuid.rb
70
71
  - spec/lexical_uuid_spec.rb
71
72
  - spec/spec.opts