replacer_bot 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/replacer_bot/helpers.rb +1 -1
- data/lib/replacer_bot/version.rb +1 -1
- data/spec/lib/replacer_bot/helpers_spec.rb +9 -0
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23103f3309929ba37a8304f164716728a5122ab7
|
4
|
+
data.tar.gz: b3d9501eae3299651daaf44eaa76a90fc58e2294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c53f8bbe6fdbec5baed871eda81cfb92eef5c884667c09828113e4bcf015f6faa8ee004ac69a1c7f0e15e01259c77b976f5285df76df716909995af0e9a15601
|
7
|
+
data.tar.gz: a332cffdb4dda9aeff889280a57e0c187e157900454a1dc8e815236fc938810bca4f09c227d837cab8c4fa8830cf2535342c0b3446b299929872156bd16e11a5
|
data/lib/replacer_bot/helpers.rb
CHANGED
@@ -102,7 +102,7 @@ module ReplacerBot
|
|
102
102
|
l = []
|
103
103
|
l.push({replacement.first[0].upcase => replacement.first[1].upcase})
|
104
104
|
l.push({replacement.first[0].downcase => replacement.first[1]})
|
105
|
-
l.push({replacement.first[0].titlecase => replacement.first[1]})
|
105
|
+
l.push({replacement.first[0].titlecase => replacement.first[1].titlecase})
|
106
106
|
|
107
107
|
l.uniq
|
108
108
|
end
|
data/lib/replacer_bot/version.rb
CHANGED
@@ -97,6 +97,15 @@ module ReplacerBot
|
|
97
97
|
{'Blockchain' => 'Beyoncé'}
|
98
98
|
]
|
99
99
|
)
|
100
|
+
|
101
|
+
expect(ReplacerBot.replacement_caser 'cyber' => 'spider').
|
102
|
+
to eq(
|
103
|
+
[
|
104
|
+
{'CYBER' => 'SPIDER'},
|
105
|
+
{'cyber' => 'spider'},
|
106
|
+
{'Cyber' => 'Spider'}
|
107
|
+
]
|
108
|
+
)
|
100
109
|
end
|
101
110
|
|
102
111
|
it 'preserves case when replacing' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: replacer_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
@@ -323,4 +323,3 @@ test_files:
|
|
323
323
|
- spec/vcr/ReplacerBot_Replacer/tweet/actually_sends_tweets.yml
|
324
324
|
- spec/vcr/ReplacerBot_Replacer/tweet/prepares_sensible_tweets.yml
|
325
325
|
- spec/vcr/ReplacerBot_Replacer/tweet/sends_no_tweets_on_a_dry-run.yml
|
326
|
-
has_rdoc:
|