hyakunin-issyu 0.0.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.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
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
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in hyakunin-issyu.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Tomomichi
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,29 @@
1
+ # Hyakunin::Issyu
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'hyakunin-issyu'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install hyakunin-issyu
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'hyakunin-issyu/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "hyakunin-issyu"
8
+ gem.version = HyakuninIssyu::VERSION
9
+ gem.authors = ["Tomomichi"]
10
+ gem.email = ["tomomichi.onishi@gmail.com"]
11
+ gem.description = %q{This Gem offer all the information about Hyakunin-issyu, the One Hundred Poems by One Hundred Poets.}
12
+ gem.summary = %q{This Gem offer all the information about Hyakunin-issyu, the One Hundred Poems by One Hundred Poets.}
13
+ gem.homepage = "http://hyaku-1.eure-ka.me"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ end
@@ -0,0 +1,15 @@
1
+ 1:
2
+ poem: 秋の田のかりほの庵の苫をあらみ わが衣手は露にぬれつつ
3
+ poet: 天智天皇
4
+ 2:
5
+ poem: 春過ぎて夏来にけらし白妙の 衣干すてふ天の香具山
6
+ poet: 持統天皇
7
+ 3:
8
+ poem: あしびきの山鳥の尾のしだり尾の ながながし夜をひとりかも寝む
9
+ poet: 柿本人麻呂
10
+ 4:
11
+ poem: 田子の浦にうち出でて見れば白妙の 富士の高嶺に雪は降りつつ
12
+ poet: 山部赤人
13
+ 5:
14
+ poem: 奥山に紅葉踏み分け鳴く鹿の 声聞く時ぞ秋は悲しき
15
+ poet: 猿丸太夫
@@ -0,0 +1,3 @@
1
+ module HyakuninIssyu
2
+ VERSION = "0.0.4"
3
+ end
@@ -0,0 +1,25 @@
1
+ #encoding: utf-8
2
+ require 'hyakunin-issyu/version'
3
+ require 'yaml'
4
+ @data = YAML.load_file('lib/hyakunin-issyu/data.yml')
5
+
6
+ module HyakuninIssyu
7
+ def songs(start=1,last=1)
8
+ new_data = Hash.new
9
+ for i in start..last do
10
+ new_data[i] = @data[i]
11
+ end
12
+ return new_data
13
+ end
14
+ module_function :songs
15
+
16
+ def poem(id=1)
17
+ @data[id]['poem']
18
+ end
19
+ module_function :poem
20
+
21
+ def poet(id=1)
22
+ @data[id]['poet']
23
+ end
24
+ module_function :poet
25
+ end
@@ -0,0 +1,3 @@
1
+ #encoding: utf-8
2
+ require 'rubygems'
3
+ require 'hyakunin-issyu'
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hyakunin-issyu
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Tomomichi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-15 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: This Gem offer all the information about Hyakunin-issyu, the One Hundred
15
+ Poems by One Hundred Poets.
16
+ email:
17
+ - tomomichi.onishi@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .gitignore
23
+ - Gemfile
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - hyakunin-issyu.gemspec
28
+ - lib/hyakunin-issyu.rb
29
+ - lib/hyakunin-issyu/data.yml
30
+ - lib/hyakunin-issyu/version.rb
31
+ - spec/spec_helper.rb
32
+ homepage: http://hyaku-1.eure-ka.me
33
+ licenses: []
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ requirements: []
51
+ rubyforge_project:
52
+ rubygems_version: 1.8.23
53
+ signing_key:
54
+ specification_version: 3
55
+ summary: This Gem offer all the information about Hyakunin-issyu, the One Hundred
56
+ Poems by One Hundred Poets.
57
+ test_files:
58
+ - spec/spec_helper.rb