RubyApp 0.0.14 → 0.0.15

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,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.14)
4
+ RubyApp (0.0.15)
5
5
  BlueCloth
6
6
  chronic_duration
7
7
  facets
@@ -57,11 +57,7 @@ module RubyApp
57
57
  end
58
58
 
59
59
  def create_identity_from_response(response)
60
- self.create_identity_from_url(response.identity_url)
61
- end
62
-
63
- def create_identity_from_url(url, data = {})
64
- RubyApp::Session::Identity.new(url, data)
60
+ RubyApp::Session::Identity.new(response.identity_url)
65
61
  end
66
62
 
67
63
  end
@@ -12,10 +12,10 @@ module RubyApp
12
12
  module Authentication
13
13
 
14
14
  module OpenID
15
- require 'ruby_app/elements/pages/authentication/open_id/authentication_page'
15
+ require 'ruby_app/elements/pages/authentication/open_id/email_authentication_page'
16
16
  require 'ruby_app/session'
17
17
 
18
- class AXAuthenticationPage < RubyApp::Elements::Pages::Authentication::OpenID::AuthenticationPage
18
+ class AXAuthenticationPage < RubyApp::Elements::Pages::Authentication::OpenID::EmailAuthenticationPage
19
19
 
20
20
  template_path(:all, File.dirname(__FILE__))
21
21
 
@@ -32,8 +32,7 @@ module RubyApp
32
32
  def create_identity_from_response(response)
33
33
  ax_response = ::OpenID::AX::FetchResponse.from_success_response(response)
34
34
  if ax_response
35
- self.create_identity_from_url(response.identity_url,
36
- :email => ax_response.data[self.configure.attributes.email].first)
35
+ self.create_identity_from_email(ax_response.data[self.configure.attributes.email].first)
37
36
  else
38
37
  super(response)
39
38
  end
@@ -0,0 +1,35 @@
1
+ module RubyApp
2
+
3
+ module Elements
4
+
5
+ module Pages
6
+
7
+ module Authentication
8
+
9
+ module OpenID
10
+ require 'ruby_app/elements/pages/authentication/open_id/authentication_page'
11
+ require 'ruby_app/session'
12
+
13
+ class EmailAuthenticationPage < RubyApp::Elements::Pages::Authentication::OpenID::AuthenticationPage
14
+
15
+ template_path(:all, File.dirname(__FILE__))
16
+
17
+ def initialize(identifier)
18
+ super(identifier)
19
+ end
20
+
21
+ def create_identity_from_email(email)
22
+ RubyApp::Session::Identity.new(email)
23
+ end
24
+
25
+ end
26
+
27
+ end
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+
35
+ end
@@ -12,10 +12,10 @@ module RubyApp
12
12
  module Authentication
13
13
 
14
14
  module OpenID
15
- require 'ruby_app/elements/pages/authentication/open_id/authentication_page'
15
+ require 'ruby_app/elements/pages/authentication/open_id/email_authentication_page'
16
16
  require 'ruby_app/session'
17
17
 
18
- class SRegAuthenticationPage < RubyApp::Elements::Pages::Authentication::OpenID::AuthenticationPage
18
+ class SRegAuthenticationPage < RubyApp::Elements::Pages::Authentication::OpenID::EmailAuthenticationPage
19
19
 
20
20
  template_path(:all, File.dirname(__FILE__))
21
21
 
@@ -32,8 +32,7 @@ module RubyApp
32
32
  def create_identity_from_response(response)
33
33
  sreg_response = ::OpenID::SReg::Response.from_success_response(response)
34
34
  unless sreg_response.empty?
35
- create_identity_from_url(response.identity_url,
36
- :email => sreg_response.data['email'])
35
+ self.create_identity_from_email(sreg_response.data['email'])
37
36
  else
38
37
  super(response)
39
38
  end
@@ -12,17 +12,11 @@ module RubyApp
12
12
  extend RubyApp::Mixins::TranslateMixin
13
13
 
14
14
  class Identity
15
- include RubyApp::Mixins::HashMixin
16
15
 
17
16
  attr_reader :url
18
17
 
19
- def initialize(url, data = {})
18
+ def initialize(url)
20
19
  @url = url
21
- @data = data
22
- end
23
-
24
- def [](key)
25
- @data[key]
26
20
  end
27
21
 
28
22
  end
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyApp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 14
10
- version: 0.0.14
9
+ - 15
10
+ version: 0.0.15
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-28 00:00:00 Z
18
+ date: 2011-11-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -421,6 +421,7 @@ files:
421
421
  - lib/ruby_app/elements/pages/authentication/open_id/authentication_page.js.haml
422
422
  - lib/ruby_app/elements/pages/authentication/open_id/authentication_page.rb
423
423
  - lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb
424
+ - lib/ruby_app/elements/pages/authentication/open_id/email_authentication_page.rb
424
425
  - lib/ruby_app/elements/pages/authentication/open_id/google_authentication_page.rb
425
426
  - lib/ruby_app/elements/pages/authentication/open_id/my_open_id_authentication_page.rb
426
427
  - lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb