cool_name_gen 0.2.0 → 0.3.0
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/README.md +8 -11
- data/lib/cool_name_gen/char_mappings.rb +30 -0
- data/lib/cool_name_gen/version.rb +1 -1
- data/lib/cool_name_gen.rb +4 -0
- data/sig/cool_name_gen/char_mappings.rbs +1 -0
- data/sig/cool_name_gen.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 006b45724f882f758bafaf491f19012d5f061ff701f457d1a40774babef81bcc
|
|
4
|
+
data.tar.gz: 5119febd8ae6ad4911b3c3a2c40d1ac7be7aa48999de0df6533bd3cfdb92cf91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a768cedc2a591ccc2852d37e8fc9c9cd2149793c9c5fd340b814322eda016ad98cd33efe4c391ea36de8aa60b9df4cadf0100fae10cb987fad713df10911ca19
|
|
7
|
+
data.tar.gz: 2f15fbb6e1f95eeba4009a7ad73c3373987aecba3a86693f15f461be5073053495597fa9ec0ed818b590e28fa4129617dac8b73e3954303299829ae2d477453b
|
data/README.md
CHANGED
|
@@ -6,29 +6,26 @@ Generate cool names from boring latin characters.
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
|
10
|
-
|
|
11
9
|
Install the gem and add to the application's Gemfile by executing:
|
|
12
10
|
|
|
13
|
-
$ bundle add
|
|
11
|
+
$ bundle add cool_name_gen
|
|
14
12
|
|
|
15
13
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
16
14
|
|
|
17
|
-
$ gem install
|
|
15
|
+
$ gem install cool_name_gen
|
|
18
16
|
|
|
19
17
|
## Usage
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Development
|
|
24
|
-
|
|
25
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
19
|
+
```ruby
|
|
20
|
+
require "cool_name_gen"
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
CoolNameGen.to_alphanumeric("mohit")
|
|
23
|
+
CoolNameGen.to_square("mohit")
|
|
24
|
+
```
|
|
28
25
|
|
|
29
26
|
## Contributing
|
|
30
27
|
|
|
31
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
28
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mohitkyadav/cool-name-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/mohitkyadav/cool-name-ruby/blob/master/CODE_OF_CONDUCT.md).
|
|
32
29
|
|
|
33
30
|
## License
|
|
34
31
|
|
|
@@ -46,5 +46,35 @@ module CoolNameGen
|
|
|
46
46
|
"y" => "🅈",
|
|
47
47
|
"z" => "🅉"
|
|
48
48
|
}.freeze
|
|
49
|
+
|
|
50
|
+
CHAR_TO_ROUNDED_MAP = {
|
|
51
|
+
" " => "_",
|
|
52
|
+
"a" => "ⓐ",
|
|
53
|
+
"b" => "ⓑ",
|
|
54
|
+
"c" => "ⓒ",
|
|
55
|
+
"d" => "ⓓ",
|
|
56
|
+
"e" => "ⓔ",
|
|
57
|
+
"f" => "ⓕ",
|
|
58
|
+
"g" => "ⓖ",
|
|
59
|
+
"h" => "ⓗ",
|
|
60
|
+
"i" => "ⓘ",
|
|
61
|
+
"j" => "ⓙ",
|
|
62
|
+
"k" => "ⓚ",
|
|
63
|
+
"l" => "ⓛ",
|
|
64
|
+
"m" => "ⓜ",
|
|
65
|
+
"n" => "ⓝ",
|
|
66
|
+
"o" => "ⓞ",
|
|
67
|
+
"p" => "ⓟ",
|
|
68
|
+
"q" => "ⓠ",
|
|
69
|
+
"r" => "ⓡ",
|
|
70
|
+
"s" => "ⓢ",
|
|
71
|
+
"t" => "ⓣ",
|
|
72
|
+
"u" => "ⓤ",
|
|
73
|
+
"v" => "ⓥ",
|
|
74
|
+
"w" => "ⓦ",
|
|
75
|
+
"x" => "ⓧ",
|
|
76
|
+
"y" => "ⓨ",
|
|
77
|
+
"z" => "ⓩ"
|
|
78
|
+
}.freeze
|
|
49
79
|
end
|
|
50
80
|
end
|
data/lib/cool_name_gen.rb
CHANGED
|
@@ -14,4 +14,8 @@ module CoolNameGen
|
|
|
14
14
|
def self.to_square(name)
|
|
15
15
|
name.downcase.chars.map { |char| CharMappings::CHAR_TO_SQUARE_MAP[char] || char }.join
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
def self.to_rounded(name)
|
|
19
|
+
name.downcase.chars.map { |char| CharMappings::CHAR_TO_ROUNDED_MAP[char] || char }.join
|
|
20
|
+
end
|
|
17
21
|
end
|
data/sig/cool_name_gen.rbs
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cool_name_gen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mohit Kumar Yadav
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-03-
|
|
11
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|