Upgrade to rails 4.2
This commit is contained in:
parent
8777830029
commit
7bc9d0ede6
5 changed files with 114 additions and 96 deletions
6
Gemfile
6
Gemfile
|
@ -1,10 +1,10 @@
|
|||
# A sample Gemfile
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "rails", '~> 4.1'
|
||||
gem "rails", '~> 4.2'
|
||||
|
||||
|
||||
gem 'sass-rails', '>= 4.0' # version to avoid bundle getting confused
|
||||
gem 'sass-rails'
|
||||
gem 'coffee-rails'
|
||||
gem 'less-rails'
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
|
@ -26,7 +26,6 @@ gem 'prawn-table'
|
|||
gem 'haml-rails'
|
||||
gem 'kaminari'
|
||||
gem 'simple_form'
|
||||
gem 'inherited_resources'
|
||||
gem 'localize_input', git: "git://github.com/bennibu/localize_input.git"
|
||||
gem 'daemons'
|
||||
gem 'twitter-bootstrap-rails', '~> 2.2.8'
|
||||
|
@ -55,6 +54,7 @@ end
|
|||
group :development do
|
||||
gem 'sqlite3'
|
||||
gem 'mailcatcher'
|
||||
gem 'web-console', '~> 2.0'
|
||||
|
||||
# allow to use `debugger` https://github.com/conradirwin/pry-rescue
|
||||
gem 'pry-rescue'
|
||||
|
|
138
Gemfile.lock
138
Gemfile.lock
|
@ -38,43 +38,52 @@ PATH
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (4.1.8)
|
||||
actionpack (= 4.1.8)
|
||||
actionview (= 4.1.8)
|
||||
actionmailer (4.2.0)
|
||||
actionpack (= 4.2.0)
|
||||
actionview (= 4.2.0)
|
||||
activejob (= 4.2.0)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
actionpack (4.1.8)
|
||||
actionview (= 4.1.8)
|
||||
activesupport (= 4.1.8)
|
||||
rack (~> 1.5.2)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
actionpack (4.2.0)
|
||||
actionview (= 4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
rack (~> 1.6.0)
|
||||
rack-test (~> 0.6.2)
|
||||
actionview (4.1.8)
|
||||
activesupport (= 4.1.8)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
||||
actionview (4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
activemodel (4.1.8)
|
||||
activesupport (= 4.1.8)
|
||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
||||
activejob (4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
globalid (>= 0.3.0)
|
||||
activemodel (4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
builder (~> 3.1)
|
||||
activerecord (4.1.8)
|
||||
activemodel (= 4.1.8)
|
||||
activesupport (= 4.1.8)
|
||||
arel (~> 5.0.0)
|
||||
activesupport (4.1.8)
|
||||
i18n (~> 0.6, >= 0.6.9)
|
||||
activerecord (4.2.0)
|
||||
activemodel (= 4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
arel (~> 6.0)
|
||||
activesupport (4.2.0)
|
||||
i18n (~> 0.7)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
acts_as_tree (2.1.0)
|
||||
activerecord (>= 3.0.0)
|
||||
arel (5.0.1.20140414130214)
|
||||
arel (6.0.0)
|
||||
attribute_normalizer (1.2.0)
|
||||
better_errors (2.0.0)
|
||||
better_errors (2.1.0)
|
||||
coderay (>= 1.0.0)
|
||||
erubis (>= 2.6.6)
|
||||
rack (>= 0.9.0)
|
||||
binding_of_caller (0.7.2)
|
||||
debug_inspector (>= 0.0.1)
|
||||
bootstrap-datepicker-rails (1.3.0.2)
|
||||
bootstrap-datepicker-rails (1.3.1.1)
|
||||
railties (>= 3.0)
|
||||
builder (3.2.2)
|
||||
bullet (4.14.0)
|
||||
|
@ -111,7 +120,7 @@ GEM
|
|||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.8.0)
|
||||
colorize (0.7.4)
|
||||
colorize (0.7.5)
|
||||
commonjs (0.2.7)
|
||||
connection_pool (2.1.0)
|
||||
content_for_in_controllers (0.0.2)
|
||||
|
@ -135,7 +144,7 @@ GEM
|
|||
diffy (3.0.7)
|
||||
docile (1.1.5)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.0.3)
|
||||
eventmachine (1.0.4)
|
||||
exception_notification (4.0.1)
|
||||
actionmailer (>= 3.0.4)
|
||||
activesupport (>= 3.0.4)
|
||||
|
@ -149,6 +158,8 @@ GEM
|
|||
faker (1.4.3)
|
||||
i18n (~> 0.5)
|
||||
ffi (1.9.6)
|
||||
globalid (0.3.0)
|
||||
activesupport (>= 4.1.0)
|
||||
haml (4.1.0.beta.1)
|
||||
tilt
|
||||
haml-rails (0.6.0)
|
||||
|
@ -157,9 +168,6 @@ GEM
|
|||
haml (>= 3.1, < 5.0)
|
||||
html2haml (>= 1.0.1)
|
||||
railties (>= 4.0.1)
|
||||
has_scope (0.6.0.rc)
|
||||
actionpack (>= 3.2, < 5)
|
||||
activesupport (>= 3.2, < 5)
|
||||
hike (1.2.3)
|
||||
hpricot (0.8.6)
|
||||
html2haml (1.0.1)
|
||||
|
@ -167,21 +175,17 @@ GEM
|
|||
haml (>= 4.0.0.rc.1)
|
||||
hpricot (~> 0.8.6)
|
||||
ruby_parser (~> 3.1.1)
|
||||
i18n (0.6.11)
|
||||
i18n (0.7.0)
|
||||
i18n-js (3.0.0.rc8)
|
||||
i18n (~> 0.6)
|
||||
i18n-spec (0.6.0)
|
||||
iso
|
||||
inherited_resources (1.5.1)
|
||||
actionpack (>= 3.2, < 4.2)
|
||||
has_scope (~> 0.6.0.rc)
|
||||
railties (>= 3.2, < 4.2)
|
||||
responders (~> 1.0)
|
||||
interception (0.5)
|
||||
iso (0.2.1)
|
||||
i18n
|
||||
jquery-rails (3.1.2)
|
||||
railties (>= 3.0, < 5.0)
|
||||
jquery-rails (4.0.3)
|
||||
rails-dom-testing (~> 1.0)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (1.8.1)
|
||||
kaminari (0.16.1)
|
||||
|
@ -193,6 +197,8 @@ GEM
|
|||
actionpack (>= 3.1)
|
||||
less (~> 2.6.0)
|
||||
libv8 (3.16.14.7)
|
||||
loofah (2.0.1)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
mailcatcher (0.2.4)
|
||||
|
@ -211,7 +217,7 @@ GEM
|
|||
railties (>= 3.0.0, < 5.0.0)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.4.3)
|
||||
mini_portile (0.6.1)
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.5.0)
|
||||
mono_logger (1.1.0)
|
||||
multi_json (1.10.1)
|
||||
|
@ -219,7 +225,7 @@ GEM
|
|||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.9.1)
|
||||
netrc (0.10.1)
|
||||
netrc (0.10.2)
|
||||
nokogiri (1.6.5)
|
||||
mini_portile (~> 0.6.0)
|
||||
pdf-core (0.4.0)
|
||||
|
@ -242,35 +248,44 @@ GEM
|
|||
pry-stack_explorer (0.4.9.1)
|
||||
binding_of_caller (>= 0.7)
|
||||
pry (>= 0.9.11)
|
||||
quiet_assets (1.0.3)
|
||||
quiet_assets (1.1.0)
|
||||
railties (>= 3.1, < 5.0)
|
||||
rack (1.5.2)
|
||||
rack (1.6.0)
|
||||
rack-contrib (1.2.0)
|
||||
rack (>= 0.9.1)
|
||||
rack-protection (1.5.3)
|
||||
rack
|
||||
rack-test (0.6.2)
|
||||
rack (>= 1.0)
|
||||
rails (4.1.8)
|
||||
actionmailer (= 4.1.8)
|
||||
actionpack (= 4.1.8)
|
||||
actionview (= 4.1.8)
|
||||
activemodel (= 4.1.8)
|
||||
activerecord (= 4.1.8)
|
||||
activesupport (= 4.1.8)
|
||||
rails (4.2.0)
|
||||
actionmailer (= 4.2.0)
|
||||
actionpack (= 4.2.0)
|
||||
actionview (= 4.2.0)
|
||||
activejob (= 4.2.0)
|
||||
activemodel (= 4.2.0)
|
||||
activerecord (= 4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.1.8)
|
||||
sprockets-rails (~> 2.0)
|
||||
railties (= 4.2.0)
|
||||
sprockets-rails
|
||||
rails-assets-listjs (0.2.0.beta.4)
|
||||
railties (>= 3.1)
|
||||
rails-deprecated_sanitizer (1.0.3)
|
||||
activesupport (>= 4.2.0.alpha)
|
||||
rails-dom-testing (1.0.5)
|
||||
activesupport (>= 4.2.0.beta, < 5.0)
|
||||
nokogiri (~> 1.6.0)
|
||||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.0.1)
|
||||
loofah (~> 2.0)
|
||||
rails-i18n (4.0.3)
|
||||
i18n (~> 0.6)
|
||||
railties (~> 4.0)
|
||||
rails-settings-cached (0.4.1)
|
||||
rails (>= 4.0.0)
|
||||
railties (4.1.8)
|
||||
actionpack (= 4.1.8)
|
||||
activesupport (= 4.1.8)
|
||||
railties (4.2.0)
|
||||
actionpack (= 4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rake (10.4.2)
|
||||
|
@ -280,7 +295,7 @@ GEM
|
|||
activesupport (>= 3.0)
|
||||
i18n
|
||||
polyamorous (~> 1.1)
|
||||
recurring_select (1.2.4)
|
||||
recurring_select (1.3.0)
|
||||
coffee-rails (>= 3.1)
|
||||
ice_cube (>= 0.11)
|
||||
jquery-rails (>= 3.0)
|
||||
|
@ -290,8 +305,6 @@ GEM
|
|||
redis-namespace (1.5.1)
|
||||
redis (~> 3.0, >= 3.0.4)
|
||||
ref (1.0.5)
|
||||
responders (1.1.2)
|
||||
railties (>= 3.2, < 4.2)
|
||||
resque (1.25.2)
|
||||
mono_logger (~> 1.0)
|
||||
multi_json (~> 1.0)
|
||||
|
@ -329,7 +342,7 @@ GEM
|
|||
sexp_processor (~> 4.1)
|
||||
rubyzip (1.1.6)
|
||||
sass (3.4.9)
|
||||
sass-rails (5.0.0)
|
||||
sass-rails (5.0.1)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
sass (~> 3.1)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
|
@ -376,8 +389,8 @@ GEM
|
|||
sqlite3 (1.3.10)
|
||||
sqlite3-ruby (1.3.3)
|
||||
sqlite3 (>= 1.3.3)
|
||||
sshkit (1.5.1)
|
||||
colorize
|
||||
sshkit (1.6.1)
|
||||
colorize (>= 0.7.0)
|
||||
net-scp (>= 1.1.2)
|
||||
net-ssh (>= 2.8.0)
|
||||
term-ansicolor (1.3.0)
|
||||
|
@ -401,12 +414,17 @@ GEM
|
|||
railties (>= 3.1)
|
||||
tzinfo (1.2.2)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (2.6.0)
|
||||
uglifier (2.6.1)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
uniform_notifier (1.6.2)
|
||||
vegas (0.1.11)
|
||||
rack (>= 1.0.0)
|
||||
web-console (2.0.0)
|
||||
activemodel (~> 4.0)
|
||||
binding_of_caller (>= 0.7.2)
|
||||
railties (~> 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
websocket (1.2.1)
|
||||
whenever (0.9.4)
|
||||
chronic (>= 0.6.3)
|
||||
|
@ -448,7 +466,6 @@ DEPENDENCIES
|
|||
i18n-js (~> 3.0.0.rc8)
|
||||
i18n-spec
|
||||
ice_cube!
|
||||
inherited_resources
|
||||
jquery-rails
|
||||
kaminari
|
||||
less-rails
|
||||
|
@ -462,7 +479,7 @@ DEPENDENCIES
|
|||
pry-rescue
|
||||
pry-stack_explorer
|
||||
quiet_assets
|
||||
rails (~> 4.1)
|
||||
rails (~> 4.2)
|
||||
rails-assets-listjs (= 0.2.0.beta.4)
|
||||
rails-i18n
|
||||
rails-settings-cached
|
||||
|
@ -474,7 +491,7 @@ DEPENDENCIES
|
|||
rspec-rerun
|
||||
ruby-prof
|
||||
ruby-units
|
||||
sass-rails (>= 4.0)
|
||||
sass-rails
|
||||
select2-rails
|
||||
selenium-webdriver
|
||||
simple-navigation
|
||||
|
@ -486,4 +503,5 @@ DEPENDENCIES
|
|||
thin
|
||||
twitter-bootstrap-rails (~> 2.2.8)
|
||||
uglifier (>= 1.0.3)
|
||||
web-console (~> 2.0)
|
||||
whenever
|
||||
|
|
|
@ -20,7 +20,7 @@ Foodsoft::Application.configure do
|
|||
# config.action_dispatch.rack_cache = true
|
||||
|
||||
# Disable Rails's static asset server (Apache or nginx will already do this).
|
||||
config.serve_static_assets = false
|
||||
config.serve_static_files = false
|
||||
|
||||
# Compress JavaScripts and CSS.
|
||||
config.assets.js_compressor = :uglifier
|
||||
|
|
|
@ -19,7 +19,7 @@ Foodsoft::Application.configure do
|
|||
config.assets.initialize_on_precompile = true
|
||||
|
||||
# Configure static asset server for tests with Cache-Control for performance.
|
||||
config.serve_static_assets = true
|
||||
config.serve_static_files = true
|
||||
config.static_cache_control = "public, max-age=3600"
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
|
|
|
@ -6,32 +6,32 @@ Foodsoft::Application.routes.draw do
|
|||
|
||||
get "sessions/new"
|
||||
|
||||
root :to => 'sessions#redirect_to_foodcoop', as: nil
|
||||
root to: 'sessions#redirect_to_foodcoop', as: nil
|
||||
|
||||
scope '/:foodcoop' do
|
||||
|
||||
# Root path
|
||||
root :to => 'home#index'
|
||||
root to: 'home#index'
|
||||
|
||||
########### Sessions
|
||||
|
||||
get '/login' => 'sessions#new', :as => 'login'
|
||||
get '/logout' => 'sessions#destroy', :as => 'logout'
|
||||
get '/login' => 'sessions#new', as: 'login'
|
||||
get '/logout' => 'sessions#destroy', as: 'logout'
|
||||
get '/login/forgot_password' => 'login#forgot_password', as: :forgot_password
|
||||
post '/login/reset_password' => 'login#reset_password', as: :reset_password
|
||||
get '/login/new_password' => 'login#new_password', as: :new_password
|
||||
patch '/login/update_password' => 'login#update_password', as: :update_password
|
||||
match '/login/accept_invitation/:token' => 'login#accept_invitation', as: :accept_invitation, via: [:get, :post]
|
||||
resources :sessions, :only => [:new, :create, :destroy]
|
||||
resources :sessions, only: [:new, :create, :destroy]
|
||||
|
||||
get '/foodcoop.css' => 'styles#foodcoop', :as => 'foodcoop_css'
|
||||
get '/foodcoop.css' => 'styles#foodcoop', as: 'foodcoop_css'
|
||||
|
||||
########### User specific
|
||||
|
||||
get '/home/profile', :as => 'my_profile'
|
||||
patch '/home/update_profile', :as => 'update_profile'
|
||||
get '/home/ordergroup' => 'home#ordergroup', :as => 'my_ordergroup'
|
||||
post '/home/cancel_membership' => 'home#cancel_membership', :as => 'cancel_membership'
|
||||
get '/home/profile', as: 'my_profile'
|
||||
patch '/home/update_profile', as: 'update_profile'
|
||||
get '/home/ordergroup' => 'home#ordergroup', as: 'my_ordergroup'
|
||||
post '/home/cancel_membership' => 'home#cancel_membership', as: 'cancel_membership'
|
||||
|
||||
############ Orders, ordering
|
||||
|
||||
|
@ -51,16 +51,16 @@ Foodsoft::Application.routes.draw do
|
|||
end
|
||||
|
||||
resources :group_orders do
|
||||
get :archive, :on => :collection
|
||||
get :archive, on: :collection
|
||||
end
|
||||
|
||||
resources :group_order_articles
|
||||
|
||||
resources :order_comments, :only => [:new, :create]
|
||||
resources :order_comments, only: [:new, :create]
|
||||
|
||||
############ Foodcoop orga
|
||||
|
||||
resources :invites, :only => [:new, :create]
|
||||
resources :invites, only: [:new, :create]
|
||||
|
||||
resources :tasks do
|
||||
collection do
|
||||
|
@ -76,13 +76,13 @@ Foodsoft::Application.routes.draw do
|
|||
end
|
||||
|
||||
namespace :foodcoop do
|
||||
root :to => 'users#index'
|
||||
root to: 'users#index'
|
||||
|
||||
resources :users, :only => [:index]
|
||||
resources :users, only: [:index]
|
||||
|
||||
resources :ordergroups, :only => [:index]
|
||||
resources :ordergroups, only: [:index]
|
||||
|
||||
resources :workgroups, :only => [:index, :edit, :update]
|
||||
resources :workgroups, only: [:index, :edit, :update]
|
||||
end
|
||||
|
||||
########### Article management
|
||||
|
@ -94,7 +94,7 @@ Foodsoft::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :stock_articles, :to => 'stockit' do
|
||||
resources :stock_articles, controller: 'stockit' do
|
||||
get :copy
|
||||
collection do
|
||||
get :derive
|
||||
|
@ -107,7 +107,7 @@ Foodsoft::Application.routes.draw do
|
|||
end
|
||||
|
||||
resources :suppliers do
|
||||
get :shared_suppliers, :on => :collection
|
||||
get :shared_suppliers, on: :collection
|
||||
|
||||
resources :deliveries do
|
||||
collection do
|
||||
|
@ -139,7 +139,7 @@ Foodsoft::Application.routes.draw do
|
|||
########### Finance
|
||||
|
||||
namespace :finance do
|
||||
root :to => 'base#index'
|
||||
root to: 'base#index'
|
||||
|
||||
resources :order, controller: 'balancing', path: 'balancing' do
|
||||
member do
|
||||
|
@ -158,44 +158,44 @@ Foodsoft::Application.routes.draw do
|
|||
|
||||
resources :invoices
|
||||
|
||||
resources :ordergroups, :only => [:index] do
|
||||
resources :financial_transactions, :as => :transactions
|
||||
resources :ordergroups, only: [:index] do
|
||||
resources :financial_transactions, as: :transactions
|
||||
end
|
||||
get 'transactions' => 'financial_transactions#index_collection'
|
||||
|
||||
get 'transactions/new_collection' => 'financial_transactions#new_collection', :as => 'new_transaction_collection'
|
||||
post 'transactions/create_collection' => 'financial_transactions#create_collection', :as => 'create_transaction_collection'
|
||||
get 'transactions/new_collection' => 'financial_transactions#new_collection', as: 'new_transaction_collection'
|
||||
post 'transactions/create_collection' => 'financial_transactions#create_collection', as: 'create_transaction_collection'
|
||||
end
|
||||
|
||||
########### Administration
|
||||
|
||||
namespace :admin do
|
||||
root :to => 'base#index'
|
||||
root to: 'base#index'
|
||||
|
||||
resources :users do
|
||||
post :sudo, :on => :member
|
||||
post :sudo, on: :member
|
||||
end
|
||||
|
||||
resources :workgroups do
|
||||
get :memberships, :on => :member
|
||||
get :memberships, on: :member
|
||||
end
|
||||
|
||||
resources :ordergroups do
|
||||
get :memberships, :on => :member
|
||||
get :memberships, on: :member
|
||||
end
|
||||
|
||||
resource :config, :only => [:show, :update] do
|
||||
resource :config, only: [:show, :update] do
|
||||
get :list
|
||||
end
|
||||
end
|
||||
|
||||
############## Feedback
|
||||
|
||||
resource :feedback, :only => [:new, :create], :controller => 'feedback'
|
||||
resource :feedback, only: [:new, :create], controller: 'feedback'
|
||||
|
||||
############## The rest
|
||||
|
||||
resources :users, :only => [:index]
|
||||
resources :users, only: [:index]
|
||||
|
||||
end # End of /:foodcoop scope
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue