rubicure 0.4.2 → 0.4.3

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
  SHA1:
3
- metadata.gz: 87687a93a85796a232ba0611867dbf235238e02c
4
- data.tar.gz: 15f2997936ec5b6fe37e3896541c5b3953b288da
3
+ metadata.gz: 237be428fcddb635314b4d56f35d97c2bf4cd7e2
4
+ data.tar.gz: 04396b1a1ccc18742ff9d00d1b413401c56d3b14
5
5
  SHA512:
6
- metadata.gz: 64dd55f86512be332feac6d91b65eaf537cb5c02827598e493a075c6d5ef9a2c12c035a5466843f526d9b699b18bdf04c2216e981c25172617a728c83a677472
7
- data.tar.gz: 2f1dc44c7eb2621775b6b3d25ea3c59ee238589ffb995ac0c2c661fca05bfbc8b84782212ad6a53595b76ca5fdf13c944c09bd6e3eae193b75cfe003586f7649
6
+ metadata.gz: 07bb16c28977b32f3ba0704ddb6131d9b69d435011f6b0d619cf9baf5c1cec366f1802858a1ae109b1f06b508e4ad86b52a631cd359235b715c8a46c2149a1c8
7
+ data.tar.gz: 77a07413c1643847542ce9031248116ce1a0b4af55b05bef89aa44e1ce3ede1ed0c1b78a9dbfcdb40fdb04fc5a21bc8e9dfa4a1a61c910484d003216718b6f76
data/.travis.yml CHANGED
@@ -7,6 +7,7 @@ rvm:
7
7
  - ruby-head
8
8
  bundler_args: "--jobs=2"
9
9
  cache: bundler
10
+ before_install: gem install bundler -v 1.11.2
10
11
  before_script:
11
12
  - export CODECLIMATE_REPO_TOKEN=8e9db6ee5f3818e87287a6393086c2ccb9b1b83106c5bfb972211abefd2fe162
12
13
  - export COVERAGE=true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/rubicure/compare/v0.4.2...master)
2
+ [full changelog](http://github.com/sue445/rubicure/compare/v0.4.3...master)
3
+
4
+ ## v0.4.3
5
+ [full changelog](http://github.com/sue445/rubicure/compare/v0.4.2...v0.4.3)
6
+
7
+ * Add cure echo
8
+ * https://github.com/sue445/rubicure/pull/102
3
9
 
4
10
  ## v0.4.2
5
11
  [full changelog](http://github.com/sue445/rubicure/compare/v0.4.1...v0.4.2)
data/README.md CHANGED
@@ -390,18 +390,36 @@ Precure.all_stars.map(&:precure_name)
390
390
 
391
391
  Precure.all_stars("2013-10-26").count
392
392
  #=> 33
393
+
393
394
  Precure.all_stars(:dx).count
394
395
  #=> 14
396
+
395
397
  Precure.all_stars(:dx2).count
396
398
  #=> 17
399
+
397
400
  Precure.all_stars(:dx3).count
398
401
  #=> 21
402
+
399
403
  Precure.all_stars(:new_stage).count
400
- #=> 28
404
+ #=> 29
405
+ Precure.all_stars(:new_stage).include?(Cure.echo)
406
+ #=> true
407
+
401
408
  Precure.all_stars(:new_stage2).count
402
409
  #=> 32
410
+
403
411
  Precure.all_stars(:new_stage3).count
404
- #=> 36
412
+ #=> 37
413
+ Precure.all_stars(:new_stage3).include?(Cure.echo)
414
+ #=> true
415
+
416
+ Precure.all_stars(:spring_carnival).count
417
+ #=> 40
418
+
419
+ Precure.all_stars(:sing_together_miracle_magic).count
420
+ #=> 44
421
+ Precure.all_stars(:sing_together_miracle_magic).include?(Cure.echo)
422
+ #=> true
405
423
  ```
406
424
 
407
425
  and [more aliases!](config/movies.yml)
@@ -0,0 +1,18 @@
1
+ cure_echo: &cure_echo
2
+ girl_name: cure_echo
3
+ human_name: 坂上あゆみ
4
+ precure_name: キュアエコー
5
+ cast_name: 能登麻美子
6
+ created_date:
7
+ color: white
8
+ transform_message: |-
9
+ みんなの思いを守るために
10
+ 心をひとつに!
11
+ 思いよ届け!キュアエコー!
12
+ extra_names:
13
+ attack_messages:
14
+ - |-
15
+ 世界に響け、みんなの思い!
16
+ プリキュア・ハートフルエコー!
17
+ echo:
18
+ <<: *cure_echo
data/config/movies.yml CHANGED
@@ -16,6 +16,8 @@ dx3: &dx3
16
16
  ns1: &ns1
17
17
  title: 映画 プリキュアオールスターズNewStage みらいのともだち
18
18
  started_date: 2012-03-17
19
+ extra_girls:
20
+ - cure_echo
19
21
  ns:
20
22
  <<: *ns1
21
23
  new_stage:
@@ -32,6 +34,8 @@ new_stage2:
32
34
  ns3: &ns3
33
35
  title: 映画 プリキュアオールスターズ NewStage3 永遠のともだち
34
36
  started_date: 2014-03-15
37
+ extra_girls:
38
+ - cure_echo
35
39
  new_stage3:
36
40
  <<: *ns3
37
41
  #######################################################
@@ -44,5 +48,7 @@ spring_carnival:
44
48
  stmm: &stmm
45
49
  title: 映画 プリキュアオールスターズ みんなで歌う 奇跡の魔法!
46
50
  started_date: 2016-03-19
51
+ extra_girls:
52
+ - cure_echo
47
53
  sing_together_miracle_magic:
48
54
  <<: *stmm
@@ -11,7 +11,11 @@ module Rubicure
11
11
  when Date, Time
12
12
  arg
13
13
  when String
14
- Date.parse(arg)
14
+ begin
15
+ Date.parse(arg)
16
+ rescue
17
+ nil
18
+ end
15
19
  else
16
20
  nil
17
21
  end
data/lib/rubicure/core.rb CHANGED
@@ -43,15 +43,23 @@ module Rubicure
43
43
  @all_stars.uniq!(&:human_name)
44
44
  end
45
45
 
46
- begin
46
+ extra_girls = []
47
+
48
+ # args is Time or Date
49
+ date = to_date(arg)
50
+
51
+ unless date
52
+ # args is movie name
47
53
  movie = Rubicure::Movie.find(arg.to_sym)
48
54
  date = movie.started_date
49
- rescue
50
- # args is Time or Date
51
- date = to_date(arg)
55
+
56
+ if movie.has_key?(:extra_girls)
57
+ extra_girls = movie.extra_girls.map { |girl_name| Rubicure::Girl.find(girl_name.to_sym) }
58
+ end
52
59
  end
53
60
 
54
- @all_stars.select { |girl| girl.created_date && girl.created_date <= date }
61
+ girls = @all_stars.select { |girl| girl.created_date && girl.created_date <= date }
62
+ girls + extra_girls
55
63
  end
56
64
 
57
65
  # iterate with :unmarked, :max_heart, ...
@@ -1,3 +1,3 @@
1
1
  module Rubicure
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
data/spec/core_spec.rb CHANGED
@@ -70,36 +70,37 @@ EOS
70
70
  context "With arg" do
71
71
  subject { instance.all_stars(arg) }
72
72
 
73
- where(:arg, :expected_count) do
73
+ where(:arg, :expected_count, :include_cure_echo) do
74
74
  [
75
- ["2009-03-20", 14],
76
- [Date.parse("2010-03-20"), 17],
77
- [Time.parse("2011-03-19"), 21],
78
-
79
- [:dx, 14],
80
- [:dx1, 14],
81
- [:dx2, 17],
82
- [:dx3, 21],
83
-
84
- [:ns, 28],
85
- [:ns1, 28],
86
- [:new_stage, 28],
87
- [:new_stage1, 28],
88
- [:ns2, 32],
89
- [:new_stage2, 32],
90
- [:ns3, 36],
91
- [:new_stage3, 36],
92
-
93
- [:sc, 40],
94
- [:spring_carnival, 40],
95
-
96
- [:stmm, 43],
97
- [:sing_together_miracle_magic, 43],
75
+ ["2009-03-20", 14, false],
76
+ [Date.parse("2010-03-20"), 17, false],
77
+ [Time.parse("2011-03-19"), 21, false],
78
+
79
+ [:dx, 14, false],
80
+ [:dx1, 14, false],
81
+ [:dx2, 17, false],
82
+ [:dx3, 21, false],
83
+
84
+ [:ns, 29, true],
85
+ [:ns1, 29, true],
86
+ [:new_stage, 29, true],
87
+ [:new_stage1, 29, true],
88
+ [:ns2, 32, false],
89
+ [:new_stage2, 32, false],
90
+ [:ns3, 37, true],
91
+ [:new_stage3, 37, true],
92
+
93
+ [:sc, 40, false],
94
+ [:spring_carnival, 40, false],
95
+
96
+ [:stmm, 44, true],
97
+ [:sing_together_miracle_magic, 44, true],
98
98
  ]
99
99
  end
100
100
 
101
101
  with_them do
102
102
  its(:count) { should == expected_count }
103
+ it { expect(subject.include?(Cure.echo)).to be include_cure_echo }
103
104
  end
104
105
  end
105
106
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubicure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
@@ -254,6 +254,7 @@ files:
254
254
  - config/girls/011_happiness_charge.yml
255
255
  - config/girls/012_go_princess.yml
256
256
  - config/girls/013_maho_girls.yml
257
+ - config/girls/movie.yml
257
258
  - config/movies.yml
258
259
  - config/series.yml
259
260
  - lib/rubicure.rb