rubicure 1.3.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +2 -4
- data/.rubocop.yml +14 -5
- data/CHANGELOG.md +12 -1
- data/Gemfile +0 -18
- data/README.md +26 -13
- data/lib/rubicure.rb +10 -7
- data/lib/rubicure/core.rb +4 -4
- data/lib/rubicure/cure_peace.rb +8 -5
- data/lib/rubicure/movie.rb +1 -1
- data/lib/rubicure/series.rb +1 -1
- data/lib/rubicure/version.rb +1 -1
- data/rubicure.gemspec +7 -4
- data/spec/rubicure/girl_spec.rb +10 -10
- data/spec/rubicure/rubicure_spec.rb +47 -45
- data/spec/rubicure/series_spec.rb +7 -5
- data/spec/spec_helper.rb +2 -1
- metadata +52 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c60a3cecc4928ab00f229608a0a9803d9d6793f21f30bcf48ef92109b80421e5
|
4
|
+
data.tar.gz: 1b3d7a25e35d8a7c33d8679e4810e1b2ed46a077ce9591d5d9a3d71320617985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e235531bf441b910836e82136540ddbc40c27a8bdbabf3b7e51d4f332f4c307aa746d2702a55a3dc9a6aa409dbc907d7b19e91bc138de627452a706da669a5e
|
7
|
+
data.tar.gz: 7b7920f961edb98d0f0f1cd38e298808f2b7310262fc8312be9c12936b04943ac201ec57183c7f9366eb11138bfe025469b20fc9a82a088ea239afa831ea082e
|
data/.github/workflows/test.yml
CHANGED
@@ -27,12 +27,11 @@ jobs:
|
|
27
27
|
|
28
28
|
matrix:
|
29
29
|
ruby:
|
30
|
-
- ruby:2.2
|
31
|
-
- ruby:2.3
|
32
30
|
- ruby:2.4
|
33
31
|
- ruby:2.5
|
34
32
|
- ruby:2.6
|
35
33
|
- ruby:2.7
|
34
|
+
- ruby:3.0
|
36
35
|
- rubylang/ruby:master-nightly-bionic
|
37
36
|
include:
|
38
37
|
- ruby: rubylang/ruby:master-nightly-bionic
|
@@ -63,7 +62,6 @@ jobs:
|
|
63
62
|
with:
|
64
63
|
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
|
65
64
|
command: before-build
|
66
|
-
if: matrix.ruby >= 'ruby:2.4'
|
67
65
|
continue-on-error: true
|
68
66
|
|
69
67
|
- run: bundle exec rspec
|
@@ -79,7 +77,7 @@ jobs:
|
|
79
77
|
with:
|
80
78
|
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
|
81
79
|
command: after-build
|
82
|
-
if:
|
80
|
+
if: always()
|
83
81
|
continue-on-error: true
|
84
82
|
|
85
83
|
- run: bundle exec rubocop
|
data/.rubocop.yml
CHANGED
@@ -1,17 +1,26 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rake
|
4
|
+
|
1
5
|
inherit_gem:
|
2
6
|
onkcop:
|
3
7
|
- "config/rubocop.yml"
|
4
8
|
- "config/rspec.yml"
|
9
|
+
- "config/performance.yml"
|
5
10
|
|
6
11
|
AllCops:
|
7
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.4
|
13
|
+
NewCops: enable
|
8
14
|
|
9
|
-
|
15
|
+
Layout/HashAlignment:
|
16
|
+
EnforcedHashRocketStyle: table
|
17
|
+
EnforcedColonStyle: table
|
18
|
+
|
19
|
+
RSpec/MultipleMemoizedHelpers:
|
10
20
|
Enabled: false
|
11
21
|
|
12
|
-
RSpec/
|
22
|
+
RSpec/NestedGroups:
|
13
23
|
Enabled: false
|
14
24
|
|
15
|
-
|
16
|
-
Layout/IndentHeredoc:
|
25
|
+
RSpec/SharedExamples:
|
17
26
|
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](http://github.com/sue445/rubicure/compare/
|
2
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v2.0.0...master)
|
3
|
+
|
4
|
+
## v2.0.0
|
5
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v1.3.5...v2.0.0)
|
6
|
+
|
7
|
+
### Breaking changes :bomb:
|
8
|
+
* Drop support for ruby 2.2 and 2.3
|
9
|
+
* https://github.com/sue445/rubicure/pull/249
|
10
|
+
|
11
|
+
### Others
|
12
|
+
* update rubocop gems
|
13
|
+
* https://github.com/sue445/rubicure/pull/250
|
3
14
|
|
4
15
|
## v1.3.5
|
5
16
|
[full changelog](http://github.com/sue445/rubicure/compare/v1.3.4...v1.3.5)
|
data/Gemfile
CHANGED
@@ -3,25 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in rubicure.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.3.0")
|
7
|
-
gem "backport_dig"
|
8
|
-
|
9
|
-
# i18n v1.5.1+ requires Ruby 2.3.0+
|
10
|
-
gem "i18n", "< 1.5.1"
|
11
|
-
|
12
|
-
# N0TE: unparser v0.5.0+ requires ruby 2.3.0+
|
13
|
-
gem "unparser", "< 0.5.0"
|
14
|
-
end
|
15
|
-
|
16
6
|
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.5.0")
|
17
7
|
# activesupport v6.0.0+ requires Ruby 2.5.0+
|
18
8
|
gem "activesupport", "< 6.0.0"
|
19
9
|
end
|
20
|
-
|
21
|
-
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.4.0")
|
22
|
-
# byebug v11.0.0+ requires Ruby 2.3.0+ and byebug v11.1.0+ requires Ruby 2.4.0+
|
23
|
-
gem "byebug", "< 11.0.0"
|
24
|
-
|
25
|
-
# simplecov-html 0.11.0+ requires Ruby 2.4.0
|
26
|
-
gem "simplecov-html", "< 0.11.0"
|
27
|
-
end
|
data/README.md
CHANGED
@@ -102,7 +102,7 @@ Or install it yourself as:
|
|
102
102
|
=> "HUGっと!プリキュア"
|
103
103
|
|
104
104
|
>> Precure.dokidoki
|
105
|
-
=> {:series_name=>"dokidoki", :title=>"ドキドキ!プリキュア", :started_date
|
105
|
+
=> {:series_name=>"dokidoki", :title=>"ドキドキ!プリキュア", :started_date=>#<Date: 2013-02-03 ((2456327j,0s,0n),+0s,2299161j)>, :ended_date=>#<Date: 2014-01-26 ((2456684j,0s,0n),+0s,2299161j)>, :girls=>["cure_heart", "cure_diamond", "cure_rosetta", "cure_sword", "cure_ace"]}
|
106
106
|
```
|
107
107
|
|
108
108
|
other pattern
|
@@ -119,7 +119,7 @@ and [more aliases!](config/series.yml)
|
|
119
119
|
|
120
120
|
```ruby
|
121
121
|
>> Precure.now
|
122
|
-
=> {:series_name=>"healingood", :title=>"ヒーリングっど♥プリキュア", :started_date
|
122
|
+
=> {:series_name=>"healingood", :title=>"ヒーリングっど♥プリキュア", :started_date=>#<Date: 2020-02-02 ((2458882j,0s,0n),+0s,2299161j)>, :girls=>["cure_grace", "cure_fontaine", "cure_sparkle", "cure_earth"]}
|
123
123
|
|
124
124
|
# -2013/1/27 : smile precure
|
125
125
|
# 2013/2/5 - : dokidoki precure
|
@@ -145,7 +145,7 @@ Precure.now
|
|
145
145
|
=> 5
|
146
146
|
|
147
147
|
>> Precure.smile.girls.first
|
148
|
-
=> {:girl_name=>"cure_happy", :human_name=>"星空みゆき", :precure_name=>"キュアハッピー", :cast_name=>"福圓美里", :created_date
|
148
|
+
=> {:girl_name=>"cure_happy", :human_name=>"星空みゆき", :precure_name=>"キュアハッピー", :cast_name=>"福圓美里", :created_date=>#<Date: 2012-02-05 ((2455963j,0s,0n),+0s,2299161j)>, :color=>"pink", :transform_message=>"(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!ハッピー!!)\nキラキラ輝く未来の光! キュアハッピー!\n5つの光が導く未来!\n輝け!スマイルプリキュア!", :extra_names=>["プリンセスハッピー", "ウルトラハッピー"], :attack_messages=>["プリキュア!ハッピーシャワー!!", "開け、ロイヤルクロック!\n(みんなの力を1つにするクル!)\n届け、希望の光!\nはばたけ!光り輝く未来へ!\nプリキュア!ロイヤルレインボーバースト!", "(みんなの力を1つにするクル!)\nプリキュア!ミラクルレインボーバースト!\n輝けー!!\nスマイルプリキュア!!"], :transform_calls=>["smile_charge"]}
|
149
149
|
|
150
150
|
>> Precure.smile.girls.map(&:human_name)
|
151
151
|
=> ["星空みゆき", "日野あかね", "黄瀬やよい", "緑川なお", "青木れいか"]
|
@@ -160,31 +160,31 @@ Precure.now
|
|
160
160
|
### Select own precure girl
|
161
161
|
```ruby
|
162
162
|
>> Cure.lemonade
|
163
|
-
=> {:girl_name=>"cure_lemonade", :human_name=>"春日野うらら", :precure_name=>"キュアレモネード", :cast_name=>"伊瀬茉莉也", :created_date
|
163
|
+
=> {:girl_name=>"cure_lemonade", :human_name=>"春日野うらら", :precure_name=>"キュアレモネード", :cast_name=>"伊瀬茉莉也", :created_date=>#<Date: 2007-02-18 ((2454150j,0s,0n),+0s,2299161j)>, :color=>"yellow", :transform_message=>"プリキュア!メタモルフォーゼ!\nはじけるレモンの香り、キュアレモネード!\n希望の力と未来の光!\n華麗に羽ばたく5つの心!\nYes!プリキュア5!", :extra_names=>nil, :attack_messages=>["輝く乙女のはじける力、受けてみなさい!\nプリキュア!プリズム・チェーン!"], :transform_calls=>["metamorphose"]}
|
164
164
|
|
165
165
|
>> Cure.pine
|
166
|
-
=> {:girl_name=>"cure_pine", :human_name=>"山吹祈里", :precure_name=>"キュアパイン", :cast_name=>"中川亜紀子", :created_date
|
166
|
+
=> {:girl_name=>"cure_pine", :human_name=>"山吹祈里", :precure_name=>"キュアパイン", :cast_name=>"中川亜紀子", :created_date=>#<Date: 2009-02-15 ((2454878j,0s,0n),+0s,2299161j)>, :color=>"yellow", :transform_message=>"チェインジ!プリキュア・ビートアップ!\nイエローハートは祈りのしるし!\nとれたてフレッシュ、キュアパイン!\nレッツプリキュア!", :extra_names=>["キュアエンジェルパイン"], :attack_messages=>["悪いの悪いの飛んでいけ!\nプリキュア!ヒーリングプレアーフレッシュ!"], :transform_calls=>["change_precure_beat_up", "change", "beat_up"]}
|
167
167
|
|
168
168
|
>> Cure.sunshine
|
169
|
-
=> {:girl_name=>"cure_sunshine", :human_name=>"明堂院いつき", :precure_name=>"キュアサンシャイン", :cast_name=>"桑島法子", :created_date
|
169
|
+
=> {:girl_name=>"cure_sunshine", :human_name=>"明堂院いつき", :precure_name=>"キュアサンシャイン", :cast_name=>"桑島法子", :created_date=>#<Date: 2010-07-18 ((2455396j,0s,0n),+0s,2299161j)>, :color=>"yellow", :transform_message=>"(プリキュアの種、いくですぅ!)\nプリキュア!オープンマイハート!\n陽の光浴びる一輪の花! キュアサンシャイン!\nハートキャッチ、プリキュア!", :extra_names=>["スーパーキュアサンシャイン"], :attack_messages=>["花よ、舞い踊れ!\nプリキュア!ゴールドフォルテバースト!!", "花よ、咲き誇れ!\nプリキュア・ハートキャッチ・オーケストラ!!"], :transform_calls=>["open_my_heart"]}
|
170
170
|
|
171
171
|
>> Cure.muse
|
172
|
-
=> {:girl_name=>"cure_muse", :human_name=>"調辺アコ", :precure_name=>"キュアミューズ", :cast_name=>"大久保瑠美", :created_date
|
172
|
+
=> {:girl_name=>"cure_muse", :human_name=>"調辺アコ", :precure_name=>"キュアミューズ", :cast_name=>"大久保瑠美", :created_date=>#<Date: 2011-10-16 ((2455851j,0s,0n),+0s,2299161j)>, :color=>"yellow", :transform_message=>"レッツプレイ!プリキュアモジュレーション!!\n爪弾くは女神の調べ! キュアミューズ!\n届け4人の組曲!スイートプリキュア!", :extra_names=>["クレッシェンドミューズ"], :attack_messages=>["おいで、シリー!\nシの音符の、シャイニングメロディ!\nプリキュア!スパークリングシャワー!!\n三拍子!1、2、3\nフィナーレ!", "届けましょう、希望のシンフォニー!\nプリキュア!スイートセッションアンサンブル!\nクレッシェンド!!\nフィナーレ!"], :transform_calls=>["lets_play_precure_modulation", "lets_play", "modulation"]}
|
173
173
|
|
174
174
|
>> Cure.peace
|
175
|
-
=> {:girl_name=>"cure_peace", :human_name=>"黄瀬やよい", :precure_name=>"キュアピース", :cast_name=>"金元寿子", :created_date
|
175
|
+
=> {:girl_name=>"cure_peace", :human_name=>"黄瀬やよい", :precure_name=>"キュアピース", :cast_name=>"金元寿子", :created_date=>#<Date: 2012-02-19 ((2455977j,0s,0n),+0s,2299161j)>, :color=>"yellow", :transform_message=>"(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!ピース!!)\nピカピカピカリンジャンケンポン! キュアピース!\n5つの光が導く未来!\n輝け!スマイルプリキュア!", :extra_names=>["プリンセスピース", "ウルトラピース"], :attack_messages=>["プリキュア!ピースサンダー!!", "開け、ロイヤルクロック!\n(みんなの力を1つにするクル!)\n届け、希望の光!\nはばたけ!光り輝く未来へ!\nプリキュア!ロイヤルレインボーバースト!", "(みんなの力を1つにするクル!)\nプリキュア!ミラクルレインボーバースト!\n輝けー!!\nスマイルプリキュア!!"], :transform_calls=>["smile_charge"]}
|
176
176
|
|
177
177
|
>> Cure.rosetta
|
178
|
-
=>
|
178
|
+
=> {:girl_name=>"cure_rosetta", :human_name=>"四葉ありす", :precure_name=>"キュアロゼッタ", :cast_name=>"渕上舞", :created_date=>#<Date: 2013-02-24 ((2456348j,0s,0n),+0s,2299161j)>, :color=>"yellow", :birthday=>"5/28", :transform_message=>"プリキュアラブリンク!\nL! O! V! E!\nひだまりポカポカ キュアロゼッタ!\n響け愛の鼓動!ドキドキプリキュア!\n世界を制するのは愛だけです、\nさぁ、あなたも私と愛を育んでくださいな", :extra_names=>nil, :attack_messages=>["カッチカチの!ロゼッタウォール!"], :transform_calls=>["love_link"]}
|
179
179
|
|
180
180
|
>> Cure.honey
|
181
|
-
=> {:girl_name=>"cure_honey", :human_name=>"大森ゆうこ", :precure_name=>"キュアハニー", :cast_name=>"北川里奈", :created_date
|
181
|
+
=> {:girl_name=>"cure_honey", :human_name=>"大森ゆうこ", :precure_name=>"キュアハニー", :cast_name=>"北川里奈", :created_date=>#<Date: 2014-03-15 ((2456732j,0s,0n),+0s,2299161j)>, :color=>"yellow", :transform_message=>"(かわルンルン!)\nプリキュアくるりんミラーチェンジ!\n大地に実る命の光!キュアハニー!\nハピネス注入!幸せチャージ!\nハピネスチャージプリキュア!", :extra_names=>["キュアハニー ポップコーンチア"], :attack_messages=>["命の光を聖なる力へ!\nハニーバトン!\nプリキュア!スパークリングバトンアタック!!\nイエイ!\n命よ、天に帰れ!\n(ゴクラ〜ク…)", "(かわルンルン!)\nプリキュアくるりんミラーチェンジ!ポップコーンチア!!\nプリキュア!リボンハートエクスプロージョン!!\nビクトリー!!", "(かわルンルン!)\nプリキュアくるりんミラーチェンジ!ココナッツサンバ!!\nプリキュア!マラカスリズムスパーク!!\nマンボ!!"], :transform_calls=>["kururin_mirror_change"]}
|
182
182
|
|
183
183
|
>> Shiny.luminous
|
184
|
-
=> {:girl_name=>"shiny_luminous", :human_name=>"九条ひかり", :precure_name=>"シャイニールミナス", :cast_name=>"田中理恵", :created_date
|
184
|
+
=> {:girl_name=>"shiny_luminous", :human_name=>"九条ひかり", :precure_name=>"シャイニールミナス", :cast_name=>"田中理恵", :created_date=>#<Date: 2005-03-06 ((2453436j,0s,0n),+0s,2299161j)>, :color=>"yellow", :birthday=>"9/9", :transform_message=>"ルミナス・シャイニングストリーム!\n輝く命、シャイニールミナス!\n光の心と光の意志、すべてを一つにするために!", :extra_names=>nil, :attack_messages=>["光の意志よ!私に勇気を!希望と力を!!\nルミナス・ハーティエル・アンクション!"], :transform_calls=>["shining_stream"]}
|
185
185
|
|
186
186
|
>> Milky.rose
|
187
|
-
=> {:girl_name=>"milky_rose", :human_name=>"美々野くるみ", :precure_name=>"ミルキィローズ", :cast_name=>"仙台エリ", :created_date
|
187
|
+
=> {:girl_name=>"milky_rose", :human_name=>"美々野くるみ", :precure_name=>"ミルキィローズ", :cast_name=>"仙台エリ", :created_date=>#<Date: 2008-04-06 ((2454563j,0s,0n),+0s,2299161j)>, :color=>"purple", :transform_message=>"スカイローズ・トランスレイト!\n青いバラは秘密のしるし! ミルキィローズ!", :extra_names=>nil, :attack_messages=>["邪悪な力を包み込む\nバラの吹雪を咲かせましょう!\nミルキィローズ・ブリザード!"], :transform_calls=>["sky_rose_translate", "translate"]}
|
188
188
|
```
|
189
189
|
|
190
190
|
and [more aliases!](config/girls/)
|
@@ -707,7 +707,7 @@ Cure.cosmo.name
|
|
707
707
|
>> require "delorean"
|
708
708
|
>> Delorean.time_travel_to "2015-11-24"
|
709
709
|
>> Date.today
|
710
|
-
=>
|
710
|
+
=> #<Date: 2015-11-24 ((2457351j,0s,0n),+0s,2299161j)>
|
711
711
|
>> Cure.twinkle.birthday?
|
712
712
|
=> false
|
713
713
|
|
@@ -792,6 +792,19 @@ $ curl -s https://rubicure.herokuapp.com/girls/cure_twinkle.json | jq .
|
|
792
792
|
}
|
793
793
|
```
|
794
794
|
|
795
|
+
## Versioning Policy
|
796
|
+
`rubicure` uses **Semantic Cure Versioning** :heart:
|
797
|
+
|
798
|
+
* Patch version up
|
799
|
+
* e.g. `1.1.1` -> `1.1.2`
|
800
|
+
* Containing bugfix
|
801
|
+
* Minor version up
|
802
|
+
* e.g. `1.1.1` -> `1.2.0`
|
803
|
+
* **Addition of Precure series**
|
804
|
+
* Not containing only addition features :kissing_heart:
|
805
|
+
* Major version up
|
806
|
+
* e.g. `1.1.1` -> `2.0.0`
|
807
|
+
* Containing breaking changes
|
795
808
|
|
796
809
|
## Contributing
|
797
810
|
|
data/lib/rubicure.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
require "active_support/
|
1
|
+
require "active_support/core_ext/array/wrap"
|
2
|
+
require "active_support/core_ext/hash/keys"
|
3
|
+
require "active_support/core_ext/time/calculations"
|
2
4
|
require "yaml"
|
3
5
|
require "hashie"
|
6
|
+
require "date"
|
7
|
+
require "json"
|
4
8
|
require "rubicure/version"
|
5
9
|
require "rubicure/concerns/util"
|
6
10
|
require "rubicure/concerns/gengou"
|
@@ -16,15 +20,14 @@ require "rubicure/cure_passion"
|
|
16
20
|
require "rubicure/cure_beat"
|
17
21
|
require "rubicure/cure_scarlet"
|
18
22
|
|
19
|
-
begin
|
20
|
-
require "backport_dig"
|
21
|
-
rescue LoadError # rubocop:disable Lint/HandleExceptions
|
22
|
-
end
|
23
|
-
|
24
23
|
module Precure
|
25
|
-
def self.method_missing(name, *args, &block)
|
24
|
+
def self.method_missing(name, *args, &block)
|
26
25
|
Rubicure::Core.instance.send(name, *args, &block)
|
27
26
|
end
|
27
|
+
|
28
|
+
def self.respond_to_missing?(name, include_private)
|
29
|
+
Rubicure::Core.instance.respond_to_missing?(name, include_private)
|
30
|
+
end
|
28
31
|
end
|
29
32
|
|
30
33
|
module Shiny
|
data/lib/rubicure/core.rb
CHANGED
@@ -28,7 +28,7 @@ module Rubicure
|
|
28
28
|
unmarked_precure.respond_to?(name)
|
29
29
|
end
|
30
30
|
|
31
|
-
# rubocop:disable
|
31
|
+
# rubocop:disable Layout/LineLength
|
32
32
|
|
33
33
|
# get current precure series
|
34
34
|
# @return [Rubicure::Series] current precure
|
@@ -45,7 +45,7 @@ module Rubicure
|
|
45
45
|
end
|
46
46
|
raise NotOnAirError, "Not on air precure!"
|
47
47
|
end
|
48
|
-
# rubocop:enable
|
48
|
+
# rubocop:enable Layout/LineLength
|
49
49
|
|
50
50
|
alias_method :current, :now
|
51
51
|
|
@@ -195,7 +195,7 @@ module Rubicure
|
|
195
195
|
end
|
196
196
|
alias_method :superstars, :super_stars
|
197
197
|
|
198
|
-
# rubocop:disable
|
198
|
+
# rubocop:disable Layout/LineLength
|
199
199
|
|
200
200
|
# Get precure miracle universe
|
201
201
|
#
|
@@ -240,7 +240,7 @@ module Rubicure
|
|
240
240
|
@miracle_leap
|
241
241
|
end
|
242
242
|
|
243
|
-
# rubocop:enable
|
243
|
+
# rubocop:enable Layout/LineLength
|
244
244
|
|
245
245
|
# iterate with :unmarked, :max_heart, ...
|
246
246
|
#
|
data/lib/rubicure/cure_peace.rb
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
[Cure.peace, Cure.cure_peace].each do |peace|
|
2
2
|
class << peace
|
3
|
+
# rubocop:disable Performance/CollectionLiteralInLoop
|
3
4
|
HANDS =
|
4
5
|
(["グー"] * 13) +
|
5
6
|
(["チョキ"] * 14) +
|
6
7
|
(["パー"] * 15) +
|
7
8
|
["グッチョッパー"]
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
# rubocop:enable Performance/CollectionLiteralInLoop
|
10
|
+
|
11
|
+
MESSAGE = <<~JANKEN.freeze
|
12
|
+
ピカピカピカリン
|
13
|
+
ジャンケンポン!
|
14
|
+
(%s)
|
15
|
+
JANKEN
|
13
16
|
def pikarin_janken
|
14
17
|
print_by_line(MESSAGE % HANDS.sample)
|
15
18
|
end
|
data/lib/rubicure/movie.rb
CHANGED
data/lib/rubicure/series.rb
CHANGED
data/lib/rubicure/version.rb
CHANGED
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.
|
15
|
+
spec.required_ruby_version = ">= 2.4"
|
16
16
|
|
17
17
|
if spec.respond_to?(:metadata)
|
18
18
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -40,14 +40,17 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_development_dependency "bundler", ">= 1.3.5"
|
41
41
|
spec.add_development_dependency "coveralls"
|
42
42
|
spec.add_development_dependency "delorean"
|
43
|
-
spec.add_development_dependency "onkcop", "0.
|
43
|
+
spec.add_development_dependency "onkcop", "1.0.0.0"
|
44
44
|
spec.add_development_dependency "rake"
|
45
45
|
spec.add_development_dependency "rspec", ">= 3.8.0"
|
46
46
|
spec.add_development_dependency "rspec-collection_matchers"
|
47
47
|
spec.add_development_dependency "rspec-its"
|
48
48
|
spec.add_development_dependency "rspec-parameterized", ">= 0.3.2"
|
49
|
-
spec.add_development_dependency "rubocop", "
|
50
|
-
spec.add_development_dependency "
|
49
|
+
spec.add_development_dependency "rubocop", "1.7.0"
|
50
|
+
spec.add_development_dependency "rubocop_auto_corrector"
|
51
|
+
spec.add_development_dependency "rubocop-performance", "1.9.2"
|
52
|
+
spec.add_development_dependency "rubocop-rake", "0.5.1"
|
53
|
+
spec.add_development_dependency "rubocop-rspec", "2.1.0"
|
51
54
|
spec.add_development_dependency "rubydoctest"
|
52
55
|
spec.add_development_dependency "simplecov"
|
53
56
|
spec.add_development_dependency "unparser", ">= 0.4.5"
|
data/spec/rubicure/girl_spec.rb
CHANGED
@@ -25,11 +25,11 @@ describe Rubicure::Girl do
|
|
25
25
|
let(:extra_names) { %w[プリンセスピース ウルトラピース] }
|
26
26
|
let(:color) { "yellow" }
|
27
27
|
let(:transform_message) do
|
28
|
-
|
29
|
-
プリキュアスマイルチャージ!
|
30
|
-
GO! GO! Let's GO ピース!
|
31
|
-
ピカピカピカリンジャンケンポン! キュアピース!
|
32
|
-
JANKEN
|
28
|
+
<<~JANKEN
|
29
|
+
プリキュアスマイルチャージ!
|
30
|
+
GO! GO! Let's GO ピース!
|
31
|
+
ピカピカピカリンジャンケンポン! キュアピース!
|
32
|
+
JANKEN
|
33
33
|
end
|
34
34
|
let(:attack_messages) do
|
35
35
|
[
|
@@ -100,13 +100,13 @@ JANKEN
|
|
100
100
|
transform_calls: ["cure_up_rapapa"],
|
101
101
|
color: "pink",
|
102
102
|
birthday: "6/12",
|
103
|
-
transform_styles:
|
103
|
+
transform_styles: {
|
104
104
|
diamond: {
|
105
|
-
precure_name:
|
105
|
+
precure_name: "キュアミラクル(ダイヤスタイル)",
|
106
106
|
transform_message: "",
|
107
107
|
},
|
108
|
-
ruby:
|
109
|
-
precure_name:
|
108
|
+
ruby: {
|
109
|
+
precure_name: "キュアミラクル(ルビースタイル)",
|
110
110
|
transform_message: "",
|
111
111
|
},
|
112
112
|
},
|
@@ -258,7 +258,7 @@ JANKEN
|
|
258
258
|
girl.transform!
|
259
259
|
end
|
260
260
|
|
261
|
-
subject! { humanize! }
|
261
|
+
subject! { humanize! } # rubocop:disable RSpec/LeadingSubject
|
262
262
|
|
263
263
|
it_behaves_like :a_humanize_method
|
264
264
|
end
|
@@ -61,52 +61,54 @@ describe Rubicure do
|
|
61
61
|
end
|
62
62
|
|
63
63
|
describe "Cure." do
|
64
|
-
|
65
|
-
|
66
|
-
[
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
64
|
+
context "When precure who starting 'cure'" do
|
65
|
+
where(:name) do
|
66
|
+
[
|
67
|
+
[:black],
|
68
|
+
[:white],
|
69
|
+
|
70
|
+
[:bloom],
|
71
|
+
[:egret],
|
72
|
+
|
73
|
+
[:dream],
|
74
|
+
[:rouge],
|
75
|
+
[:lemonade],
|
76
|
+
[:mint],
|
77
|
+
[:aqua],
|
78
|
+
|
79
|
+
[:peach],
|
80
|
+
[:berry],
|
81
|
+
[:pine],
|
82
|
+
[:passion],
|
83
|
+
|
84
|
+
[:melody],
|
85
|
+
[:rhythm],
|
86
|
+
[:beat],
|
87
|
+
[:muse],
|
88
|
+
|
89
|
+
[:happy],
|
90
|
+
[:sunny],
|
91
|
+
[:peace],
|
92
|
+
[:march],
|
93
|
+
[:beauty],
|
94
|
+
|
95
|
+
[:heart],
|
96
|
+
[:diamond],
|
97
|
+
[:rosetta],
|
98
|
+
[:sword],
|
99
|
+
[:ace],
|
100
|
+
|
101
|
+
[:lovely],
|
102
|
+
[:princess],
|
103
|
+
[:honey],
|
104
|
+
[:fortune],
|
105
|
+
]
|
106
|
+
end
|
106
107
|
|
107
|
-
|
108
|
-
|
109
|
-
|
108
|
+
with_them do
|
109
|
+
it { expect(Cure.send(name)).to be_an_instance_of Rubicure::Girl }
|
110
|
+
it { expect(Cure.send(name).precure_name).to be_start_with "キュア" }
|
111
|
+
end
|
110
112
|
end
|
111
113
|
|
112
114
|
context "When precure who not starting 'cure'" do
|
@@ -71,7 +71,7 @@ describe Rubicure::Series do
|
|
71
71
|
it { should all(be_instance_of Rubicure::Girl) }
|
72
72
|
end
|
73
73
|
|
74
|
-
# rubocop:disable Style/CaseEquality,
|
74
|
+
# rubocop:disable Style/CaseEquality, Style/NilComparison
|
75
75
|
describe "#===" do
|
76
76
|
let(:series) { Rubicure::Series.find(series_name) }
|
77
77
|
let(:series_name) { :smile }
|
@@ -79,7 +79,9 @@ describe Rubicure::Series do
|
|
79
79
|
let(:girl_name) { :peace }
|
80
80
|
|
81
81
|
context "same series" do
|
82
|
-
|
82
|
+
let(:same_series) { Rubicure::Series.find(series_name) }
|
83
|
+
|
84
|
+
it { expect(series === same_series).to be true }
|
83
85
|
it { expect(series === girl).to be true }
|
84
86
|
end
|
85
87
|
|
@@ -99,7 +101,7 @@ describe Rubicure::Series do
|
|
99
101
|
it { expect(series === nil).to be false }
|
100
102
|
end
|
101
103
|
end
|
102
|
-
# rubocop:enable Style/CaseEquality,
|
104
|
+
# rubocop:enable Style/CaseEquality, Style/NilComparison
|
103
105
|
|
104
106
|
describe "#names" do
|
105
107
|
subject { Rubicure::Series.names }
|
@@ -148,8 +150,8 @@ describe Rubicure::Series do
|
|
148
150
|
let(:series_name) { :splash_star }
|
149
151
|
|
150
152
|
let(:json) do
|
151
|
-
|
152
|
-
{\"series_name\":\"splash_star\",\"title\":\"ふたりはプリキュア Splash☆Star\",\"started_date\":\"2006-02-05\",\"ended_date\":\"2007-01-28\",\"girls\":[\"cure_bloom\",\"cure_egret\"]}
|
153
|
+
<<~JSON
|
154
|
+
{\"series_name\":\"splash_star\",\"title\":\"ふたりはプリキュア Splash☆Star\",\"started_date\":\"2006-02-05\",\"ended_date\":\"2007-01-28\",\"girls\":[\"cure_bloom\",\"cure_egret\"]}
|
153
155
|
JSON
|
154
156
|
end
|
155
157
|
|
data/spec/spec_helper.rb
CHANGED
@@ -35,10 +35,11 @@ require "rspec/its"
|
|
35
35
|
require "rspec/collection_matchers"
|
36
36
|
require "delorean"
|
37
37
|
require "tempfile"
|
38
|
+
require "active_support/core_ext/time/zones"
|
38
39
|
|
39
40
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
40
41
|
# in spec/support/ and its subdirectories.
|
41
|
-
Dir["#{__dir__}/support/**/*.rb"].each {|f| require f }
|
42
|
+
Dir["#{__dir__}/support/**/*.rb"].sort.each {|f| require f }
|
42
43
|
|
43
44
|
Time.zone = "Tokyo"
|
44
45
|
|
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:
|
4
|
+
version: 2.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:
|
11
|
+
date: 2021-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 1.0.0.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 1.0.0.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,28 +184,70 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - '='
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 1.7.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:
|
194
|
+
version: 1.7.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rubocop_auto_corrector
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rubocop-performance
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - '='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 1.9.2
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - '='
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 1.9.2
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rubocop-rake
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - '='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 0.5.1
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - '='
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 0.5.1
|
195
237
|
- !ruby/object:Gem::Dependency
|
196
238
|
name: rubocop-rspec
|
197
239
|
requirement: !ruby/object:Gem::Requirement
|
198
240
|
requirements:
|
199
241
|
- - '='
|
200
242
|
- !ruby/object:Gem::Version
|
201
|
-
version: 1.
|
243
|
+
version: 2.1.0
|
202
244
|
type: :development
|
203
245
|
prerelease: false
|
204
246
|
version_requirements: !ruby/object:Gem::Requirement
|
205
247
|
requirements:
|
206
248
|
- - '='
|
207
249
|
- !ruby/object:Gem::Version
|
208
|
-
version: 1.
|
250
|
+
version: 2.1.0
|
209
251
|
- !ruby/object:Gem::Dependency
|
210
252
|
name: rubydoctest
|
211
253
|
requirement: !ruby/object:Gem::Requirement
|
@@ -347,14 +389,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
347
389
|
requirements:
|
348
390
|
- - ">="
|
349
391
|
- !ruby/object:Gem::Version
|
350
|
-
version: 2.
|
392
|
+
version: '2.4'
|
351
393
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
352
394
|
requirements:
|
353
395
|
- - ">="
|
354
396
|
- !ruby/object:Gem::Version
|
355
397
|
version: '0'
|
356
398
|
requirements: []
|
357
|
-
rubygems_version: 3.
|
399
|
+
rubygems_version: 3.2.3
|
358
400
|
signing_key:
|
359
401
|
specification_version: 4
|
360
402
|
summary: All about Japanese battle heroine "Pretty Cure (Precure)".
|