infopark_reactor 1.29.0 → 1.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +30 -19
- data/infopark_reactor.gemspec +2 -2
- data/lib/reactor/attributes/date_serializer.rb +2 -2
- data/lib/reactor/cache/permission.rb +6 -1
- data/lib/reactor/cache/user.rb +6 -1
- data/lib/reactor/persistence.rb +1 -1
- data/lib/reactor/tools/sower.rb +2 -2
- data/lib/reactor/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ccdb26e229d247bf4aa801433d8e759a45c3e505ff7d9f74322a203f0d3598d
|
4
|
+
data.tar.gz: faadccb499c3b815d98ff215ad5ceb41f3d25ec7c4df430230c1efaa102dc67f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eff873d2a1a93d7d8f80fbd86e874d39791f9174f4b413bdb79ca85a4239a192be347a9ac9dbc3d5d7d48c697eb1f2ed37a10f52085ad7e8dc5f7ac685f9a642
|
7
|
+
data.tar.gz: 704bfb9866f59b50e7dd9544b41c846e39e871774b0358fd6aca063d45d293470c9daab8c75bc8ddaae786d76666381c90c3562eea625844e5d2efb5dbc5a48b
|
data/.rubocop_todo.yml
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2023-05-04 13:02:58 UTC using RuboCop version 1.45.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 2
|
10
|
+
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
|
11
|
+
# SupportedStyles: Gemfile, gems.rb, gemspec
|
12
|
+
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
|
13
|
+
Gemspec/DevelopmentDependencies:
|
14
|
+
Exclude:
|
15
|
+
- 'infopark_reactor.gemspec'
|
16
|
+
|
9
17
|
# Offense count: 1
|
10
|
-
# Configuration parameters: Include.
|
18
|
+
# Configuration parameters: Severity, Include.
|
11
19
|
# Include: **/*.gemspec
|
12
20
|
Gemspec/RequiredRubyVersion:
|
13
21
|
Exclude:
|
@@ -136,19 +144,13 @@ Lint/UselessAssignment:
|
|
136
144
|
- 'lib/reactor/plans/update_attribute.rb'
|
137
145
|
- 'lib/reactor/plans/update_obj_class.rb'
|
138
146
|
|
139
|
-
# Offense count: 1
|
140
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
141
|
-
Lint/UselessMethodDefinition:
|
142
|
-
Exclude:
|
143
|
-
- 'lib/reactor/attributes.rb'
|
144
|
-
|
145
147
|
# Offense count: 43
|
146
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns,
|
148
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
147
149
|
Metrics/AbcSize:
|
148
150
|
Max: 58
|
149
151
|
|
150
152
|
# Offense count: 5
|
151
|
-
# Configuration parameters: CountComments, CountAsOne,
|
153
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
152
154
|
# AllowedMethods: refine
|
153
155
|
Metrics/BlockLength:
|
154
156
|
Max: 44
|
@@ -159,12 +161,12 @@ Metrics/ClassLength:
|
|
159
161
|
Max: 397
|
160
162
|
|
161
163
|
# Offense count: 11
|
162
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns
|
164
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
163
165
|
Metrics/CyclomaticComplexity:
|
164
166
|
Max: 17
|
165
167
|
|
166
168
|
# Offense count: 55
|
167
|
-
# Configuration parameters: CountComments, CountAsOne,
|
169
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
168
170
|
Metrics/MethodLength:
|
169
171
|
Max: 79
|
170
172
|
|
@@ -174,7 +176,7 @@ Metrics/ModuleLength:
|
|
174
176
|
Max: 264
|
175
177
|
|
176
178
|
# Offense count: 10
|
177
|
-
# Configuration parameters: AllowedMethods, AllowedPatterns
|
179
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
178
180
|
Metrics/PerceivedComplexity:
|
179
181
|
Max: 17
|
180
182
|
|
@@ -204,7 +206,7 @@ Naming/ConstantName:
|
|
204
206
|
|
205
207
|
# Offense count: 9
|
206
208
|
# Configuration parameters: ForbiddenDelimiters.
|
207
|
-
# ForbiddenDelimiters: (
|
209
|
+
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
208
210
|
Naming/HeredocDelimiterNaming:
|
209
211
|
Exclude:
|
210
212
|
- 'lib/reactor/attributes_handlers.rb'
|
@@ -221,7 +223,7 @@ Naming/MemoizedInstanceVariableName:
|
|
221
223
|
|
222
224
|
# Offense count: 5
|
223
225
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
224
|
-
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
|
226
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
225
227
|
Naming/MethodParameterName:
|
226
228
|
Exclude:
|
227
229
|
- 'lib/reactor/cm/bridge.rb'
|
@@ -372,6 +374,7 @@ Style/FrozenStringLiteralComment:
|
|
372
374
|
Enabled: false
|
373
375
|
|
374
376
|
# Offense count: 4
|
377
|
+
# This cop supports safe autocorrection (--autocorrect).
|
375
378
|
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
376
379
|
Style/GuardClause:
|
377
380
|
Exclude:
|
@@ -383,6 +386,7 @@ Style/GuardClause:
|
|
383
386
|
# Offense count: 8
|
384
387
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
385
388
|
# Configuration parameters: AllowedReceivers.
|
389
|
+
# AllowedReceivers: Thread.current
|
386
390
|
Style/HashEachMethods:
|
387
391
|
Exclude:
|
388
392
|
- 'lib/reactor/permission.rb'
|
@@ -437,6 +441,12 @@ Style/InverseMethods:
|
|
437
441
|
Exclude:
|
438
442
|
- 'lib/reactor/plans/prepared.rb'
|
439
443
|
|
444
|
+
# Offense count: 1
|
445
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
446
|
+
Style/MinMaxComparison:
|
447
|
+
Exclude:
|
448
|
+
- 'app/models/rails_connector/abstract_obj.rb'
|
449
|
+
|
440
450
|
# Offense count: 1
|
441
451
|
Style/MissingRespondToMissing:
|
442
452
|
Exclude:
|
@@ -499,8 +509,8 @@ Style/StringConcatenation:
|
|
499
509
|
|
500
510
|
# Offense count: 3
|
501
511
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
502
|
-
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns,
|
503
|
-
# AllowedMethods:
|
512
|
+
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
|
513
|
+
# AllowedMethods: define_method
|
504
514
|
Style/SymbolProc:
|
505
515
|
Exclude:
|
506
516
|
- 'lib/reactor/cm/obj.rb'
|
@@ -515,17 +525,18 @@ Style/TernaryParentheses:
|
|
515
525
|
Exclude:
|
516
526
|
- 'lib/reactor/cm/obj.rb'
|
517
527
|
|
518
|
-
# Offense count:
|
528
|
+
# Offense count: 2
|
519
529
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
520
530
|
# Configuration parameters: EnforcedStyle.
|
521
531
|
# SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
|
522
532
|
Style/YodaCondition:
|
523
533
|
Exclude:
|
534
|
+
- 'app/models/rails_connector/abstract_obj.rb'
|
524
535
|
- 'lib/reactor/validations.rb'
|
525
536
|
|
526
537
|
# Offense count: 29
|
527
538
|
# This cop supports safe autocorrection (--autocorrect).
|
528
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns
|
539
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
529
540
|
# URISchemes: http, https
|
530
541
|
Layout/LineLength:
|
531
542
|
Max: 248
|
data/infopark_reactor.gemspec
CHANGED
@@ -18,9 +18,9 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.files = `git ls-files`.split("\n")
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency "infopark_fiona_connector", "~> 7.0
|
21
|
+
s.add_dependency "infopark_fiona_connector", "~> 7.0"
|
22
22
|
s.add_dependency "nokogiri", "~> 1"
|
23
|
-
s.add_dependency "rails", [">= 5.0", "<
|
23
|
+
s.add_dependency "rails", [">= 5.0", "< 8.0"]
|
24
24
|
|
25
25
|
s.add_development_dependency "rspec", "~> 3"
|
26
26
|
s.add_development_dependency "rubocop"
|
@@ -18,7 +18,7 @@ module Reactor
|
|
18
18
|
|
19
19
|
value = value.to_datetime if value.is_a?(Date)
|
20
20
|
if value.is_a?(Time) || value.is_a?(DateTime)
|
21
|
-
value.utc.
|
21
|
+
value.utc.to_formatted_s(:number)
|
22
22
|
elsif value.is_a?(String)
|
23
23
|
if iso_format?(value)
|
24
24
|
value
|
@@ -32,7 +32,7 @@ module Reactor
|
|
32
32
|
parsed_time = Time.zone.parse(value)
|
33
33
|
return nil unless parsed_time.present?
|
34
34
|
|
35
|
-
parsed_time.utc.
|
35
|
+
parsed_time.utc.to_formatted_s(:number)
|
36
36
|
end
|
37
37
|
|
38
38
|
def iso_format?(val)
|
@@ -25,7 +25,12 @@ module Reactor
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def invalidate(user)
|
28
|
-
|
28
|
+
# Rails 7.1+ versions don't allow nil values and empty string as cache keys.
|
29
|
+
if user.present?
|
30
|
+
@@backing_storage.delete(user.to_s)
|
31
|
+
else
|
32
|
+
Rails.logger.warn "Reactor::Cache::Permission: Skipping cache invalidation because the key derived from user.to_s was blank."
|
33
|
+
end
|
29
34
|
end
|
30
35
|
end
|
31
36
|
end
|
data/lib/reactor/cache/user.rb
CHANGED
@@ -26,7 +26,12 @@ module Reactor
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def invalidate(user_name)
|
29
|
-
|
29
|
+
# Rails 7.1+ versions don't allow nil values and empty string as cache keys.
|
30
|
+
if user_name.present?
|
31
|
+
@@backing_storage.delete(user_name.to_s)
|
32
|
+
else
|
33
|
+
Rails.logger.warn "Reactor::Cache::User: Skipping cache invalidation because the key derived from user_name.to_s was blank."
|
34
|
+
end
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
data/lib/reactor/persistence.rb
CHANGED
@@ -185,7 +185,7 @@ module Reactor
|
|
185
185
|
# super # Throws RecordNotFound when changing obj_class
|
186
186
|
# AR reload
|
187
187
|
send(:clear_aggregation_cache) if respond_to?(:clear_aggregation_cache, true)
|
188
|
-
send(:clear_association_cache)
|
188
|
+
send(:clear_association_cache) if respond_to?(:clear_association_cache, true)
|
189
189
|
fresh_object = RailsConnector::AbstractObj.find(id, options)
|
190
190
|
@attributes = fresh_object.instance_variable_get("@attributes")
|
191
191
|
@attributes_cache = {}
|
data/lib/reactor/tools/sower.rb
CHANGED
data/lib/reactor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.29.
|
4
|
+
version: 1.29.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2025-08-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: infopark_fiona_connector
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 7.0
|
21
|
+
version: '7.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 7.0
|
28
|
+
version: '7.0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: nokogiri
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '5.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '8.0'
|
53
53
|
type: :runtime
|
54
54
|
prerelease: false
|
55
55
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '5.0'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '8.0'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: rspec
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|