Skip to content

Commit

Permalink
Migration to Rails 4.0 (based on ruby 2.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Mar 10, 2014
1 parent 73f28b5 commit 3260563
Show file tree
Hide file tree
Showing 18 changed files with 221 additions and 201 deletions.
51 changes: 37 additions & 14 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
source 'https://rubygems.org'

gem 'rails', '~> 3.2.1'
gem 'rails', '~> 4.0.3'
gem 'nokogiri'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# With compass
gem 'compass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
# gem 'coffee-rails', '~> 4.0.0'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'

gem 'gettext_i18n_rails', '>= 0.4.3'
gem 'fast_gettext', '>= 0.7.0'

Expand All @@ -18,32 +30,43 @@ group :development do
gem 'gettext', '>= 1.9.3', :require => false
end

gem 'mysql2'
# MySQL is not used, as far as I know
# gem 'mysql2'

gem 'delayed_job', '>3.0'
gem 'delayed_job_active_record'

gem 'xmlhash', '>= 1.2.2'

gem 'jquery-rails'
gem 'jquery-ui-rails'

gem 'memcache-client'
#gem 'memcache-client'
gem 'dalli'
gem 'sqlite3'
gem 'minitest', '< 5.0'
gem 'hoptoad_notifier', "~> 2.3"

group :assets do
gem 'sass-rails' # if running rails 3.1 or greater
gem 'compass-rails'
gem 'uglifier'
# install nodejs instead!
#gem 'therubyracer'
#gem 'actionpack-page_caching'
#gem 'actionpack-action_caching'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end

group :test do
gem 'capybara', '~>2.0.1'
gem 'capybara-webkit', '< 1.0'
# This doesn't work because capybara-webkit (~> 1.1.1) depends on
# capybara (< 2.2.0, >= 2.0.2) ruby
# gem 'capybara', '~>2.2.1'
# gem 'capybara-webkit', '~>1.1.1'
# This 'bundles' but does not work (incompatibility)
# gem 'capybara', '~>2.2.1'
# gem 'capybara-webkit', '< 1.0'
# And this (the only working solution) cannot by installed because capybara-webkit (~> 1.1.1)
# requires 'websocket (~> 1.0.4)' but rubygem-websocket-1_0_7 requires ruby(abi) = 2.0.0
# gem 'capybara', '~>2.0.3'
# gem 'capybara-webkit', '~>1.1.1'
gem 'capybara'
gem 'poltergeist'

gem 'webmock'
end

Expand Down
202 changes: 97 additions & 105 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,159 +1,151 @@
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.0.3)
actionpack (= 4.0.3)
mail (~> 2.5.4)
actionpack (4.0.3)
activesupport (= 4.0.3)
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)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
activerecord (4.0.3)
activemodel (= 4.0.3)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.3)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.3)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
arel (3.0.2)
builder (3.0.4)
capistrano (2.15.5)
arel (4.0.1)
atomic (1.1.14)
builder (3.1.4)
capistrano (2.14.2)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capybara (2.0.3)
capybara (2.2.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 1.0.0)
capybara-webkit (0.14.2)
capybara (~> 2.0, >= 2.0.2)
json
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
chunky_png (1.2.9)
xpath (~> 2.0)
chunky_png (1.3.0)
cliver (0.3.2)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-rails (1.0.3)
compass (>= 0.12.2, < 0.14)
crack (0.4.1)
safe_yaml (~> 0.9.0)
compass-rails (1.1.3)
compass (>= 0.12.2)
crack (0.4.2)
safe_yaml (~> 1.0.0)
dalli (2.7.0)
delayed_job (4.0.0)
activesupport (>= 3.0, < 4.1)
delayed_job_active_record (4.0.0)
activerecord (>= 3.0, < 4.1)
delayed_job (>= 3.0, < 4.1)
erubis (2.7.0)
execjs (2.0.2)
fast_gettext (0.8.0)
ffi (1.9.3)
fast_gettext (0.8.1)
fssm (0.2.10)
gettext (3.0.2)
gettext (3.1.0)
locale (>= 2.0.5)
text
gettext_i18n_rails (1.0.1)
gettext_i18n_rails (1.0.3)
fast_gettext (>= 0.4.8)
highline (1.6.20)
hike (1.2.3)
hoptoad_notifier (2.4.11)
activesupport
builder
i18n (0.6.9)
journey (1.0.4)
jquery-rails (3.0.4)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (4.1.0)
railties (>= 3.1.0)
jquery-ui-rails (4.2.0)
railties (>= 3.2.16)
json (1.8.1)
locale (2.0.9)
locale (2.1.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
memcache-client (1.8.5)
mime-types (1.25)
mini_portile (0.5.2)
minitest (4.7.4)
multi_json (1.8.2)
mysql2 (0.3.14)
minitest (4.7.5)
multi_json (1.8.4)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.7.0)
net-ssh (2.8.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
nokogiri (1.6.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
pkg-config (1.1.4)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
pkg-config (1.1.5)
poltergeist (1.5.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.4)
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)
rails-i18n (0.7.4)
i18n (~> 0.5)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rails (4.0.3)
actionmailer (= 4.0.3)
actionpack (= 4.0.3)
activerecord (= 4.0.3)
activesupport (= 4.0.3)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.3)
sprockets-rails (~> 2.0.0)
rails-i18n (4.0.1)
i18n (~> 0.6)
rails (~> 4.0)
railties (4.0.3)
actionpack (= 4.0.3)
activesupport (= 4.0.3)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
rubyzip (0.9.9)
safe_yaml (0.9.7)
sass (3.2.12)
sass-rails (3.2.6)
railties (~> 3.2.0)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rdoc (4.1.0)
safe_yaml (1.0.1)
sass (3.2.14)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.35.1)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (< 1.0.0)
websocket (~> 1.0.4)
sprockets (2.2.2)
sprockets-rails (~> 2.0.0)
sdoc (0.4.0)
json (~> 1.8)
rdoc (~> 4.0, < 5.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8)
text (1.2.3)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
Expand All @@ -162,23 +154,23 @@ GEM
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
webmock (1.16.0)
webmock (1.17.3)
addressable (>= 2.2.7)
crack (>= 0.3.2)
websocket (1.0.7)
websocket-driver (0.3.2)
xmlhash (1.3.6)
pkg-config
xpath (1.0.0)
xpath (2.0.0)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
capistrano (~> 2.13)
capybara (~> 2.0.1)
capybara-webkit (< 1.0)
capybara
compass-rails
dalli
delayed_job (> 3.0)
delayed_job_active_record
fast_gettext (>= 0.7.0)
Expand All @@ -187,14 +179,14 @@ DEPENDENCIES
hoptoad_notifier (~> 2.3)
jquery-rails
jquery-ui-rails
memcache-client
minitest (< 5.0)
mysql2
nokogiri
rails (~> 3.2.1)
poltergeist
rails (~> 4.0.3)
rails-i18n
sass-rails
sass-rails (~> 4.0.0)
sdoc
sqlite3
uglifier
uglifier (>= 1.3.0)
webmock
xmlhash (>= 1.2.2)
5 changes: 3 additions & 2 deletions app/controllers/main_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

class MainController < ApplicationController

# these pages are completely static:
caches_page :release, :download_js unless Rails.env.development?
# these pages are completely static, but
# page caching have been extracted from Rails 4
# caches_page :release, :download_js unless Rails.env.development?

def ymp_with_arch_and_version
path = "/published/#{params[:project]}/#{params[:repository]}/#{params[:arch]}/#{params[:binary]}?view=ymp"
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/order_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def new
end

def create
@order = Order.new params[:order]
@order = Order.new params.require(:order).permit(:title, :name, :street1,
:zip, :city, :country, :phone, :email, :amount, :reason, :deadline,
:company, :street2, :county, :material)
if @order.save
Promomailer.promo_order(@order).deliver
redirect_to "/order/thanks" and return
Expand Down
Loading

0 comments on commit 3260563

Please sign in to comment.