diff --git a/Gemfile b/Gemfile index 86cdc43..e6e12cc 100644 --- a/Gemfile +++ b/Gemfile @@ -3,22 +3,11 @@ ruby "3.1.0" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' -gem 'rails', '~> 6.1' +gem 'rails', '~> 7.0' gem 'puma', '~> 5' gem 'webpacker', '~> 5' gem 'turbolinks', '~> 5' -# Use SCSS for stylesheets -# gem 'sass-rails', '>= 6' -# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -# gem 'jbuilder', '~> 2.7' -# Use Redis adapter to run Action Cable in production -# gem 'redis', '~> 4.0' -# Use Active Model has_secure_password -# gem 'bcrypt', '~> 3.1.7' - -# Use Active Storage variant -# gem 'image_processing', '~> 1.2' +gem 'sprockets-rails', :require => 'sprockets/railtie' # Reduces boot times through caching; required in config/boot.rb gem 'net-imap', require: false @@ -51,8 +40,7 @@ group :development do gem 'web-console', '>= 3.3.0' gem 'listen', '~> 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring - gem 'spring' - gem 'spring-watcher-listen', '~> 2.0.0' + gem 'spring', '~> 4.0' end gem "bugsnag", "~> 6.13" diff --git a/Gemfile.lock b/Gemfile.lock index 4cffbc0..71b4f92 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,73 +1,79 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.6) - actionpack (= 6.1.4.6) - activesupport (= 6.1.4.6) + actioncable (7.0.2.4) + actionpack (= 7.0.2.4) + activesupport (= 7.0.2.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.6) - actionpack (= 6.1.4.6) - activejob (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionmailbox (7.0.2.4) + actionpack (= 7.0.2.4) + activejob (= 7.0.2.4) + activerecord (= 7.0.2.4) + activestorage (= 7.0.2.4) + activesupport (= 7.0.2.4) mail (>= 2.7.1) - actionmailer (6.1.4.6) - actionpack (= 6.1.4.6) - actionview (= 6.1.4.6) - activejob (= 6.1.4.6) - activesupport (= 6.1.4.6) + net-imap + net-pop + net-smtp + actionmailer (7.0.2.4) + actionpack (= 7.0.2.4) + actionview (= 7.0.2.4) + activejob (= 7.0.2.4) + activesupport (= 7.0.2.4) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.4.6) - actionview (= 6.1.4.6) - activesupport (= 6.1.4.6) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.2.4) + actionview (= 7.0.2.4) + activesupport (= 7.0.2.4) + 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 (6.1.4.6) - actionpack (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + actiontext (7.0.2.4) + actionpack (= 7.0.2.4) + activerecord (= 7.0.2.4) + activestorage (= 7.0.2.4) + activesupport (= 7.0.2.4) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.4.6) - activesupport (= 6.1.4.6) + actionview (7.0.2.4) + activesupport (= 7.0.2.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.6) - activesupport (= 6.1.4.6) + activejob (7.0.2.4) + activesupport (= 7.0.2.4) globalid (>= 0.3.6) - activemodel (6.1.4.6) - activesupport (= 6.1.4.6) + activemodel (7.0.2.4) + activesupport (= 7.0.2.4) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.1.4.6) - activemodel (= 6.1.4.6) - activesupport (= 6.1.4.6) + activerecord (7.0.2.4) + activemodel (= 7.0.2.4) + activesupport (= 7.0.2.4) activeresource (6.0.0) activemodel (>= 6.0) activemodel-serializers-xml (~> 1.0) activesupport (>= 6.0) - activestorage (6.1.4.6) - actionpack (= 6.1.4.6) - activejob (= 6.1.4.6) - activerecord (= 6.1.4.6) - activesupport (= 6.1.4.6) - marcel (~> 1.0.0) + activestorage (7.0.2.4) + actionpack (= 7.0.2.4) + activejob (= 7.0.2.4) + activerecord (= 7.0.2.4) + activesupport (= 7.0.2.4) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.6) + activesupport (7.0.2.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) babel-source (5.8.35) @@ -93,7 +99,7 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) childprocess (4.1.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) connection_pool (2.2.5) crass (1.0.6) digest (3.1.0) @@ -159,7 +165,7 @@ GEM listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.14.0) + loofah (2.17.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -228,21 +234,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.6) - actioncable (= 6.1.4.6) - actionmailbox (= 6.1.4.6) - actionmailer (= 6.1.4.6) - actionpack (= 6.1.4.6) - actiontext (= 6.1.4.6) - actionview (= 6.1.4.6) - activejob (= 6.1.4.6) - activemodel (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + rails (7.0.2.4) + actioncable (= 7.0.2.4) + actionmailbox (= 7.0.2.4) + actionmailer (= 7.0.2.4) + actionpack (= 7.0.2.4) + actiontext (= 7.0.2.4) + actionview (= 7.0.2.4) + activejob (= 7.0.2.4) + activemodel (= 7.0.2.4) + activerecord (= 7.0.2.4) + activestorage (= 7.0.2.4) + activesupport (= 7.0.2.4) bundler (>= 1.15.0) - railties (= 6.1.4.6) - sprockets-rails (>= 2.0.0) + railties (= 7.0.2.4) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -253,12 +258,13 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.5) rails_stdout_logging (0.0.5) - railties (6.1.4.6) - actionpack (= 6.1.4.6) - activesupport (= 6.1.4.6) + railties (7.0.2.4) + actionpack (= 7.0.2.4) + activesupport (= 7.0.2.4) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rake (13.0.6) rb-fsevent (0.11.1) rb-inotify (0.10.1) @@ -304,10 +310,7 @@ GEM gli hashie websocket-driver - spring (2.1.1) - spring-watcher-listen (2.0.1) - listen (>= 2.7, < 4.0) - spring (>= 1.2, < 3.0) + spring (4.0.0) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -380,7 +383,7 @@ DEPENDENCIES net-smtp pg puma (~> 5) - rails (~> 6.1) + rails (~> 7.0) rails_12factor react-rails selenium-webdriver @@ -388,8 +391,8 @@ DEPENDENCIES shopify_app (~> 18) skylight slack-ruby-client - spring - spring-watcher-listen (~> 2.0.0) + spring (~> 4.0) + sprockets-rails turbolinks (~> 5) twilio-ruby twitter diff --git a/app/models/rule_event.rb b/app/models/rule_event.rb index b3f5357..65acd4b 100644 --- a/app/models/rule_event.rb +++ b/app/models/rule_event.rb @@ -37,7 +37,7 @@ def as_json dump.merge({ shopify_identifier: @shopify_identifier, hooklys_identifier: @hooklys_identifier, - timestamp: @details.first.timestamp.to_s(:db), + timestamp: @details.first.timestamp.to_fs(:db), error: @details.any? { _1.level == :error }, }) end diff --git a/app/models/rule_event_detail.rb b/app/models/rule_event_detail.rb index d74ed5b..62f72a6 100644 --- a/app/models/rule_event_detail.rb +++ b/app/models/rule_event_detail.rb @@ -17,7 +17,7 @@ def initialize(level:, message:) def dump { - "timestamp" => @timestamp.to_s(:db), + "timestamp" => @timestamp.to_fs(:db), "level" => @level.to_s, "message" => @message, } diff --git a/app/views/rules/_handler.html.erb b/app/views/rules/_handler.html.erb index 7884468..da3b86f 100644 --- a/app/views/rules/_handler.html.erb +++ b/app/views/rules/_handler.html.erb @@ -23,7 +23,7 @@