cureutils 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c173be4fafce993b27b8e16178a77fd7dd5c3e4
4
- data.tar.gz: e10b53f59a51aad93ada85b0e4dfd3973cd3b1e8
3
+ metadata.gz: 33299ec5caf69d03b6fb07e9460205cabdb4fa72
4
+ data.tar.gz: b12a44d2bfea16d16923e93da602ba7e0c212d9f
5
5
  SHA512:
6
- metadata.gz: 84e81a6effc0c2c4e79c55e9ab575bf40723cc58e84612c51c7b3f825f6c4b616904950e770d846e87901ec4ce6e85b9a395ac2180b15429c35c14db3e30710e
7
- data.tar.gz: 19f022dd326707e9e087ea5753eac5184ea20832fdb220fd405550b313946d9693eb1d6bc1de7d12de0bbf6e9d505fcabcff5df353f01435305b821b5e4a1a65
6
+ metadata.gz: 04f8324ab4cfc50ee1d25080bbe0c9a2986dc3eaf6a04ccb10d5deda4f63eb063922840603641bee37698e4c2c0daeb537dc7b171858947d77ac5a69c495e61d
7
+ data.tar.gz: 59d1ff77aa4aa177c1194e149d3b3d5c7104c795581c58c13bb6d76ea352a654bd636df16d279b27c4138cd4215df582876e93be1186c1f36453059a4228807e
data/lib/cureutils/cli.rb CHANGED
@@ -204,16 +204,13 @@ module Cureutils
204
204
  end
205
205
  end
206
206
 
207
- desc 'pregex2regex', 'Convert string to precure regular expression'
207
+ # Convert string to precure regular expression
208
208
  def pregex2regex(regex, br_flg = false)
209
209
  this_regex = regex.dup
210
210
  br_ex = br_flg ? '' : '?:'
211
211
  %w(girl_name human_name precure_name cast_name color).each do |attr|
212
212
  expression = '\[:' + attr + ':\]'
213
- precures_ex = cure_list(attr.to_sym).each do |elem_str|
214
- # Escape for cure princes.
215
- elem_str.gsub(/\(/, '\(').gsub(/\)/, '\)')
216
- end.join('|')
213
+ precures_ex = cure_list(attr.to_sym).join('|')
217
214
  replaced = "(#{br_ex}#{precures_ex})"
218
215
  this_regex.gsub!(/#{expression}/, replaced)
219
216
  end
@@ -231,6 +228,11 @@ module Cureutils
231
228
  def cure_list(sym)
232
229
  list = Precure.all_stars.map(&sym)
233
230
  list << Cure.echo[sym]
231
+ # Regulate cure princes human name
232
+ list.map do |str|
233
+ str.gsub!(/\(.+?\)/, '')
234
+ str
235
+ end
234
236
  list
235
237
  end
236
238
 
@@ -2,7 +2,7 @@ module Cureutils
2
2
  class Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 2
5
+ PATCH = 3
6
6
  PRE = nil
7
7
 
8
8
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cureutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yamada, Yasuhiro