megam_api 1.5.9 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/assembly.rb +13 -0
- data/lib/megam/core/components.rb +13 -0
- data/lib/megam/core/eventsvm.rb +1 -1
- data/lib/megam/core/snapshots.rb +1 -1
- data/test/test_assemblies.rb +3 -1
- data/test/test_assembly.rb +1 -0
- data/test/test_billingtranscations.rb +12 -0
- data/test/test_components.rb +1 -0
- data/test/test_helper.rb +2 -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: e9272144bb2e11ff50910168ae5685df376466be
|
4
|
+
data.tar.gz: 8d10c163b9d7dd5b0d8f4c9ea6baf66f2e01e184
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdbbbf7b1f5b681e7a9a37bc4c2e42fe750315e34ed876f916779390543f7ccdba09968abbbfdc60107af940c61708b395504f1486f24bec41084058d901f74e
|
7
|
+
data.tar.gz: db6da65b65981cd5b421d16a4f9a644e53bdaf6efcf249b1694e23581fd4c170072b584592fca6ae14215b1a707d23375cd24b2a6bd223e9487bef943a3361f5
|
data/lib/megam/api/version.rb
CHANGED
data/lib/megam/core/assembly.rb
CHANGED
@@ -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
|
data/lib/megam/core/eventsvm.rb
CHANGED
data/lib/megam/core/snapshots.rb
CHANGED
data/test/test_assemblies.rb
CHANGED
@@ -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"},
|
data/test/test_assembly.rb
CHANGED
@@ -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)
|
data/test/test_components.rb
CHANGED
@@ -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)
|
data/test/test_helper.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|