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 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
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ vendor/bundle/
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --format progress
2
+ --color
3
+ --require spec_helper
4
+ --tag ~category:verbose
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ script: CODECLIMATE_REPO_TOKEN=ae44e61ae42dc9114b3cd92bed8dc553d9e9f119634c8b95273d3048e6026aa5 bundle exec rspec
5
+ branches:
6
+ only:
7
+ - master
8
+
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --markup markdown
2
+ --no-private
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rubicure.gemspec
4
+ gemspec
5
+
6
+ gem "rspec-parameterized", github: "sue445/rspec-parameterized", branch: "rspec-3.0.0.beta1", group: [:test, :development]
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) [![Build Status](https://travis-ci.org/sue445/rubicure.png?branch=master)](https://travis-ci.org/sue445/rubicure) [![Code Climate](https://codeclimate.com/repos/52ad36f013d637283f0346bb/badges/07709ba3025e690dee75/gpa.png)](https://codeclimate.com/repos/52ad36f013d637283f0346bb/feed) [![Coverage Status](https://coveralls.io/repos/sue445/rubicure/badge.png)](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
+ [![Stories in Ready](https://badge.waffle.io/sue445/rubicure.png?label=ready)](http://waffle.io/sue445/rubicure) [![endorse](https://api.coderwall.com/sue445/endorsecount.png)](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
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
8
+ require 'yard'
9
+
10
+ YARD::Rake::YardocTask.new
11
+