doko 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
18
18
  gem.homepage = "http://github.com/sawamur/doko"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{Japanese address retriever}
21
- gem.description = %Q{Japanese address retriever}
21
+ gem.description = %Q{retrieve japanese address line from a web page or a string}
22
22
  gem.email = "masaki.sw@gmail.com"
23
23
  gem.authors = ["Masaki Sawamura"]
24
24
  # dependencies defined in Gemfile
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "doko"
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Masaki Sawamura"]
12
12
  s.date = "2012-06-11"
13
- s.description = "Japanese address retriever"
13
+ s.description = "retrieve japanese address line from a web page or a string"
14
14
  s.email = "masaki.sw@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
@@ -34,7 +34,7 @@ class Doko
34
34
  clean(m[0])
35
35
  }
36
36
  if addrs.empty?
37
- addrs = body.scan(/([^\s]{1,6}(市|区).{2,8}(区|町|村)[^\s,()]{2,10}\d)/).map{ |m|
37
+ addrs = body.scan(/([^\s]{1,6}(市|区).{1,8}(区|町|村)[^\s,()]{2,10}\d)/).map{ |m|
38
38
  clean(m[0])
39
39
  }
40
40
  end
@@ -1,4 +1,4 @@
1
-
1
+ source :gemcutter
2
2
 
3
3
  gem 'sinatra'
4
4
  gem 'doko'
@@ -1,8 +1,9 @@
1
1
  GEM
2
+ remote: http://rubygems.org/
2
3
  specs:
3
- doko (0.1.1)
4
+ doko (0.1.7)
4
5
  nokogiri
5
- nokogiri (1.5.2)
6
+ nokogiri (1.5.3)
6
7
  rack (1.3.6)
7
8
  rack-protection (1.2.0)
8
9
  rack
@@ -38,15 +38,17 @@
38
38
  </p>
39
39
  </form>
40
40
 
41
- <p>
41
+
42
42
  <% if @addrs %>
43
- <ul>
44
- <% @addrs.each do |a| %>
45
- <li><%=a %></li>
46
- <% end %>
47
- </ul>
48
- <% end %>
43
+ <p style="border-top:1px solid gray">
44
+ addresses in <a href="<%=@url %>"><%=@url %></a> are:
45
+ <ul>
46
+ <% @addrs.each do |a| %>
47
+ <li><%=a %></li>
48
+ <% end %>
49
+ </ul>
49
50
  </p>
51
+ <% end %>
50
52
 
51
53
  </body>
52
54
  </html>
@@ -4,6 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
4
4
  require 'open-uri'
5
5
 
6
6
  describe "Doko" do
7
+
7
8
  it "should retrieve address from string" do
8
9
  Doko.parse("ここは\n東京都港区芝浦3-4-1\nです").first.should == "東京都港区芝浦3-4-1"
9
10
  end
@@ -54,4 +55,9 @@ describe "Doko" do
54
55
  page = open("http://www.nttr.co.jp/corporate_profile/index.htm").read.encode("utf-8")
55
56
  Doko.parse(page).first.should == "東京都港区芝浦3-4-1 グランパークタワー"
56
57
  end
58
+
59
+ it do
60
+ Doko.parse("http://www.stadium2002.com/stadium/index.php").first.should == "さいたま市緑区中野田500"
61
+ end
62
+
57
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doko
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -107,7 +107,7 @@ dependencies:
107
107
  - - ! '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
- description: Japanese address retriever
110
+ description: retrieve japanese address line from a web page or a string
111
111
  email: masaki.sw@gmail.com
112
112
  executables: []
113
113
  extensions: []
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: 4235072000421726462
149
+ hash: 3221838572154724490
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements: