megam_api 0.39 → 0.40

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: 51568433d207d77f782eccfb5772bacd256652b0
4
- data.tar.gz: d046079794eee89f4a974b5cb98984f5ebf79509
3
+ metadata.gz: dd60098533007fe3a9b643d55cb878670e207d40
4
+ data.tar.gz: f0b88a82971c3bcb17c810fc327ba5133d0c26da
5
5
  SHA512:
6
- metadata.gz: 286efbdb570c8591d99cb1821e74ffd06d67ea31e0730e5a5d1d3a68d2eb97af0b431ad034bb4a5dadec8a01c8b6fe4813e72c848d6871f6e7fce548cd18b675
7
- data.tar.gz: 97ea272301d677c89e36556d4d04ce675a28881d9676f1035e9677a57a345ee55f3e3849b0ce415e7a6481c1e26895319e0b5faec0e141f0f12f3669ead3dc89
6
+ metadata.gz: c6ae07ffae5b01bc48efcb11ed50c737f9c0e2a5317fc3463eb162334c3424f85ff5351e363d8e0739cbd9dcfe8aebb570dc95a75b6c66d6255008d67d09238f
7
+ data.tar.gz: c31823b892d6ba4d46fd63ab7b1db6383a7cf65eb8ec9c09caa1c505da19675e6d2c491a8968909738d8006dfde628c0ed1fd03b586bad784dd9b82c5743295e
@@ -24,20 +24,20 @@ module Megam
24
24
  :method => :post,
25
25
  :body => @options[:body]
26
26
  )
27
- end
27
+ end
28
28
 
29
-
30
- # The body content needs to be a json.
31
- def update_accounts(new_account)
29
+ def update_accounts(update_account)
32
30
  @options = {:path => '/accounts/update',
33
- :body => Megam::JSONCompat.to_json(new_account)}.merge(@options)
34
-
35
- request(
36
- :expects => 201,
37
- :method => :post,
38
- :body => @options[:body]
39
- )
40
- end
31
+ :body => Megam::JSONCompat.to_json(update_account)}.merge(@options)
32
+
33
+ request(
34
+ :expects => 201,
35
+ :method => :post,
36
+ :body => @options[:body]
37
+ )
41
38
  end
42
39
 
40
+
41
+
42
+ end
43
43
  end
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.39"
3
+ VERSION = "0.40"
4
4
  end
5
5
  end
@@ -6,14 +6,14 @@ 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
-
9
+ =begin
10
10
  def test_get_accounts_good
11
11
  response =megams.get_accounts(sandbox_email)
12
12
  response.body.to_s
13
13
  assert_equal(200, response.status)
14
14
  end
15
15
 
16
- def test_post_profile_good
16
+ def test_post_accounts_good
17
17
  tmp_hash = {
18
18
  "id" => "000099090909000",
19
19
  "first_name" => "Darth",
@@ -30,6 +30,24 @@ class TestAccounts < MiniTest::Unit::TestCase
30
30
  response.body.to_s
31
31
  assert_equal(201, response.status)
32
32
  end
33
+ =end
34
+ def test_update_accounts_good
35
+ tmp_hash = {
36
+ "id" => "w3423",
37
+ "first_name" => "Darth",
38
+ "last_name" => "Vader",
39
+ "email" => "super@test.com",
40
+ "phone" => "19090909090011111111",
41
+ "api_key" => "IamAtlas{74}NobdyCanSedfefdeME#07",
42
+ "password" => "tset",
43
+ "authority" => "admin",
44
+ "password_reset_key" => "",
45
+ "created_at" => "2014-10-29 13:24:06 +0000"
46
+ }
47
+ response = megams.update_accounts(tmp_hash)
48
+ response.body.to_s
49
+ assert_equal(201, response.status)
50
+ end
33
51
 
34
52
  =begin
35
53
  def test_get_accounts_bad
data/test/test_helper.rb CHANGED
@@ -69,9 +69,9 @@ def sandbox_name
69
69
  end
70
70
 
71
71
  def sandbox_apikey
72
- "i-yIxmyhBeeMxUTUJdv1hA=="
72
+ "uAqN7PFR5MyCoV6XR7xjrQ=="
73
73
  end
74
74
 
75
75
  def sandbox_email
76
- "morpheyesh@gmail.com"
76
+ "dvader082@gmail.com"
77
77
  end
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.39'
4
+ version: '0.40'
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-04-28 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon