rubicure 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +14 -11
- data/CHANGELOG.md +9 -1
- data/README.md +4 -0
- data/lib/rubicure/girl.rb +5 -1
- data/lib/rubicure/version.rb +1 -1
- data/spec/girl_spec.rb +5 -1
- data/spec/spec_helper.rb +7 -4
- 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: 0e4e5cb2c18e4aab611b10284cab3fecc959b2a1
|
4
|
+
data.tar.gz: 4c1b368e21f3cc29fe1a2610d5d592106ded9139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbdb7459e958de9d0ad1393cad96414befbceaaf938c37890faaee10e7e91bdd0cda403b2fed26cf4b71f2e0305ef28dd2fffac615c0cf8afda097d5512cdc5f
|
7
|
+
data.tar.gz: 29706013278168f5e11cf10afdf082987e01b52e5c1389929649f8f28d1d9166d357bd2bf5edc3a8badc21df0c22d013615f0fbeeb5627b4b1506d6763643368
|
data/.travis.yml
CHANGED
@@ -1,21 +1,24 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
bundler_args: --jobs=2
|
3
|
+
- 2.0
|
4
|
+
- 2.1
|
5
|
+
- 2.2
|
6
|
+
- ruby-head
|
7
|
+
bundler_args: "--jobs=2"
|
8
8
|
before_script:
|
9
|
-
|
9
|
+
- export CODECLIMATE_REPO_TOKEN=8e9db6ee5f3818e87287a6393086c2ccb9b1b83106c5bfb972211abefd2fe162
|
10
|
+
- export COVERAGE=true
|
10
11
|
script:
|
11
|
-
|
12
|
-
|
12
|
+
- bundle exec rspec --tag category:verbose
|
13
|
+
- bundle exec rspec --tag ~category:verbose
|
13
14
|
branches:
|
14
15
|
only:
|
15
|
-
|
16
|
+
- master
|
16
17
|
notifications:
|
17
18
|
email: false
|
19
|
+
slack:
|
20
|
+
secure: M8VEihBaynGJdlXu7TvhgqIDfpHvSP5H0RCLsvtaQ5rNoz6yrOTRcLBCWazrJopD1CvKbcFTVVLlS86fxyW9+pYhYc81mXlhtyPLNx7yXQ+Uhfrxp7/e2QLEMZEgbk2Z7XglN4rJ+t4QhWjsPL0ohJk+t1DSdFtEPK3o3RyoRrE=
|
18
21
|
matrix:
|
19
22
|
allow_failures:
|
20
|
-
|
21
|
-
|
23
|
+
- rvm: 2.2
|
24
|
+
- rvm: ruby-head
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## master
|
2
|
-
[full changelog](http://github.com/sue445/rubicure/compare/v0.1.
|
2
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v0.1.4...master)
|
3
|
+
|
4
|
+
## v0.1.4
|
5
|
+
[full changelog](http://github.com/sue445/rubicure/compare/v0.1.3...v0.1.4)
|
6
|
+
|
7
|
+
* Add `Girl#to_s` (alias of `#name`) (thx @zonuexe)
|
8
|
+
* https://github.com/sue445/rubicure/pull/59
|
9
|
+
* Support User-defined `IO.put` in `Girl#print_by_line` (thx @bash)
|
10
|
+
* https://github.com/sue445/rubicure/pull/60
|
3
11
|
|
4
12
|
## v0.1.3
|
5
13
|
[full changelog](http://github.com/sue445/rubicure/compare/v0.1.2...v0.1.3)
|
data/README.md
CHANGED
@@ -13,6 +13,7 @@ Inspired by [Acme::PrettyCure](http://perl-users.jp/articles/advent-calendar/201
|
|
13
13
|
|
14
14
|
[](http://waffle.io/sue445/rubicure)
|
15
15
|
[](https://coderwall.com/sue445)
|
16
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
16
17
|
|
17
18
|
## Requirements
|
18
19
|
|
@@ -454,3 +455,6 @@ http://rubydoc.info/gems/rubicure/frames
|
|
454
455
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
455
456
|
4. Push to the branch (`git push origin my-new-feature`)
|
456
457
|
5. Create new Pull Request
|
458
|
+
|
459
|
+
|
460
|
+
|
data/lib/rubicure/girl.rb
CHANGED
@@ -6,6 +6,7 @@ module Rubicure
|
|
6
6
|
attr_reader :human_name, :precure_name, :transform_message, :extra_names,
|
7
7
|
:current_state, :state_names, :created_date, :attack_messages,
|
8
8
|
:transform_calls
|
9
|
+
attr_writer :io
|
9
10
|
|
10
11
|
@@cache = {}
|
11
12
|
@@config = nil
|
@@ -23,6 +24,8 @@ module Rubicure
|
|
23
24
|
@state_names += @extra_names unless @extra_names.empty?
|
24
25
|
@attack_messages = [""] + attack_messages
|
25
26
|
@transform_calls = transform_calls
|
27
|
+
|
28
|
+
@io = $stdout
|
26
29
|
end
|
27
30
|
|
28
31
|
def ==(other)
|
@@ -33,6 +36,7 @@ module Rubicure
|
|
33
36
|
def name
|
34
37
|
@state_names[@current_state]
|
35
38
|
end
|
39
|
+
alias to_s name
|
36
40
|
|
37
41
|
# human -> precure ( -> extra forms ) -> human ...
|
38
42
|
# @return [Rubicure::Girl] self
|
@@ -122,7 +126,7 @@ module Rubicure
|
|
122
126
|
index = 0
|
123
127
|
message.each_line do |line|
|
124
128
|
sleep(@@sleep_sec) if index > 0
|
125
|
-
puts line
|
129
|
+
@io.puts line
|
126
130
|
index += 1
|
127
131
|
end
|
128
132
|
end
|
data/lib/rubicure/version.rb
CHANGED
data/spec/girl_spec.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
describe Rubicure::Girl do
|
2
2
|
let(:girl) do
|
3
|
-
Rubicure::Girl.new(
|
3
|
+
girl = Rubicure::Girl.new(
|
4
4
|
human_name: human_name,
|
5
5
|
precure_name: precure_name,
|
6
6
|
extra_names: extra_names,
|
7
7
|
transform_message: transform_message,
|
8
8
|
attack_messages: attack_messages,
|
9
9
|
)
|
10
|
+
girl.io = tempfile
|
11
|
+
girl
|
10
12
|
end
|
13
|
+
let(:tempfile) { Tempfile.open(described_class.to_s) }
|
11
14
|
|
12
15
|
let(:human_name) { "黄瀬やよい" }
|
13
16
|
let(:precure_name) { "キュアピース" }
|
@@ -37,6 +40,7 @@ EOF
|
|
37
40
|
end
|
38
41
|
|
39
42
|
it { expect(girl.name).to eq precure_name }
|
43
|
+
it { expect(tempfile.open.read).to eq transform_message }
|
40
44
|
end
|
41
45
|
|
42
46
|
context "when after 2nd transform" do
|
data/spec/spec_helper.rb
CHANGED
@@ -15,11 +15,13 @@
|
|
15
15
|
#
|
16
16
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
if ENV["COVERAGE"]
|
19
|
+
require 'codeclimate-test-reporter'
|
20
|
+
CodeClimate::TestReporter.start
|
20
21
|
|
21
|
-
require 'coveralls'
|
22
|
-
Coveralls.wear!
|
22
|
+
require 'coveralls'
|
23
|
+
Coveralls.wear!
|
24
|
+
end
|
23
25
|
|
24
26
|
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
25
27
|
require 'rubicure'
|
@@ -28,6 +30,7 @@ require 'rspec-parameterized'
|
|
28
30
|
require 'rspec/its'
|
29
31
|
require 'rspec/collection_matchers'
|
30
32
|
require 'delorean'
|
33
|
+
require 'tempfile'
|
31
34
|
|
32
35
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
33
36
|
# in spec/support/ and its subdirectories.
|
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: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|