diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index d214d7f..badea1c 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -7,6 +7,8 @@ Prezento is the web interface for Mezuro. * Remove Show button for hotspot metric configurations * Remove side menu * Refactor footer as a grid +* Add latest repositories list to the homepage +* Add latest configurations list to the homepage == v0.11.3 - 01/04/2016 diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index c44b798..3b0950c 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,5 +1,7 @@ class HomeController < ApplicationController def index @latest_projects = Project.latest(5) + @latest_repositories = Repository.latest(5) + @latest_configurations = KalibroConfiguration.latest(5) end end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index fb30372..222ec0b 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -20,10 +20,26 @@
-

<%= t('latest_projects') %>

+

<%= t('latest_repositories') %>

+ +
-

<%= t('latest_projects') %>

+

<%= t('latest_configurations') %>

+ +
diff --git a/config/locales/views/home/en.yml b/config/locales/views/home/en.yml index 151e485..4550cc8 100644 --- a/config/locales/views/home/en.yml +++ b/config/locales/views/home/en.yml @@ -3,3 +3,5 @@ en: body_home_index_html: "

This is Mezuro! A free/libre web platform for collaborative source code evaluation.

Here you can evaluate your source code with the most popular SCMs (like Git and SVN), just by providing its URL. For now, you can evaluate C, C++, Java, Ruby, Python and PHP source codes, but we are looking forward to supporting more languages in the future.

" body_feedback_home_index_html: "Mezuro is continuously under development. Try it and give us your %{href}." latest_projects: "Latest projects" + latest_repositories: "Latest repositories" + latest_configurations: "Latest configurations" diff --git a/config/locales/views/home/pt.yml b/config/locales/views/home/pt.yml index 7707d71..7f1285c 100644 --- a/config/locales/views/home/pt.yml +++ b/config/locales/views/home/pt.yml @@ -3,3 +3,5 @@ pt: body_home_index_html: "

Este é o Mezuro! Uma plataforma web livre para avaliação colaborativa de código fonte.

Aqui você pode avaliar seu código fonte com os SCMs mais populares (como Git e SVN), apenas fornecendo sua URL. Por enquanto, você pode avaliar códigos em C, C++, Java, Ruby, Python e PHP mas nós pretendemos dar suporte a mais linguagens no futuro.

" body_feedback_home_index_html: "Mezuro está sob constante desenvolvimento. Experimente e nos dê o seu %{href}." latest_projects: "Últimos projetos" + latest_repositories: "Últimos repositórios" + latest_configurations: "Últimas configurações" diff --git a/features/homepage.feature b/features/homepage.feature index e590921..3af6b28 100644 --- a/features/homepage.feature +++ b/features/homepage.feature @@ -4,20 +4,25 @@ Feature: Homepage I want to have in one page useful links to manage my account and session Scenario: Before signing in - Given I am at the homepage - Then I should see "Sign In" + Then I am at the homepage + And I should see "Home" + And I should see "Project" + And I should see "Repository" + And I should see "Configuration" + And I should see "Reading Group" + And I should see "Sign In" And I should see "Sign Up" + And I should see "Language" And I should see "Latest projects" - And I should see "Project" + And I should see "Latest repositories" + And I should see "Latest configurations" Scenario: Signed in Given I am a regular user And I am signed in And I am at the homepage - Then I should see "Edit" + Then I should see "Edit Account" And I should see "Sign Out" - And I should see "Latest projects" - And I should see "Project" And I should see "Your projects" Scenario: Language selection diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index 77a4ac3..0dbd3a3 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -5,6 +5,8 @@ describe HomeController, :type => :controller do context '#index' do before :each do Project.expects(:latest).with(5).returns([]) + Repository.expects(:latest).with(5).returns([]) + KalibroConfiguration.expects(:latest).with(5).returns([]) end describe 'Rendering' do -- libgit2 0.21.2