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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +25 -22
- data/README.md +9 -0
- data/lib/render/text/helper/float.rb +10 -0
- data/lib/render/text/helper/version.rb +1 -1
- data/lib/render/text/helper.rb +1 -0
- data/render-text-helper.gemspec +32 -0
- data/sig/boolean_helper.rbs +5 -0
- data/sig/render/text/helper/float.rbs +3 -0
- data/sig/render/text/helper/string.rbs +3 -0
- data/sig/string.rbs +6 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7cde7c2690826b2c8a735bb088254f4cac6e7fd818f3f2605cf16a5a1b82e3e
|
4
|
+
data.tar.gz: 5e09fd32cbf9028e9d3ee0846a5f76dabd914302e369072c1faa815660fcc36b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5551f2993778b2ef40550bf3d711ef011553bd08873a1cdea4c83ce6ae0e3da4a6c6bf37ec603d40f6dc4a483426c34471167a8ec74eade4c378a9439a9d3fa0
|
7
|
+
data.tar.gz: 942d652b160aa69a4f91e41bd4122cf4d9a88ad66ee1b3e98e7db8dbf65c1301b0be46b2db5004bab73129432b21eb7cb0d9f903cf1262f0df6b58d2541b595b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,38 +1,39 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
render-text-helper (0.4.
|
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.
|
10
|
-
diff-lcs (1.6.
|
11
|
-
json (2.
|
12
|
-
language_server-protocol (3.17.0.
|
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.
|
15
|
-
parser (3.3.
|
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.
|
21
|
-
regexp_parser (2.
|
22
|
-
rspec (3.13.
|
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.
|
27
|
+
rspec-core (3.13.5)
|
27
28
|
rspec-support (~> 3.13.0)
|
28
|
-
rspec-expectations (3.13.
|
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.
|
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.
|
35
|
-
rubocop (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.
|
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.
|
47
|
-
parser (>= 3.3.
|
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.
|
50
|
-
unicode-emoji (~> 4.
|
51
|
-
unicode-emoji (4.0
|
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.
|
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
|
data/lib/render/text/helper.rb
CHANGED
@@ -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
|
@@ -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
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.
|
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:
|
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.
|
62
|
+
rubygems_version: 3.7.2
|
58
63
|
specification_version: 4
|
59
64
|
summary: Does some string manipulation
|
60
65
|
test_files: []
|