RubyApp 0.6.38 → 0.6.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. data/lib/ruby_app/elements/mobile/default/default_page.css.haml +1 -1
  2. data/lib/ruby_app/elements/mobile/default/default_page.html.haml +2 -0
  3. data/lib/ruby_app/elements/mobile/default/default_page.js.haml +1 -0
  4. data/lib/ruby_app/elements/mobile/default/default_page.rb +4 -0
  5. data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/authentication_document.rb +3 -3
  6. data/lib/ruby_app/elements/mobile/documents/authentication/o_auth/git_hub_authentication_document.rb +2 -2
  7. data/lib/ruby_app/elements/mobile/pages/information_page.css.haml +0 -1
  8. data/lib/ruby_app/elements/mobile/pages/information_page.html.haml +0 -7
  9. data/lib/ruby_app/elements/mobile/pages/information_page.js.haml +0 -1
  10. data/lib/ruby_app/elements/mobile/pages/information_page.rb +0 -6
  11. data/lib/ruby_app/elements/mobile/pages/{information/scripts_list.css.haml → scripts_list.css.haml} +1 -1
  12. data/lib/ruby_app/elements/mobile/pages/scripts_list.rb +39 -0
  13. data/lib/ruby_app/elements/mobile/pages/{information/scripts_list_item.html.haml → scripts_list_item.html.haml} +0 -0
  14. data/lib/ruby_app/elements/mobile/pages/{information/scripts_page.css.haml → scripts_page.css.haml} +1 -1
  15. data/lib/ruby_app/elements/mobile/pages/{information/scripts_page.html.haml → scripts_page.html.haml} +0 -0
  16. data/lib/ruby_app/elements/mobile/pages/{information/scripts_page.js.haml → scripts_page.js.haml} +1 -1
  17. data/lib/ruby_app/elements/mobile/pages/scripts_page.rb +36 -0
  18. data/lib/ruby_app/version.rb +1 -1
  19. metadata +11 -11
  20. data/lib/ruby_app/elements/mobile/pages/information/scripts_list.rb +0 -43
  21. data/lib/ruby_app/elements/mobile/pages/information/scripts_page.rb +0 -45
@@ -1,6 +1,6 @@
1
-
2
1
  = RubyApp::Elements::Mobile::Default::Features::DefaultPage.render(:css)
3
2
  = RubyApp::Elements::Mobile::Navigation::PageButton.render(:css)
4
3
  = RubyApp::Elements::Mobile::Navigation::NavigationButton.render(:css)
5
4
  = RubyApp::Elements::Mobile::Pages::InformationPage.render(:css)
5
+ = RubyApp::Elements::Mobile::Pages::ScriptsPage.render(:css)
6
6
  = yield
@@ -10,3 +10,5 @@
10
10
  - element.content_for(:html, :link, 'Features')
11
11
  = @information_link.render(:html) do |element|
12
12
  - element.content_for(:html, :link, 'Information')
13
+ = @scripts_link.render(:html) do |element|
14
+ - element.content_for(:html, :link, 'Scripts')
@@ -2,4 +2,5 @@
2
2
  = RubyApp::Elements::Mobile::Navigation::PageButton.render(:js)
3
3
  = RubyApp::Elements::Mobile::Navigation::NavigationButton.render(:js)
4
4
  = RubyApp::Elements::Mobile::Pages::InformationPage.render(:js)
5
+ = RubyApp::Elements::Mobile::Pages::ScriptsPage.render(:js)
5
6
  = yield
@@ -10,6 +10,7 @@ module RubyApp
10
10
  require 'ruby_app/elements/mobile/navigation/page_button'
11
11
  require 'ruby_app/elements/mobile/page'
12
12
  require 'ruby_app/elements/mobile/pages/information_page'
13
+ require 'ruby_app/elements/mobile/pages/scripts_page'
13
14
 
14
15
  class DefaultPage < RubyApp::Elements::Mobile::Page
15
16
 
@@ -26,6 +27,9 @@ module RubyApp
26
27
  RubyApp::Elements::Mobile::Pages::InformationPage.new(event.now).show(event, element.options)
27
28
  end
28
29
 
30
+ @scripts_link = RubyApp::Elements::Mobile::Navigation::PageButton.new
31
+ @scripts_link.page = RubyApp::Elements::Mobile::Pages::ScriptsPage
32
+
29
33
  end
30
34
 
31
35
  end
@@ -38,15 +38,15 @@ module RubyApp
38
38
  code = RubyApp::Request.query['code']
39
39
  access_token = @client.auth_code.get_token(code, :redirect_uri => RubyApp::Request.url)
40
40
  RubyApp::Log.debug("OAUTH token=#{access_token.token.inspect}")
41
- self.process_access_token(access_token)
41
+ self.process_token(access_token)
42
42
  self.hide(event)
43
43
  end
44
44
  end
45
45
 
46
46
  end
47
47
 
48
- def process_access_token(access_token)
49
- RubyApp::Session.identity = self.create_identity_from_access_token(access_token)
48
+ def process_token(token)
49
+ RubyApp::Session.identity = self.create_identity_from_token(token)
50
50
  end
51
51
 
52
52
  end
@@ -26,8 +26,8 @@ module RubyApp
26
26
  super(access_key, secret_key, _scopes, _options)
27
27
  end
28
28
 
29
- def create_identity_from_access_token(access_token)
30
- user = JSON.parse(access_token.get('/user').body)
29
+ def create_identity_from_token(token)
30
+ user = JSON.parse(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
@@ -4,5 +4,4 @@
4
4
  = RubyApp::Elements::Mobile::Pages::Information::EnvironmentPage.render(:css)
5
5
  = RubyApp::Elements::Mobile::Pages::Information::InformationList.render(:css)
6
6
  = RubyApp::Elements::Mobile::Pages::Information::SessionsPage.render(:css)
7
- = RubyApp::Elements::Mobile::Pages::Information::ScriptsPage.render(:css)
8
7
  = yield
@@ -56,13 +56,6 @@
56
56
  %span.ui-li-count
57
57
  %code
58
58
  = ENV['RUBY_APP_CONFIGURATION'] || 'default'
59
- %li
60
- = @scripts_link.render(:html) do |element|
61
- - element.content_for(:html, :link) do
62
- %span
63
- Scripts
64
- %span.ui-li-count
65
- = RubyApp::Session.get_scripts.length
66
59
  %li
67
60
  = @sessions_link.render(:html) do |element|
68
61
  - element.content_for(:html, :link) do
@@ -4,5 +4,4 @@
4
4
  = RubyApp::Elements::Mobile::Pages::Information::EnvironmentPage.render(:js)
5
5
  = RubyApp::Elements::Mobile::Pages::Information::InformationList.render(:js)
6
6
  = RubyApp::Elements::Mobile::Pages::Information::SessionsPage.render(:js)
7
- = RubyApp::Elements::Mobile::Pages::Information::ScriptsPage.render(:js)
8
7
  = yield
@@ -12,7 +12,6 @@ module RubyApp
12
12
  require 'ruby_app/elements/mobile/pages/information/cookies_page'
13
13
  require 'ruby_app/elements/mobile/pages/information/environment_page'
14
14
  require 'ruby_app/elements/mobile/pages/information/sessions_page'
15
- require 'ruby_app/elements/mobile/pages/information/scripts_page'
16
15
 
17
16
  class InformationPage < RubyApp::Elements::Mobile::Page
18
17
 
@@ -40,11 +39,6 @@ module RubyApp
40
39
  RubyApp::Elements::Mobile::Pages::Information::ConfigurationPage.new.show(event, element.options)
41
40
  end
42
41
 
43
- @scripts_link = RubyApp::Elements::Mobile::Navigation::NavigationLink.new
44
- @scripts_link.clicked do |element, event|
45
- RubyApp::Elements::Mobile::Pages::Information::ScriptsPage.new.show(event, element.options)
46
- end
47
-
48
42
  @sessions_link = RubyApp::Elements::Mobile::Navigation::NavigationLink.new
49
43
  @sessions_link.clicked do |element, event|
50
44
  RubyApp::Elements::Mobile::Pages::Information::SessionsPage.new.show(event, element.options)
@@ -5,5 +5,5 @@
5
5
  div.script
6
6
  div.url
7
7
  font-size: 85%
8
- = RubyApp::Elements::Mobile::Pages::Information::ScriptsList::ScriptsListItem.render(:css)
8
+ = RubyApp::Elements::Mobile::Pages::ScriptsList::ScriptsListItem.render(:css)
9
9
  = yield
@@ -0,0 +1,39 @@
1
+ module RubyApp
2
+
3
+ module Elements
4
+
5
+ module Mobile
6
+
7
+ module Pages
8
+ require 'ruby_app/elements/mobile/navigation/navigation_list'
9
+
10
+ class ScriptsList < RubyApp::Elements::Mobile::Navigation::NavigationList
11
+
12
+ class ScriptsListItem < RubyApp::Elements::Mobile::Navigation::NavigationList::NavigationListItem
13
+
14
+ template_path(:all, File.dirname(__FILE__))
15
+
16
+ alias :script :item
17
+
18
+ def initialize(script)
19
+ super(script)
20
+ end
21
+
22
+ end
23
+
24
+ template_path(:all, File.dirname(__FILE__))
25
+
26
+ def initialize
27
+ super
28
+ self.items = RubyApp::Session.get_scripts.collect { |script| RubyApp::Elements::Mobile::Pages::ScriptsList::ScriptsListItem.new(script) }
29
+ end
30
+
31
+ end
32
+
33
+ end
34
+
35
+ end
36
+
37
+ end
38
+
39
+ end
@@ -1,4 +1,4 @@
1
1
  = RubyApp::Elements::Mobile::Dialogs::AcknowledgementDialog.render(:css)
2
2
  = RubyApp::Elements::Mobile::Navigation::BackButton.render(:css)
3
- = RubyApp::Elements::Mobile::Pages::Information::ScriptsList.render(:css)
3
+ = RubyApp::Elements::Mobile::Pages::ScriptsList.render(:css)
4
4
  = yield
@@ -1,4 +1,4 @@
1
1
  = RubyApp::Elements::Mobile::Dialogs::AcknowledgementDialog.render(:js)
2
2
  = RubyApp::Elements::Mobile::Navigation::BackButton.render(:js)
3
- = RubyApp::Elements::Mobile::Pages::Information::ScriptsList.render(:js)
3
+ = RubyApp::Elements::Mobile::Pages::ScriptsList.render(:js)
4
4
  = yield
@@ -0,0 +1,36 @@
1
+ module RubyApp
2
+
3
+ module Elements
4
+
5
+ module Mobile
6
+
7
+ module Pages
8
+ require 'ruby_app/elements/mobile/navigation/back_button'
9
+ require 'ruby_app/elements/mobile/pages/scripts_list'
10
+ require 'ruby_app/elements/mobile/page'
11
+
12
+ class ScriptsPage < RubyApp::Elements::Mobile::Page
13
+
14
+ template_path(:all, File.dirname(__FILE__))
15
+
16
+ def initialize
17
+ super
18
+
19
+ @back_button = RubyApp::Elements::Mobile::Navigation::BackButton.new
20
+
21
+ @scripts_list = RubyApp::Elements::Mobile::Pages::ScriptsList.new
22
+ @scripts_list.item_clicked do |element, event|
23
+ event.go(event.item.script.url)
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.6.38"
2
+ VERSION = "0.6.39"
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: 75
4
+ hash: 73
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 38
10
- version: 0.6.38
9
+ - 39
10
+ version: 0.6.39
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: 2012-10-18 00:00:00 Z
18
+ date: 2012-10-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -501,13 +501,6 @@ files:
501
501
  - lib/ruby_app/elements/mobile/pages/information/pages_page.html.haml
502
502
  - lib/ruby_app/elements/mobile/pages/information/pages_page.js.haml
503
503
  - lib/ruby_app/elements/mobile/pages/information/pages_page.rb
504
- - lib/ruby_app/elements/mobile/pages/information/scripts_list.css.haml
505
- - lib/ruby_app/elements/mobile/pages/information/scripts_list.rb
506
- - lib/ruby_app/elements/mobile/pages/information/scripts_list_item.html.haml
507
- - lib/ruby_app/elements/mobile/pages/information/scripts_page.css.haml
508
- - lib/ruby_app/elements/mobile/pages/information/scripts_page.html.haml
509
- - lib/ruby_app/elements/mobile/pages/information/scripts_page.js.haml
510
- - lib/ruby_app/elements/mobile/pages/information/scripts_page.rb
511
504
  - lib/ruby_app/elements/mobile/pages/information/session_page.css.haml
512
505
  - lib/ruby_app/elements/mobile/pages/information/session_page.html.haml
513
506
  - lib/ruby_app/elements/mobile/pages/information/session_page.js.haml
@@ -522,6 +515,13 @@ files:
522
515
  - lib/ruby_app/elements/mobile/pages/information_page.html.haml
523
516
  - lib/ruby_app/elements/mobile/pages/information_page.js.haml
524
517
  - lib/ruby_app/elements/mobile/pages/information_page.rb
518
+ - lib/ruby_app/elements/mobile/pages/scripts_list.css.haml
519
+ - lib/ruby_app/elements/mobile/pages/scripts_list.rb
520
+ - lib/ruby_app/elements/mobile/pages/scripts_list_item.html.haml
521
+ - lib/ruby_app/elements/mobile/pages/scripts_page.css.haml
522
+ - lib/ruby_app/elements/mobile/pages/scripts_page.html.haml
523
+ - lib/ruby_app/elements/mobile/pages/scripts_page.js.haml
524
+ - lib/ruby_app/elements/mobile/pages/scripts_page.rb
525
525
  - lib/ruby_app/elements/mobile/platforms/ios/document.rb
526
526
  - lib/ruby_app/exception.rb
527
527
  - lib/ruby_app/exceptions.rb
@@ -1,43 +0,0 @@
1
- module RubyApp
2
-
3
- module Elements
4
-
5
- module Mobile
6
-
7
- module Pages
8
-
9
- module Information
10
- require 'ruby_app/elements/mobile/pages/information/information_list'
11
-
12
- class ScriptsList < RubyApp::Elements::Mobile::Pages::Information::InformationList
13
-
14
- class ScriptsListItem < RubyApp::Elements::Mobile::Pages::Information::InformationList::InformationListItem
15
-
16
- template_path(:all, File.dirname(__FILE__))
17
-
18
- alias :script :item
19
-
20
- def initialize(script)
21
- super(script)
22
- end
23
-
24
- end
25
-
26
- template_path(:all, File.dirname(__FILE__))
27
-
28
- def initialize
29
- super
30
- self.items = RubyApp::Session.get_scripts.collect { |script| RubyApp::Elements::Mobile::Pages::Information::ScriptsList::ScriptsListItem.new(script) }
31
- end
32
-
33
- end
34
-
35
- end
36
-
37
- end
38
-
39
- end
40
-
41
- end
42
-
43
- end
@@ -1,45 +0,0 @@
1
- module RubyApp
2
-
3
- module Elements
4
-
5
- module Mobile
6
-
7
- module Pages
8
-
9
- module Information
10
- require 'ruby_app/elements/mobile/dialogs/acknowledgement_dialog'
11
- require 'ruby_app/elements/mobile/navigation/back_button'
12
- require 'ruby_app/elements/mobile/pages/information/scripts_list'
13
- require 'ruby_app/elements/mobile/page'
14
-
15
- class ScriptsPage < RubyApp::Elements::Mobile::Page
16
-
17
- template_path(:all, File.dirname(__FILE__))
18
-
19
- def initialize
20
- super
21
-
22
- @back_button = RubyApp::Elements::Mobile::Navigation::BackButton.new
23
-
24
- @scripts_list = RubyApp::Elements::Mobile::Pages::Information::ScriptsList.new
25
- @scripts_list.item_clicked do |element, event|
26
- if RubyApp::Session.configuration.scripts.enabled
27
- event.go(event.item.script.url)
28
- else
29
- RubyApp::Elements::Mobile::Dialog.show(event, RubyApp::Elements::Mobile::Dialogs::AcknowledgementDialog.new('Scripts', 'Scripts are currently disabled.'))
30
- end
31
- end
32
-
33
- end
34
-
35
- end
36
-
37
- end
38
-
39
- end
40
-
41
- end
42
-
43
- end
44
-
45
- end