ulid 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc065154adc250d260ea69bdbf3b4f30a760ab6b
4
- data.tar.gz: 0012c1a18390f4e82cdc1a60de330dc2009d89b7
3
+ metadata.gz: 35d2c6d18033ca770195f08291137b3c7c1a433e
4
+ data.tar.gz: 07c9bd33cdb6539399b113aa1c098547ff99c6bc
5
5
  SHA512:
6
- metadata.gz: f019f4a68180707cbc28c4cd5ee3464d7be861997400879b6a6bdb7981991f8c27b385a80ab8b6868a8cd4b4c0d50b30b8d6091874560fa7f8148638589937b1
7
- data.tar.gz: 43e5d04f97ed8a34720bf1e41af6f85369a5da471e76b0166965520399e98ec37adf7e710b4f4f6631fed0c6d7a1c0adefc6676bff5c3c3a11f58a613d49e867
6
+ metadata.gz: f1816b4b5a9b0fa787ce6e955aa11725471fd0c461864bba02036de42fbc12731d7dd7054bce4f444ab57ee8d3434dd7fd0e16d43c90ba1e5f4bdf986cafc196
7
+ data.tar.gz: 804c088f3c1ddabc0d58741ef8baa9a4ead09778334581d9260b14b0028dc106f5a3eb4c9337328d603da9580e5af4b16415b6d1ea3bc26dbaff7c8ebce6250b
data/README.md CHANGED
@@ -10,6 +10,9 @@ Universally Unique Lexicographically Sortable Identifier implementation for Ruby
10
10
  <br>
11
11
  </h1>
12
12
 
13
+ [![Gem Downloads](http://img.shields.io/gem/dt/ulid.svg)](https://rubygems.org/gems/ulid)
14
+ [![GitHub License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/rafaelsales/ulid)
15
+
13
16
  # Universally Unique Lexicographically Sortable Identifier
14
17
 
15
18
  UUID can be suboptimal for many uses-cases because:
@@ -1,6 +1,6 @@
1
1
  module ULID
2
- def self.random_create
3
- Generator.new.random_create
2
+ def self.generate
3
+ Generator.new.generate
4
4
  end
5
5
  end
6
6
 
@@ -4,7 +4,7 @@ module ULID
4
4
  class Generator
5
5
  ENCODING = '0123456789ABCDEFGHJKMNPQRSTVWXYZ'
6
6
 
7
- def random_create
7
+ def generate
8
8
  encode_time(milliseconds_since_epoch, 10) + encode_random(16)
9
9
  end
10
10
 
@@ -1,3 +1,3 @@
1
1
  module ULID
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe ULID do
4
4
  it "works" do
5
- ulid = ULID.random_create
5
+ ulid = ULID.generate
6
6
  ulid.length.must_equal 26
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ulid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Sales