hobo 0.8.10 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +126 -2
- data/Rakefile +4 -1
- data/bin/hobo +1 -1
- data/doctest/scopes.rdoctest +11 -4
- data/dryml_generators/rapid/cards.dryml.erb +8 -2
- data/dryml_generators/rapid/forms.dryml.erb +5 -4
- data/dryml_generators/rapid/pages.dryml.erb +150 -65
- data/lib/hobo.rb +1 -1
- data/lib/hobo/accessible_associations.rb +2 -0
- data/lib/hobo/authentication_support.rb +1 -1
- data/lib/hobo/controller.rb +11 -3
- data/lib/hobo/dryml/dryml_doc.rb +1 -1
- data/lib/hobo/fake_initializer.rb +14 -0
- data/lib/hobo/hobo_helper.rb +94 -6
- data/lib/hobo/lifecycles.rb +17 -2
- data/lib/hobo/lifecycles/lifecycle.rb +1 -1
- data/lib/hobo/lifecycles/transition.rb +12 -4
- data/lib/hobo/model.rb +25 -22
- data/lib/hobo/model_controller.rb +42 -37
- data/lib/hobo/model_router.rb +11 -7
- data/lib/hobo/permissions.rb +12 -10
- data/lib/hobo/permissions/associations.rb +1 -1
- data/lib/hobo/static_tags +21 -0
- data/lib/hobo/user.rb +7 -3
- data/lib/hobo/user_controller.rb +7 -7
- data/lib/hobo/view_hints.rb +10 -3
- data/rails_generators/hobo/USAGE +4 -0
- data/rails_generators/hobo_admin_site/USAGE +16 -0
- data/rails_generators/hobo_front_controller/hobo_front_controller_generator.rb +11 -2
- data/rails_generators/hobo_front_controller/templates/controller.rb +6 -0
- data/rails_generators/hobo_front_controller/templates/summary.dryml +103 -0
- data/rails_generators/hobo_model_resource/USAGE +38 -0
- data/rails_generators/hobo_rapid/USAGE +3 -0
- data/rails_generators/hobo_rapid/templates/hobo-rapid.js +7 -3
- data/rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/clean.css +4 -0
- data/rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css +5 -0
- data/rails_generators/hobo_subsite/USAGE +16 -0
- data/rails_generators/hobo_subsite/hobo_subsite_generator.rb +1 -1
- data/rails_generators/hobo_user_controller/templates/controller.rb +2 -2
- data/rails_generators/hobo_user_model/templates/model.rb +6 -1
- data/taglibs/rapid.dryml +1 -0
- data/taglibs/rapid_core.dryml +4 -4
- data/taglibs/rapid_forms.dryml +29 -21
- data/taglibs/rapid_generics.dryml +3 -1
- data/taglibs/rapid_lifecycles.dryml +14 -9
- data/taglibs/rapid_navigation.dryml +1 -1
- data/taglibs/rapid_plus.dryml +1 -0
- data/taglibs/rapid_summary.dryml +300 -0
- data/taglibs/rapid_support.dryml +1 -1
- data/taglibs/rapid_user_pages.dryml +21 -19
- data/test/permissions/test_permissions.rb +1 -1
- metadata +12 -4
data/taglibs/rapid_support.dryml
CHANGED
@@ -12,7 +12,7 @@ This tag is in need of a review - it's a bit funky.
|
|
12
12
|
- '`*`' - equivalent to listing all of the regular 'content columns' of the current record
|
13
13
|
- A comma separated list of field names.
|
14
14
|
Defaults to '`*`'
|
15
|
-
- `
|
15
|
+
- `associations` - set to `has_many` to select the associations `has_many` relationships used as the "fields". Do not also give the `fields` attribute.
|
16
16
|
- `skip` - comma separated list of field names to omit.
|
17
17
|
- `skip-associations` - set to `has-many` to omit all `has_many` associations.
|
18
18
|
- `include-timestamps` - whether or not to include the standard ActiveRecord timestamp fields such as `created_at` and `updated_at`. Defaults to false.
|
@@ -11,43 +11,43 @@
|
|
11
11
|
<!-- Simple log-in page -->
|
12
12
|
<def tag="login-page">
|
13
13
|
<% remember_me = true if remember_me.nil? %>
|
14
|
-
<simple-page title="Log in" merge>
|
14
|
+
<simple-page title="#{ht 'hobo.login.title', :default=>['Log in'] }" merge>
|
15
15
|
|
16
16
|
<body: class="login-page" param/>
|
17
17
|
|
18
18
|
<content: param>
|
19
19
|
<header param="content-header">
|
20
|
-
<h2 param="heading">Log In</h2>
|
20
|
+
<h2 param="heading"><ht key="hobo.login.heading">Log In</ht></h2>
|
21
21
|
</header>
|
22
22
|
|
23
23
|
<section param="content-body">
|
24
24
|
<form action="&request.request_uri" class="login" param>
|
25
25
|
<labelled-item-list param>
|
26
26
|
<labelled-item>
|
27
|
-
<item-label param="login-label"><%= model.login_attribute.to_s.titleize %></item-label>
|
27
|
+
<item-label param="login-label"><ht key="hobo.login.email"><%= model.login_attribute.to_s.titleize %></ht></item-label>
|
28
28
|
<item-value><input type="text" name="login" id="login" class="string" param="login-input" /></item-value>
|
29
29
|
</labelled-item>
|
30
30
|
|
31
31
|
<labelled-item>
|
32
|
-
<item-label param="password-label">Password</item-label>
|
32
|
+
<item-label param="password-label"><ht key="hobo.login.password">Password</ht></item-label>
|
33
33
|
<item-value>
|
34
34
|
<input type="password" name="password" id="password" class="string" param="password-input"/>
|
35
35
|
</item-value>
|
36
36
|
</labelled-item>
|
37
37
|
|
38
38
|
<labelled-item param="remember-me">
|
39
|
-
<item-label class="field-label" param="remember-me-label">Remember me:</item-label>
|
39
|
+
<item-label class="field-label" param="remember-me-label"><ht key="hobo.login.remember_me">Remember me:</ht></item-label>
|
40
40
|
<item-value>
|
41
41
|
<input type="checkbox" name="remember_me" id="remember-me" param="remember-me-input" checked/>
|
42
42
|
</item-value>
|
43
43
|
</labelled-item>
|
44
44
|
</labelled-item-list>
|
45
45
|
<div param="actions">
|
46
|
-
<submit label='Log in' param/><if test="&signup_url" class='nav-item'>
|
47
|
-
or <a href="&signup_url">Sign up</a></if>
|
46
|
+
<submit label="#{ht 'hobo.actions.login', :default=>['Log in'] }" param/><if test="&signup_url" class='nav-item'>
|
47
|
+
<ht key="hobo.support.or">or</ht> <a param="signup" href="&signup_url"><ht key="hobo.login.signup">Sign up</ht></a></if>
|
48
48
|
</div>
|
49
49
|
</form>
|
50
|
-
<a href="&forgot_password_url" param="forgot-password" if="&forgot_password_url">Forgot your password?</a>
|
50
|
+
<a href="&forgot_password_url" param="forgot-password" if="&forgot_password_url"><ht key="hobo.login.forgot_password">Forgot your password?</ht></a>
|
51
51
|
</section>
|
52
52
|
</content:>
|
53
53
|
</simple-page>
|
@@ -57,30 +57,30 @@
|
|
57
57
|
<!-- The page that initiates the forgotten password process. Contians a single text-input where the user can provide
|
58
58
|
their email address -->
|
59
59
|
<def tag="forgot-password-page">
|
60
|
-
<simple-page title="Forgotten Password" merge>
|
60
|
+
<simple-page title="#{ht 'hobo.forgot_password.title', :default=>['Forgotten Password'] }" merge>
|
61
61
|
|
62
62
|
<body: class="forgot-password-page" param/>
|
63
63
|
|
64
64
|
<content: param>
|
65
65
|
<header param="content-header">
|
66
|
-
<h2 param="heading">Forgotten Password</h2>
|
67
|
-
<p>Enter the email address you signed up with. If we have it in
|
66
|
+
<h2 param="heading"><ht key="hobo.forgot_password.heading">Forgotten Password</ht></h2>
|
67
|
+
<p><ht key="hobo.forgot_password.text">Enter the email address you signed up with. If we have it in
|
68
68
|
our records we'll send you an email allowing you to choose a new
|
69
|
-
password.</p>
|
69
|
+
password.</ht></p>
|
70
70
|
</header>
|
71
71
|
|
72
72
|
<section param="content-body">
|
73
73
|
<form action="" class="forgot-password" param>
|
74
74
|
<labelled-item-list param>
|
75
75
|
<labelled-item>
|
76
|
-
<item-label param="email-address-label">Email Address</item-label>
|
76
|
+
<item-label param="email-address-label"><ht key="hobo.forgot_password.email">Email Address</ht></item-label>
|
77
77
|
<item-value>
|
78
78
|
<input type="text" name="email_address" id="email-address" class="email-address" param="email-address-input" />
|
79
79
|
</item-value>
|
80
80
|
</labelled-item>
|
81
81
|
</labelled-item-list>
|
82
82
|
<div param="actions">
|
83
|
-
<submit label="Send" param/>
|
83
|
+
<submit label="#{ht 'hobo.actions.send', :default=>['Send'] }" param/>
|
84
84
|
</div>
|
85
85
|
</form>
|
86
86
|
</section>
|
@@ -93,21 +93,23 @@
|
|
93
93
|
entered is in our records". This is to avoid a privacy concern that the forgotten-password mechanism can be otherwise used to tell
|
94
94
|
if a given email is associated with an account or not. -->
|
95
95
|
<def tag="forgot-password-email-sent-page">
|
96
|
-
<simple-page>
|
96
|
+
<simple-page title="#{ht 'hobo.forgot_password_sent.title', :default=>['Forgotten Password - Sent'] }" merge>
|
97
97
|
<body: class="forgot-password-page" param/>
|
98
98
|
|
99
99
|
<content: param>
|
100
100
|
<header param="content-header">
|
101
|
-
<h2 param>Forgotten Password - Sent</h2>
|
101
|
+
<h2 param><ht key="hobo.forgot_password_sent.heading">Forgotten Password - Sent</ht></h2>
|
102
102
|
</header>
|
103
103
|
|
104
104
|
<section param="content-body">
|
105
|
-
<p param="message">
|
105
|
+
<p param="message">
|
106
|
+
<ht key="hobo.forgot_password_sent.text" email="#{params[:email_address]}">
|
107
|
+
If the e-mail address you entered, <%= h params[:email_address] %>,
|
106
108
|
is in our records, you will
|
107
109
|
receive an e-mail from us with instructions for resetting your
|
108
110
|
password. If you don't receive this e-mail, please check your
|
109
|
-
junk mail folder.</p>
|
110
|
-
<p><a href="#{base_url}/">Back to <app-name/></a></p>
|
111
|
+
junk mail folder.</ht></p>
|
112
|
+
<p><a href="#{base_url}/"><ht key="hobo.actions.back">Back to</ht> <app-name/></a></p>
|
111
113
|
</section>
|
112
114
|
</content:>
|
113
115
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# All of the above for has-many through related records
|
9
9
|
# All of the above for belongs-to related records
|
10
10
|
#
|
11
|
-
# a permitted user can't create/update/delete any of the
|
11
|
+
# a permitted user can't create/update/delete any of the above related records without :accessible
|
12
12
|
|
13
13
|
|
14
14
|
require 'test/unit'
|
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: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Locke
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-17 00:00:00 +00:00
|
13
13
|
default_executable: hobo
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - "="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.9.0
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: hobofields
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
53
|
+
version: 0.9.0
|
54
54
|
version:
|
55
55
|
description:
|
56
56
|
email: tom@tomlocke.com
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- lib/hobo/dryml/template.rb
|
107
107
|
- lib/hobo/dryml/template_environment.rb
|
108
108
|
- lib/hobo/dryml/template_handler.rb
|
109
|
+
- lib/hobo/fake_initializer.rb
|
109
110
|
- lib/hobo/find_for.rb
|
110
111
|
- lib/hobo/generator.rb
|
111
112
|
- lib/hobo/guest.rb
|
@@ -135,12 +136,14 @@ files:
|
|
135
136
|
- lib/hobo/user.rb
|
136
137
|
- lib/hobo/user_controller.rb
|
137
138
|
- lib/hobo/view_hints.rb
|
139
|
+
- rails_generators/hobo/USAGE
|
138
140
|
- rails_generators/hobo/hobo_generator.rb
|
139
141
|
- rails_generators/hobo/templates/application.css
|
140
142
|
- rails_generators/hobo/templates/application.dryml
|
141
143
|
- rails_generators/hobo/templates/dryml-support.js
|
142
144
|
- rails_generators/hobo/templates/guest.rb
|
143
145
|
- rails_generators/hobo/templates/initializer.rb
|
146
|
+
- rails_generators/hobo_admin_site/USAGE
|
144
147
|
- rails_generators/hobo_admin_site/hobo_admin_site_generator.rb
|
145
148
|
- rails_generators/hobo_admin_site/templates/admin.css
|
146
149
|
- rails_generators/hobo_admin_site/templates/application.dryml
|
@@ -153,6 +156,7 @@ files:
|
|
153
156
|
- rails_generators/hobo_front_controller/templates/functional_test.rb
|
154
157
|
- rails_generators/hobo_front_controller/templates/helper.rb
|
155
158
|
- rails_generators/hobo_front_controller/templates/index.dryml
|
159
|
+
- rails_generators/hobo_front_controller/templates/summary.dryml
|
156
160
|
- rails_generators/hobo_model/USAGE
|
157
161
|
- rails_generators/hobo_model/hobo_model_generator.rb
|
158
162
|
- rails_generators/hobo_model/templates/fixtures.yml
|
@@ -164,10 +168,12 @@ files:
|
|
164
168
|
- rails_generators/hobo_model_controller/templates/controller.rb
|
165
169
|
- rails_generators/hobo_model_controller/templates/functional_test.rb
|
166
170
|
- rails_generators/hobo_model_controller/templates/helper.rb
|
171
|
+
- rails_generators/hobo_model_resource/USAGE
|
167
172
|
- rails_generators/hobo_model_resource/hobo_model_resource_generator.rb
|
168
173
|
- rails_generators/hobo_model_resource/templates/controller.rb
|
169
174
|
- rails_generators/hobo_model_resource/templates/functional_test.rb
|
170
175
|
- rails_generators/hobo_model_resource/templates/helper.rb
|
176
|
+
- rails_generators/hobo_rapid/USAGE
|
171
177
|
- rails_generators/hobo_rapid/hobo_rapid_generator.rb
|
172
178
|
- rails_generators/hobo_rapid/templates/IE7.js
|
173
179
|
- rails_generators/hobo_rapid/templates/blank.gif
|
@@ -188,6 +194,7 @@ files:
|
|
188
194
|
- rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/clean.css
|
189
195
|
- rails_generators/hobo_rapid/templates/themes/clean/public/stylesheets/rapid-ui.css
|
190
196
|
- rails_generators/hobo_rapid/templates/themes/clean/views/clean.dryml
|
197
|
+
- rails_generators/hobo_subsite/USAGE
|
191
198
|
- rails_generators/hobo_subsite/hobo_subsite_generator.rb
|
192
199
|
- rails_generators/hobo_subsite/templates/application.dryml
|
193
200
|
- rails_generators/hobo_subsite/templates/controller.rb
|
@@ -219,6 +226,7 @@ files:
|
|
219
226
|
- taglibs/rapid_navigation.dryml
|
220
227
|
- taglibs/rapid_pages.dryml
|
221
228
|
- taglibs/rapid_plus.dryml
|
229
|
+
- taglibs/rapid_summary.dryml
|
222
230
|
- taglibs/rapid_support.dryml
|
223
231
|
- taglibs/rapid_user_pages.dryml
|
224
232
|
- tasks/environments.rake
|