Skip to content

Commit

Permalink
overhaul
Browse files Browse the repository at this point in the history
* Rails 4
* Puma
* Codestyle
* Keep secret token outside the VCS
  • Loading branch information
jhass committed Jul 4, 2013
1 parent 6a1e1b0 commit caed362
Show file tree
Hide file tree
Showing 30 changed files with 1,478 additions and 1,632 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SECRET_TOKEN=042be13d1ba39c41697d4d0904f9eceda32eaa381185af25aad9d26a7047171b0f5b46901aa1f851de20e7faf038c6d0d76b896e5af40326287ea224c9c19b9f
23 changes: 10 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
source 'https://rubygems.org'

gem 'rails', '3.2.13'
gem 'mysql2'

gem 'devise'
gem 'rails', '4.0.0'

gem 'rails_admin'
gem 'puma'

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'mysql2'

gem 'turbolinks'
gem 'devise', '~> 3.0.0.rc'
gem 'rails_admin'

gem 'jquery-rails'
gem 'bootstrap-sass'
end
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'

group :development, :test do
gem 'rspec-rails', '~> 2.13.2'
Expand Down
167 changes: 83 additions & 84 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,61 +1,59 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
actionmailer (4.0.0)
actionpack (= 4.0.0)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
actionpack (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
arel (3.0.2)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
activerecord (4.0.0)
activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.0)
atomic (1.1.10)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.3.1.3)
bootstrap-sass (2.3.2.0)
sass (~> 3.2)
builder (3.0.4)
builder (3.1.4)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coffee-rails (3.2.2)
coffee-rails (4.0.0)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
railties (>= 4.0.0.beta, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.2)
devise (2.2.4)
coffee-script-source (1.6.3)
devise (3.0.0.rc)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
railties (>= 3.2.6, < 5)
warden (~> 1.2.1)
diff-lcs (1.2.4)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
font-awesome-rails (3.1.1.3)
font-awesome-rails (3.2.1.1)
railties (>= 3.2, < 5.0)
fuubar (1.1.1)
rspec (~> 2.0)
Expand All @@ -64,71 +62,66 @@ GEM
haml (4.0.3)
tilt
hike (1.2.3)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (3.0.1)
i18n (0.6.4)
jquery-rails (3.0.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (3.0.1)
jquery-ui-rails (4.0.3)
jquery-rails
railties (>= 3.1.0)
json (1.8.0)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.23)
multi_json (1.7.6)
mini_portile (0.5.0)
minitest (4.7.5)
multi_json (1.7.7)
mysql2 (0.3.11)
nested_form (0.3.2)
nokogiri (1.5.10)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
orm_adapter (0.4.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
puma (2.2.2)
rack (>= 1.1, < 2.0)
rack (1.5.2)
rack-pjax (0.7.0)
nokogiri (~> 1.5)
rack (~> 1.3)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
rails_admin (0.4.9)
bootstrap-sass (~> 2.2)
builder (~> 3.0)
coffee-rails (>= 3.1, < 5)
rails (4.0.0)
actionmailer (= 4.0.0)
actionpack (= 4.0.0)
activerecord (= 4.0.0)
activesupport (= 4.0.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.0)
sprockets-rails (~> 2.0.0)
rails_admin (0.5.0)
bootstrap-sass (~> 2.3)
builder (~> 3.1)
coffee-rails (~> 4.0)
font-awesome-rails (~> 3.0)
haml (~> 4.0)
jquery-rails (>= 2.1, < 4)
jquery-ui-rails (~> 3.0)
jquery-rails (~> 3.0)
jquery-ui-rails (~> 4.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.6)
rails (~> 3.1)
rack-pjax (~> 0.7)
rails (~> 4.0.0)
remotipart (~> 1.0)
safe_yaml (~> 0.6)
sass-rails (~> 3.1)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
safe_yaml (~> 0.9)
sass-rails (~> 4.0)
railties (4.0.0)
actionpack (= 4.0.0)
activesupport (= 4.0.0)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.4)
rdoc (3.12.2)
json (~> 1.4)
thor (>= 0.18.1, < 2.0)
rake (10.1.0)
remotipart (1.0.5)
rspec (2.13.0)
rspec-core (~> 2.13.0)
Expand All @@ -146,19 +139,25 @@ GEM
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
ruby-progressbar (1.1.0)
ruby-progressbar (1.1.1)
safe_yaml (0.9.3)
sass (3.2.9)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass-rails (4.0.0)
railties (>= 4.0.0.beta, < 5.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
sprockets-rails (~> 2.0.0)
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
thor (0.18.1)
thread_safe (0.1.0)
atomic
tilt (1.4.1)
treetop (1.4.14)
polyglot
Expand All @@ -178,17 +177,17 @@ PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass
capybara (~> 2.1.0)
coffee-rails (~> 3.2.1)
devise
coffee-rails (~> 4.0.0)
devise (~> 3.0.0.rc)
fuubar (~> 1.1.1)
jquery-rails
mysql2
rails (= 3.2.13)
puma
rails (= 4.0.0)
rails_admin
rspec-instafail (~> 0.2.4)
rspec-rails (~> 2.13.2)
sass-rails (~> 3.2.3)
sass-rails (~> 4.0.0)
turbolinks
uglifier (>= 1.0.3)
uglifier (>= 1.3.0)
Binary file added app/assets/images/80x15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require bootstrap
*= require_tree .
*/

@import "bootstrap.css";
@import "bootstrap-responsive";
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,4 @@ section {
color: #666; }
#CC-licence a {
font-size: 10px;
color: #666; }
color: #666; }
19 changes: 19 additions & 0 deletions app/controllers/blog_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
class BlogController < ApplicationController
respond_to :html

def show
end

def index
end

def create
Blog.create person_params
end

def update
blog = Blog.find params[:id]
blog.update_attributes! person_params
redirect_to blog
end

private

def blog_params
params.require(:blog).permit :title, :published, :content
end
end
9 changes: 0 additions & 9 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
class PagesController < ApplicationController
respond_to :html

def index
end

def about
end

def get_involved
end
end
8 changes: 4 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module ApplicationHelper
def page_title(title, suffix = t(:title))
if title.blank? or title =~ /home/i
return suffix
def page_title title, suffix = t(:title)
if title.blank? || title =~ /home/i
suffix
else
return "#{title} - #{suffix}"
"#{title} - #{suffix}"
end
end
end
2 changes: 0 additions & 2 deletions app/helpers/pages_helper.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/blogpost.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class Blogpost < ActiveRecord::Base
attr_accessible :title, :published, :content
end
2 changes: 0 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class User < ActiveRecord::Base
devise :database_authenticatable, :recoverable,
:rememberable, :trackable, :validatable

attr_accessible :email, :password, :password_confirmation, :remember_me
end
4 changes: 2 additions & 2 deletions app/views/blog/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%- content_for :page_title do %>
<%= t('pages.blog.menu_title') %>
<%= t 'pages.blog.menu_title' %>
<% end %>

<div class="page-header">
<h1><%= t('pages.blog.headline') %> <small><%= t('pages.blog.subline') %></small></h1>
<h1><%= t 'pages.blog.headline' %> <small><%= t 'pages.blog.subline' %></small></h1>
</div>

Ohai, blog!
Empty file added app/views/blog/show.html.erb
Empty file.
Loading

0 comments on commit caed362

Please sign in to comment.