Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove generators that exist in other libraries #23

Merged
merged 8 commits into from

2 participants

@negonicrac
Collaborator

No description provided.

@negonicrac negonicrac was assigned
@indirect
Owner

Awesome. Are only koala and shoulda left?

@negonicrac
Collaborator

Probably. Datamapper's generators look pretty old (3 years) so I might have to investigate how that project is put together.

@negonicrac
Collaborator

@indirect do you know of a good gem that can replace the Mustache stuff.

@indirect
Owner

Nothing with generators, I guess maybe we could ask about feeding them upstream to https://github.com/josh/mustache-rails ?

@negonicrac negonicrac merged commit b5988c4 into indirect:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 88 additions and 502 deletions.
  1. +4 −0 CHANGELOG.rdoc
  2. +72 −64 Gemfile.lock
  3. +4 −4 README.rdoc
  4. +0 −11 lib/generators/authlogic.rb
  5. +0 −19 lib/generators/authlogic/session/session_generator.rb
  6. +0 −2  lib/generators/authlogic/session/templates/session.rb
  7. +0 −9 lib/generators/erubis.rb
  8. +0 −10 lib/generators/erubis/controller/controller_generator.rb
  9. +0 −2  lib/generators/erubis/controller/templates/view.html.erb
  10. +0 −25 lib/generators/erubis/scaffold/scaffold_generator.rb
  11. +0 −23 lib/generators/erubis/scaffold/templates/_form.html.erb
  12. +0 −6 lib/generators/erubis/scaffold/templates/edit.html.erb
  13. +0 −27 lib/generators/erubis/scaffold/templates/index.html.erb
  14. +0 −5 lib/generators/erubis/scaffold/templates/new.html.erb
  15. +0 −12 lib/generators/erubis/scaffold/templates/show.html.erb
  16. +0 −29 lib/generators/formtastic.rb
  17. +0 −25 lib/generators/formtastic/scaffold/scaffold_generator.rb
  18. +0 −12 lib/generators/formtastic/scaffold/templates/_form.html.erb.erb
  19. +0 −10 lib/generators/formtastic/scaffold/templates/_form.html.haml.erb
  20. +0 −30 lib/generators/simple_form.rb
  21. +0 −25 lib/generators/simple_form/scaffold/scaffold_generator.rb
  22. +0 −21 lib/generators/simple_form/scaffold/templates/_form.html.erb.erb
  23. +0 −15 lib/generators/simple_form/scaffold/templates/_form.html.haml.erb
  24. +2 −9 lib/rails3-generators.rb
  25. +6 −1 rails3-generators.gemspec
  26. +0 −14 test/lib/generators/authlogic/session_generator_test.rb
  27. +0 −16 test/lib/generators/erubis/controller_generator_test.rb
  28. +0 −30 test/lib/generators/erubis/scaffold_generator_test.rb
  29. +0 −19 test/lib/generators/formtastic/scaffold_generators_test.rb
  30. +0 −19 test/lib/generators/simple_form/scaffold_generators_test.rb
  31. +0 −8 test/test_helper.rb
View
4 CHANGELOG.rdoc
@@ -5,6 +5,10 @@
== Development
* optimize
* MongoMapper generators removed. MongoMapper (https://github.com/jnunemaker/mongomapper) has its own generators.
+ * SimpleForm generators removed. SimpleForm (https://github.com/plataformatec/simple_form) has its own generators.
+ * Erubis generator removed.
+ * Formtastic generators removed. Formtastic (https://github.com/justinfrench/formtastic) has its own generators.
+ * Authlogic generators removed. Authlogic (https://github.com/binarylogic/authlogic) has its own generators.
== 0.17.5
* optimize
View
136 Gemfile.lock
@@ -7,76 +7,85 @@ PATH
GEM
remote: https://rubygems.org/
specs:
- abstract (1.0.0)
- actionmailer (3.0.3)
- actionpack (= 3.0.3)
- mail (~> 2.2.9)
- actionpack (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.4)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.13)
- rack-test (~> 0.5.6)
- tzinfo (~> 0.3.23)
- activemodel (3.0.3)
- activesupport (= 3.0.3)
- builder (~> 2.1.2)
- i18n (~> 0.4)
- activerecord (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- arel (~> 2.0.2)
- tzinfo (~> 0.3.23)
- activeresource (3.0.3)
- activemodel (= 3.0.3)
- activesupport (= 3.0.3)
- activesupport (3.0.3)
- arel (2.0.7)
- builder (2.1.2)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- factory_girl (1.3.3)
- haml (3.0.25)
- haml-rails (0.3.4)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- haml (~> 3.0)
- railties (~> 3.0)
- i18n (0.5.0)
- mail (2.2.15)
- activesupport (>= 2.3.6)
+ actionmailer (3.2.8)
+ actionpack (= 3.2.8)
+ mail (~> 2.4.4)
+ actionpack (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.4)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.8)
+ activesupport (= 3.2.8)
+ builder (~> 3.0.0)
+ activerecord (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.8)
+ activemodel (= 3.2.8)
+ activesupport (= 3.2.8)
+ activesupport (3.2.8)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ builder (3.0.3)
+ erubis (2.7.0)
+ factory_girl (4.1.0)
+ activesupport (>= 3.0.0)
+ hike (1.2.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ json (1.7.5)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.16)
- polyglot (0.3.1)
- rack (1.2.1)
- rack-mount (0.6.13)
- rack (>= 1.0.0)
- rack-test (0.5.7)
+ mime-types (1.19)
+ multi_json (1.3.6)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.2)
rack (>= 1.0)
- rails (3.0.3)
- actionmailer (= 3.0.3)
- actionpack (= 3.0.3)
- activerecord (= 3.0.3)
- activeresource (= 3.0.3)
- activesupport (= 3.0.3)
+ rails (3.2.8)
+ actionmailer (= 3.2.8)
+ actionpack (= 3.2.8)
+ activerecord (= 3.2.8)
+ activeresource (= 3.2.8)
+ activesupport (= 3.2.8)
bundler (~> 1.0)
- railties (= 3.0.3)
- railties (3.0.3)
- actionpack (= 3.0.3)
- activesupport (= 3.0.3)
+ railties (= 3.2.8)
+ railties (3.2.8)
+ actionpack (= 3.2.8)
+ activesupport (= 3.2.8)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
- thor (~> 0.14.4)
- rake (0.8.7)
- test-unit (2.1.2)
- thor (0.14.6)
- treetop (1.4.9)
+ rdoc (~> 3.4)
+ thor (>= 0.14.6, < 2.0)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ sprockets (2.1.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ test-unit (2.5.2)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.24)
+ tzinfo (0.3.33)
PLATFORMS
ruby
@@ -84,7 +93,6 @@ PLATFORMS
DEPENDENCIES
bundler (>= 1.0.0)
factory_girl
- haml-rails
rails (>= 3.0.0)
rails3-generators!
rake
View
8 README.rdoc
@@ -20,11 +20,11 @@ The jQuery generators have moved to {the jquery-rails gem}[http://github.com/ind
The MongoMapper generators moved to {the mongo_mapper gem}[https://github.com/jnunemaker/mongomapper].
-To avoid overriding the rails built-in Erb template generators this project uses the namespace Erubis for *.erb templates
+The SimpleForm generators moved to {the simple_form gem}[https://github.com/plataformatec/simple_form].
- config.generators do |g|
- g.template_engine :erubis
- end
+The Formtastic generators moved to {the fortastic gem}[https://github.com/justinfrench/formtastic].
+
+The Authlogic generators moved to {the authlogic gem}[https://github.com/binarylogic/authlogic].
== Note on Patches/Pull Requests
View
11 lib/generators/authlogic.rb
@@ -1,11 +0,0 @@
-require 'rails/generators/named_base'
-
-module Authlogic
- module Generators
- class Base < Rails::Generators::NamedBase
- def self.source_root
- @_authlogic_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'authlogic', generator_name, 'templates'))
- end
- end
- end
-end
View
19 lib/generators/authlogic/session/session_generator.rb
@@ -1,19 +0,0 @@
-require 'generators/authlogic'
-
-module Authlogic
- module Generators
- class SessionGenerator < Base
- desc "Builds an Authlogic session model"
-
- check_class_collision
-
- def create_session_file
- template 'session.rb', File.join('app', 'models', class_path, "#{file_name}.rb")
- end
-
- # HACK: make test_framework generator for this generator.
- hook_for :test_framework, :as => :model
- end
- end
-end
-
View
2  lib/generators/authlogic/session/templates/session.rb
@@ -1,2 +0,0 @@
-class <%= class_name %> < Authlogic::Session::Base
-end
View
9 lib/generators/erubis.rb
@@ -1,9 +0,0 @@
-module Erubis
- module Generators
- module TemplatePath
- def source_root
- @_haml_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'erubis', generator_name, 'templates'))
- end
- end
- end
-end
View
10 lib/generators/erubis/controller/controller_generator.rb
@@ -1,10 +0,0 @@
-require 'generators/erubis'
-require 'rails/generators/erb/controller/controller_generator'
-
-module Erubis
- module Generators
- class ControllerGenerator < Erb::Generators::ControllerGenerator
- extend TemplatePath
- end
- end
-end
View
2  lib/generators/erubis/controller/templates/view.html.erb
@@ -1,2 +0,0 @@
-<h1><%= class_name %>#<%= @action %></h1>
-<p>Find me in <%= @path %></p>
View
25 lib/generators/erubis/scaffold/scaffold_generator.rb
@@ -1,25 +0,0 @@
-require 'generators/erubis'
-require 'rails/generators/erb/scaffold/scaffold_generator'
-
-module Erubis
- module Generators
- class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
- extend TemplatePath
-
- hook_for :form_builder, :as => :scaffold
-
- def copy_form_file
- if options[:form_builder].nil?
- filename = filename_with_extensions("_form")
- template filename, File.join("app/views", controller_file_path, filename)
- end
- end
-
- protected
-
- def available_views
- %w(index edit show new)
- end
- end
- end
-end
View
23 lib/generators/erubis/scaffold/templates/_form.html.erb
@@ -1,23 +0,0 @@
-<%%= form_for(@<%= singular_name %>) do |f| %>
- <%% if @<%= singular_name %>.errors.any? %>
- <div id="error_explanation">
- <h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2>
-
- <ul>
- <%% @<%= singular_name %>.errors.full_messages.each do |msg| %>
- <li><%%= msg %></li>
- <%% end %>
- </ul>
- </div>
- <%% end %>
-
-<% for attribute in attributes -%>
- <div class="field">
- <%%= f.label :<%= attribute.name %> %><br />
- <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
- </div>
-<% end -%>
- <div class="actions">
- <%%= f.submit %>
- </div>
-<%% end %>
View
6 lib/generators/erubis/scaffold/templates/edit.html.erb
@@ -1,6 +0,0 @@
-<h1>Editing <%= singular_name %></h1>
-
-<%%= render 'form' %>
-
-<%%= link_to 'Show', @<%= singular_name %> %> |
-<%%= link_to 'Back', <%= plural_name %>_path %>
View
27 lib/generators/erubis/scaffold/templates/index.html.erb
@@ -1,27 +0,0 @@
-<h1>Listing <%= plural_name %></h1>
-
-<table>
- <tr>
-<% for attribute in attributes -%>
- <th><%= attribute.human_name %></th>
-<% end -%>
- <th></th>
- <th></th>
- <th></th>
- </tr>
-
-<%% @<%= plural_name %>.each do |<%= singular_name %>| %>
- <tr>
-<% for attribute in attributes -%>
- <td><%%= <%= singular_name %>.<%= attribute.name %> %></td>
-<% end -%>
- <td><%%= link_to 'Show', <%= singular_name %> %></td>
- <td><%%= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
- <td><%%= link_to 'Destroy', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %></td>
- </tr>
-<%% end %>
-</table>
-
-<br />
-
-<%%= link_to 'New <%= human_name %>', new_<%= singular_name %>_path %>
View
5 lib/generators/erubis/scaffold/templates/new.html.erb
@@ -1,5 +0,0 @@
-<h1>New <%= singular_name %></h1>
-
-<%%= render 'form' %>
-
-<%%= link_to 'Back', <%= plural_name %>_path %>
View
12 lib/generators/erubis/scaffold/templates/show.html.erb
@@ -1,12 +0,0 @@
-<p id="notice"><%%= notice %></p>
-
-<% for attribute in attributes -%>
-<p>
- <b><%= attribute.human_name %>:</b>
- <%%= @<%= singular_name %>.<%= attribute.name %> %>
-</p>
-
-<% end -%>
-
-<%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
-<%%= link_to 'Back', <%= plural_name %>_path %>
View
29 lib/generators/formtastic.rb
@@ -1,29 +0,0 @@
-require 'rails/generators/named_base'
-
-module Formtastic
- module Generators
- class Base < Rails::Generators::NamedBase #:nodoc:
-
- def self.source_root
- @_simple_form_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'formtastic', generator_name, 'templates'))
- end
- protected
-
- def format
- :html
- end
-
- def handler
- :erb
- end
-
- def filename_with_extensions(name)
- [name, format, handler].compact.join(".")
- end
-
- def template_filename_with_extensions(name)
- [name, format, handler, :erb].compact.join(".")
- end
- end
- end
-end
View
25 lib/generators/formtastic/scaffold/scaffold_generator.rb
@@ -1,25 +0,0 @@
-require 'generators/formtastic'
-require 'rails/generators/resource_helpers'
-
-module Formtastic
- module Generators
- class ScaffoldGenerator < Base
- include Rails::Generators::ResourceHelpers
-
- argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
-
- class_option :template_engine
-
- def copy_form_file
- filename = filename_with_extensions("_form")
- template template_filename_with_extensions("_form"), File.join("app/views", controller_file_path, filename)
- end
-
- protected
-
- def handler
- options[:template_engine].to_s.gsub('erubis', 'erb')
- end
- end
- end
-end
View
12 lib/generators/formtastic/scaffold/templates/_form.html.erb.erb
@@ -1,12 +0,0 @@
-<%%= semantic_form_for @<%= file_name %> do |form| %>
-<%- if attributes.empty? -%>
- <%% form.inputs %>
-<%- else -%>
- <%% form.inputs do %>
- <%- for attribute in attributes -%>
- <%%= form.input :<%= attribute.name %>, :label => '<%= attribute.name.titleize %>' %>
- <%- end -%>
- <%% end %>
-<%- end -%>
- <%%= form.buttons %>
-<%% end %>
View
10 lib/generators/formtastic/scaffold/templates/_form.html.haml.erb
@@ -1,10 +0,0 @@
-= semantic_form_for @<%= file_name %> do |form|
-<%- if attributes.empty? -%>
- = form.inputs
-<%- else -%>
- = form.inputs do
-<%- for attribute in attributes -%>
- = form.input :<%= attribute.name.gsub(/_id$/, '') %>, :label => '<%= attribute.name.titleize %>'
-<%- end -%>
-<%- end -%>
- = form.buttons
View
30 lib/generators/simple_form.rb
@@ -1,30 +0,0 @@
-require 'rails/generators/named_base'
-
-module SimpleForm
- module Generators
- class Base < Rails::Generators::NamedBase #:nodoc:
- # include Rails::Generators::ResourceHelpers
-
- def self.source_root
- @_simple_form_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'simple_form', generator_name, 'templates'))
- end
- protected
-
- def format
- :html
- end
-
- def handler
- :erb
- end
-
- def filename_with_extensions(name)
- [name, format, handler].compact.join(".")
- end
-
- def template_filename_with_extensions(name)
- [name, format, handler, :erb].compact.join(".")
- end
- end
- end
-end
View
25 lib/generators/simple_form/scaffold/scaffold_generator.rb
@@ -1,25 +0,0 @@
-require 'generators/simple_form'
-require 'rails/generators/resource_helpers'
-
-module SimpleForm
- module Generators
- class ScaffoldGenerator < Base
- include Rails::Generators::ResourceHelpers
-
- argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
-
- class_option :template_engine
-
- def copy_form_file
- filename = filename_with_extensions("_form")
- template template_filename_with_extensions("_form"), File.join("app/views", controller_file_path, filename)
- end
-
- protected
-
- def handler
- options[:template_engine].to_s.gsub('erubis', 'erb')
- end
- end
- end
-end
View
21 lib/generators/simple_form/scaffold/templates/_form.html.erb.erb
@@ -1,21 +0,0 @@
-<%%= simple_form_for @<%= file_name %> do |form| %>
-
- <%% if @<%= file_name %>.errors.any? -%>
- <div id="errorExplanation">
- <h2><%%= "#{pluralize(@<%= file_name %>.errors.count, "error")} prohibited this #{<%= class_name %>.name.titleize} from being saved:" %></h2>
- <ul>
- <%%- @<%= file_name %>.errors.full_messages.each do |msg| -%>
- <li><%%= msg %></li>
- <%%- end -%>
- </ul>
- </div>
- <%% end -%>
-
- <%- for attribute in attributes -%>
- <%%= form.input :<%= attribute.name %>, :label => '<%= attribute.name.titleize %>' %>
- <%- end -%>
-
- <div class="actions">
- <%%= form.button :submit %>
- </div>
-<%% end %>
View
15 lib/generators/simple_form/scaffold/templates/_form.html.haml.erb
@@ -1,15 +0,0 @@
-= simple_form_for @<%= file_name %> do |form|
-
- -if @<%= file_name %>.errors.any?
- #errorExplanation
- %h2= "#{pluralize(@<%= file_name %>.errors.count, "error")} prohibited this #{<%= class_name %>.name.titleize} from being saved:"
- %ul
- - @<%= file_name %>.errors.full_messages.each do |msg|
- %li= msg
-
-<%- for attribute in attributes -%>
- = form.input :<%= attribute.name %>, :label => '<%= attribute.name.titleize %>'
-<%- end -%>
-
- .actions
- = form.button :submit
View
11 lib/rails3-generators.rb
@@ -1,4 +1,4 @@
-require 'rails/generators'
+require "rails/generators"
module Rails3Generators
end
@@ -38,7 +38,7 @@ module Rails3Generators
]
end
-%w(erb erubis haml mustache).each do |template|
+%w(erb haml mustache).each do |template|
Rails::Generators.hidden_namespaces <<
[
"#{template}:controller",
@@ -47,11 +47,4 @@ module Rails3Generators
]
end
-%w(formtastic simple_form).each do |form_builder|
- Rails::Generators.hidden_namespaces <<
- [
- "#{form_builder}:scaffold"
- ]
-end
-
Rails::Generators.hidden_namespaces.flatten!
View
7 rails3-generators.gemspec
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
s.add_development_dependency "bundler", ">= 1.0.0"
s.add_development_dependency "rake"
s.add_development_dependency "test-unit"
- s.add_development_dependency "haml-rails"
s.add_development_dependency "rails", ">= 3.0.0"
s.add_development_dependency "factory_girl"
@@ -33,6 +32,12 @@ rails3-generators-#{Rails3::Generators::VERSION}
MongoMapper generators removed. MongoMapper (https://github.com/jnunemaker/mongomapper) has its own generators.
+SimpleForm generators removed. SimpleForm (https://github.com/plataformatec/simple_form) has its onw generators.
+
+Formtastic generators removed. Formtastic (https://github.com/justinfrench/formtastic) has its onw generators.
+
+Authlogic generators removed. Authlogic (https://github.com/binarylogic/authlogic) has its onw generators.
+
Be sure to check out the wiki, https://wiki.github.com/indirect/rails3-generators/,
for information about recent changes to this project.
}
View
14 test/lib/generators/authlogic/session_generator_test.rb
@@ -1,14 +0,0 @@
-require 'test_helper'
-
-class Authlogic::Generators::SessionGeneratorTest < Rails::Generators::TestCase
- destination File.join(Rails.root)
- tests Authlogic::Generators::SessionGenerator
- arguments %w(user_session)
-
- setup :prepare_destination
-
- test 'Authlogic is installed' do
- content = run_generator
- assert_file "app/models/user_session.rb"
- end
-end
View
16 test/lib/generators/erubis/controller_generator_test.rb
@@ -1,16 +0,0 @@
-require 'test_helper'
-
-class Erubis::Generators::ControllerGeneratorTest < Rails::Generators::TestCase
- destination File.join(Rails.root)
- tests Rails::Generators::ControllerGenerator
- arguments %w(Account foo bar --template-engine erubis)
-
- setup :prepare_destination
- setup :copy_routes
-
- test "should invoke template engine" do
- run_generator
- assert_file "app/views/account/foo.html.erb", %r(app/views/account/foo\.html\.erb)
- assert_file "app/views/account/bar.html.erb", %r(app/views/account/bar\.html\.erb)
- end
-end
View
30 test/lib/generators/erubis/scaffold_generator_test.rb
@@ -1,30 +0,0 @@
-require 'test_helper'
-
-class Erubis::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase
- destination File.join(Rails.root)
- tests Rails::Generators::ScaffoldGenerator
- arguments %w(product_line title:string price:integer --template-engine erubis)
-
- setup :prepare_destination
- setup :copy_routes
-
- test "should invoke template engine" do
- run_generator
-
- %w(index edit new show _form).each { |view| assert_file "app/views/product_lines/#{view}.html.erb" }
- assert_no_file "app/views/layouts/product_lines.html.erb"
- end
-
- test "should revoke template engine" do
- run_generator
- run_generator ["product_line"], :behavior => :revoke
-
- assert_no_file "app/views/product_lines"
- assert_no_file "app/views/layouts/product_lines.html.erb"
- end
-
- test "should invoke form builder" do
- run_generator %w(product_line title:string price:integer --template-engine erubis --form-builder some-form-builder)
- assert_no_file "app/views/product_lines/_form.html.erb"
- end
-end
View
19 test/lib/generators/formtastic/scaffold_generators_test.rb
@@ -1,19 +0,0 @@
-require 'test_helper'
-
-class Formtastic::Generators::FormBuilderGeneratorTest < Rails::Generators::TestCase
- destination File.join(Rails.root)
- tests Rails::Generators::ScaffoldGenerator
-
- setup :prepare_destination
- setup :copy_routes
-
- test "should invoke form builder and output haml form" do
- run_generator %w(product_line title:string price:integer --template-engine haml --form-builder formtastic)
- assert_file "app/views/product_lines/_form.html.haml"
- end
-
- test "should invoke form builder and output erubis form" do
- run_generator %w(product_line title:string price:integer --template-engine erubis --form-builder formtastic)
- assert_file "app/views/product_lines/_form.html.erb"
- end
-end
View
19 test/lib/generators/simple_form/scaffold_generators_test.rb
@@ -1,19 +0,0 @@
-require 'test_helper'
-
-class SimpleForm::Generators::FormBuilderGeneratorTest < Rails::Generators::TestCase
- destination File.join(Rails.root)
- tests Rails::Generators::ScaffoldGenerator
-
- setup :prepare_destination
- setup :copy_routes
-
- test "should invoke form builder and output haml form" do
- run_generator %w(product_line title:string price:integer --template-engine haml --form-builder simple_form)
- assert_file "app/views/product_lines/_form.html.haml"
- end
-
- test "should invoke form builder and output erubis form" do
- run_generator %w(product_line title:string price:integer --template-engine erubis --form-builder simple_form)
- assert_file "app/views/product_lines/_form.html.erb"
- end
-end
View
8 test/test_helper.rb
@@ -18,10 +18,6 @@ def self.root
end
Rails.application.config.root = Rails.root
-# Call configure to load the settings from
-# Rails.application.config.generators to Rails::Generators
-Rails::Generators.configure!
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
def copy_routes
@@ -48,10 +44,6 @@ def assert_class(klass, content)
def generator_list
{
:rails => ['scaffold', 'controller'],
- :erubis => ['scaffold'],
- :simple_form => ['scaffold'],
- :formtastic => ['scaffold'],
- :authlogic => ['session'],
:koala => ['install'],
:shoulda => ['controller', 'scaffold']
}
Something went wrong with that request. Please try again.