RubyApp 0.6.32 → 0.6.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,10 +50,6 @@ module RubyApp
50
50
 
51
51
  end
52
52
 
53
- def create_identity_from_me(me)
54
- RubyApp::Session::Identity.new(me['email'])
55
- end
56
-
57
53
  end
58
54
 
59
55
  end
@@ -39,9 +39,7 @@ module RubyApp
39
39
  code = RubyApp::Request.query['code']
40
40
  access_token = @client.auth_code.get_token(code, :redirect_uri => RubyApp::Request.url)
41
41
  RubyApp::Log.debug("OAUTH token=#{access_token.token.inspect}")
42
- user = JSON.parse(access_token.get('/user').body)
43
- RubyApp::Log.debug("OAUTH user=#{user.inspect}")
44
- RubyApp::Session.identity = self.create_identity_from_user(user)
42
+ RubyApp::Session.identity = self.create_identity_from_access_token(access_token)
45
43
  RubyApp::Session.documents.pop
46
44
  event.go('/')
47
45
  end
@@ -49,10 +47,6 @@ module RubyApp
49
47
 
50
48
  end
51
49
 
52
- def create_identity_from_user(user)
53
- RubyApp::Session::Identity.new(user['email'])
54
- end
55
-
56
50
  end
57
51
 
58
52
  end
@@ -26,6 +26,12 @@ module RubyApp
26
26
  super(access_key, secret_key, _scope, _options)
27
27
  end
28
28
 
29
+ def create_identity_from_access_token(access_token)
30
+ user = JSON.parse(access_token.get('/user').body)
31
+ RubyApp::Log.debug("GITHUB user=#{user.inspect}")
32
+ RubyApp::Session.identity = RubyApp::Session::Identity.new(user['email'])
33
+ end
34
+
29
35
  end
30
36
 
31
37
  end
@@ -1,4 +1,5 @@
1
1
  load_script! 'default'
2
+ load_script! 'elements/authentications/facebook'
2
3
  load_script! 'elements/authentications/o_auth/git_hub'
3
4
  load_script! 'elements/buttons'
4
5
  load_script! 'elements/calendars/month'
@@ -0,0 +1,8 @@
1
+ load_script! 'common/features/authentications'
2
+
3
+ add_step! (RubyApp::Element::Event) { |event| event.assert_exists_link('Facebook') }
4
+ #add_step! (RubyApp::Element::AssertedEvent) { |event| event.click_link('Facebook') }
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 {} }
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.6.32"
2
+ VERSION = "0.6.33"
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: 71
4
+ hash: 69
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 32
10
- version: 0.6.32
9
+ - 33
10
+ version: 0.6.33
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -585,6 +585,7 @@ files:
585
585
  - lib/ruby_app/scripts/common/features/authentications.rb
586
586
  - lib/ruby_app/scripts/common/reset.rb
587
587
  - lib/ruby_app/scripts/default.rb
588
+ - lib/ruby_app/scripts/elements/authentications/facebook.rb
588
589
  - lib/ruby_app/scripts/elements/authentications/o_auth/git_hub.rb
589
590
  - lib/ruby_app/scripts/elements/buttons.rb
590
591
  - lib/ruby_app/scripts/elements/calendars/month.rb