ulid-ruby 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/lib/ulid/generate.rb +1 -1
- data/lib/ulid/parse.rb +1 -1
- data/lib/ulid/version.rb +1 -1
- data/lib/ulid.rb +4 -4
- data/ulid-ruby.gemspec +3 -3
- metadata +13 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 15ca0a0b852ab53f6bcd65e8feb7ef5b42efcacab774307611a72edfb2034db5
|
4
|
+
data.tar.gz: 1c72579cc171eb3ae6aaeb6b033b04c7c822d1b8fed9bfd8da5b75a0081868e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f882a87eba0eaba107774bea7dcb073aab6ec50becb81cef983a0c179d14f6052338281a2988915fa8d1df2a2f442b7e5128202a8a7acd0ee6de5ccf007958c5
|
7
|
+
data.tar.gz: f0e3480c20262233d5a312d5e424b78ade85fc1f6f40d48d42121190607025e276804df87050a2c8fd59f9b1873af7e76fdbb24e007be0f41dbc5524bbda9318
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/lib/ulid/generate.rb
CHANGED
data/lib/ulid/parse.rb
CHANGED
data/lib/ulid/version.rb
CHANGED
data/lib/ulid.rb
CHANGED
@@ -40,7 +40,7 @@ module ULID
|
|
40
40
|
# @return [String] new ULID string encoding the given time
|
41
41
|
#
|
42
42
|
# @example Generate a ULID string for a given time
|
43
|
-
# ULID.at(Time.at(1_000_000)) #=>
|
43
|
+
# ULID.at(Time.at(1_000_000)) #=> 0000XSNJG0H890HQE70THPQ3D3
|
44
44
|
#
|
45
45
|
def self.at(at_time)
|
46
46
|
Identifier.new(at_time).ulid
|
@@ -52,7 +52,7 @@ module ULID
|
|
52
52
|
# @return [Time] UTC time value encoded by the ULID
|
53
53
|
#
|
54
54
|
# @example Parse a ULID string and get a time value
|
55
|
-
# ULID.time '0009A0QS00SGEFTGMFFEAS6B9A' #=> 1970-
|
55
|
+
# ULID.time '0009A0QS00SGEFTGMFFEAS6B9A' #=> 1970-04-26 17:46:40 UTC
|
56
56
|
#
|
57
57
|
def self.time(ulid)
|
58
58
|
Identifier.new(ulid).time.utc
|
@@ -64,7 +64,7 @@ module ULID
|
|
64
64
|
# @return [String] the lexicographically minimum ULID value for the given time
|
65
65
|
#
|
66
66
|
# @example Get minimal ULID at time
|
67
|
-
# ULID.min_ulid_at Time.at(1_000_000) #=> "
|
67
|
+
# ULID.min_ulid_at Time.at(1_000_000) #=> "0000XSNJG00000000000000000"
|
68
68
|
#
|
69
69
|
def self.min_ulid_at(at_time)
|
70
70
|
Identifier.new(at_time, MIN_ENTROPY).ulid
|
@@ -76,7 +76,7 @@ module ULID
|
|
76
76
|
# @return [String] the lexicographically maximum ULID value for the given time
|
77
77
|
#
|
78
78
|
# @example Get minimal ULID at time
|
79
|
-
# ULID.max_ulid_at Time.at(1_000_000) #=> "
|
79
|
+
# ULID.max_ulid_at Time.at(1_000_000) #=> "0000XSNJG0ZZZZZZZZZZZZZZZZ"
|
80
80
|
#
|
81
81
|
def self.max_ulid_at(at_time)
|
82
82
|
Identifier.new(at_time, MAX_ENTROPY).ulid
|
data/ulid-ruby.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
regardless of where they were generated.
|
18
18
|
}
|
19
19
|
spec.homepage = "https://github.com/abachman/ulid-ruby"
|
20
|
-
spec.license = "
|
20
|
+
spec.license = "MIT"
|
21
21
|
|
22
22
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
23
23
|
f.match(%r{^(test|spec|features)/})
|
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| file.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
|
-
spec.add_development_dependency "bundler", "~>
|
30
|
-
spec.add_development_dependency "rake", "
|
29
|
+
spec.add_development_dependency "bundler", "~> 2"
|
30
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
32
|
spec.add_development_dependency "yard", "~> 0.9"
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ulid-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Bachman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
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: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,9 +98,9 @@ files:
|
|
98
98
|
- ulid-ruby.gemspec
|
99
99
|
homepage: https://github.com/abachman/ulid-ruby
|
100
100
|
licenses:
|
101
|
-
-
|
101
|
+
- MIT
|
102
102
|
metadata: {}
|
103
|
-
post_install_message:
|
103
|
+
post_install_message:
|
104
104
|
rdoc_options: []
|
105
105
|
require_paths:
|
106
106
|
- lib
|
@@ -115,9 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
|
119
|
-
|
120
|
-
signing_key:
|
118
|
+
rubygems_version: 3.3.3
|
119
|
+
signing_key:
|
121
120
|
specification_version: 4
|
122
121
|
summary: Ruby library providing support for Universally unique Lexicographically sortable
|
123
122
|
IDentifiers
|