Skip to content

Commit

Permalink
Merge pull request #24 from jollygoodcode/patch/remove-temp-var-and-f…
Browse files Browse the repository at this point in the history
…alse-clear-cache

Patch/remove temp var and false clear cache
  • Loading branch information
JuanitoFatas committed Oct 9, 2015
2 parents 8ef5627 + 3684086 commit 0df7b2a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
14 changes: 5 additions & 9 deletions app/controllers/home_controller.rb
Expand Up @@ -5,15 +5,11 @@ class HomeController < ApplicationController
def index
@projects =
Rails.cache.fetch("home-index", expires_in: 24.hours) do
_projects =
[
Project.new(repo_name: "sinatra/sinatra", ci_type: :travis),
Project.new(repo_name: "jollygoodcode/twemoji", ci_type: :travis),
Project.new(repo_name: "winston/google_visualr", ci_type: :travis)
]
_projects.map! { |project| ProjectDecorator.new(project) }
_projects.each(&:process_with)
_projects
[
Project.new(repo_name: "sinatra/sinatra", ci_type: :travis),
Project.new(repo_name: "jollygoodcode/twemoji", ci_type: :travis),
Project.new(repo_name: "winston/google_visualr", ci_type: :travis)
].map! { |project| ProjectDecorator.new(project) }.each(&:process_with)
end
end

Expand Down
2 changes: 0 additions & 2 deletions spec/features/add_a_new_project_spec.rb
@@ -1,8 +1,6 @@
require "feature_helper"

RSpec.feature "Adds a New Project" do
background { Rails.cache.clear }

scenario "works" do
stub_ci_requests_for_home_page
user = create(:user, :with_oauth_account)
Expand Down
2 changes: 0 additions & 2 deletions spec/features/authentication_spec.rb
@@ -1,8 +1,6 @@
require "feature_helper"

RSpec.feature "Authentication" do
background { Rails.cache.clear }

scenario "sign in" do
stub_ci_requests_for_home_page
user = create(:user, :with_oauth_account)
Expand Down
2 changes: 0 additions & 2 deletions spec/features/presentation_spec.rb
@@ -1,8 +1,6 @@
require "feature_helper"

RSpec.feature "Presentation" do
background { Rails.cache.clear }

scenario "works" do
stub_ci_requests_for_home_page
user = create(:user, :with_oauth_account)
Expand Down

0 comments on commit 0df7b2a

Please sign in to comment.