doko 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -17,6 +17,10 @@ p addrs #=> ["神奈川県横浜市中区.."]
17
17
  "doko?" means "where?" in japanese.
18
18
 
19
19
 
20
+ ## Demo
21
+
22
+ http://doko.tamac.io
23
+
20
24
  ## Install
21
25
 
22
26
  ```
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/doko.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "doko"
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
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
- s.date = "2012-06-08"
12
+ s.date = "2012-06-11"
13
13
  s.description = "Japanese address retriever"
14
14
  s.email = "masaki.sw@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -27,6 +27,10 @@ Gem::Specification.new do |s|
27
27
  "VERSION",
28
28
  "doko.gemspec",
29
29
  "lib/doko.rb",
30
+ "sample/Gemfile",
31
+ "sample/Gemfile.lock",
32
+ "sample/app.rb",
33
+ "sample/views/index.erb",
30
34
  "spec/doko_spec.rb",
31
35
  "spec/spec_helper.rb"
32
36
  ]
data/sample/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+
2
+
3
+ gem 'sinatra'
4
+ gem 'doko'
@@ -0,0 +1,20 @@
1
+ GEM
2
+ specs:
3
+ doko (0.1.1)
4
+ nokogiri
5
+ nokogiri (1.5.2)
6
+ rack (1.3.6)
7
+ rack-protection (1.2.0)
8
+ rack
9
+ sinatra (1.3.2)
10
+ rack (~> 1.3, >= 1.3.6)
11
+ rack-protection (~> 1.2)
12
+ tilt (~> 1.3, >= 1.3.3)
13
+ tilt (1.3.3)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ doko
20
+ sinatra
data/sample/app.rb ADDED
@@ -0,0 +1,14 @@
1
+
2
+ require 'sinatra'
3
+ require 'doko'
4
+
5
+ get '/' do
6
+ @url = "http://r.tabelog.com/tokyo/A1314/A131402/13007204/"
7
+ erb :index
8
+ end
9
+
10
+ post '/' do
11
+ @url = params[:url]
12
+ @addrs = Doko.parse(@url)
13
+ erb :index
14
+ end
@@ -0,0 +1,53 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>doko - japanese address retriever </title>
5
+ <style type="text/css">
6
+ body {
7
+ font-family: helvetica,sans-serif;
8
+ width: 800px;
9
+ margin: 0 auto;
10
+
11
+ }
12
+ p {
13
+ font-size: 18px;
14
+ line-height: 20px;
15
+ }
16
+ h1 {
17
+ font-size: 100px;
18
+ margin: 10px 0;
19
+ }
20
+ h2 {
21
+ padding: 0;
22
+ margin: 10px 0;
23
+ }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <a href="https://github.com/sawamur/doko"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
28
+ <h1>Doko</h1>
29
+ <p>
30
+ Japanese address retriever. <a href="https://github.com/sawamur/doko">github</a> <br>
31
+ </p>
32
+
33
+ <form action="/" method="post">
34
+ <h2>demo</h2>
35
+ retrieve address line from a web page.
36
+ <p>
37
+ URL:<input type="text" size="60" name="url" value="<%=@url %>" placeholder=""><input type="submit" value="GO">
38
+ </p>
39
+ </form>
40
+
41
+ <p>
42
+ <% if @addrs %>
43
+ <ul>
44
+ <% @addrs.each do |a| %>
45
+ <li><%=a %></li>
46
+ <% end %>
47
+ </ul>
48
+ <% end %>
49
+ </p>
50
+
51
+ </body>
52
+ </html>
53
+
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.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -125,6 +125,10 @@ files:
125
125
  - VERSION
126
126
  - doko.gemspec
127
127
  - lib/doko.rb
128
+ - sample/Gemfile
129
+ - sample/Gemfile.lock
130
+ - sample/app.rb
131
+ - sample/views/index.erb
128
132
  - spec/doko_spec.rb
129
133
  - spec/spec_helper.rb
130
134
  homepage: http://github.com/sawamur/doko
@@ -142,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
146
  version: '0'
143
147
  segments:
144
148
  - 0
145
- hash: -3009257720424564000
149
+ hash: 3862698864711078623
146
150
  required_rubygems_version: !ruby/object:Gem::Requirement
147
151
  none: false
148
152
  requirements: