starter_generators 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e60cc8ced99c45a0b9b4fb3543c25a12ad91388a
4
- data.tar.gz: e58c2767ab4a52934535b3fa8b6e2fdec74d5d91
3
+ metadata.gz: 5dfe8099bd20a686e8ef5f47fc549c1fd9eecc3d
4
+ data.tar.gz: 8ad139e7c3debb99a59d2d31fa7e2bbdda204832
5
5
  SHA512:
6
- metadata.gz: 9ac42795f1a8b130ecde47d82e116b180f812e94dab70e924edb04e73d3a8004ec2b607dc40007b500c1d709ab243f288e240a3a83510f8c18b42cfcbf88902e
7
- data.tar.gz: 46a7cca8680805099bfde9b8d6fd044c02b711100eb5c04c27271af290dc834c14c48cb62315a0401c3926ee90d590efe1ae3cada0530923df6fa7866557988b
6
+ metadata.gz: 36be18cd6189c7d2f8b9f2e57cb8534754f7f0f4ac815dc74800588ab74938c01de6fa1eaef9f373aacfde50fca22d35252740f0dc938e3be1581e81f4f9ff80
7
+ data.tar.gz: 2e417d7ecd56f3aae72d8cc53455f3cb0504501b0d312775553e43f71a2e069b48058a4ed9cebb06321462a994bbbc600d89a87f163e0defcbbfbf8ddad72ef8
data/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
- ## Version 0.8.0 (July 26, 2013)
1
+ ## Version 0.9.1 (Sept 4, 2013)
2
+ * Fixed #17, Typo: In index template, closing tbody tag is </body> instead of </tbody>
3
+ * Fixed #15, add .btn-primary or .btn-warning instead of just .btn
4
+ * Slightly improved form layouts
5
+ * Fixed #14 to use icons in index template when bootstrapped
6
+
7
+
8
+ ## Version 0.9.0 (August 22, 2013)
9
+ * New --dry option to get scaffold-like refactoring (but without mass assignment)
10
+ *
11
+ ## Version 0.8.0 (August 20, 2013)
2
12
  * Bootstrap 3.0
3
13
  * Horizontal form CSS applied when using --styled
4
14
  * styler generator removes require_tree directive from application.css
data/README.md CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Rails generators that are helpful in class.
4
4
 
5
- Currently there are two generators, **starter:resource** and **starter::style**.
5
+ Currently there are two generators, **starter:resource** and **starter:style**.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'starter_generators', git: 'git@github.com:starterleague/starter_generators.git'
11
+ gem 'starter_generators'
12
12
 
13
13
  And then execute:
14
14
 
15
- $ bundle
15
+ $ bundle
16
16
 
17
17
  ## Usage
18
18
 
@@ -7,7 +7,11 @@
7
7
  <% attributes.each do |attribute| -%>
8
8
  <div class="form-group">
9
9
  <%%= label_tag :<%= attribute.name %>, nil, class: 'col-md-2 control-label' %>
10
- <div class="col-md-6">
10
+ <%
11
+ colsize = 6
12
+ colsize = 2 if attribute.type == :integer
13
+ %>
14
+ <div class="col-md-<%= colsize %>">
11
15
  <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %><%= "?" if attribute.type == :boolean %>, class: 'form-control'%>
12
16
  </div>
13
17
  </div>
@@ -3,9 +3,9 @@
3
3
  </div>
4
4
 
5
5
  <% if named_routes? -%>
6
- <p><%%= link_to 'Add a New <%= human_name.titleize %>', new_<%= singular_table_name %>_url, class: 'btn' %></p>
6
+ <p><%%= link_to 'Add a New <%= human_name.titleize %>', new_<%= singular_table_name %>_url, class: 'btn btn-primary' %></p>
7
7
  <% else -%>
8
- <p><%%= link_to 'Add a New <%= human_name.titleize %>', "/<%= plural_name %>/new", class: 'btn' %></p>
8
+ <p><%%= link_to 'Add a New <%= human_name.titleize %>', "/<%= plural_name %>/new", class: 'btn btn-primary' %></p>
9
9
  <% end -%>
10
10
 
11
11
  <table class="table table-hover">
@@ -27,16 +27,16 @@
27
27
  <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
28
28
  <% end -%>
29
29
  <% if named_routes? %>
30
- <td><%%= link_to 'Show', <%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn' %></td>
31
- <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn' %></td>
32
- <td><%%= link_to 'Destroy', <%= singular_table_name %>_url(<%= singular_table_name %>), method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
30
+ <td><%%= link_to '<i class="icon-zoom-in"></i>'.html_safe, <%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn btn-primary' %></td>
31
+ <td><%%= link_to '<i class="icon-edit"></i>'.html_safe, edit_<%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn btn-warning' %></td>
32
+ <td><%%= link_to '<i class="icon-trash"></i>'.html_safe, <%= singular_table_name %>_url(<%= singular_table_name %>), method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
33
33
  <% else %>
34
- <td><%%= link_to 'Show', "/<%= plural_name %>/#{<%= singular_table_name %>.id}", class: 'btn' %></td>
35
- <td><%%= link_to 'Edit', "/<%= plural_name %>/#{<%= singular_table_name %>.id}/edit", class: 'btn' %></td>
36
- <td><%%= link_to 'Destroy', "/<%= plural_name %>/#{<%= singular_table_name %>.id}", method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
34
+ <td><%%= link_to '<i class="icon-zoom-in"></i>'.html_safe, "/<%= plural_name %>/#{<%= singular_table_name %>.id}", class: 'btn btn-primary' %></td>
35
+ <td><%%= link_to '<i class="icon-edit"></i>'.html_safe, "/<%= plural_name %>/#{<%= singular_table_name %>.id}/edit", class: 'btn btn-warning' %></td>
36
+ <td><%%= link_to '<i class="icon-trash"></i>'.html_safe, "/<%= plural_name %>/#{<%= singular_table_name %>.id}", method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
37
37
  <% end %>
38
38
  </tr>
39
39
  <%% end %>
40
- </body>
40
+ </tbody>
41
41
  </table>
42
42
 
@@ -7,7 +7,11 @@
7
7
  <% attributes.each do |attribute| -%>
8
8
  <div class="form-group">
9
9
  <%%= label_tag :<%= attribute.name %>, nil, class: 'col-md-2 control-label' %>
10
- <div class="col-md-6">
10
+ <%
11
+ colsize = 6
12
+ colsize = 2 if attribute.type == :integer
13
+ %>
14
+ <div class="col-md-<%= colsize %>">
11
15
  <%%= <%= attribute.field_type %>_tag :<%= attribute.name %><%= "?" if attribute.type == :boolean %>, nil, class: 'form-control' %>
12
16
  </div>
13
17
  </div>
@@ -1,14 +1,18 @@
1
- <%%= form_for(@<%= singular_table_name %>, class: 'form-horizontal') do |f| %>
1
+ <%%= form_for(@<%= singular_table_name %>, html: { class: 'form-horizontal'}) do |f| %>
2
2
 
3
3
  <% attributes.each do |attribute| -%>
4
4
  <div class="form-group">
5
- <%%= f.label :<%= attribute.name %>, class: 'col-md-2 control-label' %>
6
- <div class="col-md-6">
5
+ <%%= f.label :<%= attribute.name %>, class: 'col-md-2' %>
6
+ <%
7
+ colsize = 6
8
+ colsize = 2 if attribute.type == :integer
9
+ %>
10
+ <div class="col-md-<%= colsize %>">
7
11
  <%%= f.<%= attribute.field_type %> :<%= attribute.name %><%= "?" if attribute.type == :boolean %>, class: 'form-control' %>
8
12
  </div>
9
13
  </div>
10
14
 
11
- <% end -%>
15
+ <% end -%>
12
16
  <div class="form-group">
13
17
  <div class="col-md-offset-2 col-md-6">
14
18
  <%%= f.submit nil, class: 'btn btn-primary' %>
@@ -5,7 +5,7 @@
5
5
  <% if named_routes? -%>
6
6
  <p><%%= link_to 'Add a New <%= human_name.titleize %>', new_<%= singular_table_name %>_url, class: 'btn btn-primary' %></p>
7
7
  <% else -%>
8
- <p><%%= link_to 'Add a New <%= human_name.titleize %>', "/<%= plural_name %>/new", class: 'btn' %></p>
8
+ <p><%%= link_to 'Add a New <%= human_name.titleize %>', "/<%= plural_name %>/new", class: 'btn btn-primary' %></p>
9
9
  <% end -%>
10
10
 
11
11
  <table class="table table-hover">
@@ -27,16 +27,16 @@
27
27
  <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
28
28
  <% end -%>
29
29
  <% if named_routes? %>
30
- <td><%%= link_to 'Show', <%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn' %></td>
31
- <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn' %></td>
32
- <td><%%= link_to 'Destroy', <%= singular_table_name %>_url(<%= singular_table_name %>), method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
30
+ <td><%%= link_to '<i class="icon-zoom-in"></i>'.html_safe, <%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn btn-primary' %></td>
31
+ <td><%%= link_to '<i class="icon-edit"></i>'.html_safe, edit_<%= singular_table_name %>_url(<%= singular_table_name %>), class: 'btn btn-warning' %></td>
32
+ <td><%%= link_to '<i class="icon-trash"></i>'.html_safe, <%= singular_table_name %>_url(<%= singular_table_name %>), method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
33
33
  <% else %>
34
- <td><%%= link_to 'Show', "/<%= plural_name %>/#{<%= singular_table_name %>.id}", class: 'btn' %></td>
35
- <td><%%= link_to 'Edit', "/<%= plural_name %>/#{<%= singular_table_name %>.id}/edit", class: 'btn' %></td>
36
- <td><%%= link_to 'Destroy', "/<%= plural_name %>/#{<%= singular_table_name %>.id}", method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
34
+ <td><%%= link_to '<i class="icon-zoom-in"></i>'.html_safe, "/<%= plural_name %>/#{<%= singular_table_name %>.id}", class: 'btn btn-primary' %></td>
35
+ <td><%%= link_to '<i class="icon-edit"></i>'.html_safe, "/<%= plural_name %>/#{<%= singular_table_name %>.id}/edit", class: 'btn btn-warning' %></td>
36
+ <td><%%= link_to '<i class="icon-trash"></i>'.html_safe, "/<%= plural_name %>/#{<%= singular_table_name %>.id}", method: 'delete', data: { confirm: "Do you really want to delete this <%= singular_table_name %>?" }, class: 'btn btn-danger' %></td>
37
37
  <% end %>
38
38
  </tr>
39
39
  <%% end %>
40
- </body>
40
+ </tbody>
41
41
  </table>
42
42
 
@@ -1,3 +1,3 @@
1
1
  module StarterGenerators
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: starter_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Cohen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-23 00:00:00.000000000 Z
11
+ date: 2013-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler