megam_api 0.97 → 0.98
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/version.rb +1 -1
- data/lib/megam/core/request.rb +8 -8
- data/test/test_accounts.rb +9 -5
- data/test/test_helper.rb +1 -1
- 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: deb9588c6384a2fcdd377205bec74742ea4cf9a9
|
4
|
+
data.tar.gz: 75f315b28977e5aed5370daeff4d1ef420dc9760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725e66fbd76249c890ad3a2e89871692829b6a71869b92d23c93681b9fe161e692dac9634a351821eeb1be74a06374d80861479a1a0d2902828fbfc62aa6d934
|
7
|
+
data.tar.gz: f6a66588350f4a2acbfb5f94669ac145758536925b353d83227eead5c565a6f2a2dc660f19db78b2b5d18b2ec5f4d4e4b9563f31349da931e779ac7e22606460
|
data/lib/megam/api/version.rb
CHANGED
data/lib/megam/core/request.rb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
#
|
16
16
|
module Megam
|
17
17
|
class Request < Megam::ServerAPI
|
18
|
-
def initialize(
|
18
|
+
def initialize(params)
|
19
19
|
@id = nil
|
20
20
|
@cat_id = nil
|
21
21
|
@name = nil
|
@@ -24,7 +24,7 @@ module Megam
|
|
24
24
|
@category = nil
|
25
25
|
@some_msg = {}
|
26
26
|
@created_at = nil
|
27
|
-
super(
|
27
|
+
super(params)
|
28
28
|
end
|
29
29
|
|
30
30
|
def request
|
@@ -152,8 +152,8 @@ module Megam
|
|
152
152
|
node
|
153
153
|
end
|
154
154
|
|
155
|
-
def self.from_hash(o
|
156
|
-
node = self.new(
|
155
|
+
def self.from_hash(o)
|
156
|
+
node = self.new(o)
|
157
157
|
node.from_hash(o)
|
158
158
|
node
|
159
159
|
end
|
@@ -171,7 +171,7 @@ module Megam
|
|
171
171
|
|
172
172
|
|
173
173
|
def self.create(params)
|
174
|
-
acct = from_hash(params
|
174
|
+
acct = from_hash(params)
|
175
175
|
acct.create
|
176
176
|
end
|
177
177
|
|
@@ -182,12 +182,12 @@ module Megam
|
|
182
182
|
|
183
183
|
|
184
184
|
def self.show(params)
|
185
|
-
prede = self.new(params
|
185
|
+
prede = self.new(params)
|
186
186
|
prede.megam_rest.get_requests
|
187
187
|
end
|
188
188
|
|
189
|
-
def self.list(
|
190
|
-
prede = self.new(
|
189
|
+
def self.list(params)
|
190
|
+
prede = self.new(params)
|
191
191
|
prede.megam_rest.get_request(n_name)
|
192
192
|
end
|
193
193
|
|
data/test/test_accounts.rb
CHANGED
@@ -6,23 +6,27 @@ class TestAccounts < MiniTest::Unit::TestCase
|
|
6
6
|
$normal = "normal-tom"
|
7
7
|
$tom_email = "tom@gomegam.com"
|
8
8
|
$bob_email = "bob@gomegam.com"
|
9
|
-
|
10
|
-
|
9
|
+
=begin
|
11
10
|
def test_signin_auth
|
12
11
|
response =megams.get_accounts("test@megam.io")
|
13
12
|
response.body.to_s
|
14
13
|
assert_equal(200, response.status)
|
15
14
|
end
|
16
15
|
|
16
|
+
=end
|
17
|
+
=begin
|
18
|
+
|
19
|
+
|
20
|
+
|
17
21
|
def test_get_accounts_good
|
18
22
|
response =megams.get_accounts(sandbox_email)
|
19
23
|
response.body.to_s
|
20
24
|
assert_equal(200, response.status)
|
21
25
|
end
|
22
26
|
|
23
|
-
|
24
27
|
=begin
|
25
28
|
|
29
|
+
|
26
30
|
def test_post_accounts_good
|
27
31
|
tmp_hash = {
|
28
32
|
"id" => "000099090909000",
|
@@ -30,7 +34,7 @@ end
|
|
30
34
|
"last_name" => "Vader",
|
31
35
|
"email" => "coolvader@iamswag.com",
|
32
36
|
"phone" => "19090909090",
|
33
|
-
"api_key" => "
|
37
|
+
"api_key" => "faketest",
|
34
38
|
"authority" => "admin",
|
35
39
|
"password" => "",
|
36
40
|
"password_reset_key" => "",
|
@@ -41,7 +45,7 @@ end
|
|
41
45
|
response.body.to_s
|
42
46
|
assert_equal(201, response.status)
|
43
47
|
end
|
44
|
-
|
48
|
+
#=end
|
45
49
|
|
46
50
|
=begin
|
47
51
|
def test_update_accounts_good
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: megam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.98'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan,
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|