rubicure 3.2.0 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +15 -1
- data/README.md +20 -14
- data/lib/rubicure/core.rb +1 -0
- data/lib/rubicure/girl.rb +2 -4
- data/lib/rubicure/series.rb +2 -0
- data/lib/rubicure/version.rb +1 -1
- data/spec/rubicure/girl_spec.rb +17 -28
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc5545e02bd1593b065a40c08c70ceab7080ba62b6e2b559b3dc7577d6d4e2ac
|
4
|
+
data.tar.gz: 93ebbe5ac6b8756aeb5e8135c293418d3501ad9fcd228c44243eabf8680528f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7581261659e97cf55d460b13f24b241c3e52838e7c92211f5422636a2ee00b7da377323b09324adcc5f135eabbb1024d91ca97167c55e48833c9df0f38ef4202
|
7
|
+
data.tar.gz: 57af3764152443ea49a8a38653bf34d7b89b0adeb2533603353c35c35c804a67eac1a4d56f840fca3a079ab392bec0993f947c8dfeca6103b73a5545f8f3038a
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.
|
2
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.2...master)
|
3
|
+
|
4
|
+
## v3.2.2
|
5
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.1...v3.2.2)
|
6
|
+
|
7
|
+
* Add `#members` as alias for `#girls`
|
8
|
+
* https://github.com/sue445/rubicure/pull/285
|
9
|
+
* Add `#all_members` as alias for `#all_girls`
|
10
|
+
* https://github.com/sue445/rubicure/pull/286
|
11
|
+
|
12
|
+
## v3.2.1
|
13
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.0...v3.2.1)
|
14
|
+
|
15
|
+
* Remove hacks for testing
|
16
|
+
* https://github.com/sue445/rubicure/pull/282
|
3
17
|
|
4
18
|
## v3.2.0
|
5
19
|
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.0.rc1...v3.2.0)
|
data/README.md
CHANGED
@@ -138,24 +138,27 @@ Precure.now
|
|
138
138
|
=> false
|
139
139
|
```
|
140
140
|
|
141
|
-
### Rubicure::Series#
|
141
|
+
### Rubicure::Series#members
|
142
142
|
```ruby
|
143
|
-
>> Precure.smile.
|
143
|
+
>> Precure.smile.members.count
|
144
144
|
=> 5
|
145
145
|
|
146
|
-
>> Precure.smile.
|
146
|
+
>> Precure.smile.members.first
|
147
147
|
=> {:girl_name=>"cure_happy", :human_name=>"星空みゆき", :precure_name=>"キュアハッピー", :cast_name=>"福圓美里", :created_date=>#<Date: 2012-02-05 ((2455963j,0s,0n),+0s,-Infj)>, :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"]}
|
148
148
|
|
149
|
-
>> Precure.smile.
|
149
|
+
>> Precure.smile.members.map(&:human_name)
|
150
150
|
=> ["星空みゆき", "日野あかね", "黄瀬やよい", "緑川なお", "青木れいか"]
|
151
151
|
|
152
|
-
>> Precure.smile.
|
152
|
+
>> Precure.smile.members.map(&:precure_name)
|
153
153
|
=> ["キュアハッピー", "キュアサニー", "キュアピース", "キュアマーチ", "キュアビューティ"]
|
154
154
|
|
155
|
-
>> Precure.smile.
|
155
|
+
>> Precure.smile.members.count
|
156
156
|
=> 5
|
157
157
|
```
|
158
158
|
|
159
|
+
* Now, `members?` is alias to `girls?`. But I'm going to change this behavior in the next major version (v4)
|
160
|
+
* ref. https://github.com/sue445/rubicure/issues/284
|
161
|
+
|
159
162
|
### Select own precure girl
|
160
163
|
```ruby
|
161
164
|
>> Cure.lemonade
|
@@ -499,22 +502,25 @@ When `Rubicure::Girl` has `human_full_name` (i.e. another `human_name`), she ret
|
|
499
502
|
|
500
503
|
and [more aliases!](config/movies.yml)
|
501
504
|
|
502
|
-
### `Precure.
|
505
|
+
### `Precure.all_members` (a.k.a. `Precure.all`)
|
503
506
|
```ruby
|
504
|
-
>> Precure.
|
505
|
-
>> Precure.
|
507
|
+
>> Precure.all_members.count
|
508
|
+
>> Precure.all_members.map(&:precure_name)
|
506
509
|
# returns current precure count and names
|
507
510
|
|
508
|
-
>> Precure.
|
511
|
+
>> Precure.all_members("2013-10-26").count
|
509
512
|
=> 34
|
510
513
|
|
511
|
-
>> Precure.
|
514
|
+
>> Precure.all_members.include?(Cure.echo)
|
512
515
|
=> true
|
513
516
|
```
|
514
517
|
|
515
|
-
|
516
|
-
*
|
517
|
-
|
518
|
+
* Now, `Precure.all_members?` is alias to `Precure.all_girls?`. But I'm going to change this behavior in the next major version (v4)
|
519
|
+
* ref. https://github.com/sue445/rubicure/issues/284
|
520
|
+
|
521
|
+
#### `Precure.all_members` vs `Precure.all_stars`
|
522
|
+
* `Precure.all_members` returns all precure. (includes "Kirakira Precure Alamode")
|
523
|
+
* `Precure.all_members` returns only from "Futari wa Pretty Cure" to "Maho Girls PreCure"
|
518
524
|
|
519
525
|
### `Precure.dream_stars`
|
520
526
|
```ruby
|
data/lib/rubicure/core.rb
CHANGED
data/lib/rubicure/girl.rb
CHANGED
@@ -25,8 +25,6 @@ module Rubicure
|
|
25
25
|
:random_transform_words,
|
26
26
|
].freeze
|
27
27
|
|
28
|
-
attr_accessor :io
|
29
|
-
|
30
28
|
# @return [Integer]
|
31
29
|
def current_state
|
32
30
|
@current_state ||= 0
|
@@ -203,7 +201,7 @@ module Rubicure
|
|
203
201
|
@cache ||= {}
|
204
202
|
unless @cache[girl_name]
|
205
203
|
girl_config = config[girl_name] || {}
|
206
|
-
@cache[girl_name] = Rubicure::Girl[girl_config]
|
204
|
+
@cache[girl_name] = Rubicure::Girl[girl_config]
|
207
205
|
end
|
208
206
|
|
209
207
|
@cache[girl_name]
|
@@ -284,7 +282,7 @@ module Rubicure
|
|
284
282
|
index = 0
|
285
283
|
message.each_line do |line|
|
286
284
|
sleep(self.class.sleep_sec) if index > 0
|
287
|
-
|
285
|
+
puts line
|
288
286
|
index += 1
|
289
287
|
end
|
290
288
|
end
|
data/lib/rubicure/series.rb
CHANGED
data/lib/rubicure/version.rb
CHANGED
data/spec/rubicure/girl_spec.rb
CHANGED
@@ -1,22 +1,19 @@
|
|
1
1
|
describe Rubicure::Girl do
|
2
2
|
let(:girl) do
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
Rubicure::Girl[
|
4
|
+
girl_name: girl_name,
|
5
|
+
human_name: human_name,
|
6
|
+
precure_name: precure_name,
|
7
|
+
cast_name: cast_name,
|
8
|
+
created_date: created_date,
|
9
|
+
extra_names: extra_names,
|
10
|
+
transform_message: transform_message,
|
11
|
+
attack_messages: attack_messages,
|
12
|
+
transform_calls: transform_calls,
|
13
|
+
color: color,
|
14
|
+
random_transform_words: random_transform_words,
|
15
15
|
]
|
16
|
-
girl.io = mock_io
|
17
|
-
girl
|
18
16
|
end
|
19
|
-
let(:mock_io) { StringIO.new }
|
20
17
|
|
21
18
|
let(:girl_name) { "cure_peace" }
|
22
19
|
let(:human_name) { "黄瀬やよい" }
|
@@ -47,12 +44,10 @@ describe Rubicure::Girl do
|
|
47
44
|
end
|
48
45
|
|
49
46
|
context "when after 1st transform" do
|
50
|
-
|
51
|
-
girl.transform!
|
47
|
+
it "transform to Precure" do
|
48
|
+
expect { girl.transform! }.to output(transform_message).to_stdout
|
49
|
+
expect(girl.name).to eq precure_name
|
52
50
|
end
|
53
|
-
|
54
|
-
it { expect(girl.name).to eq precure_name }
|
55
|
-
it { expect(mock_io.string).to eq transform_message }
|
56
51
|
end
|
57
52
|
|
58
53
|
context "when after 2nd transform" do
|
@@ -90,7 +85,7 @@ describe Rubicure::Girl do
|
|
90
85
|
describe "transform!" do
|
91
86
|
context "when Cure miracle" do
|
92
87
|
let(:girl) do
|
93
|
-
|
88
|
+
Rubicure::Girl[
|
94
89
|
girl_name: "cure_miracle",
|
95
90
|
human_name: "朝日奈みらい",
|
96
91
|
precure_name: "キュアミラクル",
|
@@ -113,9 +108,6 @@ describe Rubicure::Girl do
|
|
113
108
|
},
|
114
109
|
},
|
115
110
|
]
|
116
|
-
|
117
|
-
girl.io = mock_io
|
118
|
-
girl
|
119
111
|
end
|
120
112
|
|
121
113
|
context "transform! with diamond" do
|
@@ -179,9 +171,7 @@ describe Rubicure::Girl do
|
|
179
171
|
end
|
180
172
|
|
181
173
|
it "stdout includes one of random_transform_words" do
|
182
|
-
girl.transform!
|
183
|
-
|
184
|
-
expect(mock_io.string).to include("4人揃って!").or include("今日も元気だ!")
|
174
|
+
expect { girl.transform! }.to output(/4人揃って!|今日も元気だ!/).to_stdout
|
185
175
|
end
|
186
176
|
end
|
187
177
|
end
|
@@ -254,7 +244,6 @@ describe Rubicure::Girl do
|
|
254
244
|
subject { girl.send(transform_call) }
|
255
245
|
|
256
246
|
before do
|
257
|
-
girl.io = mock_io
|
258
247
|
girl.humanize!
|
259
248
|
end
|
260
249
|
|
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: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|