Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade: Ruby 2.6, Rails 4.2 and Node 13 #499

Merged
merged 57 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c432145
Fix test fixtures
Mar 27, 2020
9e81792
Upgrading ruby and rails version
alaxalves Mar 31, 2020
a22780b
Using newer sintax and deprecating a couple modules
alaxalves Mar 31, 2020
74c1b31
Upgrading minimum gemset needed
alaxalves Mar 31, 2020
6ef3947
Running update task
alaxalves Mar 31, 2020
59092d9
Installing Bower properly on Travis
alaxalves Apr 2, 2020
e384519
Fixing tests
alaxalves Apr 2, 2020
6f30bd2
Add SimpleCov for coverage monitoring
Apr 13, 2020
eedddb7
syntax changes and error fixes
Apr 14, 2020
904b2e2
Merge pull request #1 from gr455/upgrade-ruby
alaxalves Apr 14, 2020
6229ef0
add route to create and more syntax changes to fix errors
Apr 16, 2020
99850bb
fix integration tests
Apr 22, 2020
e097237
Merge pull request #2 from gr455/upgrade-ruby
alaxalves Apr 22, 2020
142b533
Monkeypatch Rails 4.2 tests to work with Ruby 2.6
alaxalves Apr 23, 2020
96a2126
fix few functional tests
Apr 23, 2020
7df4715
fix functional tests
Apr 27, 2020
1f615da
Fix all functional and unit tests
Apr 27, 2020
987782a
Merge pull request #3 from gr455/upgrade-ruby
alaxalves Apr 27, 2020
eb0e7e1
Fixing asset precompilation stage
alaxalves Apr 28, 2020
78f655f
Updating schema file
alaxalves Apr 28, 2020
4dfc447
Merge pull request #495 from alaxalves/upgrade-ruby
alaxalves Apr 28, 2020
a22b423
rebase current branch on development
gr455 May 12, 2020
4445d6b
update gemfile lock
gr455 May 12, 2020
e2032a9
Merge pull request #496 from gr455/simplecovrails
alaxalves May 12, 2020
09e0cc8
Add filters to code coverage
alaxalves May 21, 2020
fa1bced
Add dynamic PORT and remove legacy startup scripts
icarito May 21, 2020
80cbaca
Add RAILS_ENV
icarito May 21, 2020
a8b8dc3
add comments tests
gr455 May 27, 2020
5a5695f
Merge pull request #493 from gr455/fixturesfix2
alaxalves May 27, 2020
8304cd1
Merge pull request #509 from gr455/testcov5
alaxalves May 27, 2020
5a7301f
Merge branch 'main' of https://github.com/publiclab/spectral-workbenc…
alaxalves May 27, 2020
f2b9dca
Add sessions tests
gr455 May 28, 2020
e0c6402
Add user controller tests and fix syntax
gr455 May 28, 2020
d201f33
Merge pull request #511 from gr455/testcov5
alaxalves May 30, 2020
a2e851b
add more tests
gr455 Jun 1, 2020
99f9323
Merge pull request #514 from gr455/testcov5
alaxalves Jun 3, 2020
4b06530
Adding needed envs for deploy
alaxalves Jun 5, 2020
6c2dc8e
Merge branch 'development' of https://github.com/publiclab/spectral-w…
alaxalves Jun 5, 2020
0410a93
Using proper production host
alaxalves Jun 13, 2020
1b06885
Changing volume name
alaxalves Jun 13, 2020
d57da4b
Merge branch 'main' of https://github.com/publiclab/spectral-workbenc…
alaxalves Jun 15, 2020
4d60605
Upgrade MySQL version to 5.7
alaxalves Jun 20, 2020
c2c2d84
Using root credentials
alaxalves Jun 20, 2020
74d51fc
Using new sintax and fix regex pattern on security issues on macro model
alaxalves Jun 20, 2020
f51b6a5
Using proper Passenger server
alaxalves Jun 22, 2020
05932ed
Add Makefile to SW's Jenkins workflow
alaxalves Jun 26, 2020
eed7de5
Retriggering deploy after cleanup
alaxalves Jun 26, 2020
1283ee4
Removing unwanted flag and cmd
alaxalves Jun 26, 2020
359e6ec
Setting port
alaxalves Jun 26, 2020
88eb678
Testing fix for unwanted redirection
alaxalves Jun 26, 2020
8f6e0b4
More tests and syntax changes
gr455 Jun 26, 2020
bf42548
Merge pull request #518 from gr455/testcov6
alaxalves Jun 27, 2020
c792041
Adding deprecated finders gem -- for now
alaxalves Jul 2, 2020
5cf3a60
Removing lat, lon requirement to prevent 500 status on spectrum saving
alaxalves Jul 2, 2020
5e1a4c1
Using strong params instead of attr_accessible
alaxalves Jul 2, 2020
eca187a
Fixing syntax for newer rails
alaxalves Jul 2, 2020
f516afb
Resetting schema
alaxalves Jul 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ language: ruby
dist: trusty

rvm:
- 2.1.2
- 2.6.5

node_js:
- "0.10.29"
- 13

env:
global:
- RAILS_ENV=test
- DB_HOST='127.0.0.1'
- DB_USER='swbench'
- DB_PASS='swbench'
- DB_NAME='swbench'

cache:
directories:
Expand All @@ -21,22 +25,26 @@ services:
- docker
- mysql

install:
before_install:
- cp config/database.yml.example config/database.yml
- cp config/config.yml.example config/config.yml
- cp db/schema.rb.example db/schema.rb
- bundle config set path './vendor/.bundle/' && bundle install
- bundle config set path 'vendor/.bundle/'

install:
- bundle install
- npm install -g bower
- bower install --allow-root
- if [ $RAILS_ENV == 'production' ]; then
mysql -e "CREATE DATABASE swbench;";
mysql -e "CREATE USER 'swbench'@'%' IDENTIFIED BY 'swbench';";
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'swbench'@'%';";
bundle exec rake db:schema:load;
npm install -g bower;
bower install --allow-root;
bundle exec rake db:migrate;
else
bower install --allow-root;
bundle exec rake db:create;
bundle exec rake db:schema:load || bundle exec rake db:migrate;
bundle exec rake db:schema:load;
bundle exec rake db:migrate;
fi

jobs:
Expand All @@ -49,8 +57,6 @@ jobs:
script: rake test:functionals
- name: "Integration Tests"
script: rake test:integration
- name: "Performance Tests"
script: ruby -I test test/performance/*.rb
- name: "Docker Builds"
script: docker build -t swbench .
- name: "Asset Precompilation"
Expand Down
25 changes: 7 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Dockerfile # Spectral Workbench
# https://github.com/publiclab/spectral-workbench

FROM ruby:2.1
FROM ruby:2.6.5-stretch

LABEL maintainer="Sebastian Silva <sebastian@fuentelibre.org>"
LABEL description="This image deploys Spectral Worbench!"
LABEL description="This image deploys Spectral Workbench!"

# Set correct environment variables.
ENV HOME /root

# Install dependencies
RUN sed -i '/.*jessie-updates.*/d' /etc/apt/sources.list
RUN apt-get update -qq && \
RUN sed -i '/.*jessie-updates.*/d' /etc/apt/sources.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends \
imagemagick \
ruby-rmagick \
libmagickwand-dev \
libmagick++-dev \
ruby-rmagick \
libfreeimage3 \
libfreeimage-dev \
gdal-bin \
Expand All @@ -26,24 +25,14 @@ RUN apt-get update -qq && \
libcurl4-openssl-dev \
libssl-dev \
zip \
nodejs-legacy \
npm \
netcat

RUN npm install -g bower

# Install bundle of gems
WORKDIR /tmp
ADD Gemfile /tmp/Gemfile
ADD Gemfile.lock /tmp/Gemfile.lock
RUN bundle install
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - && \
apt-get install -y nodejs npm && \
npm install -g bower

# Add the Rails app
WORKDIR /app
COPY . /app
ENV GIT_DIR=/app

RUN apt-get remove -y zip \
curl

ENTRYPOINT ["sh", "script/start.sh"]
21 changes: 10 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
source 'https://rubygems.org'
#source 'https://rails-assets.org'

ruby '~>2.1.2'
gem 'rails', '~>3.2'
ruby '~>2.6.5'
gem 'rails', '~>4.2.8'

# Database handling
group :sqlite do
gem 'sqlite3'
end

group :mysql do
gem 'mysql2', '~> 0.3.10'
gem 'mysql2', '~> 0.5.3'
end

# Gems used only for assets and not required
Expand All @@ -26,22 +22,25 @@ group :test do
gem 'simplecov', require: false
end

gem 'responders', '~> 2.0'
gem 'rmagick'#, :require => "RMagick"
gem 'mime-types'#, '1.18'
gem 'jquery-rails'
gem 'passenger'
gem 'recaptcha', '3.0.0', :require => "recaptcha/rails"
gem 'cocaine', '~>0.5.3'
gem 'redcarpet', '2.1.1'
gem "skylight" # performance tracking via skylight.io
gem 'skylight' # performance tracking via skylight.io
gem 'activerecord-deprecated_finders', require: 'active_record/deprecated_finders'

gem 'rdiscount', '1.6.8'
gem 'will_paginate', '3.0.7'
gem 'will_paginate-bootstrap', '0.2.5'
gem 'will_paginate', '~>3.3.0'
gem 'will_paginate-bootstrap', '~>1.0.2'
gem 'paperclip', '>= 4.1.1'

gem 'tzinfo', '0.3.49'
gem 'tzinfo', '~>1.1'

gem 'protected_attributes', '~>1.1.4'
gem 'ruby-openid'
gem 'open_id_authentication'

Expand Down
Loading