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
@@ -1,8 +1,20 @@
source 'https://rubygems.org' source 'https://rubygems.org'


gem 'rails', '~> 3.2.1' gem 'rails', '~> 4.0.3'
gem 'nokogiri' 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 'gettext_i18n_rails', '>= 0.4.3'
gem 'fast_gettext', '>= 0.7.0' gem 'fast_gettext', '>= 0.7.0'


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


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


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


gem 'xmlhash', '>= 1.2.2' gem 'xmlhash', '>= 1.2.2'


gem 'jquery-rails' #gem 'memcache-client'
gem 'jquery-ui-rails' gem 'dalli'

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


group :assets do #gem 'actionpack-page_caching'
gem 'sass-rails' # if running rails 3.1 or greater #gem 'actionpack-action_caching'
gem 'compass-rails'
gem 'uglifier' group :doc do
# install nodejs instead! # bundle exec rake doc:rails generates the API under doc/api.
#gem 'therubyracer' gem 'sdoc', require: false
end end


group :test do group :test do
gem 'capybara', '~>2.0.1' # This doesn't work because capybara-webkit (~> 1.1.1) depends on
gem 'capybara-webkit', '< 1.0' # 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' gem 'webmock'
end end


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


PLATFORMS PLATFORMS
ruby ruby


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


class MainController < ApplicationController class MainController < ApplicationController


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


def ymp_with_arch_and_version def ymp_with_arch_and_version
path = "/published/#{params[:project]}/#{params[:repository]}/#{params[:arch]}/#{params[:binary]}?view=ymp" 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
Expand Up @@ -25,7 +25,9 @@ def new
end end


def create 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 if @order.save
Promomailer.promo_order(@order).deliver Promomailer.promo_order(@order).deliver
redirect_to "/order/thanks" and return redirect_to "/order/thanks" and return
Expand Down

0 comments on commit 3260563

Please sign in to comment.