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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d64111c0b44ceb6e2ab26ad375e9bdbd312bb2018a31cc3e7474535f06bda3c3
4
- data.tar.gz: 289ed218a56e7e96eb8484cf51925ba7c6253fd7a14551480a3cca869e96bf4f
3
+ metadata.gz: 006b45724f882f758bafaf491f19012d5f061ff701f457d1a40774babef81bcc
4
+ data.tar.gz: 5119febd8ae6ad4911b3c3a2c40d1ac7be7aa48999de0df6533bd3cfdb92cf91
5
5
  SHA512:
6
- metadata.gz: 69bd8b02ed70ec355748210b555e46fcdf48076542f3d585ab04ea1eb230e4fca4ec973a2d7b82fef4431d415496829204bc8528dda1925a9f320b8cb06dfcad
7
- data.tar.gz: 8dc0949dff0567e1e5080ccd54a2d491a523ba6104a6368d7fd094cf4468499daef1ad83d5b0114a6c04f33c3f2dda9e89e7d165525e6e6630ec651a9a92bb72
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ $ gem install cool_name_gen
18
16
 
19
17
  ## Usage
20
18
 
21
- TODO: Write usage instructions here
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
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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/[USERNAME]/cool_name_gen. 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/[USERNAME]/cool_name_gen/blob/master/CODE_OF_CONDUCT.md).
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CoolNameGen
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  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
@@ -1,6 +1,7 @@
1
1
  module CoolNameGen
2
2
  module CharMappings
3
3
  CHAR_TO_NUM_MAP: hash[string, string]
4
+ CHAR_TO_ROUNDED_MAP: hash[string, string]
4
5
  CHAR_TO_SQUARE_MAP: hash[string, string]
5
6
  end
6
7
  end
@@ -3,5 +3,7 @@ module CoolNameGen
3
3
  # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
4
  def self.to_alphanumeric: -> string
5
5
 
6
+ def self.to_rounded: -> string
7
+
6
8
  def self.to_square: -> string
7
9
  end
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.2.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-18 00:00:00.000000000 Z
11
+ date: 2025-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec