RubyApp 0.6.33 → 0.6.34
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.
- data/lib/ruby_app/elements.rb +0 -4
- data/lib/ruby_app/elements/mobile/default/features/authentications/default_page.css.haml +1 -5
- data/lib/ruby_app/elements/mobile/default/features/authentications/default_page.js.haml +1 -5
- data/lib/ruby_app/elements/mobile/default/features/authentications/default_page.rb +6 -10
- data/lib/ruby_app/elements/mobile/documents/authentication/facebook/authentication_document.rb +2 -1
- data/lib/ruby_app/elements/mobile/documents/authentication/facebook/email_authentication_document.rb +6 -2
- data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/authentication_document.rb +3 -3
- data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/email_authentication_document.rb +38 -0
- data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/git_hub_authentication_document.rb +6 -6
- data/lib/ruby_app/elements/mobile/documents/authentication/open_id/authentication_document.rb +1 -1
- data/lib/ruby_app/elements/mobile/documents/authentication/open_id/ax_authentication_document.rb +2 -2
- data/lib/ruby_app/elements/mobile/documents/authentication/open_id/email_authentication_document.rb +1 -1
- data/lib/ruby_app/elements/mobile/documents/authentication/open_id/my_open_id_authentication_document.rb +2 -2
- data/lib/ruby_app/elements/mobile/documents/authentication/open_id/{sreg_authentication_document.rb → s_reg_authentication_document.rb} +3 -3
- data/lib/ruby_app/elements/mobile/documents/authentication/open_id/yahoo_authentication_document.rb +2 -2
- data/lib/ruby_app/scripts/all_once.rb +3 -0
- data/lib/ruby_app/scripts/elements/authentications/facebook.rb +4 -3
- data/lib/ruby_app/scripts/elements/authentications/open_id/google.rb +8 -0
- data/lib/ruby_app/scripts/elements/authentications/open_id/my_open_id.rb +8 -0
- data/lib/ruby_app/scripts/elements/authentications/open_id/yahoo.rb +8 -0
- data/lib/ruby_app/version.rb +1 -1
- metadata +8 -24
- data/lib/ruby_app/elements/mobile/buttons/facebook_button.css.haml +0 -5
- data/lib/ruby_app/elements/mobile/buttons/facebook_button.rb +0 -27
- data/lib/ruby_app/elements/mobile/buttons/git_hub_button.css.haml +0 -5
- data/lib/ruby_app/elements/mobile/buttons/git_hub_button.rb +0 -27
- data/lib/ruby_app/elements/mobile/buttons/google_button.css.haml +0 -5
- data/lib/ruby_app/elements/mobile/buttons/google_button.rb +0 -27
- data/lib/ruby_app/elements/mobile/buttons/my_open_id_button.css.haml +0 -5
- data/lib/ruby_app/elements/mobile/buttons/my_open_id_button.rb +0 -27
- data/lib/ruby_app/elements/mobile/buttons/yahoo_button.css.haml +0 -5
- data/lib/ruby_app/elements/mobile/buttons/yahoo_button.rb +0 -27
- data/lib/ruby_app/resources/elements/mobile/buttons/facebook_button.ico +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/facebook_button.png +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/git_hub_button.ico +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/git_hub_button.png +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/google_button.ico +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/google_button.png +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/my_open_id_button.ico +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/my_open_id_button.png +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/yahoo_button.ico +0 -0
- data/lib/ruby_app/resources/elements/mobile/buttons/yahoo_button.png +0 -0
    
        data/lib/ruby_app/elements.rb
    CHANGED
    
    | @@ -1,9 +1,5 @@ | |
| 1 1 | 
             
            require 'ruby_app/element'
         | 
| 2 2 | 
             
            require 'ruby_app/elements/mobile/button'
         | 
| 3 | 
            -
            require 'ruby_app/elements/mobile/buttons/facebook_button'
         | 
| 4 | 
            -
            require 'ruby_app/elements/mobile/buttons/google_button'
         | 
| 5 | 
            -
            require 'ruby_app/elements/mobile/buttons/my_open_id_button'
         | 
| 6 | 
            -
            require 'ruby_app/elements/mobile/buttons/yahoo_button'
         | 
| 7 3 | 
             
            require 'ruby_app/elements/mobile/calendars/month'
         | 
| 8 4 | 
             
            require 'ruby_app/elements/mobile/click'
         | 
| 9 5 | 
             
            require 'ruby_app/elements/mobile/dialog'
         | 
| @@ -1,7 +1,3 @@ | |
| 1 | 
            -
            = RubyApp::Elements::Mobile:: | 
| 2 | 
            -
            = RubyApp::Elements::Mobile::Buttons::GitHubButton.render(:css)
         | 
| 3 | 
            -
            = RubyApp::Elements::Mobile::Buttons::GoogleButton.render(:css)
         | 
| 4 | 
            -
            = RubyApp::Elements::Mobile::Buttons::MyOpenIDButton.render(:css)
         | 
| 5 | 
            -
            = RubyApp::Elements::Mobile::Buttons::YahooButton.render(:css)
         | 
| 1 | 
            +
            = RubyApp::Elements::Mobile::Button.render(:css)
         | 
| 6 2 | 
             
            = RubyApp::Elements::Mobile::Navigation::BackButton.render(:css)
         | 
| 7 3 | 
             
            = yield
         | 
| @@ -1,7 +1,3 @@ | |
| 1 | 
            -
            = RubyApp::Elements::Mobile:: | 
| 2 | 
            -
            = RubyApp::Elements::Mobile::Buttons::GitHubButton.render(:js)
         | 
| 3 | 
            -
            = RubyApp::Elements::Mobile::Buttons::GoogleButton.render(:js)
         | 
| 4 | 
            -
            = RubyApp::Elements::Mobile::Buttons::MyOpenIDButton.render(:js)
         | 
| 5 | 
            -
            = RubyApp::Elements::Mobile::Buttons::YahooButton.render(:js)
         | 
| 1 | 
            +
            = RubyApp::Elements::Mobile::Button.render(:js)
         | 
| 6 2 | 
             
            = RubyApp::Elements::Mobile::Navigation::BackButton.render(:js)
         | 
| 7 3 | 
             
            = yield
         | 
| @@ -10,11 +10,7 @@ module RubyApp | |
| 10 10 |  | 
| 11 11 | 
             
                      module Authentications
         | 
| 12 12 | 
             
                        require 'ruby_app'
         | 
| 13 | 
            -
                        require 'ruby_app/elements/mobile/ | 
| 14 | 
            -
                        require 'ruby_app/elements/mobile/buttons/git_hub_button'
         | 
| 15 | 
            -
                        require 'ruby_app/elements/mobile/buttons/google_button'
         | 
| 16 | 
            -
                        require 'ruby_app/elements/mobile/buttons/my_open_id_button'
         | 
| 17 | 
            -
                        require 'ruby_app/elements/mobile/buttons/yahoo_button'
         | 
| 13 | 
            +
                        require 'ruby_app/elements/mobile/button'
         | 
| 18 14 | 
             
                        require 'ruby_app/elements/mobile/documents/authentication/facebook/email_authentication_document'
         | 
| 19 15 | 
             
                        require 'ruby_app/elements/mobile/documents/authentication/o_auth/git_hub_authentication_document'
         | 
| 20 16 | 
             
                        require 'ruby_app/elements/mobile/documents/authentication/open_id/google_authentication_document'
         | 
| @@ -32,31 +28,31 @@ module RubyApp | |
| 32 28 |  | 
| 33 29 | 
             
                            @back_button = RubyApp::Elements::Mobile::Navigation::BackButton.new
         | 
| 34 30 |  | 
| 35 | 
            -
                            @github_authentication_link = RubyApp::Elements::Mobile:: | 
| 31 | 
            +
                            @github_authentication_link = RubyApp::Elements::Mobile::Button.new
         | 
| 36 32 | 
             
                            @github_authentication_link.clicked do |element, event|
         | 
| 37 33 | 
             
                              RubyApp::Session.documents.push(RubyApp::Elements::Mobile::Documents::Authentication::OAuth::GitHubAuthenticationDocument.new)
         | 
| 38 34 | 
             
                              event.refresh_browser
         | 
| 39 35 | 
             
                            end
         | 
| 40 36 |  | 
| 41 | 
            -
                            @facebook_authentication_link = RubyApp::Elements::Mobile:: | 
| 37 | 
            +
                            @facebook_authentication_link = RubyApp::Elements::Mobile::Button.new
         | 
| 42 38 | 
             
                            @facebook_authentication_link.clicked do |element, event|
         | 
| 43 39 | 
             
                              RubyApp::Session.documents.push(RubyApp::Elements::Mobile::Documents::Authentication::Facebook::EmailAuthenticationDocument.new)
         | 
| 44 40 | 
             
                              event.refresh_browser
         | 
| 45 41 | 
             
                            end
         | 
| 46 42 |  | 
| 47 | 
            -
                            @google_authentication_link = RubyApp::Elements::Mobile:: | 
| 43 | 
            +
                            @google_authentication_link = RubyApp::Elements::Mobile::Button.new
         | 
| 48 44 | 
             
                            @google_authentication_link.clicked do |element, event|
         | 
| 49 45 | 
             
                              RubyApp::Session.documents.push(RubyApp::Elements::Mobile::Documents::Authentication::OpenId::GoogleAuthenticationDocument.new)
         | 
| 50 46 | 
             
                              event.refresh_browser
         | 
| 51 47 | 
             
                            end
         | 
| 52 48 |  | 
| 53 | 
            -
                            @my_open_id_authentication_link = RubyApp::Elements::Mobile:: | 
| 49 | 
            +
                            @my_open_id_authentication_link = RubyApp::Elements::Mobile::Button.new
         | 
| 54 50 | 
             
                            @my_open_id_authentication_link.clicked do |element, event|
         | 
| 55 51 | 
             
                              RubyApp::Session.documents.push(RubyApp::Elements::Mobile::Documents::Authentication::OpenId::MyOpenIdAuthenticationDocument.new)
         | 
| 56 52 | 
             
                              event.refresh_browser
         | 
| 57 53 | 
             
                            end
         | 
| 58 54 |  | 
| 59 | 
            -
                            @yahoo_authentication_link = RubyApp::Elements::Mobile:: | 
| 55 | 
            +
                            @yahoo_authentication_link = RubyApp::Elements::Mobile::Button.new
         | 
| 60 56 | 
             
                            @yahoo_authentication_link.clicked do |element, event|
         | 
| 61 57 | 
             
                              RubyApp::Session.documents.push(RubyApp::Elements::Mobile::Documents::Authentication::OpenId::YahooAuthenticationDocument.new)
         | 
| 62 58 | 
             
                              event.refresh_browser
         | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/facebook/authentication_document.rb
    CHANGED
    
    | @@ -27,11 +27,12 @@ module RubyApp | |
| 27 27 | 
             
                            self.loaded do |element, event|
         | 
| 28 28 |  | 
| 29 29 | 
             
                              unless @authentication
         | 
| 30 | 
            +
                                RubyApp::Log.debug("FACEBOOK  permissions=#{permissions.inspect}")
         | 
| 30 31 | 
             
                                @authentication = ::Koala::Facebook::OAuth.new(ENV['FACEBOOK_ACCESS_KEY'] || RubyApp::Elements::Mobile::Documents::Authentication::Facebook::AuthenticationDocument.configuration.access_key,
         | 
| 31 32 | 
             
                                                                               ENV['FACEBOOK_SECRET_KEY'] || RubyApp::Elements::Mobile::Documents::Authentication::Facebook::AuthenticationDocument.configuration.secret_key,
         | 
| 32 33 | 
             
                                                                               RubyApp::Request.url)
         | 
| 33 34 | 
             
                                url = @authentication.url_for_oauth_code(:display => 'touch',
         | 
| 34 | 
            -
                                                                         :permissions => permissions)
         | 
| 35 | 
            +
                                                                         :permissions => permissions.is_a?(Array) ? permissions.join(',') : permissions)
         | 
| 35 36 | 
             
                                RubyApp::Log.debug("FACEBOOK  --> #{url.inspect}")
         | 
| 36 37 | 
             
                                event.go(url)
         | 
| 37 38 | 
             
                              else
         | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/facebook/email_authentication_document.rb
    CHANGED
    
    | @@ -17,11 +17,15 @@ module RubyApp | |
| 17 17 | 
             
                          template_path(:all, File.dirname(__FILE__))
         | 
| 18 18 |  | 
| 19 19 | 
             
                          def initialize
         | 
| 20 | 
            -
                            super('email')
         | 
| 20 | 
            +
                            super(['email'])
         | 
| 21 21 | 
             
                          end
         | 
| 22 22 |  | 
| 23 23 | 
             
                          def create_identity_from_me(me)
         | 
| 24 | 
            -
                             | 
| 24 | 
            +
                            return self.create_identity_from_email(me['email'])
         | 
| 25 | 
            +
                          end
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                          def create_identity_from_email(email)
         | 
| 28 | 
            +
                            return RubyApp::Session::Identity.new(email)
         | 
| 25 29 | 
             
                          end
         | 
| 26 30 |  | 
| 27 31 | 
             
                        end
         | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/authentication_document.rb
    CHANGED
    
    | @@ -21,17 +21,17 @@ module RubyApp | |
| 21 21 |  | 
| 22 22 | 
             
                          template_path(:all, File.dirname(__FILE__))
         | 
| 23 23 |  | 
| 24 | 
            -
                          def initialize(access_key, secret_key,  | 
| 24 | 
            +
                          def initialize(access_key, secret_key, scopes, options)
         | 
| 25 25 | 
             
                            super()
         | 
| 26 26 |  | 
| 27 27 | 
             
                            self.loaded do |element, event|
         | 
| 28 28 |  | 
| 29 29 | 
             
                              unless @client
         | 
| 30 | 
            -
                                RubyApp::Log.debug("OAUTH      | 
| 30 | 
            +
                                RubyApp::Log.debug("OAUTH     scopes=#{scopes.inspect}")
         | 
| 31 31 | 
             
                                RubyApp::Log.debug("OAUTH     options=#{options.inspect}")
         | 
| 32 32 | 
             
                                @client = ::OAuth2::Client.new(access_key, secret_key, options)
         | 
| 33 33 | 
             
                                url = @client.auth_code.authorize_url(:redirect_uri => RubyApp::Request.url,
         | 
| 34 | 
            -
                                                                      :scope        =>  | 
| 34 | 
            +
                                                                      :scope        => scopes.is_a?(Array) ? scopes.join(',') : scopes)
         | 
| 35 35 | 
             
                                RubyApp::Log.debug("OAUTH     --> #{url.inspect}")
         | 
| 36 36 | 
             
                                event.go(url)
         | 
| 37 37 | 
             
                              else
         | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/email_authentication_document.rb
    ADDED
    
    | @@ -0,0 +1,38 @@ | |
| 1 | 
            +
            module RubyApp
         | 
| 2 | 
            +
             | 
| 3 | 
            +
              module Elements
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                module Mobile
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                  module Documents
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                    module Authentication
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                      module OAuth
         | 
| 12 | 
            +
                        require 'ruby_app/elements/mobile/documents/authentication/o_auth/authentication_document'
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                        class EmailAuthenticationDocument < RubyApp::Elements::Mobile::Documents::Authentication::OAuth::AuthenticationDocument
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                          template_path(:all, File.dirname(__FILE__))
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                          def initialize(access_key, secret_key, scopes, options)
         | 
| 19 | 
            +
                            super(access_key, secret_key, scopes, options)
         | 
| 20 | 
            +
                          end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                          def create_identity_from_email(email)
         | 
| 23 | 
            +
                            return RubyApp::Session::Identity.new(email)
         | 
| 24 | 
            +
                          end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                        end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                      end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                    end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                  end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
              end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            end
         | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/git_hub_authentication_document.rb
    CHANGED
    
    | @@ -9,27 +9,27 @@ module RubyApp | |
| 9 9 | 
             
                    module Authentication
         | 
| 10 10 |  | 
| 11 11 | 
             
                      module OAuth
         | 
| 12 | 
            -
                        require 'ruby_app/elements/mobile/documents/authentication/o_auth/ | 
| 12 | 
            +
                        require 'ruby_app/elements/mobile/documents/authentication/o_auth/email_authentication_document'
         | 
| 13 13 |  | 
| 14 | 
            -
                        class GitHubAuthenticationDocument < RubyApp::Elements::Mobile::Documents::Authentication::OAuth:: | 
| 14 | 
            +
                        class GitHubAuthenticationDocument < RubyApp::Elements::Mobile::Documents::Authentication::OAuth::EmailAuthenticationDocument
         | 
| 15 15 |  | 
| 16 16 | 
             
                          template_path(:all, File.dirname(__FILE__))
         | 
| 17 17 |  | 
| 18 18 | 
             
                          def initialize(access_key = ENV['GITHUB_ACCESS_KEY'] || RubyApp::Elements::Mobile::Documents::Authentication::OAuth::GitHubAuthenticationDocument.configuration.access_key,
         | 
| 19 19 | 
             
                                         secret_key = ENV['GITHUB_SECRET_KEY'] || RubyApp::Elements::Mobile::Documents::Authentication::OAuth::GitHubAuthenticationDocument.configuration.secret_key,
         | 
| 20 | 
            -
                                          | 
| 20 | 
            +
                                         scopes      = [],
         | 
| 21 21 | 
             
                                         options    = {})
         | 
| 22 | 
            -
                             | 
| 22 | 
            +
                            _scopes = scopes.is_a?(Array) ? ( ['user'] + scopes ) : ( "user,#{scopes}")
         | 
| 23 23 | 
             
                            _options = {:site           => RubyApp::Elements::Mobile::Documents::Authentication::OAuth::GitHubAuthenticationDocument.configuration.url,
         | 
| 24 24 | 
             
                                        :authorize_url  => RubyApp::Elements::Mobile::Documents::Authentication::OAuth::GitHubAuthenticationDocument.configuration.authorize_url,
         | 
| 25 25 | 
             
                                        :token_url      => RubyApp::Elements::Mobile::Documents::Authentication::OAuth::GitHubAuthenticationDocument.configuration.access_token_url}.merge(options)
         | 
| 26 | 
            -
                            super(access_key, secret_key,  | 
| 26 | 
            +
                            super(access_key, secret_key, _scopes, _options)
         | 
| 27 27 | 
             
                          end
         | 
| 28 28 |  | 
| 29 29 | 
             
                          def create_identity_from_access_token(access_token)
         | 
| 30 30 | 
             
                            user = JSON.parse(access_token.get('/user').body)
         | 
| 31 31 | 
             
                            RubyApp::Log.debug("GITHUB    user=#{user.inspect}")
         | 
| 32 | 
            -
                             | 
| 32 | 
            +
                            return self.create_identity_from_email(user['email'])
         | 
| 33 33 | 
             
                          end
         | 
| 34 34 |  | 
| 35 35 | 
             
                        end
         | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/open_id/ax_authentication_document.rb
    CHANGED
    
    | @@ -34,9 +34,9 @@ module RubyApp | |
| 34 34 | 
             
                          def create_identity_from_response(response)
         | 
| 35 35 | 
             
                            ax_response = ::OpenID::AX::FetchResponse.from_success_response(response)
         | 
| 36 36 | 
             
                            if ax_response
         | 
| 37 | 
            -
                              self.create_identity_from_email(ax_response.data[RubyApp::Elements::Mobile::Documents::Authentication::OpenId::AxAuthenticationDocument.configuration.attributes.email].first)
         | 
| 37 | 
            +
                              return self.create_identity_from_email(ax_response.data[RubyApp::Elements::Mobile::Documents::Authentication::OpenId::AxAuthenticationDocument.configuration.attributes.email].first)
         | 
| 38 38 | 
             
                            else
         | 
| 39 | 
            -
                              super(response)
         | 
| 39 | 
            +
                              return super(response)
         | 
| 40 40 | 
             
                            end
         | 
| 41 41 | 
             
                          end
         | 
| 42 42 |  | 
| @@ -9,9 +9,9 @@ module RubyApp | |
| 9 9 | 
             
                    module Authentication
         | 
| 10 10 |  | 
| 11 11 | 
             
                      module OpenId
         | 
| 12 | 
            -
                        require 'ruby_app/elements/mobile/documents/authentication/open_id/ | 
| 12 | 
            +
                        require 'ruby_app/elements/mobile/documents/authentication/open_id/s_reg_authentication_document'
         | 
| 13 13 |  | 
| 14 | 
            -
                        class MyOpenIdAuthenticationDocument < RubyApp::Elements::Mobile::Documents::Authentication::OpenId:: | 
| 14 | 
            +
                        class MyOpenIdAuthenticationDocument < RubyApp::Elements::Mobile::Documents::Authentication::OpenId::SRegAuthenticationDocument
         | 
| 15 15 |  | 
| 16 16 | 
             
                          template_path(:all, File.dirname(__FILE__))
         | 
| 17 17 |  | 
| @@ -17,7 +17,7 @@ module RubyApp | |
| 17 17 | 
             
                        require 'ruby_app'
         | 
| 18 18 | 
             
                        require 'ruby_app/elements/mobile/documents/authentication/open_id/email_authentication_document'
         | 
| 19 19 |  | 
| 20 | 
            -
                        class  | 
| 20 | 
            +
                        class SRegAuthenticationDocument < RubyApp::Elements::Mobile::Documents::Authentication::OpenId::EmailAuthenticationDocument
         | 
| 21 21 |  | 
| 22 22 | 
             
                          template_path(:all, File.dirname(__FILE__))
         | 
| 23 23 |  | 
| @@ -34,9 +34,9 @@ module RubyApp | |
| 34 34 | 
             
                          def create_identity_from_response(response)
         | 
| 35 35 | 
             
                            sreg_response = ::OpenID::SReg::Response.from_success_response(response)
         | 
| 36 36 | 
             
                            unless sreg_response.empty?
         | 
| 37 | 
            -
                              self.create_identity_from_email(sreg_response.data['email'])
         | 
| 37 | 
            +
                              return self.create_identity_from_email(sreg_response.data['email'])
         | 
| 38 38 | 
             
                            else
         | 
| 39 | 
            -
                              super(response)
         | 
| 39 | 
            +
                              return super(response)
         | 
| 40 40 | 
             
                            end
         | 
| 41 41 | 
             
                          end
         | 
| 42 42 |  | 
    
        data/lib/ruby_app/elements/mobile/documents/authentication/open_id/yahoo_authentication_document.rb
    CHANGED
    
    | @@ -28,9 +28,9 @@ module RubyApp | |
| 28 28 | 
             
                          def create_identity_from_response(response)
         | 
| 29 29 | 
             
                            ax_response = ::OpenID::AX::FetchResponse.from_success_response(response)
         | 
| 30 30 | 
             
                            if ax_response
         | 
| 31 | 
            -
                              self.create_identity_from_email(ax_response.data[RubyApp::Elements::Mobile::Documents::Authentication::OpenId::YahooAuthenticationDocument.configuration.attributes.email].first)
         | 
| 31 | 
            +
                              return self.create_identity_from_email(ax_response.data[RubyApp::Elements::Mobile::Documents::Authentication::OpenId::YahooAuthenticationDocument.configuration.attributes.email].first)
         | 
| 32 32 | 
             
                            else
         | 
| 33 | 
            -
                              super(response)
         | 
| 33 | 
            +
                              return super(response)
         | 
| 34 34 | 
             
                            end
         | 
| 35 35 | 
             
                          end
         | 
| 36 36 |  | 
| @@ -1,6 +1,9 @@ | |
| 1 1 | 
             
            load_script! 'default'
         | 
| 2 2 | 
             
            load_script! 'elements/authentications/facebook'
         | 
| 3 3 | 
             
            load_script! 'elements/authentications/o_auth/git_hub'
         | 
| 4 | 
            +
            load_script! 'elements/authentications/open_id/google'
         | 
| 5 | 
            +
            load_script! 'elements/authentications/open_id/my_open_id'
         | 
| 6 | 
            +
            load_script! 'elements/authentications/open_id/yahoo'
         | 
| 4 7 | 
             
            load_script! 'elements/buttons'
         | 
| 5 8 | 
             
            load_script! 'elements/calendars/month'
         | 
| 6 9 | 
             
            load_script! 'elements/dialogs'
         | 
| @@ -1,8 +1,9 @@ | |
| 1 1 | 
             
            load_script! 'common/features/authentications'
         | 
| 2 2 |  | 
| 3 | 
            -
            add_step! (RubyApp::Element::Event)                       { |event| event. | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 3 | 
            +
            add_step! (RubyApp::Element::Event)                       { |event| event.go('/') }
         | 
| 4 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::LoadedEvent)  { |event| event.assert_exists_link('Facebook') }
         | 
| 5 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Facebook') }
         | 
| 6 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::LoadedEvent)  { |event| event.assert_exists_text('You are logged in as') }
         | 
| 6 7 | 
             
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Back') }
         | 
| 7 8 | 
             
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.click_link('Back') }
         | 
| 8 9 | 
             
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.execute {} }
         | 
| @@ -0,0 +1,8 @@ | |
| 1 | 
            +
            load_script! 'common/features/authentications'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            add_step! (RubyApp::Element::Event)                       { |event| event.assert_exists_link('Google') }
         | 
| 4 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Google') }
         | 
| 5 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::LoadedEvent)  { |event| event.assert_exists_text('You are logged in as') }
         | 
| 6 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Back') }
         | 
| 7 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.click_link('Back') }
         | 
| 8 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.execute {} }
         | 
| @@ -0,0 +1,8 @@ | |
| 1 | 
            +
            load_script! 'common/features/authentications'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            add_step! (RubyApp::Element::Event)                       { |event| event.assert_exists_link('myOpenID') }
         | 
| 4 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('myOpenID') }
         | 
| 5 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::LoadedEvent)  { |event| event.assert_exists_text('You are logged in as') }
         | 
| 6 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Back') }
         | 
| 7 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.click_link('Back') }
         | 
| 8 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.execute {} }
         | 
| @@ -0,0 +1,8 @@ | |
| 1 | 
            +
            load_script! 'common/features/authentications'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            add_step! (RubyApp::Element::Event)                       { |event| event.assert_exists_link('Yahoo!') }
         | 
| 4 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Yahoo!') }
         | 
| 5 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::LoadedEvent)  { |event| event.assert_exists_text('You are logged in as') }
         | 
| 6 | 
            +
            add_step! (RubyApp::Element::AssertedEvent)               { |event| event.click_link('Back') }
         | 
| 7 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.click_link('Back') }
         | 
| 8 | 
            +
            add_step! (RubyApp::Elements::Mobile::Page::ShownEvent)   { |event| event.execute {} }
         | 
    
        data/lib/ruby_app/version.rb
    CHANGED
    
    
    
        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:  | 
| 4 | 
            +
              hash: 67
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 6
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.6. | 
| 9 | 
            +
              - 34
         | 
| 10 | 
            +
              version: 0.6.34
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Frank G. Ficnar
         | 
| @@ -324,16 +324,6 @@ files: | |
| 324 324 | 
             
            - lib/ruby_app/element.rb
         | 
| 325 325 | 
             
            - lib/ruby_app/elements.rb
         | 
| 326 326 | 
             
            - lib/ruby_app/elements/mobile/button.rb
         | 
| 327 | 
            -
            - lib/ruby_app/elements/mobile/buttons/facebook_button.css.haml
         | 
| 328 | 
            -
            - lib/ruby_app/elements/mobile/buttons/facebook_button.rb
         | 
| 329 | 
            -
            - lib/ruby_app/elements/mobile/buttons/git_hub_button.css.haml
         | 
| 330 | 
            -
            - lib/ruby_app/elements/mobile/buttons/git_hub_button.rb
         | 
| 331 | 
            -
            - lib/ruby_app/elements/mobile/buttons/google_button.css.haml
         | 
| 332 | 
            -
            - lib/ruby_app/elements/mobile/buttons/google_button.rb
         | 
| 333 | 
            -
            - lib/ruby_app/elements/mobile/buttons/my_open_id_button.css.haml
         | 
| 334 | 
            -
            - lib/ruby_app/elements/mobile/buttons/my_open_id_button.rb
         | 
| 335 | 
            -
            - lib/ruby_app/elements/mobile/buttons/yahoo_button.css.haml
         | 
| 336 | 
            -
            - lib/ruby_app/elements/mobile/buttons/yahoo_button.rb
         | 
| 337 327 | 
             
            - lib/ruby_app/elements/mobile/calendars/month.css.haml
         | 
| 338 328 | 
             
            - lib/ruby_app/elements/mobile/calendars/month.html.haml
         | 
| 339 329 | 
             
            - lib/ruby_app/elements/mobile/calendars/month.js.haml
         | 
| @@ -428,13 +418,14 @@ files: | |
| 428 418 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/facebook/authentication_document.rb
         | 
| 429 419 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/facebook/email_authentication_document.rb
         | 
| 430 420 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/o_auth/authentication_document.rb
         | 
| 421 | 
            +
            - lib/ruby_app/elements/mobile/documents/authentication/o_auth/email_authentication_document.rb
         | 
| 431 422 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/o_auth/git_hub_authentication_document.rb
         | 
| 432 423 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/authentication_document.rb
         | 
| 433 424 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/ax_authentication_document.rb
         | 
| 434 425 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/email_authentication_document.rb
         | 
| 435 426 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/google_authentication_document.rb
         | 
| 436 427 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/my_open_id_authentication_document.rb
         | 
| 437 | 
            -
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/ | 
| 428 | 
            +
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/s_reg_authentication_document.rb
         | 
| 438 429 | 
             
            - lib/ruby_app/elements/mobile/documents/authentication/open_id/yahoo_authentication_document.rb
         | 
| 439 430 | 
             
            - lib/ruby_app/elements/mobile/documents/mail_document.html.haml
         | 
| 440 431 | 
             
            - lib/ruby_app/elements/mobile/documents/mail_document.rb
         | 
| @@ -561,16 +552,6 @@ files: | |
| 561 552 | 
             
            - lib/ruby_app/rack/route.rb
         | 
| 562 553 | 
             
            - lib/ruby_app/rack/session.rb
         | 
| 563 554 | 
             
            - lib/ruby_app/request.rb
         | 
| 564 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/facebook_button.ico
         | 
| 565 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/facebook_button.png
         | 
| 566 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/git_hub_button.ico
         | 
| 567 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/git_hub_button.png
         | 
| 568 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/google_button.ico
         | 
| 569 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/google_button.png
         | 
| 570 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/my_open_id_button.ico
         | 
| 571 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/my_open_id_button.png
         | 
| 572 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/yahoo_button.ico
         | 
| 573 | 
            -
            - lib/ruby_app/resources/elements/mobile/buttons/yahoo_button.png
         | 
| 574 555 | 
             
            - lib/ruby_app/resources/elements/mobile/document/document.js
         | 
| 575 556 | 
             
            - lib/ruby_app/resources/elements/mobile/document/jquery.ui.touch-punch.min.js
         | 
| 576 557 | 
             
            - lib/ruby_app/resources/elements/mobile/platforms/ios/document/apple-touch-icon.png
         | 
| @@ -587,6 +568,9 @@ files: | |
| 587 568 | 
             
            - lib/ruby_app/scripts/default.rb
         | 
| 588 569 | 
             
            - lib/ruby_app/scripts/elements/authentications/facebook.rb
         | 
| 589 570 | 
             
            - lib/ruby_app/scripts/elements/authentications/o_auth/git_hub.rb
         | 
| 571 | 
            +
            - lib/ruby_app/scripts/elements/authentications/open_id/google.rb
         | 
| 572 | 
            +
            - lib/ruby_app/scripts/elements/authentications/open_id/my_open_id.rb
         | 
| 573 | 
            +
            - lib/ruby_app/scripts/elements/authentications/open_id/yahoo.rb
         | 
| 590 574 | 
             
            - lib/ruby_app/scripts/elements/buttons.rb
         | 
| 591 575 | 
             
            - lib/ruby_app/scripts/elements/calendars/month.rb
         | 
| 592 576 | 
             
            - lib/ruby_app/scripts/elements/dialogs.rb
         | 
| @@ -1,27 +0,0 @@ | |
| 1 | 
            -
            module RubyApp
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              module Elements
         | 
| 4 | 
            -
             | 
| 5 | 
            -
                module Mobile
         | 
| 6 | 
            -
             | 
| 7 | 
            -
                  module Buttons
         | 
| 8 | 
            -
                    require 'ruby_app/elements/mobile/button'
         | 
| 9 | 
            -
             | 
| 10 | 
            -
                    class FacebookButton < RubyApp::Elements::Mobile::Button
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                      template_path(:all, File.dirname(__FILE__))
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                      def initialize
         | 
| 15 | 
            -
                        super
         | 
| 16 | 
            -
                        self.attributes.merge!('data-icon' => 'facebook')
         | 
| 17 | 
            -
                      end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                    end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                end
         | 
| 24 | 
            -
             | 
| 25 | 
            -
              end
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            end
         | 
| @@ -1,27 +0,0 @@ | |
| 1 | 
            -
            module RubyApp
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              module Elements
         | 
| 4 | 
            -
             | 
| 5 | 
            -
                module Mobile
         | 
| 6 | 
            -
             | 
| 7 | 
            -
                  module Buttons
         | 
| 8 | 
            -
                    require 'ruby_app/elements/mobile/button'
         | 
| 9 | 
            -
             | 
| 10 | 
            -
                    class GitHubButton < RubyApp::Elements::Mobile::Button
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                      template_path(:all, File.dirname(__FILE__))
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                      def initialize
         | 
| 15 | 
            -
                        super
         | 
| 16 | 
            -
                        self.attributes.merge!('data-icon' => 'git-hub')
         | 
| 17 | 
            -
                      end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                    end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                end
         | 
| 24 | 
            -
             | 
| 25 | 
            -
              end
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            end
         | 
| @@ -1,27 +0,0 @@ | |
| 1 | 
            -
            module RubyApp
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              module Elements
         | 
| 4 | 
            -
             | 
| 5 | 
            -
                module Mobile
         | 
| 6 | 
            -
             | 
| 7 | 
            -
                  module Buttons
         | 
| 8 | 
            -
                    require 'ruby_app/elements/mobile/button'
         | 
| 9 | 
            -
             | 
| 10 | 
            -
                    class GoogleButton < RubyApp::Elements::Mobile::Button
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                      template_path(:all, File.dirname(__FILE__))
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                      def initialize
         | 
| 15 | 
            -
                        super
         | 
| 16 | 
            -
                        self.attributes.merge!('data-icon' => 'google')
         | 
| 17 | 
            -
                      end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                    end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                end
         | 
| 24 | 
            -
             | 
| 25 | 
            -
              end
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            end
         | 
| @@ -1,27 +0,0 @@ | |
| 1 | 
            -
            module RubyApp
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              module Elements
         | 
| 4 | 
            -
             | 
| 5 | 
            -
                module Mobile
         | 
| 6 | 
            -
             | 
| 7 | 
            -
                  module Buttons
         | 
| 8 | 
            -
                    require 'ruby_app/elements/mobile/button'
         | 
| 9 | 
            -
             | 
| 10 | 
            -
                    class MyOpenIDButton < RubyApp::Elements::Mobile::Button
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                      template_path(:all, File.dirname(__FILE__))
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                      def initialize
         | 
| 15 | 
            -
                        super
         | 
| 16 | 
            -
                        self.attributes.merge!('data-icon' => 'myopenid')
         | 
| 17 | 
            -
                      end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                    end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                end
         | 
| 24 | 
            -
             | 
| 25 | 
            -
              end
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            end
         | 
| @@ -1,27 +0,0 @@ | |
| 1 | 
            -
            module RubyApp
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              module Elements
         | 
| 4 | 
            -
             | 
| 5 | 
            -
                module Mobile
         | 
| 6 | 
            -
             | 
| 7 | 
            -
                  module Buttons
         | 
| 8 | 
            -
                    require 'ruby_app/elements/mobile/button'
         | 
| 9 | 
            -
             | 
| 10 | 
            -
                    class YahooButton < RubyApp::Elements::Mobile::Button
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                      template_path(:all, File.dirname(__FILE__))
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                      def initialize
         | 
| 15 | 
            -
                        super
         | 
| 16 | 
            -
                        self.attributes.merge!('data-icon' => 'yahoo')
         | 
| 17 | 
            -
                      end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                    end
         | 
| 20 | 
            -
             | 
| 21 | 
            -
                  end
         | 
| 22 | 
            -
             | 
| 23 | 
            -
                end
         | 
| 24 | 
            -
             | 
| 25 | 
            -
              end
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            end
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file |