megam_api 0.73 → 0.75

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.
@@ -1,32 +1,54 @@
1
1
  require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
2
2
 
3
3
  class TestApps < MiniTest::Unit::TestCase
4
+ =begin
5
+ def test_post_assembly
6
+ tmp_hash = { "name" => "calcines",
7
+ "components" => ["COM1139235178934304768",""],
8
+ "tosca_type" => "",
9
+ "policies" => [{
10
+ "name" => "bind policy",
11
+ "ptype" => "colocated",
12
+ "members" => ["calcines.megam.co/MattieGarcia","calcines.megam.co/parsnip"]
13
+ }],
14
+ "inputs" => [],
15
+ "output" => [],
16
+ "status" => "Launching",
17
+ "created_at" => "2015-10-12 13:24:06 +0000"
18
+
19
+ }
20
+
21
+ response = megams.post_assembly(tmp_hash)
22
+ assert_equal(201, response.status)
23
+ end
24
+ =end
25
+ #=begin
4
26
  def test_get_assembly
5
- response = megams.get_one_assembly("ASM1133747830209511424")
27
+ response = megams.get_one_assembly("ASM1265658284040388608")
6
28
  assert_equal(200, response.status)
7
29
  end
8
-
30
+ #=end
31
+ =begin
9
32
  def test_update_assembly
10
- tmp_hash = {
11
- "id" => "ASM1139235178976247808",
33
+ tmp_hash = {
34
+
35
+ "id" => "ASM1265630517177483264",
12
36
  "json_claz" => "Megam::Assembly",
13
37
  "name" => "calcines",
14
38
  "tosca_type" => "",
15
- "components" => ["COM1139235178934304768",""],
39
+ "components" => ["COM1265630517194260480",""],
16
40
  "policies" => [{
17
41
  "name" => "bind policy",
18
42
  "ptype" => "colocated",
19
43
  "members" => ["calcines.megam.co/MattieGarcia","calcines.megam.co/parsnip"]
20
44
  }],
21
45
  "inputs" => [],
22
- "operations" => [],
23
- "output" => [],
46
+ "output" => [],
24
47
  "status" => "Launching",
25
- "created_at" => "2014-10-29 13:24:06 +0000"
48
+ "created_at" => "2015-10-12 13:24:06 +0000"
26
49
  }
27
-
28
50
  response = megams.update_assembly(tmp_hash)
29
51
  assert_equal(201, response.status)
30
- end
31
-
52
+ end
53
+ =end
32
54
  end
@@ -1,7 +1,7 @@
1
1
  require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
2
2
 
3
3
  class TestApps < MiniTest::Unit::TestCase
4
- #=begin
4
+ =begin
5
5
  def test_post_billedhistories
6
6
  tmp_hash = { :accounts_id => "ACT1262792663065821184",
7
7
  :assembly_id => "ASM89687",
@@ -13,14 +13,14 @@ class TestApps < MiniTest::Unit::TestCase
13
13
  response = megams.post_billedhistories(tmp_hash)
14
14
  assert_equal(201, response.status)
15
15
  end
16
- #=end
16
+ =end
17
17
 
18
- =begin
18
+ #=begin
19
19
  def test_get_billedhistories
20
20
  response = megams.get_billedhistories
21
21
  assert_equal(200, response.status)
22
22
  end
23
- =end
23
+ #=end
24
24
  =begin
25
25
  def test_get_billedhistories
26
26
  response = megams.get_billedhistory("iaas_default")
@@ -2,15 +2,15 @@ require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
2
2
 
3
3
  class TestApps < MiniTest::Unit::TestCase
4
4
  def test_get_component
5
- response = megams.get_components("COM519839138036318208")
5
+ response = megams.get_components("COM1265658284082331648")
6
6
  assert_equal(200, response.status)
7
7
  end
8
-
8
+ =begin
9
9
  def test_update_component
10
10
  tmp_hash = {
11
11
  "id" => "COM1139245887592202240",
12
12
  "name" => "NettieMoore",
13
- "tosca_type" => "tosca.web.redis",
13
+ "tosca_type" => "tosca.web.redis",
14
14
  "inputs" => [],
15
15
  "outputs" => [],
16
16
  "artifacts" => {
@@ -26,5 +26,5 @@ class TestApps < MiniTest::Unit::TestCase
26
26
  response = megams.update_component(tmp_hash)
27
27
  assert_equal(201, response.status)
28
28
  end
29
-
30
- end
29
+ =end
30
+ end
data/test/test_helper.rb CHANGED
@@ -22,7 +22,7 @@ end
22
22
  def megams_new(options={})
23
23
  s_options = SANDBOX_HOST_OPTIONS.merge({
24
24
  :email => "rr@e.com",
25
- :api_key => "7DDsX3Nw6tFkOMHAM1Es8w=="
25
+ :api_key => "FwNcgem0_T8AkxpkW4sD-A=="
26
26
  })
27
27
  options = s_options.merge(options)
28
28
  mg=Megam::API.new(options)
@@ -69,7 +69,7 @@ def sandbox_name
69
69
  end
70
70
 
71
71
  def sandbox_apikey
72
- "7DDsX3Nw6tFkOMHAM1Es8w==" #{}"IamAtlas{74}NobdyCanSedfefdeME#07"
72
+ "FwNcgem0_T8AkxpkW4sD-A==" #{}"IamAtlas{74}NobdyCanSedfefdeME#07"
73
73
  end
74
74
 
75
75
  def sandbox_email
@@ -0,0 +1,31 @@
1
+ require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
2
+
3
+ class TestApps < MiniTest::Unit::TestCase
4
+ =begin
5
+ def test_post_invoices
6
+ tmp_hash = { :from_date => "2015-10-09",
7
+ :to_date => "2015-11-30",
8
+ :month => "oct",
9
+ :bill_type => "paypal",
10
+ :billing_amount => "45",
11
+ :currency_type => "USD"
12
+ }
13
+
14
+ response = megams.post_invoices(tmp_hash)
15
+ assert_equal(201, response.status)
16
+ end
17
+ =end
18
+
19
+ =begin
20
+ def test_get_invoices
21
+ response = megams.get_invoices
22
+ assert_equal(200, response.status)
23
+ end
24
+ =end
25
+ #=begin
26
+ def test_get_invoice
27
+ response = megams.get_invoice("INVS1264211919892512768")
28
+ assert_equal(200, response.status)
29
+ end
30
+ #=end
31
+ end
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: '0.73'
4
+ version: '0.75'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan,
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-05 00:00:00.000000000 Z
12
+ date: 2015-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon
@@ -109,7 +109,8 @@ dependencies:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: '10.4'
112
- description: Ruby Client for the Megam CMP. Performs REST calls to Megam Gateway - http://github.com/megamsys/megam_gateway.git
112
+ description: Ruby Client for the Megam cloud platform. Performs REST calls to Megam
113
+ Gateway - http://github.com/megamsys/megam_gateway.git
113
114
  email:
114
115
  - rajthilak@megam.io
115
116
  - nkishore@megam.io
@@ -146,6 +147,7 @@ files:
146
147
  - lib/megam/api/domains.rb
147
148
  - lib/megam/api/errors.rb
148
149
  - lib/megam/api/event.rb
150
+ - lib/megam/api/invoices.rb
149
151
  - lib/megam/api/login.rb
150
152
  - lib/megam/api/marketplace_addons.rb
151
153
  - lib/megam/api/marketplaces.rb
@@ -181,6 +183,8 @@ files:
181
183
  - lib/megam/core/domains.rb
182
184
  - lib/megam/core/error.rb
183
185
  - lib/megam/core/event.rb
186
+ - lib/megam/core/invoices.rb
187
+ - lib/megam/core/invoices_collection.rb
184
188
  - lib/megam/core/json_compat.rb
185
189
  - lib/megam/core/konipai.rb
186
190
  - lib/megam/core/log.rb
@@ -219,6 +223,7 @@ files:
219
223
  - test/test_domains.rb
220
224
  - test/test_event.rb
221
225
  - test/test_helper.rb
226
+ - test/test_invoices.rb
222
227
  - test/test_login.rb
223
228
  - test/test_logs.rb
224
229
  - test/test_marketplaceaddons.rb
@@ -269,6 +274,7 @@ test_files:
269
274
  - test/test_domains.rb
270
275
  - test/test_event.rb
271
276
  - test/test_helper.rb
277
+ - test/test_invoices.rb
272
278
  - test/test_login.rb
273
279
  - test/test_logs.rb
274
280
  - test/test_marketplaceaddons.rb