render-text-helper 0.4.0 → 0.4.1

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: 976a5049554652256d97459fad88c7aa9df80eb039ce8d1afe886b08c54282f2
4
- data.tar.gz: 969f89a11f8a039984cc99ee6838454b3af07dd12fbe4335269c9a618dadd706
3
+ metadata.gz: b7cde7c2690826b2c8a735bb088254f4cac6e7fd818f3f2605cf16a5a1b82e3e
4
+ data.tar.gz: 5e09fd32cbf9028e9d3ee0846a5f76dabd914302e369072c1faa815660fcc36b
5
5
  SHA512:
6
- metadata.gz: 047de4cedc9dac79094b1eb50739e2081a9d6f61df68bbe142138c39516efce06bbf487e1d8ad8b4e4dce3787b3c4415e75b92c69375be56fc16670da49ba844
7
- data.tar.gz: a2bc1a496320d5b525d414aae15bcfa7cb4ab09c574babd5c87db6b340594700880cc3e7fdf61e59e5d3e4e32ebdfe3f674bd2d97c4c4ccbb4d07a911fa240dc
6
+ metadata.gz: 5551f2993778b2ef40550bf3d711ef011553bd08873a1cdea4c83ce6ae0e3da4a6c6bf37ec603d40f6dc4a483426c34471167a8ec74eade4c378a9439a9d3fa0
7
+ data.tar.gz: 942d652b160aa69a4f91e41bd4122cf4d9a88ad66ee1b3e98e7db8dbf65c1301b0be46b2db5004bab73129432b21eb7cb0d9f903cf1262f0df6b58d2541b595b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.1] - 2025-14-10
4
+
5
+ - Added add_percent_sign method that adds percentage to float
6
+
3
7
  ## [0.4.0] - 2025-17-02
4
8
 
5
9
  - Added to_titleize
data/Gemfile.lock CHANGED
@@ -1,38 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- render-text-helper (0.4.0)
4
+ render-text-helper (0.4.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.2)
10
- diff-lcs (1.6.0)
11
- json (2.10.1)
12
- language_server-protocol (3.17.0.4)
9
+ ast (2.4.3)
10
+ diff-lcs (1.6.2)
11
+ json (2.15.1)
12
+ language_server-protocol (3.17.0.5)
13
13
  lint_roller (1.1.0)
14
- parallel (1.26.3)
15
- parser (3.3.7.1)
14
+ parallel (1.27.0)
15
+ parser (3.3.9.0)
16
16
  ast (~> 2.4.1)
17
17
  racc
18
+ prism (1.5.2)
18
19
  racc (1.8.1)
19
20
  rainbow (3.1.1)
20
- rake (13.2.1)
21
- regexp_parser (2.10.0)
22
- rspec (3.13.0)
21
+ rake (13.3.0)
22
+ regexp_parser (2.11.3)
23
+ rspec (3.13.1)
23
24
  rspec-core (~> 3.13.0)
24
25
  rspec-expectations (~> 3.13.0)
25
26
  rspec-mocks (~> 3.13.0)
26
- rspec-core (3.13.3)
27
+ rspec-core (3.13.5)
27
28
  rspec-support (~> 3.13.0)
28
- rspec-expectations (3.13.3)
29
+ rspec-expectations (3.13.5)
29
30
  diff-lcs (>= 1.2.0, < 2.0)
30
31
  rspec-support (~> 3.13.0)
31
- rspec-mocks (3.13.2)
32
+ rspec-mocks (3.13.6)
32
33
  diff-lcs (>= 1.2.0, < 2.0)
33
34
  rspec-support (~> 3.13.0)
34
- rspec-support (3.13.2)
35
- rubocop (1.72.1)
35
+ rspec-support (3.13.6)
36
+ rubocop (1.81.1)
36
37
  json (~> 2.3)
37
38
  language_server-protocol (~> 3.17.0.2)
38
39
  lint_roller (~> 1.1.0)
@@ -40,17 +41,19 @@ GEM
40
41
  parser (>= 3.3.0.2)
41
42
  rainbow (>= 2.2.2, < 4.0)
42
43
  regexp_parser (>= 2.9.3, < 3.0)
43
- rubocop-ast (>= 1.38.0, < 2.0)
44
+ rubocop-ast (>= 1.47.1, < 2.0)
44
45
  ruby-progressbar (~> 1.7)
45
46
  unicode-display_width (>= 2.4.0, < 4.0)
46
- rubocop-ast (1.38.0)
47
- parser (>= 3.3.1.0)
47
+ rubocop-ast (1.47.1)
48
+ parser (>= 3.3.7.2)
49
+ prism (~> 1.4)
48
50
  ruby-progressbar (1.13.0)
49
- unicode-display_width (3.1.4)
50
- unicode-emoji (~> 4.0, >= 4.0.4)
51
- unicode-emoji (4.0.4)
51
+ unicode-display_width (3.2.0)
52
+ unicode-emoji (~> 4.1)
53
+ unicode-emoji (4.1.0)
52
54
 
53
55
  PLATFORMS
56
+ arm64-darwin-24
54
57
  x86_64-linux
55
58
 
56
59
  DEPENDENCIES
@@ -60,4 +63,4 @@ DEPENDENCIES
60
63
  rubocop (~> 1.5)
61
64
 
62
65
  BUNDLED WITH
63
- 2.6.3
66
+ 2.7.2
data/README.md CHANGED
@@ -118,6 +118,15 @@ false.to_yn(capital_letter: false)
118
118
 
119
119
  Returns 1 for true and 0 for false on a boolean object.
120
120
 
121
+ ### add_percent_sign
122
+
123
+ It takes float and adds percentage to it.
124
+
125
+ ```ruby
126
+ 25.75.add_percent_sign
127
+ '25.75%'
128
+ ```
129
+
121
130
  ## Contributing
122
131
 
123
132
  Bug reports and pull requests are welcome on GitHub at https://github.com/SaimonL/render-text-helper
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Added methods to float
4
+ class Float
5
+ def add_percent_sign
6
+ return nil if self.nil?
7
+
8
+ self.to_s.concat('%')
9
+ end
10
+ end
@@ -3,7 +3,7 @@
3
3
  module Render
4
4
  module Text
5
5
  module Helper
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.1'
7
7
  end
8
8
  end
9
9
  end
@@ -3,6 +3,7 @@
3
3
  require_relative 'helper/version'
4
4
  require_relative 'helper/string'
5
5
  require_relative 'helper/boolean'
6
+ require_relative 'helper/float'
6
7
 
7
8
  module Render
8
9
  module Text
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/render/text/helper/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'render-text-helper'
7
+ spec.version = Render::Text::Helper::VERSION
8
+ spec.authors = ['Saimon Lovell']
9
+ spec.email = ['staysynchronize@gmail.com']
10
+
11
+ spec.summary = 'Does some string manipulation'
12
+ spec.description = 'Add some more functionality to string and booleans'
13
+ spec.homepage = 'https://github.com/SaimonL/render-text-helper'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 3.1'
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = 'https://github.com/SaimonL/render-text-helper'
21
+ spec.metadata['changelog_uri'] = 'https://github.com/SaimonL/render-text-helper/blob/master/CHANGELOG.md'
22
+
23
+ spec.files = Dir.chdir(__dir__) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
26
+ end
27
+ end
28
+ spec.bindir = 'exe'
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ['lib']
31
+ spec.metadata['rubygems_mfa_required'] = 'true'
32
+ end
@@ -0,0 +1,5 @@
1
+ module BooleanHelper
2
+ def to_yn:(capital_letter: bool) -> String
3
+ def to_yes_no:(casting: Symbol) -> String
4
+ def to_i: -> Integer
5
+ end
@@ -0,0 +1,3 @@
1
+ class Float
2
+ def add_percent_sign: -> String
3
+ end
@@ -2,7 +2,10 @@ module Render
2
2
  module Text
3
3
  module Helper
4
4
  class String
5
+ def escaped_newline_to_newline: -> String
5
6
  def limit_print: (limit: Integer, more_indicator: String, indicator_length: Integer) -> String
7
+ def to_smart_array:(separator: String | nil) -> [String]
8
+ def to_titleize: -> String
6
9
  end
7
10
  end
8
11
  end
data/sig/string.rbs ADDED
@@ -0,0 +1,6 @@
1
+ class String
2
+ def escaped_newline_to_newline: -> String
3
+ def limit_print:(limit: Integer, more_indicator: String, indicator_length: Integer) -> String
4
+ def to_smart_array:(separator: String | nil) -> [String]
5
+ def to_titleize: -> String
6
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render-text-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saimon Lovell
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Add some more functionality to string and booleans
13
13
  email:
@@ -26,11 +26,16 @@ files:
26
26
  - Rakefile
27
27
  - lib/render/text/helper.rb
28
28
  - lib/render/text/helper/boolean.rb
29
+ - lib/render/text/helper/float.rb
29
30
  - lib/render/text/helper/string.rb
30
31
  - lib/render/text/helper/version.rb
32
+ - render-text-helper.gemspec
33
+ - sig/boolean_helper.rbs
31
34
  - sig/render/text/helper.rbs
32
35
  - sig/render/text/helper/boolean.rbs
36
+ - sig/render/text/helper/float.rbs
33
37
  - sig/render/text/helper/string.rbs
38
+ - sig/string.rbs
34
39
  homepage: https://github.com/SaimonL/render-text-helper
35
40
  licenses:
36
41
  - MIT
@@ -54,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
59
  - !ruby/object:Gem::Version
55
60
  version: '0'
56
61
  requirements: []
57
- rubygems_version: 3.6.3
62
+ rubygems_version: 3.7.2
58
63
  specification_version: 4
59
64
  summary: Does some string manipulation
60
65
  test_files: []