tamagoya 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61ef5c85ecc435af482b9c15b5ec85aa2dd75d3f
4
- data.tar.gz: 97ab866feccdfc2be5e81acd04ecbcfe70e79202
3
+ metadata.gz: 3bb2d7d88371e1175edf933ce04a41b5322781bc
4
+ data.tar.gz: 235c8e1a2f310c475722499daf15f83941e5821f
5
5
  SHA512:
6
- metadata.gz: 2c463790294d318b98af95a0dd5102e35cc415d7c14e409f55b981e17f473f19ca815faa78f2b9dcb0ca7595b507cc4c1b527d2017462858f36276d6be2664bd
7
- data.tar.gz: a4a4e7502625aaee05e6ba8eefa129fe888d065f0131c4ec100080322e5a45553a1256791e2347f0d0845c944a09b891a15fcd9954af2654fe422e1dbdf2b4fa
6
+ metadata.gz: e10058811f9553163b8bceb0ea8437cd4ead9a6cb28feda60a2416e81100a119d9bef6517362c62587937df966e971a9d809bfe058ccce729344519ba4c0c560
7
+ data.tar.gz: 7c6ec4fc37cc85f2df53c54e7a7fbd346824c0ccfff63479779ef939c369d762f2e99b86f25c732d01520895ad27233f134ace3a6729e7556470430afc057790
data/exe/tamagoya CHANGED
@@ -1,3 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "tamagoya"
4
+
5
+ Tamagoya::CLI.start
data/lib/tamagoya/cli.rb CHANGED
@@ -5,7 +5,7 @@ require 'nokogiri'
5
5
  require 'thor'
6
6
  require 'active_support'
7
7
 
8
- module tamagoya
8
+ module Tamagoya
9
9
  class CLI < Thor
10
10
  default_command :menu
11
11
  ROOT_URL = "http://www.tamagoyaya.co.jp/menu.html"
@@ -53,43 +53,6 @@ module tamagoya
53
53
  say(msg)
54
54
 
55
55
  end
56
-
57
- # #実行
58
- # desc "menu [day]", "get tamagoya menu"
59
- # def menu(day = nil)
60
- # if day.nil?
61
- # day = Time.now.strftime("%H").to_i > BORDER_TIME ? (Date.today+1).strftime("%d").to_i : Date.today.strftime("%d").to_i
62
- # else
63
- # raise '引数には1 ~ 31で入力してくfださい' unless day.to_i >= 1 && day.to_i <= 31
64
- # end
65
-
66
- # html = open(ROOT_URL) do |f|
67
- # f.read
68
- # end
69
-
70
- # doc = Nokogiri::HTML.parse(html, nil, 'utf-8')
71
- # #メニューのリストを取得する
72
- # doc.xpath('//div[@id="latestnews_txt"]/div[@class="menu_title"]').each do |node|
73
-
74
- # check_day = get_day(node.xpath('./p').inner_text)
75
- # #指定の日付ではない場合はスキップ
76
- # if day != check_day
77
- # next
78
- # end
79
-
80
- # node.xpath('./following-sibling::div[@class="menu_list"][1]/ul//li').each do |menu|
81
- # say(menu.inner_text)
82
- # end
83
-
84
- # end
85
- # end
86
-
87
- #日付の文字列から日付だけを取り出す
88
- private
89
- def get_day(str)
90
- day = str.match(/^(\d+)日/)[1]
91
- return day.nil? ? nil : day.to_i
92
- end
93
56
 
94
57
  end
95
58
  end
@@ -1,3 +1,3 @@
1
1
  module Tamagoya
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/tamagoya.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
24
  spec.bindir = "exe"
25
- spec.executables = ['tamagoya']
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
27
 
28
28
  spec.add_development_dependency "bundler", "~> 1.10"
@@ -33,3 +33,4 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency "nokogiri"
34
34
  spec.add_dependency "activesupport"
35
35
  end
36
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tamagoya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - h,yusaku