rubicure 2.1.2 → 3.0.0

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
  SHA256:
3
- metadata.gz: 8e876905265c2be67f43569f92acb97365296ca732f0a640ae7ad37d814e0bc3
4
- data.tar.gz: 3e3929915de0493ef96c6bd1a431d955d9471dac03d3a02e108f1e6d8e9d5c00
3
+ metadata.gz: 4f469d7af84146fdffb852be483d6b6ddd54dc5a72d10451edccf18651b1c378
4
+ data.tar.gz: 2aecfe3678a1ff025565e3f4df232bfd748a3547a08f34e471d1b7ceac567f65
5
5
  SHA512:
6
- metadata.gz: 63a8e1040322a2863fc06ae7b700bf48b6d682ecd0ab55a2a3138da5c4f499afa0ad2ab47212660b174dadd7c1a30143c56224da3373807da1c31606022fe566
7
- data.tar.gz: dbb82a33e27c357943c7056ddf9efdcfce621c5ab111bc328636c6749cd7034b87cd307896198324dc6cd9e8a8b63463a1f88f1a4b5ac425b839350bb1806927
6
+ metadata.gz: bf4361cdb9203eedf8367513422b224456538573a2fc1eb4c5b8203205829cc8b11e3bbcc671780ec0ca5965c2da454226a6e60422cd74b1708fe7c5728e8761
7
+ data.tar.gz: 5afb770053cc077e8c725b9ecfc420b147990c1b170c0cd63f0e7ab1d80cd4e8ba7b2c940a2507a31c55ead02afff7f2415f13f4233ae4c927683cb4f8784c81
@@ -27,11 +27,10 @@ jobs:
27
27
 
28
28
  matrix:
29
29
  ruby:
30
- - ruby:2.4
31
- - ruby:2.5
32
30
  - ruby:2.6
33
31
  - ruby:2.7
34
32
  - ruby:3.0
33
+ - ruby:3.1
35
34
  - rubylang/ruby:master-nightly-bionic
36
35
  include:
37
36
  - ruby: rubylang/ruby:master-nightly-bionic
data/.rubocop.yml CHANGED
@@ -9,7 +9,7 @@ inherit_gem:
9
9
  - "config/performance.yml"
10
10
 
11
11
  AllCops:
12
- TargetRubyVersion: 2.4
12
+ TargetRubyVersion: 2.6
13
13
  NewCops: enable
14
14
 
15
15
  Layout/HashAlignment:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/rubicure/compare/v2.1.2...master)
2
+ [full changelog](http://github.com/sue445/rubicure/compare/v3.0.0...master)
3
+
4
+ ## v3.0.0
5
+ [full changelog](http://github.com/sue445/rubicure/compare/v2.1.5...v3.0.0)
6
+
7
+ ### Breaking changes :bomb:
8
+ * Supports ruby 3.1+ and drop ruby < 2.6
9
+ * https://github.com/sue445/rubicure/pull/259
10
+
11
+ ## v2.1.5
12
+ [full changelog](http://github.com/sue445/rubicure/compare/v2.1.4...v2.1.5)
13
+
14
+ * Fixed. `NameError: uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState` with activesupport v7.0.0
15
+ * https://github.com/sue445/rubicure/pull/258
16
+
17
+ ## v2.1.4
18
+ [full changelog](http://github.com/sue445/rubicure/compare/v2.1.3...v2.1.4)
19
+
20
+ * Enable MFA requirement for gem releasing
21
+ * https://github.com/sue445/rubicure/pull/256
22
+
23
+ ## v2.1.3
24
+ [full changelog](http://github.com/sue445/rubicure/compare/v2.1.2...v2.1.3)
25
+
26
+ * Tweak Laura's name
27
+ * https://github.com/sue445/rubicure/pull/255
3
28
 
4
29
  ## v2.1.2
5
30
  [full changelog](http://github.com/sue445/rubicure/compare/v2.1.1...v2.1.2)
data/Gemfile CHANGED
@@ -2,8 +2,3 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in rubicure.gemspec
4
4
  gemspec
5
-
6
- if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.5.0")
7
- # activesupport v6.0.0+ requires Ruby 2.5.0+
8
- gem "activesupport", "< 6.0.0"
9
- end
data/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![Build Status](https://github.com/sue445/rubicure/workflows/test/badge.svg?branch=master)](https://github.com/sue445/rubicure/actions?query=workflow%3Atest)
5
5
  [![Code Climate](https://codeclimate.com/github/sue445/rubicure.png)](https://codeclimate.com/github/sue445/rubicure)
6
6
  [![Coverage Status](https://coveralls.io/repos/sue445/rubicure/badge.png)](https://coveralls.io/r/sue445/rubicure)
7
- [![Inline docs](http://inch-ci.org/github/sue445/rubicure.svg?branch=master)](http://inch-ci.org/github/sue445/rubicure)
8
7
 
9
8
  All about Japanese battle heroine "Pretty Cure (Precure)".
10
9
 
@@ -720,9 +719,9 @@ Cure.cosmo.name
720
719
  => true
721
720
 
722
721
  >> Precure.all_girls.select(&:have_birthday?).map(&:human_name)
723
- => ["美墨なぎさ", "雪城ほのか", "九条ひかり", "日向咲", "美翔舞", "相田マナ", "菱川六花", "四葉ありす", "剣崎真琴", "春野はるか", "海藤みなみ", "天ノ川きらら", "紅城トワ", "朝日奈みらい", "十六夜リコ", "宇佐美いちか", "有栖川ひまり", "立神あおい", "琴爪ゆかり", "剣城あきら", "キラ星シエル", "野乃はな", "薬師寺さあや", "輝木ほまれ", "愛崎えみる", "ルールー・アムール", "星奈ひかる", "羽衣ララ", "天宮えれな", "香久矢まどか", "ユニ", "花寺のどか", "沢泉ちゆ", "平光ひなた", "風鈴アスミ", "夏海まなつ", "涼村さんご", "一ノ瀬みのり", "滝沢あすか", "ローラ"]
722
+ => ["美墨なぎさ", "雪城ほのか", "九条ひかり", "日向咲", "美翔舞", "相田マナ", "菱川六花", "四葉ありす", "剣崎真琴", "春野はるか", "海藤みなみ", "天ノ川きらら", "紅城トワ", "朝日奈みらい", "十六夜リコ", "宇佐美いちか", "有栖川ひまり", "立神あおい", "琴爪ゆかり", "剣城あきら", "キラ星シエル", "野乃はな", "薬師寺さあや", "輝木ほまれ", "愛崎えみる", "ルールー・アムール", "星奈ひかる", "羽衣ララ", "天宮えれな", "香久矢まどか", "ユニ", "花寺のどか", "沢泉ちゆ", "平光ひなた", "風鈴アスミ", "夏海まなつ", "涼村さんご", "一ノ瀬みのり", "滝沢あすか", "ローラ・ラメール"]
724
723
  >> Precure.all_girls.select(&:have_birthday?).sort_by { |girl| Date.parse(girl.birthday) }.map{ |girl| [girl.birthday, girl.human_name] }
725
- => [["1/7", "宇佐美いちか"], ["1/20", "野乃はな"], ["3/9", "花寺のどか"], ["4/4", "雪城ほのか"], ["4/8", "輝木ほまれ"], ["4/10", "春野はるか"], ["4/12", "星奈ひかる"], ["4/16", "有栖川ひまり"], ["5/9", "涼村さんご"], ["5/28", "四葉ありす"], ["6/10", "薬師寺さあや"], ["6/11", "琴爪ゆかり"], ["6/12", "朝日奈みらい"], ["6/30", "ローラ"], ["7/7", "羽衣ララ"], ["7/15", "愛崎えみる"], ["7/20", "海藤みなみ"], ["7/30", "キラ星シエル"], ["8/1", "夏海まなつ"], ["8/4", "相田マナ"], ["8/7", "日向咲"], ["8/16", "風鈴アスミ"], ["8/21", "沢泉ちゆ"], ["8/27", "立神あおい"], ["9/8", "天宮えれな"], ["9/9", "九条ひかり"], ["9/12", "天ノ川きらら"], ["9/17", "菱川六花"], ["9/23", "ルールー・アムール"], ["9/24", "剣城あきら"], ["10/4", "平光ひなた"], ["10/10", "美墨なぎさ"], ["10/11", "ユニ"], ["10/15", "滝沢あすか"], ["11/4", "剣崎真琴"], ["11/12", "十六夜リコ"], ["11/20", "美翔舞"], ["11/21", "一ノ瀬みのり"], ["11/23", "香久矢まどか"], ["12/15", "紅城トワ"]]
724
+ => [["1/7", "宇佐美いちか"], ["1/20", "野乃はな"], ["3/9", "花寺のどか"], ["4/4", "雪城ほのか"], ["4/8", "輝木ほまれ"], ["4/10", "春野はるか"], ["4/12", "星奈ひかる"], ["4/16", "有栖川ひまり"], ["5/9", "涼村さんご"], ["5/28", "四葉ありす"], ["6/10", "薬師寺さあや"], ["6/11", "琴爪ゆかり"], ["6/12", "朝日奈みらい"], ["6/30", "ローラ・ラメール"], ["7/7", "羽衣ララ"], ["7/15", "愛崎えみる"], ["7/20", "海藤みなみ"], ["7/30", "キラ星シエル"], ["8/1", "夏海まなつ"], ["8/4", "相田マナ"], ["8/7", "日向咲"], ["8/16", "風鈴アスミ"], ["8/21", "沢泉ちゆ"], ["8/27", "立神あおい"], ["9/8", "天宮えれな"], ["9/9", "九条ひかり"], ["9/12", "天ノ川きらら"], ["9/17", "菱川六花"], ["9/23", "ルールー・アムール"], ["9/24", "剣城あきら"], ["10/4", "平光ひなた"], ["10/10", "美墨なぎさ"], ["10/11", "ユニ"], ["10/15", "滝沢あすか"], ["11/4", "剣崎真琴"], ["11/12", "十六夜リコ"], ["11/20", "美翔舞"], ["11/21", "一ノ瀬みのり"], ["11/23", "香久矢まどか"], ["12/15", "紅城トワ"]]
726
725
 
727
726
  >> Precure.all_girls.select(&:have_birthday?).map(&:human_name).count
728
727
  => 40
@@ -120,7 +120,7 @@ flamingo:
120
120
 
121
121
  cure_lamer: &cure_lamer
122
122
  girl_name: cure_lamer
123
- human_name: ローラ
123
+ human_name: ローラ・ラメール
124
124
  human_full_name: ローラ・アポロドーロス・ヒュギーヌス・ラメール
125
125
  precure_name: キュアラメール
126
126
  cast_name: 日高里菜
@@ -22,6 +22,14 @@ module Rubicure
22
22
  nil
23
23
  end
24
24
  end
25
+
26
+ module_function
27
+
28
+ # @param yaml_file [String]
29
+ # @return [Hash]
30
+ def load_yaml_file(yaml_file)
31
+ YAML.safe_load(File.read(yaml_file), permitted_classes: [Date], aliases: true)
32
+ end
25
33
  end
26
34
  end
27
35
  end
data/lib/rubicure/girl.rb CHANGED
@@ -215,7 +215,7 @@ module Rubicure
215
215
  # @return [Hash] content of config/girls/*.yml
216
216
  def config
217
217
  unless @config
218
- @config = SengiriYaml.load_dir("#{File.dirname(__FILE__)}/../../config/girls").deep_symbolize_keys
218
+ @config = SengiriYaml.load_dir("#{File.dirname(__FILE__)}/../../config/girls", permitted_classes: [Date], aliases: true).deep_symbolize_keys
219
219
  end
220
220
  @config
221
221
  end
@@ -293,8 +293,7 @@ module Rubicure
293
293
  return false unless has_key?(:transform_calls)
294
294
 
295
295
  shortened_name = method_name.to_s.
296
- sub(/\Aprecure_|_precure\z/, "").
297
- sub(/!\z/, "")
296
+ sub(/\Aprecure_|_precure\z/, "").delete_suffix("!")
298
297
 
299
298
  transform_calls.include?(shortened_name)
300
299
  end
@@ -6,6 +6,8 @@ module Rubicure
6
6
  include Hashie::Extensions::MethodAccess
7
7
 
8
8
  class << self
9
+ include Rubicure::Concerns::Util
10
+
9
11
  # @return [Array<Symbol>]
10
12
  def names
11
13
  config.keys
@@ -24,7 +26,7 @@ module Rubicure
24
26
  def config
25
27
  unless @config
26
28
  config_file = "#{File.dirname(__FILE__)}/../../config/movies.yml"
27
- @config = YAML.load_file(config_file).deep_symbolize_keys
29
+ @config = load_yaml_file(config_file).deep_symbolize_keys
28
30
  end
29
31
  @config
30
32
  end
@@ -87,6 +87,8 @@ module Rubicure
87
87
  end
88
88
 
89
89
  class << self
90
+ include Rubicure::Concerns::Util
91
+
90
92
  # @return [Array<Symbol>]
91
93
  def names
92
94
  config.keys
@@ -105,7 +107,7 @@ module Rubicure
105
107
  def config
106
108
  unless @config
107
109
  config_file = "#{File.dirname(__FILE__)}/../../config/series.yml"
108
- @config = YAML.load_file(config_file).deep_symbolize_keys
110
+ @config = load_yaml_file(config_file).deep_symbolize_keys
109
111
  end
110
112
  @config
111
113
  end
@@ -1,3 +1,3 @@
1
1
  module Rubicure
2
- VERSION = "2.1.2".freeze
2
+ VERSION = "3.0.0".freeze
3
3
  end
data/lib/rubicure.rb CHANGED
@@ -1,6 +1,14 @@
1
1
  require "active_support/core_ext/array/wrap"
2
2
  require "active_support/core_ext/hash/keys"
3
+
4
+ begin
5
+ # workaround for activesupport 7.0.0
6
+ # c.f. https://github.com/rails/rails/issues/43851
7
+ require "active_support/isolated_execution_state"
8
+ rescue LoadError # rubocop:disable Lint/SuppressedException
9
+ end
3
10
  require "active_support/core_ext/time/calculations"
11
+
4
12
  require "yaml"
5
13
  require "hashie"
6
14
  require "date"
data/rubicure.gemspec CHANGED
@@ -12,15 +12,16 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = "https://github.com/sue445/rubicure"
13
13
  spec.license = "MIT"
14
14
 
15
- spec.required_ruby_version = ">= 2.4"
15
+ spec.required_ruby_version = ">= 2.6"
16
16
 
17
17
  if spec.respond_to?(:metadata)
18
18
  spec.metadata["homepage_uri"] = spec.homepage
19
19
  spec.metadata["source_code_uri"] = spec.homepage
20
20
  spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
21
+ spec.metadata["rubygems_mfa_required"] = "true"
21
22
  else
22
23
  raise "RubyGems 2.0 or newer is required to protect against " \
23
- "public gem pushes."
24
+ "public gem pushes."
24
25
  end
25
26
 
26
27
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
@@ -35,7 +36,7 @@ Gem::Specification.new do |spec|
35
36
 
36
37
  spec.add_dependency "activesupport", ">= 5.0.0"
37
38
  spec.add_dependency "hashie", ">= 2.0.5"
38
- spec.add_dependency "sengiri_yaml", ">= 0.0.2"
39
+ spec.add_dependency "sengiri_yaml", ">= 1.0.0"
39
40
 
40
41
  spec.add_development_dependency "bundler", ">= 1.3.5"
41
42
  spec.add_development_dependency "coveralls"
@@ -46,7 +47,7 @@ Gem::Specification.new do |spec|
46
47
  spec.add_development_dependency "rspec-collection_matchers"
47
48
  spec.add_development_dependency "rspec-its"
48
49
  spec.add_development_dependency "rspec-parameterized", ">= 0.3.2"
49
- spec.add_development_dependency "rubocop", "1.7.0"
50
+ spec.add_development_dependency "rubocop", "1.24.0"
50
51
  spec.add_development_dependency "rubocop_auto_corrector"
51
52
  spec.add_development_dependency "rubocop-performance", "1.9.2"
52
53
  spec.add_development_dependency "rubocop-rake", "0.5.1"
@@ -3,7 +3,7 @@ describe "girls_checker" do # rubocop:disable RSpec/DescribeClass
3
3
 
4
4
  config_files.each do |config_file|
5
5
  describe "config/girls/#{config_file.basename}" do
6
- girls = YAML.load_file(config_file)
6
+ girls = Rubicure::Concerns::Util.load_yaml_file(config_file)
7
7
 
8
8
  girls.each do |girl_name, girl|
9
9
  describe girl_name do
@@ -1,5 +1,5 @@
1
1
  describe "config/series.yml" do # rubocop:disable RSpec/DescribeClass
2
- series = YAML.load_file("#{spec_dir}/../config/series.yml")
2
+ series = Rubicure::Concerns::Util.load_yaml_file("#{spec_dir}/../config/series.yml")
3
3
 
4
4
  series.values.uniq {|attributes| attributes["series_name"] }.each do |attributes|
5
5
  context attributes["title"] do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubicure
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-20 00:00:00.000000000 Z
11
+ date: 2021-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.2
47
+ version: 1.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.2
54
+ version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: 1.7.0
187
+ version: 1.24.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: 1.7.0
194
+ version: 1.24.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rubocop_auto_corrector
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -382,6 +382,7 @@ metadata:
382
382
  homepage_uri: https://github.com/sue445/rubicure
383
383
  source_code_uri: https://github.com/sue445/rubicure
384
384
  changelog_uri: https://github.com/sue445/rubicure/blob/master/CHANGELOG.md
385
+ rubygems_mfa_required: 'true'
385
386
  post_install_message:
386
387
  rdoc_options: []
387
388
  require_paths:
@@ -390,14 +391,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
390
391
  requirements:
391
392
  - - ">="
392
393
  - !ruby/object:Gem::Version
393
- version: '2.4'
394
+ version: '2.6'
394
395
  required_rubygems_version: !ruby/object:Gem::Requirement
395
396
  requirements:
396
397
  - - ">="
397
398
  - !ruby/object:Gem::Version
398
399
  version: '0'
399
400
  requirements: []
400
- rubygems_version: 3.2.3
401
+ rubygems_version: 3.3.3
401
402
  signing_key:
402
403
  specification_version: 4
403
404
  summary: All about Japanese battle heroine "Pretty Cure (Precure)".