megam_api 0.24 → 0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8555abcfba66ec92bd932251a6e87e1d76b9fe86
4
- data.tar.gz: 6ad271b618237e58e142eec627a7fb9a62ddf733
3
+ metadata.gz: 347f81f8f35ed2050e63786b75cbd0c08807f4c0
4
+ data.tar.gz: ecf16952dea0caf3f84ce206ed34fe88d452f57c
5
5
  SHA512:
6
- metadata.gz: a22a9a8745fe9821084ec53969b92b4df1e78bb950c99b5d1694c5330d9c9b18729364c8e7b13529c6ed2e5e3e69b6c5ce4ae8eb9c142acca15ced561537fe5b
7
- data.tar.gz: f90d1ba428e0ef6a33681ec9a335b2bc83ec211db18529bff33dbfd80e375d7df0070edd6ba1174cd9068e5adea6433a525e468c3ed968cf5d6daa9860428a0a
6
+ metadata.gz: 000af8927dce09e19f6fb0f9bab7058a811085c4024b1d2b07d52fbfe6de5b11b724086377fd661bb43ec2a2d8cfa7d959dfeb7a84bd9888c2b56f0f29a6a2d4
7
+ data.tar.gz: 9edc419e470849656c4b5f4d990c8ddc460514e5ffa66717a10f634a19e5f35257144a51053a62347c94080f5cdcb9f57ec64aff3be58d7d419c2db2f14d3f87
data/README.md CHANGED
@@ -9,7 +9,6 @@ For more about the Megam' REST API <http://gomegam.com/docs>.[Megam API server](
9
9
 
10
10
  [![Build Status](https://travis-ci.org/indykish/megam_api.png)](https://travis-ci.org/indykish/megam_api)
11
11
 
12
- We are on beta [register at:](https://www.megam.co)
13
12
 
14
13
  Usage
15
14
  -----
@@ -27,44 +26,23 @@ Requests
27
26
 
28
27
  What follows is an overview of commands you can run for the client.
29
28
 
30
- For additional details about any of the commands, see the [API docs](http://docs.megam.co).
31
-
32
- ### Nodes
33
-
34
- megam.get_nodes # get a list of your nodes
35
- megam.get_node(POGO) # get info about the node named POGO
36
- megam.create_node('name' => POGO,
37
- 'type' => 'rails') # create an nodep with a generated name and the default type
38
- megam.delete_node(POGO) # delete the node named POGO
39
-
40
-
41
- ### Predefs
42
-
43
- megam.get_predefs # list all predefs
44
- megam.get_predef('type' => rails) # list a specific predef named 'rails'
45
-
46
- ### Accounts
47
-
48
- megam.get_accounts(email) # list accounts associated with email
49
- megam.post_accounts(email, api_key) # onboard an account
50
-
29
+ For additional details about any of the commands, see the [API docs](http://www.gomegam.com/docs).
51
30
 
52
31
  We are glad to help if you have questions, or request for new features.
53
32
 
54
- [twitter](http://twitter.com/megamsys) [email](<alrin@megam.co.in>)
55
-
56
- #### TO - DO
33
+ [twitter](http://twitter.com/megamsys) [email](<support@megam.co.in>)
57
34
 
58
- *
59
35
 
60
36
  # License
61
37
 
62
38
  | | |
63
39
  |:---------------------|:-----------------------------------------|
64
40
  | **Author:** | Kishorekumar Neelamegam (<nkishore@megam.co.in>)
41
+ | | Raj Thilak (<rajthilak@megam.co.in>)
42
+ | | Yeshwanth Kumar (<getyesh@megam.co.in>)
65
43
  | | Subash Sethurajan (<subash.avc@gmail.com>)
66
44
  | | Thomas Alrin (<alrin@megam.co.in>)
67
- | **Copyright:** | Copyright (c) 2012-2013 Megam Systems.
45
+ | **Copyright:** | Copyright (c) 2012-2014 Megam Systems.
68
46
  | **License:** | Apache License, Version 2.0
69
47
 
70
48
  Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.24"
3
+ VERSION = "0.25"
4
4
  end
5
5
  end
@@ -23,6 +23,7 @@ module Megam
23
23
  @policies=[]
24
24
  @inputs = {}
25
25
  @operations = nil
26
+ @outputs = []
26
27
  @created_at = nil
27
28
  super(email, api_key)
28
29
  end
@@ -78,6 +79,15 @@ module Megam
78
79
  @operations
79
80
  end
80
81
  end
82
+
83
+ def outputs(arg=[])
84
+ if arg != []
85
+ @outputs = arg
86
+ else
87
+ @outputs
88
+ end
89
+ end
90
+
81
91
 
82
92
  def created_at(arg=nil)
83
93
  if arg != nil
@@ -101,6 +111,7 @@ module Megam
101
111
  index_hash["policies"] = policies
102
112
  index_hash["inputs"] = inputs
103
113
  index_hash["operations"] = operations
114
+ index_hash["outputs"] = outputs
104
115
  index_hash["created_at"] = created_at
105
116
  index_hash
106
117
  end
@@ -119,6 +130,7 @@ module Megam
119
130
  "policies" => policies,
120
131
  "inputs" => inputs,
121
132
  "operations" => operations,
133
+ "outputs" => outputs,
122
134
  "created_at" => created_at
123
135
  }
124
136
 
@@ -133,6 +145,7 @@ module Megam
133
145
  asm.policies(o["policies"]) if o.has_key?("policies") #this will be an array? can hash store array?
134
146
  asm.inputs(o["inputs"]) if o.has_key?("inputs")
135
147
  asm.operations(o["operations"]) if o.has_key?("operations")
148
+ asm.outputs(o["outputs"]) if o.has_key?("outputs")
136
149
  asm.created_at(o["created_at"]) if o.has_key?("created_at")
137
150
  asm
138
151
  end
@@ -150,6 +163,7 @@ module Megam
150
163
  @policies = o["policies"] if o.has_key?("policies")
151
164
  @inputs = o["inputs"] if o.has_key?("inputs")
152
165
  @operations = o["operations"] if o.has_key?("operations")
166
+ @outputs = o["outputs"] if o.has_key?("outputs")
153
167
  @created_at = o["created_at"] if o.has_key?("created_at")
154
168
  self
155
169
  end
@@ -144,23 +144,25 @@ module Megam
144
144
  end
145
145
 
146
146
  def from_hash(o)
147
- @id = o["id"] if o.has_key?("id")
148
- @node_id = o["node_id"] if o.has_key?("node_id")
149
- @node_name = o["node_name"] if o.has_key?("node_name")
150
- @req_type = o["req_type"] if o.has_key?("req_type")
151
- @command = o["command"] if o.has_key?("command")
152
- @created_at = o["created_at"] if o.has_key?("created_at")
147
+ @id = o[:id] if o.has_key?(:id)
148
+ @node_id = o[:node_id] if o.has_key?(:node_id)
149
+ @node_name = o[:node_name] if o.has_key?(:node_name)
150
+ @req_type = o[:req_type] if o.has_key?(:req_type)
151
+ @command = o[:command] if o.has_key?(:command)
152
+ @created_at = o[:created_at] if o.has_key?(:created_at)
153
153
  self
154
154
  end
155
155
 
156
156
 
157
157
  def self.create(o,tmp_email=nil, tmp_api_key=nil)
158
+ puts "Entering megam_api-->"
158
159
  acct = from_hash(o,tmp_email, tmp_api_key)
159
160
  acct.create
160
161
  end
161
162
 
162
163
  # Create the node via the REST API
163
164
  def create
165
+ puts "entering megam_api"
164
166
  megam_rest.post_request(to_hash)
165
167
  end
166
168
 
data/megam_api.gemspec CHANGED
@@ -5,18 +5,18 @@ 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 = ["Kishorekumar Neelamegam, Thomas Alrin, Subash Sethurajan, Rajthilak"]
9
- s.email = ["nkishore@megam.co.in","alrin@megam.co.in","subash.avc@gmail.com", "rajthilak@megam.co.in"]
8
+ s.authors = ["Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan"]
9
+ s.email = ["rajthilak@megam.co.in","nkishore@megam.co.in","alrin@megam.co.in","getyesh@megam.co.in","subash.avc@gmail.com"]
10
10
  s.homepage = "http://github.com/megamsys/megam_api"
11
11
  s.license = "Apache V2"
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. Performs REST calls to Megam Gateway - http://github.com/megamsys/megam_play.git}
14
+ s.description = %q{Ruby Client for the Megam PaaS. Performs REST calls to Megam Gateway - http://github.com/megamsys/megam_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.39'
19
+ s.add_runtime_dependency 'excon', '~> 0.41'
20
20
  s.add_runtime_dependency 'highline', '~> 1.6'
21
21
  s.add_runtime_dependency 'yajl-ruby', '~> 1.2'
22
22
  s.add_runtime_dependency 'mixlib-config', '~> 2.1'
@@ -19,6 +19,7 @@ class TestApps < MiniTest::Unit::TestCase
19
19
  }],
20
20
  "inputs" => "",
21
21
  "operations" => "",
22
+ "output" => [],
22
23
  "created_at" => "2014-10-29 13:24:06 +0000"
23
24
  }
24
25
 
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.24'
4
+ version: '0.25'
5
5
  platform: ruby
6
6
  authors:
7
- - Kishorekumar Neelamegam, Thomas Alrin, Subash Sethurajan, Rajthilak
7
+ - Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-29 00:00:00.000000000 Z
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.39'
19
+ version: '0.41'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.39'
26
+ version: '0.41'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: highline
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -108,12 +108,14 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '10.3'
111
- description: Ruby Client for the Megam. Performs REST calls to Megam Gateway - http://github.com/megamsys/megam_play.git
111
+ description: Ruby Client for the Megam PaaS. Performs REST calls to Megam Gateway
112
+ - http://github.com/megamsys/megam_gateway.git
112
113
  email:
114
+ - rajthilak@megam.co.in
113
115
  - nkishore@megam.co.in
114
116
  - alrin@megam.co.in
117
+ - getyesh@megam.co.in
115
118
  - subash.avc@gmail.com
116
- - rajthilak@megam.co.in
117
119
  executables: []
118
120
  extensions: []
119
121
  extra_rdoc_files: