saucy 0.1.12 → 0.1.13
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/app/views/accounts/new.html.erb +3 -2
- data/app/views/invitations/show.html.erb +4 -3
- data/app/views/projects/_form.html.erb +4 -2
- data/app/views/shared/_saucy_javascript.html.erb +15 -0
- data/lib/generators/saucy/features/templates/features/manage_projects.feature +4 -1
- data/lib/generators/saucy/features/templates/features/new_account.feature +1 -0
- metadata +5 -4
@@ -5,8 +5,8 @@
|
|
5
5
|
|
6
6
|
<h5 class="legend">Basic Information</h5>
|
7
7
|
<%= form.inputs do %>
|
8
|
-
<%= form.input :account_name, :label => 'Company Name' %>
|
9
|
-
<%= form.input :keyword, :
|
8
|
+
<%= form.input :account_name, :label => 'Company Name', :hint => account_url(Account.new(:keyword => 'keyword')).html_safe %>
|
9
|
+
<%= form.input :keyword, :wrapper_html => { :style => 'display: none' } %>
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<% unless signed_in? -%>
|
@@ -24,3 +24,4 @@
|
|
24
24
|
<% end %>
|
25
25
|
<% end %>
|
26
26
|
|
27
|
+
<%= render :partial => "shared/saucy_javascript" %>
|
@@ -1,14 +1,16 @@
|
|
1
1
|
<h2>Accept invitation to <%= @invitation.account_name %></h2>
|
2
2
|
|
3
3
|
<%= semantic_form_for @invitation do |form| %>
|
4
|
-
|
4
|
+
<h5 class="legend">I am a new user</h5>
|
5
|
+
<%= form.inputs :class => 'new_user' do -%>
|
5
6
|
<%= form.input :new_user_email, :label => 'Email' %>
|
6
7
|
<%= form.input :new_user_name, :label => 'Name' %>
|
7
8
|
<%= form.input :new_user_password, :label => 'Password' %>
|
8
9
|
<%= form.input :new_user_password_confirmation, :label => 'Confirm password' %>
|
9
10
|
<% end -%>
|
10
11
|
|
11
|
-
|
12
|
+
<h5 class="legend">I am an existing user</h5>
|
13
|
+
<%= form.inputs :class => 'existing_user' do -%>
|
12
14
|
<%= form.input :existing_user_email, :label => 'Email' %>
|
13
15
|
<%= form.input :existing_user_password, :label => 'Password' %>
|
14
16
|
<% end -%>
|
@@ -17,4 +19,3 @@
|
|
17
19
|
<%= form.commit_button "Accept Invitation" %>
|
18
20
|
<% end %>
|
19
21
|
<% end %>
|
20
|
-
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<%= form.inputs do %>
|
2
|
-
<%= form.input :name %>
|
3
|
-
<%= form.input :keyword %>
|
2
|
+
<%= form.input :name, :hint => project_url(Project.new(:account => current_account, :keyword => 'keyword')).html_safe %>
|
3
|
+
<%= form.input :keyword, :wrapper_html => { :style => 'display: none' } %>
|
4
4
|
<%= form.input :users, :as => :check_boxes, :collection => users %>
|
5
5
|
<% end %>
|
6
|
+
|
7
|
+
<%= render :partial => "shared/saucy_javascript" %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= content_for :javascript do -%>
|
2
|
+
<%= javascript_tag do %>
|
3
|
+
$(function() {
|
4
|
+
$('#signup_account_name_input p.inline-hints, #project_name_input p.inline-hints').each(function(index) {
|
5
|
+
$(this).html($(this).text().replace("keyword", "<span>keyword</span>"))
|
6
|
+
});
|
7
|
+
$('#signup_account_name, #project_name').keyup(function(){
|
8
|
+
var mainPart = /^([\w\s]*)(\W*)/.exec($(this).val())[1];
|
9
|
+
mainPart = mainPart.replace(/ /g, "")
|
10
|
+
if(mainPart == "") mainPart = "keyword";
|
11
|
+
$(this).siblings('p.inline-hints').find('span').text(mainPart);
|
12
|
+
});
|
13
|
+
});
|
14
|
+
<% end %>
|
15
|
+
<% end -%>
|
@@ -4,7 +4,9 @@ Feature: Manage Projects
|
|
4
4
|
In order to have a project for each of my software applications
|
5
5
|
|
6
6
|
Background:
|
7
|
-
Given
|
7
|
+
Given the following account exists:
|
8
|
+
| name | keyword |
|
9
|
+
| Test | test |
|
8
10
|
And I have signed in with "joe@example.com/test"
|
9
11
|
And "joe@example.com" is an admin of the "Test" account
|
10
12
|
|
@@ -13,6 +15,7 @@ Feature: Manage Projects
|
|
13
15
|
And I follow "New Project"
|
14
16
|
And I fill in "Name" with "Project 1"
|
15
17
|
And I fill in "Keyword" with "project1"
|
18
|
+
And I should see "http://www.example.com/accounts/test/projects/keyword"
|
16
19
|
And I press "Create"
|
17
20
|
And I go to the projects page for the "Test" account
|
18
21
|
Then I should see "Project 1" within "ul.projects"
|
@@ -10,6 +10,7 @@ Feature: user adds a new account
|
|
10
10
|
And I fill in "Password" with "test"
|
11
11
|
And I fill in "Company Name" with "Robots"
|
12
12
|
And I fill in "Keyword" with "robots"
|
13
|
+
And I should see "http://www.example.com/accounts/keyword"
|
13
14
|
And I press "Sign up"
|
14
15
|
Then I should see "created"
|
15
16
|
But I should not see "Instructions for confirming"
|
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:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 13
|
10
|
+
version: 0.1.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- thoughtbot, inc.
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-12-
|
20
|
+
date: 2010-12-23 00:00:00 -05:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- app/views/projects/edit.html.erb
|
110
110
|
- app/views/projects/index.html.erb
|
111
111
|
- app/views/projects/new.html.erb
|
112
|
+
- app/views/shared/_saucy_javascript.html.erb
|
112
113
|
- lib/generators/saucy/base.rb
|
113
114
|
- lib/generators/saucy/features/features_generator.rb
|
114
115
|
- lib/generators/saucy/features/templates/factories.rb
|