journaled 2.1.0 → 2.4.0

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.
@@ -47,14 +47,14 @@ RSpec.describe Journaled::Delivery do
47
47
  {
48
48
  assumed_role_user: {
49
49
  arn: 'iam-role-arn-for-assuming-kinesis-access',
50
- assumed_role_id: "ARO123EXAMPLE123:Bob"
50
+ assumed_role_id: "ARO123EXAMPLE123:Bob",
51
51
  },
52
52
  credentials: {
53
53
  access_key_id: "AKIAIOSFODNN7EXAMPLE",
54
54
  secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
55
55
  session_token: "EXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI",
56
- expiration: Time.zone.parse("2011-07-15T23:28:33.359Z")
57
- }
56
+ expiration: Time.zone.parse("2011-07-15T23:28:33.359Z"),
57
+ },
58
58
  }
59
59
  end
60
60
 
@@ -64,7 +64,7 @@ RSpec.describe Journaled::Delivery do
64
64
  expect(Aws::AssumeRoleCredentials).to have_received(:new).with(
65
65
  client: aws_sts_client,
66
66
  role_arn: "iam-role-arn-for-assuming-kinesis-access",
67
- role_session_name: "JournaledAssumeRoleAccess"
67
+ role_session_name: "JournaledAssumeRoleAccess",
68
68
  )
69
69
  end
70
70
  end
@@ -127,7 +127,7 @@ RSpec.describe Journaled::Delivery do
127
127
 
128
128
  it 'catches the error and re-raises a subclass of NotTrulyExceptionalError and logs about the failure' do
129
129
  expect(Rails.logger).to receive(:error).with(
130
- "Kinesis Error - Networking Error occurred - Seahorse::Client::NetworkingError"
130
+ "Kinesis Error - Networking Error occurred - Seahorse::Client::NetworkingError",
131
131
  ).once
132
132
  expect { subject.perform }.to raise_error described_class::KinesisTemporaryFailure
133
133
  end
@@ -185,5 +185,38 @@ RSpec.describe Journaled::Delivery do
185
185
  expect(subject.kinesis_client_config).to include(access_key_id: 'key_id', secret_access_key: 'secret')
186
186
  end
187
187
  end
188
+
189
+ it "will set http_idle_timeout by default" do
190
+ expect(subject.kinesis_client_config).to include(http_idle_timeout: 5)
191
+ end
192
+
193
+ it "will set http_open_timeout by default" do
194
+ expect(subject.kinesis_client_config).to include(http_open_timeout: 15)
195
+ end
196
+
197
+ it "will set http_read_timeout by default" do
198
+ expect(subject.kinesis_client_config).to include(http_read_timeout: 60)
199
+ end
200
+
201
+ context "when Journaled.http_idle_timeout is specified" do
202
+ it "will set http_idle_timeout by specified value" do
203
+ allow(Journaled).to receive(:http_idle_timeout).and_return(2)
204
+ expect(subject.kinesis_client_config).to include(http_idle_timeout: 2)
205
+ end
206
+ end
207
+
208
+ context "when Journaled.http_open_timeout is specified" do
209
+ it "will set http_open_timeout by specified value" do
210
+ allow(Journaled).to receive(:http_open_timeout).and_return(2)
211
+ expect(subject.kinesis_client_config).to include(http_open_timeout: 2)
212
+ end
213
+ end
214
+
215
+ context "when Journaled.http_read_timeout is specified" do
216
+ it "will set http_read_timeout by specified value" do
217
+ allow(Journaled).to receive(:http_read_timeout).and_return(2)
218
+ expect(subject.kinesis_client_config).to include(http_read_timeout: 2)
219
+ end
220
+ end
188
221
  end
189
222
  end
@@ -25,22 +25,7 @@ RSpec.describe Journaled::Event do
25
25
  it 'creates a Journaled::Writer with this event and journals it with the default priority' do
26
26
  sample_journaled_event.journal!
27
27
  expect(Journaled::Writer).to have_received(:new)
28
- .with(journaled_event: sample_journaled_event, priority: Journaled::JobPriority::EVENTUAL)
29
- expect(mock_journaled_writer).to have_received(:journal!)
30
- end
31
- end
32
-
33
- context 'when there is an app job priority is set' do
34
- around do |example|
35
- orig_priority = Journaled.job_priority
36
- Journaled.job_priority = 13
37
- example.run
38
- Journaled.job_priority = orig_priority
39
- end
40
-
41
- it 'creates a Journaled::Writer with this event and journals it with the given priority' do
42
- sample_journaled_event.journal!
43
- expect(Journaled::Writer).to have_received(:new).with(journaled_event: sample_journaled_event, priority: 13)
28
+ .with(journaled_event: sample_journaled_event)
44
29
  expect(mock_journaled_writer).to have_received(:journal!)
45
30
  end
46
31
  end
@@ -145,9 +130,31 @@ RSpec.describe Journaled::Event do
145
130
  created_at: frozen_time,
146
131
  event_type: 'some_class_name',
147
132
  foo: 'foo_return',
148
- bar: 'bar_return'
133
+ bar: 'bar_return',
149
134
  )
150
135
  end
151
136
  end
152
137
  end
138
+
139
+ describe '#journaled_enqueue_opts, .journaled_enqueue_opts' do
140
+ it 'defaults to an empty hash' do
141
+ expect(sample_journaled_event.journaled_enqueue_opts).to eq({})
142
+ expect(sample_journaled_event_class.journaled_enqueue_opts).to eq({})
143
+ end
144
+
145
+ context 'when there are custom opts provided' do
146
+ let(:sample_journaled_event_class) do
147
+ Class.new do
148
+ include Journaled::Event
149
+
150
+ journal_attributes :foo, enqueue_with: { priority: 34, foo: 'bar' }
151
+ end
152
+ end
153
+
154
+ it 'merges in the custom opts' do
155
+ expect(sample_journaled_event.journaled_enqueue_opts).to eq(priority: 34, foo: 'bar')
156
+ expect(sample_journaled_event_class.journaled_enqueue_opts).to eq(priority: 34, foo: 'bar')
157
+ end
158
+ end
159
+ end
153
160
  end
@@ -12,7 +12,7 @@ RSpec.describe Journaled::JsonSchemaModel::Validator do
12
12
  some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00'),
13
13
  some_int: some_int_value,
14
14
  some_optional_string: some_optional_string_value,
15
- some_nullable_field: some_nullable_field
15
+ some_nullable_field: some_nullable_field,
16
16
  }
17
17
  end
18
18
  let(:some_int_value) { 3 }
@@ -77,7 +77,7 @@ RSpec.describe Journaled::JsonSchemaModel::Validator do
77
77
  some_decimal: 0.1.to_d,
78
78
  some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00'),
79
79
  some_int: some_int_value,
80
- some_nullable_field: some_nullable_field
80
+ some_nullable_field: some_nullable_field,
81
81
  }
82
82
  end
83
83
 
@@ -108,7 +108,7 @@ RSpec.describe Journaled::JsonSchemaModel::Validator do
108
108
  {
109
109
  some_string: some_string_value,
110
110
  some_decimal: 0.1.to_d,
111
- some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00')
111
+ some_time: Time.zone.parse('2017-01-20 15:16:17 -05:00'),
112
112
  }
113
113
  end
114
114
 
@@ -1,7 +1,7 @@
1
1
  require 'rails_helper'
2
2
 
3
3
  RSpec.describe Journaled::Writer do
4
- subject { described_class.new journaled_event: journaled_event, priority: Journaled::JobPriority::EVENTUAL }
4
+ subject { described_class.new journaled_event: journaled_event }
5
5
 
6
6
  describe '#initialize' do
7
7
  context 'when the Journaled Event does not implement all the necessary methods' do
@@ -18,7 +18,8 @@ RSpec.describe Journaled::Writer do
18
18
  journaled_schema_name: nil,
19
19
  journaled_attributes: {},
20
20
  journaled_partition_key: '',
21
- journaled_app_name: nil
21
+ journaled_app_name: nil,
22
+ journaled_enqueue_opts: {},
22
23
  )
23
24
  end
24
25
 
@@ -33,12 +34,13 @@ RSpec.describe Journaled::Writer do
33
34
  journaled_schema_name: :fake_schema_name,
34
35
  journaled_attributes: { foo: :bar },
35
36
  journaled_partition_key: 'fake_partition_key',
36
- journaled_app_name: nil
37
+ journaled_app_name: nil,
38
+ journaled_enqueue_opts: {},
37
39
  )
38
40
  end
39
41
 
40
42
  it 'does not raise on initialization' do
41
- expect { subject }.to_not raise_error
43
+ expect { subject }.not_to raise_error
42
44
  end
43
45
  end
44
46
  end
@@ -67,12 +69,14 @@ RSpec.describe Journaled::Writer do
67
69
  allow(File).to receive(:read).with(schema_path).and_return(schema_file_contents)
68
70
  end
69
71
 
72
+ let(:journaled_enqueue_opts) { {} }
70
73
  let(:journaled_event) do
71
74
  double(
72
75
  journaled_schema_name: :fake_schema_name,
73
76
  journaled_attributes: journaled_event_attributes,
74
77
  journaled_partition_key: 'fake_partition_key',
75
- journaled_app_name: 'my_app'
78
+ journaled_app_name: 'my_app',
79
+ journaled_enqueue_opts: journaled_enqueue_opts,
76
80
  )
77
81
  end
78
82
 
@@ -108,18 +112,27 @@ RSpec.describe Journaled::Writer do
108
112
  expect(Journaled::Delivery).to have_received(:new).with(hash_including(app_name: 'my_app'))
109
113
  end
110
114
 
111
- it 'enqueues a Journaled::Delivery object with the serialized journaled_event at the lowest priority' do
112
- expect { subject.journal! }.to change {
113
- Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority: Journaled::JobPriority::EVENTUAL).count
114
- }.from(0).to(1)
115
+ context 'when there is no job priority specified in the enqueue opts' do
116
+ around do |example|
117
+ old_priority = Journaled.job_priority
118
+ Journaled.job_priority = 999
119
+ example.run
120
+ Journaled.job_priority = old_priority
121
+ end
122
+
123
+ it 'defaults to the global default' do
124
+ expect { subject.journal! }.to change {
125
+ Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority: 999).count
126
+ }.from(0).to(1)
127
+ end
115
128
  end
116
129
 
117
- context 'when the Writer was initialized with a priority' do
118
- subject { described_class.new journaled_event: journaled_event, priority: Journaled::JobPriority::INTERACTIVE }
130
+ context 'when there is a job priority specified in the enqueue opts' do
131
+ let(:journaled_enqueue_opts) { { priority: 13 } }
119
132
 
120
- it 'enqueues the event at the given priority' do
133
+ it 'enqueues a Journaled::Delivery object with the given priority' do
121
134
  expect { subject.journal! }.to change {
122
- Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority: Journaled::JobPriority::INTERACTIVE).count
135
+ Delayed::Job.where('handler like ?', '%Journaled::Delivery%').where(priority: 13).count
123
136
  }.from(0).to(1)
124
137
  end
125
138
  end
metadata CHANGED
@@ -1,32 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: journaled
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.4.0
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: 2019-09-04 00:00:00.000000000 Z
14
+ date: 2020-12-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: aws-sdk-resources
17
+ name: aws-sdk-kinesis
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '4'
22
+ version: '2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "<"
28
28
  - !ruby/object:Gem::Version
29
- version: '4'
29
+ version: '2'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: delayed_job
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -59,16 +59,22 @@ dependencies:
59
59
  name: rails
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - "~>"
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: '5.1'
65
+ - - "<"
66
+ - !ruby/object:Gem::Version
67
+ version: '7.0'
65
68
  type: :runtime
66
69
  prerelease: false
67
70
  version_requirements: !ruby/object:Gem::Requirement
68
71
  requirements:
69
- - - "~>"
72
+ - - ">="
70
73
  - !ruby/object:Gem::Version
71
74
  version: '5.1'
75
+ - - "<"
76
+ - !ruby/object:Gem::Version
77
+ version: '7.0'
72
78
  - !ruby/object:Gem::Dependency
73
79
  name: request_store
74
80
  requirement: !ruby/object:Gem::Requirement
@@ -83,6 +89,20 @@ dependencies:
83
89
  - - ">="
84
90
  - !ruby/object:Gem::Version
85
91
  version: '0'
92
+ - !ruby/object:Gem::Dependency
93
+ name: appraisal
94
+ requirement: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: 2.2.0
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: 2.2.0
86
106
  - !ruby/object:Gem::Dependency
87
107
  name: delayed_job_active_record
88
108
  requirement: !ruby/object:Gem::Requirement
@@ -157,16 +177,16 @@ dependencies:
157
177
  name: rubocop-betterment
158
178
  requirement: !ruby/object:Gem::Requirement
159
179
  requirements:
160
- - - '='
180
+ - - "~>"
161
181
  - !ruby/object:Gem::Version
162
- version: 1.3.0
182
+ version: '1.3'
163
183
  type: :development
164
184
  prerelease: false
165
185
  version_requirements: !ruby/object:Gem::Requirement
166
186
  requirements:
167
- - - '='
187
+ - - "~>"
168
188
  - !ruby/object:Gem::Version
169
- version: 1.3.0
189
+ version: '1.3'
170
190
  - !ruby/object:Gem::Dependency
171
191
  name: spring
172
192
  requirement: !ruby/object:Gem::Requirement
@@ -195,6 +215,20 @@ dependencies:
195
215
  - - ">="
196
216
  - !ruby/object:Gem::Version
197
217
  version: '0'
218
+ - !ruby/object:Gem::Dependency
219
+ name: sprockets
220
+ requirement: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - "<"
223
+ - !ruby/object:Gem::Version
224
+ version: '4.0'
225
+ type: :development
226
+ prerelease: false
227
+ version_requirements: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - "<"
230
+ - !ruby/object:Gem::Version
231
+ version: '4.0'
198
232
  - !ruby/object:Gem::Dependency
199
233
  name: timecop
200
234
  requirement: !ruby/object:Gem::Requirement
@@ -255,7 +289,7 @@ files:
255
289
  - journaled_schemas/journaled/change.json
256
290
  - lib/journaled.rb
257
291
  - lib/journaled/engine.rb
258
- - lib/journaled/job_priority.rb
292
+ - lib/journaled/enqueue.rb
259
293
  - lib/journaled/relation_change_protection.rb
260
294
  - lib/journaled/rspec.rb
261
295
  - lib/journaled/version.rb
@@ -285,8 +319,6 @@ files:
285
319
  - spec/dummy/config/secrets.yml
286
320
  - spec/dummy/db/migrate/20180606205114_create_delayed_jobs.rb
287
321
  - spec/dummy/db/schema.rb
288
- - spec/dummy/log/development.log
289
- - spec/dummy/log/test.log
290
322
  - spec/dummy/public/404.html
291
323
  - spec/dummy/public/422.html
292
324
  - spec/dummy/public/500.html
@@ -309,7 +341,7 @@ homepage: http://github.com/Betterment/journaled
309
341
  licenses:
310
342
  - MIT
311
343
  metadata: {}
312
- post_install_message:
344
+ post_install_message:
313
345
  rdoc_options: []
314
346
  require_paths:
315
347
  - lib
@@ -324,9 +356,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
356
  - !ruby/object:Gem::Version
325
357
  version: '0'
326
358
  requirements: []
327
- rubyforge_project:
328
- rubygems_version: 2.6.13
329
- signing_key:
359
+ rubygems_version: 3.0.1
360
+ signing_key:
330
361
  specification_version: 4
331
362
  summary: Journaling for Betterment apps.
332
363
  test_files:
@@ -360,8 +391,6 @@ test_files:
360
391
  - spec/dummy/public/404.html
361
392
  - spec/dummy/db/schema.rb
362
393
  - spec/dummy/db/migrate/20180606205114_create_delayed_jobs.rb
363
- - spec/dummy/log/test.log
364
- - spec/dummy/log/development.log
365
394
  - spec/dummy/README.rdoc
366
395
  - spec/models/journaled/json_schema_model/validator_spec.rb
367
396
  - spec/models/journaled/actor_uri_provider_spec.rb
@@ -1,5 +0,0 @@
1
- module Journaled::JobPriority
2
- INTERACTIVE = 0 # These jobs will actively hinder end-user interactions until complete, e.g. assembling a report a user is polling for.
3
- USER_VISIBLE = 10 # These jobs have end-user-visible side effects that will not obviously impact customers, e.g. welcome emails
4
- EVENTUAL = 20 # These jobs affect business process that are tolerant to some degree of queue backlog, e.g. desk record synchronization
5
- end
@@ -1,120 +0,0 @@
1
-  (456.1ms) CREATE DATABASE "journaled_development" ENCODING = 'unicode'
2
-  (423.4ms) CREATE DATABASE "journaled_test" ENCODING = 'unicode'
3
- SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
4
-  (0.2ms) DROP TABLE IF EXISTS "delayed_jobs" CASCADE
5
-  (21.3ms) CREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)
6
-  (1.1ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
7
-  (2.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
8
-  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
9
-  (6.2ms) INSERT INTO "schema_migrations" (version) VALUES (20180606205114)
10
-  (19.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
11
- ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
12
-  (0.2ms) BEGIN
13
- ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-06-26 19:19:25.082089"], ["updated_at", "2018-06-26 19:19:25.082089"]]
14
-  (5.8ms) COMMIT
15
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
16
-  (0.2ms) BEGIN
17
-  (0.2ms) COMMIT
18
- SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
19
-  (0.2ms) DROP TABLE IF EXISTS "delayed_jobs" CASCADE
20
-  (11.0ms) CREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)
21
-  (1.5ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
22
-  (3.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
23
-  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
24
-  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES (20180606205114)
25
-  (3.3ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
26
- ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
27
-  (0.2ms) BEGIN
28
- ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-06-26 19:19:25.142470"], ["updated_at", "2018-06-26 19:19:25.142470"]]
29
-  (0.4ms) COMMIT
30
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
31
-  (0.2ms) BEGIN
32
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2018-06-26 19:19:25.145681"], ["key", "environment"]]
33
-  (0.3ms) COMMIT
34
-  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
35
-  (2.6ms) CREATE DATABASE "journaled_development" ENCODING = 'utf8'
36
-  (0.5ms) CREATE DATABASE "journaled_test" ENCODING = 'utf8'
37
-  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
38
-  (0.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
39
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
40
-  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
41
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
42
-  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
43
- SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
44
-  (5.0ms) DROP TABLE IF EXISTS "delayed_jobs" CASCADE
45
-  (5.1ms) CREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)
46
-  (1.2ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
47
-  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
48
- ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
49
-  (0.3ms) BEGIN
50
-  (0.2ms) COMMIT
51
- ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
52
-  (0.2ms) BEGIN
53
-  (0.2ms) COMMIT
54
- SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
55
-  (10.8ms) DROP TABLE IF EXISTS "delayed_jobs" CASCADE
56
-  (6.6ms) CREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)
57
-  (1.5ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
58
-  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
59
- ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
60
-  (0.2ms) BEGIN
61
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "development"], ["updated_at", "2018-06-26 19:24:49.383169"], ["key", "environment"]]
62
-  (0.3ms) COMMIT
63
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
64
-  (0.2ms) BEGIN
65
- ActiveRecord::InternalMetadata Update (0.3ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2018-06-26 19:24:49.386424"], ["key", "environment"]]
66
-  (0.3ms) COMMIT
67
-  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
68
-  (563.5ms) CREATE DATABASE "journaled_development" ENCODING = 'utf8'
69
-  (439.5ms) CREATE DATABASE "journaled_test" ENCODING = 'utf8'
70
- SQL (0.7ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
71
-  (0.2ms) DROP TABLE IF EXISTS "delayed_jobs" CASCADE
72
-  (6.4ms) CREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)
73
-  (1.1ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
74
-  (2.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
75
-  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
76
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES (20180606205114)
77
-  (2.0ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
78
- ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
79
-  (0.3ms) BEGIN
80
- ActiveRecord::InternalMetadata Create (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2019-05-28 16:43:50.056665"], ["updated_at", "2019-05-28 16:43:50.056665"]]
81
-  (0.3ms) COMMIT
82
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
83
-  (0.2ms) BEGIN
84
-  (0.2ms) COMMIT
85
- SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
86
-  (0.2ms) DROP TABLE IF EXISTS "delayed_jobs" CASCADE
87
-  (5.3ms) CREATE TABLE "delayed_jobs" ("id" bigserial primary key, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" timestamp, "locked_at" timestamp, "failed_at" timestamp, "locked_by" character varying, "queue" character varying, "created_at" timestamp, "updated_at" timestamp)
88
-  (1.0ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
89
-  (2.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
90
-  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
91
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES (20180606205114)
92
-  (2.4ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
93
- ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
94
-  (0.2ms) BEGIN
95
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2019-05-28 16:43:50.127229"], ["updated_at", "2019-05-28 16:43:50.127229"]]
96
-  (0.4ms) COMMIT
97
- ActiveRecord::InternalMetadata Load (0.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
98
-  (0.2ms) BEGIN
99
- ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3 [["value", "test"], ["updated_at", "2019-05-28 16:43:50.131572"], ["key", "environment"]]
100
-  (0.3ms) COMMIT
101
-  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
102
-  (34.8ms) SELECT pg_try_advisory_lock(6470627369034430140)
103
-  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
104
- Migrating to AddSoldierTable (20190529213045)
105
-  (0.2ms) BEGIN
106
-  (45.1ms) CREATE TABLE "soldiers" ("id" uuid DEFAULT gen_random_uuid() NOT NULL PRIMARY KEY, "name" character varying, "rank" character varying, "serial_number" character varying, "last_sign_in_at" timestamp)
107
-  (0.2ms) ROLLBACK
108
-  (0.3ms) SELECT pg_advisory_unlock(6470627369034430140)
109
-  (0.2ms) SELECT pg_try_advisory_lock(6470627369034430140)
110
-  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
111
- Migrating to AddSoldierTable (20190529213045)
112
-  (0.2ms) BEGIN
113
-  (54.2ms) CREATE TABLE "soldiers" ("id" bigserial primary key, "name" character varying, "rank" character varying, "serial_number" character varying, "last_sign_in_at" timestamp)
114
- ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190529213045"]]
115
-  (0.5ms) COMMIT
116
- ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
117
-  (0.2ms) BEGIN
118
-  (0.2ms) COMMIT
119
-  (0.3ms) SELECT pg_advisory_unlock(6470627369034430140)
120
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC