megam_api 0.9.1 → 0.9.2

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: 0ac64dc7ec8ec9919fd499984affe96a6d1d357f
4
- data.tar.gz: dd4e88039b954ffaeabdcff09904fe741c0424e4
3
+ metadata.gz: be80e382976f004b6f1b5d10e628d6b7eb7d1bda
4
+ data.tar.gz: b41332a92d5e86bf43b53126f46e6d1fa993d163
5
5
  SHA512:
6
- metadata.gz: 449f1590d60a40b0aacbb8ef72cdeec18d0ff0e54e25a2875da51a4c7b3ecbd1fc2cf07e3f4ed32832bc20c390a45e3bdaf2d470b834901fcdade1d75ac10e88
7
- data.tar.gz: 3fce2a00dac85c39154a090b61d30045137e477dd0c528a4d3dcf95c0b426be257b981dd95b8b1bc64e4a74d432a97ca5c26f8317adbdda005cc3bb73d452f3a
6
+ metadata.gz: a7a57b292cde734a6095e48fa21cef6b56d421009a7e5ad7437738b380aec08ef323be3f7a22c4024f2dcc9f309cea6f6cb95c9c8a079dc433636dc47c26e7a9
7
+ data.tar.gz: 8eee52acc0d5727a06cc56707d8c410116ba18a23c431552af1109e25d2dcf7b3cf696a395824229dd8e7ff8178d6c00b9f99ca664bc6e00fae0a93512f4a546
@@ -12,7 +12,7 @@ module Megam
12
12
  )
13
13
  end
14
14
 
15
- def get_meraketplaceapp(id)
15
+ def get_marketplaceapp(id)
16
16
  @options = {:path => "/marketplaces/#{id}",:body => ""}.merge(@options)
17
17
 
18
18
  request(
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.9.1"
3
+ VERSION = "0.9.2"
4
4
  end
5
5
  end
@@ -24,6 +24,7 @@ module Megam
24
24
  @pricetype = nil
25
25
  @features={}
26
26
  @plan={}
27
+ @applinks={}
27
28
  @attach =nil
28
29
  @predefnode=nil
29
30
  @some_msg = {}
@@ -84,6 +85,14 @@ module Megam
84
85
  @plan
85
86
  end
86
87
  end
88
+
89
+ def applinks(arg=nil)
90
+ if arg != nil
91
+ @applinks = arg
92
+ else
93
+ @applinks
94
+ end
95
+ end
87
96
 
88
97
  def predefnode(arg=nil)
89
98
  if arg != nil
@@ -139,6 +148,7 @@ module Megam
139
148
  index_hash["pricetype"] = pricetype
140
149
  index_hash["features"] = features
141
150
  index_hash["plan"] = plan
151
+ index_hash["applinks"] = applinks
142
152
  index_hash["attach"] = attach
143
153
  index_hash["predefnode"] = predefnode
144
154
  index_hash["approved"] = approved
@@ -161,6 +171,7 @@ module Megam
161
171
  "pricetype" => pricetype,
162
172
  "features" => features,
163
173
  "plan" => plan,
174
+ "applinks" => applinks,
164
175
  "attach" => attach,
165
176
  "predefnode" => predefnode,
166
177
  "approved" => approved,
@@ -191,13 +202,22 @@ module Megam
191
202
  app.appdetails[:logo] = oa["logo"] if oa && oa.has_key?("logo")
192
203
  app.appdetails[:category] = oa["category"] if oa && oa.has_key?("category")
193
204
  app.appdetails[:version] = oa["version"] if oa && oa.has_key?("version")
194
- app.appdetails[:description] = oa["description"] if oa && oa.has_key?("description")
205
+ app.appdetails[:description] = oa["description"] if oa && oa.has_key?("description")
195
206
 
196
207
  op = o["plan"]
197
208
  app.plan[:price] = op["price"] if op && op.has_key?("price")
198
209
  app.plan[:description] = op["description"] if op && op.has_key?("description")
199
210
  app.plan[:plantype]= op["plantype"] if op && op.has_key?("plantype")
200
211
 
212
+ ol = o["applinks"]
213
+ app.applinks[:free_support] = ol["free_support"] if ol && ol.has_key?("free_support")
214
+ app.applinks[:paid_support] = ol["paid_support"] if ol && ol.has_key?("paid_support")
215
+ app.applinks[:home_link] = ol["home_link"] if ol && ol.has_key?("home_link")
216
+ app.applinks[:info_link] = ol["info_link"] if ol && ol.has_key?("info_link")
217
+ app.applinks[:content_link] = ol["content_link"] if ol && ol.has_key?("content_link")
218
+ app.applinks[:wiki_link] = ol["wiki_link"] if ol && ol.has_key?("wiki_link")
219
+ app.applinks[:source_link] = ol["source_link"] if ol && ol.has_key?("source_link")
220
+
201
221
  #success or error
202
222
  app.some_msg[:code] = o["code"] if o.has_key?("code")
203
223
  app.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
@@ -220,6 +240,7 @@ module Megam
220
240
  @pricetype = o["pricetype"] if o.has_key?("pricetype")
221
241
  @features = o["features"] if o.has_key?("features")
222
242
  @plan = o["plan"] if o.has_key?("plan")
243
+ @applinks = o["applinks"] if o.has_key?("applinks")
223
244
  @attach = o["attach"] if o.has_key?("attach")
224
245
  @predefnode = o["predefnode"] if o.has_key?("predefnode")
225
246
  @approved = o["approved"] if o.has_key?("approved")
@@ -238,7 +259,7 @@ module Megam
238
259
  end
239
260
 
240
261
  # Load a account by email_p
241
- def self.show(name, tmp_email=nil, tmp_api_key=nil)
262
+ def self.show(tmp_email=nil, tmp_api_key=nil, name)
242
263
  app = self.new(tmp_email, tmp_api_key)
243
264
  app.megam_rest.get_marketplaceapp(name)
244
265
  end
@@ -29,17 +29,18 @@ def test_post_marketplace
29
29
  response = megams.post_node(tmp_hash)
30
30
  assert_equal(201, response.status)
31
31
  end
32
- =end
32
+
33
33
  def test_get_marketplaces
34
34
  response = megams.get_marketplaceapps
35
35
  assert_equal(200, response.status)
36
36
  end
37
- =begin
37
+ =end
38
+
38
39
  def test_get_node0
39
- response = megams.get_node("black1.megam.co")
40
+ response = megams.get_marketplaceapp("riak")
40
41
  assert_equal(200, response.status)
41
42
  end
42
-
43
+ =begin
43
44
  def test_get_node1
44
45
  response = megams.get_node("night.megam.co")
45
46
  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.9.1
4
+ version: 0.9.2
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-03-13 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.2.2
228
+ rubygems_version: 2.1.11
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: Ruby Client for the Megam Cloud