Skip to content

Commit

Permalink
Finalised the updated to Rails 4.1.0 - with new Devise and other conf…
Browse files Browse the repository at this point in the history
…ig changes
  • Loading branch information
xntrik committed Jun 20, 2014
1 parent 89b6ba4 commit 1f37a92
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 118 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source 'https://rubygems.org'

gem 'rails', '4.1.0'
gem 'protected_attributes'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand All @@ -15,9 +16,8 @@ gem 'devise'
# Gems used only for assets and not required
# in production environments by default.
# group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'

gem 'sass-rails', '~> 4.0.3'
gem 'coffee-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby

Expand Down
221 changes: 117 additions & 104 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,151 +1,164 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
actionmailer (4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
mail (~> 2.5.4)
actionpack (4.1.0)
actionview (= 4.1.0)
activesupport (= 4.1.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
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)
asset_sync (0.5.4)
activemodel (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
activerecord (4.1.0)
activemodel (= 4.1.0)
activesupport (= 4.1.0)
arel (~> 5.0.0)
activesupport (4.1.0)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
asset_sync (1.0.0)
activemodel
fog
bcrypt-ruby (3.0.1)
builder (3.0.4)
coffee-rails (3.2.2)
fog (>= 1.8.0)
bcrypt (3.1.7)
builder (3.2.2)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
coffee-script-source (1.7.0)
daemons (1.1.9)
devise (2.2.2)
bcrypt-ruby (~> 3.0)
devise (3.2.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0)
eventmachine (1.0.0)
excon (0.16.10)
execjs (1.4.0)
multi_json (~> 1.0)
fog (1.9.0)
eventmachine (1.0.3)
excon (0.37.0)
execjs (2.2.0)
fog (1.22.1)
fog-brightbox
fog-core (~> 1.22)
fog-json
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
fog-brightbox (0.0.2)
fog-core
fog-json
fog-core (1.22.0)
builder
excon (~> 0.14)
formatador (~> 0.2.0)
excon (~> 0.33)
formatador (~> 0.2)
mime-types
multi_json (~> 1.0)
net-scp (~> 1.0.4)
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.4)
fog-json (1.0.0)
multi_json (~> 1.0)
formatador (0.2.5)
hike (1.2.3)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0)
i18n (0.6.9)
ipaddress (0.8.0)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.23)
multi_json (1.7.7)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.6.3)
nokogiri (1.5.6)
orm_adapter (0.4.0)
pg (0.14.1)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (5.3.5)
multi_json (1.10.1)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
orm_adapter (0.5.0)
pg (0.17.1)
polyglot (0.3.5)
protected_attributes (1.0.8)
activemodel (>= 4.0.1, < 5.0)
rack (1.5.2)
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)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rails (4.1.0)
actionmailer (= 4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
activemodel (= 4.1.0)
activerecord (= 4.1.0)
activesupport (= 4.1.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0)
sprockets-rails (~> 2.0)
railties (4.1.0)
actionpack (= 4.1.0)
activesupport (= 4.1.0)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
ruby-hmac (0.4.0)
sass (3.2.5)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
thin (1.5.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.18.1)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.14)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (1.3.0)
tzinfo (1.2.1)
thread_safe (~> 0.1)
uglifier (2.5.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
warden (1.2.1)
json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)

PLATFORMS
ruby

DEPENDENCIES
asset_sync
coffee-rails (~> 3.2.1)
coffee-rails
devise
jquery-rails
pg
rails (= 3.2.13)
sass-rails (~> 3.2.3)
protected_attributes
rails (= 4.1.0)
sass-rails (~> 4.0.3)
sqlite3
thin
uglifier (>= 1.0.3)
6 changes: 3 additions & 3 deletions app/controllers/jsonuser_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ def create
respond_to do |format|
format.html { super }
format.json {
build_resource
build_resource(devise_parameter_sanitizer.sanitize(:sign_up))

if resource.save
if resource.active_for_authentication?
sign_in(resource_name,resource)
sign_up(resource_name,resource)
render :status => 200, :json => { :error => "Success", :message => "Logged in" }
else
expire_session_data_after_sign_in!
expire_data_after_sign_in!
render :status => 200, :json => { :error => "Success", :message => "Not logged in" }
end
else
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/mailer/confirmation_instructions.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p>Welcome <%= @resource.email %>!</p>
<p>Welcome <%= @email %>!</p>

<p>You can confirm your account email through the link below:</p>

<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
4 changes: 2 additions & 2 deletions app/views/devise/mailer/reset_password_instructions.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p>Hello <%= @resource.email %>!</p>

<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>

<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>

<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
4 changes: 2 additions & 2 deletions app/views/devise/mailer/unlock_instructions.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p>Hello <%= @resource.email %>!</p>

<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>

<p>Click the link below to unlock your account:</p>

<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
4 changes: 3 additions & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# 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
# config.active_record.auto_explain_threshold_in_seconds = 0.5

# Do not compress assets
config.assets.compress = false
Expand All @@ -42,4 +42,6 @@
:port => "25",
:domain => "ast-ssa.com"
}

config.eager_load = false
end
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@

# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr

config.eager_load = false
end
2 changes: 2 additions & 0 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# Automatically apply schema changes in tableless databases
#config.apply_schema = false

config.secret_key = '958739a56119676a03ae87335d36a2401ff7e98a7dc9a9985e1f7317f8bbad13f066a3dbfc8bd12434ee03e973528e7068fd8d2f8c80ae0fb9858c0b17152b7e'

# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
get '/confirm' => 'devise/confirmations#show'

get '/pwd' => 'userupdate#edit', :as => :edit_pwd
put '/pwd' => 'userupdate#update_pwd', :as => :update_pwd
patch '/pwd' => 'userupdate#update_pwd', :as => :update_pwd
end

get '/assessments' => 'assessments#fetch', :as => :fetch_assessments
Expand Down

0 comments on commit 1f37a92

Please sign in to comment.