Permalink
Browse files

remove formtastic generators

  • Loading branch information...
1 parent 5744801 commit 3c8d2427e67ab594f4ff0d79e6bf10b01d91ddb7 @negonicrac negonicrac committed Sep 11, 2012
View
@@ -7,6 +7,7 @@
* 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.
== 0.17.5
* optimize
View
@@ -39,12 +39,6 @@ GEM
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)
@@ -84,7 +78,6 @@ PLATFORMS
DEPENDENCIES
bundler (>= 1.0.0)
factory_girl
- haml-rails
rails (>= 3.0.0)
rails3-generators!
rake
@@ -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
@@ -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
@@ -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 %>
@@ -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
@@ -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"
@@ -35,6 +34,8 @@ MongoMapper generators removed. MongoMapper (https://github.com/jnunemaker/mongo
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.
+
Be sure to check out the wiki, https://wiki.github.com/indirect/rails3-generators/,
for information about recent changes to this project.
}
@@ -1,14 +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
-end
View
@@ -48,7 +48,6 @@ def assert_class(klass, content)
def generator_list
{
:rails => ['scaffold', 'controller'],
- :formtastic => ['scaffold'],
:authlogic => ['session'],
:koala => ['install'],
:shoulda => ['controller', 'scaffold']

0 comments on commit 3c8d242

Please sign in to comment.