megam_api 0.25 → 0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -4
- data/lib/megam/api.rb +2 -2
- data/lib/megam/api/csars.rb +1 -1
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/csar.rb +10 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17acb6b71183af27baf0dcc372b6910bbcb8d6b5
|
4
|
+
data.tar.gz: ada8515a2f3826bce2624bbda98ad7774c2adde5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed0f7cc8517aa3ceebfa2419c28edcbb99e6dcb779ce354981bcb2f317d137d8c1a948d3382c77eecc1d5aedd0d4e33af9e737cff51c3b0cec4ef35e8f69a12b
|
7
|
+
data.tar.gz: 67e5368114612b9cdafaea581f51842ee6cefde7c88cc500fc29ce35eef765c4f5ac78fec90dbf8da020cef20bb43c0ed44fd49df99144156739287d760278c0
|
data/README.md
CHANGED
@@ -24,13 +24,20 @@ Now you can make requests to the api.
|
|
24
24
|
Requests
|
25
25
|
--------
|
26
26
|
|
27
|
-
|
27
|
+
An overview of the commands you can run can be found in our documentation.
|
28
28
|
|
29
|
-
For additional details about any of the commands, see the [API docs](http://www.gomegam.com/docs).
|
30
29
|
|
31
|
-
|
30
|
+
### Documentation
|
31
|
+
|
32
|
+
Refer [documentation] (http://www.gomegam.com/docs)
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
We are glad to help if you have questions, or request for new features..
|
37
|
+
|
38
|
+
[twitter @megamsys](http://twitter.com/megamsys) [email support@megam.co.in](<support@megam.co.in>)
|
39
|
+
|
32
40
|
|
33
|
-
[twitter](http://twitter.com/megamsys) [email](<support@megam.co.in>)
|
34
41
|
|
35
42
|
|
36
43
|
# License
|
data/lib/megam/api.rb
CHANGED
@@ -201,7 +201,7 @@ module Megam
|
|
201
201
|
private
|
202
202
|
|
203
203
|
def just_color_debug(path)
|
204
|
-
text.msg "--> #{text.color(
|
204
|
+
text.msg "--> #{text.color("(#{path})", :cyan,:bold)}" # Why " inside "
|
205
205
|
end
|
206
206
|
|
207
207
|
|
@@ -263,7 +263,7 @@ module Megam
|
|
263
263
|
|
264
264
|
data="#{current_date}"+"\n"+"#{cmd_parms[:path]}"+"\n"+"#{body_base64}"
|
265
265
|
|
266
|
-
digest = OpenSSL::Digest
|
266
|
+
digest = OpenSSL::Digest.new('sha1')
|
267
267
|
movingFactor = data.rstrip!
|
268
268
|
hash = OpenSSL::HMAC.hexdigest(digest, @api_key, movingFactor)
|
269
269
|
final_hmac = @email+':' + hash
|
data/lib/megam/api/csars.rb
CHANGED
data/lib/megam/api/version.rb
CHANGED
data/lib/megam/core/csar.rb
CHANGED
@@ -45,6 +45,13 @@ module Megam
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def yamldata(arg=nil)
|
49
|
+
if arg != nil
|
50
|
+
@yamldata = arg
|
51
|
+
else
|
52
|
+
@yamldata
|
53
|
+
end
|
54
|
+
end
|
48
55
|
|
49
56
|
def link(arg=nil)
|
50
57
|
if arg != nil
|
@@ -108,6 +115,7 @@ module Megam
|
|
108
115
|
csarjslf.id(o["id"]) if o.has_key?("id")
|
109
116
|
csarjslf.desc(o["desc"]) if o.has_key?("desc")
|
110
117
|
csarjslf.link(o["link"]) if o.has_key?("link")
|
118
|
+
csarjslf.created_at(o["created_at"]) if o.has_key?("created_at")
|
111
119
|
|
112
120
|
#success or error
|
113
121
|
csarjslf.some_msg[:code] = o["code"] if o.has_key?("code")
|
@@ -128,6 +136,7 @@ module Megam
|
|
128
136
|
@id = o["id"] if o.has_key?("id")
|
129
137
|
@desc = o["desc"] if o.has_key?("desc")
|
130
138
|
@link = o["link"] if o.has_key?("link")
|
139
|
+
@yamldata = o["yamldata"] if o.has_key?("yamldata")
|
131
140
|
@created_at = o["created_at"] if o.has_key?("created_at")
|
132
141
|
self
|
133
142
|
end
|
@@ -141,7 +150,7 @@ module Megam
|
|
141
150
|
# Create the csar yaml
|
142
151
|
#This won't work, as the body just needs the yaml string.
|
143
152
|
def create
|
144
|
-
megam_rest.post_csar(
|
153
|
+
megam_rest.post_csar(@yamldata)
|
145
154
|
end
|
146
155
|
|
147
156
|
# Load the yaml back from the link
|
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.28'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
226
|
rubyforge_project:
|
227
|
-
rubygems_version: 2.4.
|
227
|
+
rubygems_version: 2.4.3
|
228
228
|
signing_key:
|
229
229
|
specification_version: 4
|
230
230
|
summary: Ruby Client for the Megam
|