adobe_connect 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .ruby-version
File without changes
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.3'
12
+ gem 'adobe_connect', '0.0.4'
13
13
 
14
14
  And then run:
15
15
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency 'activesupport', '>= 2.3.16'
21
21
  gem.add_dependency 'nokogiri', '~> 1.5.6'
22
22
  gem.add_dependency 'pry', '>= 0.9.11.4'
23
- gem.add_dependency 'rake', '~> 10.0.3'
23
+ gem.add_dependency 'rake', '>= 0.9.2'
24
24
 
25
25
  gem.add_development_dependency 'minitest', '~> 4.6.0'
26
26
  gem.add_development_dependency 'mocha', '~> 0.13.2'
@@ -10,7 +10,7 @@ module AdobeConnect
10
10
  end
11
11
 
12
12
  def contents
13
- service.sco_contents(sco_id: id)
13
+ service.sco_contents(:sco_id => id)
14
14
  end
15
15
 
16
16
  def self.find(name, service = AdobeConnect::Service.new)
@@ -7,7 +7,7 @@ module AdobeConnect
7
7
  end
8
8
 
9
9
  def format
10
- params.inject(['']) do |array, param|
10
+ params.sort_by { |k, v| k.to_s }.inject(['']) do |array, param|
11
11
  key, value = param.map { |p| ERB::Util.url_encode(p) }
12
12
  array << "#{key.dasherize}=#{value}"
13
13
  end.join('&')
@@ -12,7 +12,8 @@ module AdobeConnect
12
12
  def log_in
13
13
  response = request('login', { :login => username, :password => password }, false)
14
14
  if response.at_xpath('//status').attr('code') == 'ok'
15
- @session = response.fetch('set-cookie').match(/(?<=BREEZESESSION=)[^;]+/)[0]
15
+ session_regex = /BREEZESESSION=([^;]+)/
16
+ @session = response.fetch('set-cookie').match(session_regex)[1]
16
17
  @authenticated = true
17
18
  else
18
19
  false
@@ -1,3 +1,3 @@
1
1
  module AdobeConnect
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -7,23 +7,27 @@ class AdobeConnectParamFormatterTest < MiniTest::Unit::TestCase
7
7
  @query_string = @formatter.format
8
8
  end
9
9
 
10
- def test_it_should_format_params_hash_to_a_string
10
+ def test_format_formats_params_hash_to_a_string
11
11
  assert_instance_of String, @query_string
12
12
  end
13
13
 
14
- def test_it_should_include_basic_params
14
+ def test_format_includes_basic_params
15
15
  assert_match Regexp.new('a=1'), @query_string
16
16
  end
17
17
 
18
- def test_it_should_escape_params
18
+ def test_format_sorts_params_alphabetically
19
+ assert_match Regexp.new('a=.+b=.+dashed\-value'), @query_string
20
+ end
21
+
22
+ def test_format_escapes_params
19
23
  assert_match Regexp.new('b=param%20value'), @query_string
20
24
  end
21
25
 
22
- def test_it_should_dasherize_underscored_keys
26
+ def test_format_dasherizes_underscored_keys
23
27
  assert_match Regexp.new('dashed-value'), @query_string
24
28
  end
25
29
 
26
- def test_it_should_include_a_leading_ampersand
30
+ def test_format_includes_a_leading_ampersand
27
31
  assert_match Regexp.new('^&'), @query_string
28
32
  end
29
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adobe_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-11 00:00:00.000000000 Z
12
+ date: 2013-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -64,17 +64,17 @@ dependencies:
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
- - - ~>
67
+ - - ! '>='
68
68
  - !ruby/object:Gem::Version
69
- version: 10.0.3
69
+ version: 0.9.2
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ~>
75
+ - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
- version: 10.0.3
77
+ version: 0.9.2
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: minitest
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -148,6 +148,7 @@ extensions: []
148
148
  extra_rdoc_files: []
149
149
  files:
150
150
  - .gitignore
151
+ - .travis.yml
151
152
  - Gemfile
152
153
  - LICENSE.txt
153
154
  - README.md
@@ -177,7 +178,6 @@ files:
177
178
  - test/lib/adobe_connect/service_test.rb
178
179
  - test/lib/adobe_connect/user_test.rb
179
180
  - test/test_helper.rb
180
- - travis.yml
181
181
  homepage: https://github.com/zachpendleton/adobe_connect
182
182
  licenses: []
183
183
  post_install_message: