journaled 4.1.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +148 -46
- data/Rakefile +10 -24
- data/app/jobs/journaled/delivery_job.rb +17 -28
- data/app/models/concerns/journaled/changes.rb +5 -5
- data/app/models/journaled/change.rb +12 -12
- data/app/models/journaled/change_writer.rb +3 -2
- data/app/models/journaled/event.rb +1 -1
- data/app/models/journaled/writer.rb +32 -15
- data/lib/journaled/connection.rb +48 -0
- data/lib/journaled/engine.rb +5 -0
- data/lib/journaled/errors.rb +3 -0
- data/lib/journaled/relation_change_protection.rb +11 -10
- data/lib/journaled/rspec.rb +86 -0
- data/lib/journaled/transaction_ext.rb +31 -0
- data/lib/journaled/version.rb +1 -1
- data/lib/journaled.rb +17 -13
- metadata +54 -97
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config/application.rb +0 -25
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -6
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -24
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -56
- data/spec/dummy/config/secrets.yml +0 -22
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/schema.rb +0 -18
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/jobs/journaled/delivery_job_spec.rb +0 -276
- data/spec/lib/journaled_spec.rb +0 -91
- data/spec/models/concerns/journaled/actor_spec.rb +0 -47
- data/spec/models/concerns/journaled/changes_spec.rb +0 -106
- data/spec/models/database_change_protection_spec.rb +0 -109
- data/spec/models/journaled/actor_uri_provider_spec.rb +0 -42
- data/spec/models/journaled/change_writer_spec.rb +0 -281
- data/spec/models/journaled/event_spec.rb +0 -236
- data/spec/models/journaled/json_schema_model/validator_spec.rb +0 -133
- data/spec/models/journaled/writer_spec.rb +0 -174
- data/spec/rails_helper.rb +0 -19
- data/spec/spec_helper.rb +0 -20
- data/spec/support/environment_spec_helper.rb +0 -16
data/lib/journaled/rspec.rb
CHANGED
@@ -16,3 +16,89 @@ RSpec::Matchers.define :journal_changes_to do |*attribute_names, as:|
|
|
16
16
|
"expected #{model_class} not to journal changes to #{attribute_names.map(&:inspect).join(', ')} as #{as.inspect}"
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
RSpec::Matchers.define_negated_matcher :not_journal_changes_to, :journal_changes_to
|
21
|
+
|
22
|
+
RSpec::Matchers.define :journal_events_including do |*expected_events|
|
23
|
+
raise "Please specify at least one expected event. RSpec argument matchers are supported." if expected_events.empty?
|
24
|
+
|
25
|
+
attr_accessor :expected, :actual, :matches, :nonmatches
|
26
|
+
|
27
|
+
chain :with_schema_name, :expected_schema_name
|
28
|
+
chain :with_partition_key, :expected_partition_key
|
29
|
+
chain :with_stream_name, :expected_stream_name
|
30
|
+
chain :with_enqueue_opts, :expected_enqueue_opts
|
31
|
+
chain :with_priority, :expected_priority
|
32
|
+
|
33
|
+
def supports_block_expectations?
|
34
|
+
true
|
35
|
+
end
|
36
|
+
|
37
|
+
def hash_including_recursive(hash)
|
38
|
+
hash_including(
|
39
|
+
hash.transform_values { |v| v.is_a?(Hash) ? hash_including_recursive(v) : v },
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
match do |block|
|
44
|
+
expected_events = [expected_events.first].flatten(1) unless expected_events.length > 1
|
45
|
+
|
46
|
+
self.expected = expected_events.map { |e| { journaled_attributes: e } }
|
47
|
+
expected.each { |e| e.merge!(journaled_schema_name: expected_schema_name) } if expected_schema_name
|
48
|
+
expected.each { |e| e.merge!(journaled_partition_key: expected_partition_key) } if expected_partition_key
|
49
|
+
expected.each { |e| e.merge!(journaled_stream_name: expected_stream_name) } if expected_stream_name
|
50
|
+
expected.each { |e| e.merge!(journaled_enqueue_opts: expected_enqueue_opts) } if expected_enqueue_opts
|
51
|
+
expected.each { |e| e.merge!(priority: expected_priority) } if expected_priority
|
52
|
+
self.actual = []
|
53
|
+
|
54
|
+
callback = ->(_name, _started, _finished, _unique_id, payload) do
|
55
|
+
event = payload[:event]
|
56
|
+
a = { journaled_attributes: event.journaled_attributes }
|
57
|
+
a[:journaled_schema_name] = event.journaled_schema_name if expected_schema_name
|
58
|
+
a[:journaled_partition_key] = event.journaled_partition_key if expected_partition_key
|
59
|
+
a[:journaled_stream_name] = event.journaled_stream_name if expected_stream_name
|
60
|
+
a[:journaled_enqueue_opts] = event.journaled_enqueue_opts if expected_enqueue_opts
|
61
|
+
a[:priority] = payload[:priority] if expected_priority
|
62
|
+
actual << a
|
63
|
+
end
|
64
|
+
|
65
|
+
ActiveSupport::Notifications.subscribed(callback, 'journaled.event.enqueue', &block)
|
66
|
+
|
67
|
+
self.matches = actual.select do |a|
|
68
|
+
expected.any? { |e| values_match?(hash_including_recursive(e), a) }
|
69
|
+
end
|
70
|
+
|
71
|
+
self.nonmatches = actual - matches
|
72
|
+
|
73
|
+
exact_matches = matches.dup
|
74
|
+
matches.count == expected.count && expected.all? do |e|
|
75
|
+
match, index = exact_matches.each_with_index.find { |a, _| values_match?(hash_including_recursive(e), a) }
|
76
|
+
exact_matches.delete_at(index) if match
|
77
|
+
end && exact_matches.empty?
|
78
|
+
end
|
79
|
+
|
80
|
+
failure_message do
|
81
|
+
<<~MSG
|
82
|
+
Expected the code block to journal exactly one matching event per expected event.
|
83
|
+
|
84
|
+
Expected Events (#{expected.count}):
|
85
|
+
===============================================================================
|
86
|
+
#{expected.map(&:to_json).join("\n ")}
|
87
|
+
===============================================================================
|
88
|
+
|
89
|
+
Matching Events (#{matches.count}):
|
90
|
+
===============================================================================
|
91
|
+
#{matches.map(&:to_json).join("\n ")}
|
92
|
+
===============================================================================
|
93
|
+
|
94
|
+
Non-Matching Events (#{nonmatches.count}):
|
95
|
+
===============================================================================
|
96
|
+
#{nonmatches.map(&:to_json).join("\n ")}
|
97
|
+
===============================================================================
|
98
|
+
MSG
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
RSpec::Matchers.alias_matcher :journal_event_including, :journal_events_including
|
103
|
+
RSpec::Matchers.define_negated_matcher :not_journal_events_including, :journal_events_including
|
104
|
+
RSpec::Matchers.define_negated_matcher :not_journal_event_including, :journal_event_including
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'active_record/connection_adapters/abstract/transaction'
|
2
|
+
|
3
|
+
module Journaled
|
4
|
+
module TransactionExt
|
5
|
+
def initialize(*, **)
|
6
|
+
super.tap do
|
7
|
+
raise TransactionSafetyError, <<~MSG unless instance_variable_defined?(:@run_commit_callbacks)
|
8
|
+
Journaled::TransactionExt expects @run_commit_callbacks to be defined on Transaction!
|
9
|
+
This is an internal API that may have changed in a recent Rails release.
|
10
|
+
If you were not expecting to see this error, please file an issue here:
|
11
|
+
https://github.com/Betterment/journaled/issues
|
12
|
+
MSG
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def before_commit_records
|
17
|
+
super.tap do
|
18
|
+
Writer.enqueue!(*_journaled_staged_events) if @run_commit_callbacks
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def commit_records
|
23
|
+
connection.current_transaction._journaled_staged_events.push(*_journaled_staged_events) unless @run_commit_callbacks
|
24
|
+
super
|
25
|
+
end
|
26
|
+
|
27
|
+
def _journaled_staged_events
|
28
|
+
@_journaled_staged_events ||= []
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/journaled/version.rb
CHANGED
data/lib/journaled.rb
CHANGED
@@ -4,6 +4,8 @@ require "json-schema"
|
|
4
4
|
|
5
5
|
require "journaled/engine"
|
6
6
|
require "journaled/current"
|
7
|
+
require "journaled/errors"
|
8
|
+
require 'journaled/connection'
|
7
9
|
|
8
10
|
module Journaled
|
9
11
|
SUPPORTED_QUEUE_ADAPTERS = %w(delayed delayed_job good_job que).freeze
|
@@ -14,32 +16,36 @@ module Journaled
|
|
14
16
|
mattr_accessor(:http_open_timeout) { 2 }
|
15
17
|
mattr_accessor(:http_read_timeout) { 60 }
|
16
18
|
mattr_accessor(:job_base_class_name) { 'ActiveJob::Base' }
|
19
|
+
mattr_accessor(:transactional_batching_enabled) { true }
|
17
20
|
|
18
|
-
def development_or_test?
|
21
|
+
def self.development_or_test?
|
19
22
|
%w(development test).include?(Rails.env)
|
20
23
|
end
|
21
24
|
|
22
|
-
def enabled?
|
23
|
-
|
25
|
+
def self.enabled?
|
26
|
+
['0', 'false', false, 'f', ''].exclude?(ENV.fetch('JOURNALED_ENABLED', !development_or_test?))
|
24
27
|
end
|
25
28
|
|
26
|
-
def schema_providers
|
29
|
+
def self.schema_providers
|
27
30
|
@schema_providers ||= [Journaled::Engine, Rails]
|
28
31
|
end
|
29
32
|
|
30
|
-
def commit_hash
|
33
|
+
def self.commit_hash
|
31
34
|
ENV.fetch('GIT_COMMIT')
|
32
35
|
end
|
33
36
|
|
34
|
-
def actor_uri
|
37
|
+
def self.actor_uri
|
35
38
|
Journaled::ActorUriProvider.instance.actor_uri
|
36
39
|
end
|
37
40
|
|
38
|
-
def
|
39
|
-
|
40
|
-
|
41
|
+
def self.queue_adapter
|
42
|
+
job_base_class_name.constantize.queue_adapter_name
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.detect_queue_adapter!
|
46
|
+
unless SUPPORTED_QUEUE_ADAPTERS.include?(queue_adapter)
|
41
47
|
raise <<~MSG
|
42
|
-
Journaled has detected an unsupported ActiveJob queue adapter: `:#{
|
48
|
+
Journaled has detected an unsupported ActiveJob queue adapter: `:#{queue_adapter}`
|
43
49
|
|
44
50
|
Journaled jobs must be enqueued transactionally to your primary database.
|
45
51
|
|
@@ -53,7 +59,7 @@ module Journaled
|
|
53
59
|
|
54
60
|
def self.tagged(**tags)
|
55
61
|
existing_tags = Current.tags
|
56
|
-
tag!(tags)
|
62
|
+
tag!(**tags)
|
57
63
|
yield
|
58
64
|
ensure
|
59
65
|
Current.tags = existing_tags
|
@@ -62,6 +68,4 @@ module Journaled
|
|
62
68
|
def self.tag!(**tags)
|
63
69
|
Current.tags = Current.tags.merge(tags)
|
64
70
|
end
|
65
|
-
|
66
|
-
module_function :development_or_test?, :enabled?, :schema_providers, :commit_hash, :actor_uri, :detect_queue_adapter!
|
67
71
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: journaled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Lipson
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activejob
|
@@ -87,18 +87,18 @@ dependencies:
|
|
87
87
|
name: appraisal
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- - "
|
90
|
+
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
92
|
+
version: '0'
|
93
93
|
type: :development
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - "
|
97
|
+
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
99
|
+
version: '0'
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
|
-
name:
|
101
|
+
name: betterlint
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
104
|
- - ">="
|
@@ -126,19 +126,19 @@ dependencies:
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
- !ruby/object:Gem::Dependency
|
129
|
-
name:
|
129
|
+
name: rspec-rails
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- - "
|
132
|
+
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
134
|
+
version: '0'
|
135
135
|
type: :development
|
136
136
|
prerelease: false
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- - "
|
139
|
+
- - ">="
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: '
|
141
|
+
version: '0'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: spring
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +195,20 @@ dependencies:
|
|
195
195
|
- - ">="
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
|
+
- !ruby/object:Gem::Dependency
|
199
|
+
name: uncruft
|
200
|
+
requirement: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
205
|
+
type: :development
|
206
|
+
prerelease: false
|
207
|
+
version_requirements: !ruby/object:Gem::Requirement
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: '0'
|
198
212
|
- !ruby/object:Gem::Dependency
|
199
213
|
name: webmock
|
200
214
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,56 +255,39 @@ files:
|
|
241
255
|
- journaled_schemas/journaled/change.json
|
242
256
|
- journaled_schemas/tagged_event.json
|
243
257
|
- lib/journaled.rb
|
258
|
+
- lib/journaled/connection.rb
|
244
259
|
- lib/journaled/current.rb
|
245
260
|
- lib/journaled/engine.rb
|
261
|
+
- lib/journaled/errors.rb
|
246
262
|
- lib/journaled/relation_change_protection.rb
|
247
263
|
- lib/journaled/rspec.rb
|
264
|
+
- lib/journaled/transaction_ext.rb
|
248
265
|
- lib/journaled/version.rb
|
249
|
-
- spec/dummy/README.rdoc
|
250
|
-
- spec/dummy/Rakefile
|
251
|
-
- spec/dummy/bin/bundle
|
252
|
-
- spec/dummy/bin/rails
|
253
|
-
- spec/dummy/bin/rake
|
254
|
-
- spec/dummy/config.ru
|
255
|
-
- spec/dummy/config/application.rb
|
256
|
-
- spec/dummy/config/boot.rb
|
257
|
-
- spec/dummy/config/database.yml
|
258
|
-
- spec/dummy/config/environment.rb
|
259
|
-
- spec/dummy/config/environments/development.rb
|
260
|
-
- spec/dummy/config/environments/test.rb
|
261
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
262
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
263
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
264
|
-
- spec/dummy/config/initializers/inflections.rb
|
265
|
-
- spec/dummy/config/initializers/mime_types.rb
|
266
|
-
- spec/dummy/config/initializers/session_store.rb
|
267
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
268
|
-
- spec/dummy/config/locales/en.yml
|
269
|
-
- spec/dummy/config/routes.rb
|
270
|
-
- spec/dummy/config/secrets.yml
|
271
|
-
- spec/dummy/db/schema.rb
|
272
|
-
- spec/dummy/public/404.html
|
273
|
-
- spec/dummy/public/422.html
|
274
|
-
- spec/dummy/public/500.html
|
275
|
-
- spec/dummy/public/favicon.ico
|
276
|
-
- spec/jobs/journaled/delivery_job_spec.rb
|
277
|
-
- spec/lib/journaled_spec.rb
|
278
|
-
- spec/models/concerns/journaled/actor_spec.rb
|
279
|
-
- spec/models/concerns/journaled/changes_spec.rb
|
280
|
-
- spec/models/database_change_protection_spec.rb
|
281
|
-
- spec/models/journaled/actor_uri_provider_spec.rb
|
282
|
-
- spec/models/journaled/change_writer_spec.rb
|
283
|
-
- spec/models/journaled/event_spec.rb
|
284
|
-
- spec/models/journaled/json_schema_model/validator_spec.rb
|
285
|
-
- spec/models/journaled/writer_spec.rb
|
286
|
-
- spec/rails_helper.rb
|
287
|
-
- spec/spec_helper.rb
|
288
|
-
- spec/support/environment_spec_helper.rb
|
289
266
|
homepage: http://github.com/Betterment/journaled
|
290
267
|
licenses:
|
291
268
|
- MIT
|
292
|
-
metadata:
|
293
|
-
|
269
|
+
metadata:
|
270
|
+
rubygems_mfa_required: 'true'
|
271
|
+
post_install_message: |+
|
272
|
+
============================
|
273
|
+
NOTE FOR UPGRADING JOURNALED
|
274
|
+
============================
|
275
|
+
|
276
|
+
If you are upgrading from an older `journaled` version, please be sure to
|
277
|
+
increment only ONE major version at a time.
|
278
|
+
|
279
|
+
⚠️ IF YOU ARE UPGRADING FROM 3.1 OR EARLIER, you should NOT USE THIS VERSION. ⚠️
|
280
|
+
|
281
|
+
Instead, install a version of the gem that is backwards compatible with your
|
282
|
+
app's currently-enqueued journaled jobs:
|
283
|
+
|
284
|
+
gem 'journaled', '~> 4.2.0' # upgrading from 3.0-3.1
|
285
|
+
gem 'journaled', '~> 3.1.0' # upgrading from 2.0-2.5
|
286
|
+
|
287
|
+
For additional upgrade instructions (e.g. how to handle a few BREAKING CHANGES
|
288
|
+
to environment variables), please see the README:
|
289
|
+
https://github.com/Betterment/journaled/blob/v5.0.0/README.md#upgrades
|
290
|
+
|
294
291
|
rdoc_options: []
|
295
292
|
require_paths:
|
296
293
|
- lib
|
@@ -298,55 +295,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
298
295
|
requirements:
|
299
296
|
- - ">="
|
300
297
|
- !ruby/object:Gem::Version
|
301
|
-
version: '
|
298
|
+
version: '2.6'
|
302
299
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
303
300
|
requirements:
|
304
301
|
- - ">="
|
305
302
|
- !ruby/object:Gem::Version
|
306
303
|
version: '0'
|
307
304
|
requirements: []
|
308
|
-
rubygems_version: 3.
|
305
|
+
rubygems_version: 3.3.5
|
309
306
|
signing_key:
|
310
307
|
specification_version: 4
|
311
308
|
summary: Journaling for Betterment apps.
|
312
|
-
test_files:
|
313
|
-
- spec/spec_helper.rb
|
314
|
-
- spec/dummy/bin/rake
|
315
|
-
- spec/dummy/bin/bundle
|
316
|
-
- spec/dummy/bin/rails
|
317
|
-
- spec/dummy/config/secrets.yml
|
318
|
-
- spec/dummy/config/routes.rb
|
319
|
-
- spec/dummy/config/locales/en.yml
|
320
|
-
- spec/dummy/config/environments/development.rb
|
321
|
-
- spec/dummy/config/environments/test.rb
|
322
|
-
- spec/dummy/config/environment.rb
|
323
|
-
- spec/dummy/config/application.rb
|
324
|
-
- spec/dummy/config/database.yml
|
325
|
-
- spec/dummy/config/boot.rb
|
326
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
327
|
-
- spec/dummy/config/initializers/mime_types.rb
|
328
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
329
|
-
- spec/dummy/config/initializers/session_store.rb
|
330
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
331
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
332
|
-
- spec/dummy/config/initializers/inflections.rb
|
333
|
-
- spec/dummy/config.ru
|
334
|
-
- spec/dummy/Rakefile
|
335
|
-
- spec/dummy/public/favicon.ico
|
336
|
-
- spec/dummy/public/422.html
|
337
|
-
- spec/dummy/public/500.html
|
338
|
-
- spec/dummy/public/404.html
|
339
|
-
- spec/dummy/db/schema.rb
|
340
|
-
- spec/dummy/README.rdoc
|
341
|
-
- spec/models/journaled/json_schema_model/validator_spec.rb
|
342
|
-
- spec/models/journaled/actor_uri_provider_spec.rb
|
343
|
-
- spec/models/journaled/event_spec.rb
|
344
|
-
- spec/models/journaled/change_writer_spec.rb
|
345
|
-
- spec/models/journaled/writer_spec.rb
|
346
|
-
- spec/models/database_change_protection_spec.rb
|
347
|
-
- spec/models/concerns/journaled/changes_spec.rb
|
348
|
-
- spec/models/concerns/journaled/actor_spec.rb
|
349
|
-
- spec/support/environment_spec_helper.rb
|
350
|
-
- spec/lib/journaled_spec.rb
|
351
|
-
- spec/jobs/journaled/delivery_job_spec.rb
|
352
|
-
- spec/rails_helper.rb
|
309
|
+
test_files: []
|
data/spec/dummy/README.rdoc
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
== README
|
2
|
-
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
4
|
-
application up and running.
|
5
|
-
|
6
|
-
Things you may want to cover:
|
7
|
-
|
8
|
-
* Ruby version
|
9
|
-
|
10
|
-
* System dependencies
|
11
|
-
|
12
|
-
* Configuration
|
13
|
-
|
14
|
-
* Database creation
|
15
|
-
|
16
|
-
* Database initialization
|
17
|
-
|
18
|
-
* How to run the test suite
|
19
|
-
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
21
|
-
|
22
|
-
* Deployment instructions
|
23
|
-
|
24
|
-
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
DELETED
data/spec/dummy/bin/bundle
DELETED
data/spec/dummy/bin/rails
DELETED
data/spec/dummy/bin/rake
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require File.expand_path('boot', __dir__)
|
2
|
-
|
3
|
-
require "active_record/railtie"
|
4
|
-
require "active_job/railtie"
|
5
|
-
require "active_model/railtie"
|
6
|
-
require "action_controller/railtie"
|
7
|
-
|
8
|
-
Bundler.require(*Rails.groups)
|
9
|
-
require "journaled"
|
10
|
-
|
11
|
-
module Dummy
|
12
|
-
class Application < Rails::Application
|
13
|
-
# Settings in config/environments/* take precedence over those specified here.
|
14
|
-
# Application configuration should go into files in config/initializers
|
15
|
-
# -- all .rb files in that directory are automatically loaded.
|
16
|
-
|
17
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
18
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
19
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
20
|
-
|
21
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
22
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
23
|
-
# config.i18n.default_locale = :de
|
24
|
-
end
|
25
|
-
end
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Do not eager load code on boot.
|
10
|
-
config.eager_load = false
|
11
|
-
|
12
|
-
# Show full error reports and disable caching.
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Print deprecation notices to the Rails logger.
|
17
|
-
config.active_support.deprecation = :log
|
18
|
-
|
19
|
-
# Raise an error on page load if there are pending migrations.
|
20
|
-
config.active_record.migration_error = :page_load
|
21
|
-
|
22
|
-
# Raises error for missing translations
|
23
|
-
# config.action_view.raise_on_missing_translations = true
|
24
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Rails.application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_assets = true
|
17
|
-
config.static_cache_control = 'public, max-age=3600'
|
18
|
-
|
19
|
-
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local = true
|
21
|
-
config.action_controller.perform_caching = false
|
22
|
-
|
23
|
-
# Raise exceptions instead of rendering exception templates.
|
24
|
-
config.action_dispatch.show_exceptions = false
|
25
|
-
|
26
|
-
# Disable request forgery protection in test environment.
|
27
|
-
config.action_controller.allow_forgery_protection = false
|
28
|
-
|
29
|
-
# Print deprecation notices to the stderr.
|
30
|
-
config.active_support.deprecation = :stderr
|
31
|
-
|
32
|
-
# Raises error for missing translations
|
33
|
-
# config.action_view.raise_on_missing_translations = true
|
34
|
-
|
35
|
-
# Use ActiveJob test adapter
|
36
|
-
config.active_job.queue_adapter = :test
|
37
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|