wialon_api 0.0.7 → 0.0.8

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: d72ca701951b4320cfe86fe0fb0096b7bb16b4d0
4
- data.tar.gz: a0849a823b9c6f61769f055e1452c6719682cec9
3
+ metadata.gz: c1c77b56d333e322f7e29a2ca88e49bd1326bfe6
4
+ data.tar.gz: f01911f1f8926db4953650ed096a7c3e6c27e485
5
5
  SHA512:
6
- metadata.gz: cba1431f43dba8f078cd0d93ca7c9e8ba5cd7cff19ccfa39d3afe8e009f3b92ff05fd3a93115713a83be388fa5496588dfc75b3fb2283fc61fd136a2d67df4d8
7
- data.tar.gz: 3db5f7898de551d781baf8f90e54b665db82bc0759838c3de6563e3068f91536d19496bb5037f973e2cf915fc89eecd8e2343695d50f5c3f1361de386ae6480e
6
+ metadata.gz: bc5ed7599e55e9084449a6273b9d1367edd0401a6a7f2143b0453d95d15337b0be8f5fa5195dee54094a85d4060633f16bd054a92343ca1e66a86b53bbd6d4a5
7
+ data.tar.gz: 355a818d205859a5cbcb05c3c88a173cb0ad3b78b6048c5c025c40aff0e97b8f4c55543c8c35d9ae853e4697b137f248118a34fb52529f311ecf3a1f25de3811
@@ -3,7 +3,7 @@ module WialonApi
3
3
  def authorize(user, password)
4
4
  response = WialonApi::Api.call('core/login', user: user, password: password)
5
5
  result = WialonApi::Result.process(response)
6
- WialonApi::Client.new(result.send(WialonApi.wialon_client_session_identifier))
6
+ WialonApi::Client.new(result.send(WialonApi.wialon_client_session_identifier), result)
7
7
  end
8
8
  end
9
9
  end
@@ -2,10 +2,11 @@ module WialonApi
2
2
  class Client
3
3
  include WialonApi::Resolver
4
4
 
5
- attr_reader :sid
5
+ attr_reader :sid, :info
6
6
 
7
- def initialize(sid = nil)
7
+ def initialize(sid = nil, info = {})
8
8
  @sid = sid
9
+ @info = info
9
10
  end
10
11
 
11
12
  def authorized?
@@ -1,3 +1,3 @@
1
1
  module WialonApi
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -8,7 +8,7 @@ describe WialonApi::Authorization do
8
8
 
9
9
  it 'bulds a WialonApi client if the credentials are correct' do
10
10
  allow(WialonApi::Api).to receive(:call).and_return(success)
11
- expect(WialonApi::Client).to receive(:new).with('sid')
11
+ expect(WialonApi::Client).to receive(:new).with('sid', success)
12
12
  WialonApi.authorize(*credentials)
13
13
  end
14
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wialon_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arsen Shamkhalov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-12 00:00:00.000000000 Z
11
+ date: 2015-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake