t7s 0.1.0

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.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +49 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +41 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/config/idols/01_niko.yml +10 -0
  13. data/config/idols/02_haru.yml +10 -0
  14. data/config/idols/03_musubi.yml +10 -0
  15. data/config/idols/04_hime.yml +10 -0
  16. data/config/idols/05_hime.yml +10 -0
  17. data/config/idols/06_momoka.yml +10 -0
  18. data/config/idols/07_sumire.yml +10 -0
  19. data/config/idols/08_sui.yml +10 -0
  20. data/config/idols/09_shizuka.yml +10 -0
  21. data/config/idols/10_susu.yml +10 -0
  22. data/config/idols/11_sawara.yml +10 -0
  23. data/config/idols/12_kajika.yml +10 -0
  24. data/config/idols/13_sinjyu.yml +10 -0
  25. data/config/idols/14_shisara.yml +10 -0
  26. data/config/idols/15_kyoko.yml +10 -0
  27. data/config/idols/16_mimi.yml +10 -0
  28. data/config/idols/17_fabu.yml +10 -0
  29. data/config/idols/18_kazumi.yml +10 -0
  30. data/config/idols/19_rena.yml +10 -0
  31. data/config/idols/20_honoka.yml +10 -0
  32. data/config/idols/21_makoto.yml +10 -0
  33. data/config/idols/22_madoka.yml +10 -0
  34. data/config/idols/23_risyuri.yml +10 -0
  35. data/config/idols/24_yumeno.yml +10 -0
  36. data/config/idols/25_romanofusuki.yml +10 -0
  37. data/config/idols/26_diamond.yml +10 -0
  38. data/config/idols/27_sawori.yml +10 -0
  39. data/config/idols/28_monaka.yml +10 -0
  40. data/config/idols/29_ei.yml +10 -0
  41. data/config/idols/30_matsuri.yml +10 -0
  42. data/config/idols/31_tomoe.yml +10 -0
  43. data/config/idols/32_miu.yml +10 -0
  44. data/config/idols/33_heifon.yml +10 -0
  45. data/config/idols/34_manon.yml +10 -0
  46. data/config/idols/35_chacha.yml +10 -0
  47. data/config/idols/36_murasaki.yml +10 -0
  48. data/config/idols/37_miwako.yml +10 -0
  49. data/config/idols/38_ayumu.yml +10 -0
  50. data/config/idols/39_nikoru.yml +10 -0
  51. data/config/idols/40_mito.yml +10 -0
  52. data/config/idols/41_mana.yml +10 -0
  53. data/config/idols/42_kuruto.yml +10 -0
  54. data/config/idols/43_rui.yml +10 -0
  55. data/config/idols/44_memoru.yml +10 -0
  56. data/config/idols/45_hina.yml +10 -0
  57. data/config/idols/46_emoko.yml +10 -0
  58. data/config/idols/47_ume.yml +10 -0
  59. data/config/idols/48_hitoha.yml +10 -0
  60. data/config/idols/49_futaba.yml +10 -0
  61. data/lib/t7s.rb +18 -0
  62. data/lib/t7s/idol.rb +51 -0
  63. data/lib/t7s/idol/name.rb +38 -0
  64. data/lib/t7s/version.rb +3 -0
  65. data/t7s.gemspec +29 -0
  66. metadata +178 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f07e349f0ccf08215c167032206d5309746fa781
4
+ data.tar.gz: c994d497d410895e88a1d995b9ff4dbacdfc1234
5
+ SHA512:
6
+ metadata.gz: 68ab3641cff22f29dbcbb1d730e8281a718334191206ef3aab4c30b8a0b09e6ed66c08cf92158b1b6216424a0b7909c3bd6b9a35ca3dd2184ca34d98a2915f10
7
+ data.tar.gz: ba507f20a98ae2f9056875ccf182f972731681d31a099737be41bbe5bd47862331caf060f3a4cb8f2f38ab72da60ad6ea85558a2854b16a982bc93b523bae699
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /vendor/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.2
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at sora.kataoka@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in t7s.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 katawo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,41 @@
1
+ # T7s
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/t7s`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 't7s'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install t7s
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/t7s. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "t7s"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,10 @@
1
+ ---
2
+ niko:
3
+ id: 1
4
+ idol_id: 1
5
+ name:
6
+ family: 六咲
7
+ family_kana: ろくさき
8
+ given: コニー
9
+ given_kana: コニー
10
+ shorten: コニー
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 2
4
+ idol_id: 2
5
+ name:
6
+ family: 春日部
7
+ family_kana: カスカベ
8
+ given: ハル
9
+ given_kana: ハル
10
+ shorten: ハル
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 3
4
+ idol_id: 3
5
+ name:
6
+ family: 天堂寺
7
+ family_kana: テンドウジ
8
+ given: ムスビ
9
+ given_kana: ムスビ
10
+ shorten: ムスビ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 4
4
+ idol_id: 4
5
+ name:
6
+ family: 角森
7
+ family_kana: ツノモリ
8
+ given: ロナ
9
+ given_kana: ロナ
10
+ shorten: ロナ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 5
4
+ idol_id: 5
5
+ name:
6
+ family: 野ノ原
7
+ family_kana: ノノハラ
8
+ given: ヒメ
9
+ given_kana: ヒメ
10
+ shorten: ヒメ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 6
4
+ idol_id: 6
5
+ name:
6
+ family: 芹沢
7
+ family_kana: セリザワ
8
+ given: モモカ
9
+ given_kana: モモカ
10
+ shorten: モモカ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 7
4
+ idol_id: 7
5
+ name:
6
+ family: 臼田
7
+ family_kana: ウスタ
8
+ given: スミレ
9
+ given_kana: スミレ
10
+ shorten: スミレ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 8
4
+ idol_id: 8
5
+ name:
6
+ family: 神城
7
+ family_kana: カミシロ
8
+ given: スイ
9
+ given_kana: スイ
10
+ shorten: スイ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 9
4
+ idol_id: 9
5
+ name:
6
+ family: 久遠寺
7
+ family_kana: クオンジ
8
+ given: シズカ
9
+ given_kana: シズカ
10
+ shorten: シズカ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 10
4
+ idol_id: 10
5
+ name:
6
+ family: アレサンドラ
7
+ family_kana: アレサンドラ
8
+ given: スース
9
+ given_kana: スース
10
+ shorten: スース
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 11
4
+ idol_id: 11
5
+ name:
6
+ family: 晴海
7
+ family_kana: ハルミ
8
+ given: サワラ
9
+ given_kana: サワラ
10
+ shorten: サワラ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 12
4
+ idol_id: 12
5
+ name:
6
+ family: 晴海
7
+ family_kana: ハルミ
8
+ given: カジカ
9
+ given_kana: カジカ
10
+ shorten: カジカ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 13
4
+ idol_id: 13
5
+ name:
6
+ family: 晴海
7
+ family_kana: ハルミ
8
+ given: シンジュ
9
+ given_kana: シンジュ
10
+ shorten: シンジュ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 14
4
+ idol_id: 14
5
+ name:
6
+ family: 川澄
7
+ family_kana: カワスミ
8
+ given: シサラ
9
+ given_kana: シサラ
10
+ shorten: シサラ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 15
4
+ idol_id: 15
5
+ name:
6
+ family: 上杉
7
+ family_kana: ウエスギ
8
+ given: ウエバス・キョーコ
9
+ given_kana: ウエバス・キョーコ
10
+ shorten: キョーコ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 16
4
+ idol_id: 16
5
+ name:
6
+ family: 二川
7
+ family_kana: フタガワ
8
+ given: ミミ
9
+ given_kana: ミミ
10
+ shorten: ミミ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 17
4
+ idol_id: 17
5
+ name:
6
+ family: 瀬戸
7
+ family_kana: セト
8
+ given: ファーブ
9
+ given_kana: ファーブ
10
+ shorten: ファーブ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 18
4
+ idol_id: 18
5
+ name:
6
+ family: 桂木
7
+ family_kana: カツラギ
8
+ given: カヅミ
9
+ given_kana: カヅミ
10
+ shorten: カヅミ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 19
4
+ idol_id: 19
5
+ name:
6
+ family: 荒木
7
+ family_kana: アラキ
8
+ given: レナ
9
+ given_kana: レナ
10
+ shorten: レナ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 20
4
+ idol_id: 20
5
+ name:
6
+ family: 西園
7
+ family_kana: ニシゾノ
8
+ given: ホノカ
9
+ given_kana: ホノカ
10
+ shorten: ホノカ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 21
4
+ idol_id: 21
5
+ name:
6
+ family: 玉坂
7
+ family_kana: タマサカ
8
+ given: マコト
9
+ given_kana: マコト
10
+ shorten: マコト
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 22
4
+ idol_id: 22
5
+ name:
6
+ family: 榎並
7
+ family_kana: エナミ
8
+ given: マドカ
9
+ given_kana: マドカ
10
+ shorten: マドカ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 23
4
+ idol_id: 23
5
+ name:
6
+ family: 前園
7
+ family_kana: マエゾノ
8
+ given: リシュリ
9
+ given_kana: リシュリ
10
+ shorten: リシュリ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 24
4
+ idol_id: 24
5
+ name:
6
+ family: 堺屋
7
+ family_kana: サカイヤ
8
+ given: ユメノ
9
+ given_kana: ユメノ
10
+ shorten: ユメノ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 25
4
+ idol_id: 25
5
+ name:
6
+ family: ターシャ
7
+ family_kana: ターシャ
8
+ given: ロマノフスキー
9
+ given_kana: ロマノフスキー
10
+ shorten: ロマノフスキー
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 26
4
+ idol_id: 26
5
+ name:
6
+ family: ジェダ
7
+ family_kana: ジェダ
8
+ given: ダイヤモンド
9
+ given_kana: ダイヤモンド
10
+ shorten: ジェダ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 27
4
+ idol_id: 27
5
+ name:
6
+ family: 夜舞
7
+ family_kana: ヨマイ
8
+ given: サヲリ
9
+ given_kana: サヲリ
10
+ shorten: サヲリ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 28
4
+ idol_id: 28
5
+ name:
6
+ family: 雲巻
7
+ family_kana: クモマキ
8
+ given: モナカ
9
+ given_kana: モナカ
10
+ shorten: モナカ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 29
4
+ idol_id: 29
5
+ name:
6
+ family: 逝橋
7
+ family_kana: ユクハシ
8
+ given: エイ
9
+ given_kana: エイ
10
+ shorten: エイ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 30
4
+ idol_id: 30
5
+ name:
6
+ family: 三森
7
+ family_kana: ミモリ
8
+ given: マツリ
9
+ given_kana: マツリ
10
+ shorten: マツリ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 31
4
+ idol_id: 31
5
+ name:
6
+ family: 白鳥
7
+ family_kana: シラトリ
8
+ given: トモエ
9
+ given_kana: トモエ
10
+ shorten: トモエ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 32
4
+ idol_id: 32
5
+ name:
6
+ family: 逢原
7
+ family_kana: アイハラ
8
+ given: ミウ
9
+ given_kana: ミウ
10
+ shorten: ミウ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 33
4
+ idol_id: 33
5
+ name:
6
+ family: シャオ
7
+ family_kana: シャオ
8
+ given: ヘイフォン
9
+ given_kana: ヘイフォン
10
+ shorten: シャオ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 34
4
+ idol_id: 34
5
+ name:
6
+ family: 星柿
7
+ family_kana: ホシガキ
8
+ given: マノン
9
+ given_kana: マノン
10
+ shorten: マノン
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 35
4
+ idol_id: 35
5
+ name:
6
+ family: 鳳
7
+ family_kana: オオトリ
8
+ given: チャチャ
9
+ given_kana: チャチャ
10
+ shorten: チャチャ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 36
4
+ idol_id: 36
5
+ name:
6
+ family: 越前
7
+ family_kana: エチゼン
8
+ given: ムラサキ
9
+ given_kana: ムラサキ
10
+ shorten: ムラサキ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 37
4
+ idol_id: 37
5
+ name:
6
+ family: 浅見
7
+ family_kana: アサミ
8
+ given: ミワコ
9
+ given_kana: ミワコ
10
+ shorten: ミワコ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 38
4
+ idol_id: 38
5
+ name:
6
+ family: 折笠
7
+ family_kana: オリカサ
8
+ given: アユム
9
+ given_kana: アユム
10
+ shorten: アユム
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 39
4
+ idol_id: 39
5
+ name:
6
+ family: 七咲
7
+ family_kana: ナナサキ
8
+ given: ニコル
9
+ given_kana: ニコル
10
+ shorten: ニコル
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 40
4
+ idol_id: 40
5
+ name:
6
+ family: 羽生田
7
+ family_kana: ハニュウダ
8
+ given: ミト
9
+ given_kana: ミト
10
+ shorten: ミト
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 41
4
+ idol_id: 41
5
+ name:
6
+ family: 御園尾
7
+ family_kana: ミソノオ
8
+ given: マナ
9
+ given_kana: マナ
10
+ shorten: マナ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 42
4
+ idol_id: 42
5
+ name:
6
+ family: 寿
7
+ family_kana: コトブキ
8
+ given: クルト
9
+ given_kana: クルト
10
+ shorten: クルト
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 43
4
+ idol_id: 43
5
+ name:
6
+ family: 若王子
7
+ family_kana: ワカオウジ
8
+ given: ルイ
9
+ given_kana: ルイ
10
+ shorten: ルイ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 44
4
+ idol_id: 44
5
+ name:
6
+ family: 遊佐
7
+ family_kana: ユサ
8
+ given: メモル
9
+ given_kana: メモル
10
+ shorten: メモル
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 45
4
+ idol_id: 45
5
+ name:
6
+ family: 佐伯
7
+ family_kana: サエキ
8
+ given: ヒナ
9
+ given_kana: ヒナ
10
+ shorten: ヒナ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 46
4
+ idol_id: 46
5
+ name:
6
+ family: 鰐淵
7
+ family_kana: ワニブチ
8
+ given: エモコ
9
+ given_kana: エモコ
10
+ shorten: エモコ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 47
4
+ idol_id: 47
5
+ name:
6
+ family: 九条
7
+ family_kana: クジョウ
8
+ given: ウメ
9
+ given_kana: ウメ
10
+ shorten: ウメ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 48
4
+ idol_id: 48
5
+ name:
6
+ family: 空栗
7
+ family_kana: カラクリ
8
+ given: ヒトハ
9
+ given_kana: ヒトハ
10
+ shorten: ヒトハ
@@ -0,0 +1,10 @@
1
+ ---
2
+ haru:
3
+ id: 49
4
+ idol_id: 49
5
+ name:
6
+ family: 空栗
7
+ family_kana: カラクリ
8
+ given: フタバ
9
+ given_kana: フタバ
10
+ shorten: フタバ
@@ -0,0 +1,18 @@
1
+ require 'active_support/all'
2
+ require 'yaml'
3
+ require 'hashie'
4
+ require "t7s/version"
5
+ require "t7s/idol"
6
+ require "t7s/idol/name"
7
+
8
+ module T7s
9
+ def self.method_missing(name, *args)
10
+ if T7s::Idol.valid?(name)
11
+ T7s::Idol.find_by_name(name)
12
+ else
13
+ T7s::Idol.send(name, *args)
14
+ end
15
+ rescue NoMethodError
16
+ super
17
+ end
18
+ end
@@ -0,0 +1,51 @@
1
+ module T7s
2
+ class Idol
3
+ attr_reader :idol_id, :key, :name
4
+ @@config = nil
5
+ @@all_idols = nil
6
+
7
+ def initialize(**args)
8
+ @idol_id = args[:idol_id]
9
+ @key = args[:key]
10
+ @name = Name.new(args[:name])
11
+ end
12
+ alias_method :id, :idol_id
13
+
14
+ class << self
15
+ def config
16
+ unless @@config
17
+ @@config = Dir.glob("#{File.dirname(__FILE__)}/../../config/idols/*.yml").each_with_object({}) do |file, idols|
18
+ idols.merge!(YAML.load_file(file))
19
+ end.deep_symbolize_keys
20
+ @@all_idols = nil
21
+ end
22
+ @@config
23
+ end
24
+
25
+
26
+ def names
27
+ config.keys
28
+ end
29
+
30
+ def all
31
+ @@all_idols ||= config.map { |key, prof| prof[:key] = key; new(prof) }.sort_by { |idol| idol.id }
32
+ end
33
+ alias_method :all_idols, :all
34
+
35
+ def find(idol_id)
36
+ all_idols.find { |idol| idol.id == idol_id }
37
+ end
38
+ alias_method :find_by_id, :find
39
+
40
+ def find_by_name(idol_name)
41
+ all_idols.find { |idol| [idol.key, idol.name].include?(idol_name) } || (raise UnknownIdolError, "unknown idol: #{idol_name}")
42
+ end
43
+
44
+ def valid?(idol_name)
45
+ names.include?(idol_name)
46
+ end
47
+ end
48
+
49
+ class UnknownIdolError < StandardError; end
50
+ end
51
+ end
@@ -0,0 +1,38 @@
1
+ module T7s
2
+ class Idol
3
+ class Name
4
+ attr_reader :aka, :family, :family_kana, :given, :given_kana, :shorten
5
+
6
+ def initialize(name_object)
7
+ name_object.each do |k, v|
8
+ instance_variable_set("@#{k}", v)
9
+ end
10
+ end
11
+
12
+ def to_s
13
+ return @aka if @aka
14
+ full
15
+ end
16
+
17
+ def full
18
+ if @family && @given
19
+ "#{@family}#{@given}"
20
+ else
21
+ @aka
22
+ end
23
+ end
24
+
25
+ def full_kana
26
+ if @family_kana && @given_kana
27
+ "#{@family_kana}#{@given_kana}"
28
+ else
29
+ self.full
30
+ end
31
+ end
32
+
33
+ def ==(other)
34
+ super || [aka, given, full].compact.include?(other)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,3 @@
1
+ module T7s
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 't7s/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "t7s"
8
+ spec.version = T7s::VERSION
9
+ spec.authors = ["katawo"]
10
+ spec.email = ["sora.kataoka@gmail.com"]
11
+
12
+ spec.summary = %q{t7s lib}
13
+ spec.description = %q{t7s lib}
14
+ spec.homepage = ""
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency 'activesupport', '>= 4.0'
23
+ spec.add_dependency 'hashie', '>= 3.0'
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.12"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+
29
+ end
metadata ADDED
@@ -0,0 +1,178 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: t7s
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - katawo
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-06-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: hashie
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ description: t7s lib
84
+ email:
85
+ - sora.kataoka@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
93
+ - CODE_OF_CONDUCT.md
94
+ - Gemfile
95
+ - LICENSE.txt
96
+ - README.md
97
+ - Rakefile
98
+ - bin/console
99
+ - bin/setup
100
+ - config/idols/01_niko.yml
101
+ - config/idols/02_haru.yml
102
+ - config/idols/03_musubi.yml
103
+ - config/idols/04_hime.yml
104
+ - config/idols/05_hime.yml
105
+ - config/idols/06_momoka.yml
106
+ - config/idols/07_sumire.yml
107
+ - config/idols/08_sui.yml
108
+ - config/idols/09_shizuka.yml
109
+ - config/idols/10_susu.yml
110
+ - config/idols/11_sawara.yml
111
+ - config/idols/12_kajika.yml
112
+ - config/idols/13_sinjyu.yml
113
+ - config/idols/14_shisara.yml
114
+ - config/idols/15_kyoko.yml
115
+ - config/idols/16_mimi.yml
116
+ - config/idols/17_fabu.yml
117
+ - config/idols/18_kazumi.yml
118
+ - config/idols/19_rena.yml
119
+ - config/idols/20_honoka.yml
120
+ - config/idols/21_makoto.yml
121
+ - config/idols/22_madoka.yml
122
+ - config/idols/23_risyuri.yml
123
+ - config/idols/24_yumeno.yml
124
+ - config/idols/25_romanofusuki.yml
125
+ - config/idols/26_diamond.yml
126
+ - config/idols/27_sawori.yml
127
+ - config/idols/28_monaka.yml
128
+ - config/idols/29_ei.yml
129
+ - config/idols/30_matsuri.yml
130
+ - config/idols/31_tomoe.yml
131
+ - config/idols/32_miu.yml
132
+ - config/idols/33_heifon.yml
133
+ - config/idols/34_manon.yml
134
+ - config/idols/35_chacha.yml
135
+ - config/idols/36_murasaki.yml
136
+ - config/idols/37_miwako.yml
137
+ - config/idols/38_ayumu.yml
138
+ - config/idols/39_nikoru.yml
139
+ - config/idols/40_mito.yml
140
+ - config/idols/41_mana.yml
141
+ - config/idols/42_kuruto.yml
142
+ - config/idols/43_rui.yml
143
+ - config/idols/44_memoru.yml
144
+ - config/idols/45_hina.yml
145
+ - config/idols/46_emoko.yml
146
+ - config/idols/47_ume.yml
147
+ - config/idols/48_hitoha.yml
148
+ - config/idols/49_futaba.yml
149
+ - lib/t7s.rb
150
+ - lib/t7s/idol.rb
151
+ - lib/t7s/idol/name.rb
152
+ - lib/t7s/version.rb
153
+ - t7s.gemspec
154
+ homepage: ''
155
+ licenses:
156
+ - MIT
157
+ metadata: {}
158
+ post_install_message:
159
+ rdoc_options: []
160
+ require_paths:
161
+ - lib
162
+ required_ruby_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ requirements: []
173
+ rubyforge_project:
174
+ rubygems_version: 2.4.5
175
+ signing_key:
176
+ specification_version: 4
177
+ summary: t7s lib
178
+ test_files: []