rubicure 3.2.0 → 3.2.1
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 +7 -1
- data/lib/rubicure/girl.rb +2 -4
- data/lib/rubicure/version.rb +1 -1
- data/spec/rubicure/girl_spec.rb +17 -28
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1edc9ba2b4e44364be98363803a5f6e7b4f57bd1c28073fc09f2a1bccd228577
|
4
|
+
data.tar.gz: 3749db8846101224ef468791dcea4f4b6652dc631b9d3540634bf923394afd9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d513e5da71cc2a5da2176e5a64ea380c34124240333ad934c6b9bb5f478806ab34c2ee605a0c5628d68892e99c2bc5495f5491dfe63397ecba9f610cf6ad99bd
|
7
|
+
data.tar.gz: e04b4846dc29463093c028ee2b1a5f8b42e9cbf2b35f462fd78098b1d5a2e0b7627a72c356185657a9f996c2ece5d6e6dcaeb6d45f6d670d6a3d55eda61c52e1
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
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.1...master)
|
3
|
+
|
4
|
+
## v3.2.1
|
5
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.0...v3.2.1)
|
6
|
+
|
7
|
+
* Remove hacks for testing
|
8
|
+
* https://github.com/sue445/rubicure/pull/282
|
3
9
|
|
4
10
|
## v3.2.0
|
5
11
|
[full changelog](http://github.com/sue445/rubicure/compare/v3.2.0.rc1...v3.2.0)
|
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/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.or output(/今日も元気だ!/).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
|
|