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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca6cd3eb4822d02d8d0ebaf7f2bc063c271e5053
4
- data.tar.gz: 3a824875e7938afaa20b48b6a8fbd9cff05d8b0c
3
+ metadata.gz: deb9588c6384a2fcdd377205bec74742ea4cf9a9
4
+ data.tar.gz: 75f315b28977e5aed5370daeff4d1ef420dc9760
5
5
  SHA512:
6
- metadata.gz: 3f6438fa9333d4e5e578e73ab4c9bea324d3ec04fc0ab8f6ded905aa54a8245ce43b79afaf272a09772cac5ae9b07ebe9b0798100440975a0289ba762a52e6d6
7
- data.tar.gz: e22ee5fca62c1f2b171313ee733a1a9216736d43d5c0a65323a38e736d6c759c59d1655812360bc90207b98953f5f201db7d985c6ccaa5cf571b32933189f3b3
6
+ metadata.gz: 725e66fbd76249c890ad3a2e89871692829b6a71869b92d23c93681b9fe161e692dac9634a351821eeb1be74a06374d80861479a1a0d2902828fbfc62aa6d934
7
+ data.tar.gz: f6a66588350f4a2acbfb5f94669ac145758536925b353d83227eead5c565a6f2a2dc660f19db78b2b5d18b2ec5f4d4e4b9563f31349da931e779ac7e22606460
@@ -15,6 +15,6 @@
15
15
  #
16
16
  module Megam
17
17
  class API
18
- VERSION = "0.97"
18
+ VERSION = "0.98"
19
19
  end
20
20
  end
@@ -15,7 +15,7 @@
15
15
  #
16
16
  module Megam
17
17
  class Request < Megam::ServerAPI
18
- def initialize(email=nil, api_key=nil, host=nil)
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(email, api_key, host)
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,tmp_email=nil, tmp_api_key=nil, tmp_host=nil)
156
- node = self.new(tmp_email, tmp_api_key, tmp_host)
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, params["email"] || params[:email], params["api_key"] || params[:api_key], params["host"] || params[:host])
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["email"] || params[:email], params["api_key"] || params[:api_key], params["host"] || params[:host])
185
+ prede = self.new(params)
186
186
  prede.megam_rest.get_requests
187
187
  end
188
188
 
189
- def self.list(n_name,tmp_email=nil, tmp_api_key=nil, tmp_host=nil)
190
- prede = self.new(tmp_email,tmp_api_key, tmp_host)
189
+ def self.list(params)
190
+ prede = self.new(params)
191
191
  prede.megam_rest.get_request(n_name)
192
192
  end
193
193
 
@@ -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
- #=begin
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" => "IamAtlas{74}NobdyCanSedfefdeME#07",
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
- =end
48
+ #=end
45
49
 
46
50
  =begin
47
51
  def test_update_accounts_good
data/test/test_helper.rb CHANGED
@@ -21,7 +21,7 @@ end
21
21
  def megams_new(options={})
22
22
  s_options = SANDBOX_HOST_OPTIONS.merge({
23
23
  :email => "test@megam.io",
24
- :api_key => "IamAtlas{74}NobdyCanSedfefdeME#07"
24
+ :api_key => "faketest"
25
25
  })
26
26
  options = s_options.merge(options)
27
27
  mg=Megam::API.new(options)
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.97'
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 00:00:00.000000000 Z
12
+ date: 2016-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon