rubicure 1.0.0.pre2 → 1.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -5
- data/README.md +20 -3
- data/config/girls/movie.yml +1 -1
- data/lib/rubicure/core.rb +20 -11
- data/lib/rubicure/version.rb +1 -1
- data/spec/core_spec.rb +30 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c176af2bff658da89c24243c92da38146630a597
|
4
|
+
data.tar.gz: 0ad486115ec51b5f0fd317b8fe9e88e1621080d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ed03551dd1464f1db0fa78ccd13b24da2d3a1a5bd5cd44d9313695b15f7f97dbd8a1c8b4a21147a55e0b375375f526f71b17178c967ddcc725c7551f8c08507
|
7
|
+
data.tar.gz: 7da17c3bec7e18f4cb6eb97212fdbd26ac793a40c4b5ba433fea7d36ab859bb1002895e7d588c7b52930ae431bb220c86f6f8f373690bd37e9edce57ebccd53e
|
data/CHANGELOG.md
CHANGED
@@ -2,19 +2,27 @@
|
|
2
2
|
[full changelog](http://github.com/sue445/rubicure/compare/v0.4.12...master)
|
3
3
|
|
4
4
|
## v1.0.0
|
5
|
-
[full changelog](http://github.com/sue445/rubicure/compare/v0.4.12...v1.0.0.pre1)
|
6
5
|
|
7
6
|
### Breaking changes :bomb:
|
8
7
|
* Remove `Girl#humanize`
|
9
|
-
|
8
|
+
* https://github.com/sue445/rubicure/pull/124
|
10
9
|
* Drop support ruby 2.0 and 2.1
|
11
|
-
|
10
|
+
* https://github.com/sue445/rubicure/pull/122
|
12
11
|
* Rename: human name of cure princess
|
13
|
-
|
14
|
-
|
12
|
+
* https://github.com/sue445/rubicure/pull/133
|
13
|
+
* `Precure.all_stars` returns only from "Futari wa Pretty Cure" to "Maho Girls PreCure"
|
14
|
+
* https://github.com/sue445/rubicure/pull/138
|
15
|
+
* https://github.com/sue445/rubicure/issues/136
|
16
|
+
* i.e. "Kirakira Precure Alamode" is not included
|
17
|
+
* If necessary, please rewrite as follows.
|
18
|
+
* `Precure.all_stars` -> `Precure.all_girls`
|
19
|
+
|
15
20
|
### Enhancements
|
16
21
|
* Impl `Girl#full_name`
|
17
22
|
* https://github.com/sue445/rubicure/pull/135
|
23
|
+
* Impl `Precure.all_girls` (a.k.a. `Precure.all`)
|
24
|
+
* https://github.com/sue445/rubicure/pull/138
|
25
|
+
* https://github.com/sue445/rubicure/issues/136
|
18
26
|
|
19
27
|
## v0.4.12
|
20
28
|
[full changelog](http://github.com/sue445/rubicure/compare/v0.4.11...v0.4.12)
|
data/README.md
CHANGED
@@ -417,10 +417,11 @@ Cure.miracle.full_name
|
|
417
417
|
### Precure allstars
|
418
418
|
```ruby
|
419
419
|
Precure.all_stars.count
|
420
|
-
#=> 36
|
421
|
-
|
422
420
|
Precure.all_stars.map(&:precure_name)
|
423
|
-
|
421
|
+
# returns current precure count and names
|
422
|
+
|
423
|
+
Precure.all_stars.include?(Cure.echo)
|
424
|
+
#=> false
|
424
425
|
|
425
426
|
Precure.all_stars("2013-10-26").count
|
426
427
|
#=> 33
|
@@ -458,6 +459,22 @@ Precure.all_stars(:sing_together_miracle_magic).include?(Cure.echo)
|
|
458
459
|
|
459
460
|
and [more aliases!](config/movies.yml)
|
460
461
|
|
462
|
+
### `Precure.all_girls` (a.k.a. `Precure.all`)
|
463
|
+
```ruby
|
464
|
+
Precure.all_girls.count
|
465
|
+
Precure.all_girls.map(&:precure_name)
|
466
|
+
# returns current precure count and names
|
467
|
+
|
468
|
+
Precure.all_girls("2013-10-26").count
|
469
|
+
#=> 33
|
470
|
+
|
471
|
+
Precure.all_girls.include?(Cure.echo)
|
472
|
+
#=> true
|
473
|
+
```
|
474
|
+
|
475
|
+
#### `Precure.all_girls` vs `Precure.all_stars`
|
476
|
+
* `Precure.all_girls` returns all precure. (includes "Kirakira Precure Alamode")
|
477
|
+
* `Precure.all_stars` returns only from "Futari wa Pretty Cure" to "Maho Girls PreCure"
|
461
478
|
|
462
479
|
### Equivalence
|
463
480
|
```ruby
|
data/config/girls/movie.yml
CHANGED
data/lib/rubicure/core.rb
CHANGED
@@ -34,15 +34,6 @@ module Rubicure
|
|
34
34
|
# @param [Time,Date,String,Symbol] arg Time, Date or date like String (ex. "2013-12-16")
|
35
35
|
# @return [Array<Rubicure::Girl>]
|
36
36
|
def all_stars(arg = Time.current)
|
37
|
-
unless @all_stars
|
38
|
-
@all_stars = []
|
39
|
-
Rubicure::Girl.names.each do |girl_name|
|
40
|
-
@all_stars << Rubicure::Girl.find(girl_name)
|
41
|
-
end
|
42
|
-
|
43
|
-
@all_stars.uniq!(&:human_name)
|
44
|
-
end
|
45
|
-
|
46
37
|
extra_girls = []
|
47
38
|
|
48
39
|
# args is Time or Date
|
@@ -58,10 +49,28 @@ module Rubicure
|
|
58
49
|
end
|
59
50
|
end
|
60
51
|
|
61
|
-
|
62
|
-
|
52
|
+
all_girls(date) - [Cure.echo] + extra_girls
|
53
|
+
end
|
54
|
+
|
55
|
+
# @param [Time,Date] arg Time, Date or date like String (ex. "2013-12-16")
|
56
|
+
# @return [Array<Rubicure::Girl>]
|
57
|
+
def all_girls(arg = Time.current)
|
58
|
+
date = to_date(arg)
|
59
|
+
|
60
|
+
unless @all_girls
|
61
|
+
@all_girls = []
|
62
|
+
Rubicure::Girl.names.each do |girl_name|
|
63
|
+
@all_girls << Rubicure::Girl.find(girl_name)
|
64
|
+
end
|
65
|
+
|
66
|
+
@all_girls.uniq!(&:human_name)
|
67
|
+
end
|
68
|
+
|
69
|
+
@all_girls.select { |girl| girl.created_date && girl.created_date <= date }
|
63
70
|
end
|
64
71
|
|
72
|
+
alias_method :all, :all_girls
|
73
|
+
|
65
74
|
# iterate with :unmarked, :max_heart, ...
|
66
75
|
#
|
67
76
|
# @yield series
|
data/lib/rubicure/version.rb
CHANGED
data/spec/core_spec.rb
CHANGED
@@ -48,6 +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" | 44 | false
|
51
52
|
Date.parse("2010-03-20") | 17 | false
|
52
53
|
Time.parse("2011-03-19") | 21 | false
|
53
54
|
|
@@ -78,4 +79,33 @@ describe Rubicure::Core do
|
|
78
79
|
end
|
79
80
|
end
|
80
81
|
end
|
82
|
+
|
83
|
+
describe "#all_girls" do
|
84
|
+
context "Without arg" do
|
85
|
+
subject { instance.all_girls }
|
86
|
+
|
87
|
+
let(:precure_count) { 45 }
|
88
|
+
|
89
|
+
its(:count) { should == precure_count }
|
90
|
+
it { should include Cure.echo }
|
91
|
+
end
|
92
|
+
|
93
|
+
context "With arg" do
|
94
|
+
subject { instance.all_girls(arg) }
|
95
|
+
|
96
|
+
using RSpec::Parameterized::TableSyntax
|
97
|
+
|
98
|
+
where(:arg, :expected_count, :include_cure_echo) do
|
99
|
+
"2009-03-20" | 14 | false
|
100
|
+
"2017-01-17" | 45 | true
|
101
|
+
Date.parse("2010-03-20") | 17 | false
|
102
|
+
Time.parse("2011-03-19") | 21 | false
|
103
|
+
end
|
104
|
+
|
105
|
+
with_them do
|
106
|
+
its(:count) { should == expected_count }
|
107
|
+
it { expect(subject.include?(Cure.echo)).to be include_cure_echo }
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
81
111
|
end
|
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.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|