dust-generators 0.2.8 → 0.3.1

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 (121) hide show
  1. data/lib/dust/version.rb +2 -2
  2. data/lib/generators/dust/albums/templates/app/views/albums/show.html.haml +1 -1
  3. data/lib/generators/dust/scaffold/scaffold_generator.rb +24 -24
  4. data/lib/generators/dust/scaffold/templates/actions/create.rb +1 -1
  5. data/lib/generators/dust/scaffold/templates/actions/destroy.rb +2 -2
  6. data/lib/generators/dust/scaffold/templates/actions/edit.rb +1 -1
  7. data/lib/generators/dust/scaffold/templates/actions/index.rb +1 -1
  8. data/lib/generators/dust/scaffold/templates/actions/new.rb +1 -1
  9. data/lib/generators/dust/scaffold/templates/actions/show.rb +1 -1
  10. data/lib/generators/dust/scaffold/templates/actions/update.rb +2 -2
  11. data/lib/generators/dust/scaffold/templates/controller.rb +3 -2
  12. data/lib/generators/dust/scaffold/templates/migration.rb +2 -2
  13. data/lib/generators/dust/scaffold/templates/model.rb +13 -11
  14. data/lib/generators/dust/scaffold/templates/view_controller.rb +8 -6
  15. data/lib/generators/dust/scaffold/templates/views/front_end/haml/index.html.haml +6 -5
  16. data/lib/generators/dust/scaffold/templates/views/front_end/haml/show.html.haml +11 -11
  17. data/lib/generators/dust/scaffold/templates/views/haml/_form.html.haml +1 -1
  18. data/lib/generators/dust/scaffold/templates/views/haml/_search.html.haml +1 -1
  19. data/lib/generators/dust/scaffold/templates/views/haml/index.html.haml +2 -2
  20. data/lib/generators/dust/scaffold/templates/views/haml/show.html.haml +1 -1
  21. metadata +49 -174
  22. data/rails_generators/dust_albums/USAGE +0 -6
  23. data/rails_generators/dust_albums/dust_albums_generator.rb +0 -196
  24. data/rails_generators/dust_albums/templates/README +0 -5
  25. data/rails_generators/dust_albums/templates/app/controllers/albums_controller.rb +0 -56
  26. data/rails_generators/dust_albums/templates/app/controllers/photos_controller.rb +0 -89
  27. data/rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb +0 -17
  28. data/rails_generators/dust_albums/templates/app/helpers/albums_helper.rb +0 -2
  29. data/rails_generators/dust_albums/templates/app/helpers/photos_helper.rb +0 -2
  30. data/rails_generators/dust_albums/templates/app/helpers/view_albums_helper.rb +0 -2
  31. data/rails_generators/dust_albums/templates/app/models/album.rb +0 -42
  32. data/rails_generators/dust_albums/templates/app/models/photo.rb +0 -18
  33. data/rails_generators/dust_albums/templates/app/views/albums/_form.html.erb +0 -52
  34. data/rails_generators/dust_albums/templates/app/views/albums/_search.html.erb +0 -6
  35. data/rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb +0 -37
  36. data/rails_generators/dust_albums/templates/app/views/albums/edit.html.erb +0 -5
  37. data/rails_generators/dust_albums/templates/app/views/albums/index.html.erb +0 -61
  38. data/rails_generators/dust_albums/templates/app/views/albums/manage.html.erb +0 -65
  39. data/rails_generators/dust_albums/templates/app/views/albums/new.html.erb +0 -6
  40. data/rails_generators/dust_albums/templates/app/views/albums/show.html.erb +0 -56
  41. data/rails_generators/dust_albums/templates/app/views/albums/show.js.erb +0 -1
  42. data/rails_generators/dust_albums/templates/app/views/photos/_form.html.erb +0 -23
  43. data/rails_generators/dust_albums/templates/app/views/photos/_photo.html.erb +0 -25
  44. data/rails_generators/dust_albums/templates/app/views/photos/_search.html.erb +0 -6
  45. data/rails_generators/dust_albums/templates/app/views/photos/array.js.erb +0 -3
  46. data/rails_generators/dust_albums/templates/app/views/photos/edit.html.erb +0 -28
  47. data/rails_generators/dust_albums/templates/app/views/photos/index.html.erb +0 -85
  48. data/rails_generators/dust_albums/templates/app/views/photos/new.html.erb +0 -7
  49. data/rails_generators/dust_albums/templates/app/views/photos/show.html.erb +0 -26
  50. data/rails_generators/dust_albums/templates/app/views/photos/show.js.erb +0 -9
  51. data/rails_generators/dust_albums/templates/app/views/view_albums/index.html.erb +0 -31
  52. data/rails_generators/dust_albums/templates/app/views/view_albums/show.html.erb +0 -31
  53. data/rails_generators/dust_albums/templates/images/browse.png +0 -0
  54. data/rails_generators/dust_albums/templates/images/cancel.png +0 -0
  55. data/rails_generators/dust_albums/templates/images/save_position.png +0 -0
  56. data/rails_generators/dust_albums/templates/images/upload.png +0 -0
  57. data/rails_generators/dust_albums/templates/initializers/flash_session_cookie_middleware.rb +0 -17
  58. data/rails_generators/dust_albums/templates/initializers/session_store_middleware.rb +0 -1
  59. data/rails_generators/dust_albums/templates/javascript/dragsort.js +0 -288
  60. data/rails_generators/dust_albums/templates/javascript/dust_album.js +0 -28
  61. data/rails_generators/dust_albums/templates/javascript/uploadify/jquery.uploadify.v2.1.0.js +0 -258
  62. data/rails_generators/dust_albums/templates/javascript/uploadify/swfobject.js +0 -4
  63. data/rails_generators/dust_albums/templates/javascript/uploadify/uploadify.swf +0 -0
  64. data/rails_generators/dust_albums/templates/migration/albums_migration.rb +0 -39
  65. data/rails_generators/dust_albums/templates/stylesheets/dust_album.css +0 -16
  66. data/rails_generators/dust_albums/templates/stylesheets/dust_album_app.css +0 -15
  67. data/rails_generators/dust_albums/templates/stylesheets/uploadify.css +0 -84
  68. data/rails_generators/dust_config/USAGE +0 -23
  69. data/rails_generators/dust_config/dust_config_generator.rb +0 -32
  70. data/rails_generators/dust_config/templates/config.yml +0 -8
  71. data/rails_generators/dust_config/templates/load_config.rb +0 -2
  72. data/rails_generators/dust_scaffold/USAGE +0 -51
  73. data/rails_generators/dust_scaffold/dust_scaffold_generator.rb +0 -291
  74. data/rails_generators/dust_scaffold/templates/actions/create.rb +0 -9
  75. data/rails_generators/dust_scaffold/templates/actions/destroy.rb +0 -6
  76. data/rails_generators/dust_scaffold/templates/actions/edit.rb +0 -3
  77. data/rails_generators/dust_scaffold/templates/actions/index.rb +0 -3
  78. data/rails_generators/dust_scaffold/templates/actions/new.rb +0 -3
  79. data/rails_generators/dust_scaffold/templates/actions/show.rb +0 -3
  80. data/rails_generators/dust_scaffold/templates/actions/update.rb +0 -9
  81. data/rails_generators/dust_scaffold/templates/controller.rb +0 -9
  82. data/rails_generators/dust_scaffold/templates/fixtures.yml +0 -9
  83. data/rails_generators/dust_scaffold/templates/helper.rb +0 -2
  84. data/rails_generators/dust_scaffold/templates/migration.rb +0 -20
  85. data/rails_generators/dust_scaffold/templates/model.rb +0 -37
  86. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/create.rb +0 -11
  87. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/destroy.rb +0 -6
  88. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/edit.rb +0 -4
  89. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/index.rb +0 -4
  90. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/new.rb +0 -4
  91. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/show.rb +0 -4
  92. data/rails_generators/dust_scaffold/templates/tests/rspec/actions/update.rb +0 -11
  93. data/rails_generators/dust_scaffold/templates/tests/rspec/controller.rb +0 -8
  94. data/rails_generators/dust_scaffold/templates/tests/rspec/model.rb +0 -7
  95. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/create.rb +0 -13
  96. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb +0 -8
  97. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/edit.rb +0 -6
  98. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/index.rb +0 -6
  99. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/new.rb +0 -6
  100. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/show.rb +0 -6
  101. data/rails_generators/dust_scaffold/templates/tests/shoulda/actions/update.rb +0 -13
  102. data/rails_generators/dust_scaffold/templates/tests/shoulda/controller.rb +0 -5
  103. data/rails_generators/dust_scaffold/templates/tests/shoulda/model.rb +0 -7
  104. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb +0 -11
  105. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/destroy.rb +0 -6
  106. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/edit.rb +0 -4
  107. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/index.rb +0 -4
  108. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/new.rb +0 -4
  109. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/show.rb +0 -4
  110. data/rails_generators/dust_scaffold/templates/tests/testunit/actions/update.rb +0 -11
  111. data/rails_generators/dust_scaffold/templates/tests/testunit/controller.rb +0 -5
  112. data/rails_generators/dust_scaffold/templates/tests/testunit/model.rb +0 -7
  113. data/rails_generators/dust_scaffold/templates/view_controller.rb +0 -17
  114. data/rails_generators/dust_scaffold/templates/views/erb/_form.html.erb +0 -16
  115. data/rails_generators/dust_scaffold/templates/views/erb/_search.html.erb +0 -6
  116. data/rails_generators/dust_scaffold/templates/views/erb/edit.html.erb +0 -4
  117. data/rails_generators/dust_scaffold/templates/views/erb/index.html.erb +0 -24
  118. data/rails_generators/dust_scaffold/templates/views/erb/new.html.erb +0 -5
  119. data/rails_generators/dust_scaffold/templates/views/erb/show.html.erb +0 -23
  120. data/rails_generators/dust_scaffold/templates/views/front_end/index.html.erb +0 -14
  121. data/rails_generators/dust_scaffold/templates/views/front_end/show.html.erb +0 -17
data/lib/dust/version.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  class Dust
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 2
5
- PATCH = 8
4
+ MINOR = 3
5
+ PATCH = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -25,7 +25,7 @@
25
25
  |
26
26
  = link_to "Select <%=child_plural_class_name%> For Deletion", manage_<%=child_plural_name%>_path(@<%=parent_singular_name%>, :format => 'html'), :class => 'settings'
27
27
  %p
28
- Drag <%=child_plural_name%> to reorder them. Don't forget to hit the save order button when your done.
28
+ Drag <%=child_plural_name%> to reorder them. Don't forget to hit the save order button when you are done.
29
29
  %ul{:class => "sortable <%=child_plural_name%>"}
30
30
  = render :partial => @<%=parent_singular_name%>.<%=child_plural_name%>.roots, :<%=child_singular_name%> => @<%=child_singular_name%>
31
31
  .clear
@@ -69,14 +69,14 @@ module Dust
69
69
 
70
70
  def create_model
71
71
  unless @skip_model
72
- template 'model.rb', "app/models/#{singular_name}.rb"
73
- if test_framework == :rspec
74
- template "tests/rspec/model.rb", "spec/models/#{singular_name}_spec.rb"
75
- template 'fixtures.yml', "spec/fixtures/#{plural_name}.yml"
76
- else
77
- template "tests/#{test_framework}/model.rb", "test/unit/#{singular_name}_test.rb"
78
- template 'fixtures.yml', "test/fixtures/#{plural_name}.yml"
79
- end
72
+ template 'model.rb', "app/models/app/#{singular_name}.rb"
73
+ #if test_framework == :rspec
74
+ #template "tests/rspec/model.rb", "spec/models/#{singular_name}_spec.rb"
75
+ #template 'fixtures.yml', "spec/fixtures/#{plural_name}.yml"
76
+ #else
77
+ #template "tests/#{test_framework}/model.rb", "test/unit/#{singular_name}_test.rb"
78
+ #template 'fixtures.yml', "test/fixtures/#{plural_name}.yml"
79
+ #end
80
80
  end
81
81
  end
82
82
 
@@ -88,39 +88,39 @@ module Dust
88
88
 
89
89
  def create_controller
90
90
  unless options.skip_controller?
91
- template 'controller.rb', "app/controllers/#{plural_name}_controller.rb"
91
+ template 'controller.rb', "app/controllers/app/#{plural_name}_controller.rb"
92
92
 
93
- template 'helper.rb', "app/helpers/#{plural_name}_helper.rb"
93
+ #template 'helper.rb', "app/helpers/#{plural_name}_helper.rb"
94
94
 
95
95
  controller_actions.each do |action|
96
96
  if %w[index show new edit].include?(action) # Actions with templates
97
- template "views/#{view_language}/#{action}.html.#{view_language}", "app/views/#{plural_name}/#{action}.html.#{view_language}"
97
+ template "views/#{view_language}/#{action}.html.#{view_language}", "app/views/app/#{plural_name}/#{action}.html.#{view_language}"
98
98
  end
99
99
  end
100
100
 
101
- template "views/#{view_language}/_search.html.#{view_language}", "app/views/#{plural_name}/_search.html.#{view_language}"
101
+ template "views/#{view_language}/_search.html.#{view_language}", "app/views/app/#{plural_name}/_search.html.#{view_language}"
102
102
 
103
103
  if form_partial?
104
- template "views/#{view_language}/_form.html.#{view_language}", "app/views/#{plural_name}/_form.html.#{view_language}"
104
+ template "views/#{view_language}/_form.html.#{view_language}", "app/views/app/#{plural_name}/_form.html.#{view_language}"
105
105
  end
106
106
 
107
107
  unless options[:skip_frontend]
108
- template "view_controller.rb", "app/controllers/view_#{plural_name}_controller.rb"
108
+ template "view_controller.rb", "app/controllers/front_end/app/#{plural_name}_controller.rb"
109
109
 
110
- route("match \"all-#{plural_name}\" => \"view_#{plural_name}#index\", :as => :view_#{plural_name}")
111
- route("match \"#{singular_name}/:filename\" => \"view_#{plural_name}#show\", :as => :view_#{singular_name}")
110
+ route("match \"all-#{plural_name}\" => \"front_end/app/#{plural_name}#index\", :as => :front_end_app_#{plural_name}")
111
+ route("match \"#{singular_name}/:filename\" => \"front_end/app/#{plural_name}#show\", :as => :front_end_app_#{singular_name}")
112
112
 
113
- template "views/front_end/#{view_language}/index.html.#{view_language}", "app/views/view_#{plural_name}/index.html.#{view_language}"
114
- template "views/front_end/#{view_language}/show.html.#{view_language}", "app/views/view_#{plural_name}/show.html.#{view_language}"
113
+ template "views/front_end/#{view_language}/index.html.#{view_language}", "app/views/front_end/app/#{plural_name}/index.html.#{view_language}"
114
+ template "views/front_end/#{view_language}/show.html.#{view_language}", "app/views/front_end/app/#{plural_name}/show.html.#{view_language}"
115
115
  end
116
116
 
117
- route "resources #{plural_name.to_sym.inspect}"
117
+ route "namespace :app do resources #{plural_name.to_sym.inspect} end"
118
118
 
119
- if test_framework == :rspec
120
- template "tests/#{test_framework}/controller.rb", "spec/controllers/#{plural_name}_controller_spec.rb"
121
- else
122
- template "tests/#{test_framework}/controller.rb", "test/functional/#{plural_name}_controller_test.rb"
123
- end
119
+ #if test_framework == :rspec
120
+ #template "tests/#{test_framework}/controller.rb", "spec/controllers/#{plural_name}_controller_spec.rb"
121
+ #else
122
+ #template "tests/#{test_framework}/controller.rb", "test/functional/#{plural_name}_controller_test.rb"
123
+ #end
124
124
  end
125
125
  end
126
126
 
@@ -1,5 +1,5 @@
1
1
  def create
2
- @<%= singular_name %> = <%= class_name %>.new(params[:<%= singular_name %>])
2
+ @<%= singular_name %> = ::App::<%= class_name %>.new(params[:app_<%= singular_name %>])
3
3
  if @<%= singular_name %>.save
4
4
  flash[:notice] = "Successfully created <%= model_name.underscore.humanize.downcase %>."
5
5
  redirect_to <%= item_path('url') %>
@@ -1,6 +1,6 @@
1
1
  def destroy
2
- @<%= singular_name %> = <%= class_name %>.find(params[:id])
2
+ @<%= singular_name %> = ::App::<%= class_name %>.find(params[:id])
3
3
  @<%= singular_name %>.destroy
4
4
  flash[:notice] = "Successfully destroyed <%= model_name.underscore.humanize.downcase %>."
5
- redirect_to <%= items_path('url') %>
5
+ redirect_to app_<%= items_path('url') %>
6
6
  end
@@ -1,3 +1,3 @@
1
1
  def edit
2
- @<%= singular_name %> = <%= class_name %>.find(params[:id])
2
+ @<%= singular_name %> = ::App::<%= class_name %>.find(params[:id])
3
3
  end
@@ -1,3 +1,3 @@
1
1
  def index
2
- @<%= plural_name %> = <%= class_name %>.page(params[:search], params[:page])
2
+ @<%= plural_name %> = ::App::<%= class_name %>.page(params[:search], params[:page])
3
3
  end
@@ -1,3 +1,3 @@
1
1
  def new
2
- @<%= singular_name %> = <%= class_name %>.new
2
+ @<%= singular_name %> = ::App::<%= class_name %>.new
3
3
  end
@@ -1,3 +1,3 @@
1
1
  def show
2
- @<%= singular_name %> = <%= class_name %>.find(params[:id])
2
+ @<%= singular_name %> = ::App::<%= class_name %>.find(params[:id])
3
3
  end
@@ -1,6 +1,6 @@
1
1
  def update
2
- @<%= singular_name %> = <%= class_name %>.find(params[:id])
3
- if @<%= singular_name %>.update_attributes(params[:<%= singular_name %>])
2
+ @<%= singular_name %> = ::App::<%= class_name %>.find(params[:id])
3
+ if @<%= singular_name %>.update_attributes(params[:app_<%= singular_name %>])
4
4
  flash[:notice] = "Successfully updated <%= model_name.underscore.humanize.downcase %>."
5
5
  redirect_to <%= item_path('url') %>
6
6
  else
@@ -1,9 +1,10 @@
1
+ module App
1
2
  class <%= plural_class_name %>Controller < ApplicationController
2
3
 
3
- filter_resource_access
4
-
4
+ filter_access_to :all
5
5
  layout 'cms'
6
6
 
7
7
  <%= controller_methods :actions %>
8
8
 
9
9
  end
10
+ end
@@ -10,9 +10,9 @@ class Create<%= plural_class_name %> < ActiveRecord::Migration
10
10
  end
11
11
  end
12
12
 
13
- CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "<%= plural_name %>", :url => "/<%= plural_name %>"})
13
+ Dust::CmsMenuItem.create({:title =>"<%= plural_class_name %>", :controller_name => "app_<%= plural_name %>", :url => "/app/<%= plural_name %>"})
14
14
  <%- unless options[:skip_frontend] %>
15
- MenuItem.create({:title => "All <%=plural_class_name%>", :url => "/all-<%=plural_name%>", :active => true})
15
+ Dust::MenuItem.create({:title => "All <%=plural_class_name%>", :url => "/all-<%=plural_name%>", :active => true})
16
16
  <%- end -%>
17
17
 
18
18
  def self.down
@@ -1,16 +1,18 @@
1
- class <%= class_name %> < ActiveRecord::Base
2
- attr_accessible <%= model_attributes.map { |a| ":#{a.name}" }.join(", ") %>
1
+ module App
2
+ class <%= class_name %> < ActiveRecord::Base
3
+ attr_accessible <%= model_attributes.map { |a| ":#{a.name}" }.join(", ") %>
3
4
 
4
- <%- first_attribute = model_attributes.first -%>
5
- def self.page(search, page)
6
- with_permissions_to(:manage).search(search).order("<%= first_attribute.name %>").paginate(:per_page => 12, :page => page)
7
- end
5
+ <%- first_attribute = model_attributes.first -%>
6
+ def self.page(search, page)
7
+ with_permissions_to(:manage).search(search).order("<%= first_attribute.name %>").paginate(:per_page => 12, :page => page)
8
+ end
8
9
 
9
- def self.search(search)
10
- if search
11
- where("<%= first_attribute.name %> LIKE ?", "%#{search}%")
12
- else
13
- scoped
10
+ def self.search(search)
11
+ if search
12
+ where("<%= first_attribute.name %> LIKE ?", "%#{search}%")
13
+ else
14
+ scoped
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -1,17 +1,19 @@
1
1
  <%- first_attribute = model_attributes.first -%>
2
- class View<%= plural_class_name %>Controller < ApplicationController
2
+ module FrontEnd
3
+ class App::<%= plural_class_name %>Controller < ApplicationController
3
4
 
4
5
  def index
5
- @<%= plural_name %> = <%= class_name %>.page(params[:search], params[:page])
6
+ @<%= plural_name %> = ::App::<%= class_name %>.page(params[:search], params[:page])
6
7
  end
7
8
 
8
9
  def show
9
- if <%= class_name %>.find_by_<%= first_attribute.name %>(params[:filename]) == nil
10
- @<%= singular_name %> = <%= class_name %>.find(:first)
11
- render :file => "#{RAILS_ROOT}/public/404.html", :layout => false, :status => 404
10
+ @<%= singular_name %> = ::App::<%= class_name %>.find_by_<%= first_attribute.name %>(params[:filename])
11
+ if @<%= singular_name %> == nil
12
+ render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
12
13
  else
13
- @<%= singular_name %> = <%= class_name %>.find_by_<%= first_attribute.name %>(params[:filename])
14
+ @<%= singular_name %>
14
15
  end
15
16
  end
16
17
 
17
18
  end
19
+ end
@@ -1,10 +1,11 @@
1
1
  - title "<%= plural_name.titleize %>"
2
2
  <%- first_attribute = model_attributes.first -%>
3
3
 
4
- = will_paginate @<%= plural_name %>
4
+ = render_region "<%= plural_name %>" do
5
+ = will_paginate @<%= plural_name %>
5
6
 
6
- - @<%= plural_name %>.each do |<%= singular_name %>|
7
- .item
8
- %h3= link_to <%= singular_name %>.<%= first_attribute.name %>, view_<%= singular_name %>_path(<%= singular_name %>.<%= first_attribute.name %>)
7
+ - @<%= plural_name %>.each do |<%= singular_name %>|
8
+ .item
9
+ %h3= link_to <%= singular_name %>.<%= first_attribute.name %>, front_end_app_<%= singular_name %>_path(<%= singular_name %>.<%= first_attribute.name %>)
9
10
 
10
- = will_paginate @<%= plural_name %>
11
+ = will_paginate @<%= plural_name %>
@@ -1,15 +1,15 @@
1
1
  <%- first_attribute = model_attributes.first -%>
2
2
  - title @<%= singular_name %>.title
3
3
 
4
- - content_tag :div, :class => "page_#{@<%= singular_name %>.id}" do
4
+ = content_tag :div, :class => "page_#{@<%= singular_name %>.id}" do
5
+ = render_region "<%= singular_name %>" do
6
+ - heading @<%= singular_name %>.<%= first_attribute.name %>
7
+ = @<%= singular_name %>.<%= first_attribute.name %>
5
8
 
6
- - heading @<%= singular_name %>.<%= first_attribute.name %>
7
- = @<%= singular_name %>.<%= first_attribute.name %>
8
-
9
- - if permitted_to? :manage, :<%= plural_name %>
10
- %p
11
- = link_to "Edit", edit_<%= singular_name %>_path(@<%= singular_name %>)
12
- |
13
- = link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
14
- |
15
- = link_to "View All", <%= plural_name %>_path
9
+ - if permitted_to? :manage, :<%= plural_name %>
10
+ %p
11
+ = link_to "Edit", edit_<%= singular_name %>_path(@<%= singular_name %>)
12
+ |
13
+ = link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
14
+ |
15
+ = link_to "View All", <%= plural_name %>_path
@@ -1,7 +1,7 @@
1
1
  = content_for :head do
2
2
  = javascript_include_tag :ckeditor
3
3
 
4
- - form_for @<%= singular_name %>, :validate => true do |f|
4
+ = form_for @<%= singular_name %>, :validate => true do |f|
5
5
  = f.error_messages
6
6
  <%- for attribute in model_attributes -%>
7
7
  .item
@@ -1,5 +1,5 @@
1
1
  #searchbox
2
- = form_tag <%= plural_name %>_path, :method => 'get' do
2
+ = form_tag app_<%= plural_name %>_path, :method => 'get' do
3
3
  = text_field_tag :search, params[:search], :class => "input-text", :placeholder => 'Search <%= plural_name.capitalize %>'
4
4
  = image_submit_tag "admin/blank.png", :class => "image-submit"
5
5
 
@@ -3,14 +3,14 @@
3
3
 
4
4
  .button_bar
5
5
  = render :partial => 'search'
6
- = link_to 'new page', new_<%= singular_name %>_path, :class => 'newfile tip', :title => "New <%= singular_name.titleize %>"
6
+ = link_to 'new page', new_app_<%= singular_name %>_path, :class => 'newfile tip', :title => "New <%= singular_name.titleize %>"
7
7
 
8
8
  = will_paginate @<%= plural_name %>
9
9
 
10
10
  - @<%= plural_name %>.each do |<%= singular_name %>|
11
11
  .item
12
12
  .ui-widget.ui-helper-clearfix{:style => 'float:right'}
13
- = link_to '', edit_<%= singular_name %>_path(<%= singular_name %>), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
13
+ = link_to '', edit_app_<%= singular_name %>_path(<%= singular_name %>), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
14
14
  = link_to '', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
15
15
 
16
16
  %h3= link_to <%= singular_name %>.<%= first_attribute.name %>, <%= singular_name %>
@@ -5,7 +5,7 @@
5
5
 
6
6
  .ui-widget.ui-helper-clearfix{:style => "float:right"}
7
7
  <%- if action? :edit -%>
8
- =link_to '', edit_<%= singular_name %>_path(@<%= singular_name %>), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
8
+ =link_to '', edit_app_<%= singular_name %>_path(@<%= singular_name %>), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
9
9
  <%- end -%>
10
10
  <%- if action? :destroy -%>
11
11
  =link_to "", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
metadata CHANGED
@@ -1,88 +1,68 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dust-generators
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 8
9
- version: 0.2.8
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - rossnelson
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-06-28 00:00:00 -05:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-12-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: shoulda
22
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70293410465400 !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
30
22
  type: :development
31
23
  prerelease: false
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *70293410465400
25
+ - !ruby/object:Gem::Dependency
34
26
  name: bundler
35
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &70293410462920 !ruby/object:Gem::Requirement
36
28
  none: false
37
- requirements:
29
+ requirements:
38
30
  - - ~>
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 1
42
- - 0
43
- - 0
31
+ - !ruby/object:Gem::Version
44
32
  version: 1.0.0
45
33
  type: :development
46
34
  prerelease: false
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *70293410462920
36
+ - !ruby/object:Gem::Dependency
49
37
  name: jeweler
50
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &70293410474480 !ruby/object:Gem::Requirement
51
39
  none: false
52
- requirements:
40
+ requirements:
53
41
  - - ~>
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 5
58
- - 2
42
+ - !ruby/object:Gem::Version
59
43
  version: 1.5.2
60
44
  type: :development
61
45
  prerelease: false
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *70293410474480
47
+ - !ruby/object:Gem::Dependency
64
48
  name: rcov
65
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &70293410472920 !ruby/object:Gem::Requirement
66
50
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- segments:
71
- - 0
72
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
73
55
  type: :development
74
56
  prerelease: false
75
- version_requirements: *id004
57
+ version_requirements: *70293410472920
76
58
  description: Generators such as Uploadify Albums and Photos, and Location or facilities
77
59
  email: axcess1@me.com
78
60
  executables: []
79
-
80
61
  extensions: []
81
-
82
- extra_rdoc_files:
62
+ extra_rdoc_files:
83
63
  - LICENSE.txt
84
64
  - README.rdoc
85
- files:
65
+ files:
86
66
  - Gemfile
87
67
  - Gemfile.lock
88
68
  - LICENSE.txt
@@ -198,141 +178,36 @@ files:
198
178
  - lib/generators/dust/scaffold/templates/views/haml/index.html.haml
199
179
  - lib/generators/dust/scaffold/templates/views/haml/new.html.haml
200
180
  - lib/generators/dust/scaffold/templates/views/haml/show.html.haml
201
- - rails_generators/dust_albums/USAGE
202
- - rails_generators/dust_albums/dust_albums_generator.rb
203
- - rails_generators/dust_albums/templates/README
204
- - rails_generators/dust_albums/templates/app/controllers/albums_controller.rb
205
- - rails_generators/dust_albums/templates/app/controllers/photos_controller.rb
206
- - rails_generators/dust_albums/templates/app/controllers/view_albums_controller.rb
207
- - rails_generators/dust_albums/templates/app/helpers/albums_helper.rb
208
- - rails_generators/dust_albums/templates/app/helpers/photos_helper.rb
209
- - rails_generators/dust_albums/templates/app/helpers/view_albums_helper.rb
210
- - rails_generators/dust_albums/templates/app/models/album.rb
211
- - rails_generators/dust_albums/templates/app/models/photo.rb
212
- - rails_generators/dust_albums/templates/app/views/albums/_form.html.erb
213
- - rails_generators/dust_albums/templates/app/views/albums/_search.html.erb
214
- - rails_generators/dust_albums/templates/app/views/albums/_upload_script.html.erb
215
- - rails_generators/dust_albums/templates/app/views/albums/edit.html.erb
216
- - rails_generators/dust_albums/templates/app/views/albums/index.html.erb
217
- - rails_generators/dust_albums/templates/app/views/albums/manage.html.erb
218
- - rails_generators/dust_albums/templates/app/views/albums/new.html.erb
219
- - rails_generators/dust_albums/templates/app/views/albums/show.html.erb
220
- - rails_generators/dust_albums/templates/app/views/albums/show.js.erb
221
- - rails_generators/dust_albums/templates/app/views/photos/_form.html.erb
222
- - rails_generators/dust_albums/templates/app/views/photos/_photo.html.erb
223
- - rails_generators/dust_albums/templates/app/views/photos/_search.html.erb
224
- - rails_generators/dust_albums/templates/app/views/photos/array.js.erb
225
- - rails_generators/dust_albums/templates/app/views/photos/edit.html.erb
226
- - rails_generators/dust_albums/templates/app/views/photos/index.html.erb
227
- - rails_generators/dust_albums/templates/app/views/photos/new.html.erb
228
- - rails_generators/dust_albums/templates/app/views/photos/show.html.erb
229
- - rails_generators/dust_albums/templates/app/views/photos/show.js.erb
230
- - rails_generators/dust_albums/templates/app/views/view_albums/index.html.erb
231
- - rails_generators/dust_albums/templates/app/views/view_albums/show.html.erb
232
- - rails_generators/dust_albums/templates/images/browse.png
233
- - rails_generators/dust_albums/templates/images/cancel.png
234
- - rails_generators/dust_albums/templates/images/save_position.png
235
- - rails_generators/dust_albums/templates/images/upload.png
236
- - rails_generators/dust_albums/templates/initializers/flash_session_cookie_middleware.rb
237
- - rails_generators/dust_albums/templates/initializers/session_store_middleware.rb
238
- - rails_generators/dust_albums/templates/javascript/dragsort.js
239
- - rails_generators/dust_albums/templates/javascript/dust_album.js
240
- - rails_generators/dust_albums/templates/javascript/uploadify/jquery.uploadify.v2.1.0.js
241
- - rails_generators/dust_albums/templates/javascript/uploadify/swfobject.js
242
- - rails_generators/dust_albums/templates/javascript/uploadify/uploadify.swf
243
- - rails_generators/dust_albums/templates/migration/albums_migration.rb
244
- - rails_generators/dust_albums/templates/stylesheets/dust_album.css
245
- - rails_generators/dust_albums/templates/stylesheets/dust_album_app.css
246
- - rails_generators/dust_albums/templates/stylesheets/uploadify.css
247
- - rails_generators/dust_config/USAGE
248
- - rails_generators/dust_config/dust_config_generator.rb
249
- - rails_generators/dust_config/templates/config.yml
250
- - rails_generators/dust_config/templates/load_config.rb
251
- - rails_generators/dust_scaffold/USAGE
252
- - rails_generators/dust_scaffold/dust_scaffold_generator.rb
253
- - rails_generators/dust_scaffold/templates/actions/create.rb
254
- - rails_generators/dust_scaffold/templates/actions/destroy.rb
255
- - rails_generators/dust_scaffold/templates/actions/edit.rb
256
- - rails_generators/dust_scaffold/templates/actions/index.rb
257
- - rails_generators/dust_scaffold/templates/actions/new.rb
258
- - rails_generators/dust_scaffold/templates/actions/show.rb
259
- - rails_generators/dust_scaffold/templates/actions/update.rb
260
- - rails_generators/dust_scaffold/templates/controller.rb
261
- - rails_generators/dust_scaffold/templates/fixtures.yml
262
- - rails_generators/dust_scaffold/templates/helper.rb
263
- - rails_generators/dust_scaffold/templates/migration.rb
264
- - rails_generators/dust_scaffold/templates/model.rb
265
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/create.rb
266
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/destroy.rb
267
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/edit.rb
268
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/index.rb
269
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/new.rb
270
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/show.rb
271
- - rails_generators/dust_scaffold/templates/tests/rspec/actions/update.rb
272
- - rails_generators/dust_scaffold/templates/tests/rspec/controller.rb
273
- - rails_generators/dust_scaffold/templates/tests/rspec/model.rb
274
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/create.rb
275
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb
276
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/edit.rb
277
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/index.rb
278
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/new.rb
279
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/show.rb
280
- - rails_generators/dust_scaffold/templates/tests/shoulda/actions/update.rb
281
- - rails_generators/dust_scaffold/templates/tests/shoulda/controller.rb
282
- - rails_generators/dust_scaffold/templates/tests/shoulda/model.rb
283
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
284
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/destroy.rb
285
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/edit.rb
286
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/index.rb
287
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/new.rb
288
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/show.rb
289
- - rails_generators/dust_scaffold/templates/tests/testunit/actions/update.rb
290
- - rails_generators/dust_scaffold/templates/tests/testunit/controller.rb
291
- - rails_generators/dust_scaffold/templates/tests/testunit/model.rb
292
- - rails_generators/dust_scaffold/templates/view_controller.rb
293
- - rails_generators/dust_scaffold/templates/views/erb/_form.html.erb
294
- - rails_generators/dust_scaffold/templates/views/erb/_search.html.erb
295
- - rails_generators/dust_scaffold/templates/views/erb/edit.html.erb
296
- - rails_generators/dust_scaffold/templates/views/erb/index.html.erb
297
- - rails_generators/dust_scaffold/templates/views/erb/new.html.erb
298
- - rails_generators/dust_scaffold/templates/views/erb/show.html.erb
299
- - rails_generators/dust_scaffold/templates/views/front_end/index.html.erb
300
- - rails_generators/dust_scaffold/templates/views/front_end/show.html.erb
301
181
  - test/helper.rb
302
182
  - test/test_dust-generators.rb
303
- has_rdoc: true
304
183
  homepage: http://maple-creative.com
305
- licenses:
184
+ licenses:
306
185
  - MIT
307
186
  post_install_message:
308
187
  rdoc_options: []
309
-
310
- require_paths:
188
+ require_paths:
311
189
  - lib
312
- required_ruby_version: !ruby/object:Gem::Requirement
190
+ required_ruby_version: !ruby/object:Gem::Requirement
313
191
  none: false
314
- requirements:
315
- - - ">="
316
- - !ruby/object:Gem::Version
317
- hash: -2483976356437539142
318
- segments:
192
+ requirements:
193
+ - - ! '>='
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ segments:
319
197
  - 0
320
- version: "0"
321
- required_rubygems_version: !ruby/object:Gem::Requirement
198
+ hash: 1787440251366166652
199
+ required_rubygems_version: !ruby/object:Gem::Requirement
322
200
  none: false
323
- requirements:
324
- - - ">="
325
- - !ruby/object:Gem::Version
326
- segments:
327
- - 0
328
- version: "0"
201
+ requirements:
202
+ - - ! '>='
203
+ - !ruby/object:Gem::Version
204
+ version: '0'
329
205
  requirements: []
330
-
331
206
  rubyforge_project:
332
- rubygems_version: 1.3.7
207
+ rubygems_version: 1.8.15
333
208
  signing_key:
334
209
  specification_version: 3
335
210
  summary: Generators for DustCMS
336
- test_files:
211
+ test_files:
337
212
  - test/helper.rb
338
213
  - test/test_dust-generators.rb
@@ -1,6 +0,0 @@
1
- Description:
2
- Create Parent and Child scaffold with uploadify paperclip uploads
3
-
4
- Example:
5
- script/generate dust_album Parent Child
6
-