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

Rails 5.2 + Yarn + Tests + Static routing and more #530

Merged
merged 85 commits into from Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 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
4c32adc
Upgrading rails and aiding gems
alaxalves Jun 15, 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
e038dcf
Using migration for > Rails 5
alaxalves Jun 22, 2020
b866c4f
Merge branch 'development' of github.com:publiclab/spectral-workbench…
alaxalves Jun 22, 2020
8d69adb
Removing deprecated directive from application.rb
alaxalves Jun 22, 2020
29b18b0
Using ruby newer sintax
alaxalves Jun 22, 2020
f51b6a5
Using proper Passenger server
alaxalves Jun 22, 2020
b04387c
Merge branch 'development' of github.com:publiclab/spectral-workbench…
alaxalves Jun 22, 2020
679aad2
Using new naming pattern for models and controllers test folder
alaxalves Jun 23, 2020
1833f77
Removing unwanted files and moving to proper place
alaxalves Jun 23, 2020
c6faf5d
Adding files required by Rails >5 pattern
alaxalves Jun 23, 2020
c478277
Using new task pattern for functional tests
alaxalves Jun 23, 2020
b9b857b
Updating binaries
alaxalves Jun 23, 2020
25ebe1a
Updating initializers and config files
alaxalves Jun 23, 2020
a04caf4
Adding listen and bootsnap gems
alaxalves Jun 23, 2020
b60f70e
Fixing helpers test path
alaxalves Jun 23, 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
0415bc7
Merge branch 'development' of github.com:publiclab/spectral-workbench…
alaxalves Jul 7, 2020
4de9e81
Removing deprecated_finders gem due to Rails 5 incompatibility
alaxalves Jul 7, 2020
eddd0b7
Fixing a LOT of tests
alaxalves Jul 9, 2020
3406072
Adding required test libs
alaxalves Jul 9, 2020
bff3c51
Fixing mostly sintax and other stuff
alaxalves Jul 9, 2020
2411c88
Fixing all remaining tests
alaxalves Jul 19, 2020
993f86f
Changing Makefile init cmd
alaxalves Jul 19, 2020
7e3b125
Removing bower in favor of yarn
alaxalves Jul 20, 2020
c6b0106
Using yarn in travis too
alaxalves Jul 26, 2020
4ebbd15
Merge pull request #527 from publiclab/feat/yarn
alaxalves Jul 26, 2020
404c33b
Merge pull request #516 from publiclab/feat/rails5
alaxalves Jul 28, 2020
775a36b
Merge branch 'main' of github.com:publiclab/spectral-workbench into d…
alaxalves Jul 28, 2020
0eac3e7
Removing @bower_components wrapper and polish some other stuff
alaxalves Jul 28, 2020
b29dc9b
Removing old homolog containers
alaxalves Jul 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

File renamed without changes.
47 changes: 0 additions & 47 deletions .github/first-timers-issue-template.md

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -38,4 +38,6 @@ public/lib
public/assets
vendor/
db/schema.rb
coverage/
coverage/

yarn-error.log
15 changes: 7 additions & 8 deletions .travis.yml
Expand Up @@ -33,30 +33,29 @@ before_install:

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;
bundle exec rake db:migrate;
else
yarn check || yarn install;
bundle exec rake db:create;
bundle exec rake db:schema:load;
bundle exec rake db:migrate;
fi

jobs:
include:
- name: "Unit Tests"
script: rake test:units
- name: "Models Tests"
script: rails test:models
- name: "Helpers Tests"
script: ruby -I test test/unit/helpers/*.rb
- name: "Functional Tests"
script: rake test:functionals
script: ruby -I test test/models/helpers/*.rb
- name: "Controllers Tests"
script: rails test:controllers
- name: "Integration Tests"
script: rake test:integration
script: rails test:integration
- name: "Docker Builds"
script: docker build -t swbench .
- name: "Asset Precompilation"
Expand Down
3 changes: 3 additions & 0 deletions .yarnrc
@@ -0,0 +1,3 @@
--install.modules-folder public/lib/
--install.ignore-engines true
--install.ignore-scripts true
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -29,7 +29,7 @@ RUN sed -i '/.*jessie-updates.*/d' /etc/apt/sources.list && \

RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - && \
apt-get install -y nodejs npm && \
npm install -g bower
npm install -g yarn

# Add the Rails app
WORKDIR /app
Expand Down
31 changes: 16 additions & 15 deletions Gemfile
@@ -1,8 +1,7 @@
source 'https://rubygems.org'
#source 'https://rails-assets.org'

ruby '~>2.6.5'
gem 'rails', '~>4.2.8'
ruby '2.6.5'
gem 'rails', '~> 5.2.4.3'

# Database handling
group :mysql do
Expand All @@ -19,32 +18,34 @@ group :assets do
end

group :test do
gem 'simplecov', require: false
gem 'simplecov', require: false
gem 'rails-controller-testing', '~> 1.0.5'
end

gem 'responders', '~> 2.0'
gem 'bootsnap', '~> 1.4.6'
gem 'listen', '~> 3.2.1'
gem 'responders', '~> 3.0.1'
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 'recaptcha', '5.5.0', require: "recaptcha/rails"
gem 'terrapin', '~> 0.6.0'
gem 'redcarpet', '~> 3.5.0'
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.3.0'
gem 'will_paginate-bootstrap', '~>1.0.2'
gem 'rdiscount', '2.2.0.1'
gem 'will_paginate', '~> 3.3.0'
gem 'will_paginate-bootstrap', '~> 1.0.2'
gem 'paperclip', '>= 4.1.1'

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

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

gem 'rack-offline', '>=0.6.4'
gem 'rack-offline', '>= 0.6.4'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
Expand Down