rubicure 0.0.1
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 +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +18 -0
- data/.rspec +4 -0
- data/.travis.yml +8 -0
- data/.yardopts +2 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +205 -0
- data/Rakefile +11 -0
- data/config/girls.yml +430 -0
- data/config/series.yml +133 -0
- data/lib/rubicure/core.rb +46 -0
- data/lib/rubicure/girl.rb +86 -0
- data/lib/rubicure/series.rb +105 -0
- data/lib/rubicure/version.rb +3 -0
- data/lib/rubicure.rb +41 -0
- data/rubicure.gemspec +34 -0
- data/spec/core_spec.rb +47 -0
- data/spec/girl_spec.rb +83 -0
- data/spec/rubicure_spec.rb +126 -0
- data/spec/series_spec.rb +101 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/support/array_instance_of.rb +12 -0
- metadata +200 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 48387ad9511e39d834ded3702da103a906a54ebc
|
4
|
+
data.tar.gz: 3ab23ad6296b255039de4546da4344cac6f624be
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 54e49fc7fb739e456437c164d5b70bbb536bfc47a9195c0cf52e857a1777690ec0deb3088efec1c54b38a8d1848507f372d61a552e3ba6828f5f9b75ab4de35c
|
7
|
+
data.tar.gz: 5aa5df8fad10fe6aa6d2be24953589c3d29229242b42e8d8b9c48a548ae472be2244c57a54d09246644fc3be34de7df04da1114f77ca7c3483d3846572bf518b
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
repo_token: k61Yc9BkihEcxXrAQPeVagvSI8b0n7e10
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 sue445
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,205 @@
|
|
1
|
+
# Rubicure (Ruby + Precure) [](https://travis-ci.org/sue445/rubicure) [](https://codeclimate.com/repos/52ad36f013d637283f0346bb/feed) [](https://coveralls.io/r/sue445/rubicure)
|
2
|
+
|
3
|
+
All about Japanese battle heroine "Pretty Cure (Precure)".
|
4
|
+
|
5
|
+
Inspired by [Acme::PrettyCure](http://perl-users.jp/articles/advent-calendar/2010/acme/6) and [pycure](https://github.com/drillbits/pycure).
|
6
|
+
|
7
|
+
[](http://waffle.io/sue445/rubicure) [](https://coderwall.com/sue445)
|
8
|
+
|
9
|
+
## Requirements
|
10
|
+
|
11
|
+
* ruby >= 2.0.0
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
gem 'rubicure'
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install rubicure
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
§ irb
|
31
|
+
|
32
|
+
require "rubicure"
|
33
|
+
```
|
34
|
+
|
35
|
+
### Select own precure series
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
Precure.unmarked.title
|
39
|
+
#=> "ふたりはプリキュア"
|
40
|
+
|
41
|
+
Precure.title
|
42
|
+
#=> "ふたりはプリキュア"
|
43
|
+
|
44
|
+
Precure.max_heart.title
|
45
|
+
#=> "ふたりはプリキュア Max Heart"
|
46
|
+
|
47
|
+
Precure.splash_star.title
|
48
|
+
#=> "ふたりはプリキュア Splash Star"
|
49
|
+
|
50
|
+
Precure.yes.title
|
51
|
+
#=> "Yes! プリキュア5"
|
52
|
+
|
53
|
+
Precure.yes_gogo.title
|
54
|
+
#=> "Yes! プリキュア5 Go Go!"
|
55
|
+
|
56
|
+
Precure.flesh.title
|
57
|
+
#=> "フレッシュプリキュア!"
|
58
|
+
|
59
|
+
Precure.heart_catch.title
|
60
|
+
#=> "ハートキャッチプリキュア!"
|
61
|
+
|
62
|
+
Precure.smile.title
|
63
|
+
#=> "スマイルプリキュア!"
|
64
|
+
|
65
|
+
Precure.dokidoki.title
|
66
|
+
#=> "ドキドキ!プリキュア"
|
67
|
+
```
|
68
|
+
|
69
|
+
other pattern
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
Precure.find(:smile).title
|
73
|
+
#=> "スマイルプリキュア!"
|
74
|
+
```
|
75
|
+
|
76
|
+
and [more aliases!](config/series.yml)
|
77
|
+
|
78
|
+
### Get current precure series
|
79
|
+
`Precure#now` (alias to `#current` ) return current precure series
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
Precure.now
|
83
|
+
#=> {:title=>"ドキドキ!プリキュア", :started_date=>Sun, 03 Feb 2013, :ended_date=>Sun, 26 Jan 2014, :girls=>["cure_heart", "cure_diamond", "cure_rosetta", "cure_sword", "cure_ace"]}
|
84
|
+
|
85
|
+
Precure.current
|
86
|
+
#=> {:title=>"ドキドキ!プリキュア", :started_date=>Sun, 03 Feb 2013, :ended_date=>Sun, 26 Jan 2014, :girls=>["cure_heart", "cure_diamond", "cure_rosetta", "cure_sword", "cure_ace"]}
|
87
|
+
|
88
|
+
# -2013/1/27 : smile precure
|
89
|
+
# 2013/2/5 - : dokidoki precure
|
90
|
+
require "delorean"
|
91
|
+
Delorean.time_travel_to "2013-02-01"
|
92
|
+
Precure.now
|
93
|
+
#=> RuntimeError: Not on air precure!
|
94
|
+
```
|
95
|
+
|
96
|
+
### Rubicure::Series#on_air?
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
Precure.dokidoki.on_air?("2013-12-16")
|
100
|
+
#=> true
|
101
|
+
|
102
|
+
Precure.smile.on_air?("2013-12-16")
|
103
|
+
#=> false
|
104
|
+
```
|
105
|
+
|
106
|
+
### Rubicure::Series#girls
|
107
|
+
```ruby
|
108
|
+
Precure.smile.girls
|
109
|
+
#=> [#<Rubicure::Girl:0x007fbd60a5d6e0 @human_name="星空みゆき", @precure_name="キュアハッピー", @transform_message="(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!ハッピー!!)\nキラキラ輝く未来の光! キュアハッピー!\n5つの光が導く未来!\n輝け!スマイルプリキュア!\n", @extra_names=["プリンセスハッピー", "ウルトラハッピー"], @current_state=0, @state_names=["星空みゆき", "キュアハッピー", "プリンセスハッピー", "ウルトラハッピー"]>, #<Rubicure::Girl:0x007fbd60a5d5c8 @human_name="日野あかね", @precure_name="キュアサニー", @transform_message="(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!サニー!!)\n太陽サンサン熱血パワー! キュアサニー!\n5つの光が導く未来!\n輝け!スマイルプリキュア!\n", @extra_names=["プリンセスサニー", "ウルトラサニー"], @current_state=0, @state_names=["日野あかね", "キュアサニー", "プリンセスサニー", "ウルトラサニー"]>, #<Rubicure::Girl:0x007fbd60a5d500 @human_name="黄瀬やよい", @precure_name="キュアピース", @transform_message="(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!ピース!!)\nピカピカピカリンジャンケンポン! キュアピース!\n5つの光が導く未来!\n輝け!スマイルプリキュア!\n", @extra_names=["プリンセスピース", "ウルトラピース"], @current_state=0, @state_names=["黄瀬やよい", "キュアピース", "プリンセスピース", "ウルトラピース"]>, #<Rubicure::Girl:0x007fbd60a5d410 @human_name="緑川なお", @precure_name="キュアマーチ", @transform_message="(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!マーチ!!)\n勇気リンリン直球勝負! キュアマーチ!\n5つの光が導く未来!\n輝け!スマイルプリキュア!\n", @extra_names=["プリンセスマーチ", "ウルトラマーチ"], @current_state=0, @state_names=["緑川なお", "キュアマーチ", "プリンセスマーチ", "ウルトラマーチ"]>, #<Rubicure::Girl:0x007fbd60a5d320 @human_name="青木れいか", @precure_name="キュアビューティ", @transform_message="(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!ビューティ!!)\nしんしんと降り積もる清き心! キュアビューティ!\n5つの光が導く未来!\n輝け!スマイルプリキュア!\n", @extra_names=["プリンセスビューティ", "ウルトラビューティ"], @current_state=0, @state_names=["青木れいか", "キュアビューティ", "プリンセスビューティ", "ウルトラビューティ"]>]
|
110
|
+
|
111
|
+
Precure.smile.girls.map(&:human_name)
|
112
|
+
#=> ["星空みゆき", "日野あかね", "黄瀬やよい", "緑川なお", "青木れいか"]
|
113
|
+
|
114
|
+
Precure.smile.girls.map(&:precure_name)
|
115
|
+
#=> ["キュアハッピー", "キュアサニー", "キュアピース", "キュアマーチ", "キュアビューティ"]
|
116
|
+
|
117
|
+
Precure.smile.girls.count
|
118
|
+
#=> 5
|
119
|
+
```
|
120
|
+
|
121
|
+
### Select own precure girl
|
122
|
+
```ruby
|
123
|
+
Cure.lemonade
|
124
|
+
#=> #<Rubicure::Girl:0x007fbd60ae72a0 @human_name="春日野うらら", @precure_name="キュアレモネード", @transform_message="プリキュア!メタモルフォーゼ!\nはじけるレモンの香り、キュアレモネード!\n希望の力と未来の光!\n華麗に羽ばたく5つの心!\nYes!プリキュア5!\n", @extra_names=[], @current_state=0, @state_names=["春日野うらら", "キュアレモネード"]>
|
125
|
+
|
126
|
+
Cure.pine
|
127
|
+
#=> #<Rubicure::Girl:0x007fbd60aee640 @human_name="山吹祈里", @precure_name="キュアパイン", @transform_message="チェインジ!プリキュア・ビートアップ!\nイエローハートは祈りのしるし!\nとれたてフレッシュ、キュアパイン!\nレッツプリキュア!\n", @extra_names=["キュアエンジェルパイン"], @current_state=0, @state_names=["山吹祈里", "キュアパイン", "キュアエンジェルパイン"]>
|
128
|
+
|
129
|
+
Cure.muse
|
130
|
+
#=> #<Rubicure::Girl:0x007fbd60af7510 @human_name="調辺アコ", @precure_name="キュアミューズ", @transform_message="レッツプレイ!プリキュアモジュレーション!!\n爪弾くは女神の調べ! キュアミューズ!\n響け4人の組曲!スイートプリキュア!\n", @extra_names=["クレッシェンドミューズ"], @current_state=0, @state_names=["調辺アコ", "キュアミューズ", "クレッシェンドミューズ"]>
|
131
|
+
|
132
|
+
Cure.peace
|
133
|
+
#=> #<Rubicure::Girl:0x007fbd60aceca0 @human_name="黄瀬やよい", @precure_name="キュアピース", @transform_message="(レディ?)\nプリキュア・スマイルチャージ!\n(ゴー!ゴー!レッツ・ゴー!ピース!!)\nピカピカピカリンジャンケンポン! キュアピース!\n5つの光が導く未来!\n輝け!スマイルプリキュア!\n", @extra_names=["プリンセスピース", "ウルトラピース"], @current_state=0, @state_names=["黄瀬やよい", "キュアピース", "プリンセスピース", "ウルトラピース"]>
|
134
|
+
|
135
|
+
Cure.rosetta
|
136
|
+
#=> #<Rubicure::Girl:0x007fbd60af42c0 @human_name="四葉ありす", @precure_name="キュアロゼッタ", @transform_message="プリキュアラブリンク!\nL! O! V! E!\nひだまりポカポカ キュアロゼッタ!\n響け愛の鼓動!ドキドキプリキュア!\n世界を制するのは愛だけです、\nさぁ、あなたも私と愛を育んでくださいな\n", @extra_names=[], @current_state=0, @state_names=["四葉ありす", "キュアロゼッタ"]>
|
137
|
+
|
138
|
+
Shiny.luminous
|
139
|
+
#=> #<Rubicure::Girl:0x007fbd60ad7288 @human_name="九条ひかり", @precure_name="シャイニールミナス", @transform_message="ルミナス・シャイニングストリーム!\n輝く命、シャイニールミナス!\n光の心と光の意志、すべてを一つにするために!\n", @extra_names=[], @current_state=0, @state_names=["九条ひかり", "シャイニールミナス"]>
|
140
|
+
|
141
|
+
Milky.rose
|
142
|
+
#=> #<Rubicure::Girl:0x007fbd60aded08 @human_name="美々野くるみ", @precure_name="ミルキィローズ", @transform_message="スカイローズ・トランスレイト!\n青いバラは秘密のしるし! ミルキィローズ!\n", @extra_names=[], @current_state=0, @state_names=["美々野くるみ", "ミルキィローズ"]>
|
143
|
+
```
|
144
|
+
|
145
|
+
and [more aliases!](config/girls.yml)
|
146
|
+
|
147
|
+
### Rubicure::Girl
|
148
|
+
```ruby
|
149
|
+
# these are same
|
150
|
+
yayoi = Cure.peace
|
151
|
+
yayoi = Precure.smile.girls[2]
|
152
|
+
|
153
|
+
yayoi.name
|
154
|
+
#=> "黄瀬やよい"
|
155
|
+
|
156
|
+
yayoi.transform!
|
157
|
+
|
158
|
+
(レディ?)
|
159
|
+
プリキュア・スマイルチャージ!
|
160
|
+
(ゴー!ゴー!レッツ・ゴー!ピース!!)
|
161
|
+
ピカピカピカリンジャンケンポン! キュアピース!
|
162
|
+
5つの光が導く未来!
|
163
|
+
輝け!スマイルプリキュア!
|
164
|
+
|
165
|
+
# 1st transform
|
166
|
+
yayoi.name
|
167
|
+
#=> "キュアピース"
|
168
|
+
|
169
|
+
# 2st transform
|
170
|
+
yayoi.transform!
|
171
|
+
yayoi.name
|
172
|
+
#=> "プリンセスピース"
|
173
|
+
|
174
|
+
# final transform
|
175
|
+
yayoi.transform!
|
176
|
+
yayoi.name
|
177
|
+
#=> "ウルトラピース"
|
178
|
+
|
179
|
+
# back to human
|
180
|
+
yayoi.transform!.transform!
|
181
|
+
yayoi.name
|
182
|
+
#=> "プリンセスピース"
|
183
|
+
|
184
|
+
yayoi.humanize
|
185
|
+
#=> 0
|
186
|
+
yayoi.name
|
187
|
+
#=> "黄瀬やよい"
|
188
|
+
```
|
189
|
+
|
190
|
+
### Precure allstars
|
191
|
+
```ruby
|
192
|
+
Precure.all_stars.count
|
193
|
+
#=> 33
|
194
|
+
|
195
|
+
Precure.all_stars.map(&:precure_name)
|
196
|
+
#=> ["キュアブラック", "キュアホワイト", "シャイニールミナス", "キュアブルーム", "キュアイーグレット", "キュアドリーム", "キュアルージュ", "キュアレモネード", "キュアミント", "キュアアクア", "ミルキィローズ", "キュアピーチ", "キュアベリー", "キュアパイン", "キュアパッション", "キュアブロッサム", "キュアマリン", "キュアサンシャイン", "キュアムーンライト", "キュアメロディ", "キュアリズム", "キュアビート", "キュアミューズ", "キュアハッピー", "キュアサニー", "キュアピース", "キュアマーチ", "キュアビューティ", "キュアハート", "キュアダイヤモンド", "キュアロゼッタ", "キュアソード", "キュアエース"]
|
197
|
+
```
|
198
|
+
|
199
|
+
## Contributing
|
200
|
+
|
201
|
+
1. Fork it
|
202
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
203
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
204
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
205
|
+
5. Create new Pull Request
|