diff --git a/.ruby-version b/.ruby-version index 68b3a4cd..530cdd91 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -1.9.3-p551 +2.2.4 diff --git a/Gemfile b/Gemfile index b3a79a0a..1d93a837 100644 --- a/Gemfile +++ b/Gemfile @@ -1,19 +1,17 @@ source 'http://rubygems.org' +ruby '2.2.4' gem 'dotenv-rails' gem 'dotenv-deployment' -gem 'rails', '= 3.2.22.5' +gem 'rails', '= 4.0.13' #gem 'sqlite3-ruby', '~> 1.3.1', :require => 'sqlite3' gem 'mysql2', '>= 0.3.11' -# https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion -gem 'json', '~> 1.8.1' - gem 'haml', '~> 4.0.0' gem 'rdiscount', '~> 1.6.5' gem 'will_paginate', '~> 3.0.pre2' -gem 'devise', '~> 2.2.3' +gem 'devise', '~> 3.5.10' # unstable version of RocketAMF interprets info registry as a hash instead of an array gem 'RocketAMF', :git => 'https://github.com/rubyamf/rocketamf.git' @@ -48,13 +46,13 @@ gem 'neopets', '~> 0.2.0', :git => 'https://github.com/matchu/neopets.git' gem "mini_magick", "~> 3.4" gem "fog", "~> 1.8.0" -gem "carrierwave", "~> 0.8.0" +gem 'carrierwave', '~> 1.3', '>= 1.3.3' gem "parallel", "~> 1.13.0" gem "http_accept_language", :git => "https://github.com/iain/http_accept_language.git" -gem "globalize3", :git => "https://github.com/matchu/globalize3.git" +gem 'globalize', '~> 4.0.3' # My flex branch fixes a minor pagination bug. Once it's merged into the # original gem, we can switch back. @@ -63,18 +61,20 @@ gem "patron", "~> 0.4.18" gem "rest-client", "~> 1.6.7" -gem "rails-i18n" +gem 'rails-i18n', '~> 4.0', '>= 4.0.9' gem 'rack-attack', '~> 2.2.0' -gem 'react-rails', '~> 0.8.0.0' +gem 'react-rails', '~> 2.7', '>= 2.7.1' gem "letter_opener", :group => :development -gem 'sass-rails', "~> 3.2.6" +gem 'sass-rails', "~> 4.0.5" gem 'compass-rails', "~> 1.0.3" gem 'uglifier', ">= 1.0.3" +gem 'rails-observers', '~> 0.1.5' + group :development do gem 'capistrano', '~> 2.15.5', require: false gem 'rvm-capistrano', '~> 1.5.6', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 71531065..1a21cc66 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,15 +13,6 @@ GIT progressbar (~> 0.11.0) prompter (~> 0.1.5) -GIT - remote: https://github.com/matchu/globalize3.git - revision: e23277864270131bbee29033f8a3abfb74ffe1f8 - specs: - globalize3 (0.3.0) - activemodel (>= 3.0.0) - activerecord (>= 3.0.0) - paper_trail (~> 2) - GIT remote: https://github.com/matchu/neopets.git revision: 5d13a720b616ba57fbbd54541f3e5daf02b3fedc @@ -38,51 +29,52 @@ GIT GEM remote: http://rubygems.org/ specs: - actionmailer (3.2.22.5) - actionpack (= 3.2.22.5) - mail (~> 2.5.4) - actionpack (3.2.22.5) - activemodel (= 3.2.22.5) - activesupport (= 3.2.22.5) - builder (~> 3.0.0) + actionmailer (4.0.13) + actionpack (= 4.0.13) + mail (~> 2.5, >= 2.5.4) + actionpack (4.0.13) + activesupport (= 4.0.13) + 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.22.5) - activesupport (= 3.2.22.5) - builder (~> 3.0.0) - activerecord (3.2.22.5) - activemodel (= 3.2.22.5) - activesupport (= 3.2.22.5) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.22.5) - activemodel (= 3.2.22.5) - activesupport (= 3.2.22.5) - activesupport (3.2.22.5) - i18n (~> 0.6, >= 0.6.4) - multi_json (~> 1.0) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.13) + activesupport (= 4.0.13) + builder (~> 3.1.0) + activerecord (4.0.13) + activemodel (= 4.0.13) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.13) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.4) + activesupport (4.0.13) + i18n (~> 0.6, >= 0.6.9) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) addressable (2.3.8) airbrake (3.1.17) builder multi_json - arel (3.0.3) - bcrypt (3.1.10) - bcrypt-ruby (3.1.5) - bcrypt (>= 3.1.3) - builder (3.0.4) + arel (4.0.2) + babel-source (5.8.35) + babel-transpiler (0.7.0) + babel-source (>= 4.0, < 6) + execjs (~> 2.0) + bcrypt (3.1.19) + builder (3.1.4) capistrano (2.15.5) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) - carrierwave (0.8.0) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) + carrierwave (1.3.3) + activemodel (>= 4.0.0) + activesupport (>= 4.0.0) + mime-types (>= 1.16) + ssrf_filter (~> 1.0, < 1.1.0) character-encodings (0.4.1) chronic (0.6.7) chunky_png (1.3.4) @@ -92,12 +84,15 @@ GEM sass (~> 3.2.19) compass-rails (1.0.3) compass (>= 0.12.2, < 0.14) - concurrent-ruby (1.1.9) - devise (2.2.8) - bcrypt-ruby (~> 3.0) + concurrent-ruby (1.1.10) + connection_pool (2.2.5) + devise (3.5.10) + bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (~> 3.1) - warden (~> 1.2.1) + railties (>= 3.2.6, < 5) + responders + thread_safe (~> 0.1) + warden (~> 1.2.3) diff-lcs (1.2.5) dotenv (2.0.1) dotenv-deployment (0.0.2) @@ -124,25 +119,28 @@ GEM ruby-hmac formatador (0.2.5) fssm (0.2.10) + globalize (4.0.3) + activemodel (>= 4.0.0, < 5) + activerecord (>= 4.0.0, < 5) haml (4.0.6) tilt highline (1.7.2) hike (1.2.3) i18n (0.9.5) concurrent-ruby (~> 1.0) - journey (1.0.4) - json (1.8.6) + json (2.5.1) launchy (2.4.3) addressable (~> 2.3) letter_opener (1.4.1) launchy (~> 2.2) - mail (2.5.5) - mime-types (~> 1.16) - treetop (~> 1.4.8) + mail (2.7.1) + mini_mime (>= 0.1.1) memcache-client (1.8.5) mime-types (1.25.1) mini_magick (3.8.1) subexec (~> 0.2.1) + mini_mime (1.1.2) + minitest (4.7.5) msgpack (0.5.12) multi_json (1.3.7) mysql2 (0.3.18) @@ -158,58 +156,51 @@ GEM openneo-auth-signatory (0.1.0) ruby-hmac orm_adapter (0.5.0) - paper_trail (2.7.2) - activerecord (~> 3.0) - railties (~> 3.0) parallel (1.13.0) passenger_monit (0.1.1) patron (0.4.20) - polyglot (0.3.5) progressbar (0.11.0) prompter (0.1.6) dye (>= 0.1.1) yard (>= 0.6.3) - rack (1.4.7) + rack (1.5.5) rack-attack (2.2.1) rack - rack-cache (1.7.1) - rack (>= 0.4) rack-protection (1.5.3) rack - rack-ssl (1.3.4) - rack rack-test (0.6.3) rack (>= 1.0) - rails (3.2.22.5) - actionmailer (= 3.2.22.5) - actionpack (= 3.2.22.5) - activerecord (= 3.2.22.5) - activeresource (= 3.2.22.5) - activesupport (= 3.2.22.5) - bundler (~> 1.0) - railties (= 3.2.22.5) - rails-i18n (3.0.1) - i18n (~> 0.5) - rails (>= 3.0.0, < 4.0.0) - railties (3.2.22.5) - actionpack (= 3.2.22.5) - activesupport (= 3.2.22.5) - rack-ssl (~> 1.3.2) + rails (4.0.13) + actionmailer (= 4.0.13) + actionpack (= 4.0.13) + activerecord (= 4.0.13) + activesupport (= 4.0.13) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.13) + sprockets-rails (~> 2.0) + rails-i18n (4.0.9) + i18n (~> 0.7) + railties (~> 4.0) + rails-observers (0.1.5) + activemodel (>= 4.0) + railties (4.0.13) + actionpack (= 4.0.13) + activesupport (= 4.0.13) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (12.2.1) + thor (>= 0.18.1, < 2.0) + rake (13.0.6) rdiscount (1.6.8) - rdoc (3.12.2) - json (~> 1.4) - react-rails (0.8.0.0) + react-rails (2.7.1) + babel-transpiler (>= 0.7.0) + connection_pool execjs - rails (>= 3.1) - react-source (= 0.8.0) - react-source (0.8.0) + railties (>= 3.2) + tilt redis (3.2.1) redis-namespace (1.5.2) redis (~> 3.0, >= 3.0.4) + responders (1.1.2) + railties (>= 3.2, < 4.2) resque (1.23.1) multi_json (~> 1.0) redis-namespace (~> 1.0) @@ -246,33 +237,37 @@ GEM sanitize (2.0.6) nokogiri (>= 1.4.4) sass (3.2.19) - sass-rails (3.2.6) - railties (~> 3.2.0) - sass (>= 3.1.10) - tilt (~> 1.3) + sass-rails (4.0.5) + railties (>= 4.0.0, < 5.0) + sass (~> 3.2.2) + sprockets (~> 2.8, < 3.0) + sprockets-rails (~> 2.0) sinatra (1.4.6) rack (~> 1.4) rack-protection (~> 1.4) tilt (>= 1.3, < 3) - sprockets (2.2.3) + sprockets (2.12.5) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.3.3) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (>= 2.8, < 4.0) + ssrf_filter (1.0.8) subexec (0.2.3) swf_converter (0.0.3) - thor (0.20.3) + thor (1.2.2) + thread_safe (0.3.6) tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) tzinfo (0.3.62) uglifier (2.7.1) execjs (>= 0.3.0) json (>= 1.8.0) vegas (0.1.11) rack (>= 1.0.0) - warden (1.2.3) + warden (1.2.7) rack (>= 1.0) whenever (0.7.3) activesupport (>= 2.3.4) @@ -288,19 +283,18 @@ DEPENDENCIES addressable airbrake (~> 3.1.8) capistrano (~> 2.15.5) - carrierwave (~> 0.8.0) + carrierwave (~> 1.3, >= 1.3.3) character-encodings (~> 0.4.1) compass-rails (~> 1.0.3) - devise (~> 2.2.3) + devise (~> 3.5.10) dotenv-deployment dotenv-rails factory_girl_rails (~> 1.0) flex! fog (~> 1.8.0) - globalize3! + globalize (~> 4.0.3) haml (~> 4.0.0) http_accept_language! - json (~> 1.8.1) letter_opener memcache-client (~> 1.8.5) mini_magick (~> 3.4) @@ -314,10 +308,11 @@ DEPENDENCIES passenger_monit (~> 0.1.1) patron (~> 0.4.18) rack-attack (~> 2.2.0) - rails (= 3.2.22.5) - rails-i18n + rails (= 4.0.13) + rails-i18n (~> 4.0, >= 4.0.9) + rails-observers (~> 0.1.5) rdiscount (~> 1.6.5) - react-rails (~> 0.8.0.0) + react-rails (~> 2.7, >= 2.7.1) resque (~> 1.23.0) resque-retry (~> 0.1.0) resque-scheduler (~> 2.0.0.d) @@ -326,11 +321,14 @@ DEPENDENCIES rspec-rails (~> 2.0.0.beta.22) rvm-capistrano (~> 1.5.6) sanitize (~> 2.0.3) - sass-rails (~> 3.2.6) + sass-rails (~> 4.0.5) swf_converter (~> 0.0.3) uglifier (>= 1.0.3) whenever (~> 0.7.3) will_paginate (~> 3.0.pre2) +RUBY VERSION + ruby 2.2.4p230 + BUNDLED WITH 1.17.3 diff --git a/Vagrantfile b/Vagrantfile index 98f4ee86..3d21643a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -72,10 +72,8 @@ Vagrant.configure("2") do |config| # documentation for more information about their specific syntax and use. config.vm.provision "shell", inline: <<-SHELL apt-get update - apt-get install -y rbenv libssl1.0-dev - su vagrant -c 'curl -fsSL https://gist.github.com/FiveYellowMice/c50490693d47577cfe7e6ac9fc3bf6cf.txt | rbenv install --patch 1.9.3-p551' - apt-get remove -y libssl1.0-dev - apt-get install -y libmysqlclient-dev libcurl4-openssl-dev nodejs + apt-get install -y rbenv libmysqlclient-dev libcurl4-openssl-dev nodejs + su vagrant -c 'rbenv install 2.2.4 && gem install bundler -v 1.17.3' echo 'When you log in as vagrant, run `rbenv init` and follow the instructions!' SHELL end diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 00000000..66e9889e --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails new file mode 100755 index 00000000..728cd85a --- /dev/null +++ b/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 00000000..17240489 --- /dev/null +++ b/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/config/application.rb b/config/application.rb index 28bd9b45..818eae01 100644 --- a/config/application.rb +++ b/config/application.rb @@ -2,9 +2,9 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' -# If you have a Gemfile, require the gems listed there, including any gems +# Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) +Bundler.require(*Rails.groups) module OpenneoImpressItems class Application < Rails::Application @@ -12,13 +12,6 @@ module OpenneoImpressItems # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. - # Add additional load paths for your own custom dirs - # config.load_paths += %W( #{config.root}/extras ) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - # Activate observers that should always be running config.active_record.observers = [:closet_hanger_observer, :closet_list_observer, :contribution_observer, :item_observer, @@ -33,16 +26,6 @@ module OpenneoImpressItems # config.i18n.default_locale = :de config.i18n.fallbacks = true - # Configure generators values. Many other options are available, be sure to check the documentation. - # config.generators do |g| - # g.orm :active_record - # g.template_engine :erb - # g.test_framework :test_unit, :fixture => true - # end - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters << :password - Mime::Type.register "image/gif", :gif ActionController::Base.config.relative_url_root = '' diff --git a/config/boot.rb b/config/boot.rb index 3971a070..5e5f0c1f 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,14 +1,4 @@ -# Use locked gems if present. -begin - require File.expand_path('../../.bundle/environment', __FILE__) +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) -rescue LoadError - # Otherwise, use RubyGems. - require 'rubygems' - - # And set up the gems listed in the Gemfile. - if File.exist?(File.expand_path('../../Gemfile', __FILE__)) - require 'bundler' - Bundler.setup - end -end +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index 6841413b..ca30041b 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ -# Load the rails application +# Load the Rails application. require File.expand_path('../application', __FILE__) -# Initialize the rails application +# Initialize the Rails application. OpenneoImpressItems::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 6eda8d2a..e5acc054 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,36 +1,33 @@ OpenneoImpressItems::Application.configure do - # Settings specified here will take precedence over those in config/environment.rb + # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the webserver when you make code changes. + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. config.cache_classes = false - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # Do not eager load code on boot. + config.eager_load = false - # Show full error reports and disable caching + # Show full error reports and disable caching. + # NOTE: We have caching on in development, to make it easier to test it! config.consider_all_requests_local = true config.action_controller.perform_caching = true - # Don't care if the mailer can't send + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.default_url_options = {host: "impress.dev.openneo.net"} config.action_mailer.delivery_method = :letter_opener + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict + # Raise an error on page load if there are pending migrations + config.active_record.migration_error = :page_load - # 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 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. config.assets.debug = true config.react.variant = :development diff --git a/config/environments/production.rb b/config/environments/production.rb index daaf18fc..fba3b14c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,7 +1,6 @@ OpenneoImpressItems::Application.configure do - # Settings specified here will take precedence over those in config/environment.rb + # Settings specified here will take precedence over those in config/application.rb - # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true @@ -76,6 +75,9 @@ OpenneoImpressItems::Application.configure do } config.action_mailer.raise_delivery_errors = true config.action_mailer.perform_deliveries = true + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new end LocalImpressHost = 'newimpress.openneo.net' diff --git a/config/environments/test.rb b/config/environments/test.rb index e3e30b2e..74450ac2 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,40 +1,39 @@ OpenneoImpressItems::Application.configure do - # Settings specified here will take precedence over those in config/environment.rb + # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that + # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! + # and recreated between test runs. Don't rely on the data there! config.cache_classes = true - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false - # Show full error reports and disable caching + # Configure static asset server for tests with Cache-Control for performance. + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" + + # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true end - -RemoteImpressHost = 'impress.openneo.net' diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..4a994e1e --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index d531b8bb..ac033bf9 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,10 +1,16 @@ # Be sure to restart your server when you modify this file. -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index d3f077bc..f8754891 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -1,7 +1,12 @@ # Be sure to restart your server when you modify this file. -# Your secret key for verifying the integrity of signed cookies. +# Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! + # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -OpenneoImpressItems::Application.config.secret_token = ENV.fetch('SECRET_TOKEN') +# You can use `rake secret` to generate a secure secret key. + +# Make sure your secret_key_base is kept private +# if you're sharing your code publicly. +OpenneoImpressItems::Application.config.secret_key_base = ENV.fetch('SECRET_TOKEN') diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index a527513a..54b6394c 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,10 +1,3 @@ # Be sure to restart your server when you modify this file. -Rails.application.config.session_store :cookie_store, { - :key => '_openneo_impress_session', -} - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rake db:sessions:create") -# Rails.application.config.session_store :active_record_store +OpenneoImpressItems::Application.config.session_store :cookie_store, key: '_openneo_impress_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index cd6b9f82..33725e95 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,13 +1,14 @@ # Be sure to restart your server when you modify this file. + # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end \ No newline at end of file +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/lib/tasks/rspec.rake b/lib/tasks/rspec.rake deleted file mode 100644 index 839e0464..00000000 --- a/lib/tasks/rspec.rake +++ /dev/null @@ -1,70 +0,0 @@ -begin - require 'rspec/core' - require 'rspec/core/rake_task' -rescue MissingSourceFile - module Rspec - module Core - class RakeTask - include Rake::DSL - def initialize(name) - task name do - # if rspec-rails is a configured gem, this will output helpful material and exit ... - require File.expand_path(File.dirname(__FILE__) + "/../../config/environment") - - # ... otherwise, do this: - raise <<-MSG - -#{"*" * 80} -* You are trying to run an rspec rake task defined in -* #{__FILE__}, -* but rspec can not be found in vendor/gems, vendor/plugins or system gems. -#{"*" * 80} -MSG - end - end - end - end - end -end - -Rake.application.instance_variable_get('@tasks').delete('default') - -spec_prereq = Rails.root.join('config', 'database.yml').exist? ? "db:test:prepare" : :noop -task :noop do -end - -task :default => :spec -task :stats => "spec:statsetup" - -desc "Run all specs in spec directory (excluding plugin specs)" -Rspec::Core::RakeTask.new(:spec => spec_prereq) - -namespace :spec do - [:requests, :models, :controllers, :views, :helpers, :mailers, :lib].each do |sub| - desc "Run the code examples in spec/#{sub}" - Rspec::Core::RakeTask.new(sub => spec_prereq) do |t| - t.pattern = "./spec/#{sub}/**/*_spec.rb" - end - end - - task :statsetup do - require 'rails/code_statistics' - ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models') - ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views') - ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers') - ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers') - ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib') - ::STATS_DIRECTORIES << %w(Mailer\ specs spec/mailers) if File.exist?('spec/mailers') - ::STATS_DIRECTORIES << %w(Routing\ specs spec/routing) if File.exist?('spec/routing') - ::STATS_DIRECTORIES << %w(Request\ specs spec/requests) if File.exist?('spec/requests') - ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models') - ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views') - ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers') - ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers') - ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib') - ::CodeStatistics::TEST_TYPES << "Mailer specs" if File.exist?('spec/mailer') - ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing') - ::CodeStatistics::TEST_TYPES << "Request specs" if File.exist?('spec/requests') - end -end - diff --git a/vendor/cache/actionmailer-3.2.22.5.gem b/vendor/cache/actionmailer-3.2.22.5.gem deleted file mode 100644 index a3497705..00000000 Binary files a/vendor/cache/actionmailer-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/actionmailer-4.0.13.gem b/vendor/cache/actionmailer-4.0.13.gem new file mode 100644 index 00000000..b348fa51 Binary files /dev/null and b/vendor/cache/actionmailer-4.0.13.gem differ diff --git a/vendor/cache/actionpack-3.2.22.5.gem b/vendor/cache/actionpack-3.2.22.5.gem deleted file mode 100644 index dea2425e..00000000 Binary files a/vendor/cache/actionpack-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/actionpack-4.0.13.gem b/vendor/cache/actionpack-4.0.13.gem new file mode 100644 index 00000000..0580cb7b Binary files /dev/null and b/vendor/cache/actionpack-4.0.13.gem differ diff --git a/vendor/cache/activemodel-3.2.22.5.gem b/vendor/cache/activemodel-3.2.22.5.gem deleted file mode 100644 index 81f4972b..00000000 Binary files a/vendor/cache/activemodel-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/activemodel-4.0.13.gem b/vendor/cache/activemodel-4.0.13.gem new file mode 100644 index 00000000..7c71d84b Binary files /dev/null and b/vendor/cache/activemodel-4.0.13.gem differ diff --git a/vendor/cache/activerecord-3.2.22.5.gem b/vendor/cache/activerecord-3.2.22.5.gem deleted file mode 100644 index 6f475e05..00000000 Binary files a/vendor/cache/activerecord-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/activerecord-4.0.13.gem b/vendor/cache/activerecord-4.0.13.gem new file mode 100644 index 00000000..c25ff11a Binary files /dev/null and b/vendor/cache/activerecord-4.0.13.gem differ diff --git a/vendor/cache/activerecord-deprecated_finders-1.0.4.gem b/vendor/cache/activerecord-deprecated_finders-1.0.4.gem new file mode 100644 index 00000000..80b73f27 Binary files /dev/null and b/vendor/cache/activerecord-deprecated_finders-1.0.4.gem differ diff --git a/vendor/cache/activeresource-3.2.22.5.gem b/vendor/cache/activeresource-3.2.22.5.gem deleted file mode 100644 index 72b9a3b4..00000000 Binary files a/vendor/cache/activeresource-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/activesupport-3.2.22.5.gem b/vendor/cache/activesupport-3.2.22.5.gem deleted file mode 100644 index a84e5374..00000000 Binary files a/vendor/cache/activesupport-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/activesupport-4.0.13.gem b/vendor/cache/activesupport-4.0.13.gem new file mode 100644 index 00000000..085071e6 Binary files /dev/null and b/vendor/cache/activesupport-4.0.13.gem differ diff --git a/vendor/cache/arel-3.0.3.gem b/vendor/cache/arel-3.0.3.gem deleted file mode 100644 index d113b777..00000000 Binary files a/vendor/cache/arel-3.0.3.gem and /dev/null differ diff --git a/vendor/cache/arel-4.0.2.gem b/vendor/cache/arel-4.0.2.gem new file mode 100644 index 00000000..f26f3fd2 Binary files /dev/null and b/vendor/cache/arel-4.0.2.gem differ diff --git a/vendor/cache/babel-source-5.8.35.gem b/vendor/cache/babel-source-5.8.35.gem new file mode 100644 index 00000000..659bb311 Binary files /dev/null and b/vendor/cache/babel-source-5.8.35.gem differ diff --git a/vendor/cache/babel-transpiler-0.7.0.gem b/vendor/cache/babel-transpiler-0.7.0.gem new file mode 100644 index 00000000..79ec5ec1 Binary files /dev/null and b/vendor/cache/babel-transpiler-0.7.0.gem differ diff --git a/vendor/cache/bcrypt-3.1.10.gem b/vendor/cache/bcrypt-3.1.10.gem deleted file mode 100644 index c460187d..00000000 Binary files a/vendor/cache/bcrypt-3.1.10.gem and /dev/null differ diff --git a/vendor/cache/bcrypt-3.1.19.gem b/vendor/cache/bcrypt-3.1.19.gem new file mode 100644 index 00000000..80b60a37 Binary files /dev/null and b/vendor/cache/bcrypt-3.1.19.gem differ diff --git a/vendor/cache/bcrypt-ruby-3.1.5.gem b/vendor/cache/bcrypt-ruby-3.1.5.gem deleted file mode 100644 index 13886fe5..00000000 Binary files a/vendor/cache/bcrypt-ruby-3.1.5.gem and /dev/null differ diff --git a/vendor/cache/builder-3.0.4.gem b/vendor/cache/builder-3.0.4.gem deleted file mode 100644 index 15c6ee23..00000000 Binary files a/vendor/cache/builder-3.0.4.gem and /dev/null differ diff --git a/vendor/cache/builder-3.1.4.gem b/vendor/cache/builder-3.1.4.gem new file mode 100644 index 00000000..b6090be9 Binary files /dev/null and b/vendor/cache/builder-3.1.4.gem differ diff --git a/vendor/cache/carrierwave-0.8.0.gem b/vendor/cache/carrierwave-0.8.0.gem deleted file mode 100644 index c27d68a7..00000000 Binary files a/vendor/cache/carrierwave-0.8.0.gem and /dev/null differ diff --git a/vendor/cache/carrierwave-1.3.3.gem b/vendor/cache/carrierwave-1.3.3.gem new file mode 100644 index 00000000..48374213 Binary files /dev/null and b/vendor/cache/carrierwave-1.3.3.gem differ diff --git a/vendor/cache/concurrent-ruby-1.1.10.gem b/vendor/cache/concurrent-ruby-1.1.10.gem new file mode 100644 index 00000000..c796701b Binary files /dev/null and b/vendor/cache/concurrent-ruby-1.1.10.gem differ diff --git a/vendor/cache/concurrent-ruby-1.1.9.gem b/vendor/cache/concurrent-ruby-1.1.9.gem deleted file mode 100644 index 9ed64f26..00000000 Binary files a/vendor/cache/concurrent-ruby-1.1.9.gem and /dev/null differ diff --git a/vendor/cache/connection_pool-2.2.5.gem b/vendor/cache/connection_pool-2.2.5.gem new file mode 100644 index 00000000..923bb40c Binary files /dev/null and b/vendor/cache/connection_pool-2.2.5.gem differ diff --git a/vendor/cache/devise-2.2.8.gem b/vendor/cache/devise-2.2.8.gem deleted file mode 100644 index fef6633b..00000000 Binary files a/vendor/cache/devise-2.2.8.gem and /dev/null differ diff --git a/vendor/cache/devise-3.5.10.gem b/vendor/cache/devise-3.5.10.gem new file mode 100644 index 00000000..64aa8acc Binary files /dev/null and b/vendor/cache/devise-3.5.10.gem differ diff --git a/vendor/cache/globalize-4.0.3.gem b/vendor/cache/globalize-4.0.3.gem new file mode 100644 index 00000000..72961f99 Binary files /dev/null and b/vendor/cache/globalize-4.0.3.gem differ diff --git a/vendor/cache/journey-1.0.4.gem b/vendor/cache/journey-1.0.4.gem deleted file mode 100644 index 86c3661b..00000000 Binary files a/vendor/cache/journey-1.0.4.gem and /dev/null differ diff --git a/vendor/cache/json-1.8.6.gem b/vendor/cache/json-1.8.6.gem deleted file mode 100644 index 2a7d6648..00000000 Binary files a/vendor/cache/json-1.8.6.gem and /dev/null differ diff --git a/vendor/cache/json-2.5.1.gem b/vendor/cache/json-2.5.1.gem new file mode 100644 index 00000000..dc2477a1 Binary files /dev/null and b/vendor/cache/json-2.5.1.gem differ diff --git a/vendor/cache/mail-2.5.5.gem b/vendor/cache/mail-2.5.5.gem deleted file mode 100644 index 7d232085..00000000 Binary files a/vendor/cache/mail-2.5.5.gem and /dev/null differ diff --git a/vendor/cache/mail-2.7.1.gem b/vendor/cache/mail-2.7.1.gem new file mode 100644 index 00000000..066ef0f0 Binary files /dev/null and b/vendor/cache/mail-2.7.1.gem differ diff --git a/vendor/cache/mini_mime-1.1.2.gem b/vendor/cache/mini_mime-1.1.2.gem new file mode 100644 index 00000000..6e794650 Binary files /dev/null and b/vendor/cache/mini_mime-1.1.2.gem differ diff --git a/vendor/cache/minitest-4.7.5.gem b/vendor/cache/minitest-4.7.5.gem new file mode 100644 index 00000000..24410e25 Binary files /dev/null and b/vendor/cache/minitest-4.7.5.gem differ diff --git a/vendor/cache/paper_trail-2.7.2.gem b/vendor/cache/paper_trail-2.7.2.gem deleted file mode 100644 index b2342277..00000000 Binary files a/vendor/cache/paper_trail-2.7.2.gem and /dev/null differ diff --git a/vendor/cache/polyglot-0.3.5.gem b/vendor/cache/polyglot-0.3.5.gem deleted file mode 100644 index 5e43bae9..00000000 Binary files a/vendor/cache/polyglot-0.3.5.gem and /dev/null differ diff --git a/vendor/cache/rack-1.4.7.gem b/vendor/cache/rack-1.4.7.gem deleted file mode 100644 index 77e8cf8a..00000000 Binary files a/vendor/cache/rack-1.4.7.gem and /dev/null differ diff --git a/vendor/cache/rack-1.5.5.gem b/vendor/cache/rack-1.5.5.gem new file mode 100644 index 00000000..488f5c0c Binary files /dev/null and b/vendor/cache/rack-1.5.5.gem differ diff --git a/vendor/cache/rack-cache-1.7.1.gem b/vendor/cache/rack-cache-1.7.1.gem deleted file mode 100644 index e051b1ea..00000000 Binary files a/vendor/cache/rack-cache-1.7.1.gem and /dev/null differ diff --git a/vendor/cache/rack-ssl-1.3.4.gem b/vendor/cache/rack-ssl-1.3.4.gem deleted file mode 100644 index ea259917..00000000 Binary files a/vendor/cache/rack-ssl-1.3.4.gem and /dev/null differ diff --git a/vendor/cache/rails-3.2.22.5.gem b/vendor/cache/rails-3.2.22.5.gem deleted file mode 100644 index 57f78030..00000000 Binary files a/vendor/cache/rails-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/rails-4.0.13.gem b/vendor/cache/rails-4.0.13.gem new file mode 100644 index 00000000..b4594f3c Binary files /dev/null and b/vendor/cache/rails-4.0.13.gem differ diff --git a/vendor/cache/rails-i18n-3.0.1.gem b/vendor/cache/rails-i18n-3.0.1.gem deleted file mode 100644 index 8efe66dd..00000000 Binary files a/vendor/cache/rails-i18n-3.0.1.gem and /dev/null differ diff --git a/vendor/cache/rails-i18n-4.0.9.gem b/vendor/cache/rails-i18n-4.0.9.gem new file mode 100644 index 00000000..4da36c05 Binary files /dev/null and b/vendor/cache/rails-i18n-4.0.9.gem differ diff --git a/vendor/cache/rails-observers-0.1.5.gem b/vendor/cache/rails-observers-0.1.5.gem new file mode 100644 index 00000000..c673b989 Binary files /dev/null and b/vendor/cache/rails-observers-0.1.5.gem differ diff --git a/vendor/cache/railties-3.2.22.5.gem b/vendor/cache/railties-3.2.22.5.gem deleted file mode 100644 index 6c4160a2..00000000 Binary files a/vendor/cache/railties-3.2.22.5.gem and /dev/null differ diff --git a/vendor/cache/railties-4.0.13.gem b/vendor/cache/railties-4.0.13.gem new file mode 100644 index 00000000..454a6968 Binary files /dev/null and b/vendor/cache/railties-4.0.13.gem differ diff --git a/vendor/cache/rake-12.2.1.gem b/vendor/cache/rake-12.2.1.gem deleted file mode 100644 index d43b8807..00000000 Binary files a/vendor/cache/rake-12.2.1.gem and /dev/null differ diff --git a/vendor/cache/rake-13.0.6.gem b/vendor/cache/rake-13.0.6.gem new file mode 100644 index 00000000..19ae8028 Binary files /dev/null and b/vendor/cache/rake-13.0.6.gem differ diff --git a/vendor/cache/rdoc-3.12.2.gem b/vendor/cache/rdoc-3.12.2.gem deleted file mode 100644 index 5e245253..00000000 Binary files a/vendor/cache/rdoc-3.12.2.gem and /dev/null differ diff --git a/vendor/cache/react-rails-0.8.0.0.gem b/vendor/cache/react-rails-0.8.0.0.gem deleted file mode 100644 index 68761c11..00000000 Binary files a/vendor/cache/react-rails-0.8.0.0.gem and /dev/null differ diff --git a/vendor/cache/react-rails-2.7.1.gem b/vendor/cache/react-rails-2.7.1.gem new file mode 100644 index 00000000..55d11d34 Binary files /dev/null and b/vendor/cache/react-rails-2.7.1.gem differ diff --git a/vendor/cache/react-source-0.8.0.gem b/vendor/cache/react-source-0.8.0.gem deleted file mode 100644 index 6ea3fd31..00000000 Binary files a/vendor/cache/react-source-0.8.0.gem and /dev/null differ diff --git a/vendor/cache/responders-1.1.2.gem b/vendor/cache/responders-1.1.2.gem new file mode 100644 index 00000000..361ec205 Binary files /dev/null and b/vendor/cache/responders-1.1.2.gem differ diff --git a/vendor/cache/sass-rails-3.2.6.gem b/vendor/cache/sass-rails-3.2.6.gem deleted file mode 100644 index 6158bf4b..00000000 Binary files a/vendor/cache/sass-rails-3.2.6.gem and /dev/null differ diff --git a/vendor/cache/sass-rails-4.0.5.gem b/vendor/cache/sass-rails-4.0.5.gem new file mode 100644 index 00000000..62f962ea Binary files /dev/null and b/vendor/cache/sass-rails-4.0.5.gem differ diff --git a/vendor/cache/sprockets-2.12.5.gem b/vendor/cache/sprockets-2.12.5.gem new file mode 100644 index 00000000..b97b7499 Binary files /dev/null and b/vendor/cache/sprockets-2.12.5.gem differ diff --git a/vendor/cache/sprockets-2.2.3.gem b/vendor/cache/sprockets-2.2.3.gem deleted file mode 100644 index e49b90bd..00000000 Binary files a/vendor/cache/sprockets-2.2.3.gem and /dev/null differ diff --git a/vendor/cache/sprockets-rails-2.3.3.gem b/vendor/cache/sprockets-rails-2.3.3.gem new file mode 100644 index 00000000..515bd24b Binary files /dev/null and b/vendor/cache/sprockets-rails-2.3.3.gem differ diff --git a/vendor/cache/ssrf_filter-1.0.8.gem b/vendor/cache/ssrf_filter-1.0.8.gem new file mode 100644 index 00000000..fb73216f Binary files /dev/null and b/vendor/cache/ssrf_filter-1.0.8.gem differ diff --git a/vendor/cache/thor-0.20.3.gem b/vendor/cache/thor-0.20.3.gem deleted file mode 100644 index 9a88db7b..00000000 Binary files a/vendor/cache/thor-0.20.3.gem and /dev/null differ diff --git a/vendor/cache/thor-1.2.2.gem b/vendor/cache/thor-1.2.2.gem new file mode 100644 index 00000000..7b26ebed Binary files /dev/null and b/vendor/cache/thor-1.2.2.gem differ diff --git a/vendor/cache/thread_safe-0.3.6.gem b/vendor/cache/thread_safe-0.3.6.gem new file mode 100644 index 00000000..7ee950f8 Binary files /dev/null and b/vendor/cache/thread_safe-0.3.6.gem differ diff --git a/vendor/cache/treetop-1.4.15.gem b/vendor/cache/treetop-1.4.15.gem deleted file mode 100644 index 0a621ef3..00000000 Binary files a/vendor/cache/treetop-1.4.15.gem and /dev/null differ diff --git a/vendor/cache/warden-1.2.3.gem b/vendor/cache/warden-1.2.3.gem deleted file mode 100644 index 3b0e4c22..00000000 Binary files a/vendor/cache/warden-1.2.3.gem and /dev/null differ diff --git a/vendor/cache/warden-1.2.7.gem b/vendor/cache/warden-1.2.7.gem new file mode 100644 index 00000000..49fb8082 Binary files /dev/null and b/vendor/cache/warden-1.2.7.gem differ