diff --git a/.dockerignore b/.dockerignore index 9dc7e6a..9612375 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,14 +6,14 @@ # Ignore bundler config. /.bundle +# Ignore all environment files (except templates). +/.env* +!/.env*.erb + # Ignore all default key files. /config/master.key /config/credentials/*.key -# Ignore all environment files. -/.env* -!/.env.example - # Ignore all logfiles and tempfiles. /log/* /tmp/* @@ -22,14 +22,12 @@ # Ignore pidfiles, but keep the directory. /tmp/pids/* -!/tmp/pids/ !/tmp/pids/.keep # Ignore storage (uploaded files in development and any SQLite databases). /storage/* !/storage/.keep /tmp/storage/* -!/tmp/storage/ !/tmp/storage/.keep # Ignore assets. diff --git a/.node-version b/.node-version index ecb0f8a..d939939 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -18.13.0 \ No newline at end of file +18.13.0 diff --git a/.rubocop.yml b/.rubocop.yml index 1a513e0..fa09e9a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,15 +10,15 @@ require: AllCops: Exclude: - - 'vendor/**/*' - - '**/vendor/**/*' - - '*/spec/dummy/**/*' - - 'sandbox/**/*' - - '**/templates/**/*' - - 'guides/node_modules/**/*' - - '**/spec/system/**/*' - - 'app/helpers/spree/base_helper.rb' - - 'db/schema.rb' + - "vendor/**/*" + - "**/vendor/**/*" + - "*/spec/dummy/**/*" + - "sandbox/**/*" + - "**/templates/**/*" + - "guides/node_modules/**/*" + - "**/spec/system/**/*" + - "app/helpers/spree/base_helper.rb" + - "db/schema.rb" TargetRubyVersion: 3.3.4 Gemspec/DeprecatedAttributeAssignment: @@ -198,7 +198,6 @@ Rails/WhereExists: # new in 2.7 Rails/WhereNot: # new in 2.8 Enabled: true - # We use class vars and will have to continue doing so for compatability Style/ClassVars: Enabled: false @@ -304,7 +303,7 @@ Rails/DynamicFindBy: # It's okay to skip model validations to setup a spec. Rails/SkipsModelValidations: Exclude: - - '**/spec/**/*' + - "**/spec/**/*" # We use a lot of # @@ -315,15 +314,15 @@ Rails/SkipsModelValidations: # syntax in the specs files. Lint/AmbiguousBlockAssociation: Exclude: - - '*/spec/**/*' - - 'spec/**/*' # For the benefit of apps that inherit from this config + - "*/spec/**/*" + - "spec/**/*" # For the benefit of apps that inherit from this config # We use eval to add common_spree_dependencies into the Gemfiles of each of our gems Security/Eval: Exclude: - - 'Gemfile' - - 'common_spree_dependencies.rb' - - '*/Gemfile' + - "Gemfile" + - "common_spree_dependencies.rb" + - "*/Gemfile" Naming/VariableNumber: Enabled: false @@ -518,7 +517,7 @@ Lint/SuppressedException: Style/RedundantPercentQ: Enabled: true Exclude: - - 'spec/components/image_component_spec.rb' + - "spec/components/image_component_spec.rb" Layout/LineContinuationLeadingSpace: # new in 1.31 Enabled: true @@ -815,4 +814,40 @@ RSpec/MultipleExpectations: RSpec/ExampleLength: Enabled: false Gemspec/AddRuntimeDependency: # new in 1.65 - Enabled: true \ No newline at end of file + Enabled: true +Lint/DuplicateSetElement: # new in 1.67 + Enabled: true +Lint/UselessNumericOperation: # new in 1.66 + Enabled: true +Style/RedundantInterpolationUnfreeze: # new in 1.66 + Enabled: true +Rails/EnumSyntax: # new in 2.26 + Enabled: true +RSpec/StringAsInstanceDoubleConstant: # new in 3.1 + Enabled: true +Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69 + Enabled: true +Lint/NumericOperationWithConstantResult: # new in 1.69 + Enabled: true +Lint/UnescapedBracketInRegexp: # new in 1.68 + Enabled: true +Lint/UselessDefined: # new in 1.69 + Enabled: true +Style/AmbiguousEndlessMethodDefinition: # new in 1.68 + Enabled: true +Style/BitwisePredicate: # new in 1.68 + Enabled: true +Style/CombinableDefined: # new in 1.68 + Enabled: true +Style/DigChain: # new in 1.69 + Enabled: true +Style/FileNull: # new in 1.69 + Enabled: true +Style/FileTouch: # new in 1.69 + Enabled: true +Style/KeywordArgumentsMerging: # new in 1.68 + Enabled: true +Style/SafeNavigationChainLength: # new in 1.68 + Enabled: true +Performance/StringBytesize: # new in 1.23 + Enabled: true diff --git a/Dockerfile b/Dockerfile index 7594548..da75da8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile ARG RUBY_VERSION=3.3.4 -FROM ruby:$RUBY_VERSION-slim as base +FROM ruby:$RUBY_VERSION-slim AS base LABEL fly_launch_runtime="rails" @@ -10,29 +10,30 @@ LABEL fly_launch_runtime="rails" WORKDIR /rails # Set production environment -ENV RAILS_ENV="production" \ - BUNDLE_PATH="vendor/bundle" \ - BUNDLE_WITHOUT="development:test" +ENV BUNDLE_DEPLOYMENT="1" \ + BUNDLE_PATH="/usr/local/bundle" \ + BUNDLE_WITHOUT="development:test" \ + RAILS_ENV="production" -# Update gems and preinstall the desired version of bundler -ARG BUNDLER_VERSION=2.3.26 +# Update gems and bundler RUN gem update --system --no-document && \ - gem install -N bundler -v ${BUNDLER_VERSION} + gem install -N bundler # Install packages needed to install nodejs RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y curl unzip && \ + apt-get install --no-install-recommends -y curl && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Install Node.js ARG NODE_VERSION=18.13.0 -RUN curl -fsSL https://fnm.vercel.app/install | bash && \ - /root/.local/share/fnm/fnm install $NODE_VERSION -ENV PATH=/root/.local/share/fnm/aliases/default/bin/:$PATH +ENV PATH=/usr/local/node/bin:$PATH +RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \ + /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \ + rm -rf /tmp/node-build-master # Throw-away build stage to reduce size of final image -FROM base as build +FROM base AS build # Install packages needed to build gems and node modules RUN apt-get update -qq && \ @@ -42,13 +43,17 @@ RUN apt-get update -qq && \ ARG YARN_VERSION=1.22.19 RUN npm install -g yarn@$YARN_VERSION +# Build options +ENV PATH="/usr/local/node/bin:$PATH" + # Install application gems -COPY .ruby-version Gemfile Gemfile.lock ./ -RUN bundle _${BUNDLER_VERSION}_ install +COPY Gemfile Gemfile.lock ./ +RUN bundle install && \ + rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY package.json package-lock.json yarn.lock . -RUN yarn install +COPY package.json package-lock.json yarn.lock ./ +RUN yarn install --frozen-lockfile # Copy application code COPY . . @@ -62,12 +67,19 @@ FROM base # Install packages needed for deployment RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y postgresql-client && \ + apt-get install --no-install-recommends -y curl postgresql-client && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives -# Copy built application from previous stage +# Copy built artifacts: gems, application +COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" COPY --from=build /rails /rails +# Run and own only the runtime files as a non-root user for security +RUN groupadd --system --gid 1000 rails && \ + useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \ + chown -R 1000:1000 db log tmp +USER 1000:1000 + # Deployment options ENV RAILS_LOG_TO_STDOUT="1" \ RAILS_SERVE_STATIC_FILES="true" diff --git a/Gemfile b/Gemfile index 0328c9c..bd1ee4d 100644 --- a/Gemfile +++ b/Gemfile @@ -14,12 +14,12 @@ gem 'sass-rails', '>= 6' # Use of devise and Omniauth for authentication gem 'aasm' -gem 'appsignal' gem 'cancancan' gem 'chord_diagrams' gem 'coltrane' gem 'devise' gem 'devise-i18n' +gem 'drb' gem 'evernote_oauth' gem 'evernote_utils' gem 'fomantic-ui-sass', '~> 2.8', '< 2.9' @@ -29,6 +29,7 @@ gem 'html_to_plain_text' gem 'httparty' gem 'jbuilder', '~> 2' gem 'jquery-rails' +gem 'mutex_m' gem 'omniauth' gem 'omniauth-evernote' gem 'omniauth-rails_csrf_protection', '~> 1' @@ -64,6 +65,7 @@ end group :development do gem 'better_errors' + gem "dockerfile-rails" gem 'binding_of_caller' gem 'listen', '~> 3.9.0' gem "ruby-lsp-rspec", require: false @@ -74,7 +76,5 @@ gem 'openssl' gem 'importmap-rails', '~> 2' -gem "dockerfile-rails", ">= 1.0", group: :development - gem "service_actor-rails", "~> 1" gem "cssbundling-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 43a8f17..e314f59 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,81 +3,79 @@ GEM specs: aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.8.5) - actionpack (= 7.0.8.5) - activesupport (= 7.0.8.5) + actioncable (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.5) - actionpack (= 7.0.8.5) - activejob (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) + actionmailbox (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.5) - actionpack (= 7.0.8.5) - actionview (= 7.0.8.5) - activejob (= 7.0.8.5) - activesupport (= 7.0.8.5) + actionmailer (7.0.8.6) + actionpack (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activesupport (= 7.0.8.6) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.8.5) - actionview (= 7.0.8.5) - activesupport (= 7.0.8.5) + actionpack (7.0.8.6) + actionview (= 7.0.8.6) + activesupport (= 7.0.8.6) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.5) - actionpack (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) + actiontext (7.0.8.6) + actionpack (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.5) - activesupport (= 7.0.8.5) + actionview (7.0.8.6) + activesupport (= 7.0.8.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.5) - activesupport (= 7.0.8.5) + activejob (7.0.8.6) + activesupport (= 7.0.8.6) globalid (>= 0.3.6) - activemodel (7.0.8.5) - activesupport (= 7.0.8.5) + activemodel (7.0.8.6) + activesupport (= 7.0.8.6) activemodel-serializers-xml (1.0.3) activemodel (>= 5.0.0.a) activesupport (>= 5.0.0.a) builder (~> 3.1) - activerecord (7.0.8.5) - activemodel (= 7.0.8.5) - activesupport (= 7.0.8.5) - activestorage (7.0.8.5) - actionpack (= 7.0.8.5) - activejob (= 7.0.8.5) - activerecord (= 7.0.8.5) - activesupport (= 7.0.8.5) + activerecord (7.0.8.6) + activemodel (= 7.0.8.6) + activesupport (= 7.0.8.6) + activestorage (7.0.8.6) + actionpack (= 7.0.8.6) + activejob (= 7.0.8.6) + activerecord (= 7.0.8.6) + activesupport (= 7.0.8.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.8.5) + activesupport (7.0.8.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - appsignal (4.0.6) - rack ast (2.4.2) - autoprefixer-rails (10.4.16.0) + autoprefixer-rails (10.4.19.0) execjs (~> 2) base64 (0.2.0) bcrypt (3.1.20) @@ -89,7 +87,7 @@ GEM bindex (0.8.1) binding_of_caller (1.0.1) debug_inspector (>= 1.2.0) - brakeman (6.1.2) + brakeman (6.2.2) racc builder (3.3.0) bundler-audit (0.9.2) @@ -118,18 +116,18 @@ GEM paint (~> 2.0) concurrent-ruby (1.3.4) crass (1.0.6) - css_parser (1.17.1) + css_parser (1.19.1) addressable - cssbundling-rails (1.4.0) + cssbundling-rails (1.4.1) railties (>= 6.0.0) csv (3.3.0) - database_cleaner (2.0.2) + database_cleaner (2.1.0) database_cleaner-active_record (>= 2, < 3) - database_cleaner-active_record (2.1.0) + database_cleaner-active_record (2.2.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.4) + date (3.4.0) debug_inspector (1.2.0) devise (4.9.4) bcrypt (~> 3.0) @@ -140,8 +138,9 @@ GEM devise-i18n (1.12.1) devise (>= 4.9.0) diff-lcs (1.5.1) - dockerfile-rails (1.6.17) + dockerfile-rails (1.6.24) rails (>= 3.0.0) + drb (2.2.1) dry-core (0.9.1) concurrent-ruby (~> 1.0) zeitwerk (~> 2.6) @@ -158,15 +157,17 @@ GEM activesupport evernote-thrift (~> 1.25.1) roadie - execjs (2.9.1) - factory_bot (6.4.6) + execjs (2.10.0) + factory_bot (6.5.0) activesupport (>= 5.0.0) - factory_bot_rails (6.4.3) - factory_bot (~> 6.4) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) - faker (3.4.1) + faker (3.5.1) i18n (>= 1.8.11, < 2) ffi (1.17.0) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-x86_64-linux-gnu) fomantic-ui-sass (2.8.8.1) autoprefixer-rails railties (>= 3.2.0) @@ -199,7 +200,7 @@ GEM multi_xml (>= 0.5.2) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) @@ -210,7 +211,7 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (2.7.2) + json (2.8.2) kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -227,7 +228,7 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.0) + logger (1.6.1) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -240,13 +241,14 @@ GEM matrix (0.4.2) method_source (1.1.0) mini_mime (1.1.5) - mini_portile2 (2.8.7) - minitest (5.25.1) + mini_portile2 (2.8.8) + minitest (5.25.2) multi_json (1.15.0) multi_xml (0.7.1) bigdecimal (~> 3.1) + mutex_m (0.3.0) nested_form (0.3.2) - net-imap (0.4.17) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -255,10 +257,14 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) + nio4r (2.7.4) nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.16.7-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.7-x86_64-linux) + racc (~> 1.4) oauth (1.1.0) oauth-tty (~> 1.0, >= 1.0.1) snaky_hash (~> 2.0) @@ -273,9 +279,10 @@ GEM evernote-thrift multi_json (~> 1.0) omniauth-oauth (~> 1.0) - omniauth-oauth (1.2.0) + omniauth-oauth (1.2.1) oauth omniauth (>= 1.0, < 3) + rack (>= 1.6.2, < 4) omniauth-rails_csrf_protection (1.0.2) actionpack (>= 4.2) omniauth (~> 2.0) @@ -283,13 +290,13 @@ GEM orm_adapter (0.5.0) paint (2.3.0) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc - pg (1.5.7) - prism (0.30.0) - public_suffix (6.0.0) - puma (6.4.3) + pg (1.5.9) + prism (1.2.0) + public_suffix (6.0.1) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (2.2.10) @@ -298,20 +305,20 @@ GEM rack (~> 2.2, >= 2.2.4) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.8.5) - actioncable (= 7.0.8.5) - actionmailbox (= 7.0.8.5) - actionmailer (= 7.0.8.5) - actionpack (= 7.0.8.5) - actiontext (= 7.0.8.5) - actionview (= 7.0.8.5) - activejob (= 7.0.8.5) - activemodel (= 7.0.8.5) - activerecord (= 7.0.8.5) - activestorage (= 7.0.8.5) - activesupport (= 7.0.8.5) + rails (7.0.8.6) + actioncable (= 7.0.8.6) + actionmailbox (= 7.0.8.6) + actionmailer (= 7.0.8.6) + actionpack (= 7.0.8.6) + actiontext (= 7.0.8.6) + actionview (= 7.0.8.6) + activejob (= 7.0.8.6) + activemodel (= 7.0.8.6) + activerecord (= 7.0.8.6) + activestorage (= 7.0.8.6) + activesupport (= 7.0.8.6) bundler (>= 1.15.0) - railties (= 7.0.8.5) + railties (= 7.0.8.6) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -333,9 +340,9 @@ GEM rails_admin_aasm (0.3.0) aasm rails_admin - railties (7.0.8.5) - actionpack (= 7.0.8.5) - activesupport (= 7.0.8.5) + railties (7.0.8.6) + actionpack (= 7.0.8.6) + activesupport (= 7.0.8.6) method_source rake (>= 12.2) thor (~> 1.0) @@ -345,9 +352,9 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rbs (3.5.1) + rbs (3.6.1) logger - regexp_parser (2.9.2) + regexp_parser (2.9.3) responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) @@ -355,60 +362,60 @@ GEM roadie (5.2.1) css_parser (~> 1.4) nokogiri (~> 1.15) - rouge (4.3.0) - rspec-core (3.13.0) + rouge (4.5.1) + rspec-core (3.13.2) rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.3) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) + rspec-rails (7.1.0) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.1) - rubocop (1.66.1) + rubocop (1.69.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + rubocop-ast (>= 1.36.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.3) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) rubocop-factory_bot (2.26.1) rubocop (~> 1.61) - rubocop-performance (1.21.1) + rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.25.1) + rubocop-rails (2.27.0) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.0.4) + rubocop-rspec (3.2.0) rubocop (~> 1.61) rubocop-rspec_rails (2.30.0) rubocop (~> 1.61) rubocop-rspec (~> 3, >= 3.0.1) - ruby-lsp (0.17.4) + ruby-lsp (0.22.1) language_server-protocol (~> 3.17.0) - prism (>= 0.29.0, < 0.31) + prism (>= 1.2, < 2.0) rbs (>= 3, < 4) sorbet-runtime (>= 0.5.10782) - ruby-lsp-rspec (0.1.12) - ruby-lsp (~> 0.17.0) + ruby-lsp-rspec (0.1.19) + ruby-lsp (~> 0.22.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) sass-rails (6.0.0) @@ -425,7 +432,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - service_actor (3.9.2) + service_actor (3.9.4) zeitwerk (>= 1.0) service_actor-rails (1.0.0) rails (>= 4.2) @@ -433,8 +440,8 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - song_pro (0.1.11) - sorbet-runtime (0.5.11473) + song_pro (0.1.12) + sorbet-runtime (0.5.11670) sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) @@ -442,19 +449,20 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - stimulus-rails (1.3.3) + stimulus-rails (1.3.4) railties (>= 6.0.0) temple (0.10.3) thor (1.1.0) tilt (2.4.0) - timeout (0.4.1) - turbo-rails (1.5.0) + timeout (0.4.2) + turbo-rails (2.0.11) actionpack (>= 6.0.0) - activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) version_gem (1.1.4) victor (0.3.4) warden (1.2.9) @@ -468,20 +476,21 @@ GEM nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0, < 4.11) - websocket (1.2.10) + websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.0) + zeitwerk (2.7.1) PLATFORMS + aarch64-linux ruby + x86_64-linux DEPENDENCIES aasm - appsignal better_errors binding_of_caller brakeman @@ -495,7 +504,8 @@ DEPENDENCIES database_cleaner devise devise-i18n - dockerfile-rails (>= 1.0) + dockerfile-rails + drb evernote_oauth evernote_utils factory_bot_rails @@ -509,6 +519,7 @@ DEPENDENCIES jbuilder (~> 2) jquery-rails listen (~> 3.9.0) + mutex_m omniauth omniauth-evernote omniauth-rails_csrf_protection (~> 1) @@ -543,4 +554,4 @@ RUBY VERSION ruby 3.3.4p94 BUNDLED WITH - 2.5.9 + 2.5.23 diff --git a/bin/docker-entrypoint b/bin/docker-entrypoint index dffd4ba..67ef493 100755 --- a/bin/docker-entrypoint +++ b/bin/docker-entrypoint @@ -1,7 +1,7 @@ #!/bin/bash -e # If running the rails server then create or migrate existing database -if [ "${*}" == "./bin/rails server" ]; then +if [ "${1}" == "./bin/rails" ] && [ "${2}" == "server" ]; then ./bin/rails db:prepare fi diff --git a/config/dockerfile.yml b/config/dockerfile.yml index 2f44578..13f1434 100644 --- a/config/dockerfile.yml +++ b/config/dockerfile.yml @@ -2,23 +2,6 @@ --- options: - bin-cd: false - cache: false - ci: false - compose: false - fullstaq: false - jemalloc: false label: fly_launch_runtime: rails - mysql: false - nginx: false - parallel: false - platform: postgresql: true - precompile: - prepare: true - redis: false - root: false - swap: - yjit: false - packages: {} diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index edfe2f1..56024c0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -23,7 +23,7 @@ # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').each { |f| require f } # Checks for pending migration and applies them before tests are run. # If you are not using ActiveRecord, you can remove this line.