megam_api 0.20 → 0.21
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/organizations.rb +14 -2
- data/lib/megam/api/version.rb +1 -1
- data/test/test_domains.rb +2 -1
- data/test/test_helper.rb +1 -1
- data/test/test_organizations.rb +10 -4
- data/test/test_predefclouds.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: a1869e43196cec60b438c743b2ba52602bf7b258
|
4
|
+
data.tar.gz: 509605a3b5136da6f25d305aa51af4520ea681bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53f8d5e804b61e63bd9100165b02107248c6e8ab75a61a57e4610ec1405dfe1eaafb202120a505d5e24dc1e384b6a3ad92f953390087bb4c6ae84a397eb49d97
|
7
|
+
data.tar.gz: d9a4a7b826f29a09ac4264f321c0b527cc49141230d80ea5b403d1e08f5f5154c8c45108c59fa7d753120a591bc8e5cb7eb50b4e19e3865845dafcfe610691c1
|
@@ -1,7 +1,19 @@
|
|
1
1
|
module Megam
|
2
2
|
class API
|
3
3
|
|
4
|
-
def get_organizations
|
4
|
+
def get_organizations
|
5
|
+
|
6
|
+
@options = {:path => '/organizations',:body => ''}.merge(@options)
|
7
|
+
|
8
|
+
request(
|
9
|
+
:expects => 200,
|
10
|
+
:method => :get,
|
11
|
+
:body => @options[:body]
|
12
|
+
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_organization(name)
|
5
17
|
|
6
18
|
@options = {:path => "/organizations/#{name}",
|
7
19
|
:body => ''}.merge(@options)
|
@@ -14,7 +26,7 @@ def get_organizations(name)
|
|
14
26
|
end
|
15
27
|
|
16
28
|
|
17
|
-
def
|
29
|
+
def post_organization(new_organization)
|
18
30
|
|
19
31
|
@options = {:path => '/organizations/content',
|
20
32
|
:body => Megam::JSONCompat.to_json(new_organization)}.merge(@options)
|
data/lib/megam/api/version.rb
CHANGED
data/test/test_domains.rb
CHANGED
@@ -7,13 +7,14 @@ class TestDomains < MiniTest::Unit::TestCase
|
|
7
7
|
$tom_email = "tom@gomegam.com"
|
8
8
|
$bob_email = "bob@gomegam.com"
|
9
9
|
|
10
|
-
|
10
|
+
=begin
|
11
11
|
def test_get_domains_good
|
12
12
|
response =megams.get_domains(domain_name)
|
13
13
|
response.body.to_s
|
14
14
|
assert_equal(200, response.status)
|
15
15
|
end
|
16
16
|
|
17
|
+
=end
|
17
18
|
|
18
19
|
def test_post_domains_good
|
19
20
|
tmp_hash = {
|
data/test/test_helper.rb
CHANGED
data/test/test_organizations.rb
CHANGED
@@ -7,20 +7,26 @@ class TestOrganizations < MiniTest::Unit::TestCase
|
|
7
7
|
$tom_email = "tom@gomegam.com"
|
8
8
|
$bob_email = "bob@gomegam.com"
|
9
9
|
|
10
|
+
def test_get_organizations_good1
|
11
|
+
response =megams.get_organizations
|
12
|
+
response.body.to_s
|
13
|
+
assert_equal(200, response.status)
|
14
|
+
end
|
15
|
+
|
10
16
|
|
11
17
|
def test_get_organizations_good
|
12
|
-
response =megams.
|
18
|
+
response =megams.get_organization(sandbox_name)
|
13
19
|
response.body.to_s
|
14
20
|
assert_equal(200, response.status)
|
15
21
|
end
|
16
|
-
|
22
|
+
|
17
23
|
|
18
24
|
def test_post_organizations_good
|
19
25
|
tmp_hash = {
|
20
26
|
"name" => "orgname3"}
|
21
|
-
response =megams.
|
27
|
+
response =megams.post_organization(tmp_hash)
|
22
28
|
response.body.to_s
|
23
29
|
assert_equal(201, response.status)
|
24
30
|
end
|
25
|
-
|
31
|
+
|
26
32
|
end
|
data/test/test_predefclouds.rb
CHANGED
@@ -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
|
-
|
4
|
+
|
5
5
|
def test_post_predefcloud1
|
6
6
|
tmp_hash = { :name => "aws_ec2_predef_medium", :spec => {
|
7
7
|
:type_name => "aws-ec2",
|
@@ -52,6 +52,7 @@ class TestApps < MiniTest::Unit::TestCase
|
|
52
52
|
end
|
53
53
|
|
54
54
|
#=begin
|
55
|
+
|
55
56
|
def test_get_predefclouds
|
56
57
|
response = megams.get_predefclouds
|
57
58
|
assert_equal(200, response.status)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: megam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.21'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kishorekumar Neelamegam, Thomas Alrin, Subash Sethurajan, Rajthilak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|