nice_uuid 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/README.md +1 -1
- data/lib/nice_uuid/version.rb +1 -1
- data/nice_uuid.gemspec +2 -2
- data/spec/lib/nice_uuid_spec.rb +5 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d67343081684d897ddcc7ae32b6ea86a7bacb0b8
|
4
|
+
data.tar.gz: 29d0058a499485dc9f334320d8b1d985718f839a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e7373228e87e4a3e00e2d8475ab8bdd428595d326f6bdf8df5585dee6fc6cd196afde7fdff5f948c1eb342825f7a76bc145894b8e4090534274745511226622
|
7
|
+
data.tar.gz: 4031475a19b8ef2cd99558d468c4475572501a2f01a40db910a64c3e081cd13883ca6eecce0ee14856eb94b8ff62bdf95dfb84406e0aa83b0e6fdce707505d5e
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.0.0-p247
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# NiceUuid
|
2
2
|
|
3
|
-
for user-facing UUIDs
|
3
|
+
ideal for user-facing UUIDs. You probably shouldn't use this if you are relying on unique identifiers in the multi-billions range. A very rough calculation revealed 10 million can be generated with a collision probability far below 1 ten-thousandth of a percent. If that sounds like it's good enough for you, then go forth friend, and use with confidence.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
data/lib/nice_uuid/version.rb
CHANGED
data/nice_uuid.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = NiceUuid::VERSION
|
9
9
|
spec.authors = ["Alex Gessner"]
|
10
10
|
spec.email = ["alex.gessner@gmail.com"]
|
11
|
-
spec.description = 'nice and easy uuids'
|
12
|
-
spec.summary = 'NiceUuid.generate(36) for a
|
11
|
+
spec.description = 'nice and easy, user-facing uuids'
|
12
|
+
spec.summary = 'NiceUuid.generate(36) for a pleasant uuid with 4, dash-separated, readable words'
|
13
13
|
spec.homepage = "https://github.com/xgess/nice_uuid"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/spec/lib/nice_uuid_spec.rb
CHANGED
@@ -15,5 +15,10 @@ describe NiceUuid do
|
|
15
15
|
it 'eventually yields a solution for an obnoxious request' do
|
16
16
|
NiceUuid::generate(27).length.should <= 27
|
17
17
|
end
|
18
|
+
|
19
|
+
it 'does not have a collision in 100,000 attempts' do
|
20
|
+
array_of_results = (1..100000).map { NiceUuid::generate }
|
21
|
+
array_of_results.uniq.count.should == 100000
|
22
|
+
end
|
18
23
|
end
|
19
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nice_uuid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Gessner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: nice and easy uuids
|
55
|
+
description: nice and easy, user-facing uuids
|
56
56
|
email:
|
57
57
|
- alex.gessner@gmail.com
|
58
58
|
executables: []
|
@@ -60,6 +60,8 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- .gitignore
|
63
|
+
- .ruby-version
|
64
|
+
- .travis.yml
|
63
65
|
- Gemfile
|
64
66
|
- LICENSE.txt
|
65
67
|
- README.md
|
@@ -93,7 +95,8 @@ rubyforge_project:
|
|
93
95
|
rubygems_version: 2.0.6
|
94
96
|
signing_key:
|
95
97
|
specification_version: 4
|
96
|
-
summary: NiceUuid.generate(36) for a
|
98
|
+
summary: NiceUuid.generate(36) for a pleasant uuid with 4, dash-separated, readable
|
99
|
+
words
|
97
100
|
test_files:
|
98
101
|
- spec/lib/nice_uuid_spec.rb
|
99
102
|
- spec/spec_helper.rb
|