hobo 1.3.0.pre27 → 1.3.0.pre28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. data/VERSION +1 -1
  2. data/lib/generators/hobo/admin_subsite/admin_subsite_generator.rb +2 -5
  3. data/lib/generators/hobo/admin_subsite/templates/admin.css +20 -2
  4. data/lib/generators/hobo/admin_subsite/templates/application.dryml +1 -0
  5. data/lib/generators/hobo/controller.rb +1 -1
  6. data/lib/generators/hobo/rapid/rapid_generator.rb +2 -0
  7. data/lib/generators/hobo/rapid/templates/hobo-rapid.js +1 -1
  8. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-ACD3E6-DBE1E5-H.png +0 -0
  9. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-DBE1E5-FCFEF5-H.png +0 -0
  10. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/300-3B5F87-ACD3E6-H.png +0 -0
  11. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/spinner.gif +0 -0
  12. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/stylesheets/clean-sidemenu.css +81 -0
  13. data/lib/generators/hobo/rapid/templates/themes/clean-sidemenu/views/clean-sidemenu.dryml +30 -0
  14. data/lib/generators/hobo/rapid/templates/themes/clean/public/stylesheets/clean.css +1 -1
  15. data/lib/generators/hobo/subsite.rb +5 -3
  16. data/lib/generators/hobo/test_framework/test_framework_generator.rb +3 -3
  17. data/lib/generators/hobo/user_mailer/user_mailer_generator.rb +1 -1
  18. data/lib/hobo/model.rb +1 -1
  19. data/lib/hobo/rapid/taglibs/rapid_core.dryml +2 -2
  20. data/lib/hobo/rapid/taglibs/rapid_forms.dryml +19 -13
  21. data/lib/hobo/rapid/taglibs/rapid_summary.dryml +1 -1
  22. metadata +67 -7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0.pre27
1
+ 1.3.0.pre28
@@ -18,15 +18,12 @@ module Hobo
18
18
  end
19
19
 
20
20
  def generate_admin_user_controller
21
- invoke "hobo:controller", ["#{file_name}/#{options[:user_resource_name].pluralize.underscore}"]
21
+ invoke "hobo:controller", ["#{file_name}/#{options[:user_resource_name].pluralize.underscore}"], options
22
22
  template "users_index.dryml", "app/views/#{file_name}/#{options[:user_resource_name].pluralize.underscore}/index.dryml"
23
23
  end
24
24
 
25
25
  def generate_site_taglib
26
- invoke 'hobo:subsite_taglib', [name],
27
- :user_resource_name => options[:user_resource_name],
28
- :admin => true,
29
- :invite_only => invite_only?
26
+ invoke 'hobo:subsite_taglib', [name], options.merge(:admin => true)
30
27
  end
31
28
 
32
29
  def append_admin_tag_into_application_taglib
@@ -1,2 +1,20 @@
1
- html, body { background: #333;}
2
- .page-header { background: #555; }
1
+ body {
2
+ background-color: #333;
3
+ background-image: none;
4
+ }
5
+
6
+ .page-header {
7
+ background: #555;
8
+ }
9
+
10
+ .page-header.sidemenu {
11
+ background: none;
12
+ }
13
+
14
+ .page-header h1 a {
15
+ color:#FCFFF5;
16
+ }
17
+
18
+ #main-nav-container {
19
+ background:#555555
20
+ }
@@ -0,0 +1 @@
1
+ <!-- Global taglib - these tags are shared across all subsites -->
@@ -2,7 +2,7 @@ module Generators
2
2
  module Hobo
3
3
  Controller = classy_module do
4
4
 
5
- check_class_collision :suffix => 'Controller'
5
+ # check_class_collision :suffix => 'Controller'
6
6
 
7
7
  class_option :helpers, :type => :boolean,
8
8
  :desc => "Generates helper files",
@@ -16,6 +16,8 @@ module Hobo
16
16
  copy_file "hobo-rapid.css", "public/stylesheets/hobo-rapid.css"
17
17
  directory "themes/clean/public","public/hobothemes/clean"
18
18
  directory "themes/clean/views", "app/views/taglibs/themes/clean"
19
+ directory "themes/clean-sidemenu/public","public/hobothemes/clean-sidemenu"
20
+ directory "themes/clean-sidemenu/views", "app/views/taglibs/themes/clean-sidemenu"
19
21
  end
20
22
 
21
23
  end
@@ -53,7 +53,7 @@ var Hobo = {
53
53
  i += 1
54
54
  }
55
55
  })
56
- params.push("page_path=" + hoboPagePath)
56
+ params.push("page_path=" + encodeURIComponent(hoboPagePath))
57
57
  }
58
58
 
59
59
  if (resultUpdates) {
@@ -0,0 +1,81 @@
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
+ }
@@ -0,0 +1,30 @@
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::User.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>
@@ -1,4 +1,4 @@
1
- html, body {color: #193440; background: url(../images/300-ACD3E6-fff.png) repeat-x #fff; }
1
+ body {color: #193440; background: url(../images/300-ACD3E6-fff.png) repeat-x #fff; }
2
2
  .page-header {color: white; background: url(../images/101-3B5F87-ACD3E6.png) repeat-x #3F606E;}
3
3
  .page-header .navigation.main-nav a {
4
4
  background: url(../images/30-3E547A-242E42.png) repeat-x #242E42;
@@ -10,7 +10,7 @@ module Generators
10
10
  :type => :boolean,
11
11
  :desc => "Rename application.dryml to front_site.dryml"
12
12
 
13
- check_class_collision :suffix => 'SiteController'
13
+ # check_class_collision :suffix => 'SiteController'
14
14
 
15
15
  def move_and_generate_files
16
16
  if options[:make_front_site]
@@ -20,8 +20,10 @@ module Generators
20
20
  end
21
21
  say "Renaming app/views/taglibs/application.dryml to app/views/taglibs/front_site.dryml" \
22
22
  unless options[:quiet]
23
- FileUtils.mv('app/views/taglibs/application.dryml', "app/views/taglibs/front_site.dryml") unless options[:pretend]
24
- copy_file "application.dryml", 'app/views/taglibs/application.dryml'
23
+ unless options[:pretend]
24
+ FileUtils.mv('app/views/taglibs/application.dryml', "app/views/taglibs/front_site.dryml")
25
+ copy_file "application.dryml", 'app/views/taglibs/application.dryml'
26
+ end
25
27
  end
26
28
 
27
29
  template "controller.rb.erb", File.join('app/controllers', file_name, "#{file_name}_site_controller.rb")
@@ -42,10 +42,10 @@ private
42
42
  end
43
43
 
44
44
  def setup_rspec
45
- gem 'rspec-rails', '>= 2.0.0', :group => [:test, :development]
45
+ gem 'rspec-rails', '>= 2.5.0', :group => [:test, :development]
46
46
  @should_update = true
47
47
  return unless options[:update]
48
- @finalize_hooks << lambda {say "Finalizing rspec installation..."; invoke 'rspec:install'}
48
+ @finalize_hooks << lambda {say "Finalizing rspec installation..."; system 'rails g rspec:install'}
49
49
  end
50
50
 
51
51
  def setup_shoulda
@@ -60,7 +60,7 @@ private
60
60
 
61
61
  def add_generators_block
62
62
  n = name == 'rspec_with_shoulda' ? 'rspec' : name
63
- block = "\n config.generators do |g|"
63
+ block = "\n config.generators do |g|"
64
64
  block << "\n g.test_framework :#{n}, :fixtures => #{options[:fixtures].inspect}" if !options[:fixtures] || name != 'test_unit'
65
65
  block << "\n g.fallbacks[:#{n}] = :test_unit" unless name == 'test_unit'
66
66
  block << "\n g.fixture_replacement = :#{options[:fixture_replacement]}" unless options[:fixture_replacement].blank?
@@ -12,7 +12,7 @@ module Hobo
12
12
  "rails generate hobo:user_mailer [NAME=user] [options]"
13
13
  end
14
14
 
15
- check_class_collision :suffix => 'Mailer'
15
+ # check_class_collision :suffix => 'Mailer'
16
16
 
17
17
  def generate_mailer
18
18
  template 'mailer.rb.erb', File.join('app/mailers', "#{file_path}_mailer.rb")
@@ -450,7 +450,7 @@ module Hobo
450
450
  if parts[0..2].include?(0)
451
451
  nil
452
452
  else
453
- Time.zone ? Time.zone.local(*parts) : Time.local(*parts)
453
+ field_type <= Time ? Time.utc(*parts) : Time.zone.local(*parts)
454
454
  end
455
455
  else
456
456
  value
@@ -474,8 +474,8 @@ Assuming the context is a blog post...
474
474
  <!-- Renders `this` in localized :default format. `format` can be a symbol representing a locale key or a standard format string (see strftime) -->
475
475
  <def tag="view" for="Date" attrs="format"><%= this && (format||= :default) && I18n.backend.localize(I18n.locale, this, format) %></def>
476
476
 
477
- <!-- Renders `this` in localized :default format. `format` can be a symbol representing a locale key or a standard format string (see strftime) -->
478
- <def tag="view" for="Time" attrs="format"><%= this && (format||= :default) && I18n.backend.localize(I18n.locale, this, format) %></def>
477
+ <!-- Renders `this` in localized :default format. `format` can be a symbol representing a Time::DATE_FORMATS or a standard format string (see strftime) -->
478
+ <def tag="view" for="Time" attrs="format"><%= this && (format||= :time) && (format.is_a?(Symbol) ? this.to_s(format) : this.strftime(format) ) %></def>
479
479
 
480
480
  <!-- Renders `this` in localized :default format. `format` can be a symbol representing a locale key or a standard format string (see strftime) -->
481
481
  <def tag="view" for="ActiveSupport::TimeWithZone" attrs="format"><%= this && (format||= :default) && I18n.backend.localize(I18n.locale, this, format) %></def>
@@ -374,33 +374,36 @@ edit collections a `Category` model in your application:
374
374
  ### Attributes
375
375
 
376
376
  - order: The order of the year, month and day menus. A comma separated string or an array. Default: "year, month, day"
377
+ - date-separator, discard-type, prompt and prefix are passed to the select_date helper as options
377
378
 
378
- Any other attributes are passed through to the `select_date` helper.
379
+ All the other attributes are passed to the `select_date` helper as the html-options hash.
379
380
 
380
381
  The menus default to the current date if the current value is nil.
381
382
 
382
383
  -->
383
- <def tag="input" for="date" attrs="order">
384
+ <def tag="input" for="date" attrs="order, date-separator, discard-type, prompt, prefix">
384
385
  <% order = order.nil? ? [:year, :month, :day] : comma_split(order).*.to_sym -%>
385
- <%= select_date(this || current_time, attributes.merge(:prefix => param_name_for_this, :order => order)) %>
386
+ <%= select_date(this || current_time,
387
+ (all_attributes - attributes.keys).reverse_merge(:prefix => param_name_for_this).merge(:order => order),
388
+ attributes - [:name]) %>
386
389
  </def>
387
390
 
388
391
 
389
- <!-- A date/time picker, using the `select_date` helper from Rails
392
+ <!-- A date/time picker, using the `select_time` helper from Rails
390
393
 
391
394
  ### Attributes
392
395
 
393
- - order: The order of the year, month and date menus. A comma separated string or an array. Default: "year, month,
394
- day, hour, minute, second"
396
+ - include-seconds, time-separator, prompt and prefix are passed to the select_time helper as options
395
397
 
396
- Any other attributes are passed through to the `select_date` helper.
398
+ All the other attributes are passed to the `select_time` helper as the html-options hash.
397
399
 
398
400
  The menus default to the current time if the current value is nil.
399
401
 
400
402
  -->
401
- <def tag="input" for="time" attrs="order">
402
- <% order = order.nil? ? [:year, :month, :day, :hour, :minute, :second] : comma_split(order).*.to_sym -%>
403
- <%= select_date(this || current_time, attributes.merge(:prefix => param_name_for_this, :order => order)) %>
403
+ <def tag="input" for="time" attrs="include-seconds, time-separator, prompt, prefix">
404
+ <%= select_time( this || current_time,
405
+ (all_attributes - attributes.keys).reverse_merge(:prefix => param_name_for_this),
406
+ attributes - [:name] ) %>
404
407
  </def>
405
408
 
406
409
 
@@ -410,18 +413,21 @@ The menus default to the current time if the current value is nil.
410
413
 
411
414
  - order: The order of the year, month and date menus. A comma separated string or an array. Default: "year, month,
412
415
  day, hour, minute"
416
+ - date-separator, discard-type, prompt and prefix are passed to the select_date helper as options
413
417
 
414
- Any other attributes are passed through to the `select_datetime` helper.
418
+ All the other attributes are passed to the `select_date` helper as the html-options hash.
415
419
 
416
420
  The menus default to the current time if the current value is nil.
417
421
 
418
422
  -->
419
- <def tag="input" for="datetime" attrs="order">
423
+ <def tag="input" for="datetime" attrs="order, date-separator, discard-type, prompt, prefix">
420
424
  <% if ! order.nil?
421
425
  order = comma_split(order).*.to_sym
422
426
  attributes.merge!(:order => order)
423
427
  end -%>
424
- <%= select_datetime(this || current_time, attributes.merge(:prefix => param_name_for_this)) %>
428
+ <%= select_datetime(this || current_time,
429
+ (all_attributes - attributes.keys).reverse_merge(:prefix => param_name_for_this).merge(:order => order),
430
+ attributes - [:name] ) %>
425
431
  </def>
426
432
 
427
433
  <!-- An `<input type='text'>` input. -->
@@ -130,7 +130,7 @@
130
130
  <def tag="plugin-method">
131
131
  <%=
132
132
  braids = File.open("#{Rails.root}/.braids") {|f| YAML::load(f) } rescue {}
133
- if !braids[this.root.to_s.gsub(Rails.root+"/", "")].nil?
133
+ if !braids[this.root.to_s.gsub(Rails.root.to_s+"/", "")].nil?
134
134
  "braid"
135
135
  elsif File.lstat(this.root.to_s).symlink?
136
136
  "symlink"
metadata CHANGED
@@ -1,8 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 1.3.0.pre27
4
+ hash: -1637108434
5
+ prerelease: true
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 0
10
+ - pre28
11
+ version: 1.3.0.pre28
6
12
  platform: ruby
7
13
  authors:
8
14
  - Tom Locke
@@ -10,7 +16,7 @@ autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
18
 
13
- date: 2011-02-22 00:00:00 -04:00
19
+ date: 2011-03-02 00:00:00 -04:00
14
20
  default_executable:
15
21
  dependencies:
16
22
  - !ruby/object:Gem::Dependency
@@ -21,6 +27,11 @@ dependencies:
21
27
  requirements:
22
28
  - - ">="
23
29
  - !ruby/object:Gem::Version
30
+ hash: 7
31
+ segments:
32
+ - 3
33
+ - 0
34
+ - 0
24
35
  version: 3.0.0
25
36
  type: :runtime
26
37
  version_requirements: *id001
@@ -32,6 +43,11 @@ dependencies:
32
43
  requirements:
33
44
  - - ">="
34
45
  - !ruby/object:Gem::Version
46
+ hash: 961915916
47
+ segments:
48
+ - 3
49
+ - 0
50
+ - pre
35
51
  version: 3.0.pre
36
52
  type: :runtime
37
53
  version_requirements: *id002
@@ -43,7 +59,13 @@ dependencies:
43
59
  requirements:
44
60
  - - "="
45
61
  - !ruby/object:Gem::Version
46
- version: 1.3.0.pre27
62
+ hash: -1637108434
63
+ segments:
64
+ - 1
65
+ - 3
66
+ - 0
67
+ - pre28
68
+ version: 1.3.0.pre28
47
69
  type: :runtime
48
70
  version_requirements: *id003
49
71
  - !ruby/object:Gem::Dependency
@@ -54,7 +76,13 @@ dependencies:
54
76
  requirements:
55
77
  - - "="
56
78
  - !ruby/object:Gem::Version
57
- version: 1.3.0.pre27
79
+ hash: -1637108434
80
+ segments:
81
+ - 1
82
+ - 3
83
+ - 0
84
+ - pre28
85
+ version: 1.3.0.pre28
58
86
  type: :runtime
59
87
  version_requirements: *id004
60
88
  - !ruby/object:Gem::Dependency
@@ -65,7 +93,13 @@ dependencies:
65
93
  requirements:
66
94
  - - "="
67
95
  - !ruby/object:Gem::Version
68
- version: 1.3.0.pre27
96
+ hash: -1637108434
97
+ segments:
98
+ - 1
99
+ - 3
100
+ - 0
101
+ - pre28
102
+ version: 1.3.0.pre28
69
103
  type: :runtime
70
104
  version_requirements: *id005
71
105
  - !ruby/object:Gem::Dependency
@@ -76,6 +110,9 @@ dependencies:
76
110
  requirements:
77
111
  - - ">="
78
112
  - !ruby/object:Gem::Version
113
+ hash: 3
114
+ segments:
115
+ - 0
79
116
  version: "0"
80
117
  type: :development
81
118
  version_requirements: *id006
@@ -87,6 +124,9 @@ dependencies:
87
124
  requirements:
88
125
  - - ">="
89
126
  - !ruby/object:Gem::Version
127
+ hash: 3
128
+ segments:
129
+ - 0
90
130
  version: "0"
91
131
  type: :development
92
132
  version_requirements: *id007
@@ -98,6 +138,11 @@ dependencies:
98
138
  requirements:
99
139
  - - ">="
100
140
  - !ruby/object:Gem::Version
141
+ hash: 9
142
+ segments:
143
+ - 0
144
+ - 7
145
+ - 5
101
146
  version: 0.7.5
102
147
  type: :development
103
148
  version_requirements: *id008
@@ -131,6 +176,7 @@ files:
131
176
  - lib/generators/hobo/admin_subsite/admin_subsite_generator.rb
132
177
  - lib/generators/hobo/admin_subsite/templates/admin.css
133
178
  - lib/generators/hobo/admin_subsite/templates/admin_tag_injection.erb
179
+ - lib/generators/hobo/admin_subsite/templates/application.dryml
134
180
  - lib/generators/hobo/admin_subsite/templates/controller.rb.erb
135
181
  - lib/generators/hobo/admin_subsite/templates/users_index.dryml
136
182
  - lib/generators/hobo/assets/assets_generator.rb
@@ -173,6 +219,12 @@ files:
173
219
  - lib/generators/hobo/rapid/templates/ie7-recalc.js
174
220
  - lib/generators/hobo/rapid/templates/lowpro.js
175
221
  - lib/generators/hobo/rapid/templates/reset.css
222
+ - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-ACD3E6-DBE1E5-H.png
223
+ - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/100-DBE1E5-FCFEF5-H.png
224
+ - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/300-3B5F87-ACD3E6-H.png
225
+ - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/images/spinner.gif
226
+ - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/public/stylesheets/clean-sidemenu.css
227
+ - lib/generators/hobo/rapid/templates/themes/clean-sidemenu/views/clean-sidemenu.dryml
176
228
  - lib/generators/hobo/rapid/templates/themes/clean/public/images/101-3B5F87-ACD3E6.png
177
229
  - lib/generators/hobo/rapid/templates/themes/clean/public/images/30-3E547A-242E42.png
178
230
  - lib/generators/hobo/rapid/templates/themes/clean/public/images/30-DBE1E5-FCFEF5.png
@@ -320,17 +372,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
320
372
  requirements:
321
373
  - - ">="
322
374
  - !ruby/object:Gem::Version
375
+ hash: 3
376
+ segments:
377
+ - 0
323
378
  version: "0"
324
379
  required_rubygems_version: !ruby/object:Gem::Requirement
325
380
  none: false
326
381
  requirements:
327
382
  - - ">="
328
383
  - !ruby/object:Gem::Version
384
+ hash: 23
385
+ segments:
386
+ - 1
387
+ - 3
388
+ - 6
329
389
  version: 1.3.6
330
390
  requirements: []
331
391
 
332
392
  rubyforge_project: hobo
333
- rubygems_version: 1.5.0
393
+ rubygems_version: 1.3.7
334
394
  signing_key:
335
395
  specification_version: 3
336
396
  summary: The web app builder for Rails