megam_api 0.65 → 0.66
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/megam/api/cat_requests.rb +1 -1
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/cat_requests.rb +15 -1
- data/test/test_cat_requests.rb +8 -6
- data/test/test_helper.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5b945f249259961bea808c3a02e6de6ea9ec9e8
|
4
|
+
data.tar.gz: b64b704bb8ad8840111bad0360d215a6dc0294e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c61ab1d6fbeed1840991d11465a87af95ca4c3cf4819320d2668e6c633a4a57b1dac909c33c3cb2d6a916fca4823e823f97257d048a9dba73f8d1f754f68304
|
7
|
+
data.tar.gz: 42a1759ed0a1f4d6829ce445123df551f6dc733cdd35612c229fd13d827b7f03dc1fb2987dbef6e16dab3d72df17de8613310674326f8f586ef05f3c5cd19e0b
|
data/lib/megam/api/version.rb
CHANGED
@@ -22,6 +22,7 @@ module Megam
|
|
22
22
|
@cattype = nil
|
23
23
|
@name = nil
|
24
24
|
@action = nil
|
25
|
+
@category = nil
|
25
26
|
@some_msg = {}
|
26
27
|
@created_at = nil
|
27
28
|
super(email, api_key, host)
|
@@ -74,6 +75,15 @@ module Megam
|
|
74
75
|
end
|
75
76
|
end
|
76
77
|
|
78
|
+
def category(arg=nil)
|
79
|
+
if arg != nil
|
80
|
+
@category = arg
|
81
|
+
else
|
82
|
+
@category
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
|
77
87
|
|
78
88
|
def created_at(arg=nil)
|
79
89
|
if arg != nil
|
@@ -104,6 +114,7 @@ module Megam
|
|
104
114
|
index_hash["cattype"] = cattype
|
105
115
|
index_hash["name"] = name
|
106
116
|
index_hash["action"] = action
|
117
|
+
index_hash["category"] = category
|
107
118
|
index_hash["created_at"] = created_at
|
108
119
|
index_hash
|
109
120
|
end
|
@@ -121,6 +132,7 @@ module Megam
|
|
121
132
|
"cattype" => cattype,
|
122
133
|
"name" => name,
|
123
134
|
"action" => action,
|
135
|
+
"category" => category,
|
124
136
|
"created_at" => created_at
|
125
137
|
}
|
126
138
|
result
|
@@ -134,6 +146,7 @@ module Megam
|
|
134
146
|
node.cattype(o["cattype"]) if o.has_key?("cattype")
|
135
147
|
node.name(o["name"]) if o.has_key?("name")
|
136
148
|
node.action(o["action"]) if o.has_key?("action")
|
149
|
+
node.action(o["category"]) if o.has_key?("category")
|
137
150
|
node.created_at(o["created_at"]) if o.has_key?("created_at")
|
138
151
|
#success or error
|
139
152
|
node.some_msg[:code] = o["code"] if o.has_key?("code")
|
@@ -155,7 +168,8 @@ module Megam
|
|
155
168
|
@cattype = o[:cattype] if o.has_key?(:cattype)
|
156
169
|
@name = o[:name] if o.has_key?(:name)
|
157
170
|
@action = o[:action] if o.has_key?(:action)
|
158
|
-
@
|
171
|
+
@category = o[:category] if o.has_key?(:category)
|
172
|
+
@created_at = o[:created_at] if o.has_key?(:created_at)
|
159
173
|
self
|
160
174
|
end
|
161
175
|
|
data/test/test_cat_requests.rb
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
2
|
|
3
3
|
class TestApps < MiniTest::Unit::TestCase
|
4
|
-
|
4
|
+
|
5
5
|
@@tmp_hash = {
|
6
6
|
"cat_id" => "ASM1136003656177549312",
|
7
|
-
"name" => "
|
8
|
-
"
|
7
|
+
"name" => "careworn", #APP or Bolt
|
8
|
+
"cattype" => "app",
|
9
|
+
"action" => "start",
|
10
|
+
"category" => "control"
|
9
11
|
}
|
10
12
|
|
11
|
-
|
12
|
-
def test_request_app_start
|
13
|
-
response = megams.
|
13
|
+
|
14
|
+
def test_request_app_start
|
15
|
+
response = megams.post_catrequest(@@tmp_hash)
|
14
16
|
assert_equal(201, response.status)
|
15
17
|
end
|
16
18
|
#=end
|
data/test/test_helper.rb
CHANGED
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.66'
|
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: 2015-09-
|
11
|
+
date: 2015-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|