garb 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Garb
3
3
 
4
4
  def self.login(email, password, opts={})
5
5
  @email = email
6
- auth_request = AuthenticationRequest.new(email, password)
6
+ auth_request = AuthenticationRequest.new(email, password, opts)
7
7
  @auth_token = auth_request.auth_token(opts)
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ module Garb
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 3
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
@@ -7,17 +7,18 @@ module Garb
7
7
 
8
8
  should "be able retrieve an auth_token for a user" do
9
9
  auth_request = mock {|m| m.expects(:auth_token).with({}).returns('toke') }
10
- AuthenticationRequest.expects(:new).with('email', 'password').returns(auth_request)
10
+ AuthenticationRequest.expects(:new).with('email', 'password', {}).returns(auth_request)
11
11
 
12
12
  Session.login('email', 'password')
13
13
  assert_equal 'toke', Session.auth_token
14
14
  end
15
15
 
16
16
  should "be able retrieve an auth_token for a user with secure ssl" do
17
- auth_request = mock {|m| m.expects(:auth_token).with({:secure => true}).returns('toke') }
18
- AuthenticationRequest.expects(:new).with('email', 'password').returns(auth_request)
17
+ opts = {:secure => true, :account_type => 'GOOGLE'}
18
+ auth_request = mock {|m| m.expects(:auth_token).with(opts).returns('toke') }
19
+ AuthenticationRequest.expects(:new).with('email', 'password', opts).returns(auth_request)
19
20
 
20
- Session.login('email', 'password', :secure => true)
21
+ Session.login('email', 'password', opts)
21
22
  assert_equal 'toke', Session.auth_token
22
23
  end
23
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Pitale
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-10-26 00:00:00 -04:00
13
+ date: 2009-10-27 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency