megam_api 0.93 → 0.95
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/.travis.yml +2 -2
- data/lib/megam/api.rb +18 -4
- data/lib/megam/api/accounts.rb +19 -4
- data/lib/megam/api/assemblies.rb +15 -0
- data/lib/megam/api/assembly.rb +15 -1
- data/lib/megam/api/availableunits.rb +15 -0
- data/lib/megam/api/balances.rb +16 -1
- data/lib/megam/api/billedhistories.rb +15 -0
- data/lib/megam/api/billings.rb +15 -0
- data/lib/megam/api/components.rb +15 -0
- data/lib/megam/api/credithistories.rb +15 -0
- data/lib/megam/api/csars.rb +16 -1
- data/lib/megam/api/discounts.rb +15 -0
- data/lib/megam/api/domains.rb +32 -22
- data/lib/megam/api/errors.rb +15 -0
- data/lib/megam/api/invoices.rb +15 -0
- data/lib/megam/api/login.rb +15 -0
- data/lib/megam/api/marketplaces.rb +15 -0
- data/lib/megam/api/organizations.rb +31 -17
- data/lib/megam/api/promos.rb +18 -3
- data/lib/megam/api/requests.rb +15 -0
- data/lib/megam/api/sensors.rb +15 -0
- data/lib/megam/api/sshkeys.rb +15 -0
- data/lib/megam/api/subscriptions.rb +15 -0
- data/lib/megam/api/version.rb +16 -1
- data/lib/megam/core/account.rb +1 -1
- data/lib/megam/core/assemblies.rb +1 -1
- data/lib/megam/core/assemblies_collection.rb +1 -1
- data/lib/megam/core/assembly.rb +1 -1
- data/lib/megam/core/assembly_collection.rb +1 -1
- data/lib/megam/core/auth.rb +1 -1
- data/lib/megam/core/availableunits.rb +1 -1
- data/lib/megam/core/availableunits_collection.rb +1 -1
- data/lib/megam/core/balances.rb +4 -5
- data/lib/megam/core/balances_collection.rb +1 -1
- data/lib/megam/core/billedhistories.rb +4 -5
- data/lib/megam/core/billedhistories_collection.rb +1 -1
- data/lib/megam/core/billings.rb +4 -4
- data/lib/megam/core/billings_collection.rb +1 -1
- data/lib/megam/core/components.rb +1 -1
- data/lib/megam/core/components_collection.rb +1 -1
- data/lib/megam/core/config.rb +1 -1
- data/lib/megam/core/credithistories.rb +1 -1
- data/lib/megam/core/credithistories_collection.rb +1 -1
- data/lib/megam/core/csar.rb +1 -1
- data/lib/megam/core/csar_collection.rb +1 -1
- data/lib/megam/core/discounts.rb +1 -1
- data/lib/megam/core/discounts_collection.rb +1 -1
- data/lib/megam/core/domain_collection.rb +144 -0
- data/lib/megam/core/domains.rb +76 -85
- data/lib/megam/core/error.rb +1 -1
- data/lib/megam/core/invoices.rb +1 -1
- data/lib/megam/core/invoices_collection.rb +1 -1
- data/lib/megam/core/json_compat.rb +3 -0
- data/lib/megam/core/konipai.rb +1 -1
- data/lib/megam/core/marketplace.rb +1 -1
- data/lib/megam/core/marketplace_collection.rb +1 -1
- data/lib/megam/core/organizations.rb +1 -3
- data/lib/megam/core/organizations_collection.rb +1 -1
- data/lib/megam/core/promos.rb +1 -1
- data/lib/megam/core/request.rb +1 -1
- data/lib/megam/core/request_collection.rb +1 -1
- data/lib/megam/core/sensors.rb +1 -1
- data/lib/megam/core/sensors_collection.rb +1 -1
- data/lib/megam/core/server_api.rb +1 -1
- data/lib/megam/core/sshkey.rb +1 -1
- data/lib/megam/core/sshkey_collection.rb +1 -1
- data/lib/megam/core/subscriptions.rb +1 -1
- data/lib/megam/core/subscriptions_collection.rb +1 -1
- data/lib/megam/mixins/assemblies.rb +15 -0
- data/lib/megam/mixins/assembly.rb +16 -0
- data/lib/megam/mixins/common_deployable.rb +15 -0
- data/lib/megam/mixins/components.rb +15 -0
- data/lib/megam/mixins/megam_attributes.rb +15 -0
- data/lib/megam/mixins/outputs.rb +15 -0
- data/lib/megam/mixins/policies.rb +15 -0
- data/lib/megam_api.rb +15 -0
- data/megam_api.gemspec +6 -6
- data/test/test_accounts.rb +46 -9
- data/test/test_assemblies.rb +7 -7
- data/test/test_assembly.rb +4 -4
- data/test/test_availableunits.rb +3 -4
- data/test/test_balances.rb +9 -10
- data/test/test_billedhistories.rb +4 -4
- data/test/test_billings.rb +1 -2
- data/test/test_components.rb +4 -4
- data/test/test_credithistories.rb +3 -4
- data/test/test_csars.rb +2 -1
- data/test/test_discounts.rb +4 -5
- data/test/test_domains.rb +8 -7
- data/test/test_invoices.rb +2 -2
- data/test/test_marketplaces.rb +4 -4
- data/test/test_organizations.rb +3 -3
- data/test/test_requests.rb +1 -1
- data/test/test_sshkeys.rb +15 -14
- metadata +41 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright (c)
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems, Inc.
|
|
2
2
|
# License:: Apache License, Version 2.0
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -127,7 +127,6 @@ module Megam
|
|
|
127
127
|
org.create
|
|
128
128
|
end
|
|
129
129
|
|
|
130
|
-
# Load a organization by email_p
|
|
131
130
|
def self.show(o)
|
|
132
131
|
org = from_hash(o)
|
|
133
132
|
org.megam_rest.get_organizations(email)
|
|
@@ -138,7 +137,6 @@ module Megam
|
|
|
138
137
|
org.update
|
|
139
138
|
end
|
|
140
139
|
|
|
141
|
-
# Create the node via the REST API
|
|
142
140
|
def update
|
|
143
141
|
megam_rest.update_organization(to_hash)
|
|
144
142
|
end
|
data/lib/megam/core/promos.rb
CHANGED
data/lib/megam/core/request.rb
CHANGED
data/lib/megam/core/sensors.rb
CHANGED
data/lib/megam/core/sshkey.rb
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
require File.expand_path("#{File.dirname(__FILE__)}/assembly")
|
|
2
17
|
|
|
3
18
|
module Megam
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
|
|
1
17
|
require File.expand_path("#{File.dirname(__FILE__)}/common_deployable")
|
|
2
18
|
require File.expand_path("#{File.dirname(__FILE__)}/components")
|
|
3
19
|
require File.expand_path("#{File.dirname(__FILE__)}/outputs")
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
require File.expand_path("#{File.dirname(__FILE__)}/megam_attributes")
|
|
2
17
|
|
|
3
18
|
module Megam
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
require File.expand_path("#{File.dirname(__FILE__)}/megam_attributes")
|
|
2
17
|
require File.expand_path("#{File.dirname(__FILE__)}/common_deployable")
|
|
3
18
|
require File.expand_path("#{File.dirname(__FILE__)}/outputs")
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
module Nilavu
|
|
2
17
|
module MegamAttributes
|
|
3
18
|
ATTRIBUTES = []
|
data/lib/megam/mixins/outputs.rb
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
require File.expand_path("#{File.dirname(__FILE__)}/megam_attributes")
|
|
2
17
|
|
|
3
18
|
module Megam
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
module Megam
|
|
2
17
|
class Mixins
|
|
3
18
|
class Policies
|
data/lib/megam_api.rb
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
+
# Copyright:: Copyright (c) 2013-2016 Megam Systems
|
|
2
|
+
# License:: Apache License, Version 2.0
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
1
16
|
require(File.join(File.dirname(__FILE__), "megam", "api"))
|
data/megam_api.gemspec
CHANGED
|
@@ -5,22 +5,22 @@ require "megam/api/version"
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
6
|
s.name = "megam_api"
|
|
7
7
|
s.version = Megam::API::VERSION
|
|
8
|
-
s.authors = ["Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan, Arunkumar sekar"]
|
|
9
|
-
s.email = ["rajthilak@megam.io","nkishore@megam.io","thomasalrin@megam.io","getyesh@megam.io","subash.avc@gmail.com","arunkumar.sekar@megam.io"]
|
|
8
|
+
s.authors = ["Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan, Arunkumar sekar, Ranjitha R"]
|
|
9
|
+
s.email = ["rajthilak@megam.io","nkishore@megam.io","thomasalrin@megam.io","getyesh@megam.io","subash.avc@gmail.com","arunkumar.sekar@megam.io, ranjithar@megam.io"]
|
|
10
10
|
s.homepage = "http://github.com/megamsys/megam_api"
|
|
11
|
-
s.license = "Apache
|
|
11
|
+
s.license = "Apache-2.0"
|
|
12
12
|
s.extra_rdoc_files = ["README.md", "LICENSE" ]
|
|
13
13
|
s.summary = %q{Ruby Client for the Megam}
|
|
14
|
-
s.description = %q{Ruby Client for the Megam
|
|
14
|
+
s.description = %q{Ruby Client for the Megam vertice platform. Performs REST calls to Vertice Gateway - http://github.com/megamsys/vertice_gateway.git}
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
18
18
|
s.require_paths = ["lib"]
|
|
19
|
-
s.add_runtime_dependency 'excon', '~> 0.
|
|
19
|
+
s.add_runtime_dependency 'excon', '~> 0.47.0'
|
|
20
20
|
s.add_runtime_dependency 'highline', '~> 1.7'
|
|
21
21
|
s.add_runtime_dependency 'yajl-ruby', '~> 1.2'
|
|
22
22
|
s.add_runtime_dependency 'mixlib-config', '~> 2.2'
|
|
23
23
|
s.add_runtime_dependency 'mixlib-log', '~> 1.6'
|
|
24
24
|
s.add_development_dependency 'minitest', '~> 5.8'
|
|
25
|
-
s.add_development_dependency 'rake', '~> 10.
|
|
25
|
+
s.add_development_dependency 'rake', '~> 10.5'
|
|
26
26
|
end
|
data/test/test_accounts.rb
CHANGED
|
@@ -2,28 +2,42 @@ require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
|
|
2
2
|
|
|
3
3
|
class TestAccounts < MiniTest::Unit::TestCase
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
=
|
|
5
|
+
$admin = "admin-tom"
|
|
6
|
+
$normal = "normal-tom"
|
|
7
|
+
$tom_email = "tom@gomegam.com"
|
|
8
|
+
$bob_email = "bob@gomegam.com"
|
|
9
|
+
#=begin
|
|
10
|
+
|
|
7
11
|
def test_signin_auth
|
|
8
|
-
response =
|
|
12
|
+
response =megams.get_accounts("test@megam.io")
|
|
9
13
|
response.body.to_s
|
|
10
14
|
assert_equal(200, response.status)
|
|
11
15
|
end
|
|
12
|
-
|
|
16
|
+
|
|
17
|
+
def test_get_accounts_good
|
|
18
|
+
response =megams.get_accounts(sandbox_email)
|
|
19
|
+
response.body.to_s
|
|
20
|
+
assert_equal(200, response.status)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
13
24
|
#=begin
|
|
25
|
+
|
|
14
26
|
def test_post_accounts_good
|
|
15
27
|
tmp_hash = {
|
|
28
|
+
"id" => "000099090909000",
|
|
16
29
|
"first_name" => "Darth",
|
|
17
30
|
"last_name" => "Vader",
|
|
18
|
-
"email" => "
|
|
31
|
+
"email" => "coolvader@iamswag.com",
|
|
19
32
|
"phone" => "19090909090",
|
|
20
33
|
"api_key" => "IamAtlas{74}NobdyCanSedfefdeME#07",
|
|
21
34
|
"authority" => "admin",
|
|
22
|
-
"password" =>
|
|
35
|
+
"password" => "",
|
|
23
36
|
"password_reset_key" => "",
|
|
24
37
|
"password_reset_sent_at" => "",
|
|
38
|
+
"created_at" => "2014-10-29 13:24:06 +0000"
|
|
25
39
|
}
|
|
26
|
-
response =
|
|
40
|
+
response =megams.post_accounts(tmp_hash)
|
|
27
41
|
response.body.to_s
|
|
28
42
|
assert_equal(201, response.status)
|
|
29
43
|
end
|
|
@@ -38,9 +52,10 @@ end
|
|
|
38
52
|
"email" => "super@test.com",
|
|
39
53
|
"phone" => "19090909090011111111",
|
|
40
54
|
"api_key" => "IamAtlas{74}NobdyCanSedfefdeME#07",
|
|
41
|
-
"password" => "tset",
|
|
42
55
|
"authority" => "admin",
|
|
56
|
+
"password" => "tset",
|
|
43
57
|
"password_reset_key" => "",
|
|
58
|
+
"password_reset_sent_at" => "",
|
|
44
59
|
"created_at" => "2014-10-29 13:24:06 +0000"
|
|
45
60
|
}
|
|
46
61
|
response = megams.update_accounts(tmp_hash)
|
|
@@ -55,5 +70,27 @@ end
|
|
|
55
70
|
response.body.to_s
|
|
56
71
|
end
|
|
57
72
|
end
|
|
58
|
-
|
|
73
|
+
def test_post_accounts_admin
|
|
74
|
+
response =megams.post_accounts(
|
|
75
|
+
{:id => random_id, :email => $tom_email, :api_key => sandbox_apikey, :authority => $admin})
|
|
76
|
+
response.body.to_s
|
|
77
|
+
assert_equal(201, response.status)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def test_post_accounts_normal
|
|
81
|
+
response =megams.post_accounts(
|
|
82
|
+
{:id => random_id, :email => $bob_email, :api_key => sandbox_apikey, :authority => $normal})
|
|
83
|
+
response.body.to_s
|
|
84
|
+
assert_equal(201, response.status)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def test_post_accounts_normal_bad
|
|
88
|
+
assert_raises(ArgumentError) do
|
|
89
|
+
response =megam.post_accounts(
|
|
90
|
+
{:id => random_id, :emailo => sandbox_email,
|
|
91
|
+
:apik_key => sandbox_apikey, :authority => $admin})
|
|
92
|
+
response.body.to_s
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
=end
|
|
59
96
|
end
|
data/test/test_assemblies.rb
CHANGED
|
@@ -2,23 +2,23 @@ require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
|
|
2
2
|
|
|
3
3
|
class TestApps < MiniTest::Unit::TestCase
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
#=begin
|
|
6
6
|
def test_get_assemblies
|
|
7
7
|
response = megams.get_assemblies
|
|
8
8
|
assert_equal(200, response.status)
|
|
9
9
|
end
|
|
10
|
-
|
|
10
|
+
#=end
|
|
11
11
|
#=begin
|
|
12
12
|
def test_get_assembly
|
|
13
|
-
response = megams.get_one_assemblies("
|
|
13
|
+
response = megams.get_one_assemblies("AMS8231283327211460972")
|
|
14
14
|
assert_equal(200, response.status)
|
|
15
15
|
end
|
|
16
16
|
#=end
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
#=begin
|
|
19
19
|
def test_post_assembly
|
|
20
20
|
tmp_hash = {
|
|
21
|
-
"name"=>"",
|
|
21
|
+
"name"=>"",
|
|
22
22
|
"org_id"=>"ORG123",
|
|
23
23
|
"assemblies"=>[{
|
|
24
24
|
"name"=>"covey",
|
|
@@ -83,9 +83,9 @@ class TestApps < MiniTest::Unit::TestCase
|
|
|
83
83
|
{"key"=>"lastsuccessstatusupdate","value"=>"02 Feb 16 13:20 IST"},
|
|
84
84
|
{"key"=>"status","value"=>"error"}]
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
response = megams.post_assemblies(tmp_hash)
|
|
88
88
|
assert_equal(200, response.status)
|
|
89
89
|
end
|
|
90
|
-
|
|
90
|
+
#=end
|
|
91
91
|
end
|
data/test/test_assembly.rb
CHANGED
|
@@ -2,17 +2,17 @@ require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
|
|
2
2
|
|
|
3
3
|
class TestApps < MiniTest::Unit::TestCase
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
#=begin
|
|
6
6
|
def test_get_assembly
|
|
7
|
-
response = megams.get_one_assembly("
|
|
7
|
+
response = megams.get_one_assembly("ASM6175632897198829431")
|
|
8
8
|
assert_equal(200, response.status)
|
|
9
9
|
end
|
|
10
|
-
|
|
10
|
+
#=end
|
|
11
11
|
#=begin
|
|
12
12
|
def test_update_assembly
|
|
13
13
|
tmp_hash = {
|
|
14
14
|
|
|
15
|
-
"id" => "
|
|
15
|
+
"id" => "ASM6175632897198829431",
|
|
16
16
|
"org_id" => "ORG123",
|
|
17
17
|
"json_claz" => "Megam::Assembly",
|
|
18
18
|
"name" => "calcines",
|