Commit 3054f3ff authored by Stephen Dolan's avatar Stephen Dolan

Bump more versions and try to fix ci

parent 9d6ccc14
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
}]
],
"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
["transform-class-properties", { "spec": true }]
]
}
......@@ -40,3 +40,10 @@ yarn-debug.log*
*.swp
.DS_Store
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
......@@ -75,7 +75,7 @@ rspec:
POSTGRES_DB: stimawesome_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ''
RAILS_ENV: test
RAILS_ENV: ci
script:
- bundle exec rails db:test:prepare --quiet
- bundle exec rails assets:precompile
......
......@@ -4,65 +4,65 @@ source "https://rubygems.org"
ruby "2.5.5"
gem "bootsnap", "~> 1.3.2", require: false # Faster boot times
gem "capistrano", "~> 3.11.0" # Deployment automation
gem "capistrano-bundler", "~> 1.6.0"
gem "capistrano-passenger", "~> 0.2.0" # Add passenger helpers to deployment automation
gem "capistrano-rails", "~> 1.4.0" # Add Rails helpers to deployment automation
gem "capistrano-rbenv", "~> 2.1.4" # Add rbenv helpers to deployment automation
gem "bootsnap", "~> 1.4", require: false # Faster boot times
gem "capistrano", "~> 3.11" # Deployment automation
gem "capistrano-bundler", "~> 1.6" # Install dependencies on deploy
gem "capistrano-passenger", "~> 0.2" # Add passenger helpers to deployment automation
gem "capistrano-rails", "~> 1.4" # Add Rails helpers to deployment automation
gem "capistrano-rbenv", "~> 2.1" # Add rbenv helpers to deployment automation
gem "faraday", "~> 0.15.3" # HTTP client library
gem "faraday_middleware", "~> 0.12.2" # Additional capabilities for Faraday
gem "friendly_id", "~> 5.2.4" # Prettier URLs
gem "jbuilder", "~> 2.8.0" # Build JSON data returns easily
gem "pagy", "~> 0.23.1" # Pagination helper
gem "faraday_middleware", "~> 0.13" # Additional capabilities for Faraday
gem "friendly_id", "~> 5.2.5" # Prettier URLs
gem "jbuilder", "~> 2.9" # Build JSON data returns easily
gem "pagy", "~> 3.3" # Pagination helper
gem "pg", "~> 1.1.3" # Postgres DB Driver
gem "pg_search", "~> 2.1.2" # Search models through Postgres
gem "puma", "~> 3.12.0" # App server
gem "rack-attack", "~> 5.4.2" # Throttle and block abusive requests
gem "rails", "~> 5.2.2" # Base gem for Rails application
gem "redcarpet", "~> 3.4.0" # Markdown parser
gem "rouge", "~> 3.3.0" # Code syntax highlighting
gem "sass-rails", "~> 5.0.7" # SCSS stylesheets
gem "sentry-raven", "~> 2.7.4" # Exception monitoring
gem "turbolinks", "~> 5.2.0" # Cache webpages to behave like a SPA
gem "pg_search", "~> 2.2.0" # Search models through Postgres
gem "puma", "~> 4.0.0" # App server
gem "rack-attack", "~> 6.0.0" # Throttle and block abusive requests
gem "rails", "~> 6.0.0.rc1" # Base gem for Rails application
gem "redcarpet", "~> 3.4.0" # Markdown parser
gem "rouge", "~> 3.5" # Code syntax highlighting
gem "sass-rails", "~> 5.0.7" # SCSS stylesheets
gem "sentry-raven", "~> 2.9" # Exception monitoring
gem "turbolinks", "~> 5.2.0" # Cache webpages to behave like a SPA
gem "tzinfo-data", "~> 1.2018.4", platforms: %i[mingw mswin x64_mingw jruby] # IANA time zones
gem "uglifier", "~> 4.1.19" # Compress JS assets
gem "validate_url", "~> 1.0.2" # Add a url validator to ActiveRecord
gem "webpacker", "~> 3.5.5" # Transpile JS
gem "whenever", "~> 0.10.0", require: false # Cron jobs for Rails
gem "webpacker", "~> 4.0.7" # Transpile JS
gem "whenever", "~> 1.0.0", require: false # Cron jobs for Rails
group :development, :test do
gem "bullet", "~> 5.9.0" # Track query issues
gem "capybara", "~> 3.11.1" # Provide RSpec helpers for system tests
gem "chromedriver-helper", "~> 2.1.0" # Chrome for JavaScript system testing
gem "factory_bot_rails", "~> 4.11.1" # Create data for testing
gem "faker", "~> 1.9.1" # Generate fake data
gem "pry-rails", "~> 0.3.7" # Use Pry for Rails console
gem "rspec-rails", "~> 3.8.1" # Testing framework
gem "rspec_junit_formatter", "~> 0.4.1" # RSpec results that CircleCI can read
gem "selenium-webdriver", "~> 3.141.0" # Front end testing automation
gem "shoulda-matchers", "~> 3.1.2" # Enhanced matchers for ActiveRecord
gem "bullet", "~> 6.0" # Track query issues
gem "capybara", "~> 3.25" # Provide RSpec helpers for system tests
gem "chromedriver-helper", "~> 2.1" # Chrome for JavaScript system testing
gem "factory_bot_rails", "~> 5.0" # Create data for testing
gem "faker", "~> 1.9" # Generate fake data
gem "pry-rails", "~> 0.3" # Use Pry for Rails console
gem "rspec-rails", "~> 3.8" # Testing framework
gem "rspec_junit_formatter", "~> 0.4" # RSpec results that CircleCI can read
gem "selenium-webdriver", "~> 3.142" # Front end testing automation
gem "shoulda-matchers", "~> 4.1" # Enhanced matchers for ActiveRecord
end
group :test do
gem "codecov", require: false # Code coverage utility
gem "sinatra", "~> 2.0.4" # Basic web server
gem "webmock", "~> 3.4.2" # Utility to mock out external web responses
gem "sinatra", "~> 2.0" # Basic web server
gem "webmock", "~> 3.6" # Utility to mock out external web responses
end
group :development do
gem "better_errors", "~> 2.5.0" # Improved error page
gem "binding_of_caller", "~> 0.8.0" # Enable advanced features of Better Errors
gem "brakeman", "~> 4.3.1", require: false # Check for security vulnerabilities
gem "capistrano-local-precompile", "~> 1.2.0"
gem "erb_lint", "~> 0.0.28" # Linters for ERB code
gem "guard", "~> 2.15.0" # Development server event handler
gem "guard-bundler", "~> 2.2.1"
gem "guard-livereload", "~> 2.5.2" # Reload the browser when view files change
gem "guard-process", "~> 1.2.1" # Run arbitrary processes from Guardfile
gem "listen", "~> 3.1.5" # Watch for file modifications
gem "rubocop", "~> 0.72.0" # Style linter
gem "rubocop-rspec", "~> 1.33.0" # Style linter
gem "web-console", "~> 3.7.0" # Debugging console
gem "yard", "~> 0.9.16" # Documentation generator
gem "better_errors", "~> 2.5" # Improved error page
gem "binding_of_caller", "~> 0.8" # Enable advanced features of Better Errors
gem "brakeman", "~> 4.5", require: false # Check for security vulnerabilities
gem "capistrano-local-precompile", "~> 1.2" # Precompile assets before deploying
gem "erb_lint", "~> 0.0" # Linters for ERB code
gem "guard", "~> 2.15" # Development server event handler
gem "guard-bundler", "~> 2.2" # Automatically install gems when Gemfile changes
gem "guard-livereload", "~> 2.5" # Reload the browser when view files change
gem "guard-process", "~> 1.2" # Run arbitrary processes from Guardfile
gem "listen", "~> 3.1" # Watch for file modifications
gem "rubocop", "~> 0.72" # Style linter
gem "rubocop-rspec", "~> 1.33" # Style linter
gem "web-console", "~> 4.0" # Debugging console
gem "yard", "~> 0.9" # Documentation generator
end
This diff is collapsed.
......@@ -12,7 +12,7 @@ class PackagesController < ApplicationController
# Display a single package.
def show
@package = Package.find(params[:id])
@package = Package.friendly.find(params[:id])
end
# Initialize a new package to be created.
......
module.exports = function(api) {
var validEnv = ['development', 'test', 'production']
var currentEnv = api.env()
var isDevelopmentEnv = api.env('development')
var isProductionEnv = api.env('production')
var isTestEnv = api.env('test')
if (!validEnv.includes(currentEnv)) {
throw new Error(
'Please specify a valid `NODE_ENV` or ' +
'`BABEL_ENV` environment variables. Valid values are "development", ' +
'"test", and "production". Instead, received: ' +
JSON.stringify(currentEnv) +
'.'
)
}
return {
presets: [
isTestEnv && [
require('@babel/preset-env').default,
{
targets: {
node: 'current'
}
}
],
(isProductionEnv || isDevelopmentEnv) && [
require('@babel/preset-env').default,
{
forceAllTransforms: true,
useBuiltIns: 'entry',
corejs: 3,
modules: false,
exclude: ['transform-typeof-symbol']
}
]
].filter(Boolean),
plugins: [
require('babel-plugin-macros'),
require('@babel/plugin-syntax-dynamic-import').default,
isTestEnv && require('babel-plugin-dynamic-import-node'),
require('@babel/plugin-transform-destructuring').default,
[
require('@babel/plugin-proposal-class-properties').default,
{
loose: true
}
],
[
require('@babel/plugin-proposal-object-rest-spread').default,
{
useBuiltIns: true
}
],
[
require('@babel/plugin-transform-runtime').default,
{
helpers: false,
regenerator: true,
corejs: false
}
],
[
require('@babel/plugin-transform-regenerator').default,
{
async: false
}
]
].filter(Boolean)
}
}
#!/usr/bin/env ruby
# frozen_string_literal: true
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
ENV["NODE_ENV"] ||= "development"
require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath,
)
Pathname.new(__FILE__).realpath)
require "rubygems"
require "bundler/setup"
require "webpacker"
require "webpacker/webpack_runner"
Webpacker::WebpackRunner.run(ARGV)
APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
Webpacker::WebpackRunner.run(ARGV)
end
#!/usr/bin/env ruby
# frozen_string_literal: true
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
ENV["NODE_ENV"] ||= "development"
require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath,
)
Pathname.new(__FILE__).realpath)
require "rubygems"
require "bundler/setup"
require "webpacker"
require "webpacker/dev_server_runner"
Webpacker::DevServerRunner.run(ARGV)
APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
Webpacker::DevServerRunner.run(ARGV)
end
......@@ -17,6 +17,13 @@ test:
password:
database: stimawesome_test
ci:
<<: *shared_default
host: postgres
username: postgres
password:
database: stimawesome_test
production:
<<: *shared_default
host: localhost
......
......@@ -13,6 +13,8 @@
# policy.object_src :none
# policy.script_src :self, :https
# policy.style_src :self, :https
# # If you are using webpack-dev-server then specify webpack-dev-server host
# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
# # Specify URI for violation reports
# # policy.report_uri "/csp-violation-report-endpoint"
......
......@@ -2,18 +2,109 @@
# FriendlyId Global Configuration
#
# @see http://norman.github.io/friendly_id/file.Guide.html
# Use this to set up shared configuration options for your entire application.
# Any of the configuration options shown here can also be applied to single
# models by passing arguments to the `friendly_id` class method or defining
# methods in your model.
#
# To learn more, check out the guide:
#
# http://norman.github.io/friendly_id/file.Guide.html
FriendlyId.defaults do |config|
# Restrict specific words from being used as slugs.
# ## Reserved Words
#
# Some words could conflict with Rails's routes when used as slugs, or are
# undesirable to allow as slugs. Edit this list as needed for your app.
config.use :reserved
config.reserved_words = %w[new edit index session login logout users admin
stylesheets assets javascripts images
]
# Default to using :slugged module everywhere that FriendlyId is included.
config.use :slugged
# This adds an option to treat reserved words as conflicts rather than exceptions.
# When there is no good candidate, a UUID will be appended, matching the existing
# conflict behavior.
# config.treat_reserved_as_conflict = true
# Use friendly finders on all models.
# ## Friendly Finders
#
# Uncomment this to use friendly finders in all models. By default, if
# you wish to find a record by its friendly id, you must do:
#
# MyModel.friendly.find('foo')
#
# If you uncomment this, you can do:
#
# MyModel.find('foo')
#
# This is significantly more convenient but may not be appropriate for
# all applications, so you must explicity opt-in to this behavior. You can
# always also configure it on a per-model basis if you prefer.
#
# Something else to consider is that using the :finders addon boosts
# performance because it will avoid Rails-internal code that makes runtime
# calls to `Module.extend`.
#
config.use :finders
#
# ## Slugs
#
# Most applications will use the :slugged module everywhere. If you wish
# to do so, uncomment the following line.
#
config.use :slugged
#
# By default, FriendlyId's :slugged addon expects the slug column to be named
# 'slug', but you can change it if you wish.
#
# config.slug_column = 'slug'
#
# By default, slug has no size limit, but you can change it if you wish.
#
# config.slug_limit = 255
#
# When FriendlyId can not generate a unique ID from your base method, it appends
# a UUID, separated by a single dash. You can configure the character used as the
# separator. If you're upgrading from FriendlyId 4, you may wish to replace this
# with two dashes.
#
# config.sequence_separator = '-'
#
# Note that you must use the :slugged addon **prior** to the line which
# configures the sequence separator, or else FriendlyId will raise an undefined
# method error.
#
# ## Tips and Tricks
#
# ### Controlling when slugs are generated
#
# As of FriendlyId 5.0, new slugs are generated only when the slug field is
# nil, but if you're using a column as your base method can change this
# behavior by overriding the `should_generate_new_friendly_id?` method that
# FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
# more like 4.0.
# Note: Use(include) Slugged module in the config if using the anonymous module.
# If you have `friendly_id :name, use: slugged` in the model, Slugged module
# is included after the anonymous module defined in the initializer, so it
# overrides the `should_generate_new_friendly_id?` method from the anonymous module.
#
# config.use :slugged
# config.use Module.new {
# def should_generate_new_friendly_id?
# slug.blank? || <your_column_name_here>_changed?
# end
# }
#
# FriendlyId uses Rails's `parameterize` method to generate slugs, but for
# languages that don't use the Roman alphabet, that's not usually sufficient.
# Here we use the Babosa library to transliterate Russian Cyrillic slugs to
# ASCII. If you use this, don't forget to add "babosa" to your Gemfile.
#
# config.use Module.new {
# def normalize_friendly_id(text)
# text.to_slug.normalize! :transliterations => [:russian, :latin]
# end
# }
end
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 6.0 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# Don't force requests from old versions of IE to be UTF-8 encoded.
# Rails.application.config.action_view.default_enforce_utf8 = false
# Embed purpose and expiry metadata inside signed and encrypted
# cookies for increased security.
#
# This option is not backwards compatible with earlier Rails versions.
# It's best enabled when your entire app is migrated and stable on 6.0.
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
# Return false instead of self when enqueuing is aborted from a callback.
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
# Send Active Storage analysis and purge jobs to dedicated queues.
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
#
# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
# If you send mail in the background, job workers need to have a copy of
# MailDeliveryJob to ensure all delivery jobs are processed properly.
# Make sure your entire app is migrated and stable on 6.0 before using this setting.
# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
......@@ -3,8 +3,11 @@
default: &default
source_path: app/javascript
source_entry_path: packs
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
......@@ -13,7 +16,25 @@ default: &default
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
# Extract and emit a css file
extract_css: false
static_assets_extensions:
- .jpg
- .jpeg
- .png
- .gif
- .tiff
- .ico
- .svg
- .eot
- .otf
- .ttf
- .woff
- .woff2
extensions:
- .mjs
- .js
- .sass
- .scss
......@@ -31,6 +52,9 @@ development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
......@@ -48,7 +72,7 @@ development:
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: /node_modules/
ignored: '**/node_modules/**'
test:
......@@ -64,5 +88,8 @@ production:
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Extract and emit a css file
extract_css: true
# Cache manifest.json for performance
cache_manifest: true
# This migration comes from active_storage (originally 20180723000244)
class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
def up
return if foreign_key_exists?(:active_storage_attachments, column: :blob_id)
if table_exists?(:active_storage_blobs)
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
end
end
end
# frozen_string_literal: true
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20_181_118_010_718) do
ActiveRecord::Schema.define(version: 2019_07_07_173532) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -28,8 +27,8 @@ ActiveRecord::Schema.define(version: 20_181_118_010_718) do
t.string "sluggable_type", limit: 50
t.string "scope"
t.datetime "created_at"
t.index %w[slug sluggable_type scope], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
t.index %w[slug sluggable_type], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
t.index ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
t.index ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
t.index ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
t.index ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
end
......
......@@ -2,7 +2,7 @@
"name": "stim-awesome",
"private": true,
"dependencies": {
"@rails/webpacker": "3.5",
"@rails/webpacker": "^4.0.7",
"feather-icons": "^4.9.0",
"lodash.debounce": "^4.0.8",
"stimulus": "^1.1.0",
......@@ -14,6 +14,7 @@
"eslint": "^5.9.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.11.0",
"webpack-dev-server": "2.11.2"
"postcss-cssnext": "^3.1.0",
"webpack-dev-server": "^3.7.2"
}
}
module.exports = {
plugins: [
require('postcss-import'),
require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({
autoprefixer: {
flexbox: 'no-2009'
},
stage: 3
})
]
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment