Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
PostgreSQL support + RSpec support
Browse files Browse the repository at this point in the history
  • Loading branch information
mamhoff committed Nov 28, 2013
1 parent d62af02 commit b7d06f2
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 28 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Solar Explorer Booking and Homepage App

... more information coming up.
28 changes: 0 additions & 28 deletions README.rdoc

This file was deleted.

3 changes: 3 additions & 0 deletions app/assets/javascripts/static_pages.js.coffee
Original file line number Diff line number Diff line change
@@ -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/static_pages.css.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the StaticPages controller here.
// They will automatically be included in application.css.
// You can use Less here: http://lesscss.org/
10 changes: 10 additions & 0 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class StaticPagesController < ApplicationController
def home
end

def imprint
end

def boat
end
end
2 changes: 2 additions & 0 deletions app/helpers/static_pages_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module StaticPagesHelper
end
2 changes: 2 additions & 0 deletions app/views/static_pages/boat.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>StaticPages#boat</h1>
<p>Find me in app/views/static_pages/boat.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/static_pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>StaticPages#home</h1>
<p>Find me in app/views/static_pages/home.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/static_pages/imprint.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>StaticPages#imprint</h1>
<p>Find me in app/views/static_pages/imprint.html.erb</p>
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
SolarExplorer::Application.routes.draw do
get "static_pages/home"
get "static_pages/imprint"
get "static_pages/boat"
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".

Expand Down
19 changes: 19 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 0) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

end
26 changes: 26 additions & 0 deletions spec/controllers/static_pages_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
require 'spec_helper'

describe StaticPagesController do

describe "GET 'home'" do
it "returns http success" do
get 'home'
response.should be_success
end
end

describe "GET 'imprint'" do
it "returns http success" do
get 'imprint'
response.should be_success
end
end

describe "GET 'boat'" do
it "returns http success" do
get 'boat'
response.should be_success
end
end

end
15 changes: 15 additions & 0 deletions spec/helpers/static_pages_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'spec_helper'

# Specs in this file have access to a helper object that includes
# the StaticPagesHelper. For example:
#
# describe StaticPagesHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe StaticPagesHelper do
pending "add some examples to (or delete) #{__FILE__}"
end
11 changes: 11 additions & 0 deletions spec/requests/static_pages_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require 'spec_helper'

describe "StaticPages" do
describe "GET /static_pages" do
it "works! (now write some real specs)" do
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
get static_pages_index_path
response.status.should be(200)
end
end
end
5 changes: 5 additions & 0 deletions spec/views/static_pages/boat.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe "static_pages/boat.html.erb" do
pending "add some examples to (or delete) #{__FILE__}"
end
5 changes: 5 additions & 0 deletions spec/views/static_pages/home.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe "static_pages/home.html.erb" do
pending "add some examples to (or delete) #{__FILE__}"
end
5 changes: 5 additions & 0 deletions spec/views/static_pages/imprint.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'spec_helper'

describe "static_pages/imprint.html.erb" do
pending "add some examples to (or delete) #{__FILE__}"
end

0 comments on commit b7d06f2

Please sign in to comment.