name-generator 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -0
- data/README.md +6 -1
- data/Rakefile +3 -1
- data/lib/name-generator.rb +7 -2
- data/lib/name_generator.rb +4 -0
- data/lib/{name-generator → name_generator}/main.rb +6 -4
- data/lib/{name-generator → name_generator}/version.rb +3 -1
- data/spec/spec_helper.rb +3 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 55026daf57a4f6e5aac223d239b2a1da63082cfc9f3f001fc2482a9d12a46945
|
4
|
+
data.tar.gz: 0fb4c653a2a688607f1269ed2554c02932f734f29348a7a5547987cf280a0a27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da054f547fb3ccaeffca6f41b012a283abb77b3759222c9eb5339e7bf5be6d2ac501422368eb7eae6149aa1a892a140d088212f1d3e5dd85e845b1c6d4626173
|
7
|
+
data.tar.gz: f7eaf006463f04d6dba571e83d05a462cdd107b820a27f7a1aa41f96510ba7751f3673bf23b3dc143d57baaafe500ea6d78427da8f7b5af8d81d91a8e8f96f1e
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -14,6 +14,11 @@ gem 'name-generator'
|
|
14
14
|
Use in your code:
|
15
15
|
|
16
16
|
``` ruby
|
17
|
+
$ irb
|
18
|
+
require 'bundler'; Bundler.setup; nil
|
19
|
+
|
20
|
+
require 'name_generator'
|
21
|
+
|
17
22
|
generator = NameGenerator::Main.new
|
18
23
|
puts generator.next_name
|
19
24
|
# => "Foonqtar"
|
@@ -31,4 +36,4 @@ Axlesone
|
|
31
36
|
Oisova
|
32
37
|
```
|
33
38
|
|
34
|
-
For more examples see [the specs](spec/
|
39
|
+
For more examples see [the specs](spec/name_generator/main_spec.rb).
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler/setup'
|
2
4
|
Bundler.setup
|
3
5
|
require 'bundler/gem_tasks'
|
@@ -18,7 +20,7 @@ namespace :test do
|
|
18
20
|
'--fail-level', 'W'
|
19
21
|
]
|
20
22
|
# only show the files with failures
|
21
|
-
task.formatters = %w
|
23
|
+
task.formatters = %w[clang offenses]
|
22
24
|
# silence "Running RuboCop..." output:
|
23
25
|
task.verbose = ENV['CI']
|
24
26
|
# abort rake on failure
|
data/lib/name-generator.rb
CHANGED
@@ -1,2 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
warn 'The file "name-generator" is deprecated, ' \
|
4
|
+
'please require "name_generator" instead going forward. '
|
5
|
+
|
6
|
+
# For your convenience
|
7
|
+
require 'name_generator'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# This is a ruby-rewrite of "namegen.py" by Laust Rud Jacobsen (2010).
|
2
4
|
|
3
5
|
# From the original source-file (http://www.ailis.de/~k/archives/28-Name-Generator.html)
|
@@ -40,15 +42,15 @@ module NameGenerator
|
|
40
42
|
end
|
41
43
|
|
42
44
|
def digraphs
|
43
|
-
%w
|
45
|
+
%w[a ac ad ar as at ax ba bi bo ce ci co de di e ed en es ex fa fo
|
44
46
|
ga ge gi gu ha he in is it ju ka ky la le le lo mi mo na ne ne ni
|
45
47
|
no o ob oi ol on or or os ou pe pi po qt re ro sa se so ta te ti
|
46
|
-
to tu ud um un us ut va ve ve za zi
|
48
|
+
to tu ud um un us ut va ve ve za zi]
|
47
49
|
end
|
48
50
|
|
49
51
|
def trigraphs
|
50
|
-
%w
|
51
|
-
thy tri
|
52
|
+
%w[cla clu cra cre dre dro pha phi pho sha she sta stu tha the thi
|
53
|
+
thy tri]
|
52
54
|
end
|
53
55
|
end
|
54
56
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: name-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Laust Rud Jacobsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -62,8 +62,9 @@ files:
|
|
62
62
|
- README.md
|
63
63
|
- Rakefile
|
64
64
|
- lib/name-generator.rb
|
65
|
-
- lib/
|
66
|
-
- lib/
|
65
|
+
- lib/name_generator.rb
|
66
|
+
- lib/name_generator/main.rb
|
67
|
+
- lib/name_generator/version.rb
|
67
68
|
- spec/spec_helper.rb
|
68
69
|
homepage:
|
69
70
|
licenses:
|
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
86
|
version: '0'
|
86
87
|
requirements: []
|
87
88
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.
|
89
|
+
rubygems_version: 2.7.3
|
89
90
|
signing_key:
|
90
91
|
specification_version: 4
|
91
92
|
summary: Easily generate game-compatible names
|