gn_uuid 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +17 -1
- data/.travis.yml +2 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -1
- data/README.md +1 -0
- data/Rakefile +3 -1
- data/gn_uuid.gemspec +9 -7
- data/lib/gn_uuid.rb +2 -0
- data/lib/gn_uuid/uuid.rb +4 -2
- data/lib/gn_uuid/version.rb +3 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 483d9aa296899096a25927360f5dda1ce5105503
|
4
|
+
data.tar.gz: e690f69ae1ba1ce6fa4a6ca25eeada9e133bcb66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd4404af155a7f66833e62c988b09a988d41d8ce3590f4ae530acb679f518decfc0ae8ec9955213130f50c1aaa128951fff2bd4c8a1003fe511fafb68bf12f69
|
7
|
+
data.tar.gz: 916c591fb04a113637312886004df973dd4c660c43ce622c25ef034be1f40b4fd3d80c1aad1923fb1f9cca769a8f6ae565a9a1880d7657d5ec6ceebda94ba2df
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,26 @@
|
|
1
1
|
AllCops:
|
2
|
+
TargetRubyVersion: 2.4
|
2
3
|
Exclude:
|
4
|
+
- bin/**/*
|
3
5
|
- db/**/*
|
4
6
|
- bundle_bin/**/*
|
5
7
|
Include:
|
6
8
|
- gn_uuid.gemspec
|
9
|
+
|
7
10
|
Style/StringLiterals:
|
8
11
|
EnforcedStyle: double_quotes
|
9
|
-
|
12
|
+
|
13
|
+
Layout/DotPosition:
|
10
14
|
EnforcedStyle: trailing
|
15
|
+
|
16
|
+
Metrics/BlockLength:
|
17
|
+
Exclude:
|
18
|
+
- Rakefile
|
19
|
+
- "*.gemspec"
|
20
|
+
- "**/*.rake"
|
21
|
+
- "spec/**/*spec.rb"
|
22
|
+
|
23
|
+
Naming/FileName:
|
24
|
+
Exclude:
|
25
|
+
- Gemfile
|
26
|
+
- Rakefile
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Global Names UUID
|
2
2
|
=================
|
3
3
|
|
4
|
+
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.45036.svg)](http://dx.doi.org/10.5281/zenodo.45036)
|
4
5
|
[![Gem Version][gem_badge]][gem_link]
|
5
6
|
[![Continuous Integration Status][ci_badge]][ci_link]
|
6
7
|
[![Coverage Status][cov_badge]][cov_link]
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "bundler/gem_tasks"
|
2
4
|
require "rspec/core/rake_task"
|
3
5
|
require "rubocop/rake_task"
|
@@ -6,4 +8,4 @@ RSpec::Core::RakeTask.new(:rspec)
|
|
6
8
|
|
7
9
|
RuboCop::RakeTask.new
|
8
10
|
|
9
|
-
task default: [
|
11
|
+
task default: %i[rubocop rspec]
|
data/gn_uuid.gemspec
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
4
6
|
require "gn_uuid/version"
|
5
7
|
|
6
8
|
Gem::Specification.new do |gem|
|
@@ -19,17 +21,17 @@ Gem::Specification.new do |gem|
|
|
19
21
|
"identifiers."
|
20
22
|
gem.homepage = "https://github.com/GlobalNamesArchitecture/gn_uuid"
|
21
23
|
gem.license = "MIT"
|
22
|
-
gem.required_ruby_version = ">=
|
24
|
+
gem.required_ruby_version = ">= 2.4"
|
23
25
|
|
24
26
|
gem.files = `git ls-files -z`.split("\x0").
|
25
|
-
|
27
|
+
reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
28
|
gem.bindir = "exe"
|
27
29
|
gem.executables = gem.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
30
|
gem.require_paths = ["lib"]
|
29
31
|
|
30
32
|
gem.add_development_dependency "bundler", "~> 1.7"
|
31
|
-
gem.add_development_dependency "rake", "~> 10.4"
|
32
|
-
gem.add_development_dependency "rspec", "~> 3.2"
|
33
|
-
gem.add_development_dependency "rubocop", "~> 0.31"
|
34
33
|
gem.add_development_dependency "coveralls", "~> 0.8"
|
34
|
+
gem.add_development_dependency "rake", "~> 12.3"
|
35
|
+
gem.add_development_dependency "rspec", "~> 3.7"
|
36
|
+
gem.add_development_dependency "rubocop", "~> 0.58"
|
35
37
|
end
|
data/lib/gn_uuid.rb
CHANGED
data/lib/gn_uuid/uuid.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module GnUUID
|
2
4
|
# handles UUID byte string and it's conversion to different format
|
3
5
|
# NOTE: this is a general UUID class which is not limited to only v5
|
@@ -17,14 +19,14 @@ module GnUUID
|
|
17
19
|
end
|
18
20
|
|
19
21
|
def to_i
|
20
|
-
@
|
22
|
+
@to_i ||= @ary.inject(0) { |a, e| a << 8 | e }
|
21
23
|
end
|
22
24
|
|
23
25
|
def to_uri
|
24
26
|
"urn:uuid:" + to_s
|
25
27
|
end
|
26
28
|
|
27
|
-
|
29
|
+
alias inspect to_uri
|
28
30
|
|
29
31
|
def version
|
30
32
|
@ary[6] >> 4
|
data/lib/gn_uuid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gn_uuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Mozzherin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,61 +25,61 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0.8'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3
|
47
|
+
version: '12.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3
|
54
|
+
version: '12.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.58'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.58'
|
83
83
|
description: Creates UUID version 5 out of scientific name string. It uses globalnames.org
|
84
84
|
domain for DNS namespace. There is a 1:1 relationship between the string and the
|
85
85
|
corresponding UUID, so it allows globally connect data about a name string originated
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
requirements:
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
120
|
+
version: '2.4'
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - ">="
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.6.11
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Creates UUID v5 with DNS:globalnames.org namespace
|