rubicure 2.1.5 → 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: 0d5325d7d6724b38dc1f08ceb7959dfd876cdc8ff49f49120c1dc39b51eb3bd3
4
- data.tar.gz: 1a6a234cd75c4e56390fe48099f27eb8ffd84fb88fa957fbc3cb7a23e0c870cd
3
+ metadata.gz: 4f469d7af84146fdffb852be483d6b6ddd54dc5a72d10451edccf18651b1c378
4
+ data.tar.gz: 2aecfe3678a1ff025565e3f4df232bfd748a3547a08f34e471d1b7ceac567f65
5
5
  SHA512:
6
- metadata.gz: fdcdf6de885c0fae474ccccef23e7012408d808b6292e4cc7a04f1cd664392a7f1a44db240472606b2fb26a67ba10ef3d7399daad6975cd3cedf5fece8cd4703
7
- data.tar.gz: 1e31f4d6b8da0dfa82de842470ef587d134a8f4ad15b77a74610e9e148a8f525965e7023a297b1f596f94dcc815373c099802f78a7ba67fb7f37cea73c549fb6
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,12 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/rubicure/compare/v2.1.5...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
3
10
 
4
11
  ## v2.1.5
5
12
  [full changelog](http://github.com/sue445/rubicure/compare/v2.1.4...v2.1.5)
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
@@ -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.5".freeze
2
+ VERSION = "3.0.0".freeze
3
3
  end
data/rubicure.gemspec CHANGED
@@ -12,7 +12,7 @@ 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
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.metadata["rubygems_mfa_required"] = "true"
22
22
  else
23
23
  raise "RubyGems 2.0 or newer is required to protect against " \
24
- "public gem pushes."
24
+ "public gem pushes."
25
25
  end
26
26
 
27
27
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.add_dependency "activesupport", ">= 5.0.0"
38
38
  spec.add_dependency "hashie", ">= 2.0.5"
39
- spec.add_dependency "sengiri_yaml", ">= 0.0.2"
39
+ spec.add_dependency "sengiri_yaml", ">= 1.0.0"
40
40
 
41
41
  spec.add_development_dependency "bundler", ">= 1.3.5"
42
42
  spec.add_development_dependency "coveralls"
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "rspec-collection_matchers"
48
48
  spec.add_development_dependency "rspec-its"
49
49
  spec.add_development_dependency "rspec-parameterized", ">= 0.3.2"
50
- spec.add_development_dependency "rubocop", "1.7.0"
50
+ spec.add_development_dependency "rubocop", "1.24.0"
51
51
  spec.add_development_dependency "rubocop_auto_corrector"
52
52
  spec.add_development_dependency "rubocop-performance", "1.9.2"
53
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.5
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-12-17 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
@@ -391,14 +391,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
391
391
  requirements:
392
392
  - - ">="
393
393
  - !ruby/object:Gem::Version
394
- version: '2.4'
394
+ version: '2.6'
395
395
  required_rubygems_version: !ruby/object:Gem::Requirement
396
396
  requirements:
397
397
  - - ">="
398
398
  - !ruby/object:Gem::Version
399
399
  version: '0'
400
400
  requirements: []
401
- rubygems_version: 3.2.32
401
+ rubygems_version: 3.3.3
402
402
  signing_key:
403
403
  specification_version: 4
404
404
  summary: All about Japanese battle heroine "Pretty Cure (Precure)".