adobe_connect 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -9,7 +9,7 @@ This gem provides a wrapper for interacting with the Adobe Connect API that
9
9
 
10
10
  Add this line to your application's Gemfile:
11
11
 
12
- gem 'adobe_connect', '0.0.7'
12
+ gem 'adobe_connect', '0.0.8'
13
13
 
14
14
  And then run:
15
15
 
@@ -49,6 +49,7 @@ module AdobeConnect
49
49
  :email => app_user.email)
50
50
 
51
51
  if response.at_xpath('//status').attr('code') == 'ok'
52
+ self.id = response.at_xpath('//principal').attr('principal-id')
52
53
  true
53
54
  else
54
55
  save_errors(response)
@@ -86,6 +87,8 @@ module AdobeConnect
86
87
  end
87
88
 
88
89
  private
90
+ attr_writer :id
91
+
89
92
  # Internal: Store request errors in @errors.
90
93
  #
91
94
  # response - An AdobeConnect::Response.
@@ -1,4 +1,4 @@
1
1
  module AdobeConnect
2
2
  # Public: Current Gem version.
3
- VERSION = '0.0.7'
3
+ VERSION = '0.0.8'
4
4
  end
@@ -50,6 +50,23 @@ class AdobeConnectUserTest < MiniTest::Unit::TestCase
50
50
  assert @connect_user.save
51
51
  end
52
52
 
53
+ def test_save_stores_the_principal_id_on_the_user
54
+ response = mock(:code => '200')
55
+ response.expects(:body).returns(SAVE_SUCCESS)
56
+ ac_response = AdobeConnect::Response.new(response)
57
+
58
+ @connect_user.service.expects(:principal_update).
59
+ with(:first_name => @app_user.first_name,
60
+ :last_name => @app_user.last_name, :login => @connect_user.username,
61
+ :password => @connect_user.password, :type => 'user', :has_children => 0,
62
+ :email => @app_user.email).
63
+ returns(ac_response)
64
+
65
+ @connect_user.save
66
+
67
+ assert_equal "26243", @connect_user.id
68
+ end
69
+
53
70
  def test_save_returns_false_on_failure
54
71
  response = mock(:code => '200')
55
72
  response.expects(:body).returns(SAVE_ERROR)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adobe_connect
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Zach Pendleton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-14 00:00:00 Z
18
+ date: 2013-03-09 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activesupport