ruby-ulid 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/ulid/version.rb +1 -1
  4. data/lib/ulid.rb +5 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd21fa1c7af3acea07d2f4e6e7842927f1b33367e26b84bc5eef9a65a64c5582
4
- data.tar.gz: da03f786abbbffa4411a4eb8b4ea189aecb3a920fb37026f1ae7f66398c5661f
3
+ metadata.gz: cea320f797b834d5a0f246db9920a9453a6d229728b428590e2f99dd275c8fe9
4
+ data.tar.gz: e703ca1896a7ee4155b1362cffdfaf9499e4ae32073cd440c50750d4e9cc9c1a
5
5
  SHA512:
6
- metadata.gz: 41143d43ef0f41f7441d0f2570bd73cad4ac6e382ea531c5f8aa30fccd5a4ff99790a356c6563c577153857b56eca8545d1b561f66b1ccdb5baa2aa281f2b692
7
- data.tar.gz: 8c3bca9d754e6003af6af000bcb0d63fddb779586f3022cb33771182efa41ee0939c8d0a781ede46807c5cbf106b3389fbbefb684122c3d5ba704a8921b9f9a5
6
+ metadata.gz: b9d0436d98095dd0084675d87a6605848f6c7ee14d65724ce5bd9229945ffc17a3b7e1efaf9a295baeaeac11782c9fc63bc901149cfa58d96046e334d5d19067
7
+ data.tar.gz: f7e016a4ca3d859f8469b5281d9f5581ffe6c0fdde737c554c627f7862461701844e46e4513ce09748e1cdf3fa4b8da2607a8d3267f74c64ae4a257ae54d6e78
data/README.md CHANGED
@@ -11,7 +11,7 @@ Also providing [ruby/rbs](https://github.com/ruby/rbs) signature files.
11
11
  ![ULIDlogo](https://raw.githubusercontent.com/kachick/ruby-ulid/main/logo.png)
12
12
 
13
13
  [![Build Status](https://github.com/kachick/ruby-ulid/actions/workflows/test_behaviors.yml/badge.svg?branch=main)](https://github.com/kachick/ruby-ulid/actions/workflows/test_behaviors.yml/?branch=main)
14
- [![Gem Version](https://badge.fury.io/rb/ruby-ulid.png)](http://badge.fury.io/rb/ruby-ulid)
14
+ [![Gem Version](https://badge.fury.io/rb/ruby-ulid.svg)](http://badge.fury.io/rb/ruby-ulid)
15
15
  [![Visual Studio Code](https://img.shields.io/badge/Visual%20Studio%20Code-0078d7.svg?style=for-the-badge&logo=visual-studio-code&logoColor=white)](https://github.dev/kachick/ruby-ulid)
16
16
 
17
17
  ## Universally Unique Lexicographically Sortable Identifier
@@ -50,7 +50,7 @@ Should be installed!
50
50
  Add this line to your application/library's `Gemfile` is needed in basic use-case
51
51
 
52
52
  ```ruby
53
- gem 'ruby-ulid', '~> 0.2.0'
53
+ gem 'ruby-ulid', '~> 0.2.2'
54
54
  ```
55
55
 
56
56
  ### Generator and Parser
data/lib/ulid/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class ULID
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.2'
6
6
  end
data/lib/ulid.rb CHANGED
@@ -370,7 +370,11 @@ class ULID
370
370
  def to_i
371
371
  @integer
372
372
  end
373
- alias_method :hash, :to_i
373
+
374
+ # @return [Integer]
375
+ def hash
376
+ [ULID, @integer].hash
377
+ end
374
378
 
375
379
  # @return [Integer, nil]
376
380
  def <=>(other)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-ulid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichi Kamiya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2022-05-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  The ULID(Universally Unique Lexicographically Sortable Identifier) has useful specs for applications (e.g. `Database key`), especially possess all `uniqueness`, `randomness`, `extractable timestamps` and `sortable` features.