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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 347f81f8f35ed2050e63786b75cbd0c08807f4c0
4
- data.tar.gz: ecf16952dea0caf3f84ce206ed34fe88d452f57c
3
+ metadata.gz: 17acb6b71183af27baf0dcc372b6910bbcb8d6b5
4
+ data.tar.gz: ada8515a2f3826bce2624bbda98ad7774c2adde5
5
5
  SHA512:
6
- metadata.gz: 000af8927dce09e19f6fb0f9bab7058a811085c4024b1d2b07d52fbfe6de5b11b724086377fd661bb43ec2a2d8cfa7d959dfeb7a84bd9888c2b56f0f29a6a2d4
7
- data.tar.gz: 9edc419e470849656c4b5f4d990c8ddc460514e5ffa66717a10f634a19e5f35257144a51053a62347c94080f5cdcb9f57ec64aff3be58d7d419c2db2f14d3f87
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
- What follows is an overview of commands you can run for the client.
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
- We are glad to help if you have questions, or request for new features.
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('(#{path})', :cyan,:bold)}" # Why " inside "
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::Digest.new('sha1')
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
@@ -24,7 +24,7 @@ module Megam
24
24
 
25
25
  def post_csar(new_csar)
26
26
  @options = {:path => '/csars/content',
27
- :body => Megam::JSONCompat.to_json(new_node)}.merge(@options)
27
+ :body => new_csar}.merge(@options)
28
28
 
29
29
  request(
30
30
  :expects => 201,
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.25"
3
+ VERSION = "0.28"
4
4
  end
5
5
  end
@@ -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(to_hash)
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.25'
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-17 00:00:00.000000000 Z
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.2
227
+ rubygems_version: 2.4.3
228
228
  signing_key:
229
229
  specification_version: 4
230
230
  summary: Ruby Client for the Megam