Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdonthemic committed Oct 19, 2011
0 parents commit 0c02f20
Show file tree
Hide file tree
Showing 145 changed files with 3,274 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.bundle
db/*.sqlite3
log/*.log
tmp/
.sass-cache/
.DS_Store
45 changes: 45 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
source 'http://rubygems.org'

gem 'rails', '3.1.0'

gem 'sqlite3'
gem 'compass', git: 'git://github.com/chriseppstein/compass.git'

gem 'databasedotcom'

group :development, :test do
gem 'rspec-rails', '~> 2.6'
gem 'annotate', '2.4.0'
gem 'guard'
gem 'guard-bundler'
gem 'guard-rspec'
gem 'growl'
gem 'rb-fsevent'
end

group :test do
# Pretty printed test output
gem 'turn', :require => false
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end

gem 'jquery-rails'
gem 'httparty'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

gem 'omniauth'
239 changes: 239 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
GIT
remote: git://github.com/chriseppstein/compass.git
revision: ebb2e42acc8a49cd77a712e955cb349fe07f89ee
specs:
compass (0.12.alpha.0.ebb2e42)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)

GEM
remote: http://rubygems.org/
specs:
XMLCanonicalizer (1.0.1)
log4r (>= 1.0.4)
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
addressable (2.2.6)
annotate (2.4.0)
ansi (1.3.0)
arel (2.2.1)
bcrypt-ruby (3.0.1)
builder (3.0.0)
chunky_png (1.2.5)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.2)
databasedotcom (1.1.4)
json
multipart-post (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
multi_json (~> 1.0)
faraday (0.7.5)
addressable (~> 2.2.6)
multipart-post (~> 1.1.3)
rack (>= 1.1.0, < 2)
fssm (0.2.7)
growl (1.0.3)
guard (0.8.4)
thor (~> 0.14.6)
guard-bundler (0.1.3)
bundler (>= 1.0.0)
guard (>= 0.2.2)
guard-rspec (0.5.0)
guard (>= 0.8.4)
hike (1.2.1)
httparty (0.8.1)
multi_json
multi_xml
i18n (0.6.0)
jquery-rails (1.0.14)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
log4r (1.1.9)
macaddr (1.4.0)
systemu (~> 2.2.0)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
multi_xml (0.4.1)
multipart-post (1.1.3)
net-ldap (0.2.2)
nokogiri (1.5.0)
oa-basic (0.3.0)
oa-core (= 0.3.0)
rest-client (~> 1.6.0)
oa-core (0.3.0)
oa-enterprise (0.3.0)
XMLCanonicalizer (~> 1.0.1)
addressable (~> 2.2.6)
net-ldap (~> 0.2.2)
nokogiri (~> 1.5.0)
oa-core (= 0.3.0)
pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1)
uuid
oa-more (0.3.0)
multi_json (~> 1.0.0)
oa-core (= 0.3.0)
rest-client (~> 1.6.0)
oa-oauth (0.3.0)
faraday (~> 0.7.3)
multi_json (~> 1.0.0)
multi_xml (~> 0.4.0)
oa-core (= 0.3.0)
oauth (~> 0.4.0)
oauth2 (~> 0.5.0)
oa-openid (0.3.0)
oa-core (= 0.3.0)
rack-openid (~> 1.3.1)
ruby-openid-apps-discovery (~> 1.2.0)
oauth (0.4.5)
oauth2 (0.5.1)
faraday (~> 0.7.4)
multi_json (~> 1.0.3)
omniauth (0.3.0)
oa-basic (= 0.3.0)
oa-core (= 0.3.0)
oa-enterprise (= 0.3.0)
oa-more (= 0.3.0)
oa-oauth (= 0.3.0)
oa-openid (= 0.3.0)
polyglot (0.3.2)
pyu-ruby-sasl (0.0.3.3)
rack (1.3.4)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2)
rb-fsevent (0.4.3.1)
rdoc (3.10)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
rubyntlm (0.1.1)
sass (3.1.10)
sass-rails (3.1.4)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
sprockets (2.0.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
sqlite3 (1.3.4)
systemu (2.2.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.8.3)
ansi
tzinfo (0.3.30)
uglifier (1.0.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
uuid (2.3.4)
macaddr (~> 1.0)

PLATFORMS
ruby

DEPENDENCIES
annotate (= 2.4.0)
coffee-rails (~> 3.1.0)
compass!
databasedotcom
growl
guard
guard-bundler
guard-rspec
httparty
jquery-rails
omniauth
rails (= 3.1.0)
rb-fsevent
rspec-rails (~> 2.6)
sass-rails (~> 3.1.0)
sqlite3
turn
uglifier
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# CloudSpokes (on Rails!)

This application is not a pixel-for-pixel or same-HTML remake of
Cloudspokes. This was an intentional decision as it has been built with
the same look and feel but using semantic HTML5 as well as Sprockets,
SASS, and CSS3.

The application is on a clean skeleton and is set up for RSpec testing.
To run the application, you can simply run `rails server`. It is also
complete with a Gemfile, Guardfile for test automation, and more.

Basically this is a shell application that gives you everything you need
to get up and running. It should deploy to Heroku great as-is.

## Pages

The pages that are available are:

1. Home Page (dynamic content excluded)
2. About Page ("how it works" link)
3. FAQs
4. Privacy Policy
5. Terms of Service

The required omniauth strategies have been added in config/initializers/omniauth.rb
with the required consumer keys and consumer secrets from various OAuth providers.
Change these values during deployment. Also there is a hard coded value of
'OmniAuth.config.full_host' to a 'https' url of the app. This is to force the
callback generated by omniauth to have a 'https' (required for Salesforce).

Our OAuth module is at lib/auth.rb. It consumes the omniauth hash and generates
a uniform hash for all providers with necessary values in a instance variable
'authhash' which can be used by other modules/classes.

The rails app has single controller: SessionController which has endpoints for
/auth/<provider>/callback and passes on the omniauth hash and provider to our
'lib/auth' module.

The current homepage with links to various providers is a simple static file:
'public/index.html'.

May want to look into implementing the session store with Redis: https://github.com/mattmatt/redis-session-store

Deployment Notes:
- need to change the OAuth settings in congig/initializers/omniauth.rb
- need to change the config/databasedotcom.yml if deploying for production sfdc org
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

CloudSpokes::Application.load_tasks
9 changes: 9 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
3 changes: 3 additions & 0 deletions app/assets/javascripts/challenges.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://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/javascripts/content.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://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/javascripts/sessions.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://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/javascripts/test.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://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/javascripts/users.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://jashkenas.github.com/coffee-script/
Loading

0 comments on commit 0c02f20

Please sign in to comment.