journaled 5.3.1 → 5.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 519a94ed5c16626bdd0d6494b510eb1768a86e1f04119857fd8add4b7d6ea5f5
4
- data.tar.gz: 3f675a229c45fc08b71181be5d6934b44eea9e849a7bfeebabec553721833587
3
+ metadata.gz: e7ae2973901a192db7c5a9a0fcb7f73d2ef45ce5cd61ce42d96dacd6a332e86e
4
+ data.tar.gz: c8e8f7fd3b525fda4e248e30f62bd138b6b5030d5018db37e26cb488f1d5e9a5
5
5
  SHA512:
6
- metadata.gz: 0a1d76ef86b435424e0902dc499cc9f9984450da09f0783129d831fc62b4d31bf30651cc0d8cb074592887b12c3eba335f3d5580d22e6e398e1729e4ffa6e1ca
7
- data.tar.gz: 93ddf98e9813da2bed0939aeb522806e5707d4f8563a46d595398e3edc8485b802c776cc14b95f3ec44e3aeb0eea25cc460d2b1b6cd3f9af84ac3f4a55e166cc
6
+ metadata.gz: e45435869582fcb824ba3866437b62253f26e69166f1a07e42c4bd82ad8f50fd5fb299efe7eec19789c5e5e0572b073fb894abe5d9e110351ee7c0098c994851
7
+ data.tar.gz: 0afdb4445ced380e4115fc581d76f3258414671fb43372e4a131ef498a65b99d9a71a557740a90276661a4e3787c12b3ec88dc31f6286612a5aa12565fc7be85
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
4
  require 'bundler/setup'
3
5
  rescue LoadError
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled::Actor
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
4
  class ApplicationJob < Journaled.job_base_class_name.constantize
3
5
  end
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
4
  class DeliveryJob < ApplicationJob
3
- DEFAULT_REGION = 'us-east-1'.freeze
5
+ DEFAULT_REGION = 'us-east-1'
4
6
 
5
7
  rescue_from(Aws::Kinesis::Errors::InternalFailure, Aws::Kinesis::Errors::ServiceUnavailable, Aws::Kinesis::Errors::Http503Error) do |e|
6
8
  Rails.logger.error "Kinesis Error - Server Error occurred - #{e.class}"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled::Changes
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::ActorUriProvider
2
4
  include Singleton
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # FIXME: This cannot be included in lib/ because Journaled::Event is autoloaded via app/models
2
4
  # Autoloading Journaled::Event isn't strictly necessary, and for compatibility it would
3
5
  # make sense to move it to lib/.
@@ -83,7 +85,7 @@ module Journaled
83
85
 
84
86
  def filtered_attributes
85
87
  attrs = record.attributes.dup.symbolize_keys
86
- attrs.each do |key, _value|
88
+ attrs.each_key do |key|
87
89
  attrs[key] = '[FILTERED]' if filter_key?(key)
88
90
  end
89
91
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::Change
2
4
  include Journaled::Event
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::ChangeDefinition
2
4
  attr_reader :attribute_names, :logical_operation
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::ChangeWriter
2
4
  attr_reader :model, :change_definition
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled::Event
2
4
  extend ActiveSupport::Concern
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::JsonSchemaModel::Validator
2
4
  def initialize(schema_name)
3
5
  @schema_name = schema_name
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::NotTrulyExceptionalError < RuntimeError
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Journaled::Writer
2
4
  EVENT_METHOD_NAMES = %i(
3
5
  journaled_schema_name
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  if Rails::VERSION::MAJOR > 5 || (Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR >= 2)
2
4
  require 'journaled/relation_change_protection'
3
5
  ActiveRecord::Relation.class_eval { prepend Journaled::RelationChangeProtection }
data/config/spring.rb CHANGED
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Spring.application_root = './spec/dummy'
@@ -1,17 +1,31 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support/core_ext/module/attribute_accessors_per_thread'
2
4
 
3
5
  module Journaled
4
6
  module AuditLog
5
7
  extend ActiveSupport::Concern
6
8
 
7
- DEFAULT_EXCLUDED_CLASSES = %w(
8
- Delayed::Job
9
- PaperTrail::Version
10
- ActiveStorage::Attachment
11
- ActiveStorage::Blob
12
- ActiveRecord::InternalMetadata
13
- ActiveRecord::SchemaMigration
14
- ).freeze
9
+ DEFAULT_EXCLUDED_CLASSES =
10
+ if Gem::Version.new(Rails.version) < Gem::Version.new('7.1')
11
+ %w(
12
+ Delayed::Job
13
+ PaperTrail::Version
14
+ ActiveStorage::Attachment
15
+ ActiveStorage::Blob
16
+ ActiveRecord::InternalMetadata
17
+ ActiveRecord::SchemaMigration
18
+ )
19
+ else
20
+ # ActiveRecord::InternalMetadata and SchemaMigration do not inherit from
21
+ # ActiveRecord::Base in Rails 7.1 so we do not need to exclude them.
22
+ %w(
23
+ Delayed::Job
24
+ PaperTrail::Version
25
+ ActiveStorage::Attachment
26
+ ActiveStorage::Blob
27
+ )
28
+ end.freeze
15
29
 
16
30
  mattr_accessor(:default_ignored_columns) { %i(created_at updated_at) }
17
31
  mattr_accessor(:default_stream_name) { Journaled.default_stream_name }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
4
  module Connection
3
5
  class << self
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
4
  class Current < ActiveSupport::CurrentAttributes
3
5
  attribute :tags
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
4
  class Engine < ::Rails::Engine
3
5
  config.after_initialize do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
4
  class TransactionSafetyError < StandardError; end
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled::RelationChangeProtection
2
4
  def update_all(updates, opts = { force: false }) # rubocop:disable Metrics/AbcSize
3
5
  unless opts[:force] || !@klass.respond_to?(:journaled_attribute_names) || @klass.journaled_attribute_names.empty?
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rspec/expectations'
2
4
 
3
5
  RSpec::Matchers.define :journal_changes_to do |*attribute_names, as:|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_record/connection_adapters/abstract/transaction'
2
4
 
3
5
  module Journaled
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Journaled
2
- VERSION = "5.3.1".freeze
4
+ VERSION = "5.3.2"
3
5
  end
data/lib/journaled.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "aws-sdk-kinesis"
2
4
  require "active_job"
3
5
  require "json-schema"
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: journaled
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.1
4
+ version: 5.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Lipson
8
8
  - Corey Alexander
9
9
  - Cyrus Eslami
10
10
  - John Mileham
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-05-19 00:00:00.000000000 Z
14
+ date: 2024-04-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activejob
@@ -185,16 +185,16 @@ dependencies:
185
185
  name: sqlite3
186
186
  requirement: !ruby/object:Gem::Requirement
187
187
  requirements:
188
- - - ">="
188
+ - - "~>"
189
189
  - !ruby/object:Gem::Version
190
- version: '0'
190
+ version: '1.4'
191
191
  type: :development
192
192
  prerelease: false
193
193
  version_requirements: !ruby/object:Gem::Requirement
194
194
  requirements:
195
- - - ">="
195
+ - - "~>"
196
196
  - !ruby/object:Gem::Version
197
- version: '0'
197
+ version: '1.4'
198
198
  - !ruby/object:Gem::Dependency
199
199
  name: timecop
200
200
  requirement: !ruby/object:Gem::Requirement
@@ -319,8 +319,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
319
  - !ruby/object:Gem::Version
320
320
  version: '0'
321
321
  requirements: []
322
- rubygems_version: 3.3.5
323
- signing_key:
322
+ rubygems_version: 3.5.9
323
+ signing_key:
324
324
  specification_version: 4
325
325
  summary: Journaling for Betterment apps.
326
326
  test_files: []
327
+ ...