haikunator 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +0 -1
- data/README.md +32 -8
- data/lib/haikunator.rb +7 -9
- data/lib/haikunator/version.rb +1 -1
- metadata +3 -5
- data/CHANGELOG.md +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: be3fa8b9414e4135e6c760c9fdf59993b85a9b374716a4c5a9aa7eb3c95f1e4e
|
4
|
+
data.tar.gz: 95137758b3daf86d4806a59afa5f55978b7886e3e873ff3db4c75e65669e8e9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6767bb6aa931fe4b417090ccc00cf4bfac5664923852e42056f953ae35c3554b33c40ab087e950912e807905f737e569af72f42445dcf90364384eb9a0fe3790
|
7
|
+
data.tar.gz: a37d2cfc63e278d03bc7acd06fb19624d50938ec372eaed389a24e9bf8f5cc24004e1dec60f79433c4b1f4e4ef94ddeb047ecd66227cf924bf613574849a2126
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -40,10 +40,6 @@ Haikunator.haikunate(9999, '.') # => "cool.leaf.6743"
|
|
40
40
|
Haikunator.haikunate(0, ' ') # => "green fire"
|
41
41
|
```
|
42
42
|
|
43
|
-
## History
|
44
|
-
|
45
|
-
View the [changelog](https://github.com/usmanbashir/haikunator/blob/master/CHANGELOG.md)
|
46
|
-
|
47
43
|
## Contributing
|
48
44
|
|
49
45
|
Everyone is encouraged to help improve this project. Here are a few ways you can help:
|
@@ -53,7 +49,35 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
|
|
53
49
|
- Write, clarify, or fix documentation
|
54
50
|
- Suggest or add new features
|
55
51
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
52
|
+
## Language Ports
|
53
|
+
|
54
|
+
Haikunator has also been ported to other languages. Though, these projects are not
|
55
|
+
affiliated with or endorsed by me, but check them out:
|
56
|
+
|
57
|
+
- Go:
|
58
|
+
- [Go-Haikunator](https://github.com/yelinaung/go-haikunator)
|
59
|
+
- [Haikunator](https://github.com/gjohnson/haikunator)
|
60
|
+
- [Haikunator](https://github.com/taion809/haikunator)
|
61
|
+
- JavaScript:
|
62
|
+
- [HaikunatorJS](https://github.com/Atrox/haikunatorjs)
|
63
|
+
- Python:
|
64
|
+
- [PyHaikunator](https://github.com/ferhatelmas/pyhaikunator)
|
65
|
+
- [HaikunatorPy](https://github.com/Atrox/haikunatorpy)
|
66
|
+
- PHP:
|
67
|
+
- [HaikunatorPHP](https://github.com/Atrox/haikunatorphp)
|
68
|
+
- Elixir:
|
69
|
+
- [Haikunator](https://github.com/knrz/Haikunator)
|
70
|
+
- .NET:
|
71
|
+
- [Haikunator.NET](https://github.com/Atrox/haikunator.net)
|
72
|
+
- Java:
|
73
|
+
- [HaikunatorJAVA](https://github.com/Atrox/haikunatorjava)
|
74
|
+
- Dart:
|
75
|
+
- [HaikunatorDART](https://github.com/Atrox/haikunatordart)
|
76
|
+
- Rust
|
77
|
+
- [rust-haikunator](https://github.com/nishanths/rust-haikunator)
|
78
|
+
- Crystal
|
79
|
+
- [Haikunator](https://github.com/sanata-/haikunator)
|
80
|
+
- R
|
81
|
+
- [Haikunator](http://github.com/amrrs/haikunator)
|
82
|
+
- Clojure
|
83
|
+
- [clj-haikunator](https://github.com/staticweb-io/clj-haikunator)
|
data/lib/haikunator.rb
CHANGED
@@ -4,17 +4,15 @@ require "securerandom"
|
|
4
4
|
module Haikunator
|
5
5
|
class << self
|
6
6
|
def haikunate(token_range = 9999, delimiter = "-")
|
7
|
-
|
8
|
-
|
9
|
-
build(seed, token_range, delimiter)
|
7
|
+
build(token_range, delimiter)
|
10
8
|
end
|
11
9
|
|
12
10
|
private
|
13
11
|
|
14
|
-
def build(
|
12
|
+
def build(token_range, delimiter)
|
15
13
|
sections = [
|
16
|
-
adjectives[
|
17
|
-
nouns[
|
14
|
+
adjectives[random_seed % adjectives.length],
|
15
|
+
nouns[random_seed % nouns.length],
|
18
16
|
token(token_range)
|
19
17
|
]
|
20
18
|
|
@@ -22,7 +20,7 @@ module Haikunator
|
|
22
20
|
end
|
23
21
|
|
24
22
|
def random_seed
|
25
|
-
|
23
|
+
SecureRandom.random_number(4096)
|
26
24
|
end
|
27
25
|
|
28
26
|
def token(range)
|
@@ -36,7 +34,7 @@ module Haikunator
|
|
36
34
|
twilight dawn crimson wispy weathered blue billowing
|
37
35
|
broken cold damp falling frosty green long late lingering
|
38
36
|
bold little morning muddy old red rough still small
|
39
|
-
sparkling
|
37
|
+
sparkling thrumming shy wandering withered wild black
|
40
38
|
young holy solitary fragrant aged snowy proud floral
|
41
39
|
restless divine polished ancient purple lively nameless
|
42
40
|
)
|
@@ -50,7 +48,7 @@ module Haikunator
|
|
50
48
|
bush dew dust field fire flower firefly feather grass
|
51
49
|
haze mountain night pond darkness snowflake silence
|
52
50
|
sound sky shape surf thunder violet water wildflower
|
53
|
-
wave water resonance sun
|
51
|
+
wave water resonance sun log dream cherry tree fog
|
54
52
|
frost voice paper frog smoke star
|
55
53
|
)
|
56
54
|
end
|
data/lib/haikunator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haikunator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Usman Bashir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -64,7 +64,6 @@ files:
|
|
64
64
|
- ".rspec"
|
65
65
|
- ".rubocop.yml"
|
66
66
|
- ".travis.yml"
|
67
|
-
- CHANGELOG.md
|
68
67
|
- Gemfile
|
69
68
|
- LICENSE.txt
|
70
69
|
- README.md
|
@@ -93,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
92
|
- !ruby/object:Gem::Version
|
94
93
|
version: '0'
|
95
94
|
requirements: []
|
96
|
-
|
97
|
-
rubygems_version: 2.2.2
|
95
|
+
rubygems_version: 3.0.3
|
98
96
|
signing_key:
|
99
97
|
specification_version: 4
|
100
98
|
summary: Heroku-like random name generator.
|
data/CHANGELOG.md
DELETED