geong 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/lib/geong/server.rb +2 -4
- data/lib/geong/version.rb +1 -1
- data/thrift/geocoder.thrift +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd2a6f6fba8e3c0b4ab5333b68268339ef13340e
|
|
4
|
+
data.tar.gz: c2fb31d6837eec828bdee96cf2366107ce32fbb1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0dfdb9fa0c3afd32193d676d7fc4f3725a064013c48c70b603ec3032f303b3dce50700334bc2bf9e9dbeb6458bbe4f7880de41d9cba0c85c4baff7d6d80f863e
|
|
7
|
+
data.tar.gz: 952615c84e131758e60f7025edec53fa0be730f4fc3988ad40e596791db1c267e7f22824b3edb632a4743dbc0d2d53e7669f3265986522cb1d0edcac231086b9
|
data/README.md
CHANGED
|
@@ -30,8 +30,8 @@ Or install it yourself as:
|
|
|
30
30
|
client = Geong::Client.new(host: "127.0.0.1")
|
|
31
31
|
client.open
|
|
32
32
|
|
|
33
|
-
client.coordinates
|
|
34
|
-
|
|
33
|
+
client.coordinates("TokyoTower")
|
|
34
|
+
=> <Geong::Geocoder::Location latitude:35.6585805, longitude:139.7454329>
|
|
35
35
|
|
|
36
36
|
client.address("133.11.0.1")
|
|
37
37
|
=> "Tokyo, 13 , Japan"
|
|
@@ -39,8 +39,9 @@ Or install it yourself as:
|
|
|
39
39
|
## Configure
|
|
40
40
|
|
|
41
41
|
You can give the configuration script by using the -c option.
|
|
42
|
+
If you want to know the other command line options, please see the "geong_server --help".
|
|
42
43
|
|
|
43
|
-
$ geong_server -
|
|
44
|
+
$ geong_server -c config.rb -d
|
|
44
45
|
|
|
45
46
|
### Thrift Configuration
|
|
46
47
|
|
|
@@ -49,15 +50,17 @@ Configuration DSL supported following methods.
|
|
|
49
50
|
|
|
50
51
|
* logger(default: Logger.new(STDERR)) This option is available only if the default server.
|
|
51
52
|
* port(default: 9090) This option is available only if the default transport.
|
|
52
|
-
* num_threads(default: 20) This option is available only if the default transport.
|
|
53
53
|
* transport(default: Thrift::ServerSocket)
|
|
54
54
|
* transport_factory(default: Thrift::FramedTransportFactory)
|
|
55
55
|
* protocol_factory(default: nil)
|
|
56
56
|
* server(default: Thrift::NonblockingServer)
|
|
57
|
+
* num_threads(default: 20) This option is available only if the default server.
|
|
57
58
|
* processor(readOnly) create geong processor
|
|
58
59
|
|
|
59
60
|
### Example. Using ThinHTTPServer
|
|
60
61
|
|
|
62
|
+
server
|
|
63
|
+
|
|
61
64
|
# server(config.rb)
|
|
62
65
|
require "thrift/server/thin_http_server"
|
|
63
66
|
|
|
@@ -65,6 +68,7 @@ Configuration DSL supported following methods.
|
|
|
65
68
|
server Thrift::ThinHTTPServer.new(processor, {port: 8080})
|
|
66
69
|
end
|
|
67
70
|
|
|
71
|
+
client
|
|
68
72
|
|
|
69
73
|
# client
|
|
70
74
|
require "geong"
|
|
@@ -124,7 +128,7 @@ Please create a binding from below if you want to use other languages.
|
|
|
124
128
|
|
|
125
129
|
## Contributing
|
|
126
130
|
|
|
127
|
-
1. Fork it ( https://github.com/
|
|
131
|
+
1. Fork it ( https://github.com/yuki-teraoka/geong/fork )
|
|
128
132
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
129
133
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
130
134
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/geong/server.rb
CHANGED
|
@@ -8,11 +8,9 @@ module Geong
|
|
|
8
8
|
@@default_configuration = Configuration.new
|
|
9
9
|
|
|
10
10
|
def self.start(argv)
|
|
11
|
-
params = ARGV.getopts('',
|
|
11
|
+
params = ARGV.getopts('','daemon', 'config:')
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
config_filepath = params["config"] ? File.expand_path(params["config"]) : null
|
|
13
|
+
config_filepath = params["config"] ? File.expand_path(params["config"]) : nil
|
|
16
14
|
|
|
17
15
|
if config_filepath
|
|
18
16
|
@@default_configuration.logger.info "Load config file. #{config_filepath}"
|
data/lib/geong/version.rb
CHANGED
data/thrift/geocoder.thrift
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
namespace rb Geong.Geocoder
|
|
3
|
-
namespace java
|
|
4
|
-
namespace php
|
|
5
|
-
namespace py
|
|
3
|
+
namespace java geong.geocoder
|
|
4
|
+
namespace php geong.geocoder
|
|
5
|
+
namespace py geong_geocoder
|
|
6
6
|
namespace cpp Geong
|
|
7
7
|
|
|
8
8
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geong
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yuki teraoka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-11-
|
|
11
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: geocoder
|