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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9b7016cb2d5a38ddbecfcd39bc77a85e3f713af
4
- data.tar.gz: 23d2e08cad3efd92868a24d067339a818e56b01b
3
+ metadata.gz: aefcc072deca612a470922579862aaf668c3c90d
4
+ data.tar.gz: 6d14f71750fe13b397c2c6217bad949cbdad011d
5
5
  SHA512:
6
- metadata.gz: 633c9e2e31875905d5349da8867d86fc294bc07a691c0019f6093a8c6d2b42ea61d838536eb32b648852a33edcf958328d0e44ed91a2963ac6a1227a7fa60ded
7
- data.tar.gz: d48ffc21ac1c15dd7bf0b65c43420bd2d1a6c10bc244ab70225bda9c653803e9af3972351f3e93b51d4f6b473e8e7a4e5149f83fa30707e004d2ae2ab418784e
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 :ak, :sk, :version, :debug
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
@@ -1,5 +1,5 @@
1
1
  module BaiduApi
2
2
  module Geocoding
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  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.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-06 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler