From e1fb08707a152d50987916b1f0f553af106ad76b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:13:28 +1030 Subject: [PATCH 01/93] Issue/2419: Limit map to the most recent plantings only (#3191) * For now, drop mapbox for OSM tiles * For now, drop mapbox for OSM tiles * Use OSM tiles * Remove mapbox secrets for now. If we bring back mapbox; we should re-enstate * Only show up to 200 plantings * Update app/assets/javascripts/members.js.erb * [CodeFactor] Apply fixes * Update production.rb --------- Co-authored-by: codefactor-io --- app/assets/javascripts/places.js.erb | 4 +++- config/environments/production.rb | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/places.js.erb b/app/assets/javascripts/places.js.erb index 93e5e9538..7cc39bb12 100644 --- a/app/assets/javascripts/places.js.erb +++ b/app/assets/javascripts/places.js.erb @@ -58,6 +58,7 @@ function showMap(placesmap) { }); function fetchCropsForMap(url) { + var n = 0; $.getJSON(url, function(crop_data) { $.each(crop_data['data'], function(i, p) { if (p.attributes.latitude && p.attributes.longitude) { @@ -78,7 +79,8 @@ function showMap(placesmap) { markers.addLayer(marker); } }); - if (crop_data['links']['next']) { + // We fetch pages of 10 at a time. Stop after 200 crops; so we are showing only 'active' plantings. + if (crop_data['links']['next'] && n++ < 20) { fetchCropsForMap(crop_data['links']['next']) } return crop_data; diff --git a/config/environments/production.rb b/config/environments/production.rb index d16a4af0d..0b161c458 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -83,7 +83,7 @@ Rails.application.configure do config.active_support.deprecation = :notify # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = ::Logger::Formatter.new + config.log_formatter = Logger::Formatter.new # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false @@ -103,11 +103,11 @@ Rails.application.configure do ActionMailer::Base.delivery_method = :smtp config.host = ENV['HOST'] - config.analytics_code = <<-eos + config.analytics_code = <<-GET_CLICKY_SCRIPT - eos + GET_CLICKY_SCRIPT config.active_job.queue_adapter = :sidekiq # Use a different logger for distributed setups. From 1b3485733d86d63acd631a2448e1ffe56a668598 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:47:42 +0000 Subject: [PATCH 02/93] Fix frontend validation --- app/views/gardens/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/gardens/_form.html.haml b/app/views/gardens/_form.html.haml index f55011592..456aa3484 100644 --- a/app/views/gardens/_form.html.haml +++ b/app/views/gardens/_form.html.haml @@ -27,7 +27,7 @@ - else = link_to "Change your location.", edit_member_registration_path .row - .col-md-5.col-12= f.number_field :area, class: 'input-small' + .col-md-5.col-12= f.number_field :area, class: 'input-small', step: ".1" .col-md-7.col-12= f.select(:area_unit, Garden::AREA_UNITS_VALUES, { include_blank: false }) .col-12= f.select(:garden_type_id, GardenType.all.order(:name).pluck(:name, :id), selected: @garden.garden_type_id, include_blank: true) From a112d8e1269f5fb56c8c723cb0fb8ba094846f3c Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:49:48 +0000 Subject: [PATCH 03/93] Don't restrict format --- app/views/gardens/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/gardens/_form.html.haml b/app/views/gardens/_form.html.haml index 456aa3484..8ab82bc9b 100644 --- a/app/views/gardens/_form.html.haml +++ b/app/views/gardens/_form.html.haml @@ -27,7 +27,7 @@ - else = link_to "Change your location.", edit_member_registration_path .row - .col-md-5.col-12= f.number_field :area, class: 'input-small', step: ".1" + .col-md-5.col-12= f.number_field :area, class: 'input-small', step: "any" .col-md-7.col-12= f.select(:area_unit, Garden::AREA_UNITS_VALUES, { include_blank: false }) .col-12= f.select(:garden_type_id, GardenType.all.order(:name).pluck(:name, :id), selected: @garden.garden_type_id, include_blank: true) From 5722bfec59aa88a7fd82c24c679886d2c1adae95 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:58:11 +0000 Subject: [PATCH 04/93] Validate uniquness of name in the pending queue --- app/models/crop.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/crop.rb b/app/models/crop.rb index b47999fb5..020692387 100644 --- a/app/models/crop.rb +++ b/app/models/crop.rb @@ -54,6 +54,7 @@ class Crop < ApplicationRecord message: 'is not a valid English Wikipedia URL' }, if: :approved? + validates :name, uniqueness: { scope: :approval_status }, if: :pending? def to_s name From 6f9ab4e4a6301705b111638fc6f1b400cbc27b04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 07:59:12 +0000 Subject: [PATCH 05/93] Bump database_cleaner from 2.0.1 to 2.0.2 Bumps [database_cleaner](https://github.com/DatabaseCleaner/database_cleaner) from 2.0.1 to 2.0.2. - [Release notes](https://github.com/DatabaseCleaner/database_cleaner/releases) - [Changelog](https://github.com/DatabaseCleaner/database_cleaner/blob/main/History.rdoc) - [Commits](https://github.com/DatabaseCleaner/database_cleaner/compare/v2.0.1...v2.0.2) --- updated-dependencies: - dependency-name: database_cleaner dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e0abee70a..a04da83ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -189,9 +189,9 @@ GEM csv_shaper (1.3.2) activesupport (>= 3.0.0) dalli (3.2.4) - database_cleaner (2.0.1) - database_cleaner-active_record (~> 2.0.0) - database_cleaner-active_record (2.0.0) + database_cleaner (2.0.2) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.1.0) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) @@ -379,7 +379,7 @@ GEM mini_magick (4.12.0) mini_mime (1.1.2) mini_portile2 (2.8.1) - minitest (5.17.0) + minitest (5.18.0) moneta (1.0.0) multi_json (1.15.0) multi_xml (0.6.0) From 98404baf0f7159a5534b65f70992fef9bc9d9f54 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 08:01:48 +0000 Subject: [PATCH 06/93] Fix #3129 Swap to sass-c --- Gemfile | 2 +- Gemfile.lock | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 916597071..85637f08d 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem 'bundler', '>= 2.3.10' gem 'coffee-rails' gem 'haml' -gem 'sass-rails' +gem 'sassc-rails' # API data gem 'jsonapi-resources' diff --git a/Gemfile.lock b/Gemfile.lock index e0abee70a..2ec9d2b59 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -561,8 +561,6 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (6.0.0) - sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -734,7 +732,7 @@ DEPENDENCIES rubocop-rails rubocop-rspec ruby-units - sass-rails + sassc-rails scout_apm searchkick selenium-webdriver From 5b89aff98ab1085f14447df3eb7f4c7b32cc5138 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 08:05:31 +0000 Subject: [PATCH 07/93] Fix #3049 --- app/controllers/plantings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/plantings_controller.rb b/app/controllers/plantings_controller.rb index bd4452661..6c02f5128 100644 --- a/app/controllers/plantings_controller.rb +++ b/app/controllers/plantings_controller.rb @@ -12,7 +12,7 @@ class PlantingsController < DataController if params[:member_slug] @owner = Member.find_by(slug: params[:member_slug]) - where['owner_id'] = @owner.id + where['owner_id'] = @owner.id unless @owner.nil? end if params[:crop_slug] From 14f9f75ab847b6516a91249b2443b76fb539b97e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 08:20:51 +0000 Subject: [PATCH 08/93] Bump rubocop from 1.48.0 to 1.48.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.48.0 to 1.48.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.48.0...v1.48.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a04da83ea..c074e3d19 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -529,7 +529,7 @@ GEM rswag-ui (2.8.0) actionpack (>= 3.1, < 7.1) railties (>= 3.1, < 7.1) - rubocop (1.48.0) + rubocop (1.48.1) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) From c08c541a47fdfc94e31cddf844d75fd76a965c79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Mar 2023 07:59:02 +0000 Subject: [PATCH 09/93] Bump sidekiq from 7.0.6 to 7.0.7 Bumps [sidekiq](https://github.com/sidekiq/sidekiq) from 7.0.6 to 7.0.7. - [Release notes](https://github.com/sidekiq/sidekiq/releases) - [Changelog](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) - [Commits](https://github.com/sidekiq/sidekiq/compare/v7.0.6...v7.0.7) --- updated-dependencies: - dependency-name: sidekiq dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 999046e74..0197cff8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -430,7 +430,7 @@ GEM nio4r (~> 2.0) query_diet (0.7.1) racc (1.6.2) - rack (2.2.6.3) + rack (2.2.6.4) rack-cors (2.0.0) rack (>= 2.0.0) rack-protection (3.0.5) @@ -482,7 +482,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redis-client (0.12.2) + redis-client (0.14.0) connection_pool regexp_parser (2.7.0) responders (3.1.0) @@ -579,7 +579,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sidekiq (7.0.6) + sidekiq (7.0.7) concurrent-ruby (< 2) connection_pool (>= 2.3.0) rack (>= 2.2.4) From 292865a7bd4afae92e482619cbf62ba9208434f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 12:16:08 +0000 Subject: [PATCH 10/93] Bump rails from 7.0.4.2 to 7.0.4.3 Bumps [rails](https://github.com/rails/rails) from 7.0.4.2 to 7.0.4.3. - [Release notes](https://github.com/rails/rails/releases) - [Commits](https://github.com/rails/rails/compare/v7.0.4.2...v7.0.4.3) --- updated-dependencies: - dependency-name: rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0197cff8a..4bd118e49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,47 +26,47 @@ GEM remote: https://rubygems.org/ specs: abstract_type (0.0.7) - actioncable (7.0.4.2) - actionpack (= 7.0.4.2) - activesupport (= 7.0.4.2) + actioncable (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.2) - actionpack (= 7.0.4.2) - activejob (= 7.0.4.2) - activerecord (= 7.0.4.2) - activestorage (= 7.0.4.2) - activesupport (= 7.0.4.2) + actionmailbox (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.2) - actionpack (= 7.0.4.2) - actionview (= 7.0.4.2) - activejob (= 7.0.4.2) - activesupport (= 7.0.4.2) + actionmailer (7.0.4.3) + actionpack (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.2) - actionview (= 7.0.4.2) - activesupport (= 7.0.4.2) + actionpack (7.0.4.3) + actionview (= 7.0.4.3) + activesupport (= 7.0.4.3) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.2) - actionpack (= 7.0.4.2) - activerecord (= 7.0.4.2) - activestorage (= 7.0.4.2) - activesupport (= 7.0.4.2) + actiontext (7.0.4.3) + actionpack (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.2) - activesupport (= 7.0.4.2) + actionview (7.0.4.3) + activesupport (= 7.0.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -81,22 +81,22 @@ GEM active_utils (3.4.0) activesupport (>= 4.2) i18n - activejob (7.0.4.2) - activesupport (= 7.0.4.2) + activejob (7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.3.6) - activemodel (7.0.4.2) - activesupport (= 7.0.4.2) - activerecord (7.0.4.2) - activemodel (= 7.0.4.2) - activesupport (= 7.0.4.2) - activestorage (7.0.4.2) - actionpack (= 7.0.4.2) - activejob (= 7.0.4.2) - activerecord (= 7.0.4.2) - activesupport (= 7.0.4.2) + activemodel (7.0.4.3) + activesupport (= 7.0.4.3) + activerecord (7.0.4.3) + activemodel (= 7.0.4.3) + activesupport (= 7.0.4.3) + activestorage (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activesupport (= 7.0.4.3) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.2) + activesupport (7.0.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -435,22 +435,22 @@ GEM rack (>= 2.0.0) rack-protection (3.0.5) rack - rack-test (2.0.2) + rack-test (2.1.0) rack (>= 1.3) - rails (7.0.4.2) - actioncable (= 7.0.4.2) - actionmailbox (= 7.0.4.2) - actionmailer (= 7.0.4.2) - actionpack (= 7.0.4.2) - actiontext (= 7.0.4.2) - actionview (= 7.0.4.2) - activejob (= 7.0.4.2) - activemodel (= 7.0.4.2) - activerecord (= 7.0.4.2) - activestorage (= 7.0.4.2) - activesupport (= 7.0.4.2) + rails (7.0.4.3) + actioncable (= 7.0.4.3) + actionmailbox (= 7.0.4.3) + actionmailer (= 7.0.4.3) + actionpack (= 7.0.4.3) + actiontext (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activemodel (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) bundler (>= 1.15.0) - railties (= 7.0.4.2) + railties (= 7.0.4.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -468,9 +468,9 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (7.0.4.2) - actionpack (= 7.0.4.2) - activesupport (= 7.0.4.2) + railties (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) method_source rake (>= 12.2) thor (~> 1.0) From 728e145cb27c1fd98408be72d9cc50530852fddf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 07:57:01 +0000 Subject: [PATCH 11/93] Bump selenium-webdriver from 4.8.1 to 4.8.3 Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.8.1 to 4.8.3. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES) - [Commits](https://github.com/SeleniumHQ/selenium/commits) --- updated-dependencies: - dependency-name: selenium-webdriver dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4bd118e49..13042b7fa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -575,7 +575,7 @@ GEM activemodel (>= 5) elasticsearch (>= 6, < 7.14) hashie - selenium-webdriver (4.8.1) + selenium-webdriver (4.8.3) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) From dfce843bf77d2f0112985606337abc73f8ba10ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 07:58:54 +0000 Subject: [PATCH 12/93] Bump rubocop from 1.48.1 to 1.49.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.48.1 to 1.49.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.48.1...v1.49.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 13042b7fa..a5545d5fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -415,7 +415,7 @@ GEM rack orm_adapter (0.5.0) parallel (1.22.1) - parser (3.2.1.1) + parser (3.2.2.0) ast (~> 2.4.1) percy-capybara (5.0.0) capybara (>= 3) @@ -529,17 +529,17 @@ GEM rswag-ui (2.8.0) actionpack (>= 3.1, < 7.1) railties (>= 3.1, < 7.1) - rubocop (1.48.1) + rubocop (1.49.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.26.0, < 2.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.27.0) + rubocop-ast (1.28.0) parser (>= 3.2.1.0) rubocop-capybara (2.17.1) rubocop (~> 1.41) From 42fd278f6eb282707d12ef720091474a17c26e07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 09:20:37 +0000 Subject: [PATCH 13/93] Bump devise from 4.9.0 to 4.9.2 Bumps [devise](https://github.com/heartcombo/devise) from 4.9.0 to 4.9.2. - [Release notes](https://github.com/heartcombo/devise/releases) - [Changelog](https://github.com/heartcombo/devise/blob/main/CHANGELOG.md) - [Commits](https://github.com/heartcombo/devise/compare/v4.9.0...v4.9.2) --- updated-dependencies: - dependency-name: devise dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a5545d5fd..999bdbe1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -196,7 +196,7 @@ GEM database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) date (3.3.3) - devise (4.9.0) + devise (4.9.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) From 7d002d6a2b1262323330f61ca2cb9c9744c5b62a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 09:38:29 +0000 Subject: [PATCH 14/93] Bump rack-cors from 2.0.0 to 2.0.1 Bumps [rack-cors](https://github.com/cyu/rack-cors) from 2.0.0 to 2.0.1. - [Release notes](https://github.com/cyu/rack-cors/releases) - [Changelog](https://github.com/cyu/rack-cors/blob/master/CHANGELOG.md) - [Commits](https://github.com/cyu/rack-cors/compare/2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: rack-cors dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 999bdbe1a..cd32bc90a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -431,7 +431,7 @@ GEM query_diet (0.7.1) racc (1.6.2) rack (2.2.6.4) - rack-cors (2.0.0) + rack-cors (2.0.1) rack (>= 2.0.0) rack-protection (3.0.5) rack From bda0fe1dfd584c54363f5c945516cd7c5790b70f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 09:54:46 +0000 Subject: [PATCH 15/93] Bump active_utils from 3.4.0 to 3.4.1 Bumps [active_utils](https://github.com/shopify/active_utils) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/shopify/active_utils/releases) - [Changelog](https://github.com/Shopify/active_utils/blob/master/CHANGELOG.md) - [Commits](https://github.com/shopify/active_utils/compare/v3.4.0...v3.4.1) --- updated-dependencies: - dependency-name: active_utils dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cd32bc90a..d47757c6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,7 +78,7 @@ GEM activerecord (>= 4.2) active_record_union (1.3.0) activerecord (>= 4.0) - active_utils (3.4.0) + active_utils (3.4.1) activesupport (>= 4.2) i18n activejob (7.0.4.3) From a3b7522acdc065aca8e1c09b9ea68d3443f43d9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:11:30 +0000 Subject: [PATCH 16/93] Bump loofah from 2.19.1 to 2.20.0 Bumps [loofah](https://github.com/flavorjones/loofah) from 2.19.1 to 2.20.0. - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/main/CHANGELOG.md) - [Commits](https://github.com/flavorjones/loofah/compare/v2.19.1...v2.20.0) --- updated-dependencies: - dependency-name: loofah dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d47757c6b..6bda5929c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -351,7 +351,7 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.19.1) + loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.8.1) From fcf39632969b0de353315084baabe282c0c49a27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:30:42 +0000 Subject: [PATCH 17/93] Bump selenium-webdriver from 4.8.3 to 4.8.6 Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.8.3 to 4.8.6. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES) - [Commits](https://github.com/SeleniumHQ/selenium/commits) --- updated-dependencies: - dependency-name: selenium-webdriver dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6bda5929c..7a9d3912a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -575,7 +575,7 @@ GEM activemodel (>= 5) elasticsearch (>= 6, < 7.14) hashie - selenium-webdriver (4.8.3) + selenium-webdriver (4.8.6) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) From fec9789b19ec4e15725c85811cc80cb8d9069dac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 10:47:34 +0000 Subject: [PATCH 18/93] Bump puma from 6.1.1 to 6.2.1 Bumps [puma](https://github.com/puma/puma) from 6.1.1 to 6.2.1. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v6.1.1...v6.2.1) --- updated-dependencies: - dependency-name: puma dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7a9d3912a..4970375f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -393,7 +393,7 @@ GEM timeout net-smtp (0.3.3) net-protocol - nio4r (2.5.8) + nio4r (2.5.9) nokogiri (1.14.2) mini_portile2 (~> 2.8.0) racc (~> 1.4) @@ -426,7 +426,7 @@ GEM rate_throttle_client (~> 0.1.0) popper_js (1.16.1) public_suffix (5.0.1) - puma (6.1.1) + puma (6.2.1) nio4r (~> 2.0) query_diet (0.7.1) racc (1.6.2) From bdc04c0435570203b9a4c7cba0ff17d328edb152 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 11:07:05 +0000 Subject: [PATCH 19/93] Bump capybara from 3.38.0 to 3.39.0 Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.38.0 to 3.39.0. - [Release notes](https://github.com/teamcapybara/capybara/releases) - [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md) - [Commits](https://github.com/teamcapybara/capybara/compare/3.38.0...3.39.0) --- updated-dependencies: - dependency-name: capybara dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4970375f6..02cc16899 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,7 +104,7 @@ GEM adamantium (0.2.0) ice_nine (~> 0.11.0) memoizable (~> 0.4.0) - addressable (2.8.1) + addressable (2.8.3) public_suffix (>= 2.0.2, < 6.0) anima (0.3.2) abstract_type (~> 0.0.7) @@ -144,7 +144,7 @@ GEM uniform_notifier (~> 1.11) byebug (11.1.3) cancancan (3.5.0) - capybara (3.38.0) + capybara (3.39.0) addressable matrix mini_mime (>= 0.1.3) From 65c49fdd5607478bc145c57a958c5dad2a298919 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Apr 2023 07:58:42 +0000 Subject: [PATCH 20/93] Bump rubocop-rails from 2.18.0 to 2.19.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.18.0...v2.19.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 02cc16899..3d79962c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -543,7 +543,7 @@ GEM parser (>= 3.2.1.0) rubocop-capybara (2.17.1) rubocop (~> 1.41) - rubocop-rails (2.18.0) + rubocop-rails (2.19.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From d3483ef5186f2b110deb755d79f4b6326022fb5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 Apr 2023 12:14:42 +0000 Subject: [PATCH 21/93] Bump sidekiq from 7.0.7 to 7.0.8 Bumps [sidekiq](https://github.com/sidekiq/sidekiq) from 7.0.7 to 7.0.8. - [Release notes](https://github.com/sidekiq/sidekiq/releases) - [Changelog](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) - [Commits](https://github.com/sidekiq/sidekiq/compare/v7.0.7...v7.0.8) --- updated-dependencies: - dependency-name: sidekiq dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3d79962c6..717030d6f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -184,7 +184,7 @@ GEM adamantium (~> 0.2.0) equalizer (~> 0.0.9) concurrent-ruby (1.2.2) - connection_pool (2.3.0) + connection_pool (2.4.0) crass (1.0.6) csv_shaper (1.3.2) activesupport (>= 3.0.0) @@ -482,7 +482,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redis-client (0.14.0) + redis-client (0.14.1) connection_pool regexp_parser (2.7.0) responders (3.1.0) @@ -579,7 +579,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sidekiq (7.0.7) + sidekiq (7.0.8) concurrent-ruby (< 2) connection_pool (>= 2.3.0) rack (>= 2.2.4) From 294f528b36e3e22d3ebc73725ee989eff8f74686 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 07:59:00 +0000 Subject: [PATCH 22/93] Bump oj from 3.14.2 to 3.14.3 Bumps [oj](https://github.com/ohler55/oj) from 3.14.2 to 3.14.3. - [Release notes](https://github.com/ohler55/oj/releases) - [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md) - [Commits](https://github.com/ohler55/oj/compare/v3.14.2...v3.14.3) --- updated-dependencies: - dependency-name: oj dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 717030d6f..7587e9f39 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -400,7 +400,7 @@ GEM nokogiri (1.14.2-x86_64-linux) racc (~> 1.4) oauth (0.5.6) - oj (3.14.2) + oj (3.14.3) omniauth (1.9.2) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) From 88a956ece8eb5226dd19f3211e9c09bb7abfd76d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 14:34:39 +0000 Subject: [PATCH 23/93] Bump rubocop from 1.49.0 to 1.50.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.49.0 to 1.50.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.49.0...v1.50.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7587e9f39..cf2b5d901 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -529,7 +529,7 @@ GEM rswag-ui (2.8.0) actionpack (>= 3.1, < 7.1) railties (>= 3.1, < 7.1) - rubocop (1.49.0) + rubocop (1.50.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) From f21cf31e869b27b331eb99098f36980ed64412b4 Mon Sep 17 00:00:00 2001 From: Cesy Date: Wed, 12 Apr 2023 10:51:28 +0100 Subject: [PATCH 24/93] Create CODE_OF_CONDUCT.md Using contributor covenant default one and adding in our contact details. If Maco can find the GNOME one promptly I'm happy to look at that instead, but let's get something in place quickly for the guidelines. --- CODE_OF_CONDUCT.md | 129 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..748de5436 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,129 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +info@growstuff.org. Any issues with a particular moderator can be reported to +any one of the other moderators. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 0fee4b1622cae80809908712ad08129bb89c29df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Apr 2023 09:54:13 +0000 Subject: [PATCH 25/93] Bump nokogiri from 1.14.2 to 1.14.3 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.2 to 1.14.3. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.2...v1.14.3) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cf2b5d901..a484de4c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -394,10 +394,10 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.9) - nokogiri (1.14.2) + nokogiri (1.14.3) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.14.2-x86_64-linux) + nokogiri (1.14.3-x86_64-linux) racc (~> 1.4) oauth (0.5.6) oj (3.14.3) From a3c5e62073dca3f83a1ff3ce76d168551a956784 Mon Sep 17 00:00:00 2001 From: Cesy Date: Wed, 12 Apr 2023 13:28:11 +0100 Subject: [PATCH 26/93] Update CODE_OF_CONDUCT.md Fixing trailing space --- CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 748de5436..bb8069bc8 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -info@growstuff.org. Any issues with a particular moderator can be reported to +info@growstuff.org. Any issues with a particular moderator can be reported to any one of the other moderators. All complaints will be reviewed and investigated promptly and fairly. From 7448cb170b499333443865e4d6d6357156744937 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:28:28 +0000 Subject: [PATCH 27/93] Bump rack-protection from 3.0.5 to 3.0.6 Bumps [rack-protection](https://github.com/sinatra/sinatra) from 3.0.5 to 3.0.6. - [Release notes](https://github.com/sinatra/sinatra/releases) - [Changelog](https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md) - [Commits](https://github.com/sinatra/sinatra/compare/v3.0.5...v3.0.6) --- updated-dependencies: - dependency-name: rack-protection dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a484de4c0..74ec45699 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -433,7 +433,7 @@ GEM rack (2.2.6.4) rack-cors (2.0.1) rack (>= 2.0.0) - rack-protection (3.0.5) + rack-protection (3.0.6) rack rack-test (2.1.0) rack (>= 1.3) From 5841f68f6f70a1f6feb78eedb3780b5f1fcd2784 Mon Sep 17 00:00:00 2001 From: Cesy Date: Sun, 18 Dec 2022 10:25:07 +0000 Subject: [PATCH 28/93] Setting up Github codespaces --- .devcontainer/Dockerfile | 18 +++++++++++ .devcontainer/create-db-user.sql | 2 ++ .devcontainer/devcontainer.json | 24 +++++++++++++++ .devcontainer/docker-compose.yml | 51 ++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/create-db-user.sql create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..8a055f10c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,18 @@ +FROM mcr.microsoft.com/devcontainers/ruby:0-3.1-bullseye + +# Install Rails +RUN gem install rails webdrivers + +# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service +# The value is a comma-separated list of allowed domains +ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev" + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [Optional] Uncomment this line to install additional gems. +# RUN gem install + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/create-db-user.sql b/.devcontainer/create-db-user.sql new file mode 100644 index 000000000..291dfc427 --- /dev/null +++ b/.devcontainer/create-db-user.sql @@ -0,0 +1,2 @@ +CREATE USER vscode CREATEDB; +CREATE DATABASE vscode WITH OWNER vscode; diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..859bed6c5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,24 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres +{ + "name": "Ruby on Rails & Postgres", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // This can be used to network with other containers or the host. + // "forwardPorts": [3000, 5432], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "rvm install 3.1.2 && bundle install && rake db:setup" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 000000000..96a8289ce --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,51 @@ +version: '3' + +services: + app: + build: + context: .. + dockerfile: .devcontainer/Dockerfile + + volumes: + - ../..:/workspaces:cached + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. + network_mode: service:db + + # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + # user: root + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + + db: + image: postgres:latest + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + - ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql + environment: + POSTGRES_USER: postgres + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + # Your config/database.yml should use the user and password you set here, + # and host "db" (as that's the name of this service). You can use whatever + # database name you want. Use `bin/rails db:prepare` to create the database. + # + # Example: + # + # development: + # <<: *default + # host: db + # username: postgres + # password: postgres + # database: myapp_development + + # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + +volumes: + postgres-data: From 1baa79294e9ac78a888049d55e72683e7536dbc1 Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:06:35 +0000 Subject: [PATCH 29/93] Making codeclimate happier --- .devcontainer/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8a055f10c..30edfcad6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,10 +1,10 @@ FROM mcr.microsoft.com/devcontainers/ruby:0-3.1-bullseye # Install Rails -RUN gem install rails webdrivers +RUN gem install rails:7.0.4 webdrivers # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service -# The value is a comma-separated list of allowed domains +# The value is a comma-separated list of allowed domains ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev" # [Optional] Uncomment this section to install additional OS packages. From 85194e8fb500b4d285cd92f08152c106737d6850 Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:06:56 +0000 Subject: [PATCH 30/93] Now codeclimate is being fussy --- .devcontainer/devcontainer.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 859bed6c5..9cdd41f62 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,24 +1,24 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres { - "name": "Ruby on Rails & Postgres", - "dockerComposeFile": "docker-compose.yml", - "service": "app", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", +"name": "Ruby on Rails & Postgres", +"dockerComposeFile": "docker-compose.yml", +"service": "app", +"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, +// Features to add to the dev container. More info: https://containers.dev/features. +// "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // This can be used to network with other containers or the host. - // "forwardPorts": [3000, 5432], +// Use 'forwardPorts' to make a list of ports inside the container available locally. +// This can be used to network with other containers or the host. +// "forwardPorts": [3000, 5432], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "rvm install 3.1.2 && bundle install && rake db:setup" +// Use 'postCreateCommand' to run commands after the container is created. +"postCreateCommand": "rvm install 3.1.2 && bundle install && rake db:setup" - // Configure tool-specific properties. - // "customizations": {}, +// Configure tool-specific properties. +// "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" +// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. +// "remoteUser": "root" } From 93ffef0125cc0c66895f09be504ea73113d4dd34 Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:10:33 +0000 Subject: [PATCH 31/93] Wrong ruby version manager --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9cdd41f62..b4eea9203 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ // "forwardPorts": [3000, 5432], // Use 'postCreateCommand' to run commands after the container is created. -"postCreateCommand": "rvm install 3.1.2 && bundle install && rake db:setup" +"postCreateCommand": "rbenv install 3.1.2 && bundle install && rake db:setup" // Configure tool-specific properties. // "customizations": {}, From 4d217ba3d3b5bb25702c6d6e3f19f48abefee69f Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:13:01 +0000 Subject: [PATCH 32/93] More for codefactor --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 30edfcad6..edbfeb79e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ FROM mcr.microsoft.com/devcontainers/ruby:0-3.1-bullseye # Install Rails -RUN gem install rails:7.0.4 webdrivers +RUN gem install rails:7.0.4 webdrivers:5.2.0 # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service # The value is a comma-separated list of allowed domains From 9486e6a79dd1a1a08df7886f6b3e5a55c6c3c34a Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:23:28 +0000 Subject: [PATCH 33/93] Adding Javascript to codespace --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b4eea9203..09780fb72 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,10 @@ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", // Features to add to the dev container. More info: https://containers.dev/features. -// "features": {}, +// Need something to get javascript working +"features": { + "ghcr.io/devcontainers-contrib/features/deno:1": {} +}, // Use 'forwardPorts' to make a list of ports inside the container available locally. // This can be used to network with other containers or the host. From 81bd0c78dfc2069a4c67defdb465d428cc5be4fe Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:34:42 +0000 Subject: [PATCH 34/93] Node rather than deno --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 09780fb72..0a0cfdebc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,7 @@ // Features to add to the dev container. More info: https://containers.dev/features. // Need something to get javascript working "features": { - "ghcr.io/devcontainers-contrib/features/deno:1": {} + "ghcr.io/devcontainers/features/node:1": {} }, // Use 'forwardPorts' to make a list of ports inside the container available locally. From 3820b017691cb607d442e6643afcd5cf209c148d Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:36:32 +0000 Subject: [PATCH 35/93] Adding codespace host so you can view things in the browser --- config/environments/development.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index 0368822e9..47de02a04 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -67,6 +67,7 @@ Rails.application.configure do config.action_mailer.delivery_method = :letter_opener config.host = 'localhost:3000' + config.hosts << ".preview.app.github.dev" config.analytics_code = '' config.action_controller.action_on_unpermitted_parameters = :raise From 381c8779eba54adf97065b7918979da6ddc67e90 Mon Sep 17 00:00:00 2001 From: Cesy Date: Mon, 19 Dec 2022 16:50:21 +0000 Subject: [PATCH 36/93] Making creation work? --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0a0cfdebc..4ebda1192 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,10 @@ // "forwardPorts": [3000, 5432], // Use 'postCreateCommand' to run commands after the container is created. -"postCreateCommand": "rbenv install 3.1.2 && bundle install && rake db:setup" +// these don't actually work as postCreateCommands, you need to run them manually +// for some unknown reason, Github codespaces use rbenv and rvm simultaneously +// and you need both to be correct for it to work +"postCreateCommand": "rbenv install 3.1.2 && rvm install 3.1.2 && bundle install && rake db:setup" // Configure tool-specific properties. // "customizations": {}, From 6492f8a54c997137e7c6b82e7db746a9b417d4bf Mon Sep 17 00:00:00 2001 From: Cesy Date: Tue, 20 Dec 2022 12:16:22 +0000 Subject: [PATCH 37/93] Pleasing codeclimate --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ebda1192..112fba529 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,7 +18,7 @@ // Use 'postCreateCommand' to run commands after the container is created. // these don't actually work as postCreateCommands, you need to run them manually -// for some unknown reason, Github codespaces use rbenv and rvm simultaneously +// for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work "postCreateCommand": "rbenv install 3.1.2 && rvm install 3.1.2 && bundle install && rake db:setup" From a4098e9a5917d6815a2398acb8404423585ceba4 Mon Sep 17 00:00:00 2001 From: Cesy Date: Tue, 20 Dec 2022 14:36:35 +0000 Subject: [PATCH 38/93] Another attempt at postgres for codespaces --- .devcontainer/devcontainer.json | 4 ++-- .devcontainer/docker-compose.yml | 2 +- config/database.yml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 112fba529..f7cbee065 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,13 +14,13 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. // This can be used to network with other containers or the host. -// "forwardPorts": [3000, 5432], +"forwardPorts": [3000, 5432] // Use 'postCreateCommand' to run commands after the container is created. // these don't actually work as postCreateCommands, you need to run them manually // for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work -"postCreateCommand": "rbenv install 3.1.2 && rvm install 3.1.2 && bundle install && rake db:setup" +// "postCreateCommand": "rbenv install 3.1.2 && rvm install 3.1.2 && bundle install && rake db:setup" // Configure tool-specific properties. // "customizations": {}, diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 96a8289ce..3c52fc0cd 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -29,7 +29,7 @@ services: - ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql environment: POSTGRES_USER: postgres - POSTGRES_DB: postgres + POSTGRES_DB: growstuff_dev POSTGRES_PASSWORD: postgres # Your config/database.yml should use the user and password you set here, # and host "db" (as that's the name of this service). You can use whatever diff --git a/config/database.yml b/config/database.yml index 72f6533ae..40d3bf406 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,6 +1,9 @@ development: adapter: postgresql database: growstuff_dev + user: postgres + password: postgres + host: db test: adapter: postgresql From aa932dd7ef9f42be67917e0149dea6e4dd923307 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 13:30:59 +1030 Subject: [PATCH 39/93] Update .devcontainer/devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f7cbee065..9cb4bf565 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. // This can be used to network with other containers or the host. -"forwardPorts": [3000, 5432] +"forwardPorts": [3000, 5432, 9200] // Use 'postCreateCommand' to run commands after the container is created. // these don't actually work as postCreateCommands, you need to run them manually From 9405f654b940a4560cd553b88042a6f987a55005 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 13:38:06 +1030 Subject: [PATCH 40/93] Try adding an es01 node of elasticsearch --- .devcontainer/docker-compose.yml | 97 ++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 3c52fc0cd..8b0ccb1cc 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -21,6 +21,99 @@ services: # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. # (Adding the "ports" property to this file will not forward from a Codespace.) + setup: + image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} + volumes: + - certs:/usr/share/elasticsearch/config/certs + user: "0" + command: > + bash -c ' + if [ x${ELASTIC_PASSWORD} == x ]; then + echo "Set the ELASTIC_PASSWORD environment variable in the .env file"; + exit 1; + elif [ x${KIBANA_PASSWORD} == x ]; then + echo "Set the KIBANA_PASSWORD environment variable in the .env file"; + exit 1; + fi; + if [ ! -f config/certs/ca.zip ]; then + echo "Creating CA"; + bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip; + unzip config/certs/ca.zip -d config/certs; + fi; + if [ ! -f config/certs/certs.zip ]; then + echo "Creating certs"; + echo -ne \ + "instances:\n"\ + " - name: es01\n"\ + " dns:\n"\ + " - es01\n"\ + " - localhost\n"\ + " ip:\n"\ + " - 127.0.0.1\n"\ + > config/certs/instances.yml; + bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key; + unzip config/certs/certs.zip -d config/certs; + fi; + echo "Setting file permissions" + chown -R root:root config/certs; + find . -type d -exec chmod 750 \{\} \;; + find . -type f -exec chmod 640 \{\} \;; + echo "Waiting for Elasticsearch availability"; + until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done; + echo "Setting kibana_system password"; + until curl -s -X POST --cacert config/certs/ca/ca.crt -u elastic:${ELASTIC_PASSWORD} -H "Content-Type: application/json" https://es01:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done; + echo "All done!"; + ' + healthcheck: + test: ["CMD-SHELL", "[ -f config/certs/es01/es01.crt ]"] + interval: 1s + timeout: 5s + retries: 120 + + es01: + depends_on: + setup: + condition: service_healthy + image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} + volumes: + - certs:/usr/share/elasticsearch/config/certs + - esdata01:/usr/share/elasticsearch/data + ports: + - ${ES_PORT}:9200 + environment: + - node.name=es01 + - cluster.name=${CLUSTER_NAME} + - cluster.initial_master_nodes=es01 + - discovery.seed_hosts= + - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} + - bootstrap.memory_lock=true + - xpack.security.enabled=true + - xpack.security.http.ssl.enabled=true + - xpack.security.http.ssl.key=certs/es01/es01.key + - xpack.security.http.ssl.certificate=certs/es01/es01.crt + - xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt + - xpack.security.http.ssl.verification_mode=certificate + - xpack.security.transport.ssl.enabled=true + - xpack.security.transport.ssl.key=certs/es01/es01.key + - xpack.security.transport.ssl.certificate=certs/es01/es01.crt + - xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt + - xpack.security.transport.ssl.verification_mode=certificate + - xpack.license.self_generated.type=${LICENSE} + mem_limit: ${MEM_LIMIT} + ulimits: + memlock: + soft: -1 + hard: -1 + healthcheck: + test: + [ + "CMD-SHELL", + "curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'", + ] + interval: 10s + timeout: 10s + retries: 120 + db: image: postgres:latest restart: unless-stopped @@ -49,3 +142,7 @@ services: volumes: postgres-data: + certs: + driver: local + esdata01: + driver: local From 60f55cec61b0db378b9ccdaaba3c0ef45b806cbb Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 13:53:19 +1030 Subject: [PATCH 41/93] Create .env --- .devcontainer/.env | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .devcontainer/.env diff --git a/.devcontainer/.env b/.devcontainer/.env new file mode 100644 index 000000000..dca5a4995 --- /dev/null +++ b/.devcontainer/.env @@ -0,0 +1,19 @@ +# Password for the 'elastic' user (at least 6 characters) +ELASTIC_PASSWORD=pass@123 + +# Version of Elastic products +STACK_VERSION=8.2.2 + +# Set the cluster name +CLUSTER_NAME=docker-cluster + +# Set to 'basic' or 'trial' to automatically start the 30-day trial +LICENSE=basic +#LICENSE=trial + +# Port to expose Elasticsearch HTTP API to the host +ES_PORT=9200 +#ES_PORT=127.0.0.1:9200 + +# Increase or decrease based on the available host memory (in bytes) +MEM_LIMIT=1073741824 From 944555f45589d65213ddc6bab0d4c11a62bf69c2 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 13:54:50 +1030 Subject: [PATCH 42/93] Update docker-compose.yml --- .devcontainer/docker-compose.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 8b0ccb1cc..68669c480 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -31,9 +31,6 @@ services: if [ x${ELASTIC_PASSWORD} == x ]; then echo "Set the ELASTIC_PASSWORD environment variable in the .env file"; exit 1; - elif [ x${KIBANA_PASSWORD} == x ]; then - echo "Set the KIBANA_PASSWORD environment variable in the .env file"; - exit 1; fi; if [ ! -f config/certs/ca.zip ]; then echo "Creating CA"; @@ -60,8 +57,6 @@ services: find . -type f -exec chmod 640 \{\} \;; echo "Waiting for Elasticsearch availability"; until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done; - echo "Setting kibana_system password"; - until curl -s -X POST --cacert config/certs/ca/ca.crt -u elastic:${ELASTIC_PASSWORD} -H "Content-Type: application/json" https://es01:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done; echo "All done!"; ' healthcheck: From 5ec8e16544d274c0f8d2cb60b80184fd99fc644c Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 14:18:41 +1030 Subject: [PATCH 43/93] Update docker-compose.yml --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 68669c480..9a10e0a17 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -94,7 +94,7 @@ services: - xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt - xpack.security.transport.ssl.verification_mode=certificate - xpack.license.self_generated.type=${LICENSE} - mem_limit: ${MEM_LIMIT} + # mem_limit: ${MEM_LIMIT} ulimits: memlock: soft: -1 From c404f92c6f66f260d3f49b1a6188bddafe7d69ad Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 14:19:46 +1030 Subject: [PATCH 44/93] Update docker-compose.yml --- .devcontainer/docker-compose.yml | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 9a10e0a17..2f2c6a750 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -21,6 +21,32 @@ services: # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. # (Adding the "ports" property to this file will not forward from a Codespace.) + db: + image: postgres:latest + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + - ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql + environment: + POSTGRES_USER: postgres + POSTGRES_DB: growstuff_dev + POSTGRES_PASSWORD: postgres + # Your config/database.yml should use the user and password you set here, + # and host "db" (as that's the name of this service). You can use whatever + # database name you want. Use `bin/rails db:prepare` to create the database. + # + # Example: + # + # development: + # <<: *default + # host: db + # username: postgres + # password: postgres + # database: myapp_development + + # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + setup: image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} volumes: @@ -109,32 +135,6 @@ services: timeout: 10s retries: 120 - db: - image: postgres:latest - restart: unless-stopped - volumes: - - postgres-data:/var/lib/postgresql/data - - ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql - environment: - POSTGRES_USER: postgres - POSTGRES_DB: growstuff_dev - POSTGRES_PASSWORD: postgres - # Your config/database.yml should use the user and password you set here, - # and host "db" (as that's the name of this service). You can use whatever - # database name you want. Use `bin/rails db:prepare` to create the database. - # - # Example: - # - # development: - # <<: *default - # host: db - # username: postgres - # password: postgres - # database: myapp_development - - # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - volumes: postgres-data: certs: From fa7329dbeca53a0902382352c39d76bff792e8b6 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 14:47:07 +1030 Subject: [PATCH 45/93] Update .env --- .devcontainer/.env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/.env b/.devcontainer/.env index dca5a4995..b3dfaea31 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -17,3 +17,6 @@ ES_PORT=9200 # Increase or decrease based on the available host memory (in bytes) MEM_LIMIT=1073741824 + +# Ruby version +VARIANT=3.1.2 From dc03800a869ba13f647a88887c881b5cc9bb25f4 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Fri, 23 Dec 2022 14:47:58 +1030 Subject: [PATCH 46/93] Update Dockerfile --- .devcontainer/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index edbfeb79e..c781fdb5c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,6 +7,9 @@ RUN gem install rails:7.0.4 webdrivers:5.2.0 # The value is a comma-separated list of allowed domains ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev" +# RUN bundle +# RUN bundle exec rake db:migrate + # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # && apt-get -y install --no-install-recommends From ef28b0aebc1180045e42aaedd9f2da7d8f4b61e3 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 14:20:14 +1030 Subject: [PATCH 47/93] Bundle immediately --- .devcontainer/devcontainer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9cb4bf565..82f977994 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,13 +14,13 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. // This can be used to network with other containers or the host. -"forwardPorts": [3000, 5432, 9200] +"forwardPorts": [3000, 5432, 9200], // Use 'postCreateCommand' to run commands after the container is created. // these don't actually work as postCreateCommands, you need to run them manually // for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work -// "postCreateCommand": "rbenv install 3.1.2 && rvm install 3.1.2 && bundle install && rake db:setup" +"postCreateCommand": "bundle install" // Configure tool-specific properties. // "customizations": {}, From 52fc939820333efa3c5f1c34f28a7dfafc9edf2d Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 14:31:06 +1030 Subject: [PATCH 48/93] Update docker-compose.yml --- .devcontainer/docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 2f2c6a750..11c67ce78 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -5,7 +5,9 @@ services: build: context: .. dockerfile: .devcontainer/Dockerfile - + depends_on: + db: + condition: service_healthy volumes: - ../..:/workspaces:cached From 4d207e5d185ecd720b487034097b715b797750b7 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 14:41:45 +1030 Subject: [PATCH 49/93] Update docker-compose.yml --- .devcontainer/docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 11c67ce78..3107f141f 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -45,6 +45,13 @@ services: # username: postgres # password: postgres # database: myapp_development + ports: + - "5432:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. # (Adding the "ports" property to this file will not forward from a Codespace.) From ac61ae3a56e411c59ab68633b922e9c6e04edaa1 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 14:55:37 +1030 Subject: [PATCH 50/93] Update database.yml --- config/database.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/database.yml b/config/database.yml index 40d3bf406..c01af6fa2 100644 --- a/config/database.yml +++ b/config/database.yml @@ -8,6 +8,9 @@ development: test: adapter: postgresql database: growstuff_test + user: postgres + password: postgres + host: db production: adapter: postgresql From 4cd1fb2c5add22177fc99903747431dad146d584 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:05:14 +1030 Subject: [PATCH 51/93] Expose port --- .devcontainer/.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index b3dfaea31..ce847fae2 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -12,8 +12,8 @@ LICENSE=basic #LICENSE=trial # Port to expose Elasticsearch HTTP API to the host -ES_PORT=9200 -#ES_PORT=127.0.0.1:9200 +#ES_PORT=es01:9200 +ES_PORT=127.0.0.1:9200 # Increase or decrease based on the available host memory (in bytes) MEM_LIMIT=1073741824 From 7671fb87c01fed78106563b4b92434ca030d454a Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:06:36 +1030 Subject: [PATCH 52/93] Whitepsace --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 3107f141f..6bf8cab57 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -93,7 +93,7 @@ services: echo "Waiting for Elasticsearch availability"; until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done; echo "All done!"; - ' + ' healthcheck: test: ["CMD-SHELL", "[ -f config/certs/es01/es01.crt ]"] interval: 1s From 7afd43de1885cacd49d68a8a8c6c22e0b3c04ac0 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:07:43 +1030 Subject: [PATCH 53/93] Add more RUN steps --- .devcontainer/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c781fdb5c..3ab3bd30d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,8 +7,9 @@ RUN gem install rails:7.0.4 webdrivers:5.2.0 # The value is a comma-separated list of allowed domains ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev" -# RUN bundle -# RUN bundle exec rake db:migrate +RUN bundle +RUN bundle exec rake db:create +RUN bundle exec rake db:migrate # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ From 52478907a9424c2dccb3ca616314d641b5ce3409 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:09:32 +1030 Subject: [PATCH 54/93] Comment back out --- .devcontainer/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3ab3bd30d..5cb55287c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,9 +7,9 @@ RUN gem install rails:7.0.4 webdrivers:5.2.0 # The value is a comma-separated list of allowed domains ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev" -RUN bundle -RUN bundle exec rake db:create -RUN bundle exec rake db:migrate +#RUN bundle +#RUN bundle exec rake db:create +#RUN bundle exec rake db:migrate # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ From 484f7f4b9ab19c85ca151635940d1a689a4caa4b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:10:50 +1030 Subject: [PATCH 55/93] Depend on es01 being up --- .devcontainer/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 6bf8cab57..ccc67550d 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -8,6 +8,8 @@ services: depends_on: db: condition: service_healthy + es01: + condition: service_healthy volumes: - ../..:/workspaces:cached From cbe7e875d78740720bf6325626d19d9da70d33be Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:23:10 +1030 Subject: [PATCH 56/93] Don't rely on health --- .devcontainer/.env | 4 ++-- .devcontainer/docker-compose.yml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index ce847fae2..6572e0c74 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -12,8 +12,8 @@ LICENSE=basic #LICENSE=trial # Port to expose Elasticsearch HTTP API to the host -#ES_PORT=es01:9200 -ES_PORT=127.0.0.1:9200 +#ES_PORT=9200 +ES_PORT=localhost:9200 # Increase or decrease based on the available host memory (in bytes) MEM_LIMIT=1073741824 diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index ccc67550d..6bf8cab57 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -8,8 +8,6 @@ services: depends_on: db: condition: service_healthy - es01: - condition: service_healthy volumes: - ../..:/workspaces:cached From 3ad40586695f274c09eac288d6c27d812ea82b85 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:30:19 +1030 Subject: [PATCH 57/93] Add host --- .devcontainer/.env | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index 6572e0c74..fae57b4c2 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -12,8 +12,9 @@ LICENSE=basic #LICENSE=trial # Port to expose Elasticsearch HTTP API to the host -#ES_PORT=9200 -ES_PORT=localhost:9200 +ES_PORT=9200 +ES_HOST=es01 +#ES_PORT=localhost:9200 # Increase or decrease based on the available host memory (in bytes) MEM_LIMIT=1073741824 From 1a6adb333069ab0e097830a044990f6c5d34566e Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:44:12 +1030 Subject: [PATCH 58/93] Update .env --- .devcontainer/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index fae57b4c2..fa410effd 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -20,4 +20,4 @@ ES_HOST=es01 MEM_LIMIT=1073741824 # Ruby version -VARIANT=3.1.2 +VARIANT=3.1.3 From 763a547613458db2d5cc37f62cd86b71e191d968 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:49:59 +1030 Subject: [PATCH 59/93] Add elasticsearch config --- config/elasticsearch.yml | 5 +++++ config/initializers/elasticsearch.rb | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 config/elasticsearch.yml create mode 100644 config/initializers/elasticsearch.rb diff --git a/config/elasticsearch.yml b/config/elasticsearch.yml new file mode 100644 index 000000000..bad9c21a8 --- /dev/null +++ b/config/elasticsearch.yml @@ -0,0 +1,5 @@ +development: &default + host: 'http://es01:9200' + log: true +test: + host: 'http://es01:9200' diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb new file mode 100644 index 000000000..f6402cbaf --- /dev/null +++ b/config/initializers/elasticsearch.rb @@ -0,0 +1,15 @@ +# config/initializer/elasticsearch.rb + +config = { + transport_options: { request: { timeout: 5 } } +} +if File.exist?('config/elasticsearch.yml') + template = ERB.new(File.new('config/elasticsearch.yml').read) + processed = YAML.safe_load(template.result(binding)) + config.merge!(processed[Rails.env].symbolize_keys) +end + +# if you choose to use elasticsearch-rails-model +Elasticsearch::Model.client = Elasticsearch::Client.new(config) +# if you choose to use elasticsearch-rails-persistence +# Elasticsearch::Persistence.client = Elasticsearch::Client.new(config) From 2c7f35cd641622c30fd98241e507f7ce094d0f0d Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:53:45 +1030 Subject: [PATCH 60/93] Ensure the setup is at least healthy --- .devcontainer/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 6bf8cab57..d7815d672 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -8,6 +8,8 @@ services: depends_on: db: condition: service_healthy + setup: + condition: service_healthy volumes: - ../..:/workspaces:cached From 0ad1ce0283a3e3c8b2ff952cde902679444afc9a Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 15:54:36 +1030 Subject: [PATCH 61/93] Trial this dep again --- .devcontainer/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index d7815d672..e0376b95c 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -10,6 +10,8 @@ services: condition: service_healthy setup: condition: service_healthy + es01: + condition: service-healthy volumes: - ../..:/workspaces:cached From 4a07c460494e08c8d2b5d20ab5961c2c81f6d40b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 16:21:46 +1030 Subject: [PATCH 62/93] Set env var --- .devcontainer/docker-compose.yml | 2 ++ config/initializers/elasticsearch.rb | 15 --------------- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 config/initializers/elasticsearch.rb diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index e0376b95c..edd2dcd36 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -12,6 +12,8 @@ services: condition: service_healthy es01: condition: service-healthy + environment: + - ELASTICSEARCH_URL=https://es01:9200/ volumes: - ../..:/workspaces:cached diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb deleted file mode 100644 index f6402cbaf..000000000 --- a/config/initializers/elasticsearch.rb +++ /dev/null @@ -1,15 +0,0 @@ -# config/initializer/elasticsearch.rb - -config = { - transport_options: { request: { timeout: 5 } } -} -if File.exist?('config/elasticsearch.yml') - template = ERB.new(File.new('config/elasticsearch.yml').read) - processed = YAML.safe_load(template.result(binding)) - config.merge!(processed[Rails.env].symbolize_keys) -end - -# if you choose to use elasticsearch-rails-model -Elasticsearch::Model.client = Elasticsearch::Client.new(config) -# if you choose to use elasticsearch-rails-persistence -# Elasticsearch::Persistence.client = Elasticsearch::Client.new(config) From 8938a7d40eac74f98d99d6a26143c5609925dc4b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 16:26:27 +1030 Subject: [PATCH 63/93] Update .devcontainer/docker-compose.yml --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index edd2dcd36..6bf08eebc 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -135,7 +135,7 @@ services: - xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt - xpack.security.transport.ssl.verification_mode=certificate - xpack.license.self_generated.type=${LICENSE} - # mem_limit: ${MEM_LIMIT} + mem_limit: ${MEM_LIMIT} ulimits: memlock: soft: -1 From ea2f6a35c24e8021a242836dc07aed143726537c Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 16:30:26 +1030 Subject: [PATCH 64/93] Fix var --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 6bf08eebc..ca7c4d470 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -13,7 +13,7 @@ services: es01: condition: service-healthy environment: - - ELASTICSEARCH_URL=https://es01:9200/ + ELASTICSEARCH_URL: https://es01:9200/ volumes: - ../..:/workspaces:cached From 8ac33464743b53a7e4249aff4624ae221840966b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 06:28:31 +0000 Subject: [PATCH 65/93] Simplify --- .devcontainer/docker-compose.yml | 100 +++++++------------------------ 1 file changed, 22 insertions(+), 78 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index ca7c4d470..02573a943 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -8,12 +8,14 @@ services: depends_on: db: condition: service_healthy - setup: + elasticsearch: condition: service_healthy - es01: - condition: service-healthy + # setup: + # condition: service_healthy + # es01: + # condition: service-healthy environment: - ELASTICSEARCH_URL: https://es01:9200/ + ELASTICSEARCH_URL: http://elasticsearch:9200/ volumes: - ../..:/workspaces:cached @@ -62,93 +64,35 @@ services: # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. # (Adding the "ports" property to this file will not forward from a Codespace.) - setup: - image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} - volumes: - - certs:/usr/share/elasticsearch/config/certs - user: "0" - command: > - bash -c ' - if [ x${ELASTIC_PASSWORD} == x ]; then - echo "Set the ELASTIC_PASSWORD environment variable in the .env file"; - exit 1; - fi; - if [ ! -f config/certs/ca.zip ]; then - echo "Creating CA"; - bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip; - unzip config/certs/ca.zip -d config/certs; - fi; - if [ ! -f config/certs/certs.zip ]; then - echo "Creating certs"; - echo -ne \ - "instances:\n"\ - " - name: es01\n"\ - " dns:\n"\ - " - es01\n"\ - " - localhost\n"\ - " ip:\n"\ - " - 127.0.0.1\n"\ - > config/certs/instances.yml; - bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key; - unzip config/certs/certs.zip -d config/certs; - fi; - echo "Setting file permissions" - chown -R root:root config/certs; - find . -type d -exec chmod 750 \{\} \;; - find . -type f -exec chmod 640 \{\} \;; - echo "Waiting for Elasticsearch availability"; - until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done; - echo "All done!"; - ' - healthcheck: - test: ["CMD-SHELL", "[ -f config/certs/es01/es01.crt ]"] - interval: 1s - timeout: 5s - retries: 120 - - es01: - depends_on: - setup: - condition: service_healthy - image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} - volumes: - - certs:/usr/share/elasticsearch/config/certs - - esdata01:/usr/share/elasticsearch/data - ports: - - ${ES_PORT}:9200 + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0 + container_name: elasticsearch environment: - - node.name=es01 - - cluster.name=${CLUSTER_NAME} - - cluster.initial_master_nodes=es01 - - discovery.seed_hosts= - - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} - - bootstrap.memory_lock=true - - xpack.security.enabled=true - - xpack.security.http.ssl.enabled=true - - xpack.security.http.ssl.key=certs/es01/es01.key - - xpack.security.http.ssl.certificate=certs/es01/es01.crt - - xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt - - xpack.security.http.ssl.verification_mode=certificate - - xpack.security.transport.ssl.enabled=true - - xpack.security.transport.ssl.key=certs/es01/es01.key - - xpack.security.transport.ssl.certificate=certs/es01/es01.crt - - xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt - - xpack.security.transport.ssl.verification_mode=certificate - - xpack.license.self_generated.type=${LICENSE} - mem_limit: ${MEM_LIMIT} + - xpack.security.enabled=false + - discovery.type=single-node ulimits: memlock: soft: -1 hard: -1 + nofile: + soft: 65536 + hard: 65536 + cap_add: + - IPC_LOCK healthcheck: test: [ "CMD-SHELL", - "curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'", + "curl http://localhost:9200", ] interval: 10s timeout: 10s retries: 120 + volumes: + - esdata01:/usr/share/elasticsearch/data + ports: + - 9200:9200 + - 9300:9300 volumes: postgres-data: From 2d210dfb9564c37e353cee5e61693411e54ba56d Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 06:29:46 +0000 Subject: [PATCH 66/93] Build DB --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 82f977994..e61b2727f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,7 +20,7 @@ // these don't actually work as postCreateCommands, you need to run them manually // for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work -"postCreateCommand": "bundle install" +"postCreateCommand": "bundle install && bundle exec rake db:create && bundle exec rake db:migrate" // Configure tool-specific properties. // "customizations": {}, From eb58019c22f75e0ccbd024867290183677fd675c Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 06:42:22 +0000 Subject: [PATCH 67/93] Remove network mode for now --- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e61b2727f..cfa046e2d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,7 +20,7 @@ // these don't actually work as postCreateCommands, you need to run them manually // for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work -"postCreateCommand": "bundle install && bundle exec rake db:create && bundle exec rake db:migrate" +"postCreateCommand": "bundle install && bundle exec rake db:create" // Configure tool-specific properties. // "customizations": {}, diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 02573a943..3a17fa00e 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -23,7 +23,7 @@ services: command: sleep infinity # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. - network_mode: service:db + # network_mode: service:db # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. # user: root From ab661f97dc53ba885028f9ba06dd5fddbdfc88ba Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 06:49:16 +0000 Subject: [PATCH 68/93] Change healthcheck --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 3a17fa00e..d5ca3bb06 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -83,7 +83,7 @@ services: test: [ "CMD-SHELL", - "curl http://localhost:9200", + "curl http://localhost:9200 | grep tagline", ] interval: 10s timeout: 10s From 18161cf6d43d5c0d36d10eaa83996c0a1621a44d Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:04:53 +0000 Subject: [PATCH 69/93] Update schema --- db/schema.rb | 185 +++++++++++++++++++++++++++++---------------------- 1 file changed, 107 insertions(+), 78 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 0d0d6a357..3cd83979d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,25 +2,52 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# 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 +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/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: 2020_08_15_012538) do - +ActiveRecord::Schema[7.0].define(version: 2023_03_13_015323) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" + create_table "active_storage_attachments", force: :cascade do |t| + t.string "name", null: false + t.string "record_type", null: false + t.bigint "record_id", null: false + t.bigint "blob_id", null: false + t.datetime "created_at", null: false + t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" + t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true + end + + create_table "active_storage_blobs", force: :cascade do |t| + t.string "key", null: false + t.string "filename", null: false + t.string "content_type" + t.text "metadata" + t.string "service_name", null: false + t.bigint "byte_size", null: false + t.string "checksum" + t.datetime "created_at", null: false + t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true + end + + create_table "active_storage_variant_records", force: :cascade do |t| + t.bigint "blob_id", null: false + t.string "variation_digest", null: false + t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true + end + create_table "alternate_names", id: :serial, force: :cascade do |t| t.string "name", null: false t.integer "crop_id", null: false t.integer "creator_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "authentications", id: :serial, force: :cascade do |t| @@ -29,8 +56,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "uid" t.string "token" t.string "secret" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "name" t.index ["member_id"], name: "index_authentications_on_member_id" end @@ -56,8 +83,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "file_file_name" t.string "description", limit: 2048 t.integer "position", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["site_id", "block_id"], name: "index_comfy_cms_files_on_site_id_and_block_id" t.index ["site_id", "file_file_name"], name: "index_comfy_cms_files_on_site_id_and_file_file_name" t.index ["site_id", "label"], name: "index_comfy_cms_files_on_site_id_and_label" @@ -69,10 +96,10 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.text "content" t.string "record_type" t.integer "record_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "tag", default: "text", null: false - t.datetime "datetime" + t.datetime "datetime", precision: nil t.boolean "boolean", default: false, null: false t.index ["identifier"], name: "index_comfy_cms_fragments_on_identifier" t.index ["record_id", "record_type"], name: "index_comfy_cms_fragments_on_record_id_and_record_type" @@ -88,8 +115,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.text "css" t.text "js" t.integer "position", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["parent_id", "position"], name: "index_comfy_cms_layouts_on_parent_id_and_position" t.index ["site_id", "identifier"], name: "index_comfy_cms_layouts_on_site_id_and_identifier", unique: true end @@ -106,8 +133,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.integer "position", default: 0, null: false t.integer "children_count", default: 0, null: false t.boolean "is_published", default: true, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["parent_id", "position"], name: "index_comfy_cms_pages_on_parent_id_and_position" t.index ["site_id", "full_path"], name: "index_comfy_cms_pages_on_site_id_and_full_path" end @@ -116,7 +143,7 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "record_type", null: false t.integer "record_id", null: false t.text "data" - t.datetime "created_at" + t.datetime "created_at", precision: nil t.index ["record_type", "record_id", "created_at"], name: "index_cms_revisions_on_rtype_and_rid_and_created_at" end @@ -135,8 +162,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "identifier", null: false t.text "content" t.integer "position", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["site_id", "identifier"], name: "index_comfy_cms_snippets_on_site_id_and_identifier", unique: true t.index ["site_id", "position"], name: "index_comfy_cms_snippets_on_site_id_and_position" end @@ -148,8 +175,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "label", null: false t.text "content_cache" t.boolean "is_published", default: true, null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["is_published"], name: "index_comfy_cms_translations_on_is_published" t.index ["locale"], name: "index_comfy_cms_translations_on_locale" t.index ["page_id"], name: "index_comfy_cms_translations_on_page_id" @@ -159,15 +186,15 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.integer "post_id", null: false t.integer "author_id", null: false t.text "body", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "crop_companions", force: :cascade do |t| t.integer "crop_a_id", null: false t.integer "crop_b_id", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "crop_posts", id: false, force: :cascade do |t| @@ -180,8 +207,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do create_table "crops", id: :serial, force: :cascade do |t| t.string "name", null: false t.string "en_wikipedia_url" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.integer "parent_id" t.integer "plantings_count", default: 0 @@ -206,16 +233,16 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do create_table "follows", id: :serial, force: :cascade do |t| t.integer "follower_id" t.integer "followed_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "forums", id: :serial, force: :cascade do |t| t.string "name", null: false t.text "description", null: false t.integer "owner_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.index ["slug"], name: "index_forums_on_slug", unique: true end @@ -223,8 +250,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do create_table "garden_types", force: :cascade do |t| t.text "name", null: false t.text "slug", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["name"], name: "index_garden_types_on_name", unique: true t.index ["slug"], name: "index_garden_types_on_slug", unique: true end @@ -233,8 +260,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "name", null: false t.integer "owner_id" t.string "slug", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.text "description" t.boolean "active", default: true t.string "location" @@ -261,8 +288,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.decimal "quantity" t.string "unit" t.text "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.decimal "weight_quantity" t.string "weight_unit" @@ -283,8 +310,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "likeable_type" t.integer "likeable_id" t.string "categories", array: true - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.index ["likeable_id"], name: "index_likes_on_likeable_id" t.index ["likeable_type", "likeable_id"], name: "index_likes_on_likeable_type_and_likeable_id" t.index ["member_id"], name: "index_likes_on_member_id" @@ -294,16 +321,16 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "unsubscriber_type" t.integer "unsubscriber_id" t.integer "conversation_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["conversation_id"], name: "index_mailboxer_conversation_opt_outs_on_conversation_id" t.index ["unsubscriber_id", "unsubscriber_type"], name: "index_mailboxer_conversation_opt_outs_on_unsubscriber_id_type" end create_table "mailboxer_conversations", id: :serial, force: :cascade do |t| t.string "subject", default: "" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "mailboxer_notifications", id: :serial, force: :cascade do |t| @@ -318,10 +345,10 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "notified_object_type" t.integer "notified_object_id" t.string "attachment" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "global", default: false - t.datetime "expires" + t.datetime "expires", precision: nil t.index ["conversation_id"], name: "index_mailboxer_notifications_on_conversation_id" t.index ["notified_object_id", "notified_object_type"], name: "index_mailboxer_notifications_on_notified_object_id_and_type" t.index ["notified_object_type", "notified_object_id"], name: "mailboxer_notifications_notified_object" @@ -337,8 +364,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.boolean "trashed", default: false t.boolean "deleted", default: false t.string "mailbox_type", limit: 25 - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "is_delivered", default: false t.string "delivery_method" t.string "message_id" @@ -353,22 +380,22 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" - t.datetime "reset_password_sent_at" - t.datetime "remember_created_at" + t.datetime "reset_password_sent_at", precision: nil + t.datetime "remember_created_at", precision: nil t.integer "sign_in_count", default: 0 - t.datetime "current_sign_in_at" - t.datetime "last_sign_in_at" + t.datetime "current_sign_in_at", precision: nil + t.datetime "last_sign_in_at", precision: nil t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.string "confirmation_token" - t.datetime "confirmed_at" - t.datetime "confirmation_sent_at" + t.datetime "confirmed_at", precision: nil + t.datetime "confirmation_sent_at", precision: nil t.string "unconfirmed_email" t.integer "failed_attempts", default: 0 t.string "unlock_token" - t.datetime "locked_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "locked_at", precision: nil + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "login_name" t.string "slug" t.boolean "tos_agreement" @@ -385,7 +412,7 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.integer "gardens_count" t.integer "harvests_count" t.integer "seeds_count" - t.datetime "discarded_at" + t.datetime "discarded_at", precision: nil t.integer "photos_count" t.integer "forums_count" t.index ["confirmation_token"], name: "index_members_on_confirmation_token", unique: true @@ -408,8 +435,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.text "body" t.boolean "read", default: false t.integer "post_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil end create_table "orders_products", id: false, force: :cascade do |t| @@ -421,8 +448,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.integer "photo_id", null: false t.integer "photographable_id", null: false t.string "photographable_type", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "crop_id" t.index ["photographable_id", "photographable_type", "photo_id"], name: "items_to_photos_idx", unique: true t.index ["photographable_id", "photographable_type"], name: "photographable_idx" @@ -432,14 +459,14 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.integer "owner_id", null: false t.string "thumbnail_url", null: false t.string "fullsize_url", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "title", null: false t.string "license_name", null: false t.string "license_url" t.string "link_url", null: false t.string "source_id" - t.datetime "date_taken" + t.datetime "date_taken", precision: nil t.integer "likes_count", default: 0 t.string "source" t.index ["fullsize_url"], name: "index_photos_on_fullsize_url", unique: true @@ -459,8 +486,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do create_table "plant_parts", id: :serial, force: :cascade do |t| t.string "name" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.integer "harvests_count", default: 0 end @@ -471,8 +498,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.date "planted_at" t.integer "quantity" t.text "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.string "sunniness" t.string "planted_from" @@ -491,8 +518,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.integer "author_id", null: false t.string "subject", null: false t.text "body", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.integer "forum_id" t.integer "likes_count", default: 0 @@ -504,8 +531,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do create_table "roles", id: :serial, force: :cascade do |t| t.string "name", null: false t.text "description" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "slug" t.index ["slug"], name: "index_roles_on_slug", unique: true end @@ -513,8 +540,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do create_table "scientific_names", id: :serial, force: :cascade do |t| t.string "name", null: false t.integer "crop_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.integer "creator_id" end @@ -524,8 +551,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.text "description" t.integer "quantity" t.date "plant_before" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil + t.datetime "updated_at", precision: nil t.string "tradable_to", default: "nowhere" t.string "slug" t.integer "days_until_maturity_min" @@ -540,6 +567,8 @@ ActiveRecord::Schema.define(version: 2020_08_15_012538) do t.index ["slug"], name: "index_seeds_on_slug", unique: true end + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" + add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" add_foreign_key "harvests", "plantings" add_foreign_key "mailboxer_conversation_opt_outs", "mailboxer_conversations", column: "conversation_id", name: "mb_opt_outs_on_conversations_id" add_foreign_key "mailboxer_notifications", "mailboxer_conversations", column: "conversation_id", name: "notifications_on_conversation_id" From a9208180c4e9d40e5241c1513146d1ec997bdb17 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:06:47 +0000 Subject: [PATCH 70/93] Adjust docker-compose --- .devcontainer/docker-compose.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index d5ca3bb06..c8cfe4431 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -10,10 +10,6 @@ services: condition: service_healthy elasticsearch: condition: service_healthy - # setup: - # condition: service_healthy - # es01: - # condition: service-healthy environment: ELASTICSEARCH_URL: http://elasticsearch:9200/ volumes: @@ -22,15 +18,6 @@ services: # Overrides default command so things don't shut down after the process ends. command: sleep infinity - # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. - # network_mode: service:db - - # Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - # user: root - - # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - db: image: postgres:latest restart: unless-stopped @@ -41,18 +28,6 @@ services: POSTGRES_USER: postgres POSTGRES_DB: growstuff_dev POSTGRES_PASSWORD: postgres - # Your config/database.yml should use the user and password you set here, - # and host "db" (as that's the name of this service). You can use whatever - # database name you want. Use `bin/rails db:prepare` to create the database. - # - # Example: - # - # development: - # <<: *default - # host: db - # username: postgres - # password: postgres - # database: myapp_development ports: - "5432:5432" healthcheck: @@ -61,9 +36,6 @@ services: timeout: 5s retries: 5 - # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0 container_name: elasticsearch From db798aa847efc541a6a1e1979b62cc34b1c2caa3 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:11:38 +0000 Subject: [PATCH 71/93] Add various env --- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cfa046e2d..0dba5b4a7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,7 +20,7 @@ // these don't actually work as postCreateCommands, you need to run them manually // for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work -"postCreateCommand": "bundle install && bundle exec rake db:create" +"postCreateCommand": "nice -n 19 bundle install && nice -n 19 bundle exec rake db:create && nice -n 19 bundle exec rake db:migrate" // Configure tool-specific properties. // "customizations": {}, diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index c8cfe4431..083ef88e6 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -12,6 +12,18 @@ services: condition: service_healthy environment: ELASTICSEARCH_URL: http://elasticsearch:9200/ + APP_DOMAIN_NAME: localhost:3000 + APP_PROTOCOL: http + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + # DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test + DEVISE_SECRET_KEY: secret + # ELASTIC_SEARCH_VERSION: "7.5.1-amd64" + GROWSTUFF_EMAIL: "noreply@test.growstuff.org" + GROWSTUFF_FLICKR_KEY: secretkey" + GROWSTUFF_FLICKR_SECRET: secretsecret + GROWSTUFF_SITE_NAME: "Growstuff (local)" + # RAILS_ENV: test + RAILS_SECRET_TOKEN: supersecret volumes: - ../..:/workspaces:cached From 15c2768f8c62632dd96d17dbedacb711adb1a097 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:23:30 +0000 Subject: [PATCH 72/93] Last tidyup --- .devcontainer/devcontainer.json | 4 ++-- .devcontainer/docker-compose.yml | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0dba5b4a7..940d241e7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres { -"name": "Ruby on Rails & Postgres", +"name": "Growstuff", "dockerComposeFile": "docker-compose.yml", "service": "app", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", @@ -20,7 +20,7 @@ // these don't actually work as postCreateCommands, you need to run them manually // for some unknown reason, Github codespaces use rbenv and rvm simultaneously // and you need both to be correct for it to work -"postCreateCommand": "nice -n 19 bundle install && nice -n 19 bundle exec rake db:create && nice -n 19 bundle exec rake db:migrate" +"postCreateCommand": "nice -n 19 bundle install && nice -n 19 bundle exec rake db:create && nice -n 19 bundle exec rake db:migrate && nice -n19 bundle exec rake db:seed" // Configure tool-specific properties. // "customizations": {}, diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 083ef88e6..a23d1b129 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -14,16 +14,15 @@ services: ELASTICSEARCH_URL: http://elasticsearch:9200/ APP_DOMAIN_NAME: localhost:3000 APP_PROTOCOL: http - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test DEVISE_SECRET_KEY: secret - # ELASTIC_SEARCH_VERSION: "7.5.1-amd64" GROWSTUFF_EMAIL: "noreply@test.growstuff.org" GROWSTUFF_FLICKR_KEY: secretkey" GROWSTUFF_FLICKR_SECRET: secretsecret GROWSTUFF_SITE_NAME: "Growstuff (local)" - # RAILS_ENV: test RAILS_SECRET_TOKEN: supersecret + # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + # DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test + # ELASTIC_SEARCH_VERSION: "7.5.1-amd64" volumes: - ../..:/workspaces:cached From d573663cbb30f2a630dac5b7b30b12030971699b Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:29:46 +0000 Subject: [PATCH 73/93] Clean up redundant variables --- .devcontainer/.env | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index fa410effd..861c6936f 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -1,23 +1,2 @@ -# Password for the 'elastic' user (at least 6 characters) -ELASTIC_PASSWORD=pass@123 - -# Version of Elastic products -STACK_VERSION=8.2.2 - -# Set the cluster name -CLUSTER_NAME=docker-cluster - -# Set to 'basic' or 'trial' to automatically start the 30-day trial -LICENSE=basic -#LICENSE=trial - -# Port to expose Elasticsearch HTTP API to the host -ES_PORT=9200 -ES_HOST=es01 -#ES_PORT=localhost:9200 - -# Increase or decrease based on the available host memory (in bytes) -MEM_LIMIT=1073741824 - # Ruby version VARIANT=3.1.3 From 8f12bfb6da80b8ac48c3c658f8d81b8bd16b4013 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 13 Mar 2023 07:31:51 +0000 Subject: [PATCH 74/93] Cleanup, though we might not need a database.yml iff we pass in that url --- .devcontainer/docker-compose.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index a23d1b129..886683721 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -20,9 +20,6 @@ services: GROWSTUFF_FLICKR_SECRET: secretsecret GROWSTUFF_SITE_NAME: "Growstuff (local)" RAILS_SECRET_TOKEN: supersecret - # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - # DATABASE_URL: postgres://postgres:postgres@localhost:5432/growstuff_test - # ELASTIC_SEARCH_VERSION: "7.5.1-amd64" volumes: - ../..:/workspaces:cached From 97353a54c0e90582bb34eb8e03b5c30bc123235b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 07:58:01 +0000 Subject: [PATCH 75/93] Bump rubocop-rspec from 2.19.0 to 2.20.0 Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.19.0 to 2.20.0. - [Release notes](https://github.com/rubocop/rubocop-rspec/releases) - [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.19.0...v2.20.0) --- updated-dependencies: - dependency-name: rubocop-rspec dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74ec45699..707c79791 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -484,7 +484,7 @@ GEM ffi (~> 1.0) redis-client (0.14.1) connection_pool - regexp_parser (2.7.0) + regexp_parser (2.8.0) responders (3.1.0) actionpack (>= 5.2) railties (>= 5.2) @@ -547,7 +547,7 @@ GEM activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.19.0) + rubocop-rspec (2.20.0) rubocop (~> 1.33) rubocop-capybara (~> 2.17) ruby-progressbar (1.13.0) From bf2539d0279a5d4566e0fb063e8d4ddb92c2eea3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 08:51:21 +0000 Subject: [PATCH 76/93] Bump sidekiq from 7.0.8 to 7.0.9 Bumps [sidekiq](https://github.com/sidekiq/sidekiq) from 7.0.8 to 7.0.9. - [Release notes](https://github.com/sidekiq/sidekiq/releases) - [Changelog](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) - [Commits](https://github.com/sidekiq/sidekiq/compare/v7.0.8...v7.0.9) --- updated-dependencies: - dependency-name: sidekiq dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 707c79791..9e94523ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -579,7 +579,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sidekiq (7.0.8) + sidekiq (7.0.9) concurrent-ruby (< 2) connection_pool (>= 2.3.0) rack (>= 2.2.4) From 1c3f7994efc7f675fad94c3e37375e9080078981 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:13:46 +0000 Subject: [PATCH 77/93] Bump selenium-webdriver from 4.8.6 to 4.9.0 Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.8.6 to 4.9.0. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES) - [Commits](https://github.com/SeleniumHQ/selenium/commits/selenium-4.9.0) --- updated-dependencies: - dependency-name: selenium-webdriver dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9e94523ac..790eb8ad2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -575,7 +575,7 @@ GEM activemodel (>= 5) elasticsearch (>= 6, < 7.14) hashie - selenium-webdriver (4.8.6) + selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) From 56e30c4fb20d9c885c91f138dd0e36eec2b4689b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:31:10 +0000 Subject: [PATCH 78/93] Bump rubocop-rails from 2.19.0 to 2.19.1 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.19.0...v2.19.1) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 790eb8ad2..5c88d290e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -414,7 +414,7 @@ GEM omniauth-oauth (~> 1.1) rack orm_adapter (0.5.0) - parallel (1.22.1) + parallel (1.23.0) parser (3.2.2.0) ast (~> 2.4.1) percy-capybara (5.0.0) @@ -543,7 +543,7 @@ GEM parser (>= 3.2.1.0) rubocop-capybara (2.17.1) rubocop (~> 1.41) - rubocop-rails (2.19.0) + rubocop-rails (2.19.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From 63a585f84095c74f4a6cf1722bea8bdf3f4e3af2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:48:48 +0000 Subject: [PATCH 79/93] Bump puma from 6.2.1 to 6.2.2 Bumps [puma](https://github.com/puma/puma) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v6.2.1...v6.2.2) --- updated-dependencies: - dependency-name: puma dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5c88d290e..abd6f7469 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -426,7 +426,7 @@ GEM rate_throttle_client (~> 0.1.0) popper_js (1.16.1) public_suffix (5.0.1) - puma (6.2.1) + puma (6.2.2) nio4r (~> 2.0) query_diet (0.7.1) racc (1.6.2) From 8722d04bfa118bda90e81abed32c8ba08f115431 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 10:12:55 +0000 Subject: [PATCH 80/93] Bump faker from 3.1.1 to 3.2.0 Bumps [faker](https://github.com/faker-ruby/faker) from 3.1.1 to 3.2.0. - [Release notes](https://github.com/faker-ruby/faker/releases) - [Changelog](https://github.com/faker-ruby/faker/blob/main/CHANGELOG.md) - [Commits](https://github.com/faker-ruby/faker/compare/v3.1.1...v3.2.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index abd6f7469..346434793 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,7 +233,7 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (3.1.1) + faker (3.2.0) i18n (>= 1.8.11, < 2) faraday (1.10.3) faraday-em_http (~> 1.0) From dbf0c404d59acaee47deedf016210f499b4540a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 10:30:21 +0000 Subject: [PATCH 81/93] Bump rubocop from 1.50.0 to 1.50.2 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.50.0 to 1.50.2. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.50.0...v1.50.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 346434793..ea36cd35d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -529,7 +529,7 @@ GEM rswag-ui (2.8.0) actionpack (>= 3.1, < 7.1) railties (>= 3.1, < 7.1) - rubocop (1.50.0) + rubocop (1.50.2) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) From 50c66a2681afee78813154e6598f43577c663484 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 07:58:37 +0000 Subject: [PATCH 82/93] Bump rswag-ui from 2.8.0 to 2.9.0 Bumps [rswag-ui](https://github.com/rswag/rswag) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/rswag/rswag/releases) - [Changelog](https://github.com/rswag/rswag/blob/master/CHANGELOG.md) - [Commits](https://github.com/rswag/rswag/compare/2.8.0...2.9.0) --- updated-dependencies: - dependency-name: rswag-ui dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ea36cd35d..ad343578b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -430,7 +430,7 @@ GEM nio4r (~> 2.0) query_diet (0.7.1) racc (1.6.2) - rack (2.2.6.4) + rack (2.2.7) rack-cors (2.0.1) rack (>= 2.0.0) rack-protection (3.0.6) @@ -526,7 +526,7 @@ GEM json-schema (>= 2.2, < 4.0) railties (>= 3.1, < 7.1) rspec-core (>= 2.14) - rswag-ui (2.8.0) + rswag-ui (2.9.0) actionpack (>= 3.1, < 7.1) railties (>= 3.1, < 7.1) rubocop (1.50.2) From d71bd3470512e79fece4388e86747609991d4c17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 08:45:16 +0000 Subject: [PATCH 83/93] Bump rswag-api from 2.8.0 to 2.9.0 Bumps [rswag-api](https://github.com/rswag/rswag) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/rswag/rswag/releases) - [Changelog](https://github.com/rswag/rswag/blob/master/CHANGELOG.md) - [Commits](https://github.com/rswag/rswag/compare/2.8.0...2.9.0) --- updated-dependencies: - dependency-name: rswag-api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ad343578b..8bb60937e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -519,7 +519,7 @@ GEM concord (~> 0.1) parser (>= 2.6) rspec (~> 3.0) - rswag-api (2.8.0) + rswag-api (2.9.0) railties (>= 3.1, < 7.1) rswag-specs (2.8.0) activesupport (>= 3.1, < 7.1) From ab2e7bc8799a9138247b49c2713c2b2916eb3f7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 09:05:29 +0000 Subject: [PATCH 84/93] Bump pg from 1.4.6 to 1.5.1 Bumps [pg](https://github.com/ged/ruby-pg) from 1.4.6 to 1.5.1. - [Release notes](https://github.com/ged/ruby-pg/releases) - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md) - [Commits](https://github.com/ged/ruby-pg/compare/v1.4.6...v1.5.1) --- updated-dependencies: - dependency-name: pg dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8bb60937e..1301f9219 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -419,7 +419,7 @@ GEM ast (~> 2.4.1) percy-capybara (5.0.0) capybara (>= 3) - pg (1.4.6) + pg (1.5.1) platform-api (3.5.0) heroics (~> 0.1.1) moneta (~> 1.0.0) From ab35b6fb8e9f7d6f28bf830f3d7e50cbec2c7c00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:10:33 +0000 Subject: [PATCH 85/93] Bump rswag-specs from 2.8.0 to 2.9.0 Bumps [rswag-specs](https://github.com/rswag/rswag) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/rswag/rswag/releases) - [Changelog](https://github.com/rswag/rswag/blob/master/CHANGELOG.md) - [Commits](https://github.com/rswag/rswag/compare/2.8.0...2.9.0) --- updated-dependencies: - dependency-name: rswag-specs dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1301f9219..679fd0476 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,7 +104,7 @@ GEM adamantium (0.2.0) ice_nine (~> 0.11.0) memoizable (~> 0.4.0) - addressable (2.8.3) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) anima (0.3.2) abstract_type (~> 0.0.7) @@ -306,7 +306,7 @@ GEM httparty (0.21.0) mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.12.0) + i18n (1.13.0) concurrent-ruby (~> 1.0) i18n-tasks (1.0.12) activesupport (>= 4.0.2) @@ -521,7 +521,7 @@ GEM rspec (~> 3.0) rswag-api (2.9.0) railties (>= 3.1, < 7.1) - rswag-specs (2.8.0) + rswag-specs (2.9.0) activesupport (>= 3.1, < 7.1) json-schema (>= 2.2, < 4.0) railties (>= 3.1, < 7.1) From 7587782d9cbc4a9106320ccebf7a1c1edcf1daf2 Mon Sep 17 00:00:00 2001 From: Cesy Date: Wed, 26 Apr 2023 11:17:12 +0000 Subject: [PATCH 86/93] Typo fix --- .devcontainer/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 886683721..e33d14dee 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -16,7 +16,7 @@ services: APP_PROTOCOL: http DEVISE_SECRET_KEY: secret GROWSTUFF_EMAIL: "noreply@test.growstuff.org" - GROWSTUFF_FLICKR_KEY: secretkey" + GROWSTUFF_FLICKR_KEY: secretkey GROWSTUFF_FLICKR_SECRET: secretsecret GROWSTUFF_SITE_NAME: "Growstuff (local)" RAILS_SECRET_TOKEN: supersecret From 09a15e829e58dfabd78566d88bf9a63f9c0025b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Apr 2023 09:37:07 +0000 Subject: [PATCH 87/93] Bump pg from 1.5.1 to 1.5.2 Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.1 to 1.5.2. - [Release notes](https://github.com/ged/ruby-pg/releases) - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md) - [Commits](https://github.com/ged/ruby-pg/compare/v1.5.1...v1.5.2) --- updated-dependencies: - dependency-name: pg dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 679fd0476..6fd3be0e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -419,7 +419,7 @@ GEM ast (~> 2.4.1) percy-capybara (5.0.0) capybara (>= 3) - pg (1.5.1) + pg (1.5.2) platform-api (3.5.0) heroics (~> 0.1.1) moneta (~> 1.0.0) From a7d340e3be3eabc27af1bbafc7f06fc2bec3e06d Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Thu, 27 Apr 2023 19:24:28 +0930 Subject: [PATCH 88/93] Bump to ruby 3.1.4 For https://github.com/Growstuff/growstuff/issues/3315 Does it work for Heroku? Who knows! --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index ff365e06b..0aec50e6e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.3 +3.1.4 From ba6d9f256fe79079c1c907aad72513ac200b6303 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Thu, 27 Apr 2023 09:57:19 +0000 Subject: [PATCH 89/93] Bundle --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6fd3be0e9..0e4be0b4e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -749,7 +749,7 @@ DEPENDENCIES xmlrpc RUBY VERSION - ruby 3.1.3p185 + ruby 3.1.4p223 BUNDLED WITH 2.3.11 From 2fe5ffbdef9d5ebe864ff3c26930bbcd2ba4e660 Mon Sep 17 00:00:00 2001 From: Cesy Date: Thu, 27 Apr 2023 12:36:17 +0100 Subject: [PATCH 90/93] Update Gemfile.lock Making codeclimate happy manually --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0e4be0b4e..62e6edba8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -749,7 +749,7 @@ DEPENDENCIES xmlrpc RUBY VERSION - ruby 3.1.4p223 + ruby 3.1.4p223 BUNDLED WITH 2.3.11 From 0be9e777a13c053e26aeacb48dad714a42375cb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 07:57:44 +0000 Subject: [PATCH 91/93] Bump better_errors from 2.9.1 to 2.10.0 Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.9.1 to 2.10.0. - [Release notes](https://github.com/BetterErrors/better_errors/releases) - [Commits](https://github.com/BetterErrors/better_errors/compare/v2.9.1...v2.10.0) --- updated-dependencies: - dependency-name: better_errors dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 62e6edba8..cc7999155 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,10 +114,10 @@ GEM autoprefixer-rails (10.4.7.0) execjs (~> 2) bcrypt (3.1.18) - better_errors (2.9.1) - coderay (>= 1.0.0) + better_errors (2.10.0) erubi (>= 1.0.0) rack (>= 0.9.0) + rouge (>= 1.0.0) better_html (2.0.1) actionview (>= 6.0) activesupport (>= 6.0) @@ -170,7 +170,6 @@ GEM chartkick (5.0.1) codeclimate-test-reporter (1.0.9) simplecov (<= 0.13) - coderay (1.1.3) coffee-rails (5.0.0) coffee-script (>= 2.2.0) railties (>= 5.2.0) @@ -489,6 +488,7 @@ GEM actionpack (>= 5.2) railties (>= 5.2) rexml (3.2.5) + rouge (4.1.0) rspec (3.11.0) rspec-core (~> 3.11.0) rspec-expectations (~> 3.11.0) From 0bb7d973e4a6f65c01455d2efb329b5a4a8c06fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 11:07:08 +0000 Subject: [PATCH 92/93] Bump pg from 1.5.2 to 1.5.3 Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.2 to 1.5.3. - [Release notes](https://github.com/ged/ruby-pg/releases) - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md) - [Commits](https://github.com/ged/ruby-pg/compare/v1.5.2...v1.5.3) --- updated-dependencies: - dependency-name: pg dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cc7999155..e70c42dcf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -418,7 +418,7 @@ GEM ast (~> 2.4.1) percy-capybara (5.0.0) capybara (>= 3) - pg (1.5.2) + pg (1.5.3) platform-api (3.5.0) heroics (~> 0.1.1) moneta (~> 1.0.0) From 8a45b8240f5dcd315d28295088ff9cd2652b3b76 Mon Sep 17 00:00:00 2001 From: Cesy Date: Tue, 2 May 2023 10:27:12 +0100 Subject: [PATCH 93/93] Update .devcontainer/.env New version of ruby for dev Co-authored-by: Daniel O'Connor --- .devcontainer/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/.env b/.devcontainer/.env index 861c6936f..2ba97513c 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -1,2 +1,2 @@ # Ruby version -VARIANT=3.1.3 +VARIANT=3.1.4