amakanize 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: 8fb51350edc11b1d6ee6869c28c4c12d4f528842
4
- data.tar.gz: cbbd31d3b59ce053f937d820301144893561885e
3
+ metadata.gz: 1542239c8ed7e62f05673816fa91ae68450982c6
4
+ data.tar.gz: 66cd4f5e3c2154d1bc028b65658308d81e8961c0
5
5
  SHA512:
6
- metadata.gz: 41d411b780072ae92b1b295d145eb2d451d5b43a531e8ddecdc341b547a1370dccbfa5bef005cb4d1e298ed3b2bd630724c92a65bf674fd8838856df6c75d9d9
7
- data.tar.gz: 7301a261a67e28fdf18ab6a8fe18af04a1b408dcab582de0b6316c268cf8afd3882d9832e4fc456b4f1e5c711cd4371ed131d7e1300ed0d9459377e94c591052
6
+ metadata.gz: 34a61cbb964945cc49996726ff8cbbeb935b49258a9c7ea27ccc114a50911474452421fb3d2381c6b805a0e531fae53aed0a45b2bec0d2d5212aa87961c1bb39
7
+ data.tar.gz: ea14693591d545e7a583df03cc49b519ef5b7319ad8dddec36a774b1da1e965ee1149e9398da89dba7cb6f44557c07ee239bcb8eccb8f27741dbec32d5ecec22
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.8
2
+ - Normalize hyphen between alphabets in series name
3
+
1
4
  ## 0.1.7
2
5
  - Remove trailing surrounding hyphens and payload on series name
3
6
 
@@ -0,0 +1,12 @@
1
+ module Amakanize
2
+ module Filters
3
+ class HypthenBetweenAlhabetsDeletionFilter < BaseFilter
4
+ # @note Override
5
+ # @param string [String] e.g. `"D.Grayーman"`
6
+ # @return [String] e.g. `"D.Gray-man"`
7
+ def call(string)
8
+ string.gsub(/(\w)ー(\w)/, '\1-\2')
9
+ end
10
+ end
11
+ end
12
+ end
@@ -6,6 +6,7 @@ module Amakanize
6
6
  @filters ||= [
7
7
  ::Amakanize::Filters::HtmlUnescapeFilter.new,
8
8
  ::Amakanize::Filters::NormalizationFilter.new,
9
+ ::Amakanize::Filters::HypthenBetweenAlhabetsDeletionFilter.new,
9
10
  ::Amakanize::Filters::SpacesBetweenExclamationsDeletionFilter.new,
10
11
  ::Amakanize::Filters::TrailingParenthesesDeletionFilter.new,
11
12
  ::Amakanize::Filters::TrailingSurroundingHyphensDeletionFilter.new,
@@ -1,3 +1,3 @@
1
1
  module Amakanize
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/lib/amakanize.rb CHANGED
@@ -2,6 +2,7 @@ require "amakanize/author_name"
2
2
  require "amakanize/author_names"
3
3
  require "amakanize/filters/base_filter"
4
4
  require "amakanize/filters/html_unescape_filter"
5
+ require "amakanize/filters/hyphen_between_alphabets_normalization_filter"
5
6
  require "amakanize/filters/normalization_filter"
6
7
  require "amakanize/filters/parentheses_deletion_filter"
7
8
  require "amakanize/filters/role_name_deletion_filter"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amakanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - r7kamura
@@ -89,6 +89,7 @@ files:
89
89
  - lib/amakanize/author_names.rb
90
90
  - lib/amakanize/filters/base_filter.rb
91
91
  - lib/amakanize/filters/html_unescape_filter.rb
92
+ - lib/amakanize/filters/hyphen_between_alphabets_normalization_filter.rb
92
93
  - lib/amakanize/filters/normalization_filter.rb
93
94
  - lib/amakanize/filters/parentheses_deletion_filter.rb
94
95
  - lib/amakanize/filters/role_name_deletion_filter.rb