Skip to content

Commit

Permalink
Rails 5.0 upgrade (#2726) (#2783)
Browse files Browse the repository at this point in the history
* Rails 5.0 upgrade (#2726)

* Upgraded the .gitignore according to rails diff

* Initial Gemfile update

* Update README.md

* Showing message at the top of upgrade page (#2713)

* added an upgrade alert tag

* Additional questions page tweak (#2721)

* added the tag to determine which upgrade is listed on the website

* changed regex back

* added an upgrade alert tag

* added the tag to determine which upgrade is listed on the website

* changed regex back

* added upgrade after pull and rebase master

* Upgrade to Rails 5

* Uncommented composite_primary_key gem

* Removed the dual occurence of rails_autolink

* Update readme installation, fixes #2729 (#2730)

Updates the readme to change the installation instructions, fixes #2729

* Commented activerecord-tableless

* Draft display on Dashboard (#2666)

* draft display on dashboard

* moderator file view permitted

* checking

* fix

* test fix

* Added and modified few config files according to railsdiff.org

* Removed mass_assignment_sanitizer

* Removed composite primary key gem

* Removed all attr_accessible in all models

* Added composite_primary_key gem again

* Downgraded rails and removed few attr_accessible commands

* Added strong parameters to the controllers

* Added strong parameters gem and also include params.require inside private methods

* Added strongparameters.rb file to initializers folder

* Removed unnecessary strong_parameter functions

* Removed some errors

* Changed test command temporarily in .travis.yml

* Corrected config/puma.rb file with adding some assets

* Added all the config.precompile files in one line

* Removed error of problem in updating of user profile

* Removed the error while creating a user

* Removed error RecordNotFound: Couldn't find Node with 'nid'=

* Removed some errors related to ids

* Removed comment.reload in comment_controller_test

* Track Dockerfiles accross instances. (#2593)

* Track Dockerfiles accross instances.

* Specify jessie as base

* Add commands to build&deploy container with Makefile. (#2746)

* Added Sample Cron Job to check working of Whenever Gem (#2715)

*  Added Sample Cron Job to test Whenever Gem

* Added make targets for deployment and cron service start

* Added make to image

* Tweak Makefile

* Fix cron starting command in Makefile

* Trim whitespace

* Explicitly set jessie as base container

* Fixed codeclimate issues

* Auto-set wiki slug (#2743)

* Added keyword arguments to the tag_model.rb

* changed the query statement in search method of node.rb

* Force removal of pid file (see
docker/compose#1393)

* Updated the tests due to change in arguments of search function in node.rb

* Removed all the failures from tag_controller_test.rb

* Changed the style of params in notes_controller_test.rb

* Removed all depreciation warnings related to notes_controller

* Removed all deprecation warnings related to image_controller and answers_controller

* Removed all deprecation warnings of like_controller and fixed syntax error of answer_controller_test.rb

* Removed all dep warnings of editor_controller and syntax error of like_controller_test.rb

* removed all errors of answer_controller and some errors of tag_controller.rb

* Removed all dep warnings of tag_controller_test.rb

* Removed several dep warnings

* Removed dep warnings of wiki_controller

* Removed dep warnings of talk_controller

* Removed dep warnings of legacy_controller_test.rb

* Removed some warnings related to comment_controller

* Removed the syntax errors

* Removed two failures regarding application/xml+rss

* Removed 2 failures due to wrong way of passing parameters in tests

* Removed 2 failures

* Fix params

* Remove deprecations

* Removed some dep warnings

* Remove deprecations

* Reverted to nothing => true

* Reverted to nothing => true

* Avoid rendering more than once in the same action

* Removed all dep warnings related to user_tags_controller_test

* Remove deprecation

* Removed Dep warnings

* Fix deprecation

* Replace before_filter

* Remove deprecation

* Remove deprecation

* Remove deprecation

* Remove deprecation

* Bump Ruby version to match Travis'

* Simplify email regex to work with Ruby 2.4.1

* Changed the ruby version in Dockerfile

* Remove deprecation

* Remove deprecation

* Removed the depreciation warning related to dynamic :controller and :action segment in routes

* Changed the default ActiveRecord to ApplicationRecord in models

* Clean Gemfile

* Reverted to ['nid'] in tag_controller_test.rb

* Changed the tests to rake test:all in .travis.yml

* Minor spacing correction in .travis.yml

* added a commit in application.js an application.css regarding the precompilation of files

* Added more indentation

* Small fixes

* Separated the rails test and jasmine and coveralls task

* Modified ['nid'] to ['node']['nid']

* Removed the extra puts in Rakefile

* Changed the serial of tests

* Added rake/testtask to Rakefile

* Removed puma

* Changed to ruby 2.4.1-jessie

* Removed the whitelist_attributes command from config/application.rb

* Removed two failures due to old usage of params

* Fixed some new deprecation warnigs introduced
  • Loading branch information
jywarren authored Jun 7, 2018
1 parent 43a49e1 commit 5597698
Show file tree
Hide file tree
Showing 102 changed files with 991 additions and 1,054 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Ignore all logfiles and tempfiles.
log/*.log
log/*
tmp
/tmp/*
data
*.swp
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ install:

script:
- docker-compose exec web bash -c "CI=TRUE GENERATE_REPORT=true rake test:all"
- docker-compose exec web bash -c "CI=TRUE GENERATE_REPORT=true rails test -d"
- echo -e '<?xml version="1.0" encoding="UTF-8"?>' > output.xml
- tail -n +2 -q ./test/reports/TEST*.xml >> output.xml
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then danger --verbose; fi'
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile # Plots2
# https://github.com/publiclab/plots2

FROM ruby:2.3-jessie
FROM ruby:2.4.1-jessie

LABEL maintainer="Sebastian Silva <[email protected]>"
LABEL description="This image deploys Plots2."
Expand Down
151 changes: 61 additions & 90 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,65 @@
source 'https://rubygems.org'
ruby '2.4.1'

gem 'rails', '~> 4.2.10'
ruby '2.3.7'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

gem 'rails', '5.0.6'
gem 'activerecord-session_store'
gem 'protected_attributes'
gem 'passenger'

gem 'rails-i18n', '~> 4.0.0'
gem 'responders', '~> 2.0' # for Rails 4.2

gem 'turbolinks'
gem 'sidekiq'

# Whenever provides a clear syntax for writing and deploying cron jobs
gem 'rails-i18n', '~> 5.1.1'
gem 'responders', '~> 2.0'
gem 'turbolinks', '~> 5'
gem 'whenever', require: false
gem 'unicode-emoji'
gem 'gemoji'
gem "composite_primary_keys"
gem 'jquery-rails'
gem 'rdiscount', '~> 2.2', '>= 2.2.0.1'
gem 'will_paginate', '>= 3.0.6'
gem 'will_paginate-bootstrap', '>= 1.0.1'
gem 'georuby', '2.0'
gem 'geokit-rails'
gem 'rails_autolink'
gem 'rb-readline'
gem "paperclip", "~> 5.2.0"
gem "ruby-openid", :require => "openid"
gem "rack-openid"
gem "authlogic", "4.1.0"
gem 'authlogic-oid'
gem "php-serialize", :require => "php_serialize"
gem 'less-rails', '~> 3.0'
gem 'progress_bar'
gem 'impressionist'
gem "recaptcha", require: "recaptcha/rails"
gem 'grape'
gem 'grape-entity'
gem 'grape-swagger', '~> 0.28.0'
gem 'grape-swagger-entity', '= 0.1.5'
gem 'grape-swagger-rails'
gem 'grape-swagger-ui'
gem 'rack-cors', :require => 'rack/cors'
gem 'mocha', '~> 1.1'
gem 'geocoder'
gem "i18n-js", ">= 3.0.0.rc11"
gem 'http_accept_language'
gem 'friendly_id'
gem 'jbuilder', '~> 2.5'
gem 'mustermann' , '1.0.2'
gem 'rails-dom-testing'
gem 'omniauth', '~> 1.3', '>= 1.3.1'
gem 'omniauth-facebook', '~> 3.0'
gem 'omniauth-google-oauth2'
gem 'omniauth-twitter'
gem 'omniauth-github', '~> 1.1', '>= 1.1.2'
gem 'figaro'
gem 'sanitize'
gem 'tzinfo-data', platforms: %i(mingw mswin x64_mingw jruby)
gem 'rails-controller-testing'


# To implement incoming mail processing microframework
gem 'mailman', require: false
Expand All @@ -28,39 +73,30 @@ group :mysql, :production do
# mysql 0.4.3+ causes a version mismatch, apparently, and demands 'activerecord-mysql2-adapter'
end

# ships with sqlite set up for easy setup during development
# run with `bundle install --without development` or `bundle install --without sqlite` to exclude this
group :sqlite, :development do
gem 'sqlite3'
end

#group :postgresql do
# gem "activerecord-postgresql-adapter"
#end

# Gems used only for assets and not required in production environments by default.
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'sass-rails', '~> 5.0', '>= 5.0.7'
gem 'coffee-rails', '~> 4.2.2'
gem 'execjs' # See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'

# run with `bundle install --without development` to exclude these
group :development do
gem 'web-console', '~> 2.0'
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
gem "letter_opener"
gem "nifty-generators"
gem 'byebug'
gem 'byebug', platform: :mri
gem 'rubocop', '~> 0.52.1', require: false
end

# run with `bundle install --without test` to exclude these
group :test, :development do
gem 'test-unit'
gem 'rails-perftest'
gem 'minitest-reporters', '~> 1.1.19'
gem 'rake', '~> 10.5.0'
# gems to test RESTful API
gem 'rake', '~> 12.3.1'
gem 'rest-client'
gem 'rspec'
gem 'json_expressions'
Expand All @@ -72,71 +108,6 @@ group :test, :development do
gem 'openssl', '~> 2.0.0.beta.1'
end

# run with `bundle install --without production` to exclude these
group :production do
gem "scrypt", "~> 3"
end

gem 'unicode-emoji'
gem 'gemoji'

gem "skylight" # performance tracking via skylight.io

gem 'composite_primary_keys'
gem 'jquery-rails'
gem 'rdiscount', '~> 2.2', '>= 2.2.0.1' # Markdown
gem 'will_paginate', '>= 3.0.6'
gem 'will_paginate-bootstrap', '>= 1.0.1'
# could be deprecated:
gem 'georuby', '2.0'
gem 'geokit-rails'

gem 'rails_autolink'
gem 'rb-readline'
gem "paperclip", "~> 5.2.0"
gem "ruby-openid", :require => "openid"
gem "rack-openid"
gem "authlogic", "~> 3.5.0"
gem 'authlogic-oid'
gem "php-serialize", :require => "php_serialize"
gem 'less-rails', '~> 2.6'
gem 'progress_bar'
gem 'impressionist'
gem "recaptcha", require: "recaptcha/rails"

# RESTful API Support
gem 'grape'
gem 'grape-entity'
gem 'grape-swagger', '~> 0.25.3' # later versions require
gem 'grape-swagger-entity', '= 0.1.5' # Ruby 2.2 or later
gem 'grape-swagger-rails'
gem 'grape-swagger-ui'
gem 'rack-cors', :require => 'rack/cors'

gem 'mocha', '~> 1.1'

gem 'geocoder'
gem "i18n-js", ">= 3.0.0.rc11"
gem 'http_accept_language'

# The default friendly_id version compatible with Rails 3 is v4.0
gem 'friendly_id'
gem 'jbuilder'
#gem 'strong_parameters'

# Pin mustermann to Ruby 2.1 compatible
gem 'mustermann' , '~> 0.4'

#Gem for assertions used in testing
gem 'rails-dom-testing'
#OAuth Based login
gem 'omniauth', '~> 1.3', '>= 1.3.1'
gem 'omniauth-facebook', '~> 3.0'
gem 'omniauth-google-oauth2'
gem 'omniauth-twitter'
gem 'omniauth-github', '~> 1.1', '>= 1.1.2'

#Gem for making tableless models
gem 'activerecord-tableless'
gem 'figaro'
gem 'sanitize'
Loading

0 comments on commit 5597698

Please sign in to comment.