rubicure 1.0.0.pre4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +9 -0
- data/config/movies.yml +6 -0
- data/lib/rubicure/core.rb +16 -1
- data/lib/rubicure/version.rb +1 -1
- data/spec/core_spec.rb +26 -3
- data/spec/movie_spec.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2295c4227e9c72df7a597beb3a1f5f5a33f317f5
|
4
|
+
data.tar.gz: 2094f77901f313abef73e2563157b238606a5183
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75293257d2be0e072237250013bfa55282d08b992580dbf38c3d3508ca35f639b14b7d1d2545ac8bb78c168867ecf7f4f0458f06a7badf0d54eb9681f8d75f28
|
7
|
+
data.tar.gz: 67a35fdc69c5131d3117c7e85fec615c493e5867d0e2aaa166b198a39a566389cc5746c1dc1007e7af5aca8a959d8dccef185cccc96e08953840d508fde270ce
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](http://github.com/sue445/rubicure/compare/
|
2
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v1.0.0...master)
|
3
3
|
|
4
4
|
## v1.0.0
|
5
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v0.4.13...v1.0.0)
|
5
6
|
|
6
7
|
### Breaking changes :bomb:
|
7
8
|
* Remove `Girl#humanize`
|
@@ -23,6 +24,11 @@
|
|
23
24
|
* Impl `Precure.all_girls` (a.k.a. `Precure.all`)
|
24
25
|
* https://github.com/sue445/rubicure/pull/138
|
25
26
|
* https://github.com/sue445/rubicure/issues/136
|
27
|
+
* Add kirakira precure alamode
|
28
|
+
* https://github.com/sue445/rubicure/pull/131
|
29
|
+
* Impl `Precure.dream_stars`
|
30
|
+
* https://github.com/sue445/rubicure/pull/141
|
31
|
+
* https://github.com/sue445/rubicure/issues/137
|
26
32
|
|
27
33
|
### Others
|
28
34
|
* Exclude examples/ from gem file
|
data/README.md
CHANGED
@@ -476,6 +476,15 @@ Precure.all_girls.include?(Cure.echo)
|
|
476
476
|
* `Precure.all_girls` returns all precure. (includes "Kirakira Precure Alamode")
|
477
477
|
* `Precure.all_stars` returns only from "Futari wa Pretty Cure" to "Maho Girls PreCure"
|
478
478
|
|
479
|
+
### `Precure.dream_stars`
|
480
|
+
```ruby
|
481
|
+
Precure.dream_stars.count
|
482
|
+
#=> 12
|
483
|
+
|
484
|
+
Precure.dream_stars.map(&:precure_name)
|
485
|
+
#=> ["キュアフローラ", "キュアマーメイド", "キュアトゥインクル", "キュアスカーレット", "キュアミラクル", "キュアマジカル", "キュアフェリーチェ", "キュアホイップ", "キュアカスタード", "キュアジェラート", "キュアマカロン", "キュアショコラ"]
|
486
|
+
```
|
487
|
+
|
479
488
|
### Equivalence
|
480
489
|
```ruby
|
481
490
|
yayoi = Cure.peace.dup
|
data/config/movies.yml
CHANGED
data/lib/rubicure/core.rb
CHANGED
@@ -39,7 +39,12 @@ module Rubicure
|
|
39
39
|
# args is Time or Date
|
40
40
|
date = to_date(arg)
|
41
41
|
|
42
|
-
|
42
|
+
if date
|
43
|
+
last_all_stars_date = Rubicure::Movie.find(:stmm).started_date
|
44
|
+
if date > last_all_stars_date
|
45
|
+
date = last_all_stars_date
|
46
|
+
end
|
47
|
+
else
|
43
48
|
# args is movie name
|
44
49
|
movie = Rubicure::Movie.find(arg.to_sym)
|
45
50
|
date = movie.started_date
|
@@ -71,6 +76,16 @@ module Rubicure
|
|
71
76
|
|
72
77
|
alias_method :all, :all_girls
|
73
78
|
|
79
|
+
def dream_stars
|
80
|
+
return @dream_stars if @dream_stars
|
81
|
+
girls = Precure.go_princess.girls + Precure.maho_girls.girls + Precure.a_la_mode.girls
|
82
|
+
|
83
|
+
dream_stars_date = Rubicure::Movie.find(:dream_stars).started_date
|
84
|
+
@dream_stars = girls.select { |girl| girl.created_date && girl.created_date <= dream_stars_date }
|
85
|
+
|
86
|
+
@dream_stars
|
87
|
+
end
|
88
|
+
|
74
89
|
# iterate with :unmarked, :max_heart, ...
|
75
90
|
#
|
76
91
|
# @yield series
|
data/lib/rubicure/version.rb
CHANGED
data/spec/core_spec.rb
CHANGED
@@ -36,7 +36,7 @@ describe Rubicure::Core do
|
|
36
36
|
context "Without arg" do
|
37
37
|
subject { instance.all_stars }
|
38
38
|
|
39
|
-
let(:precure_count) {
|
39
|
+
let(:precure_count) { 43 }
|
40
40
|
|
41
41
|
its(:count) { should == precure_count }
|
42
42
|
end
|
@@ -48,7 +48,7 @@ describe Rubicure::Core do
|
|
48
48
|
|
49
49
|
where(:arg, :expected_count, :include_cure_echo) do
|
50
50
|
"2009-03-20" | 14 | false
|
51
|
-
"2017-01-17" |
|
51
|
+
"2017-01-17" | 43 | false
|
52
52
|
Date.parse("2010-03-20") | 17 | false
|
53
53
|
Time.parse("2011-03-19") | 21 | false
|
54
54
|
|
@@ -84,7 +84,7 @@ describe Rubicure::Core do
|
|
84
84
|
context "Without arg" do
|
85
85
|
subject { instance.all_girls }
|
86
86
|
|
87
|
-
let(:precure_count) {
|
87
|
+
let(:precure_count) { 50 }
|
88
88
|
|
89
89
|
its(:count) { should == precure_count }
|
90
90
|
it { should include Cure.echo }
|
@@ -108,4 +108,27 @@ describe Rubicure::Core do
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
end
|
111
|
+
|
112
|
+
describe "#dream_stars" do
|
113
|
+
subject { Precure.dream_stars.map(&:girl_name) }
|
114
|
+
|
115
|
+
let(:dream_stars_girl_names) do
|
116
|
+
[
|
117
|
+
Cure.flora,
|
118
|
+
Cure.mermaid,
|
119
|
+
Cure.twinkle,
|
120
|
+
Cure.scarlet,
|
121
|
+
Cure.miracle,
|
122
|
+
Cure.magical,
|
123
|
+
Cure.felice,
|
124
|
+
Cure.whip,
|
125
|
+
Cure.custard,
|
126
|
+
Cure.gelato,
|
127
|
+
Cure.macaroon,
|
128
|
+
Cure.chocolat,
|
129
|
+
].map(&:girl_name)
|
130
|
+
end
|
131
|
+
|
132
|
+
it { should contain_exactly(*dream_stars_girl_names) }
|
133
|
+
end
|
111
134
|
end
|
data/spec/movie_spec.rb
CHANGED
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: 1.0.0
|
4
|
+
version: 1.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: 2017-
|
11
|
+
date: 2017-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -306,9 +306,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
306
306
|
version: 2.2.2
|
307
307
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
308
308
|
requirements:
|
309
|
-
- - "
|
309
|
+
- - ">="
|
310
310
|
- !ruby/object:Gem::Version
|
311
|
-
version:
|
311
|
+
version: '0'
|
312
312
|
requirements: []
|
313
313
|
rubyforge_project:
|
314
314
|
rubygems_version: 2.6.8
|