fira 0.3.4 → 0.3.5

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.
data/.gitignore CHANGED
@@ -1,17 +1,17 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in fira.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fira.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2013 Cameron Sutter
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ Copyright (c) 2013 Cameron Sutter
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
data/lib/fira/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fira
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -1,2 +1,2 @@
1
- <h1><%= class_name %>#<%= @action %></h1>
2
- <p>Find me in <%= @path %></p>
1
+ <h1><%= class_name %>#<%= @action %></h1>
2
+ <p>Find me in <%= @path %></p>
@@ -1,3 +1,3 @@
1
- <%= class_name %>#<%= @action %>
2
-
3
- <%%= @greeting %>, find me in app/views/<%= @path %>
1
+ <%= class_name %>#<%= @action %>
2
+
3
+ <%%= @greeting %>, find me in app/views/<%= @path %>
@@ -25,7 +25,7 @@ module Fira
25
25
  protected
26
26
 
27
27
  def available_views
28
- %w(index edit show new)
28
+ %w(index edit show new _form)
29
29
  end
30
30
 
31
31
  def handler
@@ -0,0 +1,23 @@
1
+ <%%= form_for(@<%= singular_table_name %>) do |f| %>
2
+ <%% if @<%= singular_table_name %>.errors.any? %>
3
+ <div #error_explanation>
4
+ <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
5
+
6
+ <ul>
7
+ <%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %>
8
+ <li><%%= msg %></li>
9
+ <%% end %>
10
+ </ul>
11
+ </div>
12
+ <%% end %>
13
+
14
+ <% attributes.each do |attribute| -%>
15
+ <div .field>
16
+ <%%= f.label :<%= attribute.name %> %><br />
17
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
18
+ </div>
19
+ <% end -%>
20
+ <div .actions>
21
+ <%%= f.submit %>
22
+ </div>
23
+ <%% end %>
@@ -1,6 +1,6 @@
1
- <h1>Editing <%= singular_table_name %></h1>
2
-
3
- <%%= render 'form' %>
4
-
5
- <%%= link_to 'Show', @<%= singular_table_name %> %> |
6
- <%%= link_to 'Back', <%= index_helper %>_path %>
1
+ <h1>Editing <%= singular_table_name %></h1>
2
+
3
+ <%%= render 'form' %>
4
+
5
+ <%%= link_to 'Show', @<%= singular_table_name %> %> |
6
+ <%%= link_to 'Back', <%= index_helper %>_path %>
@@ -1,27 +1,27 @@
1
- <h1>Listing <%= plural_table_name %></h1>
2
-
3
- <table>
4
- <tr>
5
- <% attributes.each do |attribute| -%>
6
- <th><%= attribute.human_name %></th>
7
- <% end -%>
8
- <th></th>
9
- <th></th>
10
- <th></th>
11
- </tr>
12
-
13
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
14
- <tr>
15
- <% attributes.each do |attribute| -%>
16
- <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
17
- <% end -%>
18
- <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
19
- <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
20
- <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'Are you sure?'"} }" %> %></td>
21
- </tr>
22
- <%% end %>
23
- </table>
24
-
25
- <br />
26
-
27
- <%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %>
1
+ <h1>Listing <%= plural_table_name %></h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <% attributes.each do |attribute| -%>
6
+ <th><%= attribute.human_name %></th>
7
+ <% end -%>
8
+ <th></th>
9
+ <th></th>
10
+ <th></th>
11
+ </tr>
12
+
13
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
14
+ <tr>
15
+ <% attributes.each do |attribute| -%>
16
+ <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
17
+ <% end -%>
18
+ <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
19
+ <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
20
+ <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'Are you sure?'"} }" %> %></td>
21
+ </tr>
22
+ <%% end %>
23
+ </table>
24
+
25
+ <br />
26
+
27
+ <%%= link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path %>
@@ -1,5 +1,5 @@
1
- <h1>New <%= singular_table_name %></h1>
2
-
3
- <%%= render 'form' %>
4
-
5
- <%%= link_to 'Back', <%= index_helper %>_path %>
1
+ <h1>New <%= singular_table_name %></h1>
2
+
3
+ <%%= render 'form' %>
4
+
5
+ <%%= link_to 'Back', <%= index_helper %>_path %>
@@ -1,12 +1,12 @@
1
- <p id="notice"><%%= notice %></p>
2
-
3
- <% attributes.each do |attribute| -%>
4
- <p>
5
- <b><%= attribute.human_name %>:</b>
6
- <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
7
- </p>
8
-
9
- <% end -%>
10
-
11
- <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
12
- <%%= link_to 'Back', <%= index_helper %>_path %>
1
+ <p id="notice"><%%= notice %></p>
2
+
3
+ <% attributes.each do |attribute| -%>
4
+ <p>
5
+ <b><%= attribute.human_name %>:</b>
6
+ <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
7
+ </p>
8
+
9
+ <% end -%>
10
+
11
+ <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
12
+ <%%= link_to 'Back', <%= index_helper %>_path %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -102,6 +102,7 @@ files:
102
102
  - lib/generators/fira/mailer/mailer_generator.rb
103
103
  - lib/generators/fira/mailer/templates/view.text.fira
104
104
  - lib/generators/fira/scaffold/scaffold_generator.rb
105
+ - lib/generators/fira/scaffold/templates/_form.html.fira
105
106
  - lib/generators/fira/scaffold/templates/edit.html.fira
106
107
  - lib/generators/fira/scaffold/templates/index.html.fira
107
108
  - lib/generators/fira/scaffold/templates/new.html.fira
@@ -126,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
127
  version: '0'
127
128
  requirements: []
128
129
  rubyforge_project:
129
- rubygems_version: 1.8.25
130
+ rubygems_version: 1.8.24
130
131
  signing_key:
131
132
  specification_version: 3
132
133
  summary: Smarter HTML