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 +1 -1
- data/VERSION +1 -1
- data/doko.gemspec +2 -2
- data/lib/doko.rb +1 -1
- data/sample/Gemfile +1 -1
- data/sample/Gemfile.lock +3 -2
- data/sample/views/index.erb +9 -7
- data/spec/doko_spec.rb +6 -0
- metadata +3 -3
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{
|
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.
|
1
|
+
0.1.8
|
data/doko.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "doko"
|
8
|
-
s.version = "0.1.
|
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 = "
|
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",
|
data/lib/doko.rb
CHANGED
data/sample/Gemfile
CHANGED
data/sample/Gemfile.lock
CHANGED
data/sample/views/index.erb
CHANGED
@@ -38,15 +38,17 @@
|
|
38
38
|
</p>
|
39
39
|
</form>
|
40
40
|
|
41
|
-
|
41
|
+
|
42
42
|
<% if @addrs %>
|
43
|
-
<
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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>
|
data/spec/doko_spec.rb
CHANGED
@@ -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.
|
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:
|
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:
|
149
|
+
hash: 3221838572154724490
|
150
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|