megam_api 1.5.9 → 1.6.0

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: 06899229342d8d201a87fd29469b84a1490d53e7
4
- data.tar.gz: 76e30f8bec8a6af9008168a87261de70560a6e8e
3
+ metadata.gz: e9272144bb2e11ff50910168ae5685df376466be
4
+ data.tar.gz: 8d10c163b9d7dd5b0d8f4c9ea6baf66f2e01e184
5
5
  SHA512:
6
- metadata.gz: 59d7626726d0dca0503d6be15dbd673068e6be3a8ea0d1d0313100f843155a76eeecf4d48da2dac9a07b41ad20cc54145e2e7f40fd5b7a3f2e62c9012e908e89
7
- data.tar.gz: 39fcab572073029e813f05a176db76ba488dcb5fdd2a3501454972b6b4c67b1a6504ba8a8f3c33a4f86c8144e8e2608913668533fcd7c51bce510718b3b1658c
6
+ metadata.gz: cdbbbf7b1f5b681e7a9a37bc4c2e42fe750315e34ed876f916779390543f7ccdba09968abbbfdc60107af940c61708b395504f1486f24bec41084058d901f74e
7
+ data.tar.gz: db6da65b65981cd5b421d16a4f9a644e53bdaf6efcf249b1694e23581fd4c170072b584592fca6ae14215b1a707d23375cd24b2a6bd223e9487bef943a3361f5
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "1.5.9"
3
+ VERSION = "1.6.0"
4
4
  end
5
5
  end
@@ -10,6 +10,7 @@ module Megam
10
10
  @inputs = []
11
11
  @outputs = []
12
12
  @status = nil
13
+ @state = nil
13
14
  @created_at = nil
14
15
 
15
16
  super(o)
@@ -91,6 +92,14 @@ module Megam
91
92
  end
92
93
  end
93
94
 
95
+ def state(arg = nil)
96
+ if !arg.nil?
97
+ @state = arg
98
+ else
99
+ @state
100
+ end
101
+ end
102
+
94
103
  def created_at(arg = nil)
95
104
  if !arg.nil?
96
105
  @created_at = arg
@@ -116,6 +125,7 @@ module Megam
116
125
  index_hash['inputs'] = inputs
117
126
  index_hash['outputs'] = outputs
118
127
  index_hash['status'] = status
128
+ index_hash['state'] = state
119
129
  index_hash['created_at'] = created_at
120
130
  index_hash
121
131
  end
@@ -136,6 +146,7 @@ module Megam
136
146
  'inputs' => inputs,
137
147
  'outputs' => outputs,
138
148
  'status' => status,
149
+ 'state' => state,
139
150
  'created_at' => created_at
140
151
  }
141
152
 
@@ -153,6 +164,7 @@ module Megam
153
164
  asm.inputs(o['inputs']) if o.key?('inputs')
154
165
  asm.outputs(o['outputs']) if o.key?('outputs')
155
166
  asm.status(o['status']) if o.key?('status')
167
+ asm.state(o['state']) if o.key?('state')
156
168
  asm.created_at(o['created_at']) if o.key?('created_at')
157
169
  asm
158
170
  end
@@ -173,6 +185,7 @@ module Megam
173
185
  @inputs = o['inputs'] if o.key?('inputs')
174
186
  @outputs = o['outputs'] if o.key?('outputs')
175
187
  @status = o['status'] if o.key?('status')
188
+ @state = o['state'] if o.key?('state')
176
189
  @created_at = o['created_at'] if o.key?('created_at')
177
190
  self
178
191
  end
@@ -14,6 +14,7 @@ module Megam
14
14
  @related_components = []
15
15
  @operations = []
16
16
  @status = nil
17
+ @state = nil
17
18
  @repo = {}
18
19
  @rtype = nil
19
20
  @source = nil
@@ -132,6 +133,14 @@ module Megam
132
133
  end
133
134
  end
134
135
 
136
+ def state(arg = nil)
137
+ if !arg.nil?
138
+ @state = arg
139
+ else
140
+ @state
141
+ end
142
+ end
143
+
135
144
  def repo(arg = nil)
136
145
  if !arg.nil?
137
146
  @repo = arg
@@ -198,6 +207,7 @@ module Megam
198
207
  index_hash['related_components'] = related_components
199
208
  index_hash['operations'] = operations
200
209
  index_hash['status'] = status
210
+ index_hash['state'] = state
201
211
  index_hash['repo'] = repo
202
212
  index_hash['created_at'] = created_at
203
213
  index_hash
@@ -221,6 +231,7 @@ module Megam
221
231
  'related_components' => related_components,
222
232
  'operations' => operations,
223
233
  'status' => status,
234
+ 'state' => state,
224
235
  'repo' => repo,
225
236
  'created_at' => created_at
226
237
  }
@@ -243,6 +254,7 @@ module Megam
243
254
  asm.related_components(o['related_components']) if o.key?('related_components')
244
255
  asm.operations(o['operations']) if o.key?('operations')
245
256
  asm.status(o['status']) if o.key?('status')
257
+ asm.state(o['state']) if o.key?('state')
246
258
 
247
259
  ro = o['repo']
248
260
  asm.repo[:rtype] = ro['rtype'] if ro && ro.key?('rtype')
@@ -270,6 +282,7 @@ module Megam
270
282
  @related_components = o['related_components'] if o.key?('related_components')
271
283
  @operations = o['operations'] if o.key?('operations')
272
284
  @status = o['status'] if o.key?('status')
285
+ @state = o['state'] if o.key?('state')
273
286
  @repo = o['repo'] if o.key?('repo')
274
287
  @created_at = o['created_at'] if o.key?('created_at')
275
288
  self
@@ -165,7 +165,7 @@ module Megam
165
165
 
166
166
  # Load a account by email_p
167
167
  def self.show(o)
168
- evt = from_hash(o)
168
+ evt = from_hash(o)
169
169
  evt.megam_rest.get_eventsvm(o[:limit], evt.from_hash(o).for_json)
170
170
  end
171
171
 
@@ -152,7 +152,7 @@ module Megam
152
152
  # Load a account by email_p
153
153
  def self.show(o)
154
154
  sps = self.new(o)
155
- sps.megam_rest.get_snapshots(o[:asm_id])
155
+ sps.megam_rest.get_snapshots(o[:id])
156
156
  end
157
157
 
158
158
  def self.list(params)
@@ -29,6 +29,7 @@ class TestApps < MiniTest::Unit::TestCase
29
29
  "outputs"=>[],
30
30
  "policies"=>[],
31
31
  "status"=>"error",
32
+ "state"=>"error",
32
33
  "created_at"=>"2016-02-02 07:50:49 +0000",
33
34
  "components"=>[
34
35
  {
@@ -65,7 +66,8 @@ class TestApps < MiniTest::Unit::TestCase
65
66
  {"key"=>"token","value"=>"066b697558f048459412410483ca8965415bf7de"},
66
67
  {"key"=>"username","value"=>"rajthilakmca"}],
67
68
  "status"=>"notbound"}],
68
- "status"=>"error"}]}],
69
+ "status"=>"error",
70
+ "state"=>"error"}]}],
69
71
  "inputs"=>[
70
72
  {"key"=>"domain","value"=>"megambox.com"},
71
73
  {"key"=>"sshkey","value"=>"a@b.com_rtr"},
@@ -26,6 +26,7 @@ class TestApps < MiniTest::Unit::TestCase
26
26
  "inputs" => [],
27
27
  "output" => [],
28
28
  "status" => "Launching",
29
+ "state" => "Launching",
29
30
  "created_at" => "2015-10-12 13:24:06 +0000"
30
31
  }
31
32
  response = megams.update_assembly(tmp_hash)
@@ -2,6 +2,7 @@ require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
2
2
 
3
3
  class TestApps < MiniTest::Unit::TestCase
4
4
  def test_post_billingtransactions
5
+ =begin
5
6
  tmp_hash = { :accounts_id => "5555555",
6
7
  :gateway => "paypal",
7
8
  :amountin => "5",
@@ -11,6 +12,17 @@ class TestApps < MiniTest::Unit::TestCase
11
12
  :trandate => "31/21/2012",
12
13
  :currency_type => "USD"
13
14
  }
15
+ =end
16
+ tmp_hash = {
17
+ :gateway => "paypal",
18
+ :amountin => "5",
19
+ :amountout => "5.99",
20
+ :fees => "0.99",
21
+ :tranid => "HGrH111",
22
+ :trandate => "2016-08-24 12:23",
23
+ :currency_type => "USD"
24
+ }
25
+
14
26
 
15
27
  response = megams.post_billingtransactions(tmp_hash)
16
28
  assert_equal(201, response.status)
@@ -32,6 +32,7 @@ class TestApps < MiniTest::Unit::TestCase
32
32
  "rtype" => "image", "source" => "github", "oneclick" => "yes", "url" => "imagename"},
33
33
 
34
34
  "status" => "",
35
+ "state" => "",
35
36
  "created_at" => "2014-10-29 14:06:39 +0000"
36
37
  }
37
38
  response = megams.update_component(tmp_hash)
@@ -7,7 +7,8 @@ require 'time'
7
7
 
8
8
  SANDBOX_HOST_OPTIONS = {
9
9
  :scheme => 'http',
10
- :host => 'localhost',
10
+ #:host => 'localhost',
11
+ :host => 'cloud.det.io',
11
12
  :nonblock => false,
12
13
  :port => 9000
13
14
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.9
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Rajesh Rajagopalan, Thomas Alrin,
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-31 00:00:00.000000000 Z
12
+ date: 2016-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon