td-client 0.8.34 → 0.8.35
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -0
- data/lib/td/client.rb +2 -2
- data/lib/td/client/#cd# +1 -0
- data/lib/td/client/api.rb +2 -1
- data/lib/td/client/model.rb +3 -2
- data/lib/td/client/version.rb +1 -1
- metadata +4 -3
data/ChangeLog
CHANGED
data/lib/td/client.rb
CHANGED
@@ -43,8 +43,8 @@ class Client
|
|
43
43
|
|
44
44
|
# => Account
|
45
45
|
def account
|
46
|
-
plan, storage, guaranteed_cores, maximum_cores = @api.show_account
|
47
|
-
return Account.new(self, plan, storage, guaranteed_cores, maximum_cores)
|
46
|
+
account_id, plan, storage, guaranteed_cores, maximum_cores = @api.show_account
|
47
|
+
return Account.new(self, account_id, plan, storage, guaranteed_cores, maximum_cores)
|
48
48
|
end
|
49
49
|
|
50
50
|
def core_utilization(from, to)
|
data/lib/td/client/#cd#
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
cd rep
|
data/lib/td/client/api.rb
CHANGED
@@ -157,11 +157,12 @@ class API
|
|
157
157
|
end
|
158
158
|
js = checked_json(body, %w[account])
|
159
159
|
a = js["account"]
|
160
|
+
account_id = a['id'].to_i
|
160
161
|
plan = a['plan'].to_i
|
161
162
|
storage_size = a['storage_size'].to_i
|
162
163
|
guaranteed_cores = a['guaranteed_cores'].to_i
|
163
164
|
maximum_cores = a['maximum_cores'].to_i
|
164
|
-
return [plan, storage_size, guaranteed_cores, maximum_cores]
|
165
|
+
return [account_id, plan, storage_size, guaranteed_cores, maximum_cores]
|
165
166
|
end
|
166
167
|
|
167
168
|
def account_core_utilization(from, to)
|
data/lib/td/client/model.rb
CHANGED
@@ -11,15 +11,16 @@ class Model
|
|
11
11
|
end
|
12
12
|
|
13
13
|
class Account < Model
|
14
|
-
def initialize(client, plan, storage_size=nil, guaranteed_cores=nil, maximum_cores=nil)
|
14
|
+
def initialize(client, account_id, plan, storage_size=nil, guaranteed_cores=nil, maximum_cores=nil)
|
15
15
|
super(client)
|
16
|
+
@account_id = account_id
|
16
17
|
@plan = plan
|
17
18
|
@storage_size = storage_size
|
18
19
|
@guaranteed_cores = guaranteed_cores
|
19
20
|
@maximum_cores = maximum_cores
|
20
21
|
end
|
21
22
|
|
22
|
-
attr_reader :plan, :storage_size, :guaranteed_cores, :maximum_cores
|
23
|
+
attr_reader :account_id, :plan, :storage_size, :guaranteed_cores, :maximum_cores
|
23
24
|
|
24
25
|
def storage_size_string
|
25
26
|
if @storage_size <= 1024*1024
|
data/lib/td/client/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.35
|
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-10-
|
12
|
+
date: 2012-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- data/ca-bundle.crt
|
71
71
|
- lib/td-client.rb
|
72
72
|
- lib/td/client.rb
|
73
|
+
- lib/td/client/#cd#
|
73
74
|
- lib/td/client/api.rb
|
74
75
|
- lib/td/client/compat_gzip_reader.rb
|
75
76
|
- lib/td/client/model.rb
|
@@ -98,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
99
|
version: '0'
|
99
100
|
requirements: []
|
100
101
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.8.
|
102
|
+
rubygems_version: 1.8.24
|
102
103
|
signing_key:
|
103
104
|
specification_version: 3
|
104
105
|
summary: Treasure Data API library for Ruby
|