Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

upgrading to rails 3.2 and moving to fluid layout

  • Loading branch information...
commit 513fa02b14ce29e8e576f181ea74b69ede6850ae 1 parent d4a3115
@cairo140 authored
View
6 Gemfile
@@ -1,6 +1,6 @@
source 'http://rubygems.org'
-gem 'rails', '3.1.3'
+gem 'rails', '3.2.1'
gem 'passenger'
gem 'sqlite3'
@@ -10,8 +10,8 @@ gem 'mysql2'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
- gem 'sass-rails'
- gem 'coffee-rails'
+ gem 'sass-rails', '~> 3.2.3'
+ gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails'
end
View
141 Gemfile.lock
@@ -1,38 +1,37 @@
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.3)
- actionpack (= 3.1.3)
- mail (~> 2.3.0)
- actionpack (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
+ actionmailer (3.2.1)
+ actionpack (= 3.2.1)
+ mail (~> 2.4.0)
+ actionpack (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.5)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
rack-cache (~> 1.1)
- rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.0.3)
- activemodel (3.1.3)
- activesupport (= 3.1.3)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.1)
+ activesupport (= 3.2.1)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- arel (~> 2.2.1)
+ activerecord (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
+ arel (~> 3.0.0)
tzinfo (~> 0.3.29)
- activeresource (3.1.3)
- activemodel (= 3.1.3)
- activesupport (= 3.1.3)
- activesupport (3.1.3)
+ activeresource (3.2.1)
+ activemodel (= 3.2.1)
+ activesupport (= 3.2.1)
+ activesupport (3.2.1)
+ i18n (~> 0.6)
multi_json (~> 1.0)
airbrake (3.0.9)
activesupport
builder
- arel (2.2.1)
+ arel (3.0.0)
bcrypt-ruby (3.0.1)
builder (3.0.0)
cancan (1.6.7)
@@ -51,13 +50,13 @@ GEM
xpath (~> 0.1.4)
childprocess (0.2.3)
ffi (~> 1.0.6)
- coffee-rails (3.1.1)
+ coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
- railties (~> 3.1.0)
+ railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.1.3)
+ coffee-script-source (1.2.0)
commonjs (0.2.0)
therubyracer (~> 0.9.9)
daemon_controller (0.2.6)
@@ -67,7 +66,7 @@ GEM
warden (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
- execjs (1.2.12)
+ execjs (1.3.0)
multi_json (~> 1.0)
factory_girl (2.3.2)
activesupport
@@ -87,18 +86,19 @@ GEM
highline (1.6.8)
hike (1.2.1)
i18n (0.6.0)
- jquery-rails (1.0.19)
- railties (~> 3.0)
+ journey (1.0.1)
+ jquery-rails (2.0.0)
+ railties (>= 3.2.0.beta, < 5.0)
thor (~> 0.14)
- json (1.6.3)
- less (2.0.8)
+ json (1.6.5)
+ less (2.0.9)
commonjs (~> 0.2.0)
therubyracer (~> 0.9.9)
- less-rails (2.1.1)
- actionpack (~> 3.1.1)
+ less-rails (2.1.3)
+ actionpack (>= 3.1)
less (~> 2.0.7)
libv8 (3.3.10.4)
- mail (2.3.0)
+ mail (2.4.1)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
@@ -122,26 +122,24 @@ GEM
pg (0.12.0)
rake-compiler (~> 0.7)
polyglot (0.3.3)
- rack (1.3.5)
+ rack (1.4.1)
rack-cache (1.1)
rack (>= 0.4)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.1.3)
- actionmailer (= 3.1.3)
- actionpack (= 3.1.3)
- activerecord (= 3.1.3)
- activeresource (= 3.1.3)
- activesupport (= 3.1.3)
+ rails (3.2.1)
+ actionmailer (= 3.2.1)
+ actionpack (= 3.2.1)
+ activerecord (= 3.2.1)
+ activeresource (= 3.2.1)
+ activesupport (= 3.2.1)
bundler (~> 1.0)
- railties (= 3.1.3)
- railties (3.1.3)
- actionpack (= 3.1.3)
- activesupport (= 3.1.3)
+ railties (= 3.2.1)
+ railties (3.2.1)
+ actionpack (= 3.2.1)
+ activesupport (= 3.2.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -152,26 +150,25 @@ GEM
rdiscount (1.6.8)
rdoc (3.12)
json (~> 1.4)
- rspec (2.7.0)
- rspec-core (~> 2.7.0)
- rspec-expectations (~> 2.7.0)
- rspec-mocks (~> 2.7.0)
- rspec-core (2.7.1)
- rspec-expectations (2.7.0)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.7.0)
- rspec-rails (2.7.0)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- railties (~> 3.0)
- rspec (~> 2.7.0)
+ rspec-mocks (2.8.0)
+ rspec-rails (2.8.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.8.0)
rubyzip (0.9.5)
sass (3.1.12)
- sass-rails (3.1.5)
- actionpack (~> 3.1.0)
- railties (~> 3.1.0)
- sass (~> 3.1.10)
- tilt (~> 1.3.2)
+ sass-rails (3.2.4)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
selenium-webdriver (2.15.0)
childprocess (>= 0.2.1)
ffi (~> 1.0.9)
@@ -180,7 +177,7 @@ GEM
simple_form (1.5.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
- sprockets (2.0.3)
+ sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
@@ -192,12 +189,10 @@ GEM
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- twitter-bootstrap-rails (1.4.2)
- actionpack
- jquery-rails (~> 1.0)
- less
- less-rails (~> 2.1.0)
- railties
+ twitter-bootstrap-rails (2.0)
+ actionpack (>= 3.2.1)
+ less-rails (~> 2.1.2)
+ railties (>= 3.2.1)
tzinfo (0.3.31)
uglifier (1.1.0)
execjs (>= 0.3.0)
@@ -215,7 +210,7 @@ DEPENDENCIES
cancan
capistrano
capybara
- coffee-rails
+ coffee-rails (~> 3.2.1)
devise
factory_girl_rails
faker
@@ -224,10 +219,10 @@ DEPENDENCIES
mysql2
passenger
pg
- rails (= 3.1.3)
+ rails (= 3.2.1)
rdiscount
rspec-rails
- sass-rails
+ sass-rails (~> 3.2.3)
simple_form
sqlite3
twitter-bootstrap-rails
View
7 app/assets/stylesheets/application.css
@@ -2,9 +2,9 @@
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
- *= require_self
- *= require twitter/bootstrap
- *= require_tree .
+ *
+ *= require bootstrap
+ *= require_tree .
*/
section {
@@ -15,4 +15,5 @@ section {
position: absolute;
top: 0;
right: 0;
+ z-index: 101;
}
View
10 app/assets/stylesheets/logo.css.scss
@@ -1,10 +1,3 @@
-.logo-container {
- width: 280px;
- margin-right: 20px;
- display: inline-block;
- vertical-align: middle;
-}
-
h1#logo {
text-indent: -1000px;
font-family: 'Corbel', sans-serif;
@@ -14,8 +7,7 @@ h1#logo {
a {
text-decoration: none;
height: 32px;
- width: 222px;
- padding: 15px 0;
+ padding: 15px 10px;
background: image-url("logo.png") no-repeat 0 15px;
display: block;
.white {
View
30 app/assets/stylesheets/nav.css.scss
@@ -1,15 +1,19 @@
-nav {
- font-size: 18px;
- display: inline-block;
- width: 640px;
- vertical-align: middle;
- ul {
- margin: 0;
- list-style: outside none;
- li {
- display: inline-block;
- margin-right: 15px;
- font-weight: bold;
- }
+body {
+ padding-top: 90px;
+}
+
+.navbar {
+ &.navbar-fixed-top {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 100;
+ }
+ .fluid-sidebar {
+ margin-bottom: 0;
+ }
+ .nav > li > a {
+ line-height: 41px;
}
}
View
2  app/assets/stylesheets/themes.css.scss
@@ -44,7 +44,7 @@ fieldset legend {
color: #fff;
}
-.actions {
+.form-actions {
background-color: rgba(250, 250, 250, 0.06);
border-top-color: #444;
}
View
7 app/views/devise/passwords/new.html.haml
@@ -1,9 +1,10 @@
-.container
+.fluid-sidebar
%h2 Forgot your password?
+.fluid-content
= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f|
= f.error_notification
.inputs
= f.input :email, :required => true
- .actions
- = f.button :submit, "Send me reset password instructions"
+ .form-actions
+ = f.button :submit, "Send me reset password instructions", :class => 'btn large primary'
= render :partial => "devise/shared/links"
View
2  app/views/devise/registrations/_form.html.haml
@@ -4,5 +4,5 @@
.inputs
= f.input :email, :required => true, :autofocus => true
= f.input :password, :required => true
- .actions
+ .form-actions
= f.button :submit, "Create a new account", :class => 'btn large primary'
View
4 app/views/devise/registrations/new.html.haml
@@ -1,3 +1,5 @@
-.container
+.fluid-sidebar
+ %h2 Sign up
+.fluid-content
= render :partial => 'form'
= render :partial => "devise/shared/links"
View
2  app/views/devise/sessions/_form.html.haml
@@ -4,5 +4,5 @@
= f.input :email, :required => false, :autofocus => true
= f.input :password, :required => false
= f.input :remember_me, :as => :boolean if devise_mapping.rememberable?
- .actions
+ .form-actions
= f.button :submit, "Login", :class => 'btn large primary'
View
9 app/views/devise/sessions/new.html.haml
@@ -1,3 +1,6 @@
-.container
- = render :partial => 'form'
- = render :partial => "devise/shared/links", :locals => {:resource_name => resource_name}
+.fluid-content
+ .fluid-sidebar
+ %h2 Sign in
+ .fluid-content
+ = render :partial => 'form'
+ = render :partial => "devise/shared/links", :locals => {:resource_name => resource_name}
View
62 app/views/home/index.html.haml
@@ -1,35 +1,33 @@
#home
- .container
- .row
- .span5
- %h1 Find friends. Play together.
+ .fluid-sidebar
+ %h1 Find friends. Play together.
+ :markdown
+ Welcome to _joinasquad.com_, a service built to help gamers find other gamers.
+ .fluid-content
+ %ul.tabs.nav
+ - if user_signed_in?
+ %li
+ %a(href="/getting-started" data-toggle="tab" data-target="#getting-started") Getting started
+ - else
+ %li(class="#{'active' if request.path == new_user_session_path || request.path == '/'}")
+ %a(href="/login" data-toggle="tab" data-target="#login") Login
+ %li(class="#{'active' if request.path == new_user_registration_path}")
+ %a(data-toggle="tab" data-target="#join"){:href => new_user_registration_path} Join
+ %li
+ %a(href="/about" data-toggle="tab" data-target="#about") About
+ .tab-content
+ - if user_signed_in?
+ #getting-started.tab-pane(name="getting-started")
+ :markdown
+ To get started, please fill in some basic profile information.
+ - else
+ #login.tab-pane(name="login" class="#{'active' if request.path == new_user_session_path || request.path == '/'}")
+ = render :partial => 'devise/sessions/form'
+ #join.tab-pane(name="join" class="#{'active' if request.path == new_user_registration_path}")
+ = render :partial => 'devise/registrations/form'
+ #about.tab-pane(name="about")
+ %h2 About us
:markdown
- Welcome to _joinasquad.com_, a service built to help gamers find other gamers.
- .span11
- %ul.tabs(data-tabs="tabs")
- - if user_signed_in?
- %li.active
- %a(href="#getting-started") Getting started
- - else
- %li{:class => ('active' if signed_in_before?)}
- %a(href="#login") Login
- %li{:class => ('active' if !signed_in_before?)}
- %a(href="#join") Join
- %li
- %a(href="#about") About
- .tab-content
- - if user_signed_in?
- #getting-started.tab-pane.active(name="getting-started")
- :markdown
- To get started, please fill in some basic profile information.
- - else
- #login.tab-pane{:class => ('active' if signed_in_before?)}(name="login")
- = render :partial => 'devise/sessions/form'
- #join.tab-pane{:class => ('active' if !signed_in_before?)}(name="join")
- = render :partial => 'devise/registrations/form'
- #about.tab-pane(name="about")
- %h2 About us
- :markdown
- I built _joinasquad.com_ because gaming is always better with a wingman or wingwoman.
+ I built _joinasquad.com_ because gaming is always better with a wingman or wingwoman.
- The premise of the site is simple. If you want to find someone to play a game with, mark it down on your profile and check out people with similar interests.
+ The premise of the site is simple. If you want to find someone to play a game with, mark it down on your profile and check out people with similar interests.
View
34 app/views/layouts/application.html.haml
@@ -8,23 +8,25 @@
%body
%a(href="http://github.com/cairo140/joinasquad.com")
%img(src="https://a248.e.akamai.net/assets.github.com/img/4c7dc970b89fd04b81c8e221ba88ff99a06c6b61/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" id="fork_me_on_github")
- %header.container
- .logo-container
- %h1#logo
- %a{:href => root_path}
- ! <span class="white">joinasquad</span><span class="yellow">.</span><span class="white">com</span>
- %nav
- %ul
- %li= link_to 'Home', root_path
- %li= link_to 'Games', games_path
- - if user_signed_in?
- %li= link_to('Profile', current_user)
- %li= link_to('Logout', destroy_user_session_path, :method => :delete)
+ %nav.navbar.navbar-fixed-top
+ .navbar-inner
+ .fluid-container.sidebar-left
+ .logo-container.fluid-sidebar
+ %h1#logo
+ %a{:href => root_path}
+ ! <span class="white">joinasquad</span><span class="yellow">.</span><span class="white">com</span>
+ %ul.nav.fluid-content
+ %li= link_to 'Home', root_path
+ %li= link_to 'Games', games_path
+ - if user_signed_in?
+ %li= link_to('Profile', current_user)
+ %li= link_to('Logout', destroy_user_session_path, :method => :delete)
%section#notifications
- .container
+ .fluid-container
- unless alert.nil?
- .alert-message.error= alert
+ .alert.alert-error= alert
- unless notice.nil?
- .alert-message.info= notice
+ .alert= notice
%section#content
- = yield
+ .fluid-container.sidebar-left
+ = yield
View
2  app/views/users/show.html.haml
@@ -1,4 +1,4 @@
-#user.container{'data-id' => @user.id, 'data-type' => User}
+#user.fluid-content{'data-id' => @user.id, 'data-type' => User}
- if can? :write, @user
= link_to 'Edit', [:edit, @user]
%h1= @user.email
View
7 config/environments/development.rb
@@ -27,4 +27,11 @@
# Expands the lines which load the assets
config.assets.debug = true
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
end
View
3  config/environments/test.rb
@@ -36,4 +36,7 @@
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
end
Please sign in to comment.
Something went wrong with that request. Please try again.