hobo 0.5.3 → 0.6

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 (80) hide show
  1. data/bin/hobo +18 -4
  2. data/hobo_files/plugin/CHANGES.txt +511 -0
  3. data/hobo_files/plugin/README +8 -3
  4. data/hobo_files/plugin/Rakefile +81 -0
  5. data/hobo_files/plugin/generators/hobo/hobo_generator.rb +4 -4
  6. data/hobo_files/plugin/generators/hobo/templates/guest.rb +1 -1
  7. data/hobo_files/plugin/generators/hobo_front_controller/hobo_front_controller_generator.rb +1 -1
  8. data/hobo_files/plugin/generators/hobo_front_controller/templates/index.dryml +16 -22
  9. data/hobo_files/plugin/generators/hobo_front_controller/templates/login.dryml +4 -6
  10. data/hobo_files/plugin/generators/hobo_front_controller/templates/search.dryml +6 -5
  11. data/hobo_files/plugin/generators/hobo_front_controller/templates/signup.dryml +4 -6
  12. data/hobo_files/plugin/generators/hobo_migration/hobo_migration_generator.rb +237 -0
  13. data/hobo_files/plugin/generators/hobo_migration/templates/migration.rb +9 -0
  14. data/hobo_files/plugin/generators/hobo_model/USAGE +2 -3
  15. data/hobo_files/plugin/generators/hobo_model/hobo_model_generator.rb +1 -14
  16. data/hobo_files/plugin/generators/hobo_model/templates/fixtures.yml +1 -6
  17. data/hobo_files/plugin/generators/hobo_model/templates/model.rb +10 -4
  18. data/hobo_files/plugin/generators/hobo_rapid/hobo_rapid_generator.rb +7 -6
  19. data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_base.css +68 -0
  20. data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_rapid.css +93 -0
  21. data/hobo_files/plugin/generators/hobo_rapid/templates/hobo_rapid.js +11 -6
  22. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/images/plus.png +0 -0
  23. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/public/stylesheets/application.css +24 -14
  24. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/views/application.dryml +28 -44
  25. data/hobo_files/plugin/generators/hobo_user_model/USAGE +2 -12
  26. data/hobo_files/plugin/generators/hobo_user_model/hobo_user_model_generator.rb +1 -14
  27. data/hobo_files/plugin/generators/hobo_user_model/templates/fixtures.yml +0 -6
  28. data/hobo_files/plugin/generators/hobo_user_model/templates/model.rb +8 -1
  29. data/hobo_files/plugin/init.rb +6 -2
  30. data/hobo_files/plugin/lib/active_record/has_many_association.rb +23 -12
  31. data/hobo_files/plugin/lib/extensions.rb +134 -40
  32. data/hobo_files/plugin/lib/extensions/test_case.rb +0 -1
  33. data/hobo_files/plugin/lib/hobo.rb +77 -46
  34. data/hobo_files/plugin/lib/hobo/authenticated_user.rb +24 -2
  35. data/hobo_files/plugin/lib/hobo/authentication_support.rb +2 -1
  36. data/hobo_files/plugin/lib/hobo/controller.rb +35 -12
  37. data/hobo_files/plugin/lib/hobo/define_tags.rb +4 -4
  38. data/hobo_files/plugin/lib/hobo/dryml.rb +33 -51
  39. data/hobo_files/plugin/lib/hobo/dryml/dryml_builder.rb +47 -34
  40. data/hobo_files/plugin/lib/hobo/dryml/scoped_variables.rb +37 -0
  41. data/hobo_files/plugin/lib/hobo/dryml/taglib.rb +27 -5
  42. data/hobo_files/plugin/lib/hobo/dryml/template.rb +545 -302
  43. data/hobo_files/plugin/lib/hobo/dryml/template_environment.rb +305 -135
  44. data/hobo_files/plugin/lib/hobo/email_address.rb +5 -0
  45. data/hobo_files/plugin/lib/hobo/field_spec.rb +66 -0
  46. data/hobo_files/plugin/lib/hobo/hobo_helper.rb +325 -0
  47. data/hobo_files/plugin/lib/hobo/html_string.rb +2 -0
  48. data/hobo_files/plugin/lib/hobo/lazy_hash.rb +13 -1
  49. data/hobo_files/plugin/lib/hobo/markdown_string.rb +3 -1
  50. data/hobo_files/plugin/lib/hobo/model.rb +185 -66
  51. data/hobo_files/plugin/lib/hobo/model_controller.rb +56 -49
  52. data/hobo_files/plugin/lib/hobo/password_string.rb +2 -0
  53. data/hobo_files/plugin/lib/hobo/plugins.rb +75 -0
  54. data/hobo_files/plugin/lib/hobo/rapid_helper.rb +98 -0
  55. data/hobo_files/plugin/lib/hobo/static_tags +0 -3
  56. data/hobo_files/plugin/lib/hobo/textile_string.rb +11 -1
  57. data/hobo_files/plugin/lib/hobo/undefined.rb +1 -1
  58. data/hobo_files/plugin/lib/rexml.rb +166 -75
  59. data/hobo_files/plugin/spec/fixtures/users.yml +9 -0
  60. data/hobo_files/plugin/spec/spec.opts +6 -0
  61. data/hobo_files/plugin/spec/spec_helper.rb +28 -0
  62. data/hobo_files/plugin/spec/unit/hobo/dryml/template_spec.rb +650 -0
  63. data/hobo_files/plugin/tags/core.dryml +58 -4
  64. data/hobo_files/plugin/tags/rapid.dryml +289 -135
  65. data/hobo_files/plugin/tags/rapid_document_tags.dryml +49 -0
  66. data/hobo_files/plugin/tags/rapid_editing.dryml +92 -69
  67. data/hobo_files/plugin/tags/rapid_forms.dryml +242 -0
  68. data/hobo_files/plugin/tags/rapid_navigation.dryml +65 -65
  69. data/hobo_files/plugin/tags/rapid_pages.dryml +197 -124
  70. data/hobo_files/plugin/tags/rapid_support.dryml +23 -0
  71. metadata +29 -22
  72. data/hobo_files/plugin/generators/hobo_model/templates/migration.rb +0 -13
  73. data/hobo_files/plugin/generators/hobo_rapid/templates/themes/default/default_mapping.rb +0 -11
  74. data/hobo_files/plugin/generators/hobo_user_model/templates/migration.rb +0 -15
  75. data/hobo_files/plugin/lib/hobo/HtmlString +0 -3
  76. data/hobo_files/plugin/lib/hobo/controller_helpers.rb +0 -135
  77. data/hobo_files/plugin/lib/hobo/core.rb +0 -475
  78. data/hobo_files/plugin/lib/hobo/rapid.rb +0 -447
  79. data/hobo_files/plugin/test/hobo_dryml_template_test.rb +0 -7
  80. data/hobo_files/plugin/test/hobo_test.rb +0 -7
data/bin/hobo CHANGED
@@ -27,7 +27,7 @@ def command(s)
27
27
  exit(1) unless ok
28
28
  end
29
29
 
30
- if ARGV.length == 0
30
+ if ARGV.length == 0 || ARGV.include?("--help")
31
31
  puts USAGE
32
32
  exit 1
33
33
  end
@@ -50,9 +50,25 @@ until ARGV.empty?
50
50
  end
51
51
  end
52
52
 
53
- command("rails #{app_path}")
53
+ command("mkdir #{app_path}")
54
54
 
55
55
  Dir.chdir(app_path) do
56
+ gen = "ruby #{File.join('script', 'generate')}"
57
+ plugin = "ruby #{File.join('script', 'plugin')}"
58
+
59
+ puts "\nChecking out Edge Rails...\n"
60
+ system("svn co http://dev.rubyonrails.org/svn/rails/trunk vendor/rails") or
61
+ begin
62
+ puts "Could not check out Edge Rails - maybe svn is not installed?"
63
+ exit 1
64
+ end
65
+
66
+ puts "\nGenerating Edge Rails application...\n"
67
+ command("ruby #{File.join('vendor', 'rails', 'railties', 'bin', 'rails')} .")
68
+
69
+ puts "\nInstalling classic_pagination\n"
70
+ command("#{plugin} install svn://errtheblog.com/svn/plugins/classic_pagination")
71
+
56
72
  if hobo_svn
57
73
  puts "\nInstalling Hobo plugin via svn checkout...\n"
58
74
  command("svn co #{HOBO_REPO} vendor/plugins/hobo")
@@ -61,8 +77,6 @@ Dir.chdir(app_path) do
61
77
  FileUtils.cp_r File.join(SRC_FILES, "plugin"), "vendor/plugins/hobo"
62
78
  end
63
79
 
64
- gen = "ruby #{File.join('script', 'generate')}"
65
-
66
80
  puts "\nInitialising Hobo...\n"
67
81
  command("#{gen} hobo --add-routes")
68
82
 
@@ -1,3 +1,514 @@
1
+ === Release 0.6 ===
2
+
3
+ DRYML
4
+
5
+ Local tags are gone. We finally gave up on this feature as too
6
+ complex.
7
+
8
+ New feature - <set_scoped> allows a variable assignment that exists
9
+ only for the lifetime of the tag-body of <set_scoped/>. At the end
10
+ of the block, the previous value of the variable, if there will be
11
+ restored. This feature gives a lot of the power of local tags in a
12
+ less pure but far simpler mechanism.
13
+
14
+ New feature - polymorphic tags. A tag can have many definitions for
15
+ different types of object. Define with e.g.
16
+
17
+ <def tag="card" for="User"/>...</def>
18
+ <def tag="card" for="BlogPost">...</def>
19
+
20
+ call with <card for_type/>
21
+
22
+ The actual tag called will be selected according to the type of
23
+ the current context.
24
+
25
+ Core tags moved from lib/hobo/core.rb to tags/core.dryml. This
26
+ follows on from the deprecating of def_tag
27
+
28
+ Fix: attrs_for now works with tags imported from a taglib
29
+
30
+ Gone: template parameter modifiers (e.g. <my_param.append>). The
31
+ only one left is 'replace' which is now written as '<my_param
32
+ replace>' and 'replace' is now a reserved attribute name. Two new
33
+ features - default tagbodies and restoring parameters - give the
34
+ same functionality but are more powerful because you can now _wrap_
35
+ a parameter in your own tag.
36
+
37
+ New feature - default tagbodies. Tags can provide a default tagbody
38
+ like this:
39
+
40
+ <def tag="foo">...<tagbody>this is the default</tagbody>...</def>
41
+
42
+ Callers can keep the default: <foo/>
43
+ replace it <foo>my tagbody</foo>
44
+ or wrap it in new content: <foo>&ldquo;<default_tagbody/>&rdquo;</foo>
45
+
46
+ You can give restore the default tagbody of an element further up
47
+ the hierarchy using the 'for' attribute. e.g:
48
+
49
+ <foo><baa>&ldquo;<default_tagbody for="foo"/>&rdquo;</baa></foo>
50
+
51
+ New feature: restoring replaced template parameters. For example -
52
+ wrapping a template param in an extra div:
53
+
54
+ <MyTemplate>
55
+ <my_param replace><div><my_param restore/></div></my_param>
56
+ </MyTemplate>
57
+
58
+ def@alias_current renamed to 'alias_current_as'
59
+
60
+ @if and @unless controll attributes always test for non-blank rather
61
+ than true. This is more convenient in DRYML where we generally want
62
+ to skip stuff if a collection is empty (empty enumerables are blank,
63
+ but not false)
64
+
65
+ An attribute that starts with an XML entity reference is *not*
66
+ considered a code attribute, even though it does start '&'
67
+ e.g. label="&raquo; Next"
68
+
69
+ #merge_attrs now always accumultates rather than
70
+ replaces css classes.
71
+
72
+ form, input and a have been removed from static_tags - these are now
73
+ defined tags.
74
+
75
+ Many core tags moved to Rapid. There are very ferw core tags now - just
76
+ the basic control tags (if, unless etc.)
77
+
78
+
79
+ Hobo Models
80
+
81
+ The display_name method is not used anymore. Instead use the new
82
+ polymorphic tags.
83
+
84
+ <def tag="name" for="MyModel">...</def>
85
+
86
+ The <name> tag eventually falls back on to_s, so as an alternative
87
+ you can rename your display_name methods to to_s.
88
+
89
+ New semantics for #new and #build.
90
+
91
+ #new now does what new_without_appending used to do. That is, it
92
+ instantiates a new object exactly as if it was in the collection,
93
+ but it does not modify the collection itself.
94
+
95
+ #build is extended so that it sets the belongs_to association that
96
+ is the counterpart to the has_many.
97
+
98
+ For existing apps, just change any calls to #new_without_appending
99
+ to #new
100
+
101
+ Refactored the rich type mechanism to make it easier to add new
102
+ types. To add a new type, e.g.:
103
+
104
+ class Isbn < String; COLUMN_TYPE = :string; end
105
+
106
+ Hobo.field_types[:isbn] = Isbn
107
+
108
+ You can then use :isbn as a field type in 'fields do', and
109
+ register a view with <def tag="view" for="isbn">
110
+
111
+
112
+ New rich type Hobo::EmailAddress < String
113
+
114
+ Doesn't have any special behaviour as yet, but we could do nifty
115
+ things with it in the future like auto anti-spam cloaking,
116
+ validations...
117
+
118
+ New method #nillable_field? tests if the underlying collumn can be
119
+ null.
120
+
121
+ New methods #created_date and #modified_date return
122
+ [created|modified]_at.to_date
123
+
124
+ Default to_s for all hobo_models
125
+
126
+
127
+ Model controller
128
+
129
+ Boolean fields now get a false value when the param is either '0' or
130
+ 'false'.
131
+
132
+
133
+ Front controller
134
+
135
+ All the templates are updated to use the new DRYML
136
+
137
+
138
+ Migration generator
139
+
140
+ Now gives an option to generate and run the migration immediately
141
+
142
+ Will create the "foo_type" column for belongs_to associations marked
143
+ as polymorphic.
144
+
145
+
146
+ Hobo Rapid
147
+
148
+ lib/hobo/rapid.rb is gone. The tags are now in tags/rapid.dryml and
149
+ the helpers are in lib/hobo/rapid_helper.rb
150
+
151
+ Now includes two CSS stylesheets. hobo_base.css provides some handy
152
+ reset rules to reduce cross-browser headaches, and hobo_rapid.css
153
+ provides default styling for some of the Rapid components.
154
+
155
+ Rapid split up into more separate dryml files: rapid,
156
+ rapid_document_tags, rapid_forms, rapid_pages, rapid_editing,
157
+ rapid_navigation, rapid_support
158
+
159
+ There are a great many changes to the Rapid tags, too much to
160
+ describe individually here. The most important changes are:
161
+
162
+ <show> becomes <view>. <view> is a polymorphic tag, so you can
163
+ <def tag="view" for="MyClass">
164
+
165
+ <edit> is gone. Use <editor> if you want a tag that gives an
166
+ in-place (ajax) editor, and degrades to <view> if the user does
167
+ not have edit permission. <editor> is a polymorphic tag, so you
168
+ can <def tag="editor" for="MyClass">
169
+
170
+ <form_field> is now <input>. If you give a type attributes, you
171
+ get a regular html input tag, if you don't you get a smart Hobo
172
+ form field appropriate for the type of the context. <input> is a
173
+ polymorphic tag, so you can <def tag="input" for="MyClass">
174
+
175
+ All the special form-field tags tags that ended _field now end
176
+ _input
177
+
178
+ <table_for> becomes <Table>
179
+
180
+ <ul_for> becomes <UL>
181
+
182
+ <object_form> and <remote_method_form> are now both handled by
183
+ <form>
184
+
185
+ <object_link> and <new_object_link> are now both handled by <a>
186
+
187
+ <object_table> becomes <FieldList>
188
+
189
+ <display_name> becomes <name>
190
+
191
+ Various small changes to the navigation tags - please see
192
+ rapid_navigation.dryml
193
+
194
+
195
+ Hobo Rapid Javascript
196
+
197
+ Fix: problems with the save button in TinyMCE fighting with the
198
+ save-on-blur behaviour.
199
+
200
+
201
+ Tabla theme
202
+
203
+ Tweaks to application.dryml and the stylesheet for new DRYML
204
+
205
+
206
+ Hobo user model generator
207
+
208
+ Doesn't declare the authentication fields anymore, as these have
209
+ been moved to Hobo::Authenticated user. This is part of the move to
210
+ supporting multiple user models.
211
+
212
+
213
+ Hobo controller & helpers
214
+
215
+ ControllerHelpers are now HoboHelper, and there's a change to the
216
+ way this is included in both the controller and the view.
217
+
218
+ #render_tags extended to support polymorphic tags
219
+
220
+ #site_search now renders the polymorphic <card> tag for each search
221
+ result.
222
+
223
+
224
+ Hobo module
225
+
226
+ New method Hobo.symbolic_type_name returns a symbol abbreviation for
227
+ a rich type. e.g. Hobo.symbolic_type_name(Hobo::Text) #=> :text
228
+
229
+ New method Hobo.type_name
230
+
231
+ Hobo.type_name(MyModule::MyClass) #=> "my_module__my_class"
232
+
233
+ Note the double underscore
234
+
235
+
236
+ Core Extensions
237
+
238
+ ActiveSupport's HashWithIndifferentAccess is extended to keep it's
239
+ indifferent access semantics with Hobo's extensions to Hash.
240
+
241
+
242
+
243
+ === Release 0.6-pre1 ===
244
+
245
+ *NOTE* We are now using Edge Rails for all our tests. YMMV with other
246
+ Rails releases. If you do upgrade tp Edge Rails, you'll need to
247
+ install classic_pagination too (this dependency will probably go away
248
+ at some point)
249
+
250
+ hobolib directory (app/views/hobolib) renamed to 'taglibs'
251
+
252
+
253
+ DRYML
254
+
255
+ Hobo::DefineTags and def_tag are deprecated - they'll be phased out.
256
+
257
+ Code attributes changed from foo="#baa" to foo="&baa"
258
+
259
+ Changing the context:
260
+
261
+ obj="..." renamed to with="..."
262
+
263
+ attr="..." renamed to field="..."
264
+
265
+ Shorthand syntax <show:authtor.name/> equivalent to <show field="author.name"/>
266
+ Note that the ':' and field name(s) are optional on the close tag, e.g.:
267
+
268
+ <repeat:comments> ... </repeat>
269
+
270
+ (Be aware that your DRYML is no longer valid XML if you go for this option)
271
+
272
+ <taglib> renamed to <include>
273
+
274
+ part_id="..." renamed to part="..."
275
+
276
+ #{...} is now supported in attributes of static tags (i.e. plain HTML tags)
277
+
278
+ <include> (formerly <taglib>) now supports the 'as' attribute for
279
+ putting tags in namespaces.
280
+
281
+ <include src="my_taglib"/>, then... <my_tag/>
282
+ <include src="my_taglib" as="foo"/>, then... <foo.my_tag/>
283
+
284
+ (note that <foo.my_tag/> compiles to simple "foo.my_tag()", i.e. a
285
+ method call on an object, so you can do other stuff with this if
286
+ the mood takes you)
287
+
288
+ xattrs="..." renamed to merge_attrs="..."
289
+
290
+ New feature: template tags
291
+
292
+ Parameter tags (<:foo>...</:foo>) are gone. Replaced by template
293
+ parameters.
294
+
295
+ content_option and replace_option are gone. The 'param' attribute is
296
+ the new equivalent (part of template tags)
297
+
298
+ <else> can now be used in many places. e.g. after <repeat>, the else
299
+ content will be used if the repeated collection is empty.
300
+
301
+ Attributes can now have no RHS, e.g.
302
+
303
+ <logo small/> is equivalent to <logo small="&true"/>
304
+
305
+ (note your DRYML is not valid XML if you use this shorthand)
306
+
307
+ #attrs_for can be called for any tag and return the declared
308
+ attributes on the tag. e.g.
309
+
310
+ attrs_for(:foo) #=> [:a, :b] -- assuming <def tag="foo" attrs="a, b">
311
+
312
+ New feature: local tags, e.g.
313
+
314
+ <def tag="a">
315
+ <def tag="panel">...</def>
316
+
317
+ ... Any call to panel in here, or in the tagbody of the call to
318
+ <a> will get the local definition. Note that local tags are full
319
+ closures and have access to state from the containing tag...
320
+ </def>
321
+
322
+ <set a="&1" b="&2"/> equivalent to <% a = 1; b = 2 %>
323
+
324
+ New feature: polymorphic tag calls. e.g. if the current context is a
325
+ User <card for_type/> will try to call <user_card/>, falling back on
326
+ just <card/> if no such tag exists.
327
+
328
+ New feature: control attributes
329
+
330
+ <p if="..."/> as a shorthand for <if q="..."><p/></if>
331
+ <p unless="..."/> as a shorthand for <unless q="..."><p/></unless>
332
+ <p repeat="..."/> as a shorthand for <repeat with="..."><p/></repeat>
333
+
334
+ Think of these as the dryml equivalent of the suffix 'if' and 'unless' in Ruby.
335
+
336
+ If you give the attributes a string, it is treated test for a
337
+ non-blank field, e.g. if="address" is like
338
+ <if q="&!this.address.blank?">
339
+
340
+ You can use <else> after tags with these attributes on them.
341
+
342
+ Fix: calling @view methods with a block now works
343
+
344
+ The list of tags considered 'static' (i.e. plain HTML tags) can now
345
+ be customised by putting your own list (one tag per line) in
346
+ config/dryml_static_tags.txt
347
+
348
+
349
+ Hobo Controllers
350
+
351
+ New directive "include_taglib" allows a specific DRYML taglib to be
352
+ included in every action on this controller.
353
+
354
+ render_tag now supports custom render options, e.g.
355
+
356
+ render_tag :error_message, { :message => "uh oh" }, { :status => 500 }
357
+
358
+ Options passed to #hobo_index are now also forwarded to
359
+ #paginated_find, making it easier to change the page size etc.
360
+
361
+ #paginated_find now takes an :association parameter to provide a
362
+ custom association
363
+
364
+ Fix: :order option to paginated_find ignored in some situations.
365
+
366
+ Hobo controller actions now perform a #hobo_render if you give a
367
+ response block but the blog does not do a render or a redirect. So
368
+ e.g. if you just want to update the session you can leave hobo to
369
+ handle the response
370
+
371
+ Fix: hobo_create now checks for create permission if you pass a
372
+ custom :this parameter
373
+
374
+ POSTing and PUTing now support boolean values
375
+
376
+
377
+ Hobo Models
378
+
379
+ #created_by renamed to #set_creator. This should help avoid name
380
+ clashes with column names etc.
381
+
382
+ Added field declarations on models. This replaces set_field_type and
383
+ also supports the migration generator.
384
+
385
+ fields do
386
+ name :string
387
+ body :html
388
+ end
389
+
390
+ Added return_type declaration for setting rich types on model
391
+ methods, e.g.
392
+
393
+ return_type :html
394
+ def my_method
395
+ ...
396
+ end
397
+
398
+ This allows DRYML to render the correct widget even when the
399
+ method is returning nil
400
+
401
+ Fix: def_scope was pretty much completely broken
402
+
403
+ RSpec support and a test Rails app (in spec/rails-root) added to the
404
+ repository.
405
+
406
+
407
+ DRYML Core Tags
408
+
409
+ <dynamic_tag/> renamed to <call_tag/>
410
+
411
+ <display_name/> displays "(not available)" if the context is nil
412
+
413
+ show@no_span renamed to show@no_wrapper, and for content such as
414
+ :html it now generates a div instead of a span.
415
+
416
+ count@unless_none -- nothing output when count is zero (can be
417
+ followed by an <else>)
418
+
419
+ <join> now uses <display_name> if no tagbody is given.
420
+
421
+ join@with renamed to join@separator
422
+
423
+
424
+ DRYML Helpers
425
+
426
+ #param_name_for will strip a trailing '?' if there is one.
427
+
428
+
429
+ Hobo Rapid Tags
430
+
431
+ <boolean_field> now also generates a hidden tag with the same name
432
+ and value '0' like the rails helper. This fixes HTMLs broken idea of
433
+ how to handle checkboxes (you get a 0 value if the checkbox is not
434
+ checked, instead of no parameter at all)
435
+
436
+ <object_form> no longer generates hidden fields for created_at and updated_at
437
+
438
+
439
+ Hobo::TextileString now includes a monkey-patch to RedCloth
440
+
441
+
442
+ Users & Authentication
443
+
444
+ Added: Hobo maintains a login_count attribute if one exists on your user model.
445
+
446
+
447
+ Hobo Rapid Javascript
448
+
449
+ Ajax forms now default to not resseting and not refocussing after submission.
450
+
451
+ Fix: ajax behaviour (Hobo.applyEvents) now applied to the result of searches.
452
+
453
+ Fix: Ajax now using encodeURIComponent instead of escape. Fixes
454
+ problems with foreign characters.
455
+
456
+
457
+ Tabla theme
458
+
459
+ Removed <application_logo/>
460
+
461
+ Added missing image plus.png
462
+
463
+
464
+ Generators
465
+
466
+ New: hobo_migration generator. Creates fully implemented migrations
467
+ for you based on field declarations in your models
468
+
469
+ hobo_model and hobo_user_model generators updated accordingly --
470
+ they don't generate migrations any more.
471
+
472
+ Routes
473
+
474
+ Routes with ';' have been changed to use '/' as per edge Rails.
475
+
476
+ Permission System
477
+
478
+ Hobo.can_edit? can now handle feild names that end in '?'
479
+
480
+ Hobo Module
481
+
482
+ Hobo.models now skips files whos names don't look like models
483
+ (e.g. editor backup files)
484
+
485
+
486
+ Core Extensions:
487
+
488
+ Add: Enumerable#build_hash
489
+
490
+ (1..3).build_hash {|i| ["#{i} Xs", "X" * i]}
491
+ => {"1 Xs"=>"X", "3 Xs"=>"XXX", "2 Xs"=>"XX"}
492
+
493
+ Add: Enumerable#map_hash
494
+
495
+ (1..5).map_hash { |x| x**2 }
496
+ => {5=>25, 1=>1, 2=>4, 3=>9, 4=>16}
497
+
498
+ Add: Hash#-
499
+
500
+ {:a => 1, :b => 2} - [:a] #=> {:b = 2}
501
+
502
+ Add: Hash#&
503
+
504
+ {:a => 1, :b => 2} & [:a] #=> {:a = 2}
505
+
506
+
507
+ Documentation
508
+
509
+ Added contributed rdoc to Hobo::AuthenticatedUser (thanks!)
510
+
511
+
1
512
  === Release 0.5.3 ===
2
513
 
3
514
  Core tags