hobo 1.4.0.pre8 → 2.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/CHANGES-1.4.txt +87 -3
  2. data/TODO-1.4.txt +3 -11
  3. data/VERSION +1 -1
  4. data/app/helpers/hobo_route_helper.rb +61 -20
  5. data/lib/generators/hobo/admin_subsite/USAGE +3 -11
  6. data/lib/generators/hobo/admin_subsite/admin_subsite_generator.rb +4 -1
  7. data/lib/generators/hobo/admin_subsite/templates/{site.css.erb → site.scss.erb} +0 -0
  8. data/lib/generators/hobo/assets/assets_generator.rb +2 -2
  9. data/lib/generators/hobo/assets/templates/{application.css → application.scss} +0 -0
  10. data/lib/generators/hobo/assets/templates/{front.css → front.scss} +0 -0
  11. data/lib/generators/hobo/model/templates/model_injection.rb.erb +1 -0
  12. data/lib/generators/hobo/plugin.rb +3 -1
  13. data/lib/generators/hobo/routes/router.rb +115 -0
  14. data/lib/generators/hobo/routes/templates/hobo_routes.rb.erb +42 -3
  15. data/lib/generators/hobo/setup_wizard/setup_wizard_generator.rb +35 -2
  16. data/lib/generators/hobo/subsite.rb +1 -1
  17. data/lib/generators/hobo/subsite/USAGE +3 -11
  18. data/lib/generators/hobo/subsite/subsite_generator.rb +3 -0
  19. data/lib/generators/hobo/subsite/templates/{site.css.erb → site.scss.erb} +0 -0
  20. data/lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb +4 -1
  21. data/lib/generators/hobo/user_mailer/templates/activation.erb +1 -1
  22. data/lib/generators/hobo/user_mailer/templates/forgot_password.erb +1 -1
  23. data/lib/generators/hobo/user_mailer/templates/invite.erb +1 -1
  24. data/lib/generators/hobo/user_model/templates/model_injection.rb.erb +1 -0
  25. data/lib/hobo.rb +2 -2
  26. data/lib/hobo/controller.rb +3 -11
  27. data/lib/hobo/controller/model.rb +89 -89
  28. data/lib/hobo/engine.rb +12 -0
  29. data/lib/hobo/extensions/active_record/permissions.rb +15 -24
  30. data/lib/hobo/model.rb +3 -0
  31. data/lib/hobo/model/permissions.rb +1 -1
  32. data/lib/hobo/rapid/generators/rapid/cards.dryml.erb +10 -3
  33. data/lib/hobo/rapid/generators/rapid/forms.dryml.erb +9 -2
  34. data/lib/hobo/rapid/generators/rapid/pages.dryml.erb +11 -4
  35. data/lib/hobo/routes.rb +2 -0
  36. data/test/doctest/hobo/hobo_helper.rdoctest +23 -20
  37. data/test/doctest/hobo/lifecycles.rdoctest +1 -0
  38. data/test/doctest/hobo/model.rdoctest +4 -0
  39. data/test/doctest/hobo/multi_model_forms.rdoctest +2 -0
  40. data/test/doctest/hobo/scopes.rdoctest +18 -5
  41. data/test/doctest/prepare_testapp.rb +4 -2
  42. data/test/irt/generators/admin_subsite.irt +2 -6
  43. data/test/irt/generators/assets.irt +1 -7
  44. data/test/irt/generators/front_controller.irt +1 -3
  45. data/test/irt/generators/model.irt +1 -2
  46. data/test/irt/generators/partials/_account_user_model_tests.rb +1 -3
  47. data/test/irt/generators/partials/_accounts_users_controller_tests.rb +1 -3
  48. data/test/irt/generators/partials/_default_user_model_tests.rb +1 -3
  49. data/test/irt/generators/partials/_default_users_controller_tests.rb +1 -3
  50. data/test/irt/generators/partials/_house_controller_tests.rb +1 -3
  51. data/test/irt/generators/partials/_user_mailer_tests.rb +1 -3
  52. data/test/irt/generators/subsite.irt +5 -6
  53. data/test/irt/generators/user_mailer.irt +2 -0
  54. metadata +12 -18
  55. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-ACD3E6-DBE1E5-H.png +0 -0
  56. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-DBE1E5-FCFEF5-H.png +0 -0
  57. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/300-3B5F87-ACD3E6-H.png +0 -0
  58. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/spinner.gif +0 -0
  59. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/stylesheets/clean-sidemenu.css +0 -81
  60. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/views/clean-sidemenu.dryml +0 -30
@@ -1,7 +1,5 @@
1
1
  desc "All user controller files exists"
2
- files_exist? %w[ app/controllers/users_controller.rb
3
- app/helpers/users_helper.rb
4
- ]
2
+ files_exist? %w( app/controllers/users_controller.rb app/helpers/users_helper.rb )
5
3
  test_value_eql? true
6
4
 
7
5
 
@@ -1,7 +1,5 @@
1
1
  desc "All controller files exists"
2
- files_exist? %w[ app/controllers/houses_controller.rb
3
- app/helpers/houses_helper.rb
4
- ]
2
+ files_exist? %w( app/controllers/houses_controller.rb app/helpers/houses_helper.rb )
5
3
 
6
4
  test_value_eql? true
7
5
 
@@ -1,8 +1,6 @@
1
1
 
2
2
  desc "User Mailer files exist"
3
- files_exist? %w[ app/mailers/user_mailer.rb
4
- app/views/user_mailer/forgot_password.erb
5
- ]
3
+ files_exist? ["app/mailers/user_mailer.rb", "app/views/user_mailer/forgot_password.erb"]
6
4
  test_value_eql? true
7
5
 
8
6
  desc "user_mailer.rb file content"
@@ -1,7 +1,6 @@
1
- invoke 'hobo:subsite', %w[ subs --make-front-site=false -q]
1
+ invoke 'hobo:subsite', %w[ subs -q]
2
2
  desc "Subsite files exist"
3
- files_exist? %w[ app/controllers/subs/subs_site_controller.rb
4
- app/views/taglibs/subs_site.dryml ]
3
+ files_exist? %w( app/controllers/subs/subs_site_controller.rb app/views/taglibs/subs_site.dryml )
5
4
  test_value_eql? true
6
5
 
7
6
  desc "SiteController matches"
@@ -18,17 +17,17 @@ eval_file '../partials/_subsite_taglib_noopt.rb'
18
17
  git_reset_app
19
18
 
20
19
  invoke 'hobo:assets', %w[ -q ]
21
- invoke 'hobo:admin_subsite', %w[ subs -q --make-front-site=false]
20
+ invoke 'hobo:admin_subsite', %w[ subs -q]
22
21
  eval_file '../partials/_subsite_taglib_admin.rb'
23
22
 
24
23
  git_reset_app
25
24
  invoke 'hobo:assets', %w[ -q ]
26
- invoke 'hobo:admin_subsite', %w[ subs --make-front-site=false -q --invite-only]
25
+ invoke 'hobo:admin_subsite', %w[ subs -q --invite-only]
27
26
  eval_file '../partials/_subsite_taglib_admin_invite_only.rb'
28
27
 
29
28
  git_reset_app
30
29
  invoke 'hobo:assets', %w[ -q ]
31
- invoke 'hobo:admin_subsite', %w[ subs --make-front-site=false --user-resource-name=account -q --invite-only]
30
+ invoke 'hobo:admin_subsite', %w[ subs --user-resource-name=account -q --invite-only]
32
31
  user_resource_name = 'Account'
33
32
  eval_file '../partials/_subsite_taglib_variables.rb'
34
33
  eval_file '../partials/_subsite_taglib_admin_invite_only.rb'
@@ -1,3 +1,5 @@
1
+ git_reset_app
2
+
1
3
  invoke 'hobo:user_mailer', %w[ user -q ]
2
4
 
3
5
  eval_file '../partials/_user_mailer_tests.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.pre8
4
+ version: 2.0.0.pre1
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-01 00:00:00.000000000 Z
12
+ date: 2012-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hobo_support
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.4.0.pre8
21
+ version: 2.0.0.pre1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.4.0.pre8
29
+ version: 2.0.0.pre1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: hobo_fields
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 1.4.0.pre8
37
+ version: 2.0.0.pre1
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 1.4.0.pre8
45
+ version: 2.0.0.pre1
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: dryml
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
- version: 1.4.0.pre8
53
+ version: 2.0.0.pre1
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.4.0.pre8
61
+ version: 2.0.0.pre1
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: will_paginate
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -159,19 +159,19 @@ files:
159
159
  - lib/generators/hobo/admin_subsite/templates/application.dryml
160
160
  - lib/generators/hobo/admin_subsite/templates/controller.rb.erb
161
161
  - lib/generators/hobo/admin_subsite/templates/gitkeep
162
- - lib/generators/hobo/admin_subsite/templates/site.css.erb
163
162
  - lib/generators/hobo/admin_subsite/templates/site.js.erb
163
+ - lib/generators/hobo/admin_subsite/templates/site.scss.erb
164
164
  - lib/generators/hobo/admin_subsite/templates/users_index.dryml
165
165
  - lib/generators/hobo/assets/USAGE
166
166
  - lib/generators/hobo/assets/assets_generator.rb
167
- - lib/generators/hobo/assets/templates/application.css
168
167
  - lib/generators/hobo/assets/templates/application.dryml.erb
169
168
  - lib/generators/hobo/assets/templates/application.js
169
+ - lib/generators/hobo/assets/templates/application.scss
170
170
  - lib/generators/hobo/assets/templates/dryml-support.js
171
171
  - lib/generators/hobo/assets/templates/dryml_taglibs_initializer.rb
172
172
  - lib/generators/hobo/assets/templates/en_injection.yml
173
- - lib/generators/hobo/assets/templates/front.css
174
173
  - lib/generators/hobo/assets/templates/front.js
174
+ - lib/generators/hobo/assets/templates/front.scss
175
175
  - lib/generators/hobo/assets/templates/front_site.dryml.erb
176
176
  - lib/generators/hobo/assets/templates/gitkeep
177
177
  - lib/generators/hobo/assets/templates/guest.rb
@@ -211,12 +211,6 @@ files:
211
211
  - lib/generators/hobo/model/model_generator.rb
212
212
  - lib/generators/hobo/model/templates/model_injection.rb.erb
213
213
  - lib/generators/hobo/plugin.rb
214
- - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-ACD3E6-DBE1E5-H.png
215
- - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-DBE1E5-FCFEF5-H.png
216
- - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/300-3B5F87-ACD3E6-H.png
217
- - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/spinner.gif
218
- - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/stylesheets/clean-sidemenu.css
219
- - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/views/clean-sidemenu.dryml
220
214
  - lib/generators/hobo/resource/USAGE
221
215
  - lib/generators/hobo/resource/resource_generator.rb
222
216
  - lib/generators/hobo/routes/USAGE
@@ -231,8 +225,8 @@ files:
231
225
  - lib/generators/hobo/subsite/templates/application.dryml
232
226
  - lib/generators/hobo/subsite/templates/controller.rb.erb
233
227
  - lib/generators/hobo/subsite/templates/gitkeep
234
- - lib/generators/hobo/subsite/templates/site.css.erb
235
228
  - lib/generators/hobo/subsite/templates/site.js.erb
229
+ - lib/generators/hobo/subsite/templates/site.scss.erb
236
230
  - lib/generators/hobo/subsite_taglib/USAGE
237
231
  - lib/generators/hobo/subsite_taglib/subsite_taglib_generator.rb
238
232
  - lib/generators/hobo/subsite_taglib/templates/taglib.dryml.erb
@@ -1,81 +0,0 @@
1
- @import url('/hobothemes/clean/stylesheets/clean.css');
2
- @import url('/hobothemes/clean/stylesheets/rapid-ui.css');
3
-
4
- body {
5
- width: 95%;
6
- min-width: 800px;
7
- }
8
-
9
- .page-header div.search {
10
- margin-top: 0;
11
- padding-left:50px;
12
- padding-right:0
13
- }
14
-
15
- .page-header{
16
- margin-top: 6px;
17
- background: none;
18
- }
19
-
20
- .account-nav {
21
- margin-top: 0;
22
- }
23
-
24
- .page-header h1 {
25
- padding: 20px 30px 20px 20px;
26
- }
27
-
28
- .page-header h1 a {
29
- color:#3B5F87
30
- }
31
-
32
- #container{
33
- width:100%;
34
- }
35
-
36
- #main-nav-container{
37
- width: 20%;
38
- background: #ACD3E6 url(../images/300-3B5F87-ACD3E6-H.png) repeat-y;
39
- vertical-align:top;
40
- }
41
-
42
- #content-container {
43
- width: 80%;
44
- background-color:#FCFFF5;
45
- vertical-align:top;
46
- }
47
-
48
- .section.with-flash {
49
- background: none;
50
- padding-top: 10px;
51
- }
52
-
53
- .main-nav {
54
- padding: 30px 0;
55
- }
56
-
57
- .main-nav li {
58
- text-align: right;
59
- margin-right: 0;
60
- list-style-type: none;
61
- }
62
-
63
- .main-nav a {
64
- background: none;
65
- border-bottom: 1px dotted #FCFFF5;
66
- display: block;
67
- font-size: 14px;
68
- font-weight: bold;
69
- padding: 7px 20px;
70
- color: #FCFFF5;
71
- }
72
-
73
- .main-nav a:hover {
74
- background: #DBE1E5 url(../images/100-ACD3E6-DBE1E5-H.png) repeat-y;
75
- color:#3B5F87;
76
- }
77
-
78
- .main-nav li.current a {
79
- background: #FCFFF5 url(../images/100-DBE1E5-FCFEF5-H.png) repeat-y;
80
- color: #242E42;
81
- }
@@ -1,30 +0,0 @@
1
- <extend tag="page" attrs="title, full-title">
2
- <old-page merge title="&title" full-title="&full_title">
3
-
4
- <stylesheets: param>
5
- <stylesheet name="reset"/>
6
- <theme-stylesheet/>
7
- <stylesheet name="application" param="app-stylesheet"/>
8
- </stylesheets:>
9
-
10
- <header: class="sidemenu" param>
11
- <live-search param if="&defined_route? :site_search"/>
12
- <account-nav if="&login_url(Hobo::Model::UserBase.default_user_model)" param/>
13
- <h1 param="app-name"><a href="#{base_url}/"><app-name/></a></h1>
14
- </header:>
15
-
16
- <content: replace>
17
- <table id="container">
18
- <tr>
19
- <td id="main-nav-container">
20
- <main-nav current="&title" param/>
21
- </td>
22
- <td id="content-container">
23
- <section with-flash-messages param="content"/>
24
- </td>
25
- </tr>
26
- </table>
27
- </content:>
28
-
29
- </old-page>
30
- </extend>