saucy 0.1.13 → 0.1.14

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/README CHANGED
@@ -8,6 +8,8 @@ your config/application.rb:
8
8
 
9
9
  config.saucy.layouts.accounts.index = "custom"
10
10
 
11
+ Your layout should yield(:header) in order to get the headers from saucy views.
12
+
11
13
 
12
14
  To extend the ProjectsController:
13
15
 
@@ -1,4 +1,6 @@
1
- <h2>Settings for <span><%= current_account.name %></span></h2>
1
+ <% content_for :header do -%>
2
+ <h2>Settings for <span><%= current_account.name %></span></h2>
3
+ <% end -%>
2
4
 
3
5
  <%= render :partial => 'tab_bar' %>
4
6
 
@@ -1,3 +1,5 @@
1
- <h2>Accounts</h2>
2
- <%= render :partial => 'account', :collection => @accounts %>
1
+ <% content_for :header do -%>
2
+ <h2>Accounts</h2>
3
+ <% end -%>
3
4
 
5
+ <%= render :partial => 'account', :collection => @accounts %>
@@ -1,4 +1,6 @@
1
- <h2>Sign up</h2>
1
+ <% content_for :header do -%>
2
+ <h2>Sign up</h2>
3
+ <% end -%>
2
4
 
3
5
  <%= semantic_form_for @signup, :url => plan_accounts_path(@plan) do |form| %>
4
6
  <%= form.error_messages %>
@@ -1,4 +1,7 @@
1
- <h2>Invite a new User</h2>
1
+ <% content_for :header do -%>
2
+ <h2>Invite a new User</h2>
3
+ <% end -%>
4
+
2
5
  <%= semantic_form_for [current_account, @invitation] do |form| -%>
3
6
  <%= form.inputs do -%>
4
7
  <%= form.input :email %>
@@ -1,4 +1,6 @@
1
- <h2>Accept invitation to <%= @invitation.account_name %></h2>
1
+ <% content_for :header do -%>
2
+ <h2>Accept invitation to <%= @invitation.account_name %></h2>
3
+ <% end -%>
2
4
 
3
5
  <%= semantic_form_for @invitation do |form| %>
4
6
  <h5 class="legend">I am a new user</h5>
@@ -1,4 +1,6 @@
1
- <h2>Permissions for <span><%= @membership.name %></span> on <%= current_account.name %></h2>
1
+ <% content_for :header do -%>
2
+ <h2>Permissions for <span><%= @membership.name %></span> on <%= current_account.name %></h2>
3
+ <% end -%>
2
4
 
3
5
  <%= render :partial => 'accounts/tab_bar' %>
4
6
 
@@ -1,4 +1,6 @@
1
- <h2>Users for <span><%= current_account.name %></span></h2>
1
+ <% content_for :header do -%>
2
+ <h2>Users for <span><%= current_account.name %></span></h2>
3
+ <% end -%>
2
4
 
3
5
  <%= render :partial => 'accounts/tab_bar' %>
4
6
 
@@ -1,4 +1,6 @@
1
- <h2>User Details</h2>
1
+ <% content_for :header do -%>
2
+ <h2>User Details</h2>
3
+ <% end -%>
2
4
 
3
5
  <div id="user_accounts">
4
6
  <h3>Accounts</h3>
@@ -1,4 +1,7 @@
1
- <h2>Edit project: <%= @project.name %></h2>
1
+ <% content_for :header do -%>
2
+ <h2>Edit project: <%= @project.name %></h2>
3
+ <% end -%>
4
+
2
5
  <div class="actions">
3
6
  <%= link_to project_path(@project), :method => 'delete', :confirm => 'Are you sure you want to delete this project and all associated content?', :class => 'action' do %>
4
7
  <span class="delete_item">Remove this project</span>
@@ -1,4 +1,6 @@
1
- <h2>Projects for <%= current_account.name %></h2>
1
+ <% content_for :header do -%>
2
+ <h2>Projects for <%= current_account.name %></h2>
3
+ <% end -%>
2
4
 
3
5
  <%= render :partial => 'accounts/tab_bar' %>
4
6
 
@@ -1,4 +1,6 @@
1
- <h2>Create a new project</h2>
1
+ <% content_for :header do -%>
2
+ <h2>Create a new project</h2>
3
+ <% end -%>
2
4
 
3
5
  <%= render :partial => 'accounts/tab_bar' %>
4
6
 
@@ -21,6 +21,7 @@ Feature: generate a saucy application and run rake
21
21
  When I add the "saucy" gem from this project as a dependency
22
22
  And I successfully run "bundle install --local"
23
23
  And I bootstrap the application for clearance
24
+ And I bootstrap the application for saucy
24
25
 
25
26
  Scenario: generate a saucy application and run rake
26
27
  When I successfully run "rails generate saucy:install"
@@ -0,0 +1,13 @@
1
+ When /^I bootstrap the application for saucy$/ do
2
+ steps %{
3
+ And I add a header to the layout
4
+ }
5
+ end
6
+
7
+ When /^I add a header to the layout$/ do
8
+ header = "<%= yield(:header) %>"
9
+
10
+ replace_in_file "app/views/layouts/application.html.erb",
11
+ /(<body>)/,
12
+ "\\1\n#{header}"
13
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saucy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 13
10
- version: 0.1.13
9
+ - 14
10
+ version: 0.1.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot, inc.
@@ -141,6 +141,7 @@ files:
141
141
  - features/run_features.feature
142
142
  - features/step_definitions/clearance_steps.rb
143
143
  - features/step_definitions/rails_steps.rb
144
+ - features/step_definitions/saucy_steps.rb
144
145
  - features/support/env.rb
145
146
  - features/support/file.rb
146
147
  - lib/generators/saucy/features/templates/features/edit_profile.feature
@@ -213,5 +214,6 @@ test_files:
213
214
  - features/run_features.feature
214
215
  - features/step_definitions/clearance_steps.rb
215
216
  - features/step_definitions/rails_steps.rb
217
+ - features/step_definitions/saucy_steps.rb
216
218
  - features/support/env.rb
217
219
  - features/support/file.rb