Commit 8eb02d6ba8f46d6ec31f96401b1b7f027bb07580

Authored by Rafael Manzo
1 parent ce5ea762

Layout with Twitter Bootstrap

Signed-off-by: Fellipe Souto <fllsouto@gmail.com>
@@ -39,9 +39,12 @@ gem &#39;devise&#39;, &#39;~&gt; 3.1.0&#39; @@ -39,9 +39,12 @@ gem &#39;devise&#39;, &#39;~&gt; 3.1.0&#39;
39 # Kalibro integration 39 # Kalibro integration
40 gem 'kalibro_entities', "~> 0.0.1.rc2" 40 gem 'kalibro_entities', "~> 0.0.1.rc2"
41 41
42 -#PostgreSQL integration 42 +# PostgreSQL integration
43 gem "pg", "~> 0.17.0" 43 gem "pg", "~> 0.17.0"
44 44
  45 +# Twitter Bootstrap for layout
  46 +gem "twitter-bootstrap-rails", "~> 2.2.8"
  47 +
45 group :doc do 48 group :doc do
46 # bundle exec rake doc:rails generates the API under doc/api. 49 # bundle exec rake doc:rails generates the API under doc/api.
47 gem 'sdoc', require: false 50 gem 'sdoc', require: false
@@ -221,6 +221,11 @@ GEM @@ -221,6 +221,11 @@ GEM
221 polyglot (>= 0.3.1) 221 polyglot (>= 0.3.1)
222 turbolinks (1.3.0) 222 turbolinks (1.3.0)
223 coffee-rails 223 coffee-rails
  224 + twitter-bootstrap-rails (2.2.8)
  225 + actionpack (>= 3.1)
  226 + execjs
  227 + rails (>= 3.1)
  228 + railties (>= 3.1)
224 tzinfo (0.3.38) 229 tzinfo (0.3.38)
225 uglifier (2.2.1) 230 uglifier (2.2.1)
226 execjs (>= 0.3.0) 231 execjs (>= 0.3.0)
@@ -264,4 +269,5 @@ DEPENDENCIES @@ -264,4 +269,5 @@ DEPENDENCIES
264 sqlite3 269 sqlite3
265 therubyracer 270 therubyracer
266 turbolinks 271 turbolinks
  272 + twitter-bootstrap-rails (~> 2.2.8)
267 uglifier (>= 1.3.0) 273 uglifier (>= 1.3.0)
app/assets/images/agplv3-88x31.png 0 → 100644

1.84 KB

app/assets/images/logo.png 0 → 100644

2.68 KB

app/assets/javascripts/application.js
@@ -12,5 +12,6 @@ @@ -12,5 +12,6 @@
12 // 12 //
13 //= require jquery 13 //= require jquery
14 //= require jquery_ujs 14 //= require jquery_ujs
  15 +//= require twitter/bootstrap
15 //= require turbolinks 16 //= require turbolinks
16 //= require_tree . 17 //= require_tree .
app/assets/javascripts/bootstrap.js.coffee 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +jQuery ->
  2 + $("a[rel~=popover], .has-popover").popover()
  3 + $("a[rel~=tooltip], .has-tooltip").tooltip()
app/assets/stylesheets/application.css
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 * You're free to add application-wide styles to this file and they'll appear at the top of the 8 * You're free to add application-wide styles to this file and they'll appear at the top of the
9 * compiled file, but it's generally better to create a new file per style scope. 9 * compiled file, but it's generally better to create a new file per style scope.
10 * 10 *
11 - *= boilerplate/main.css 11 + *= boilerplate/main.css
12 *= boilerplate/normalize.css 12 *= boilerplate/normalize.css
13 *= require_self 13 *= require_self
14 *= require_tree . 14 *= require_tree .
app/assets/stylesheets/bootstrap_and_overrides.css 0 → 100644
@@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
  1 +/*
  2 + =require twitter-bootstrap-static/bootstrap
  3 +
  4 + Use Font Awesome icons (default)
  5 + To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
  6 + =require twitter-bootstrap-static/fontawesome
  7 + */
  8 +
  9 +footer div {
  10 + width: 50%;
  11 +}
  12 +
  13 +.footer-right {
  14 + float: right;
  15 + text-align: right;
  16 +}
  17 +
  18 +.footer-left {
  19 + float: left;
  20 +}
0 \ No newline at end of file 21 \ No newline at end of file
app/views/devise/confirmations/new.html.erb
1 -<h2>Resend confirmation instructions</h2> 1 +<h1>Resend confirmation instructions</h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4 <%= devise_error_messages! %> 4 <%= devise_error_messages! %>
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <div><%= f.label :email %><br /> 6 <div><%= f.label :email %><br />
7 <%= f.email_field :email, :autofocus => true %></div> 7 <%= f.email_field :email, :autofocus => true %></div>
8 8
9 - <div><%= f.submit "Resend confirmation instructions" %></div> 9 + <div><%= f.submit "Resend confirmation instructions", class: 'btn btn-default' %></div>
10 <% end %> 10 <% end %>
11 11
12 <%= render "devise/shared/links" %> 12 <%= render "devise/shared/links" %>
app/views/devise/passwords/edit.html.erb
1 -<h2>Change your password</h2> 1 +<h1>Change your password</h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4 <%= devise_error_messages! %> 4 <%= devise_error_messages! %>
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <div><%= f.label :password_confirmation, "Confirm new password" %><br /> 10 <div><%= f.label :password_confirmation, "Confirm new password" %><br />
11 <%= f.password_field :password_confirmation %></div> 11 <%= f.password_field :password_confirmation %></div>
12 12
13 - <div><%= f.submit "Change my password" %></div> 13 + <div><%= f.submit "Change my password", class: 'btn btn-warning' %></div>
14 <% end %> 14 <% end %>
15 15
16 <%= render "devise/shared/links" %> 16 <%= render "devise/shared/links" %>
app/views/devise/passwords/new.html.erb
1 -<h2>Forgot your password?</h2> 1 +<h1>Forgot your password?</h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4 <%= devise_error_messages! %> 4 <%= devise_error_messages! %>
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <div><%= f.label :email %><br /> 6 <div><%= f.label :email %><br />
7 <%= f.email_field :email, :autofocus => true %></div> 7 <%= f.email_field :email, :autofocus => true %></div>
8 8
9 - <div><%= f.submit "Send me reset password instructions" %></div> 9 + <div><%= f.submit "Send me reset password instructions", class: 'btn btn-warning' %></div>
10 <% end %> 10 <% end %>
11 11
12 <%= render "devise/shared/links" %> 12 <%= render "devise/shared/links" %>
app/views/devise/registrations/edit.html.erb
1 -<h2>Edit <%= resource_name.to_s.humanize %></h2> 1 +<h1>Edit <%= resource_name.to_s.humanize %></h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4 <%= devise_error_messages! %> 4 <%= devise_error_messages! %>
@@ -22,11 +22,9 @@ @@ -22,11 +22,9 @@
22 <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> 22 <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
23 <%= f.password_field :current_password %></div> 23 <%= f.password_field :current_password %></div>
24 24
25 - <div><%= f.submit "Update" %></div> 25 + <div><%= f.submit "Update", class: 'btn btn-primary' %></div>
26 <% end %> 26 <% end %>
27 27
28 -<h3>Cancel my account</h3> 28 +<h2>Cancel my account</h2>
29 29
30 -<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>  
31 -  
32 -<%= link_to "Back", root_path %> 30 +<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, class: 'btn btn-danger' %></p>
app/views/devise/registrations/new.html.erb
1 -<h2>Sign up</h2> 1 +<h1>Sign up</h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4 <%= devise_error_messages! %> 4 <%= devise_error_messages! %>
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <div><%= f.label :password_confirmation %><br /> 15 <div><%= f.label :password_confirmation %><br />
16 <%= f.password_field :password_confirmation %></div> 16 <%= f.password_field :password_confirmation %></div>
17 17
18 - <div><%= f.submit "Sign up" %></div> 18 + <div><%= f.submit "Sign up", class: 'btn btn-primary' %></div>
19 <% end %> 19 <% end %>
20 20
21 <%= render "devise/shared/links" %> 21 <%= render "devise/shared/links" %>
app/views/devise/sessions/new.html.erb
1 -<h2>Sign in</h2> 1 +<h1>Sign in</h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4 <div><%= f.label :email %><br /> 4 <div><%= f.label :email %><br />
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> 11 <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
12 <% end -%> 12 <% end -%>
13 13
14 - <div><%= f.submit "Sign in" %></div> 14 + <div><%= f.submit "Sign in", class: 'btn btn-primary' %></div>
15 <% end %> 15 <% end %>
16 16
17 <%= render "devise/shared/links" %> 17 <%= render "devise/shared/links" %>
app/views/devise/unlocks/new.html.erb
1 -<h2>Resend unlock instructions</h2> 1 +<h1>Resend unlock instructions</h1>
2 2
3 <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> 3 <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4 <%= devise_error_messages! %> 4 <%= devise_error_messages! %>
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <div><%= f.label :email %><br /> 6 <div><%= f.label :email %><br />
7 <%= f.email_field :email, :autofocus => true %></div> 7 <%= f.email_field :email, :autofocus => true %></div>
8 8
9 - <div><%= f.submit "Resend unlock instructions" %></div> 9 + <div><%= f.submit "Resend unlock instructions", class: 'btn btn-primary' %></div>
10 <% end %> 10 <% end %>
11 11
12 <%= render "devise/shared/links" %> 12 <%= render "devise/shared/links" %>
app/views/home/index.html.erb
1 -<% if user_signed_in? %>  
2 - <%= link_to('Edit', edit_user_registration_path) %>  
3 - <%= link_to('New Project', new_project_path) %>  
4 - <%= link_to('Logout', destroy_user_session_path, :method => :delete) %>  
5 -<% else %>  
6 - <%= link_to('Login', new_user_session_path) %>  
7 - <%= link_to('Sign Up', new_user_registration_path) %>  
8 -<% end %> 1 +<div class="hero-unit">
  2 +<p><h1>Hello world!</h1></p>
9 3
10 -<p><h2>Latest Projects</h2></p> 4 +<p>This is Mezuro! A <strong>free</strong> (with the same meaning as freedom) web platform for <strong>collaborative</strong> source code <strong>evalution</strong>.</p>
  5 +
  6 +<p>Here you can evaluate your source code with most of the SCM, just by giving it's URL. For now you can evaluate <strong>Java</strong>, <strong>C/C++</strong> and <strong>Python</strong> source-code, but soon we hope to support more languages!</p>
  7 +
  8 +</div>
  9 +
  10 +<h2>Latest projects</h2>
11 <ul> 11 <ul>
12 <% @latest_projects.each do |project| %> 12 <% @latest_projects.each do |project| %>
13 <li><%= link_to(project.name, project_path(project.id)) %></li> 13 <li><%= link_to(project.name, project_path(project.id)) %></li>
14 <% end %> 14 <% end %>
15 -</ul>  
16 -<p><%= link_to('All Projects', projects_path) %></p>  
17 \ No newline at end of file 15 \ No newline at end of file
  16 +</ul>
18 \ No newline at end of file 17 \ No newline at end of file
app/views/layouts/application.html.erb
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 -<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->  
3 -<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->  
4 -<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->  
5 -<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> 2 +<html lang="en">
6 <head> 3 <head>
7 - <meta charset="utf-8" />  
8 - <meta name="viewport" content="width=device-width,initial-scale=1" /> 4 + <meta charset="utf-8">
  5 + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
9 7
10 - <title>Base Rails App</title> 8 + <title><%= content_for?(:title) ? yield(:title) : "Mezuro" %></title>
11 9
12 <link type="text/plain" rel="author" href="humans.txt" /> 10 <link type="text/plain" rel="author" href="humans.txt" />
  11 +
13 <%= javascript_include_tag :modernizr %> 12 <%= javascript_include_tag :modernizr %>
14 13
15 - <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> 14 + <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
  15 + <!--[if lt IE 9]>
  16 + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
  17 + <![endif]-->
  18 +
  19 + <%= stylesheet_link_tag "application", :media => "all" %>
  20 +
  21 + <!-- For third-generation iPad with high-resolution Retina display: -->
  22 + <!-- Size should be 144 x 144 pixels -->
  23 + <%= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
  24 +
  25 + <!-- For iPhone with high-resolution Retina display: -->
  26 + <!-- Size should be 114 x 114 pixels -->
  27 + <%= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
  28 +
  29 + <!-- For first- and second-generation iPad: -->
  30 + <!-- Size should be 72 x 72 pixels -->
  31 + <%= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
16 32
17 - <%= javascript_include_tag "application", "data-turbolinks-track" => true %> 33 + <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
  34 + <!-- Size should be 57 x 57 pixels -->
  35 + <%= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
  36 +
  37 + <!-- For all other devices -->
  38 + <!-- Size should be 32 x 32 pixels -->
  39 + <%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>
  40 +
  41 + <%= javascript_include_tag "application" %>
18 42
19 <%= csrf_meta_tags %> 43 <%= csrf_meta_tags %>
20 </head> 44 </head>
21 -  
22 <body> 45 <body>
23 - <p class="notice"><%= notice %></p>  
24 - <p class="alert"><%= alert %></p>  
25 46
  47 + <div class="navbar navbar-fluid-top">
  48 + <div class="navbar-inner">
  49 + <div class="container-fluid">
  50 + <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
  51 + <span class="icon-bar"></span>
  52 + <span class="icon-bar"></span>
  53 + <span class="icon-bar"></span>
  54 + </a>
  55 + <%= link_to image_tag('logo.png'), root_path, class: 'brand' %></a>
  56 + <div class="container-fluid nav-collapse">
  57 + <ul class="nav">
  58 + <li><%= link_to 'Home', root_path %></li>
  59 + <li><%= link_to 'Project', projects_path %></li>
  60 + </ul>
  61 + <ul class="nav" style="float: right;">
  62 + <% if user_signed_in? %>
  63 + <li><%= link_to 'Edit Account', edit_user_registration_path %></li>
  64 + <li><%= link_to 'Logout', destroy_user_session_path, :method => :delete %></li>
  65 + <% else %>
  66 + <li><%= link_to 'Login', new_user_session_path %></li>
  67 + <li><%= link_to 'Sign Up', new_user_registration_path %></li>
  68 + <% end %>
  69 + </ul>
  70 + </div><!--/.nav-collapse -->
  71 + </div>
  72 + </div>
  73 + </div>
  74 +
  75 + <div class="container-fluid">
  76 + <div class="row-fluid">
  77 + <div class="span3">
  78 + <div class="well sidebar-nav">
  79 + <ul class="nav nav-list">
  80 + <% if user_signed_in? %>
  81 + <li class="nav-header">User info</li>
  82 + <li>Hello, <strong><%= current_user.name %></strong></li>
  83 + <% end %>
  84 + <% if content_for?(:sidebar) %>
  85 + <%= yield :sidebar %>
  86 + <% else %>
  87 + <%= render 'shared/short_about' %>
  88 + <% end %>
  89 + </ul>
  90 + </div><!--/.well -->
  91 + </div><!--/span-->
  92 + <div class="span9">
  93 + <%= bootstrap_flash %>
  94 + <%= yield %>
  95 + </div>
  96 + </div><!--/row-->
  97 +
  98 + <footer>
  99 + <div class="footer-left">&copy; <%= link_to "The Mezuro Team", "humans.txt" %> 2013</div>
  100 + <div class="footer-right"><%= link_to(image_tag('agplv3-88x31.png'), 'http://www.gnu.org/licenses/agpl-3.0-standalone.html') %> <%= link_to "Fork me", "https://github.com/mezuro/mezuro-standalone" %></div>
  101 + </footer>
26 102
27 - <%= yield %> 103 + </div> <!-- /container -->
28 104
29 </body> 105 </body>
30 </html> 106 </html>
app/views/projects/_form.html.erb
1 -<%= form_for(@project) do |f| %> 1 +<%= form_for(@project, :html => { role: 'form' }) do |f| %>
2 <%= render :partial => 'shared/form_errors', :locals => {:object => @project} %> 2 <%= render :partial => 'shared/form_errors', :locals => {:object => @project} %>
3 3
4 - <div class="field"> 4 + <div class="form-group">
5 <%= f.label :name %><br> 5 <%= f.label :name %><br>
6 - <%= f.text_field :name %> 6 + <%= f.text_field :name, class: 'form-control' %>
7 </div> 7 </div>
8 8
9 - <div class="field"> 9 + <div class="form-group">
10 <%= f.label :description %><br> 10 <%= f.label :description %><br>
11 - <%= f.text_area :description %> 11 + <%= f.text_area :description, class: 'form-control' %>
12 </div> 12 </div>
13 13
14 - <div class="actions">  
15 - <%= f.submit %>  
16 - </div> 14 + <%= f.submit 'Save', class: 'btn btn-default' %>
17 <% end %> 15 <% end %>
app/views/projects/index.html.erb
1 <h1>Listing Projects</h1> 1 <h1>Listing Projects</h1>
2 2
3 -<table> 3 +<p><%= link_to 'New Project', new_project_path, class: 'btn btn-primary' %></p>
  4 +
  5 +<table class="table table-hover">
4 <thead> 6 <thead>
5 <tr> 7 <tr>
6 <th>Name</th> 8 <th>Name</th>
@@ -14,15 +16,13 @@ @@ -14,15 +16,13 @@
14 <tr> 16 <tr>
15 <td><%= project.name %></td> 17 <td><%= project.name %></td>
16 <td><%= project.description %></td> 18 <td><%= project.description %></td>
17 - <td><%= link_to 'Show', project_path(project.id) %></td>  
18 - <% if project_owner? project.id %>  
19 - <td><%= link_to 'Edit', edit_project_path(project.id) %></td>  
20 - <% end %> 19 + <td><%= link_to 'Show', project_path(project.id), class: 'btn btn-info' %></td>
  20 + <td>
  21 + <% if project_owner? project.id %>
  22 + <%= link_to 'Edit', edit_project_path(project.id), class: 'btn btn-info' %>
  23 + <% end %>
  24 + </td>
21 </tr> 25 </tr>
22 <% end %> 26 <% end %>
23 </tbody> 27 </tbody>
24 </table> 28 </table>
25 -  
26 -<br>  
27 -  
28 -<%= link_to 'New Project', new_project_path %>  
app/views/projects/new.html.erb
1 <h1>New Project</h1> 1 <h1>New Project</h1>
2 2
3 <%= render 'form' %> 3 <%= render 'form' %>
4 -  
5 -<%= link_to 'Back', root_path %>  
app/views/projects/show.html.erb
@@ -10,8 +10,6 @@ @@ -10,8 +10,6 @@
10 10
11 <p> 11 <p>
12 <% if project_owner? @project.id %> 12 <% if project_owner? @project.id %>
13 - <%= link_to 'Destroy', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure?' } %> 13 + <%= link_to 'Destroy', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>
14 <% end %> 14 <% end %>
15 </p> 15 </p>
16 -  
17 -<%= link_to 'Back', projects_path %>  
app/views/shared/_short_about.html.erb 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +<li class="nav-header">About Mezuro</li>
  2 +<li>
  3 +<small>Mezuro is the front-end for the <%= link_to 'Kalibro Project', 'https://github.com/mezuro/kalibro' %>. It is intended to be a service where you can evaluate your code quality and, if you want, define wich set of metrics you want to use.</small>
  4 +</li>
0 \ No newline at end of file 5 \ No newline at end of file
config/locales/en.bootstrap.yml 0 → 100644
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
  1 +# Sample localization file for English. Add more files in this directory for other locales.
  2 +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
  3 +
  4 +en:
  5 + helpers:
  6 + actions: "Actions"
  7 + links:
  8 + back: "Back"
  9 + cancel: "Cancel"
  10 + confirm: "Are you sure?"
  11 + destroy: "Delete"
  12 + new: "New"
  13 + edit: "Edit"
  14 + titles:
  15 + edit: "Edit %{model}"
  16 + save: "Save %{model}"
  17 + new: "New %{model}"
  18 + delete: "Delete %{model}"
features/homepage.feature
@@ -7,8 +7,8 @@ Feature: Homepage @@ -7,8 +7,8 @@ Feature: Homepage
7 Given I am at the homepage 7 Given I am at the homepage
8 Then I should see Login 8 Then I should see Login
9 And I should see Sign Up 9 And I should see Sign Up
10 - And I should see Latest Projects  
11 - And I should see All Projects 10 + And I should see Latest projects
  11 + And I should see Project
12 12
13 Scenario: Signed in 13 Scenario: Signed in
14 Given I am a regular user 14 Given I am a regular user
@@ -16,5 +16,5 @@ Feature: Homepage @@ -16,5 +16,5 @@ Feature: Homepage
16 And I am at the homepage 16 And I am at the homepage
17 Then I should see Edit 17 Then I should see Edit
18 And I should see Logout 18 And I should see Logout
19 - And I should see Latest Projects  
20 - And I should see All Projects  
21 \ No newline at end of file 19 \ No newline at end of file
  20 + And I should see Latest projects
  21 + And I should see Project
22 \ No newline at end of file 22 \ No newline at end of file
features/project/create.feature
@@ -17,7 +17,7 @@ Feature: Project Creation @@ -17,7 +17,7 @@ Feature: Project Creation
17 And I am at the New Project page 17 And I am at the New Project page
18 And I fill the Name field with "Kalibro" 18 And I fill the Name field with "Kalibro"
19 And I fill the Description field with "Web Service to collect metrics" 19 And I fill the Description field with "Web Service to collect metrics"
20 - When I press the Create Project button 20 + When I press the Save button
21 Then I should see Kalibro 21 Then I should see Kalibro
22 And I should see Web Service to collect metrics 22 And I should see Web Service to collect metrics
23 23
@@ -29,7 +29,7 @@ Feature: Project Creation @@ -29,7 +29,7 @@ Feature: Project Creation
29 And I am at the New Project page 29 And I am at the New Project page
30 And I fill the Name field with "Kalibro" 30 And I fill the Name field with "Kalibro"
31 And I fill the Description field with "Web Service to collect metrics" 31 And I fill the Description field with "Web Service to collect metrics"
32 - When I press the Create Project button 32 + When I press the Save button
33 Then I should see There's already 33 Then I should see There's already
34 34
35 @kalibro_restart 35 @kalibro_restart
@@ -39,5 +39,5 @@ Feature: Project Creation @@ -39,5 +39,5 @@ Feature: Project Creation
39 And I am at the New Project page 39 And I am at the New Project page
40 And I fill the Name field with " " 40 And I fill the Name field with " "
41 And I fill the Description field with "Web Service to collect metrics" 41 And I fill the Description field with "Web Service to collect metrics"
42 - When I press the Create Project button 42 + When I press the Save button
43 Then I should see Name can't be blank 43 Then I should see Name can't be blank
44 \ No newline at end of file 44 \ No newline at end of file
features/project/edition.feature
@@ -18,8 +18,8 @@ Feature: Project @@ -18,8 +18,8 @@ Feature: Project
18 And I am signed in 18 And I am signed in
19 And I have a sample project 19 And I have a sample project
20 And I am at the All Projects page 20 And I am at the All Projects page
21 - Then I should not see Edit  
22 - 21 + Then I should not see "Edit" within "table tr td"
  22 +
23 @kalibro_restart 23 @kalibro_restart
24 Scenario: Should not render the edit page if the project doesn't belongs to the current user 24 Scenario: Should not render the edit page if the project doesn't belongs to the current user
25 Given I am a regular user 25 Given I am a regular user
@@ -47,7 +47,7 @@ Feature: Project @@ -47,7 +47,7 @@ Feature: Project
47 And I am at the sample project edit page 47 And I am at the sample project edit page
48 And I fill the Name field with "Kalibro" 48 And I fill the Name field with "Kalibro"
49 And I fill the Description field with "Web Service to collect metrics" 49 And I fill the Description field with "Web Service to collect metrics"
50 - When I press the Update button 50 + When I press the Save button
51 Then I should see Kalibro 51 Then I should see Kalibro
52 And I should see Web Service to collect metrics 52 And I should see Web Service to collect metrics
53 53
@@ -59,7 +59,7 @@ Feature: Project @@ -59,7 +59,7 @@ Feature: Project
59 And I own a project named "Kalibro" 59 And I own a project named "Kalibro"
60 And I am at the sample project edit page 60 And I am at the sample project edit page
61 And I fill the Name field with "Qt-Calculator" 61 And I fill the Name field with "Qt-Calculator"
62 - When I press the Update button 62 + When I press the Save button
63 Then I should see There's already 63 Then I should see There's already
64 64
65 @kalibro_restart 65 @kalibro_restart
@@ -69,7 +69,7 @@ Feature: Project @@ -69,7 +69,7 @@ Feature: Project
69 And I own a sample project 69 And I own a sample project
70 And I am at the sample project edit page 70 And I am at the sample project edit page
71 And I fill the Description field with "Web Service to collect metrics" 71 And I fill the Description field with "Web Service to collect metrics"
72 - When I press the Update button 72 + When I press the Save button
73 And I should see Web Service to collect metrics 73 And I should see Web Service to collect metrics
74 74
75 @kalibro_restart 75 @kalibro_restart
@@ -79,5 +79,5 @@ Feature: Project @@ -79,5 +79,5 @@ Feature: Project
79 And I own a sample project 79 And I own a sample project
80 And I am at the sample project edit page 80 And I am at the sample project edit page
81 And I fill the Name field with " " 81 And I fill the Name field with " "
82 - When I press the Update button 82 + When I press the Save button
83 Then I should see Name can't be blank 83 Then I should see Name can't be blank
features/project/listing.feature
@@ -5,7 +5,7 @@ Feature: Project listing @@ -5,7 +5,7 @@ Feature: Project listing
5 5
6 Scenario: Listing projects 6 Scenario: Listing projects
7 Given I am at the homepage 7 Given I am at the homepage
8 - When I click the All Projects link 8 + When I click the Project link
9 Then I should see Listing Projects 9 Then I should see Listing Projects
10 And I should see Name 10 And I should see Name
11 And I should see Description 11 And I should see Description
@@ -27,14 +27,4 @@ Feature: Project listing @@ -27,14 +27,4 @@ Feature: Project listing
27 When I click the Show link 27 When I click the Show link
28 Then I should see Name 28 Then I should see Name
29 And I should see Description 29 And I should see Description
30 - And I should see Back  
31 - And the sample project should be there  
32 -  
33 - @wip @kalibro_restart  
34 - Scenario: Should go back to the All Projects page from show project view  
35 - Given I am a regular user  
36 - And I am signed in  
37 - And I have a sample project  
38 - And I am at the Sample Project page  
39 - When I click the Back link  
40 - Then I should be in the All Projects page  
41 \ No newline at end of file 30 \ No newline at end of file
  31 + And the sample project should be there
42 \ No newline at end of file 32 \ No newline at end of file
features/step_definitions/project_steps.rb
@@ -42,6 +42,10 @@ Then(/^I should not see (.+)$/) do |text| @@ -42,6 +42,10 @@ Then(/^I should not see (.+)$/) do |text|
42 page.should_not have_content(text) 42 page.should_not have_content(text)
43 end 43 end
44 44
  45 +Then(/^I should not see "(.+)"" within "(.+)"$/) do |text, selector|
  46 + page.find(selector).should_not have_content(text)
  47 +end
  48 +
45 Then(/^the sample project should be there$/) do 49 Then(/^the sample project should be there$/) do
46 page.should have_content(@project.name) 50 page.should have_content(@project.name)
47 page.should have_content(@project.description) 51 page.should have_content(@project.description)