Skip to content

Commit

Permalink
Setup pages controller with index page. Force SSL in production.
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek Sreenivasa committed Apr 1, 2015
1 parent cbe1bf5 commit eaecf36
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/pages.coffee
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/pages.scss
@@ -0,0 +1,3 @@
// Place all the styles related to the pages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
6 changes: 6 additions & 0 deletions app/controllers/pages_controller.rb
@@ -0,0 +1,6 @@
class PagesController < ApplicationController

def index
end

end
2 changes: 2 additions & 0 deletions app/helpers/pages_helper.rb
@@ -0,0 +1,2 @@
module PagesHelper
end
2 changes: 2 additions & 0 deletions app/views/pages/index.html.haml
@@ -0,0 +1,2 @@
%h1 Event Log File Browser
%p A Salesforce connected web app to access and download Event Log Files
2 changes: 1 addition & 1 deletion config/environments/production.rb
Expand Up @@ -42,7 +42,7 @@
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
config.force_ssl = true

# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Expand Up @@ -3,7 +3,7 @@
# See how all your routes lay out with "rake routes".

# You can have the root of your site routed with "root"
# root 'welcome#index'
root 'pages#index'

# Example of regular route:
# get 'products/:id' => 'catalog#view'
Expand Down
12 changes: 12 additions & 0 deletions spec/controllers/pages_controller_spec.rb
@@ -0,0 +1,12 @@
require 'rails_helper'

RSpec.describe PagesController, type: :controller do

describe "GET #index" do
it "returns http success" do
get :index
expect(response).to have_http_status(:success)
end
end

end
15 changes: 15 additions & 0 deletions spec/helpers/pages_helper_spec.rb
@@ -0,0 +1,15 @@
require 'rails_helper'

# Specs in this file have access to a helper object that includes
# the PagesHelper. For example:
#
# describe PagesHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe PagesHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end
5 changes: 5 additions & 0 deletions spec/views/pages/index.html.haml_spec.rb
@@ -0,0 +1,5 @@
require 'rails_helper'

RSpec.describe "pages/index.html.haml", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end

0 comments on commit eaecf36

Please sign in to comment.