stager 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +44 -0
  3. data/Rakefile +8 -0
  4. data/lib/generators/stager/scaffold/USAGE +21 -0
  5. data/lib/generators/stager/scaffold/scaffold_generator.rb +266 -0
  6. data/lib/generators/stager/scaffold/templates/actions/create.rb +8 -0
  7. data/lib/generators/stager/scaffold/templates/actions/destroy.rb +5 -0
  8. data/lib/generators/stager/scaffold/templates/actions/edit.rb +3 -0
  9. data/lib/generators/stager/scaffold/templates/actions/index.rb +3 -0
  10. data/lib/generators/stager/scaffold/templates/actions/new.rb +3 -0
  11. data/lib/generators/stager/scaffold/templates/actions/show.rb +3 -0
  12. data/lib/generators/stager/scaffold/templates/actions/update.rb +8 -0
  13. data/lib/generators/stager/scaffold/templates/controller.rb +3 -0
  14. data/lib/generators/stager/scaffold/templates/helper.rb +2 -0
  15. data/lib/generators/stager/scaffold/templates/migration.rb +16 -0
  16. data/lib/generators/stager/scaffold/templates/model.rb +3 -0
  17. data/lib/generators/stager/scaffold/templates/spec/actions/create.rb +11 -0
  18. data/lib/generators/stager/scaffold/templates/spec/actions/destroy.rb +6 -0
  19. data/lib/generators/stager/scaffold/templates/spec/actions/edit.rb +4 -0
  20. data/lib/generators/stager/scaffold/templates/spec/actions/index.rb +4 -0
  21. data/lib/generators/stager/scaffold/templates/spec/actions/new.rb +4 -0
  22. data/lib/generators/stager/scaffold/templates/spec/actions/show.rb +4 -0
  23. data/lib/generators/stager/scaffold/templates/spec/actions/update.rb +11 -0
  24. data/lib/generators/stager/scaffold/templates/spec/controller.rb +8 -0
  25. data/lib/generators/stager/scaffold/templates/spec/fixtures.yml +9 -0
  26. data/lib/generators/stager/scaffold/templates/spec/model.rb +7 -0
  27. data/lib/generators/stager/scaffold/templates/views/_form.html.haml +5 -0
  28. data/lib/generators/stager/scaffold/templates/views/edit.html.haml +12 -0
  29. data/lib/generators/stager/scaffold/templates/views/index.html.haml +23 -0
  30. data/lib/generators/stager/scaffold/templates/views/new.html.haml +5 -0
  31. data/lib/generators/stager/scaffold/templates/views/show.html.haml +18 -0
  32. data/lib/stager/version.rb +3 -0
  33. data/lib/stager.rb +2 -0
  34. data/lib/tasks/stager_tasks.rake +4 -0
  35. metadata +128 -0
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2011 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # Stager
2
+
3
+ Stager is a Rails 3.1 gem to create scaffolds. Scaffolds created are specific to 45north's needs. This is a webdevelopment agency in Amsterdam, The Netherlands.
4
+
5
+ version 0.1.0
6
+ Robin Brouwer
7
+ 45north
8
+
9
+ ## Installation
10
+
11
+ Stager only works with Rails 3.1. Add the following to your Gemfile:
12
+
13
+ gem 'stager'
14
+
15
+ Now just run `bundle install` and you're ready.
16
+
17
+ ## Usage
18
+
19
+ Use the User Model to create all actions.
20
+
21
+ rails g stager:scaffold User
22
+
23
+ Use the User Model to create two actions.
24
+
25
+ rails g stager:scaffold User index show
26
+
27
+ Use the User Model to create all actions, except one action.
28
+
29
+ rails g stager:scaffold User ! show
30
+
31
+ Create a new User Model with all actions.
32
+
33
+ rails g stager:scaffold User name:string email:string
34
+
35
+ Create a new User Model and three actions.
36
+
37
+ rails g stager:scaffold User name:string email:string index new create
38
+
39
+ Options.
40
+
41
+ --namespaced_model # Create a namespaced Model.
42
+ --skip_migration # Skip the migration file.
43
+ --skip_timestamps # Skip the timestamps.
44
+ --skip_presenter # Skip the presenter.
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+
8
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,21 @@
1
+ Usage:
2
+ # Use the User Model to create all actions.
3
+ rails g stager:scaffold User
4
+
5
+ # Use the User Model to create two actions.
6
+ rails g stager:scaffold User index show
7
+
8
+ # Use the User Model to create all actions, except one action.
9
+ rails g stager:scaffold User ! show
10
+
11
+ # Create a new User Model with all actions.
12
+ rails g stager:scaffold User name:string email:string
13
+
14
+ # Create a new User Model and three actions.
15
+ rails g stager:scaffold User name:string email:string index new create
16
+
17
+ Options:
18
+ --namespaced_model # Create a namespaced Model.
19
+ --skip_migration # Skip the migration file.
20
+ --skip_timestamps # Skip the timestamps.
21
+ --skip_presenter # Skip the presenter.
@@ -0,0 +1,266 @@
1
+ require 'rails/generators/migration'
2
+ require 'rails/generators/generated_attribute'
3
+
4
+ module Stager
5
+ class ScaffoldGenerator < Rails::Generators::Base
6
+ include Rails::Generators::Migration
7
+ no_tasks { attr_accessor :scaffold_name, :model_attributes, :controller_actions }
8
+
9
+ source_root File.expand_path('../templates', __FILE__)
10
+ argument :scaffold_name, :type => :string, :required => true
11
+ argument :model_and_controller_args, :type => :array, :default => []
12
+
13
+ class_option :namespaced_model, :type => :boolean, :default => false
14
+ class_option :skip_migration, :type => :boolean, :default => false
15
+ class_option :skip_timestamps, :type => :boolean, :default => false
16
+ class_option :skip_presenter, :type => :boolean, :default => false
17
+
18
+ def set_options
19
+ @controller_actions = []
20
+ @model_attributes = []
21
+ @invert_actions = false
22
+ @skip_model = false
23
+ @namespaced_model = false
24
+
25
+ model_and_controller_args.each do |arg|
26
+ if arg == '!'
27
+ @invert_actions = true
28
+ elsif arg.include?(':')
29
+ @model_attributes << Rails::Generators::GeneratedAttribute.new(*arg.split(':'))
30
+ else
31
+ @controller_actions << arg
32
+ @controller_actions << 'create' if arg == 'new'
33
+ @controller_actions << 'update' if arg == 'edit'
34
+ end
35
+ end
36
+
37
+ if options[:namespaced_model]
38
+ @namespaced_model = true
39
+ end
40
+
41
+ if @invert_actions || @controller_actions.empty?
42
+ @controller_actions = all_actions - @controller_actions
43
+ end
44
+
45
+ if @model_attributes.empty?
46
+ @skip_model = true
47
+ if model_exists?
48
+ model_columns_for_attributes.each do |column|
49
+ @model_attributes << Rails::Generators::GeneratedAttribute.new(column.name.to_s, column.type.to_s)
50
+ end
51
+ else
52
+ @model_attributes << Rails::Generators::GeneratedAttribute.new('name', 'string')
53
+ end
54
+ end
55
+ end
56
+
57
+ def create_model
58
+ unless @skip_model
59
+ template 'model.rb', "app/models/#{model_path}.rb"
60
+
61
+ template "spec/model.rb", "spec/models/#{model_path}_spec.rb"
62
+ template 'spec/fixtures.yml', "spec/fixtures/#{model_path.pluralize}.yml"
63
+ end
64
+ end
65
+
66
+ def create_migration
67
+ unless @skip_model || options[:skip_migration]
68
+ migration_template 'migration.rb', "db/migrate/create_#{model_path.pluralize.gsub('/', '_')}.rb"
69
+ end
70
+ end
71
+
72
+ def create_controller
73
+ template 'controller.rb', "app/controllers/#{plural_name}_controller.rb"
74
+ template 'helper.rb', "app/helpers/#{plural_name}_helper.rb"
75
+
76
+ namespaces = plural_name.split('/')
77
+ resource = namespaces.pop
78
+ if namespaces.present?
79
+ route "namespace(:#{namespaces.first}) { resources :#{resource} }"
80
+ else
81
+ route "resources :#{resource}"
82
+ end
83
+
84
+ template "spec/controller.rb", "spec/controllers/#{plural_name}_controller_spec.rb"
85
+ end
86
+
87
+ def create_views
88
+ controller_actions.each do |action|
89
+ if %w[index show new edit].include?(action)
90
+ template "views/#{action}.html.haml", "app/views/#{plural_name}/#{action}.html.haml"
91
+ end
92
+ end
93
+
94
+ if form_partial?
95
+ template "views/_form.html.haml", "app/views/#{plural_name}/_form.html.haml"
96
+ end
97
+ end
98
+
99
+ def create_presenter
100
+ unless options[:skip_presenter]
101
+ run "rails g exhibit:presenter #{scaffold_name} #{@namespaced_model ? nil : "--no_namespace"}"
102
+ end
103
+ end
104
+
105
+ private
106
+
107
+ def model_columns_for_attributes
108
+ class_name.constantize.columns.reject do |column|
109
+ column.name.to_s =~ /^(id|created_at|updated_at)$/
110
+ end
111
+ end
112
+
113
+ def model_exists?
114
+ File.exist?(destination_path("app/models/#{singular_name}.rb"))
115
+ end
116
+
117
+ def model_path
118
+ class_name.underscore
119
+ end
120
+
121
+ def destination_path(path)
122
+ File.join(destination_root, path)
123
+ end
124
+
125
+ def all_actions
126
+ %w[index show new create edit update destroy]
127
+ end
128
+
129
+ def action?(name)
130
+ controller_actions.include?(name.to_s)
131
+ end
132
+
133
+ def actions?(*names)
134
+ names.all? { |name| action? name }
135
+ end
136
+
137
+ def form_partial?
138
+ actions?(:new, :edit)
139
+ end
140
+
141
+ def render_form
142
+ if form_partial?
143
+ "= render(\"form\")"
144
+ else
145
+ read_template("views/_form.html.#{view_language}")
146
+ end
147
+ end
148
+
149
+ def controller_methods(dir_name)
150
+ controller_actions.map do |action|
151
+ read_template("#{dir_name}/#{action}.rb")
152
+ end.join("\n").strip
153
+ end
154
+
155
+ def item_resource
156
+ scaffold_name.underscore.gsub('/','_')
157
+ end
158
+
159
+ def items_path
160
+ if action? :index
161
+ "#{item_resource.pluralize}_path"
162
+ else
163
+ "root_path"
164
+ end
165
+ end
166
+
167
+ def item_path(options = {})
168
+ name = options[:instance_variable] ? "@#{instance_name}" : instance_name
169
+ suffix = options[:full_url] ? "url" : "path"
170
+ if options[:action].to_s == "new"
171
+ "new_#{item_resource}_#{suffix}"
172
+ elsif options[:action].to_s == "edit"
173
+ "edit_#{item_resource}_#{suffix}(#{name})"
174
+ else
175
+ if scaffold_name.include?('::') && !@namespaced_model
176
+ namespace = singular_name.split('/')[0..-2]
177
+ "[:#{namespace.join(', :')}, #{name}]"
178
+ else
179
+ name
180
+ end
181
+ end
182
+ end
183
+
184
+ def item_url
185
+ if action? :show
186
+ item_path(:full_url => true, :instance_variable => true)
187
+ else
188
+ items_url
189
+ end
190
+ end
191
+
192
+ def items_url
193
+ if action? :index
194
+ item_resource.pluralize + '_url'
195
+ else
196
+ "root_url"
197
+ end
198
+ end
199
+
200
+ def item_path_for_spec(suffix = 'path')
201
+ if action? :show
202
+ "#{item_resource}_#{suffix}(assigns[:#{instance_name}])"
203
+ else
204
+ if suffix == 'path'
205
+ items_path
206
+ else
207
+ items_url
208
+ end
209
+ end
210
+ end
211
+
212
+ def table_name
213
+ if @namespaced_model
214
+ plural_name.gsub('/', '_')
215
+ end
216
+ end
217
+
218
+ def singular_name
219
+ scaffold_name.underscore
220
+ end
221
+
222
+ def plural_name
223
+ scaffold_name.underscore.pluralize
224
+ end
225
+
226
+ def class_name
227
+ if @namespaced_model
228
+ singular_name.camelize
229
+ else
230
+ singular_name.split('/').last.camelize
231
+ end
232
+ end
233
+
234
+ def plural_class_name
235
+ plural_name.camelize
236
+ end
237
+
238
+ def instance_name
239
+ if @namespaced_model
240
+ singular_name.gsub('/', '_')
241
+ else
242
+ singular_name.split('/').last
243
+ end
244
+ end
245
+
246
+ def instances_name
247
+ instance_name.pluralize
248
+ end
249
+
250
+ def titleized_name
251
+ singular_name.split('/').last.titleize
252
+ end
253
+
254
+ def read_template(relative_path)
255
+ ERB.new(File.read(find_in_source_paths(relative_path)), nil, '-').result(binding)
256
+ end
257
+
258
+ def self.next_migration_number(dirname)
259
+ if ActiveRecord::Base.timestamped_migrations
260
+ Time.now.utc.strftime("%Y%m%d%H%M%S")
261
+ else
262
+ "%.3d" % (current_migration_number(dirname) + 1)
263
+ end
264
+ end
265
+ end
266
+ end
@@ -0,0 +1,8 @@
1
+ def create
2
+ @<%= instance_name %> = <%= class_name %>.new(params[:<%= instance_name %>])
3
+ if @<%= instance_name %>.save
4
+ redirect_to(<%= item_url %>, :notice => "Successfully created <%= class_name.underscore.humanize.downcase %>.")
5
+ else
6
+ render(:new)
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ def destroy
2
+ @<%= instance_name %> = <%= class_name %>.find(params[:id])
3
+ @<%= instance_name %>.destroy
4
+ redirect_to(<%= items_url %>, :notice => "Successfully destroyed <%= class_name.underscore.humanize.downcase %>.")
5
+ end
@@ -0,0 +1,3 @@
1
+ def edit
2
+ @<%= instance_name %> = <%= class_name %>.find(params[:id])
3
+ end
@@ -0,0 +1,3 @@
1
+ def index
2
+ @<%= instances_name %> = <%= class_name %>.all
3
+ end
@@ -0,0 +1,3 @@
1
+ def new
2
+ @<%= instance_name %> = <%= class_name %>.new
3
+ end
@@ -0,0 +1,3 @@
1
+ def show
2
+ @<%= instance_name %> = <%= class_name %>.find(params[:id])
3
+ end
@@ -0,0 +1,8 @@
1
+ def update
2
+ @<%= instance_name %> = <%= class_name %>.find(params[:id])
3
+ if @<%= instance_name %>.update_attributes(params[:<%= instance_name %>])
4
+ redirect_to(<%= item_url %>, :notice => "Successfully updated <%= class_name.underscore.humanize.downcase %>.")
5
+ else
6
+ render(:edit)
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ class <%= plural_class_name %>Controller < ApplicationController
2
+ <%= controller_methods :actions %>
3
+ end
@@ -0,0 +1,2 @@
1
+ module <%= plural_class_name %>Helper
2
+ end
@@ -0,0 +1,16 @@
1
+ class Create<%= class_name.pluralize.delete('::') %> < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :<%= table_name || plural_name.split('/').last %> do |t|
4
+ <%- model_attributes.each do |attribute| -%>
5
+ t.<%= attribute.type %> :<%= attribute.name %>
6
+ <%- end -%>
7
+ <%- unless options[:skip_timestamps] -%>
8
+ t.timestamps
9
+ <%- end -%>
10
+ end
11
+ end
12
+
13
+ def self.down
14
+ drop_table :<%= table_name || plural_name.split('/').last %>
15
+ end
16
+ end
@@ -0,0 +1,3 @@
1
+ class <%= class_name %> < ActiveRecord::Base
2
+ <%= " set_table_name :#{table_name}\n" if table_name -%>
3
+ end
@@ -0,0 +1,11 @@
1
+ it "create action should render new template when model is invalid" do
2
+ <%= class_name %>.any_instance.stubs(:valid?).returns(false)
3
+ post :create
4
+ response.should render_template(:new)
5
+ end
6
+
7
+ it "create action should redirect when model is valid" do
8
+ <%= class_name %>.any_instance.stubs(:valid?).returns(true)
9
+ post :create
10
+ response.should redirect_to(<%= item_path_for_spec('url') %>)
11
+ end
@@ -0,0 +1,6 @@
1
+ it "destroy action should destroy model and redirect to index action" do
2
+ <%= singular_name %> = <%= class_name %>.first
3
+ delete :destroy, :id => <%= singular_name %>
4
+ response.should redirect_to(<%= items_path %>)
5
+ <%= class_name %>.exists?(<%= singular_name %>.id).should be_false
6
+ end
@@ -0,0 +1,4 @@
1
+ it "edit action should render edit template" do
2
+ get :edit, :id => <%= class_name %>.first
3
+ response.should render_template(:edit)
4
+ end
@@ -0,0 +1,4 @@
1
+ it "index action should render index template" do
2
+ get :index
3
+ response.should render_template(:index)
4
+ end
@@ -0,0 +1,4 @@
1
+ it "new action should render new template" do
2
+ get :new
3
+ response.should render_template(:new)
4
+ end
@@ -0,0 +1,4 @@
1
+ it "show action should render show template" do
2
+ get :show, :id => <%= class_name %>.first
3
+ response.should render_template(:show)
4
+ end
@@ -0,0 +1,11 @@
1
+ it "update action should render edit template when model is invalid" do
2
+ <%= class_name %>.any_instance.stubs(:valid?).returns(false)
3
+ put :update, :id => <%= class_name %>.first
4
+ response.should render_template(:edit)
5
+ end
6
+
7
+ it "update action should redirect when model is valid" do
8
+ <%= class_name %>.any_instance.stubs(:valid?).returns(true)
9
+ put :update, :id => <%= class_name %>.first
10
+ response.should redirect_to(<%= item_path_for_spec('url') %>)
11
+ end
@@ -0,0 +1,8 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
+
3
+ describe <%= plural_class_name %>Controller do
4
+ fixtures :all
5
+ render_views
6
+
7
+ <%= controller_methods 'spec/actions' %>
8
+ end
@@ -0,0 +1,9 @@
1
+ one:
2
+ <%- model_attributes.each do |attribute| -%>
3
+ <%= attribute.name %>: <%= attribute.default %>
4
+ <%- end -%>
5
+
6
+ two:
7
+ <%- model_attributes.each do |attribute| -%>
8
+ <%= attribute.name %>: <%= attribute.default %>
9
+ <%- end -%>
@@ -0,0 +1,7 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
+
3
+ describe <%= class_name %> do
4
+ it "should be valid" do
5
+ <%= class_name %>.new.should be_valid
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ = simple_form_for(<%= item_path(:instance_variable => true) %>) do |f|
2
+ <%- model_attributes.each do |attribute| -%>
3
+ = f.input(:<%= attribute.name %>)
4
+ <%- end -%>
5
+ = f.button(:submit)
@@ -0,0 +1,12 @@
1
+ <%= render_form %>
2
+
3
+ <%- if actions?(:show, :index) -%>
4
+ %p
5
+ <%- if action?(:show) -%>
6
+ = link_to("Show", <%= item_path(:instance_variable => true) %>)
7
+ |
8
+ <%- end -%>
9
+ <%- if action?(:index) -%>
10
+ = link_to("View All", <%= items_path %>)
11
+ <%- end -%>
12
+ <%- end -%>
@@ -0,0 +1,23 @@
1
+ %table
2
+ %tr
3
+ <%- model_attributes.each do |attribute| -%>
4
+ %th <%= attribute.human_name %>
5
+ <%- end -%>
6
+ - @<%= instances_name %>.each do |<%= instance_name %>|
7
+ %tr
8
+ <%- model_attributes.each do |attribute| -%>
9
+ %td= <%= instance_name %>.<%= attribute.name %>
10
+ <%- end -%>
11
+ <%- if action?(:show) -%>
12
+ %td= link_to('Show', <%= item_path %>)
13
+ <%- end -%>
14
+ <%- if action?(:edit) -%>
15
+ %td= link_to('Edit', <%= item_path(:action => :edit) %>)
16
+ <%- end -%>
17
+ <%- if action?(:destroy) -%>
18
+ %td= link_to('Destroy', <%= item_path %>, :confirm => 'Are you sure?', :method => :delete)
19
+ <%- end -%>
20
+
21
+ <%- if actions?(:new) -%>
22
+ %p= link_to("New <%= titleized_name %>", <%= item_path(:action => :new) %>)
23
+ <%- end -%>
@@ -0,0 +1,5 @@
1
+ <%= render_form %>
2
+
3
+ <%- if action?(:index) -%>
4
+ %p= link_to("Back to List", <%= items_path %>)
5
+ <%- end -%>
@@ -0,0 +1,18 @@
1
+ <%- model_attributes.each do |attribute| -%>
2
+ %p
3
+ %strong <%= attribute.human_name.titleize %>:
4
+ = @<%= instance_name %>.<%= attribute.name %>
5
+ <%- end -%>
6
+
7
+ %p
8
+ <%- if action?(:edit) -%>
9
+ = link_to("Edit", <%= item_path(:action => :edit, :instance_variable => true) %>)
10
+ |
11
+ <%- end -%>
12
+ <%- if action?(:destroy) -%>
13
+ = link_to("Destroy", <%= item_path(:instance_variable => true) %>, :confirm => 'Are you sure?', :method => :delete)
14
+ |
15
+ <%- end -%>
16
+ <%- if action?(:index) -%>
17
+ = link_to("View All", <%= items_path %>)
18
+ <%- end -%>
@@ -0,0 +1,3 @@
1
+ module Stager
2
+ VERSION = "0.1.0"
3
+ end
data/lib/stager.rb ADDED
@@ -0,0 +1,2 @@
1
+ module Stager
2
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :stager do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stager
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Robin Brouwer
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-10-07 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ requirement: *id001
32
+ type: :runtime
33
+ name: exhibit
34
+ prerelease: false
35
+ - !ruby/object:Gem::Dependency
36
+ version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ requirement: *id002
46
+ type: :development
47
+ name: sqlite3
48
+ prerelease: false
49
+ description: Stager is a Rails 3.1 gem to create scaffolds. Scaffolds created are specific to 45north's needs. This is a webdevelopment agency in Amsterdam, The Netherlands.
50
+ email:
51
+ - robin@45north.nl
52
+ executables: []
53
+
54
+ extensions: []
55
+
56
+ extra_rdoc_files: []
57
+
58
+ files:
59
+ - lib/generators/stager/scaffold/scaffold_generator.rb
60
+ - lib/generators/stager/scaffold/templates/actions/create.rb
61
+ - lib/generators/stager/scaffold/templates/actions/destroy.rb
62
+ - lib/generators/stager/scaffold/templates/actions/edit.rb
63
+ - lib/generators/stager/scaffold/templates/actions/index.rb
64
+ - lib/generators/stager/scaffold/templates/actions/new.rb
65
+ - lib/generators/stager/scaffold/templates/actions/show.rb
66
+ - lib/generators/stager/scaffold/templates/actions/update.rb
67
+ - lib/generators/stager/scaffold/templates/controller.rb
68
+ - lib/generators/stager/scaffold/templates/helper.rb
69
+ - lib/generators/stager/scaffold/templates/migration.rb
70
+ - lib/generators/stager/scaffold/templates/model.rb
71
+ - lib/generators/stager/scaffold/templates/spec/actions/create.rb
72
+ - lib/generators/stager/scaffold/templates/spec/actions/destroy.rb
73
+ - lib/generators/stager/scaffold/templates/spec/actions/edit.rb
74
+ - lib/generators/stager/scaffold/templates/spec/actions/index.rb
75
+ - lib/generators/stager/scaffold/templates/spec/actions/new.rb
76
+ - lib/generators/stager/scaffold/templates/spec/actions/show.rb
77
+ - lib/generators/stager/scaffold/templates/spec/actions/update.rb
78
+ - lib/generators/stager/scaffold/templates/spec/controller.rb
79
+ - lib/generators/stager/scaffold/templates/spec/fixtures.yml
80
+ - lib/generators/stager/scaffold/templates/spec/model.rb
81
+ - lib/generators/stager/scaffold/templates/views/_form.html.haml
82
+ - lib/generators/stager/scaffold/templates/views/edit.html.haml
83
+ - lib/generators/stager/scaffold/templates/views/index.html.haml
84
+ - lib/generators/stager/scaffold/templates/views/new.html.haml
85
+ - lib/generators/stager/scaffold/templates/views/show.html.haml
86
+ - lib/generators/stager/scaffold/USAGE
87
+ - lib/stager/version.rb
88
+ - lib/stager.rb
89
+ - lib/tasks/stager_tasks.rake
90
+ - MIT-LICENSE
91
+ - Rakefile
92
+ - README.md
93
+ has_rdoc: true
94
+ homepage: https://github.com/RobinBrouwer/stager
95
+ licenses: []
96
+
97
+ post_install_message:
98
+ rdoc_options: []
99
+
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ none: false
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ hash: 3
108
+ segments:
109
+ - 0
110
+ version: "0"
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 3
117
+ segments:
118
+ - 0
119
+ version: "0"
120
+ requirements: []
121
+
122
+ rubyforge_project:
123
+ rubygems_version: 1.3.7
124
+ signing_key:
125
+ specification_version: 3
126
+ summary: Rails 3.1 gem to create scaffolds.
127
+ test_files: []
128
+