Skip to content
Permalink
Browse files

Merge branch 'master' into production

  • Loading branch information...
kimadactyl committed Nov 6, 2019
2 parents b55cd36 + eef7548 commit e4b09a0e61290772d775a14ce2873664a14a9819
Showing with 8,361 additions and 387 deletions.
  1. +1 −0 .browserslistrc
  2. +12 −1 .gitignore
  3. +1 −1 .ruby-version
  4. +50 −25 .travis.yml
  5. +8 −4 Gemfile
  6. +105 −79 Gemfile.lock
  7. +2 −1 app/assets/config/manifest.js
  8. +0 −13 app/assets/javascripts/admin.js
  9. +0 −8 app/assets/javascripts/admin/app.js
  10. +0 −3 app/assets/javascripts/admin/calendars.js
  11. +0 −18 app/assets/javascripts/application.js
  12. +0 −8 app/assets/javascripts/google-analytics.js.coffee
  13. +0 −9 app/assets/stylesheets/admin.css.scss
  14. +119 −0 app/assets/stylesheets/admin.scss
  15. +1 −1 app/components/admin_index/_admin_index.html.erb
  16. +19 −0 app/components/card/_card.html.erb
  17. 0 app/{assets/javascripts/channels/.keep → components/card/card.sass}
  18. +16 −0 app/components/card/card_component.rb
  19. +1 −1 app/controllers/admin/calendars_controller.rb
  20. +1 −1 app/controllers/admin/collections_controller.rb
  21. +4 −7 app/controllers/admin/pages_controller.rb
  22. +2 −2 app/controllers/admin/partners_controller.rb
  23. +1 −1 app/controllers/admin/sites_controller.rb
  24. +1 −1 app/controllers/admin/supporters_controller.rb
  25. +1 −1 app/controllers/admin/turfs_controller.rb
  26. +1 −1 app/controllers/admin/users_controller.rb
  27. +8 −5 app/helpers/application_helper.rb
  28. +13 −0 app/javascript/packs/admin.js
  29. +35 −0 app/javascript/packs/application.js
  30. +6 −0 app/javascript/src/behaviors/all_behaviors.js
  31. +4 −2 app/{assets/javascripts → javascript/src}/behaviors/behaviors.base.js
  32. 0 app/{assets/javascripts → javascript/src}/behaviors/behaviors.collection.js
  33. 0 app/{assets/javascripts → javascript/src}/behaviors/behaviors.map.js
  34. +2 −0 app/{assets/javascripts → javascript/src}/behaviors/behaviors.partner.js
  35. 0 app/{assets/javascripts → javascript/src}/behaviors/behaviors.place.js
  36. 0 app/{assets/javascripts → javascript/src}/behaviors/behaviors.user.js
  37. 0 app/{assets/javascripts → javascript/src}/cable.js
  38. 0 app/javascript/src/channels/.keep
  39. +10 −0 app/javascript/src/google-analytics.js
  40. 0 app/{assets/javascripts → javascript/src}/mountain_view/styleguide.js
  41. +1 −1 app/models/address.rb
  42. +20 −3 app/models/calendar.rb
  43. +4 −7 app/models/event.rb
  44. +6 −1 app/models/events/base.rb
  45. +2 −0 app/models/neighbourhood.rb
  46. +1 −1 app/models/parsers/ics.rb
  47. +9 −1 app/models/partner.rb
  48. +11 −1 app/models/site.rb
  49. +46 −23 app/views/admin/pages/home.html.erb
  50. +1 −3 app/views/admin/partners/_form.html.erb
  51. +0 −6 app/views/fields/address_field/_form.html.erb
  52. +0 −1 app/views/fields/address_field/_index.html.erb
  53. +0 −1 app/views/fields/address_field/_show.html.erb
  54. +22 −17 app/views/layouts/admin/_admin_navigation.html.erb
  55. +12 −0 app/views/layouts/admin/_admin_topbar.html.erb
  56. +14 −13 app/views/layouts/admin/application.html.erb
  57. +3 −1 app/views/layouts/application.html.erb
  58. +72 −0 babel.config.js
  59. +0 −7 bin/rails
  60. +0 −7 bin/rake
  61. +9 −9 bin/setup
  62. +19 −0 bin/webpack
  63. +19 −0 bin/webpack-dev-server
  64. +11 −0 bin/yarn
  65. +4 −0 config/application.rb
  66. +3 −2 config/cable.yml
  67. +14 −5 config/environments/development.rb
  68. +46 −22 config/environments/production.rb
  69. +12 −8 config/environments/test.rb
  70. +6 −6 config/initializers/application_controller_renderer.rb
  71. +3 −5 config/initializers/assets.rb
  72. +0 −2 config/initializers/backtrace_silencers.rb
  73. +28 −0 config/initializers/content_security_policy.rb
  74. +1 −1 config/initializers/markdown_handler.rb
  75. +45 −0 config/initializers/new_framework_defaults_6_0.rb
  76. +13 −24 config/puma.rb
  77. +1 −1 config/routes.rb
  78. +6 −8 config/spring.rb
  79. +34 −0 config/storage.yml
  80. +5 −0 config/webpack/development.js
  81. +13 −0 config/webpack/environment.js
  82. +5 −0 config/webpack/production.js
  83. +5 −0 config/webpack/staging.js
  84. +5 −0 config/webpack/test.js
  85. +95 −0 config/webpacker.yml
  86. +10 −0 ...1031170146_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb
  87. +6 −6 db/schema.rb
  88. +16 −0 package.json
  89. +12 −0 postcss.config.js
  90. +1 −1 test/integration/admin/home_integration_test.rb
  91. +2 −0 test/test_helper.rb
  92. +7,264 −0 yarn.lock
@@ -0,0 +1 @@
defaults
@@ -24,8 +24,9 @@
.DS_Store
.env

# File uploads
# Files
/public/uploads/**
/public/assets/**

# Credentials
.travis/*.key
@@ -46,3 +47,13 @@ sendgrid.env

# Ignore the dump directory
dump/

# Ignore node stuff
/node_modules/**

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
@@ -1 +1 @@
2.4.3
2.6.5
@@ -1,34 +1,59 @@
env:
global:
- CC_TEST_REPORTER_ID=7e0e573cd74e3418226d922174406b38d5692b01d6464701fa57ce51e75eb72a
- secure: ZE9+HtzVkmD2MraxChjHpxNRtTdsYbMYvf/5LXI68ohCpAvO+toWohFyLjYkBVdSUMQ1u3YbW+EKiZ4lpKMOp+k7ZjlUoiKi1dBSBwUxDzPww/3PrwcMZiCI2HbwsyboYnJRt9pitcXvzfnIXRLnkfU+5LHzn5rLEa8Y9rt0VeZqdm9d2eRrsmD92l2dZg/6Ao+YrCuweOu+3gTMiA3WbxYiRNw6wuFfJ+7iwRroubAi2HRp3soOdZmFxOfUIcKrrc4UQOuIm3yQfb05ZvydlW70hxn//j6r22HuBV8G3LxNS0mRgA05JwltTwjFnDWbXCNwecQ23QsWIzqgBR0vXwJK+6dnSv3rU42YFLCEnKYDHNPtnAMEYO8OhIVMjwou6r5D5N8V/u9rFVUQUVrGiAg20cubcJeiQsP4R2R1JIImA2gN3zWW272Q7ybzZkNSOVtWu2QQiH7UtFCU1aNrg5A+Pp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8ObkBHFzwWPO9OSFXATmmzcjQjk3XnsoNnADTvxUvzH+FGJ53RB0NYN9QoIZx5hl/aqpx35uTfbcMgEYn6hxwwI+KlXAAifWsh2WhjCRn+bXZSI83/oh5nJ0i96VL8yZk0QPljf4vzfOxt89lfFvMG2BqyQ7l2WAB9fAvgE4OEvggGtkGDZi3ES51qrwZjlY=
language: ruby
dist: trusty
cache:
bundler: true
directories:
- node_modules
yarn: true

addons:
postgresql: '9.6'
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
- psql -c 'create database placecal_test;' -U postgres

before_install:
- |
if [ "$TRAVIS_BRANCH" = "production" ]; then
openssl aes-256-cbc -k "$production_decrypt_key" -in $TRAVIS_BUILD_DIR/.travis/production-deploy.key.enc -out production-deploy.key -d
elif [ "$TRAVIS_BRANCH" = "master" ]; then
openssl aes-256-cbc -k "$staging_decrypt_key" -in $TRAVIS_BUILD_DIR/.travis/deploy.key.enc -out deploy.key -d
fi
- |
if [ "$TRAVIS_BRANCH" = "production" ]; then
openssl aes-256-cbc -k "$production_decrypt_key" -in $TRAVIS_BUILD_DIR/.travis/production-deploy.key.enc -out production-deploy.key -d
elif [ "$TRAVIS_BRANCH" = "master" ]; then
openssl aes-256-cbc -k "$staging_decrypt_key" -in $TRAVIS_BUILD_DIR/.travis/deploy.key.enc -out deploy.key -d
fi
install:
- bundle install
- nvm install node
- node -v
- npm i -g yarn
- yarn install

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- "./cc-test-reporter before-build"
- psql -c 'create database placecal_test;' -U postgres

script:
- bundle exec rails webpacker:compile
- bundle exec rake

deploy:
- provider: script
skip_cleanup: true
script: bash scripts/staging.sh
on:
branch: master
- provider: script
skip_cleanup: true
script: bash scripts/production.sh
on:
branch: production
- provider: script
skip_cleanup: true
script: bash scripts/staging.sh
on:
branch: master
- provider: script
skip_cleanup: true
script: bash scripts/production.sh
on:
branch: production

after_script:
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
- "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"

after_success:
- bundle exec rails assets:precompile
12 Gemfile
@@ -1,6 +1,6 @@
# frozen_string_literal: true

ruby '2.4.3'
ruby '2.6.5'
source 'https://rubygems.org'

git_source(:github) do |repo_name|
@@ -11,7 +11,8 @@ end
# Core
gem 'pg'
gem 'puma', '~> 4.2'
gem 'rails', '~> 5.2.3'
gem 'rails', '~> 6.0'
gem 'minitest-rails'

# Frontend
gem 'coffee-rails', '~> 5.0'
@@ -20,6 +21,7 @@ gem 'jquery-turbolinks'
gem 'sass-rails', '~> 6.0'
gem 'turbolinks', '~> 5'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker'

# Calendar
gem 'httparty'
@@ -31,8 +33,9 @@ gem 'carrierwave'
gem 'mini_magick'

# Admin
gem 'bootstrap-sass', '~> 3.4.1'
gem 'bootstrap', '~> 4.3.1'
gem 'cocoon'
gem 'font-awesome-rails'
gem 'select2-rails'
gem 'simple_form'

@@ -73,7 +76,8 @@ gem 'seed_migration'
# Utilities
gem 'active_link_to'
gem 'bootsnap', require: false
gem 'crypt_keeper', '~> 2.0.1'
# Temp fix until https://github.com/jmazzi/crypt_keeper works with Rails 6
gem 'crypt_keeper', github: 'taylorwilliams/crypt_keeper'
gem 'enumerize'
gem 'friendly_id', '~> 5.3.0'
gem 'jbuilder', '~> 2.5'

0 comments on commit e4b09a0

Please sign in to comment.
You can’t perform that action at this time.