Skip to content

Commit

Permalink
Merge b040f5e into f6b5b6e
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jun 22, 2019
2 parents f6b5b6e + b040f5e commit dfcb7f3
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 9 deletions.
15 changes: 10 additions & 5 deletions README.md
Expand Up @@ -121,10 +121,10 @@ and [more aliases!](config/series.yml)

```ruby
>> Precure.now
=> {:series_name=>"star_twinkle", :title=>"スター☆トゥインクルプリキュア", :started_date=>Sun, 03 Feb 2019, :girls=>["cure_star", "cure_milky", "cure_soleil", "cure_selene"]}
=> {:series_name=>"star_twinkle", :title=>"スター☆トゥインクルプリキュア", :started_date=>Sun, 03 Feb 2019, :girls=>["cure_star", "cure_milky", "cure_soleil", "cure_selene", "cure_cosmo"]}

>> Precure.current
=> {:series_name=>"star_twinkle", :title=>"スター☆トゥインクルプリキュア", :started_date=>Sun, 03 Feb 2019, :girls=>["cure_star", "cure_milky", "cure_soleil", "cure_selene"]}
=> {:series_name=>"star_twinkle", :title=>"スター☆トゥインクルプリキュア", :started_date=>Sun, 03 Feb 2019, :girls=>["cure_star", "cure_milky", "cure_soleil", "cure_selene", "cure_cosmo"]}

# -2013/1/27 : smile precure
# 2013/2/5 - : dokidoki precure
Expand Down Expand Up @@ -604,7 +604,7 @@ Go!プリンセスプリキュア
=> [:unmarked, :max_heart, :splash_star, :yes, :yes_gogo, :fresh, :heart_catch, :suite, :smile, :dokidoki, :happiness_charge, :go_princess, :maho_girls, :a_la_mode, :hugtto, :star_twinkle]

>> Precure.inject([]){|girl_count_of_series, series| girl_count_of_series << series.girls.count; girl_count_of_series }
=> [2, 3, 2, 5, 6, 4, 4, 4, 5, 5, 4, 4, 3, 6, 5, 4]
=> [2, 3, 2, 5, 6, 4, 4, 4, 5, 5, 4, 4, 3, 6, 5, 5]

>> Precure.map(&:title)
=> ["ふたりはプリキュア", "ふたりはプリキュア Max Heart", "ふたりはプリキュア Splash☆Star", "Yes! プリキュア5", "Yes! プリキュア5 Go Go!", "フレッシュプリキュア!", "ハートキャッチプリキュア!", "スイートプリキュア♪", "スマイルプリキュア!", "ドキドキ!プリキュア", "ハピネスチャージプリキュア!", "Go!プリンセスプリキュア", "魔法つかいプリキュア!", "キラキラ☆プリキュアアラモード", "HUGっと!プリキュア", "スター☆トゥインクルプリキュア"]
Expand All @@ -613,7 +613,7 @@ Go!プリンセスプリキュア
=> ["キュアラブリー", "キュアプリンセス", "キュアハニー", "キュアフォーチュン"]

>> Precure.map{|series| series.map(&:precure_name) }
=> [["キュアブラック", "キュアホワイト"], ["キュアブラック", "キュアホワイト", "シャイニールミナス"], ["キュアブルーム", "キュアイーグレット"], ["キュアドリーム", "キュアルージュ", "キュアレモネード", "キュアミント", "キュアアクア"], ["キュアドリーム", "キュアルージュ", "キュアレモネード", "キュアミント", "キュアアクア", "ミルキィローズ"], ["キュアピーチ", "キュアベリー", "キュアパイン", "キュアパッション"], ["キュアブロッサム", "キュアマリン", "キュアサンシャイン", "キュアムーンライト"], ["キュアメロディ", "キュアリズム", "キュアビート", "キュアミューズ"], ["キュアハッピー", "キュアサニー", "キュアピース", "キュアマーチ", "キュアビューティ"], ["キュアハート", "キュアダイヤモンド", "キュアロゼッタ", "キュアソード", "キュアエース"], ["キュアラブリー", "キュアプリンセス", "キュアハニー", "キュアフォーチュン"], ["キュアフローラ", "キュアマーメイド", "キュアトゥインクル", "キュアスカーレット"], ["キュアミラクル", "キュアマジカル", "キュアフェリーチェ"], ["キュアホイップ", "キュアカスタード", "キュアジェラート", "キュアマカロン", "キュアショコラ", "キュアパルフェ"], ["キュアエール", "キュアアンジュ", "キュアエトワール", "キュアマシェリ", "キュアアムール"], ["キュアスター", "キュアミルキー", "キュアソレイユ", "キュアセレーネ"]]
=> [["キュアブラック", "キュアホワイト"], ["キュアブラック", "キュアホワイト", "シャイニールミナス"], ["キュアブルーム", "キュアイーグレット"], ["キュアドリーム", "キュアルージュ", "キュアレモネード", "キュアミント", "キュアアクア"], ["キュアドリーム", "キュアルージュ", "キュアレモネード", "キュアミント", "キュアアクア", "ミルキィローズ"], ["キュアピーチ", "キュアベリー", "キュアパイン", "キュアパッション"], ["キュアブロッサム", "キュアマリン", "キュアサンシャイン", "キュアムーンライト"], ["キュアメロディ", "キュアリズム", "キュアビート", "キュアミューズ"], ["キュアハッピー", "キュアサニー", "キュアピース", "キュアマーチ", "キュアビューティ"], ["キュアハート", "キュアダイヤモンド", "キュアロゼッタ", "キュアソード", "キュアエース"], ["キュアラブリー", "キュアプリンセス", "キュアハニー", "キュアフォーチュン"], ["キュアフローラ", "キュアマーメイド", "キュアトゥインクル", "キュアスカーレット"], ["キュアミラクル", "キュアマジカル", "キュアフェリーチェ"], ["キュアホイップ", "キュアカスタード", "キュアジェラート", "キュアマカロン", "キュアショコラ", "キュアパルフェ"], ["キュアエール", "キュアアンジュ", "キュアエトワール", "キュアマシェリ", "キュアアムール"], ["キュアスター", "キュアミルキー", "キュアソレイユ", "キュアセレーネ", "キュアコスモ"]]
```

### Not operator
Expand Down Expand Up @@ -678,7 +678,7 @@ Go!プリンセスプリキュア
=> ["シャイニールミナス", "キュアレモネード", "キュアパイン", "キュアサンシャイン", "キュアミューズ", "キュアピース", "キュアロゼッタ", "キュアハニー", "キュアトゥインクル", "キュアカスタード", "キュアエトワール", "キュアソレイユ"]

>> Precure.all_girls.group_by{ |girl| girl.color }.map{ |color, girls| [color, girls.count] }.sort_by{ |color, girl_count| [girl_count, color] }.reverse
=> [["pink", 13], ["yellow", 12], ["blue", 10], ["purple", 8], ["red", 7], ["white", 4], ["green", 4], ["rainbow", 1], ["black", 1]]
=> [["pink", 13], ["yellow", 12], ["blue", 11], ["purple", 8], ["red", 7], ["white", 4], ["green", 4], ["rainbow", 1], ["black", 1]]
```

### birthday methods
Expand Down Expand Up @@ -720,6 +720,11 @@ Go!プリンセスプリキュア
=> true
>> Cure.star.reiwa?
=> false

>> Cure.cosmo.heisei?
=> false
>> Cure.cosmo.reiwa?
=> true
```

### `Rubicure::Series#heisei?` and `Rubicure::Series#reiwa?`
Expand Down
32 changes: 32 additions & 0 deletions config/girls/016_star_twinkle.yml
Expand Up @@ -125,3 +125,35 @@ cure_selene: &cure_selene
- color_charge
selene:
<<: *cure_selene

cure_cosmo: &cure_cosmo
girl_name: cure_cosmo
human_name: マオ
precure_name: キュアコスモ
cast_name: 上坂すみれ
color: rainbow
created_date: 2019-06-23 # episode 20
# birthday: XX/XX
transform_message: |-
スターカラーペンダント!
カラーチャージ!
煌めくー
星の力でー
憧れのー
私えがくよー
トゥインクル!トゥインクル!プリキュア!
トゥインクル!トゥインクル!プリキュア!
トゥインクル!トゥインクル!プリキュア!
スター☆トゥインクル!
スター☆トゥインクル!プリキュア!
あー!
銀河に光る虹色のスペクトル!キュアコスモ!
スター☆トゥインクル!プリキュア!
# extra_names:
attack_messages:
- |-
プリキュア!コスモシャイニング!
transform_calls:
- color_charge
cosmo:
<<: *cure_cosmo
1 change: 1 addition & 0 deletions config/series.yml
Expand Up @@ -214,5 +214,6 @@ star_twinkle: &star_twinkle
- cure_milky
- cure_soleil
- cure_selene
- cure_cosmo
star_twinkle_precure:
<<: *star_twinkle
7 changes: 4 additions & 3 deletions lib/rubicure/concerns/util.rb
Expand Up @@ -4,13 +4,14 @@ module Concerns
module Util
# @param arg [Date,Time,String]
#
# @return [Date] arg is String or Date
# @return [Time] arg is Time
# @return [Date] arg is String, Date or Time
# @return [nil] arg is other
def to_date(arg)
case arg
when Date, Time
when Date
arg
when Time
arg.to_date
when String
begin
Date.parse(arg)
Expand Down
2 changes: 1 addition & 1 deletion spec/rubicure/core_spec.rb
Expand Up @@ -86,7 +86,7 @@
context "Without arg" do
subject { instance.all_girls }

let(:precure_count) { 60 }
let(:precure_count) { 61 }

its(:count) { should == precure_count }
it { should include Cure.echo }
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -41,6 +41,8 @@
# in spec/support/ and its subdirectories.
Dir["#{__dir__}/support/**/*.rb"].each {|f| require f }

Time.zone = "Tokyo"

RSpec.configure do |config|
# The settings below are suggested to provide a good initial experience
# with RSpec, but feel free to customize to your heart's content.
Expand Down

0 comments on commit dfcb7f3

Please sign in to comment.