otokonoramen500yen 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ === 0.0.3 2011-04-28
2
+
3
+ * return mail magazine url
4
+
1
5
  === 0.0.1 2011-04-27
2
6
 
3
7
  * created
@@ -6,17 +6,19 @@
6
6
 
7
7
  男のらーめん500円の営業状態を取得する
8
8
 
9
- == SYNOPSIS:
9
+ == INSTALL:
10
10
 
11
- % require 'otokonoramen500yen'
12
- % o = Otokonoramen500yen.get
13
- % puts o.date
14
- % puts o.body
11
+ * gem install otokonoramen500yen
15
12
 
16
13
 
17
- == INSTALL:
14
+ == SYNOPSIS:
15
+
16
+ require 'otokonoramen500yen'
17
+ o = Otokonoramen500yen.get
18
+ puts o.date
19
+ puts o.body
20
+ puts o.url
18
21
 
19
- * gem install otokonoramen500yen
20
22
 
21
23
  == LICENSE:
22
24
 
@@ -7,4 +7,4 @@ require 'otokonoramen500yen'
7
7
  o = Otokonoramen500yen.get
8
8
  puts "#{o.date} 発行"
9
9
  puts o.body
10
-
10
+ puts o.url
@@ -4,10 +4,14 @@ require 'open-uri'
4
4
  require 'kconv'
5
5
 
6
6
  module Otokonoramen500yen
7
- VERSION = '0.0.1'
7
+ VERSION = '0.0.3'
8
+
9
+ def Otokonoramen500yen.url
10
+ 'http://bn.merumo.ne.jp/backno/latestView.do?magId=00589575'
11
+ end
8
12
 
9
13
  def Otokonoramen500yen.get
10
- page = open('http://bn.merumo.ne.jp/backno/latestView.do?magId=00589575').read.toutf8
14
+ page = open(url).read.toutf8
11
15
  doc = Hpricot(page)
12
16
  body = doc.search('//div[@class="bn_content_text"]').inner_text
13
17
  date = doc.search('//div[@class="bn_head"]').inner_text
@@ -16,14 +20,15 @@ module Otokonoramen500yen
16
20
  date.scan(/(\d+)日/).first.first,
17
21
  date.scan(/(\d+)時/).first.first,
18
22
  date.scan(/(\d+)分/).first.first)
19
- Response.new(body,date)
23
+ Response.new(body,date,url)
20
24
  end
21
25
 
22
26
  class Otokonoramen500yen::Response
23
- attr_reader :body, :date
24
- def initialize(body,date)
27
+ attr_reader :body, :date, :url
28
+ def initialize(body,date,url)
25
29
  @body = body
26
30
  @date = date
31
+ @url = url
27
32
  end
28
33
  end
29
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otokonoramen500yen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sho Hashimoto
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-27 00:00:00 +09:00
19
- default_executable:
18
+ date: 2011-04-27 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: hpricot
@@ -74,7 +73,6 @@ files:
74
73
  - test/test_otokonoramen500yen.rb
75
74
  - bin/otokonoramen500yen
76
75
  - .gemtest
77
- has_rdoc: true
78
76
  homepage: http://github.com/shokai/ruby-otokonoramen500yen
79
77
  licenses: []
80
78
 
@@ -105,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
103
  requirements: []
106
104
 
107
105
  rubyforge_project: otokonoramen500yen
108
- rubygems_version: 1.6.2
106
+ rubygems_version: 1.7.2
109
107
  signing_key:
110
108
  specification_version: 3
111
109
  summary: !binary |