lite-ruby 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +3 -3
- data/docs/STRING.md +2 -2
- data/lib/lite/ruby/safe/string.rb +0 -4
- data/lib/lite/ruby/string.rb +6 -2
- data/lib/lite/ruby/version.rb +1 -1
- 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: 0f597c253b81c6355a9ae743833feccd90ac05ba6a81d4999f9f38c8e3631bee
|
4
|
+
data.tar.gz: 648dc86d5bb49d58fa7eeed633bb811724e783e92c385ea3743b268c27be4b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ae87db67f4e74672342cc4c5309aa733eb8e09816c2da8c03fef690bc4d182c19c3a94b473e6091e04d61835439a753f2e04e6418f255d2bcc325f546fcab17
|
7
|
+
data.tar.gz: 59de994a412932844e3e0fbca147ac3e008c4b862f3aecb82940afb2ac77da43eead9fa82b7de3091616187ba66b53e19cfb9262d0c671c72562ef35cfe858f2
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.1.1] - 2020-11-08
|
10
|
+
### Changed
|
11
|
+
- Revert String => `transliterize` to `transliterate`
|
12
|
+
|
9
13
|
## [1.1.0] - 2020-11-06
|
10
14
|
### Added
|
11
15
|
- Added Array => `extract!` to `except!` alias
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lite-ruby (1.1.
|
4
|
+
lite-ruby (1.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -48,7 +48,7 @@ GEM
|
|
48
48
|
minitest (5.14.2)
|
49
49
|
nokogiri (1.10.10)
|
50
50
|
mini_portile2 (~> 2.4.0)
|
51
|
-
parallel (1.
|
51
|
+
parallel (1.20.0)
|
52
52
|
parser (2.7.2.0)
|
53
53
|
ast (~> 2.4.1)
|
54
54
|
rack (2.2.3)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
sexp_processor (4.15.1)
|
106
106
|
thor (1.0.1)
|
107
107
|
thread_safe (0.3.6)
|
108
|
-
tzinfo (1.2.
|
108
|
+
tzinfo (1.2.8)
|
109
109
|
thread_safe (~> 0.1)
|
110
110
|
unicode-display_width (1.7.0)
|
111
111
|
zeitwerk (2.4.1)
|
data/docs/STRING.md
CHANGED
@@ -511,12 +511,12 @@ If the position is negative, it is counted from the end of the string.
|
|
511
511
|
'example'.to(-2) #=> 'exampl'
|
512
512
|
```
|
513
513
|
|
514
|
-
`
|
514
|
+
`transliterize(!)`
|
515
515
|
------
|
516
516
|
Returns a string with swapped special characters.
|
517
517
|
|
518
518
|
```ruby
|
519
|
-
'źåöé'.
|
519
|
+
'źåöé'.transliterize #=> 'zaoe'
|
520
520
|
```
|
521
521
|
|
522
522
|
`truncate`
|
@@ -145,10 +145,6 @@ class String
|
|
145
145
|
# rubocop:enable Metrics/MethodLength, Metrics/PerceivedComplexity
|
146
146
|
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
147
147
|
|
148
|
-
def transliterate
|
149
|
-
TRANSLITERATIONS.each_with_object(dup) { |(k, v), s| s.gsub!(k, v) }
|
150
|
-
end
|
151
|
-
|
152
148
|
def truncate(truncate_at, options = {})
|
153
149
|
return self unless length > truncate_at
|
154
150
|
|
data/lib/lite/ruby/string.rb
CHANGED
@@ -393,8 +393,12 @@ if Lite::Ruby.configuration.monkey_patches.include?('string')
|
|
393
393
|
replace(sort)
|
394
394
|
end
|
395
395
|
|
396
|
-
def
|
397
|
-
|
396
|
+
def transliterize
|
397
|
+
TRANSLITERATIONS.each_with_object(dup) { |(k, v), s| s.gsub!(k, v) }
|
398
|
+
end
|
399
|
+
|
400
|
+
def transliterize!
|
401
|
+
replace(transliterize)
|
398
402
|
end
|
399
403
|
|
400
404
|
def titleize!
|
data/lib/lite/ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|