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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a88d33222ae6a6df77e081ea71bf5ba49fe222fc
4
- data.tar.gz: 9e41197340f0bd0a92123ae61c74889d9d234438
3
+ metadata.gz: a1869e43196cec60b438c743b2ba52602bf7b258
4
+ data.tar.gz: 509605a3b5136da6f25d305aa51af4520ea681bc
5
5
  SHA512:
6
- metadata.gz: 45805bf649222838c7e10a1cdad1400699381c176278a421e45d801d835cafd5de4d8d4fafd4cbc46a34d884bfac6b739ba012a20530238f1e53e6cc2fe2d3da
7
- data.tar.gz: f7247aa053f5100e4f0c794f191b3d1ab6558052d8373ada907c1a5b6c46a944db00104e2a4c631d4b4da77ad4fafd997746b0ae23138692c660843973559694
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(name)
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 post_organizations(new_organization)
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)
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.20"
3
+ VERSION = "0.21"
4
4
  end
5
5
  end
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
@@ -65,7 +65,7 @@ def domain_name
65
65
  end
66
66
 
67
67
  def sandbox_name
68
- "Megam6"
68
+ "org.megam"
69
69
  end
70
70
 
71
71
  def sandbox_apikey
@@ -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.get_organizations(sandbox_name)
18
+ response =megams.get_organization(sandbox_name)
13
19
  response.body.to_s
14
20
  assert_equal(200, response.status)
15
21
  end
16
- =begin
22
+
17
23
 
18
24
  def test_post_organizations_good
19
25
  tmp_hash = {
20
26
  "name" => "orgname3"}
21
- response =megams.post_organizations(tmp_hash)
27
+ response =megams.post_organization(tmp_hash)
22
28
  response.body.to_s
23
29
  assert_equal(201, response.status)
24
30
  end
25
- =end
31
+
26
32
  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
+
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.20'
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-21 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon