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

Yarn upgrade #702

Merged
merged 17 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ todo.txt
.byebug_history
coverage_report/
test/reports/
yarn-error.log

9 changes: 7 additions & 2 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
require 'simplecov-cobertura'

if ENV['CI'] == 'true'
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
else
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
end

SimpleCov.start 'rails' do
add_group 'Units', 'app/models'
add_group 'Functionals', 'app/controllers'
add_group 'Services', 'app/services'
add_group 'Libraries', 'lib/'

add_filter '/test/'
add_filter '/config/'
add_filter '/db/'
add_filter '/vendor/'
add_filter '/log/'
add_filter '/tmp/'
end
52 changes: 33 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,51 @@
sudo: required

language: generic
language: ruby
rvm:
- 2.4.6

services:
- mysql
- docker

cache:
bundler: true
directories:
- public/lib/

install:
- cp config/database.yml.test.example config/database.yml
- cp config/database.yml.example config/database.yml
- cp config/config.yml.example config/config.yml
- cp db/schema.rb.example db/schema.rb
- docker-compose -f docker-compose.test.yml up -d --build
- >
while (! docker logs mapknitter-test | grep "Phusion Passenger Standalone web server started") > /dev/null 2>&1; do
echo "Waiting for start script to finish...";
sleep 20;
done; echo "Done!"
- docker-compose -f docker-compose.test.yml exec web bash -lc "rake db:setup || rake db:migrate"
- ./lib/exporter-deps.sh > /dev/null 2>&1
- bundle install && yarn install
- bundle exec rake db:setup || bundle exec rake db:migrate

env:
global:
- RAILS_ENV=test
matrix:
- TASK="CI=true TRAVIS=true rake test:unit"
- TASK="CI=true TRAVIS=true rake test:integration"
- TASK="CI=true TRAVIS=true rake test:functional"
- TASK="CI=true TRAVIS=true rake assets:precompile"
- CI=true
- TRAVIS=true

script:
- docker-compose -f docker-compose.test.yml exec web bash -lc "$TASK"
- bash <(curl -s https://codecov.io/bash)
jobs:
include:
- name: "Unit Tests"
script: bundle exec rake test:unit
- name: "Integration Tests"
script: bundle exec rake test:integration
- name: "Functional Tests"
script: bundle exec rake test:functional
- name: "Rubocop Linter"
script: bundle exec rubocop
- name: "Docker Builds"
script: docker build -t mapknitter .
# Configure this option after full yarn setup
# - name: "Asset Precompilation"
# env:
# - RAILS_ENV=production
# script: bundle exec rake assets:precompile

branches:
only:
- main
- unstable
- development

1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--install.modules-folder "./public/lib"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN apt-get update -qq && apt-get install -y \
COPY ./nolimit.xml /etc/ImageMagick-6/policy.xml

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

# Install bundle of gems
SHELL [ "/bin/bash", "-l", "-c" ]
Expand Down
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,22 @@ group :dependencies do
# gem 'right_aws'
gem 'right_aws_api'


# compiling markdown to html
gem "rdiscount", "2.2.0.1"

# asset pipelining
gem "sprockets"#, "2.12.1"
gem 'bootstrap-sass'
gem 'sassc-rails'
gem 'jquery-rails'
gem "sprockets"
gem "sprockets-rails"
gem "sass", :require => 'sass'
gem "autoprefixer-rails"
gem "uglifier"

end

group :test do
gem "rubocop", '~> 0.64.0'
gem 'rubocop', '~> 0.52.0'
gem 'ruby-prof'
gem 'rails-perftest'
gem 'simplecov', require: false
Expand Down
33 changes: 26 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ GEM
uuidtools (~> 2.1)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
builder (3.2.3)
byebug (11.0.1)
climate_control (0.2.0)
Expand Down Expand Up @@ -79,7 +82,10 @@ GEM
concurrent-ruby (~> 1.0)
image_science (1.3.0)
RubyInline (~> 3.9)
jaro_winkler (1.5.2)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jshintrb (0.3.0)
execjs
multi_json (>= 1.3)
Expand Down Expand Up @@ -188,14 +194,13 @@ GEM
net-http-persistent (~> 2.9)
redcarpet (>= 3.0.0)
ruby-hmac (>= 0.4.0)
rubocop (0.64.0)
jaro_winkler (~> 1.5.1)
rubocop (0.52.1)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-hmac (0.4.0)
ruby-openid (2.7.0)
ruby-openid-apps-discovery (1.2.0)
Expand All @@ -207,6 +212,15 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.0.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.1)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand All @@ -231,11 +245,12 @@ GEM
ref
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.4.1)
unicode-display_width (1.6.0)
uuidtools (2.1.5)
web-console (2.3.0)
activemodel (>= 4.0)
Expand All @@ -253,12 +268,14 @@ DEPENDENCIES
RubyInline
autoprefixer-rails
aws-sdk (~> 1.5.7)
bootstrap-sass
byebug
faker
friendly_id
geokit-rails (= 1.1.4)
httparty
image_science (= 1.3.0)
jquery-rails
jshintrb
minitest
minitest-reporters
Expand All @@ -276,14 +293,16 @@ DEPENDENCIES
rdiscount (= 2.2.0.1)
recaptcha
right_aws_api
rubocop (~> 0.64.0)
rubocop (~> 0.52.0)
ruby-openid (~> 2.5)
ruby-prof
sass
sassc-rails
simplecov
simplecov-cobertura
skylight
sprockets
sprockets-rails
sqlite3
therubyracer
uglifier
Expand Down
Loading