From 7be7b9780c1ba56562a15c6ba7b00bab4bf850d0 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Wed, 22 Jan 2025 09:31:08 -0600 Subject: [PATCH 1/3] (bug) unable to update opening/closing time for the calendar --- CHANGELOG.md | 4 ++ Gemfile | 5 ++- Gemfile.lock | 114 ++++++++++++++++++++++++++------------------------- 3 files changed, 66 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78adb7a98..51d35c84c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next release +- updated rails to 7.0.8.7 +- updated tzinfo-data to 1.2025.1 +- Fix a bug: unable to update opening/closing time for the calendar + ## v6.3.36 2024 December 12 - Improvement: default order for the spaces/trainings list is set to descending by created_at diff --git a/Gemfile b/Gemfile index dc9e4c2a8..7019d931f 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '7.0.8.6' +gem 'rails', '7.0.8.7' # Used by rails 5.2 to reduce the app boot time by over 50% gem 'bootsnap' # Use Puma as web server @@ -155,3 +155,6 @@ gem 'reverse_markdown' gem 'ancestry' gem 'silencer', require: false + +# temporary fix for the issue uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) +gem 'concurrent-ruby', '1.3.4' diff --git a/Gemfile.lock b/Gemfile.lock index 1ad7a95f0..3b296fc68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,68 +4,68 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (7.0.8.6) - actionpack (= 7.0.8.6) - activesupport (= 7.0.8.6) + actioncable (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.6) - actionpack (= 7.0.8.6) - activejob (= 7.0.8.6) - activerecord (= 7.0.8.6) - activestorage (= 7.0.8.6) - activesupport (= 7.0.8.6) + actionmailbox (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.6) - actionpack (= 7.0.8.6) - actionview (= 7.0.8.6) - activejob (= 7.0.8.6) - activesupport (= 7.0.8.6) + actionmailer (7.0.8.7) + actionpack (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activesupport (= 7.0.8.7) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.8.6) - actionview (= 7.0.8.6) - activesupport (= 7.0.8.6) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.6) - actionpack (= 7.0.8.6) - activerecord (= 7.0.8.6) - activestorage (= 7.0.8.6) - activesupport (= 7.0.8.6) + actiontext (7.0.8.7) + actionpack (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.6) - activesupport (= 7.0.8.6) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) active_record_query_trace (1.8) - activejob (7.0.8.6) - activesupport (= 7.0.8.6) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - activemodel (7.0.8.6) - activesupport (= 7.0.8.6) - activerecord (7.0.8.6) - activemodel (= 7.0.8.6) - activesupport (= 7.0.8.6) - activestorage (7.0.8.6) - actionpack (= 7.0.8.6) - activejob (= 7.0.8.6) - activerecord (= 7.0.8.6) - activesupport (= 7.0.8.6) + activemodel (7.0.8.7) + activesupport (= 7.0.8.7) + activerecord (7.0.8.7) + activemodel (= 7.0.8.7) + activesupport (= 7.0.8.7) + activestorage (7.0.8.7) + actionpack (= 7.0.8.7) + activejob (= 7.0.8.7) + activerecord (= 7.0.8.7) + activesupport (= 7.0.8.7) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.8.6) + activesupport (7.0.8.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -366,20 +366,20 @@ GEM rack-test (2.1.0) rack (>= 1.3) railroady (1.5.3) - rails (7.0.8.6) - actioncable (= 7.0.8.6) - actionmailbox (= 7.0.8.6) - actionmailer (= 7.0.8.6) - actionpack (= 7.0.8.6) - actiontext (= 7.0.8.6) - actionview (= 7.0.8.6) - activejob (= 7.0.8.6) - activemodel (= 7.0.8.6) - activerecord (= 7.0.8.6) - activestorage (= 7.0.8.6) - activesupport (= 7.0.8.6) + rails (7.0.8.7) + actioncable (= 7.0.8.7) + actionmailbox (= 7.0.8.7) + actionmailer (= 7.0.8.7) + actionpack (= 7.0.8.7) + actiontext (= 7.0.8.7) + actionview (= 7.0.8.7) + activejob (= 7.0.8.7) + activemodel (= 7.0.8.7) + activerecord (= 7.0.8.7) + activestorage (= 7.0.8.7) + activesupport (= 7.0.8.7) bundler (>= 1.15.0) - railties (= 7.0.8.6) + railties (= 7.0.8.7) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -387,9 +387,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.8.6) - actionpack (= 7.0.8.6) - activesupport (= 7.0.8.6) + railties (7.0.8.7) + actionpack (= 7.0.8.7) + activesupport (= 7.0.8.7) method_source rake (>= 12.2) thor (~> 1.0) @@ -511,7 +511,7 @@ GEM tzinfo tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2020.4) + tzinfo-data (1.2025.1) tzinfo (>= 1.0.0) unicode-display_width (1.4.1) uniform_notifier (1.16.0) @@ -541,7 +541,8 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.6) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) zeitwerk (2.7.1) @@ -566,6 +567,7 @@ DEPENDENCIES caxlsx caxlsx_rails chroma + concurrent-ruby (= 1.3.4) coveralls_reborn (~> 0.18.0) database_cleaner devise (>= 4.9) @@ -609,7 +611,7 @@ DEPENDENCIES puma (= 6.4.3) pundit railroady - rails (= 7.0.8.6) + rails (= 7.0.8.7) rb-readline recurrence redis-session-store From 327b460370aa9eaa38b46cb34328d83a02ffbcac Mon Sep 17 00:00:00 2001 From: Du Peng Date: Wed, 22 Jan 2025 17:06:10 +0100 Subject: [PATCH 2/3] (bug) unable to update product low stock alert --- CHANGELOG.md | 1 + app/services/product_service.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51d35c84c..ddf402c7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - updated rails to 7.0.8.7 - updated tzinfo-data to 1.2025.1 - Fix a bug: unable to update opening/closing time for the calendar +- Fix a bug: unable to update product low stock alert ## v6.3.36 2024 December 12 diff --git a/app/services/product_service.rb b/app/services/product_service.rb index 0e75c0bda..deb8a1a29 100644 --- a/app/services/product_service.rb +++ b/app/services/product_service.rb @@ -41,7 +41,7 @@ class ProductService # @param stock_movements [{stock_type: string, reason: string, quantity: number|string, order_item_id: number|nil}] def update_stock(product, stock_movements = nil) remaining_stock = { internal: product.stock['internal'], external: product.stock['external'] } - product.product_stock_movements_attributes = stock_movements&.map do |movement| + product.product_stock_movements_attributes = stock_movements&.compact_blank&.map do |movement| quantity = ProductStockMovement::OUTGOING_REASONS.include?(movement[:reason]) ? -movement[:quantity].to_i : movement[:quantity].to_i remaining_stock[movement[:stock_type].to_sym] += quantity { From f24056aa54cc6470d10ad1fa4a17227d8b948c3a Mon Sep 17 00:00:00 2001 From: Du Peng Date: Wed, 22 Jan 2025 17:17:21 +0100 Subject: [PATCH 3/3] Version 6.3.37 --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddf402c7a..8f0087128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next release +## v6.3.37 2025 January 22 + - updated rails to 7.0.8.7 - updated tzinfo-data to 1.2025.1 - Fix a bug: unable to update opening/closing time for the calendar diff --git a/package.json b/package.json index 4c3406432..ba71e2267 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fab-manager", - "version": "6.3.36", + "version": "6.3.37", "description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.", "keywords": [ "fablab",