uuid 2.3.7 → 2.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (9) hide show
  1. checksums.yaml +7 -0
  2. data/bin/uuid +51 -12
  3. data/lib/uuid.rb +2 -2
  4. data/uuid.gemspec +3 -2
  5. metadata +21 -31
  6. data/bin/rake +0 -16
  7. data/bin/yard +0 -16
  8. data/bin/yardoc +0 -16
  9. data/bin/yri +0 -16
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6ac6d600a45b5dcb7683b3a906f4f9063a8c45b0139b9ecaad32b27c8cc44fd1
4
+ data.tar.gz: 1459c76765751c84a795472f12aae7c9ca6532405b317154c79c9293c4a60657
5
+ SHA512:
6
+ metadata.gz: a0c0e31433d777a298ac54bb0bd8b4838d4bcb4c474bbbb86d7c9510a6fe9b305fb3cbc1595e986102a5a88d0c49d6abdc6bb874afdc027c2f44c65b786c95c5
7
+ data.tar.gz: 3012167ca9eb384d1279ef1007d22b9b76ef806670377f4875e372257a258cfa6ed7ca90964d47f95203827aab82e8c9a7c65e29be6b79b364d54c384902f024
data/bin/uuid CHANGED
@@ -1,16 +1,55 @@
1
1
  #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'uuid' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
2
+ require "uuid"
3
+ require "optparse"
8
4
 
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
5
+ address = nil
6
+ count = 1
7
+ format = :default
8
+ server = false
12
9
 
13
- require 'rubygems'
14
- require 'bundler/setup'
10
+ opts = OptionParser.new("", 24, ' ') do |opts|
11
+ opts.banner = "Usage: #{File.basename($0)} [options]"
15
12
 
16
- load Gem.bin_path('uuid', 'uuid')
13
+ opts.separator "\nOptions:"
14
+ opts.on("-s", "--socket {HOST:PORT|PATH}",
15
+ "communicate on HOST:PORT or PATH (default: #{UUID::SOCKET_NAME})") do |value|
16
+ address = value
17
+ end
18
+
19
+ opts.on("-S", "--server", "run as a server") do |value|
20
+ server = value ? true : false
21
+ end
22
+
23
+ opts.on("-F", "--format {FORMAT}", "UUID format (client only)") do |value|
24
+ format = value.to_sym
25
+ end
26
+
27
+ opts.on("-C", "--count {COUNT}", "returns give number of UUIDs") do |value|
28
+ count = value.to_i
29
+ end
30
+
31
+ opts.on("-h", "--help", "Show this message") do
32
+ puts opts.to_s.gsub(/^.*DEPRECATED.*$/s, '')
33
+ exit
34
+ end
35
+
36
+ opts.on("-v", "--version", "Show version") do
37
+ puts "UUID v#{UUID::VERSION}"
38
+ exit
39
+ end
40
+
41
+ opts.parse! ARGV
42
+ end
43
+
44
+
45
+ if server
46
+ $stdout << "Starting UUID server on #{address}\n"
47
+ UUID::Server.new.listen(address || UUID::SOCKET_NAME)
48
+ else
49
+ UUID.server = address if address
50
+ $stdout << UUID.generate(format)
51
+ (count - 1).times do
52
+ $stdout.putc "\n"
53
+ $stdout << UUID.generate(format)
54
+ end
55
+ end
data/lib/uuid.rb CHANGED
@@ -175,7 +175,7 @@ class UUID
175
175
 
176
176
  @state_file = File.join(state_dir, 'ruby-uuid')
177
177
 
178
- if !File.writable?(state_dir) || (File.exists?(@state_file) && !File.writable?(@state_file)) then
178
+ if !File.writable?(state_dir) || (File.exist?(@state_file) && !File.writable?(@state_file)) then
179
179
  @state_file = File.expand_path('.ruby-uuid', '~')
180
180
  end
181
181
 
@@ -267,7 +267,7 @@ class UUID
267
267
  @sequence = rand 0x10000
268
268
 
269
269
  # Ensure the mode is respected, even with a restrictive umask
270
- File.open(state_file, 'w') { |f| f.chmod(self.class.mode) } if state_file && !File.exists?(state_file)
270
+ File.open(state_file, 'w') { |f| f.chmod(self.class.mode) } if state_file && !File.exist?(state_file)
271
271
 
272
272
  if state_file
273
273
  open_lock 'wb' do |io|
data/uuid.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'uuid'
3
- s.version = '2.3.7'
3
+ s.version = '2.3.9'
4
4
  s.summary = "UUID generator"
5
5
  s.description = <<-EOF
6
6
  UUID generator for producing universally unique identifiers based on RFC 4122
@@ -10,10 +10,11 @@ EOF
10
10
  s.authors << 'Assaf Arkin' << 'Eric Hodel'
11
11
  s.email = 'assaf@labnotes.org'
12
12
  s.homepage = 'http://github.com/assaf/uuid'
13
+ s.license = 'MIT'
13
14
 
14
15
  s.files = Dir['{bin,test,lib,docs}/**/*'] + ['README.rdoc', 'MIT-LICENSE', 'Rakefile', 'CHANGELOG', 'uuid.gemspec']
15
16
  s.executables = "uuid"
16
-
17
+
17
18
  s.rdoc_options << '--main' << 'README.rdoc' << '--title' << 'UUID generator' << '--line-numbers'
18
19
  '--webcvs' << 'http://github.com/assaf/uuid'
19
20
  s.extra_rdoc_files = ['README.rdoc', 'MIT-LICENSE']
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uuid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.7
5
- prerelease:
4
+ version: 2.3.9
6
5
  platform: ruby
7
6
  authors:
8
7
  - Assaf Arkin
@@ -10,30 +9,25 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2018-05-15 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: macaddr
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
20
  version: '1.0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
27
  version: '1.0'
31
- description: ! 'UUID generator for producing universally unique identifiers based
32
- on RFC 4122
33
-
28
+ description: |
29
+ UUID generator for producing universally unique identifiers based on RFC 4122
34
30
  (http://www.ietf.org/rfc/rfc4122.txt).
35
-
36
- '
37
31
  email: assaf@labnotes.org
38
32
  executables:
39
33
  - uuid
@@ -42,45 +36,41 @@ extra_rdoc_files:
42
36
  - README.rdoc
43
37
  - MIT-LICENSE
44
38
  files:
45
- - bin/rake
46
- - bin/uuid
47
- - bin/yard
48
- - bin/yardoc
49
- - bin/yri
50
- - test/test-uuid.rb
51
- - lib/uuid.rb
52
- - README.rdoc
39
+ - CHANGELOG
53
40
  - MIT-LICENSE
41
+ - README.rdoc
54
42
  - Rakefile
55
- - CHANGELOG
43
+ - bin/uuid
44
+ - lib/uuid.rb
45
+ - test/test-uuid.rb
56
46
  - uuid.gemspec
57
47
  homepage: http://github.com/assaf/uuid
58
- licenses: []
48
+ licenses:
49
+ - MIT
50
+ metadata: {}
59
51
  post_install_message:
60
52
  rdoc_options:
61
- - --main
53
+ - "--main"
62
54
  - README.rdoc
63
- - --title
55
+ - "--title"
64
56
  - UUID generator
65
- - --line-numbers
57
+ - "--line-numbers"
66
58
  require_paths:
67
59
  - lib
68
60
  required_ruby_version: !ruby/object:Gem::Requirement
69
- none: false
70
61
  requirements:
71
- - - ! '>='
62
+ - - ">="
72
63
  - !ruby/object:Gem::Version
73
64
  version: '0'
74
65
  required_rubygems_version: !ruby/object:Gem::Requirement
75
- none: false
76
66
  requirements:
77
- - - ! '>='
67
+ - - ">="
78
68
  - !ruby/object:Gem::Version
79
69
  version: '0'
80
70
  requirements: []
81
71
  rubyforge_project:
82
- rubygems_version: 1.8.23
72
+ rubygems_version: 2.7.3
83
73
  signing_key:
84
- specification_version: 3
74
+ specification_version: 4
85
75
  summary: UUID generator
86
76
  test_files: []
data/bin/rake DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rake' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('rake', 'rake')
data/bin/yard DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'yard' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('yard', 'yard')
data/bin/yardoc DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'yardoc' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('yard', 'yardoc')
data/bin/yri DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'yri' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('yard', 'yri')