organic_hash 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -1
- data/lib/organic_hash.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -6,6 +6,12 @@ Converts strings to awesome scifi objects!!
|
|
6
6
|
Organic Hash hashes strings (user ID, hashes) to a human-readable, scifi-themed
|
7
7
|
representation.
|
8
8
|
|
9
|
+
## Install
|
10
|
+
|
11
|
+
```bash
|
12
|
+
$ gem install organic_hash
|
13
|
+
```
|
14
|
+
|
9
15
|
## Usage
|
10
16
|
|
11
17
|
Basic usage
|
@@ -32,7 +38,7 @@ Different length
|
|
32
38
|
Random hashes
|
33
39
|
|
34
40
|
```ruby
|
35
|
-
> oh = OrganicHash.new
|
41
|
+
> oh = OrganicHash.new
|
36
42
|
> oh.rand
|
37
43
|
=> "most-cool-coffee"
|
38
44
|
> oh.rand
|
@@ -63,3 +69,5 @@ Apache License, Version 2.0
|
|
63
69
|
|
64
70
|
https://github.com/josephcc/organic_hash
|
65
71
|
|
72
|
+
http://rubygems.org/gems/organic_hash
|
73
|
+
|
data/lib/organic_hash.rb
CHANGED
@@ -3,7 +3,7 @@ require 'securerandom'
|
|
3
3
|
|
4
4
|
class OrganicHash
|
5
5
|
|
6
|
-
VERSION = "1.0.
|
6
|
+
VERSION = "1.0.1"
|
7
7
|
DATA_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..', 'data'))
|
8
8
|
NOUN = File.read(File.join(DATA_DIR, "noun.dat")).split("\n")
|
9
9
|
ADJ = File.read(File.join(DATA_DIR, "adj.dat")).split("\n")
|