syoboemon 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +1 -0
- data/lib/syoboemon/api_connector.rb +81 -0
- data/lib/syoboemon/api_responce_parser/api_response_parser.rb +37 -0
- data/lib/syoboemon/client.rb +30 -0
- data/lib/syoboemon/program_infomation_accessor/program_detail_search.rb +58 -0
- data/lib/syoboemon/program_infomation_accessor/todays_programs.rb +57 -0
- data/lib/syoboemon/query_generator/program_detail_search.rb +42 -0
- data/lib/syoboemon/query_generator/todays_programs.rb +27 -0
- data/lib/syoboemon/version.rb +3 -0
- data/lib/syoboemon.rb +20 -0
- data/syoboemon.gemspec +35 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5bc2545ff651303f27fa100621220cc1b92352cc
|
4
|
+
data.tar.gz: e11115495acac859ba7195b2ef490dbf84d99f73
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4c17bed5400da04745c0b414eacd66dc1628aaba43ef4d44d890cf9b823842390911c249a5bb8cc6e4711a822ea7be4a95e5909522a62e785ef91054fbd55cb2
|
7
|
+
data.tar.gz: 0b4e11db7b15c9bc249ad6ae543b0fce81a1cbdecd7b0ebe33abce44bcae184d5bdbd926ae4c739879770f4a0612a841445fe0a2df4b7e30a8bcd28030074312
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 toshiemon18
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Syoboemon
|
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/syoboemon`. 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 'syoboemon'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install syoboemon
|
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 `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec syoboemon` to use the code located in this directory, ignoring other installed copies of this gem.
|
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` to 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
|
+
1. Fork it ( https://github.com/[my-github-username]/syoboemon/fork )
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
39
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,81 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::Connector module
|
3
|
+
#
|
4
|
+
|
5
|
+
# しょぼいカレンダーAPIを利用するためのモジュール
|
6
|
+
|
7
|
+
require "rubygems"
|
8
|
+
require "faraday"
|
9
|
+
|
10
|
+
module Syoboemon
|
11
|
+
module APIConnector
|
12
|
+
URL = "http://cal.syoboi.jp"
|
13
|
+
RSS2_PATH = "/rss2.php"
|
14
|
+
DB_PATH = "/db.php"
|
15
|
+
JSON_PATH = "/json.php"
|
16
|
+
|
17
|
+
class << self
|
18
|
+
# APIConnector#get_rss2, APIConnector#get_db, APIConnector#get_jsonについて
|
19
|
+
# 引数にはAPIのパラメータをまとめたHashを渡すこと
|
20
|
+
|
21
|
+
# rss2.phpを利用するためのメソッド
|
22
|
+
# Example => APIConnector.rss2_get({usr: "example_name", filter: 0, count: 150, ...})
|
23
|
+
def get_rss2(query_params={})
|
24
|
+
begin
|
25
|
+
return connector.get(rss2_path, query_params).body
|
26
|
+
rescue => e
|
27
|
+
puts "#{e.messege}"
|
28
|
+
exit
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# db.phpを利用するためのメソッド
|
33
|
+
# Example => APIConnector.db_get({Command: "TitleLookup", TID: 9029, Fields: "Comment,TID..."})
|
34
|
+
def get_db(query_params={})
|
35
|
+
begin
|
36
|
+
return connector.get(db_path, query_params).body
|
37
|
+
rescue => e
|
38
|
+
puts "#{e.message}"
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# json.phpを利用するためのメソッド
|
44
|
+
# Example => APIConnector.json_get({Req: "TitleSearch", Title: "ご注文はうさぎですか?", Limit: 15})
|
45
|
+
def get_json(query_params={})
|
46
|
+
begin
|
47
|
+
return connector.get(json_path, query_params).body
|
48
|
+
rescue => e
|
49
|
+
puts "#{e.message}"
|
50
|
+
exit
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
def connector
|
56
|
+
connector ||= Faraday::Connection.new(url: url) do |c|
|
57
|
+
c.request :url_encoded
|
58
|
+
c.response :logger
|
59
|
+
c.adapter :net_http
|
60
|
+
c.response :raise_error
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def url
|
65
|
+
URL
|
66
|
+
end
|
67
|
+
|
68
|
+
def rss2_path
|
69
|
+
RSS2_PATH
|
70
|
+
end
|
71
|
+
|
72
|
+
def db_path
|
73
|
+
DB_PATH
|
74
|
+
end
|
75
|
+
|
76
|
+
def json_path
|
77
|
+
JSON_PATH
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::APIResponseParser::Item
|
3
|
+
# Syoboemon::APIResponseParser::TitleItem
|
4
|
+
# Syoboemon::APIResponseParser::Json
|
5
|
+
#
|
6
|
+
|
7
|
+
module Syoboemon
|
8
|
+
module APIResponseParser
|
9
|
+
class Item
|
10
|
+
include HappyMapper
|
11
|
+
|
12
|
+
element :title, String
|
13
|
+
element :link, String
|
14
|
+
element :pubDate, DateTime
|
15
|
+
element :description, String
|
16
|
+
end
|
17
|
+
|
18
|
+
class TitleItem
|
19
|
+
include HappyMapper
|
20
|
+
|
21
|
+
tag "TitleItem"
|
22
|
+
element :TID, String
|
23
|
+
element :Title, String
|
24
|
+
element :Comment, String
|
25
|
+
end
|
26
|
+
|
27
|
+
class Json
|
28
|
+
def initialize(responce)
|
29
|
+
@parse_data = responce
|
30
|
+
end
|
31
|
+
|
32
|
+
def parse
|
33
|
+
return JSON.parse(@parse_data)["Titles"].keys[0]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::Client
|
3
|
+
#
|
4
|
+
|
5
|
+
module Syoboemon
|
6
|
+
class Client
|
7
|
+
def today_programs(user_name="")
|
8
|
+
usr = user_name.to_s
|
9
|
+
query_params = QueryGenerator::TodaysPrograms.new(usr).generate_query
|
10
|
+
api_response = APIConnector.get_rss2(query_params)
|
11
|
+
return ProgramInfomationAccessor::TodaysPrograms.new(APIResponseParser::Item.parse(api_response))
|
12
|
+
end
|
13
|
+
|
14
|
+
def search_program(title_str="")
|
15
|
+
title = title_str.to_s
|
16
|
+
tid = fetch_title_id(title)
|
17
|
+
query_params = QueryGenerator::ProgramDetailSearch::DB.new(tid).generate_query
|
18
|
+
api_response = APIConnector.get_db(query_params)
|
19
|
+
return ProgramInfomationAccessor::ProgramDetailSearch.new(APIResponseParser::TitleItem.parse(api_response)[0])
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
def fetch_title_id(title_str="")
|
24
|
+
title = title_str.to_s
|
25
|
+
query_params = QueryGenerator::ProgramDetailSearch::Json.new(title).generate_query
|
26
|
+
api_response = APIConnector.get_json(query_params)
|
27
|
+
return APIResponseParser::Json.new(api_response).parse
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::ProgramInfomationAccessor::ProgramDetailSearch
|
3
|
+
#
|
4
|
+
|
5
|
+
# json.phpとdb.phpを使って検索した番組に関する情報を参照するためのクラス
|
6
|
+
|
7
|
+
module Syoboemon
|
8
|
+
module ProgramInfomationAccessor
|
9
|
+
class ProgramDetailSearch < Struct.new(:title, :title_id, :opening, :ending, :staffs, :casts)
|
10
|
+
def initialize(parsed_happymapper_object)
|
11
|
+
@results_of_program = parsed_happymapper_object
|
12
|
+
set_up_params_of_structure_members
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
def set_up_params_of_structure_members
|
17
|
+
program_params = split_params_of_comment
|
18
|
+
self.title = @results_of_program.Title
|
19
|
+
self.title_id = @results_of_program.TID
|
20
|
+
self.staffs = set_up_staff_or_cast_params(program_params.first) # Set staff
|
21
|
+
self.opening = set_up_music_params(program_params.map {|str| str.match(/オープニングテーマ.+/m)}.reject(&:nil?))
|
22
|
+
self.ending = set_up_music_params(program_params.map {|str| str.match(/エンディングテーマ.+/m)}.reject(&:nil?))
|
23
|
+
self.casts = set_up_staff_or_cast_params(program_params.last)
|
24
|
+
end
|
25
|
+
|
26
|
+
# 取得した番組情報のComment要素よりスタッフ、キャスト、OP、EDのデータを含む文字列を配列にして返す
|
27
|
+
# 配列の添字には以下の対応がある
|
28
|
+
# 0 => スタッフ(原作原画、監督等)
|
29
|
+
# 1〜 => オープニングテーマ(複数ある場合はその数だけ)
|
30
|
+
# 〜(n-1) => エンディングテーマ(複数ある場合はsの数だけ)
|
31
|
+
# n => キャスト(各キャラクターの配役)
|
32
|
+
def split_params_of_comment
|
33
|
+
split_pattern = /スタッフ.+|キャスト.+|(オープニング|エンディング).+/m
|
34
|
+
comment = @results_of_program.Comment
|
35
|
+
program_detail_params = comment.split("*").reject {|e| not e.match(split_pattern)}
|
36
|
+
return program_detail_params
|
37
|
+
end
|
38
|
+
|
39
|
+
# スタッフまたはキャストのリストを返す
|
40
|
+
def set_up_staff_or_cast_params(string_of_staff_or_cast)
|
41
|
+
string_of_staff_or_cast.split(/$./m).map do |s|
|
42
|
+
p = s.match(/:(.+?):(.+)/)
|
43
|
+
str = "#{p[1]}:#{p[2]}" unless p.nil?
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# OPまたはEDのリストを返す
|
48
|
+
def set_up_music_params(string_of_music=[])
|
49
|
+
string_of_music.map do |str|
|
50
|
+
op_param = str.to_s.split(/$./m).map do |line|
|
51
|
+
match_data = line.match(/.+「(.+)」|:.*歌:(.+)/)
|
52
|
+
str = match_data.to_a.reject(&:nil?).last unless match_data.nil?
|
53
|
+
end.reject(&:nil?).join(":")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::ProgramInfomationAccessor::TodaysPrograms
|
3
|
+
#
|
4
|
+
|
5
|
+
# 取得した現在時刻から1日分の放送番組に関する情報を参照するためのクラス
|
6
|
+
|
7
|
+
class Array
|
8
|
+
def remove_other_than_anime
|
9
|
+
self.reject {|p| p.category.match(/0|2|3|6/)}
|
10
|
+
end
|
11
|
+
|
12
|
+
def remove_other_than_radio
|
13
|
+
self.reject {|p| not p.category.match(/2/)}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module Syoboemon
|
18
|
+
module ProgramInfomationAccessor
|
19
|
+
class TodaysPrograms
|
20
|
+
attr_accessor :programs
|
21
|
+
def initialize(parsed_happymapper_object)
|
22
|
+
@todays_programs = parsed_happymapper_object.map(&:title)
|
23
|
+
@programs = set_up_structures_of_program_infomation
|
24
|
+
end
|
25
|
+
|
26
|
+
# connection_title_and_subtitle_flag => trueの場合のみ呼ばれる
|
27
|
+
# titlesとsubtitlesの各要素を連結し、新しいtitlesの要素として格納する
|
28
|
+
def connect_title_and_subtitle
|
29
|
+
programs_tmp = self.programs
|
30
|
+
new_programs = programs_tmp.map do |p|
|
31
|
+
subtitle = p.subtitle
|
32
|
+
p.subtitle = nil
|
33
|
+
p.title += "#{subtitle}"
|
34
|
+
end
|
35
|
+
self.programs = new_programs
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
def set_up_structures_of_program_infomation
|
40
|
+
struct_params = split_title_params
|
41
|
+
program_structure_ary = struct_params.map do |p|
|
42
|
+
struct = Struct.new(:airtime, :title, :subtitle, :broadcaster, :title_id, :category)
|
43
|
+
struct.new(p[:airtime], p[:title], p[:subtitle], p[:broadcaster], p[:title_id], p[:category])
|
44
|
+
end
|
45
|
+
return program_structure_ary
|
46
|
+
end
|
47
|
+
|
48
|
+
def split_title_params
|
49
|
+
program_params = @todays_programs.map do |p|
|
50
|
+
t = p.split("-")
|
51
|
+
hash = {airtime: t[0], title: t[1], subtitle: t[2], broadcaster: t[3], title_id: t[4], category: t[5]}
|
52
|
+
end
|
53
|
+
return program_params
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::QueryGenerator::ProgramDetailSearch
|
3
|
+
# included DB class and Json class
|
4
|
+
#
|
5
|
+
|
6
|
+
# DB => コンストラクタに渡されたTitle IDからdb.phpのクエリを生成する
|
7
|
+
# Json => コンストラクタに渡された番組タイトルからjson.phpのクエリを生成する
|
8
|
+
|
9
|
+
module Syoboemon
|
10
|
+
module QueryGenerator
|
11
|
+
module ProgramDetailSearch
|
12
|
+
class DB
|
13
|
+
def initialize(title_id="")
|
14
|
+
@tid = title_id.to_s
|
15
|
+
end
|
16
|
+
|
17
|
+
def generate_query
|
18
|
+
query = {
|
19
|
+
:Command => "TitleLookup",
|
20
|
+
:TID => @tid.to_s
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class Json
|
26
|
+
attr_accessor :title
|
27
|
+
|
28
|
+
def initialize(title="")
|
29
|
+
@title = title.to_s
|
30
|
+
end
|
31
|
+
|
32
|
+
def generate_query
|
33
|
+
query = {
|
34
|
+
:Req => "TitleSearch",
|
35
|
+
:Search => "#{@title.to_s}",
|
36
|
+
:Limit => 1
|
37
|
+
}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#
|
2
|
+
# Syoboemon::QueryGenerator::TodaysPrograms
|
3
|
+
#
|
4
|
+
|
5
|
+
# コンストラクタに渡されたユーザネームからrss2.phpのクエリを生成する
|
6
|
+
|
7
|
+
module Syoboemon
|
8
|
+
module QueryGenerator
|
9
|
+
class TodaysPrograms
|
10
|
+
attr_accessor :usr
|
11
|
+
|
12
|
+
def initialize(user_name="")
|
13
|
+
@usr = user_name.to_s
|
14
|
+
end
|
15
|
+
|
16
|
+
def generate_query
|
17
|
+
query = {
|
18
|
+
usr: @usr.to_s,
|
19
|
+
filer: "0",
|
20
|
+
count: "3000",
|
21
|
+
days: "1",
|
22
|
+
titlefmt: "$(StTime)-$(ShortTitle)-$(SubTitleB)-$(ChName)-$(TID)-$(Cat)"
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/syoboemon.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
$:.unshift File.dirname(__FILE__)
|
2
|
+
|
3
|
+
# ruby gems
|
4
|
+
require 'rubygems'
|
5
|
+
require 'faraday'
|
6
|
+
require 'happymapper'
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
# syoboemon ruby files
|
10
|
+
require "./syoboemon/version" # Syoboemon::VERSION
|
11
|
+
require "./syoboemon/client" # Syoboemon::Client
|
12
|
+
require "./syoboemon/api_connector" #Syoboemon::APIConnector
|
13
|
+
# Syoboemon::APIResponceParser
|
14
|
+
require "./syoboemon/api_responce_parser/api_response_parser"
|
15
|
+
# Syoboemon::QueryGenerator
|
16
|
+
require "./syoboemon/query_generator/program_detail_search"
|
17
|
+
require "./syoboemon/query_generator/todays_programs"
|
18
|
+
# Syoboemon::ProgramInfomationAccessor
|
19
|
+
require "./syoboemon/program_infomation_accessor/program_detail_search"
|
20
|
+
require "./syoboemon/program_infomation_accessor/todays_programs"
|
data/syoboemon.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'syoboemon/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "syoboemon"
|
8
|
+
spec.version = Syoboemon::VERSION
|
9
|
+
spec.authors = ["toshiemon18"]
|
10
|
+
spec.email = ["st12318@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{shoboi calendar API wrapper.}
|
13
|
+
spec.description = %q{しょぼいカレンダーのAPIラッパッパ. 他の人も作ってたけど自分が欲しい情報引っ張ってくる機能が無かったので自力で実装してる.}
|
14
|
+
spec.homepage = "https://github.toshiemon18/syoboemon"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_runtime_dependency "happymapper"
|
30
|
+
spec.add_runtime_dependency "faraday", "~> 0.9.1"
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec"
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: syoboemon
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- toshiemon18
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: happymapper
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.9.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.9.1
|
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.9'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.9'
|
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: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: しょぼいカレンダーのAPIラッパッパ. 他の人も作ってたけど自分が欲しい情報引っ張ってくる機能が無かったので自力で実装してる.
|
84
|
+
email:
|
85
|
+
- st12318@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
|
+
- lib/syoboemon.rb
|
99
|
+
- lib/syoboemon/api_connector.rb
|
100
|
+
- lib/syoboemon/api_responce_parser/api_response_parser.rb
|
101
|
+
- lib/syoboemon/client.rb
|
102
|
+
- lib/syoboemon/program_infomation_accessor/program_detail_search.rb
|
103
|
+
- lib/syoboemon/program_infomation_accessor/todays_programs.rb
|
104
|
+
- lib/syoboemon/query_generator/program_detail_search.rb
|
105
|
+
- lib/syoboemon/query_generator/todays_programs.rb
|
106
|
+
- lib/syoboemon/version.rb
|
107
|
+
- syoboemon.gemspec
|
108
|
+
homepage: https://github.toshiemon18/syoboemon
|
109
|
+
licenses:
|
110
|
+
- MIT
|
111
|
+
metadata: {}
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements: []
|
127
|
+
rubyforge_project:
|
128
|
+
rubygems_version: 2.4.8
|
129
|
+
signing_key:
|
130
|
+
specification_version: 4
|
131
|
+
summary: shoboi calendar API wrapper.
|
132
|
+
test_files: []
|