baidu_api-geocoding 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/baidu_api/geocoding/configuration.rb +9 -1
- data/lib/baidu_api/geocoding/version.rb +1 -1
- 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: aefcc072deca612a470922579862aaf668c3c90d
|
4
|
+
data.tar.gz: 6d14f71750fe13b397c2c6217bad949cbdad011d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3927711178ac86188c4a043c7557f182f2c1bf2405dedb95d663d2b9667473ec2ec43094af81e55e0a487ac02c1c5e8edcef8052f6809d97ef29be3dd8094e5
|
7
|
+
data.tar.gz: e14c3611c558707e5527a74fc3b6d197ac622a4e043dedef052d310f88660015cd7f9cf887605d6cd75a033a899782c67a9de105fc9978cd27ae6c7e14c341d2
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module BaiduApi
|
2
2
|
module Geocoding
|
3
3
|
class Configuration
|
4
|
-
attr_accessor :
|
4
|
+
attr_accessor :version, :debug
|
5
|
+
attr_reader :ak, :sk
|
5
6
|
|
6
7
|
def initialize(options)
|
7
8
|
@ak = options.fetch(:ak){ options.fetch('ak') { fail ArgumentError, 'Missing argument :ak for configuration!' } }
|
@@ -14,6 +15,13 @@ module BaiduApi
|
|
14
15
|
respond_to?(key) ? send(key) : nil
|
15
16
|
end
|
16
17
|
|
18
|
+
def ak
|
19
|
+
@ak.is_a?(Proc) ? @ak.call : @ak
|
20
|
+
end
|
21
|
+
|
22
|
+
def sk
|
23
|
+
@sk.is_a?(Proc) ? @sk.call : @sk
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baidu_api-geocoding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaohui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|