RubyApp 0.0.91 → 0.2.0

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.
Files changed (127) hide show
  1. data/.gitignore +0 -1
  2. data/.rvmrc +56 -1
  3. data/Gemfile.lock +22 -22
  4. data/bin/console.rb +9 -1
  5. data/bin/ruby_app +2 -24
  6. data/features/default.feature +1 -0
  7. data/features/elements/input.feature +2 -0
  8. data/features/elements/page.feature +0 -9
  9. data/features/step_definitions/default_macros.rb +1 -4
  10. data/features/step_definitions/default_steps.rb +1 -1
  11. data/lib/ruby_app.rb +8 -1
  12. data/lib/ruby_app/application.rb +5 -67
  13. data/lib/ruby_app/configuration.rb +2 -3
  14. data/lib/ruby_app/configuration.ru +32 -0
  15. data/lib/ruby_app/configuration.yml +28 -0
  16. data/lib/ruby_app/element.rb +12 -6
  17. data/lib/ruby_app/elements.rb +50 -0
  18. data/lib/ruby_app/elements/base/base_mail.rb +2 -2
  19. data/lib/ruby_app/elements/base/base_page.html.haml +1 -1
  20. data/lib/ruby_app/elements/base/base_page.js.haml +3 -3
  21. data/lib/ruby_app/elements/base/base_page.rb +2 -2
  22. data/lib/ruby_app/elements/dialogs/base/base_ok_dialog.rb +0 -1
  23. data/lib/ruby_app/elements/dialogs/blank_dialog.rb +1 -1
  24. data/lib/ruby_app/elements/dialogs/exception_dialog.rb +1 -2
  25. data/lib/ruby_app/elements/navigation/back_button.rb +1 -1
  26. data/lib/ruby_app/elements/navigation/base/base_breadcrumbs.rb +1 -0
  27. data/lib/ruby_app/elements/navigation/page_link.rb +1 -0
  28. data/lib/ruby_app/elements/pages/authentication/open_id/ax_authentication_page.rb +1 -1
  29. data/lib/ruby_app/elements/pages/authentication/open_id/base/base_authentication_page.rb +1 -3
  30. data/lib/ruby_app/elements/pages/authentication/open_id/email_authentication_page.rb +1 -1
  31. data/lib/ruby_app/elements/pages/authentication/open_id/sreg_authentication_page.rb +1 -1
  32. data/lib/ruby_app/elements/pages/base/base_blank_page.rb +0 -1
  33. data/lib/ruby_app/elements/pages/default_page.rb +2 -1
  34. data/lib/ruby_app/elements/pages/quit_page.html.haml +0 -3
  35. data/lib/ruby_app/elements/pages/quit_page.rb +0 -2
  36. data/lib/ruby_app/elements/pages/settings_page.rb +2 -1
  37. data/lib/ruby_app/elements/pages/test_pages.rb +9 -0
  38. data/lib/ruby_app/elements/pages/test_pages/button_test_page.rb +3 -5
  39. data/lib/ruby_app/elements/pages/test_pages/default_test_page.rb +10 -15
  40. data/lib/ruby_app/elements/pages/test_pages/dialog_test_page.rb +2 -8
  41. data/lib/ruby_app/elements/pages/test_pages/input_test_page.rb +2 -9
  42. data/lib/ruby_app/elements/pages/test_pages/link_test_page.rb +3 -5
  43. data/lib/ruby_app/elements/pages/test_pages/linked_test_page.rb +1 -2
  44. data/lib/ruby_app/elements/pages/test_pages/list_test_page.rb +4 -8
  45. data/lib/ruby_app/elements/pages/test_pages/markdown_test_page.rb +3 -4
  46. data/lib/ruby_app/elements/pages/test_pages/test_page.rb +3 -8
  47. data/lib/ruby_app/exceptions.rb +2 -0
  48. data/lib/ruby_app/exceptions/base/base_exception.rb +1 -1
  49. data/lib/ruby_app/language.rb +9 -15
  50. data/lib/ruby_app/log.rb +32 -28
  51. data/lib/ruby_app/mixins.rb +7 -0
  52. data/lib/ruby_app/mixins/configuration_mixin.rb +1 -1
  53. data/lib/ruby_app/mixins/delegate_mixin.rb +1 -1
  54. data/lib/ruby_app/mixins/hash_mixin.rb +1 -1
  55. data/lib/ruby_app/mixins/render_mixin.rb +37 -39
  56. data/lib/ruby_app/mixins/route_mixin.rb +1 -5
  57. data/lib/ruby_app/mixins/template_mixin.rb +4 -12
  58. data/lib/ruby_app/mixins/translate_mixin.rb +2 -2
  59. data/lib/ruby_app/rack.rb +8 -0
  60. data/lib/ruby_app/rack/application.rb +9 -5
  61. data/lib/ruby_app/rack/duration.rb +22 -0
  62. data/lib/ruby_app/rack/language.rb +26 -0
  63. data/lib/ruby_app/rack/memory.rb +22 -0
  64. data/lib/ruby_app/rack/request.rb +27 -0
  65. data/lib/ruby_app/rack/response.rb +26 -0
  66. data/lib/ruby_app/rack/route.rb +24 -87
  67. data/lib/ruby_app/rack/session.rb +31 -0
  68. data/lib/ruby_app/request.rb +4 -55
  69. data/lib/ruby_app/response.rb +58 -0
  70. data/lib/ruby_app/session.rb +102 -35
  71. data/lib/ruby_app/templates/application/Rakefile +1 -1
  72. data/lib/ruby_app/templates/application/configuration.ru +41 -0
  73. data/lib/ruby_app/templates/application/configuration.yml +16 -0
  74. data/lib/ruby_app/templates/application/console.rb +15 -10
  75. data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_.rb +3 -0
  76. data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_/application.rb +3 -3
  77. data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_/elements/pages/default_page.rb +1 -1
  78. data/lib/ruby_app/templates/application/lib/_APPLICATION_DOWNCODE_/session.rb +3 -3
  79. data/lib/ruby_app/templates/application/spec/application_spec.rb +17 -0
  80. data/lib/ruby_app/templates/application/spec/request_spec.rb +18 -0
  81. data/lib/ruby_app/templates/application/spec/support/shared.rb +34 -9
  82. data/lib/ruby_app/themes/mobile.rb +1 -17
  83. data/lib/ruby_app/themes/mobile/base/base_page.html.haml +1 -1
  84. data/lib/ruby_app/translations/en.yml +133 -144
  85. data/lib/ruby_app/version.rb +1 -1
  86. data/rakefile +1 -16
  87. data/spec/application_spec.rb +5 -13
  88. data/spec/elements/base_element.html.haml +5 -0
  89. data/spec/elements/container_element.html.haml +6 -0
  90. data/spec/elements/derived_element.html.haml +5 -0
  91. data/spec/elements/element_spec.rb +101 -0
  92. data/spec/request_spec.rb +6 -13
  93. data/spec/support/shared.rb +14 -6
  94. metadata +95 -125
  95. data/features/elements/pages/quit_page.feature +0 -8
  96. data/lib/ruby_app/config.ru +0 -25
  97. data/lib/ruby_app/config.yml +0 -16
  98. data/lib/ruby_app/elements/pages/test_pages/select_test_page.rb +0 -44
  99. data/lib/ruby_app/templates/application/config.ru +0 -40
  100. data/lib/ruby_app/templates/application/config.yml +0 -1
  101. data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.css.haml +0 -3
  102. data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.html.haml +0 -4
  103. data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.js.haml +0 -3
  104. data/lib/ruby_app/templates/page/_PAGE_DOWNCODE_.rb +0 -14
  105. data/spec/configuration_spec.rb +0 -25
  106. data/spec/element_spec.rb +0 -72
  107. data/spec/elements/navigation/breadcrumbs_spec.rb +0 -62
  108. data/spec/elements/page_spec.rb +0 -20
  109. data/spec/language_spec.rb +0 -25
  110. data/spec/log_spec.rb +0 -25
  111. data/spec/mixins/configuration_mixin_spec.rb +0 -24
  112. data/spec/mixins/delegate_mixin_spec.rb +0 -28
  113. data/spec/mixins/hash_mixin_spec.rb +0 -39
  114. data/spec/mixins/render_mixin_spec.rb +0 -127
  115. data/spec/mixins/route_mixin_spec.rb +0 -60
  116. data/spec/mixins/template_mixin_spec.rb +0 -78
  117. data/spec/mixins/test_a.css.haml +0 -4
  118. data/spec/mixins/test_a.html.haml +0 -2
  119. data/spec/mixins/test_a.js.haml +0 -4
  120. data/spec/mixins/test_b.css.haml +0 -4
  121. data/spec/mixins/test_b.html.haml +0 -3
  122. data/spec/mixins/test_b.js.haml +0 -4
  123. data/spec/mixins/test_c.css.haml +0 -4
  124. data/spec/mixins/test_c.html.haml +0 -2
  125. data/spec/mixins/test_c.js.haml +0 -4
  126. data/spec/mixins/translate_mixin_spec.rb +0 -25
  127. data/spec/session_spec.rb +0 -39
@@ -5,23 +5,7 @@ require 'sass/plugin'
5
5
 
6
6
  Sass::Plugin.options[:load_paths] = [File.expand_path(File.join(File.dirname(__FILE__), %w[mobile]))]
7
7
 
8
- require 'ruby_app/elements/base/base_page'
9
- require 'ruby_app/elements/calendars/month'
10
- require 'ruby_app/elements/dialog'
11
- require 'ruby_app/elements/dialogs/blank_dialog'
12
- require 'ruby_app/elements/dialogs/close_dialog'
13
- require 'ruby_app/elements/dialogs/yes_no_dialog'
14
- require 'ruby_app/elements/input'
15
- require 'ruby_app/elements/inputs/toggle_input'
16
- require 'ruby_app/elements/list'
17
- require 'ruby_app/elements/lists/select'
18
- require 'ruby_app/elements/mail'
19
- require 'ruby_app/elements/markdown'
20
- require 'ruby_app/elements/navigation/base/base_breadcrumbs'
21
- require 'ruby_app/elements/page'
22
- require 'ruby_app/elements/pages/authentication/open_id/authentication_page'
23
- require 'ruby_app/elements/pages/base/base_blank_page'
24
- require 'ruby_app/elements/pages/blank_page'
8
+ require 'ruby_app/elements'
25
9
 
26
10
  RubyApp::Elements::Base::BasePage.template_path(:html, File.join(File.dirname(__FILE__), %w[mobile base]))
27
11
  RubyApp::Elements::Calendars::Month.template_path(:css, File.join(File.dirname(__FILE__), %w[mobile calendars]))
@@ -42,7 +42,7 @@
42
42
  %meta{:name => name, :content => value}
43
43
  /
44
44
  (other)
45
- %meta{:name => :event_error_message, :content => RubyApp::Elements::Base::BasePage.translate.event_error_message}
45
+ %meta{:name => :_event_error_message, :content => RubyApp::Elements::Base::BasePage.translate._event_error_message}
46
46
  %body
47
47
  %div.body
48
48
  = yield :body
@@ -1,228 +1,217 @@
1
+ ---
1
2
  ruby_app:
2
3
  element:
3
4
  exception_event:
4
- message: %1. The page will refresh so you can try again.
5
+ message: "%1. The page will refresh so you can try again."
5
6
  elements:
6
7
  base:
7
8
  base_page:
8
- event_error_message: An error occurred sending the event. The page will refresh so you can try again.
9
+ _event_error_message: "An error occurred sending the event. The page will refresh so you can try again."
9
10
  dialogs:
10
11
  base:
11
- base_ok_dialog:
12
- ok:
13
- body: 'OK'
14
12
  base_close_dialog:
15
13
  close:
16
- body: Close
14
+ body: "Close"
15
+ base_ok_dialog:
16
+ ok:
17
+ body: "OK"
17
18
  base_yes_no_dialog:
18
- _yes:
19
- body: 'Yes'
20
19
  _no:
21
- body: 'No'
20
+ body: "No"
21
+ _yes:
22
+ body: "Yes"
22
23
  calendars:
23
24
  month_dialog:
24
- today:
25
- body: Today
26
25
  cancel:
27
- body: Cancel
26
+ body: "Cancel"
27
+ today:
28
+ body: "Today"
28
29
  navigation:
30
+ back_button:
31
+ body: "Back"
29
32
  base:
30
33
  base_breadcrumbs:
31
- back: Back
32
- back_button:
33
- body: Back
34
+ back: "Back"
34
35
  pages:
36
+ authentication:
37
+ open_id:
38
+ base:
39
+ base_authentication_page:
40
+ message: "Authenticating ..."
41
+ google_authentication_page:
42
+ title: "Google Authentication"
43
+ my_open_id_authentication_page:
44
+ title: "myOpenId Authentication"
45
+ yahoo_authentication_page:
46
+ title: "Yahoo! Authentication"
35
47
  base:
36
48
  base_blank_page:
37
49
  settings:
38
- body: Settings
50
+ body: "Settings"
51
+ default_page:
52
+ content:
53
+ body: "Click [here](go_test) to go to the test pages.\n"
54
+ loaded: "Loaded at %1"
55
+ title: "Home"
56
+ quit_page:
57
+ title: "Quit"
58
+ settings_page:
59
+ content:
60
+ body: |
61
+ You are currently logged in as #{(RubyApp::Session.identity ? RubyApp::Session.identity.url : '(not logged in)')}
62
+
63
+ Load or reload the [Mobile](do_load_theme_mobile) theme.
64
+
65
+ [Refresh](do_reload_translations) the translation file(s).
66
+
67
+ [Quit](do_quit) the session.
68
+ title: Settings
39
69
  test_pages:
70
+ button_test_page:
71
+ button:
72
+ body: "Click"
73
+ content:
74
+ body: "Click the button below to go to another page.\n"
75
+ title: "Button Test Page"
40
76
  default_test_page:
41
- title: Test Pages
42
77
  content:
43
78
  body: |
44
- [`ButtonTestPage`](RubyApp::Elements::Pages::TestPages::ButtonTestPage) ... A page with a single, clickable button
45
-
46
- [`DialogTestPage`](RubyApp::Elements::Pages::TestPages::DialogTestPage) ... A page with links to show a variety of dialogs (e.g. exception dialog, message dialog, month dialog, etc.)
79
+ [`ButtonTestPage`](RubyApp::Elements::Pages::TestPages::ButtonTestPage) ... A page with a single, clickable button
47
80
 
48
- [`InputTestPage`](RubyApp::Elements::Pages::TestPages::InputTestPage) ... A page with a variety of input controls (e.g. simple input, duration input, etc.)
81
+ [`DialogTestPage`](RubyApp::Elements::Pages::TestPages::DialogTestPage) ... A page with links to show a variety of dialogs (e.g. exception dialog, message dialog, month dialog, etc.)
49
82
 
50
- [`LinkTestPage`](RubyApp::Elements::Pages::TestPages::LinkTestPage) ... A page with a single, clickable link
83
+ [`InputTestPage`](RubyApp::Elements::Pages::TestPages::InputTestPage) ... A page with a variety of input controls (e.g. simple input, duration input, etc.)
51
84
 
52
- [`ListTestPage`](RubyApp::Elements::Pages::TestPages::ListTestPage) ... A page with a variety of lists (e.g. simple list, select list, etc.)
85
+ [`LinkTestPage`](RubyApp::Elements::Pages::TestPages::LinkTestPage) ... A page with a single, clickable link
53
86
 
54
- [`MarkdownTestPage`](RubyApp::Elements::Pages::TestPages::MarkdownTestPage) ... A page with markdown containing a single, clickable link
87
+ [`ListTestPage`](RubyApp::Elements::Pages::TestPages::ListTestPage) ... A page with a variety of lists (e.g. simple list, select list, etc.)
55
88
 
56
- [`_TestPage`](RubyApp::Elements::Pages::TestPages::TestPage) ... A test page showing load, release, and trigger events.
89
+ [`MarkdownTestPage`](RubyApp::Elements::Pages::TestPages::MarkdownTestPage) ... A page with markdown containing a single, clickable link
57
90
 
58
- ---
91
+ [`_TestPage`](RubyApp::Elements::Pages::TestPages::TestPage) ... A test page showing load, release, and trigger events.
59
92
 
60
- [`GoogleAuthenticationPage`](RubyApp::Elements::Pages::Authentication::OpenId::GoogleAuthenticationPage) ... re/authenticate using Google
93
+ ---
61
94
 
62
- [`MyOpenIdAuthenticationPage`](RubyApp::Elements::Pages::Authentication::OpenId::MyOpenIdAuthenticationPage) ... re/authenticate using myOpenId
95
+ [`GoogleAuthenticationPage`](RubyApp::Elements::Pages::Authentication::OpenId::GoogleAuthenticationPage) ... re/authenticate using Google
63
96
 
64
- [`YahooAuthenticationPage`](RubyApp::Elements::Pages::Authentication::OpenId::YahooAuthenticationPage) ... re/authenticate using Yahoo!
97
+ [`MyOpenIdAuthenticationPage`](RubyApp::Elements::Pages::Authentication::OpenId::MyOpenIdAuthenticationPage) ... re/authenticate using myOpenId
65
98
 
66
- button_test_page:
67
- title: Button Test Page
68
- content:
69
- body: |
70
- Click the button below to go to another page.
71
- button:
72
- body: Click
99
+ [`YahooAuthenticationPage`](RubyApp::Elements::Pages::Authentication::OpenId::YahooAuthenticationPage) ... re/authenticate using Yahoo!
100
+ title: "Test Pages"
73
101
  dialog_test_page:
74
- title: Dialog Test Page
102
+ acknowledgement_dialog:
103
+ message: "This will happen."
104
+ message_dialog:
105
+ message: "%1"
106
+ title: "You clicked ..."
107
+ title: "Acknowledgement Dialog"
108
+ confirmation_dialog:
109
+ message: "Are you sure?"
110
+ message_dialog:
111
+ message: "%1"
112
+ title: "You clicked ..."
113
+ title: "Confirmation Dialog"
75
114
  content:
76
115
  body: |
77
- [`ConfirmationDialog`](do_confirmation_dialog) ... Ask for confirmation.
116
+ [`ConfirmationDialog`](do_confirmation_dialog) ... Ask for confirmation.
78
117
 
79
- [`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
118
+ [`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
80
119
 
81
- [`_Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
120
+ [`_Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
82
121
 
83
- [`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
122
+ [`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
84
123
 
85
- [`MonthDialog`](do_month_dialog) ... Show a calendar month dialog, hide it when a date is clicked, and then show the clicked date (the last date clicked was <span id='last_value'>(nothing)</span>).
124
+ [`MonthDialog`](do_month_dialog) ... Show a calendar month dialog, hide it when a date is clicked, and then show the clicked date (the last date clicked was <span id='last_value'>(nothing)</span>).
86
125
 
87
- [`AcknowledgementDialog`](do_acknowledgement_dialog) ... Expect acknowledgementment.
126
+ [`AcknowledgementDialog`](do_acknowledgement_dialog) ... Expect acknowledgementment.
88
127
 
89
- ---
128
+ ---
90
129
 
91
- [`ConfirmationDialog`](do_confirmation_dialog) ... Ask for confirmation.
130
+ [`ConfirmationDialog`](do_confirmation_dialog) ... Ask for confirmation.
92
131
 
93
- [`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
132
+ [`ExceptionDialog`](do_exception_dialog) ... Raise an exception and show the `class` and `message` properties.
94
133
 
95
- [`_Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
134
+ [`_Exception`](do_unhandled_exception_dialog) ... Raise an unhandled exception.
96
135
 
97
- [`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
136
+ [`MessageDialog`](do_message_dialog) ... Show a sample message dialog.
98
137
 
99
- [`MonthDialog`](do_month_dialog) ... Show a calendar month dialog, hide it when a date is clicked, and then show the clicked date (the last date clicked was <span id='last_value'>(nothing)</span>).
138
+ [`MonthDialog`](do_month_dialog) ... Show a calendar month dialog, hide it when a date is clicked, and then show the clicked date (the last date clicked was <span id='last_value'>(nothing)</span>).
100
139
 
101
- [`AcknowledgementDialog`](do_acknowledgement_dialog) ... Expect acknowledgementment.
102
- acknowledgement_dialog:
103
- title: Acknowledgement Dialog
104
- message: This will happen.
105
- message_dialog:
106
- title: You clicked ...
107
- message: %1
108
- confirmation_dialog:
109
- title: Confirmation Dialog
110
- message: Are you sure?
111
- message_dialog:
112
- title: You clicked ...
113
- message: %1
114
- exception: Exception dialog
140
+ [`AcknowledgementDialog`](do_acknowledgement_dialog) ... Expect acknowledgementment.
141
+ exception: "Exception dialog"
115
142
  message_dialog:
116
143
  message:
117
- title: Message Dialog
118
- message: This is a Message Dialog
144
+ message: "This is a Message Dialog"
145
+ title: "Message Dialog"
119
146
  month_dialog:
120
- title: Month Dialog
121
147
  message_dialog:
122
- title: You clicked ...
123
- message: %1
148
+ message: "%1"
149
+ title: "You clicked ..."
150
+ title: "Month Dialog"
151
+ title: "Dialog Test Page"
124
152
  exception_test_page:
125
- title: Exception Test Page
126
153
  content:
127
- body: |
128
- Rendering this page raises an exception.
129
- exception: Exception page
154
+ body: "Rendering this page raises an exception.\n"
155
+ exception: "Exception page"
156
+ title: "Exception Test Page"
130
157
  input_test_page:
131
- title: Input Test Page
132
158
  content:
133
- body: |
134
- Enter a value in the input fields below. When changed a dialog will show the entered value.
159
+ body: "Enter a value in the input fields below. When changed a dialog will show the entered value.\n"
135
160
  label:
136
- input: Input
137
- duration_input: DurationInput
138
- email_input: EmailInput
139
- multiline_input: MultilineInput
140
- toggle_input: ToggleInput
161
+ duration_input: "DurationInput"
162
+ email_input: "EmailInput"
163
+ input: "Input"
164
+ multiline_input: "MultilineInput"
165
+ toggle_input: "ToggleInput"
141
166
  message_dialog:
142
167
  message:
143
- title: Input Test
144
- message: You input '%1' of type %2.
168
+ message: "You input '%1' of type %2."
169
+ title: "Input Test"
170
+ title: "Input Test Page"
145
171
  link_test_page:
146
- title: Link Test Page
147
172
  content:
148
- body: |
149
- Click the link below to go to another page.
173
+ body: "Click the link below to go to another page.\n"
150
174
  link:
151
175
  body: Click
176
+ title: "Link Test Page"
152
177
  linked_test_page:
153
- title: Linked Test Page
154
178
  content:
155
- body: |
156
- This is the other page.
179
+ body: "This is the other page.\n"
180
+ title: "Linked Test Page"
157
181
  list_test_page:
158
- title: List Test Page
159
182
  content:
160
- body: |
161
- Click an item below.
183
+ body: "Click an item below.\n"
162
184
  message_dialog:
163
185
  message:
164
- title: List Test
165
- message: You clicked '%1'.
186
+ message: "You clicked '%1'."
187
+ title: "List Test"
188
+ title: "List Test Page"
166
189
  markdown_test_page:
167
- title: Markdown Test Page
168
190
  content:
169
- body: |
170
- Click [here](go) to go to another page.
191
+ body: "Click [here](go) to go to another page.\n"
171
192
  link:
172
- body: Click
193
+ body: "Click"
194
+ title: "Markdown Test Page"
173
195
  test_page:
174
- title: Test Page
175
196
  content:
176
197
  body: |
177
- The list below will populate as the page is rendered (immediate), loaded (once fully loaded in the browser), triggered (once 2 seconds have elapsed), and unloaded (once another page is loaded).
198
+ The list below will populate as the page is rendered (immediate), loaded (once fully loaded in the browser), triggered (once 2 seconds have elapsed), and unloaded (once another page is loaded).
178
199
 
179
- The cookie value is '%1'.
180
- rendered: Rendered
200
+ The cookie value is '%1'.
181
201
  label:
182
- input: Enter a new cookie value
183
- loaded: Loaded at %1
202
+ input: "Enter a new cookie value"
203
+ loaded: "Loaded at %1"
184
204
  message_dialog:
185
205
  message:
186
- title: Cookie Test
187
- message: The cookie value is '%1'.
188
- not_loaded: (not loaded)
189
- not_triggered: (not triggered)
190
- not_unloaded: (not unloaded)
191
- triggered: Triggered at %1
192
- unloaded: Unloaded at %1
193
- default_page:
194
- title: Home
195
- content:
196
- body: |
197
- Click [here](go_test) to go to the test pages.
198
- loaded:
199
- Loaded at %1
200
- authentication:
201
- open_id:
202
- base:
203
- base_authentication_page:
204
- message: Authenticating ...
205
- google_authentication_page:
206
- title: Google Authentication
207
- my_open_id_authentication_page:
208
- title: myOpenId Authentication
209
- yahoo_authentication_page:
210
- title: Yahoo! Authentication
211
- quit_page:
212
- title: Quit
213
- settings_page:
214
- title: Settings
215
- content:
216
- body: |
217
- You are currently logged in as #{(RubyApp::Session.identity ? RubyApp::Session.identity.url : '(not logged in)')}
218
-
219
- Load or reload the [Mobile](do_load_theme_mobile) theme.
220
-
221
- [Refresh](do_reload_translations) the translation file(s).
222
-
223
- [Quit](do_quit) the session.
224
- quit_page:
225
- title: Quit
206
+ message: "The cookie value is '%1'."
207
+ title: "Cookie Test"
208
+ not_loaded: "(not loaded)"
209
+ not_triggered: "(not triggered)"
210
+ not_unloaded: "(not unloaded)"
211
+ rendered: "Rendered"
212
+ title: "Test Page"
213
+ triggered: "Triggered at %1"
214
+ unloaded: "Unloaded at %1"
226
215
  exceptions:
227
216
  session_invalid_exception:
228
- message: The session is invalid or has expired
217
+ message: "The session is invalid or has expired"
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.91"
2
+ VERSION = "0.2.0"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
data/rakefile CHANGED
@@ -4,8 +4,7 @@ require 'bundler/setup'
4
4
 
5
5
  require 'rake'
6
6
 
7
- require 'ruby_app/application'
8
- require 'ruby_app/request'
7
+ require 'ruby_app'
9
8
 
10
9
  namespace :ruby_app do
11
10
 
@@ -63,18 +62,4 @@ namespace :ruby_app do
63
62
 
64
63
  end
65
64
 
66
- namespace :cache do
67
-
68
- desc 'Create element cache'
69
- task :create => ['ruby_app:cache:destroy'] do |task|
70
- RubyApp::Application.create_cache(File.join(File.dirname(__FILE__), %w[lib ruby_app elements pages]), File.join(File.dirname(__FILE__), %w[lib]))
71
- end
72
-
73
- desc 'Delete element cache'
74
- task :destroy do |task|
75
- RubyApp::Application.destroy_cache(File.join(File.dirname(__FILE__), %w[lib ruby_app elements]))
76
- end
77
-
78
- end
79
-
80
65
  end
@@ -1,21 +1,13 @@
1
1
  require 'spec_helper'
2
2
 
3
- require 'ruby_app/application'
4
-
5
- describe RubyApp::Application do
6
- include_context 'RubyApp::Application'
3
+ describe 'application' do
4
+ include_context 'application'
7
5
 
8
6
  describe 'positive' do
9
7
 
10
- describe 'class' do
11
-
12
- specify { RubyApp::Application.should respond_to('create!') }
13
- specify { RubyApp::Application.should respond_to('get') }
14
- specify { RubyApp::Application.should respond_to('destroy!') }
15
-
16
- specify { RubyApp::Application.get.should_not be_nil }
17
-
18
- end
8
+ specify { RubyApp::Configuration.get.should_not be_nil }
9
+ specify { RubyApp::Log.get.should_not be_nil }
10
+ specify { RubyApp::Application.get.should_not be_nil }
19
11
 
20
12
  end
21
13