linux_uuid 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rvmrc +1 -1
- data/Gemfile +1 -7
- data/README.md +7 -1
- data/Rakefile +3 -17
- data/lib/linux_uuid.rb +7 -6
- data/lib/linux_uuid/version.rb +3 -0
- data/linux_uuid.gemspec +17 -52
- data/test/{test_linux_uuid.rb → linux_uuid_test.rb} +1 -8
- data/test/test_helper.rb +10 -0
- metadata +23 -54
- data/Gemfile.lock +0 -14
- data/VERSION +0 -1
data/.gitignore
ADDED
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm ruby-1.9.2-
|
1
|
+
rvm ruby-1.9.2-p136@linux_uuid
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# linux_uuid
|
2
2
|
|
3
|
-
A non-portable, fast, simple, atomic UUID generator.
|
3
|
+
A non-portable, fast, simple, atomic UUID generator.
|
4
4
|
|
5
5
|
## Usage
|
6
6
|
|
@@ -12,6 +12,12 @@ A non-portable, fast, simple, atomic UUID generator.
|
|
12
12
|
|
13
13
|
UUID.generate
|
14
14
|
|
15
|
+
## Testing
|
16
|
+
|
17
|
+
$ bundle exec rake
|
18
|
+
|
15
19
|
## Dependencies
|
16
20
|
|
21
|
+
Uses uuidgen(1) for compatability with Snow Leopard developers.
|
22
|
+
|
17
23
|
* linux:/proc/sys/kernel/random/uuid
|
data/Rakefile
CHANGED
@@ -1,24 +1,10 @@
|
|
1
|
-
require "
|
2
|
-
|
3
|
-
|
4
|
-
begin
|
5
|
-
require "jeweler"
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "linux_uuid"
|
8
|
-
gem.summary = %Q{A non-portable, fast, simple, atomic UUID generator.}
|
9
|
-
gem.email = "john@dewey.ws"
|
10
|
-
gem.homepage = "http://github.com/retr0h/linux_uuid"
|
11
|
-
gem.authors = ["retr0h"]
|
12
|
-
end
|
13
|
-
Jeweler::GemcutterTasks.new
|
14
|
-
rescue LoadError
|
15
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
16
|
-
end
|
1
|
+
require "bundler"
|
2
|
+
Bundler::GemHelper.install_tasks
|
17
3
|
|
18
4
|
require "rake/testtask"
|
19
5
|
Rake::TestTask.new(:test) do |test|
|
20
6
|
test.libs << "./lib" << "./test"
|
21
|
-
test.pattern = "test
|
7
|
+
test.pattern = "test/**/*_test.rb"
|
22
8
|
test.verbose = true
|
23
9
|
end
|
24
10
|
|
data/lib/linux_uuid.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
##
|
4
|
-
# Durty UUID generation.
|
1
|
+
require "io/extra"
|
5
2
|
|
6
3
|
class UUID
|
7
|
-
FP = File.open
|
4
|
+
FP = File.open "/proc/sys/kernel/random/uuid", "rb"
|
8
5
|
FD = FP.fileno
|
9
|
-
require "io/extra"
|
10
6
|
|
11
7
|
##
|
12
8
|
# Atomic read of Linux's UUID implementation.
|
@@ -14,4 +10,9 @@ class UUID
|
|
14
10
|
def self.generate
|
15
11
|
IO.pread(FD, 36, 0)
|
16
12
|
end
|
13
|
+
|
14
|
+
rescue Errno::ENOENT
|
15
|
+
define_singleton_method :generate do
|
16
|
+
%x{uuidgen}
|
17
|
+
end
|
17
18
|
end
|
data/linux_uuid.gemspec
CHANGED
@@ -1,60 +1,25 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "linux_uuid/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
6
|
+
s.name = "linux_uuid"
|
7
|
+
s.version = LinuxUuid::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["John Dewey"]
|
10
|
+
s.email = ["john@dewey.ws"]
|
11
|
+
s.homepage = %q{http://github.com/retr0h/linux_uuid}
|
12
|
+
s.summary = %q{A non-portable, fast, simple, atomic UUID generator.}
|
9
13
|
|
10
|
-
s.
|
11
|
-
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
"LICENSE",
|
16
|
-
"README.md"
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
".rvmrc",
|
20
|
-
"Gemfile",
|
21
|
-
"Gemfile.lock",
|
22
|
-
"LICENSE",
|
23
|
-
"README.md",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"lib/linux_uuid.rb",
|
27
|
-
"linux_uuid.gemspec",
|
28
|
-
"test/test_linux_uuid.rb"
|
29
|
-
]
|
30
|
-
s.homepage = %q{http://github.com/retr0h/linux_uuid}
|
14
|
+
s.rubyforge_project = "linux_uuid"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
31
19
|
s.require_paths = ["lib"]
|
32
|
-
s.rubygems_version = %q{1.3.7}
|
33
|
-
s.summary = %q{A non-portable, fast, simple, atomic UUID generator.}
|
34
|
-
s.test_files = [
|
35
|
-
"test/test_linux_uuid.rb"
|
36
|
-
]
|
37
20
|
|
38
|
-
|
39
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
40
|
-
s.specification_version = 3
|
21
|
+
s.add_dependency "io-extra", "~> 1.2.5"
|
41
22
|
|
42
|
-
|
43
|
-
|
44
|
-
s.add_development_dependency(%q<rake>, [">= 0"])
|
45
|
-
s.add_development_dependency(%q<minitest>, ["~> 2.0.0"])
|
46
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
|
47
|
-
else
|
48
|
-
s.add_dependency(%q<io-extra>, ["~> 1.2.3"])
|
49
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
50
|
-
s.add_dependency(%q<minitest>, ["~> 2.0.0"])
|
51
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
52
|
-
end
|
53
|
-
else
|
54
|
-
s.add_dependency(%q<io-extra>, ["~> 1.2.3"])
|
55
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
56
|
-
s.add_dependency(%q<minitest>, ["~> 2.0.0"])
|
57
|
-
s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
|
58
|
-
end
|
23
|
+
s.add_development_dependency "rake"
|
24
|
+
s.add_development_dependency "webmock"
|
59
25
|
end
|
60
|
-
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,100 +1,72 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux_uuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 1.0.1
|
4
|
+
prerelease:
|
5
|
+
version: 1.1.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
|
-
-
|
8
|
+
- John Dewey
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
13
|
+
date: 2011-05-03 00:00:00 -07:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
21
17
|
name: io-extra
|
18
|
+
prerelease: false
|
22
19
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
20
|
none: false
|
24
21
|
requirements:
|
25
22
|
- - ~>
|
26
23
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 1
|
29
|
-
- 2
|
30
|
-
- 3
|
31
|
-
version: 1.2.3
|
24
|
+
version: 1.2.5
|
32
25
|
type: :runtime
|
33
|
-
prerelease: false
|
34
26
|
version_requirements: *id001
|
35
27
|
- !ruby/object:Gem::Dependency
|
36
28
|
name: rake
|
29
|
+
prerelease: false
|
37
30
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
31
|
none: false
|
39
32
|
requirements:
|
40
33
|
- - ">="
|
41
34
|
- !ruby/object:Gem::Version
|
42
|
-
segments:
|
43
|
-
- 0
|
44
35
|
version: "0"
|
45
36
|
type: :development
|
46
|
-
prerelease: false
|
47
37
|
version_requirements: *id002
|
48
38
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
39
|
+
name: webmock
|
40
|
+
prerelease: false
|
50
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
51
42
|
none: false
|
52
43
|
requirements:
|
53
|
-
- -
|
44
|
+
- - ">="
|
54
45
|
- !ruby/object:Gem::Version
|
55
|
-
|
56
|
-
- 2
|
57
|
-
- 0
|
58
|
-
- 0
|
59
|
-
version: 2.0.0
|
46
|
+
version: "0"
|
60
47
|
type: :development
|
61
|
-
prerelease: false
|
62
48
|
version_requirements: *id003
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: jeweler
|
65
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ~>
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
segments:
|
71
|
-
- 1
|
72
|
-
- 5
|
73
|
-
- 1
|
74
|
-
version: 1.5.1
|
75
|
-
type: :development
|
76
|
-
prerelease: false
|
77
|
-
version_requirements: *id004
|
78
49
|
description:
|
79
|
-
email:
|
50
|
+
email:
|
51
|
+
- john@dewey.ws
|
80
52
|
executables: []
|
81
53
|
|
82
54
|
extensions: []
|
83
55
|
|
84
|
-
extra_rdoc_files:
|
85
|
-
|
86
|
-
- README.md
|
56
|
+
extra_rdoc_files: []
|
57
|
+
|
87
58
|
files:
|
59
|
+
- .gitignore
|
88
60
|
- .rvmrc
|
89
61
|
- Gemfile
|
90
|
-
- Gemfile.lock
|
91
62
|
- LICENSE
|
92
63
|
- README.md
|
93
64
|
- Rakefile
|
94
|
-
- VERSION
|
95
65
|
- lib/linux_uuid.rb
|
66
|
+
- lib/linux_uuid/version.rb
|
96
67
|
- linux_uuid.gemspec
|
97
|
-
- test/
|
68
|
+
- test/linux_uuid_test.rb
|
69
|
+
- test/test_helper.rb
|
98
70
|
has_rdoc: true
|
99
71
|
homepage: http://github.com/retr0h/linux_uuid
|
100
72
|
licenses: []
|
@@ -109,23 +81,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
81
|
requirements:
|
110
82
|
- - ">="
|
111
83
|
- !ruby/object:Gem::Version
|
112
|
-
segments:
|
113
|
-
- 0
|
114
84
|
version: "0"
|
115
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
86
|
none: false
|
117
87
|
requirements:
|
118
88
|
- - ">="
|
119
89
|
- !ruby/object:Gem::Version
|
120
|
-
segments:
|
121
|
-
- 0
|
122
90
|
version: "0"
|
123
91
|
requirements: []
|
124
92
|
|
125
|
-
rubyforge_project:
|
126
|
-
rubygems_version: 1.
|
93
|
+
rubyforge_project: linux_uuid
|
94
|
+
rubygems_version: 1.5.0
|
127
95
|
signing_key:
|
128
96
|
specification_version: 3
|
129
97
|
summary: A non-portable, fast, simple, atomic UUID generator.
|
130
98
|
test_files:
|
131
|
-
- test/
|
99
|
+
- test/linux_uuid_test.rb
|
100
|
+
- test/test_helper.rb
|
data/Gemfile.lock
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.1
|