From d512cf8844aa3187c5f259236162fec76fcf6313 Mon Sep 17 00:00:00 2001 From: sirux88 Date: Sat, 21 Oct 2023 10:07:08 +0200 Subject: [PATCH 1/2] removed custom 'simple_token_authentication' usage and database gemfile groups --- .dockerignore | 1 + Gemfile | 18 +++++------------- Gemfile.lock | 30 +++++------------------------- 3 files changed, 11 insertions(+), 38 deletions(-) diff --git a/.dockerignore b/.dockerignore index ad5a1b54db56..8bd9f78a7948 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,4 @@ **/Dockerfile .git .github +tmp/ \ No newline at end of file diff --git a/Gemfile b/Gemfile index 08bca841524e..2b399ffad2e7 100644 --- a/Gemfile +++ b/Gemfile @@ -88,8 +88,7 @@ gem 'mail_form', '>= 1.9.0' gem 'oj' gem 'puma' gem 'rollbar' -gem 'simple_token_authentication', '~> 1.18', '>= 1.18.0', - git: 'https://github.com/pglombardo/simple_token_authentication.git', branch: 'rails7-support' +gem 'simple_token_authentication' gem 'devise-i18n' gem 'i18n-tasks', '~> 1.0.13' @@ -105,17 +104,10 @@ gem 'google-cloud-storage', '~> 1.11', require: false # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] -group :postgres, optional: true do - gem 'pg' -end - -group :mysql, optional: true do - gem 'mysql2' -end - -group :sqlite, optional: true do - gem 'sqlite3', force_ruby_platform: true -end +# Database backends +gem 'mysql2' +gem 'pg' +gem 'sqlite3', force_ruby_platform: true group :production, :private do gem 'rack-throttle', '0.7.0' diff --git a/Gemfile.lock b/Gemfile.lock index 76455b173aa6..9844b113c8e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,15 +1,3 @@ -GIT - remote: https://github.com/pglombardo/simple_token_authentication.git - revision: 47db3936689c5d93b4226f85c3ca71c182ec0580 - branch: rails7-support - specs: - simple_token_authentication (1.18.0) - actionmailer (>= 3.2.6, < 8) - actionpack (>= 3.2.6, < 8) - active_model_serializers - activemodel-serializers-xml - devise (>= 3.2, < 6) - GIT remote: https://github.com/pglombardo/version.git revision: 97678e0068542fb919f909b0d3a9e853ec7a24c2 @@ -65,20 +53,11 @@ GEM erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active_model_serializers (0.10.14) - actionpack (>= 4.1) - activemodel (>= 4.1) - case_transform (>= 0.2) - jsonapi-renderer (>= 0.1.1.beta1, < 0.3) activejob (7.0.8) activesupport (= 7.0.8) globalid (>= 0.3.6) activemodel (7.0.8) activesupport (= 7.0.8) - activemodel-serializers-xml (1.0.2) - activemodel (> 5.x) - activesupport (> 5.x) - builder (~> 3.1) activerecord (7.0.8) activemodel (= 7.0.8) activesupport (= 7.0.8) @@ -153,8 +132,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - case_transform (0.2) - activesupport coderay (1.1.3) concurrent-ruby (1.2.2) config (4.2.1) @@ -309,7 +286,6 @@ GEM activesupport (>= 5.0.0) jmespath (1.6.2) json (2.6.3) - jsonapi-renderer (0.2.2) jwt (2.7.1) kramdown (2.4.0) rexml @@ -504,6 +480,10 @@ GEM faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) + simple_token_authentication (1.18.1) + actionmailer (>= 3.2.6, < 8) + actionpack (>= 3.2.6, < 8) + devise (>= 3.2, < 6) singleton (0.1.1) smart_properties (1.17.0) sprockets (4.2.1) @@ -607,7 +587,7 @@ DEPENDENCIES ruby-debug-ide sass-rails (~> 6.0, >= 6.0.0) selenium-webdriver - simple_token_authentication (~> 1.18, >= 1.18.0)! + simple_token_authentication sqlite3 stimulus-rails terser (~> 1.1) From 01cc0f1b0a5988a27b9dc153d577101b2aafa7f3 Mon Sep 17 00:00:00 2001 From: sirux88 Date: Sat, 21 Oct 2023 10:07:34 +0200 Subject: [PATCH 2/2] fixed Dockerfile, README and ruby testing --- .github/workflows/ruby-tests.yml | 1 - README.md | 2 -- containers/docker/pwpush/Dockerfile | 3 --- 3 files changed, 6 deletions(-) diff --git a/.github/workflows/ruby-tests.yml b/.github/workflows/ruby-tests.yml index abadd3c530d1..46634824de74 100644 --- a/.github/workflows/ruby-tests.yml +++ b/.github/workflows/ruby-tests.yml @@ -62,7 +62,6 @@ jobs: run: | gem install bundler bundle config path vendor/bundle - bundle config set with 'sqlite' bundle install --jobs 4 --retry 3 yarn install --frozen-lockfile - name: Run tests diff --git a/README.md b/README.md index ba98252d1c12..3816389586df 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,6 @@ gem install bundler export RAILS_ENV=private -bundle config set with 'sqlite' bundle config set --local deployment 'true' bundle install --without development production test ./bin/rails assets:precompile @@ -200,7 +199,6 @@ export RAILS_ENV=production # Update the following line to point to your Postgres (or MySQL/Mariadb) instance DATABASE_URL=postgresql://passwordpusher_user:passwordpusher_passwd@postgres:5432/passwordpusher_db -bundle config set with 'postgres' # or 'mysql' bundle install --without development private test ./bin/rails assets:precompile ./bin/rails db:setup diff --git a/containers/docker/pwpush/Dockerfile b/containers/docker/pwpush/Dockerfile index 09cc6bee543b..f6ba46c335f4 100644 --- a/containers/docker/pwpush/Dockerfile +++ b/containers/docker/pwpush/Dockerfile @@ -1,5 +1,4 @@ # Setting global arguments -ARG BUNDLE_WITH=sqlite:mysql:postgres ARG BUNDLE_WITHOUT=development:test:private ARG BUNDLE_DEPLOYMENT=true @@ -34,7 +33,6 @@ ENV RACK_ENV=production RAILS_ENV=production RUN bundle config set without "${BUNDLE_WITHOUT}" \ && bundle config set deployment "${BUNDLE_DEPLOYMENT}" \ - && bundle config set with "${BUNDLE_WITH}" \ && bundle install RUN yarn install @@ -88,7 +86,6 @@ ENV RACK_ENV=production RAILS_ENV=production COPY --from=build-env --chown=pwpusher:pwpusher ${APP_ROOT} ${APP_ROOT} RUN bundle config set without "${BUNDLE_WITHOUT}" \ - && bundle config set with "${BUNDLE_WITH}" \ && bundle config set deployment "${BUNDLE_DEPLOYMENT}" USER pwpusher