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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a77ed2c1bb25d37d603d884c0f3d3108e5c09e9a3b51b83fd76719f3582dedd7
4
- data.tar.gz: 3aabb7e5fde3d5496662f520cd00f9bc3f813a23b18814fb283bd903dd37f3fa
3
+ metadata.gz: 1edc9ba2b4e44364be98363803a5f6e7b4f57bd1c28073fc09f2a1bccd228577
4
+ data.tar.gz: 3749db8846101224ef468791dcea4f4b6652dc631b9d3540634bf923394afd9d
5
5
  SHA512:
6
- metadata.gz: ec8070cb238fe488e0d1b7d3f7c0cee0cbb78d6ce16bb5ddc1f998f4caa08331822ccaed05ad7c232f51fac6371b7f835e040775032552c735b4f80accc73066
7
- data.tar.gz: b08064a8cb18143d024984c4fd5556b1ba3116f2c7e4bf7415b883d85467e36e76ca7f6dc44e528a1e70f4593ee5c4ec569cb91e6a549a95618bc7a6da23613e
6
+ metadata.gz: d513e5da71cc2a5da2176e5a64ea380c34124240333ad934c6b9bb5f478806ab34c2ee605a0c5628d68892e99c2bc5495f5491dfe63397ecba9f610cf6ad99bd
7
+ data.tar.gz: e04b4846dc29463093c028ee2b1a5f8b42e9cbf2b35f462fd78098b1d5a2e0b7627a72c356185657a9f996c2ece5d6e6dcaeb6d45f6d670d6a3d55eda61c52e1
data/.rubocop.yml CHANGED
@@ -16,6 +16,9 @@ Layout/HashAlignment:
16
16
  EnforcedHashRocketStyle: table
17
17
  EnforcedColonStyle: table
18
18
 
19
+ RSpec/MultipleExpectations:
20
+ Enabled: false
21
+
19
22
  RSpec/MultipleMemoizedHelpers:
20
23
  Enabled: false
21
24
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## master
2
- [full changelog](http://github.com/sue445/rubicure/compare/v3.2.0...master)
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].tap {|girl| girl.io = $stdout }
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
- io.puts line
285
+ puts line
288
286
  index += 1
289
287
  end
290
288
  end
@@ -1,3 +1,3 @@
1
1
  module Rubicure
2
- VERSION = "3.2.0".freeze
2
+ VERSION = "3.2.1".freeze
3
3
  end
@@ -1,22 +1,19 @@
1
1
  describe Rubicure::Girl do
2
2
  let(:girl) do
3
- girl = 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,
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
- before do
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
- girl = Rubicure::Girl[
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
 
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: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445