condate 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: 1c675d0695ff827590e830a3896df468a3720c9e
4
+ data.tar.gz: 18310228bff71a0e50d381d5885d47c62fef28ee
5
+ SHA512:
6
+ metadata.gz: 4f622ffb18873fba440ee30b6ece1bdafd305eafac8ba82f225aeab9b7896c770c1f4e4cfa4d39edf9a538e50dac93f74b40a782a9edf860440d281d3c015cc7
7
+ data.tar.gz: 979b7c1b299c24e83f30914b221bbe00c9a711492e643f0fe081a15cc07801eff4cbb89bcc9d74a55e066a3c9b0f401570123cd9c2e6de1699f579974c65106d
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1.1
5
+ script: bundle exec rake test
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in condate.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 yuzoiwasaki
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,42 @@
1
+ # Condate
2
+
3
+ [![Build Status](https://travis-ci.org/yuzoiwasaki/condate.png)](https://travis-ci.org/yuzoiwasaki/condate)
4
+
5
+ 献立決めプログラム。指定したジャンルの献立をランダムに表示します。
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'condate'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install condate
22
+
23
+ ## Usage
24
+
25
+ ```ruby
26
+ condate = Condate.new('japanese')
27
+ condate.decide #=> "肉じゃが"
28
+ condate = Condate.new('chinese')
29
+ condate.decide #=> "チンジャオロースー"
30
+ condate = Condate.new('western')
31
+ condate.decide #=> "ハンバーグ"
32
+ condate = Condate.new('any')
33
+ condate.decide #=> 全ジャンルからランダムに表示
34
+ ```
35
+
36
+ ## Contributing
37
+
38
+ 1. Fork it ( https://github.com/[my-github-username]/condate/fork )
39
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
40
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
41
+ 4. Push to the branch (`git push origin my-new-feature`)
42
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+ Rake::TestTask.new do |t|
4
+ t.pattern = "test/test_*.rb"
5
+ end
data/condate.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'condate/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "condate"
8
+ spec.version = Condate::VERSION
9
+ spec.authors = ["yuzoiwasaki"]
10
+ spec.email = ["a0556017@sophia.jp"]
11
+ spec.summary = %q{random food name generator}
12
+ spec.description = %q{random food name generator}
13
+ spec.homepage = "https://github.com/yuzoiwasaki/condate"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "minitest"
24
+ end
data/lib/condate.rb ADDED
@@ -0,0 +1,20 @@
1
+ require "condate/version"
2
+ require 'yaml'
3
+
4
+ class Condate
5
+ MENU = YAML.load_file(File.expand_path(File.join('..', 'data', 'menu.yml'), __FILE__))
6
+
7
+ def initialize(genre)
8
+ @genre = genre
9
+ decide
10
+ end
11
+
12
+ def decide
13
+ if @genre == 'any' || @any == 1
14
+ @genre = %w(japanese chinese western).sample
15
+ @any = 1
16
+ end
17
+ choice = MENU[@genre].sample
18
+ end
19
+
20
+ end
@@ -0,0 +1,3 @@
1
+ class Condate
2
+ VERSION = "0.0.1"
3
+ end
data/lib/data/menu.yml ADDED
@@ -0,0 +1,109 @@
1
+ japanese:
2
+ - '肉じゃが'
3
+ - 'かじきの照り焼き'
4
+ - '金目鯛の煮付け'
5
+ - '豚肉の生姜焼き'
6
+ - '豚の角煮'
7
+ - 'いり鶏'
8
+ - 'いわしの竜田揚げ'
9
+ - 'ぶり大根'
10
+ - 'さばの味噌煮'
11
+ - 'いかと里芋の煮物'
12
+ - '卵焼き'
13
+ - '茶碗蒸し'
14
+ - '豆腐とゴーヤーのチャンプルー'
15
+ - '白和え'
16
+ - '卵玉豆腐'
17
+ - 'オクラおかかやっこ'
18
+ - '揚げじゃこやっこ'
19
+ - '天ぷら・かき揚げ'
20
+ - 'かぼちゃの甘煮'
21
+ - 'きんぴらごぼう'
22
+ - '小松菜のおひたし'
23
+ - 'いんげんの胡麻和え'
24
+ - 'きゅうりとわかめの酢の物'
25
+ - 'ひじきの煮物'
26
+ - '切り干し大根の煮物'
27
+ - '玉こんにゃくの煮物'
28
+ - 'さつまいものレモン煮'
29
+ - '大根の土佐煮風'
30
+ - 'ピーマンとちくわのピリ辛炒め'
31
+ - 'れんこんのきんぴら'
32
+ - 'にんじんとじゃこのゴマ油炒め'
33
+ - '長芋の梅おかか和え'
34
+ - 'セロリの浅漬けこぶ風味'
35
+ - 'きのこのゴマ味噌和え'
36
+ - '干物と青じその混ぜご飯'
37
+ - '鶏そぼろご飯'
38
+ - '牛丼'
39
+ - 'ぶっかけそば'
40
+ - 'きつねうどん'
41
+ - '豚汁'
42
+ - '豆腐とわかめの味噌汁'
43
+ - 'きのこ汁'
44
+ - 'アサリのすまし汁'
45
+ - 'いんげんとみょうがの味噌汁'
46
+ - '三つ葉のかき玉汁'
47
+ - 'かぶと油揚げの味噌汁'
48
+ - '沢煮椀'
49
+ chinese:
50
+ - 'チンジャオロースー'
51
+ - '焼き餃子'
52
+ - '麻婆豆腐'
53
+ - '酢豚'
54
+ - 'バンバンジー'
55
+ - '肉団子の甘酢あん'
56
+ - 'ホイコーロー'
57
+ - '海老のチリソース煮'
58
+ - 'かに玉'
59
+ - 'ニラとレバーの炒め物'
60
+ - 'トマトのザーサイ和え'
61
+ - 'ブロッコリーのオイスターソース炒め煮'
62
+ - 'もやしとハムの中華サラダ'
63
+ - '担々麺'
64
+ - 'あんかけ焼きそば'
65
+ - '冷やし中華'
66
+ - 'ジャージャー麺'
67
+ - 'サンラータン'
68
+ - '大根とザーサイのスープ'
69
+ - 'レタスとわかめのスープ'
70
+ - 'チンゲンサイとはるさめのスープ'
71
+ western:
72
+ - 'ハンバーグ'
73
+ - 'オムライス'
74
+ - 'コロッケ'
75
+ - 'ポークソテー'
76
+ - 'チキンのトマト煮'
77
+ - 'ロールキャベツ'
78
+ - 'メンチカツ'
79
+ - '海老マカロニグラタン'
80
+ - 'わかさぎのエスカベーシュ'
81
+ - '白身魚のカルパッチョ'
82
+ - 'ゆでだこのカルパッチョ'
83
+ - '海老フライ'
84
+ - '具入りオムレツ'
85
+ - 'スクランブルエッグ'
86
+ - 'スコッチエッグ'
87
+ - 'ラタトゥイユ'
88
+ - 'シーザーサラダ'
89
+ - 'ポテトサラダ'
90
+ - '白菜の軸のチーズ焼き'
91
+ - '玉ねぎとソーセージのスープ煮'
92
+ - 'かぶの黒胡椒ソテー'
93
+ - 'ミニトマトとモッツァレラのサラダ'
94
+ - 'かぼちゃのマヨーグルサラダ'
95
+ - 'にんじんのシンプルサラダ'
96
+ - 'パプリカのフレンチマリネ'
97
+ - 'トマトとセロリのマリネ'
98
+ - 'きゅうりのレンジピクルス'
99
+ - 'きのこのドリア'
100
+ - '海老ピラフ'
101
+ - 'トマトソースのスパゲティ'
102
+ - 'カルボナーラ'
103
+ - 'たことバジルのペンネ'
104
+ - 'ミネストローネ'
105
+ - 'クラムチャウダー'
106
+ - 'オニオングラタンスープ'
107
+ - 'コーンスープ'
108
+ test:
109
+ - 'foo'
@@ -0,0 +1,20 @@
1
+ require 'minitest/autorun'
2
+ require 'condate'
3
+ MiniTest.autorun
4
+
5
+ class TestCondate < MiniTest::Test
6
+ def setup
7
+ $stdout, @orig_stdout =
8
+ open("/dev/null", 'w'), $stdout
9
+ @condate = Condate.new('test')
10
+ end
11
+
12
+ def teardown
13
+ $stdout = @orig_stdout
14
+ end
15
+
16
+ def test_decide
17
+ assert_equal @condate.decide, 'foo'
18
+ end
19
+
20
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: condate
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - yuzoiwasaki
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: random food name generator
56
+ email:
57
+ - a0556017@sophia.jp
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".travis.yml"
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - condate.gemspec
69
+ - lib/condate.rb
70
+ - lib/condate/version.rb
71
+ - lib/data/menu.yml
72
+ - test/test_condate.rb
73
+ homepage: https://github.com/yuzoiwasaki/condate
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.2.0
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: random food name generator
97
+ test_files:
98
+ - test/test_condate.rb
99
+ has_rdoc: