adobe_connect 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f10609ce437b1c0c43be9f4660134cc315b5f47
4
- data.tar.gz: 8a4191eec96d7ab654496f749545ed9d4cde53a3
3
+ metadata.gz: b51f450d38f07e066522f7036692cab38bf18365
4
+ data.tar.gz: f71f7c0a1d552ec0989e2c44ba310bed4f71fbf7
5
5
  SHA512:
6
- metadata.gz: 519de098a13587cb8dd829f62e347b1d2d25ce7f7e685930d3cb9195208f5da180c200fff48ec018c35a703b8bb8051563e6c7188eb550472f418086384dc0fd
7
- data.tar.gz: 6ffd8828024399bc9cacd77501cbad18b90393944fbe8619a6eaf3303e3e3df80e68718d689b25131b352c1ec5320fcfad8a80bee75a029bb9923a020d99d52e
6
+ metadata.gz: 7fdc59e0fd25edb71ce1f30639a35d4c7fbb077f0d4b0f75f068273eb4a80683e5ed998dd40dbf37c0906db60c6663ca8bdb315a99f7616d75b8d355864edad6
7
+ data.tar.gz: 51115a9fbd728b1ce3c831555529cfdcf2eaba9cb9ddf38f403a7a4e748822883ff5e9183590df04c0e6195e49dfc95f5647f689be883cbdbacc09a9fb51de30
data/.travis.yml CHANGED
@@ -1,4 +1,9 @@
1
1
  language: ruby
2
+ before_install:
3
+ - gem update bundler
2
4
  rvm:
3
5
  - 1.9.3
4
6
  - 2.0.0
7
+ - 2.1.8
8
+ - 2.2.4
9
+ - 2.3.0
@@ -6,8 +6,8 @@ require 'adobe_connect/version'
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = 'adobe_connect'
8
8
  gem.version = AdobeConnect::VERSION
9
- gem.authors = ['Zach Pendleton']
10
- gem.email = ['zachpendleton@gmail.com']
9
+ gem.authors = ['Zach Pendleton', 'Isaiah Fischer', 'Leon Miller-Out']
10
+ gem.email = ['zachpendleton@gmail.com', 'isaiah@singlebrook.com', 'leon@singlebrook.com']
11
11
  gem.description = %q{An API wrapper for interacting with Adobe Connect services.}
12
12
  gem.summary = %q{An API wrapper for Adobe Connect services.}
13
13
  gem.license = 'MIT'
@@ -81,9 +81,12 @@ module AdobeConnect
81
81
  end
82
82
 
83
83
  def self.load_from_xml(g)
84
+ desc = g.at_xpath('//description')
85
+ desc = desc.children unless desc.nil?
86
+ desc = desc.text unless desc.nil?
84
87
  self.new({
85
88
  :name => g.at_xpath('//name').children.text,
86
- :description => g.at_xpath('//description').try(:children).try(:text),
89
+ :description => desc,
87
90
  :id => g.attr('principal-id')
88
91
  })
89
92
  end
@@ -49,9 +49,14 @@ module AdobeConnect
49
49
  # Returns a string of the sco ID of the folder
50
50
  def self.my_meetings_folder_id(service = AdobeConnect::Service.new)
51
51
  response = service.sco_shortcuts({})
52
- response.at_xpath('//shortcuts').children.select{|s|
52
+ folder = response.at_xpath('//shortcuts').children.select{|s|
53
53
  s.attr('type') == 'my-meetings'
54
- }[0].attr('sco-id')
54
+ }[0]
55
+ if folder.nil?
56
+ nil
57
+ else
58
+ folder.attr('sco-id')
59
+ end
55
60
  end
56
61
  end
57
62
  end
@@ -1,4 +1,4 @@
1
1
  module AdobeConnect
2
2
  # Public: Current Gem version.
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <results>
3
+ <status code="ok"/>
4
+ <shortcuts>
5
+ <sco sco-id="25915" type="user-meetings" tree-id="4930292">
6
+ <domain-name>http://example.com</domain-name>
7
+ </sco>
8
+ <sco sco-id="25916" type="user-courses" tree-id="4930293">
9
+ <domain-name>http://example.com</domain-name>
10
+ </sco>
11
+ </shortcuts>
12
+ </results>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <results>
3
+ <status code="ok"/>
4
+ <shortcuts>
5
+ <sco sco-id="25915" type="my-meetings" tree-id="4930292">
6
+ <domain-name>http://example.com</domain-name>
7
+ </sco>
8
+ <sco sco-id="25916" type="user-courses" tree-id="4930293">
9
+ <domain-name>http://example.com</domain-name>
10
+ </sco>
11
+ </shortcuts>
12
+ </results>
@@ -11,6 +11,9 @@ class AdobeConnectMeetingFolderTest < AdobeConnectTestCase
11
11
  FOLDER_SUCCESS = File.read(File.expand_path('../../fixtures/folder_success.xml', File.dirname(__FILE__)))
12
12
  FOLDER_CONTENTS = File.read(File.expand_path('../../fixtures/folder_contents.xml', File.dirname(__FILE__)))
13
13
 
14
+ MY_MEETINGS_SUCCESS = File.read(File.expand_path('../../fixtures/folder_my_meetings_success.xml', File.dirname(__FILE__)))
15
+ MY_MEETINGS_FAILURE = File.read(File.expand_path('../../fixtures/folder_my_meetings_failure.xml', File.dirname(__FILE__)))
16
+
14
17
  def setup
15
18
  @folder = AdobeConnect::MeetingFolder.new('1', 'test folder', '/test-meeting/')
16
19
  end
@@ -54,4 +57,30 @@ class AdobeConnectMeetingFolderTest < AdobeConnectTestCase
54
57
 
55
58
  assert_equal @folder.contents.xpath('//sco').length, 10
56
59
  end
60
+
61
+ def test_my_meetings_folder_id_handles_when_no_my_meetings_folder_is_present
62
+ ac_response = mock_ac_response(MY_MEETINGS_FAILURE)
63
+
64
+ AdobeConnect::Service.any_instance.
65
+ expects(:request).
66
+ with('sco-shortcuts', {}).
67
+ returns(ac_response)
68
+
69
+ folder_id = AdobeConnect::MeetingFolder.my_meetings_folder_id
70
+
71
+ assert_equal folder_id, nil
72
+ end
73
+
74
+ def test_my_meetings_folder_id_returns_id_when_present
75
+ ac_response = mock_ac_response(MY_MEETINGS_SUCCESS)
76
+
77
+ AdobeConnect::Service.any_instance.
78
+ expects(:request).
79
+ with('sco-shortcuts', {}).
80
+ returns(ac_response)
81
+
82
+ folder_id = AdobeConnect::MeetingFolder.my_meetings_folder_id
83
+
84
+ assert_equal folder_id, '25915'
85
+ end
57
86
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adobe_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Pendleton
8
+ - Isaiah Fischer
9
+ - Leon Miller-Out
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2015-04-23 00:00:00.000000000 Z
13
+ date: 2016-01-19 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: activesupport
@@ -145,6 +147,8 @@ dependencies:
145
147
  description: An API wrapper for interacting with Adobe Connect services.
146
148
  email:
147
149
  - zachpendleton@gmail.com
150
+ - isaiah@singlebrook.com
151
+ - leon@singlebrook.com
148
152
  executables:
149
153
  - adobe_connect_console
150
154
  extensions: []
@@ -176,6 +180,8 @@ files:
176
180
  - test/fixtures/acl_field_save_success.xml
177
181
  - test/fixtures/acl_field_update_success.xml
178
182
  - test/fixtures/folder_contents.xml
183
+ - test/fixtures/folder_my_meetings_failure.xml
184
+ - test/fixtures/folder_my_meetings_success.xml
179
185
  - test/fixtures/folder_success.xml
180
186
  - test/fixtures/generic_success.xml
181
187
  - test/fixtures/group_is_member.xml
@@ -231,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
237
  version: '0'
232
238
  requirements: []
233
239
  rubyforge_project:
234
- rubygems_version: 2.2.2
240
+ rubygems_version: 2.4.5.1
235
241
  signing_key:
236
242
  specification_version: 4
237
243
  summary: An API wrapper for Adobe Connect services.
@@ -240,6 +246,8 @@ test_files:
240
246
  - test/fixtures/acl_field_save_success.xml
241
247
  - test/fixtures/acl_field_update_success.xml
242
248
  - test/fixtures/folder_contents.xml
249
+ - test/fixtures/folder_my_meetings_failure.xml
250
+ - test/fixtures/folder_my_meetings_success.xml
243
251
  - test/fixtures/folder_success.xml
244
252
  - test/fixtures/generic_success.xml
245
253
  - test/fixtures/group_is_member.xml