flexi_generators 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +83 -70
- data/Rakefile +0 -22
- data/VERSION +1 -1
- data/flexi_generators.gemspec +75 -136
- data/init.rb +0 -1
- data/lib/flexi_generators.rb +2 -4
- data/lib/generators/flexi_auth/USAGE +5 -0
- data/lib/generators/flexi_auth/flexi_auth_generator.rb +117 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/authentication.rb +2 -9
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/authlogic_session.rb +0 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/fixtures.yml +0 -0
- data/lib/generators/flexi_auth/templates/migration.rb +16 -0
- data/lib/generators/flexi_auth/templates/sessions_controller.rb +25 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/sessions_helper.rb +0 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/tests/testunit/sessions_controller.rb +1 -17
- data/lib/generators/flexi_auth/templates/tests/testunit/user.rb +4 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/tests/testunit/users_controller.rb +1 -1
- data/lib/generators/flexi_auth/templates/user.rb +3 -0
- data/lib/generators/flexi_auth/templates/users_controller.rb +42 -0
- data/{generators/flexi_authentication → lib/generators/flexi_auth}/templates/users_helper.rb +0 -0
- data/lib/generators/flexi_auth/templates/views/erb/_error_messages.html.erb +11 -0
- data/lib/generators/flexi_auth/templates/views/erb/edit.html.erb +24 -0
- data/lib/generators/flexi_auth/templates/views/erb/index.html.erb +27 -0
- data/lib/generators/flexi_auth/templates/views/erb/login.html.erb +22 -0
- data/lib/generators/flexi_auth/templates/views/erb/new.html.erb +24 -0
- data/lib/generators/flexi_auth/templates/views/erb/show.html.erb +16 -0
- data/lib/generators/flexi_prepare/USAGE +6 -0
- data/lib/generators/flexi_prepare/flexi_prepare_generator.rb +56 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/add.png +0 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/admin_home_controller.rb +0 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/admin_home_index.html.erb +1 -1
- data/lib/generators/flexi_prepare/templates/application.css +278 -0
- data/lib/generators/flexi_prepare/templates/application.html.erb +57 -0
- data/lib/generators/flexi_prepare/templates/application_helper.rb +42 -0
- data/lib/generators/flexi_prepare/templates/back.png +0 -0
- data/lib/generators/flexi_prepare/templates/bg.png +0 -0
- data/lib/generators/flexi_prepare/templates/bg2.png +0 -0
- data/lib/generators/flexi_prepare/templates/boxheader.gif +0 -0
- data/lib/generators/flexi_prepare/templates/btn-bg-hover.png +0 -0
- data/lib/generators/flexi_prepare/templates/btn-bg.png +0 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/custom_field_error.rb +1 -1
- data/lib/generators/flexi_prepare/templates/delete.png +0 -0
- data/lib/generators/flexi_prepare/templates/edit.png +0 -0
- data/lib/generators/flexi_prepare/templates/inflector_portuguese.rb +59 -0
- data/lib/generators/flexi_prepare/templates/login.css +142 -0
- data/lib/generators/flexi_prepare/templates/login.html.erb +26 -0
- data/lib/generators/flexi_prepare/templates/logo.png +0 -0
- data/lib/generators/flexi_prepare/templates/menu.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/Thumbs.db +0 -0
- data/lib/generators/flexi_prepare/templates/messages/error.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/info.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/success.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/tip.png +0 -0
- data/lib/generators/flexi_prepare/templates/messages/warning.png +0 -0
- data/lib/generators/flexi_prepare/templates/pt-BR.yml +204 -0
- data/lib/generators/flexi_prepare/templates/show.png +0 -0
- data/{generators/flexi_layout/templates/stylesheet_site.css → lib/generators/flexi_prepare/templates/site.css} +32 -23
- data/lib/generators/flexi_prepare/templates/site.html.erb +20 -0
- data/{generators/flexi_layout/templates/home_controller.rb → lib/generators/flexi_prepare/templates/site_controller.rb} +1 -1
- data/lib/generators/flexi_prepare/templates/site_helper.rb +2 -0
- data/lib/generators/flexi_prepare/templates/site_index.html.erb +27 -0
- data/{generators/flexi_layout → lib/generators/flexi_prepare}/templates/users.png +0 -0
- data/lib/generators/flexi_scaffold/USAGE +8 -0
- data/lib/generators/flexi_scaffold/flexi_scaffold_generator.rb +98 -0
- data/lib/generators/flexi_scaffold/templates/controller.rb +42 -0
- data/{generators → lib/generators}/flexi_scaffold/templates/fixtures.yml +3 -3
- data/{generators → lib/generators}/flexi_scaffold/templates/helper.rb +1 -1
- data/{generators → lib/generators}/flexi_scaffold/templates/migration.rb +3 -5
- data/lib/generators/flexi_scaffold/templates/model.rb +3 -0
- data/lib/generators/flexi_scaffold/templates/tests/controller.rb +50 -0
- data/lib/generators/flexi_scaffold/templates/tests/helper.rb +4 -0
- data/{test/flexi_generators_test.rb → lib/generators/flexi_scaffold/templates/tests/model.rb} +2 -2
- data/lib/generators/flexi_scaffold/templates/views/erb/_error_messages.html.erb +11 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/_form.html.erb +13 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/edit.html.erb +3 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/index.html.erb +29 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/new.html.erb +3 -0
- data/lib/generators/flexi_scaffold/templates/views/erb/show.html.erb +15 -0
- data/template.rb +6 -0
- metadata +79 -137
- data/flexi_template.rb +0 -28
- data/generators/flexi_authentication/USAGE +0 -50
- data/generators/flexi_authentication/flexi_authentication_generator.rb +0 -127
- data/generators/flexi_authentication/lib/insert_commands.rb +0 -74
- data/generators/flexi_authentication/templates/admin_users_controller.rb +0 -60
- data/generators/flexi_authentication/templates/migration.rb +0 -30
- data/generators/flexi_authentication/templates/sessions_controller.rb +0 -52
- data/generators/flexi_authentication/templates/tests/rspec/sessions_controller.rb +0 -39
- data/generators/flexi_authentication/templates/tests/rspec/user.rb +0 -83
- data/generators/flexi_authentication/templates/tests/rspec/users_controller.rb +0 -26
- data/generators/flexi_authentication/templates/tests/shoulda/sessions_controller.rb +0 -40
- data/generators/flexi_authentication/templates/tests/shoulda/user.rb +0 -85
- data/generators/flexi_authentication/templates/tests/shoulda/users_controller.rb +0 -27
- data/generators/flexi_authentication/templates/tests/testunit/user.rb +0 -88
- data/generators/flexi_authentication/templates/user.rb +0 -43
- data/generators/flexi_authentication/templates/views/erb/admin_user_edit.html.erb +0 -23
- data/generators/flexi_authentication/templates/views/erb/admin_user_index.html.erb +0 -33
- data/generators/flexi_authentication/templates/views/erb/admin_user_new.html.erb +0 -23
- data/generators/flexi_authentication/templates/views/erb/login.html.erb +0 -38
- data/generators/flexi_layout/USAGE +0 -18
- data/generators/flexi_layout/flexi_layout_generator.rb +0 -51
- data/generators/flexi_layout/lib/insert_commands.rb +0 -28
- data/generators/flexi_layout/templates/bg.png +0 -0
- data/generators/flexi_layout/templates/helper.rb +0 -19
- data/generators/flexi_layout/templates/home_helper.rb +0 -2
- data/generators/flexi_layout/templates/home_index.html.erb +0 -17
- data/generators/flexi_layout/templates/inflector_portuguese.rb +0 -62
- data/generators/flexi_layout/templates/layout.html.erb +0 -47
- data/generators/flexi_layout/templates/layout_login.html.erb +0 -27
- data/generators/flexi_layout/templates/layout_site.html.erb +0 -22
- data/generators/flexi_layout/templates/logo.png +0 -0
- data/generators/flexi_layout/templates/pt-BR.yml +0 -143
- data/generators/flexi_layout/templates/stylesheet.css +0 -132
- data/generators/flexi_layout/templates/stylesheet_login.css +0 -73
- data/generators/flexi_resource_scaffold/USAGE +0 -29
- data/generators/flexi_resource_scaffold/flexi_resource_scaffold_generator.rb +0 -179
- data/generators/flexi_resource_scaffold/templates/controller.rb +0 -29
- data/generators/flexi_resource_scaffold/templates/fixtures.yml +0 -10
- data/generators/flexi_resource_scaffold/templates/functional_test.rb +0 -57
- data/generators/flexi_resource_scaffold/templates/helper.rb +0 -2
- data/generators/flexi_resource_scaffold/templates/migration.rb +0 -15
- data/generators/flexi_resource_scaffold/templates/model.rb +0 -2
- data/generators/flexi_resource_scaffold/templates/old_migration.rb +0 -13
- data/generators/flexi_resource_scaffold/templates/rspec/functional_spec.rb +0 -255
- data/generators/flexi_resource_scaffold/templates/rspec/helper_spec.rb +0 -11
- data/generators/flexi_resource_scaffold/templates/rspec/routing_spec.rb +0 -61
- data/generators/flexi_resource_scaffold/templates/rspec/unit_spec.rb +0 -11
- data/generators/flexi_resource_scaffold/templates/rspec/views/edit_spec.rb +0 -28
- data/generators/flexi_resource_scaffold/templates/rspec/views/index_spec.rb +0 -26
- data/generators/flexi_resource_scaffold/templates/rspec/views/new_spec.rb +0 -30
- data/generators/flexi_resource_scaffold/templates/rspec/views/show_spec.rb +0 -25
- data/generators/flexi_resource_scaffold/templates/shoulda_functional_test.rb +0 -19
- data/generators/flexi_resource_scaffold/templates/unit_test.rb +0 -7
- data/generators/flexi_resource_scaffold/templates/view__form.erb +0 -6
- data/generators/flexi_resource_scaffold/templates/view__form.haml +0 -5
- data/generators/flexi_resource_scaffold/templates/view_edit.erb +0 -8
- data/generators/flexi_resource_scaffold/templates/view_edit.haml +0 -11
- data/generators/flexi_resource_scaffold/templates/view_index.erb +0 -27
- data/generators/flexi_resource_scaffold/templates/view_index.haml +0 -19
- data/generators/flexi_resource_scaffold/templates/view_new.erb +0 -9
- data/generators/flexi_resource_scaffold/templates/view_new.haml +0 -9
- data/generators/flexi_resource_scaffold/templates/view_show.erb +0 -10
- data/generators/flexi_resource_scaffold/templates/view_show.haml +0 -9
- data/generators/flexi_scaffold/USAGE +0 -51
- data/generators/flexi_scaffold/flexi_scaffold_generator.rb +0 -232
- data/generators/flexi_scaffold/templates/actions/create.rb +0 -9
- data/generators/flexi_scaffold/templates/actions/destroy.rb +0 -6
- data/generators/flexi_scaffold/templates/actions/edit.rb +0 -3
- data/generators/flexi_scaffold/templates/actions/index.rb +0 -4
- data/generators/flexi_scaffold/templates/actions/new.rb +0 -3
- data/generators/flexi_scaffold/templates/actions/show.rb +0 -3
- data/generators/flexi_scaffold/templates/actions/update.rb +0 -9
- data/generators/flexi_scaffold/templates/controller.rb +0 -5
- data/generators/flexi_scaffold/templates/model.rb +0 -3
- data/generators/flexi_scaffold/templates/tests/rspec/actions/create.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/rspec/actions/destroy.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/rspec/actions/edit.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/index.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/new.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/show.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/rspec/actions/update.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/rspec/controller.rb +0 -8
- data/generators/flexi_scaffold/templates/tests/rspec/model.rb +0 -7
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/create.rb +0 -13
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/destroy.rb +0 -8
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/edit.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/index.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/new.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/show.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/shoulda/actions/update.rb +0 -13
- data/generators/flexi_scaffold/templates/tests/shoulda/controller.rb +0 -5
- data/generators/flexi_scaffold/templates/tests/shoulda/model.rb +0 -7
- data/generators/flexi_scaffold/templates/tests/testunit/actions/create.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/testunit/actions/destroy.rb +0 -6
- data/generators/flexi_scaffold/templates/tests/testunit/actions/edit.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/index.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/new.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/show.rb +0 -4
- data/generators/flexi_scaffold/templates/tests/testunit/actions/update.rb +0 -11
- data/generators/flexi_scaffold/templates/tests/testunit/controller.rb +0 -5
- data/generators/flexi_scaffold/templates/tests/testunit/model.rb +0 -7
- data/generators/flexi_scaffold/templates/views/erb/_form.html.erb +0 -6
- data/generators/flexi_scaffold/templates/views/erb/edit.html.erb +0 -8
- data/generators/flexi_scaffold/templates/views/erb/index.html.erb +0 -41
- data/generators/flexi_scaffold/templates/views/erb/new.html.erb +0 -10
- data/generators/flexi_scaffold/templates/views/erb/show.html.erb +0 -19
- data/generators/flexi_scaffold/templates/views/haml/_form.html.haml +0 -10
- data/generators/flexi_scaffold/templates/views/haml/edit.html.haml +0 -14
- data/generators/flexi_scaffold/templates/views/haml/index.html.haml +0 -25
- data/generators/flexi_scaffold/templates/views/haml/new.html.haml +0 -7
- data/generators/flexi_scaffold/templates/views/haml/show.html.haml +0 -20
- data/test/test_helper.rb +0 -3
@@ -1,19 +0,0 @@
|
|
1
|
-
<%% title "<%= singular_name.titleize %>" %>
|
2
|
-
<%- for attribute in attributes -%>
|
3
|
-
<p>
|
4
|
-
<strong><%= attribute.column.human_name.titleize %>:</strong>
|
5
|
-
<%%=h @<%= singular_name %>.<%= attribute.name %> %>
|
6
|
-
</p>
|
7
|
-
<%- end -%>
|
8
|
-
|
9
|
-
<div id="control_box">
|
10
|
-
<%- if action? :index -%>
|
11
|
-
<%%= link_to "Voltar", <%= plural_name %>_path, :class=>'back' %> |
|
12
|
-
<%- end -%>
|
13
|
-
<%- if action? :edit -%>
|
14
|
-
<%%= link_to "Editar", edit_<%= singular_name %>_path(@<%= singular_name %>), :class=>'edit' %> |
|
15
|
-
<%- end -%>
|
16
|
-
<%- if action? :destroy -%>
|
17
|
-
<%%= link_to "Excluir", @<%= singular_name %>, :confirm => 'Tem certeza que deseja excluir?', :class=>'delete', :method => :delete %>
|
18
|
-
<%- end -%>
|
19
|
-
</div>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
- title "Edit <%= singular_name.titleize %>"
|
2
|
-
|
3
|
-
<%= render_form %>
|
4
|
-
|
5
|
-
<%- if actions? :show, :index -%>
|
6
|
-
%p
|
7
|
-
<%- if action? :show -%>
|
8
|
-
= link_to "Show", <%= singular_name %>_path(@<%= singular_name %>)
|
9
|
-
|
|
10
|
-
<%- end -%>
|
11
|
-
<%- if action? :index -%>
|
12
|
-
= link_to "View All", <%= plural_name %>_path
|
13
|
-
<%- end -%>
|
14
|
-
<%- end -%>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
- title "<%= plural_name.titleize %>"
|
2
|
-
|
3
|
-
%table
|
4
|
-
%tr
|
5
|
-
<%- for attribute in attributes -%>
|
6
|
-
%th <%= attribute.column.human_name %>
|
7
|
-
<%- end -%>
|
8
|
-
- for <%= singular_name %> in @<%= plural_name %>
|
9
|
-
%tr
|
10
|
-
<%- for attribute in attributes -%>
|
11
|
-
%td= h <%= singular_name %>.<%= attribute.name %>
|
12
|
-
<%- end -%>
|
13
|
-
<%- if action? :show -%>
|
14
|
-
%td= link_to 'Show', <%= singular_name %>
|
15
|
-
<%- end -%>
|
16
|
-
<%- if action? :edit -%>
|
17
|
-
%td= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>)
|
18
|
-
<%- end -%>
|
19
|
-
<%- if action? :destroy -%>
|
20
|
-
%td= link_to 'Destroy', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
|
21
|
-
<%- end -%>
|
22
|
-
|
23
|
-
<%- if actions? :new -%>
|
24
|
-
%p= link_to "New <%= singular_name.titleize %>", new_<%= singular_name %>_path
|
25
|
-
<%- end -%>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
- title "<%= singular_name.titleize %>"
|
2
|
-
|
3
|
-
<%- for attribute in attributes -%>
|
4
|
-
%p
|
5
|
-
%strong <%= attribute.column.human_name.titleize %>:
|
6
|
-
=h @<%= singular_name %>.<%= attribute.name %>
|
7
|
-
<%- end -%>
|
8
|
-
|
9
|
-
%p
|
10
|
-
<%- if action? :edit -%>
|
11
|
-
= link_to "Edit", edit_<%= singular_name %>_path(@<%= singular_name %>)
|
12
|
-
|
|
13
|
-
<%- end -%>
|
14
|
-
<%- if action? :destroy -%>
|
15
|
-
= link_to "Destroy", @<%= singular_name %>, :confirm => 'Are you sure?', :method => :delete
|
16
|
-
|
|
17
|
-
<%- end -%>
|
18
|
-
<%- if action? :index -%>
|
19
|
-
= link_to "View All", <%= plural_name %>_path
|
20
|
-
<%- end -%>
|
data/test/test_helper.rb
DELETED