knock-knock 0.1.4 → 0.1.5

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.
@@ -1,3 +1,7 @@
1
+ == 0.1.5 2008-12-24
2
+ * New features
3
+ * Connection with any Google Accounts, even Hosted Google Accounts
4
+
1
5
  == 0.1.4 2008-12-08
2
6
 
3
7
  * New features
@@ -6,6 +6,7 @@ KnockKnock was made to turn login with Google Authentication API easier.
6
6
  * Singleton class for connection with Google.
7
7
  * Simple authentication and clear code.
8
8
  * GET, POST, PUT, DELETE method implemented
9
+ * Connection with any Google Account, even (Hosted Google Accounts)[http://google.com/a]
9
10
 
10
11
  == Synopsis
11
12
 
@@ -14,7 +15,7 @@ KnockKnock was made to turn login with Google Authentication API easier.
14
15
 
15
16
  include Bubble::KnockKnock
16
17
 
17
- Connection.connect('email@gmail.com', 'password', 'cp')
18
+ Connection.instance.connect('email@gmail.com', 'password', 'cp')
18
19
 
19
20
  print Request.get('http://www.google.com/m8/feeds/contacts/email%40gmail.com/full')
20
21
 
@@ -22,6 +23,9 @@ KnockKnock was made to turn login with Google Authentication API easier.
22
23
 
23
24
  sudo gem install knock-knock
24
25
 
26
+ == Contributors
27
+ * (Jonathan Towell)[http://moxiemachine.com/blog]
28
+
25
29
  == License
26
30
 
27
31
  (The MIT License)
@@ -43,10 +43,11 @@ module Bubble
43
43
  protected
44
44
 
45
45
  # It gives the correct values to attributes and variables required to make the connection.
46
+ # You can connect with any Google Account, even it's a hosted account (thanks, Jonathan Towell)
46
47
  def setup
47
48
  @uri = URI.parse('https://www.google.com/accounts/ClientLogin')
48
49
 
49
- @query = { 'accountType' => 'GOOGLE',
50
+ @query = { 'accountType' => 'HOSTED_OR_GOOGLE',
50
51
  'Email' => @email,
51
52
  'Passwd' => @password,
52
53
  'service' => @service,
@@ -88,7 +88,7 @@ module Bubble
88
88
  end
89
89
 
90
90
  @http = Net::HTTP.new(@uri.host, 443)
91
- @http.use_ssl = true
91
+ @http.use_ssl = true
92
92
  end
93
93
 
94
94
  # Responsible by makes the right request when the developer points the HTTP Method (Post, Get), adding the parameters and the right header.
@@ -9,7 +9,7 @@ module Bubble
9
9
 
10
10
  # For more information take a look at the README
11
11
  module KnockKnock
12
- VERSION = '0.1.4'
12
+ VERSION = '0.1.5'
13
13
  APP_NAME = 'KnockKnock Ruby Gem'
14
14
  end
15
15
  end
@@ -12,6 +12,11 @@ class TestKnockKnock < Test::Unit::TestCase # :nodoc:
12
12
  assert_raise(BadLogin) { @kk.connect('test@gmail.com', 'password', 'xapi') }
13
13
 
14
14
  @kk.connect('bubble.testing@gmail.com', 'bubblerocks', 'cp')
15
+ assert google = @kk.auth
16
+
17
+ # Test with a hosted Google Account
18
+ @kk.connect('test@bubble.com.br', 'B48938', 'cp')
15
19
  assert @kk.auth
20
+ assert @kk.auth != google
16
21
  end
17
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knock-knock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Azisaka Maciel
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-08 00:00:00 -02:00
12
+ date: 2008-12-24 00:00:00 -02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency